diff --git a/coreutils-i18n-fix2-expand-unexpand.patch b/coreutils-i18n-fix2-expand-unexpand.patch new file mode 100644 index 0000000..1f02c5e --- /dev/null +++ b/coreutils-i18n-fix2-expand-unexpand.patch @@ -0,0 +1,104 @@ +diff -up ./src/expand.c.orig ./src/expand.c +--- ./src/expand.c.orig 2016-06-01 12:42:49.330373488 +0200 ++++ ./src/expand.c 2016-06-07 14:35:16.011142041 +0200 +@@ -173,15 +173,19 @@ expand (void) + + do + { +- do { ++ while (true) { + mbf_getc (c, mbf); +- if (mb_iseof (c)) ++ if ((mb_iseof (c)) && (fp = next_file (fp))) + { +- mbf_init (mbf, fp = next_file (fp)); ++ mbf_init (mbf, fp); + continue; + } ++ else ++ { ++ break; ++ } + } +- while (false); ++ + + if (convert) + { +diff -up ./src/unexpand.c.orig ./src/unexpand.c +--- ./src/unexpand.c.orig 2016-06-07 14:26:57.380746446 +0200 ++++ ./src/unexpand.c 2016-06-07 14:34:54.059256698 +0200 +@@ -220,15 +220,19 @@ unexpand (void) + + do + { +- do { ++ while (true) { + mbf_getc (c, mbf); +- if (mb_iseof (c)) ++ if ((mb_iseof (c)) && (fp = next_file (fp))) + { +- mbf_init (mbf, fp = next_file (fp)); ++ mbf_init (mbf, fp); + continue; + } ++ else ++ { ++ break; ++ } + } +- while (false); ++ + + if (convert) + { +diff -up ./tests/expand/mb.sh.orig ./tests/expand/mb.sh +--- ./tests/expand/mb.sh.orig 2016-05-11 14:13:53.095289000 +0200 ++++ ./tests/expand/mb.sh 2016-06-07 14:38:48.259033445 +0200 +@@ -44,6 +44,20 @@ EOF + expand < in > out || fail=1 + compare exp out > /dev/null 2>&1 || fail=1 + ++#multiple files as an input ++cat <<\EOF >> exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++expand ./in ./in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ + #test characters with display widths != 1 + env printf '12345678 + e\t|ascii(1) +diff -up ./tests/unexpand/mb.sh.orig ./tests/unexpand/mb.sh +--- ./tests/unexpand/mb.sh.orig 2016-06-07 14:41:44.210106466 +0200 ++++ ./tests/unexpand/mb.sh 2016-06-07 14:52:28.848639772 +0200 +@@ -44,6 +44,22 @@ EOF + unexpand -a < in > out || fail=1 + compare exp out > /dev/null 2>&1 || fail=1 + ++ ++#multiple files as an input ++cat >> exp <<\EOF ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++ ++unexpand -a ./in ./in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ + #test characters with a display width larger than 1 + + env printf '12345678 diff --git a/coreutils.spec b/coreutils.spec index 783c211..8423c32 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.25 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -49,6 +49,8 @@ Patch802: coreutils-i18n-cut.patch Patch804: coreutils-i18n-cut-old.patch # The unexpand patch above is not correct. Sent to the patch authors Patch803: coreutils-i18n-fix-unexpand.patch +#(un)expand - allow multiple files on input - broken by patch 801 +Patch805: coreutils-i18n-fix2-expand-unexpand.patch #getgrouplist() patch from Ulrich Drepper. Patch908: coreutils-getgrouplist.patch @@ -181,6 +183,7 @@ including documentation and translations. #%%patch802 -p1 -b .i18n-cut %patch803 -p1 -b .i18n-fix-expand %patch804 -p1 -b .i18n-cutold +%patch805 -p1 -b .i18n-fix2-expand-unexpand # Coreutils %patch908 -p1 -b .getgrouplist @@ -342,6 +345,10 @@ fi %license COPYING %changelog +* Thu Jun 09 2016 Jakub Martisko - 8.25-6 +- (un)expand: fix regression in handling input files, where only + the first file was processed. + * Sat Mar 05 2016 Ondrej Vasik - 8.25-5 - cut: move back to the old i18n implementation (#1314722)