[rsync] Release rsync-3.0.8-2

Vojtěch Vítek vvitek at fedoraproject.org
Tue Sep 27 14:37:46 UTC 2011


commit e09669b643498e150f394a358014a14da0a028a0
Author: Vojtech Vitek (V-Teq) <vvitek at redhat.com>
Date:   Wed Sep 14 18:13:52 2011 +0200

    Release rsync-3.0.8-2

 rsync-3.0.8-no-symlink-user-xattrs.patch |   59 ++++++++++++++++++++----------
 rsync.spec                               |    5 ++-
 2 files changed, 43 insertions(+), 21 deletions(-)
---
diff --git a/rsync-3.0.8-no-symlink-user-xattrs.patch b/rsync-3.0.8-no-symlink-user-xattrs.patch
index 5c8914e..a87fbe9 100644
--- a/rsync-3.0.8-no-symlink-user-xattrs.patch
+++ b/rsync-3.0.8-no-symlink-user-xattrs.patch
@@ -1,38 +1,59 @@
-From e2c1e482e004b8f992156bf436d4bf34cee1ee1d Mon Sep 17 00:00:00 2001
-From: Wayne Davison <wayned at samba.org>
-Date: Sat, 18 Jun 2011 10:12:47 -0700
-Subject: [PATCH] Set NO_SYMLINK_USER_XATTRS on linux. Fixes bug 7109.
+From 562c23886699a93882d9a090475a44f5761f7d8d Mon Sep 17 00:00:00 2001
+From: "Vojtech Vitek (V-Teq)" <vvitek at redhat.com>
+Date: Wed, 14 Sep 2011 18:31:35 +0200
+Subject: [PATCH] Adapt do_symlink() from upstream 3.0.8+; fix context
 
 ---
  configure.ac |    1 +
- syscall.c    |    2 +-
- 2 files changed, 2 insertions(+), 1 deletions(-)
+ syscall.c    |   20 ++++++++++++++++++--
+ 2 files changed, 19 insertions(+), 2 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index c261b4a..dfe3101 100644
+index ff21b3a..c841013 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1021,6 +1021,7 @@ else
- 	AC_MSG_RESULT(Using Linux xattrs)
- 	AC_DEFINE(HAVE_LINUX_XATTRS, 1, [True if you have Linux xattrs])
+@@ -979,6 +979,7 @@ else
+ 	AC_MSG_RESULT(Using FreeBSD extattrs)
+ 	AC_DEFINE(HAVE_FREEBSD_XATTRS, 1, [True if you have FreeBSD xattrs])
  	AC_DEFINE(SUPPORT_XATTRS, 1)
 +	AC_DEFINE(NO_SYMLINK_USER_XATTRS, 1, [True if symlinks do not support user xattrs])
  	;;
-     darwin*)
- 	AC_MSG_RESULT(Using OS X xattrs)
+     *)
+ 	if test x"$enable_xattr_support" = x"yes"; then
 diff --git a/syscall.c b/syscall.c
-index 1ed36f3..eab25a5 100644
+index c85f73e..ddfd042 100644
 --- a/syscall.c
 +++ b/syscall.c
-@@ -64,7 +64,7 @@ int do_symlink(const char *lnk, const char *fname)
+@@ -53,11 +53,27 @@ int do_unlink(const char *fname)
+ 	return unlink(fname);
+ }
+ 
+-int do_symlink(const char *fname1, const char *fname2)
++int do_symlink(const char *lnk, const char *fname)
+ {
  	if (dry_run) return 0;
  	RETURN_ERROR_IF_RO_OR_LO;
- 
--#ifdef NO_SYMLINK_XATTRS
+-	return symlink(fname1, fname2);
++
 +#if defined NO_SYMLINK_XATTRS || defined NO_SYMLINK_USER_XATTRS
- 	/* For --fake-super, we create a normal file with mode 0600
- 	 * and write the lnk into it. */
- 	if (am_root < 0) {
++	/* For --fake-super, we create a normal file with mode 0600
++	 * and write the lnk into it. */
++	if (am_root < 0) {
++		int ok, len = strlen(lnk);
++		int fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, S_IWUSR|S_IRUSR);
++		if (fd < 0)
++			return -1;
++		ok = write(fd, lnk, len) == len;
++		if (close(fd) < 0)
++			ok = 0;
++		return ok ? 0 : -1;
++	}
++#endif
++
++	return symlink(lnk, fname);
+ }
+ 
+ #ifdef HAVE_LINK
 -- 
 1.7.6
 
diff --git a/rsync.spec b/rsync.spec
index b90bcfe..50553f8 100644
--- a/rsync.spec
+++ b/rsync.spec
@@ -7,7 +7,7 @@
 Summary: A program for synchronizing files over a network
 Name: rsync
 Version: 3.0.8
-Release: 1%{?prerelease}%{?dist}
+Release: 2%{?prerelease}%{?dist}
 Group: Applications/Internet
 URL: http://rsync.samba.org/
 
@@ -48,7 +48,7 @@ patch -p1 -i patches/xattrs.diff
 #Enable --copy-devices parameter
 patch -p1 -i patches/copy-devices.diff
 
-patch0 -p1 -b .no-symlink-user-xattrs
+#%patch0 -p1 -b .no-symlink-user-xattrs
 
 %build
 rm -fr autom4te.cache
@@ -77,6 +77,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man5/rsyncd.conf.5*
 
 %changelog
+* Wed Sep 14 2011 Vojtech Vitek (V-Teq) <vvitek at redhat.com> - 3.0.8-2
 - Fix security context of symbolic links (#709779)
 
 * Tue Mar 29 2011 Vojtech Vitek <vvitek at redhat.com> - 3.0.8-1


More information about the scm-commits mailing list