1 |
commit: 5a419fb841222582de4d8945a5b43a93f77d11e5 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 22 23:57:38 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 22 23:57:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=5a419fb8 |
7 |
|
8 |
sys-apps/coreutils: sync with ::gentoo for chmod patch |
9 |
|
10 |
Closes: https://bugs.gentoo.org/829836 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
sys-apps/coreutils/coreutils-9.0-r1.ebuild | 4 ++- |
14 |
.../coreutils-9.0-fix-chmod-symlink-exit.patch | 35 ++++++++++++++++++++++ |
15 |
2 files changed, 38 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/sys-apps/coreutils/coreutils-9.0-r1.ebuild b/sys-apps/coreutils/coreutils-9.0-r1.ebuild |
18 |
index 4bb595cdec..5d2550bf69 100644 |
19 |
--- a/sys-apps/coreutils/coreutils-9.0-r1.ebuild |
20 |
+++ b/sys-apps/coreutils/coreutils-9.0-r1.ebuild |
21 |
@@ -67,7 +67,9 @@ pkg_setup() { |
22 |
} |
23 |
|
24 |
src_prepare() { |
25 |
- local PATCHES=() |
26 |
+ local PATCHES=( |
27 |
+ "${FILESDIR}"/${P}-fix-chmod-symlink-exit.patch |
28 |
+ ) |
29 |
|
30 |
if ! use vanilla ; then |
31 |
PATCHES+=( "${WORKDIR}"/patch ) |
32 |
|
33 |
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 |
34 |
new file mode 100644 |
35 |
index 0000000000..25b2b72bcb |
36 |
--- /dev/null |
37 |
+++ b/sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch |
38 |
@@ -0,0 +1,35 @@ |
39 |
+https://git.savannah.gnu.org/cgit/coreutils.git/patch/?id=e8b56ebd536e82b15542a00c888109471936bfda |
40 |
+https://lists.gnu.org/archive/html/bug-coreutils/2021-09/msg00031.html |
41 |
+(and https://lists.gnu.org/archive/html/bug-coreutils/2021-09/msg00035.html) |
42 |
+ |
43 |
+From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@××××××××××.com> |
44 |
+Date: Fri, 24 Sep 2021 20:57:41 +0100 |
45 |
+Subject: chmod: fix exit status when ignoring symlinks |
46 |
+ |
47 |
+* src/chmod.c: Reorder enum so CH_NOT_APPLIED |
48 |
+can be treated as a non error. |
49 |
+* tests/chmod/ignore-symlink.sh: A new test. |
50 |
+* tests/local.mk: Reference the new test. |
51 |
+* NEWS: Mention the bug fix. |
52 |
+Fixes https://bugs.gnu.org/50784 |
53 |
+--- a/src/chmod.c |
54 |
++++ b/src/chmod.c |
55 |
+@@ -44,8 +44,8 @@ struct change_status |
56 |
+ enum |
57 |
+ { |
58 |
+ CH_NO_STAT, |
59 |
+- CH_NOT_APPLIED, |
60 |
+ CH_FAILED, |
61 |
++ CH_NOT_APPLIED, |
62 |
+ CH_NO_CHANGE_REQUESTED, |
63 |
+ CH_SUCCEEDED |
64 |
+ } |
65 |
+@@ -322,7 +322,7 @@ process_file (FTS *fts, FTSENT *ent) |
66 |
+ if ( ! recurse) |
67 |
+ fts_set (fts, ent, FTS_SKIP); |
68 |
+ |
69 |
+- return CH_NO_CHANGE_REQUESTED <= ch.status; |
70 |
++ return CH_NOT_APPLIED <= ch.status; |
71 |
+ } |
72 |
+ |
73 |
+ /* Recursively change the modes of the specified FILES (the last entry |