From 4f67da60bc3b2a4434507334c51787aac137e6cee071536e5a88d7a2dbc3550b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 1 Oct 2021 19:34:37 +0000 Subject: [PATCH] Accepting request 922533 from home:berny:branches:Base:System - Update to 8.32 (see NEWS). - Remove patches which are included in the new upstream version now: * coreutils-gnulib-disable-test-float.patch * coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch * coreutils-tests-fix-FP-in-ls-stat-free-color.patch * gnulib-test-avoid-FP-perror-strerror.patch - coreutils-i18n.patch: Refresh patch. Also patch 'tests/Coreutils.pm' used by perl-based tests to allow longer test names ... which the i18n tests with their "-mb" suffix have. - coreutils-chmod-fix-exit-status-ign-symlinks.patch: Add upstream patch to fix a regression with the exit code of chmod introduced in 9.0. - coreutils-skip-tests-rm-ext3-perf.patch: Add patch to skip the test 'tests/rm/ext3-perf.sh' temporarily as it hangs on OBS. - coreutils.spec: * Version: bump version. * Remove the above removed patches. * Reference the above new patches. OBS-URL: https://build.opensuse.org/request/show/922533 OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=322 --- coreutils-8.32.tar.xz | 3 - coreutils-8.32.tar.xz.sig | 16 -- coreutils-9.0.tar.xz | 3 + coreutils-9.0.tar.xz.sig | 16 ++ ...s-chmod-fix-exit-status-ign-symlinks.patch | 119 +++++++++ coreutils-disable_tests.patch | 2 +- coreutils-gnulib-disable-test-float.patch | 25 -- coreutils-i18n.patch | 229 ++++++++++-------- coreutils-invalid-ids.patch | 2 +- ...estore-8.31-behavior-on-removed-dirs.patch | 156 ------------ coreutils-misc.patch | 4 +- coreutils-remove_hostname_documentation.patch | 6 +- coreutils-remove_kill_documentation.patch | 6 +- coreutils-skip-gnulib-test-tls.patch | 2 +- coreutils-skip-tests-rm-ext3-perf.patch | 23 ++ ...s-tests-fix-FP-in-ls-stat-free-color.patch | 46 ---- ...s-tests-shorten-extreme-factor-tests.patch | 2 +- coreutils-use-python3.patch | 6 +- coreutils.changes | 171 +++++++++++++ coreutils.spec | 33 +-- gnulib-test-avoid-FP-perror-strerror.patch | 101 -------- 21 files changed, 481 insertions(+), 490 deletions(-) delete mode 100644 coreutils-8.32.tar.xz delete mode 100644 coreutils-8.32.tar.xz.sig create mode 100644 coreutils-9.0.tar.xz create mode 100644 coreutils-9.0.tar.xz.sig create mode 100644 coreutils-chmod-fix-exit-status-ign-symlinks.patch delete mode 100644 coreutils-gnulib-disable-test-float.patch delete mode 100644 coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch create mode 100644 coreutils-skip-tests-rm-ext3-perf.patch delete mode 100644 coreutils-tests-fix-FP-in-ls-stat-free-color.patch delete mode 100644 gnulib-test-avoid-FP-perror-strerror.patch diff --git a/coreutils-8.32.tar.xz b/coreutils-8.32.tar.xz deleted file mode 100644 index ade8076..0000000 --- a/coreutils-8.32.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa -size 5547836 diff --git a/coreutils-8.32.tar.xz.sig b/coreutils-8.32.tar.xz.sig deleted file mode 100644 index 531e238..0000000 --- a/coreutils-8.32.tar.xz.sig +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEbDfcEhIaUAa8HbgE32/ZcTBgN9kFAl5hC5MACgkQ32/ZcTBg -N9n92Q//Td2GE1f8AZKkxCNI76Q/TqbxAwhjbkR+KdzvsyMePmgHcMgHG6sO2MNF -g6DIBmHpO3vWGzvUxUZRRhuW5QBOnMxHb/WXZ0p/g45d5MQdn4i0dA0wUJgByOqn -/WVfygNg9mrWFx/uTeCdhrwL11m71C7j/eQVu7Wr5DIb20VJ8+nVC2IWW33ZvxRj -Goa0wwDpeeD9qYe/Y+E5ZyhDYHJGRmNAlS03SXLO3+RfsbZFwdQEtzvr+v1VN6/S -9OsoI/GLdRjY1tByppaoZ63ZybB6iF5zZfJiWDF7Nw4MduJpjZQDSywiNleJ9vOi -fwR1180PjMV6aTXvPwqbqQxZjDl7nqvO36ghlTvErJbqdJVIYxmUGNjeJyjqI85l -Lhckh0GWos9K/kl13Ry9KWsxNQgfjNhtgjXGh+W47ojrho2kCiK5BTwDFeVU0jtU -H/1EePSGAIUF/Sfjz3rmGgLaaBwPiRiyzEIuZMyd4NCJWwfOTqgOshOYw15GCWYq -wGesN/4LWzEja7Au5lHP7imXjP0bp4qE/sYrOb4WzVVLCn+z2hu6SEIzjJzSm+D+ -8Wv3Ia1/ypVpR+Z7gUt7VtEvI8zAwlySd/6Jw5U7TL0rzvZsTVWmCvEjPp+o3jCB -Fy/4ybao1gowBFtT1AtPMmxmiJ41KWCxLFrTuGJpFYCGvBH2y8s= -=yHV6 ------END PGP SIGNATURE----- diff --git a/coreutils-9.0.tar.xz b/coreutils-9.0.tar.xz new file mode 100644 index 0000000..e65a07f --- /dev/null +++ b/coreutils-9.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce30acdf4a41bc5bb30dd955e9eaa75fa216b4e3deb08889ed32433c7b3b97ce +size 5612752 diff --git a/coreutils-9.0.tar.xz.sig b/coreutils-9.0.tar.xz.sig new file mode 100644 index 0000000..8fe032e --- /dev/null +++ b/coreutils-9.0.tar.xz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEbDfcEhIaUAa8HbgE32/ZcTBgN9kFAmFN1c4ACgkQ32/ZcTBg +N9mtfw/8D8BJrt2Ver2xdPfow5FYHT/zakUQ2b3ZIHP0Es62W56+pWtGombphrZu +4PkI1x6i4S8z06O9rWPIDGMPjyPV9UJbzAiGC7Px6tW6RFHZx0M+GNsKfcjmhtf7 +0v3jFF0g1IdrikFG1aYCAHZHy7n+yOm7xsfSmlYVlKcOVbCFN92ZBw0IohOSriSq +nJN6IOY8I3frhuI5kchY4wM6RMQ+ztNtG8odNvJI3kWCCL9pQFxzD8uorrvTiAcp +Qdbfz5TDnlVcXKR1gu6AAP+XThUYuxG5t/2Kghlril1zxnbDBZJsGteevyHsS7kY +grAWY4XqSvKVURGaKSSUhXlriQilPknBaichwEhAXvrUk1giviAzZ8CXB6WzzTvn +E9+ofC8RqTu345+ixkdZZu0TauOZWYIUVzKsD7W0ooQOT7OZeIQfb3+pbves/I+k +ZyiRLxfiUkAkKMUDrMr+okhqFA9fo/GCkFmHWj9m2NAc15kifEpSiCktfgoChbeG +ZiQFXQz090P+L1pk82qBXVgTjUyS5VEnXZoIkTWGzkHKySwreiaIjPQhS3cU2xAm +24i53zidj84Ib62Xa4jwxX7BzZqYRdbWAa/BUUNMov75W4dfkPlZ6qbRXtKnoOZf +u0ok3fgFvopGzwbw3l/HFp58jpaYL5S28gy10PpdOnxeO54XBn0= +=3TCC +-----END PGP SIGNATURE----- diff --git a/coreutils-chmod-fix-exit-status-ign-symlinks.patch b/coreutils-chmod-fix-exit-status-ign-symlinks.patch new file mode 100644 index 0000000..0f458cd --- /dev/null +++ b/coreutils-chmod-fix-exit-status-ign-symlinks.patch @@ -0,0 +1,119 @@ +Upstream patch - remove with version >9.0: +chmod: fix exit status when ignoring symlinks + +As a deviation from the upstream patch, the entry in the NEWS files uses a +different section header. + +------------------------------------------------------------------- +Upstream patch: + https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=e8b56ebd5 + +From e8b56ebd536e82b15542a00c888109471936bfda Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Fri, 24 Sep 2021 20:57:41 +0100 +Subject: [PATCH] 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 | 9 +++++++++ + src/chmod.c | 4 ++-- + tests/chmod/ignore-symlink.sh | 31 +++++++++++++++++++++++++++++++ + tests/local.mk | 1 + + 4 files changed, 43 insertions(+), 2 deletions(-) + +Index: NEWS +=================================================================== +--- NEWS.orig ++++ NEWS +@@ -1,5 +1,14 @@ + GNU coreutils NEWS -*- outline -*- + ++* Noteworthy downstream changes on top of release 9.0 ++ ++** 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] + + ** Bug fixes +Index: src/chmod.c +=================================================================== +--- src/chmod.c.orig ++++ 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 +Index: tests/chmod/ignore-symlink.sh +=================================================================== +--- /dev/null ++++ tests/chmod/ignore-symlink.sh +@@ -0,0 +1,31 @@ ++#!/bin/sh ++# Test for proper exit code of chmod on a processed symlink. ++ ++# Copyright (C) 2021 Free Software Foundation, Inc. ++ ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ chmod ++ ++mkdir dir || framework_failure_ ++touch dir/f || framework_failure_ ++ln -s f dir/l || framework_failure_ ++ ++# This operation ignores symlinks but should succeed. ++chmod u+w -R dir 2> out || fail=1 ++ ++compare /dev/null out || fail=1 ++ ++Exit $fail +Index: tests/local.mk +=================================================================== +--- tests/local.mk.orig ++++ tests/local.mk +@@ -458,6 +458,7 @@ all_tests = \ + tests/chmod/c-option.sh \ + tests/chmod/equal-x.sh \ + tests/chmod/equals.sh \ ++ tests/chmod/ignore-symlink.sh \ + tests/chmod/inaccessible.sh \ + tests/chmod/octal.sh \ + tests/chmod/setgid.sh \ diff --git a/coreutils-disable_tests.patch b/coreutils-disable_tests.patch index efb32e8..111ae6a 100644 --- a/coreutils-disable_tests.patch +++ b/coreutils-disable_tests.patch @@ -6,7 +6,7 @@ Index: gnulib-tests/gnulib.mk =================================================================== --- gnulib-tests/gnulib.mk.orig +++ gnulib-tests/gnulib.mk -@@ -951,10 +951,10 @@ EXTRA_DIST += test-getloadavg.c signatur +@@ -1035,10 +1035,10 @@ EXTRA_DIST += test-getloadavg.c signatur ## begin gnulib module getlogin-tests diff --git a/coreutils-gnulib-disable-test-float.patch b/coreutils-gnulib-disable-test-float.patch deleted file mode 100644 index c49e107..0000000 --- a/coreutils-gnulib-disable-test-float.patch +++ /dev/null @@ -1,25 +0,0 @@ -Disable gnulib test 'test-float' temporarily as it fails on ppc and ppc64le. - -* gnulib-tests/gnulib.mk: Comment lines related to 'test-float'. ---- - gnulib-tests/gnulib.mk | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -Index: gnulib-tests/gnulib.mk -=================================================================== ---- gnulib-tests/gnulib.mk.orig -+++ gnulib-tests/gnulib.mk -@@ -635,9 +635,10 @@ EXTRA_DIST += test-filevercmp.c macros.h - - ## begin gnulib module float-tests - --TESTS += test-float --check_PROGRAMS += test-float --EXTRA_DIST += test-float.c macros.h -+# Test fails with GCC-10 on ppc and ppc64le. -+#TESTS += test-float -+#check_PROGRAMS += test-float -+#EXTRA_DIST += test-float.c macros.h - - ## end gnulib module float-tests - diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 965d65b..0d7f263 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -40,7 +40,7 @@ Index: bootstrap.conf =================================================================== --- bootstrap.conf.orig +++ bootstrap.conf -@@ -154,6 +154,7 @@ gnulib_modules=" +@@ -156,6 +156,7 @@ gnulib_modules=" maintainer-makefile malloc-gnu manywarnings @@ -52,7 +52,7 @@ Index: configure.ac =================================================================== --- configure.ac.orig +++ configure.ac -@@ -446,6 +446,8 @@ fi +@@ -457,6 +457,8 @@ fi # I'm leaving it here for now. This whole thing needs to be modernized... gl_WINSIZE_IN_PTEM @@ -65,8 +65,8 @@ Index: lib/linebuffer.h =================================================================== --- lib/linebuffer.h.orig +++ lib/linebuffer.h -@@ -21,6 +21,11 @@ - +@@ -22,6 +22,11 @@ + # include "idx.h" # include +/* Get mbstate_t. */ @@ -77,9 +77,9 @@ Index: lib/linebuffer.h /* A 'struct linebuffer' holds a line of text. */ struct linebuffer -@@ -28,6 +33,9 @@ struct linebuffer - size_t size; /* Allocated. */ - size_t length; /* Used. */ +@@ -29,6 +34,9 @@ struct linebuffer + idx_t size; /* Allocated. */ + idx_t length; /* Used. */ char *buffer; +# if HAVE_WCHAR_H + mbstate_t state; @@ -390,7 +390,7 @@ Index: src/cut.c #include "system.h" #include "error.h" -@@ -38,6 +43,18 @@ +@@ -37,6 +42,18 @@ #include "set-fields.h" @@ -409,7 +409,7 @@ Index: src/cut.c /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "cut" -@@ -54,6 +71,52 @@ +@@ -53,6 +70,52 @@ } \ while (0) @@ -462,7 +462,7 @@ Index: src/cut.c /* Pointer inside RP. When checking if a byte or field is selected by a finite range, we check if it is between CURRENT_RP.LO -@@ -61,6 +124,9 @@ +@@ -60,6 +123,9 @@ CURRENT_RP.HI then we make CURRENT_RP to point to the next range pair. */ static struct field_range_pair *current_rp; @@ -472,7 +472,7 @@ Index: src/cut.c /* This buffer is used to support the semantics of the -s option (or lack of same) when the specified field list includes (does not include) the first field. In both of those cases, the entire -@@ -77,15 +143,25 @@ enum operating_mode +@@ -76,15 +142,25 @@ enum operating_mode { undefined_mode, @@ -499,7 +499,7 @@ Index: src/cut.c /* If true do not output lines containing no delimiter characters. Otherwise, all such lines are printed. This option is valid only with field mode. */ -@@ -97,6 +173,9 @@ static bool complement; +@@ -96,6 +172,9 @@ static bool complement; /* The delimiter character for field mode. */ static unsigned char delim; @@ -509,7 +509,7 @@ Index: src/cut.c /* The delimiter for each line/record. */ static unsigned char line_delim = '\n'; -@@ -164,7 +243,7 @@ Print selected parts of lines from each +@@ -163,7 +242,7 @@ Print selected parts of lines from each -f, --fields=LIST select only these fields; also print any line\n\ that contains no delimiter character, unless\n\ the -s option is specified\n\ @@ -518,7 +518,7 @@ Index: src/cut.c "), stdout); fputs (_("\ --complement complement the set of selected bytes, characters\n\ -@@ -280,6 +359,82 @@ cut_bytes (FILE *stream) +@@ -279,6 +358,82 @@ cut_bytes (FILE *stream) } } @@ -601,7 +601,7 @@ Index: src/cut.c /* Read from stream STREAM, printing to standard output any selected fields. */ static void -@@ -425,13 +580,211 @@ cut_fields (FILE *stream) +@@ -424,13 +579,211 @@ cut_fields (FILE *stream) } } @@ -816,7 +816,7 @@ Index: src/cut.c } /* Process file FILE to standard output. -@@ -483,6 +836,7 @@ main (int argc, char **argv) +@@ -482,6 +835,7 @@ main (int argc, char **argv) bool ok; bool delim_specified = false; char *spec_list_string IF_LINT ( = NULL); @@ -824,7 +824,7 @@ Index: src/cut.c initialize_main (&argc, &argv); set_program_name (argv[0]); -@@ -505,7 +859,6 @@ main (int argc, char **argv) +@@ -504,7 +858,6 @@ main (int argc, char **argv) switch (optc) { case 'b': @@ -832,7 +832,7 @@ Index: src/cut.c /* Build the byte list. */ if (operating_mode != undefined_mode) FATAL_ERROR (_("only one type of list may be specified")); -@@ -513,6 +866,14 @@ main (int argc, char **argv) +@@ -512,6 +865,14 @@ main (int argc, char **argv) spec_list_string = optarg; break; @@ -847,7 +847,7 @@ Index: src/cut.c case 'f': /* Build the field list. */ if (operating_mode != undefined_mode) -@@ -524,10 +885,38 @@ main (int argc, char **argv) +@@ -523,10 +884,38 @@ main (int argc, char **argv) case 'd': /* New delimiter. */ /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ @@ -890,7 +890,7 @@ Index: src/cut.c break; case OUTPUT_DELIMITER_OPTION: -@@ -540,6 +929,7 @@ main (int argc, char **argv) +@@ -539,6 +928,7 @@ main (int argc, char **argv) break; case 'n': @@ -898,7 +898,7 @@ Index: src/cut.c break; case 's': -@@ -579,15 +969,34 @@ main (int argc, char **argv) +@@ -578,15 +968,34 @@ main (int argc, char **argv) | (complement ? SETFLD_COMPLEMENT : 0) ); if (!delim_specified) @@ -951,7 +951,7 @@ Index: src/expand-common.c #include "system.h" #include "die.h" #include "error.h" -@@ -126,6 +127,119 @@ set_increment_size (uintmax_t tabval) +@@ -125,6 +126,119 @@ set_increment_size (uintmax_t tabval) return ok; } @@ -1075,7 +1075,7 @@ Index: src/expand-common.h =================================================================== --- src/expand-common.h.orig +++ src/expand-common.h -@@ -34,6 +34,18 @@ extern size_t max_column_width; +@@ -25,6 +25,18 @@ extern size_t max_column_width; /* The desired exit status. */ extern int exit_status; @@ -1107,8 +1107,8 @@ Index: src/expand.c + #include "system.h" #include "die.h" - #include "xstrndup.h" -@@ -98,19 +101,41 @@ expand (void) + +@@ -97,19 +100,41 @@ expand (void) { /* Input stream. */ FILE *fp = next_file (NULL); @@ -1154,7 +1154,7 @@ Index: src/expand.c /* The following variables have valid values only when CONVERT is true: */ -@@ -120,17 +145,48 @@ expand (void) +@@ -119,17 +144,48 @@ expand (void) /* Index in TAB_LIST of next tab stop to examine. */ size_t tab_index = 0; @@ -1207,7 +1207,7 @@ Index: src/expand.c { /* Column the next input tab stop is on. */ uintmax_t next_tab_column; -@@ -149,32 +205,34 @@ expand (void) +@@ -148,32 +204,34 @@ expand (void) if (putchar (' ') < 0) die (EXIT_FAILURE, errno, _("write error")); @@ -1401,12 +1401,15 @@ Index: src/fold.c /* Look for the last blank. */ while (logical_end) { -@@ -215,11 +252,221 @@ fold_file (char const *filename, size_t +@@ -215,13 +252,225 @@ fold_file (char const *filename, size_t line_out[offset_out++] = c; } - saved_errno = errno; + *saved_errno = errno; + if (!ferror (istream)) +- saved_errno = 0; ++ *saved_errno = 0; if (offset_out) fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); @@ -1582,6 +1585,8 @@ Index: src/fold.c + } + + *saved_errno = errno; ++ if (!ferror (istream)) ++ *saved_errno = 0; + + if (offset_out) + fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); @@ -1621,10 +1626,10 @@ Index: src/fold.c +#endif + fold_text (istream, width, &saved_errno); + - if (ferror (istream)) - { - error (0, saved_errno, "%s", quotef (filename)); -@@ -252,7 +499,8 @@ main (int argc, char **argv) + if (STREQ (filename, "-")) + clearerr (istream); + else if (fclose (istream) != 0 && !saved_errno) +@@ -252,7 +501,8 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1634,7 +1639,7 @@ Index: src/fold.c while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) { -@@ -261,7 +509,15 @@ main (int argc, char **argv) +@@ -261,7 +511,15 @@ main (int argc, char **argv) switch (optc) { case 'b': /* Count bytes rather than columns. */ @@ -2215,8 +2220,8 @@ Index: src/pr.c static bool print_page (void); static bool print_stored (COLUMN *p); @@ -429,6 +472,7 @@ static void add_line_number (COLUMN *p); - static void getoptnum (const char *n_str, int min, int *num, - const char *errfmt); + static void getoptnum (char const *n_str, int min, int *num, + char const *errfmt); static void getoptarg (char *arg, char switch_char, char *character, + int *character_length, int *character_width, int *number); @@ -2229,7 +2234,7 @@ Index: src/pr.c -static void print_char (char c); static void cleanup (void); static void print_sep_string (void); - static void separator_string (const char *optarg_S); + static void separator_string (char const *optarg_S); @@ -454,7 +497,7 @@ static COLUMN *column_vector; we store the leftmost columns contiguously in buff. To print a line from buff, get the index of the first character @@ -2283,7 +2288,7 @@ Index: src/pr.c static char *column_separator = (char *) " "; static char *line_separator = (char *) "\t"; -@@ -852,6 +905,13 @@ separator_string (const char *optarg_S) +@@ -852,6 +905,13 @@ separator_string (char const *optarg_S) integer_overflow (); col_sep_length = len; col_sep_string = optarg_S; @@ -2368,7 +2373,7 @@ Index: src/pr.c use_col_separator = true; if (optarg) separator_string (optarg); -@@ -1166,10 +1250,45 @@ getoptnum (const char *n_str, int min, i +@@ -1166,10 +1250,45 @@ getoptnum (char const *n_str, int min, i a number. */ static void @@ -2437,7 +2442,7 @@ Index: src/pr.c use_col_separator = true; } /* It's rather pointless to define a TAB separator with column -@@ -1258,11 +1382,11 @@ init_parameters (int number_of_files) +@@ -1260,11 +1384,11 @@ init_parameters (int number_of_files) + TAB_WIDTH (chars_per_input_tab, chars_per_number); */ /* Estimate chars_per_text without any margin and keep it constant. */ @@ -2451,7 +2456,7 @@ Index: src/pr.c /* The number is part of the column width unless we are printing files in parallel. */ -@@ -1271,7 +1395,7 @@ init_parameters (int number_of_files) +@@ -1273,7 +1397,7 @@ init_parameters (int number_of_files) } int sep_chars, useful_chars; @@ -2460,7 +2465,7 @@ Index: src/pr.c sep_chars = INT_MAX; if (INT_SUBTRACT_WRAPV (chars_per_line - chars_used_by_number, sep_chars, &useful_chars)) -@@ -1294,7 +1418,7 @@ init_parameters (int number_of_files) +@@ -1296,7 +1420,7 @@ init_parameters (int number_of_files) We've to use 8 as the lower limit, if we use chars_per_default_tab = 8 to expand a tab which is not an input_tab-char. */ free (clump_buff); @@ -2469,7 +2474,7 @@ Index: src/pr.c } /* Open the necessary files, -@@ -1400,7 +1524,7 @@ init_funcs (void) +@@ -1402,7 +1526,7 @@ init_funcs (void) /* Enlarge p->start_position of first column to use the same form of padding_not_printed with all columns. */ @@ -2478,7 +2483,7 @@ Index: src/pr.c /* This loop takes care of all but the rightmost column. */ -@@ -1434,7 +1558,7 @@ init_funcs (void) +@@ -1436,7 +1560,7 @@ init_funcs (void) } else { @@ -2487,7 +2492,7 @@ Index: src/pr.c h_next = h + chars_per_column; } } -@@ -1725,9 +1849,9 @@ static void +@@ -1733,9 +1857,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -2499,7 +2504,7 @@ Index: src/pr.c padding_not_printed = ANYWHERE; } -@@ -2002,13 +2126,13 @@ store_char (char c) +@@ -2010,13 +2134,13 @@ store_char (char c) /* May be too generous. */ buff = X2REALLOC (buff, &buff_allocated); } @@ -2515,7 +2520,7 @@ Index: src/pr.c char *s; int num_width; -@@ -2025,22 +2149,24 @@ add_line_number (COLUMN *p) +@@ -2033,22 +2157,24 @@ add_line_number (COLUMN *p) /* Tabification is assumed for multiple columns, also for n-separators, but 'default n-separator = TAB' hasn't been given priority over equal column_width also specified by POSIX. */ @@ -2544,7 +2549,7 @@ Index: src/pr.c output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2199,7 +2325,7 @@ print_white_space (void) +@@ -2207,7 +2333,7 @@ print_white_space (void) while (goal - h_old > 1 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) { @@ -2553,7 +2558,7 @@ Index: src/pr.c h_old = h_new; } while (++h_old <= goal) -@@ -2219,6 +2345,7 @@ print_sep_string (void) +@@ -2227,6 +2353,7 @@ print_sep_string (void) { char const *s = col_sep_string; int l = col_sep_length; @@ -2561,7 +2566,7 @@ Index: src/pr.c if (separators_not_printed <= 0) { -@@ -2230,6 +2357,7 @@ print_sep_string (void) +@@ -2238,6 +2365,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -2569,7 +2574,7 @@ Index: src/pr.c while (l-- > 0) { /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2243,12 +2371,15 @@ print_sep_string (void) +@@ -2251,12 +2379,15 @@ print_sep_string (void) } else { @@ -2586,7 +2591,7 @@ Index: src/pr.c /* sep_string ends with some spaces */ if (spaces_not_printed > 0) print_white_space (); -@@ -2276,7 +2407,7 @@ print_clump (COLUMN *p, int n, char *clu +@@ -2284,7 +2415,7 @@ print_clump (COLUMN *p, int n, char *clu required number of tabs and spaces. */ static void @@ -2595,7 +2600,7 @@ Index: src/pr.c { if (tabify_output) { -@@ -2300,6 +2431,74 @@ print_char (char c) +@@ -2308,6 +2439,74 @@ print_char (char c) putchar (c); } @@ -2670,7 +2675,7 @@ Index: src/pr.c /* Skip to page PAGE before printing. PAGE may be larger than total number of pages. */ -@@ -2477,9 +2676,9 @@ read_line (COLUMN *p) +@@ -2485,9 +2684,9 @@ read_line (COLUMN *p) align_empty_cols = false; } @@ -2682,7 +2687,7 @@ Index: src/pr.c padding_not_printed = ANYWHERE; } -@@ -2548,7 +2747,7 @@ print_stored (COLUMN *p) +@@ -2556,7 +2755,7 @@ print_stored (COLUMN *p) COLUMN *q; int line = p->current_line++; @@ -2691,7 +2696,7 @@ Index: src/pr.c /* FIXME UMR: Uninitialized memory read: * This is occurring while in: -@@ -2560,7 +2759,7 @@ print_stored (COLUMN *p) +@@ -2568,7 +2767,7 @@ print_stored (COLUMN *p) xmalloc [xmalloc.c:94] init_store_cols [pr.c:1648] */ @@ -2700,7 +2705,7 @@ Index: src/pr.c pad_vertically = true; -@@ -2580,9 +2779,9 @@ print_stored (COLUMN *p) +@@ -2588,9 +2787,9 @@ print_stored (COLUMN *p) } } @@ -2712,7 +2717,7 @@ Index: src/pr.c padding_not_printed = ANYWHERE; } -@@ -2595,8 +2794,8 @@ print_stored (COLUMN *p) +@@ -2603,8 +2802,8 @@ print_stored (COLUMN *p) if (spaces_not_printed == 0) { output_position = p->start_position + end_vector[line]; @@ -2723,7 +2728,7 @@ Index: src/pr.c } return true; -@@ -2615,7 +2814,7 @@ print_stored (COLUMN *p) +@@ -2623,7 +2822,7 @@ print_stored (COLUMN *p) number of characters is 1.) */ static int @@ -2732,7 +2737,7 @@ Index: src/pr.c { unsigned char uc = c; char *s = clump_buff; -@@ -2625,10 +2824,10 @@ char_to_clump (char c) +@@ -2633,10 +2832,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8; @@ -2745,7 +2750,7 @@ Index: src/pr.c { width = TAB_WIDTH (chars_per_c, input_position); -@@ -2709,6 +2908,164 @@ char_to_clump (char c) +@@ -2717,6 +2916,164 @@ char_to_clump (char c) return chars; } @@ -3034,7 +3039,7 @@ Index: src/sort.c /* Clean up any remaining temporary files. */ static void -@@ -1270,7 +1341,7 @@ zaptemp (char const *name) +@@ -1269,7 +1340,7 @@ zaptemp (char const *name) free (node); } @@ -3043,7 +3048,7 @@ Index: src/sort.c static int struct_month_cmp (void const *m1, void const *m2) -@@ -1285,7 +1356,7 @@ struct_month_cmp (void const *m1, void c +@@ -1284,7 +1355,7 @@ struct_month_cmp (void const *m1, void c /* Initialize the character class tables. */ static void @@ -3052,7 +3057,7 @@ Index: src/sort.c { size_t i; -@@ -1297,7 +1368,7 @@ inittables (void) +@@ -1296,7 +1367,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -3061,7 +3066,7 @@ Index: src/sort.c /* If we're not in the "C" locale, read different names for months. */ if (hard_LC_TIME) { -@@ -1379,6 +1450,84 @@ specify_nmerge (int oi, char c, char con +@@ -1378,6 +1449,84 @@ specify_nmerge (int oi, char c, char con xstrtol_fatal (e, oi, c, long_options, s); } @@ -3146,7 +3151,7 @@ Index: src/sort.c /* Specify the amount of main memory to use when sorting. */ static void specify_sort_size (int oi, char c, char const *s) -@@ -1610,7 +1759,7 @@ buffer_linelim (struct buffer const *buf +@@ -1609,7 +1758,7 @@ buffer_linelim (struct buffer const *buf by KEY in LINE. */ static char * @@ -3155,7 +3160,7 @@ Index: src/sort.c { char *ptr = line->text, *lim = ptr + line->length - 1; size_t sword = key->sword; -@@ -1619,10 +1768,10 @@ begfield (struct line const *line, struc +@@ -1618,10 +1767,10 @@ begfield (struct line const *line, struc /* The leading field separator itself is included in a field when -t is absent. */ @@ -3168,7 +3173,7 @@ Index: src/sort.c ++ptr; if (ptr < lim) ++ptr; -@@ -1648,11 +1797,70 @@ begfield (struct line const *line, struc +@@ -1647,11 +1796,70 @@ begfield (struct line const *line, struc return ptr; } @@ -3234,13 +3239,13 @@ Index: src/sort.c /* Return the limit of (a pointer to the first character after) the field in LINE specified by KEY. */ - static char * + static char * _GL_ATTRIBUTE_PURE -limfield (struct line const *line, struct keyfield const *key) -+limfield_uni (const struct line *line, const struct keyfield *key) ++limfield_uni (struct line const *line, struct keyfield const *key) { char *ptr = line->text, *lim = ptr + line->length - 1; size_t eword = key->eword, echar = key->echar; -@@ -1667,10 +1875,10 @@ limfield (struct line const *line, struc +@@ -1666,10 +1874,10 @@ limfield (struct line const *line, struc 'beginning' is the first character following the delimiting TAB. Otherwise, leave PTR pointing at the first 'blank' character after the preceding field. */ @@ -3253,7 +3258,7 @@ Index: src/sort.c ++ptr; if (ptr < lim && (eword || echar)) ++ptr; -@@ -1716,10 +1924,10 @@ limfield (struct line const *line, struc +@@ -1715,10 +1923,10 @@ limfield (struct line const *line, struc */ /* Make LIM point to the end of (one byte past) the current field. */ @@ -3266,12 +3271,12 @@ Index: src/sort.c if (newlim) lim = newlim; } -@@ -1750,6 +1958,130 @@ limfield (struct line const *line, struc +@@ -1749,6 +1957,130 @@ limfield (struct line const *line, struc return ptr; } +#if HAVE_MBRTOWC -+static char * ++static char * _GL_ATTRIBUTE_PURE +limfield_mb (const struct line *line, const struct keyfield *key) +{ + char *ptr = line->text, *lim = ptr + line->length - 1; @@ -3397,7 +3402,7 @@ Index: src/sort.c /* Fill BUF reading from FP, moving buf->left bytes from the end of buf->buf to the beginning first. If EOF is reached and the file wasn't terminated by a newline, supply one. Set up BUF's line -@@ -1836,8 +2168,22 @@ fillbuf (struct buffer *buf, FILE *fp, c +@@ -1835,8 +2167,22 @@ fillbuf (struct buffer *buf, FILE *fp, c else { if (key->skipsblanks) @@ -3422,7 +3427,7 @@ Index: src/sort.c line->keybeg = line_start; } } -@@ -1971,12 +2317,10 @@ find_unit_order (char const *number) +@@ -1970,12 +2316,10 @@ find_unit_order (char const *number) < K/k < M < G < T < P < E < Z < Y */ static int @@ -3438,7 +3443,7 @@ Index: src/sort.c int diff = find_unit_order (a) - find_unit_order (b); return (diff ? diff : strnumcmp (a, b, decimal_point, thousands_sep)); -@@ -1987,7 +2331,7 @@ human_numcompare (char const *a, char co +@@ -1986,7 +2330,7 @@ human_numcompare (char const *a, char co hideously fast. */ static int @@ -3447,7 +3452,7 @@ Index: src/sort.c { while (blanks[to_uchar (*a)]) a++; -@@ -1997,6 +2341,25 @@ numcompare (char const *a, char const *b +@@ -1996,6 +2340,25 @@ numcompare (char const *a, char const *b return strnumcmp (a, b, decimal_point, thousands_sep); } @@ -3473,7 +3478,7 @@ Index: src/sort.c /* Work around a problem whereby the long double value returned by glibc's strtold ("NaN", ...) contains uninitialized bits: clear all bytes of A and B before calling strtold. FIXME: remove this function if -@@ -2047,7 +2410,7 @@ general_numcompare (char const *sa, char +@@ -2046,7 +2409,7 @@ general_numcompare (char const *sa, char Return 0 if the name in S is not recognized. */ static int @@ -3482,7 +3487,7 @@ Index: src/sort.c { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -2323,15 +2686,14 @@ debug_key (struct line const *line, stru +@@ -2322,15 +2685,14 @@ debug_key (struct line const *line, stru char saved = *lim; *lim = '\0'; @@ -3500,7 +3505,7 @@ Index: src/sort.c else if (key->general_numeric) ignore_value (strtold (beg, &tighter_lim)); else if (key->numeric || key->human_numeric) -@@ -2465,7 +2827,7 @@ key_warnings (struct keyfield const *gke +@@ -2464,7 +2826,7 @@ key_warnings (struct keyfield const *gke /* Warn about significant leading blanks. */ bool implicit_skip = key_numeric (key) || key->month; bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */ @@ -3509,7 +3514,7 @@ Index: src/sort.c && ((!key->skipsblanks && !implicit_skip) || (!key->skipsblanks && key->schar) || (!key->skipeblanks && key->echar))) -@@ -2523,11 +2885,87 @@ key_warnings (struct keyfield const *gke +@@ -2522,11 +2884,87 @@ key_warnings (struct keyfield const *gke error (0, 0, _("option '-r' only applies to last-resort comparison")); } @@ -3598,7 +3603,7 @@ Index: src/sort.c { struct keyfield *key = keylist; -@@ -2612,7 +3050,7 @@ keycompare (struct line const *a, struct +@@ -2611,7 +3049,7 @@ keycompare (struct line const *a, struct else if (key->human_numeric) diff = human_numcompare (ta, tb); else if (key->month) @@ -3607,7 +3612,7 @@ Index: src/sort.c else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2728,6 +3166,211 @@ keycompare (struct line const *a, struct +@@ -2727,6 +3165,211 @@ keycompare (struct line const *a, struct return key->reverse ? -diff : diff; } @@ -3819,7 +3824,7 @@ Index: src/sort.c /* Compare two lines A and B, returning negative, zero, or positive depending on whether A compares less than, equal to, or greater than B. */ -@@ -2755,7 +3398,7 @@ compare (struct line const *a, struct li +@@ -2754,7 +3397,7 @@ compare (struct line const *a, struct li diff = - NONZERO (blen); else if (blen == 0) diff = 1; @@ -3828,7 +3833,7 @@ Index: src/sort.c { /* xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4145,6 +4788,7 @@ set_ordering (char const *s, struct keyf +@@ -4144,6 +4787,7 @@ set_ordering (char const *s, struct keyf break; case 'f': key->translate = fold_toupper; @@ -3836,7 +3841,7 @@ Index: src/sort.c break; case 'g': key->general_numeric = true; -@@ -4224,7 +4868,7 @@ main (int argc, char **argv) +@@ -4223,7 +4867,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -3845,7 +3850,7 @@ Index: src/sort.c hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4245,6 +4889,29 @@ main (int argc, char **argv) +@@ -4244,6 +4888,29 @@ main (int argc, char **argv) thousands_sep = -1; } @@ -3875,7 +3880,7 @@ Index: src/sort.c have_read_stdin = false; inittables (); -@@ -4519,13 +5186,34 @@ main (int argc, char **argv) +@@ -4518,13 +5185,34 @@ main (int argc, char **argv) case 't': { @@ -3914,7 +3919,7 @@ Index: src/sort.c else { /* Provoke with 'sort -txx'. Complain about -@@ -4536,9 +5224,11 @@ main (int argc, char **argv) +@@ -4535,9 +5223,11 @@ main (int argc, char **argv) quote (optarg)); } } @@ -3928,7 +3933,7 @@ Index: src/sort.c } break; -@@ -4767,12 +5457,10 @@ main (int argc, char **argv) +@@ -4766,12 +5456,10 @@ main (int argc, char **argv) sort (files, nfiles, outfile, nthreads); } @@ -3954,8 +3959,8 @@ Index: src/unexpand.c + #include "system.h" #include "die.h" - #include "xstrndup.h" -@@ -107,24 +110,47 @@ unexpand (void) + +@@ -106,24 +109,47 @@ unexpand (void) { /* Input stream. */ FILE *fp = next_file (NULL); @@ -4006,7 +4011,7 @@ Index: src/unexpand.c /* If true, perform translations. */ bool convert = true; -@@ -158,12 +184,44 @@ unexpand (void) +@@ -157,12 +183,44 @@ unexpand (void) do { @@ -4054,7 +4059,7 @@ Index: src/unexpand.c if (blank) { -@@ -180,16 +238,16 @@ unexpand (void) +@@ -179,16 +237,16 @@ unexpand (void) if (next_tab_column < column) die (EXIT_FAILURE, 0, _("input line is too long")); @@ -4074,7 +4079,7 @@ Index: src/unexpand.c if (! (prev_blank && column == next_tab_column)) { -@@ -197,13 +255,14 @@ unexpand (void) +@@ -196,13 +254,14 @@ unexpand (void) will be replaced by tabs. */ if (column == next_tab_column) one_blank_before_tab_stop = true; @@ -4091,7 +4096,7 @@ Index: src/unexpand.c } /* Discard pending blanks, unless it was a single -@@ -211,7 +270,7 @@ unexpand (void) +@@ -210,7 +269,7 @@ unexpand (void) pending = one_blank_before_tab_stop; } } @@ -4100,7 +4105,7 @@ Index: src/unexpand.c { /* Go back one column, and force recalculation of the next tab stop. */ -@@ -219,9 +278,9 @@ unexpand (void) +@@ -218,9 +277,9 @@ unexpand (void) next_tab_column = column; tab_index -= !!tab_index; } @@ -4112,7 +4117,7 @@ Index: src/unexpand.c if (!column) die (EXIT_FAILURE, 0, _("input line is too long")); } -@@ -229,8 +288,11 @@ unexpand (void) +@@ -228,8 +287,11 @@ unexpand (void) if (pending) { if (pending > 1 && one_blank_before_tab_stop) @@ -4126,7 +4131,7 @@ Index: src/unexpand.c die (EXIT_FAILURE, errno, _("write error")); pending = 0; one_blank_before_tab_stop = false; -@@ -240,16 +302,17 @@ unexpand (void) +@@ -239,16 +301,17 @@ unexpand (void) convert &= convert_entire_line || blank; } @@ -4538,7 +4543,7 @@ Index: tests/local.mk =================================================================== --- tests/local.mk.orig +++ tests/local.mk -@@ -369,6 +369,8 @@ all_tests = \ +@@ -375,6 +375,8 @@ all_tests = \ tests/misc/sort-discrim.sh \ tests/misc/sort-files0-from.pl \ tests/misc/sort-float.sh \ @@ -4547,7 +4552,7 @@ Index: tests/local.mk tests/misc/sort-h-thousands-sep.sh \ tests/misc/sort-merge.pl \ tests/misc/sort-merge-fdlimit.sh \ -@@ -567,6 +569,7 @@ all_tests = \ +@@ -573,6 +575,7 @@ all_tests = \ tests/du/threshold.sh \ tests/du/trailing-slash.sh \ tests/du/two-args.sh \ @@ -4555,7 +4560,7 @@ Index: tests/local.mk tests/id/gnu-zero-uids.sh \ tests/id/no-context.sh \ tests/id/context.sh \ -@@ -714,6 +717,7 @@ all_tests = \ +@@ -724,6 +727,7 @@ all_tests = \ tests/touch/read-only.sh \ tests/touch/relative.sh \ tests/touch/trailing-slash.sh \ @@ -5104,9 +5109,9 @@ Index: tests/pr/pr-tests.pl my @tv = ( # -b option is no longer an official option. But it's still working to -@@ -474,8 +483,48 @@ push @Tests, - {IN=>{2=>"a\n"}}, - {OUT=>"a\t\t\t\t \t\t\ta\n"} ]; +@@ -512,8 +521,48 @@ push @Tests, + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx\tx\tx\tx\tx\tx\n"} ]; +# Add _POSIX2_VERSION=199209 to the environment of each test +# that uses an old-style option like +1. @@ -5330,3 +5335,17 @@ Index: tests/unexpand/mb.sh + +LC_ALL=C unexpand in in > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 +Index: tests/Coreutils.pm +=================================================================== +--- tests/Coreutils.pm.orig ++++ tests/Coreutils.pm +@@ -264,6 +264,9 @@ sub run_tests ($$$$$) + # Yes, this is an arbitrary limit. If it causes trouble, + # consider removing it. + my $max = 30; ++ # The downstream i18n multi-byte tests have a "-mb" suffix. ++ # Therefore add 3 to the maximum test name length. ++ $max += 3; + if ($max < length $test_name) + { + warn "$program_name: $test_name: test name is too long (> $max)\n"; diff --git a/coreutils-invalid-ids.patch b/coreutils-invalid-ids.patch index 731565d..f01f7f3 100644 --- a/coreutils-invalid-ids.patch +++ b/coreutils-invalid-ids.patch @@ -19,7 +19,7 @@ Index: src/chgrp.c =================================================================== --- src/chgrp.c.orig +++ src/chgrp.c -@@ -89,7 +89,7 @@ parse_group (const char *name) +@@ -89,7 +89,7 @@ parse_group (char const *name) { uintmax_t tmp; if (! (xstrtoumax (name, NULL, 10, &tmp, "") == LONGINT_OK diff --git a/coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch b/coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch deleted file mode 100644 index ac4f6b7..0000000 --- a/coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch +++ /dev/null @@ -1,156 +0,0 @@ -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 -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 -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 - (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 - #endif - --#ifdef __linux__ --# include --#endif -- - #include - #include - #include -@@ -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 diff --git a/coreutils-misc.patch b/coreutils-misc.patch index 63c6008..ce4873c 100644 --- a/coreutils-misc.patch +++ b/coreutils-misc.patch @@ -37,7 +37,7 @@ Index: tests/misc/help-version.sh =================================================================== --- tests/misc/help-version.sh.orig +++ tests/misc/help-version.sh -@@ -239,6 +239,7 @@ parted_setup () { args="-s $tmp_in mklab +@@ -240,6 +240,7 @@ parted_setup () { args="-s $tmp_in mklab for i in $built_programs; do # Skip these. case $i in chroot|stty|tty|false|chcon|runcon|coreutils) continue;; esac @@ -58,4 +58,4 @@ Index: tests/other-fs-tmpdir + if test -z "$other_partition_tmpdir"; then skip_ \ - "requires a writable directory on a different disk partition, + "requires a writable directory on a different file system, diff --git a/coreutils-remove_hostname_documentation.patch b/coreutils-remove_hostname_documentation.patch index 39211ae..b82534d 100644 --- a/coreutils-remove_hostname_documentation.patch +++ b/coreutils-remove_hostname_documentation.patch @@ -31,7 +31,7 @@ Index: doc/coreutils.texi * hostid invocation:: Print numeric host identifier * uptime invocation:: Print system uptime and load -@@ -15761,7 +15759,6 @@ information. +@@ -15947,7 +15945,6 @@ information. * arch invocation:: Print machine hardware name. * nproc invocation:: Print the number of processors. * uname invocation:: Print system information. @@ -39,7 +39,7 @@ Index: doc/coreutils.texi * hostid invocation:: Print numeric host identifier. * uptime invocation:: Print system uptime and load. @end menu -@@ -16623,15 +16620,6 @@ Note this is non-portable (even across G +@@ -16804,15 +16801,6 @@ Note this is non-portable (even across G Print the machine hardware name (sometimes called the hardware class or hardware type). @@ -55,7 +55,7 @@ Index: doc/coreutils.texi @item -p @itemx --processor @opindex -p -@@ -16685,34 +16673,6 @@ Print the kernel version. +@@ -16866,34 +16854,6 @@ Print the kernel version. @exitstatus diff --git a/coreutils-remove_kill_documentation.patch b/coreutils-remove_kill_documentation.patch index ee1089b..cc671bc 100644 --- a/coreutils-remove_kill_documentation.patch +++ b/coreutils-remove_kill_documentation.patch @@ -33,9 +33,9 @@ Index: doc/coreutils.texi Delaying * sleep invocation:: Delay for a specified time -@@ -18089,90 +18083,6 @@ the exit status of @var{command} otherwi - @end display - +@@ -18310,90 +18304,6 @@ timeout -s INT 5s env --ignore-signal=IN + timeout -s INT -k 3s 5s env --ignore-signal=INT sleep 20 + @end example -@node Process control -@chapter Process control diff --git a/coreutils-skip-gnulib-test-tls.patch b/coreutils-skip-gnulib-test-tls.patch index f951565..b166d4c 100644 --- a/coreutils-skip-gnulib-test-tls.patch +++ b/coreutils-skip-gnulib-test-tls.patch @@ -21,7 +21,7 @@ Index: gnulib-tests/gnulib.mk =================================================================== --- gnulib-tests/gnulib.mk.orig +++ gnulib-tests/gnulib.mk -@@ -2485,9 +2485,10 @@ EXTRA_DIST += test-timespec.c macros.h +@@ -2615,9 +2615,10 @@ EXTRA_DIST += test-timespec.c macros.h ## begin gnulib module tls-tests diff --git a/coreutils-skip-tests-rm-ext3-perf.patch b/coreutils-skip-tests-rm-ext3-perf.patch new file mode 100644 index 0000000..4693780 --- /dev/null +++ b/coreutils-skip-tests-rm-ext3-perf.patch @@ -0,0 +1,23 @@ +# Downstream patch to skip a test failing on OBS. +# tests: skip tests/rm/ext3-perf.sh temporarily as it hangs on OBS +# (but otherwise is known to work locally). +--- + tests/rm/ext3-perf.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +Index: tests/rm/ext3-perf.sh +=================================================================== +--- tests/rm/ext3-perf.sh.orig ++++ tests/rm/ext3-perf.sh +@@ -19,6 +19,11 @@ + . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src + print_ver_ rm + ++# Skip this test: it's known to work locally (and it was working for a long ++# time on OBS), but it started to fail in Sep 2021 on OBS - seemingly on all ++# platforms (i586, x84_64, ppc64le, ppc64, aarch64, s390x). ++skip_ "SUSE: disabled for now as known to be failing on OBS" ++ + very_expensive_ + + # In a circa 2008 benchmark, using rm -rf to remove a 400k-entry directory took: diff --git a/coreutils-tests-fix-FP-in-ls-stat-free-color.patch b/coreutils-tests-fix-FP-in-ls-stat-free-color.patch deleted file mode 100644 index 0f4aec4..0000000 --- a/coreutils-tests-fix-FP-in-ls-stat-free-color.patch +++ /dev/null @@ -1,46 +0,0 @@ -Upstream patch to avoid FP in testsuite. -Remove with coreutils version > 8.32. - -Discussed at: - https://lists.gnu.org/r/coreutils/2021-04/msg00050.html -Upstream patch: - https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=b7091093bb - -From b7091093bb6505c33279f9bc940b2e94763a6e5d Mon Sep 17 00:00:00 2001 -From: Bernhard Voelker -Date: Wed, 21 Apr 2021 00:12:00 +0200 -Subject: [PATCH] tests: fix FP in ls/stat-free-color.sh - -On newer systems like Fedora 34 and openSUSE Tumbleweed, ls(1) calls -newfstatat(STDOUT_FILENO, ...), but only when there is something to -output. - -* tests/ls/stat-free-color.sh: Add -a option to the reference invocation -of ls, thus enforcing something gets output. ---- - tests/ls/stat-free-color.sh | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -Index: tests/ls/stat-free-color.sh -=================================================================== ---- tests/ls/stat-free-color.sh.orig -+++ tests/ls/stat-free-color.sh -@@ -56,12 +56,14 @@ eval $(dircolors -b color-without-stat) - # The system may perform additional stat-like calls before main. - # Furthermore, underlying library functions may also implicitly - # add an extra stat call, e.g. opendir since glibc-2.21-360-g46f894d. --# To avoid counting those, first get a baseline count for running --# ls with one empty directory argument. Then, compare that with the --# invocation under test. -+# Finally, ls(1) makes a stat call for stdout, but only in the case -+# when there is something to output. -+# To get the comparison right, first get a baseline count for running -+# 'ls -a' with one empty directory argument. Then, compare that with -+# the invocation under test. - mkdir d || framework_failure_ - --strace -q -o log1 -e $stats ls --color=always d || fail=1 -+strace -q -o log1 -e $stats ls -a --color=always d || fail=1 - n_stat1=$(grep -vF '+++' log1 | wc -l) || framework_failure_ - - test $n_stat1 = 0 \ diff --git a/coreutils-tests-shorten-extreme-factor-tests.patch b/coreutils-tests-shorten-extreme-factor-tests.patch index c21c21b..17f1e38 100644 --- a/coreutils-tests-shorten-extreme-factor-tests.patch +++ b/coreutils-tests-shorten-extreme-factor-tests.patch @@ -16,7 +16,7 @@ Index: tests/local.mk =================================================================== --- tests/local.mk.orig +++ tests/local.mk -@@ -723,14 +723,9 @@ all_tests = \ +@@ -733,14 +733,9 @@ all_tests = \ # See tests/factor/create-test.sh. tf = tests/factor factor_tests = \ diff --git a/coreutils-use-python3.patch b/coreutils-use-python3.patch index 1cbb22a..80a2db8 100644 --- a/coreutils-use-python3.patch +++ b/coreutils-use-python3.patch @@ -1,4 +1,6 @@ ---- tests/du/move-dir-while-traversing.sh +Index: tests/du/move-dir-while-traversing.sh +=================================================================== +--- tests/du/move-dir-while-traversing.sh.orig +++ tests/du/move-dir-while-traversing.sh @@ -20,9 +20,9 @@ print_ver_ du @@ -13,7 +15,7 @@ # Move a directory "up" while du is processing its sub-directories. # While du is processing a hierarchy .../B/C/D/... this script -@@ -33,7 +33,7 @@ +@@ -33,7 +33,7 @@ python -m pyinotify -h > /dev/null \ # rename syscall before du finishes processing the subtree under D/. cat <<'EOF' > inotify-watch-for-dir-access.py diff --git a/coreutils.changes b/coreutils.changes index 27514df..104a36c 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,174 @@ +------------------------------------------------------------------- +Thu Sep 30 18:41:30 UTC 2021 - Bernhard Voelker + +- coreutils-skip-tests-rm-ext3-perf.patch: Add patch to skip the test + 'tests/rm/ext3-perf.sh' temporarily as it hangs on OBS. + +------------------------------------------------------------------- +Sun Sep 26 15:15:00 UTC 2021 - Bernhard Voelker + +- Update to 8.32: + * Noteworthy changes in release 9.0 (2021-09-24) [stable] + + ** Bug fixes + + chmod -v no longer misreports modes of dangling symlinks. + [bug introduced in coreutils-5.3.0] + + cp -a --attributes-only now never removes destination files, + even if the destination files are hardlinked, or the source + is a non regular file. + [bug introduced in coreutils-8.6] + + csplit --suppress-matched now elides the last matched line + when a specific number of pattern matches are performed. + [bug introduced with the --suppress-matched feature in coreutils-8.22] + + df no longer outputs duplicate remote mounts in the presence of bind mounts. + [bug introduced in coreutils-8.26] + + df no longer mishandles command-line args that it pre-mounts + [bug introduced in coreutils-8.29] + + du no longer crashes on XFS file systems when the directory hierarchy is + heavily changed during the run. + [bug introduced in coreutils-8.25] + + env -S no longer crashes when given unusual whitespace characters + [bug introduced in coreutils-8.30] + + expr no longer mishandles unmatched \(...\) in regular expressions. + [bug introduced in coreutils-6.0] + + ls no longer crashes when printing the SELinux context for unstatable files. + [bug introduced in coreutils-6.9.91] + + mkdir -m no longer mishandles modes more generous than the umask. + [bug introduced in coreutils-8.22] + + nl now handles single character --section-delimiter arguments, + by assuming a second ':' character has been specified, as specified by POSIX. + [This bug was present in "the beginning".] + + pr again adjusts tabs in input, to maintain alignment in multi column output. + [bug introduced in coreutils-6.9] + + rm no longer skips an extra file when the removal of an empty directory fails. + [bug introduced by the rewrite to use fts in coreutils-8.0] + + split --number=K/N will again correctly split chunk K of N to stdout. + Previously a chunk starting after 128KiB, output the wrong part of the file. + [bug introduced in coreutils-8.26] + + tail -f no longer overruns a stack buffer when given too many files + to follow and ulimit -n exceeds 1024. + [bug introduced in coreutils-7.5] + + tr no longer crashes when using --complement with certain + invalid combinations of case character classes. + [bug introduced in coreutils-8.6] + + basenc --base64 --decode no longer silently discards decoded characters + on (1024*5) buffer boundaries + [bug introduced in coreutils-8.31] + + ** Changes in behavior + + cp and install now default to copy-on-write (COW) if available. + + cp, install and mv now use the copy_file_range syscall if available. + Also, they use lseek+SEEK_HOLE rather than ioctl+FS_IOC_FIEMAP on sparse + files, as lseek is simpler and more portable. + + On GNU/Linux systems, ls no longer issues an error message on a + directory merely because it was removed. This reverts a change + that was made in release 8.32. + + ptx -T no longer attempts to substitute old-fashioned TeX escapes + for 8-bit non-ASCII alphabetic characters. TeX indexes should + instead use '\usepackage[latin1]{inputenc}' or equivalent. + + stat will use decomposed (major,minor) device numbers in its default format. + This is less ambiguous, and more consistent with ls. + + sum [-r] will output a file name, even if only a single name is passed. + This is consistent with sum -s, cksum, and other sum(1) implementations. + + ** New Features + + cksum now supports the -a (--algorithm) option to select any + of the existing sum, md5sum, b2sum, sha*sum implementations etc. + cksum now subsumes all of these programs, and coreutils + will introduce no future standalone checksum utility. + + cksum -a now supports the 'sm3' argument, to use the SM3 digest algorithm. + + cksum --check now supports auto detecting the digest type to use, + when verifying tagged format checksums. + + expr and factor now support bignums on all platforms. + + ls --classify now supports the "always", "auto", or "never" flags, + to support only outputting classifier characters if connected to a tty. + + ls now accepts the --sort=width option, to sort by file name width. + This is useful to more compactly organize the default vertical column output. + + ls now accepts the --zero option, to terminate each output line with + NUL instead of newline. + + nl --line-increment can now take a negative number to decrement the count. + + stat supports more formats for representing decomposed device numbers. + %Hd,%Ld and %Hr,%Lr will output major,minor device numbers and device types + respectively. %d corresponds to st_dev and %r to std_rdev. + + ** Improvements + + cat --show-ends will now show \r\n as ^M$. Previously the \r was taken + literally, thus overwriting the first character in the line with '$'. + + cksum [-a crc] is now up to 4 times faster by using a slice by 8 algorithm, + and at least 8 times faster where pclmul instructions are supported. + A new --debug option will indicate if pclmul is being used. + + md5sum --check now supports checksum files with CRLF line endings. + This also applies to cksum, sha*sum, and b2sum. + + df now recognizes these file systems as remote: + acfs, coda, fhgfs, gpfs, ibrix, ocfs2, and vxfs. + + rmdir now clarifies the error if a symlink_to_dir/ has not been traversed. + This is the case on GNU/Linux systems, where the trailing slash is ignored. + + stat and tail now know about the "devmem", "exfat", "secretmem", "vboxsf", + and "zonefs" file system types. stat -f -c%T now reports the file system + type, and tail -f uses polling for "vboxsf" and inotify for the others. + + timeout now supports sub-second timeouts on macOS. + + wc is up to 5 times faster when counting only new line characters, + where avx2 instructions are supported. + A new --debug option will indicate if avx2 is being used. + +- Remove patches which are included in the new upstream version now: + * coreutils-gnulib-disable-test-float.patch + * coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch + * coreutils-tests-fix-FP-in-ls-stat-free-color.patch + * gnulib-test-avoid-FP-perror-strerror.patch + +- coreutils-i18n.patch: Refresh patch. Also patch 'tests/Coreutils.pm' used + by perl-based tests to allow longer test names ... which the i18n tests with + their "-mb" suffix have. + +- coreutils-chmod-fix-exit-status-ign-symlinks.patch: Add upstream patch to + fix a regression with the exit code of chmod introduced in 9.0. + +- coreutils.spec: + * Version: bump version. + * Remove the above removed patches. + * Reference the above new patch. + ------------------------------------------------------------------- Thu Apr 29 16:21:49 UTC 2021 - Callum Farmer diff --git a/coreutils.spec b/coreutils.spec index ecfd5fa..ccac039 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,5 +1,5 @@ # -# spec file for package coreutils%{?name_suffix} +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -34,7 +34,7 @@ Summary: GNU Core Utilities License: GPL-3.0-or-later Group: System/Base URL: https://www.gnu.org/software/coreutils/ -Version: 8.32 +Version: 9.0 Release: 0 BuildRequires: automake @@ -132,20 +132,12 @@ Patch304: coreutils-use-python3.patch Patch500: coreutils-disable_tests.patch Patch501: coreutils-test_without_valgrind.patch -# 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. -Patch800: coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch +# Upstream patch - remove with version >9.0: +# chmod: fix exit status when ignoring symlinks +Patch800: coreutils-chmod-fix-exit-status-ign-symlinks.patch -Patch820: coreutils-gnulib-disable-test-float.patch - -# Avoid FP error in gnulib tests 'test-perror2' and 'test-strerror_r'. -Patch840: gnulib-test-avoid-FP-perror-strerror.patch - -# Upstream patch - remove with version >8.32: -# avoid FP error in 'tests/ls/stat-free-color.sh'. -Patch860: coreutils-tests-fix-FP-in-ls-stat-free-color.patch +# tests: skip tests/rm/ext3-perf.sh temporarily as it hangs on OBS. +Patch810: coreutils-skip-tests-rm-ext3-perf.patch # ================================================ %description @@ -166,8 +158,8 @@ the GNU fileutils, sh-utils, and textutils packages. Summary: Documentation for the GNU Core Utilities Group: Documentation/Man Provides: coreutils:%{_infodir}/coreutils.info.gz -Supplements: (coreutils-single and patterns-base-documentation) Supplements: (coreutils and patterns-base-documentation) +Supplements: (coreutils-single and patterns-base-documentation) BuildArch: noarch %description doc @@ -202,14 +194,7 @@ This package contains the documentation for the GNU Core Utilities. %patch501 %patch800 - -%ifarch ppc ppc64le -# Disable gnulib test 'test-float' temporarily as it fails on ppc and ppc64le. -%patch820 -%endif - -%patch840 -%patch860 +%patch810 # ================================================ %build diff --git a/gnulib-test-avoid-FP-perror-strerror.patch b/gnulib-test-avoid-FP-perror-strerror.patch deleted file mode 100644 index 482a45d..0000000 --- a/gnulib-test-avoid-FP-perror-strerror.patch +++ /dev/null @@ -1,101 +0,0 @@ -Avoid false-positive error in gnulib tests 'test-perror2' and 'test-strerror_r'. - -On openSUSE OBS, the above gnulib tests fail on armv7l. - -Corresponding report on the gnulib mailing list: - - https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html - - From: Florian Weimer - Date: Thu, 27 Aug 2020 09:41:34 +0200 - Subject: Use-after-free in test-perror2, test-strerror_r - - The problem is visible with glibc 2.32 under valgrind: - - ==20== Invalid read of size 1 - ==20== at 0x483DAB4: strcmp (vg_replace_strmem.c:847) - ==20== by 0x109414: main (test-perror2.c:84) - ==20== Address 0x4a1a3d0 is 0 bytes inside a block of size 17 free'd - ==20== at 0x483A9F5: free (vg_replace_malloc.c:538) - ==20== by 0x48E2134: strerror_l (in /usr/lib64/libc-2.32.so) - ==20== by 0x109328: main (test-perror2.c:72) - ==20== Block was alloc'd at - ==20== at 0x4839809: malloc (vg_replace_malloc.c:307) - ==20== by 0x48CA03F: __vasprintf_internal (in /usr/lib64/libc-2.32.so) - ==20== by 0x48A46F9: asprintf (in /usr/lib64/libc-2.32.so) - ==20== by 0x48E2184: strerror_l (in /usr/lib64/libc-2.32.so) - ==20== by 0x1092E2: main (test-perror2.c:67) - ==20== - ==20== Invalid read of size 1 - ==20== at 0x483DAC8: strcmp (vg_replace_strmem.c:847) - ==20== by 0x109414: main (test-perror2.c:84) - ==20== Address 0x4a1a3d1 is 1 bytes inside a block of size 17 free'd - ==20== at 0x483A9F5: free (vg_replace_malloc.c:538) - ==20== by 0x48E2134: strerror_l (in /usr/lib64/libc-2.32.so) - ==20== by 0x109328: main (test-perror2.c:72) - ==20== Block was alloc'd at - ==20== at 0x4839809: malloc (vg_replace_malloc.c:307) - ==20== by 0x48CA03F: __vasprintf_internal (in /usr/lib64/libc-2.32.so) - ==20== by 0x48A46F9: asprintf (in /usr/lib64/libc-2.32.so) - ==20== by 0x48E2184: strerror_l (in /usr/lib64/libc-2.32.so) - ==20== by 0x1092E2: main (test-perror2.c:67) - - I think it's the test that's invalid. - - This was reported as an actual grep test failure (without valgrind) on - 32-bit Arm, where glibc malloc happens to return a different buffer - address for the internal allocation (so that msg3 != msg4). - - test-strerror_r has the same issue. - - Thanks, - Florian - -Upstream patch: - - https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=175e0bc72808 - - From 175e0bc72808d564074c4adcc72aeadb74adfcc6 Mon Sep 17 00:00:00 2001 - From: Paul Eggert - Date: Thu, 27 Aug 2020 17:52:58 -0700 - Subject: [PATCH] perror, strerror_r: remove unportable tests - - Problem reported by Florian Weimer in: - https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html - * tests/test-perror2.c (main): - * tests/test-strerror_r.c (main): Omit unportable tests. - -This downstream patch is identical to upstream one modulo the ChangeLog entry. ---- - gnulib-tests/test-perror2.c | 3 --- - gnulib-tests/test-strerror_r.c | 3 --- - 2 files changed, 6 deletions(-) - -Index: gnulib-tests/test-perror2.c -=================================================================== ---- gnulib-tests/test-perror2.c.orig -+++ gnulib-tests/test-perror2.c -@@ -79,9 +79,6 @@ main (void) - errno = -5; - perror (""); - ASSERT (!ferror (stderr)); -- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); -- ASSERT (msg2 == msg4 || STREQ (msg2, str2)); -- ASSERT (msg3 == msg4 || STREQ (msg3, str3)); - ASSERT (STREQ (msg4, str4)); - - free (str1); -Index: gnulib-tests/test-strerror_r.c -=================================================================== ---- gnulib-tests/test-strerror_r.c.orig -+++ gnulib-tests/test-strerror_r.c -@@ -165,9 +165,6 @@ main (void) - - strerror_r (EACCES, buf, sizeof buf); - strerror_r (-5, buf, sizeof buf); -- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); -- ASSERT (msg2 == msg4 || STREQ (msg2, str2)); -- ASSERT (msg3 == msg4 || STREQ (msg3, str3)); - ASSERT (STREQ (msg4, str4)); - - free (str1);