Import csync-0.50.6.

csync is a lightweight utility to synchronize files between two
directories on a system or between multiple systems.
<...>

inputs/ok jasper@

NOTE that currently the owncloud module is commented in the PLIST
because there is something wrong with our neon library for webdav which
segfaults. I am working on this -- for now at least local and sftp sync
work fine.
This commit is contained in:
ajacoutot 2012-06-18 08:51:46 +00:00
parent 15c1f311bc
commit c93da52ff2
8 changed files with 175 additions and 0 deletions

46
net/csync/Makefile Normal file
View File

@ -0,0 +1,46 @@
# $OpenBSD: Makefile,v 1.1.1.1 2012/06/18 08:51:46 ajacoutot Exp $
SHARED_ONLY= Yes
COMMENT= bidirectional directories synchronizer
DISTNAME= csync-0.50.6
EXTRACT_SUFX= .tar.bz2
CATEGORIES= net
SHARED_LIBS += csync 0.0 # 0.1
HOMEPAGE= http://www.csync.org/
# GPLv2+
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB += c log4c neon smbclient sqlite3 ssh
MASTER_SITES= http://download.owncloud.com/download/
MODULES= devel/cmake
BUILD_DEPENDS= devel/argp-standalone \
devel/check \
devel/doxygen \
devel/iniparser
LIB_DEPENDS= devel/log4c \
net/neon \
net/samba \
security/libssh
CONFIGURE_ARGS= -DCMAKE_C_FLAGS="${CFLAGS}" \
-DMAN_INSTALL_DIR=${PREFIX}/man \
-DSYSCONFDIR=${SYSCONFDIR} \
-DSYSCONF_INSTALL_DIR=${PREFIX}/share/examples
NO_REGRESS= Yes
USE_GROFF= Yes
.include <bsd.port.mk>

