diff options
author | tijl <tijl@FreeBSD.org> | 2016-03-11 21:33:35 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2016-03-11 21:33:35 +0800 |
commit | 873502b1152cb51e481ea5fbb8540442c642c4fb (patch) | |
tree | 9163fa10b7ea95a0b8be21685906609340595ee7 | |
parent | 71b55425065829520ea1d278485b0f80d28ed0cd (diff) | |
download | freebsd-ports-gnome-873502b1152cb51e481ea5fbb8540442c642c4fb.tar.gz freebsd-ports-gnome-873502b1152cb51e481ea5fbb8540442c642c4fb.tar.zst freebsd-ports-gnome-873502b1152cb51e481ea5fbb8540442c642c4fb.zip |
- Update net/csync2 to version 2.0.
- Prevent use of pdflatex when it's installed.
- Replace patch-csync2-compare with USES=shebangfix.
- Add a patch to fix use of strlcpy (pass size of destination instead of
source).
- Add a patch to let the compiler know csync_fatal does not return. This
fixes a warning about an uninitialised variable.
- Use predefined PKG_PREFIX in pkg-install and create directories from
pkg-plist.
PR: 207765
Approved by: alexey@renatasystems.org (maintainer)
-rw-r--r-- | net/csync2/Makefile | 52 | ||||
-rw-r--r-- | net/csync2/distinfo | 4 | ||||
-rw-r--r-- | net/csync2/files/patch-Makefile.am | 20 | ||||
-rw-r--r-- | net/csync2/files/patch-Makefile.in | 32 | ||||
-rw-r--r-- | net/csync2/files/patch-configure | 11 | ||||
-rw-r--r-- | net/csync2/files/patch-csync2-compare | 8 | ||||
-rw-r--r-- | net/csync2/files/patch-csync2.h | 11 | ||||
-rw-r--r-- | net/csync2/files/patch-rsync.c | 30 | ||||
-rw-r--r-- | net/csync2/files/pkg-install.in | 22 | ||||
-rw-r--r-- | net/csync2/pkg-plist | 9 |
10 files changed, 81 insertions, 118 deletions
diff --git a/net/csync2/Makefile b/net/csync2/Makefile index 715bf4b7c1b1..8d41d69b86a4 100644 --- a/net/csync2/Makefile +++ b/net/csync2/Makefile @@ -2,52 +2,44 @@ # $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 <bsd.port.options.mk> - -.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 <bsd.port.mk> diff --git a/net/csync2/distinfo b/net/csync2/distinfo index b710747993f7..9ddef1e7c94e 100644 --- a/net/csync2/distinfo +++ b/net/csync2/distinfo @@ -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 diff --git a/net/csync2/files/patch-Makefile.am b/net/csync2/files/patch-Makefile.am deleted file mode 100644 index 1e4e43702ffb..000000000000 --- a/net/csync2/files/patch-Makefile.am +++ /dev/null @@ -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) diff --git a/net/csync2/files/patch-Makefile.in b/net/csync2/files/patch-Makefile.in deleted file mode 100644 index 002aa80210ad..000000000000 --- a/net/csync2/files/patch-Makefile.in +++ /dev/null @@ -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) diff --git a/net/csync2/files/patch-configure b/net/csync2/files/patch-configure deleted file mode 100644 index c1402324090a..000000000000 --- a/net/csync2/files/patch-configure +++ /dev/null @@ -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" diff --git a/net/csync2/files/patch-csync2-compare b/net/csync2/files/patch-csync2-compare deleted file mode 100644 index 2e2d1a17713e..000000000000 --- a/net/csync2/files/patch-csync2-compare +++ /dev/null @@ -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 - diff --git a/net/csync2/files/patch-csync2.h b/net/csync2/files/patch-csync2.h new file mode 100644 index 000000000000..c6d392192ac5 --- /dev/null +++ b/net/csync2/files/patch-csync2.h @@ -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) \ diff --git a/net/csync2/files/patch-rsync.c b/net/csync2/files/patch-rsync.c new file mode 100644 index 000000000000..c8f47627d5cb --- /dev/null +++ b/net/csync2/files/patch-rsync.c @@ -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'; diff --git a/net/csync2/files/pkg-install.in b/net/csync2/files/pkg-install.in index ae42495104e8..9401f90b79e0 100644 --- a/net/csync2/files/pkg-install.in +++ b/net/csync2/files/pkg-install.in @@ -1,9 +1,5 @@ #!/bin/sh -: ${PREFIX:="%%PREFIX%%"} -: ${CSYNC2_DBDIR:="/var/db/csync2"} -: ${CSYNC2_BACKUPDIR:="/var/backups/csync2"} - create_cert() { _errlog=`mktemp /tmp/.${0##*/}.XXXXX` @@ -11,12 +7,12 @@ create_cert() { 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 @@ -33,8 +29,8 @@ create_cert() { 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." @@ -49,11 +45,7 @@ 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 diff --git a/net/csync2/pkg-plist b/net/csync2/pkg-plist new file mode 100644 index 000000000000..17e61f7124ff --- /dev/null +++ b/net/csync2/pkg-plist @@ -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 |