Index: head/net/csync2/Makefile =================================================================== --- head/net/csync2/Makefile (revision 410828) +++ head/net/csync2/Makefile (revision 410829) @@ -1,53 +1,45 @@ # Created by: Aaron Dalton # $FreeBSD$ PORTNAME= csync2 -PORTVERSION= 1.34 -PORTREVISION= 20 +PORTVERSION= 2.0 CATEGORIES= net -MASTER_SITES= http://oss.linbit.com/csync2/ \ - http://people.freebsd.org/~aaron/distfiles/ +MASTER_SITES= http://oss.linbit.com/csync2/ MAINTAINER= alexey@renatasystems.org COMMENT= Cluster synchronization tool -LIB_DEPENDS= librsync.so:${PORTSDIR}/net/librsync \ - libtasn1.so:${PORTSDIR}/security/libtasn1 \ +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS= librsync.so.2:${PORTSDIR}/net/librsync1 \ libgnutls.so:${PORTSDIR}/security/gnutls \ - libsqlite.so:${PORTSDIR}/databases/sqlite2 \ - libgcrypt.so:${PORTSDIR}/security/libgcrypt \ - libgpg-error.so:${PORTSDIR}/security/libgpg-error + libsqlite3.so:${PORTSDIR}/databases/sqlite3 -OPTIONS_DEFINE= CSYNC2_COMPARE -CSYNC2_COMPARE_DESC= Install csync2-compare script +OPTIONS_DEFINE= CSYNC2_COMPARE DOCS +OPTIONS_SUB= yes +CSYNC2_COMPARE_DESC= Install csync2-compare script +CSYNC2_COMPARE_RUN_DEPENDS= bash:${PORTSDIR}/shells/bash -USES= pkgconfig +USES= pkgconfig shebangfix +SHEBANG_FILES= csync2-compare GNU_CONFIGURE= yes -CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc -CONFIGURE_ENV= LIBGNUTLS_CONFIG="${LOCALBASE}/bin/pkg-config gnutls" +CONFIGURE_ARGS= ac_cv_prog_PDFLATEX= CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib +LIBS+= -L${LOCALBASE}/lib USE_RC_SUBR= csync2 -PLIST_FILES= etc/csync2.cfg-dist \ - sbin/csync2 \ - man/man1/csync2.1.gz - SUB_FILES= pkg-install -.include - -.if ${PORT_OPTIONS:MCSYNC2_COMPARE} -RUN_DEPENDS+= bash:${PORTSDIR}/shells/bash -PLIST_FILES+= sbin/csync2-compare -CSYNC2_COMPARE= csync2-compare -.else -CSYNC2_COMPARE= -.endif - post-patch: - ${REINPLACE_CMD} -E "s#%%CSYNC2_COMPARE%%#${CSYNC2_COMPARE}#" ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} -e 's|(localstatedir)/lib|(localstatedir)/db|' \ + -e 's/-ldl//' ${WRKSRC}/Makefile.in + +post-install: + ${MV} ${STAGEDIR}${PREFIX}/etc/csync2.cfg \ + ${STAGEDIR}${PREFIX}/etc/csync2.cfg.sample + ${MKDIR} ${STAGEDIR}/var/backups/csync2 .include Index: head/net/csync2/distinfo =================================================================== --- head/net/csync2/distinfo (revision 410828) +++ head/net/csync2/distinfo (revision 410829) @@ -1,2 +1,2 @@ -SHA256 (csync2-1.34.tar.gz) = 32b250dd4a0353f71015c5c3961174b975dd5e799e4a084e8f6d00792bd8c833 -SIZE (csync2-1.34.tar.gz) = 222765 +SHA256 (csync2-2.0.tar.gz) = 11cb37380fb185bce0c22b804fec9b01c385d9d83cc528cfd48d748453834fa2 +SIZE (csync2-2.0.tar.gz) = 411013 Index: head/net/csync2/files/patch-configure =================================================================== --- head/net/csync2/files/patch-configure (revision 410828) +++ head/net/csync2/files/patch-configure (nonexistent) @@ -1,11 +0,0 @@ ---- configure.org 2009-09-03 14:22:32.000000000 +0900 -+++ configure 2009-09-03 14:23:02.000000000 +0900 -@@ -3836,7 +3836,7 @@ - else - LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags` - LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs` -- libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version` -+ libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --modversion` - - - ac_save_CFLAGS="$CFLAGS" Property changes on: head/net/csync2/files/patch-configure ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/csync2/files/patch-Makefile.am =================================================================== --- head/net/csync2/files/patch-Makefile.am (revision 410828) +++ head/net/csync2/files/patch-Makefile.am (nonexistent) @@ -1,20 +0,0 @@ ---- ./Makefile.am.orig 2007-07-24 14:04:18.000000000 -0700 -+++ ./Makefile.am 2008-01-17 02:39:33.790652051 -0800 -@@ -48,14 +48,14 @@ - LIBS += -lprivatesqlite - endif - --AM_CPPFLAGS = -D'DBDIR="$(localstatedir)/lib/csync2"' -+AM_CPPFLAGS = -D'DBDIR="$(localstatedir)/db/csync2"' - AM_CPPFLAGS += -D'ETCDIR="$(sysconfdir)"' - - install-data-local: - $(mkinstalldirs) $(DESTDIR)$(sysconfdir) -- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/csync2 -+ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/db/csync2 - test -e $(DESTDIR)$(sysconfdir)/csync2.cfg || \ -- $(INSTALL_DATA) $(srcdir)/csync2.cfg $(DESTDIR)$(sysconfdir)/csync2.cfg -+ $(INSTALL_DATA) $(srcdir)/csync2.cfg $(DESTDIR)$(sysconfdir)/csync2.cfg-dist - - cert: - $(mkinstalldirs) $(DESTDIR)$(sysconfdir) Property changes on: head/net/csync2/files/patch-Makefile.am ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/csync2/files/patch-Makefile.in =================================================================== --- head/net/csync2/files/patch-Makefile.in (revision 410828) +++ head/net/csync2/files/patch-Makefile.in (nonexistent) @@ -1,32 +0,0 @@ ---- Makefile.in.orig 2007-07-24 21:04:25.000000000 +0000 -+++ Makefile.in 2010-05-20 10:51:32.000000000 +0000 -@@ -150,7 +150,7 @@ - target_alias = @target_alias@ - - sbin_PROGRAMS = csync2 --sbin_SCRIPTS = csync2-compare -+sbin_SCRIPTS = %%CSYNC2_COMPARE%% - man_MANS = csync2.1 - - csync2_SOURCES = action.c cfgfile_parser.y cfgfile_scanner.l check.c \ -@@ -168,7 +168,7 @@ - AM_CFLAGS = $(am__append_2) $(am__append_6) - AM_LDFLAGS = $(am__append_3) $(am__append_7) - --AM_CPPFLAGS = -D'DBDIR="$(localstatedir)/lib/csync2"' -D'ETCDIR="$(sysconfdir)"' -+AM_CPPFLAGS = -D'DBDIR="$(localstatedir)/db/csync2"' -D'ETCDIR="$(sysconfdir)"' - subdir = . - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -@@ -699,9 +699,9 @@ - - install-data-local: - $(mkinstalldirs) $(DESTDIR)$(sysconfdir) -- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/csync2 -+ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/db/csync2 - test -e $(DESTDIR)$(sysconfdir)/csync2.cfg || \ -- $(INSTALL_DATA) $(srcdir)/csync2.cfg $(DESTDIR)$(sysconfdir)/csync2.cfg -+ $(INSTALL_DATA) $(srcdir)/csync2.cfg $(DESTDIR)$(sysconfdir)/csync2.cfg-dist - - cert: - $(mkinstalldirs) $(DESTDIR)$(sysconfdir) Property changes on: head/net/csync2/files/patch-Makefile.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/csync2/files/patch-csync2-compare =================================================================== --- head/net/csync2/files/patch-csync2-compare (revision 410828) +++ head/net/csync2/files/patch-csync2-compare (nonexistent) @@ -1,8 +0,0 @@ ---- csync2-compare.orig 2010-05-20 10:55:31.000000000 +0000 -+++ csync2-compare 2010-05-20 10:55:50.000000000 +0000 -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/usr/local/bin/bash - - verbose=0 - Property changes on: head/net/csync2/files/patch-csync2-compare ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/csync2/files/patch-csync2.h =================================================================== --- head/net/csync2/files/patch-csync2.h (nonexistent) +++ head/net/csync2/files/patch-csync2.h (revision 410829) @@ -0,0 +1,11 @@ +--- csync2.h.orig 2013-05-02 12:58:14 UTC ++++ csync2.h +@@ -80,7 +80,7 @@ extern int csync_perm(const char *filena + + extern void csync_printtime(); + extern void csync_printtotaltime(); +-extern void csync_fatal(const char *fmt, ...); ++extern void csync_fatal(const char *fmt, ...) __dead2; + extern void csync_debug(int lv, const char *fmt, ...); + + #define csync_debug_ping(N) \ Property changes on: head/net/csync2/files/patch-csync2.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/csync2/files/patch-rsync.c =================================================================== --- head/net/csync2/files/patch-rsync.c (nonexistent) +++ head/net/csync2/files/patch-rsync.c (revision 410829) @@ -0,0 +1,30 @@ +--- rsync.c.orig 2015-03-09 14:08:51 UTC ++++ rsync.c +@@ -41,6 +41,7 @@ + + /* This has been taken from rsync:lib/compat.c */ + ++#if 0 + /** + * Like strncpy but does not 0 fill the buffer and always null + * terminates. +@@ -61,6 +62,7 @@ static size_t strlcpy(char *d, const cha + } + return ret; + } ++#endif + + /* splits filepath at the last '/', if any, like so: + * dirname basename filepath +@@ -117,7 +119,10 @@ int mkpath(const char *path, mode_t mode + return -1; + } + +- strlcpy(temp,path,strlen(path)); ++ if(strlcpy(temp,path,sizeof(temp))>=sizeof(temp)) { ++ csync_debug(1,"path too long: %s",path); ++ return -1; ++ } + csync_debug(1,"mkpath full path: %s",temp); + for( remaining=strchr(temp+1, '/'); remaining!=NULL; remaining=strchr(remaining+1, '/') ){ + *remaining='\0'; Property changes on: head/net/csync2/files/patch-rsync.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/csync2/files/pkg-install.in =================================================================== --- head/net/csync2/files/pkg-install.in (revision 410828) +++ head/net/csync2/files/pkg-install.in (revision 410829) @@ -1,68 +1,60 @@ #!/bin/sh -: ${PREFIX:="%%PREFIX%%"} -: ${CSYNC2_DBDIR:="/var/db/csync2"} -: ${CSYNC2_BACKUPDIR:="/var/backups/csync2"} - create_cert() { _errlog=`mktemp /tmp/.${0##*/}.XXXXX` code=0 exec 3>&2 2>${_errlog} - openssl genrsa -out ${PREFIX}/etc/csync2_ssl_key.pem 1024 || code=1 - yes '' | openssl req -new -key ${PREFIX}/etc/csync2_ssl_key.pem \ + openssl genrsa -out ${PKG_PREFIX}/etc/csync2_ssl_key.pem 1024 || code=1 + yes '' | openssl req -new -key ${PKG_PREFIX}/etc/csync2_ssl_key.pem \ -out /tmp/csync2_ssl_cert.csr || code=1 openssl x509 -req -days 600 -in /tmp/csync2_ssl_cert.csr \ - -signkey ${PREFIX}/etc/csync2_ssl_key.pem \ - -out ${PREFIX}/etc/csync2_ssl_cert.pem || code=1 + -signkey ${PKG_PREFIX}/etc/csync2_ssl_key.pem \ + -out ${PKG_PREFIX}/etc/csync2_ssl_cert.pem || code=1 rm -f /tmp/csync2_ssl_cert.csr if [ ${code} -ne 0 ]; then echo "csync2: OpenSSL error occurred:" echo cat ${_errlog} echo rm -f ${_errlog} return 1 fi exec 2>&3 rm -f ${_errlog} - chmod 600 ${PREFIX}/etc/csync2_ssl_key.pem \ - ${PREFIX}/etc/csync2_ssl_cert.pem + chmod 600 ${PKG_PREFIX}/etc/csync2_ssl_key.pem \ + ${PKG_PREFIX}/etc/csync2_ssl_cert.pem echo "csync2: RSA certificate-key pair installed." return 0 } pre_install() { return 0 } post_install() { [ -n "${PACKAGE_BUILDING}" ] && return 0 - for _dir in ${CSYNC2_DBDIR} ${CSYNC2_BACKUPDIR}; do - [ ! -d ${_dir} ] && mkdir -p -m 700 ${_dir} - done - - if [ ! -f ${PREFIX}/etc/csync2_ssl_cert.pem ]; then + if [ ! -f ${PKG_PREFIX}/etc/csync2_ssl_cert.pem ]; then create_cert || return $? fi return 0 } [ $# -eq 2 ] || exit 0 case $2 in "PRE-INSTALL") pre_install ;; "POST-INSTALL") post_install ;; esac Index: head/net/csync2/pkg-plist =================================================================== --- head/net/csync2/pkg-plist (nonexistent) +++ head/net/csync2/pkg-plist (revision 410829) @@ -0,0 +1,9 @@ +@sample etc/csync2.cfg.sample +man/man1/csync2.1.gz +sbin/csync2 +%%CSYNC2_COMPARE%%sbin/csync2-compare +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/README +@dir(,,700) /var/db/csync2 +@dir(,,700) /var/backups/csync2 Property changes on: head/net/csync2/pkg-plist ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property