mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-03 07:57:49 +00:00
Merge pull request #5676 from wagnerch/rsync-le11
[LE11] rsync: add lchmod workaround patches
This commit is contained in:
commit
b51b215af2
@ -1,3 +1,6 @@
|
||||
112
|
||||
- rsync: add lchmod workaround patches
|
||||
|
||||
111
|
||||
- iperf: update to 3.10.1
|
||||
- libstatgrab: update to 0.92.1
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PKG_NAME="network-tools"
|
||||
PKG_VERSION="1.0"
|
||||
PKG_REV="111"
|
||||
PKG_REV="112"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://libreelec.tv"
|
||||
|
@ -30,3 +30,12 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-acl-support \
|
||||
--disable-zstd \
|
||||
--with-included-popt \
|
||||
--without-included-zlib"
|
||||
|
||||
pre_make_host() {
|
||||
# do not detect LE git version
|
||||
echo "#define RSYNC_GITVER \"${PKG_VERSION}\"" >git-version.h
|
||||
}
|
||||
|
||||
pre_make_target() {
|
||||
pre_make_host
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
From 0b187830db0e88d7d5e21a2d2d6040d64fed34c3 Mon Sep 17 00:00:00 2001
|
||||
From: Wayne Davison <wayne@opencoder.net>
|
||||
Date: Fri, 30 Oct 2020 15:51:24 -0700
|
||||
Subject: [PATCH] Work around glibc's lchmod() issue a better way.
|
||||
|
||||
---
|
||||
syscall.c | 34 +++++++++++++++++++++-------------
|
||||
1 file changed, 21 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/syscall.c b/syscall.c
|
||||
index b9c3b4ef..11d10e4a 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;
|
||||
--
|
||||
2.33.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user