5
net/csync/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (csync-0.50.6.tar.bz2) = w5ckArMrYB/KuN3cPmek1w==
RMD160 (csync-0.50.6.tar.bz2) = /2tklwNdOYVP6ajnTfX0XS7XHH4=
SHA1 (csync-0.50.6.tar.bz2) = sXWNTLJ8emX+VMF/oP/6rcY4mcY=
SHA256 (csync-0.50.6.tar.bz2) = mZTD2VsVKB3UK6ZX3/snq9y5+WrEYflOahBIqjtmjKk=
SIZE (csync-0.50.6.tar.bz2) = 1330117

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-src_csync_propagate_c,v 1.1.1.1 2012/06/18 08:51:46 ajacoutot Exp $
--- src/csync_propagate.c.orig Mon May 21 09:50:38 2012
+++ src/csync_propagate.c Sat Jun 16 11:07:57 2012
@@ -22,6 +22,7 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#define O_NOATIME 01000000
#endif
#include <errno.h>

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-src_std_c_file_c,v 1.1.1.1 2012/06/18 08:51:46 ajacoutot Exp $
--- src/std/c_file.c.orig Mon May 21 09:50:38 2012
+++ src/std/c_file.c Sat Jun 16 11:07:57 2012
@@ -119,14 +119,14 @@ int c_copy(const char* src, const char *dst, mode_t mo
/* done */
break;
} else if (bread < 0) {
- errno = ENODATA;
+ errno = ENOENT;
rc = -1;
goto out;
}
bwritten = write(dstfd, buf, bread);
if (bwritten < 0) {
- errno = ENODATA;
+ errno = ENOENT;
rc = -1;
goto out;
}

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-src_std_c_macro_h,v 1.1.1.1 2012/06/18 08:51:46 ajacoutot Exp $
--- src/std/c_macro.h.orig Mon May 21 09:50:38 2012
+++ src/std/c_macro.h Sat Jun 16 11:07:57 2012
@@ -46,10 +46,14 @@
#define SAFE_FREE(x) do { if ((x) != NULL) {free((void*)x); x=NULL;} } while(0)
/** Get the smaller value */
+#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
/** Get the bigger value */
+#ifndef MAX
#define MAX(a,b) ((a) < (b) ? (b) : (a))
+#endif
/** Get the size of an array */
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_vio_csync_vio_c,v 1.1.1.1 2012/06/18 08:51:46 ajacoutot Exp $
--- src/vio/csync_vio.c.orig Mon May 21 09:50:38 2012
+++ src/vio/csync_vio.c Sat Jun 16 11:07:57 2012
@@ -50,7 +50,7 @@
int csync_vio_init(CSYNC *ctx, const char *module, const char *args) {
csync_stat_t sb;
char *path = NULL;
- char *err = NULL;
+ const char *err = NULL;
csync_vio_method_t *m = NULL;
csync_vio_method_init_fn init_fn;
const _TCHAR *mpath = NULL;

8
net/csync/pkg/DESCR Normal file
View File

@ -0,0 +1,8 @@
csync is a lightweight utility to synchronize files between two
directories on a system or between multiple systems.
It synchronizes bidirectionally and allows the user to keep two copies
of files and directories in sync. csync uses widely adopted protocols,
such as smb or sftp, so that there is no need for a server component.
It is a user-level program which means you don't need to be a superuser
or administrator.

55
net/csync/pkg/PLIST Normal file
View File

@ -0,0 +1,55 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/06/18 08:51:46 ajacoutot Exp $
@bin bin/csync
include/csync/
include/csync/csync.h
include/csync/csync_vio.h
include/csync/csync_vio_file_stat.h
include/csync/csync_vio_handle.h
include/csync/csync_vio_method.h
include/csync/csync_vio_module.h
lib/csync-0/
@comment lib/csync-0/csync_owncloud.so
lib/csync-0/csync_sftp.so
lib/csync-0/csync_smb.so
@lib lib/libcsync.so.${LIBcsync_VERSION}
@man man/man1/csync.1
share/doc/csync/
share/doc/csync/userguide/
share/doc/csync/userguide/csync.html
share/doc/csync/userguide/images/
share/doc/csync/userguide/images/icons/
share/doc/csync/userguide/images/icons/README
share/doc/csync/userguide/images/icons/callouts/
share/doc/csync/userguide/images/icons/callouts/1.png
share/doc/csync/userguide/images/icons/callouts/10.png
share/doc/csync/userguide/images/icons/callouts/11.png
share/doc/csync/userguide/images/icons/callouts/12.png
share/doc/csync/userguide/images/icons/callouts/13.png
share/doc/csync/userguide/images/icons/callouts/14.png
share/doc/csync/userguide/images/icons/callouts/15.png
share/doc/csync/userguide/images/icons/callouts/2.png
share/doc/csync/userguide/images/icons/callouts/3.png
share/doc/csync/userguide/images/icons/callouts/4.png
share/doc/csync/userguide/images/icons/callouts/5.png
share/doc/csync/userguide/images/icons/callouts/6.png
share/doc/csync/userguide/images/icons/callouts/7.png
share/doc/csync/userguide/images/icons/callouts/8.png
share/doc/csync/userguide/images/icons/callouts/9.png
share/doc/csync/userguide/images/icons/caution.png
share/doc/csync/userguide/images/icons/example.png
share/doc/csync/userguide/images/icons/home.png
share/doc/csync/userguide/images/icons/important.png
share/doc/csync/userguide/images/icons/next.png
share/doc/csync/userguide/images/icons/note.png
share/doc/csync/userguide/images/icons/prev.png
share/doc/csync/userguide/images/icons/tip.png
share/doc/csync/userguide/images/icons/up.png
share/doc/csync/userguide/images/icons/warning.png
share/examples/csync/
@sample ${SYSCONFDIR}/csync/
share/examples/csync/csync.conf
@sample ${SYSCONFDIR}/csync/csync.conf
share/examples/csync/csync_exclude.conf
@sample ${SYSCONFDIR}/csync/csync_exclude.conf
share/examples/csync/csync_log.conf
@sample ${SYSCONFDIR}/csync/csync_log.conf