diff --git a/.gitignore b/.gitignore index cbcc306..8f473b3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ /coreutils-8.22.tar.xz /coreutils-8.23.tar.xz /coreutils-8.23.tar.xz.sig +/coreutils-8.24.tar.xz +/coreutils-8.24.tar.xz.sig diff --git a/coreutils-6.10-configuration.patch b/coreutils-6.10-configuration.patch index 4403811..4c68077 100644 --- a/coreutils-6.10-configuration.patch +++ b/coreutils-6.10-configuration.patch @@ -172,15 +172,15 @@ diff -urNp coreutils-8.23-orig/tests/df/skip-duplicates.sh coreutils-8.23/tests/ +++ coreutils-8.23/tests/df/skip-duplicates.sh 2014-07-24 15:53:33.473031545 +0200 @@ -25,6 +25,10 @@ require_gcc_shared_ # potentially very many remote mounts. - df --local || skip_ "df fails" + df --local || skip_ 'df fails' +#mark it expensive, to temporarily skip the test in koji +expensive_ + + 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) diff -urNp coreutils-8.23-orig/man/local.mk coreutils-8.23/man/local.mk --- coreutils-8.23-orig/man/local.mk 2014-07-18 03:40:57.000000000 +0200 +++ coreutils-8.23/man/local.mk 2014-08-05 12:18:20.477524009 +0200 diff --git a/coreutils-8.23-chroot-chdir.patch b/coreutils-8.23-chroot-chdir.patch deleted file mode 100644 index ce977bd..0000000 --- a/coreutils-8.23-chroot-chdir.patch +++ /dev/null @@ -1,411 +0,0 @@ -From 0cf7b1d928acaaddd4eaa28c6a22f7bd6457b379 Mon Sep 17 00:00:00 2001 -From: Bernhard Voelker -Date: Fri, 01 Aug 2014 00:07:33 +0000 -Subject: 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. -* 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 ---- -diff --git a/doc/coreutils.texi b/doc/coreutils.texi -index 96f0781..7c86719 100644 ---- a/doc/coreutils.texi -+++ b/doc/coreutils.texi -@@ -16113,7 +16113,10 @@ On many systems, only the super-user can do this.@footnote{However, - 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 -@@ -16123,10 +16126,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}). - -@@ -16135,6 +16139,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 -@@ -16145,13 +16157,13 @@ If a @var{user} is specified then the supplementary groups - 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 - -diff --git a/init.cfg b/init.cfg -index 725ee12..032646b 100644 ---- a/init.cfg -+++ b/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 -diff --git a/src/chroot.c b/src/chroot.c -index 6c2d63f..418ea67 100644 ---- a/src/chroot.c -+++ b/src/chroot.c -@@ -49,13 +49,15 @@ static inline bool gid_unset (gid_t gid) { return gid == (gid_t) -1; } - 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 NEWROOT.\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. */ -diff --git a/tests/cp/preserve-gid.sh b/tests/cp/preserve-gid.sh -index f141ac1..5499c2e 100755 ---- a/tests/cp/preserve-gid.sh -+++ b/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" "$@" - } -diff --git a/tests/cp/special-bits.sh b/tests/cp/special-bits.sh -index a55eea2..1402819 100755 ---- a/tests/cp/special-bits.sh -+++ b/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 -diff --git a/tests/id/setgid.sh b/tests/id/setgid.sh -index 6d9d74f..019418a 100755 ---- a/tests/id/setgid.sh -+++ b/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 -diff --git a/tests/misc/chroot-fail.sh b/tests/misc/chroot-fail.sh -index a84826f..82ae23c 100755 ---- a/tests/misc/chroot-fail.sh -+++ b/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 - -diff --git a/tests/misc/truncate-owned-by-other.sh b/tests/misc/truncate-owned-by-other.sh -index e70badb..f65439e 100755 ---- a/tests/misc/truncate-owned-by-other.sh -+++ b/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 -diff --git a/tests/mv/sticky-to-xpart.sh b/tests/mv/sticky-to-xpart.sh -index e0c99e9..6c1f6e8 100755 ---- a/tests/mv/sticky-to-xpart.sh -+++ b/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. -diff --git a/tests/rm/fail-2eperm.sh b/tests/rm/fail-2eperm.sh -index 6e8ce9b..c324037 100755 ---- a/tests/rm/fail-2eperm.sh -+++ b/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. -diff --git a/tests/rm/no-give-up.sh b/tests/rm/no-give-up.sh -index 41070c9..958f9e8 100755 ---- a/tests/rm/no-give-up.sh -+++ b/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. -diff --git a/tests/touch/now-owned-by-other.sh b/tests/touch/now-owned-by-other.sh -index d01097e..018ef11 100755 ---- a/tests/touch/now-owned-by-other.sh -+++ b/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 --- -cgit v0.9.0.2 diff --git a/coreutils-DIR_COLORS b/coreutils-DIR_COLORS index 10ebf7a..ecffc65 100644 --- a/coreutils-DIR_COLORS +++ b/coreutils-DIR_COLORS @@ -36,12 +36,14 @@ TERM dtterm TERM eterm-color TERM gnome TERM gnome-256color +TERM hurd TERM jfbterm TERM konsole TERM kterm TERM linux TERM linux-c TERM mach-color +TERM mach-gnu-color TERM mlterm TERM putty TERM putty-256color diff --git a/coreutils-DIR_COLORS.lightbgcolor b/coreutils-DIR_COLORS.lightbgcolor index bf3e5b3..450deb0 100644 --- a/coreutils-DIR_COLORS.lightbgcolor +++ b/coreutils-DIR_COLORS.lightbgcolor @@ -36,12 +36,14 @@ TERM dtterm TERM eterm-color TERM gnome TERM gnome-256color +TERM hurd TERM jfbterm TERM konsole TERM kterm TERM linux TERM linux-c TERM mach-color +TERM mach-gnu-color TERM mlterm TERM putty TERM putty-256color diff --git a/coreutils-df-direct.patch b/coreutils-df-direct.patch index a3df5e9..361b813 100644 --- a/coreutils-df-direct.patch +++ b/coreutils-df-direct.patch @@ -1,9 +1,9 @@ diff -urNp coreutils-8.21-orig/doc/coreutils.texi coreutils-8.21/doc/coreutils.texi --- coreutils-8.21-orig/doc/coreutils.texi 2013-02-11 10:37:28.000000000 +0100 +++ coreutils-8.21/doc/coreutils.texi 2013-02-15 10:15:26.497593689 +0100 -@@ -10961,6 +10961,13 @@ pseudo-file-systems, such as automounter - 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. +@@ -10961,6 +10961,13 @@ + but in general this option makes @command{df} much slower, especially when + there are many or very busy file systems. +@item --direct +@opindex --direct @@ -82,9 +82,9 @@ diff -urNp coreutils-8.21-orig/src/df.c coreutils-8.21/src/df.c '-BM' prints sizes in units of 1,048,576 bytes;\n\ see SIZE format below\n\ + --direct show statistics for a file instead of mount point\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); @@ -1305,6 +1325,9 @@ main (int argc, char **argv) xstrtol_fatal (e, oi, c, long_options, optarg); } diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 948b555..d1d18a8 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -1,6 +1,6 @@ -diff -urNp coreutils-8.23-orig/lib/linebuffer.h coreutils-8.23/lib/linebuffer.h ---- coreutils-8.23-orig/lib/linebuffer.h 2014-05-29 14:05:50.000000000 +0200 -+++ coreutils-8.23/lib/linebuffer.h 2014-07-22 13:45:52.700651881 +0200 +diff -urNp coreutils-8.24-orig/lib/linebuffer.h coreutils-8.24/lib/linebuffer.h +--- coreutils-8.24-orig/lib/linebuffer.h 2015-06-16 07:00:37.000000000 +0200 ++++ coreutils-8.24/lib/linebuffer.h 2015-07-05 09:04:33.027546943 +0200 @@ -21,6 +21,11 @@ # include @@ -23,9 +23,9 @@ diff -urNp coreutils-8.23-orig/lib/linebuffer.h coreutils-8.23/lib/linebuffer.h }; /* Initialize linebuffer LINEBUFFER for use. */ -diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/src/cut.c ---- coreutils-8.23-orig/src/cut.c 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/src/cut.c 2014-07-22 13:48:06.225671732 +0200 +diff -urNp coreutils-8.24-orig/src/cut.c coreutils-8.24/src/cut.c +--- coreutils-8.24-orig/src/cut.c 2015-06-26 19:05:22.000000000 +0200 ++++ coreutils-8.24/src/cut.c 2015-07-05 09:04:33.028546950 +0200 @@ -28,6 +28,11 @@ #include #include @@ -156,7 +156,7 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/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\ @@ -165,7 +165,7 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/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)); @@ -175,7 +175,7 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/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) } } @@ -258,7 +258,7 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/src/cut.c /* Read from stream STREAM, printing to standard output any selected fields. */ static void -@@ -649,13 +806,211 @@ cut_fields (FILE *stream) +@@ -648,13 +805,211 @@ cut_fields (FILE *stream) } } @@ -473,7 +473,7 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/src/cut.c } /* Process file FILE to standard output. -@@ -707,6 +1062,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); @@ -481,7 +481,7 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/src/cut.c initialize_main (&argc, &argv); set_program_name (argv[0]); -@@ -729,7 +1085,6 @@ main (int argc, char **argv) +@@ -728,7 +1084,6 @@ main (int argc, char **argv) switch (optc) { case 'b': @@ -489,7 +489,7 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/src/cut.c /* Build the byte list. */ if (operating_mode != undefined_mode) FATAL_ERROR (_("only one type of list may be specified")); -@@ -737,6 +1092,14 @@ main (int argc, char **argv) +@@ -736,6 +1091,14 @@ main (int argc, char **argv) spec_list_string = optarg; break; @@ -504,7 +504,7 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/src/cut.c case 'f': /* Build the field list. */ if (operating_mode != undefined_mode) -@@ -748,10 +1111,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.' */ @@ -547,7 +547,7 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/src/cut.c break; case OUTPUT_DELIMITER_OPTION: -@@ -764,6 +1155,7 @@ main (int argc, char **argv) +@@ -763,6 +1154,7 @@ main (int argc, char **argv) break; case 'n': @@ -555,7 +555,7 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/src/cut.c break; case 's': -@@ -803,15 +1195,34 @@ main (int argc, char **argv) +@@ -802,15 +1194,34 @@ main (int argc, char **argv) } if (!delim_specified) @@ -596,9 +596,9 @@ diff -urNp coreutils-8.23-orig/src/cut.c coreutils-8.23/src/cut.c } if (optind == argc) -diff -urNp coreutils-8.23-orig/src/expand.c coreutils-8.23/src/expand.c ---- coreutils-8.23-orig/src/expand.c 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/src/expand.c 2014-07-22 13:45:52.704651900 +0200 +diff -urNp coreutils-8.24-orig/src/expand.c coreutils-8.24/src/expand.c +--- coreutils-8.24-orig/src/expand.c 2015-06-26 19:05:22.000000000 +0200 ++++ coreutils-8.24/src/expand.c 2015-07-05 09:04:33.028546950 +0200 @@ -37,12 +37,34 @@ #include #include @@ -791,10 +791,10 @@ diff -urNp coreutils-8.23-orig/src/expand.c coreutils-8.23/src/expand.c if (have_read_stdin && fclose (stdin) != 0) error (EXIT_FAILURE, errno, "-"); -diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/src/fold.c ---- coreutils-8.23-orig/src/fold.c 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/src/fold.c 2014-07-22 13:45:52.705651904 +0200 -@@ -22,12 +22,34 @@ +diff -urNp coreutils-8.24-orig/src/fold.c coreutils-8.24/src/fold.c +--- coreutils-8.24-orig/src/fold.c 2015-06-26 19:05:22.000000000 +0200 ++++ coreutils-8.24/src/fold.c 2015-07-05 09:04:33.029546958 +0200 +@@ -22,11 +22,33 @@ #include #include @@ -811,8 +811,7 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/src/fold.c #include "system.h" #include "error.h" #include "fadvise.h" - #include "quote.h" - #include "xstrtol.h" + #include "xdectoint.h" +/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC + installation; work around this configuration error. */ @@ -829,7 +828,7 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/src/fold.c #define TAB_WIDTH 8 /* The official name of this program (e.g., no 'g' prefix). */ -@@ -35,20 +57,41 @@ +@@ -34,20 +56,41 @@ #define AUTHORS proper_name ("David MacKenzie") @@ -875,7 +874,7 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/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 +118,7 @@ Wrap input lines in each FILE, writing t fputs (_("\ -b, --bytes count bytes rather than columns\n\ @@ -883,7 +882,7 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/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 +136,7 @@ Wrap input lines in each FILE, writing t static size_t adjust_column (size_t column, char c) { @@ -892,7 +891,7 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/src/fold.c { if (c == '\b') { -@@ -116,30 +160,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. */ @@ -925,7 +924,7 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/src/fold.c fadvise (istream, FADVISE_SEQUENTIAL); -@@ -169,6 +197,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; @@ -941,16 +940,16 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/src/fold.c /* Look for the last blank. */ while (logical_end) { -@@ -215,11 +252,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 @@ -1122,10 +1121,10 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/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 + @@ -1164,7 +1163,7 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/src/fold.c if (ferror (istream)) { error (0, saved_errno, "%s", filename); -@@ -252,7 +499,8 @@ main (int argc, char **argv) +@@ -251,7 +498,8 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1174,7 +1173,7 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/src/fold.c while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) { -@@ -261,7 +509,15 @@ main (int argc, char **argv) +@@ -260,7 +508,15 @@ main (int argc, char **argv) switch (optc) { case 'b': /* Count bytes rather than columns. */ @@ -1191,9 +1190,9 @@ diff -urNp coreutils-8.23-orig/src/fold.c coreutils-8.23/src/fold.c break; case 's': /* Break at word boundaries. */ -diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/src/join.c ---- coreutils-8.23-orig/src/join.c 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/src/join.c 2014-07-22 13:45:52.707651912 +0200 +diff -urNp coreutils-8.24-orig/src/join.c coreutils-8.24/src/join.c +--- coreutils-8.24-orig/src/join.c 2015-06-26 19:05:22.000000000 +0200 ++++ coreutils-8.24/src/join.c 2015-07-05 09:04:33.029546958 +0200 @@ -22,18 +22,32 @@ #include #include @@ -1245,7 +1244,7 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/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; @@ -1263,7 +1262,7 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/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); } @@ -1411,7 +1410,7 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/src/join.c 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. */ @@ -1542,8 +1541,8 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/src/join.c - diff = memcmp (beg1, beg2, MIN (len1, len2)); + copy[0] = beg[0]; + copy[1] = beg[1]; - } - ++ } ++ + if (hard_LC_COLLATE) + { + diff = xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]); @@ -1553,14 +1552,14 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/src/join.c + free (copy[i]); + + return diff; -+ } + } + diff = memcmp (copy[0], copy[1], MIN (len[0], len[1])); + + if (mallocd) + for (i = 0; i < 2; i++) + free (copy[i]); + -+ + if (diff) return diff; - return len1 < len2 ? -1 : len1 != len2; @@ -1568,7 +1567,7 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/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]; @@ -1580,7 +1579,7 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/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. */ @@ -1612,7 +1611,7 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/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; @@ -1620,7 +1619,7 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/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; @@ -1629,7 +1628,7 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/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': { @@ -1686,9 +1685,9 @@ diff -urNp coreutils-8.23-orig/src/join.c coreutils-8.23/src/join.c break; case 'z': -diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c ---- coreutils-8.23-orig/src/pr.c 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/src/pr.c 2014-07-22 13:45:52.713651936 +0200 +diff -urNp coreutils-8.24-orig/src/pr.c coreutils-8.24/src/pr.c +--- coreutils-8.24-orig/src/pr.c 2015-06-26 19:05:22.000000000 +0200 ++++ coreutils-8.24/src/pr.c 2015-07-05 09:04:33.030546965 +0200 @@ -312,6 +312,24 @@ #include @@ -1714,9 +1713,9 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c #include "system.h" #include "error.h" #include "fadvise.h" -@@ -323,6 +341,18 @@ - #include "strftime.h" +@@ -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 @@ -1733,7 +1732,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "pr" -@@ -415,7 +445,20 @@ struct COLUMN +@@ -416,7 +446,20 @@ struct COLUMN typedef struct COLUMN COLUMN; @@ -1755,23 +1754,23 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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); - 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 *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); +@@ -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); -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 +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]. */ @@ -1780,7 +1779,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +600,7 @@ static int chars_per_column; static bool untabify_input = false; /* (-e) The input tab character. */ @@ -1789,7 +1788,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +610,10 @@ static int chars_per_input_tab = 8; static bool tabify_output = false; /* (-i) The output tab character. */ @@ -1801,7 +1800,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +683,13 @@ static int line_number; static bool numbered_lines = false; /* (-n) Character which follows each line number. */ @@ -1816,7 +1815,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +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; @@ -1824,7 +1823,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +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); @@ -1838,7 +1837,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c } int -@@ -867,6 +927,21 @@ main (int argc, char **argv) +@@ -864,6 +924,21 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1860,7 +1859,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +1015,12 @@ main (int argc, char **argv) break; case 'e': if (optarg) @@ -1875,7 +1874,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c /* Could check tab width > 0. */ untabify_input = true; break; -@@ -957,8 +1036,12 @@ main (int argc, char **argv) +@@ -954,8 +1033,12 @@ main (int argc, char **argv) break; case 'i': if (optarg) @@ -1890,7 +1889,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c /* Could check tab width > 0. */ tabify_output = true; break; -@@ -985,8 +1068,8 @@ main (int argc, char **argv) +@@ -973,8 +1056,8 @@ main (int argc, char **argv) case 'n': numbered_lines = true; if (optarg) @@ -1901,7 +1900,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c break; case 'N': skip_count = false; -@@ -1025,7 +1108,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 (""); @@ -1910,7 +1909,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c use_col_separator = true; if (optarg) separator_string (optarg); -@@ -1182,10 +1265,45 @@ main (int argc, char **argv) +@@ -1152,10 +1235,45 @@ getoptnum (const char *n_str, int min, i a number. */ static void @@ -1958,7 +1957,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c if (*arg) { long int tmp_long; -@@ -1207,6 +1325,11 @@ static void +@@ -1177,6 +1295,11 @@ static void init_parameters (int number_of_files) { int chars_used_by_number = 0; @@ -1970,7 +1969,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +1337,7 @@ init_parameters (int number_of_files) else col_sep_string = column_separator; @@ -1979,7 +1978,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +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. */ @@ -1993,7 +1992,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +1380,7 @@ init_parameters (int number_of_files) } chars_per_column = (chars_per_line - chars_used_by_number @@ -2002,7 +2001,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +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); @@ -2011,7 +2010,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c } /* Open the necessary files, -@@ -1413,7 +1536,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. */ @@ -2020,7 +2019,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c /* This loop takes care of all but the rightmost column. */ -@@ -1447,7 +1570,7 @@ init_funcs (void) +@@ -1417,7 +1540,7 @@ init_funcs (void) } else { @@ -2029,7 +2028,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c h_next = h + chars_per_column; } } -@@ -1738,9 +1861,9 @@ static void +@@ -1708,9 +1831,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -2041,7 +2040,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c padding_not_printed = ANYWHERE; } -@@ -2011,13 +2134,13 @@ store_char (char c) +@@ -1981,13 +2104,13 @@ store_char (char c) /* May be too generous. */ buff = X2REALLOC (buff, &buff_allocated); } @@ -2057,7 +2056,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c char *s; int num_width; -@@ -2034,22 +2157,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. */ @@ -2086,7 +2085,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2210,7 +2335,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) { @@ -2095,7 +2094,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c h_old = h_new; } while (++h_old <= goal) -@@ -2230,6 +2355,7 @@ print_sep_string (void) +@@ -2200,6 +2325,7 @@ print_sep_string (void) { char *s; int l = col_sep_length; @@ -2103,7 +2102,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c s = col_sep_string; -@@ -2243,6 +2369,7 @@ print_sep_string (void) +@@ -2213,6 +2339,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -2111,7 +2110,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +2353,15 @@ print_sep_string (void) } else { @@ -2128,7 +2127,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +2389,7 @@ print_clump (COLUMN *p, int n, char *clu required number of tabs and spaces. */ static void @@ -2137,7 +2136,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c { if (tabify_output) { -@@ -2313,6 +2443,74 @@ print_char (char c) +@@ -2283,6 +2413,74 @@ print_char (char c) putchar (c); } @@ -2212,7 +2211,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/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 +2660,9 @@ read_line (COLUMN *p) align_empty_cols = false; } @@ -2224,7 +2223,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c padding_not_printed = ANYWHERE; } -@@ -2564,7 +2762,7 @@ print_stored (COLUMN *p) +@@ -2534,7 +2732,7 @@ print_stored (COLUMN *p) int i; int line = p->current_line++; @@ -2233,7 +2232,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c /* FIXME UMR: Uninitialized memory read: * This is occurring while in: -@@ -2576,7 +2774,7 @@ print_stored (COLUMN *p) +@@ -2546,7 +2744,7 @@ print_stored (COLUMN *p) xmalloc [xmalloc.c:94] init_store_cols [pr.c:1648] */ @@ -2242,7 +2241,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c pad_vertically = true; -@@ -2595,9 +2793,9 @@ print_stored (COLUMN *p) +@@ -2565,9 +2763,9 @@ print_stored (COLUMN *p) } } @@ -2254,7 +2253,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c padding_not_printed = ANYWHERE; } -@@ -2610,8 +2808,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]; @@ -2265,7 +2264,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c } return true; -@@ -2630,7 +2828,7 @@ print_stored (COLUMN *p) +@@ -2600,7 +2798,7 @@ print_stored (COLUMN *p) number of characters is 1.) */ static int @@ -2274,7 +2273,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c { unsigned char uc = c; char *s = clump_buff; -@@ -2640,10 +2838,10 @@ char_to_clump (char c) +@@ -2610,10 +2808,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8; @@ -2287,7 +2286,7 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c { width = TAB_WIDTH (chars_per_c, input_position); -@@ -2724,6 +2922,164 @@ char_to_clump (char c) +@@ -2694,6 +2892,164 @@ char_to_clump (char c) return chars; } @@ -2452,9 +2451,9 @@ diff -urNp coreutils-8.23-orig/src/pr.c coreutils-8.23/src/pr.c /* We've just printed some files and need to clean up things before looking for more options and printing the next batch of files. -diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/src/sort.c ---- coreutils-8.23-orig/src/sort.c 2014-07-14 00:09:52.000000000 +0200 -+++ coreutils-8.23/src/sort.c 2014-07-22 13:45:52.719651960 +0200 +diff -urNp coreutils-8.24-orig/src/sort.c coreutils-8.24/src/sort.c +--- coreutils-8.24-orig/src/sort.c 2015-06-26 19:05:22.000000000 +0200 ++++ coreutils-8.24/src/sort.c 2015-07-05 09:04:33.032546980 +0200 @@ -29,6 +29,14 @@ #include #include @@ -2528,7 +2527,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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); } @@ -2575,7 +2574,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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); } @@ -2584,7 +2583,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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 @@ -2593,7 +2592,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/src/sort.c { size_t i; -@@ -1282,7 +1353,7 @@ inittables (void) +@@ -1281,7 +1352,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -2602,7 +2601,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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); } @@ -2687,7 +2686,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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 * @@ -2696,7 +2695,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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. */ @@ -2709,7 +2708,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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; } @@ -2781,7 +2780,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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. */ @@ -2794,7 +2793,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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. */ @@ -2807,7 +2806,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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; } @@ -2938,7 +2937,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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) @@ -2963,7 +2962,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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 @@ -2972,7 +2971,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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); } @@ -2998,7 +2997,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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 @@ -3007,7 +3006,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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'; @@ -3025,7 +3024,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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 */ @@ -3034,7 +3033,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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")); } @@ -3123,7 +3122,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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) @@ -3132,7 +3131,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/src/sort.c else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2695,6 +3135,209 @@ keycompare (struct line const *a, struct +@@ -2694,6 +3134,209 @@ keycompare (struct line const *a, struct return key->reverse ? -diff : diff; } @@ -3342,7 +3341,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/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 +3347,7 @@ compare (struct line const *a, struct li +@@ -2721,7 +3364,7 @@ compare (struct line const *a, struct li diff = - NONZERO (blen); else if (blen == 0) diff = 1; @@ -3351,7 +3350,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/src/sort.c { /* Note xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4121,6 +4746,7 @@ set_ordering (char const *s, struct keyf +@@ -4120,6 +4763,7 @@ set_ordering (char const *s, struct keyf break; case 'f': key->translate = fold_toupper; @@ -3359,7 +3358,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/src/sort.c break; case 'g': key->general_numeric = true; -@@ -4198,7 +4824,7 @@ main (int argc, char **argv) +@@ -4197,7 +4841,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -3368,7 +3367,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/src/sort.c hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4219,6 +4845,29 @@ main (int argc, char **argv) +@@ -4218,6 +4862,29 @@ main (int argc, char **argv) thousands_sep = -1; } @@ -3398,7 +3397,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/src/sort.c have_read_stdin = false; inittables (); -@@ -4493,13 +5142,34 @@ main (int argc, char **argv) +@@ -4492,13 +5159,34 @@ main (int argc, char **argv) case 't': { @@ -3437,7 +3436,7 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/src/sort.c else { /* Provoke with 'sort -txx'. Complain about -@@ -4510,9 +5180,12 @@ main (int argc, char **argv) +@@ -4509,9 +5197,12 @@ main (int argc, char **argv) quote (optarg)); } } @@ -3452,42 +3451,9 @@ diff -urNp coreutils-8.23-orig/src/sort.c coreutils-8.23/src/sort.c } break; -diff -urNp coreutils-8.23-orig/tests/i18n/sort.sh coreutils-8.23/tests/i18n/sort.sh ---- coreutils-8.23-orig/tests/i18n/sort.sh 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.23/tests/i18n/sort.sh 2014-07-22 13:45:52.733652016 +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 -diff -urNp coreutils-8.23-orig/src/unexpand.c coreutils-8.23/src/unexpand.c ---- coreutils-8.23-orig/src/unexpand.c 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/src/unexpand.c 2014-07-22 13:45:52.721651968 +0200 +diff -urNp coreutils-8.24-orig/src/unexpand.c coreutils-8.24/src/unexpand.c +--- coreutils-8.24-orig/src/unexpand.c 2015-06-26 19:05:22.000000000 +0200 ++++ coreutils-8.24/src/unexpand.c 2015-07-05 09:04:33.032546980 +0200 @@ -38,12 +38,29 @@ #include #include @@ -3743,9 +3709,9 @@ diff -urNp coreutils-8.23-orig/src/unexpand.c coreutils-8.23/src/unexpand.c if (have_read_stdin && fclose (stdin) != 0) error (EXIT_FAILURE, errno, "-"); -diff -urNp coreutils-8.23-orig/src/uniq.c coreutils-8.23/src/uniq.c ---- coreutils-8.23-orig/src/uniq.c 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/src/uniq.c 2014-07-22 13:45:52.724651980 +0200 +diff -urNp coreutils-8.24-orig/src/uniq.c coreutils-8.24/src/uniq.c +--- coreutils-8.24-orig/src/uniq.c 2015-06-26 19:04:19.000000000 +0200 ++++ coreutils-8.24/src/uniq.c 2015-07-05 09:04:33.032546980 +0200 @@ -21,6 +21,17 @@ #include #include @@ -3898,7 +3864,7 @@ diff -urNp coreutils-8.23-orig/src/uniq.c coreutils-8.23/src/uniq.c if (check_chars < oldlen) oldlen = check_chars; if (check_chars < newlen) -@@ -286,14 +392,103 @@ different (char *old, char *new, size_t +@@ -286,15 +392,104 @@ different (char *old, char *new, size_t if (ignore_case) { @@ -3930,8 +3896,8 @@ diff -urNp coreutils-8.23-orig/src/uniq.c coreutils-8.23/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) @@ -4002,11 +3968,12 @@ diff -urNp coreutils-8.23-orig/src/uniq.c coreutils-8.23/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); @@ -4129,10 +4096,43 @@ diff -urNp coreutils-8.23-orig/src/uniq.c coreutils-8.23/src/uniq.c skip_chars = 0; skip_fields = 0; check_chars = SIZE_MAX; -diff -urNp coreutils-8.23-orig/tests/local.mk coreutils-8.23/tests/local.mk ---- coreutils-8.23-orig/tests/local.mk 2014-07-22 13:45:10.494422571 +0200 -+++ coreutils-8.23/tests/local.mk 2014-07-22 13:45:52.726651988 +0200 -@@ -331,6 +331,8 @@ all_tests = \ +diff -urNp coreutils-8.24-orig/tests/i18n/sort.sh coreutils-8.24/tests/i18n/sort.sh +--- coreutils-8.24-orig/tests/i18n/sort.sh 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.24/tests/i18n/sort.sh 2015-07-05 09:04:33.032546980 +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 +diff -urNp coreutils-8.24-orig/tests/local.mk coreutils-8.24/tests/local.mk +--- coreutils-8.24-orig/tests/local.mk 2015-07-05 09:00:46.526859558 +0200 ++++ coreutils-8.24/tests/local.mk 2015-07-05 09:04:33.033546987 +0200 +@@ -341,6 +341,8 @@ all_tests = \ tests/misc/sort-discrim.sh \ tests/misc/sort-files0-from.pl \ tests/misc/sort-float.sh \ @@ -4141,9 +4141,9 @@ diff -urNp coreutils-8.23-orig/tests/local.mk coreutils-8.23/tests/local.mk tests/misc/sort-merge.pl \ tests/misc/sort-merge-fdlimit.sh \ tests/misc/sort-month.sh \ -diff -urNp coreutils-8.23-orig/tests/misc/cut.pl coreutils-8.23/tests/misc/cut.pl ---- coreutils-8.23-orig/tests/misc/cut.pl 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/tests/misc/cut.pl 2014-07-22 13:45:52.728651996 +0200 +diff -urNp coreutils-8.24-orig/tests/misc/cut.pl coreutils-8.24/tests/misc/cut.pl +--- coreutils-8.24-orig/tests/misc/cut.pl 2015-06-26 19:04:19.000000000 +0200 ++++ coreutils-8.24/tests/misc/cut.pl 2015-07-05 09:04:33.033546987 +0200 @@ -23,9 +23,11 @@ use strict; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4166,9 +4166,9 @@ diff -urNp coreutils-8.23-orig/tests/misc/cut.pl coreutils-8.23/tests/misc/cut.p push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}]; } push @Tests, @new; -diff -urNp coreutils-8.23-orig/tests/misc/expand.pl coreutils-8.23/tests/misc/expand.pl ---- coreutils-8.23-orig/tests/misc/expand.pl 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/tests/misc/expand.pl 2014-07-22 13:45:52.729652000 +0200 +diff -urNp coreutils-8.24-orig/tests/misc/expand.pl coreutils-8.24/tests/misc/expand.pl +--- coreutils-8.24-orig/tests/misc/expand.pl 2015-06-26 19:04:19.000000000 +0200 ++++ coreutils-8.24/tests/misc/expand.pl 2015-07-05 09:04:33.033546987 +0200 @@ -23,6 +23,15 @@ use strict; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4223,9 +4223,9 @@ diff -urNp coreutils-8.23-orig/tests/misc/expand.pl coreutils-8.23/tests/misc/ex my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; -diff -urNp coreutils-8.23-orig/tests/misc/fold.pl coreutils-8.23/tests/misc/fold.pl ---- coreutils-8.23-orig/tests/misc/fold.pl 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/tests/misc/fold.pl 2014-07-22 13:45:52.730652004 +0200 +diff -urNp coreutils-8.24-orig/tests/misc/fold.pl coreutils-8.24/tests/misc/fold.pl +--- coreutils-8.24-orig/tests/misc/fold.pl 2015-06-26 19:04:19.000000000 +0200 ++++ coreutils-8.24/tests/misc/fold.pl 2015-07-05 09:04:33.033546987 +0200 @@ -20,9 +20,18 @@ use strict; (my $program_name = $0) =~ s|.*/||; @@ -4295,9 +4295,9 @@ diff -urNp coreutils-8.23-orig/tests/misc/fold.pl coreutils-8.23/tests/misc/fold -my $prog = 'fold'; my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose); exit $fail; -diff -urNp coreutils-8.23-orig/tests/misc/join.pl coreutils-8.23/tests/misc/join.pl ---- coreutils-8.23-orig/tests/misc/join.pl 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/tests/misc/join.pl 2014-07-22 13:45:52.731652008 +0200 +diff -urNp coreutils-8.24-orig/tests/misc/join.pl coreutils-8.24/tests/misc/join.pl +--- coreutils-8.24-orig/tests/misc/join.pl 2015-06-26 19:04:19.000000000 +0200 ++++ coreutils-8.24/tests/misc/join.pl 2015-07-05 09:04:33.033546987 +0200 @@ -25,6 +25,15 @@ my $limits = getlimits (); my $prog = 'join'; @@ -4364,9 +4364,9 @@ diff -urNp coreutils-8.23-orig/tests/misc/join.pl coreutils-8.23/tests/misc/join my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; -diff -urNp coreutils-8.23-orig/tests/misc/sort-mb-tests.sh coreutils-8.23/tests/misc/sort-mb-tests.sh ---- coreutils-8.23-orig/tests/misc/sort-mb-tests.sh 1970-01-01 01:00:00.000000000 +0100 -+++ coreutils-8.23/tests/misc/sort-mb-tests.sh 2014-07-22 13:45:52.733652016 +0200 +diff -urNp coreutils-8.24-orig/tests/misc/sort-mb-tests.sh coreutils-8.24/tests/misc/sort-mb-tests.sh +--- coreutils-8.24-orig/tests/misc/sort-mb-tests.sh 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.24/tests/misc/sort-mb-tests.sh 2015-07-05 09:04:33.034546995 +0200 @@ -0,0 +1,45 @@ +#!/bin/sh +# Verify sort's multi-byte support. @@ -4413,9 +4413,9 @@ diff -urNp coreutils-8.23-orig/tests/misc/sort-mb-tests.sh coreutils-8.23/tests/ +compare exp out || { fail=1; cat out; } + +Exit $fail -diff -urNp coreutils-8.23-orig/tests/misc/sort-merge.pl coreutils-8.23/tests/misc/sort-merge.pl ---- coreutils-8.23-orig/tests/misc/sort-merge.pl 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/tests/misc/sort-merge.pl 2014-07-22 13:45:52.733652016 +0200 +diff -urNp coreutils-8.24-orig/tests/misc/sort-merge.pl coreutils-8.24/tests/misc/sort-merge.pl +--- coreutils-8.24-orig/tests/misc/sort-merge.pl 2015-06-26 19:04:19.000000000 +0200 ++++ coreutils-8.24/tests/misc/sort-merge.pl 2015-07-05 09:04:33.034546995 +0200 @@ -26,6 +26,15 @@ my $prog = 'sort'; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4472,9 +4472,9 @@ diff -urNp coreutils-8.23-orig/tests/misc/sort-merge.pl coreutils-8.23/tests/mis my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; -diff -urNp coreutils-8.23-orig/tests/misc/sort.pl coreutils-8.23/tests/misc/sort.pl ---- coreutils-8.23-orig/tests/misc/sort.pl 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/tests/misc/sort.pl 2014-07-22 13:45:52.734652020 +0200 +diff -urNp coreutils-8.24-orig/tests/misc/sort.pl coreutils-8.24/tests/misc/sort.pl +--- coreutils-8.24-orig/tests/misc/sort.pl 2015-06-26 19:04:19.000000000 +0200 ++++ coreutils-8.24/tests/misc/sort.pl 2015-07-05 09:04:33.034546995 +0200 @@ -24,10 +24,15 @@ my $prog = 'sort'; # Turn off localization of executable's output. @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @@ -4492,18 +4492,7 @@ diff -urNp coreutils-8.23-orig/tests/misc/sort.pl coreutils-8.23/tests/misc/sort # 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 '-'. -@@ -317,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. -@@ -415,6 +420,38 @@ foreach my $t (@Tests) +@@ -419,6 +428,38 @@ foreach my $t (@Tests) } } @@ -4542,7 +4531,7 @@ diff -urNp coreutils-8.23-orig/tests/misc/sort.pl coreutils-8.23/tests/misc/sort @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 +469,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; @@ -4550,9 +4539,9 @@ diff -urNp coreutils-8.23-orig/tests/misc/sort.pl coreutils-8.23/tests/misc/sort my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; -diff -urNp coreutils-8.23-orig/tests/misc/unexpand.pl coreutils-8.23/tests/misc/unexpand.pl ---- coreutils-8.23-orig/tests/misc/unexpand.pl 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/tests/misc/unexpand.pl 2014-07-22 13:45:52.735652024 +0200 +diff -urNp coreutils-8.24-orig/tests/misc/unexpand.pl coreutils-8.24/tests/misc/unexpand.pl +--- coreutils-8.24-orig/tests/misc/unexpand.pl 2015-06-26 19:04:19.000000000 +0200 ++++ coreutils-8.24/tests/misc/unexpand.pl 2015-07-05 09:04:33.034546995 +0200 @@ -27,6 +27,14 @@ my $limits = getlimits (); my $prog = 'unexpand'; @@ -4606,9 +4595,9 @@ diff -urNp coreutils-8.23-orig/tests/misc/unexpand.pl coreutils-8.23/tests/misc/ my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; -diff -urNp coreutils-8.23-orig/tests/misc/uniq.pl coreutils-8.23/tests/misc/uniq.pl ---- coreutils-8.23-orig/tests/misc/uniq.pl 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/tests/misc/uniq.pl 2014-07-22 13:45:52.736652028 +0200 +diff -urNp coreutils-8.24-orig/tests/misc/uniq.pl coreutils-8.24/tests/misc/uniq.pl +--- coreutils-8.24-orig/tests/misc/uniq.pl 2015-06-26 19:04:19.000000000 +0200 ++++ coreutils-8.24/tests/misc/uniq.pl 2015-07-05 09:04:33.035547002 +0200 @@ -23,9 +23,17 @@ my $limits = getlimits (); my $prog = 'uniq'; my $try = "Try '$prog --help' for more information.\n"; @@ -4681,12 +4670,12 @@ diff -urNp coreutils-8.23-orig/tests/misc/uniq.pl coreutils-8.23/tests/misc/uniq @Tests = add_z_variants \@Tests; @Tests = triple_test \@Tests; -diff -urNp coreutils-8.23-orig/tests/pr/pr-tests.pl coreutils-8.23/tests/pr/pr-tests.pl ---- coreutils-8.23-orig/tests/pr/pr-tests.pl 2014-07-11 13:00:07.000000000 +0200 -+++ coreutils-8.23/tests/pr/pr-tests.pl 2014-07-22 13:45:52.737652032 +0200 -@@ -23,6 +23,15 @@ use strict; - +diff -urNp coreutils-8.24-orig/tests/pr/pr-tests.pl coreutils-8.24/tests/pr/pr-tests.pl +--- coreutils-8.24-orig/tests/pr/pr-tests.pl 2015-06-26 19:04:19.000000000 +0200 ++++ coreutils-8.24/tests/pr/pr-tests.pl 2015-07-05 09:04:33.035547002 +0200 +@@ -24,6 +24,15 @@ use strict; my $prog = 'pr'; + my $normalize_strerror = "s/': .*/'/"; +my $mb_locale; +#Uncomment the following line to enable multibyte tests @@ -4700,7 +4689,7 @@ diff -urNp coreutils-8.23-orig/tests/pr/pr-tests.pl coreutils-8.23/tests/pr/pr-t my @tv = ( # -b option is no longer an official option. But it's still working to -@@ -466,8 +475,48 @@ push @Tests, +@@ -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.spec b/coreutils.spec index b6b6450..754ef3d 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils -Version: 8.23 -Release: 14%{?dist} +Version: 8.24 +Release: 1%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -14,7 +14,6 @@ Source105: coreutils-colorls.sh Source106: coreutils-colorls.csh # From upstream -Patch1: coreutils-8.23-chroot-chdir.patch # Our patches #general patch to workaround koji build system issues @@ -125,8 +124,6 @@ the old GNU fileutils, sh-utils, and textutils packages. %prep %setup -q -%patch1 -p1 -b .chdir - # Our patches %patch100 -p1 -b .configure %patch101 -p1 -b .manpages @@ -376,6 +373,9 @@ fi %{_sbindir}/chroot %changelog +* Sun Jul 05 2015 Ondrej Vasik 8.24-1 +- new upstream release 8.24 + * Sat Jul 4 2015 Peter Robinson 8.23-14 - Disable failing test-update-copyright to fix FTBFS diff --git a/sources b/sources index b5d101f..c53a0ef 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -abed135279f87ad6762ce57ff6d89c41 coreutils-8.23.tar.xz -f93deb9f48c2bc7236743a10bf1c2409 coreutils-8.23.tar.xz.sig +40efdbce865d2458d8da0a9dcee7c16c coreutils-8.24.tar.xz +01b4406a1de25aa4af49b9c4b0057c19 coreutils-8.24.tar.xz.sig