- rel 2; lchmod can return ENOTSUP on glibc 2.32 and older kernels (like 4.4) auto/th/rsync-3.2.3-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 6 Nov 2020 16:30:44 +0000 (17:30 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 6 Nov 2020 16:30:44 +0000 (17:30 +0100)
lchmod.patch [new file with mode: 0644]
rsync.spec

diff --git a/lchmod.patch b/lchmod.patch
new file mode 100644 (file)
index 0000000..88bad5a
--- /dev/null
@@ -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;
index ea0b03a524a72a68ba6ee7a030a6fbb2900234a8..ac0243a426134e09aa201ce2879329af59355c97 100644 (file)
@@ -21,7 +21,7 @@ Summary(zh_CN.UTF-8): [通讯]传输工具
 Summary(zh_TW.UTF-8):  [喙啪]\e$(B6G?i火(c\e(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
 
This page took 0.233376 seconds and 4 git commands to generate.