[packages/rsync] - rel 2; lchmod can return ENOTSUP on glibc 2.32 and older kernels (like 4.4)

arekm arekm at pld-linux.org
Fri Nov 6 17:30:52 CET 2020


commit 9f299381ab4c418d61ddf1d46599ca67d3badeff
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Nov 6 17:30:44 2020 +0100

    - rel 2; lchmod can return ENOTSUP on glibc 2.32 and older kernels (like 4.4)

 lchmod.patch | 21 +++++++++++++++++++++
 rsync.spec   |  4 +++-
 2 files changed, 24 insertions(+), 1 deletion(-)
---
diff --git a/rsync.spec b/rsync.spec
index ea0b03a..ac0243a 100644
--- a/rsync.spec
+++ b/rsync.spec
@@ -21,7 +21,7 @@ Summary(zh_CN.UTF-8):	[通讯]传输工具
 Summary(zh_TW.UTF-8):	[喙啪]$(B6G?i火(c(B
 Name:		rsync
 Version:	3.2.3
-Release:	1
+Release:	2
 Epoch:		1
 License:	GPL v3+
 Group:		Networking/Utilities
@@ -35,6 +35,7 @@ Source4:	%{name}.sysconfig
 Source5:	%{name}d.logrotate
 Patch0:		%{name}-config.patch
 Patch1:		%{name}-fadvise.patch
+Patch2:		lchmod.patch
 URL:		https://rsync.samba.org/
 BuildRequires:	acl-devel
 BuildRequires:	autoconf >= 2.69
@@ -169,6 +170,7 @@ techniczna nowego algorytmu została również dołączona do pakietu.
 %setup -q -b1
 %patch0 -p1
 %{?with_fadvise:%patch1 -p1}
+%patch2 -p1
 
 sed -i -e 's|#!/usr/bin/env bash|#!/bin/bash|' rsync-ssl
 
diff --git a/lchmod.patch b/lchmod.patch
new file mode 100644
index 0000000..88bad5a
--- /dev/null
+++ b/lchmod.patch
@@ -0,0 +1,21 @@
+--- rsync-3.2.3/syscall.c~	2020-07-28 01:36:55.000000000 +0200
++++ rsync-3.2.3/syscall.c	2020-11-06 17:26:04.220502740 +0100
+@@ -232,7 +232,8 @@ int do_chmod(const char *path, mode_t mo
+ 	RETURN_ERROR_IF_RO_OR_LO;
+ #ifdef HAVE_LCHMOD
+ 	code = lchmod(path, mode & CHMOD_BITS);
+-#else
++	if (code < 0 && errno == ENOTSUP) {
++#endif
+ 	if (S_ISLNK(mode)) {
+ # if defined HAVE_SETATTRLIST
+ 		struct attrlist attrList;
+@@ -247,6 +248,8 @@ int do_chmod(const char *path, mode_t mo
+ # endif
+ 	} else
+ 		code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
++#ifdef HAVE_LCHMOD
++	}
+ #endif /* !HAVE_LCHMOD */
+ 	if (code != 0 && (preserve_perms || preserve_executability))
+ 		return code;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rsync.git/commitdiff/9f299381ab4c418d61ddf1d46599ca67d3badeff



More information about the pld-cvs-commit mailing list