From 0954d8e70f6b5e357c62c8cf89a7cd7fee6d3227cb977eebd4b3ea3bccdf6e9d Mon Sep 17 00:00:00 2001 From: Philipp Thomas Date: Thu, 9 Jul 2015 15:40:19 +0000 Subject: [PATCH 1/2] - Update to 8.24: ** Bug fixes * dd supports more robust SIGINFO/SIGUSR1 handling for outputting statistics. Previously those signals may have inadvertently terminated the process. * df --local no longer hangs with inaccessible remote mounts. [bug introduced in coreutils-8.21] * du now silently ignores all directory cycles due to bind mounts. Previously it would issue a warning and exit with a failure status. [bug introduced in coreutils-8.1 and partially fixed in coreutils-8.23] * chroot again calls chroot(DIR) and chdir("/"), even if DIR is "/". This handles separate bind mounted "/" trees, and environments depending on the implicit chdir("/"). [bugs introduced in coreutils-8.23] * cp no longer issues an incorrect warning about directory hardlinks when a source directory is specified multiple times. Now, consistent with other file types, a warning is issued for source directories with duplicate names, or with -H the directory is copied again using the symlink name. * factor avoids writing partial lines, thus supporting parallel operation. [the bug dates back to the initial implementation] * head, od, split, tac, tail, and wc no longer mishandle input from files in /proc and /sys file systems that report somewhat-incorrect file sizes. * mkdir --parents -Z now correctly sets the context for the last component, even if the parent directory exists and has a different default context. [bug introduced with the -Z restorecon functionality in coreutils-8.22] * numfmt no longer outputs incorrect overflowed values seen with certain large numbers, or with numbers with increased precision. [bug introduced when numfmt was added in coreutils-8.21] * numfmt now handles leading zeros correctly, not counting them when settings processing limits, and making them optional with floating point. [bug introduced when numfmt was added in coreutils-8.21] * paste no longer truncates output for large input files. This would happen for example with files larger than 4GiB on 32 bit systems with a '\n' character at the 4GiB position. [the bug dates back to the initial implementation] * rm indicates the correct number of arguments in its confirmation prompt, on all platforms. [bug introduced in coreutils-8.22] * shuf -i with a single redundant operand, would crash instead of issuing a diagnostic. [bug introduced in coreutils-8.22] * tail releases inotify resources when unused. Previously it could exhaust resources with many files, or with -F if files were replaced many times. [bug introduced in coreutils-7.5] * tail -f again follows changes to a file after it's renamed. [bug introduced in coreutils-7.5] * tail --follow no longer misses changes to files if those files were replaced before inotify watches were created. [bug introduced in coreutils-7.5] * tail --follow consistently outputs all data for a truncated file. [bug introduced in the beginning] * tail --follow=name correctly outputs headers for multiple files when those files are being created or renamed. [bug introduced in coreutils-7.5] ** New features * chroot accepts the new --skip-chdir option to not change the working directory to "/" after changing into the chroot(2) jail, thus retaining the current wor- king directory. The new option is only permitted if the new root directory is the old "/", and therefore is useful with the --group and --userspec options. * dd accepts a new status=progress level to print data transfer statistics on stderr approximately every second. * numfmt can now process multiple fields with field range specifications similar to cut, and supports setting the output precision with the --format option. * split accepts a new --separator option to select a record separator character other than the default newline character. * stty allows setting the "extproc" option where supported, which is a useful setting with high latency links. * sync no longer ignores arguments, and syncs each specified file, or with the --file-system option, the file systems associated with each specified file. * tee accepts a new --output-error option to control operation with pipes and output errors in general. ** Changes in behavior * df no longer suppresses separate exports of the same remote device, as these are generally explicitly mounted. The --total option does still suppress duplicate remote file systems. [suppression was introduced in coreutils-8.21] * mv no longer supports moving a file to a hardlink, instead issuing an error. The implementation was susceptible to races in the presence of multiple mv instances, which could result in both hardlinks being deleted. Also on case insensitive file systems like HFS, mv would just remove a hardlinked 'file' if called like `mv file File`. The feature was added in coreutils-5.0.1. * numfmt --from-unit and --to-unit options now interpret suffixes as SI units, and IEC (power of 2) units are now specified by appending 'i'. * tee will exit early if there are no more writable outputs. * tee does not treat the file operand '-' as meaning standard output any longer, for better conformance to POSIX. This feature was added in coreutils-5.3.0. * timeout --foreground no longer sends SIGCONT to the monitored process, which was seen to cause intermittent issues with GDB for example. ** Improvements * cp,install,mv will convert smaller runs of NULs in the input to holes, and cp --sparse=always avoids speculative preallocation on XFS for example. * cp will read sparse files more efficiently when the destination is a non regular file. For example when copying a disk image to a device node. * mv will try a reflink before falling back to a standard copy, which is more efficient when moving files across BTRFS subvolume boundaries. * stat and tail now know about IBRIX. stat -f --format=%T now reports the file system type, and tail -f uses polling for files on IBRIX file systems. * wc -l processes short lines much more efficiently. * References from --help and the man pages of utilities have been corrected in various cases, and more direct links to the corresponding online documentation are provided. - Patches adapted because of changed sources: coreutils-disable_tests.patch coreutils-i18n.patch coreutils-misc.patch coreutils-ocfs2_reflinks.patch coreutils-remove_hostname_documentation.patch coreutils-remove_kill_documentation.patch coreutils-skip-gnulib-test-tls.patch coreutils-tests-shorten-extreme-factor-tests.patch sort-keycompare-mb.patch - Patches removed because they're included in 8.24: coreutils-chroot-perform-chdir-unless-skip-chdir.patch coreutils-df-doc-df-a-includes-duplicate-file-systems.patch coreutils-df-improve-mount-point-selection.patch coreutils-df-show-all-remote-file-systems.patch coreutils-df-total-suppress-separate-remotes.patch coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch coreutils-fix_false_du_failure_on_newer_xfs.patch coreutils-fix-man-deps.patch coreutils-tests-aarch64-env.patch coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch coreutils-tests-rm-ext3-perf-increase-timeout.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=262 --- coreutils-8.23.tar.xz | 3 - coreutils-8.23.tar.xz.sig | 17 - coreutils-8.24.tar.xz | 3 + coreutils-8.24.tar.xz.sig | 17 + ...root-perform-chdir-unless-skip-chdir.patch | 455 ----------------- ...df-a-includes-duplicate-file-systems.patch | 65 --- ...ils-df-improve-mount-point-selection.patch | 67 --- ...tils-df-show-all-remote-file-systems.patch | 70 --- ...s-df-total-suppress-separate-remotes.patch | 250 ---------- coreutils-disable_tests.patch | 6 +- ...reference-to-info-nodes-in-man-pages.patch | 66 --- coreutils-fix-man-deps.patch | 17 - ...ls-fix_false_du_failure_on_newer_xfs.patch | 124 ----- coreutils-i18n.patch | 464 ++++++++---------- coreutils-misc.patch | 30 +- coreutils-ocfs2_reflinks.patch | 17 +- coreutils-remove_hostname_documentation.patch | 20 +- coreutils-remove_kill_documentation.patch | 10 +- coreutils-skip-gnulib-test-tls.patch | 6 +- coreutils-test_without_valgrind.patch | 4 +- coreutils-tests-aarch64-env.patch | 45 -- ...ify-rotate-more-robust-and-efficient.patch | 100 ---- ...-tests-rm-ext3-perf-increase-timeout.patch | 20 - ...s-tests-shorten-extreme-factor-tests.patch | 6 +- coreutils-testsuite.changes | 166 +++++++ coreutils-testsuite.spec | 46 +- coreutils.changes | 166 +++++++ coreutils.spec | 46 +- sort-keycompare-mb.patch | 31 +- 29 files changed, 628 insertions(+), 1709 deletions(-) delete mode 100644 coreutils-8.23.tar.xz delete mode 100644 coreutils-8.23.tar.xz.sig create mode 100644 coreutils-8.24.tar.xz create mode 100644 coreutils-8.24.tar.xz.sig delete mode 100644 coreutils-chroot-perform-chdir-unless-skip-chdir.patch delete mode 100644 coreutils-df-doc-df-a-includes-duplicate-file-systems.patch delete mode 100644 coreutils-df-improve-mount-point-selection.patch delete mode 100644 coreutils-df-show-all-remote-file-systems.patch delete mode 100644 coreutils-df-total-suppress-separate-remotes.patch delete mode 100644 coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch delete mode 100644 coreutils-fix-man-deps.patch delete mode 100644 coreutils-fix_false_du_failure_on_newer_xfs.patch delete mode 100644 coreutils-tests-aarch64-env.patch delete mode 100644 coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch delete mode 100644 coreutils-tests-rm-ext3-perf-increase-timeout.patch diff --git a/coreutils-8.23.tar.xz b/coreutils-8.23.tar.xz deleted file mode 100644 index d84a646..0000000 --- a/coreutils-8.23.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d -size 5375612 diff --git a/coreutils-8.23.tar.xz.sig b/coreutils-8.23.tar.xz.sig deleted file mode 100644 index 7f69073..0000000 --- a/coreutils-8.23.tar.xz.sig +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.15 (GNU/Linux) - -iQIcBAABAgAGBQJTyaijAAoJEN9v2XEwYDfZlPMP/jFS+l7u59zNRnPQfUrrcNmN -/mWwAEcxzGwZlyPQ9Fr6HrSryOKiPwmkmOnhsHbXjQZdi7MTd8A8TfQTLyZvLRvO -DJJ0HHqtGojLYFij01ZCtKHOIgry5VqhVHkauIp14+OW5+Bsd/bpfhwAMpNVqFPq -Txu5BvPBh6z/ouTdynuwthRv+iCbWRYvWDIaF1jdfhE1jLcIeZmdZ9xNxE7IDvsU -uSxQoLQrRybfEoqFNrOXc77n5O+JJnIbqpJAJk0QYugA3q2bgE6sdoEr/SUzZy+k -BkEdIfTdZrMMe2S91uh8WSLQrgS9bqD3YLdt75QTYV+d0fPOyfdSwLenMrqS62nV -SSJZNXY8zWTye79WWz0tyWoeosE+OE/xE3JNzjxPLy6q9BaoP3eKAMo//I0MH9uT -Ry+8gOu4BXkT7BMsTVRr3/mr2IIhlHEhjhDL6/ISTEB28fAwLge4a6okD6S1dTSD -YWKz9pzml72pFDo/XAntKsTmbMnHcw3z3IV62zlIErawO2LHSiEUyk11wUJs0dk8 -QVmFC6GP/zQ5qy9rHa3xogxdAU2K4ihtC3ZvaaZdU8TOxt/zJDb6rHsoRGuP+g3D -cB1HSepPVzt3rbb3tmA9AnXjIqmXN+Xp8ha5xTdqhHjVGQBzIs8kQIQnPV40mY43 -JS25ZfB2PCICITMbWyq7 -=fAoz ------END PGP SIGNATURE----- diff --git a/coreutils-8.24.tar.xz b/coreutils-8.24.tar.xz new file mode 100644 index 0000000..56306aa --- /dev/null +++ b/coreutils-8.24.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2d75286a4b9ef3a13039c2da3868a61be4ee9f17d8ae380a35a97e506972170 +size 5649896 diff --git a/coreutils-8.24.tar.xz.sig b/coreutils-8.24.tar.xz.sig new file mode 100644 index 0000000..1349c88 --- /dev/null +++ b/coreutils-8.24.tar.xz.sig @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJVlwFSAAoJEN9v2XEwYDfZ3IwP/3KOp/R3kHQMn4XKlecernhK +1iR0sh13gVhf4gVm/TbzLYmjSnWZzxQTs2WfyEZvbsm7pjKW0ulT7hqM81tKBkNH +7VpOUWVhvQUjwLGbV3lQsPrcshFejkWq3noHRIoTR6TsbwSyNqJ67wR/Ix+aDDBR +vfrCnG544+Dpl2RWF6bvib2+moWy+ztMghkiIONcqDg2KNhTB6V45CZ64Vw2S/1Z +88kSfd48D88wk06yKtoHck4A7DNqNLE+QHKbNy2BtTkvfT4x00XYRESPv/P1wKMk +n7mmJHx6idB3cvpm1vk0xiA8Xa3h1ot8w6a47NY48B8/UuwE6AROReWAwXAVOAvW +lInr4YP9YTYLAoUsH7RhrtFVUwIBZme6rbYeKvaU59LuVgQBL6eG5zHq5a45sCHg +8Bezfx5eXak4PClS36TguN350l5wbfBqiCxfqy05g+r0xYgTaFWKujmlP8c+8AN3 +nOaNle4LUioC6RIvoZu/h/nhwYl6/HIRt/dlZ5/TRvs+YKo58Y8lXAKcWixHfk7s +Rx/NZWOMwhdyKqjRDADflauzpI/YboGkafozzHkIZg+uBd3zgTAAfUCvEHSGpKvw +pVlXIH4VN2gOfNroDMUAJN2UiIxp4Weukfk/gkMFAIlxmjZAcZ7wLKjABf4Vqeq+ +Iubv9MiiqMa1t/MsDDb5 +=Zz9/ +-----END PGP SIGNATURE----- diff --git a/coreutils-chroot-perform-chdir-unless-skip-chdir.patch b/coreutils-chroot-perform-chdir-unless-skip-chdir.patch deleted file mode 100644 index 0925cd5..0000000 --- a/coreutils-chroot-perform-chdir-unless-skip-chdir.patch +++ /dev/null @@ -1,455 +0,0 @@ -# Upstream patch on top of v8.23 (to be removed in v8.24): -# https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=0cf7b1d9 -# Fixes a regression in chroot which did not chdir("/") in all cases. - -From 0c7abd9e8e1d1725ae600daa3ac9bbf8333f93c9 Mon Sep 17 00:00:00 2001 -From: Bernhard Voelker -Date: Fri, 1 Aug 2014 02:07:33 +0200 -Subject: [PATCH] chroot: perform chdir("/") again unless new --skip-chdir is - specified - -Since commit v8.22-94-g99960ee, chroot(1) skips the chroot(2) syscall -for "/" arguments (and synonyms). The problem is that it also skips -the following chdir("/") call in that case. The latter breaks existing -scripts which expect "/" to be the working directory inside the chroot. -While the first part of the change - i.e., skipping chroot("/") - is -okay for consistency with systems where it might succeed for a non-root -user, the second part might be malicious, e.g. - - cd /home/user && chroot '/' bin/foo - -In the "best" case, chroot(1) could not execute 'bin/foo' with ENOENT, -but in the worst case, chroot(1) would execute '/home/user/bin/foo' in -the case that exists - instead of '/bin/foo'. - -Revert that second part of the patch, i.e., perform the chdir("/) -in the common case again - unless the new --skip-chdir option is -specified. Restrict this new option to the case of "/" arguments. - -* src/chroot.c (SKIP_CHDIR): Add enum. -(long_opts): Add entry for the new --skip-chdir option. -(usage): Add --skip-chdir option, and while at it, move the other -to options into alphabetical order. -(main): Accept the above new option, allowing it only in the case -when NEWROOT is the old "/". -Move down the chdir() call after the if-clause to ensure it is -run in any case - unless --skip-chdir is specified. -Add a 'newroot' variable for the new root directory as it is used -in a couple of places now. -* tests/misc/chroot-fail.sh: Invert the last tests which check the -working directory of the execvp()ed program when a "/"-like -argument was passed: now expect it to be "/" - unless --skip-chdir -is given. -* doc/coreutils.texi (chroot invocation): Document the new option. -Document that chroot(1) usually calls chdir("/") unless the new ---skip-chdir option is specified. Sort options. -* NEWS (Changes in behavior): Mention the fix. -(New features): Mention the new option. -* init.cfg (nonroot_has_perm_): Add chroot's new --skip-chdir option. -* tests/cp/preserve-gid.sh (t1): Likewise. -* tests/cp/special-bits.sh: Likewise. -* tests/id/setgid.sh: Likewise. -* tests/misc/truncate-owned-by-other.sh: Likewise. -* tests/mv/sticky-to-xpart.sh: Likewise. -* tests/rm/fail-2eperm.sh: Likewise. -* tests/rm/no-give-up.sh: Likewise. -* tests/touch/now-owned-by-other.sh: Likewise. - -Reported by Andreas Schwab in http://bugs.gnu.org/18062 ---- - NEWS | 13 +++++++++++ - doc/coreutils.texi | 36 +++++++++++++++++++++----------- - init.cfg | 3 +- - src/chroot.c | 38 ++++++++++++++++++++++++++-------- - tests/cp/preserve-gid.sh | 3 +- - tests/cp/special-bits.sh | 3 +- - tests/id/setgid.sh | 8 +++---- - tests/misc/chroot-fail.sh | 23 +++++++++++++++++--- - tests/misc/truncate-owned-by-other.sh | 2 - - tests/mv/sticky-to-xpart.sh | 5 ++-- - tests/rm/fail-2eperm.sh | 6 +++-- - tests/rm/no-give-up.sh | 2 - - tests/touch/now-owned-by-other.sh | 2 - - 13 files changed, 106 insertions(+), 38 deletions(-) - -Index: NEWS -=================================================================== ---- NEWS.orig -+++ NEWS -@@ -180,6 +180,19 @@ GNU coreutils NEWS - --format=%T now reports the file system type, and tail -f now uses inotify, - rather than the default of issuing a warning and reverting to polling. - -+** New features -+ -+ chroot accepts the new --skip-chdir option to not change the working directory -+ to "/" after changing into the chroot(2) jail, thus retaining the current wor- -+ king directory. The new option is only permitted if the new root directory is -+ the old "/", and therefore is useful with the --group and --userspec options. -+ -+** Changes in behavior -+ -+ chroot changes the current directory to "/" in again - unless the above new -+ --skip-chdir option is specified. -+ [bug introduced in coreutils-8.23] -+ - - * Noteworthy changes in release 8.22 (2013-12-13) [stable] - -Index: doc/coreutils.texi -=================================================================== ---- doc/coreutils.texi.orig -+++ doc/coreutils.texi -@@ -16074,7 +16074,10 @@ On many systems, only the super-user can - some systems (e.g., FreeBSD) can be configured to allow certain regular - users to use the @code{chroot} system call, and hence to run this program. - Also, on Cygwin, anyone can run the @command{chroot} command, because the --underlying function is non-privileged due to lack of support in MS-Windows.} -+underlying function is non-privileged due to lack of support in MS-Windows. -+Furthermore, the @command{chroot} command avoids the @code{chroot} system call -+when @var{newroot} is identical to the old @file{/} directory for consistency -+with systems where this is allowed for non-privileged users.}. - Synopses: - - @example -@@ -16084,10 +16087,11 @@ chroot @var{option} - - Ordinarily, file names are looked up starting at the root of the - directory structure, i.e., @file{/}. @command{chroot} changes the root to --the directory @var{newroot} (which must exist) and then runs --@var{command} with optional @var{args}. If @var{command} is not --specified, the default is the value of the @env{SHELL} environment --variable or @command{/bin/sh} if not set, invoked with the @option{-i} option. -+the directory @var{newroot} (which must exist), then changes the working -+directory to @file{/}, and finally runs @var{command} with optional @var{args}. -+If @var{command} is not specified, the default is the value of the @env{SHELL} -+environment variable or @command{/bin/sh} if not set, invoked with the -+@option{-i} option. - @var{command} must not be a special built-in utility - (@pxref{Special built-in utilities}). - -@@ -16096,6 +16100,14 @@ Options must precede operands. - - @table @samp - -+@item --groups=@var{groups} -+@opindex --groups -+Use this option to override the supplementary @var{groups} to be -+used by the new process. -+The items in the list (names or numeric IDs) must be separated by commas. -+Use @samp{--groups=''} to disable the supplementary group look-up -+implicit in the @option{--userspec} option. -+ - @item --userspec=@var{user}[:@var{group}] - @opindex --userspec - By default, @var{command} is run with the same credentials -@@ -16106,13 +16118,13 @@ If a @var{user} is specified then the su - are set according to the system defined list for that user, - unless overridden with the @option{--groups} option. - --@item --groups=@var{groups} --@opindex --groups --Use this option to override the supplementary @var{groups} to be --used by the new process. --The items in the list (names or numeric IDs) must be separated by commas. --Use @samp{--groups=''} to disable the supplementary group look-up --implicit in the @option{--userspec} option. -+@item --skip-chdir -+@opindex --skip-chdir -+Use this option to not change the working directory to @file{/} after changing -+the root directory to @var{newroot}, i.e., inside the chroot. -+This option is only permitted when @var{newroot} is the old @file{/} directory, -+and therefore is mostly useful together with the @option{--groups} and -+@option{--userspec} options to retain the previous working directory. - - @end table - -Index: init.cfg -=================================================================== ---- init.cfg.orig -+++ init.cfg -@@ -400,7 +400,8 @@ nonroot_has_perm_() - require_built_ chroot - - local rm_version=$( -- chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" rm --version | -+ chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ -+ rm --version | - sed -n '1s/.* //p' - ) - case ":$rm_version:" in -Index: src/chroot.c -=================================================================== ---- src/chroot.c.orig -+++ src/chroot.c -@@ -49,13 +49,15 @@ static inline bool gid_unset (gid_t gid) - enum - { - GROUPS = UCHAR_MAX + 1, -- USERSPEC -+ USERSPEC, -+ SKIP_CHDIR - }; - - static struct option const long_opts[] = - { - {"groups", required_argument, NULL, GROUPS}, - {"userspec", required_argument, NULL, USERSPEC}, -+ {"skip-chdir", no_argument, NULL, SKIP_CHDIR}, - {GETOPT_HELP_OPTION_DECL}, - {GETOPT_VERSION_OPTION_DECL}, - {NULL, 0, NULL, 0} -@@ -194,9 +196,14 @@ Run COMMAND with root directory set to N - "), stdout); - - fputs (_("\ -- --userspec=USER:GROUP specify user and group (ID or name) to use\n\ - --groups=G_LIST specify supplementary groups as g1,g2,..,gN\n\ - "), stdout); -+ fputs (_("\ -+ --userspec=USER:GROUP specify user and group (ID or name) to use\n\ -+"), stdout); -+ printf (_("\ -+ --skip-chdir do not change working directory to %s\n\ -+"), quote ("/")); - - fputs (HELP_OPTION_DESCRIPTION, stdout); - fputs (VERSION_OPTION_DESCRIPTION, stdout); -@@ -218,6 +225,7 @@ main (int argc, char **argv) - char *userspec = NULL; - char const *username = NULL; - char const *groups = NULL; -+ bool skip_chdir = false; - - /* Parsed user and group IDs. */ - uid_t uid = -1; -@@ -254,6 +262,10 @@ main (int argc, char **argv) - groups = optarg; - break; - -+ case SKIP_CHDIR: -+ skip_chdir = true; -+ break; -+ - case_GETOPT_HELP_CHAR; - - case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); -@@ -269,9 +281,19 @@ main (int argc, char **argv) - usage (EXIT_CANCELED); - } - -+ char const *newroot = argv[optind]; -+ bool is_oldroot = is_root (newroot); -+ -+ if (! is_oldroot && skip_chdir) -+ { -+ error (0, 0, _("option --skip-chdir only permitted if NEWROOT is old %s"), -+ quote ("/")); -+ usage (EXIT_CANCELED); -+ } -+ - /* Only do chroot specific actions if actually changing root. - The main difference here is that we don't change working dir. */ -- if (! is_root (argv[optind])) -+ if (! is_oldroot) - { - /* We have to look up users and groups twice. - - First, outside the chroot to load potentially necessary passwd/group -@@ -307,14 +329,14 @@ main (int argc, char **argv) - } - #endif - -- if (chroot (argv[optind]) != 0) -+ if (chroot (newroot) != 0) - error (EXIT_CANCELED, errno, _("cannot change root directory to %s"), -- argv[optind]); -- -- if (chdir ("/")) -- error (EXIT_CANCELED, errno, _("cannot chdir to root directory")); -+ newroot); - } - -+ if (! skip_chdir && chdir ("/")) -+ error (EXIT_CANCELED, errno, _("cannot chdir to root directory")); -+ - if (argc == optind + 1) - { - /* No command. Run an interactive shell. */ -Index: tests/cp/preserve-gid.sh -=================================================================== ---- tests/cp/preserve-gid.sh.orig -+++ tests/cp/preserve-gid.sh -@@ -117,7 +117,8 @@ t1() { - u=$1; shift - g=$1; shift - t0 "$f" "$u" "$g" \ -- chroot --user=+$nameless_uid:+$nameless_gid1 \ -+ chroot --skip-chdir \ -+ --user=+$nameless_uid:+$nameless_gid1 \ - --groups="+$nameless_gid1,+$nameless_gid2" \ - / env PATH="$tmp_path" "$@" - } -Index: tests/cp/special-bits.sh -=================================================================== ---- tests/cp/special-bits.sh.orig -+++ tests/cp/special-bits.sh -@@ -42,7 +42,8 @@ set _ $(ls -l b); shift; p1=$1 - set _ $(ls -l b2); shift; p2=$1 - test $p1 = $p2 || fail=1 - --chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" cp -p c c2 || fail=1 -+chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" cp -p c c2 \ -+ || fail=1 - set _ $(ls -l c); shift; p1=$1 - set _ $(ls -l c2); shift; p2=$1 - test $p1 = $p2 && fail=1 -Index: tests/id/setgid.sh -=================================================================== ---- tests/id/setgid.sh.orig -+++ tests/id/setgid.sh -@@ -27,14 +27,14 @@ echo $gp1 > exp || framework_failure_ - - # With coreutils-8.16 and earlier, id -G would print both: - # $gp1 $NON_ROOT_GID --chroot --user=$NON_ROOT_USERNAME:+$gp1 --groups='' / env PATH="$PATH" \ -- id -G > out || fail=1 -+chroot --skip-chdir --user=$NON_ROOT_USERNAME:+$gp1 --groups='' / \ -+ env PATH="$PATH" id -G > out || fail=1 - compare exp out || fail=1 - - # With coreutils-8.22 and earlier, id would erroneously print - # groups=$NON_ROOT_GID --chroot --user=$NON_ROOT_USERNAME:+$gp1 --groups='' / env PATH="$PATH" \ -- id > out || fail=1 -+chroot --skip-chdir --user=$NON_ROOT_USERNAME:+$gp1 --groups='' / \ -+ env PATH="$PATH" id > out || fail=1 - grep -F "groups=$gp1" out || { cat out; fail=1; } - - Exit $fail -Index: tests/misc/chroot-fail.sh -=================================================================== ---- tests/misc/chroot-fail.sh.orig -+++ tests/misc/chroot-fail.sh -@@ -30,7 +30,7 @@ chroot --- / true # unknown option - test $? = 125 || fail=1 - - # Note chroot("/") succeeds for non-root users on some systems, but not all, --# however we avoid the chroot() with "/" to have common behvavior. -+# however we avoid the chroot() with "/" to have common behavior. - chroot / sh -c 'exit 2' # exit status propagation - test $? = 2 || fail=1 - chroot / . # invalid command -@@ -38,10 +38,25 @@ test $? = 126 || fail=1 - chroot / no_such # no such command - test $? = 127 || fail=1 - --# Ensure we don't chdir("/") when not changing root --# to allow only changing user ids for a command. --for dir in '/' '/.' '/../'; do -+# Ensure that --skip-chdir fails with a non-"/" argument. -+cat <<\EOF > exp || framework_failure_ -+chroot: option --skip-chdir only permitted if NEWROOT is old '/' -+Try 'chroot --help' for more information. -+EOF -+chroot --skip-chdir . env pwd >out 2>err && fail=1 -+compare /dev/null out || fail=1 -+compare exp err || fail=1 -+ -+# Ensure we don't chroot("/") when NEWROOT is old "/". -+ln -s / isroot || framework_failure_ -+for dir in '/' '/.' '/../' isroot; do -+ # Verify that chroot(1) succeeds and performs chdir("/") -+ # (chroot(1) of coreutils-8.23 failed to run the latter). - curdir=$(chroot "$dir" env pwd) || fail=1 -+ test "$curdir" = '/' || fail=1 -+ -+ # Test the "--skip-chdir" option. -+ curdir=$(chroot --skip-chdir "$dir" env pwd) || fail=1 - test "$curdir" = '/' && fail=1 - done - -Index: tests/misc/truncate-owned-by-other.sh -=================================================================== ---- tests/misc/truncate-owned-by-other.sh.orig -+++ tests/misc/truncate-owned-by-other.sh -@@ -29,7 +29,7 @@ chmod g+w root-owned - # Ensure that the current directory is searchable by $NON_ROOT_USERNAME. - chmod g+x . - --chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ -+chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ - truncate -s0 root-owned || fail=1 - - Exit $fail -Index: tests/mv/sticky-to-xpart.sh -=================================================================== ---- tests/mv/sticky-to-xpart.sh.orig -+++ tests/mv/sticky-to-xpart.sh -@@ -42,7 +42,8 @@ chmod go+x . || framework_failure_ - - # Ensure that $NON_ROOT_USERNAME can access the required version of mv. - version=$( -- chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" mv --version | -+ chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ -+ mv --version | - sed -n '1s/.* //p' - ) - case $version in -@@ -50,7 +51,7 @@ case $version in - *) skip_ "cannot access just-built mv as user $NON_ROOT_USERNAME";; - esac - --chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ -+chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ - mv t/root-owned "$other_partition_tmpdir" 2> out-t && fail=1 - - # On some systems, we get 'Not owner'. Convert it. -Index: tests/rm/fail-2eperm.sh -=================================================================== ---- tests/rm/fail-2eperm.sh.orig -+++ tests/rm/fail-2eperm.sh -@@ -32,14 +32,16 @@ touch a/b || framework_failure_ - # Try to ensure that $NON_ROOT_USERNAME can access - # the required version of rm. - rm_version=$( -- chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" rm --version | -+ chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ -+ rm --version | - sed -n '1s/.* //p' - ) - case $rm_version in - $PACKAGE_VERSION) ;; - *) skip_ "cannot access just-built rm as user $NON_ROOT_USERNAME";; - esac --chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" rm -rf a 2> out-t && fail=1 -+chroot --skip-chdir --user=$NON_ROOT_USERNAME / \ -+ env PATH="$PATH" rm -rf a 2> out-t && fail=1 - - # On some systems, we get 'Not owner'. Convert it. - # On other systems (HPUX), we get 'Permission denied'. Convert it, too. -Index: tests/rm/no-give-up.sh -=================================================================== ---- tests/rm/no-give-up.sh.orig -+++ tests/rm/no-give-up.sh -@@ -30,7 +30,7 @@ chmod go=x . || framework_failure_ - - - # This must fail, since '.' is not writable by $NON_ROOT_USERNAME. --chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ -+chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ - rm -rf d 2>/dev/null && fail=1 - - # d must remain. -Index: tests/touch/now-owned-by-other.sh -=================================================================== ---- tests/touch/now-owned-by-other.sh.orig -+++ tests/touch/now-owned-by-other.sh -@@ -28,7 +28,7 @@ chmod g+w root-owned - # Ensure that the current directory is searchable by $NON_ROOT_USERNAME. - chmod g+x . - --chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ -+chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \ - touch -d now root-owned || fail=1 - - Exit $fail diff --git a/coreutils-df-doc-df-a-includes-duplicate-file-systems.patch b/coreutils-df-doc-df-a-includes-duplicate-file-systems.patch deleted file mode 100644 index b1caebd..0000000 --- a/coreutils-df-doc-df-a-includes-duplicate-file-systems.patch +++ /dev/null @@ -1,65 +0,0 @@ -Upstream patch for df(1) on top of v8.23, to be removed with v8.24. -http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=097897bd2c9d - -From 097897bd2c9de5723af24b3848d6d922a862064b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= -Date: Mon, 27 Oct 2014 11:41:09 +0000 -Subject: [PATCH] doc: mention that df -a includes duplicate file systems - -* src/df.c (usage): Mention that duplicate file systems are shown -with this option, not just dummy file systems. -* doc/coreutils.texi (df invocation): For the --all option, expand -on the class of normally suppressed mount entries that it includes. - -Reported in http://bugs.debian.org/737399 ---- - doc/coreutils.texi | 12 ++++++++---- - src/df.c | 4 ++-- - 2 files changed, 10 insertions(+), 6 deletions(-) - -Index: doc/coreutils.texi -=================================================================== ---- doc/coreutils.texi.orig -+++ doc/coreutils.texi -@@ -11184,11 +11184,15 @@ The program accepts the following option - @itemx --all - @opindex -a - @opindex --all --@cindex automounter file systems - @cindex ignore file systems --Include in the listing dummy file systems, which --are omitted by default. Such file systems are typically special-purpose --pseudo-file-systems, such as automounter entries. -+Include in the listing dummy, duplicate, or inaccessible file systems, which -+are omitted by default. Dummy file systems are typically special purpose -+pseudo file systems such as @samp{/proc}, with no associated storage. -+Duplicate file systems are local or remote file systems that are mounted -+at separate locations in the local file hierarchy, or bind mounted locations. -+Inaccessible file systems are those which are mounted but subsequently -+over-mounted by another file system at that point, or otherwise inaccessible -+due to permissions of the mount point etc. - - @item -B @var{size} - @itemx --block-size=@var{size} -Index: src/df.c -=================================================================== ---- src/df.c.orig -+++ src/df.c -@@ -648,7 +648,7 @@ filter_mount_list (bool devices_only) - > strlen (me->me_mountdir)) - /* let an entry overmounted on a different device win... */ - || (! STREQ (devlist->me->me_devname, me->me_devname) -- /* ... but only when matching an exsiting mount point, to -+ /* ... but only when matching an existing mount point, to - avoid problematic replacement when given inaccurate mount - lists, seen with some chroot environments for example. */ - && STREQ (me->me_mountdir, devlist->me->me_mountdir))) -@@ -1396,7 +1396,7 @@ or all file systems by default.\n\ - /* TRANSLATORS: The thousands and decimal separators are best - adjusted to an appropriate default for your locale. */ - fputs (_("\ -- -a, --all include dummy file systems\n\ -+ -a, --all include pseudo, duplicate, inaccessible file systems\n\ - -B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,\n\ - '-BM' prints sizes in units of 1,048,576 bytes;\n\ - see SIZE format below\n\ diff --git a/coreutils-df-improve-mount-point-selection.patch b/coreutils-df-improve-mount-point-selection.patch deleted file mode 100644 index c92b2c7..0000000 --- a/coreutils-df-improve-mount-point-selection.patch +++ /dev/null @@ -1,67 +0,0 @@ -Upstream patch for df(1) on top of v8.23, to be removed with v8.24. -http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=ed1a495b3ccb - -From ed1a495b3ccb2665a13229ca866f2115bd768d17 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= -Date: Mon, 18 Aug 2014 17:59:26 +0100 -Subject: [PATCH] df: improve mount point selection with inaccurate mount list - -v8.23 has a test failure on Fedora rawhide build servers -in tests/df/skip-duplicate.sh. This was due to no '/' -entry being output by df. That was due to an inaccurate -/proc/mounts on the build environment as stat(/mnt/point) -identified all these /proc/mounts entries as having the -same device id: - - / rootfs - / /dev/md1 - /dev devtmpfs - /run tmpfs - /boot /dev/md0 - /proc/filesystems /dev/md1 - -Since the device name on the right changes for a given id, -that causes the entries to be continually replaced, thus -resulting in no '/' entry. I'm guessing this is due to -the mock environment bind mounting unneeded or sensitive -items to a dummy file on the host / (/dev/md1) though -have not looked into those details. - -So rather than relying on an accurate /proc/mounts, -the attached patch takes a more conservative replacement -approach and only swaps a new device entry when the -mount point matches. That should handle all practical -cases while also avoiding this situation. - -* src/df.c (filter_mount_list): Only replace entries with -different device names when the mount point also matches. ---- - src/df.c | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -Index: src/df.c -=================================================================== ---- src/df.c.orig -+++ src/df.c -@@ -640,13 +640,18 @@ filter_mount_list (bool devices_only) - - if (devlist) - { -- /* ...let the shorter mountdir win. */ -+ /* let "real" devices with '/' in the name win. */ - if ((strchr (me->me_devname, '/') - && ! strchr (devlist->me->me_devname, '/')) -+ /* let a shorter mountdir win. */ - || (strlen (devlist->me->me_mountdir) - > strlen (me->me_mountdir)) -- /* or one overmounted on a different device. */ -- || ! STREQ (devlist->me->me_devname, me->me_devname)) -+ /* let an entry overmounted on a different device win... */ -+ || (! STREQ (devlist->me->me_devname, me->me_devname) -+ /* ... but only when matching an exsiting mount point, to -+ avoid problematic replacement when given inaccurate mount -+ lists, seen with some chroot environments for example. */ -+ && STREQ (me->me_mountdir, devlist->me->me_mountdir))) - { - /* Discard mount entry for existing device. */ - discard_me = devlist->me; diff --git a/coreutils-df-show-all-remote-file-systems.patch b/coreutils-df-show-all-remote-file-systems.patch deleted file mode 100644 index 7331cc8..0000000 --- a/coreutils-df-show-all-remote-file-systems.patch +++ /dev/null @@ -1,70 +0,0 @@ -Upstream patch for df(1) on top of v8.23, to be removed with v8.24. -http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=3ab3c7bb24b8 - -From 3ab3c7bb24b86ef2d2fede9fe26e3ee585db5411 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= -Date: Mon, 27 Oct 2014 23:37:08 +0000 -Subject: [PATCH] df: ensure -a shows all remote file system entries - -commit v8.22-125-g9d736f8 printed placeholder "-" values -for device names that didn't match the preferred device name -for a particular mount point. However that was seen to erroneously -suppress values for aliased host names or exports, common with -remote file systems. - -* src/df.c (me_for_dev): Rename from devname_for_dev() so that -we can determine the remoteness as well as the name for the -preferred mount entry. -(get_dev): Don't output place holder values when both -current and preferred mount entries are remote. - -Reported in http://bugs.debian.org/737399 ---- - src/df.c | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -Index: src/df.c -=================================================================== ---- src/df.c.orig -+++ src/df.c -@@ -703,17 +703,17 @@ filter_mount_list (bool devices_only) - } - - /* Search a mount entry list for device id DEV. -- Return the corresponding device name if found or NULL if not. */ -+ Return the corresponding mount entry if found or NULL if not. */ - --static char const * _GL_ATTRIBUTE_PURE --devname_for_dev (dev_t dev) -+static struct mount_entry const * _GL_ATTRIBUTE_PURE -+me_for_dev (dev_t dev) - { - struct devlist *dl = device_list; - - while (dl) - { - if (dl->dev_num == dev) -- return dl->me->me_devname; -+ return dl->me; - dl = dl->next; - } - -@@ -928,12 +928,15 @@ get_dev (char const *disk, char const *m - else if (process_all && show_all_fs) - { - /* Ensure we don't output incorrect stats for over-mounted directories. -- Discard stats when the device name doesn't match. */ -+ Discard stats when the device name doesn't match. Though don't -+ discard when used and current mount entries are both remote due -+ to the possibility of aliased host names or exports. */ - struct stat sb; - if (stat (stat_file, &sb) == 0) - { -- char const * devname = devname_for_dev (sb.st_dev); -- if (devname && ! STREQ (devname, disk)) -+ struct mount_entry const * dev_me = me_for_dev (sb.st_dev); -+ if (dev_me && ! STREQ (dev_me->me_devname, disk) -+ && (! dev_me->me_remote || ! me_remote)) - { - fstype = "-"; - fsu.fsu_blocksize = fsu.fsu_blocks = fsu.fsu_bfree = diff --git a/coreutils-df-total-suppress-separate-remotes.patch b/coreutils-df-total-suppress-separate-remotes.patch deleted file mode 100644 index 758ceef..0000000 --- a/coreutils-df-total-suppress-separate-remotes.patch +++ /dev/null @@ -1,250 +0,0 @@ -Upstream patch for df(1) on top of v8.23, to be removed with v8.24. -http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=2e81e6224340 - -From 2e81e62243409c5c574b899f52b08c000e4d99fd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= -Date: Wed, 29 Oct 2014 02:49:17 +0000 -Subject: [PATCH] df: only suppress remote mounts of separate exports with - --total - -* src/df.c (filter_mount_list): Separate remote locations are -generally explicitly mounted, so list each even if they share -the same remote device and thus storage. However with --total -keep the suppression to give a more accurate value for the -total storage available. -(usage): Expand on the new implications of --total and move -it in the options list according to alphabetic order. -doc/coreutils.texi (df invocation): Mention that --total impacts -on deduplication of remote file systems and also move location -according to alphabetic order. -* tests/df/skip-duplicates.sh: Add remote test cases. -* NEWS: Mention the change in behavior. - -Reported in http://bugs.debian.org/737399 -Reported in http://bugzilla.redhat.com/920806 -Reported in http://bugzilla.opensuse.org/866010 -Reported in http://bugzilla.opensuse.org/901905 ---- - NEWS | 8 ++++++++ - doc/coreutils.texi | 28 +++++++++++++++------------- - src/df.c | 41 ++++++++++++++++++++++++++++------------- - tests/df/skip-duplicates.sh | 31 ++++++++++++++++++++++++++++--- - 4 files changed, 79 insertions(+), 29 deletions(-) - -Index: NEWS -=================================================================== ---- NEWS.orig -+++ NEWS -@@ -1,5 +1,13 @@ - GNU coreutils NEWS -*- outline -*- - -+** Changes in behavior -+ -+ df no longer suppresses separate exports of the same remote device, as -+ these are generally explicitly mounted. The --total option does still -+ suppress duplicate remote file systems. -+ [suppression was introduced in coreutils-8.21] -+ -+ - * Noteworthy changes in release 8.23 (2014-07-18) [stable] - - ** Bug fixes -Index: doc/coreutils.texi -=================================================================== ---- doc/coreutils.texi.orig -+++ doc/coreutils.texi -@@ -11202,19 +11202,6 @@ due to permissions of the mount point et - Scale sizes by @var{size} before printing them (@pxref{Block size}). - For example, @option{-BG} prints sizes in units of 1,073,741,824 bytes. - --@item --total --@opindex --total --@cindex grand total of disk size, usage and available space --Print a grand total of all arguments after all arguments have --been processed. This can be used to find out the total disk size, usage --and available space of all listed devices. -- --For the grand total line, @command{df} prints @samp{"total"} into the --@var{source} column, and @samp{"-"} into the @var{target} column. --If there is no @var{source} column (see @option{--output}), then --@command{df} prints @samp{"total"} into the @var{target} column, --if present. -- - @optHumanReadable - - @item -H -@@ -11355,6 +11342,21 @@ some systems (notably SunOS), doing this - but in general this option makes @command{df} much slower, especially when - there are many or very busy file systems. - -+@item --total -+@opindex --total -+@cindex grand total of disk size, usage and available space -+Print a grand total of all arguments after all arguments have -+been processed. This can be used to find out the total disk size, usage -+and available space of all listed devices. If no arguments are specified -+df will try harder to elide file systems insignificant to the total -+available space, by suppressing duplicate remote file systems. -+ -+For the grand total line, @command{df} prints @samp{"total"} into the -+@var{source} column, and @samp{"-"} into the @var{target} column. -+If there is no @var{source} column (see @option{--output}), then -+@command{df} prints @samp{"total"} into the @var{target} column, -+if present. -+ - @item -t @var{fstype} - @itemx --type=@var{fstype} - @opindex -t -Index: src/df.c -=================================================================== ---- src/df.c.orig -+++ src/df.c -@@ -640,18 +640,28 @@ filter_mount_list (bool devices_only) - - if (devlist) - { -- /* let "real" devices with '/' in the name win. */ -- if ((strchr (me->me_devname, '/') -- && ! strchr (devlist->me->me_devname, '/')) -- /* let a shorter mountdir win. */ -- || (strlen (devlist->me->me_mountdir) -- > strlen (me->me_mountdir)) -- /* let an entry overmounted on a different device win... */ -- || (! STREQ (devlist->me->me_devname, me->me_devname) -- /* ... but only when matching an existing mount point, to -- avoid problematic replacement when given inaccurate mount -- lists, seen with some chroot environments for example. */ -- && STREQ (me->me_mountdir, devlist->me->me_mountdir))) -+ if (! print_grand_total && me->me_remote && devlist->me->me_remote -+ && ! STREQ (devlist->me->me_devname, me->me_devname)) -+ { -+ /* Don't discard remote entries with different locations, -+ as these are more likely to be explicitly mounted. -+ However avoid this when producing a total to give -+ a more accurate value in that case. */ -+ } -+ else if ((strchr (me->me_devname, '/') -+ /* let "real" devices with '/' in the name win. */ -+ && ! strchr (devlist->me->me_devname, '/')) -+ /* let a shorter mountdir win. */ -+ || (strlen (devlist->me->me_mountdir) -+ > strlen (me->me_mountdir)) -+ /* let an entry overmounted on a new device win... */ -+ || (! STREQ (devlist->me->me_devname, me->me_devname) -+ /* ... but only when matching an existing mnt point, -+ to avoid problematic replacement when given -+ inaccurate mount lists, seen with some chroot -+ environments for example. */ -+ && STREQ (me->me_mountdir, -+ devlist->me->me_mountdir))) - { - /* Discard mount entry for existing device. */ - discard_me = devlist->me; -@@ -1403,7 +1413,6 @@ or all file systems by default.\n\ - -B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,\n\ - '-BM' prints sizes in units of 1,048,576 bytes;\n\ - see SIZE format below\n\ -- --total produce a grand total\n\ - -h, --human-readable print sizes in powers of 1024 (e.g., 1023M)\n\ - -H, --si print sizes in powers of 1000 (e.g., 1.1G)\n\ - "), stdout); -@@ -1419,6 +1428,12 @@ or all file systems by default.\n\ - or print all fields if FIELD_LIST is omitted.\n\ - -P, --portability use the POSIX output format\n\ - --sync invoke sync before getting usage info\n\ -+"), stdout); -+ fputs (_("\ -+ --total elide all entries insignificant to available space,\n\ -+ and produce a grand total\n\ -+"), stdout); -+ fputs (_("\ - -t, --type=TYPE limit listing to file systems of type TYPE\n\ - -T, --print-type print file system type\n\ - -x, --exclude-type=TYPE limit listing to file systems not of type TYPE\n\ -Index: tests/df/skip-duplicates.sh -=================================================================== ---- tests/df/skip-duplicates.sh.orig -+++ tests/df/skip-duplicates.sh -@@ -26,7 +26,12 @@ require_gcc_shared_ - df --local || skip_ "df fails" - - export CU_NONROOT_FS=$(df --local --output=target 2>&1 | grep /. | head -n1) --test -z "$CU_NONROOT_FS" && unique_entries=1 || unique_entries=2 -+export CU_REMOTE_FS=$(df --local --output=target 2>&1 | grep /. | -+ tail -n+2 | head -n1) -+ -+unique_entries=1 -+test -z "$CU_NONROOT_FS" || unique_entries=$(expr $unique_entries + 1) -+test -z "$CU_REMOTE_FS" || unique_entries=$(expr $unique_entries + 2) - - grep '^#define HAVE_MNTENT_H 1' $CONFIG_HEADER > /dev/null \ - || skip_ "no mntent.h available to confirm the interface" -@@ -46,6 +51,7 @@ cat > k.c <<'EOF' || framework_failure_ - struct mntent *getmntent (FILE *fp) - { - static char *nonroot_fs; -+ static char *remote_fs; - static int done; - - /* Prove that LD_PRELOAD works. */ -@@ -63,6 +69,9 @@ struct mntent *getmntent (FILE *fp) - {.mnt_fsname="virtfs", .mnt_dir="/NONROOT", .mnt_type="fstype1"}, - {.mnt_fsname="virtfs2", .mnt_dir="/NONROOT", .mnt_type="fstype2"}, - {.mnt_fsname="netns", .mnt_dir="net:[1234567]"}, -+ {.mnt_fsname="rem:ote1",.mnt_dir="/REMOTE"}, -+ {.mnt_fsname="rem:ote1",.mnt_dir="/REMOTE"}, -+ {.mnt_fsname="rem:ote2",.mnt_dir="/REMOTE"}, - }; - - if (done == 1) -@@ -70,17 +79,26 @@ struct mntent *getmntent (FILE *fp) - nonroot_fs = getenv ("CU_NONROOT_FS"); - if (!nonroot_fs || !*nonroot_fs) - nonroot_fs = "/"; /* merge into / entries. */ -+ -+ remote_fs = getenv ("CU_REMOTE_FS"); - } - - if (done == 1 && !getenv ("CU_TEST_DUPE_INVALID")) - done++; /* skip the first entry. */ - -- while (done++ <= 7) -+ while (done++ <= 10) - { - if (!mntents[done-2].mnt_type) - mntents[done-2].mnt_type = "-"; - if (STREQ (mntents[done-2].mnt_dir, "/NONROOT")) - mntents[done-2].mnt_dir = nonroot_fs; -+ if (STREQ (mntents[done-2].mnt_dir, "/REMOTE")) -+ { -+ if (!remote_fs || !*remote_fs) -+ continue; -+ else -+ mntents[done-2].mnt_dir = remote_fs; -+ } - return &mntents[done-2]; - } - -@@ -102,6 +120,12 @@ test -f x || skip_ "internal test failur - LD_PRELOAD=./k.so df -T >out || fail=1 - test $(wc -l out || fail=1 -+test "$CU_REMOTE_FS" && elide_remote=1 || elide_remote=0 -+test $(wc -l out || fail=1 - test $(wc -l out || fail=1 --test $(wc -l -Date: Tue, 9 Sep 2014 02:05:45 +0100 -Subject: [PATCH] doc: adjust reference to info nodes in man pages - -old form: coreutils '$cmd invocation' -new form: '(coreutils) $cmd invocation' - -The old form erroneously referenced the node for the 'coreutils' -multi-call program. Now that problematic node name was renamed -in commit v8.23-18-g72e470b, but the newer less ambiguous form -also has the advantage of working with the pinfo viewer for example. -Full discussion at http://bugs.gnu.org/18428 - -* man/local.mk: Adjust man page references to texinfo nodes. -* src/system.h: Adjust --help references to texinfo nodes. ---- - man/dummy-man | 2 +- - man/local.mk | 2 +- - src/system.h | 3 ++- - 3 files changed, 4 insertions(+), 3 deletions(-) - -Index: man/dummy-man -=================================================================== ---- man/dummy-man.orig -+++ man/dummy-man -@@ -69,5 +69,5 @@ The full documentation for - is maintained as a Texinfo manual, which should be accessible - on your system via the command - .IP --.B info coreutils $bs(aq$progname invocation$bs(aq -+.B info $bs(aq(coreutils) $progname invocation$bs(aq - END -Index: man/local.mk -=================================================================== ---- man/local.mk.orig -+++ man/local.mk -@@ -102,7 +102,7 @@ man/dynamic-deps.mk: Makefile - --source='$(PACKAGE_STRING)' \ - --include=$(srcdir)/man/$$name.x \ - --output=$$t/$$name.1 $$t/$$argv \ -- --info-page='coreutils \(aq'$$name' invocation\(aq' \ -+ --info-page='\(aq(coreutils) '$$name' invocation\(aq' \ - && sed \ - -e 's|$*\.td/||g' \ - -e '/For complete documentation/d' \ -Index: src/system.h -=================================================================== ---- src/system.h.orig -+++ src/system.h -@@ -582,7 +582,8 @@ emit_ancillary_info (void) - last_component (program_name)); - } - printf (_("For complete documentation, run: " -- "info coreutils '%s invocation'\n"), last_component (program_name)); -+ "info '(coreutils) %s invocation'\n"), -+ last_component (program_name)); - } - - static inline void diff --git a/coreutils-fix-man-deps.patch b/coreutils-fix-man-deps.patch deleted file mode 100644 index 9ced615..0000000 --- a/coreutils-fix-man-deps.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - man/local.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: man/local.mk -=================================================================== ---- man/local.mk.orig -+++ man/local.mk -@@ -41,7 +41,7 @@ distclean-local: - test x$(srcdir) = x$(builddir) || rm -f $(ALL_MANS) - - # Dependencies common to all man pages. Updated below. --mandeps = -+mandeps = $(PROGRAMS) - - # Depend on this to get version number changes. - mandeps += .version diff --git a/coreutils-fix_false_du_failure_on_newer_xfs.patch b/coreutils-fix_false_du_failure_on_newer_xfs.patch deleted file mode 100644 index 088d348..0000000 --- a/coreutils-fix_false_du_failure_on_newer_xfs.patch +++ /dev/null @@ -1,124 +0,0 @@ -From coreutils-bounces+pth=suse.de@gnu.org Tue Sep 16 00:19:14 2014 -Return-Path: -X-Original-To: pth@wotan.suse.de -Received: from relay1.suse.de (relay1.suse.de [149.44.160.133]) - by wotan.suse.de (Postfix) with ESMTP id 9E7716283 - for ; Tue, 16 Sep 2014 00:19:14 +0200 (CEST) -Received: by relay1.suse.de (Postfix) - id 9723D28DD; Tue, 16 Sep 2014 00:19:14 +0200 (CEST) -Received: from localhost (localhost [127.0.0.1]) - by relay1.suse.de (Postfix) with ESMTP id 91A4228D9 - for ; Tue, 16 Sep 2014 00:19:14 +0200 (CEST) -X-Virus-Scanned: by amavisd-new at localhost -X-Spam-Flag: NO -X-Spam-Score: -5.868 -X-Spam-Level: -X-Spam-Status: No, score=-5.868 tagged_above=-9999 required=5 - tests=[BAYES_50=0.8, IS_MAILMAN_LIST=-1, RCVD_IN_DNSWL_HI=-5, - RP_MATCHES_RCVD=-0.668] autolearn=disabled -Received: from relay1.suse.de ([127.0.0.1]) - by localhost (localhost [127.0.0.1]) (amavisd-new, port 10026) - with ESMTP id ChE53gAm38xF for ; - Tue, 16 Sep 2014 00:19:14 +0200 (CEST) -Received: from mx1.suse.de (cantor1.suse.de [195.135.220.2]) - (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) - (No client certificate requested) - by relay1.suse.de (Postfix) with ESMTPS id 3DFCE2030 - for ; Tue, 16 Sep 2014 00:19:14 +0200 (CEST) -Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) - (using TLSv1 with cipher AES256-SHA (256/256 bits)) - (No client certificate requested) - by mx1.suse.de (Postfix) with ESMTPS id 14E56AAC5 - for ; Tue, 16 Sep 2014 00:19:14 +0200 (CEST) -Received: from localhost ([::1]:34619 helo=lists.gnu.org) - by lists.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1XTec5-00066K-6z - for pth@suse.de; Mon, 15 Sep 2014 18:19:13 -0400 -Received: from eggs.gnu.org ([2001:4830:134:3::10]:44002) - by lists.gnu.org with esmtp (Exim 4.71) - (envelope-from ) id 1XTebt-0005zb-Ea - for coreutils@gnu.org; Mon, 15 Sep 2014 18:19:08 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) id 1XTebh-0006mb-A2 - for coreutils@gnu.org; Mon, 15 Sep 2014 18:19:01 -0400 -Received: from mout.kundenserver.de ([212.227.126.130]:61454) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) id 1XTebh-0006m4-1Y - for coreutils@gnu.org; Mon, 15 Sep 2014 18:18:49 -0400 -Received: from blackice.site (pD957CBB4.dip0.t-ipconnect.de [217.87.203.180]) - by mrelayeu.kundenserver.de (node=mreue007) with ESMTP (Nemesis) - id 0MY0P5-1Xnddz1jeR-00WkzE; Tue, 16 Sep 2014 00:18:44 +0200 -From: Bernhard Voelker -To: coreutils@gnu.org -Subject: [PATCH] tests: fix false du failure on newer XFS -Date: Tue, 16 Sep 2014 00:17:43 +0200 -Message-Id: <1410819463-5423-1-git-send-email-mail@bernhard-voelker.de> -X-Mailer: git-send-email 1.8.4.5 -X-Provags-ID: V02:K0:qhDLt5+dLDL9ZojGDjR2JCZUT99RsLhoiyP2U0vHUVe - 6sFe6AEQdVdEBTcxwG3rxuMC20RiygA6M3jqShv8YrHI8aMVAd - eE8xJ/hJz3vHhN5RsbqbiGh6bGodZh6z/8pEPo4nIZfvFj5/Oy - IXHy4YysR6g0Ci11Fcpx0MH2q50tuGRgVct132icfAEbWFZM7o - //TkmA8XFocuHSW4d1dv6YXnnf1OA1QDsTHrc7TrX3NwqGqTzl - qIUlhT4OBcqPtunpPR5ty3yLNFY61T33c0Y4tB0LRpDgS7bbE7 - Gk8SkMUBH447xJjIFByTt+DQk+mgpo1h1Eo2vUlIFXzNzZrdaV - BcRVj5v4GBKK1/e2y3rVH4VUBgbCZiJhb9TsicXKVwkF+Xejjb - mCtjMo7wyvEjtHeCr0aBNLE18yA2j8FEEI= -X-UI-Out-Filterresults: notjunk:1; -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] -X-Received-From: 212.227.126.130 -Cc: Bernhard Voelker -X-BeenThere: coreutils@gnu.org -X-Mailman-Version: 2.1.14 -Precedence: list -List-Id: GNU coreutils General Discussion -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Errors-To: coreutils-bounces+pth=suse.de@gnu.org -Sender: coreutils-bounces+pth=suse.de@gnu.org -Status: RO -Content-Length: 1239 -Lines: 40 - -* tests/du/2g.sh: Similar to the fix for a dd test (see commit -v8.22-65-g7c03fe2), avoid speculative preallocation by creating -the 'big' file in one go instead of appending to it in the loop. -Remove debugging statements as the output with 'set -x' is -sufficient nowadays. ---- - tests/du/2g.sh | 17 ++++++++--------- - 1 file changed, 8 insertions(+), 9 deletions(-) - -Index: tests/du/2g.sh -=================================================================== ---- tests/du/2g.sh.orig -+++ tests/du/2g.sh -@@ -43,15 +43,14 @@ test $min_kb -lt $free_kb || - - big=big - rm -f $big --test -t 1 || printf 'creating a 2GB file...\n' --for i in $(seq 100); do -- # Note: 2147483648 == 2^31. Print floor(2^31/100) per iteration. -- printf %21474836s x >> $big || fail=1 -- # On the final iteration, append the remaining 48 bytes. -- test $i = 100 && { printf %48s x >> $big || fail=1; } -- test -t 1 && printf 'creating a 2GB file: %d%% complete\r' $i --done --echo -+{ -+ for i in $(seq 100); do -+ # Note: 2147483648 == 2^31. Print floor(2^31/100) per iteration. -+ printf %21474836s x || fail=1 -+ done -+ # After the final iteration, append the remaining 48 bytes. -+ printf %48s x || fail=1 -+} > $big || fail=1 - - du -k $big > out1 || fail=1 - rm -f $big diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index c354921..deab516 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -1,9 +1,9 @@ lib/linebuffer.h | 8 src/cut.c | 433 ++++++++++++++++++++++++- src/expand.c | 165 +++++++++ - src/fold.c | 308 ++++++++++++++++-- + src/fold.c | 290 +++++++++++++++-- src/join.c | 363 ++++++++++++++++++--- - src/pr.c | 444 +++++++++++++++++++++++--- + src/pr.c | 435 ++++++++++++++++++++++--- src/sort.c | 745 +++++++++++++++++++++++++++++++++++++++++--- src/unexpand.c | 228 +++++++++++++ src/uniq.c | 265 +++++++++++++++ @@ -18,13 +18,13 @@ tests/misc/sort.pl | 39 ++ tests/misc/unexpand.pl | 39 ++ tests/misc/uniq.pl | 55 +++ - tests/pr/pr-tests.pl | 49 ++ - 21 files changed, 3226 insertions(+), 180 deletions(-) + tests/pr/pr-tests.pl | 50 ++ + 21 files changed, 3198 insertions(+), 182 deletions(-) Index: lib/linebuffer.h =================================================================== ---- lib/linebuffer.h.orig -+++ lib/linebuffer.h +--- lib/linebuffer.h.orig 2015-06-16 07:00:37.000000000 +0200 ++++ lib/linebuffer.h 2015-07-09 17:15:19.619057660 +0200 @@ -21,6 +21,11 @@ # include @@ -49,8 +49,8 @@ Index: lib/linebuffer.h /* Initialize linebuffer LINEBUFFER for use. */ Index: src/cut.c =================================================================== ---- src/cut.c.orig -+++ src/cut.c +--- src/cut.c.orig 2015-06-26 19:05:22.000000000 +0200 ++++ src/cut.c 2015-07-09 17:15:19.619057660 +0200 @@ -28,6 +28,11 @@ #include #include @@ -181,7 +181,7 @@ Index: src/cut.c /* True if the --output-delimiter=STRING option was specified. */ static bool output_delimiter_specified; -@@ -188,7 +266,7 @@ Print selected parts of lines from each +@@ -189,7 +267,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\ @@ -190,7 +190,7 @@ Index: src/cut.c "), stdout); fputs (_("\ --complement complement the set of selected bytes, characters\n\ -@@ -381,6 +459,9 @@ set_fields (const char *fieldstr) +@@ -380,6 +458,9 @@ set_fields (const char *fieldstr) if (operating_mode == byte_mode) error (0, 0, _("byte offset %s is too large"), quote (bad_num)); @@ -200,7 +200,7 @@ Index: src/cut.c else error (0, 0, _("field number %s is too large"), quote (bad_num)); -@@ -505,6 +586,82 @@ cut_bytes (FILE *stream) +@@ -504,6 +585,82 @@ cut_bytes (FILE *stream) } } @@ -283,7 +283,7 @@ Index: src/cut.c /* Read from stream STREAM, printing to standard output any selected fields. */ static void -@@ -649,13 +806,201 @@ cut_fields (FILE *stream) +@@ -648,13 +805,201 @@ cut_fields (FILE *stream) } } @@ -488,7 +488,7 @@ Index: src/cut.c } /* Process file FILE to standard output. -@@ -707,6 +1052,7 @@ main (int argc, char **argv) +@@ -706,6 +1051,7 @@ main (int argc, char **argv) bool ok; bool delim_specified = false; char *spec_list_string IF_LINT ( = NULL); @@ -496,7 +496,7 @@ Index: src/cut.c initialize_main (&argc, &argv); set_program_name (argv[0]); -@@ -729,7 +1075,6 @@ main (int argc, char **argv) +@@ -728,7 +1074,6 @@ main (int argc, char **argv) switch (optc) { case 'b': @@ -504,7 +504,7 @@ Index: src/cut.c /* Build the byte list. */ if (operating_mode != undefined_mode) FATAL_ERROR (_("only one type of list may be specified")); -@@ -737,6 +1082,14 @@ main (int argc, char **argv) +@@ -736,6 +1081,14 @@ main (int argc, char **argv) spec_list_string = optarg; break; @@ -519,7 +519,7 @@ Index: src/cut.c case 'f': /* Build the field list. */ if (operating_mode != undefined_mode) -@@ -748,10 +1101,38 @@ main (int argc, char **argv) +@@ -747,10 +1100,38 @@ main (int argc, char **argv) case 'd': /* New delimiter. */ /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ @@ -562,7 +562,7 @@ Index: src/cut.c break; case OUTPUT_DELIMITER_OPTION: -@@ -764,6 +1145,7 @@ main (int argc, char **argv) +@@ -763,6 +1144,7 @@ main (int argc, char **argv) break; case 'n': @@ -570,7 +570,7 @@ Index: src/cut.c break; case 's': -@@ -803,15 +1185,34 @@ main (int argc, char **argv) +@@ -802,15 +1184,34 @@ main (int argc, char **argv) } if (!delim_specified) @@ -613,8 +613,8 @@ Index: src/cut.c if (optind == argc) Index: src/expand.c =================================================================== ---- src/expand.c.orig -+++ src/expand.c +--- src/expand.c.orig 2015-06-26 19:05:22.000000000 +0200 ++++ src/expand.c 2015-07-09 17:15:19.619057660 +0200 @@ -37,12 +37,34 @@ #include #include @@ -809,44 +809,20 @@ Index: src/expand.c error (EXIT_FAILURE, errno, "-"); Index: src/fold.c =================================================================== ---- src/fold.c.orig -+++ src/fold.c -@@ -22,12 +22,34 @@ +--- src/fold.c.orig 2015-06-26 19:05:22.000000000 +0200 ++++ src/fold.c 2015-07-09 17:17:59.750295812 +0200 +@@ -18,6 +18,10 @@ + + #include + ++#if HAVE_WCHAR_H ++#include ++#endif ++ + #include #include #include - -+/* Get mbstate_t, mbrtowc(), wcwidth(). */ -+#if HAVE_WCHAR_H -+# include -+#endif -+ -+/* Get iswprint(), iswblank(), wcwidth(). */ -+#if HAVE_WCTYPE_H -+# include -+#endif -+ - #include "system.h" - #include "error.h" - #include "fadvise.h" - #include "quote.h" - #include "xstrtol.h" - -+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC -+ installation; work around this configuration error. */ -+#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 -+# undef MB_LEN_MAX -+# define MB_LEN_MAX 16 -+#endif -+ -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ - #define TAB_WIDTH 8 - - /* The official name of this program (e.g., no 'g' prefix). */ -@@ -35,20 +57,41 @@ +@@ -34,20 +38,41 @@ #define AUTHORS proper_name ("David MacKenzie") @@ -892,7 +868,7 @@ Index: src/fold.c {"spaces", no_argument, NULL, 's'}, {"width", required_argument, NULL, 'w'}, {GETOPT_HELP_OPTION_DECL}, -@@ -76,6 +119,7 @@ standard output.\n\ +@@ -75,6 +100,7 @@ Wrap input lines in each FILE, writing t fputs (_("\ -b, --bytes count bytes rather than columns\n\ @@ -900,7 +876,7 @@ Index: src/fold.c -s, --spaces break at spaces\n\ -w, --width=WIDTH use WIDTH columns instead of 80\n\ "), stdout); -@@ -93,7 +137,7 @@ standard output.\n\ +@@ -92,7 +118,7 @@ Wrap input lines in each FILE, writing t static size_t adjust_column (size_t column, char c) { @@ -909,7 +885,7 @@ Index: src/fold.c { if (c == '\b') { -@@ -116,30 +160,14 @@ adjust_column (size_t column, char c) +@@ -115,30 +141,14 @@ adjust_column (size_t column, char c) to stdout, with maximum line length WIDTH. Return true if successful. */ @@ -942,7 +918,7 @@ Index: src/fold.c fadvise (istream, FADVISE_SEQUENTIAL); -@@ -169,6 +197,15 @@ fold_file (char const *filename, size_t +@@ -168,6 +178,15 @@ fold_file (char const *filename, size_t bool found_blank = false; size_t logical_end = offset_out; @@ -958,16 +934,16 @@ Index: src/fold.c /* Look for the last blank. */ while (logical_end) { -@@ -215,11 +252,221 @@ fold_file (char const *filename, size_t +@@ -214,11 +233,221 @@ fold_file (char const *filename, size_t line_out[offset_out++] = c; } - saved_errno = errno; + *saved_errno = errno; -+ -+ if (offset_out) -+ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); -+ + + if (offset_out) + fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); + +} + +#if HAVE_MBRTOWC @@ -1069,7 +1045,7 @@ Index: src/fold.c + fwrite (line_out, sizeof(char), offset_out, stdout); + START_NEW_LINE; + continue; -+ ++ + case L'\b': + increment = (column > 0) ? -1 : 0; + break; @@ -1139,10 +1115,10 @@ Index: src/fold.c + } + + *saved_errno = errno; - - if (offset_out) - fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); - ++ ++ if (offset_out) ++ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); ++ +} +#endif + @@ -1181,7 +1157,7 @@ Index: src/fold.c if (ferror (istream)) { error (0, saved_errno, "%s", filename); -@@ -252,7 +499,8 @@ main (int argc, char **argv) +@@ -251,7 +480,8 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1191,7 +1167,7 @@ Index: src/fold.c while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) { -@@ -261,7 +509,15 @@ main (int argc, char **argv) +@@ -260,7 +490,15 @@ main (int argc, char **argv) switch (optc) { case 'b': /* Count bytes rather than columns. */ @@ -1210,8 +1186,8 @@ Index: src/fold.c case 's': /* Break at word boundaries. */ Index: src/join.c =================================================================== ---- src/join.c.orig -+++ src/join.c +--- src/join.c.orig 2015-06-26 19:05:22.000000000 +0200 ++++ src/join.c 2015-07-09 17:15:19.620057636 +0200 @@ -22,18 +22,32 @@ #include #include @@ -1263,7 +1239,7 @@ Index: src/join.c /* If nonzero, check that the input is correctly ordered. */ static enum -@@ -269,13 +285,14 @@ xfields (struct line *line) +@@ -275,13 +291,14 @@ xfields (struct line *line) if (ptr == lim) return; @@ -1281,7 +1257,7 @@ Index: src/join.c { /* Skip leading blanks before the first field. */ while (isblank (to_uchar (*ptr))) -@@ -299,6 +316,147 @@ xfields (struct line *line) +@@ -305,6 +322,147 @@ xfields (struct line *line) extract_field (line, ptr, lim - ptr); } @@ -1425,11 +1401,11 @@ Index: src/join.c + extract_field (line, ptr, lim - ptr); +} +#endif -+ ++ static void freeline (struct line *line) { -@@ -320,56 +478,133 @@ keycmp (struct line const *line1, struct +@@ -326,56 +484,133 @@ keycmp (struct line const *line1, struct size_t jf_1, size_t jf_2) { /* Start of field to compare in each file. */ @@ -1586,7 +1562,7 @@ Index: src/join.c } /* Check that successive input lines PREV and CURRENT from input file -@@ -461,6 +696,11 @@ get_line (FILE *fp, struct line **linep, +@@ -467,6 +702,11 @@ get_line (FILE *fp, struct line **linep, } ++line_no[which - 1]; @@ -1598,7 +1574,7 @@ Index: src/join.c xfields (line); if (prevline[which - 1]) -@@ -560,21 +800,28 @@ prfield (size_t n, struct line const *li +@@ -566,21 +806,28 @@ prfield (size_t n, struct line const *li /* Output all the fields in line, other than the join field. */ @@ -1630,7 +1606,7 @@ Index: src/join.c prfield (i, line); } } -@@ -585,7 +832,6 @@ static void +@@ -591,7 +838,6 @@ static void prjoin (struct line const *line1, struct line const *line2) { const struct outlist *outlist; @@ -1638,7 +1614,7 @@ Index: src/join.c size_t field; struct line const *line; -@@ -619,7 +865,7 @@ prjoin (struct line const *line1, struct +@@ -625,7 +871,7 @@ prjoin (struct line const *line1, struct o = o->next; if (o == NULL) break; @@ -1647,7 +1623,7 @@ Index: src/join.c } putchar (eolchar); } -@@ -1097,21 +1343,46 @@ main (int argc, char **argv) +@@ -1103,21 +1349,46 @@ main (int argc, char **argv) case 't': { @@ -1706,8 +1682,8 @@ Index: src/join.c case 'z': Index: src/pr.c =================================================================== ---- src/pr.c.orig -+++ src/pr.c +--- src/pr.c.orig 2015-06-26 19:05:22.000000000 +0200 ++++ src/pr.c 2015-07-09 17:36:00.714903141 +0200 @@ -312,6 +312,24 @@ #include @@ -1733,26 +1709,7 @@ Index: src/pr.c #include "system.h" #include "error.h" #include "fadvise.h" -@@ -323,6 +341,18 @@ - #include "strftime.h" - #include "xstrtol.h" - -+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ -+#if HAVE_MBRTOWC && defined mbstate_t -+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -+#endif -+ -+#ifndef HAVE_DECL_WCWIDTH -+"this configure-time declaration test was not run" -+#endif -+#if !HAVE_DECL_WCWIDTH -+extern int wcwidth (); -+#endif -+ - /* The official name of this program (e.g., no 'g' prefix). */ - #define PROGRAM_NAME "pr" - -@@ -415,7 +445,20 @@ struct COLUMN +@@ -416,7 +434,20 @@ struct COLUMN typedef struct COLUMN COLUMN; @@ -1774,23 +1731,26 @@ Index: src/pr.c static bool read_line (COLUMN *p); static bool print_page (void); static bool print_stored (COLUMN *p); -@@ -425,6 +468,7 @@ static void print_header (void); - static void pad_across_to (int position); +@@ -427,8 +458,8 @@ static void pad_across_to (int position) static void add_line_number (COLUMN *p); - static void getoptarg (char *arg, char switch_char, char *character, -+ int *character_length, int *character_width, - int *number); + static void getoptnum (const char *n_str, int min, int *num, + const char *errfmt); +-static void getoptarg (char *arg, char switch_char, char *character, +- int *number); ++static void getoptarg (char *arg, char switch_char, char *character, int *character_length, ++ int *character_width, int *number); static void print_files (int number_of_files, char **av); static void init_parameters (int number_of_files); -@@ -438,7 +482,6 @@ static void store_char (char c); - static void pad_down (int lines); + static void init_header (char const *filename, int desc); +@@ -441,7 +472,6 @@ static void store_char (char c); + static void pad_down (unsigned int lines); static void read_rest_of_line (COLUMN *p); static void skip_read (COLUMN *p, int column_number); -static void print_char (char c); static void cleanup (void); static void print_sep_string (void); static void separator_string (const char *optarg_S); -@@ -450,7 +493,7 @@ static COLUMN *column_vector; +@@ -453,7 +483,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 from line_vector[i], and print up to line_vector[i + 1]. */ @@ -1799,7 +1759,7 @@ Index: src/pr.c /* Index of the position in buff where the next character will be stored. */ -@@ -554,7 +597,7 @@ static int chars_per_column; +@@ -557,7 +587,7 @@ static int chars_per_column; static bool untabify_input = false; /* (-e) The input tab character. */ @@ -1808,7 +1768,7 @@ Index: src/pr.c /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ... where the leftmost column is 1. */ -@@ -564,7 +607,10 @@ static int chars_per_input_tab = 8; +@@ -567,7 +597,10 @@ static int chars_per_input_tab = 8; static bool tabify_output = false; /* (-i) The output tab character. */ @@ -1820,7 +1780,7 @@ Index: src/pr.c /* (-i) The width of the output tab. */ static int chars_per_output_tab = 8; -@@ -634,7 +680,13 @@ static int line_number; +@@ -637,7 +670,13 @@ static int line_number; static bool numbered_lines = false; /* (-n) Character which follows each line number. */ @@ -1835,7 +1795,7 @@ Index: src/pr.c /* (-n) line counting starts with 1st line of input file (not with 1st line of 1st page printed). */ -@@ -687,6 +739,7 @@ static bool use_col_separator = false; +@@ -690,6 +729,7 @@ static bool use_col_separator = false; -a|COLUMN|-m is a 'space' and with the -J option a 'tab'. */ static char *col_sep_string = (char *) ""; static int col_sep_length = 0; @@ -1843,7 +1803,7 @@ Index: src/pr.c static char *column_separator = (char *) " "; static char *line_separator = (char *) "\t"; -@@ -843,6 +896,13 @@ separator_string (const char *optarg_S) +@@ -840,6 +880,13 @@ separator_string (const char *optarg_S) col_sep_length = (int) strlen (optarg_S); col_sep_string = xmalloc (col_sep_length + 1); strcpy (col_sep_string, optarg_S); @@ -1857,7 +1817,7 @@ Index: src/pr.c } int -@@ -867,6 +927,21 @@ main (int argc, char **argv) +@@ -864,6 +911,21 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1879,7 +1839,7 @@ Index: src/pr.c n_files = 0; file_names = (argc > 1 ? xmalloc ((argc - 1) * sizeof (char *)) -@@ -943,8 +1018,12 @@ main (int argc, char **argv) +@@ -940,8 +1002,12 @@ main (int argc, char **argv) break; case 'e': if (optarg) @@ -1894,7 +1854,7 @@ Index: src/pr.c /* Could check tab width > 0. */ untabify_input = true; break; -@@ -957,8 +1036,12 @@ main (int argc, char **argv) +@@ -954,8 +1020,12 @@ main (int argc, char **argv) break; case 'i': if (optarg) @@ -1909,7 +1869,7 @@ Index: src/pr.c /* Could check tab width > 0. */ tabify_output = true; break; -@@ -985,8 +1068,8 @@ main (int argc, char **argv) +@@ -973,8 +1043,8 @@ main (int argc, char **argv) case 'n': numbered_lines = true; if (optarg) @@ -1920,7 +1880,7 @@ Index: src/pr.c break; case 'N': skip_count = false; -@@ -1025,7 +1108,7 @@ main (int argc, char **argv) +@@ -998,7 +1068,7 @@ main (int argc, char **argv) old_s = false; /* Reset an additional input of -s, -S dominates -s */ col_sep_string = bad_cast (""); @@ -1929,7 +1889,7 @@ Index: src/pr.c use_col_separator = true; if (optarg) separator_string (optarg); -@@ -1182,10 +1265,45 @@ main (int argc, char **argv) +@@ -1152,10 +1222,45 @@ getoptnum (const char *n_str, int min, i a number. */ static void @@ -1977,7 +1937,7 @@ Index: src/pr.c if (*arg) { long int tmp_long; -@@ -1207,6 +1325,11 @@ static void +@@ -1177,6 +1282,11 @@ static void init_parameters (int number_of_files) { int chars_used_by_number = 0; @@ -1989,7 +1949,7 @@ Index: src/pr.c lines_per_body = lines_per_page - lines_per_header - lines_per_footer; if (lines_per_body <= 0) -@@ -1244,7 +1367,7 @@ init_parameters (int number_of_files) +@@ -1214,7 +1324,7 @@ init_parameters (int number_of_files) else col_sep_string = column_separator; @@ -1998,7 +1958,7 @@ Index: src/pr.c use_col_separator = true; } /* It's rather pointless to define a TAB separator with column -@@ -1274,11 +1397,11 @@ init_parameters (int number_of_files) +@@ -1244,11 +1354,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. */ @@ -2012,7 +1972,7 @@ Index: src/pr.c /* The number is part of the column width unless we are printing files in parallel. */ -@@ -1287,7 +1410,7 @@ init_parameters (int number_of_files) +@@ -1257,7 +1367,7 @@ init_parameters (int number_of_files) } chars_per_column = (chars_per_line - chars_used_by_number @@ -2021,7 +1981,7 @@ Index: src/pr.c if (chars_per_column < 1) error (EXIT_FAILURE, 0, _("page width too narrow")); -@@ -1305,7 +1428,7 @@ init_parameters (int number_of_files) +@@ -1275,7 +1385,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); @@ -2030,7 +1990,7 @@ Index: src/pr.c } /* Open the necessary files, -@@ -1413,7 +1536,7 @@ init_funcs (void) +@@ -1383,7 +1493,7 @@ init_funcs (void) /* Enlarge p->start_position of first column to use the same form of padding_not_printed with all columns. */ @@ -2039,7 +1999,7 @@ Index: src/pr.c /* This loop takes care of all but the rightmost column. */ -@@ -1447,7 +1570,7 @@ init_funcs (void) +@@ -1417,7 +1527,7 @@ init_funcs (void) } else { @@ -2048,7 +2008,7 @@ Index: src/pr.c h_next = h + chars_per_column; } } -@@ -1738,9 +1861,9 @@ static void +@@ -1708,9 +1818,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -2060,7 +2020,7 @@ Index: src/pr.c padding_not_printed = ANYWHERE; } -@@ -2011,13 +2134,13 @@ store_char (char c) +@@ -1981,13 +2091,13 @@ store_char (char c) /* May be too generous. */ buff = X2REALLOC (buff, &buff_allocated); } @@ -2076,7 +2036,7 @@ Index: src/pr.c char *s; int num_width; -@@ -2034,22 +2157,24 @@ add_line_number (COLUMN *p) +@@ -2004,22 +2114,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. */ @@ -2105,7 +2065,7 @@ Index: src/pr.c output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2210,7 +2335,7 @@ print_white_space (void) +@@ -2180,7 +2292,7 @@ print_white_space (void) while (goal - h_old > 1 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) { @@ -2114,7 +2074,7 @@ Index: src/pr.c h_old = h_new; } while (++h_old <= goal) -@@ -2230,6 +2355,7 @@ print_sep_string (void) +@@ -2200,6 +2312,7 @@ print_sep_string (void) { char *s; int l = col_sep_length; @@ -2122,7 +2082,7 @@ Index: src/pr.c s = col_sep_string; -@@ -2243,6 +2369,7 @@ print_sep_string (void) +@@ -2213,6 +2326,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -2130,7 +2090,7 @@ Index: src/pr.c while (l-- > 0) { /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2256,12 +2383,15 @@ print_sep_string (void) +@@ -2226,12 +2340,15 @@ print_sep_string (void) } else { @@ -2147,7 +2107,7 @@ Index: src/pr.c /* sep_string ends with some spaces */ if (spaces_not_printed > 0) print_white_space (); -@@ -2289,7 +2419,7 @@ print_clump (COLUMN *p, int n, char *clu +@@ -2259,7 +2376,7 @@ print_clump (COLUMN *p, int n, char *clu required number of tabs and spaces. */ static void @@ -2156,7 +2116,7 @@ Index: src/pr.c { if (tabify_output) { -@@ -2313,6 +2443,74 @@ print_char (char c) +@@ -2283,6 +2400,74 @@ print_char (char c) putchar (c); } @@ -2231,7 +2191,7 @@ Index: src/pr.c /* Skip to page PAGE before printing. PAGE may be larger than total number of pages. */ -@@ -2492,9 +2690,9 @@ read_line (COLUMN *p) +@@ -2462,9 +2647,9 @@ read_line (COLUMN *p) align_empty_cols = false; } @@ -2243,7 +2203,7 @@ Index: src/pr.c padding_not_printed = ANYWHERE; } -@@ -2564,7 +2762,7 @@ print_stored (COLUMN *p) +@@ -2534,7 +2719,7 @@ print_stored (COLUMN *p) int i; int line = p->current_line++; @@ -2252,7 +2212,7 @@ Index: src/pr.c /* FIXME UMR: Uninitialized memory read: * This is occurring while in: -@@ -2576,7 +2774,7 @@ print_stored (COLUMN *p) +@@ -2546,7 +2731,7 @@ print_stored (COLUMN *p) xmalloc [xmalloc.c:94] init_store_cols [pr.c:1648] */ @@ -2261,7 +2221,7 @@ Index: src/pr.c pad_vertically = true; -@@ -2595,9 +2793,9 @@ print_stored (COLUMN *p) +@@ -2565,9 +2750,9 @@ print_stored (COLUMN *p) } } @@ -2273,7 +2233,7 @@ Index: src/pr.c padding_not_printed = ANYWHERE; } -@@ -2610,8 +2808,8 @@ print_stored (COLUMN *p) +@@ -2580,8 +2765,8 @@ print_stored (COLUMN *p) if (spaces_not_printed == 0) { output_position = p->start_position + end_vector[line]; @@ -2284,7 +2244,7 @@ Index: src/pr.c } return true; -@@ -2630,7 +2828,7 @@ print_stored (COLUMN *p) +@@ -2600,7 +2785,7 @@ print_stored (COLUMN *p) number of characters is 1.) */ static int @@ -2293,7 +2253,7 @@ Index: src/pr.c { unsigned char uc = c; char *s = clump_buff; -@@ -2640,10 +2838,10 @@ char_to_clump (char c) +@@ -2610,10 +2795,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8; @@ -2306,7 +2266,7 @@ Index: src/pr.c { width = TAB_WIDTH (chars_per_c, input_position); -@@ -2724,6 +2922,164 @@ char_to_clump (char c) +@@ -2694,6 +2879,164 @@ char_to_clump (char c) return chars; } @@ -2473,8 +2433,8 @@ Index: src/pr.c Index: src/sort.c =================================================================== ---- src/sort.c.orig -+++ src/sort.c +--- src/sort.c.orig 2015-06-26 19:05:22.000000000 +0200 ++++ src/sort.c 2015-07-09 17:28:20.750707716 +0200 @@ -29,6 +29,14 @@ #include #include @@ -2548,7 +2508,7 @@ Index: src/sort.c /* Flag to remove consecutive duplicate lines from the output. Only the last of a sequence of equal lines will be output. */ -@@ -811,6 +842,46 @@ reap_all (void) +@@ -810,6 +841,46 @@ reap_all (void) reap (-1); } @@ -2595,7 +2555,7 @@ Index: src/sort.c /* Clean up any remaining temporary files. */ static void -@@ -1255,7 +1326,7 @@ zaptemp (char const *name) +@@ -1254,7 +1325,7 @@ zaptemp (char const *name) free (node); } @@ -2604,7 +2564,7 @@ Index: src/sort.c static int struct_month_cmp (void const *m1, void const *m2) -@@ -1270,7 +1341,7 @@ struct_month_cmp (void const *m1, void c +@@ -1269,7 +1340,7 @@ struct_month_cmp (void const *m1, void c /* Initialize the character class tables. */ static void @@ -2613,7 +2573,7 @@ Index: src/sort.c { size_t i; -@@ -1282,7 +1353,7 @@ inittables (void) +@@ -1281,7 +1352,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -2622,7 +2582,7 @@ Index: src/sort.c /* If we're not in the "C" locale, read different names for months. */ if (hard_LC_TIME) { -@@ -1364,6 +1435,84 @@ specify_nmerge (int oi, char c, char con +@@ -1363,6 +1434,84 @@ specify_nmerge (int oi, char c, char con xstrtol_fatal (e, oi, c, long_options, s); } @@ -2707,7 +2667,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) -@@ -1597,7 +1746,7 @@ buffer_linelim (struct buffer const *buf +@@ -1596,7 +1745,7 @@ buffer_linelim (struct buffer const *buf by KEY in LINE. */ static char * @@ -2716,7 +2676,7 @@ Index: src/sort.c { char *ptr = line->text, *lim = ptr + line->length - 1; size_t sword = key->sword; -@@ -1606,10 +1755,10 @@ begfield (struct line const *line, struc +@@ -1605,10 +1754,10 @@ begfield (struct line const *line, struc /* The leading field separator itself is included in a field when -t is absent. */ @@ -2729,7 +2689,7 @@ Index: src/sort.c ++ptr; if (ptr < lim) ++ptr; -@@ -1635,11 +1784,70 @@ begfield (struct line const *line, struc +@@ -1634,11 +1783,70 @@ begfield (struct line const *line, struc return ptr; } @@ -2801,7 +2761,7 @@ Index: src/sort.c { char *ptr = line->text, *lim = ptr + line->length - 1; size_t eword = key->eword, echar = key->echar; -@@ -1654,10 +1862,10 @@ limfield (struct line const *line, struc +@@ -1653,10 +1861,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. */ @@ -2814,7 +2774,7 @@ Index: src/sort.c ++ptr; if (ptr < lim && (eword || echar)) ++ptr; -@@ -1703,10 +1911,10 @@ limfield (struct line const *line, struc +@@ -1702,10 +1910,10 @@ limfield (struct line const *line, struc */ /* Make LIM point to the end of (one byte past) the current field. */ @@ -2827,7 +2787,7 @@ Index: src/sort.c if (newlim) lim = newlim; } -@@ -1737,6 +1945,130 @@ limfield (struct line const *line, struc +@@ -1736,6 +1944,130 @@ limfield (struct line const *line, struc return ptr; } @@ -2958,7 +2918,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 -@@ -1823,8 +2155,22 @@ fillbuf (struct buffer *buf, FILE *fp, c +@@ -1822,8 +2154,22 @@ fillbuf (struct buffer *buf, FILE *fp, c else { if (key->skipsblanks) @@ -2983,7 +2943,7 @@ Index: src/sort.c line->keybeg = line_start; } } -@@ -1945,7 +2291,7 @@ human_numcompare (char const *a, char co +@@ -1944,7 +2290,7 @@ human_numcompare (char const *a, char co hideously fast. */ static int @@ -2992,7 +2952,7 @@ Index: src/sort.c { while (blanks[to_uchar (*a)]) a++; -@@ -1955,6 +2301,25 @@ numcompare (char const *a, char const *b +@@ -1954,6 +2300,25 @@ numcompare (char const *a, char const *b return strnumcmp (a, b, decimal_point, thousands_sep); } @@ -3018,7 +2978,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 once -@@ -2005,7 +2370,7 @@ general_numcompare (char const *sa, char +@@ -2004,7 +2369,7 @@ general_numcompare (char const *sa, char Return 0 if the name in S is not recognized. */ static int @@ -3027,7 +2987,7 @@ Index: src/sort.c { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -2280,15 +2645,14 @@ debug_key (struct line const *line, stru +@@ -2279,15 +2644,14 @@ debug_key (struct line const *line, stru char saved = *lim; *lim = '\0'; @@ -3045,7 +3005,7 @@ Index: src/sort.c else if (key->general_numeric) ignore_value (strtold (beg, &tighter_lim)); else if (key->numeric || key->human_numeric) -@@ -2432,7 +2796,7 @@ key_warnings (struct keyfield const *gke +@@ -2431,7 +2795,7 @@ key_warnings (struct keyfield const *gke bool maybe_space_aligned = !hard_LC_COLLATE && default_key_compare (key) && !(key->schar || key->echar); bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */ @@ -3054,7 +3014,7 @@ Index: src/sort.c && ((!key->skipsblanks && !(implicit_skip || maybe_space_aligned)) || (!key->skipsblanks && key->schar) || (!key->skipeblanks && key->echar))) -@@ -2490,11 +2854,87 @@ key_warnings (struct keyfield const *gke +@@ -2489,11 +2853,87 @@ key_warnings (struct keyfield const *gke error (0, 0, _("option '-r' only applies to last-resort comparison")); } @@ -3143,7 +3103,7 @@ Index: src/sort.c { struct keyfield *key = keylist; -@@ -2579,7 +3019,7 @@ keycompare (struct line const *a, struct +@@ -2578,7 +3018,7 @@ keycompare (struct line const *a, struct else if (key->human_numeric) diff = human_numcompare (ta, tb); else if (key->month) @@ -3152,7 +3112,7 @@ Index: src/sort.c else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2695,6 +3135,193 @@ keycompare (struct line const *a, struct +@@ -2694,6 +3134,193 @@ keycompare (struct line const *a, struct return key->reverse ? -diff : diff; } @@ -3346,7 +3306,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. */ -@@ -2722,7 +3349,7 @@ compare (struct line const *a, struct li +@@ -2721,7 +3348,7 @@ compare (struct line const *a, struct li diff = - NONZERO (blen); else if (blen == 0) diff = 1; @@ -3355,7 +3315,7 @@ Index: src/sort.c { /* Note xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4121,6 +4748,7 @@ set_ordering (char const *s, struct keyf +@@ -4120,6 +4747,7 @@ set_ordering (char const *s, struct keyf break; case 'f': key->translate = fold_toupper; @@ -3363,7 +3323,7 @@ Index: src/sort.c break; case 'g': key->general_numeric = true; -@@ -4198,7 +4826,7 @@ main (int argc, char **argv) +@@ -4197,7 +4825,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -3372,7 +3332,7 @@ Index: src/sort.c hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4219,6 +4847,29 @@ main (int argc, char **argv) +@@ -4218,6 +4846,29 @@ main (int argc, char **argv) thousands_sep = -1; } @@ -3402,7 +3362,7 @@ Index: src/sort.c have_read_stdin = false; inittables (); -@@ -4493,13 +5144,34 @@ main (int argc, char **argv) +@@ -4492,13 +5143,34 @@ main (int argc, char **argv) case 't': { @@ -3441,7 +3401,7 @@ Index: src/sort.c else { /* Provoke with 'sort -txx'. Complain about -@@ -4510,9 +5182,12 @@ main (int argc, char **argv) +@@ -4509,9 +5181,12 @@ main (int argc, char **argv) quote (optarg)); } } @@ -3458,8 +3418,8 @@ Index: src/sort.c Index: src/unexpand.c =================================================================== ---- src/unexpand.c.orig -+++ src/unexpand.c +--- src/unexpand.c.orig 2015-06-26 19:05:22.000000000 +0200 ++++ src/unexpand.c 2015-07-09 17:15:19.622057589 +0200 @@ -38,12 +38,29 @@ #include #include @@ -3717,8 +3677,8 @@ Index: src/unexpand.c error (EXIT_FAILURE, errno, "-"); Index: src/uniq.c =================================================================== ---- src/uniq.c.orig -+++ src/uniq.c +--- src/uniq.c.orig 2015-06-26 19:04:19.000000000 +0200 ++++ src/uniq.c 2015-07-09 17:15:19.622057589 +0200 @@ -21,6 +21,17 @@ #include #include @@ -3828,7 +3788,7 @@ Index: src/uniq.c + while (pos < size) + { + MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail); -+ ++ + if (convfail || !iswblank (wc)) + { + pos += mblength; @@ -3871,7 +3831,7 @@ Index: src/uniq.c if (check_chars < oldlen) oldlen = check_chars; if (check_chars < newlen) -@@ -286,15 +392,104 @@ different (char *old, char *new, size_t +@@ -286,14 +392,103 @@ different (char *old, char *new, size_t if (ignore_case) { @@ -3903,8 +3863,8 @@ Index: src/uniq.c + + return xmemcoll (copy_old, oldlen, copy_new, newlen); + - } - ++} ++ +#if HAVE_MBRTOWC +static int +different_multi (const char *old, const char *new, size_t oldlen, size_t newlen, mbstate_t oldstate, mbstate_t newstate) @@ -3975,12 +3935,11 @@ Index: src/uniq.c + free (copy[1]); + return rc; + -+} + } +#endif -+ + /* Output the line in linebuffer LINE to standard output provided that the switches say it should be output. - MATCH is true if the line matches the previous line. @@ -358,19 +553,38 @@ check_file (const char *infile, const ch char *prevfield IF_LINT ( = NULL); size_t prevlen IF_LINT ( = 0); @@ -4103,11 +4062,45 @@ Index: src/uniq.c skip_chars = 0; skip_fields = 0; check_chars = SIZE_MAX; +Index: tests/i18n/sort.sh +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ tests/i18n/sort.sh 2015-07-09 17:15:19.622057589 +0200 +@@ -0,0 +1,29 @@ ++#!/bin/sh ++# Verify sort's multi-byte support. ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ sort ++ ++export LC_ALL=en_US.UTF-8 ++locale -k LC_CTYPE | grep -q "charmap.*UTF-8" \ ++ || skip_ "No UTF-8 locale available" ++ ++# Enable heap consistency checkng on older systems ++export MALLOC_CHECK_=2 ++ ++ ++# check buffer overflow issue due to ++# expanding multi-byte representation due to case conversion ++# https://bugzilla.suse.com/show_bug.cgi?id=928749 ++cat < exp ++. ++ɑ ++EOF ++cat < out || fail=1 ++. ++ɑ ++EOF ++compare exp out || { fail=1; cat out; } ++ ++ ++Exit $fail Index: tests/local.mk =================================================================== ---- tests/local.mk.orig -+++ tests/local.mk -@@ -331,6 +331,7 @@ all_tests = \ +--- tests/local.mk.orig 2015-07-03 14:03:55.000000000 +0200 ++++ tests/local.mk 2015-07-09 17:28:19.101746451 +0200 +@@ -341,6 +341,7 @@ all_tests = \ tests/misc/sort-discrim.sh \ tests/misc/sort-files0-from.pl \ tests/misc/sort-float.sh \ @@ -4115,7 +4108,7 @@ Index: tests/local.mk tests/misc/sort-merge.pl \ tests/misc/sort-merge-fdlimit.sh \ tests/misc/sort-month.sh \ -@@ -516,6 +517,7 @@ all_tests = \ +@@ -532,6 +533,7 @@ all_tests = \ tests/du/threshold.sh \ tests/du/trailing-slash.sh \ tests/du/two-args.sh \ @@ -4125,8 +4118,8 @@ Index: tests/local.mk tests/id/context.sh \ Index: tests/misc/cut.pl =================================================================== ---- tests/misc/cut.pl.orig -+++ tests/misc/cut.pl +--- tests/misc/cut.pl.orig 2015-06-26 19:04:19.000000000 +0200 ++++ tests/misc/cut.pl 2015-07-09 17:15:19.622057589 +0200 @@ -23,9 +23,11 @@ use strict; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4151,8 +4144,8 @@ Index: tests/misc/cut.pl push @Tests, @new; Index: tests/misc/expand.pl =================================================================== ---- tests/misc/expand.pl.orig -+++ tests/misc/expand.pl +--- tests/misc/expand.pl.orig 2015-06-26 19:04:19.000000000 +0200 ++++ tests/misc/expand.pl 2015-07-09 17:15:19.622057589 +0200 @@ -23,6 +23,15 @@ use strict; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4209,8 +4202,8 @@ Index: tests/misc/expand.pl Index: tests/misc/fold.pl =================================================================== ---- tests/misc/fold.pl.orig -+++ tests/misc/fold.pl +--- tests/misc/fold.pl.orig 2015-06-26 19:04:19.000000000 +0200 ++++ tests/misc/fold.pl 2015-07-09 17:15:19.623057566 +0200 @@ -20,9 +20,18 @@ use strict; (my $program_name = $0) =~ s|.*/||; @@ -4282,8 +4275,8 @@ Index: tests/misc/fold.pl exit $fail; Index: tests/misc/join.pl =================================================================== ---- tests/misc/join.pl.orig -+++ tests/misc/join.pl +--- tests/misc/join.pl.orig 2015-06-26 19:04:19.000000000 +0200 ++++ tests/misc/join.pl 2015-07-09 17:15:19.623057566 +0200 @@ -25,6 +25,15 @@ my $limits = getlimits (); my $prog = 'join'; @@ -4352,8 +4345,8 @@ Index: tests/misc/join.pl Index: tests/misc/sort-mb-tests.sh =================================================================== ---- /dev/null -+++ tests/misc/sort-mb-tests.sh +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ tests/misc/sort-mb-tests.sh 2015-07-09 17:15:19.623057566 +0200 @@ -0,0 +1,45 @@ +#!/bin/sh +# Verify sort's multi-byte support. @@ -4402,8 +4395,8 @@ Index: tests/misc/sort-mb-tests.sh +Exit $fail Index: tests/misc/sort-merge.pl =================================================================== ---- tests/misc/sort-merge.pl.orig -+++ tests/misc/sort-merge.pl +--- tests/misc/sort-merge.pl.orig 2015-06-26 19:04:19.000000000 +0200 ++++ tests/misc/sort-merge.pl 2015-07-09 17:15:19.623057566 +0200 @@ -26,6 +26,15 @@ my $prog = 'sort'; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4462,8 +4455,8 @@ Index: tests/misc/sort-merge.pl Index: tests/misc/sort.pl =================================================================== ---- tests/misc/sort.pl.orig -+++ tests/misc/sort.pl +--- tests/misc/sort.pl.orig 2015-06-26 19:04:19.000000000 +0200 ++++ tests/misc/sort.pl 2015-07-09 17:28:20.750707716 +0200 @@ -24,10 +24,15 @@ my $prog = 'sort'; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4481,7 +4474,7 @@ Index: tests/misc/sort.pl # Since each test is run with a file name and with redirected stdin, # the name in the diagnostic is either the file name or "-". # Normalize each diagnostic to use '-'. -@@ -415,6 +420,37 @@ foreach my $t (@Tests) +@@ -419,6 +424,37 @@ foreach my $t (@Tests) } } @@ -4519,7 +4512,7 @@ Index: tests/misc/sort.pl @Tests = triple_test \@Tests; # Remember that triple_test creates from each test with exactly one "IN" -@@ -424,6 +460,7 @@ foreach my $t (@Tests) +@@ -428,6 +464,7 @@ foreach my $t (@Tests) # Remove the IN_PIPE version of the "output-is-input" test above. # The others aren't susceptible because they have three inputs each. @Tests = grep {$_->[0] ne 'output-is-input.p'} @Tests; @@ -4529,8 +4522,8 @@ Index: tests/misc/sort.pl my $verbose = $ENV{VERBOSE}; Index: tests/misc/unexpand.pl =================================================================== ---- tests/misc/unexpand.pl.orig -+++ tests/misc/unexpand.pl +--- tests/misc/unexpand.pl.orig 2015-06-26 19:04:19.000000000 +0200 ++++ tests/misc/unexpand.pl 2015-07-09 17:15:19.623057566 +0200 @@ -27,6 +27,14 @@ my $limits = getlimits (); my $prog = 'unexpand'; @@ -4586,8 +4579,8 @@ Index: tests/misc/unexpand.pl Index: tests/misc/uniq.pl =================================================================== ---- tests/misc/uniq.pl.orig -+++ tests/misc/uniq.pl +--- tests/misc/uniq.pl.orig 2015-06-26 19:04:19.000000000 +0200 ++++ tests/misc/uniq.pl 2015-07-09 17:15:19.623057566 +0200 @@ -23,9 +23,17 @@ my $limits = getlimits (); my $prog = 'uniq'; my $try = "Try '$prog --help' for more information.\n"; @@ -4662,12 +4655,13 @@ Index: tests/misc/uniq.pl Index: tests/pr/pr-tests.pl =================================================================== ---- tests/pr/pr-tests.pl.orig -+++ tests/pr/pr-tests.pl -@@ -23,6 +23,15 @@ use strict; +--- tests/pr/pr-tests.pl.orig 2015-06-26 19:04:19.000000000 +0200 ++++ tests/pr/pr-tests.pl 2015-07-09 17:15:19.624057542 +0200 +@@ -22,6 +22,16 @@ use strict; + @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; my $prog = 'pr'; - ++ +my $mb_locale; +#Uncomment the following line to enable multibyte tests +$mb_locale = $ENV{LOCALE_FR_UTF8}; @@ -4677,10 +4671,10 @@ Index: tests/pr/pr-tests.pl +my $try = "Try \`$prog --help' for more information.\n"; +my $inval = "$prog: invalid byte, character or field list\n$try"; + - my @tv = ( + my $normalize_strerror = "s/': .*/'/"; - # -b option is no longer an official option. But it's still working to -@@ -466,8 +475,48 @@ push @Tests, + my @tv = ( +@@ -467,8 +477,48 @@ push @Tests, {IN=>{3=>"x\ty\tz\n"}}, {OUT=>join("\t", qw(a b c m n o x y z)) . "\n"} ]; @@ -4729,37 +4723,3 @@ Index: tests/pr/pr-tests.pl my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; -Index: tests/i18n/sort.sh -=================================================================== ---- /dev/null -+++ tests/i18n/sort.sh -@@ -0,0 +1,29 @@ -+#!/bin/sh -+# Verify sort's multi-byte support. -+ -+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src -+print_ver_ sort -+ -+export LC_ALL=en_US.UTF-8 -+locale -k LC_CTYPE | grep -q "charmap.*UTF-8" \ -+ || skip_ "No UTF-8 locale available" -+ -+# Enable heap consistency checkng on older systems -+export MALLOC_CHECK_=2 -+ -+ -+# check buffer overflow issue due to -+# expanding multi-byte representation due to case conversion -+# https://bugzilla.suse.com/show_bug.cgi?id=928749 -+cat < exp -+. -+ɑ -+EOF -+cat < out || fail=1 -+. -+ɑ -+EOF -+compare exp out || { fail=1; cat out; } -+ -+ -+Exit $fail diff --git a/coreutils-misc.patch b/coreutils-misc.patch index 44d99d3..50259bf 100644 --- a/coreutils-misc.patch +++ b/coreutils-misc.patch @@ -1,13 +1,13 @@ --- - gnulib-tests/test-isnanl.h | 4 +++- + gnulib-tests/test-isnanl.h | 5 +++-- tests/misc/help-version.sh | 1 + tests/other-fs-tmpdir | 3 +++ - 3 files changed, 7 insertions(+), 1 deletion(-) + 3 files changed, 7 insertions(+), 2 deletions(-) Index: gnulib-tests/test-isnanl.h =================================================================== ---- gnulib-tests/test-isnanl.h.orig -+++ gnulib-tests/test-isnanl.h +--- gnulib-tests/test-isnanl.h.orig 2015-07-09 14:59:20.897259261 +0200 ++++ gnulib-tests/test-isnanl.h 2015-07-09 15:04:01.173639553 +0200 @@ -47,7 +47,7 @@ main () /* Quiet NaN. */ ASSERT (isnanl (NaNl ())); @@ -22,22 +22,22 @@ Index: gnulib-tests/test-isnanl.h ASSERT (isnanl (x.value)); } +#if 0 - /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, - Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in - Intel IA-64 Architecture Software Developer's Manual, Volume 1: -@@ -131,6 +132,7 @@ main () - ASSERT (isnanl (x.value)); + /* isnanl should return something for noncanonical values. */ + { /* Pseudo-NaN. */ + static memory_long_double x = +@@ -125,6 +126,6 @@ main () + ASSERT (isnanl (x.value) || !isnanl (x.value)); } #endif +- +#endif - return 0; } Index: tests/misc/help-version.sh =================================================================== ---- tests/misc/help-version.sh.orig -+++ tests/misc/help-version.sh -@@ -240,6 +240,7 @@ parted_setup () { args="-s $tmp_in mklab +--- tests/misc/help-version.sh.orig 2015-07-09 14:59:20.897259261 +0200 ++++ tests/misc/help-version.sh 2015-07-09 14:59:27.227110899 +0200 +@@ -237,6 +237,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 @@ -47,8 +47,8 @@ Index: tests/misc/help-version.sh echo z |gzip > $zin Index: tests/other-fs-tmpdir =================================================================== ---- tests/other-fs-tmpdir.orig -+++ tests/other-fs-tmpdir +--- tests/other-fs-tmpdir.orig 2015-07-09 14:59:20.898259238 +0200 ++++ tests/other-fs-tmpdir 2015-07-09 14:59:27.227110899 +0200 @@ -43,6 +43,9 @@ for d in $CANDIDATE_TMP_DIRS; do done diff --git a/coreutils-ocfs2_reflinks.patch b/coreutils-ocfs2_reflinks.patch index bf1814a..3b02b60 100644 --- a/coreutils-ocfs2_reflinks.patch +++ b/coreutils-ocfs2_reflinks.patch @@ -11,15 +11,15 @@ Subject: [PATCH 1/1] copy: add OCFS2 reflink support Signed-off-by: Jie Liu --- - src/copy.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 90 insertions(+), 8 deletions(-) + src/copy.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 91 insertions(+), 8 deletions(-) Index: src/copy.c =================================================================== ---- src/copy.c.orig -+++ src/copy.c -@@ -229,6 +229,46 @@ sparse_copy (int src_fd, int dest_fd, ch - return true; +--- src/copy.c.orig 2015-06-26 19:05:22.000000000 +0200 ++++ src/copy.c 2015-07-09 14:58:48.105027875 +0200 +@@ -324,6 +324,47 @@ sparse_copy (int src_fd, int dest_fd, ch + return true; } +/* Perform the OCFS2 CoW reflink ioctl(2) operation if possible. @@ -61,11 +61,12 @@ Index: src/copy.c + return -1; +#endif +} ++ + /* Perform the O(1) btrfs clone operation, if possible. Upon success, return 0. Otherwise, return -1 and set errno. */ static inline int -@@ -938,6 +978,45 @@ copy_reg (char const *src_name, char con +@@ -1040,6 +1081,45 @@ copy_reg (char const *src_name, char con goto close_src_desc; } @@ -111,7 +112,7 @@ Index: src/copy.c /* The semantics of the following open calls are mandated by the specs for both cp and mv. */ if (! *new_dst) -@@ -1083,17 +1162,20 @@ copy_reg (char const *src_name, char con +@@ -1185,17 +1265,20 @@ copy_reg (char const *src_name, char con /* --attributes-only overrides --reflink. */ if (data_copy_required && x->reflink_mode) { diff --git a/coreutils-remove_hostname_documentation.patch b/coreutils-remove_hostname_documentation.patch index 4a6a647..2363b6a 100644 --- a/coreutils-remove_hostname_documentation.patch +++ b/coreutils-remove_hostname_documentation.patch @@ -1,11 +1,11 @@ --- - doc/coreutils.texi | 38 +------------------------------------- - 1 file changed, 1 insertion(+), 37 deletions(-) + doc/coreutils.texi | 42 +----------------------------------------- + 1 file changed, 1 insertion(+), 41 deletions(-) Index: doc/coreutils.texi =================================================================== ---- doc/coreutils.texi.orig -+++ doc/coreutils.texi +--- doc/coreutils.texi.orig 2015-06-26 19:05:22.000000000 +0200 ++++ doc/coreutils.texi 2015-07-09 14:53:28.486520508 +0200 @@ -69,7 +69,6 @@ * groups: (coreutils)groups invocation. Print group names a user is in. * head: (coreutils)head invocation. Output the first part of files. @@ -23,7 +23,7 @@ Index: doc/coreutils.texi * SELinux context:: chcon runcon * Modified command invocation:: chroot env nice nohup stdbuf timeout * Process control:: kill -@@ -421,7 +420,6 @@ System context +@@ -420,7 +419,6 @@ System context * date invocation:: Print or set system date and time * nproc invocation:: Print the number of processors * uname invocation:: Print system information @@ -31,7 +31,7 @@ Index: doc/coreutils.texi * hostid invocation:: Print numeric host identifier * uptime invocation:: Print system uptime and load -@@ -14922,7 +14920,6 @@ information. +@@ -14793,7 +14791,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 -@@ -15744,15 +15741,6 @@ easily available, as is the case with Li +@@ -15618,15 +15615,6 @@ easily available, as is the case with Li 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 -@@ -15806,30 +15794,6 @@ Print the kernel version. +@@ -15680,34 +15668,6 @@ Print the kernel version. @exitstatus @@ -81,6 +81,10 @@ Index: doc/coreutils.texi -The only options are @option{--help} and @option{--version}. @xref{Common -options}. - +-@command{hostname} is not installed by default, and other packages +-also supply a @command{hostname} command, so portable scripts should +-not rely on its existence or on the exact behavior documented above. +- -@exitstatus - diff --git a/coreutils-remove_kill_documentation.patch b/coreutils-remove_kill_documentation.patch index 1c3e5e8..10b8943 100644 --- a/coreutils-remove_kill_documentation.patch +++ b/coreutils-remove_kill_documentation.patch @@ -4,8 +4,8 @@ Index: doc/coreutils.texi =================================================================== ---- doc/coreutils.texi.orig -+++ doc/coreutils.texi +--- doc/coreutils.texi.orig 2015-07-09 14:53:50.295009198 +0200 ++++ doc/coreutils.texi 2015-07-09 14:54:48.805637437 +0200 @@ -72,7 +72,6 @@ * id: (coreutils)id invocation. Print user identity. * install: (coreutils)install invocation. Copy files and set attributes. @@ -20,9 +20,9 @@ Index: doc/coreutils.texi * Modified command invocation:: chroot env nice nohup stdbuf timeout -* Process control:: kill * Delaying:: sleep - * Numeric operations:: factor seq + * Numeric operations:: factor numfmt seq * File permissions:: Access modes -@@ -448,10 +446,6 @@ Modified command invocation +@@ -447,10 +445,6 @@ Modified command invocation * stdbuf invocation:: Run a command with modified I/O buffering * timeout invocation:: Run a command with a time limit @@ -33,7 +33,7 @@ Index: doc/coreutils.texi Delaying * sleep invocation:: Delay for a specified time -@@ -16688,90 +16682,6 @@ the exit status of @var{command} otherwi +@@ -16602,90 +16596,6 @@ the exit status of @var{command} otherwi @end display diff --git a/coreutils-skip-gnulib-test-tls.patch b/coreutils-skip-gnulib-test-tls.patch index 972566e..513cc14 100644 --- a/coreutils-skip-gnulib-test-tls.patch +++ b/coreutils-skip-gnulib-test-tls.patch @@ -19,9 +19,9 @@ with a diagnostic like: Index: gnulib-tests/gnulib.mk =================================================================== ---- gnulib-tests/gnulib.mk.orig -+++ gnulib-tests/gnulib.mk -@@ -2206,9 +2206,10 @@ EXTRA_DIST += test-time.c +--- gnulib-tests/gnulib.mk.orig 2015-06-19 13:24:05.000000000 +0200 ++++ gnulib-tests/gnulib.mk 2015-07-09 15:11:24.099160681 +0200 +@@ -2238,9 +2238,10 @@ EXTRA_DIST += test-time.c ## begin gnulib module tls-tests diff --git a/coreutils-test_without_valgrind.patch b/coreutils-test_without_valgrind.patch index ce39d8a..c5e6e22 100644 --- a/coreutils-test_without_valgrind.patch +++ b/coreutils-test_without_valgrind.patch @@ -4,8 +4,8 @@ Index: tests/misc/shuf-reservoir.sh =================================================================== ---- tests/misc/shuf-reservoir.sh.orig -+++ tests/misc/shuf-reservoir.sh +--- tests/misc/shuf-reservoir.sh.orig 2015-07-09 16:52:02.577880662 +0200 ++++ tests/misc/shuf-reservoir.sh 2015-07-09 16:59:38.928158153 +0200 @@ -37,8 +37,7 @@ run_shuf_n() # Critical memory-related bugs will cause a segfault here diff --git a/coreutils-tests-aarch64-env.patch b/coreutils-tests-aarch64-env.patch deleted file mode 100644 index cc6303d..0000000 --- a/coreutils-tests-aarch64-env.patch +++ /dev/null @@ -1,45 +0,0 @@ -Upstream patch on top of v8.23; to be removed in v8.24. -Avoid a false positive failure of the coreutils-testsuite. -http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=bfb4f5c8b7 - -Related execve() bug report: -https://bugzilla.novell.com/show_bug.cgi?id=915889 - -From bfb4f5c8b791fdcc3cdba87a5182fc684fa8cd24 Mon Sep 17 00:00:00 2001 -From: Bernhard Voelker -Date: Tue, 3 Feb 2015 01:52:04 +0100 -Subject: [PATCH] tests: avoid a FP on aarch64 when comparing env/printenv - output - -The following test fails on aarch64 on openSUSE's OpenBuildService -due to glibc's execvp reversing the pointers of 'environ', i.e., -the output of "env|tac" equals "env env" on that platform. - -* tests/misc/printenv.sh: Use 'env env' to work around the behavior -on that platform. -While at it, fix the grep pattern which suppressed all environment -variables starting with an underscore "_" instead of "$_" (and -"$LD_PRELOAD") only. ---- - tests/misc/printenv.sh | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -Index: tests/misc/printenv.sh -=================================================================== ---- tests/misc/printenv.sh.orig -+++ tests/misc/printenv.sh -@@ -23,8 +23,12 @@ print_ver_ printenv - # printenv as a builtin, so we must invoke it via "env". - # But beware of $_, set by many shells to the last command run. - # Also, filter out LD_PRELOAD, which is set when running under valgrind. --env | grep -Ev '^(_|LD_PRELOAD=)' > exp || framework_failure_ --env -- printenv | grep -Ev '^(_|LD_PRELOAD=)' > out || fail=1 -+# Note the apparently redundant "env env": this is to ensure to get -+# env's output the same way as that of printenv and works around a bug -+# on aarch64 at least where libc's execvp reverses the order of the -+# output. -+env -- env | grep -Ev '^(_|LD_PRELOAD)=' > exp || framework_failure_ -+env -- printenv | grep -Ev '^(_|LD_PRELOAD)=' > out || fail=1 - compare exp out || fail=1 - - # POSIX is clear that environ may, but need not be, sorted. diff --git a/coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch b/coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch deleted file mode 100644 index 90477cd..0000000 --- a/coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch +++ /dev/null @@ -1,100 +0,0 @@ -Upstream patch on top of v8.23 (to be removed with v8.24). -http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=111a2b91da - -From 111a2b91da142bf6fb9edb7836c1979ba698cf6e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= -Date: Wed, 29 Oct 2014 14:08:05 +0000 -Subject: [PATCH] tests: make inotify-rotate more robust and efficient - -* tests/tail-2/inotify-rotate.sh: Use retry_delay_ -to employ an exponential backoff with a total delay of -up to 25.5s. The 15s delay was seen to trigger a false -failure in http://hydra.nixos.org/build/16546517 -Also remove the .1s sleep in each of the 50 iterations -to reduce the running time of the test and thus the -expensive_ tag on this test was removed. -Also ensure that we use the standard exit procedure -upon failure to avoid any erroneous diagnostics due -to persistent files on NFS. ---- - tests/tail-2/inotify-rotate.sh | 45 ++++++++++++++++++++++------------------- - 1 file changed, 25 insertions(+), 20 deletions(-) - -Index: tests/tail-2/inotify-rotate.sh -=================================================================== ---- tests/tail-2/inotify-rotate.sh.orig -+++ tests/tail-2/inotify-rotate.sh -@@ -22,48 +22,53 @@ if test "$VERBOSE" = yes; then - fi - - . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src --expensive_ - --# Wait several seconds for grep REGEXP FILE to succeed. --# Usage: grep_timeout REGEXP FILE --grep_timeout() -+check_tail_output() - { -- local j -- for j in $(seq 150); do -- grep $1 $2 > /dev/null && return 0 -- sleep 0.1 -- done -- return 1 -+ local delay="$1" -+ grep "$tail_re" out > /dev/null || -+ { sleep $delay; return 1; } - } - -+# Wait up to 25.5 seconds for grep REGEXP 'out' to succeed. -+grep_timeout() { tail_re="$1" retry_delay_ check_tail_output .1 8; } -+ - # For details, see - # http://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00213.html - -+cleanup_fail() -+{ -+ cat out -+ warn_ $1 -+ kill $pid -+} -+ - # Perform at least this many iterations, because on multi-core systems - # the offending sequence of events can be surprisingly uncommon. - for i in $(seq 50); do - echo $i -- rm -rf k x out -+ rm -f k x out -+ - # Normally less than a second is required here, but with heavy load - # and a lot of disk activity, even 20 seconds is insufficient, which - # leads to this timeout killing tail before the "ok" is written below. - >k && >x || framework_failure_ failed to initialize files -- timeout 40 tail -F k > out 2>&1 & -+ timeout 60 tail -F k > out 2>&1 & - pid=$! -- sleep .1 -+ - echo b > k; - # wait for b to appear in out -- grep_timeout b out || fail_ failed to find b in out -- while :; do grep b out > /dev/null && break; done -+ grep_timeout 'b' || { cleanup_fail 'failed to find b in out'; break; } -+ - mv x k - # wait for tail to detect the rename -- grep_timeout tail: out || { cat out; fail_ failed to detect rename; } -+ grep_timeout 'tail:' || { cleanup_fail 'failed to detect rename'; break; } -+ - echo ok >> k -- found=0 -- # wait up to 10 seconds for "ok" to appear in out -- grep_timeout ok out && found=1 -+ # wait for "ok" to appear in 'out' -+ grep_timeout 'ok' || { cleanup_fail 'failed to detect echoed ok'; break; } -+ - kill $pid -- test $found = 0 && { cat out; fail_ failed to detect echoed '"ok"'; } - done - - wait diff --git a/coreutils-tests-rm-ext3-perf-increase-timeout.patch b/coreutils-tests-rm-ext3-perf-increase-timeout.patch deleted file mode 100644 index 158425c..0000000 --- a/coreutils-tests-rm-ext3-perf-increase-timeout.patch +++ /dev/null @@ -1,20 +0,0 @@ -Avoid spurious false positives on OBS due to high load. -Increase threshold, as most failures in the last 2 years -have been seen with around 60-63 seconds. ---- - tests/rm/ext3-perf.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: tests/rm/ext3-perf.sh -=================================================================== ---- tests/rm/ext3-perf.sh.orig -+++ tests/rm/ext3-perf.sh -@@ -24,7 +24,7 @@ very_expensive_ - # Using rm -rf to remove a 400k-entry directory takes: - # - 9 seconds with the patch, on a 2-yr-old system - # - 350 seconds without the patch, on a high-end system (disk 20-30% faster) --threshold_seconds=60 -+threshold_seconds=90 # increased on OBS, was: 60 - - # The number of entries in our test directory. - n=400000 diff --git a/coreutils-tests-shorten-extreme-factor-tests.patch b/coreutils-tests-shorten-extreme-factor-tests.patch index aaef1b1..1b1bafd 100644 --- a/coreutils-tests-shorten-extreme-factor-tests.patch +++ b/coreutils-tests-shorten-extreme-factor-tests.patch @@ -14,9 +14,9 @@ or arm6l. Strip the tests down from 37 to 3. Index: tests/local.mk =================================================================== ---- tests/local.mk.orig -+++ tests/local.mk -@@ -662,14 +662,9 @@ all_tests = \ +--- tests/local.mk.orig 2015-07-09 15:10:56.769806990 +0200 ++++ tests/local.mk 2015-07-09 15:10:56.839805334 +0200 +@@ -678,14 +678,9 @@ all_tests = \ # See tests/factor/create-test.sh. tf = tests/factor factor_tests = \ diff --git a/coreutils-testsuite.changes b/coreutils-testsuite.changes index ca8810a..f2683ce 100644 --- a/coreutils-testsuite.changes +++ b/coreutils-testsuite.changes @@ -1,3 +1,169 @@ +------------------------------------------------------------------- +Thu Jul 9 15:12:10 CEST 2015 - pth@suse.de + +- Update to 8.24: + ** Bug fixes + + * dd supports more robust SIGINFO/SIGUSR1 handling for outputting statistics. + Previously those signals may have inadvertently terminated the process. + + * df --local no longer hangs with inaccessible remote mounts. + [bug introduced in coreutils-8.21] + + * du now silently ignores all directory cycles due to bind mounts. + Previously it would issue a warning and exit with a failure status. + [bug introduced in coreutils-8.1 and partially fixed in coreutils-8.23] + + * chroot again calls chroot(DIR) and chdir("/"), even if DIR is "/". + This handles separate bind mounted "/" trees, and environments + depending on the implicit chdir("/"). + [bugs introduced in coreutils-8.23] + + * cp no longer issues an incorrect warning about directory hardlinks when a + source directory is specified multiple times. Now, consistent with other + file types, a warning is issued for source directories with duplicate names, + or with -H the directory is copied again using the symlink name. + + * factor avoids writing partial lines, thus supporting parallel operation. + [the bug dates back to the initial implementation] + + * head, od, split, tac, tail, and wc no longer mishandle input from files in + /proc and /sys file systems that report somewhat-incorrect file sizes. + + * mkdir --parents -Z now correctly sets the context for the last component, + even if the parent directory exists and has a different default context. + [bug introduced with the -Z restorecon functionality in coreutils-8.22] + + * numfmt no longer outputs incorrect overflowed values seen with certain + large numbers, or with numbers with increased precision. + [bug introduced when numfmt was added in coreutils-8.21] + + * numfmt now handles leading zeros correctly, not counting them when + settings processing limits, and making them optional with floating point. + [bug introduced when numfmt was added in coreutils-8.21] + + * paste no longer truncates output for large input files. This would happen + for example with files larger than 4GiB on 32 bit systems with a '\n' + character at the 4GiB position. + [the bug dates back to the initial implementation] + + * rm indicates the correct number of arguments in its confirmation prompt, + on all platforms. [bug introduced in coreutils-8.22] + + * shuf -i with a single redundant operand, would crash instead of issuing + a diagnostic. [bug introduced in coreutils-8.22] + + * tail releases inotify resources when unused. Previously it could exhaust + resources with many files, or with -F if files were replaced many times. + [bug introduced in coreutils-7.5] + + * tail -f again follows changes to a file after it's renamed. + [bug introduced in coreutils-7.5] + + * tail --follow no longer misses changes to files if those files were + replaced before inotify watches were created. + [bug introduced in coreutils-7.5] + + * tail --follow consistently outputs all data for a truncated file. + [bug introduced in the beginning] + + * tail --follow=name correctly outputs headers for multiple files + when those files are being created or renamed. + [bug introduced in coreutils-7.5] + + ** New features + + * chroot accepts the new --skip-chdir option to not change the working directory + to "/" after changing into the chroot(2) jail, thus retaining the current wor- + king directory. The new option is only permitted if the new root directory is + the old "/", and therefore is useful with the --group and --userspec options. + + * dd accepts a new status=progress level to print data transfer statistics + on stderr approximately every second. + + * numfmt can now process multiple fields with field range specifications similar + to cut, and supports setting the output precision with the --format option. + + * split accepts a new --separator option to select a record separator character + other than the default newline character. + + * stty allows setting the "extproc" option where supported, which is + a useful setting with high latency links. + + * sync no longer ignores arguments, and syncs each specified file, or with the + --file-system option, the file systems associated with each specified file. + + * tee accepts a new --output-error option to control operation with pipes + and output errors in general. + + ** Changes in behavior + + * df no longer suppresses separate exports of the same remote device, as + these are generally explicitly mounted. The --total option does still + suppress duplicate remote file systems. + [suppression was introduced in coreutils-8.21] + + * mv no longer supports moving a file to a hardlink, instead issuing an error. + The implementation was susceptible to races in the presence of multiple mv + instances, which could result in both hardlinks being deleted. Also on case + insensitive file systems like HFS, mv would just remove a hardlinked 'file' + if called like `mv file File`. The feature was added in coreutils-5.0.1. + + * numfmt --from-unit and --to-unit options now interpret suffixes as SI units, + and IEC (power of 2) units are now specified by appending 'i'. + + * tee will exit early if there are no more writable outputs. + + * tee does not treat the file operand '-' as meaning standard output any longer, + for better conformance to POSIX. This feature was added in coreutils-5.3.0. + + * timeout --foreground no longer sends SIGCONT to the monitored process, + which was seen to cause intermittent issues with GDB for example. + + ** Improvements + + * cp,install,mv will convert smaller runs of NULs in the input to holes, + and cp --sparse=always avoids speculative preallocation on XFS for example. + + * cp will read sparse files more efficiently when the destination is a + non regular file. For example when copying a disk image to a device node. + + * mv will try a reflink before falling back to a standard copy, which is + more efficient when moving files across BTRFS subvolume boundaries. + + * stat and tail now know about IBRIX. stat -f --format=%T now reports the file + system type, and tail -f uses polling for files on IBRIX file systems. + + * wc -l processes short lines much more efficiently. + + * References from --help and the man pages of utilities have been corrected + in various cases, and more direct links to the corresponding online + documentation are provided. + +- Patches adapted because of changed sources: + coreutils-disable_tests.patch + coreutils-i18n.patch + coreutils-misc.patch + coreutils-ocfs2_reflinks.patch + coreutils-remove_hostname_documentation.patch + coreutils-remove_kill_documentation.patch + coreutils-skip-gnulib-test-tls.patch + coreutils-tests-shorten-extreme-factor-tests.patch + sort-keycompare-mb.patch + +- Patches removed because they're included in 8.24: + coreutils-chroot-perform-chdir-unless-skip-chdir.patch + coreutils-df-doc-df-a-includes-duplicate-file-systems.patch + coreutils-df-improve-mount-point-selection.patch + coreutils-df-show-all-remote-file-systems.patch + coreutils-df-total-suppress-separate-remotes.patch + coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch + coreutils-fix_false_du_failure_on_newer_xfs.patch + coreutils-fix-man-deps.patch + coreutils-tests-aarch64-env.patch + coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch + coreutils-tests-rm-ext3-perf-increase-timeout.patch + ------------------------------------------------------------------- Wed Jun 3 10:56:39 UTC 2015 - mail@bernhard-voelker.de diff --git a/coreutils-testsuite.spec b/coreutils-testsuite.spec index 574c31f..533aa46 100644 --- a/coreutils-testsuite.spec +++ b/coreutils-testsuite.spec @@ -21,7 +21,7 @@ Summary: GNU Core Utilities License: GPL-3.0+ Group: System/Base Url: http://www.gnu.org/software/coreutils/ -Version: 8.23 +Version: 8.24 Release: 0 ################################################################# @@ -115,12 +115,6 @@ Patch112: coreutils-getaddrinfo.patch # Assorted fixes Patch113: coreutils-misc.patch -# Upstream patches for df(1) on top of v8.23, thus aligning with SLES12. -Patch201: coreutils-df-improve-mount-point-selection.patch -Patch202: coreutils-df-doc-df-a-includes-duplicate-file-systems.patch -Patch203: coreutils-df-show-all-remote-file-systems.patch -Patch204: coreutils-df-total-suppress-separate-remotes.patch - # Skip 2 valgrind'ed sort tests on ppc/ppc64 which would fail due to # a glibc issue in mkstemp. Patch300: coreutils-skip-some-sort-tests-on-ppc.patch @@ -132,34 +126,9 @@ Patch301: coreutils-skip-gnulib-test-tls.patch # tests: shorten extreme-expensive factor tests Patch303: coreutils-tests-shorten-extreme-factor-tests.patch -# Upstream patch on top of v8.23 (to be removed in v8.24). -# Fix the dependencies to generate man pages after linking. -Patch400: coreutils-fix-man-deps.patch - -# Upstream patch on top of v8.23 (to be removed in v8.24). -# Fixes a regression in chroot which did not chdir("/") in all cases. -Patch401: coreutils-chroot-perform-chdir-unless-skip-chdir.patch - -Patch416: coreutils-fix_false_du_failure_on_newer_xfs.patch - Patch500: coreutils-disable_tests.patch Patch501: coreutils-test_without_valgrind.patch -# Upstream patch on top of v8.23 (to be removed in v8.24). -# Avoids a spurious false positive failure due to high load. -Patch502: coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch - -# Avoid false positives on OBS due to high load; increase timeout. -Patch503: coreutils-tests-rm-ext3-perf-increase-timeout.patch - -# Upstream patch on top of v8.23 (to be removed in v8.24). -# Work around false positives of the testsuite on OBS/aarch64. -Patch504: coreutils-tests-aarch64-env.patch - -# Upstream patch on top of v8.23 (to be removed in v8.24). -# Fix reference to info pages in man pages (boo#933396). -Patch505: coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch - # ================================================ %description These are the GNU core utilities. This package is the union of @@ -193,11 +162,6 @@ the GNU fileutils, sh-utils, and textutils packages. %patch112 %patch113 -%patch201 -%patch202 -%patch203 -%patch204 - %patch300 %ifarch %ix86 x86_64 ppc ppc64 @@ -205,16 +169,8 @@ the GNU fileutils, sh-utils, and textutils packages. %endif %patch303 -%patch400 -%patch401 -%patch416 %patch500 %patch501 -%patch502 -%patch503 - -%patch504 -%patch505 #???## We need to statically link to gmp, otherwise we have a build loop #???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in diff --git a/coreutils.changes b/coreutils.changes index ca8810a..f2683ce 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,169 @@ +------------------------------------------------------------------- +Thu Jul 9 15:12:10 CEST 2015 - pth@suse.de + +- Update to 8.24: + ** Bug fixes + + * dd supports more robust SIGINFO/SIGUSR1 handling for outputting statistics. + Previously those signals may have inadvertently terminated the process. + + * df --local no longer hangs with inaccessible remote mounts. + [bug introduced in coreutils-8.21] + + * du now silently ignores all directory cycles due to bind mounts. + Previously it would issue a warning and exit with a failure status. + [bug introduced in coreutils-8.1 and partially fixed in coreutils-8.23] + + * chroot again calls chroot(DIR) and chdir("/"), even if DIR is "/". + This handles separate bind mounted "/" trees, and environments + depending on the implicit chdir("/"). + [bugs introduced in coreutils-8.23] + + * cp no longer issues an incorrect warning about directory hardlinks when a + source directory is specified multiple times. Now, consistent with other + file types, a warning is issued for source directories with duplicate names, + or with -H the directory is copied again using the symlink name. + + * factor avoids writing partial lines, thus supporting parallel operation. + [the bug dates back to the initial implementation] + + * head, od, split, tac, tail, and wc no longer mishandle input from files in + /proc and /sys file systems that report somewhat-incorrect file sizes. + + * mkdir --parents -Z now correctly sets the context for the last component, + even if the parent directory exists and has a different default context. + [bug introduced with the -Z restorecon functionality in coreutils-8.22] + + * numfmt no longer outputs incorrect overflowed values seen with certain + large numbers, or with numbers with increased precision. + [bug introduced when numfmt was added in coreutils-8.21] + + * numfmt now handles leading zeros correctly, not counting them when + settings processing limits, and making them optional with floating point. + [bug introduced when numfmt was added in coreutils-8.21] + + * paste no longer truncates output for large input files. This would happen + for example with files larger than 4GiB on 32 bit systems with a '\n' + character at the 4GiB position. + [the bug dates back to the initial implementation] + + * rm indicates the correct number of arguments in its confirmation prompt, + on all platforms. [bug introduced in coreutils-8.22] + + * shuf -i with a single redundant operand, would crash instead of issuing + a diagnostic. [bug introduced in coreutils-8.22] + + * tail releases inotify resources when unused. Previously it could exhaust + resources with many files, or with -F if files were replaced many times. + [bug introduced in coreutils-7.5] + + * tail -f again follows changes to a file after it's renamed. + [bug introduced in coreutils-7.5] + + * tail --follow no longer misses changes to files if those files were + replaced before inotify watches were created. + [bug introduced in coreutils-7.5] + + * tail --follow consistently outputs all data for a truncated file. + [bug introduced in the beginning] + + * tail --follow=name correctly outputs headers for multiple files + when those files are being created or renamed. + [bug introduced in coreutils-7.5] + + ** New features + + * chroot accepts the new --skip-chdir option to not change the working directory + to "/" after changing into the chroot(2) jail, thus retaining the current wor- + king directory. The new option is only permitted if the new root directory is + the old "/", and therefore is useful with the --group and --userspec options. + + * dd accepts a new status=progress level to print data transfer statistics + on stderr approximately every second. + + * numfmt can now process multiple fields with field range specifications similar + to cut, and supports setting the output precision with the --format option. + + * split accepts a new --separator option to select a record separator character + other than the default newline character. + + * stty allows setting the "extproc" option where supported, which is + a useful setting with high latency links. + + * sync no longer ignores arguments, and syncs each specified file, or with the + --file-system option, the file systems associated with each specified file. + + * tee accepts a new --output-error option to control operation with pipes + and output errors in general. + + ** Changes in behavior + + * df no longer suppresses separate exports of the same remote device, as + these are generally explicitly mounted. The --total option does still + suppress duplicate remote file systems. + [suppression was introduced in coreutils-8.21] + + * mv no longer supports moving a file to a hardlink, instead issuing an error. + The implementation was susceptible to races in the presence of multiple mv + instances, which could result in both hardlinks being deleted. Also on case + insensitive file systems like HFS, mv would just remove a hardlinked 'file' + if called like `mv file File`. The feature was added in coreutils-5.0.1. + + * numfmt --from-unit and --to-unit options now interpret suffixes as SI units, + and IEC (power of 2) units are now specified by appending 'i'. + + * tee will exit early if there are no more writable outputs. + + * tee does not treat the file operand '-' as meaning standard output any longer, + for better conformance to POSIX. This feature was added in coreutils-5.3.0. + + * timeout --foreground no longer sends SIGCONT to the monitored process, + which was seen to cause intermittent issues with GDB for example. + + ** Improvements + + * cp,install,mv will convert smaller runs of NULs in the input to holes, + and cp --sparse=always avoids speculative preallocation on XFS for example. + + * cp will read sparse files more efficiently when the destination is a + non regular file. For example when copying a disk image to a device node. + + * mv will try a reflink before falling back to a standard copy, which is + more efficient when moving files across BTRFS subvolume boundaries. + + * stat and tail now know about IBRIX. stat -f --format=%T now reports the file + system type, and tail -f uses polling for files on IBRIX file systems. + + * wc -l processes short lines much more efficiently. + + * References from --help and the man pages of utilities have been corrected + in various cases, and more direct links to the corresponding online + documentation are provided. + +- Patches adapted because of changed sources: + coreutils-disable_tests.patch + coreutils-i18n.patch + coreutils-misc.patch + coreutils-ocfs2_reflinks.patch + coreutils-remove_hostname_documentation.patch + coreutils-remove_kill_documentation.patch + coreutils-skip-gnulib-test-tls.patch + coreutils-tests-shorten-extreme-factor-tests.patch + sort-keycompare-mb.patch + +- Patches removed because they're included in 8.24: + coreutils-chroot-perform-chdir-unless-skip-chdir.patch + coreutils-df-doc-df-a-includes-duplicate-file-systems.patch + coreutils-df-improve-mount-point-selection.patch + coreutils-df-show-all-remote-file-systems.patch + coreutils-df-total-suppress-separate-remotes.patch + coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch + coreutils-fix_false_du_failure_on_newer_xfs.patch + coreutils-fix-man-deps.patch + coreutils-tests-aarch64-env.patch + coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch + coreutils-tests-rm-ext3-perf-increase-timeout.patch + ------------------------------------------------------------------- Wed Jun 3 10:56:39 UTC 2015 - mail@bernhard-voelker.de diff --git a/coreutils.spec b/coreutils.spec index 3f21929..886f153 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -21,7 +21,7 @@ Summary: GNU Core Utilities License: GPL-3.0+ Group: System/Base Url: http://www.gnu.org/software/coreutils/ -Version: 8.23 +Version: 8.24 Release: 0 ################################################################# @@ -115,12 +115,6 @@ Patch112: coreutils-getaddrinfo.patch # Assorted fixes Patch113: coreutils-misc.patch -# Upstream patches for df(1) on top of v8.23, thus aligning with SLES12. -Patch201: coreutils-df-improve-mount-point-selection.patch -Patch202: coreutils-df-doc-df-a-includes-duplicate-file-systems.patch -Patch203: coreutils-df-show-all-remote-file-systems.patch -Patch204: coreutils-df-total-suppress-separate-remotes.patch - # Skip 2 valgrind'ed sort tests on ppc/ppc64 which would fail due to # a glibc issue in mkstemp. Patch300: coreutils-skip-some-sort-tests-on-ppc.patch @@ -132,34 +126,9 @@ Patch301: coreutils-skip-gnulib-test-tls.patch # tests: shorten extreme-expensive factor tests Patch303: coreutils-tests-shorten-extreme-factor-tests.patch -# Upstream patch on top of v8.23 (to be removed in v8.24). -# Fix the dependencies to generate man pages after linking. -Patch400: coreutils-fix-man-deps.patch - -# Upstream patch on top of v8.23 (to be removed in v8.24). -# Fixes a regression in chroot which did not chdir("/") in all cases. -Patch401: coreutils-chroot-perform-chdir-unless-skip-chdir.patch - -Patch416: coreutils-fix_false_du_failure_on_newer_xfs.patch - Patch500: coreutils-disable_tests.patch Patch501: coreutils-test_without_valgrind.patch -# Upstream patch on top of v8.23 (to be removed in v8.24). -# Avoids a spurious false positive failure due to high load. -Patch502: coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch - -# Avoid false positives on OBS due to high load; increase timeout. -Patch503: coreutils-tests-rm-ext3-perf-increase-timeout.patch - -# Upstream patch on top of v8.23 (to be removed in v8.24). -# Work around false positives of the testsuite on OBS/aarch64. -Patch504: coreutils-tests-aarch64-env.patch - -# Upstream patch on top of v8.23 (to be removed in v8.24). -# Fix reference to info pages in man pages (boo#933396). -Patch505: coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch - # ================================================ %description These are the GNU core utilities. This package is the union of @@ -193,11 +162,6 @@ the GNU fileutils, sh-utils, and textutils packages. %patch112 %patch113 -%patch201 -%patch202 -%patch203 -%patch204 - %patch300 %ifarch %ix86 x86_64 ppc ppc64 @@ -205,16 +169,8 @@ the GNU fileutils, sh-utils, and textutils packages. %endif %patch303 -%patch400 -%patch401 -%patch416 %patch500 %patch501 -%patch502 -%patch503 - -%patch504 -%patch505 #???## We need to statically link to gmp, otherwise we have a build loop #???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in diff --git a/sort-keycompare-mb.patch b/sort-keycompare-mb.patch index 5c0459b..1b35ae9 100644 --- a/sort-keycompare-mb.patch +++ b/sort-keycompare-mb.patch @@ -15,14 +15,14 @@ between the trailing blank and tabs leads to a different result there. --- src/sort.c | 22 ++++++++++++++++++++-- - tests/misc/sort.pl | 5 +++++ - 2 files changed, 25 insertions(+), 2 deletions(-) + tests/misc/sort.pl | 1 + + 2 files changed, 21 insertions(+), 2 deletions(-) Index: src/sort.c =================================================================== ---- src/sort.c.orig -+++ src/sort.c -@@ -3236,6 +3236,9 @@ keycompare_mb (const struct line *a, con +--- src/sort.c.orig 2015-07-09 14:50:08.426211492 +0200 ++++ src/sort.c 2015-07-09 14:50:08.439211187 +0200 +@@ -3235,6 +3235,9 @@ keycompare_mb (const struct line *a, con size_t lena = lima <= texta ? 0 : lima - texta; size_t lenb = limb <= textb ? 0 : limb - textb; @@ -32,7 +32,7 @@ Index: src/sort.c char const *translate = key->translate; bool const *ignore = key->ignore; -@@ -3255,6 +3258,12 @@ keycompare_mb (const struct line *a, con +@@ -3254,6 +3257,12 @@ keycompare_mb (const struct line *a, con texta = copy_a; textb = copy_b; lena = new_len_a; lenb = new_len_b; } @@ -45,7 +45,7 @@ Index: src/sort.c if (key->random) diff = compare_random (texta, lena, textb, lenb); -@@ -3278,13 +3287,22 @@ keycompare_mb (const struct line *a, con +@@ -3277,13 +3286,22 @@ keycompare_mb (const struct line *a, con diff = 1; else if (hard_LC_COLLATE && !folding) { @@ -72,20 +72,9 @@ Index: src/sort.c goto not_equal; Index: tests/misc/sort.pl =================================================================== ---- tests/misc/sort.pl.orig -+++ tests/misc/sort.pl -@@ -322,6 +322,10 @@ my @Tests = - ["22a", '-k 2,2fd -k 1,1r', {IN=>"3 b\n4 B\n"}, {OUT=>"4 B\n3 b\n"}], - ["22b", '-k 2,2d -k 1,1r', {IN=>"3 b\n4 b\n"}, {OUT=>"4 b\n3 b\n"}], - -+# This fails in Fedora 20, per Göran Uddeborg in: http://bugs.gnu.org/18540 -+["23", '-s -k1,1 -t/', {IN=>"a b/x\na-b-c/x\n"}, {OUT=>"a b/x\na-b-c/x\n"}, -+ {ENV => "LC_ALL=$mb_locale"}], -+ - ["no-file1", 'no-file', {EXIT=>2}, {ERR=>$no_file}], - # This test failed until 1.22f. Sort didn't give an error. - # From Will Edgington. -@@ -446,6 +450,7 @@ if ($mb_locale ne 'C') +--- tests/misc/sort.pl.orig 2015-07-09 14:50:08.429211422 +0200 ++++ tests/misc/sort.pl 2015-07-09 14:50:08.440211164 +0200 +@@ -450,6 +450,7 @@ if ($mb_locale ne 'C') #disable several failing tests until investigation, disable all tests with envvars set next if (grep {ref $_ eq 'HASH' && exists $_->{ENV}} (@new_t)); next if ($test_name =~ "18g" or $test_name =~ "sort-numeric" or $test_name =~ "08[ab]" or $test_name =~ "03[def]" or $test_name =~ "h4" or $test_name =~ "n1" or $test_name =~ "2[01]a"); From 409b66fa006274b97ef74cf52e0d885002e2952c5357050bd4610b3a8bb84e6b Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Thu, 16 Jul 2015 01:29:46 +0000 Subject: [PATCH 2/2] - Sync I18N patch from semi-official repository (shared among distributions, maintained by Padraig Brady): https://github.com/pixelb/coreutils/tree/i18n * coreutils-i18n.patch: Improve cut(1) performance in field-mode in UTF8 locales. Squash in sort-keycompare-mb.patch. * sort-keycompare-mb.patch: Remove. - coreutils-build-timeout-as-pie.patch: Refresh. OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=263 --- coreutils-build-timeout-as-pie.patch | 2 +- coreutils-i18n.patch | 376 ++++++++++++++++----------- coreutils-testsuite.changes | 14 +- coreutils-testsuite.spec | 2 - coreutils.changes | 14 +- coreutils.spec | 2 - sort-keycompare-mb.patch | 84 ------ 7 files changed, 245 insertions(+), 249 deletions(-) delete mode 100644 sort-keycompare-mb.patch diff --git a/coreutils-build-timeout-as-pie.patch b/coreutils-build-timeout-as-pie.patch index df3c7a9..0607fbb 100644 --- a/coreutils-build-timeout-as-pie.patch +++ b/coreutils-build-timeout-as-pie.patch @@ -36,4 +36,4 @@ Index: src/local.mk + # for various ACL functions copy_ldadd += $(LIB_ACL) - src_ls_LDADD += $(LIB_ACL) + src_ls_LDADD += $(LIB_HAS_ACL) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index deab516..0dccc29 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -1,12 +1,12 @@ lib/linebuffer.h | 8 - src/cut.c | 433 ++++++++++++++++++++++++- + src/cut.c | 443 ++++++++++++++++++++++++- src/expand.c | 165 +++++++++ - src/fold.c | 290 +++++++++++++++-- - src/join.c | 363 ++++++++++++++++++--- - src/pr.c | 435 ++++++++++++++++++++++--- - src/sort.c | 745 +++++++++++++++++++++++++++++++++++++++++--- + src/fold.c | 308 ++++++++++++++++- + src/join.c | 363 ++++++++++++++++++-- + src/pr.c | 444 +++++++++++++++++++++++-- + src/sort.c | 763 +++++++++++++++++++++++++++++++++++++++++--- src/unexpand.c | 228 +++++++++++++ - src/uniq.c | 265 +++++++++++++++ + src/uniq.c | 265 ++++++++++++++- tests/i18n/sort.sh | 29 + tests/local.mk | 2 tests/misc/cut.pl | 7 @@ -15,16 +15,16 @@ tests/misc/join.pl | 50 ++ tests/misc/sort-mb-tests.sh | 45 ++ tests/misc/sort-merge.pl | 42 ++ - tests/misc/sort.pl | 39 ++ + tests/misc/sort.pl | 40 ++ tests/misc/unexpand.pl | 39 ++ tests/misc/uniq.pl | 55 +++ - tests/pr/pr-tests.pl | 50 ++ - 21 files changed, 3198 insertions(+), 182 deletions(-) + tests/pr/pr-tests.pl | 49 ++ + 21 files changed, 3255 insertions(+), 180 deletions(-) Index: lib/linebuffer.h =================================================================== ---- lib/linebuffer.h.orig 2015-06-16 07:00:37.000000000 +0200 -+++ lib/linebuffer.h 2015-07-09 17:15:19.619057660 +0200 +--- lib/linebuffer.h.orig ++++ lib/linebuffer.h @@ -21,6 +21,11 @@ # include @@ -49,8 +49,8 @@ Index: lib/linebuffer.h /* Initialize linebuffer LINEBUFFER for use. */ Index: src/cut.c =================================================================== ---- src/cut.c.orig 2015-06-26 19:05:22.000000000 +0200 -+++ src/cut.c 2015-07-09 17:15:19.619057660 +0200 +--- src/cut.c.orig ++++ src/cut.c @@ -28,6 +28,11 @@ #include #include @@ -283,7 +283,7 @@ Index: src/cut.c /* Read from stream STREAM, printing to standard output any selected fields. */ static void -@@ -648,13 +805,201 @@ cut_fields (FILE *stream) +@@ -648,13 +805,211 @@ cut_fields (FILE *stream) } } @@ -467,9 +467,19 @@ Index: src/cut.c + + case field_mode: + if (delimlen == 1) -+ cut_fields (stream); -+ else -+ cut_fields_mb (stream); ++ { ++ /* Check if we have utf8 multibyte locale, so we can use this ++ optimization because of uniqueness of characters, which is ++ not true for e.g. SJIS */ ++ char * loc = setlocale(LC_CTYPE, NULL); ++ if (loc && (strstr (loc, "UTF-8") || strstr (loc, "utf-8") || ++ strstr (loc, "UTF8") || strstr (loc, "utf8"))) ++ { ++ cut_fields (stream); ++ break; ++ } ++ } ++ cut_fields_mb (stream); + break; + + default: @@ -488,7 +498,7 @@ Index: src/cut.c } /* Process file FILE to standard output. -@@ -706,6 +1051,7 @@ main (int argc, char **argv) +@@ -706,6 +1061,7 @@ main (int argc, char **argv) bool ok; bool delim_specified = false; char *spec_list_string IF_LINT ( = NULL); @@ -496,7 +506,7 @@ Index: src/cut.c initialize_main (&argc, &argv); set_program_name (argv[0]); -@@ -728,7 +1074,6 @@ main (int argc, char **argv) +@@ -728,7 +1084,6 @@ main (int argc, char **argv) switch (optc) { case 'b': @@ -504,7 +514,7 @@ Index: src/cut.c /* Build the byte list. */ if (operating_mode != undefined_mode) FATAL_ERROR (_("only one type of list may be specified")); -@@ -736,6 +1081,14 @@ main (int argc, char **argv) +@@ -736,6 +1091,14 @@ main (int argc, char **argv) spec_list_string = optarg; break; @@ -519,7 +529,7 @@ Index: src/cut.c case 'f': /* Build the field list. */ if (operating_mode != undefined_mode) -@@ -747,10 +1100,38 @@ main (int argc, char **argv) +@@ -747,10 +1110,38 @@ main (int argc, char **argv) case 'd': /* New delimiter. */ /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ @@ -562,7 +572,7 @@ Index: src/cut.c break; case OUTPUT_DELIMITER_OPTION: -@@ -763,6 +1144,7 @@ main (int argc, char **argv) +@@ -763,6 +1154,7 @@ main (int argc, char **argv) break; case 'n': @@ -570,7 +580,7 @@ Index: src/cut.c break; case 's': -@@ -802,15 +1184,34 @@ main (int argc, char **argv) +@@ -802,15 +1194,34 @@ main (int argc, char **argv) } if (!delim_specified) @@ -613,8 +623,8 @@ Index: src/cut.c if (optind == argc) Index: src/expand.c =================================================================== ---- src/expand.c.orig 2015-06-26 19:05:22.000000000 +0200 -+++ src/expand.c 2015-07-09 17:15:19.619057660 +0200 +--- src/expand.c.orig ++++ src/expand.c @@ -37,12 +37,34 @@ #include #include @@ -809,20 +819,43 @@ Index: src/expand.c error (EXIT_FAILURE, errno, "-"); Index: src/fold.c =================================================================== ---- src/fold.c.orig 2015-06-26 19:05:22.000000000 +0200 -+++ src/fold.c 2015-07-09 17:17:59.750295812 +0200 -@@ -18,6 +18,10 @@ - - #include - -+#if HAVE_WCHAR_H -+#include -+#endif -+ - #include +--- src/fold.c.orig ++++ src/fold.c +@@ -22,11 +22,33 @@ #include #include -@@ -34,20 +38,41 @@ + ++/* Get mbstate_t, mbrtowc(), wcwidth(). */ ++#if HAVE_WCHAR_H ++# include ++#endif ++ ++/* Get iswprint(), iswblank(), wcwidth(). */ ++#if HAVE_WCTYPE_H ++# include ++#endif ++ + #include "system.h" + #include "error.h" + #include "fadvise.h" + #include "xdectoint.h" + ++/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC ++ installation; work around this configuration error. */ ++#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 ++# undef MB_LEN_MAX ++# define MB_LEN_MAX 16 ++#endif ++ ++/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ ++#if HAVE_MBRTOWC && defined mbstate_t ++# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) ++#endif ++ + #define TAB_WIDTH 8 + + /* The official name of this program (e.g., no 'g' prefix). */ +@@ -34,20 +56,41 @@ #define AUTHORS proper_name ("David MacKenzie") @@ -868,7 +901,7 @@ Index: src/fold.c {"spaces", no_argument, NULL, 's'}, {"width", required_argument, NULL, 'w'}, {GETOPT_HELP_OPTION_DECL}, -@@ -75,6 +100,7 @@ Wrap input lines in each FILE, writing t +@@ -75,6 +118,7 @@ Wrap input lines in each FILE, writing t fputs (_("\ -b, --bytes count bytes rather than columns\n\ @@ -876,7 +909,7 @@ Index: src/fold.c -s, --spaces break at spaces\n\ -w, --width=WIDTH use WIDTH columns instead of 80\n\ "), stdout); -@@ -92,7 +118,7 @@ Wrap input lines in each FILE, writing t +@@ -92,7 +136,7 @@ Wrap input lines in each FILE, writing t static size_t adjust_column (size_t column, char c) { @@ -885,7 +918,7 @@ Index: src/fold.c { if (c == '\b') { -@@ -115,30 +141,14 @@ adjust_column (size_t column, char c) +@@ -115,30 +159,14 @@ adjust_column (size_t column, char c) to stdout, with maximum line length WIDTH. Return true if successful. */ @@ -918,7 +951,7 @@ Index: src/fold.c fadvise (istream, FADVISE_SEQUENTIAL); -@@ -168,6 +178,15 @@ fold_file (char const *filename, size_t +@@ -168,6 +196,15 @@ fold_file (char const *filename, size_t bool found_blank = false; size_t logical_end = offset_out; @@ -934,16 +967,16 @@ Index: src/fold.c /* Look for the last blank. */ while (logical_end) { -@@ -214,11 +233,221 @@ fold_file (char const *filename, size_t +@@ -214,11 +251,221 @@ fold_file (char const *filename, size_t line_out[offset_out++] = c; } - saved_errno = errno; + *saved_errno = errno; - - if (offset_out) - fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); - ++ ++ if (offset_out) ++ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); ++ +} + +#if HAVE_MBRTOWC @@ -1115,10 +1148,10 @@ Index: src/fold.c + } + + *saved_errno = errno; -+ -+ if (offset_out) -+ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); -+ + + if (offset_out) + fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); + +} +#endif + @@ -1157,7 +1190,7 @@ Index: src/fold.c if (ferror (istream)) { error (0, saved_errno, "%s", filename); -@@ -251,7 +480,8 @@ main (int argc, char **argv) +@@ -251,7 +498,8 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1167,7 +1200,7 @@ Index: src/fold.c while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) { -@@ -260,7 +490,15 @@ main (int argc, char **argv) +@@ -260,7 +508,15 @@ main (int argc, char **argv) switch (optc) { case 'b': /* Count bytes rather than columns. */ @@ -1186,8 +1219,8 @@ Index: src/fold.c case 's': /* Break at word boundaries. */ Index: src/join.c =================================================================== ---- src/join.c.orig 2015-06-26 19:05:22.000000000 +0200 -+++ src/join.c 2015-07-09 17:15:19.620057636 +0200 +--- src/join.c.orig ++++ src/join.c @@ -22,18 +22,32 @@ #include #include @@ -1682,8 +1715,8 @@ Index: src/join.c case 'z': Index: src/pr.c =================================================================== ---- src/pr.c.orig 2015-06-26 19:05:22.000000000 +0200 -+++ src/pr.c 2015-07-09 17:36:00.714903141 +0200 +--- src/pr.c.orig ++++ src/pr.c @@ -312,6 +312,24 @@ #include @@ -1709,7 +1742,26 @@ Index: src/pr.c #include "system.h" #include "error.h" #include "fadvise.h" -@@ -416,7 +434,20 @@ struct COLUMN +@@ -324,6 +342,18 @@ + #include "xstrtol.h" + #include "xdectoint.h" + ++/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ ++#if HAVE_MBRTOWC && defined mbstate_t ++# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) ++#endif ++ ++#ifndef HAVE_DECL_WCWIDTH ++"this configure-time declaration test was not run" ++#endif ++#if !HAVE_DECL_WCWIDTH ++extern int wcwidth (); ++#endif ++ + /* The official name of this program (e.g., no 'g' prefix). */ + #define PROGRAM_NAME "pr" + +@@ -416,7 +446,20 @@ struct COLUMN typedef struct COLUMN COLUMN; @@ -1731,18 +1783,15 @@ Index: src/pr.c static bool read_line (COLUMN *p); static bool print_page (void); static bool print_stored (COLUMN *p); -@@ -427,8 +458,8 @@ static void pad_across_to (int position) - static void add_line_number (COLUMN *p); +@@ -428,6 +471,7 @@ static void add_line_number (COLUMN *p); static void getoptnum (const char *n_str, int min, int *num, const char *errfmt); --static void getoptarg (char *arg, char switch_char, char *character, -- int *number); -+static void getoptarg (char *arg, char switch_char, char *character, int *character_length, -+ int *character_width, int *number); + static void getoptarg (char *arg, char switch_char, char *character, ++ int *character_length, int *character_width, + int *number); static void print_files (int number_of_files, char **av); static void init_parameters (int number_of_files); - static void init_header (char const *filename, int desc); -@@ -441,7 +472,6 @@ static void store_char (char c); +@@ -441,7 +485,6 @@ static void store_char (char c); static void pad_down (unsigned int lines); static void read_rest_of_line (COLUMN *p); static void skip_read (COLUMN *p, int column_number); @@ -1750,7 +1799,7 @@ Index: src/pr.c static void cleanup (void); static void print_sep_string (void); static void separator_string (const char *optarg_S); -@@ -453,7 +483,7 @@ static COLUMN *column_vector; +@@ -453,7 +496,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 from line_vector[i], and print up to line_vector[i + 1]. */ @@ -1759,7 +1808,7 @@ Index: src/pr.c /* Index of the position in buff where the next character will be stored. */ -@@ -557,7 +587,7 @@ static int chars_per_column; +@@ -557,7 +600,7 @@ static int chars_per_column; static bool untabify_input = false; /* (-e) The input tab character. */ @@ -1768,7 +1817,7 @@ Index: src/pr.c /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ... where the leftmost column is 1. */ -@@ -567,7 +597,10 @@ static int chars_per_input_tab = 8; +@@ -567,7 +610,10 @@ static int chars_per_input_tab = 8; static bool tabify_output = false; /* (-i) The output tab character. */ @@ -1780,7 +1829,7 @@ Index: src/pr.c /* (-i) The width of the output tab. */ static int chars_per_output_tab = 8; -@@ -637,7 +670,13 @@ static int line_number; +@@ -637,7 +683,13 @@ static int line_number; static bool numbered_lines = false; /* (-n) Character which follows each line number. */ @@ -1795,7 +1844,7 @@ Index: src/pr.c /* (-n) line counting starts with 1st line of input file (not with 1st line of 1st page printed). */ -@@ -690,6 +729,7 @@ static bool use_col_separator = false; +@@ -690,6 +742,7 @@ static bool use_col_separator = false; -a|COLUMN|-m is a 'space' and with the -J option a 'tab'. */ static char *col_sep_string = (char *) ""; static int col_sep_length = 0; @@ -1803,7 +1852,7 @@ Index: src/pr.c static char *column_separator = (char *) " "; static char *line_separator = (char *) "\t"; -@@ -840,6 +880,13 @@ separator_string (const char *optarg_S) +@@ -840,6 +893,13 @@ separator_string (const char *optarg_S) col_sep_length = (int) strlen (optarg_S); col_sep_string = xmalloc (col_sep_length + 1); strcpy (col_sep_string, optarg_S); @@ -1817,7 +1866,7 @@ Index: src/pr.c } int -@@ -864,6 +911,21 @@ main (int argc, char **argv) +@@ -864,6 +924,21 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1839,7 +1888,7 @@ Index: src/pr.c n_files = 0; file_names = (argc > 1 ? xmalloc ((argc - 1) * sizeof (char *)) -@@ -940,8 +1002,12 @@ main (int argc, char **argv) +@@ -940,8 +1015,12 @@ main (int argc, char **argv) break; case 'e': if (optarg) @@ -1854,7 +1903,7 @@ Index: src/pr.c /* Could check tab width > 0. */ untabify_input = true; break; -@@ -954,8 +1020,12 @@ main (int argc, char **argv) +@@ -954,8 +1033,12 @@ main (int argc, char **argv) break; case 'i': if (optarg) @@ -1869,7 +1918,7 @@ Index: src/pr.c /* Could check tab width > 0. */ tabify_output = true; break; -@@ -973,8 +1043,8 @@ main (int argc, char **argv) +@@ -973,8 +1056,8 @@ main (int argc, char **argv) case 'n': numbered_lines = true; if (optarg) @@ -1880,7 +1929,7 @@ Index: src/pr.c break; case 'N': skip_count = false; -@@ -998,7 +1068,7 @@ main (int argc, char **argv) +@@ -998,7 +1081,7 @@ main (int argc, char **argv) old_s = false; /* Reset an additional input of -s, -S dominates -s */ col_sep_string = bad_cast (""); @@ -1889,7 +1938,7 @@ Index: src/pr.c use_col_separator = true; if (optarg) separator_string (optarg); -@@ -1152,10 +1222,45 @@ getoptnum (const char *n_str, int min, i +@@ -1152,10 +1235,45 @@ getoptnum (const char *n_str, int min, i a number. */ static void @@ -1937,7 +1986,7 @@ Index: src/pr.c if (*arg) { long int tmp_long; -@@ -1177,6 +1282,11 @@ static void +@@ -1177,6 +1295,11 @@ static void init_parameters (int number_of_files) { int chars_used_by_number = 0; @@ -1949,7 +1998,7 @@ Index: src/pr.c lines_per_body = lines_per_page - lines_per_header - lines_per_footer; if (lines_per_body <= 0) -@@ -1214,7 +1324,7 @@ init_parameters (int number_of_files) +@@ -1214,7 +1337,7 @@ init_parameters (int number_of_files) else col_sep_string = column_separator; @@ -1958,7 +2007,7 @@ Index: src/pr.c use_col_separator = true; } /* It's rather pointless to define a TAB separator with column -@@ -1244,11 +1354,11 @@ init_parameters (int number_of_files) +@@ -1244,11 +1367,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. */ @@ -1972,7 +2021,7 @@ Index: src/pr.c /* The number is part of the column width unless we are printing files in parallel. */ -@@ -1257,7 +1367,7 @@ init_parameters (int number_of_files) +@@ -1257,7 +1380,7 @@ init_parameters (int number_of_files) } chars_per_column = (chars_per_line - chars_used_by_number @@ -1981,7 +2030,7 @@ Index: src/pr.c if (chars_per_column < 1) error (EXIT_FAILURE, 0, _("page width too narrow")); -@@ -1275,7 +1385,7 @@ init_parameters (int number_of_files) +@@ -1275,7 +1398,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); @@ -1990,7 +2039,7 @@ Index: src/pr.c } /* Open the necessary files, -@@ -1383,7 +1493,7 @@ init_funcs (void) +@@ -1383,7 +1506,7 @@ init_funcs (void) /* Enlarge p->start_position of first column to use the same form of padding_not_printed with all columns. */ @@ -1999,7 +2048,7 @@ Index: src/pr.c /* This loop takes care of all but the rightmost column. */ -@@ -1417,7 +1527,7 @@ init_funcs (void) +@@ -1417,7 +1540,7 @@ init_funcs (void) } else { @@ -2008,7 +2057,7 @@ Index: src/pr.c h_next = h + chars_per_column; } } -@@ -1708,9 +1818,9 @@ static void +@@ -1708,9 +1831,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -2020,7 +2069,7 @@ Index: src/pr.c padding_not_printed = ANYWHERE; } -@@ -1981,13 +2091,13 @@ store_char (char c) +@@ -1981,13 +2104,13 @@ store_char (char c) /* May be too generous. */ buff = X2REALLOC (buff, &buff_allocated); } @@ -2036,7 +2085,7 @@ Index: src/pr.c char *s; int num_width; -@@ -2004,22 +2114,24 @@ add_line_number (COLUMN *p) +@@ -2004,22 +2127,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. */ @@ -2065,7 +2114,7 @@ Index: src/pr.c output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2180,7 +2292,7 @@ print_white_space (void) +@@ -2180,7 +2305,7 @@ print_white_space (void) while (goal - h_old > 1 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) { @@ -2074,7 +2123,7 @@ Index: src/pr.c h_old = h_new; } while (++h_old <= goal) -@@ -2200,6 +2312,7 @@ print_sep_string (void) +@@ -2200,6 +2325,7 @@ print_sep_string (void) { char *s; int l = col_sep_length; @@ -2082,7 +2131,7 @@ Index: src/pr.c s = col_sep_string; -@@ -2213,6 +2326,7 @@ print_sep_string (void) +@@ -2213,6 +2339,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -2090,7 +2139,7 @@ Index: src/pr.c while (l-- > 0) { /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2226,12 +2340,15 @@ print_sep_string (void) +@@ -2226,12 +2353,15 @@ print_sep_string (void) } else { @@ -2107,7 +2156,7 @@ Index: src/pr.c /* sep_string ends with some spaces */ if (spaces_not_printed > 0) print_white_space (); -@@ -2259,7 +2376,7 @@ print_clump (COLUMN *p, int n, char *clu +@@ -2259,7 +2389,7 @@ print_clump (COLUMN *p, int n, char *clu required number of tabs and spaces. */ static void @@ -2116,7 +2165,7 @@ Index: src/pr.c { if (tabify_output) { -@@ -2283,6 +2400,74 @@ print_char (char c) +@@ -2283,6 +2413,74 @@ print_char (char c) putchar (c); } @@ -2191,7 +2240,7 @@ Index: src/pr.c /* Skip to page PAGE before printing. PAGE may be larger than total number of pages. */ -@@ -2462,9 +2647,9 @@ read_line (COLUMN *p) +@@ -2462,9 +2660,9 @@ read_line (COLUMN *p) align_empty_cols = false; } @@ -2203,7 +2252,7 @@ Index: src/pr.c padding_not_printed = ANYWHERE; } -@@ -2534,7 +2719,7 @@ print_stored (COLUMN *p) +@@ -2534,7 +2732,7 @@ print_stored (COLUMN *p) int i; int line = p->current_line++; @@ -2212,7 +2261,7 @@ Index: src/pr.c /* FIXME UMR: Uninitialized memory read: * This is occurring while in: -@@ -2546,7 +2731,7 @@ print_stored (COLUMN *p) +@@ -2546,7 +2744,7 @@ print_stored (COLUMN *p) xmalloc [xmalloc.c:94] init_store_cols [pr.c:1648] */ @@ -2221,7 +2270,7 @@ Index: src/pr.c pad_vertically = true; -@@ -2565,9 +2750,9 @@ print_stored (COLUMN *p) +@@ -2565,9 +2763,9 @@ print_stored (COLUMN *p) } } @@ -2233,7 +2282,7 @@ Index: src/pr.c padding_not_printed = ANYWHERE; } -@@ -2580,8 +2765,8 @@ print_stored (COLUMN *p) +@@ -2580,8 +2778,8 @@ print_stored (COLUMN *p) if (spaces_not_printed == 0) { output_position = p->start_position + end_vector[line]; @@ -2244,7 +2293,7 @@ Index: src/pr.c } return true; -@@ -2600,7 +2785,7 @@ print_stored (COLUMN *p) +@@ -2600,7 +2798,7 @@ print_stored (COLUMN *p) number of characters is 1.) */ static int @@ -2253,7 +2302,7 @@ Index: src/pr.c { unsigned char uc = c; char *s = clump_buff; -@@ -2610,10 +2795,10 @@ char_to_clump (char c) +@@ -2610,10 +2808,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8; @@ -2266,7 +2315,7 @@ Index: src/pr.c { width = TAB_WIDTH (chars_per_c, input_position); -@@ -2694,6 +2879,164 @@ char_to_clump (char c) +@@ -2694,6 +2892,164 @@ char_to_clump (char c) return chars; } @@ -2433,8 +2482,8 @@ Index: src/pr.c Index: src/sort.c =================================================================== ---- src/sort.c.orig 2015-06-26 19:05:22.000000000 +0200 -+++ src/sort.c 2015-07-09 17:28:20.750707716 +0200 +--- src/sort.c.orig ++++ src/sort.c @@ -29,6 +29,14 @@ #include #include @@ -3112,7 +3161,7 @@ Index: src/sort.c else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2694,6 +3134,193 @@ keycompare (struct line const *a, struct +@@ -2694,6 +3134,211 @@ keycompare (struct line const *a, struct return key->reverse ? -diff : diff; } @@ -3217,6 +3266,9 @@ Index: src/sort.c + size_t lena = lima <= texta ? 0 : lima - texta; + size_t lenb = limb <= textb ? 0 : limb - textb; + ++ char enda IF_LINT (= 0); ++ char endb IF_LINT (= 0); ++ + char const *translate = key->translate; + bool const *ignore = key->ignore; + @@ -3236,6 +3288,12 @@ Index: src/sort.c + texta = copy_a; textb = copy_b; + lena = new_len_a; lenb = new_len_b; + } ++ else ++ { ++ /* Use the keys in-place, temporarily null-terminated. */ ++ enda = texta[lena]; texta[lena] = '\0'; ++ endb = textb[lenb]; textb[lenb] = '\0'; ++ } + + if (key->random) + diff = compare_random (texta, lena, textb, lenb); @@ -3259,13 +3317,22 @@ Index: src/sort.c + diff = 1; + else if (hard_LC_COLLATE && !folding) + { -+ diff = xmemcoll0 (texta, lena, textb, lenb); ++ diff = xmemcoll0 (texta, lena + 1, textb, lenb + 1); + } + else -+ diff = memcmp (texta, textb, MIN (lena + 1,lenb + 1)); ++ { ++ diff = memcmp (texta, textb, MIN (lena, lenb)); ++ if (diff == 0) ++ diff = lena < lenb ? -1 : lena != lenb; ++ } + + if (ignore || translate) + free (texta); ++ else ++ { ++ texta[lena] = enda; ++ textb[lenb] = endb; ++ } + + if (diff) + goto not_equal; @@ -3306,7 +3373,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. */ -@@ -2721,7 +3348,7 @@ compare (struct line const *a, struct li +@@ -2721,7 +3366,7 @@ compare (struct line const *a, struct li diff = - NONZERO (blen); else if (blen == 0) diff = 1; @@ -3315,7 +3382,7 @@ Index: src/sort.c { /* Note xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4120,6 +4747,7 @@ set_ordering (char const *s, struct keyf +@@ -4120,6 +4765,7 @@ set_ordering (char const *s, struct keyf break; case 'f': key->translate = fold_toupper; @@ -3323,7 +3390,7 @@ Index: src/sort.c break; case 'g': key->general_numeric = true; -@@ -4197,7 +4825,7 @@ main (int argc, char **argv) +@@ -4197,7 +4843,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -3332,7 +3399,7 @@ Index: src/sort.c hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4218,6 +4846,29 @@ main (int argc, char **argv) +@@ -4218,6 +4864,29 @@ main (int argc, char **argv) thousands_sep = -1; } @@ -3362,7 +3429,7 @@ Index: src/sort.c have_read_stdin = false; inittables (); -@@ -4492,13 +5143,34 @@ main (int argc, char **argv) +@@ -4492,13 +5161,34 @@ main (int argc, char **argv) case 't': { @@ -3401,7 +3468,7 @@ Index: src/sort.c else { /* Provoke with 'sort -txx'. Complain about -@@ -4509,9 +5181,12 @@ main (int argc, char **argv) +@@ -4509,9 +5199,12 @@ main (int argc, char **argv) quote (optarg)); } } @@ -3418,8 +3485,8 @@ Index: src/sort.c Index: src/unexpand.c =================================================================== ---- src/unexpand.c.orig 2015-06-26 19:05:22.000000000 +0200 -+++ src/unexpand.c 2015-07-09 17:15:19.622057589 +0200 +--- src/unexpand.c.orig ++++ src/unexpand.c @@ -38,12 +38,29 @@ #include #include @@ -3677,8 +3744,8 @@ Index: src/unexpand.c error (EXIT_FAILURE, errno, "-"); Index: src/uniq.c =================================================================== ---- src/uniq.c.orig 2015-06-26 19:04:19.000000000 +0200 -+++ src/uniq.c 2015-07-09 17:15:19.622057589 +0200 +--- src/uniq.c.orig ++++ src/uniq.c @@ -21,6 +21,17 @@ #include #include @@ -4064,8 +4131,8 @@ Index: src/uniq.c check_chars = SIZE_MAX; Index: tests/i18n/sort.sh =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ tests/i18n/sort.sh 2015-07-09 17:15:19.622057589 +0200 +--- /dev/null ++++ tests/i18n/sort.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# Verify sort's multi-byte support. @@ -4098,28 +4165,21 @@ Index: tests/i18n/sort.sh +Exit $fail Index: tests/local.mk =================================================================== ---- tests/local.mk.orig 2015-07-03 14:03:55.000000000 +0200 -+++ tests/local.mk 2015-07-09 17:28:19.101746451 +0200 -@@ -341,6 +341,7 @@ all_tests = \ +--- tests/local.mk.orig ++++ tests/local.mk +@@ -341,6 +341,8 @@ all_tests = \ tests/misc/sort-discrim.sh \ tests/misc/sort-files0-from.pl \ tests/misc/sort-float.sh \ + tests/misc/sort-mb-tests.sh \ ++ tests/i18n/sort.sh \ tests/misc/sort-merge.pl \ tests/misc/sort-merge-fdlimit.sh \ tests/misc/sort-month.sh \ -@@ -532,6 +533,7 @@ all_tests = \ - tests/du/threshold.sh \ - tests/du/trailing-slash.sh \ - tests/du/two-args.sh \ -+ tests/i18n/sort.sh \ - tests/id/gnu-zero-uids.sh \ - tests/id/no-context.sh \ - tests/id/context.sh \ Index: tests/misc/cut.pl =================================================================== ---- tests/misc/cut.pl.orig 2015-06-26 19:04:19.000000000 +0200 -+++ tests/misc/cut.pl 2015-07-09 17:15:19.622057589 +0200 +--- tests/misc/cut.pl.orig ++++ tests/misc/cut.pl @@ -23,9 +23,11 @@ use strict; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4144,8 +4204,8 @@ Index: tests/misc/cut.pl push @Tests, @new; Index: tests/misc/expand.pl =================================================================== ---- tests/misc/expand.pl.orig 2015-06-26 19:04:19.000000000 +0200 -+++ tests/misc/expand.pl 2015-07-09 17:15:19.622057589 +0200 +--- tests/misc/expand.pl.orig ++++ tests/misc/expand.pl @@ -23,6 +23,15 @@ use strict; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4202,8 +4262,8 @@ Index: tests/misc/expand.pl Index: tests/misc/fold.pl =================================================================== ---- tests/misc/fold.pl.orig 2015-06-26 19:04:19.000000000 +0200 -+++ tests/misc/fold.pl 2015-07-09 17:15:19.623057566 +0200 +--- tests/misc/fold.pl.orig ++++ tests/misc/fold.pl @@ -20,9 +20,18 @@ use strict; (my $program_name = $0) =~ s|.*/||; @@ -4275,8 +4335,8 @@ Index: tests/misc/fold.pl exit $fail; Index: tests/misc/join.pl =================================================================== ---- tests/misc/join.pl.orig 2015-06-26 19:04:19.000000000 +0200 -+++ tests/misc/join.pl 2015-07-09 17:15:19.623057566 +0200 +--- tests/misc/join.pl.orig ++++ tests/misc/join.pl @@ -25,6 +25,15 @@ my $limits = getlimits (); my $prog = 'join'; @@ -4345,8 +4405,8 @@ Index: tests/misc/join.pl Index: tests/misc/sort-mb-tests.sh =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ tests/misc/sort-mb-tests.sh 2015-07-09 17:15:19.623057566 +0200 +--- /dev/null ++++ tests/misc/sort-mb-tests.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# Verify sort's multi-byte support. @@ -4395,8 +4455,8 @@ Index: tests/misc/sort-mb-tests.sh +Exit $fail Index: tests/misc/sort-merge.pl =================================================================== ---- tests/misc/sort-merge.pl.orig 2015-06-26 19:04:19.000000000 +0200 -+++ tests/misc/sort-merge.pl 2015-07-09 17:15:19.623057566 +0200 +--- tests/misc/sort-merge.pl.orig ++++ tests/misc/sort-merge.pl @@ -26,6 +26,15 @@ my $prog = 'sort'; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4455,8 +4515,8 @@ Index: tests/misc/sort-merge.pl Index: tests/misc/sort.pl =================================================================== ---- tests/misc/sort.pl.orig 2015-06-26 19:04:19.000000000 +0200 -+++ tests/misc/sort.pl 2015-07-09 17:28:20.750707716 +0200 +--- tests/misc/sort.pl.orig ++++ tests/misc/sort.pl @@ -24,10 +24,15 @@ my $prog = 'sort'; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4474,7 +4534,7 @@ Index: tests/misc/sort.pl # Since each test is run with a file name and with redirected stdin, # the name in the diagnostic is either the file name or "-". # Normalize each diagnostic to use '-'. -@@ -419,6 +424,37 @@ foreach my $t (@Tests) +@@ -419,6 +424,38 @@ foreach my $t (@Tests) } } @@ -4504,6 +4564,7 @@ Index: tests/misc/sort.pl + #disable several failing tests until investigation, disable all tests with envvars set + next if (grep {ref $_ eq 'HASH' && exists $_->{ENV}} (@new_t)); + next if ($test_name =~ "18g" or $test_name =~ "sort-numeric" or $test_name =~ "08[ab]" or $test_name =~ "03[def]" or $test_name =~ "h4" or $test_name =~ "n1" or $test_name =~ "2[01]a"); ++ next if ($test_name =~ "11[ab]"); # avoid FP: expected result differs to MB result due to collation rules. + push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}]; + } + push @Tests, @new; @@ -4512,7 +4573,7 @@ Index: tests/misc/sort.pl @Tests = triple_test \@Tests; # Remember that triple_test creates from each test with exactly one "IN" -@@ -428,6 +464,7 @@ foreach my $t (@Tests) +@@ -428,6 +465,7 @@ foreach my $t (@Tests) # Remove the IN_PIPE version of the "output-is-input" test above. # The others aren't susceptible because they have three inputs each. @Tests = grep {$_->[0] ne 'output-is-input.p'} @Tests; @@ -4522,8 +4583,8 @@ Index: tests/misc/sort.pl my $verbose = $ENV{VERBOSE}; Index: tests/misc/unexpand.pl =================================================================== ---- tests/misc/unexpand.pl.orig 2015-06-26 19:04:19.000000000 +0200 -+++ tests/misc/unexpand.pl 2015-07-09 17:15:19.623057566 +0200 +--- tests/misc/unexpand.pl.orig ++++ tests/misc/unexpand.pl @@ -27,6 +27,14 @@ my $limits = getlimits (); my $prog = 'unexpand'; @@ -4579,8 +4640,8 @@ Index: tests/misc/unexpand.pl Index: tests/misc/uniq.pl =================================================================== ---- tests/misc/uniq.pl.orig 2015-06-26 19:04:19.000000000 +0200 -+++ tests/misc/uniq.pl 2015-07-09 17:15:19.623057566 +0200 +--- tests/misc/uniq.pl.orig ++++ tests/misc/uniq.pl @@ -23,9 +23,17 @@ my $limits = getlimits (); my $prog = 'uniq'; my $try = "Try '$prog --help' for more information.\n"; @@ -4655,13 +4716,12 @@ Index: tests/misc/uniq.pl Index: tests/pr/pr-tests.pl =================================================================== ---- tests/pr/pr-tests.pl.orig 2015-06-26 19:04:19.000000000 +0200 -+++ tests/pr/pr-tests.pl 2015-07-09 17:15:19.624057542 +0200 -@@ -22,6 +22,16 @@ use strict; - @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; - +--- tests/pr/pr-tests.pl.orig ++++ tests/pr/pr-tests.pl +@@ -24,6 +24,15 @@ use strict; my $prog = 'pr'; -+ + my $normalize_strerror = "s/': .*/'/"; + +my $mb_locale; +#Uncomment the following line to enable multibyte tests +$mb_locale = $ENV{LOCALE_FR_UTF8}; @@ -4671,10 +4731,10 @@ Index: tests/pr/pr-tests.pl +my $try = "Try \`$prog --help' for more information.\n"; +my $inval = "$prog: invalid byte, character or field list\n$try"; + - my $normalize_strerror = "s/': .*/'/"; - my @tv = ( -@@ -467,8 +477,48 @@ push @Tests, + + # -b option is no longer an official option. But it's still working to +@@ -467,8 +476,48 @@ push @Tests, {IN=>{3=>"x\ty\tz\n"}}, {OUT=>join("\t", qw(a b c m n o x y z)) . "\n"} ]; diff --git a/coreutils-testsuite.changes b/coreutils-testsuite.changes index f2683ce..ba5d7f7 100644 --- a/coreutils-testsuite.changes +++ b/coreutils-testsuite.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Jul 16 01:28:36 UTC 2015 - mail@bernhard-voelker.de + +- Sync I18N patch from semi-official repository (shared among + distributions, maintained by Padraig Brady): + https://github.com/pixelb/coreutils/tree/i18n + * coreutils-i18n.patch: Improve cut(1) performance in field-mode + in UTF8 locales. Squash in sort-keycompare-mb.patch. + * sort-keycompare-mb.patch: Remove. + +- coreutils-build-timeout-as-pie.patch: Refresh. + ------------------------------------------------------------------- Thu Jul 9 15:12:10 CEST 2015 - pth@suse.de @@ -151,7 +163,7 @@ Thu Jul 9 15:12:10 CEST 2015 - pth@suse.de coreutils-tests-shorten-extreme-factor-tests.patch sort-keycompare-mb.patch -- Patches removed because they're included in 8.24: +- Patches removed because they're included in 8.24: coreutils-chroot-perform-chdir-unless-skip-chdir.patch coreutils-df-doc-df-a-includes-duplicate-file-systems.patch coreutils-df-improve-mount-point-selection.patch diff --git a/coreutils-testsuite.spec b/coreutils-testsuite.spec index 533aa46..d8cf7e1 100644 --- a/coreutils-testsuite.spec +++ b/coreutils-testsuite.spec @@ -99,7 +99,6 @@ Source3: baselibs.conf Patch1: coreutils-remove_hostname_documentation.patch Patch3: coreutils-remove_kill_documentation.patch Patch4: coreutils-i18n.patch -Patch5: sort-keycompare-mb.patch Patch8: coreutils-sysinfo.patch Patch16: coreutils-invalid-ids.patch @@ -149,7 +148,6 @@ the GNU fileutils, sh-utils, and textutils packages. %prep %setup -q -n coreutils-%{version} %patch4 -%patch5 %patch1 %patch3 %patch8 diff --git a/coreutils.changes b/coreutils.changes index f2683ce..ba5d7f7 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Jul 16 01:28:36 UTC 2015 - mail@bernhard-voelker.de + +- Sync I18N patch from semi-official repository (shared among + distributions, maintained by Padraig Brady): + https://github.com/pixelb/coreutils/tree/i18n + * coreutils-i18n.patch: Improve cut(1) performance in field-mode + in UTF8 locales. Squash in sort-keycompare-mb.patch. + * sort-keycompare-mb.patch: Remove. + +- coreutils-build-timeout-as-pie.patch: Refresh. + ------------------------------------------------------------------- Thu Jul 9 15:12:10 CEST 2015 - pth@suse.de @@ -151,7 +163,7 @@ Thu Jul 9 15:12:10 CEST 2015 - pth@suse.de coreutils-tests-shorten-extreme-factor-tests.patch sort-keycompare-mb.patch -- Patches removed because they're included in 8.24: +- Patches removed because they're included in 8.24: coreutils-chroot-perform-chdir-unless-skip-chdir.patch coreutils-df-doc-df-a-includes-duplicate-file-systems.patch coreutils-df-improve-mount-point-selection.patch diff --git a/coreutils.spec b/coreutils.spec index 886f153..2d4f81f 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -99,7 +99,6 @@ Source3: baselibs.conf Patch1: coreutils-remove_hostname_documentation.patch Patch3: coreutils-remove_kill_documentation.patch Patch4: coreutils-i18n.patch -Patch5: sort-keycompare-mb.patch Patch8: coreutils-sysinfo.patch Patch16: coreutils-invalid-ids.patch @@ -149,7 +148,6 @@ the GNU fileutils, sh-utils, and textutils packages. %prep %setup -q -n coreutils-%{version} %patch4 -%patch5 %patch1 %patch3 %patch8 diff --git a/sort-keycompare-mb.patch b/sort-keycompare-mb.patch deleted file mode 100644 index 1b35ae9..0000000 --- a/sort-keycompare-mb.patch +++ /dev/null @@ -1,84 +0,0 @@ -Subject: sort i18n: make sure to NUL-terminate the sort keys - -Fixes http://bugs.gnu.org/18540 - -* src/sort.c (keycompare_mb): use the keys alone, i.e. null-terminated. -Patch analogously to non-multibyte upstream patch: - http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=b877ea4b3e - -* tests/misc/sort.pl (23): Add test, taken from upstream patch: - http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=4d8c4dfc21 -(11a): Exempt from MB run, as the collation order in the French -locale would provoke a false positive, because the strcoll() comparison -between the trailing blank and tabs leads to a different result there. -(11b): Likewise. - ---- - src/sort.c | 22 ++++++++++++++++++++-- - tests/misc/sort.pl | 1 + - 2 files changed, 21 insertions(+), 2 deletions(-) - -Index: src/sort.c -=================================================================== ---- src/sort.c.orig 2015-07-09 14:50:08.426211492 +0200 -+++ src/sort.c 2015-07-09 14:50:08.439211187 +0200 -@@ -3235,6 +3235,9 @@ keycompare_mb (const struct line *a, con - size_t lena = lima <= texta ? 0 : lima - texta; - size_t lenb = limb <= textb ? 0 : limb - textb; - -+ char enda IF_LINT (= 0); -+ char endb IF_LINT (= 0); -+ - char const *translate = key->translate; - bool const *ignore = key->ignore; - -@@ -3254,6 +3257,12 @@ keycompare_mb (const struct line *a, con - texta = copy_a; textb = copy_b; - lena = new_len_a; lenb = new_len_b; - } -+ else -+ { -+ /* Use the keys in-place, temporarily null-terminated. */ -+ enda = texta[lena]; texta[lena] = '\0'; -+ endb = textb[lenb]; textb[lenb] = '\0'; -+ } - - if (key->random) - diff = compare_random (texta, lena, textb, lenb); -@@ -3277,13 +3286,22 @@ keycompare_mb (const struct line *a, con - diff = 1; - else if (hard_LC_COLLATE && !folding) - { -- diff = xmemcoll0 (texta, lena, textb, lenb); -+ diff = xmemcoll0 (texta, lena + 1, textb, lenb + 1); - } - else -- diff = memcmp (texta, textb, MIN (lena + 1,lenb + 1)); -+ { -+ diff = memcmp (texta, textb, MIN (lena, lenb)); -+ if (diff == 0) -+ diff = lena < lenb ? -1 : lena != lenb; -+ } - - if (ignore || translate) - free (texta); -+ else -+ { -+ texta[lena] = enda; -+ textb[lenb] = endb; -+ } - - if (diff) - goto not_equal; -Index: tests/misc/sort.pl -=================================================================== ---- tests/misc/sort.pl.orig 2015-07-09 14:50:08.429211422 +0200 -+++ tests/misc/sort.pl 2015-07-09 14:50:08.440211164 +0200 -@@ -450,6 +450,7 @@ if ($mb_locale ne 'C') - #disable several failing tests until investigation, disable all tests with envvars set - next if (grep {ref $_ eq 'HASH' && exists $_->{ENV}} (@new_t)); - next if ($test_name =~ "18g" or $test_name =~ "sort-numeric" or $test_name =~ "08[ab]" or $test_name =~ "03[def]" or $test_name =~ "h4" or $test_name =~ "n1" or $test_name =~ "2[01]a"); -+ next if ($test_name =~ "11[ab]"); # avoid FP: expected result differs to MB result due to collation rules. - push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}]; - } - push @Tests, @new;