Update to 3.2.3
This commit is contained in:
parent
c20c71f098
commit
4f0c2f0f74
65
backport-Work-around-glibc-lchmod-issue-a-better-way.patch
Normal file
65
backport-Work-around-glibc-lchmod-issue-a-better-way.patch
Normal file
@ -0,0 +1,65 @@
|
||||
From 9dd62525f3b98d692e031f22c02be8f775966503 Mon Sep 17 00:00:00 2001
|
||||
From: Wayne Davison <wayne@opencoder.net>
|
||||
Date: Sun, 29 Nov 2020 09:33:54 -0800
|
||||
Subject: [PATCH] Work around glibc's lchmod() issue a better way.
|
||||
|
||||
---
|
||||
syscall.c | 34 +++++++++++++++++++++-------------
|
||||
1 files changed, 21 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/syscall.c b/syscall.c
|
||||
index b9c3b4e..11d10e4 100644
|
||||
--- a/syscall.c
|
||||
+++ b/syscall.c
|
||||
@@ -227,27 +227,35 @@ int do_open(const char *pathname, int flags, mode_t mode)
|
||||
#ifdef HAVE_CHMOD
|
||||
int do_chmod(const char *path, mode_t mode)
|
||||
{
|
||||
+ static int switch_step = 0;
|
||||
int code;
|
||||
if (dry_run) return 0;
|
||||
RETURN_ERROR_IF_RO_OR_LO;
|
||||
+ switch (switch_step) {
|
||||
#ifdef HAVE_LCHMOD
|
||||
- code = lchmod(path, mode & CHMOD_BITS);
|
||||
-#else
|
||||
- if (S_ISLNK(mode)) {
|
||||
+#include "case_N.h"
|
||||
+ if ((code = lchmod(path, mode & CHMOD_BITS)) == 0 || errno != ENOTSUP)
|
||||
+ break;
|
||||
+ switch_step++;
|
||||
+#endif
|
||||
+
|
||||
+#include "case_N.h"
|
||||
+ if (S_ISLNK(mode)) {
|
||||
# if defined HAVE_SETATTRLIST
|
||||
- struct attrlist attrList;
|
||||
- uint32_t m = mode & CHMOD_BITS; /* manpage is wrong: not mode_t! */
|
||||
+ struct attrlist attrList;
|
||||
+ uint32_t m = mode & CHMOD_BITS; /* manpage is wrong: not mode_t! */
|
||||
|
||||
- memset(&attrList, 0, sizeof attrList);
|
||||
- attrList.bitmapcount = ATTR_BIT_MAP_COUNT;
|
||||
- attrList.commonattr = ATTR_CMN_ACCESSMASK;
|
||||
- code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW);
|
||||
+ memset(&attrList, 0, sizeof attrList);
|
||||
+ attrList.bitmapcount = ATTR_BIT_MAP_COUNT;
|
||||
+ attrList.commonattr = ATTR_CMN_ACCESSMASK;
|
||||
+ code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW);
|
||||
# else
|
||||
- code = 1;
|
||||
+ code = 1;
|
||||
# endif
|
||||
- } else
|
||||
- code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
|
||||
-#endif /* !HAVE_LCHMOD */
|
||||
+ } else
|
||||
+ code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
|
||||
+ break;
|
||||
+ }
|
||||
if (code != 0 && (preserve_perms || preserve_executability))
|
||||
return code;
|
||||
return 0;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Binary file not shown.
BIN
rsync-3.2.3.tar.gz
Normal file
BIN
rsync-3.2.3.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
rsync-patches-3.2.3.tar.gz
Normal file
BIN
rsync-patches-3.2.3.tar.gz
Normal file
Binary file not shown.
14
rsync.spec
14
rsync.spec
@ -1,5 +1,5 @@
|
||||
Name: rsync
|
||||
Version: 3.2.1
|
||||
Version: 3.2.3
|
||||
Release: 1
|
||||
Summary: Fast incremental file transfer utility
|
||||
License: GPLv3+
|
||||
@ -18,6 +18,8 @@ Provides: bundled(zlib) = 1.2.8 rsync-daemon
|
||||
Obsoletes: rsync-daemon
|
||||
%{?systemd_requires}
|
||||
|
||||
Patch1: backport-Work-around-glibc-lchmod-issue-a-better-way.patch
|
||||
|
||||
%description
|
||||
Rsync is an open source utility that provides fast incremental file transfer.
|
||||
It uses the "rsync algorithm" which provides a very fast method for bringing
|
||||
@ -30,12 +32,10 @@ at one of the ends of the link beforehand.
|
||||
%prep
|
||||
%autosetup -b 1 -n %{name}-%{version} -p1
|
||||
|
||||
patch -p1 -i patches/acls.diff
|
||||
patch -p1 -i patches/xattrs.diff
|
||||
patch -p1 -i patches/copy-devices.diff
|
||||
|
||||
%build
|
||||
%configure -disable-xxhash
|
||||
%configure --disable-xxhash
|
||||
%make_build
|
||||
|
||||
%check
|
||||
@ -79,6 +79,12 @@ install -D -m644 %{SOURCE6} %{buildroot}/%{_unitdir}/rsyncd@.service
|
||||
%{_mandir}/man5/rsyncd.conf.5*
|
||||
|
||||
%changelog
|
||||
* Fri Jan 22 2021 yixiangzhike <zhangxingliang3@huawei.com> - 3.2.3-1
|
||||
- Type:requirement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update to 3.2.3
|
||||
|
||||
* Tue Jul 28 2020 Liquor <lirui130@huawei.com> - 3.2.1-1
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user