diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-04-05 04:47:56 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-04-05 04:47:56 +0000 |
commit | 39d0849486f732bab35f91548301ce3cc199dc76 (patch) | |
tree | 64343a465a552c90ea355fb9a0b244e85820c34b | |
parent | abec66e9f952d9485d6368bfb46f518cfc4f2431 (diff) | |
download | packages-39d0849486f732bab35f91548301ce3cc199dc76.tar.gz packages-39d0849486f732bab35f91548301ce3cc199dc76.tar.bz2 packages-39d0849486f732bab35f91548301ce3cc199dc76.tar.xz packages-39d0849486f732bab35f91548301ce3cc199dc76.zip |
system/coreutils: Update to 8.32
-rw-r--r-- | system/coreutils/APKBUILD | 16 | ||||
-rw-r--r-- | system/coreutils/cp-dont-delete.patch | 72 | ||||
-rw-r--r-- | system/coreutils/date-debug.patch | 56 | ||||
-rw-r--r-- | system/coreutils/disable-mbrtowc-test.patch | 4 | ||||
-rw-r--r-- | system/coreutils/localename-test-fix.patch | 2 | ||||
-rw-r--r-- | system/coreutils/ls-removed-dirs.patch | 99 |
6 files changed, 183 insertions, 66 deletions
diff --git a/system/coreutils/APKBUILD b/system/coreutils/APKBUILD index 23d96edbd..71c10cca4 100644 --- a/system/coreutils/APKBUILD +++ b/system/coreutils/APKBUILD @@ -2,8 +2,8 @@ # Contributor: Michael Mason <ms13sp@gmail.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=coreutils -pkgver=8.31 -pkgrel=4 +pkgver=8.32 +pkgrel=0 pkgdesc="Basic file, shell, and text manipulation utilities" url="https://www.gnu.org/software/coreutils/" arch="all" @@ -15,12 +15,13 @@ subpackages="$pkgname-doc" [ "${CBUILD}" = "${CHOST}" ] && subpackages="$subpackages $pkgname-lang" install="$pkgname.post-deinstall" source="https://ftp.gnu.org/gnu/coreutils/$pkgname-$pkgver.tar.xz - date-debug.patch + cp-dont-delete.patch disable-csplit-io-err-test.patch disable-mbrtowc-test.patch gnulib-tests-dont-require-gpg-passphrase.patch gnulib-test-fixes.patch localename-test-fix.patch + ls-removed-dirs.patch test-df-symlink-bindmount.patch " [ "${CBUILD}" != "${CHOST}" ] && source="$source @@ -68,13 +69,14 @@ package() { done } -sha512sums="ef8941dae845bbf5ae5838bc49e44554a766302930601aada6fa594e8088f0fbad74e481ee392ff89633e68b99e4da3f761fcb5d31ee3b233d540fe2a2d4e1af coreutils-8.31.tar.xz +sha512sums="1c8f3584efd61b4b02e7ac5db8e103b63cfb2063432caaf1e64cb2dcc56d8c657d1133bbf10bd41468d6a1f31142e6caa81d16ae68fa3e6e84075c253613a145 coreutils-8.32.tar.xz +96eecaaea757c0a39136733b6b5a9d97b869c50aa41d2052a293544a59a959de7dfa0412f5613e52ff946da42df5b50403b30c88c0a1a882690219fd4ee2efa9 cp-dont-delete.patch bd8b5cecba59eba30458c8afa895877d39a987b989bc06b70cd6836e0ef684677aaadcb4949b58a713779fe1df1e15e3903e9be14e306671b86b69018b75de8b disable-csplit-io-err-test.patch -532ef8210261437855ba3e2fc72ec57b0e0252b2b0f7817990c9629613ece2cdd86cf30aa049f3cff6fbda12ed3bb9a0db3a3642475378ae44ce319bdf005d9b disable-mbrtowc-test.patch -86944e9ea5493c5b21ab62562a63aa134952738297b21cfb2e8f751db4a695ff25ee1592eb231ed1bb80999bc31f7504c7feffde2e93b4e068c05c44ac83cbdf localename-test-fix.patch +595be7f580f8906467624959c7eddbd6d7007571d92668b6a1ea5543b73764035b44b02ab5f352c67ec6562a368f220af445edd0a0965fb9826bccfd25ddbdba disable-mbrtowc-test.patch fd97fccd661befc558b3afb3e32c82dd2cef511a05e6129d49540599297c1b59ab1f109e63a12f585a2348c26c28fb98330c348829d1fe61cf8149d0dd1c989c gnulib-tests-dont-require-gpg-passphrase.patch 08f6de0e4c1615503a276fb7eb8abb3f1a996d3e9e4c789deb1507e9ac66364e3993591e37ee444d239c64bf3b7d61f909c0da5ead3047b75623cd846e9f868f gnulib-test-fixes.patch -aac3a89b27a7854fbf483e155df9133c3d33a0f36bd55d5606559a7781f9d27d5c17779ea427142311749252767097bf92ec22d4cf86b510568c186da84ff16c date-debug.patch +b1509e5678a05f24d6e764c047546e5e34a7fbd5edb59c7debedb144a0096d8ac247c7e2722a5f68c90751e5280bec743c9a6ed3e1433c1916294d68d7bca109 localename-test-fix.patch +c7e7a03ed074d74fa836eaa6372d170b50d5719914160d9a835db25fb958e1fcfa4530231abd8f9b2323958a510750a8a5f65a5cea56555fa8a39dd8abd6e8cc ls-removed-dirs.patch 0b90b7721dd01bd22eba50f73bc756930dd4a8bc78ec408ce7f155a02b520375023897b9d12872030735d908208b912ea7adfac9e8b4d055e617873d982eef56 test-df-symlink-bindmount.patch" [ "${CBUILD}" != "${CHOST}" ] && sha512sums=" bae804f057252c25452ac178c545dc2c4b4775cbfbdcfd4775edd1a4ed6507882bfac39e2b11ad01b74230ca48d761bf62f11bde5bcbc35a6e5a61cbe4a46e36 051_all_coreutils-mangen.patch diff --git a/system/coreutils/cp-dont-delete.patch b/system/coreutils/cp-dont-delete.patch new file mode 100644 index 000000000..a60608952 --- /dev/null +++ b/system/coreutils/cp-dont-delete.patch @@ -0,0 +1,72 @@ +From 7b5f0fa47cd04c84975250d5b5da7c98e097e99f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com> +Date: Wed, 1 Apr 2020 12:51:34 +0100 +Subject: cp: ensure --attributes-only doesn't remove files + +* src/copy.c (copy_internal): Ensure we don't unlink the destination +unless explicitly requested. +* tests/cp/attr-existing.sh: Add test cases. +Fixes https://bugs.gnu.org/40352 +--- + NEWS | 7 +++++++ + src/copy.c | 9 +++++---- + tests/cp/attr-existing.sh | 21 ++++++++++++++++++--- + 3 files changed, 30 insertions(+), 7 deletions(-) + +diff --git a/src/copy.c b/src/copy.c +index 6e5efc708..54601ce07 100644 +--- a/src/copy.c ++++ b/src/copy.c +@@ -2211,10 +2211,11 @@ copy_internal (char const *src_name, char const *dst_name, + /* Never unlink dst_name when in move mode. */ + && ! x->move_mode + && (x->unlink_dest_before_opening +- || (x->preserve_links && 1 < dst_sb.st_nlink) +- || (x->dereference == DEREF_NEVER +- && ! S_ISREG (src_sb.st_mode)) +- )) ++ || (x->data_copy_required ++ && ((x->preserve_links && 1 < dst_sb.st_nlink) ++ || (x->dereference == DEREF_NEVER ++ && ! S_ISREG (src_sb.st_mode)))) ++ )) + { + if (unlink (dst_name) != 0 && errno != ENOENT) + { +diff --git a/tests/cp/attr-existing.sh b/tests/cp/attr-existing.sh +index 59ce64183..14fc8445c 100755 +--- a/tests/cp/attr-existing.sh ++++ b/tests/cp/attr-existing.sh +@@ -19,11 +19,26 @@ + . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src + print_ver_ cp + +-printf '1' > file1 +-printf '2' > file2 +-printf '2' > file2.exp ++printf '1' > file1 || framework_failure_ ++printf '2' > file2 || framework_failure_ ++printf '2' > file2.exp || framework_failure_ + + cp --attributes-only file1 file2 || fail=1 + cmp file2 file2.exp || fail=1 + ++# coreutils v8.32 and before would remove destination files ++# if hardlinked or the source was not a regular file. ++ln file2 link2 || framework_failure_ ++cp -a --attributes-only file1 file2 || fail=1 ++cmp file2 file2.exp || fail=1 ++ ++ln -s file1 sym1 || framework_failure_ ++returns_ 1 cp -a --attributes-only sym1 file2 || fail=1 ++cmp file2 file2.exp || fail=1 ++ ++# One can still force removal though ++cp -a --remove-destination --attributes-only sym1 file2 || fail=1 ++test -L file2 || fail=1 ++cmp file1 file2 || fail=1 ++ + Exit $fail +-- +cgit v1.2.1 + diff --git a/system/coreutils/date-debug.patch b/system/coreutils/date-debug.patch deleted file mode 100644 index fc4977e72..000000000 --- a/system/coreutils/date-debug.patch +++ /dev/null @@ -1,56 +0,0 @@ ->From 402c3646e19c199130e7a6db5238cf5908e51fb8 Mon Sep 17 00:00:00 2001 -From: Assaf Gordon <assafgordon@gmail.com> -Date: Mon, 13 May 2019 16:37:40 -0600 -Subject: [PATCH] tests: avoid false-positive in date-debug test -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When debugging an invalid date due to DST switching, the intermediate -'normalized time' should not be checked - its value can differ between -systems (e.g. glibc vs musl). - -Reported by Niklas Hambüchen in -https://lists.gnu.org/r/coreutils/2019-05/msg00031.html -Analyzed by Rich Felker in -https://lists.gnu.org/r/coreutils/2019-05/msg00039.html - -* tests/misc/date-debug.sh: Replace the exact normalized time -with 'XX:XX:XX' so different values would not trigger test failure. ---- - tests/misc/date-debug.sh | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/tests/misc/date-debug.sh b/tests/misc/date-debug.sh -index aa47f1abb..2ce6f4ce8 100755 ---- a/tests/misc/date-debug.sh -+++ b/tests/misc/date-debug.sh -@@ -71,7 +71,7 @@ date: input timezone: TZ="America/Edmonton" in date string - date: using specified time as starting value: '02:30:00' - date: error: invalid date/time value: - date: user provided time: '(Y-M-D) 2006-04-02 02:30:00' --date: normalized time: '(Y-M-D) 2006-04-02 03:30:00' -+date: normalized time: '(Y-M-D) 2006-04-02 XX:XX:XX' - date: -- - date: possible reasons: - date: non-existing due to daylight-saving time; -@@ -81,7 +81,14 @@ date: invalid date 'TZ="America/Edmonton" 2006-04-02 02:30:00' - EOF - - # date should return 1 (error) for invalid date --returns_ 1 date --debug -d "$in2" >out2 2>&1 || fail=1 -+returns_ 1 date --debug -d "$in2" >out2-t 2>&1 || fail=1 -+ -+# The output line of "normalized time" can differ between systems -+# (e.g. glibc vs musl) and should not be checked. -+# See: https://lists.gnu.org/archive/html/coreutils/2019-05/msg00039.html -+sed '/normalized time:/s/ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/ XX:XX:XX/' \ -+ out2-t > out2 || framework_failure_ -+ - compare exp2 out2 || fail=1 - - ## --- -2.11.0 - - diff --git a/system/coreutils/disable-mbrtowc-test.patch b/system/coreutils/disable-mbrtowc-test.patch index d338e0324..fb595df0e 100644 --- a/system/coreutils/disable-mbrtowc-test.patch +++ b/system/coreutils/disable-mbrtowc-test.patch @@ -4,7 +4,7 @@ #!/bin/sh -# Test whether the POSIX locale has encoding errors. -LC_ALL=C \ --./test-mbrtowc${EXEEXT} 5 || exit +-${CHECKER} ./test-mbrtowc${EXEEXT} 5 || exit -LC_ALL=POSIX \ --./test-mbrtowc${EXEEXT} 5 +-${CHECKER} ./test-mbrtowc${EXEEXT} 5 +exit 77 diff --git a/system/coreutils/localename-test-fix.patch b/system/coreutils/localename-test-fix.patch index ff89319c7..17aaa226f 100644 --- a/system/coreutils/localename-test-fix.patch +++ b/system/coreutils/localename-test-fix.patch @@ -8,7 +8,7 @@ # if !defined IN_LIBINTL --- coreutils-8.27/gnulib-tests/localename.c.old 2016-12-31 13:54:43.000000000 +0000 +++ coreutils-8.27/gnulib-tests/localename.c 2017-07-30 16:40:47.098541270 +0000 -@@ -2692,16 +2692,19 @@ +@@ -3111,16 +3111,19 @@ locale_t thread_locale = uselocale (NULL); if (thread_locale != LC_GLOBAL_LOCALE) { diff --git a/system/coreutils/ls-removed-dirs.patch b/system/coreutils/ls-removed-dirs.patch new file mode 100644 index 000000000..59808345c --- /dev/null +++ b/system/coreutils/ls-removed-dirs.patch @@ -0,0 +1,99 @@ +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: ls: restore 8.31 behavior on removed directories + +* 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 | 6 ++++++ + src/ls.c | 22 ---------------------- + tests/ls/removed-directory.sh | 10 ++-------- + 3 files changed, 8 insertions(+), 30 deletions(-) + +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 +-- +cgit v1.2.1 + |