diff options
author | Emanuel Haupt <ehaupt@FreeBSD.org> | 2013-01-11 08:36:23 +0000 |
---|---|---|
committer | Emanuel Haupt <ehaupt@FreeBSD.org> | 2013-01-11 08:36:23 +0000 |
commit | ec683a2cff38fb7e2de930a9a88956a80427040e (patch) | |
tree | 9e4e853f3d021fa1bcb05f24405469dfcd8c0186 | |
parent | Update to 1.12.2. (diff) |
Provide an extra patch to for rsync to support overwriting files with schg set.
This patch is only applied if the FLAGS option is specified. The patch has been
submitted with the upstream project.
Notified by: wblock
Obtained from: https://bugzilla.samba.org/show_bug.cgi?id=8941 (upstream)
Notes
Notes:
svn path=/head/; revision=310222
-rw-r--r-- | net/rsync/Makefile | 4 | ||||
-rw-r--r-- | net/rsync/files/extrapatch-syscall.c | 20 |
2 files changed, 23 insertions, 1 deletions
diff --git a/net/rsync/Makefile b/net/rsync/Makefile index 8c5c01f32d8a..3e31fd5b2b31 100644 --- a/net/rsync/Makefile +++ b/net/rsync/Makefile @@ -3,7 +3,7 @@ PORTNAME= rsync PORTVERSION= 3.0.9 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net ipv6 MASTER_SITES= http://rsync.samba.org/ftp/%SUBDIR%/ \ ftp://ftp.samba.org/pub/%SUBDIR%/ \ @@ -85,6 +85,8 @@ 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 .endif .if ${PORT_OPTIONS:MRENAMED} diff --git a/net/rsync/files/extrapatch-syscall.c b/net/rsync/files/extrapatch-syscall.c new file mode 100644 index 000000000000..20e83183e9f4 --- /dev/null +++ b/net/rsync/files/extrapatch-syscall.c @@ -0,0 +1,20 @@ +--- 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); |