From d01be48ff8478c7ea43c25c45112cf3a4276477d Mon Sep 17 00:00:00 2001 From: Michal Luscon Date: Jun 25 2014 12:28:05 +0000 Subject: Update to latest upstream version 3.1.1 --- diff --git a/rsync-3.1.1-dos.patch b/rsync-3.1.1-dos.patch deleted file mode 100644 index b52d3d5..0000000 --- a/rsync-3.1.1-dos.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 0dedfbce2c1b851684ba658861fe9d620636c56a Mon Sep 17 00:00:00 2001 -From: Wayne Davison -Date: Sun, 13 Apr 2014 13:44:58 -0700 -Subject: [PATCH] Avoid infinite wait reading secrets file. - ---- - authenticate.c | 24 +++++++++++++----------- - 1 files changed, 13 insertions(+), 11 deletions(-) - -diff --git a/authenticate.c b/authenticate.c -index 3381b8c..c92746c 100644 ---- rsync/authenticate.c -+++ rsync/authenticate.c -@@ -102,15 +102,16 @@ static const char *check_secret(int module, const char *user, const char *group, - char pass2[MAX_DIGEST_LEN*2]; - const char *fname = lp_secrets_file(module); - STRUCT_STAT st; -- int fd, ok = 1; -+ int ok = 1; - int user_len = strlen(user); - int group_len = group ? strlen(group) : 0; - char *err; -+ FILE *fh; - -- if (!fname || !*fname || (fd = open(fname, O_RDONLY)) < 0) -+ if (!fname || !*fname || (fh = fopen(fname, "r")) == NULL) - return "no secrets file"; - -- if (do_fstat(fd, &st) == -1) { -+ if (do_fstat(fileno(fh), &st) == -1) { - rsyserr(FLOG, errno, "fstat(%s)", fname); - ok = 0; - } else if (lp_strict_modes(module)) { -@@ -123,29 +124,30 @@ static const char *check_secret(int module, const char *user, const char *group, - } - } - if (!ok) { -- close(fd); -+ fclose(fh); - return "ignoring secrets file"; - } - - if (*user == '#') { - /* Reject attempt to match a comment. */ -- close(fd); -+ fclose(fh); - return "invalid username"; - } - - /* Try to find a line that starts with the user (or @group) name and a ':'. */ - err = "secret not found"; -- while ((user || group) && read_line_old(fd, line, sizeof line, 1)) { -- const char **ptr, *s; -+ while ((user || group) && fgets(line, sizeof line, fh) != NULL) { -+ const char **ptr, *s = strtok(line, "\n\r"); - int len; -- if (*line == '@') { -+ if (!s) -+ continue; -+ if (*s == '@') { - ptr = &group; - len = group_len; -- s = line+1; -+ s++; - } else { - ptr = &user; - len = user_len; -- s = line; - } - if (!*ptr || strncmp(s, *ptr, len) != 0 || s[len] != ':') - continue; -@@ -158,7 +160,7 @@ static const char *check_secret(int module, const char *user, const char *group, - *ptr = NULL; /* Don't look for name again. */ - } - -- close(fd); -+ fclose(fh); - - memset(line, 0, sizeof line); - memset(pass2, 0, sizeof pass2); --- -1.7.0.4 - - diff --git a/rsync-3.1.1-xattr.patch b/rsync-3.1.1-xattr.patch deleted file mode 100644 index 88766db..0000000 --- a/rsync-3.1.1-xattr.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- rsync/generator.c -+++ rsync/generator.c -@@ -551,9 +551,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre - #ifdef SUPPORT_XATTRS - if (preserve_xattrs && do_xfers - && iflags & (ITEM_REPORT_XATTR|ITEM_TRANSFER)) { -- int fd = iflags & ITEM_REPORT_XATTR -- && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE)) -- ? sock_f_out : -1; -+ int fd = iflags & ITEM_REPORT_XATTR ? sock_f_out : -1; - send_xattr_request(NULL, file, fd); - } - #endif - ---- rsync/receiver.c -+++ rsync/receiver.c -@@ -580,16 +580,14 @@ int recv_files(int f_in, int f_out, char *local_name) - rprintf(FINFO, "recv_files(%s)\n", fname); - - #ifdef SUPPORT_XATTRS -- if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers -- && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) -+ if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) - recv_xattr_request(file, f_in); - #endif - - if (!(iflags & ITEM_TRANSFER)) { - maybe_log_item(file, iflags, itemizing, xname); - #ifdef SUPPORT_XATTRS -- if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers -- && !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE)) -+ if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) - set_file_attrs(fname, file, NULL, fname, 0); - #endif - if (iflags & ITEM_IS_NEW) { - ---- rsync/sender.c -+++ rsync/sender.c -@@ -177,8 +177,7 @@ static void write_ndx_and_attrs(int f_out, int ndx, int iflags, - if (iflags & ITEM_XNAME_FOLLOWS) - write_vstring(f_out, buf, len); - #ifdef SUPPORT_XATTRS -- if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers -- && (protocol_version < 31 || !BITS_SET(iflags, ITEM_XNAME_FOLLOWS|ITEM_LOCAL_CHANGE))) -+ if (preserve_xattrs && iflags & ITEM_REPORT_XATTR && do_xfers) - send_xattr_request(fname, file, f_out); - #endif - } diff --git a/rsync-man.patch b/rsync-man.patch index f3df477..36ddc53 100644 --- a/rsync-man.patch +++ b/rsync-man.patch @@ -1,6 +1,6 @@ --- rsync-3.0.9/rsync.1 2011-09-23 18:42:26.000000000 +0200 +++ rsync-3.0.9/rsync.1 2012-09-19 10:40:19.698802861 +0200 -@@ -442,6 +442,7 @@ +@@ -445,6 +445,7 @@ \-o, \-\-owner preserve owner (super\-user only) \-g, \-\-group preserve group \-\-devices preserve device files (super\-user only) diff --git a/rsync.spec b/rsync.spec index 6b44f0a..85e28fc 100644 --- a/rsync.spec +++ b/rsync.spec @@ -8,8 +8,8 @@ Summary: A program for synchronizing files over a network Name: rsync -Version: 3.1.0 -Release: 6%{?prerelease}%{?dist} +Version: 3.1.1 +Release: 1%{?prerelease}%{?dist} Group: Applications/Internet URL: http://rsync.samba.org/ @@ -29,8 +29,6 @@ Requires(postun): systemd-units License: GPLv3+ Patch0: rsync-man.patch -Patch1: rsync-3.1.1-dos.patch -Patch2: rsync-3.1.1-xattr.patch %description Rsync uses a reliable algorithm to bring remote and host files into @@ -62,8 +60,6 @@ patch -p1 -i patches/xattrs.diff patch -p1 -i patches/copy-devices.diff %patch0 -p1 -b .man -%patch1 -p1 -b .dos -#%patch2 -p1 -b .xattr %build @@ -108,6 +104,9 @@ rm -rf $RPM_BUILD_ROOT %systemd_postun_with_restart rsyncd.service %changelog +* Wed Jun 25 2014 Michal Luscon - 3.1.1-1 +- Update to latest upstream version 3.1.1 + * Sun Jun 08 2014 Fedora Release Engineering - 3.1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index c533b79..916c08d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -3be148772a33224771a8d4d2a028b132 rsync-3.1.0.tar.gz -a6f46f342017644e4747c1c083feefac rsync-patches-3.1.0.tar.gz +43bd6676f0b404326eee2d63be3cdcfe rsync-3.1.1.tar.gz +72de3e3528c1a1940b226e456393f26d rsync-patches-3.1.1.tar.gz