From cb26f8ca2ee78d958986361e05d32cc6db4188b4 Mon Sep 17 00:00:00 2001 From: Emanuel Haupt Date: Wed, 2 Oct 2013 11:14:13 +0000 Subject: [PATCH] - Update to 3.1.0 - Rework OPTIONS to use OPTIONS_RADIO for mutually exclusive options. This allows us to get rid of various IGNORE definitions - Add an option to use zlib from base instead of the bundled one (default) - Functionality of extrapatch-detect-renamed.diff has been incorporated with the upstream patch maintainers - Provide a patch required for the "file system flags" option (have been submitted upstream) --- net/rsync/Makefile | 42 +++++++++++++++------------- net/rsync/distinfo | 8 +++--- net/rsync/files/extrapatch-main.c | 10 +++++++ net/rsync/files/extrapatch-syscall.c | 20 ------------- 4 files changed, 36 insertions(+), 44 deletions(-) create mode 100644 net/rsync/files/extrapatch-main.c delete mode 100644 net/rsync/files/extrapatch-syscall.c diff --git a/net/rsync/Makefile b/net/rsync/Makefile index 661528f3b545..bd7d40b5b279 100644 --- a/net/rsync/Makefile +++ b/net/rsync/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= rsync -PORTVERSION= 3.0.9 -PORTREVISION= 3 +PORTVERSION= 3.1.0 CATEGORIES= net ipv6 MASTER_SITES= http://rsync.samba.org/ftp/%SUBDIR%/ \ ftp://ftp.samba.org/pub/%SUBDIR%/ \ @@ -31,37 +30,42 @@ PORTDOCS= NEWS README csprotocol.txt tech_report.tex MAN1= rsync.1 MAN5= rsyncd.conf.5 -OPTIONS_DEFINE= POPT_PORT SSH FLAGS ATIMES ACL ICONV TIMELIMIT RENAMED DOCS +# define options +OPTIONS_DEFINE= POPT_PORT ZLIB_BASE SSH +OPTIONS_RADIO= PTS +OPTIONS_RADIO_PTS= TIMELIMIT RENAMED FLAGS ATIMES ACL + +# options provided upstream POPT_PORT_DESC= Use popt from devel/popt instead of bundled one +ZLIB_BASE_DESC= Use zlib from base instead of bundled one SSH_DESC= Use SSH instead of RSH + +# options provided by patch (mutually exclusive) +PTS_DESC= Functionality provided by third party patches +TIMELIMIT_DESC= Time limit patch +RENAMED_DESC= Add support for renamed file detection FLAGS_DESC= File system flags support patch, adds --fileflags ATIMES_DESC= Preserve access times, adds --atimes ACL_DESC= Add backward-compatibility for the --acls option -TIMELIMIT_DESC= Time limit patch -RENAMED_DESC= Add support for renamed file detection -OPTIONS_DEFAULT=SSH +# define default options +OPTIONS_DEFAULT=SSH ZLIB_BASE NO_STAGE= yes .include +.if ${PORT_OPTIONS:MZLIB_BASE} +CONFIGURE_ARGS= --with-included-zlib=no +.endif + .if ${PORT_OPTIONS:MTIMELIMIT} PATCH_STRIP= -p1 EXTRA_PATCHES+= ${WRKSRC}/patches/time-limit.diff -.if ${PORT_OPTIONS:MFLAGS} -IGNORE= flags and timelimit can't be enabled simultaneously. Please rerun 'make config' and disable one of them -.endif -.if ${PORT_OPTIONS:MATIMES} -IGNORE= atimes and timelimit can't be enabled simultaneously. Please rerun 'make config' and disable one of them -.endif .endif .if ${PORT_OPTIONS:MATIMES} PATCH_STRIP= -p1 EXTRA_PATCHES+= ${WRKSRC}/patches/atimes.diff -.if ${PORT_OPTIONS:MFLAGS} -IGNORE= flags and atimes can't be enabled simultaneously. Please rerun 'make config' and disable one of them -.endif .endif .if ${PORT_OPTIONS:MICONV} || ${PORT_OPTIONS:MFLAGS} || ${PORT_OPTIONS:MACL} || make(makesum) || ${PORT_OPTIONS:MTIMELIMIT} || ${PORT_OPTIONS:MATIMES} || ${PORT_OPTIONS:MRENAMED} @@ -82,15 +86,13 @@ CONFIGURE_ENV+= ac_cv_header_iconv_h=no .if ${PORT_OPTIONS:MFLAGS} PATCH_STRIP= -p1 -EXTRA_PATCHES+= ${WRKSRC}/patches/fileflags.diff -# https://bugzilla.samba.org/show_bug.cgi?id=8941 -EXTRA_PATCHES+= ${FILESDIR}/extrapatch-syscall.c +EXTRA_PATCHES+= ${WRKSRC}/patches/fileflags.diff \ + ${FILESDIR}/extrapatch-main.c .endif .if ${PORT_OPTIONS:MRENAMED} PATCH_STRIP= -p1 -#EXTRA_PATCHES+= ${WRKSRC}/patches/detect-renamed.diff -EXTRA_PATCHES+= ${FILESDIR}/extrapatch-detect-renamed.diff +EXTRA_PATCHES+= ${WRKSRC}/patches/detect-renamed.diff .endif .if ${PORT_OPTIONS:MACL} diff --git a/net/rsync/distinfo b/net/rsync/distinfo index f262ce3d1804..26155044a2ec 100644 --- a/net/rsync/distinfo +++ b/net/rsync/distinfo @@ -1,4 +1,4 @@ -SHA256 (rsync-3.0.9.tar.gz) = 30f10f8dd5490d28240d4271bb652b1da7a60b22ed2b9ae28090668de9247c05 -SIZE (rsync-3.0.9.tar.gz) = 792725 -SHA256 (rsync-patches-3.0.9.tar.gz) = 0c1e9b56e99667dfc47641124460bac61a04c5d2ee89f575c6bc78c7a69005a9 -SIZE (rsync-patches-3.0.9.tar.gz) = 172417 +SHA256 (rsync-3.1.0.tar.gz) = 81ca23f77fc9b957eb9845a6024f41af0ff0c619b7f38576887c63fa38e2394e +SIZE (rsync-3.1.0.tar.gz) = 883901 +SHA256 (rsync-patches-3.1.0.tar.gz) = b79c489f2864c726a767e0f39c4086df83f401d151bd5dc05a9b2e799b52886a +SIZE (rsync-patches-3.1.0.tar.gz) = 174111 diff --git a/net/rsync/files/extrapatch-main.c b/net/rsync/files/extrapatch-main.c new file mode 100644 index 000000000000..f42e7a290635 --- /dev/null +++ b/net/rsync/files/extrapatch-main.c @@ -0,0 +1,10 @@ +--- main.c.orig 2013-10-02 10:47:24.479295402 +0200 ++++ main.c 2013-10-02 10:47:43.659318579 +0200 +@@ -30,6 +30,7 @@ + #include + #endif + ++extern int force_change; + extern int dry_run; + extern int list_only; + extern int io_timeout; diff --git a/net/rsync/files/extrapatch-syscall.c b/net/rsync/files/extrapatch-syscall.c deleted file mode 100644 index 20e83183e9f4..000000000000 --- a/net/rsync/files/extrapatch-syscall.c +++ /dev/null @@ -1,20 +0,0 @@ ---- syscall.c.orig 2013-01-10 18:53:44.000000000 -0700 -+++ syscall.c 2013-01-10 18:53:56.000000000 -0700 -@@ -114,8 +114,16 @@ - #ifdef SUPPORT_FORCE_CHANGE - if (force_change && (errno == EPERM || errno == EACCES)) { - char parent[MAXPATHLEN]; -+ int parent_flags; - int saved_errno = errno; -- int parent_flags = make_parentdir_mutable(fname2, force_change, parent, sizeof parent); -+ int file_flags = make_mutable(fname1, NULL, NO_FFLAGS, force_change); -+ if (file_flags) { -+ int ret = link(fname1, fname2); -+ undo_make_mutable(fname1, file_flags); -+ if (ret == 0) -+ return 0; -+ } -+ parent_flags = make_parentdir_mutable(fname2, force_change, parent, sizeof parent); - if (parent_flags) { - int ret = link(fname1, fname2); - undo_make_mutable(parent, parent_flags);