mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-20 07:11:59 +01:00
We don't run tests anyhow at the moment for coretuils (these are disabled with options=!check) but the test case changes modify a build system configuration file and thus require partially regenerating the autotools Makefiles. However, this only seems to be supported with Automake 1.16.4, not with Automake 1.16.5 (which we package atm): configure.ac:38: error: version mismatch. This is Automake 1.16.5, configure.ac:38: but the definition used by this AM_INIT_AUTOMAKE configure.ac:38: comes from Automake 1.16.4. By removing the build system modification for the test case from fix-chmod-exit-code.patch, we can circumvent this error and fix the coreutils build failure on the builders.
63 lines
1.8 KiB
Diff
63 lines
1.8 KiB
Diff
From e8b56ebd536e82b15542a00c888109471936bfda Mon Sep 17 00:00:00 2001
|
|
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
|
|
---
|
|
NEWS | 6 ++++++
|
|
src/chmod.c | 4 ++--
|
|
tests/chmod/ignore-symlink.sh | 31 +++++++++++++++++++++++++++++++
|
|
tests/local.mk | 1 +
|
|
4 files changed, 40 insertions(+), 2 deletions(-)
|
|
create mode 100755 tests/chmod/ignore-symlink.sh
|
|
|
|
diff --git a/NEWS b/NEWS
|
|
index a1470a7d7..1cb3c28a1 100644
|
|
--- a/NEWS
|
|
+++ b/NEWS
|
|
@@ -2,6 +2,12 @@ GNU coreutils NEWS -*- outline -*-
|
|
|
|
* Noteworthy changes in release ?.? (????-??-??) [?]
|
|
|
|
+** Bug fixes
|
|
+
|
|
+ chmod -R no longer exits with error status when encountering symlinks.
|
|
+ All files would be processed correctly, but the exit status was incorrect.
|
|
+ [bug introduced in coreutils-9.0]
|
|
+
|
|
|
|
* Noteworthy changes in release 9.0 (2021-09-24) [stable]
|
|
|
|
diff --git a/src/chmod.c b/src/chmod.c
|
|
index 37b04f500..57ac47f33 100644
|
|
--- 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
|
|
--
|
|
cgit v1.2.1
|
|
|