Coreutils: update to 9.0

Please refer to https://lists.gnu.org/archive/html/coreutils/2021-09/msg00113.html
for this version's release announcement.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
This commit is contained in:
Peter Müller
2021-10-23 14:43:14 +02:00
parent 970e8547be
commit 06fe9baec7
4 changed files with 467 additions and 494 deletions

View File

@@ -258,7 +258,7 @@ usr/sbin/chroot
#usr/share/man/man1/csplit.1
#usr/share/man/man1/cut.1
#usr/share/man/man1/date.1
#usr/share/man/man1/dir.1
#usr/share/man/man1/dd.1
#usr/share/man/man1/dirname.1
#usr/share/man/man1/du.1
#usr/share/man/man1/echo.1
@@ -275,11 +275,10 @@ usr/sbin/chroot
#usr/share/man/man1/id.1
#usr/share/man/man1/join.1
#usr/share/man/man1/link.1
#usr/share/man/man1/ln.1
#usr/share/man/man1/logname.1
#usr/share/man/man1/ls.1
#usr/share/man/man1/md5sum.1
#usr/share/man/man1/mkdir.1
#usr/share/man/man1/mknod.1
#usr/share/man/man1/mkfifo.1
#usr/share/man/man1/mktemp.1
#usr/share/man/man1/nice.1
#usr/share/man/man1/nl.1
@@ -297,7 +296,7 @@ usr/sbin/chroot
#usr/share/man/man1/pwd.1
#usr/share/man/man1/readlink.1
#usr/share/man/man1/realpath.1
#usr/share/man/man1/rm.1
#usr/share/man/man1/rmdir.1
#usr/share/man/man1/runcon.1
#usr/share/man/man1/seq.1
#usr/share/man/man1/sha1sum.1
@@ -320,6 +319,7 @@ usr/sbin/chroot
#usr/share/man/man1/tee.1
#usr/share/man/man1/test.1
#usr/share/man/man1/timeout.1
#usr/share/man/man1/touch.1
#usr/share/man/man1/tr.1
#usr/share/man/man1/true.1
#usr/share/man/man1/truncate.1
@@ -331,7 +331,6 @@ usr/sbin/chroot
#usr/share/man/man1/unlink.1
#usr/share/man/man1/uptime.1
#usr/share/man/man1/users.1
#usr/share/man/man1/vdir.1
#usr/share/man/man1/wc.1
#usr/share/man/man1/who.1
#usr/share/man/man1/whoami.1

View File

@@ -24,7 +24,7 @@
include Config
VER = 8.32
VER = 9.0
THISAPP = coreutils-$(VER)
DL_FILE = $(THISAPP).tar.xz
@@ -63,7 +63,7 @@ objects =$(DL_FILE)
$(DL_FILE)= $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 022042695b7d5bcf1a93559a9735e668
$(DL_FILE)_MD5 = 0d79ae8a6124546e3b94171375e5e5d0
install : $(TARGET)
@@ -94,9 +94,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils/coreutils-8.27-uname-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils/coreutils-8.32-i18n-1.patch
# this is upstream and also fix the aarch64 build
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils/ls-restore-8.31-behavior-on-removed-directories.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils/coreutils-9.0-i18n-1.patch
cd $(DIR_APP) && FORCE_UNSAFE_CONFIGURE=1 && ./configure $(CONFIGURE_OPTIONS)
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install

View File

@@ -1,118 +0,0 @@
From 10fcb97bd728f09d4a027eddf8ad2900f0819b0a Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 5 Mar 2020 17:25:29 -0800
Subject: [PATCH] ls: restore 8.31 behavior on removed directories
* NEWS: Mention this.
* src/ls.c: Do not include <sys/sycall.h>
(print_dir): Don't worry about whether the directory is removed.
* tests/ls/removed-directory.sh: Adjust to match new (i.e., old)
behavior.
Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
---
NEWS | 6 ++++++
src/ls.c | 22 ----------------------
tests/ls/removed-directory.sh | 10 ++--------
3 files changed, 8 insertions(+), 30 deletions(-)
diff --git a/NEWS b/NEWS
index fdc8bf5db..653e7178b 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ GNU coreutils NEWS -*- outline -*-
* Noteworthy changes in release ?.? (????-??-??) [?]
+** Changes in behavior
+
+ On GNU/Linux systems, ls no longer issues an error message on
+ directory merely because it was removed. This reverts a change
+ that was made in release 8.32.
+
* Noteworthy changes in release 8.32 (2020-03-05) [stable]
diff --git a/src/ls.c b/src/ls.c
index 24b983287..4acf5f44d 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -49,10 +49,6 @@
# include <sys/ptem.h>
#endif
-#ifdef __linux__
-# include <sys/syscall.h>
-#endif
-
#include <stdio.h>
#include <assert.h>
#include <setjmp.h>
@@ -2896,7 +2892,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
struct dirent *next;
uintmax_t total_blocks = 0;
static bool first = true;
- bool found_any_entries = false;
errno = 0;
dirp = opendir (name);
@@ -2972,7 +2967,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
next = readdir (dirp);
if (next)
{
- found_any_entries = true;
if (! file_ignored (next->d_name))
{
enum filetype type = unknown;
@@ -3018,22 +3012,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
if (errno != EOVERFLOW)
break;
}
-#ifdef __linux__
- else if (! found_any_entries)
- {
- /* If readdir finds no directory entries at all, not even "." or
- "..", then double check that the directory exists. */
- if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1
- && errno != EINVAL)
- {
- /* We exclude EINVAL as that pertains to buffer handling,
- and we've passed NULL as the buffer for simplicity.
- ENOENT is returned if appropriate before buffer handling. */
- file_failure (command_line_arg, _("reading directory %s"), name);
- }
- break;
- }
-#endif
else
break;
diff --git a/tests/ls/removed-directory.sh b/tests/ls/removed-directory.sh
index e8c835dab..fe8f929a1 100755
--- a/tests/ls/removed-directory.sh
+++ b/tests/ls/removed-directory.sh
@@ -26,20 +26,14 @@ case $host_triplet in
*) skip_ 'non linux kernel' ;;
esac
-LS_FAILURE=2
-
-cat <<\EOF >exp-err || framework_failure_
-ls: reading directory '.': No such file or directory
-EOF
-
cwd=$(pwd)
mkdir d || framework_failure_
cd d || framework_failure_
rmdir ../d || framework_failure_
-returns_ $LS_FAILURE ls >../out 2>../err || fail=1
+ls >../out 2>../err || fail=1
cd "$cwd" || framework_failure_
compare /dev/null out || fail=1
-compare exp-err err || fail=1
+compare /dev/null err || fail=1
Exit $fail
--
2.17.1