forked from pool/coreutils
fc6c8bcc8c
- Update to 8.32: * Noteworthy changes in release 8.32 (2020-03-05) [stable] ** Bug fixes cp now copies /dev/fd/N correctly on platforms like Solaris where it is a character-special file whose minor device number is N. [bug introduced in fileutils-4.1.6] dd conv=fdatasync no longer reports a "Bad file descriptor" error when fdatasync is interrupted, and dd now retries interrupted calls to close, fdatasync, fstat and fsync instead of incorrectly reporting an "Interrupted system call" error. [bugs introduced in coreutils-6.0] df now correctly parses the /proc/self/mountinfo file for unusual entries like ones with '\r' in a field value ("mount -t tmpfs tmpfs /foo$'\r'bar"), when the source field is empty ('mount -t tmpfs "" /mnt'), and when the filesystem type contains characters like a blank which need escaping. [bugs introduced in coreutils-8.24 with the introduction of reading the /proc/self/mountinfo file] factor again outputs immediately when stdout is a tty but stdin is not. [bug introduced in coreutils-8.24] ln works again on old systems without O_DIRECTORY support (like Solaris 10), and on systems where symlink ("x", ".") fails with errno == EINVAL (like Solaris 10 and Solaris 11). [bug introduced in coreutils-8.31] rmdir --ignore-fail-on-non-empty now works correctly for directories that fail to be removed due to permission issues. Previously the exit status was reversed, failing for non empty and succeeding for empty directories. [bug introduced in coreutils-6.11] 'shuf -r -n 0 file' no longer mistakenly reads from standard input. [bug introduced with the --repeat feature in coreutils-8.22] split no longer reports a "output file suffixes exhausted" error when the specified number of files is evenly divisible by 10, 16, 26, for --numeric, --hex, or default alphabetic suffixes respectively. [bug introduced in coreutils-8.24] seq no longer prints an extra line under certain circumstances (such as 'seq -f "%g " 1000000 1000000'). [bug introduced in coreutils-6.10] ** Changes in behavior Several programs now check that numbers end properly. For example, 'du -d 1x' now reports an error instead of silently ignoring the 'x'. Affected programs and options include du -d, expr's numeric operands on non-GMP builds, install -g and -o, ls's TABSIZE environment variable, mknod b and c, ptx -g and -w, shuf -n, and sort --batch-size and --parallel. date now parses military time zones in accordance with common usage: "A" to "M" are equivalent to UTC+1 to UTC+12 "N" to "Y" are equivalent to UTC-1 to UTC-12 "Z" is "zulu" time (UTC). For example, 'date -d "09:00B" is now equivalent to 9am in UTC+2 time zone. Previously, military time zones were parsed according to the obsolete rfc822, with their value negated (e.g., "B" was equivalent to UTC-2). [The old behavior was introduced in sh-utils 2.0.15 ca. 1999, predating coreutils package.] ls issues an error message on a removed directory, on GNU/Linux systems. Previously no error and no entries were output, and so indistinguishable from an empty directory, with default ls options. uniq no longer uses strcoll() to determine string equivalence, and so will operate more efficiently and consistently. ** New Features ls now supports the --time=birth option to display and sort by file creation time, where available. od --skip-bytes now can use lseek even if the input is not a regular file, greatly improving performance in some cases. stat(1) supports a new --cached= option, used on systems with statx(2) to control cache coherency of file system attributes, useful on network file systems. ** Improvements stat and ls now use the statx() system call where available, which can operate more efficiently by only retrieving requested attributes. stat and tail now know about the "binderfs", "dma-buf-fs", "erofs", "ppc-cmm-fs", and "z3fold" file systems. stat -f -c%T now reports the file system type, and tail -f uses inotify. ** Build-related gzip-compressed tarballs are distributed once again - Refresh patches: * coreutils-disable_tests.patch * coreutils-getaddrinfo.patch * coreutils-i18n.patch * coreutils-invalid-ids.patch * coreutils-remove_hostname_documentation.patch * coreutils-remove_kill_documentation.patch * coreutils-skip-gnulib-test-tls.patch * coreutils-tests-shorten-extreme-factor-tests.patch - coreutils-i18n.patch: * uniq: remove collation handling as required by newer POSIX; see - https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=8e81d44b5 - https://www.austingroupbugs.net/view.php?id=963 - coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch: * Add patch for 'ls' to restore 8.31 behavior on removed directories. - coreutils.spec: * Version: bump version. * %check: re-enable regular 'make check' for non-multibuild package. * reference the above new patch. - coreutils.keyring: * Update from upstream (Savannah). OBS-URL: https://build.opensuse.org/request/show/783998 OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=305
157 lines
4.9 KiB
Diff
157 lines
4.9 KiB
Diff
Upstream commits (squashed) after the release of coreutils-8.32:
|
|
[PATCH 1/2] ls: restore 8.31 behavior on removed directories
|
|
[PATCH 2/2] ls: improve removed-directory test
|
|
Remove this patch with the next coreutils release.
|
|
|
|
Discussed at:
|
|
https://lists.gnu.org/archive/html/bug-coreutils/2020-03/msg00008.html
|
|
|
|
Upstream commits:
|
|
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=10fcb97
|
|
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=672819c
|
|
|
|
commit 672819c73f2e94e61386dc0584bddf9da860cc26 (HEAD -> master, origin/master, origin/HEAD)
|
|
Author: Paul Eggert <eggert@cs.ucla.edu>
|
|
Date: Sat Mar 7 10:29:51 2020 -0800
|
|
|
|
ls: improve removed-directory test
|
|
|
|
* tests/ls/removed-directory.sh: Remove host_triplet test.
|
|
Skip this test if one cannot remove the working directory.
|
|
From a suggestion by Bernhard Voelker (Bug#39929).
|
|
|
|
commit 10fcb97bd728f09d4a027eddf8ad2900f0819b0a
|
|
Author: Paul Eggert <eggert@cs.ucla.edu>
|
|
Date: Thu Mar 5 17:25:29 2020 -0800
|
|
|
|
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.
|
|
---
|
|
NEWS | 9 +++++++++
|
|
src/ls.c | 22 ----------------------
|
|
tests/ls/removed-directory.sh | 23 ++++++-----------------
|
|
3 files changed, 15 insertions(+), 39 deletions(-)
|
|
|
|
Index: NEWS
|
|
===================================================================
|
|
--- NEWS.orig
|
|
+++ NEWS
|
|
@@ -1,5 +1,14 @@
|
|
GNU coreutils NEWS -*- outline -*-
|
|
|
|
+* Noteworthy downstream changes (on top of upstream coreutils-8.32)
|
|
+
|
|
+** 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]
|
|
|
|
** Bug fixes
|
|
Index: src/ls.c
|
|
===================================================================
|
|
--- src/ls.c.orig
|
|
+++ 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
|
|
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
|
|
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
|
|
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;
|
|
|
|
Index: tests/ls/removed-directory.sh
|
|
===================================================================
|
|
--- tests/ls/removed-directory.sh.orig
|
|
+++ tests/ls/removed-directory.sh
|
|
@@ -1,7 +1,7 @@
|
|
#!/bin/sh
|
|
-# If ls is asked to list a removed directory (e.g. the parent process's
|
|
-# current working directory that has been removed by another process), it
|
|
-# emits an error message.
|
|
+# If ls is asked to list a removed directory (e.g., the parent process's
|
|
+# current working directory has been removed by another process), it
|
|
+# should not emit an error message merely because the directory is removed.
|
|
|
|
# Copyright (C) 2020 Free Software Foundation, Inc.
|
|
|
|
@@ -21,25 +21,14 @@
|
|
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
|
print_ver_ ls
|
|
|
|
-case $host_triplet in
|
|
- *linux*) ;;
|
|
- *) 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_
|
|
+rmdir ../d || skip_ "can't remove working directory on this platform"
|
|
|
|
-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
|