summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-22 23:57:38 +0000
committerSam James <sam@gentoo.org>2021-12-22 23:57:38 +0000
commit5a419fb841222582de4d8945a5b43a93f77d11e5 (patch)
tree412f5547fab86fdd57eb6b1fe11d058c5fc1f652 /sys-apps
parentscripts/bootstrap-prefix.sh: mask glibc-2.34 due to bootstrapping issues (diff)
downloadprefix-5a419fb841222582de4d8945a5b43a93f77d11e5.tar.gz
prefix-5a419fb841222582de4d8945a5b43a93f77d11e5.tar.bz2
prefix-5a419fb841222582de4d8945a5b43a93f77d11e5.zip
sys-apps/coreutils: sync with ::gentoo for chmod patch
Closes: https://bugs.gentoo.org/829836 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/coreutils/coreutils-9.0-r1.ebuild4
-rw-r--r--sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch35
2 files changed, 38 insertions, 1 deletions
diff --git a/sys-apps/coreutils/coreutils-9.0-r1.ebuild b/sys-apps/coreutils/coreutils-9.0-r1.ebuild
index 4bb595cdec..5d2550bf69 100644
--- a/sys-apps/coreutils/coreutils-9.0-r1.ebuild
+++ b/sys-apps/coreutils/coreutils-9.0-r1.ebuild
@@ -67,7 +67,9 @@ pkg_setup() {
}
src_prepare() {
- local PATCHES=()
+ local PATCHES=(
+ "${FILESDIR}"/${P}-fix-chmod-symlink-exit.patch
+ )
if ! use vanilla ; then
PATCHES+=( "${WORKDIR}"/patch )
diff --git a/sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch b/sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch
new file mode 100644
index 0000000000..25b2b72bcb
--- /dev/null
+++ b/sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch
@@ -0,0 +1,35 @@
+https://git.savannah.gnu.org/cgit/coreutils.git/patch/?id=e8b56ebd536e82b15542a00c888109471936bfda
+https://lists.gnu.org/archive/html/bug-coreutils/2021-09/msg00031.html
+(and https://lists.gnu.org/archive/html/bug-coreutils/2021-09/msg00035.html)
+
+From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
+Date: Fri, 24 Sep 2021 20:57:41 +0100
+Subject: chmod: fix exit status when ignoring symlinks
+
+* src/chmod.c: Reorder enum so CH_NOT_APPLIED
+can be treated as a non error.
+* tests/chmod/ignore-symlink.sh: A new test.
+* tests/local.mk: Reference the new test.
+* NEWS: Mention the bug fix.
+Fixes https://bugs.gnu.org/50784
+--- a/src/chmod.c
++++ b/src/chmod.c
+@@ -44,8 +44,8 @@ struct change_status
+ enum
+ {
+ CH_NO_STAT,
+- CH_NOT_APPLIED,
+ CH_FAILED,
++ CH_NOT_APPLIED,
+ CH_NO_CHANGE_REQUESTED,
+ CH_SUCCEEDED
+ }
+@@ -322,7 +322,7 @@ process_file (FTS *fts, FTSENT *ent)
+ if ( ! recurse)
+ fts_set (fts, ent, FTS_SKIP);
+
+- return CH_NO_CHANGE_REQUESTED <= ch.status;
++ return CH_NOT_APPLIED <= ch.status;
+ }
+
+ /* Recursively change the modes of the specified FILES (the last entry