From 9de25cd8c5658c1bb3f9c3b9f1bb8ef1a6e91761 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 2 Mar 2017 11:39:38 +0100 Subject: [PATCH 01/22] new upstream snapshot 8.26.57-00381 --- coreutils-8.25-DIR_COLORS.patch | 119 +++++++------ coreutils-8.26-date-fix-tz-regre.patch | 82 --------- coreutils-8.26-test-lock.patch | 206 +--------------------- coreutils-8.26.tar.xz.sig | 17 -- coreutils-getgrouplist.patch | 2 +- coreutils-i18n-fix2-expand-unexpand.patch | 4 +- coreutils-i18n-fold-newline.patch | 31 ++-- coreutils-i18n-un-expand-BOM.patch | 50 ++++-- coreutils-i18n.patch | 31 ++-- coreutils-selinux.patch | 2 +- coreutils-ss.tar.xz.sig | 16 ++ coreutils.spec | 11 +- sources | 2 +- 13 files changed, 159 insertions(+), 414 deletions(-) delete mode 100644 coreutils-8.26-date-fix-tz-regre.patch delete mode 100644 coreutils-8.26.tar.xz.sig create mode 100644 coreutils-ss.tar.xz.sig diff --git a/coreutils-8.25-DIR_COLORS.patch b/coreutils-8.25-DIR_COLORS.patch index a8a2d1a..94923b0 100644 --- a/coreutils-8.25-DIR_COLORS.patch +++ b/coreutils-8.25-DIR_COLORS.patch @@ -4,16 +4,16 @@ Date: Fri, 17 Jun 2016 16:58:18 +0200 Subject: [PATCH] downstream changes to default DIR_COLORS --- - DIR_COLORS | 44 ++++---- - DIR_COLORS.256color | 294 +++++++++++++++++++++++------------------------- - DIR_COLORS.lightbgcolor | 207 +++++++++++++++++----------------- - 3 files changed, 271 insertions(+), 274 deletions(-) + DIR_COLORS | 41 ++++--- + DIR_COLORS.256color | 302 ++++++++++++++++++++++++------------------------ + DIR_COLORS.lightbgcolor | 215 +++++++++++++++++----------------- + 3 files changed, 286 insertions(+), 272 deletions(-) diff --git a/DIR_COLORS b/DIR_COLORS index d2ea453..27af9d7 100644 --- a/DIR_COLORS +++ b/DIR_COLORS -@@ -1,12 +1,18 @@ +@@ -1,6 +1,10 @@ # Configuration file for dircolors, a utility to help you set the # LS_COLORS environment variable used by GNU ls with the --color option. @@ -21,20 +21,20 @@ index d2ea453..27af9d7 100644 +# You can copy this file to .dir_colors in your $HOME directory to override +# the system defaults. + - # Copyright (C) 1996-2016 Free Software Foundation, Inc. + # Copyright (C) 1996-2017 Free Software Foundation, Inc. # Copying and distribution of this file, with or without modification, # are permitted provided the copyright notice and this notice are preserved. +@@ -8,6 +12,9 @@ + # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the + # slackware version of dircolors) are recognized but ignored. --# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the --# slackware version of dircolors) are recognized but ignored. -+# The keywords OPTIONS and EIGHTBIT (honored by the slackware version of -+# dircolors) are recognized but ignored. For compatibility reasons, the -+# pattern "^COLOR.*none" is recognized as a way to disable colorization. -+# See https://bugzilla.redhat.com/1349579 for details. - ++# For compatibility, the pattern "^COLOR.*none" is recognized as a way to ++# disable colorization. See https://bugzilla.redhat.com/1349579 for details. ++ # Below are TERM entries, which can be a glob patterns, to match # against the TERM environment variable to determine if it is colorizable. -@@ -56,7 +62,7 @@ DOOR 01;35 # door + TERM Eterm +@@ -56,7 +63,7 @@ DOOR 01;35 # door BLK 40;33;01 # block device driver CHR 40;33;01 # character device driver ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ... @@ -43,7 +43,7 @@ index d2ea453..27af9d7 100644 SETUID 37;41 # file that is setuid (u+s) SETGID 30;43 # file that is setgid (g+s) CAPABILITY 30;41 # file with capability -@@ -181,21 +187,21 @@ EXEC 01;32 +@@ -185,21 +192,21 @@ EXEC 01;32 .ogx 01;35 # audio formats @@ -72,7 +72,7 @@ index d2ea453..27af9d7 100644 +.ra 01;36 +.wav 01;36 - # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions + # https://wiki.xiph.org/MIME_Types_and_File_Extensions -.oga 00;36 -.opus 00;36 -.spx 00;36 @@ -85,26 +85,23 @@ diff --git a/DIR_COLORS.256color b/DIR_COLORS.256color index d2ea453..74c34ba 100644 --- a/DIR_COLORS.256color +++ b/DIR_COLORS.256color -@@ -1,39 +1,22 @@ --# Configuration file for dircolors, a utility to help you set the --# LS_COLORS environment variable used by GNU ls with the --color option. +@@ -1,3 +1,9 @@ +# Configuration file for the 256color ls utility + +# This file goes in the /etc directory, and must be world readable. +# You can copy this file to .dir_colors in your $HOME directory to override +# the system defaults. ++ + # Configuration file for dircolors, a utility to help you set the + # LS_COLORS environment variable used by GNU ls with the --color option. - # Copyright (C) 1996-2016 Free Software Foundation, Inc. - # Copying and distribution of this file, with or without modification, - # are permitted provided the copyright notice and this notice are preserved. - --# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the --# slackware version of dircolors) are recognized but ignored. -+# The keywords OPTIONS and EIGHTBIT (honored by the slackware version of -+# dircolors) are recognized but ignored. For compatibility reasons, the -+# pattern "^COLOR.*none" is recognized as a way to disable colorization. -+# See https://bugzilla.redhat.com/1349579 for details. +@@ -8,32 +14,13 @@ + # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the + # slackware version of dircolors) are recognized but ignored. ++# For compatibility, the pattern "^COLOR.*none" is recognized as a way to ++# disable colorization. See https://bugzilla.redhat.com/1349579 for details. ++ # Below are TERM entries, which can be a glob patterns, to match # against the TERM environment variable to determine if it is colorizable. -TERM Eterm @@ -136,7 +133,7 @@ index d2ea453..74c34ba 100644 # Below are the color init strings for the basic file types. A color init # string consists of one or more of the following numeric codes: -@@ -43,29 +26,40 @@ TERM xterm* +@@ -43,29 +30,40 @@ TERM xterm* # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white # Background color codes: # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white @@ -193,7 +190,7 @@ index d2ea453..74c34ba 100644 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. -@@ -83,119 +77,115 @@ EXEC 01;32 +@@ -83,123 +81,123 @@ EXEC 01;32 #.csh 01;32 # archives or compressed (bright red) @@ -240,6 +237,10 @@ index d2ea453..74c34ba 100644 -.7z 01;31 -.rz 01;31 -.cab 01;31 +-.wim 01;31 +-.swm 01;31 +-.dwm 01;31 +-.esd 01;31 +.tar 38;5;9 +.tgz 38;5;9 +.arc 38;5;9 @@ -262,6 +263,8 @@ index d2ea453..74c34ba 100644 +.lz 38;5;9 +.lzo 38;5;9 +.xz 38;5;9 ++.zst 38;5;9 ++.tzst 38;5;9 +.bz2 38;5;9 +.bz 38;5;9 +.tbz 38;5;9 @@ -281,6 +284,10 @@ index d2ea453..74c34ba 100644 +.7z 38;5;9 +.rz 38;5;9 +.cab 38;5;9 ++.wim 38;5;9 ++.swm 38;5;9 ++.dwm 38;5;9 ++.esd 38;5;9 # image formats -.jpg 01;35 @@ -332,6 +339,8 @@ index d2ea453..74c34ba 100644 -.emf 01;35 +.jpg 38;5;13 +.jpeg 38;5;13 ++.mjpg 38;5;13 ++.mjpeg 38;5;13 +.gif 38;5;13 +.bmp 38;5;13 +.pbm 38;5;13 @@ -376,7 +385,7 @@ index d2ea453..74c34ba 100644 +.cgm 38;5;13 +.emf 38;5;13 - # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions + # https://wiki.xiph.org/MIME_Types_and_File_Extensions -.ogv 01;35 -.ogx 01;35 +.ogv 38;5;13 @@ -408,7 +417,7 @@ index d2ea453..74c34ba 100644 +.ra 38;5;45 +.wav 38;5;45 - # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions + # https://wiki.xiph.org/MIME_Types_and_File_Extensions -.oga 00;36 -.opus 00;36 -.spx 00;36 @@ -421,29 +430,27 @@ diff --git a/DIR_COLORS.lightbgcolor b/DIR_COLORS.lightbgcolor index d2ea453..95d6879 100644 --- a/DIR_COLORS.lightbgcolor +++ b/DIR_COLORS.lightbgcolor -@@ -1,12 +1,17 @@ --# Configuration file for dircolors, a utility to help you set the --# LS_COLORS environment variable used by GNU ls with the --color option. +@@ -1,3 +1,9 @@ +# Configuration file for the color ls utility - modified for lighter backgrounds + +# This file goes in the /etc directory, and must be world readable. +# You can copy this file to .dir_colors in your $HOME directory to override +# the system defaults. ++ + # Configuration file for dircolors, a utility to help you set the + # LS_COLORS environment variable used by GNU ls with the --color option. - # Copyright (C) 1996-2016 Free Software Foundation, Inc. - # Copying and distribution of this file, with or without modification, - # are permitted provided the copyright notice and this notice are preserved. - --# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the --# slackware version of dircolors) are recognized but ignored. -+# The keywords OPTIONS and EIGHTBIT (honored by the slackware version of -+# dircolors) are recognized but ignored. For compatibility reasons, the -+# pattern "^COLOR.*none" is recognized as a way to disable colorization. -+# See https://bugzilla.redhat.com/1349579 for details. +@@ -8,6 +14,9 @@ + # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the + # slackware version of dircolors) are recognized but ignored. ++# For compatibility, the pattern "^COLOR.*none" is recognized as a way to ++# disable colorization. See https://bugzilla.redhat.com/1349579 for details. ++ # Below are TERM entries, which can be a glob patterns, to match # against the TERM environment variable to determine if it is colorizable. -@@ -46,17 +51,17 @@ TERM xterm* + TERM Eterm +@@ -46,17 +55,17 @@ TERM xterm* #NORMAL 00 # no color code at all #FILE 00 # regular file: use no color at all RESET 0 # reset to "normal" color @@ -466,7 +473,7 @@ index d2ea453..95d6879 100644 SETUID 37;41 # file that is setuid (u+s) SETGID 30;43 # file that is setgid (g+s) CAPABILITY 30;41 # file with capability -@@ -65,7 +70,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky +@@ -65,7 +74,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable # This is for files with execute permission: @@ -475,7 +482,7 @@ index d2ea453..95d6879 100644 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. -@@ -82,103 +87,99 @@ EXEC 01;32 +@@ -82,107 +91,107 @@ EXEC 01;32 #.sh 01;32 #.csh 01;32 @@ -523,6 +530,10 @@ index d2ea453..95d6879 100644 -.7z 01;31 -.rz 01;31 -.cab 01;31 +-.wim 01;31 +-.swm 01;31 +-.dwm 01;31 +-.esd 01;31 +# archives or compressed (red) +.tar 00;31 +.tgz 00;31 @@ -546,6 +557,8 @@ index d2ea453..95d6879 100644 +.lz 00;31 +.lzo 00;31 +.xz 00;31 ++.zst 00;31 ++.tzst 00;31 +.bz2 00;31 +.bz 00;31 +.tbz 00;31 @@ -565,6 +578,10 @@ index d2ea453..95d6879 100644 +.7z 00;31 +.rz 00;31 +.cab 00;31 ++.wim 00;31 ++.swm 00;31 ++.dwm 00;31 ++.esd 00;31 # image formats -.jpg 01;35 @@ -616,6 +633,8 @@ index d2ea453..95d6879 100644 -.emf 01;35 +.jpg 00;35 +.jpeg 00;35 ++.mjpg 00;35 ++.mjpeg 00;35 +.gif 00;35 +.bmp 00;35 +.pbm 00;35 @@ -660,7 +679,7 @@ index d2ea453..95d6879 100644 +.cgm 00;35 +.emf 00;35 - # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions + # https://wiki.xiph.org/MIME_Types_and_File_Extensions -.ogv 01;35 -.ogx 01;35 +.ogv 00;35 diff --git a/coreutils-8.26-date-fix-tz-regre.patch b/coreutils-8.26-date-fix-tz-regre.patch deleted file mode 100644 index 158c80a..0000000 --- a/coreutils-8.26-date-fix-tz-regre.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 12284825dcc5d9485ebaa78aedd93f450bad7b73 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= -Date: Fri, 20 Jan 2017 12:40:35 +0000 -Subject: [PATCH 1/2] date: fix TZ= regression - -On 17/03/16 17:38, Paul Eggert wrote: -> On 03/16/2016 08:51 PM, Assaf Gordon wrote: ->> I suspect it has something to do with this commit: ->> commit 037e3b9847feb46cf6b58d99ce960d3987faaf52 -> -> You're right, and thanks for that detailed bug report. I installed the -> attached patch, which fixed the bug for me. - -This introduced a bug unfortunately due to the side effects of -parse_datetime(). -parse_datetime resets the TZ env variable but doesn't call tzset(). -Hence using the wrong timezone for output. -Previously localtime() called tzset() implicitly. -Perhaps we should call tzset() in parse_datetime() if needed? -I'm not sure as to whether this undoes the fix for bug 23035? - -Anyway this avoids the issue on GNU/Linux. - -Signed-off-by: Kamil Dudka ---- - src/date.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/date.c b/src/date.c -index 619a72b..2b3d890 100644 ---- a/src/date.c -+++ b/src/date.c -@@ -571,6 +571,8 @@ show_date (const char *format, struct timespec when, timezone_t tz) - { - struct tm tm; - -+ tzset (); -+ - if (localtime_rz (tz, &when.tv_sec, &tm)) - { - if (format == rfc_2822_format) --- -2.7.4 - - -From 3c082157634bd4fbc79c26e9c56abb4da79e9a2d Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Fri, 20 Jan 2017 18:24:02 -0800 -Subject: [PATCH 2/2] date: test for TZ= regression - -Problem reported by Paul Wise for Debian, in: -https://bugs.debian.org/851934 -This is fallout from the fix for GNU Bug#23035. -* tests/misc/date.pl: Test the fix. - -Upstream-commit: b14be5085cd1aefd473a000456b21270e6070711 -Signed-off-by: Kamil Dudka ---- - tests/misc/date-debug.sh | 4 ++-- - tests/misc/date.pl | 6 ++++++ - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/tests/misc/date.pl b/tests/misc/date.pl -index 7e45e98..be8b39e 100755 ---- a/tests/misc/date.pl -+++ b/tests/misc/date.pl -@@ -291,6 +291,12 @@ my @Tests = - {ERR => "date: invalid date 'TZ=\"\"\"'\n"}, - {EXIT => 1}, - ], -+ -+ # https://bugs.debian.org/851934#10 -+ ['cross-TZ-mishandled', "-d 'TZ=\"EST5\" 1970-01-01 00:00'", -+ {ENV => 'TZ=PST8'}, -+ {OUT => 'Wed Dec 31 21:00:00 PST 1969'}, -+ ], - ); - - # Repeat the cross-dst test, using Jan 1, 2005 and every interval from 1..364. --- -2.7.4 - diff --git a/coreutils-8.26-test-lock.patch b/coreutils-8.26-test-lock.patch index 786aa33..d66928c 100644 --- a/coreutils-8.26-test-lock.patch +++ b/coreutils-8.26-test-lock.patch @@ -1,211 +1,7 @@ -From 4f6cb65ce4d643aca0c6bf7db2e8b32c0d08eb89 Mon Sep 17 00:00:00 2001 -From: Bruno Haible -Date: Sat, 24 Dec 2016 18:21:59 +0100 -Subject: [PATCH 1/2] lock test: Fix performance problem on multi-core - machines. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -* tests/test-lock.c (USE_VOLATILE): New macro. -(struct atomic_int): New type. -(init_atomic_int, get_atomic_int_value, set_atomic_int_value): New -functions. -(lock_checker_done, rwlock_checker_done, reclock_checker_done): Define -as 'struct atomic_int'. -(lock_checker_thread, test_lock, rwlock_checker_thread, test_rwlock, -reclock_checker_thread, test_recursive_lock): Use the new functions. -Reported by Eric Blake in -https://www.redhat.com/archives/libvir-list/2012-March/msg00854.html -and by Pádraig Brady in -http://lists.gnu.org/archive/html/bug-gnulib/2016-12/msg00117.html. - -Upstream-commit: 480d374e596a0ee3fed168ab42cd84c313ad3c89 -Signed-off-by: Kamil Dudka ---- - gnulib-tests/test-lock.c | 79 ++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 67 insertions(+), 12 deletions(-) - -diff --git a/gnulib-tests/test-lock.c b/gnulib-tests/test-lock.c -index cb734b4..aa6de27 100644 ---- a/gnulib-tests/test-lock.c -+++ b/gnulib-tests/test-lock.c -@@ -50,6 +50,13 @@ - Uncomment this to see if the operating system has a fair scheduler. */ - #define EXPLICIT_YIELD 1 - -+/* Whether to use 'volatile' on some variables that communicate information -+ between threads. If set to 0, a lock is used to protect these variables. -+ If set to 1, 'volatile' is used; this is theoretically equivalent but can -+ lead to much slower execution (e.g. 30x slower total run time on a 40-core -+ machine. */ -+#define USE_VOLATILE 0 -+ - /* Whether to print debugging messages. */ - #define ENABLE_DEBUGGING 0 - -@@ -103,6 +110,51 @@ - # define yield() - #endif - -+#if USE_VOLATILE -+struct atomic_int { -+ volatile int value; -+}; -+static void -+init_atomic_int (struct atomic_int *ai) -+{ -+} -+static int -+get_atomic_int_value (struct atomic_int *ai) -+{ -+ return ai->value; -+} -+static void -+set_atomic_int_value (struct atomic_int *ai, int new_value) -+{ -+ ai->value = new_value; -+} -+#else -+struct atomic_int { -+ gl_lock_define (, lock) -+ int value; -+}; -+static void -+init_atomic_int (struct atomic_int *ai) -+{ -+ gl_lock_init (ai->lock); -+} -+static int -+get_atomic_int_value (struct atomic_int *ai) -+{ -+ gl_lock_lock (ai->lock); -+ int ret = ai->value; -+ gl_lock_unlock (ai->lock); -+ return ret; -+} -+static void -+set_atomic_int_value (struct atomic_int *ai, int new_value) -+{ -+ gl_lock_lock (ai->lock); -+ ai->value = new_value; -+ gl_lock_unlock (ai->lock); -+} -+#endif -+ - #define ACCOUNT_COUNT 4 - - static int account[ACCOUNT_COUNT]; -@@ -170,12 +222,12 @@ lock_mutator_thread (void *arg) - return NULL; - } - --static volatile int lock_checker_done; -+static struct atomic_int lock_checker_done; - - static void * - lock_checker_thread (void *arg) - { -- while (!lock_checker_done) -+ while (get_atomic_int_value (&lock_checker_done) == 0) - { - dbgprintf ("Checker %p before check lock\n", gl_thread_self_pointer ()); - gl_lock_lock (my_lock); -@@ -200,7 +252,8 @@ test_lock (void) - /* Initialization. */ - for (i = 0; i < ACCOUNT_COUNT; i++) - account[i] = 1000; -- lock_checker_done = 0; -+ init_atomic_int (&lock_checker_done); -+ set_atomic_int_value (&lock_checker_done, 0); - - /* Spawn the threads. */ - checkerthread = gl_thread_create (lock_checker_thread, NULL); -@@ -210,7 +263,7 @@ test_lock (void) - /* Wait for the threads to terminate. */ - for (i = 0; i < THREAD_COUNT; i++) - gl_thread_join (threads[i], NULL); -- lock_checker_done = 1; -+ set_atomic_int_value (&lock_checker_done, 1); - gl_thread_join (checkerthread, NULL); - check_accounts (); - } -@@ -254,12 +307,12 @@ rwlock_mutator_thread (void *arg) - return NULL; - } - --static volatile int rwlock_checker_done; -+static struct atomic_int rwlock_checker_done; - - static void * - rwlock_checker_thread (void *arg) - { -- while (!rwlock_checker_done) -+ while (get_atomic_int_value (&rwlock_checker_done) == 0) - { - dbgprintf ("Checker %p before check rdlock\n", gl_thread_self_pointer ()); - gl_rwlock_rdlock (my_rwlock); -@@ -284,7 +337,8 @@ test_rwlock (void) - /* Initialization. */ - for (i = 0; i < ACCOUNT_COUNT; i++) - account[i] = 1000; -- rwlock_checker_done = 0; -+ init_atomic_int (&rwlock_checker_done); -+ set_atomic_int_value (&rwlock_checker_done, 0); - - /* Spawn the threads. */ - for (i = 0; i < THREAD_COUNT; i++) -@@ -295,7 +349,7 @@ test_rwlock (void) - /* Wait for the threads to terminate. */ - for (i = 0; i < THREAD_COUNT; i++) - gl_thread_join (threads[i], NULL); -- rwlock_checker_done = 1; -+ set_atomic_int_value (&rwlock_checker_done, 1); - for (i = 0; i < THREAD_COUNT; i++) - gl_thread_join (checkerthreads[i], NULL); - check_accounts (); -@@ -356,12 +410,12 @@ reclock_mutator_thread (void *arg) - return NULL; - } - --static volatile int reclock_checker_done; -+static struct atomic_int reclock_checker_done; - - static void * - reclock_checker_thread (void *arg) - { -- while (!reclock_checker_done) -+ while (get_atomic_int_value (&reclock_checker_done) == 0) - { - dbgprintf ("Checker %p before check lock\n", gl_thread_self_pointer ()); - gl_recursive_lock_lock (my_reclock); -@@ -386,7 +440,8 @@ test_recursive_lock (void) - /* Initialization. */ - for (i = 0; i < ACCOUNT_COUNT; i++) - account[i] = 1000; -- reclock_checker_done = 0; -+ init_atomic_int (&reclock_checker_done); -+ set_atomic_int_value (&reclock_checker_done, 0); - - /* Spawn the threads. */ - checkerthread = gl_thread_create (reclock_checker_thread, NULL); -@@ -396,7 +451,7 @@ test_recursive_lock (void) - /* Wait for the threads to terminate. */ - for (i = 0; i < THREAD_COUNT; i++) - gl_thread_join (threads[i], NULL); -- reclock_checker_done = 1; -+ set_atomic_int_value (&reclock_checker_done, 1); - gl_thread_join (checkerthread, NULL); - check_accounts (); - } --- -2.7.4 - - From 0d04ee8ddedb2bf33d64f148f246a3b7ec4fef21 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 23 Jan 2017 12:35:41 +0100 -Subject: [PATCH 2/2] test-lock: disable the rwlock test +Subject: [PATCH] test-lock: disable the rwlock test It hangs indefinitely if the system rwlock implementation does not prevent writer starvation (and glibc does not implement it). diff --git a/coreutils-8.26.tar.xz.sig b/coreutils-8.26.tar.xz.sig deleted file mode 100644 index fe1635d..0000000 --- a/coreutils-8.26.tar.xz.sig +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJYPyRpAAoJEN9v2XEwYDfZ0I4P/3oaPYXMPEOKuDDpEcLumn26 -gYIMQc1jIMbBNQe120gQmNPkRr5dTKt5Bap9qYkCj0pI/6VxVIWDo0xrOLYZi7AN -Xgr0kX2qLDFEH+EHkC1BpsAdpsgwfvLmVWPHS62CNKgVDgGiP1cRJZe8oVmlBCiR -3ES7pUsBfDn3hbdKNTTmMDtro1rQMOxfHkVCZLAva+JjdzpE+KTvzZzKkVuZZfJ/ -Mi/ZySrXZXFvPBS7GXgop4x8EodyzQMeKO+nvpIUEBY1yLQgCvni5/CBI8w/EViD -DSjj0zWsCQkEjx6HCohi8sBHUYZ+M3lB4rkFk7aevdioPZUGfLkW31LT/cUJC/VV -MIQKWzQtZO/WCJuyEbWP2m25c4MtnnhTm5yoi29yT/CoTRlUWkIQpXm4oD1cJXHy -PpHveu8qM0qRaAtVdXE3pmapIMYUV4g7vxSuCjZRrgiDLhp/K7Lzt5xBhl++kPU2 -U9uc202eah4Towo0pbHsuEJT0vk0GGLq8/17dCa/ss8wV+86ZLxl0kZYy4CNEnIW -vsCN6CJ5AoAEVrMN1F7ZJYnH4hoJedvIczThnAkNTqYYE3wnN9stOe28Oy/a0/tg -bt5/Mn0JbmQei890uU8zcEdUjidHqGV4hKk1E2UC4UCyHG/VcHv9gfr8OaD/xPDr -SoauDCHpBU7J7FT/DX+k -=vkKy ------END PGP SIGNATURE----- diff --git a/coreutils-getgrouplist.patch b/coreutils-getgrouplist.patch index 7defd19..5b35f42 100644 --- a/coreutils-getgrouplist.patch +++ b/coreutils-getgrouplist.patch @@ -30,7 +30,7 @@ index 76474c2..0a9d221 100644 - : getgroups (0, NULL)); + if (!username) + max_n_groups = getgroups(0, NULL); -+ else ++ else + { +#ifdef HAVE_GETGROUPLIST + max_n_groups = 0; diff --git a/coreutils-i18n-fix2-expand-unexpand.patch b/coreutils-i18n-fix2-expand-unexpand.patch index 1a63012..b34d7b7 100644 --- a/coreutils-i18n-fix2-expand-unexpand.patch +++ b/coreutils-i18n-fix2-expand-unexpand.patch @@ -22,7 +22,7 @@ index 380e020..310b349 100644 + } } - while (false); -+ ++ if (convert) { @@ -50,7 +50,7 @@ index 3bbbd66..863a90a 100644 + } } - while (false); -+ ++ if (convert) { diff --git a/coreutils-i18n-fold-newline.patch b/coreutils-i18n-fold-newline.patch index 79d1a09..f7286ef 100644 --- a/coreutils-i18n-fold-newline.patch +++ b/coreutils-i18n-fold-newline.patch @@ -4,8 +4,8 @@ Date: Fri, 3 Feb 2017 12:26:53 +0100 Subject: [PATCH] fold.c: preserve new-lines in mutlibyte text --- - src/fold.c | 55 +++++++++++++++++++++++++++---------------------------- - 1 file changed, 27 insertions(+), 28 deletions(-) + src/fold.c | 49 ++++++++++++++++++++++++------------------------- + 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/src/fold.c b/src/fold.c index d23edd5..8c232a7 100644 @@ -43,15 +43,24 @@ index d23edd5..8c232a7 100644 - fwrite (line_out, sizeof(char), offset_out, stdout); - START_NEW_LINE; - continue; -- ++ case L'\b': ++ increment = (column > 0) ? -1 : 0; ++ break; + - case L'\b': - increment = (column > 0) ? -1 : 0; - break; -- ++ case L'\r': ++ increment = -1 * column; ++ break; + - case L'\r': - increment = -1 * column; - break; -- ++ case L'\t': ++ increment = 8 - column % 8; ++ break; + - case L'\t': - increment = 8 - column % 8; - break; @@ -60,18 +69,6 @@ index d23edd5..8c232a7 100644 - increment = wcwidth (wc); - increment = (increment < 0) ? 0 : increment; - } -+ case L'\b': -+ increment = (column > 0) ? -1 : 0; -+ break; -+ -+ case L'\r': -+ increment = -1 * column; -+ break; -+ -+ case L'\t': -+ increment = 8 - column % 8; -+ break; -+ + default: + increment = wcwidth (wc); + increment = (increment < 0) ? 0 : increment; diff --git a/coreutils-i18n-un-expand-BOM.patch b/coreutils-i18n-un-expand-BOM.patch index 56e7fa5..2ccdcca 100644 --- a/coreutils-i18n-un-expand-BOM.patch +++ b/coreutils-i18n-un-expand-BOM.patch @@ -1,3 +1,17 @@ +From 7a7c776a4e228d180e74614fd8c8afcad5d4bdf7 Mon Sep 17 00:00:00 2001 +From: Jakub Martisko +Date: Thu, 7 Jul 2016 12:53:26 +0200 +Subject: [PATCH] coreutils-i18n-un-expand-BOM.patch + +--- + src/expand-common.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/expand-common.h | 12 ++++++ + src/expand.c | 45 +++++++++++++++++++- + src/unexpand.c | 43 ++++++++++++++++++- + tests/expand/mb.sh | 71 ++++++++++++++++++++++++++++++++ + tests/unexpand/mb.sh | 59 ++++++++++++++++++++++++++ + 6 files changed, 342 insertions(+), 2 deletions(-) + diff --git a/src/expand-common.c b/src/expand-common.c index 4657e46..97cbb09 100644 --- a/src/expand-common.c @@ -10,8 +24,8 @@ index 4657e46..97cbb09 100644 #include "system.h" #include "die.h" #include "error.h" -@@ -85,6 +86,119 @@ add_tab_stop (uintmax_t tabval) - } +@@ -105,6 +106,119 @@ set_extend_size (uintmax_t tabval) + return ok; } +extern int @@ -40,12 +54,12 @@ index 4657e46..97cbb09 100644 +check_utf_locale(void) +{ + char* locale = setlocale (LC_CTYPE , NULL); -+ if (locale == NULL) ++ if (locale == NULL) + { + return false; + } + else if (strcasestr(locale, "utf8") == NULL && strcasestr(locale, "utf-8") == NULL) -+ { ++ { + return false; + } + return true; @@ -147,7 +161,7 @@ index 8cb2079..763bfda 100644 +extern bool +check_bom(FILE* fp, mb_file_t *mbf); + -+extern void ++extern void +print_bom(void); + /* Add tab stop TABVAL to the end of 'tab_list'. */ @@ -161,14 +175,13 @@ index 310b349..4136824 100644 FILE *fp = next_file (NULL); mb_file_t mbf; mbf_char_t c; -- + /* True if the starting locale is utf8. */ + bool using_utf_locale; -+ ++ + /* True if the first file contains BOM header. */ + bool found_bom; + using_utf_locale=check_utf_locale(); -+ + if (!fp) return; - @@ -178,13 +191,13 @@ index 310b349..4136824 100644 + if (using_utf_locale == false && found_bom == true) + { + /*try using some predefined locale */ -+ ++ + if (set_utf_locale () != 0) + { + error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale")); + } + } -+ ++ + + if (found_bom == true) + { @@ -212,7 +225,7 @@ index 310b349..4136824 100644 + { + if(using_utf_locale==false && found_bom==true) + { -+ /*First file conatined BOM header - locale was switched to UTF ++ /*First file conatined BOM header - locale was switched to UTF + /*all subsequent files should contain BOM. */ + error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); + } @@ -231,7 +244,7 @@ index 863a90a..5681b58 100644 mbf_char_t *pending_blank; + /* True if the starting locale is utf8. */ + bool using_utf_locale; -+ ++ + /* True if the first file contains BOM header. */ + bool found_bom; + using_utf_locale=check_utf_locale(); @@ -240,11 +253,11 @@ index 863a90a..5681b58 100644 return; + mbf_init (mbf, fp); + found_bom=check_bom(fp,&mbf); - ++ + if (using_utf_locale == false && found_bom == true) + { + /*try using some predefined locale */ -+ + + if (set_utf_locale () != 0) + { + error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale")); @@ -282,7 +295,7 @@ index 863a90a..5681b58 100644 + { + if(using_utf_locale==false && found_bom==true) + { -+ /*First file conatined BOM header - locale was switched to UTF ++ /*First file conatined BOM header - locale was switched to UTF + /*all subsequent files should contain BOM. */ + error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); + } @@ -301,7 +314,7 @@ index 031be7a..1621c84 100755 + + -+#BOM header test 1 ++#BOM header test 1 +printf "\xEF\xBB\xBF" > in; cat <<\EOF >> in || framework_failure_ +1234567812345678123456781 +. . . . @@ -380,7 +393,7 @@ index 8d75652..9d4ee3e 100755 unexpand -a < in > out || fail=1 compare exp out > /dev/null 2>&1 || fail=1 + -+#BOM header test 1 ++#BOM header test 1 +printf "\xEF\xBB\xBF" > in; cat <<\EOF >> in || framework_failure_ +1234567812345678123456781 +. . . . @@ -438,3 +451,6 @@ index 8d75652..9d4ee3e 100755 + +LC_ALL=C unexpand in in > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 +-- +2.9.3 + diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index d7cf59c..ab5d8dc 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -315,7 +315,7 @@ index 8cd0d6b..d23edd5 100644 + fwrite (line_out, sizeof(char), offset_out, stdout); + START_NEW_LINE; + continue; -+ ++ + case L'\b': + increment = (column > 0) ? -1 : 0; + break; @@ -672,7 +672,7 @@ index 98b461c..9990f38 100644 + extract_field (line, ptr, lim - ptr); +} +#endif -+ ++ static void freeline (struct line *line) { @@ -2843,7 +2843,7 @@ index 87a0c93..9f755d9 100644 + while (pos < size) + { + MBCHAR_TO_WCHAR (wc, mblength, lp, pos, size, statep, convfail); -+ ++ + if (convfail || !(iswblank (wc) || wc == '\n')) + { + pos += mblength; @@ -2886,7 +2886,7 @@ index 87a0c93..9f755d9 100644 if (check_chars < oldlen) oldlen = check_chars; if (check_chars < newlen) -@@ -295,14 +401,103 @@ different (char *old, char *new, size_t oldlen, size_t newlen) +@@ -295,15 +401,104 @@ different (char *old, char *new, size_t oldlen, size_t newlen) if (ignore_case) { @@ -2918,8 +2918,8 @@ index 87a0c93..9f755d9 100644 + + 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) @@ -2990,11 +2990,12 @@ index 87a0c93..9f755d9 100644 + 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. @@ -367,19 +562,38 @@ check_file (const char *infile, const char *outfile, char delimiter) char *prevfield IF_LINT ( = NULL); size_t prevlen IF_LINT ( = 0); @@ -3156,7 +3157,7 @@ diff --git a/tests/local.mk b/tests/local.mk index 568944e..192f776 100644 --- a/tests/local.mk +++ b/tests/local.mk -@@ -350,6 +350,8 @@ all_tests = \ +@@ -352,6 +352,8 @@ all_tests = \ tests/misc/sort-discrim.sh \ tests/misc/sort-files0-from.pl \ tests/misc/sort-float.sh \ @@ -3211,8 +3212,8 @@ index 8a9cad1..9293e39 100755 my @Tests = ( ['t1', '--tabs=3', {IN=>"a\tb"}, {OUT=>"a b"}], -@@ -140,6 +149,8 @@ my @Tests = - +@@ -152,6 +161,8 @@ my @Tests = + ['trail9', '--tab=1,2 -t/5',{IN=>"\ta\tb\tc"}, {OUT=>" a b c"}], # Test errors + # FIXME: The following tests contain ‘quoting’ specific to LC_MESSAGES @@ -3220,8 +3221,8 @@ index 8a9cad1..9293e39 100755 ['e1', '--tabs="a"', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR => "$prog: tab size contains invalid character(s): 'a'\n"}], ['e2', "-t $UINTMAX_OFLOW", {IN=>''}, {OUT=>''}, {EXIT=>1}, -@@ -150,6 +161,37 @@ my @Tests = - {ERR => "$prog: tab sizes must be ascending\n"}], +@@ -168,6 +179,37 @@ my @Tests = + {ERR => "$prog: '/' specifier not at start of number: '/'\n"}], ); +if ($mb_locale ne 'C') @@ -3533,7 +3534,7 @@ index c3e7f8e..6ecd3ff 100755 # 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 '-'. -@@ -424,6 +429,38 @@ foreach my $t (@Tests) +@@ -423,6 +428,38 @@ foreach my $t (@Tests) } } @@ -3572,7 +3573,7 @@ index c3e7f8e..6ecd3ff 100755 @Tests = triple_test \@Tests; # Remember that triple_test creates from each test with exactly one "IN" -@@ -433,6 +470,7 @@ foreach my $t (@Tests) +@@ -432,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; diff --git a/coreutils-selinux.patch b/coreutils-selinux.patch index cee4f7c..8274a23 100644 --- a/coreutils-selinux.patch +++ b/coreutils-selinux.patch @@ -48,7 +48,7 @@ index 1b528c6..25dbb88 100644 + case 'c': + fprintf (stderr, "%s: warning: option '-c' is deprecated, please use '--preserve=context' instead\n", argv[0]); -+ if ( x.set_security_context ) { ++ if ( x.set_security_context ) { + (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]); + exit( 1 ); + } diff --git a/coreutils-ss.tar.xz.sig b/coreutils-ss.tar.xz.sig new file mode 100644 index 0000000..ae8e4ce --- /dev/null +++ b/coreutils-ss.tar.xz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIcBAABAgAGBQJYt4nkAAoJEN9v2XEwYDfZlKQQAJ8Q0+dbBjkhoJaNUxqlUEE6 +Ztcnz76BOhvFwBYsfQbKdKRQw+EG91q0MkJKFW29jDxPDRMvwE/FSv9DziCHCP+E +sE8DhrA96h5oCrlTcwtm2TVxPHCD8aMheOvtH/gjNaabsjPy3f6G/qnuuQNS9EPt +Nl0S88avvtcPSEXicb07kfp+iRou+me00AsvzNLct/jlkTgiYx3zdCoFdEx90lMN +hQYPYRYrPZyMpF+tNFqW5jk+5WrF7UEflUwKG5hlWeJfJPFgnk0WxGdowjIbaEfZ +8DhXC2NIa3JALUAEAS+riyKcxmYuyKLTFNlqiOB2plM8KIglYLJS/3RjW+gjqBAk +WoTtKfdAuVCOMH8A6GWJsdwqTmA7M+wpkpis3O1p5mTnrZrZAaYgFasaH2F70QvM +oeYcnFdcA8umiPahUhqvW9iNBETyte8ZZ5YWSTH/eyeYGd/+7wupVoRJTBxih0+X +LBkIYGjQcKKWGpFCBpHFktndYSvTymX6nBgtfO1KeS75gc5YdI8MD80JdJdbInVB +3lV5EhNjy8LdK2ENDU6wP/RTmP1hmCKoYCZ+fV9uMcwGv2LG00o0dGfpMu7rNdag +lnDiYL7jyeZBfpXxaNliSD4JfcZFI3Oy9Y5e4UY/l+DNt9zePh4OpbKB39ksOCZ4 +URM54C6UqukaVHpJrfPr +=nWad +-----END PGP SIGNATURE----- diff --git a/coreutils.spec b/coreutils.spec index a2899d7..c7766c7 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,11 +1,11 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.26 -Release: 7%{?dist} +Release: 9999%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ -Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz +Source0: https://pixelbeat.org/cu/coreutils-ss.tar.xz Source50: supported_utils Source105: coreutils-colorls.sh Source106: coreutils-colorls.csh @@ -19,9 +19,6 @@ Source10: coreutils-find-requires.sh # disable the test-lock gnulib test prone to deadlock Patch1: coreutils-8.26-test-lock.patch -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851934#10 -Patch2: coreutils-8.26-date-fix-tz-regre.patch - #add note about no difference between binary/text mode on Linux - md5sum manpage Patch101: coreutils-6.10-manpages.patch # downstream changes to default DIR_COLORS @@ -168,10 +165,12 @@ Optional though recommended components, including documentation and translations. %prep -%autosetup -N +%autosetup -N -n %{name}-%{version}.57-00381 # will be modified by coreutils-8.25-DIR_COLORS.patch tee DIR_COLORS{,.256color,.lightbgcolor} /dev/null +# git add DIR_COLORS{,.256color,.lightbgcolor} +# git commit -m "clone DIR_COLORS before patching" # apply all patches %autopatch -p1 diff --git a/sources b/sources index becdeb6..5eda029 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d5aa2072f662d4118b9f4c63b94601a6 coreutils-8.26.tar.xz +11633dc2137c50cb7a63e4c19edae7e9 coreutils-ss.tar.xz From 359af8d751564bcd9991433dc1a41f1fc04bbbd0 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 2 Mar 2017 12:05:18 +0100 Subject: [PATCH 02/22] sources: use SHA512 to make Koji work --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 5eda029..59508e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -11633dc2137c50cb7a63e4c19edae7e9 coreutils-ss.tar.xz +SHA512 (coreutils-ss.tar.xz) = de87f4cd7bef5efc3653b7a572be5240ebc843a0894272930bb0f4589d22b6658b2965dd03bbe5540f8a74f7e5aa8f6aed38abf9e6d10d4b2bdb82662ea2c769 From c8beeadadbcf990ae7d03927d07e533b697cff1e Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 29 Aug 2017 14:21:49 +0200 Subject: [PATCH 03/22] rebase patches on top of upstream --- coreutils-i18n-un-expand-BOM.patch | 10 +-- coreutils-i18n.patch | 128 ++++++++++++++--------------- 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/coreutils-i18n-un-expand-BOM.patch b/coreutils-i18n-un-expand-BOM.patch index 2ccdcca..d1ea109 100644 --- a/coreutils-i18n-un-expand-BOM.patch +++ b/coreutils-i18n-un-expand-BOM.patch @@ -16,15 +16,15 @@ diff --git a/src/expand-common.c b/src/expand-common.c index 4657e46..97cbb09 100644 --- a/src/expand-common.c +++ b/src/expand-common.c -@@ -18,6 +18,7 @@ - +@@ -19,6 +19,7 @@ + #include #include #include +#include #include "system.h" #include "die.h" #include "error.h" -@@ -105,6 +106,119 @@ set_extend_size (uintmax_t tabval) +@@ -126,6 +127,119 @@ set_increment_size (uintmax_t tabval) return ok; } @@ -171,7 +171,7 @@ diff --git a/src/expand.c b/src/expand.c index 310b349..4136824 100644 --- a/src/expand.c +++ b/src/expand.c -@@ -105,11 +105,33 @@ expand (void) +@@ -103,11 +103,33 @@ expand (void) FILE *fp = next_file (NULL); mb_file_t mbf; mbf_char_t c; @@ -206,7 +206,7 @@ index 310b349..4136824 100644 while (true) { -@@ -134,6 +156,27 @@ expand (void) +@@ -132,6 +154,27 @@ expand (void) if ((mb_iseof (c)) && (fp = next_file (fp))) { mbf_init (mbf, fp); diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index ab5d8dc..b6f317f 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -845,7 +845,7 @@ index 98b461c..9990f38 100644 xfields (line); if (prevline[which - 1]) -@@ -567,21 +807,28 @@ prfield (size_t n, struct line const *line) +@@ -563,21 +803,28 @@ prfield (size_t n, struct line const *line) /* Output all the fields in line, other than the join field. */ @@ -877,7 +877,7 @@ index 98b461c..9990f38 100644 prfield (i, line); } } -@@ -592,7 +839,6 @@ static void +@@ -588,7 +835,6 @@ static void prjoin (struct line const *line1, struct line const *line2) { const struct outlist *outlist; @@ -885,7 +885,7 @@ index 98b461c..9990f38 100644 size_t field; struct line const *line; -@@ -626,7 +872,7 @@ prjoin (struct line const *line1, struct line const *line2) +@@ -622,7 +868,7 @@ prjoin (struct line const *line1, struct line const *line2) o = o->next; if (o == NULL) break; @@ -894,7 +894,7 @@ index 98b461c..9990f38 100644 } putchar (eolchar); } -@@ -1104,20 +1350,43 @@ main (int argc, char **argv) +@@ -1099,20 +1345,43 @@ main (int argc, char **argv) case 't': { @@ -1171,7 +1171,7 @@ index 26f221f..633f50e 100644 use_col_separator = true; if (optarg) separator_string (optarg); -@@ -1166,10 +1250,45 @@ getoptnum (const char *n_str, int min, int *num, const char *err) +@@ -1165,10 +1249,45 @@ getoptnum (const char *n_str, int min, int *num, const char *err) a number. */ static void @@ -1219,7 +1219,7 @@ index 26f221f..633f50e 100644 if (*arg) { long int tmp_long; -@@ -1191,6 +1310,11 @@ static void +@@ -1190,6 +1309,11 @@ static void init_parameters (int number_of_files) { int chars_used_by_number = 0; @@ -1231,7 +1231,7 @@ index 26f221f..633f50e 100644 lines_per_body = lines_per_page - lines_per_header - lines_per_footer; if (lines_per_body <= 0) -@@ -1228,7 +1352,7 @@ init_parameters (int number_of_files) +@@ -1227,7 +1351,7 @@ init_parameters (int number_of_files) else col_sep_string = column_separator; @@ -1240,7 +1240,7 @@ index 26f221f..633f50e 100644 use_col_separator = true; } /* It's rather pointless to define a TAB separator with column -@@ -1258,11 +1382,11 @@ init_parameters (int number_of_files) +@@ -1257,11 +1381,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. */ @@ -1254,7 +1254,7 @@ index 26f221f..633f50e 100644 /* The number is part of the column width unless we are printing files in parallel. */ -@@ -1271,7 +1395,7 @@ init_parameters (int number_of_files) +@@ -1270,7 +1394,7 @@ init_parameters (int number_of_files) } int sep_chars, useful_chars; @@ -1263,7 +1263,7 @@ index 26f221f..633f50e 100644 sep_chars = INT_MAX; if (INT_SUBTRACT_WRAPV (chars_per_line - chars_used_by_number, sep_chars, &useful_chars)) -@@ -1294,7 +1418,7 @@ init_parameters (int number_of_files) +@@ -1293,7 +1417,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); @@ -1272,7 +1272,7 @@ index 26f221f..633f50e 100644 } /* Open the necessary files, -@@ -1402,7 +1526,7 @@ init_funcs (void) +@@ -1399,7 +1523,7 @@ init_funcs (void) /* Enlarge p->start_position of first column to use the same form of padding_not_printed with all columns. */ @@ -1281,7 +1281,7 @@ index 26f221f..633f50e 100644 /* This loop takes care of all but the rightmost column. */ -@@ -1436,7 +1560,7 @@ init_funcs (void) +@@ -1433,7 +1557,7 @@ init_funcs (void) } else { @@ -1290,7 +1290,7 @@ index 26f221f..633f50e 100644 h_next = h + chars_per_column; } } -@@ -1727,9 +1851,9 @@ static void +@@ -1724,9 +1848,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -1302,7 +1302,7 @@ index 26f221f..633f50e 100644 padding_not_printed = ANYWHERE; } -@@ -2004,13 +2128,13 @@ store_char (char c) +@@ -2001,13 +2125,13 @@ store_char (char c) /* May be too generous. */ buff = X2REALLOC (buff, &buff_allocated); } @@ -1318,7 +1318,7 @@ index 26f221f..633f50e 100644 char *s; int num_width; -@@ -2027,22 +2151,24 @@ add_line_number (COLUMN *p) +@@ -2024,22 +2148,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. */ @@ -1347,7 +1347,7 @@ index 26f221f..633f50e 100644 output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2203,7 +2329,7 @@ print_white_space (void) +@@ -2198,7 +2324,7 @@ print_white_space (void) while (goal - h_old > 1 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) { @@ -1356,7 +1356,7 @@ index 26f221f..633f50e 100644 h_old = h_new; } while (++h_old <= goal) -@@ -2223,6 +2349,7 @@ print_sep_string (void) +@@ -2218,6 +2344,7 @@ print_sep_string (void) { char const *s = col_sep_string; int l = col_sep_length; @@ -1364,7 +1364,7 @@ index 26f221f..633f50e 100644 if (separators_not_printed <= 0) { -@@ -2234,6 +2361,7 @@ print_sep_string (void) +@@ -2229,6 +2356,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -1372,7 +1372,7 @@ index 26f221f..633f50e 100644 while (l-- > 0) { /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2247,12 +2375,15 @@ print_sep_string (void) +@@ -2242,12 +2370,15 @@ print_sep_string (void) } else { @@ -1389,7 +1389,7 @@ index 26f221f..633f50e 100644 /* sep_string ends with some spaces */ if (spaces_not_printed > 0) print_white_space (); -@@ -2280,7 +2411,7 @@ print_clump (COLUMN *p, int n, char *clump) +@@ -2275,7 +2406,7 @@ print_clump (COLUMN *p, int n, char *clump) required number of tabs and spaces. */ static void @@ -1398,7 +1398,7 @@ index 26f221f..633f50e 100644 { if (tabify_output) { -@@ -2304,6 +2435,74 @@ print_char (char c) +@@ -2299,6 +2430,74 @@ print_char (char c) putchar (c); } @@ -1473,7 +1473,7 @@ index 26f221f..633f50e 100644 /* Skip to page PAGE before printing. PAGE may be larger than total number of pages. */ -@@ -2483,9 +2682,9 @@ read_line (COLUMN *p) +@@ -2476,9 +2675,9 @@ read_line (COLUMN *p) align_empty_cols = false; } @@ -1485,8 +1485,8 @@ index 26f221f..633f50e 100644 padding_not_printed = ANYWHERE; } -@@ -2555,7 +2754,7 @@ print_stored (COLUMN *p) - int i; +@@ -2547,7 +2746,7 @@ print_stored (COLUMN *p) + COLUMN *q; int line = p->current_line++; - char *first = &buff[line_vector[line]]; @@ -1494,7 +1494,7 @@ index 26f221f..633f50e 100644 /* FIXME UMR: Uninitialized memory read: * This is occurring while in: -@@ -2567,7 +2766,7 @@ print_stored (COLUMN *p) +@@ -2559,7 +2758,7 @@ print_stored (COLUMN *p) xmalloc [xmalloc.c:94] init_store_cols [pr.c:1648] */ @@ -1503,7 +1503,7 @@ index 26f221f..633f50e 100644 pad_vertically = true; -@@ -2586,9 +2785,9 @@ print_stored (COLUMN *p) +@@ -2579,9 +2778,9 @@ print_stored (COLUMN *p) } } @@ -1515,7 +1515,7 @@ index 26f221f..633f50e 100644 padding_not_printed = ANYWHERE; } -@@ -2601,8 +2800,8 @@ print_stored (COLUMN *p) +@@ -2594,8 +2793,8 @@ print_stored (COLUMN *p) if (spaces_not_printed == 0) { output_position = p->start_position + end_vector[line]; @@ -1526,7 +1526,7 @@ index 26f221f..633f50e 100644 } return true; -@@ -2621,7 +2820,7 @@ print_stored (COLUMN *p) +@@ -2614,7 +2813,7 @@ print_stored (COLUMN *p) number of characters is 1.) */ static int @@ -1535,7 +1535,7 @@ index 26f221f..633f50e 100644 { unsigned char uc = c; char *s = clump_buff; -@@ -2631,10 +2830,10 @@ char_to_clump (char c) +@@ -2624,10 +2823,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8; @@ -1548,7 +1548,7 @@ index 26f221f..633f50e 100644 { width = TAB_WIDTH (chars_per_c, input_position); -@@ -2715,6 +2914,164 @@ char_to_clump (char c) +@@ -2708,6 +2907,164 @@ char_to_clump (char c) return chars; } @@ -1732,7 +1732,7 @@ index 6d2eec5..f189a0d 100644 #include "system.h" #include "argmatch.h" #include "die.h" -@@ -165,14 +173,39 @@ static int decimal_point; +@@ -169,14 +177,39 @@ static int decimal_point; /* Thousands separator; if -1, then there isn't one. */ static int thousands_sep; @@ -1773,7 +1773,7 @@ index 6d2eec5..f189a0d 100644 /* The kind of blanks for '-b' to skip in various options. */ enum blanktype { bl_start, bl_end, bl_both }; -@@ -346,13 +379,11 @@ static bool reverse; +@@ -350,13 +383,11 @@ static bool reverse; they were read if all keys compare equal. */ static bool stable; @@ -1790,7 +1790,7 @@ index 6d2eec5..f189a0d 100644 /* 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) +@@ -814,6 +845,46 @@ reap_all (void) reap (-1); } @@ -1837,7 +1837,7 @@ index 6d2eec5..f189a0d 100644 /* Clean up any remaining temporary files. */ static void -@@ -1255,7 +1326,7 @@ zaptemp (char const *name) +@@ -1264,7 +1335,7 @@ zaptemp (char const *name) free (node); } @@ -1846,7 +1846,7 @@ index 6d2eec5..f189a0d 100644 static int struct_month_cmp (void const *m1, void const *m2) -@@ -1270,7 +1341,7 @@ struct_month_cmp (void const *m1, void const *m2) +@@ -1279,7 +1350,7 @@ struct_month_cmp (void const *m1, void const *m2) /* Initialize the character class tables. */ static void @@ -1855,7 +1855,7 @@ index 6d2eec5..f189a0d 100644 { size_t i; -@@ -1282,7 +1353,7 @@ inittables (void) +@@ -1291,7 +1362,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -1864,7 +1864,7 @@ index 6d2eec5..f189a0d 100644 /* 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 const *s) +@@ -1373,6 +1444,84 @@ specify_nmerge (int oi, char c, char const *s) xstrtol_fatal (e, oi, c, long_options, s); } @@ -1949,7 +1949,7 @@ index 6d2eec5..f189a0d 100644 /* 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) +@@ -1604,7 +1753,7 @@ buffer_linelim (struct buffer const *buf) by KEY in LINE. */ static char * @@ -1958,7 +1958,7 @@ index 6d2eec5..f189a0d 100644 { char *ptr = line->text, *lim = ptr + line->length - 1; size_t sword = key->sword; -@@ -1606,10 +1755,10 @@ begfield (struct line const *line, struct keyfield const *key) +@@ -1613,10 +1762,10 @@ begfield (struct line const *line, struct keyfield const *key) /* The leading field separator itself is included in a field when -t is absent. */ @@ -1971,7 +1971,7 @@ index 6d2eec5..f189a0d 100644 ++ptr; if (ptr < lim) ++ptr; -@@ -1635,11 +1784,70 @@ begfield (struct line const *line, struct keyfield const *key) +@@ -1642,11 +1791,70 @@ begfield (struct line const *line, struct keyfield const *key) return ptr; } @@ -2043,7 +2043,7 @@ index 6d2eec5..f189a0d 100644 { 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, struct keyfield const *key) +@@ -1661,10 +1869,10 @@ limfield (struct line const *line, struct keyfield const *key) 'beginning' is the first character following the delimiting TAB. Otherwise, leave PTR pointing at the first 'blank' character after the preceding field. */ @@ -2056,7 +2056,7 @@ index 6d2eec5..f189a0d 100644 ++ptr; if (ptr < lim && (eword || echar)) ++ptr; -@@ -1703,10 +1911,10 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1710,10 +1918,10 @@ limfield (struct line const *line, struct keyfield const *key) */ /* Make LIM point to the end of (one byte past) the current field. */ @@ -2069,7 +2069,7 @@ index 6d2eec5..f189a0d 100644 if (newlim) lim = newlim; } -@@ -1737,6 +1945,130 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1744,6 +1952,130 @@ limfield (struct line const *line, struct keyfield const *key) return ptr; } @@ -2200,7 +2200,7 @@ index 6d2eec5..f189a0d 100644 /* 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, char const *file) +@@ -1830,8 +2162,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) else { if (key->skipsblanks) @@ -2225,7 +2225,7 @@ index 6d2eec5..f189a0d 100644 line->keybeg = line_start; } } -@@ -1974,7 +2320,7 @@ human_numcompare (char const *a, char const *b) +@@ -1981,7 +2327,7 @@ human_numcompare (char const *a, char const *b) hideously fast. */ static int @@ -2234,7 +2234,7 @@ index 6d2eec5..f189a0d 100644 { while (blanks[to_uchar (*a)]) a++; -@@ -1984,6 +2330,25 @@ numcompare (char const *a, char const *b) +@@ -1991,6 +2337,25 @@ numcompare (char const *a, char const *b) return strnumcmp (a, b, decimal_point, thousands_sep); } @@ -2260,7 +2260,7 @@ index 6d2eec5..f189a0d 100644 /* 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 -@@ -2034,7 +2399,7 @@ general_numcompare (char const *sa, char const *sb) +@@ -2041,7 +2406,7 @@ general_numcompare (char const *sa, char const *sb) Return 0 if the name in S is not recognized. */ static int @@ -2269,7 +2269,7 @@ index 6d2eec5..f189a0d 100644 { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -2310,15 +2675,14 @@ debug_key (struct line const *line, struct keyfield const *key) +@@ -2317,15 +2682,14 @@ debug_key (struct line const *line, struct keyfield const *key) char saved = *lim; *lim = '\0'; @@ -2287,7 +2287,7 @@ index 6d2eec5..f189a0d 100644 else if (key->general_numeric) ignore_value (strtold (beg, &tighter_lim)); else if (key->numeric || key->human_numeric) -@@ -2452,7 +2816,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2459,7 +2823,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) /* Warn about significant leading blanks. */ bool implicit_skip = key_numeric (key) || key->month; bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */ @@ -2296,7 +2296,7 @@ index 6d2eec5..f189a0d 100644 && ((!key->skipsblanks && !implicit_skip) || (!key->skipsblanks && key->schar) || (!key->skipeblanks && key->echar))) -@@ -2510,11 +2874,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2517,11 +2881,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) error (0, 0, _("option '-r' only applies to last-resort comparison")); } @@ -2385,7 +2385,7 @@ index 6d2eec5..f189a0d 100644 { struct keyfield *key = keylist; -@@ -2599,7 +3039,7 @@ keycompare (struct line const *a, struct line const *b) +@@ -2606,7 +3046,7 @@ keycompare (struct line const *a, struct line const *b) else if (key->human_numeric) diff = human_numcompare (ta, tb); else if (key->month) @@ -2394,7 +2394,7 @@ index 6d2eec5..f189a0d 100644 else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2715,6 +3155,211 @@ keycompare (struct line const *a, struct line const *b) +@@ -2722,6 +3162,211 @@ keycompare (struct line const *a, struct line const *b) return key->reverse ? -diff : diff; } @@ -2606,16 +2606,16 @@ index 6d2eec5..f189a0d 100644 /* Compare two lines A and B, returning negative, zero, or positive depending on whether A compares less than, equal to, or greater than B. */ -@@ -2742,7 +3387,7 @@ compare (struct line const *a, struct line const *b) +@@ -2749,7 +3394,7 @@ compare (struct line const *a, struct line const *b) diff = - NONZERO (blen); else if (blen == 0) diff = 1; - else if (hard_LC_COLLATE) + else if (hard_LC_COLLATE && !folding) { - /* Note xmemcoll0 is a performance enhancement as + /* xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4139,6 +4784,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) +@@ -4144,6 +4789,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) break; case 'f': key->translate = fold_toupper; @@ -2623,7 +2623,7 @@ index 6d2eec5..f189a0d 100644 break; case 'g': key->general_numeric = true; -@@ -4218,7 +4864,7 @@ main (int argc, char **argv) +@@ -4223,7 +4869,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -2632,7 +2632,7 @@ index 6d2eec5..f189a0d 100644 hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4239,6 +4885,29 @@ main (int argc, char **argv) +@@ -4244,6 +4890,29 @@ main (int argc, char **argv) thousands_sep = -1; } @@ -2662,7 +2662,7 @@ index 6d2eec5..f189a0d 100644 have_read_stdin = false; inittables (); -@@ -4513,13 +5182,34 @@ main (int argc, char **argv) +@@ -4518,13 +5187,34 @@ main (int argc, char **argv) case 't': { @@ -2701,7 +2701,7 @@ index 6d2eec5..f189a0d 100644 else { /* Provoke with 'sort -txx'. Complain about -@@ -4530,9 +5220,11 @@ main (int argc, char **argv) +@@ -4535,9 +5225,11 @@ main (int argc, char **argv) quote (optarg)); } } @@ -2715,7 +2715,7 @@ index 6d2eec5..f189a0d 100644 } break; -@@ -4770,12 +5462,10 @@ main (int argc, char **argv) +@@ -4765,12 +5457,10 @@ main (int argc, char **argv) sort (files, nfiles, outfile, nthreads); } @@ -3157,7 +3157,7 @@ diff --git a/tests/local.mk b/tests/local.mk index 568944e..192f776 100644 --- a/tests/local.mk +++ b/tests/local.mk -@@ -352,6 +352,8 @@ all_tests = \ +@@ -358,6 +358,8 @@ all_tests = \ tests/misc/sort-discrim.sh \ tests/misc/sort-files0-from.pl \ tests/misc/sort-float.sh \ @@ -3212,8 +3212,8 @@ index 8a9cad1..9293e39 100755 my @Tests = ( ['t1', '--tabs=3', {IN=>"a\tb"}, {OUT=>"a b"}], -@@ -152,6 +161,8 @@ my @Tests = - ['trail9', '--tab=1,2 -t/5',{IN=>"\ta\tb\tc"}, {OUT=>" a b c"}], +@@ -168,6 +177,8 @@ my @Tests = + # Test errors + # FIXME: The following tests contain ‘quoting’ specific to LC_MESSAGES @@ -3221,7 +3221,7 @@ index 8a9cad1..9293e39 100755 ['e1', '--tabs="a"', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR => "$prog: tab size contains invalid character(s): 'a'\n"}], ['e2', "-t $UINTMAX_OFLOW", {IN=>''}, {OUT=>''}, {EXIT=>1}, -@@ -168,6 +179,37 @@ my @Tests = +@@ -184,6 +195,37 @@ my @Tests = {ERR => "$prog: '/' specifier not at start of number: '/'\n"}], ); From 222189181ef45f7979202c2bc55e15b6ca1da013 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 29 Aug 2017 14:51:21 +0200 Subject: [PATCH 04/22] enable libseccomp [EXPERIMENTAL] --- coreutils.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/coreutils.spec b/coreutils.spec index 5442e9b..6f13947 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -100,6 +100,7 @@ BuildRequires: gmp-devel BuildRequires: libacl-devel BuildRequires: libattr-devel BuildRequires: libcap-devel +BuildRequires: libseccomp-devel BuildRequires: libselinux-devel BuildRequires: openssl-devel BuildRequires: strace From e70cc2139fe02b4a77a91152e8e5be76af51e3a7 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 29 Aug 2017 17:36:07 +0200 Subject: [PATCH 05/22] avoid test-suite failure if SELinux is disabled --- coreutils-8.26-selinuxenable.patch | 26 ++++++++++++++++++++++++++ coreutils.spec | 4 ++++ 2 files changed, 30 insertions(+) create mode 100644 coreutils-8.26-selinuxenable.patch diff --git a/coreutils-8.26-selinuxenable.patch b/coreutils-8.26-selinuxenable.patch new file mode 100644 index 0000000..d9b625a --- /dev/null +++ b/coreutils-8.26-selinuxenable.patch @@ -0,0 +1,26 @@ +From 6880c3dc9098b3337612850d1500b474aeb944ca Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Tue, 29 Aug 2017 17:33:51 +0200 +Subject: [PATCH] require_selinux_(): use selinuxenabled(8) if available + +--- + init.cfg | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/init.cfg b/init.cfg +index af6b581..f887b3a 100644 +--- a/init.cfg ++++ b/init.cfg +@@ -114,6 +114,9 @@ require_selinux_() + grep 'selinuxfs$' /proc/filesystems > /dev/null \ + || skip_ "this system lacks SELinux support" + ++ # use the 'selinuxenabled' utility if available ++ selinuxenabled; [ $? = 1 ] && skip_ "SELinux is disabled" ++ + # Independent of whether SELinux is enabled system-wide, + # the current file system may lack SELinux support. + # Also the current build may have SELinux support disabled. +-- +2.9.5 + diff --git a/coreutils.spec b/coreutils.spec index 6f13947..cf923a8 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -16,6 +16,9 @@ Source106: coreutils-colorls.csh # disable the test-lock gnulib test prone to deadlock Patch100: coreutils-8.26-test-lock.patch +# require_selinux_(): use selinuxenabled(8) if available +Patch105: coreutils-8.26-selinuxenable.patch + #add note about no difference between binary/text mode on Linux - md5sum manpage Patch101: coreutils-6.10-manpages.patch # downstream changes to default DIR_COLORS @@ -102,6 +105,7 @@ BuildRequires: libattr-devel BuildRequires: libcap-devel BuildRequires: libseccomp-devel BuildRequires: libselinux-devel +BuildRequires: libselinux-utils BuildRequires: openssl-devel BuildRequires: strace BuildRequires: texinfo From ece6cca5091a36add73fd4a7af4c496ec612c4d4 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 30 Aug 2017 11:36:01 +0200 Subject: [PATCH 06/22] new snapshot available: coreutils-8.27.103-db8d1 --- coreutils-ss.tar.xz.sig | 26 +++++++++++++------------- coreutils.spec | 5 ++--- sources | 2 +- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/coreutils-ss.tar.xz.sig b/coreutils-ss.tar.xz.sig index add6413..3cd6e4e 100644 --- a/coreutils-ss.tar.x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+7hI6rcOiIB1CYCuXOoKmoOjq5jJdmcOvluVVIVHWZqn9WclnifLNTp+fMI +57N2lazdSbKV+13cr0TCKunX+TDzlNBGeRvCdaSP1DYGksxZGbxyZkRE5htQRgxy +sIzEK2tc7i9BIAoHR2n81I1nqK0XKS77GYmje5odtURNYUDLwMdWuep564NPV86h +xAhpKhmbQyq6dg44thADjvCbAgvS6klpKNCDpvDmsCf7hXj8wJSyrhJrinfAYgQJ +Ihoy0YqrWD+0WFlkxGWnLDAeNGXZbu5QdivVbazVQU1hXIf+YZoS2OFyxwRmBO1B +cz38Pg+0+lI32d1+ti5wLicJ7qoRxueicTbLxHIUZ7qCCnRvGydZ+ZgNkpeVy3rC +WmDcf9CSL4ZLxHGUYUiSQco0oh6ukjoyaSIEhsSK3IAPfsmE9oJzOERQKRLnzNgS +Haf95OfSLCDT7a5QkUav +=j40c -----END PGP SIGNATURE----- diff --git a/coreutils.spec b/coreutils.spec index cf923a8..46ff52e 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.27 -Release: 9999%{?dist} +Release: 9999.1%{?dist} License: GPLv3+ Group: System Environment/Base Url: https://www.gnu.org/software/coreutils/ @@ -103,7 +103,6 @@ BuildRequires: gmp-devel BuildRequires: libacl-devel BuildRequires: libattr-devel BuildRequires: libcap-devel -BuildRequires: libseccomp-devel BuildRequires: libselinux-devel BuildRequires: libselinux-utils BuildRequires: openssl-devel @@ -166,7 +165,7 @@ Optional though recommended components, including documentation and translations. %prep -%autosetup -N -n %{name}-%{version}.99-3ebdc3 +%autosetup -N -n %{name}-%{version}.103-db8d1 # will be modified by coreutils-8.25-DIR_COLORS.patch tee DIR_COLORS{,.256color,.lightbgcolor} /dev/null diff --git a/sources b/sources index dda5b45..2548b89 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (coreutils-ss.tar.xz) = e6f52bd4c1b56479f5ff59c92404e4dd83912e3a4ffc2576284d0ff92b2c111c471b0f297fe3e37c58491cc61fdff355bd21d503e35aa19f8f330d513054da7b +SHA512 (coreutils-ss.tar.xz) = 2911d46f36dfdfe9a3ec739c4b3bcc0f556e9bd68cac7d1fe1ca55a0f2ba00be1ef5f470362b8c2020c3b90f5f1301d105476516361604c0ff61dfc3615ac6ea From 25549a0eef00bb8b4d23e00529f711e5616a3350 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 31 Aug 2017 09:50:50 +0200 Subject: [PATCH 07/22] new snapshot available: coreutils-8.27.108-2ba96 --- coreutils-ss.tar.xz.sig | 26 +++++++++++++------------- coreutils.spec | 4 ++-- sources | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/coreutils-ss.tar.xz.sig b/coreutils-ss.tar.xz.sig index 3cd6e4e..c0024eb 100644 --- a/coreutils-ss.tar.xz.sig +++ b/coreutils-ss.tar.xz.sig @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNATURE----- -iQIcBAABAgAGBQJZpn8hAAoJEN9v2XEwYDfZrQYP/0dKpPg6xoY64iNKm1XErpGB -n/+k0KM9PY6wtnyjNne584iPCm/SJe7ADf9ztiMI/NgHWIamuXcBVdKwy+2O3hwP -6cOmM90sGqDG9SSft80uvTRnnAhPwI+dRqecRfw+2y5y9MVPM9DLaw1QxlKrUlTy -ZhdcC1QNCHlNtBZPiic6nIvK7/KZ1dwyxEDNWynOqPCn/m2gJEC97mUFflH1VMbx -Q7oqA+7hI6rcOiIB1CYCuXOoKmoOjq5jJdmcOvluVVIVHWZqn9WclnifLNTp+fMI -57N2lazdSbKV+13cr0TCKunX+TDzlNBGeRvCdaSP1DYGksxZGbxyZkRE5htQRgxy -sIzEK2tc7i9BIAoHR2n81I1nqK0XKS77GYmje5odtURNYUDLwMdWuep564NPV86h -xAhpKhmbQyq6dg44thADjvCbAgvS6klpKNCDpvDmsCf7hXj8wJSyrhJrinfAYgQJ -Ihoy0YqrWD+0WFlkxGWnLDAeNGXZbu5QdivVbazVQU1hXIf+YZoS2OFyxwRmBO1B -cz38Pg+0+lI32d1+ti5wLicJ7qoRxueicTbLxHIUZ7qCCnRvGydZ+ZgNkpeVy3rC -WmDcf9CSL4ZLxHGUYUiSQco0oh6ukjoyaSIEhsSK3IAPfsmE9oJzOERQKRLnzNgS -Haf95OfSLCDT7a5QkUav -=j40c +iQIcBAABAgAGBQJZp7FZAAoJEN9v2XEwYDfZeEwP/0m3WLHb1Hd260qfG2DACuCL +bh/8/B2SdgNteIEcVotrpMz1yMpg+ypY7E0mKy7d/UO525ZdzcEt3IZyL8qnv2dc +YNhPoV1vQ/rrsgvIJqu3LE7zYMFsNz3tCtCeNpotpnIGluKQOza6aqTfKVO+brZj +3PKkOPNrdfmsOZkdWvyNt35pbM81No94A9WoSXCf+lok+UCWIls5up8opW02/f7y +NUkizlXvIzbut/GzRKKQ2jIuedsqHRN7+3duWgAqAUPHUxxtFaRvRXjFLyY6dle/ +nGgrdBqm2qokmUXpoSj5SYYa0ZgcavIfWijmLvEDyAY2++xVx0qScX2fcbCIiAUO +DJUUo+inEO+r7DEh1beOSEn9hUa65wHN2loocO20v//nCKutHLMTi/2BuKEKBN+z +FvAfE4mKNqC9I219Bq4RVm3pgrnvpx/u+aTbCTtPFiff0OdPNW8fYWHD3vJZ22o9 +hN4J17XAAd6RiwGvHjdr7Bc5pH9sz+KjX5I+swQH8ZecN/hLvdxsPxhnFvbHJqab +zkzQNTQ7wZyclrWVBywB+b/EAkgcK5QlKDNqiXFhpa8dE+RmUy1vrL9gkzRHyb9M +3RWOqF3lHUFtF5LpmXtTzah4jvPkecpAS6Xs7nqwgP18j/ydTgXW7BSHjc4EMfX4 +P1f2HHz9a3ACqtcoSrw7 +=twxK -----END PGP SIGNATURE----- diff --git a/coreutils.spec b/coreutils.spec index 46ff52e..77dba3c 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.27 -Release: 9999.1%{?dist} +Release: 9999.2%{?dist} License: GPLv3+ Group: System Environment/Base Url: https://www.gnu.org/software/coreutils/ @@ -165,7 +165,7 @@ Optional though recommended components, including documentation and translations. %prep -%autosetup -N -n %{name}-%{version}.103-db8d1 +%autosetup -N -n %{name}-%{version}.108-2ba96 # will be modified by coreutils-8.25-DIR_COLORS.patch tee DIR_COLORS{,.256color,.lightbgcolor} /dev/null diff --git a/sources b/sources index 2548b89..5f14e2d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (coreutils-ss.tar.xz) = 2911d46f36dfdfe9a3ec739c4b3bcc0f556e9bd68cac7d1fe1ca55a0f2ba00be1ef5f470362b8c2020c3b90f5f1301d105476516361604c0ff61dfc3615ac6ea +SHA512 (coreutils-ss.tar.xz) = fdeb47980d662adf64659bb10728fc4cafd761eb29521c72fdb9ff369c35221b0ecc9ee151cf5381905b090c548c7ef5c95b66390b3da1fb9089d9136e18d728 From f6571686fb474ae4d7a50552cb78238da5b9040b Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 21 Dec 2017 17:49:57 +0100 Subject: [PATCH 08/22] update to coreutils-8.28.61-70c84 --- coreutils-ss.tar.xz.sig | 26 +++++++++++++------------- coreutils.spec | 2 +- sources | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/coreutils-ss.tar.xz.sig b/coreutils-ss.tar.xz.sig index c0024eb..d76c028 100644 --- a/coreutils-ss.tar.xz.sig +++ b/coreutils-ss.tar.xz.sig @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNATURE----- -iQIcBAABAgAGBQJZp7FZAAoJEN9v2XEwYDfZeEwP/0m3WLHb1Hd260qfG2DACuCL -bh/8/B2SdgNteIEcVotrpMz1yMpg+ypY7E0mKy7d/UO525ZdzcEt3IZyL8qnv2dc -YNhPoV1vQ/rrsgvIJqu3LE7zYMFsNz3tCtCeNpotpnIGluKQOza6aqTfKVO+brZj -3PKkOPNrdfmsOZkdWvyNt35pbM81No94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OrWrsZSf+w +stM3cVSA3o2q9UAdpbskpppWytDzEqLsECDSRl1ZtQUmQVI8IiRx/XgKj0991V+v +AwkqG8L3o/IbPWqZr8TrfKfLOPnLyfzCrXHTZ3cKC2XgCZfiKCEtEn3Bo2xudQqS +9xCIUHbTA4d1Hc4T12p7 +=KmyQ -----END PGP SIGNATURE----- diff --git a/coreutils.spec b/coreutils.spec index 34c5f48..f008dcf 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -152,7 +152,7 @@ Optional though recommended components, including documentation and translations. %prep -%autosetup -N -n %{name}-%{version}.108-2ba96 +%autosetup -N -n %{name}-%{version}.61-70c84 # will be modified by coreutils-8.25-DIR_COLORS.patch tee DIR_COLORS{,.256color,.lightbgcolor} /dev/null diff --git a/sources b/sources index 5f14e2d..11c6957 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (coreutils-ss.tar.xz) = fdeb47980d662adf64659bb10728fc4cafd761eb29521c72fdb9ff369c35221b0ecc9ee151cf5381905b090c548c7ef5c95b66390b3da1fb9089d9136e18d728 +SHA512 (coreutils-ss.tar.xz) = 1d30a13dbf4116258855d846851c2436c7ea64b29b1a34083c56f6c7643a260bab6b7132201f894bd27fe38cfae8362632526ce549e1c0df91cffe2c225dc515 From da2300ff3bcbc0997d0bd475689d2e36450ad73e Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 21 Dec 2017 18:02:36 +0100 Subject: [PATCH 09/22] add BR for hostname ... to avoid the following build-time message: ./configure: line 7463: hostname: command not found --- coreutils.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreutils.spec b/coreutils.spec index f008dcf..05fc297 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.28 -Release: 9999.1%{?dist} +Release: 9999.2%{?dist} License: GPLv3+ Group: System Environment/Base Url: https://www.gnu.org/software/coreutils/ @@ -100,6 +100,7 @@ BuildRequires: automake BuildRequires: bison BuildRequires: gettext-devel BuildRequires: gmp-devel +BuildRequires: hostname BuildRequires: libacl-devel BuildRequires: libattr-devel BuildRequires: libcap-devel From d316fd4d16c207021e46fc3dfe92434a12041eb7 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 27 Jun 2018 12:20:18 +0200 Subject: [PATCH 10/22] remove patches applied upstream --- coreutils-8.29-CVE-2017-18018.patch | 124 --------------- coreutils-8.29-fts-leaf-opt.patch | 228 --------------------------- coreutils-8.29-gnulib-fflush.patch | 202 ------------------------ coreutils-8.29-gnulib-strftime.patch | 101 ------------ coreutils-8.29-ls-abmon-width.patch | 104 ------------ coreutils-8.29-mv-n-noreplace.patch | 63 -------- coreutils.spec | 20 --- 7 files changed, 842 deletions(-) delete mode 100644 coreutils-8.29-CVE-2017-18018.patch delete mode 100644 coreutils-8.29-fts-leaf-opt.patch delete mode 100644 coreutils-8.29-gnulib-fflush.patch delete mode 100644 coreutils-8.29-gnulib-strftime.patch delete mode 100644 coreutils-8.29-ls-abmon-width.patch delete mode 100644 coreutils-8.29-mv-n-noreplace.patch diff --git a/coreutils-8.29-CVE-2017-18018.patch b/coreutils-8.29-CVE-2017-18018.patch deleted file mode 100644 index 577c90b..0000000 --- a/coreutils-8.29-CVE-2017-18018.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 0aa9b0a92cb61af76b75b57abfd6ea1a7c627367 Mon Sep 17 00:00:00 2001 -From: Michael Orlitzky -Date: Thu, 28 Dec 2017 15:52:42 -0500 -Subject: [PATCH 1/2] doc: clarify chown/chgrp --dereference defaults - -* doc/coreutils.texi: the documentation for the --dereference - flag of chown/chgrp states that it is the default mode of - operation. Document that this is only the case when operating - non-recursively. - -Upstream-commit: 7597cfa482e42a00a69fb9577ee523762980a9a2 -Signed-off-by: Kamil Dudka ---- - doc/coreutils.texi | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/doc/coreutils.texi b/doc/coreutils.texi -index de1f2eb..de06c0f 100644 ---- a/doc/coreutils.texi -+++ b/doc/coreutils.texi -@@ -10989,7 +10989,7 @@ chown -h -R --from=OLDUSER NEWUSER / - @cindex symbolic links, changing owner - @findex lchown - Do not act on symbolic links themselves but rather on what they point to. --This is the default. -+This is the default when not operating recursively. - - @item -h - @itemx --no-dereference -@@ -11119,7 +11119,7 @@ changed. - @cindex symbolic links, changing owner - @findex lchown - Do not act on symbolic links themselves but rather on what they point to. --This is the default. -+This is the default when not operating recursively. - - @item -h - @itemx --no-dereference --- -2.13.6 - - -From 3fb331864c718e065804049001b573ff94810772 Mon Sep 17 00:00:00 2001 -From: Michael Orlitzky -Date: Thu, 4 Jan 2018 11:38:21 -0500 -Subject: [PATCH 2/2] doc: warn about following symlinks recursively in - chown/chgrp - -In both chown and chgrp (which shares its code with chown), operating -on symlinks recursively has a window of vulnerability where the -destination user or group can change the target of the operation. -Warn about combining the --dereference, --recursive, and -L flags. - -* doc/coreutils.texi (warnOptDerefWithRec): Add macro. -(node chown invocation): Add it to --dereference and -L. -(node chgrp invocation): Likewise. - -See also: CVE-2017-18018 - -Upstream-commit: bc2fd9796403e03bb757b064d44c22fab92e6842 -Signed-off-by: Kamil Dudka ---- - doc/coreutils.texi | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/doc/coreutils.texi b/doc/coreutils.texi -index de06c0f..24cc85b 100644 ---- a/doc/coreutils.texi -+++ b/doc/coreutils.texi -@@ -1428,6 +1428,19 @@ a command line argument is a symbolic link to a directory, traverse it. - In a recursive traversal, traverse every symbolic link to a directory - that is encountered. - @end macro -+ -+@c Append the following warning to -L where appropriate (e.g. chown). -+@macro warnOptDerefWithRec -+ -+Combining this dereferencing option with the @option{--recursive} option -+may create a security risk: -+During the traversal of the directory tree, an attacker may be able to -+introduce a symlink to an arbitrary target; when the tool reaches that, -+the operation will be performed on the target of that symlink, -+possibly allowing the attacker to escalate privileges. -+ -+@end macro -+ - @choptL - - @macro choptP -@@ -10990,6 +11003,7 @@ chown -h -R --from=OLDUSER NEWUSER / - @findex lchown - Do not act on symbolic links themselves but rather on what they point to. - This is the default when not operating recursively. -+@warnOptDerefWithRec - - @item -h - @itemx --no-dereference -@@ -11046,6 +11060,7 @@ Recursively change ownership of directories and their contents. - @xref{Traversing symlinks}. - - @choptL -+@warnOptDerefWithRec - @xref{Traversing symlinks}. - - @choptP -@@ -11120,6 +11135,7 @@ changed. - @findex lchown - Do not act on symbolic links themselves but rather on what they point to. - This is the default when not operating recursively. -+@warnOptDerefWithRec - - @item -h - @itemx --no-dereference -@@ -11175,6 +11191,7 @@ Recursively change the group ownership of directories and their contents. - @xref{Traversing symlinks}. - - @choptL -+@warnOptDerefWithRec - @xref{Traversing symlinks}. - - @choptP --- -2.13.6 - diff --git a/coreutils-8.29-fts-leaf-opt.patch b/coreutils-8.29-fts-leaf-opt.patch deleted file mode 100644 index 926e5de..0000000 --- a/coreutils-8.29-fts-leaf-opt.patch +++ /dev/null @@ -1,228 +0,0 @@ -From 42b0e609390e62a900c0d73de60282c8b0f15121 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Thu, 5 Apr 2018 08:48:01 -0700 -Subject: [PATCH 1/2] fts: treat CIFS like NFS - -Problem reported by Kamil Dudka in: -https://lists.gnu.org/r/bug-gnulib/2018-04/msg00015.html -* lib/fts.c (S_MAGIC_CIFS): New macro. -(dirent_inode_sort_may_be_useful, leaf_optimization): -Treat CIFS like NFS. - -Upstream-commit: 2e53df541a30d438859087ed4b5a396e04697b9b -Signed-off-by: Kamil Dudka ---- - lib/fts.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/lib/fts.c b/lib/fts.c -index 8f2595d..0689da6 100644 ---- a/lib/fts.c -+++ b/lib/fts.c -@@ -685,6 +685,7 @@ enum leaf_optimization - - /* Linux-specific constants from coreutils' src/fs.h */ - # define S_MAGIC_AFS 0x5346414F -+# define S_MAGIC_CIFS 0xFF534D42 - # define S_MAGIC_NFS 0x6969 - # define S_MAGIC_PROC 0x9FA0 - # define S_MAGIC_REISERFS 0x52654973 -@@ -792,8 +793,9 @@ dirent_inode_sort_may_be_useful (FTSENT const *p) - - switch (filesystem_type (p)) - { -- case S_MAGIC_TMPFS: -+ case S_MAGIC_CIFS: - case S_MAGIC_NFS: -+ case S_MAGIC_TMPFS: - /* On a file system of any of these types, sorting - is unnecessary, and hence wasteful. */ - return false; -@@ -827,6 +829,10 @@ leaf_optimization (FTSENT const *p) - /* Although AFS mount points are not counted in st_nlink, they - act like directories. See . */ - FALLTHROUGH; -+ case S_MAGIC_CIFS: -+ /* Leaf optimization causes 'find' to abort. See -+ . */ -+ FALLTHROUGH; - case S_MAGIC_NFS: - /* NFS provides usable dirent.d_type but not necessarily for all entries - of large directories, so as per --- -2.14.3 - - -From bf96f62507931eb296c5b16d7e46c141ad505a1f Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Wed, 11 Apr 2018 12:50:35 -0700 -Subject: [PATCH 2/2] fts: fix bug in find across filesystems - -This fixes a bug I introduced last summer. -Problem reported by Kamil Dudka in: -https://lists.gnu.org/r/bug-gnulib/2018-04/msg00033.html -* lib/fts.c (filesystem_type, dirent_inode_sort_may_be_useful) -(leaf_optimization): -New arg for file descriptor. All callers changed. -(fts_build): Check for whether inodes should be sorted -before closing the directory. - -Upstream-commit: 81b8c0d3be98f5a77403599de3d06329b3e7673e -Signed-off-by: Kamil Dudka ---- - lib/fts.c | 55 +++++++++++++++++++++++++++++++------------------------ - 1 file changed, 31 insertions(+), 24 deletions(-) - -diff --git a/lib/fts.c b/lib/fts.c -index 0689da6..6420ba1 100644 ---- a/lib/fts.c -+++ b/lib/fts.c -@@ -726,11 +726,12 @@ dev_type_compare (void const *x, void const *y) - return ax->st_dev == ay->st_dev; - } - --/* Return the file system type of P, or 0 if not known. -+/* Return the file system type of P with file descriptor FD, or 0 if not known. -+ If FD is negative, P's file descriptor is unavailable. - Try to cache known values. */ - - static fsword --filesystem_type (FTSENT const *p) -+filesystem_type (FTSENT const *p, int fd) - { - FTS *sp = p->fts_fts; - Hash_table *h = sp->fts_leaf_optimization_works_ht; -@@ -756,7 +757,7 @@ filesystem_type (FTSENT const *p) - } - - /* Look-up failed. Query directly and cache the result. */ -- if (fstatfs (p->fts_fts->fts_cwd_fd, &fs_buf) != 0) -+ if (fd < 0 || fstatfs (fd, &fs_buf) != 0) - return 0; - - if (h) -@@ -778,12 +779,12 @@ filesystem_type (FTSENT const *p) - return fs_buf.f_type; - } - --/* Return false if it is easy to determine the file system type of the -- directory P, and sorting dirents on inode numbers is known not to -- improve traversal performance with that type of file system. -- Otherwise, return true. */ -+/* Return true if sorting dirents on inode numbers is known to improve -+ traversal performance for the directory P with descriptor DIR_FD. -+ Return false otherwise. When in doubt, return true. -+ DIR_FD is negative if unavailable. */ - static bool --dirent_inode_sort_may_be_useful (FTSENT const *p) -+dirent_inode_sort_may_be_useful (FTSENT const *p, int dir_fd) - { - /* Skip the sort only if we can determine efficiently - that skipping it is the right thing to do. -@@ -791,7 +792,7 @@ dirent_inode_sort_may_be_useful (FTSENT const *p) - while the cost of *not* performing it can be O(N^2) with - a very large constant. */ - -- switch (filesystem_type (p)) -+ switch (filesystem_type (p, dir_fd)) - { - case S_MAGIC_CIFS: - case S_MAGIC_NFS: -@@ -805,16 +806,17 @@ dirent_inode_sort_may_be_useful (FTSENT const *p) - } - } - --/* Given an FTS entry P for a directory D, -+/* Given an FTS entry P for a directory with descriptor DIR_FD, - return true if it is both useful and valid to apply leaf optimization. - The optimization is useful only for file systems that lack usable - dirent.d_type info. The optimization is valid if an st_nlink value - of at least MIN_DIR_NLINK is an upper bound on the number of -- subdirectories of D, counting "." and ".." as subdirectories. */ -+ subdirectories of D, counting "." and ".." as subdirectories. -+ DIR_FD is negative if unavailable. */ - static enum leaf_optimization --leaf_optimization (FTSENT const *p) -+leaf_optimization (FTSENT const *p, int dir_fd) - { -- switch (filesystem_type (p)) -+ switch (filesystem_type (p, dir_fd)) - { - /* List here the file system types that may lack usable dirent.d_type - info, yet for which the optimization does apply. */ -@@ -851,12 +853,13 @@ leaf_optimization (FTSENT const *p) - - #else - static bool --dirent_inode_sort_may_be_useful (FTSENT const *p _GL_UNUSED) -+dirent_inode_sort_may_be_useful (FTSENT const *p _GL_UNUSED, -+ int dir_fd _GL_UNUSED) - { - return true; - } - static enum leaf_optimization --leaf_optimization (FTSENT const *p _GL_UNUSED) -+leaf_optimization (FTSENT const *p _GL_UNUSED, int dir_fd _GL_UNUSED) - { - return NO_LEAF_OPTIMIZATION; - } -@@ -1050,7 +1053,7 @@ check_for_dir: - if (parent->fts_n_dirs_remaining == 0 - && ISSET(FTS_NOSTAT) - && ISSET(FTS_PHYSICAL) -- && (leaf_optimization (parent) -+ && (leaf_optimization (parent, sp->fts_cwd_fd) - == NOSTAT_LEAF_OPTIMIZATION)) - { - /* nothing more needed */ -@@ -1335,6 +1338,7 @@ fts_build (register FTS *sp, int type) - int dir_fd; - FTSENT *cur = sp->fts_cur; - bool continue_readdir = !!cur->fts_dirp; -+ bool sort_by_inode = false; - size_t max_entries; - - /* When cur->fts_dirp is non-NULL, that means we should -@@ -1428,7 +1432,7 @@ fts_build (register FTS *sp, int type) - && ! (ISSET (FTS_NOSTAT) && ISSET (FTS_PHYSICAL) - && ! ISSET (FTS_SEEDOT) - && cur->fts_statp->st_nlink == MIN_DIR_NLINK -- && (leaf_optimization (cur) -+ && (leaf_optimization (cur, dir_fd) - != NO_LEAF_OPTIMIZATION))); - if (descend || type == BREAD) - { -@@ -1589,6 +1593,15 @@ mem1: saved_errno = errno; - tail->fts_link = p; - tail = p; - } -+ -+ /* If there are many entries, no sorting function has been -+ specified, and this file system is of a type that may be -+ slow with a large number of entries, arrange to sort the -+ directory entries on increasing inode numbers. */ -+ if (nitems == _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD -+ && !sp->fts_compar) -+ sort_by_inode = dirent_inode_sort_may_be_useful (cur, dir_fd); -+ - ++nitems; - if (max_entries <= nitems) { - /* When there are too many dir entries, leave -@@ -1646,13 +1659,7 @@ mem1: saved_errno = errno; - return (NULL); - } - -- /* If there are many entries, no sorting function has been specified, -- and this file system is of a type that may be slow with a large -- number of entries, then sort the directory entries on increasing -- inode numbers. */ -- if (nitems > _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD -- && !sp->fts_compar -- && dirent_inode_sort_may_be_useful (cur)) { -+ if (sort_by_inode) { - sp->fts_compar = fts_compare_ino; - head = fts_sort (sp, head, nitems); - sp->fts_compar = NULL; --- -2.14.3 - diff --git a/coreutils-8.29-gnulib-fflush.patch b/coreutils-8.29-gnulib-fflush.patch deleted file mode 100644 index 346b0e3..0000000 --- a/coreutils-8.29-gnulib-fflush.patch +++ /dev/null @@ -1,202 +0,0 @@ -From 08d69db2f3c0e8506a1d126dd4dcdd0f14071161 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Mon, 5 Mar 2018 10:56:29 -0800 -Subject: [PATCH] fflush: adjust to glibc 2.28 libio.h removal -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Problem reported by Daniel P. Berrangé in: -https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html -* lib/fflush.c (clear_ungetc_buffer_preserving_position) -(disable_seek_optimization, rpl_fflush): -* lib/fpending.c (__fpending): -* lib/fpurge.c (fpurge): -* lib/freadahead.c (freadahead): -* lib/freading.c (freading): -* lib/freadptr.c (freadptr): -* lib/freadseek.c (freadptrinc): -* lib/fseeko.c (fseeko): -* lib/fseterr.c (fseterr): -* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]: -Define if not already defined. - -Upstream-commit: 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e -Signed-off-by: Kamil Dudka ---- - lib/fflush.c | 6 +++--- - lib/fpending.c | 2 +- - lib/fpurge.c | 2 +- - lib/freadahead.c | 2 +- - lib/freading.c | 2 +- - lib/freadptr.c | 2 +- - lib/freadseek.c | 2 +- - lib/fseeko.c | 4 ++-- - lib/fseterr.c | 2 +- - lib/stdio-impl.h | 6 ++++++ - 10 files changed, 18 insertions(+), 12 deletions(-) - -diff --git a/lib/fflush.c b/lib/fflush.c -index 4e65692..c16da5f 100644 ---- a/lib/fflush.c -+++ b/lib/fflush.c -@@ -33,7 +33,7 @@ - #undef fflush - - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ - static void -@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp) - - #endif - --#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) -+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) - - # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ -@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream) - if (stream == NULL || ! freading (stream)) - return fflush (stream); - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - clear_ungetc_buffer_preserving_position (stream); - -diff --git a/lib/fpending.c b/lib/fpending.c -index 5811a4a..9e21a16 100644 ---- a/lib/fpending.c -+++ b/lib/fpending.c -@@ -32,7 +32,7 @@ __fpending (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - return fp->_IO_write_ptr - fp->_IO_write_base; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ -diff --git a/lib/fpurge.c b/lib/fpurge.c -index 408b8fc..3a16000 100644 ---- a/lib/fpurge.c -+++ b/lib/fpurge.c -@@ -62,7 +62,7 @@ fpurge (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_IO_read_end = fp->_IO_read_ptr; - fp->_IO_write_ptr = fp->_IO_write_base; - /* Avoid memory leak when there is an active ungetc buffer. */ -diff --git a/lib/freadahead.c b/lib/freadahead.c -index f335f04..e7cb77b 100644 ---- a/lib/freadahead.c -+++ b/lib/freadahead.c -@@ -30,7 +30,7 @@ extern size_t __sreadahead (FILE *); - size_t - freadahead (FILE *fp) - { --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_write_ptr > fp->_IO_write_base) - return 0; - return (fp->_IO_read_end - fp->_IO_read_ptr) -diff --git a/lib/freading.c b/lib/freading.c -index 78140d2..c9d3344 100644 ---- a/lib/freading.c -+++ b/lib/freading.c -@@ -31,7 +31,7 @@ freading (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - return ((fp->_flags & _IO_NO_WRITES) != 0 - || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 - && fp->_IO_read_base != NULL)); -diff --git a/lib/freadptr.c b/lib/freadptr.c -index e4cc0b0..aba8dd5 100644 ---- a/lib/freadptr.c -+++ b/lib/freadptr.c -@@ -29,7 +29,7 @@ freadptr (FILE *fp, size_t *sizep) - size_t size; - - /* Keep this code in sync with freadahead! */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_write_ptr > fp->_IO_write_base) - return NULL; - size = fp->_IO_read_end - fp->_IO_read_ptr; -diff --git a/lib/freadseek.c b/lib/freadseek.c -index fcecba6..98726f8 100644 ---- a/lib/freadseek.c -+++ b/lib/freadseek.c -@@ -36,7 +36,7 @@ freadptrinc (FILE *fp, size_t increment) - /* Keep this code in sync with freadptr! */ - #if HAVE___FREADPTRINC /* musl libc */ - __freadptrinc (fp, increment); --#elif defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#elif defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_IO_read_ptr += increment; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ -diff --git a/lib/fseeko.c b/lib/fseeko.c -index d0f24d8..0ae2b15 100644 ---- a/lib/fseeko.c -+++ b/lib/fseeko.c -@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence) - #endif - - /* These tests are based on fpurge.c. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_read_end == fp->_IO_read_ptr - && fp->_IO_write_ptr == fp->_IO_write_base - && fp->_IO_save_base == NULL) -@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence) - return -1; - } - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags &= ~_IO_EOF_SEEN; - fp->_offset = pos; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ -diff --git a/lib/fseterr.c b/lib/fseterr.c -index 739e545..d998619 100644 ---- a/lib/fseterr.c -+++ b/lib/fseterr.c -@@ -29,7 +29,7 @@ fseterr (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags |= _IO_ERR_SEEN; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ -diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h -index 329801a..eeaabab 100644 ---- a/lib/stdio-impl.h -+++ b/lib/stdio-impl.h -@@ -18,6 +18,12 @@ - the same implementation of stdio extension API, except that some fields - have different naming conventions, or their access requires some casts. */ - -+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this -+ problem by defining it ourselves. FIXME: Do not rely on glibc -+ internals. */ -+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN -+# define _IO_IN_BACKUP 0x100 -+#endif - - /* BSD stdio derived implementations. */ - --- -2.16.2 - diff --git a/coreutils-8.29-gnulib-strftime.patch b/coreutils-8.29-gnulib-strftime.patch deleted file mode 100644 index b982344..0000000 --- a/coreutils-8.29-gnulib-strftime.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 67defe5a29936c20a2c102b1b947ce9ea9afc081 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Tue, 23 Jan 2018 00:42:04 -0800 -Subject: [PATCH] Merge strftime.c changes from glibc - -This incorporates: -2017-11-14 [BZ #10871] Implement alternative month names -2017-11-14 [BZ #10871] Abbreviated alternative month names (%Ob) -2017-06-20 Use locale_t, not __locale_t, throughout glibc -* lib/nstrftime.c (ABALTMON_1) [!COMPILE_WIDE]: New macro. -(LOCALE_PARAM) [_LIBC && USE_IN_EXTENDED_LOCALE_MODEL]: -Use locale_t, not __locale_t. -(a_altmonth, f_altmonth, aam_len) [_NL_CURRENT]: New macros. -(__strftime_internal): Add support for alternate months. - -Upstream-commit: 4a236f16ce0ef97094ff2f6538d4dba90e72a523 -Signed-off-by: Kamil Dudka ---- - lib/nstrftime.c | 24 +++++++++++++++++++----- - 1 file changed, 19 insertions(+), 5 deletions(-) - -diff --git a/lib/nstrftime.c b/lib/nstrftime.c -index 8795cd7..5902c49 100644 ---- a/lib/nstrftime.c -+++ b/lib/nstrftime.c -@@ -91,6 +91,7 @@ extern char *tzname[]; - # define UCHAR_T unsigned char - # define L_(Str) Str - # define NLW(Sym) Sym -+# define ABALTMON_1 _NL_ABALTMON_1 - - # define MEMCPY(d, s, n) memcpy (d, s, n) - # define STRLEN(s) strlen (s) -@@ -255,7 +256,7 @@ extern char *tzname[]; - # undef _NL_CURRENT - # define _NL_CURRENT(category, item) \ - (current->values[_NL_ITEM_INDEX (item)].string) --# define LOCALE_PARAM , __locale_t loc -+# define LOCALE_PARAM , locale_t loc - # define LOCALE_ARG , loc - # define HELPER_LOCALE_ARG , current - #else -@@ -475,12 +476,19 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) - # define f_month \ - ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \ - ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon))) -+# define a_altmonth \ -+ ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \ -+ ? "?" : _NL_CURRENT (LC_TIME, NLW(ABALTMON_1) + tp->tm_mon))) -+# define f_altmonth \ -+ ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11 \ -+ ? "?" : _NL_CURRENT (LC_TIME, NLW(ALTMON_1) + tp->tm_mon))) - # define ampm \ - ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \ - ? NLW(PM_STR) : NLW(AM_STR))) - - # define aw_len STRLEN (a_wkday) - # define am_len STRLEN (a_month) -+# define aam_len STRLEN (a_altmonth) - # define ap_len STRLEN (ampm) - #endif - #if HAVE_TZNAME -@@ -808,17 +816,20 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) - to_uppcase = true; - to_lowcase = false; - } -- if (modifier != 0) -+ if (modifier == L_('E')) - goto bad_format; - #ifdef _NL_CURRENT -- cpy (am_len, a_month); -+ if (modifier == L_('O')) -+ cpy (aam_len, a_altmonth); -+ else -+ cpy (am_len, a_month); - break; - #else - goto underlying_strftime; - #endif - - case L_('B'): -- if (modifier != 0) -+ if (modifier == L_('E')) - goto bad_format; - if (change_case) - { -@@ -826,7 +837,10 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) - to_lowcase = false; - } - #ifdef _NL_CURRENT -- cpy (STRLEN (f_month), f_month); -+ if (modifier == L_('O')) -+ cpy (STRLEN (f_altmonth), f_altmonth); -+ else -+ cpy (STRLEN (f_month), f_month); - break; - #else - goto underlying_strftime; --- -2.14.3 - diff --git a/coreutils-8.29-ls-abmon-width.patch b/coreutils-8.29-ls-abmon-width.patch deleted file mode 100644 index 52aef28..0000000 --- a/coreutils-8.29-ls-abmon-width.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 5a820c5a312d6a5b7a1a755cd0f81c84f7c676d7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= -Date: Wed, 14 Mar 2018 11:31:43 -0700 -Subject: [PATCH 1/2] ls: increase the allowed abmon width from 5 to 12 - -This will impact relatively few languages, -and will make Arabic or Catalan etc. -output unambiguous abbreviated month names. - -* src/ls.c (MAX_MON_WIDTH): Increase from 5 to 12. -* tests/ls/abmon-align.sh: Augment to check for ambiguous output. -Fixes https://bugs.gnu.org/30814 - -Upstream-commit: 5ed2018360ba44f673b1dc74fb3d2927f7fcfae3 -Signed-off-by: Kamil Dudka ---- - src/ls.c | 7 +++++-- - tests/ls/abmon-align.sh | 9 ++++++--- - 2 files changed, 11 insertions(+), 5 deletions(-) - -diff --git a/src/ls.c b/src/ls.c -index 4becd06..b2983aa 100644 ---- a/src/ls.c -+++ b/src/ls.c -@@ -1095,8 +1095,11 @@ file_escape_init (void) - variable width abbreviated months and also precomputing/caching - the names was seen to increase the performance of ls significantly. */ - --/* max number of display cells to use */ --enum { MAX_MON_WIDTH = 5 }; -+/* max number of display cells to use. -+ As of 2018 the abmon for Arabic has entries with width 12. -+ It doesn't make much sense to support wider than this -+ and locales should aim for abmon entries of width <= 5. */ -+enum { MAX_MON_WIDTH = 12 }; - /* abformat[RECENT][MON] is the format to use for timestamps with - recentness RECENT and month MON. */ - enum { ABFORMAT_SIZE = 128 }; -diff --git a/tests/ls/abmon-align.sh b/tests/ls/abmon-align.sh -index e474047..a81266b 100755 ---- a/tests/ls/abmon-align.sh -+++ b/tests/ls/abmon-align.sh -@@ -32,17 +32,20 @@ for format in "%b" "[%b" "%b]" "[%b]"; do - # The sed usage here is slightly different from the original, - # removing the \(.*\), to avoid triggering misbehavior in at least - # GNU sed 4.2 (possibly miscompiled) on Mac OS X (Darwin 9.8.0). -- n_widths=$( -+ months="$( - LC_ALL=$LOC TIME_STYLE=+"$format" ls -lgG *.ts | -- LC_ALL=C sed 's/.\{15\}//;s/ ..\.ts$//;s/ /./g' | -+ LC_ALL=C sed 's/.\{15\}//;s/ ..\.ts$//;s/ /./g')" -+ n_widths=$(echo "$months" | - while read mon; do echo "$mon" | LC_ALL=$LOC wc -L; done | - uniq | wc -l - ) -+ n_dupes=$(echo "$months" | sort | uniq -d | wc -l) - test "$n_widths" = "1" || { fail=1; break 2; } -+ test "$n_dupes" = "0" || { fail=1; break 2; } - done - done - if test "$fail" = "1"; then -- echo "misalignment detected in $LOC locale:" -+ echo "misalignment or ambiguous output in $LOC locale:" - LC_ALL=$LOC TIME_STYLE=+%b ls -lgG *.ts - fi - --- -2.14.3 - - -From 58196889eb9621a0bc8a97d7eda1174efb1b078c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= -Date: Tue, 29 May 2018 10:10:35 -0700 -Subject: [PATCH 2/2] tests: fix periodic false failure in month alignment - -* tests/ls/abmon-align.sh: Base relative month adjustment -from the middle of the month, to avoid failures due -to months being repeated. -Fixes https://bugs.gnu.org/31644 - -Upstream-commit: c8eb21c9c0ba00559afc5e0d200085ac656396e0 -Signed-off-by: Kamil Dudka ---- - tests/ls/abmon-align.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tests/ls/abmon-align.sh b/tests/ls/abmon-align.sh -index a81266b..8bd20ae 100755 ---- a/tests/ls/abmon-align.sh -+++ b/tests/ls/abmon-align.sh -@@ -19,8 +19,9 @@ - . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src - print_ver_ ls - -+mid_month="$(date +%Y-%m-15)" || framework_failure_ - for mon in $(seq -w 12); do -- touch -d"+$mon month" $mon.ts || framework_failure_ -+ touch -d"$mid_month +$mon month" $mon.ts || framework_failure_ - done - - --- -2.14.3 - diff --git a/coreutils-8.29-mv-n-noreplace.patch b/coreutils-8.29-mv-n-noreplace.patch deleted file mode 100644 index 4f82716..0000000 --- a/coreutils-8.29-mv-n-noreplace.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 76df06ff8fa39ae0cb0d167b7f622139778dc7d7 Mon Sep 17 00:00:00 2001 -From: Kamil Dudka -Date: Thu, 4 Jan 2018 09:42:10 +0100 -Subject: [PATCH] mv -n: do not overwrite the destination - -... if it is created by another process after mv has checked its -non-existence. - -* src/copy.c (copy_internal): Use renameat2 (..., RENAME_NOREPLACE) -if called by mv -n. If it fails with EEXIST in that case, pretend -successful rename as if the existing destination file was detected -by the preceding lstat call. - -Fixes https://bugs.gnu.org/29961 ---- - src/copy.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/src/copy.c b/src/copy.c -index 2a804945e..be4e357a8 100644 ---- a/src/copy.c -+++ b/src/copy.c -@@ -53,6 +53,7 @@ - #include "ignore-value.h" - #include "ioblksize.h" - #include "quote.h" -+#include "renameat2.h" - #include "root-uid.h" - #include "same.h" - #include "savedir.h" -@@ -2319,7 +2320,12 @@ copy_internal (char const *src_name, char const *dst_name, - - if (x->move_mode) - { -- if (rename (src_name, dst_name) == 0) -+ int flags = 0; -+ if (x->interactive == I_ALWAYS_NO) -+ /* do not replace DST_NAME if it was created since our last check */ -+ flags = RENAME_NOREPLACE; -+ -+ if (renameat2 (AT_FDCWD, src_name, AT_FDCWD, dst_name, flags) == 0) - { - if (x->verbose) - { -@@ -2351,6 +2357,15 @@ copy_internal (char const *src_name, char const *dst_name, - return true; - } - -+ if ((flags & RENAME_NOREPLACE) && (errno == EEXIST)) -+ { -+ /* Pretend the rename succeeded, so the caller (mv) -+ doesn't end up removing the source file. */ -+ if (rename_succeeded) -+ *rename_succeeded = true; -+ return true; -+ } -+ - /* FIXME: someday, consider what to do when moving a directory into - itself but when source and destination are on different devices. */ - --- -2.13.6 - diff --git a/coreutils.spec b/coreutils.spec index 15116aa..a95c7a9 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -14,26 +14,6 @@ Source106: coreutils-colorls.csh # do not make coreutils-single depend on /usr/bin/coreutils %global __requires_exclude ^%{_bindir}/coreutils$ -# mv -n: do not overwrite the destination, superseded by -# http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v8.29-9-g29baf25aa -Patch1: coreutils-8.29-mv-n-noreplace.patch - -# doc: warn about following symlinks recursively in chown/chgrp (CVE-2017-18018) -Patch2: coreutils-8.29-CVE-2017-18018.patch - -# fix build failure with glibc-2.28 -# https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html -Patch3: coreutils-8.29-gnulib-fflush.patch - -# fix crash caused by mistakenly enabled leaf optimization (#1558249) -Patch4: coreutils-8.29-fts-leaf-opt.patch - -# date, ls: pick strftime fixes from glibc to improve locale support (#1577872) -Patch5: coreutils-8.29-gnulib-strftime.patch - -# ls: increase the allowed abmon width from 5 to 12 (#1577872) -Patch6: coreutils-8.29-ls-abmon-width.patch - # disable the test-lock gnulib test prone to deadlock Patch100: coreutils-8.26-test-lock.patch From eba1b50d9f2930516a5602d4712eac868f31f389 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 27 Jun 2018 12:29:38 +0200 Subject: [PATCH 11/22] adapt patches that no longer applied --- coreutils-6.10-manpages.patch | 10 +++++----- coreutils-8.25-DIR_COLORS.patch | 22 ++++++++-------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/coreutils-6.10-manpages.patch b/coreutils-6.10-manpages.patch index 5f8bdb2..5aacff7 100644 --- a/coreutils-6.10-manpages.patch +++ b/coreutils-6.10-manpages.patch @@ -2,13 +2,13 @@ diff --git a/src/md5sum.c b/src/md5sum.c index 8e21609..a857d62 100644 --- a/src/md5sum.c +++ b/src/md5sum.c -@@ -266,6 +266,9 @@ Print or check %s (%d-bit) checksums.\n\ +@@ -265,6 +265,9 @@ Print or check %s (%d-bit) checksums.\n\ + else fputs (_("\ -t, --text read in text mode (default)\n\ - "), stdout); ++"), stdout); + fputs (_("\ + Note: There is no difference between binary and text mode option on GNU system.\n\ -+"), stdout); + "), stdout); fputs (_("\ - \n\ - The following five options are useful only when verifying checksums:\n\ + -z, --zero end each output line with NUL, not newline,\n\ diff --git a/coreutils-8.25-DIR_COLORS.patch b/coreutils-8.25-DIR_COLORS.patch index 94923b0..5490258 100644 --- a/coreutils-8.25-DIR_COLORS.patch +++ b/coreutils-8.25-DIR_COLORS.patch @@ -5,9 +5,9 @@ Subject: [PATCH] downstream changes to default DIR_COLORS --- DIR_COLORS | 41 ++++--- - DIR_COLORS.256color | 302 ++++++++++++++++++++++++------------------------ - DIR_COLORS.lightbgcolor | 215 +++++++++++++++++----------------- - 3 files changed, 286 insertions(+), 272 deletions(-) + DIR_COLORS.256color | 300 ++++++++++++++++++++++++------------------------ + DIR_COLORS.lightbgcolor | 211 ++++++++++++++++++---------------- + 3 files changed, 283 insertions(+), 269 deletions(-) diff --git a/DIR_COLORS b/DIR_COLORS index d2ea453..27af9d7 100644 @@ -21,7 +21,7 @@ index d2ea453..27af9d7 100644 +# You can copy this file to .dir_colors in your $HOME directory to override +# the system defaults. + - # Copyright (C) 1996-2017 Free Software Foundation, Inc. + # Copyright (C) 1996-2018 Free Software Foundation, Inc. # Copying and distribution of this file, with or without modification, # are permitted provided the copyright notice and this notice are preserved. @@ -8,6 +12,9 @@ @@ -43,7 +43,7 @@ index d2ea453..27af9d7 100644 SETUID 37;41 # file that is setuid (u+s) SETGID 30;43 # file that is setgid (g+s) CAPABILITY 30;41 # file with capability -@@ -185,21 +192,21 @@ EXEC 01;32 +@@ -184,21 +191,21 @@ EXEC 01;32 .ogx 01;35 # audio formats @@ -190,7 +190,7 @@ index d2ea453..74c34ba 100644 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. -@@ -83,123 +81,123 @@ EXEC 01;32 +@@ -83,122 +81,122 @@ EXEC 01;32 #.csh 01;32 # archives or compressed (bright red) @@ -209,7 +209,6 @@ index d2ea453..74c34ba 100644 -.t7z 01;31 -.zip 01;31 -.z 01;31 --.Z 01;31 -.dz 01;31 -.gz 01;31 -.lrz 01;31 @@ -256,7 +255,6 @@ index d2ea453..74c34ba 100644 +.t7z 38;5;9 +.zip 38;5;9 +.z 38;5;9 -+.Z 38;5;9 +.dz 38;5;9 +.gz 38;5;9 +.lrz 38;5;9 @@ -482,11 +480,10 @@ index d2ea453..95d6879 100644 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. -@@ -82,107 +91,107 @@ EXEC 01;32 - #.sh 01;32 +@@ -83,105 +92,105 @@ EXEC 01;32 #.csh 01;32 -- # archives or compressed (bright red) + # archives or compressed (bright red) -.tar 01;31 -.tgz 01;31 -.arc 01;31 @@ -502,7 +499,6 @@ index d2ea453..95d6879 100644 -.t7z 01;31 -.zip 01;31 -.z 01;31 --.Z 01;31 -.dz 01;31 -.gz 01;31 -.lrz 01;31 @@ -534,7 +530,6 @@ index d2ea453..95d6879 100644 -.swm 01;31 -.dwm 01;31 -.esd 01;31 -+# archives or compressed (red) +.tar 00;31 +.tgz 00;31 +.arc 00;31 @@ -550,7 +545,6 @@ index d2ea453..95d6879 100644 +.t7z 00;31 +.zip 00;31 +.z 00;31 -+.Z 00;31 +.dz 00;31 +.gz 00;31 +.lrz 00;31 From 4cd6ca50da303a7d5f1168c0403b53c10efecfeb Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 27 Jun 2018 15:06:29 +0200 Subject: [PATCH 12/22] coreutils-i18n-cut-old.patch: fix regression on 32bit arches --- coreutils-i18n-cut-old.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreutils-i18n-cut-old.patch b/coreutils-i18n-cut-old.patch index 7fcc8ff..d393f00 100644 --- a/coreutils-i18n-cut-old.patch +++ b/coreutils-i18n-cut-old.patch @@ -158,7 +158,7 @@ index 7ab6be4..022d0ad 100644 +static void +cut_characters_or_cut_bytes_no_split (FILE *stream) +{ -+ size_t idx; /* number of bytes or characters in the line so far. */ ++ uintmax_t idx; /* number of bytes or characters in the line so far. */ + char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ + char *bufpos; /* Next read position of BUF. */ + size_t buflen; /* The length of the byte sequence in buf. */ From d7513b90bb58fa6bd2e7b0b4d4b71d6c6eebd067 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 4 Mar 2019 15:32:05 +0100 Subject: [PATCH 13/22] new snapshot available: coreutils-8.30.79-efa3e --- coreutils-8.25-DIR_COLORS.patch | 29 +- coreutils-8.5-dircolors.patch | 13 - coreutils-i18n-cut.patch | 587 -------------------------------- coreutils-i18n.patch | 64 ++-- coreutils-ss.tar.xz.sig | 26 +- coreutils.spec | 2 +- sources | 2 +- supported_utils | 1 + 8 files changed, 61 insertions(+), 663 deletions(-) delete mode 100644 coreutils-8.5-dircolors.patch delete mode 100644 coreutils-i18n-cut.patch diff --git a/coreutils-8.25-DIR_COLORS.patch b/coreutils-8.25-DIR_COLORS.patch index 5490258..59674bc 100644 --- a/coreutils-8.25-DIR_COLORS.patch +++ b/coreutils-8.25-DIR_COLORS.patch @@ -13,17 +13,14 @@ diff --git a/DIR_COLORS b/DIR_COLORS index d2ea453..27af9d7 100644 --- a/DIR_COLORS +++ b/DIR_COLORS -@@ -1,6 +1,10 @@ - # Configuration file for dircolors, a utility to help you set the - # LS_COLORS environment variable used by GNU ls with the --color option. - +@@ -1,3 +1,7 @@ +# This file goes in the /etc directory, and must be world readable. +# You can copy this file to .dir_colors in your $HOME directory to override +# the system defaults. + - # Copyright (C) 1996-2018 Free Software Foundation, Inc. - # Copying and distribution of this file, with or without modification, - # are permitted provided the copyright notice and this notice are preserved. + # Configuration file for dircolors, a utility to help you set the + # LS_COLORS environment variable used by GNU ls with the --color option. + @@ -8,6 +12,9 @@ # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the # slackware version of dircolors) are recognized but ignored. @@ -34,7 +31,7 @@ index d2ea453..27af9d7 100644 # Below are TERM entries, which can be a glob patterns, to match # against the TERM environment variable to determine if it is colorizable. TERM Eterm -@@ -56,7 +63,7 @@ DOOR 01;35 # door +@@ -58,7 +65,7 @@ DOOR 01;35 # door BLK 40;33;01 # block device driver CHR 40;33;01 # character device driver ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ... @@ -43,7 +40,7 @@ index d2ea453..27af9d7 100644 SETUID 37;41 # file that is setuid (u+s) SETGID 30;43 # file that is setgid (g+s) CAPABILITY 30;41 # file with capability -@@ -184,21 +191,21 @@ EXEC 01;32 +@@ -186,21 +193,21 @@ EXEC 01;32 .ogx 01;35 # audio formats @@ -131,9 +128,9 @@ index d2ea453..74c34ba 100644 +TERM *256color* +TERM rxvt-unicode256 - # Below are the color init strings for the basic file types. A color init - # string consists of one or more of the following numeric codes: -@@ -43,29 +30,40 @@ TERM xterm* + # Below are the color init strings for the basic file types. + # One can use codes for 256 or more colors supported by modern terminals. +@@ -45,29 +32,40 @@ TERM xterm* # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white # Background color codes: # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white @@ -190,7 +187,7 @@ index d2ea453..74c34ba 100644 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. -@@ -83,122 +81,122 @@ EXEC 01;32 +@@ -85,122 +83,122 @@ EXEC 01;32 #.csh 01;32 # archives or compressed (bright red) @@ -448,7 +445,7 @@ index d2ea453..95d6879 100644 # Below are TERM entries, which can be a glob patterns, to match # against the TERM environment variable to determine if it is colorizable. TERM Eterm -@@ -46,17 +55,17 @@ TERM xterm* +@@ -48,17 +57,17 @@ TERM xterm* #NORMAL 00 # no color code at all #FILE 00 # regular file: use no color at all RESET 0 # reset to "normal" color @@ -471,7 +468,7 @@ index d2ea453..95d6879 100644 SETUID 37;41 # file that is setuid (u+s) SETGID 30;43 # file that is setgid (g+s) CAPABILITY 30;41 # file with capability -@@ -65,7 +74,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky +@@ -67,7 +76,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable # This is for files with execute permission: @@ -480,7 +477,7 @@ index d2ea453..95d6879 100644 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. -@@ -83,105 +92,105 @@ EXEC 01;32 +@@ -85,105 +94,105 @@ EXEC 01;32 #.csh 01;32 # archives or compressed (bright red) diff --git a/coreutils-8.5-dircolors.patch b/coreutils-8.5-dircolors.patch deleted file mode 100644 index 8707c0a..0000000 --- a/coreutils-8.5-dircolors.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -urNp coreutils-8.5-orig/src/dircolors.hin coreutils-8.5/src/dircolors.hin ---- coreutils-8.5-orig/src/dircolors.hin 2010-04-20 21:52:04.000000000 +0200 -+++ coreutils-8.5/src/dircolors.hin 2010-07-22 16:18:41.978036926 +0200 -@@ -127,6 +127,9 @@ EXEC 01;32 - .deb 01;31 - .rpm 01;31 - .jar 01;31 -+.war 01;31 -+.ear 01;31 -+.sar 01;31 - .rar 01;31 - .ace 01;31 - .zoo 01;31 diff --git a/coreutils-i18n-cut.patch b/coreutils-i18n-cut.patch deleted file mode 100644 index f4015d1..0000000 --- a/coreutils-i18n-cut.patch +++ /dev/null @@ -1,587 +0,0 @@ -(sb) lin18nux/lsb compliance - cut - not stable enough, not applied - ---- coreutils-8.24/src/cut.c 2015-06-26 19:05:22.000000000 +0200 -+++ cut.c 2016-01-15 10:15:04.863804121 +0100 -@@ -28,6 +28,11 @@ - #include - #include - #include -+ -+#include -+#include -+#include -+ - #include "system.h" - - #include "error.h" -@@ -61,25 +66,16 @@ - CURRENT_RP.HI then we make CURRENT_RP to point to the next range pair. */ - static struct field_range_pair *current_rp; - --/* This buffer is used to support the semantics of the -s option -- (or lack of same) when the specified field list includes (does -- not include) the first field. In both of those cases, the entire -- first field must be read into this buffer to determine whether it -- is followed by a delimiter or a newline before any of it may be -- output. Otherwise, cut_fields can do the job without using this -- buffer. */ --static char *field_1_buffer; -- --/* The number of bytes allocated for FIELD_1_BUFFER. */ --static size_t field_1_bufsize; -- - enum operating_mode - { - undefined_mode, - -- /* Output characters that are in the given bytes. */ -+ /* Output the given bytes. */ - byte_mode, - -+ /* Output characters that are in the given positions . */ -+ char_mode, -+ - /* Output the given delimiter-separated fields. */ - field_mode - }; -@@ -91,12 +87,16 @@ static enum operating_mode operating_mode; - with field mode. */ - static bool suppress_non_delimited; - -+/* Unless true, we do not recognize multibyte characters in byte-splitting -+ mode. */ -+static bool no_break_mb_chars; -+ - /* If true, print all bytes, characters, or fields _except_ - those that were specified. */ - static bool complement; - - /* The delimiter character for field mode. */ --static unsigned char delim; -+static mbf_char_t delim; - - /* The delimiter for each line/record. */ - static unsigned char line_delim = '\n'; -@@ -109,7 +109,7 @@ static size_t output_delimiter_length; - - /* The output field separator string. Defaults to the 1-character - string consisting of the input delimiter. */ --static char *output_delimiter_string; -+static char const *output_delimiter_string; - - /* True if we have ever read standard input. */ - static bool have_read_stdin; -@@ -164,7 +164,7 @@ Print selected parts of lines from each FILE to standard output.\n\ - -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\ -- -n (ignored)\n\ -+ -n with -b, don't split multibyte characters\n\ - "), stdout); - fputs (_("\ - --complement complement the set of selected bytes, characters\n\ -@@ -211,6 +211,12 @@ next_item (size_t *item_idx) - current_rp++; - } - -+static inline void -+next_item_n (size_t *item_idx, size_t n) -+{ -+ while (n-- > 0) -+ next_item (item_idx); -+} - /* Return nonzero if the K'th field or byte is printable. */ - - static inline bool -@@ -219,6 +225,15 @@ print_kth (size_t k) - return current_rp->lo <= k; - } - -+/* The lo and hi params should be used for the current characters byte position -+ * and byte size, respectively. */ -+static inline bool -+rp_intersect (size_t lo, size_t hi) -+{ -+ return ((current_rp->lo <= lo && current_rp->hi >= lo) -+ || (current_rp->lo <= hi && current_rp->hi >= hi)); -+} -+ - /* Return nonzero if K'th byte is the beginning of a range. */ - - static inline bool -@@ -281,23 +296,215 @@ cut_bytes (FILE *stream) - } - - /* Read from stream STREAM, printing to standard output any selected fields. */ -+extern ssize_t -+mb_getndelim2 (mbf_char_t **lineptr, size_t *linesize, size_t nmax, -+ mbf_char_t delim1, mbf_char_t delim2, mb_file_t *stream) -+{ -+/* The maximum value that getndelim2 can return without suffering from -+ overflow problems, either internally (because of pointer -+ subtraction overflow) or due to the API (because of ssize_t). */ -+#define GETNDELIM2_MAXIMUM (PTRDIFF_MAX < SSIZE_MAX ? PTRDIFF_MAX : SSIZE_MAX) -+ -+/* Try to add at least this many bytes when extending the buffer. -+ MIN_CHUNK must be no greater than GETNDELIM2_MAXIMUM. */ -+#define MIN_CHUNK 64 -+ size_t nchars_avail; /* Allocated but unused chars in *LINEPTR. */ -+ mbf_char_t *read_pos; /* Where we're reading into *LINEPTR. */ -+ ssize_t chars_stored = -1; -+ mbf_char_t *ptr = *lineptr; -+ size_t size = *linesize; -+ bool found_delimiter; -+ -+ if (!ptr) -+ { -+ size = nmax < MIN_CHUNK ? nmax : MIN_CHUNK; -+ ptr = malloc (size * sizeof (mbf_char_t)); -+ if (!ptr) -+ return -1; -+ } -+ -+ if (size < 0) -+ goto done; -+ -+ nchars_avail = size; -+ read_pos = ptr; -+ -+ if (nchars_avail == 0 && nmax <= size) -+ goto done; -+ -+ /* Normalize delimiters, since memchr2 doesn't handle EOF. */ -+ if (mb_iseof (delim1)) -+ mb_copy (&delim1, &delim2); -+ else if (mb_iseof (delim2)) -+ mb_copy (&delim2, &delim1); -+ -+ flockfile (stream); -+ -+ found_delimiter = false; -+ do -+ { -+ /* Here always ptr + size == read_pos + nchars_avail. -+ Also nchars_avail > 0 || size < nmax. */ -+ -+ mbf_char_t c IF_LINT (= 0); -+ { -+ mbf_getc (c, *stream); -+ if (mb_iseof (c)) -+ { -+ /* Return partial line, if any. */ -+ if (read_pos == ptr) -+ goto unlock_done; -+ else -+ break; -+ } -+ if (mb_equal (c, delim1) || mb_equal (c, delim2)) -+ found_delimiter = true; -+ } -+ -+ /* We always want at least one byte left in the buffer, since we -+ always (unless we get an error while reading the first byte) -+ NUL-terminate the line buffer. */ -+ -+ if (!nchars_avail) -+ { -+ /* Grow size proportionally, not linearly, to avoid O(n^2) -+ running time. */ -+ size_t newsize = size < MIN_CHUNK ? size + MIN_CHUNK : 2 * size; -+ mbf_char_t *newptr; -+ -+ /* Respect nmax. This handles possible integer overflow. */ -+ if (! (size < newsize && newsize <= nmax)) -+ newsize = nmax; -+ -+ if (GETNDELIM2_MAXIMUM < newsize) -+ { -+ size_t newsizemax = GETNDELIM2_MAXIMUM + 1; -+ if (size == newsizemax) -+ goto unlock_done; -+ newsize = newsizemax; -+ } -+ nchars_avail = newsize - (read_pos - ptr); -+ newptr = realloc (ptr, newsize * sizeof (mbf_char_t)); -+ if (!newptr) -+ goto unlock_done; -+ ptr = newptr; -+ size = newsize; -+ read_pos = size - nchars_avail + ptr; -+ } -+ -+ /* Here, if size < nmax, nchars_avail >= buffer_len + 1. -+ If size == nmax, nchars_avail > 0. */ -+ -+ if (1 < nchars_avail--) -+ { -+ mb_copy(read_pos++, &c); -+ } -+ -+ } -+ while (!found_delimiter); -+ -+ chars_stored = (read_pos - ptr); -+ -+ unlock_done: -+ funlockfile (stream); -+ -+ done: -+ *lineptr = ptr; -+ *linesize = size; -+ return chars_stored; -+} -+ -+static void -+cut_chars (FILE *stream) -+{ -+ size_t char_idx; /* Number of chars in the line so far. */ -+ bool print_delimiter; -+ mbf_char_t c; -+ mb_file_t mbf; -+ -+ print_delimiter = false; -+ char_idx = 0; -+ current_rp = frp; -+ -+ mbf_init (mbf, stream); -+ while (true) -+ { -+ mbf_getc (c, mbf); -+ -+ if (mb_iseq (c, line_delim)) -+ { -+ putc (line_delim, stdout); -+ char_idx = 0; -+ print_delimiter = false; -+ current_rp = frp; -+ } -+ else if (mb_iseof (c)) -+ { -+ if (char_idx > 0) -+ putc (line_delim, stdout); -+ break; -+ } -+ else -+ { -+ /* Forward by one byte. */ -+ next_item (&char_idx); -+ -+ /* Check if the current characters byte range is within -+ * the argument list. */ -+ if (rp_intersect (char_idx, char_idx + mb_len (c) - 1)) -+ { -+ if (output_delimiter_specified) -+ { -+ if (print_delimiter && is_range_start_index (char_idx)) -+ { -+ fwrite (output_delimiter_string, sizeof (char), -+ output_delimiter_length, stdout); -+ } -+ print_delimiter = true; -+ } -+ mb_putc (c, stdout); -+ } -+ -+ /* Byte mode with multibyte characters uncut (-b -n). */ -+ if (no_break_mb_chars) -+ /* Forward by an additional byte_length (c) - 1. */ -+ next_item_n (&char_idx, mb_len (c) - 1); -+ } -+ } -+} - - static void - cut_fields (FILE *stream) - { -- int c; -+ -+ /* This buffer is used to support the semantics of the -s option -+ (or lack of same) when the specified field list includes (does -+ not include) the first field. In both of those cases, the entire -+ first field must be read into this buffer to determine whether it -+ is followed by a delimiter or a newline before any of it may be -+ output. Otherwise, cut_fields can do the job without using this -+ buffer. */ -+ mbf_char_t *field_1_buffer = 0; -+ /* The number of bytes allocated for FIELD_1_BUFFER. */ -+ size_t field_1_bufsize; -+ -+ -+ mbf_char_t c, d; -+ mb_file_t mbf; - size_t field_idx = 1; - bool found_any_selected_field = false; - bool buffer_first_field; - - current_rp = frp; - -- c = getc (stream); -- if (c == EOF) -+ mbf_init (mbf, stream); -+ mbf_getc (c, mbf); -+ if (mb_iseof (c)) - return; - -- ungetc (c, stream); -- c = 0; -+ mbf_ungetc (c, mbf); -+ mb_setascii (&c, 0); -+ mb_copy (&d, &delim); - - /* To support the semantics of the -s flag, we may have to buffer - all of the first field to determine whether it is 'delimited.' -@@ -312,10 +519,14 @@ cut_fields (FILE *stream) - if (field_idx == 1 && buffer_first_field) - { - ssize_t len; -- size_t n_bytes; -+ size_t n_chars; -+ mbf_char_t nl; -+ mb_setascii (&nl, line_delim); -+ -+ len = mb_getndelim2 (&field_1_buffer, &field_1_bufsize, -+ GETNLINE_NO_LIMIT, d, nl, &mbf); -+ - -- len = getndelim2 (&field_1_buffer, &field_1_bufsize, 0, -- GETNLINE_NO_LIMIT, delim, line_delim, stream); - if (len < 0) - { - free (field_1_buffer); -@@ -325,15 +536,15 @@ cut_fields (FILE *stream) - xalloc_die (); - } - -- n_bytes = len; -- assert (n_bytes != 0); -+ n_chars = len; -+ //assert (n_chars != 0); - -- c = 0; -+ mb_setascii (&c, 0); - - /* If the first field extends to the end of line (it is not - delimited) and we are printing all non-delimited lines, - print this one. */ -- if (to_uchar (field_1_buffer[n_bytes - 1]) != delim) -+ if (!mb_equal (field_1_buffer[n_chars - 1], d)) - { - if (suppress_non_delimited) - { -@@ -341,26 +552,30 @@ cut_fields (FILE *stream) - } - else - { -- fwrite (field_1_buffer, sizeof (char), n_bytes, stdout); -+ for (int i = 0; i < n_chars; ++i) -+ mb_putc (field_1_buffer[i], stdout); -+ - /* Make sure the output line is newline terminated. */ -- if (field_1_buffer[n_bytes - 1] != line_delim) -+ if (!mb_iseq (field_1_buffer[n_chars - 1], line_delim)) - putchar (line_delim); -- c = line_delim; -+ mb_setascii (&c, line_delim); - } - continue; - } - if (print_kth (1)) - { - /* Print the field, but not the trailing delimiter. */ -- fwrite (field_1_buffer, sizeof (char), n_bytes - 1, stdout); -+ for (int i = 0; i < n_chars - 1; ++i) -+ mb_putc (field_1_buffer[i], stdout); - - /* With -d$'\n' don't treat the last '\n' as a delimiter. */ -- if (delim == line_delim) -+ if (mb_iseq (d, line_delim)) - { -- int last_c = getc (stream); -- if (last_c != EOF) -+ mbf_char_t last_c; -+ mbf_getc (last_c, mbf); -+ if (!mb_iseof (last_c)) - { -- ungetc (last_c, stream); -+ mbf_ungetc (last_c, mbf); - found_any_selected_field = true; - } - } -@@ -370,7 +585,8 @@ cut_fields (FILE *stream) - next_item (&field_idx); - } - -- int prev_c = c; -+ mbf_char_t prev_c; -+ mb_copy (&prev_c, &c); - - if (print_kth (field_idx)) - { -@@ -381,42 +597,46 @@ cut_fields (FILE *stream) - } - found_any_selected_field = true; - -- while ((c = getc (stream)) != delim && c != line_delim && c != EOF) -+ mbf_getc (c, mbf); -+ while (!mb_equal (c, d) && !mb_iseq (c, line_delim) && !mb_iseof (c)) - { -- putchar (c); -- prev_c = c; -+ mb_putc (c, stdout); -+ mb_copy (&prev_c, &c); -+ mbf_getc (c, mbf); - } - } - else - { -- while ((c = getc (stream)) != delim && c != line_delim && c != EOF) -+ mbf_getc (c, mbf); -+ while (!mb_equal (c, d) && !mb_iseq (c, line_delim) && !mb_iseof (c)) - { -- prev_c = c; -+ mb_copy (&prev_c, &c); -+ mbf_getc (c, mbf); - } - } - - /* With -d$'\n' don't treat the last '\n' as a delimiter. */ -- if (delim == line_delim && c == delim) -+ if (mb_iseq (d, line_delim) && mb_equal (c, d)) - { -- int last_c = getc (stream); -- if (last_c != EOF) -- ungetc (last_c, stream); -+ mbf_char_t last_c; -+ mbf_getc (last_c, mbf); -+ if (!mb_iseof (last_c)) -+ mbf_ungetc (last_c, mbf); - else -- c = last_c; -+ mb_copy (&c, &last_c); - } - -- if (c == delim) -+ if (mb_equal (c, d)) - next_item (&field_idx); -- else if (c == line_delim || c == EOF) -+ else if (mb_iseq (c, line_delim) || mb_iseof (c)) - { - if (found_any_selected_field - || !(suppress_non_delimited && field_idx == 1)) - { -- if (c == line_delim || prev_c != line_delim -- || delim == line_delim) -+ if (mb_iseq (c, line_delim) || !mb_iseq (prev_c, line_delim) || mb_iseq (d, line_delim)) - putchar (line_delim); - } -- if (c == EOF) -+ if (mb_iseof (c)) - break; - field_idx = 1; - current_rp = frp; -@@ -429,7 +649,14 @@ static void - cut_stream (FILE *stream) - { - if (operating_mode == byte_mode) -- cut_bytes (stream); -+ { -+ if (no_break_mb_chars) -+ cut_chars (stream); -+ else -+ cut_bytes (stream); -+ } -+ else if (operating_mode == char_mode) -+ cut_chars (stream); - else - cut_fields (stream); - } -@@ -483,6 +710,7 @@ main (int argc, char **argv) - bool ok; - bool delim_specified = false; - char *spec_list_string IF_LINT ( = NULL); -+ mbi_iterator_t iter; - - initialize_main (&argc, &argv); - set_program_name (argv[0]); -@@ -496,8 +724,10 @@ main (int argc, char **argv) - - /* By default, all non-delimited lines are printed. */ - suppress_non_delimited = false; -+ /* Default behaviour for -b, unless -n is also specified. */ -+ no_break_mb_chars = false; - -- delim = '\0'; -+ mb_setascii (&delim, '\0'); - have_read_stdin = false; - - while ((optc = getopt_long (argc, argv, "b:c:d:f:nsz", longopts, NULL)) != -1) -@@ -505,7 +735,6 @@ main (int argc, char **argv) - switch (optc) - { - case 'b': -- case 'c': - /* Build the byte list. */ - if (operating_mode != undefined_mode) - FATAL_ERROR (_("only one type of list may be specified")); -@@ -513,6 +742,14 @@ main (int argc, char **argv) - spec_list_string = optarg; - break; - -+ case 'c': -+ /* Build the char list. */ -+ if (operating_mode != undefined_mode) -+ FATAL_ERROR (_("only one type of list may be specified")); -+ operating_mode = char_mode; -+ spec_list_string = optarg; -+ break; -+ - case 'f': - /* Build the field list. */ - if (operating_mode != undefined_mode) -@@ -524,9 +761,17 @@ main (int argc, char **argv) - case 'd': - /* New delimiter. */ - /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ -- if (optarg[0] != '\0' && optarg[1] != '\0') -+ mbi_init (iter, optarg, strlen (optarg)); -+ if (!mbi_avail (iter)) -+ mb_setascii (&delim, '\0'); -+ else -+ { -+ mb_copy (&delim, &mbi_cur (iter)); -+ -+ mbi_advance (iter); -+ if (mbi_avail (iter)) - FATAL_ERROR (_("the delimiter must be a single character")); -- delim = optarg[0]; -+ } - delim_specified = true; - break; - -@@ -540,6 +785,7 @@ main (int argc, char **argv) - break; - - case 'n': -+ no_break_mb_chars = true; - break; - - case 's': -@@ -579,15 +825,12 @@ main (int argc, char **argv) - | (complement ? SETFLD_COMPLEMENT : 0) ); - - if (!delim_specified) -- delim = '\t'; -+ mb_setascii (&delim, '\t'); - - if (output_delimiter_string == NULL) - { -- static char dummy[2]; -- dummy[0] = delim; -- dummy[1] = '\0'; -- output_delimiter_string = dummy; -- output_delimiter_length = 1; -+ output_delimiter_string = mb_ptr (delim); -+ output_delimiter_length = mb_len (delim); - } - - if (optind == argc) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 429675f..e3428d9 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -1731,7 +1731,7 @@ index 6d2eec5..f189a0d 100644 #include "system.h" #include "argmatch.h" #include "die.h" -@@ -169,14 +177,39 @@ static int decimal_point; +@@ -161,14 +169,39 @@ static int decimal_point; /* Thousands separator; if -1, then there isn't one. */ static int thousands_sep; @@ -1772,7 +1772,7 @@ index 6d2eec5..f189a0d 100644 /* The kind of blanks for '-b' to skip in various options. */ enum blanktype { bl_start, bl_end, bl_both }; -@@ -350,13 +383,11 @@ static bool reverse; +@@ -342,13 +375,11 @@ static bool reverse; they were read if all keys compare equal. */ static bool stable; @@ -1789,7 +1789,7 @@ index 6d2eec5..f189a0d 100644 /* Flag to remove consecutive duplicate lines from the output. Only the last of a sequence of equal lines will be output. */ -@@ -814,6 +845,46 @@ reap_all (void) +@@ -806,6 +837,46 @@ reap_all (void) reap (-1); } @@ -1836,7 +1836,7 @@ index 6d2eec5..f189a0d 100644 /* Clean up any remaining temporary files. */ static void -@@ -1264,7 +1335,7 @@ zaptemp (char const *name) +@@ -1274,7 +1345,7 @@ zaptemp (char const *name) free (node); } @@ -1845,7 +1845,7 @@ index 6d2eec5..f189a0d 100644 static int struct_month_cmp (void const *m1, void const *m2) -@@ -1279,7 +1350,7 @@ struct_month_cmp (void const *m1, void const *m2) +@@ -1289,7 +1360,7 @@ struct_month_cmp (void const *m1, void const *m2) /* Initialize the character class tables. */ static void @@ -1854,7 +1854,7 @@ index 6d2eec5..f189a0d 100644 { size_t i; -@@ -1291,7 +1362,7 @@ inittables (void) +@@ -1301,7 +1372,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -1863,7 +1863,7 @@ index 6d2eec5..f189a0d 100644 /* If we're not in the "C" locale, read different names for months. */ if (hard_LC_TIME) { -@@ -1373,6 +1444,84 @@ specify_nmerge (int oi, char c, char const *s) +@@ -1383,6 +1454,84 @@ specify_nmerge (int oi, char c, char const *s) xstrtol_fatal (e, oi, c, long_options, s); } @@ -1948,7 +1948,7 @@ index 6d2eec5..f189a0d 100644 /* Specify the amount of main memory to use when sorting. */ static void specify_sort_size (int oi, char c, char const *s) -@@ -1604,7 +1753,7 @@ buffer_linelim (struct buffer const *buf) +@@ -1614,7 +1763,7 @@ buffer_linelim (struct buffer const *buf) by KEY in LINE. */ static char * @@ -1957,7 +1957,7 @@ index 6d2eec5..f189a0d 100644 { char *ptr = line->text, *lim = ptr + line->length - 1; size_t sword = key->sword; -@@ -1613,10 +1762,10 @@ begfield (struct line const *line, struct keyfield const *key) +@@ -1623,10 +1772,10 @@ begfield (struct line const *line, struct keyfield const *key) /* The leading field separator itself is included in a field when -t is absent. */ @@ -1970,7 +1970,7 @@ index 6d2eec5..f189a0d 100644 ++ptr; if (ptr < lim) ++ptr; -@@ -1642,11 +1791,70 @@ begfield (struct line const *line, struct keyfield const *key) +@@ -1652,11 +1801,70 @@ begfield (struct line const *line, struct keyfield const *key) return ptr; } @@ -2042,7 +2042,7 @@ index 6d2eec5..f189a0d 100644 { char *ptr = line->text, *lim = ptr + line->length - 1; size_t eword = key->eword, echar = key->echar; -@@ -1661,10 +1869,10 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1671,10 +1879,10 @@ limfield (struct line const *line, struct keyfield const *key) 'beginning' is the first character following the delimiting TAB. Otherwise, leave PTR pointing at the first 'blank' character after the preceding field. */ @@ -2055,7 +2055,7 @@ index 6d2eec5..f189a0d 100644 ++ptr; if (ptr < lim && (eword || echar)) ++ptr; -@@ -1710,10 +1918,10 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1720,10 +1928,10 @@ limfield (struct line const *line, struct keyfield const *key) */ /* Make LIM point to the end of (one byte past) the current field. */ @@ -2068,7 +2068,7 @@ index 6d2eec5..f189a0d 100644 if (newlim) lim = newlim; } -@@ -1744,6 +1952,130 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1754,6 +1962,130 @@ limfield (struct line const *line, struct keyfield const *key) return ptr; } @@ -2199,7 +2199,7 @@ index 6d2eec5..f189a0d 100644 /* 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 -@@ -1830,8 +2162,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) +@@ -1840,8 +2172,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) else { if (key->skipsblanks) @@ -2224,7 +2224,7 @@ index 6d2eec5..f189a0d 100644 line->keybeg = line_start; } } -@@ -1981,7 +2327,7 @@ human_numcompare (char const *a, char const *b) +@@ -1991,7 +2337,7 @@ human_numcompare (char const *a, char const *b) hideously fast. */ static int @@ -2233,7 +2233,7 @@ index 6d2eec5..f189a0d 100644 { while (blanks[to_uchar (*a)]) a++; -@@ -1991,6 +2337,25 @@ numcompare (char const *a, char const *b) +@@ -2001,6 +2347,25 @@ numcompare (char const *a, char const *b) return strnumcmp (a, b, decimal_point, thousands_sep); } @@ -2258,8 +2258,8 @@ index 6d2eec5..f189a0d 100644 + /* 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 -@@ -2041,7 +2406,7 @@ general_numcompare (char const *sa, char const *sb) + A and B before calling strtold. FIXME: remove this function if +@@ -2051,7 +2416,7 @@ general_numcompare (char const *sa, char const *sb) Return 0 if the name in S is not recognized. */ static int @@ -2268,7 +2268,7 @@ index 6d2eec5..f189a0d 100644 { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -2317,15 +2682,14 @@ debug_key (struct line const *line, struct keyfield const *key) +@@ -2327,15 +2692,14 @@ debug_key (struct line const *line, struct keyfield const *key) char saved = *lim; *lim = '\0'; @@ -2286,7 +2286,7 @@ index 6d2eec5..f189a0d 100644 else if (key->general_numeric) ignore_value (strtold (beg, &tighter_lim)); else if (key->numeric || key->human_numeric) -@@ -2459,7 +2823,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2469,7 +2833,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) /* Warn about significant leading blanks. */ bool implicit_skip = key_numeric (key) || key->month; bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */ @@ -2295,7 +2295,7 @@ index 6d2eec5..f189a0d 100644 && ((!key->skipsblanks && !implicit_skip) || (!key->skipsblanks && key->schar) || (!key->skipeblanks && key->echar))) -@@ -2517,11 +2881,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2527,11 +2891,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) error (0, 0, _("option '-r' only applies to last-resort comparison")); } @@ -2384,7 +2384,7 @@ index 6d2eec5..f189a0d 100644 { struct keyfield *key = keylist; -@@ -2606,7 +3046,7 @@ keycompare (struct line const *a, struct line const *b) +@@ -2616,7 +3056,7 @@ keycompare (struct line const *a, struct line const *b) else if (key->human_numeric) diff = human_numcompare (ta, tb); else if (key->month) @@ -2393,7 +2393,7 @@ index 6d2eec5..f189a0d 100644 else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2722,6 +3162,211 @@ keycompare (struct line const *a, struct line const *b) +@@ -2732,6 +3172,211 @@ keycompare (struct line const *a, struct line const *b) return key->reverse ? -diff : diff; } @@ -2605,7 +2605,7 @@ index 6d2eec5..f189a0d 100644 /* Compare two lines A and B, returning negative, zero, or positive depending on whether A compares less than, equal to, or greater than B. */ -@@ -2749,7 +3394,7 @@ compare (struct line const *a, struct line const *b) +@@ -2759,7 +3404,7 @@ compare (struct line const *a, struct line const *b) diff = - NONZERO (blen); else if (blen == 0) diff = 1; @@ -2614,7 +2614,7 @@ index 6d2eec5..f189a0d 100644 { /* xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4144,6 +4789,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) +@@ -4149,6 +4794,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) break; case 'f': key->translate = fold_toupper; @@ -2622,7 +2622,7 @@ index 6d2eec5..f189a0d 100644 break; case 'g': key->general_numeric = true; -@@ -4223,7 +4869,7 @@ main (int argc, char **argv) +@@ -4228,7 +4874,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -2631,7 +2631,7 @@ index 6d2eec5..f189a0d 100644 hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4244,6 +4890,29 @@ main (int argc, char **argv) +@@ -4249,6 +4895,29 @@ main (int argc, char **argv) thousands_sep = -1; } @@ -2661,7 +2661,7 @@ index 6d2eec5..f189a0d 100644 have_read_stdin = false; inittables (); -@@ -4518,13 +5187,34 @@ main (int argc, char **argv) +@@ -4523,13 +5192,34 @@ main (int argc, char **argv) case 't': { @@ -2700,7 +2700,7 @@ index 6d2eec5..f189a0d 100644 else { /* Provoke with 'sort -txx'. Complain about -@@ -4535,9 +5225,11 @@ main (int argc, char **argv) +@@ -4540,9 +5230,11 @@ main (int argc, char **argv) quote (optarg)); } } @@ -2714,7 +2714,7 @@ index 6d2eec5..f189a0d 100644 } break; -@@ -4765,12 +5457,10 @@ main (int argc, char **argv) +@@ -4771,12 +5463,10 @@ main (int argc, char **argv) sort (files, nfiles, outfile, nthreads); } @@ -3156,7 +3156,7 @@ diff --git a/tests/local.mk b/tests/local.mk index 568944e..192f776 100644 --- a/tests/local.mk +++ b/tests/local.mk -@@ -362,6 +362,8 @@ all_tests = \ +@@ -368,6 +368,8 @@ all_tests = \ tests/misc/sort-discrim.sh \ tests/misc/sort-files0-from.pl \ tests/misc/sort-float.sh \ @@ -3325,7 +3325,7 @@ index 4d399d8..07f2823 100755 my $delim = chr 0247; sub t_subst ($) { -@@ -329,8 +338,49 @@ foreach my $t (@tv) +@@ -333,8 +342,49 @@ foreach my $t (@tv) push @Tests, $new_ent; } diff --git a/coreutils-ss.tar.xz.sig b/coreutils-ss.tar.xz.sig index f4ba797..79babe5 100644 --- a/coreutils-ss.tar.xz.sig +++ b/coreutils-ss.tar.xz.sig @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNATURE----- -iQIcBAABAgAGBQJbM129AAoJEN9v2XEwYDfZpYMP/01bh5Nu0n2a5hk1omwMmxAr -qgieycKINFQtD5TD6DCIpBMwXHSlNCvEipwXfMjTvgxRTpVfbXx45FkcphEvuzta -PEC13liS+tXWUYv1tQ+v2tEturUcGLIy1FioyFUKck55mpd2EtGrZYVZBwjDzBxp -4Y49qfUZQuirzv2X+yHXKvvGe+twtWfQxeinmrjwZrNQ7TF5C1y3pJsg0FQ/kQh7 -Ooe/epSHspneLYRO5mAnWVTz6Soc4vTPvrQ67loyHuL281OowUFdTtZ5mDNoUWW4 -UojAhSGAkxGBHVDltOm6wnWlkZwcafeWbstaJhOLOBYnw1y/O4fKMqls/mr5Wm24 -wIrv1rf77hWusForE3ndA4/ZnqrhL3RB9mwxeff/UCR1pHyo7De0EZVuifVzrg8F -tb84cVWm12V+OylChNFEpb4AEejHtUBrWElWoI/AHeQcmQAuPRM/fvV/q133rfTo -1Om2JzHN7LCpBY5Kz/9D15lCWLc6cPXVIyugBANVc7+GvmDLFrQzSHIeFcW5HbUr -sqkllCcsh7myG/Td2B6Ir69CTRa5TiHMv1c1chJiZv6xIIJWQYH4g6SE0zjquLVf -GZSZpK/Kl1Uqk5IPA5r9W3h+YV3th1RuLYGC6ejr9U+3E4bgEz6SFijdEwyNOI5Q -7blgThgOJFU62XqYvIUT -=9+BR +iQIcBAABAgAGBQJcfPYnAAoJEN9v2XEwYDfZ1ecQAJP0fMf31OOMyvhzxxAKOHwB +8ludnxfDVSjf8j/n6R//6tgWaGx5/pzvFxC+4OEGhVOKD8rJwkjIdzcb5SjSdiIa +rS4X4kYGblvy8TCSntR3d2oEhXqRzvrSqNNQABetraP/n8bP7pipu8+eGmrDragK +z8ytQXgjfXks2vdrWkb/TMEM4uGkylpqZmJ/Blc1W2wCEH48Hp0JIB72T51a7SGA +Cq3qz4lSmtDXdBOrLv7tMyupD+GfgWwGBjARI1sYCXJwIvJ3VQRopustVhniawfo +cVnLcCHf5OnwcUD4sMlG20GBIQimq6uQW98qQdAt+mhOuibv3xrGIEIVaoIw9HIz +fcqDf9mf3N/G2JF4x9afKp2COiM8Rc5Eo1zZ370iIzzpNIAjXwBNiP4HqXqAeFSP +IqKuAWmNUF9iWR9Ywp9QdVxYqKZXTD+WBeT66b9B5QT0crVUtPJq6NA2K985eU4p +HqmR//+0FOm/8+/ha8uTtyKum2mKGaoOc2ygb06LwR1cEBP/C2tMl5agR+9Nfp3D +fviUI1OEEvqxkwlSM15x2HN4BZUSQPDxKeFvwQBr4Hf8qUlKUZsKTGJO79yZLdxR +2TzsE8SQ+F1VusoKprX2Ge+E7Z+0KZsNO35Zci6eLcGgNEkkVnYZcNyLhwbbbjQ8 +K43WsLwMVFgpBmPG2k0N +=E4em -----END PGP SIGNATURE----- diff --git a/coreutils.spec b/coreutils.spec index af70866..be7976b 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -122,7 +122,7 @@ Optional though recommended components, including documentation and translations. %prep -%autosetup -N -n %{name}-%{version}.64-1755f +%autosetup -N -n %{name}-%{version}.79-efa3e # will be modified by coreutils-8.25-DIR_COLORS.patch tee DIR_COLORS{,.256color,.lightbgcolor} /dev/null diff --git a/sources b/sources index f5a0024..b5e7681 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (coreutils-ss.tar.xz) = 7f333b308e5b30c3f47e8a85165afa6fb11f8a6c825196d8becd39bffbed9dfea785a06f8f3d86cf863543e32e926129b7aba6e9259fe3b7a518dbec1ecce560 +SHA512 (coreutils-ss.tar.xz) = 8565b41d7d3022c5cd0a38eb60d69cf69acfce2e93c9fc54737c2a01bdbf2ccd2e14008d4b101dd8eb335cf5b5fbbbac4ce973426a9d471b48b4d179c4d5464f diff --git a/supported_utils b/supported_utils index 8105ccf..6db4fb5 100644 --- a/supported_utils +++ b/supported_utils @@ -1,6 +1,7 @@ %{_bindir}/arch %{_bindir}/b2sum %{_bindir}/basename +%{_bindir}/basenc %{_bindir}/cat %{_bindir}/chgrp %{_bindir}/chmod From 50e3cfa826590af0d4f1f08caec7dc7c3e583c92 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 7 Mar 2019 13:17:39 +0100 Subject: [PATCH 14/22] new snapshot available: coreutils-8.30.87-66e2d --- coreutils-ss.tar.xz.sig | 26 +++++++++++++------------- coreutils.spec | 4 ++-- sources | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/coreutils-ss.tar.xz.sig b/coreutils-ss.tar.xz.sig index 79babe5..c839362 100644 --- a/coreutils-ss.tar.xz.sig +++ b/coreutils-ss.tar.xz.sig @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNATURE----- -iQIcBAABAgAGBQJcfPYnAAoJEN9v2XEwYDfZ1ecQAJP0fMf31OOMyvhzxxAKOHwB -8ludnxfDVSjf8j/n6R//6tgWaGx5/pzvFxC+4OEGhVOKD8rJwkjIdzcb5SjSdiIa -rS4X4kYGblvy8TCSntR3d2oEhXqRzvrSqNNQABetraP/n8bP7pipu8+eGmrDragK -z8ytQXgjfXks2vdrWkb/TMEM4uGkylpqZmJ/Blc1W2wCEH48Hp0JIB72T51a7SGA -Cq3qz4lSmtDXdBOrLv7tMyupD+GfgWwGBjARI1sYCXJwIvJ3VQRopustVhniawfo -cVnLcCHf5OnwcUD4sMlG20GBIQimq6uQW98qQdAt+mhOuibv3xrGIEIVaoIw9HIz -fcqDf9mf3N/G2JF4x9afKp2COiM8Rc5Eo1zZ370iIzzpNIAjXwBNiP4HqXqAeFSP -IqKuAWmNUF9iWR9Ywp9QdVxYqKZXTD+WBeT66b9B5QT0crVUtPJq6NA2K985eU4p -HqmR//+0FOm/8+/ha8uTtyKum2mKGaoOc2ygb06LwR1cEBP/C2tMl5agR+9Nfp3D -fviUI1OEEvqxkwlSM15x2HN4BZUSQPDxKeFvwQBr4Hf8qUlKUZsKTGJO79yZLdxR -2TzsE8SQ+F1VusoKprX2Ge+E7Z+0KZsNO35Zci6eLcGgNEkkVnYZcNyLhwbbbjQ8 -K43WsLwMVFgpBmPG2k0N -=E4em +iQIcBAABAgAGBQJcgLz2AAoJEN9v2XEwYDfZ9cEQAI3rvQbDU55oTV91vX6msE5e +1e3HfL/qHKqRKg7fmko08q2kUfujfWDlFZfvNPu650gKMwM2KUlwqg8dNRxsfA3P +FQKqnDCDudr8plNqO1E11I6y0KP3DN68wEsFPn18afUrII4+AfbAixIlmT3M5tr5 +98FaaWVOB725Ek8ovfHfdhzNXc4l0RyL94FD6PxXxIpZDI8uac9Ao8ryDjrwGNFy +9A6Sx+fyExGQpPkgffYL2BAOpu9ez3xYx76kMpMi8yUbjCFzufVxOjZw2KtZSa47 +g4tBTDPurVcNzD/vIYaA34zblGDVqvn5s2M1yGiTNQ8L5r8/lJT5jAgNLra9XTJH +i3M8yG0lg9+eEFISejpwAZ7RUGHJTtyvZcv1jhJdg77J7AP2ywx95/F2+9PpB9Qb +UeH6biaqX4cQVlRAEkYViZzH7ApwwK2eC1fYkn63wY6X2vh36KJ9jNIEquItbtcY +OZxZVpL+0aAoWO2/4FbysrIYYZe7ZnkwE7WJ7MxSDfqjQzN2Tm9pcQNn17868Vhk +36HaOyz38MmoBeNZ+QrgwYZJoOZ9Qi2Jx9I5kWcH8tyH0QTTpyUQPaZkWvfF196Y +Nj18wY1kyaL1FLYfRzzbKXT6Eu8EgNgiwtSFOXPjqEwrFMFlXHoCOe/luqnUUnUC +FFXFSVCRzNAs+I/MhlCm +=XW4g -----END PGP SIGNATURE----- diff --git a/coreutils.spec b/coreutils.spec index be7976b..b3c366e 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.30 -Release: 9999%{?dist} +Release: 9999.1%{?dist} License: GPLv3+ Url: https://www.gnu.org/software/coreutils/ Source0: https://pixelbeat.org/cu/coreutils-ss.tar.xz @@ -122,7 +122,7 @@ Optional though recommended components, including documentation and translations. %prep -%autosetup -N -n %{name}-%{version}.79-efa3e +%autosetup -N -n %{name}-%{version}.87-66e2d # will be modified by coreutils-8.25-DIR_COLORS.patch tee DIR_COLORS{,.256color,.lightbgcolor} /dev/null diff --git a/sources b/sources index b5e7681..440028f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (coreutils-ss.tar.xz) = 8565b41d7d3022c5cd0a38eb60d69cf69acfce2e93c9fc54737c2a01bdbf2ccd2e14008d4b101dd8eb335cf5b5fbbbac4ce973426a9d471b48b4d179c4d5464f +SHA512 (coreutils-ss.tar.xz) = cefcdde351e8564d09fe518bbffa1afcff3b5c854d7766369aad34d105ae31cf3328d5c427022d0d66d7ebcd0c18b069f162ec0f1d4a35e6fb89c3deb0253bcb From b16ef99111a08d277a208192ebab13d4c52191bc Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 28 Feb 2020 15:04:44 +0100 Subject: [PATCH 15/22] new snapshot available: coreutils-8.31.90-cc4c --- coreutils-ss.tar.xz.sig | 26 +++++++++++++------------- coreutils.spec | 2 +- sources | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/coreutils-ss.tar.xz.sig b/coreutils-ss.tar.xz.sig index c839362..b06e77a 100644 --- a/coreutils-ss.tar.xz.sig +++ b/coreutils-ss.tar.xz.sig @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNATURE----- -iQIcBAABAgAGBQJcgLz2AAoJEN9v2XEwYDfZ9cEQAI3rvQbDU55oTV91vX6msE5e -1e3HfL/qHKqRKg7fmko08q2kUfujfWDlFZfvNPu650gKMwM2KUlwqg8dNRxsfA3P -FQKqnDCDudr8plNqO1E11I6y0KP3DN68w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rtdoZahbJ794bSWQoQOcCVc/0av2 +XT5VIDatGwrRVMC72QSX9ggjcc2NUMqNGx0idkgdOoFk14EAIn3NRL3J6VfGyagq +E2mnpfDnKRCOLQT+HZtNVlNF6PiBsSZ6vfrE4f9Wgg8FXS14XfZfRH2qJfGuk3mP +XukpqneQ7k0jONWt5GpEQcBgdCBmmCvUKYWMLMtakt4gDYccrrlPWAL/eoIMo3wK +U9yG9d1xTxEtK0pyYzLThtBwJT1vW/zpgd4xNu5OnA8VLdukfPM= +=O5nv -----END PGP SIGNATURE----- diff --git a/coreutils.spec b/coreutils.spec index fb53553..7ff507a 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -120,7 +120,7 @@ Optional though recommended components, including documentation and translations. %prep -%autosetup -N -n %{name}-%{version}.87-66e2d +%autosetup -N -n %{name}-%{version}.90-cc4c # will be modified by coreutils-8.25-DIR_COLORS.patch tee DIR_COLORS{,.256color,.lightbgcolor} /dev/null diff --git a/sources b/sources index 440028f..fe20d7d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (coreutils-ss.tar.xz) = cefcdde351e8564d09fe518bbffa1afcff3b5c854d7766369aad34d105ae31cf3328d5c427022d0d66d7ebcd0c18b069f162ec0f1d4a35e6fb89c3deb0253bcb +SHA512 (coreutils-ss.tar.xz) = 3c244a62d37b0cb8e50f560b261142557cb219e8f14c556dc68c8be64d5555461d1c007cfe57f53ae7ae35bc04f86707c71283764d0dd41d76e05b8dab8d254b From 6c0c8d1c5933c958dd32d866b5e188aa0d9f4e7c Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 28 Feb 2020 15:25:43 +0100 Subject: [PATCH 16/22] adapt DIR_COLORS patch for the new release ... and make it easier to maintain (by using sed for substitutions). --- ...S.patch => coreutils-8.32-DIR_COLORS.patch | 491 +----------------- coreutils.spec | 18 +- 2 files changed, 24 insertions(+), 485 deletions(-) rename coreutils-8.25-DIR_COLORS.patch => coreutils-8.32-DIR_COLORS.patch (55%) diff --git a/coreutils-8.25-DIR_COLORS.patch b/coreutils-8.32-DIR_COLORS.patch similarity index 55% rename from coreutils-8.25-DIR_COLORS.patch rename to coreutils-8.32-DIR_COLORS.patch index 26acdf9..61a3db3 100644 --- a/coreutils-8.25-DIR_COLORS.patch +++ b/coreutils-8.32-DIR_COLORS.patch @@ -1,16 +1,16 @@ -From a13bc34f1eeebdf8b87e4b5a570341bb77a62f76 Mon Sep 17 00:00:00 2001 +From 81e25c8521937ecf7f444bab11fddaaf81cc3efd Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 17 Jun 2016 16:58:18 +0200 Subject: [PATCH] downstream changes to default DIR_COLORS --- - DIR_COLORS | 41 ++++--- - DIR_COLORS.256color | 300 ++++++++++++++++++++++++------------------------ - DIR_COLORS.lightbgcolor | 211 ++++++++++++++++++---------------- - 3 files changed, 283 insertions(+), 269 deletions(-) + DIR_COLORS | 9 ++++- + DIR_COLORS.256color | 78 ++++++++++++++++++++--------------------- + DIR_COLORS.lightbgcolor | 21 +++++++---- + 3 files changed, 61 insertions(+), 47 deletions(-) diff --git a/DIR_COLORS b/DIR_COLORS -index d2ea453..27af9d7 100644 +index bd5df23..84f2417 100644 --- a/DIR_COLORS +++ b/DIR_COLORS @@ -1,3 +1,7 @@ @@ -40,46 +40,8 @@ index d2ea453..27af9d7 100644 SETUID 37;41 # file that is setuid (u+s) SETGID 30;43 # file that is setgid (g+s) CAPABILITY 30;41 # file with capability -@@ -186,21 +193,21 @@ EXEC 01;32 - .ogx 01;35 - - # audio formats --.aac 00;36 --.au 00;36 --.flac 00;36 --.m4a 00;36 --.mid 00;36 --.midi 00;36 --.mka 00;36 --.mp3 00;36 --.mpc 00;36 --.ogg 00;36 --.ra 00;36 --.wav 00;36 -+.aac 01;36 -+.au 01;36 -+.flac 01;36 -+.m4a 01;36 -+.mid 01;36 -+.midi 01;36 -+.mka 01;36 -+.mp3 01;36 -+.mpc 01;36 -+.ogg 01;36 -+.ra 01;36 -+.wav 01;36 - - # https://wiki.xiph.org/MIME_Types_and_File_Extensions --.oga 00;36 --.opus 00;36 --.spx 00;36 --.xspf 00;36 -+.oga 01;36 -+.opus 01;36 -+.spx 01;36 -+.xspf 01;36 diff --git a/DIR_COLORS.256color b/DIR_COLORS.256color -index d2ea453..74c34ba 100644 +index 85bd28d..7f6d4c8 100644 --- a/DIR_COLORS.256color +++ b/DIR_COLORS.256color @@ -1,3 +1,9 @@ @@ -187,242 +149,8 @@ index d2ea453..74c34ba 100644 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. -@@ -85,122 +83,122 @@ EXEC 01;32 - #.csh 01;32 - - # archives or compressed (bright red) --.tar 01;31 --.tgz 01;31 --.arc 01;31 --.arj 01;31 --.taz 01;31 --.lha 01;31 --.lz4 01;31 --.lzh 01;31 --.lzma 01;31 --.tlz 01;31 --.txz 01;31 --.tzo 01;31 --.t7z 01;31 --.zip 01;31 --.z 01;31 --.dz 01;31 --.gz 01;31 --.lrz 01;31 --.lz 01;31 --.lzo 01;31 --.xz 01;31 --.zst 01;31 --.tzst 01;31 --.bz2 01;31 --.bz 01;31 --.tbz 01;31 --.tbz2 01;31 --.tz 01;31 --.deb 01;31 --.rpm 01;31 --.jar 01;31 --.war 01;31 --.ear 01;31 --.sar 01;31 --.rar 01;31 --.alz 01;31 --.ace 01;31 --.zoo 01;31 --.cpio 01;31 --.7z 01;31 --.rz 01;31 --.cab 01;31 --.wim 01;31 --.swm 01;31 --.dwm 01;31 --.esd 01;31 -+.tar 38;5;9 -+.tgz 38;5;9 -+.arc 38;5;9 -+.arj 38;5;9 -+.taz 38;5;9 -+.lha 38;5;9 -+.lz4 38;5;9 -+.lzh 38;5;9 -+.lzma 38;5;9 -+.tlz 38;5;9 -+.txz 38;5;9 -+.tzo 38;5;9 -+.t7z 38;5;9 -+.zip 38;5;9 -+.z 38;5;9 -+.dz 38;5;9 -+.gz 38;5;9 -+.lrz 38;5;9 -+.lz 38;5;9 -+.lzo 38;5;9 -+.xz 38;5;9 -+.zst 38;5;9 -+.tzst 38;5;9 -+.bz2 38;5;9 -+.bz 38;5;9 -+.tbz 38;5;9 -+.tbz2 38;5;9 -+.tz 38;5;9 -+.deb 38;5;9 -+.rpm 38;5;9 -+.jar 38;5;9 -+.war 38;5;9 -+.ear 38;5;9 -+.sar 38;5;9 -+.rar 38;5;9 -+.alz 38;5;9 -+.ace 38;5;9 -+.zoo 38;5;9 -+.cpio 38;5;9 -+.7z 38;5;9 -+.rz 38;5;9 -+.cab 38;5;9 -+.wim 38;5;9 -+.swm 38;5;9 -+.dwm 38;5;9 -+.esd 38;5;9 - - # image formats --.jpg 01;35 --.jpeg 01;35 --.mjpg 01;35 --.mjpeg 01;35 --.gif 01;35 --.bmp 01;35 --.pbm 01;35 --.pgm 01;35 --.ppm 01;35 --.tga 01;35 --.xbm 01;35 --.xpm 01;35 --.tif 01;35 --.tiff 01;35 --.png 01;35 --.svg 01;35 --.svgz 01;35 --.mng 01;35 --.pcx 01;35 --.mov 01;35 --.mpg 01;35 --.mpeg 01;35 --.m2v 01;35 --.mkv 01;35 --.webm 01;35 --.ogm 01;35 --.mp4 01;35 --.m4v 01;35 --.mp4v 01;35 --.vob 01;35 --.qt 01;35 --.nuv 01;35 --.wmv 01;35 --.asf 01;35 --.rm 01;35 --.rmvb 01;35 --.flc 01;35 --.avi 01;35 --.fli 01;35 --.flv 01;35 --.gl 01;35 --.dl 01;35 --.xcf 01;35 --.xwd 01;35 --.yuv 01;35 --.cgm 01;35 --.emf 01;35 -+.jpg 38;5;13 -+.jpeg 38;5;13 -+.mjpg 38;5;13 -+.mjpeg 38;5;13 -+.gif 38;5;13 -+.bmp 38;5;13 -+.pbm 38;5;13 -+.pgm 38;5;13 -+.ppm 38;5;13 -+.tga 38;5;13 -+.xbm 38;5;13 -+.xpm 38;5;13 -+.tif 38;5;13 -+.tiff 38;5;13 -+.png 38;5;13 -+.svg 38;5;13 -+.svgz 38;5;13 -+.mng 38;5;13 -+.pcx 38;5;13 -+.mov 38;5;13 -+.mpg 38;5;13 -+.mpeg 38;5;13 -+.m2v 38;5;13 -+.mkv 38;5;13 -+.webm 38;5;13 -+.ogm 38;5;13 -+.mp4 38;5;13 -+.m4v 38;5;13 -+.mp4v 38;5;13 -+.vob 38;5;13 -+.qt 38;5;13 -+.nuv 38;5;13 -+.wmv 38;5;13 -+.asf 38;5;13 -+.rm 38;5;13 -+.rmvb 38;5;13 -+.flc 38;5;13 -+.avi 38;5;13 -+.fli 38;5;13 -+.flv 38;5;13 -+.gl 38;5;13 -+.dl 38;5;13 -+.xcf 38;5;13 -+.xwd 38;5;13 -+.yuv 38;5;13 -+.cgm 38;5;13 -+.emf 38;5;13 - - # https://wiki.xiph.org/MIME_Types_and_File_Extensions --.ogv 01;35 --.ogx 01;35 -+.ogv 38;5;13 -+.ogx 38;5;13 - - # audio formats --.aac 00;36 --.au 00;36 --.flac 00;36 --.m4a 00;36 --.mid 00;36 --.midi 00;36 --.mka 00;36 --.mp3 00;36 --.mpc 00;36 --.ogg 00;36 --.ra 00;36 --.wav 00;36 -+.aac 38;5;45 -+.au 38;5;45 -+.flac 38;5;45 -+.m4a 38;5;45 -+.mid 38;5;45 -+.midi 38;5;45 -+.mka 38;5;45 -+.mp3 38;5;45 -+.mpc 38;5;45 -+.ogg 38;5;45 -+.ra 38;5;45 -+.wav 38;5;45 - - # https://wiki.xiph.org/MIME_Types_and_File_Extensions --.oga 00;36 --.opus 00;36 --.spx 00;36 --.xspf 00;36 -+.oga 38;5;45 -+.opus 38;5;45 -+.spx 38;5;45 -+.xspf 38;5;45 diff --git a/DIR_COLORS.lightbgcolor b/DIR_COLORS.lightbgcolor -index d2ea453..95d6879 100644 +index 4316832..6402854 100644 --- a/DIR_COLORS.lightbgcolor +++ b/DIR_COLORS.lightbgcolor @@ -1,3 +1,9 @@ @@ -477,207 +205,6 @@ index d2ea453..95d6879 100644 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. -@@ -85,105 +94,105 @@ EXEC 01;32 - #.csh 01;32 - - # archives or compressed (bright red) --.tar 01;31 --.tgz 01;31 --.arc 01;31 --.arj 01;31 --.taz 01;31 --.lha 01;31 --.lz4 01;31 --.lzh 01;31 --.lzma 01;31 --.tlz 01;31 --.txz 01;31 --.tzo 01;31 --.t7z 01;31 --.zip 01;31 --.z 01;31 --.dz 01;31 --.gz 01;31 --.lrz 01;31 --.lz 01;31 --.lzo 01;31 --.xz 01;31 --.zst 01;31 --.tzst 01;31 --.bz2 01;31 --.bz 01;31 --.tbz 01;31 --.tbz2 01;31 --.tz 01;31 --.deb 01;31 --.rpm 01;31 --.jar 01;31 --.war 01;31 --.ear 01;31 --.sar 01;31 --.rar 01;31 --.alz 01;31 --.ace 01;31 --.zoo 01;31 --.cpio 01;31 --.7z 01;31 --.rz 01;31 --.cab 01;31 --.wim 01;31 --.swm 01;31 --.dwm 01;31 --.esd 01;31 -+.tar 00;31 -+.tgz 00;31 -+.arc 00;31 -+.arj 00;31 -+.taz 00;31 -+.lha 00;31 -+.lz4 00;31 -+.lzh 00;31 -+.lzma 00;31 -+.tlz 00;31 -+.txz 00;31 -+.tzo 00;31 -+.t7z 00;31 -+.zip 00;31 -+.z 00;31 -+.dz 00;31 -+.gz 00;31 -+.lrz 00;31 -+.lz 00;31 -+.lzo 00;31 -+.xz 00;31 -+.zst 00;31 -+.tzst 00;31 -+.bz2 00;31 -+.bz 00;31 -+.tbz 00;31 -+.tbz2 00;31 -+.tz 00;31 -+.deb 00;31 -+.rpm 00;31 -+.jar 00;31 -+.war 00;31 -+.ear 00;31 -+.sar 00;31 -+.rar 00;31 -+.alz 00;31 -+.ace 00;31 -+.zoo 00;31 -+.cpio 00;31 -+.7z 00;31 -+.rz 00;31 -+.cab 00;31 -+.wim 00;31 -+.swm 00;31 -+.dwm 00;31 -+.esd 00;31 - - # image formats --.jpg 01;35 --.jpeg 01;35 --.mjpg 01;35 --.mjpeg 01;35 --.gif 01;35 --.bmp 01;35 --.pbm 01;35 --.pgm 01;35 --.ppm 01;35 --.tga 01;35 --.xbm 01;35 --.xpm 01;35 --.tif 01;35 --.tiff 01;35 --.png 01;35 --.svg 01;35 --.svgz 01;35 --.mng 01;35 --.pcx 01;35 --.mov 01;35 --.mpg 01;35 --.mpeg 01;35 --.m2v 01;35 --.mkv 01;35 --.webm 01;35 --.ogm 01;35 --.mp4 01;35 --.m4v 01;35 --.mp4v 01;35 --.vob 01;35 --.qt 01;35 --.nuv 01;35 --.wmv 01;35 --.asf 01;35 --.rm 01;35 --.rmvb 01;35 --.flc 01;35 --.avi 01;35 --.fli 01;35 --.flv 01;35 --.gl 01;35 --.dl 01;35 --.xcf 01;35 --.xwd 01;35 --.yuv 01;35 --.cgm 01;35 --.emf 01;35 -+.jpg 00;35 -+.jpeg 00;35 -+.mjpg 00;35 -+.mjpeg 00;35 -+.gif 00;35 -+.bmp 00;35 -+.pbm 00;35 -+.pgm 00;35 -+.ppm 00;35 -+.tga 00;35 -+.xbm 00;35 -+.xpm 00;35 -+.tif 00;35 -+.tiff 00;35 -+.png 00;35 -+.svg 00;35 -+.svgz 00;35 -+.mng 00;35 -+.pcx 00;35 -+.mov 00;35 -+.mpg 00;35 -+.mpeg 00;35 -+.m2v 00;35 -+.mkv 00;35 -+.webm 00;35 -+.ogm 00;35 -+.mp4 00;35 -+.m4v 00;35 -+.mp4v 00;35 -+.vob 00;35 -+.qt 00;35 -+.nuv 00;35 -+.wmv 00;35 -+.asf 00;35 -+.rm 00;35 -+.rmvb 00;35 -+.flc 00;35 -+.avi 00;35 -+.fli 00;35 -+.flv 00;35 -+.gl 00;35 -+.dl 00;35 -+.xcf 00;35 -+.xwd 00;35 -+.yuv 00;35 -+.cgm 00;35 -+.emf 00;35 - - # https://wiki.xiph.org/MIME_Types_and_File_Extensions --.ogv 01;35 --.ogx 01;35 -+.ogv 00;35 -+.ogx 00;35 - - # audio formats - .aac 00;36 -- -2.5.5 +2.21.1 diff --git a/coreutils.spec b/coreutils.spec index 7ff507a..33f5e74 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -20,7 +20,7 @@ Patch100: coreutils-8.26-test-lock.patch Patch105: coreutils-8.26-selinuxenable.patch # downstream changes to default DIR_COLORS -Patch102: coreutils-8.25-DIR_COLORS.patch +Patch102: coreutils-8.32-DIR_COLORS.patch #do display processor type for uname -p/-i based on uname(2) syscall Patch103: coreutils-8.2-uname-processortype.patch #df --direct @@ -122,8 +122,20 @@ including documentation and translations. %prep %autosetup -N -n %{name}-%{version}.90-cc4c -# will be modified by coreutils-8.25-DIR_COLORS.patch -tee DIR_COLORS{,.256color,.lightbgcolor} /dev/null +# will be further modified by coreutils-8.32-DIR_COLORS.patch +sed src/dircolors.hin \ + -e 's| 00;36$| 01;36|' \ + > DIR_COLORS +sed src/dircolors.hin \ + -e 's| 01;31$| 38;5;9|' \ + -e 's| 01;35$| 38;5;13|' \ + -e 's| 01;36$| 38;5;45|' \ + > DIR_COLORS.256color +sed src/dircolors.hin \ + -e 's| 01;31$| 00;31|' \ + -e 's| 01;35$| 00;35|' \ + > DIR_COLORS.lightbgcolor + # git add DIR_COLORS{,.256color,.lightbgcolor} # git commit -m "clone DIR_COLORS before patching" From 765ae080a97068b05c0894fd765ad7a1973df622 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 28 Feb 2020 15:39:02 +0100 Subject: [PATCH 17/22] adapt i18n patch for the new release --- coreutils-i18n.patch | 179 +++++++++++++++++++++---------------------- 1 file changed, 88 insertions(+), 91 deletions(-) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index e3428d9..4b8c9e5 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -893,7 +893,7 @@ index 98b461c..9990f38 100644 } putchar (eolchar); } -@@ -1099,20 +1345,43 @@ main (int argc, char **argv) +@@ -1098,20 +1344,43 @@ main (int argc, char **argv) case 't': { @@ -975,8 +975,8 @@ index 26f221f..633f50e 100644 #include "system.h" #include "die.h" #include "error.h" -@@ -324,6 +342,18 @@ - #include "xstrtol.h" +@@ -325,6 +343,18 @@ + #include "xstrtol-error.h" #include "xdectoint.h" +/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ @@ -994,7 +994,7 @@ index 26f221f..633f50e 100644 /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "pr" -@@ -416,7 +446,20 @@ struct COLUMN +@@ -417,7 +447,20 @@ struct COLUMN typedef struct COLUMN COLUMN; @@ -1016,7 +1016,7 @@ index 26f221f..633f50e 100644 static bool read_line (COLUMN *p); static bool print_page (void); static bool print_stored (COLUMN *p); -@@ -428,6 +471,7 @@ static void add_line_number (COLUMN *p); +@@ -429,6 +472,7 @@ static void add_line_number (COLUMN *p); static void getoptnum (const char *n_str, int min, int *num, const char *errfmt); static void getoptarg (char *arg, char switch_char, char *character, @@ -1024,7 +1024,7 @@ index 26f221f..633f50e 100644 int *number); static void print_files (int number_of_files, char **av); static void init_parameters (int number_of_files); -@@ -441,7 +485,6 @@ static void store_char (char c); +@@ -442,7 +486,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); @@ -1032,7 +1032,7 @@ index 26f221f..633f50e 100644 static void cleanup (void); static void print_sep_string (void); static void separator_string (const char *optarg_S); -@@ -453,7 +496,7 @@ static COLUMN *column_vector; +@@ -454,7 +497,7 @@ static COLUMN *column_vector; we store the leftmost columns contiguously in buff. To print a line from buff, get the index of the first character from line_vector[i], and print up to line_vector[i + 1]. */ @@ -1041,7 +1041,7 @@ index 26f221f..633f50e 100644 /* Index of the position in buff where the next character will be stored. */ -@@ -557,7 +600,7 @@ static int chars_per_column; +@@ -558,7 +601,7 @@ static int chars_per_column; static bool untabify_input = false; /* (-e) The input tab character. */ @@ -1050,7 +1050,7 @@ index 26f221f..633f50e 100644 /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ... where the leftmost column is 1. */ -@@ -567,7 +610,10 @@ static int chars_per_input_tab = 8; +@@ -568,7 +611,10 @@ static int chars_per_input_tab = 8; static bool tabify_output = false; /* (-i) The output tab character. */ @@ -1062,7 +1062,7 @@ index 26f221f..633f50e 100644 /* (-i) The width of the output tab. */ static int chars_per_output_tab = 8; -@@ -637,7 +683,13 @@ static int line_number; +@@ -638,7 +684,13 @@ static int line_number; static bool numbered_lines = false; /* (-n) Character which follows each line number. */ @@ -1077,7 +1077,7 @@ index 26f221f..633f50e 100644 /* (-n) line counting starts with 1st line of input file (not with 1st line of 1st page printed). */ -@@ -690,6 +742,7 @@ static bool use_col_separator = false; +@@ -691,6 +743,7 @@ static bool use_col_separator = false; -a|COLUMN|-m is a 'space' and with the -J option a 'tab'. */ static char const *col_sep_string = ""; static int col_sep_length = 0; @@ -1085,7 +1085,7 @@ index 26f221f..633f50e 100644 static char *column_separator = (char *) " "; static char *line_separator = (char *) "\t"; -@@ -851,6 +904,13 @@ separator_string (const char *optarg_S) +@@ -852,6 +905,13 @@ separator_string (const char *optarg_S) integer_overflow (); col_sep_length = len; col_sep_string = optarg_S; @@ -1099,7 +1099,7 @@ index 26f221f..633f50e 100644 } int -@@ -875,6 +935,21 @@ main (int argc, char **argv) +@@ -876,6 +936,21 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1121,7 +1121,7 @@ index 26f221f..633f50e 100644 n_files = 0; file_names = (argc > 1 ? xnmalloc (argc - 1, sizeof (char *)) -@@ -951,8 +1026,12 @@ main (int argc, char **argv) +@@ -952,8 +1027,12 @@ main (int argc, char **argv) break; case 'e': if (optarg) @@ -1136,7 +1136,7 @@ index 26f221f..633f50e 100644 /* Could check tab width > 0. */ untabify_input = true; break; -@@ -965,8 +1044,12 @@ main (int argc, char **argv) +@@ -966,8 +1045,12 @@ main (int argc, char **argv) break; case 'i': if (optarg) @@ -1151,7 +1151,7 @@ index 26f221f..633f50e 100644 /* Could check tab width > 0. */ tabify_output = true; break; -@@ -984,8 +1067,8 @@ main (int argc, char **argv) +@@ -985,8 +1068,8 @@ main (int argc, char **argv) case 'n': numbered_lines = true; if (optarg) @@ -1162,7 +1162,7 @@ index 26f221f..633f50e 100644 break; case 'N': skip_count = false; -@@ -1010,6 +1093,7 @@ main (int argc, char **argv) +@@ -1011,6 +1094,7 @@ main (int argc, char **argv) /* Reset an additional input of -s, -S dominates -s */ col_sep_string = ""; col_sep_length = 0; @@ -1170,7 +1170,7 @@ index 26f221f..633f50e 100644 use_col_separator = true; if (optarg) separator_string (optarg); -@@ -1165,10 +1249,45 @@ getoptnum (const char *n_str, int min, int *num, const char *err) +@@ -1166,10 +1250,45 @@ getoptnum (const char *n_str, int min, int *num, const char *err) a number. */ static void @@ -1218,7 +1218,7 @@ index 26f221f..633f50e 100644 if (*arg) { long int tmp_long; -@@ -1190,6 +1309,11 @@ static void +@@ -1191,6 +1310,11 @@ static void init_parameters (int number_of_files) { int chars_used_by_number = 0; @@ -1230,7 +1230,7 @@ index 26f221f..633f50e 100644 lines_per_body = lines_per_page - lines_per_header - lines_per_footer; if (lines_per_body <= 0) -@@ -1227,7 +1351,7 @@ init_parameters (int number_of_files) +@@ -1228,7 +1352,7 @@ init_parameters (int number_of_files) else col_sep_string = column_separator; @@ -1239,7 +1239,7 @@ index 26f221f..633f50e 100644 use_col_separator = true; } /* It's rather pointless to define a TAB separator with column -@@ -1257,11 +1381,11 @@ init_parameters (int number_of_files) +@@ -1258,11 +1382,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. */ @@ -1253,7 +1253,7 @@ index 26f221f..633f50e 100644 /* The number is part of the column width unless we are printing files in parallel. */ -@@ -1270,7 +1394,7 @@ init_parameters (int number_of_files) +@@ -1271,7 +1395,7 @@ init_parameters (int number_of_files) } int sep_chars, useful_chars; @@ -1262,7 +1262,7 @@ index 26f221f..633f50e 100644 sep_chars = INT_MAX; if (INT_SUBTRACT_WRAPV (chars_per_line - chars_used_by_number, sep_chars, &useful_chars)) -@@ -1293,7 +1417,7 @@ init_parameters (int number_of_files) +@@ -1294,7 +1418,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); @@ -1271,7 +1271,7 @@ index 26f221f..633f50e 100644 } /* Open the necessary files, -@@ -1399,7 +1523,7 @@ init_funcs (void) +@@ -1400,7 +1524,7 @@ init_funcs (void) /* Enlarge p->start_position of first column to use the same form of padding_not_printed with all columns. */ @@ -1280,7 +1280,7 @@ index 26f221f..633f50e 100644 /* This loop takes care of all but the rightmost column. */ -@@ -1433,7 +1557,7 @@ init_funcs (void) +@@ -1434,7 +1558,7 @@ init_funcs (void) } else { @@ -1289,7 +1289,7 @@ index 26f221f..633f50e 100644 h_next = h + chars_per_column; } } -@@ -1724,9 +1848,9 @@ static void +@@ -1725,9 +1849,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -1301,7 +1301,7 @@ index 26f221f..633f50e 100644 padding_not_printed = ANYWHERE; } -@@ -2001,13 +2125,13 @@ store_char (char c) +@@ -2002,13 +2126,13 @@ store_char (char c) /* May be too generous. */ buff = X2REALLOC (buff, &buff_allocated); } @@ -1317,7 +1317,7 @@ index 26f221f..633f50e 100644 char *s; int num_width; -@@ -2024,22 +2148,24 @@ add_line_number (COLUMN *p) +@@ -2025,22 +2149,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. */ @@ -1346,7 +1346,7 @@ index 26f221f..633f50e 100644 output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2198,7 +2324,7 @@ print_white_space (void) +@@ -2199,7 +2325,7 @@ print_white_space (void) while (goal - h_old > 1 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) { @@ -1355,7 +1355,7 @@ index 26f221f..633f50e 100644 h_old = h_new; } while (++h_old <= goal) -@@ -2218,6 +2344,7 @@ print_sep_string (void) +@@ -2219,6 +2345,7 @@ print_sep_string (void) { char const *s = col_sep_string; int l = col_sep_length; @@ -1363,7 +1363,7 @@ index 26f221f..633f50e 100644 if (separators_not_printed <= 0) { -@@ -2229,6 +2356,7 @@ print_sep_string (void) +@@ -2230,6 +2357,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -1371,7 +1371,7 @@ index 26f221f..633f50e 100644 while (l-- > 0) { /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2242,12 +2370,15 @@ print_sep_string (void) +@@ -2243,12 +2371,15 @@ print_sep_string (void) } else { @@ -1388,7 +1388,7 @@ index 26f221f..633f50e 100644 /* sep_string ends with some spaces */ if (spaces_not_printed > 0) print_white_space (); -@@ -2275,7 +2406,7 @@ print_clump (COLUMN *p, int n, char *clump) +@@ -2276,7 +2407,7 @@ print_clump (COLUMN *p, int n, char *clump) required number of tabs and spaces. */ static void @@ -1397,7 +1397,7 @@ index 26f221f..633f50e 100644 { if (tabify_output) { -@@ -2299,6 +2430,74 @@ print_char (char c) +@@ -2300,6 +2431,74 @@ print_char (char c) putchar (c); } @@ -1472,7 +1472,7 @@ index 26f221f..633f50e 100644 /* Skip to page PAGE before printing. PAGE may be larger than total number of pages. */ -@@ -2476,9 +2675,9 @@ read_line (COLUMN *p) +@@ -2477,9 +2676,9 @@ read_line (COLUMN *p) align_empty_cols = false; } @@ -1484,7 +1484,7 @@ index 26f221f..633f50e 100644 padding_not_printed = ANYWHERE; } -@@ -2547,7 +2746,7 @@ print_stored (COLUMN *p) +@@ -2548,7 +2747,7 @@ print_stored (COLUMN *p) COLUMN *q; int line = p->current_line++; @@ -1493,7 +1493,7 @@ index 26f221f..633f50e 100644 /* FIXME UMR: Uninitialized memory read: * This is occurring while in: -@@ -2559,7 +2758,7 @@ print_stored (COLUMN *p) +@@ -2560,7 +2759,7 @@ print_stored (COLUMN *p) xmalloc [xmalloc.c:94] init_store_cols [pr.c:1648] */ @@ -1502,7 +1502,7 @@ index 26f221f..633f50e 100644 pad_vertically = true; -@@ -2579,9 +2778,9 @@ print_stored (COLUMN *p) +@@ -2580,9 +2779,9 @@ print_stored (COLUMN *p) } } @@ -1514,7 +1514,7 @@ index 26f221f..633f50e 100644 padding_not_printed = ANYWHERE; } -@@ -2594,8 +2793,8 @@ print_stored (COLUMN *p) +@@ -2595,8 +2794,8 @@ print_stored (COLUMN *p) if (spaces_not_printed == 0) { output_position = p->start_position + end_vector[line]; @@ -1525,7 +1525,7 @@ index 26f221f..633f50e 100644 } return true; -@@ -2614,7 +2813,7 @@ print_stored (COLUMN *p) +@@ -2615,7 +2814,7 @@ print_stored (COLUMN *p) number of characters is 1.) */ static int @@ -1534,7 +1534,7 @@ index 26f221f..633f50e 100644 { unsigned char uc = c; char *s = clump_buff; -@@ -2624,10 +2823,10 @@ char_to_clump (char c) +@@ -2625,10 +2824,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8; @@ -1547,7 +1547,7 @@ index 26f221f..633f50e 100644 { width = TAB_WIDTH (chars_per_c, input_position); -@@ -2708,6 +2907,164 @@ char_to_clump (char c) +@@ -2709,6 +2908,164 @@ char_to_clump (char c) return chars; } @@ -1731,7 +1731,7 @@ index 6d2eec5..f189a0d 100644 #include "system.h" #include "argmatch.h" #include "die.h" -@@ -161,14 +169,39 @@ static int decimal_point; +@@ -157,14 +165,39 @@ static int decimal_point; /* Thousands separator; if -1, then there isn't one. */ static int thousands_sep; @@ -1772,7 +1772,7 @@ index 6d2eec5..f189a0d 100644 /* The kind of blanks for '-b' to skip in various options. */ enum blanktype { bl_start, bl_end, bl_both }; -@@ -342,13 +375,11 @@ static bool reverse; +@@ -338,13 +371,11 @@ static bool reverse; they were read if all keys compare equal. */ static bool stable; @@ -1789,7 +1789,7 @@ index 6d2eec5..f189a0d 100644 /* Flag to remove consecutive duplicate lines from the output. Only the last of a sequence of equal lines will be output. */ -@@ -806,6 +837,46 @@ reap_all (void) +@@ -802,6 +833,46 @@ reap_all (void) reap (-1); } @@ -1836,7 +1836,7 @@ index 6d2eec5..f189a0d 100644 /* Clean up any remaining temporary files. */ static void -@@ -1274,7 +1345,7 @@ zaptemp (char const *name) +@@ -1270,7 +1341,7 @@ zaptemp (char const *name) free (node); } @@ -1845,7 +1845,7 @@ index 6d2eec5..f189a0d 100644 static int struct_month_cmp (void const *m1, void const *m2) -@@ -1289,7 +1360,7 @@ struct_month_cmp (void const *m1, void const *m2) +@@ -1285,7 +1356,7 @@ struct_month_cmp (void const *m1, void const *m2) /* Initialize the character class tables. */ static void @@ -1854,7 +1854,7 @@ index 6d2eec5..f189a0d 100644 { size_t i; -@@ -1301,7 +1372,7 @@ inittables (void) +@@ -1297,7 +1368,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -1863,7 +1863,7 @@ index 6d2eec5..f189a0d 100644 /* If we're not in the "C" locale, read different names for months. */ if (hard_LC_TIME) { -@@ -1383,6 +1454,84 @@ specify_nmerge (int oi, char c, char const *s) +@@ -1379,6 +1450,84 @@ specify_nmerge (int oi, char c, char const *s) xstrtol_fatal (e, oi, c, long_options, s); } @@ -1948,7 +1948,7 @@ index 6d2eec5..f189a0d 100644 /* Specify the amount of main memory to use when sorting. */ static void specify_sort_size (int oi, char c, char const *s) -@@ -1614,7 +1763,7 @@ buffer_linelim (struct buffer const *buf) +@@ -1610,7 +1759,7 @@ buffer_linelim (struct buffer const *buf) by KEY in LINE. */ static char * @@ -1957,7 +1957,7 @@ index 6d2eec5..f189a0d 100644 { char *ptr = line->text, *lim = ptr + line->length - 1; size_t sword = key->sword; -@@ -1623,10 +1772,10 @@ begfield (struct line const *line, struct keyfield const *key) +@@ -1619,10 +1768,10 @@ begfield (struct line const *line, struct keyfield const *key) /* The leading field separator itself is included in a field when -t is absent. */ @@ -1970,7 +1970,7 @@ index 6d2eec5..f189a0d 100644 ++ptr; if (ptr < lim) ++ptr; -@@ -1652,11 +1801,70 @@ begfield (struct line const *line, struct keyfield const *key) +@@ -1648,11 +1797,70 @@ begfield (struct line const *line, struct keyfield const *key) return ptr; } @@ -2042,7 +2042,7 @@ index 6d2eec5..f189a0d 100644 { char *ptr = line->text, *lim = ptr + line->length - 1; size_t eword = key->eword, echar = key->echar; -@@ -1671,10 +1879,10 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1667,10 +1875,10 @@ limfield (struct line const *line, struct keyfield const *key) 'beginning' is the first character following the delimiting TAB. Otherwise, leave PTR pointing at the first 'blank' character after the preceding field. */ @@ -2055,7 +2055,7 @@ index 6d2eec5..f189a0d 100644 ++ptr; if (ptr < lim && (eword || echar)) ++ptr; -@@ -1720,10 +1928,10 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1716,10 +1924,10 @@ limfield (struct line const *line, struct keyfield const *key) */ /* Make LIM point to the end of (one byte past) the current field. */ @@ -2068,7 +2068,7 @@ index 6d2eec5..f189a0d 100644 if (newlim) lim = newlim; } -@@ -1754,6 +1962,130 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1750,6 +1958,130 @@ limfield (struct line const *line, struct keyfield const *key) return ptr; } @@ -2199,7 +2199,7 @@ index 6d2eec5..f189a0d 100644 /* 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 -@@ -1840,8 +2172,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) +@@ -1836,8 +2168,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) else { if (key->skipsblanks) @@ -2224,7 +2224,7 @@ index 6d2eec5..f189a0d 100644 line->keybeg = line_start; } } -@@ -1991,7 +2337,7 @@ human_numcompare (char const *a, char const *b) +@@ -1987,7 +2333,7 @@ human_numcompare (char const *a, char const *b) hideously fast. */ static int @@ -2233,7 +2233,7 @@ index 6d2eec5..f189a0d 100644 { while (blanks[to_uchar (*a)]) a++; -@@ -2001,6 +2347,25 @@ numcompare (char const *a, char const *b) +@@ -1997,6 +2343,25 @@ numcompare (char const *a, char const *b) return strnumcmp (a, b, decimal_point, thousands_sep); } @@ -2259,7 +2259,7 @@ index 6d2eec5..f189a0d 100644 /* Work around a problem whereby the long double value returned by glibc's strtold ("NaN", ...) contains uninitialized bits: clear all bytes of A and B before calling strtold. FIXME: remove this function if -@@ -2051,7 +2416,7 @@ general_numcompare (char const *sa, char const *sb) +@@ -2047,7 +2412,7 @@ general_numcompare (char const *sa, char const *sb) Return 0 if the name in S is not recognized. */ static int @@ -2268,7 +2268,7 @@ index 6d2eec5..f189a0d 100644 { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -2327,15 +2692,14 @@ debug_key (struct line const *line, struct keyfield const *key) +@@ -2323,15 +2688,14 @@ debug_key (struct line const *line, struct keyfield const *key) char saved = *lim; *lim = '\0'; @@ -2286,7 +2286,7 @@ index 6d2eec5..f189a0d 100644 else if (key->general_numeric) ignore_value (strtold (beg, &tighter_lim)); else if (key->numeric || key->human_numeric) -@@ -2469,7 +2833,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2465,7 +2829,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) /* Warn about significant leading blanks. */ bool implicit_skip = key_numeric (key) || key->month; bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */ @@ -2295,7 +2295,7 @@ index 6d2eec5..f189a0d 100644 && ((!key->skipsblanks && !implicit_skip) || (!key->skipsblanks && key->schar) || (!key->skipeblanks && key->echar))) -@@ -2527,11 +2891,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2523,11 +2887,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) error (0, 0, _("option '-r' only applies to last-resort comparison")); } @@ -2384,7 +2384,7 @@ index 6d2eec5..f189a0d 100644 { struct keyfield *key = keylist; -@@ -2616,7 +3056,7 @@ keycompare (struct line const *a, struct line const *b) +@@ -2612,7 +3052,7 @@ keycompare (struct line const *a, struct line const *b) else if (key->human_numeric) diff = human_numcompare (ta, tb); else if (key->month) @@ -2393,7 +2393,7 @@ index 6d2eec5..f189a0d 100644 else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2732,6 +3172,211 @@ keycompare (struct line const *a, struct line const *b) +@@ -2728,6 +3168,211 @@ keycompare (struct line const *a, struct line const *b) return key->reverse ? -diff : diff; } @@ -2605,7 +2605,7 @@ index 6d2eec5..f189a0d 100644 /* Compare two lines A and B, returning negative, zero, or positive depending on whether A compares less than, equal to, or greater than B. */ -@@ -2759,7 +3404,7 @@ compare (struct line const *a, struct line const *b) +@@ -2755,7 +3400,7 @@ compare (struct line const *a, struct line const *b) diff = - NONZERO (blen); else if (blen == 0) diff = 1; @@ -2614,7 +2614,7 @@ index 6d2eec5..f189a0d 100644 { /* xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4149,6 +4794,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) +@@ -4145,6 +4790,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) break; case 'f': key->translate = fold_toupper; @@ -2622,7 +2622,7 @@ index 6d2eec5..f189a0d 100644 break; case 'g': key->general_numeric = true; -@@ -4228,7 +4874,7 @@ main (int argc, char **argv) +@@ -4224,7 +4870,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -2631,7 +2631,7 @@ index 6d2eec5..f189a0d 100644 hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4249,6 +4895,29 @@ main (int argc, char **argv) +@@ -4245,6 +4891,29 @@ main (int argc, char **argv) thousands_sep = -1; } @@ -2661,7 +2661,7 @@ index 6d2eec5..f189a0d 100644 have_read_stdin = false; inittables (); -@@ -4523,13 +5192,34 @@ main (int argc, char **argv) +@@ -4519,13 +5188,34 @@ main (int argc, char **argv) case 't': { @@ -2700,7 +2700,7 @@ index 6d2eec5..f189a0d 100644 else { /* Provoke with 'sort -txx'. Complain about -@@ -4540,9 +5230,11 @@ main (int argc, char **argv) +@@ -4536,9 +5226,11 @@ main (int argc, char **argv) quote (optarg)); } } @@ -2714,7 +2714,7 @@ index 6d2eec5..f189a0d 100644 } break; -@@ -4771,12 +5463,10 @@ main (int argc, char **argv) +@@ -4767,12 +5459,10 @@ main (int argc, char **argv) sort (files, nfiles, outfile, nthreads); } @@ -2749,9 +2749,9 @@ index 87a0c93..9f755d9 100644 #include "system.h" #include "argmatch.h" #include "linebuffer.h" -@@ -32,9 +43,21 @@ +@@ -30,9 +41,21 @@ + #include "posixver.h" #include "stdio--.h" - #include "xmemcoll.h" #include "xstrtol.h" -#include "memcasecmp.h" +#include "xmemcoll.h" @@ -2772,7 +2772,7 @@ index 87a0c93..9f755d9 100644 /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "uniq" -@@ -144,6 +167,10 @@ enum +@@ -139,6 +162,10 @@ enum GROUP_OPTION = CHAR_MAX + 1 }; @@ -2783,7 +2783,7 @@ index 87a0c93..9f755d9 100644 static struct option const longopts[] = { {"count", no_argument, NULL, 'c'}, -@@ -260,7 +287,7 @@ size_opt (char const *opt, char const *msgid) +@@ -253,7 +280,7 @@ size_opt (char const *opt, char const *msgid) return a pointer to the beginning of the line's field to be compared. */ static char * _GL_ATTRIBUTE_PURE @@ -2792,7 +2792,7 @@ index 87a0c93..9f755d9 100644 { size_t count; char const *lp = line->buffer; -@@ -280,6 +307,83 @@ find_field (struct linebuffer const *line) +@@ -273,6 +300,83 @@ find_field (struct linebuffer const *line) return line->buffer + i; } @@ -2876,7 +2876,7 @@ index 87a0c93..9f755d9 100644 /* Return false if two strings OLD and NEW match, true if not. OLD and NEW point not to the beginnings of the lines but rather to the beginnings of the fields to compare. -@@ -288,6 +392,8 @@ find_field (struct linebuffer const *line) +@@ -281,17 +385,113 @@ find_field (struct linebuffer const *line) static bool different (char *old, char *new, size_t oldlen, size_t newlen) { @@ -2885,12 +2885,11 @@ index 87a0c93..9f755d9 100644 if (check_chars < oldlen) oldlen = check_chars; if (check_chars < newlen) -@@ -295,15 +401,104 @@ different (char *old, char *new, size_t oldlen, size_t newlen) + newlen = check_chars; if (ignore_case) - { -- /* FIXME: This should invoke strcoll somehow. */ -- return oldlen != newlen || memcasecmp (old, new, oldlen); +- return oldlen != newlen || memcasecmp (old, new, oldlen); ++ { + size_t i; + + copy_old = xmalloc (oldlen + 1); @@ -2905,9 +2904,7 @@ index 87a0c93..9f755d9 100644 + free (copy_old); + free (copy_new); + return rc; - } -- else if (hard_LC_COLLATE) -- return xmemcoll (old, oldlen, new, newlen) != 0; ++ } else - return oldlen != newlen || memcmp (old, new, oldlen); + { @@ -2995,7 +2992,7 @@ index 87a0c93..9f755d9 100644 /* 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. -@@ -367,19 +562,38 @@ check_file (const char *infile, const char *outfile, char delimiter) +@@ -355,19 +555,38 @@ check_file (const char *infile, const char *outfile, char delimiter) char *prevfield IF_LINT ( = NULL); size_t prevlen IF_LINT ( = 0); bool first_group_printed = false; @@ -3034,7 +3031,7 @@ index 87a0c93..9f755d9 100644 new_group = (prevline->length == 0 || different (thisfield, prevfield, thislen, prevlen)); -@@ -397,6 +611,10 @@ check_file (const char *infile, const char *outfile, char delimiter) +@@ -385,6 +604,10 @@ check_file (const char *infile, const char *outfile, char delimiter) SWAP_LINES (prevline, thisline); prevfield = thisfield; prevlen = thislen; @@ -3045,7 +3042,7 @@ index 87a0c93..9f755d9 100644 first_group_printed = true; } } -@@ -409,17 +627,26 @@ check_file (const char *infile, const char *outfile, char delimiter) +@@ -397,17 +620,26 @@ check_file (const char *infile, const char *outfile, char delimiter) size_t prevlen; uintmax_t match_count = 0; bool first_delimiter = true; @@ -3072,7 +3069,7 @@ index 87a0c93..9f755d9 100644 if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) { if (ferror (stdin)) -@@ -428,6 +655,14 @@ check_file (const char *infile, const char *outfile, char delimiter) +@@ -416,6 +648,14 @@ check_file (const char *infile, const char *outfile, char delimiter) } thisfield = find_field (thisline); thislen = thisline->length - 1 - (thisfield - thisline->buffer); @@ -3087,7 +3084,7 @@ index 87a0c93..9f755d9 100644 match = !different (thisfield, prevfield, thislen, prevlen); match_count += match; -@@ -460,6 +695,9 @@ check_file (const char *infile, const char *outfile, char delimiter) +@@ -448,6 +688,9 @@ check_file (const char *infile, const char *outfile, char delimiter) SWAP_LINES (prevline, thisline); prevfield = thisfield; prevlen = thislen; @@ -3097,7 +3094,7 @@ index 87a0c93..9f755d9 100644 if (!match) match_count = 0; } -@@ -506,6 +744,19 @@ main (int argc, char **argv) +@@ -493,6 +736,19 @@ main (int argc, char **argv) atexit (close_stdout); @@ -3156,7 +3153,7 @@ diff --git a/tests/local.mk b/tests/local.mk index 568944e..192f776 100644 --- a/tests/local.mk +++ b/tests/local.mk -@@ -368,6 +368,8 @@ all_tests = \ +@@ -369,6 +369,8 @@ all_tests = \ tests/misc/sort-discrim.sh \ tests/misc/sort-files0-from.pl \ tests/misc/sort-float.sh \ From 4b130ffaeb4ee4fd4a243e6f12f112d7a9ea64e9 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 3 Mar 2020 10:39:25 +0100 Subject: [PATCH 18/22] new snapshot available: coreutils-8.31.99-f2034 --- coreutils.spec | 4 ++-- sources | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/coreutils.spec b/coreutils.spec index 33f5e74..c30309c 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.31 -Release: 9999.1%{?dist} +Release: 9999.2%{?dist} License: GPLv3+ Url: https://www.gnu.org/software/coreutils/ Source0: https://pixelbeat.org/cu/coreutils-ss.tar.xz @@ -120,7 +120,7 @@ Optional though recommended components, including documentation and translations. %prep -%autosetup -N -n %{name}-%{version}.90-cc4c +%autosetup -N -n %{name}-%{version}.99-f2034 # will be further modified by coreutils-8.32-DIR_COLORS.patch sed src/dircolors.hin \ diff --git a/sources b/sources index fe20d7d..5d48f9e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (coreutils-ss.tar.xz) = 3c244a62d37b0cb8e50f560b261142557cb219e8f14c556dc68c8be64d5555461d1c007cfe57f53ae7ae35bc04f86707c71283764d0dd41d76e05b8dab8d254b +SHA512 (coreutils-ss.tar.xz) = 06f5ad3bb3e1fedd2cb37b26a094e9dcebe7c9efb4d8d15b82fc1bdab67b03cec3e216359def73a599cf66ccb5fab7fa8927b164037d36f2ee38d1b82cf53824 From 5bf61ea6974b4150c722e166e01739498834b8ea Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 11 Apr 2022 13:58:53 +0200 Subject: [PATCH 19/22] new snapshot available: coreutils-9.0.193-54bec --- coreutils-4.5.3-langinfo.patch | 20 - coreutils-8.2-uname-processortype.patch | 41 +- coreutils-8.32-DIR_COLORS.patch | 160 +- coreutils-8.4-mkdir-modenote.patch | 2 +- coreutils-9.0-autofs-no-mount.patch | 87 + coreutils-9.0-chmod-symlink.patch | 114 + coreutils-colorls.csh | 5 - coreutils-colorls.sh | 4 - coreutils-df-direct.patch | 43 +- coreutils-getgrouplist.patch | 6 +- coreutils-i18n-cut-old.patch | 565 ----- coreutils-i18n-expand-unexpand.patch | 848 ------- coreutils-i18n-fix-unexpand.patch | 28 - coreutils-i18n-fix2-expand-unexpand.patch | 108 - coreutils-i18n-fold-newline.patch | 80 - coreutils-i18n-sort-human.patch | 35 - coreutils-i18n-un-expand-BOM.patch | 456 ---- coreutils-i18n.patch | 2496 ++++++++++++++++++--- coreutils-keyring.gpg | 312 +++ coreutils-selinux.patch | 76 +- coreutils-ss.tar.xz.sig | 26 +- coreutils.spec | 77 +- rh_i18n_wip.tar.gz | Bin 28954 -> 0 bytes sources | 2 +- upstream-key.gpg | 123 - 25 files changed, 2824 insertions(+), 2890 deletions(-) delete mode 100644 coreutils-4.5.3-langinfo.patch create mode 100644 coreutils-9.0-autofs-no-mount.patch create mode 100644 coreutils-9.0-chmod-symlink.patch delete mode 100644 coreutils-i18n-cut-old.patch delete mode 100644 coreutils-i18n-expand-unexpand.patch delete mode 100644 coreutils-i18n-fix-unexpand.patch delete mode 100644 coreutils-i18n-fix2-expand-unexpand.patch delete mode 100644 coreutils-i18n-fold-newline.patch delete mode 100644 coreutils-i18n-sort-human.patch delete mode 100644 coreutils-i18n-un-expand-BOM.patch create mode 100644 coreutils-keyring.gpg delete mode 100644 rh_i18n_wip.tar.gz delete mode 100644 upstream-key.gpg diff --git a/coreutils-4.5.3-langinfo.patch b/coreutils-4.5.3-langinfo.patch deleted file mode 100644 index a8af3bd..0000000 --- a/coreutils-4.5.3-langinfo.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/src/date.c b/src/date.c -index ddb011e..619a72b 100644 ---- a/src/date.c -+++ b/src/date.c -@@ -490,14 +490,7 @@ main (int argc, char **argv) - format = DATE_FMT_LANGINFO (); - if (! *format) - { -- /* Do not wrap the following literal format string with _(...). -- For example, suppose LC_ALL is unset, LC_TIME=POSIX, -- and LANG="ko_KR". In that case, POSIX says that LC_TIME -- determines the format and contents of date and time strings -- written by date, which means "date" must generate output -- using the POSIX locale; but adding _() would cause "date" -- to use a Korean translation of the format. */ -- format = "%a %b %e %H:%M:%S %Z %Y"; -+ format = dcgettext(NULL, N_("%a %b %e %H:%M:%S %Z %Y"), LC_TIME); - } - } - diff --git a/coreutils-8.2-uname-processortype.patch b/coreutils-8.2-uname-processortype.patch index ed01ab8..44c57f5 100644 --- a/coreutils-8.2-uname-processortype.patch +++ b/coreutils-8.2-uname-processortype.patch @@ -1,29 +1,24 @@ + src/uname.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + diff --git a/src/uname.c b/src/uname.c index 6371ca2..1ad8fd7 100644 --- a/src/uname.c +++ b/src/uname.c -@@ -300,13 +300,19 @@ main (int argc, char **argv) - - if (toprint & PRINT_PROCESSOR) - { -- char const *element = unknown; -+ char *element = unknown; - #if HAVE_SYSINFO && defined SI_ARCHITECTURE - { - static char processor[257]; - if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) - element = processor; - } +@@ -322,6 +322,12 @@ main (int argc, char **argv) + # elif defined __ppc__ || defined __ppc64__ + element = "powerpc"; + # endif +#else + { -+ static struct utsname u; -+ uname(&u); -+ element = u.machine; ++ static struct utsname u; ++ uname(&u); ++ element = u.machine; + } #endif - #ifdef UNAME_PROCESSOR + #if HAVE_SYSINFO && defined SI_ARCHITECTURE if (element == unknown) -@@ -344,7 +350,7 @@ main (int argc, char **argv) +@@ -347,7 +353,7 @@ main (int argc, char **argv) if (toprint & PRINT_HARDWARE_PLATFORM) { @@ -32,17 +27,17 @@ index 6371ca2..1ad8fd7 100644 #if HAVE_SYSINFO && defined SI_PLATFORM { static char hardware_platform[257]; -@@ -352,6 +358,14 @@ main (int argc, char **argv) +@@ -355,6 +361,14 @@ main (int argc, char **argv) hardware_platform, sizeof hardware_platform)) element = hardware_platform; } +#else + { -+ static struct utsname u; -+ uname(&u); -+ element = u.machine; -+ if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6') -+ element[1]='3'; ++ static struct utsname u; ++ uname(&u); ++ element = u.machine; ++ if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6') ++ element[1]='3'; + } #endif #ifdef UNAME_HARDWARE_PLATFORM diff --git a/coreutils-8.32-DIR_COLORS.patch b/coreutils-8.32-DIR_COLORS.patch index 61a3db3..3a0375d 100644 --- a/coreutils-8.32-DIR_COLORS.patch +++ b/coreutils-8.32-DIR_COLORS.patch @@ -1,16 +1,15 @@ -From 81e25c8521937ecf7f444bab11fddaaf81cc3efd Mon Sep 17 00:00:00 2001 +From c7b13f5e1a7ad012c510a8bdd5a8943ab4b55833 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 17 Jun 2016 16:58:18 +0200 Subject: [PATCH] downstream changes to default DIR_COLORS --- - DIR_COLORS | 9 ++++- - DIR_COLORS.256color | 78 ++++++++++++++++++++--------------------- - DIR_COLORS.lightbgcolor | 21 +++++++---- - 3 files changed, 61 insertions(+), 47 deletions(-) + DIR_COLORS | 9 ++++++++- + DIR_COLORS.lightbgcolor | 21 +++++++++++++++------ + 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/DIR_COLORS b/DIR_COLORS -index bd5df23..84f2417 100644 +index b465771..ad42b09 100644 --- a/DIR_COLORS +++ b/DIR_COLORS @@ -1,3 +1,7 @@ @@ -21,17 +20,17 @@ index bd5df23..84f2417 100644 # Configuration file for dircolors, a utility to help you set the # LS_COLORS environment variable used by GNU ls with the --color option. -@@ -8,6 +12,9 @@ - # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the - # slackware version of dircolors) are recognized but ignored. +@@ -10,6 +14,9 @@ + + # Global config options can be specified before TERM or COLORTERM entries +# For compatibility, the pattern "^COLOR.*none" is recognized as a way to +# disable colorization. See https://bugzilla.redhat.com/1349579 for details. + - # Below are TERM entries, which can be a glob patterns, to match - # against the TERM environment variable to determine if it is colorizable. - TERM Eterm -@@ -58,7 +65,7 @@ DOOR 01;35 # door + # Below are TERM or COLORTERM entries, which can be glob patterns, which + # restrict following config to systems with matching environment variables. + COLORTERM ?* +@@ -62,7 +69,7 @@ DOOR 01;35 # door BLK 40;33;01 # block device driver CHR 40;33;01 # character device driver ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ... @@ -39,118 +38,9 @@ index bd5df23..84f2417 100644 +MISSING 01;37;41 # ... and the files they point to SETUID 37;41 # file that is setuid (u+s) SETGID 30;43 # file that is setgid (g+s) - CAPABILITY 30;41 # file with capability -diff --git a/DIR_COLORS.256color b/DIR_COLORS.256color -index 85bd28d..7f6d4c8 100644 ---- a/DIR_COLORS.256color -+++ b/DIR_COLORS.256color -@@ -1,3 +1,9 @@ -+# Configuration file for the 256color ls utility -+ -+# This file goes in the /etc directory, and must be world readable. -+# You can copy this file to .dir_colors in your $HOME directory to override -+# the system defaults. -+ - # Configuration file for dircolors, a utility to help you set the - # LS_COLORS environment variable used by GNU ls with the --color option. - -@@ -8,32 +14,13 @@ - # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the - # slackware version of dircolors) are recognized but ignored. - -+# For compatibility, the pattern "^COLOR.*none" is recognized as a way to -+# disable colorization. See https://bugzilla.redhat.com/1349579 for details. -+ - # Below are TERM entries, which can be a glob patterns, to match - # against the TERM environment variable to determine if it is colorizable. --TERM Eterm --TERM ansi --TERM *color* --TERM con[0-9]*x[0-9]* --TERM cons25 --TERM console --TERM cygwin --TERM dtterm --TERM gnome --TERM hurd --TERM jfbterm --TERM konsole --TERM kterm --TERM linux --TERM linux-c --TERM mlterm --TERM putty --TERM rxvt* --TERM screen* --TERM st --TERM terminator --TERM tmux* --TERM vt100 --TERM xterm* -+TERM *256color* -+TERM rxvt-unicode256 - - # Below are the color init strings for the basic file types. - # One can use codes for 256 or more colors supported by modern terminals. -@@ -45,29 +32,40 @@ TERM xterm* - # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white - # Background color codes: - # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white -+# Text color(256 colors mode) codes: -+# Valid syntax for text 256color is 38;5; , where color number -+# is number between 0 and 255. -+# You may find following command useful to search the best one for you: -+# for ((x=0; x<=255; x++));do echo -e "${x}:\033[38;5;${x}mcolor\033[000m";done -+# Background color(256 colors mode) codes: -+# Valid syntax for background 256color is 48;5; , where -+# color number is number between 0 and 255. -+# You may find following command useful to search the best one for you: -+# for ((x=0; x<=255; x++));do echo -e "${x}:\033[48;5;${x}mcolor\033[000m";done -+ - #NORMAL 00 # no color code at all - #FILE 00 # regular file: use no color at all - RESET 0 # reset to "normal" color --DIR 01;34 # directory --LINK 01;36 # symbolic link. (If you set this to 'target' instead of a -+DIR 38;5;33 # directory -+LINK 38;5;51 # symbolic link. (If you set this to 'target' instead of a - # numerical value, the color is as for the file pointed to.) - MULTIHARDLINK 00 # regular file with more than one link --FIFO 40;33 # pipe --SOCK 01;35 # socket --DOOR 01;35 # door --BLK 40;33;01 # block device driver --CHR 40;33;01 # character device driver --ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ... --MISSING 00 # ... and the files they point to --SETUID 37;41 # file that is setuid (u+s) --SETGID 30;43 # file that is setgid (g+s) --CAPABILITY 30;41 # file with capability --STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w) --OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky --STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable -+FIFO 40;38;5;11 # pipe -+SOCK 38;5;13 # socket -+DOOR 38;5;5 # door -+BLK 48;5;232;38;5;11 # block device driver -+CHR 48;5;232;38;5;3 # character device driver -+ORPHAN 48;5;232;38;5;9 # symlink to nonexistent file, or non-stat'able file ... -+MISSING 01;37;41 # ... and the files they point to -+SETUID 48;5;196;38;5;15 # file that is setuid (u+s) -+SETGID 48;5;11;38;5;16 # file that is setgid (g+s) -+CAPABILITY 48;5;196;38;5;226 # file with capability -+STICKY_OTHER_WRITABLE 48;5;10;38;5;16 # dir that is sticky and other-writable (+t,o+w) -+OTHER_WRITABLE 48;5;10;38;5;21 # dir that is other-writable (o+w) and not sticky -+STICKY 48;5;21;38;5;15 # dir with the sticky bit set (+t) and not other-writable - - # This is for files with execute permission: --EXEC 01;32 -+EXEC 38;5;40 - - # List any file extensions like '.gz' or '.tar' that you would like ls - # to colorize below. Put the extension, a space, and the color init string. + CAPABILITY 00 # file with capability (very expensive to lookup) diff --git a/DIR_COLORS.lightbgcolor b/DIR_COLORS.lightbgcolor -index 4316832..6402854 100644 +index eab6258..1627b63 100644 --- a/DIR_COLORS.lightbgcolor +++ b/DIR_COLORS.lightbgcolor @@ -1,3 +1,9 @@ @@ -163,17 +53,17 @@ index 4316832..6402854 100644 # Configuration file for dircolors, a utility to help you set the # LS_COLORS environment variable used by GNU ls with the --color option. -@@ -8,6 +14,9 @@ - # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the - # slackware version of dircolors) are recognized but ignored. +@@ -10,6 +16,9 @@ + + # Global config options can be specified before TERM or COLORTERM entries +# For compatibility, the pattern "^COLOR.*none" is recognized as a way to +# disable colorization. See https://bugzilla.redhat.com/1349579 for details. + - # Below are TERM entries, which can be a glob patterns, to match - # against the TERM environment variable to determine if it is colorizable. - TERM Eterm -@@ -48,17 +57,17 @@ TERM xterm* + # Below are TERM or COLORTERM entries, which can be glob patterns, which + # restrict following config to systems with matching environment variables. + COLORTERM ?* +@@ -52,17 +61,17 @@ TERM xterm* #NORMAL 00 # no color code at all #FILE 00 # regular file: use no color at all RESET 0 # reset to "normal" color @@ -195,8 +85,8 @@ index 4316832..6402854 100644 +MISSING 01;37;41 # ... and the files they point to SETUID 37;41 # file that is setuid (u+s) SETGID 30;43 # file that is setgid (g+s) - CAPABILITY 30;41 # file with capability -@@ -67,7 +76,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky + CAPABILITY 00 # file with capability (very expensive to lookup) +@@ -71,7 +80,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable # This is for files with execute permission: @@ -204,7 +94,7 @@ index 4316832..6402854 100644 +EXEC 00;32 # List any file extensions like '.gz' or '.tar' that you would like ls - # to colorize below. Put the extension, a space, and the color init string. + # to color below. Put the extension, a space, and the color init string. -- -2.21.1 +2.34.1 diff --git a/coreutils-8.4-mkdir-modenote.patch b/coreutils-8.4-mkdir-modenote.patch index 51a129e..3973d44 100644 --- a/coreutils-8.4-mkdir-modenote.patch +++ b/coreutils-8.4-mkdir-modenote.patch @@ -2,7 +2,7 @@ diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 400e135..47e4480 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi -@@ -10074,6 +10074,8 @@ incorrect. @xref{Directory Setuid and Setgid}, for how the +@@ -10829,6 +10829,8 @@ incorrect. @xref{Directory Setuid and Setgid}, for how the set-user-ID and set-group-ID bits of directories are inherited unless overridden in this way. diff --git a/coreutils-9.0-autofs-no-mount.patch b/coreutils-9.0-autofs-no-mount.patch new file mode 100644 index 0000000..b6d6523 --- /dev/null +++ b/coreutils-9.0-autofs-no-mount.patch @@ -0,0 +1,87 @@ +From f4422844dbcd839ce486bcbc15b7bd5b72c9198d Mon Sep 17 00:00:00 2001 +From: Rohan Sable +Date: Mon, 7 Mar 2022 14:14:13 +0000 +Subject: [PATCH 1/2] ls: avoid triggering automounts + +statx() has different defaults wrt automounting +compared to stat() or lstat(), so explicitly +set the AT_NO_AUTOMOUNT flag to suppress that behavior, +and avoid unintended operations or potential errors. + +* src/ls.c (do_statx): Pass AT_NO_AUTOMOUNT to avoid this behavior. +Fixes https://bugs.gnu.org/54286 + +Signed-off-by: Rohan Sable + +Upstream-commit: 85c975df2c25bd799370b04bb294e568e001102f +Signed-off-by: Kamil Dudka +--- + src/ls.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ls.c b/src/ls.c +index 1047801..fe0e9f8 100644 +--- a/src/ls.c ++++ b/src/ls.c +@@ -1175,7 +1175,7 @@ do_statx (int fd, char const *name, struct stat *st, int flags, + { + struct statx stx; + bool want_btime = mask & STATX_BTIME; +- int ret = statx (fd, name, flags, mask, &stx); ++ int ret = statx (fd, name, flags | AT_NO_AUTOMOUNT, mask, &stx); + if (ret >= 0) + { + statx_to_stat (&stx, st); +-- +2.34.1 + + +From 3d227f9e4f3fe806064721e4b9451ee06526bc80 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Mon, 7 Mar 2022 23:29:20 +0000 +Subject: [PATCH 2/2] stat: only automount with --cached=never + +Revert to the default behavior before the introduction of statx(). + +* src/stat.c (do_stat): Set AT_NO_AUTOMOUNT without --cached=never. +* doc/coreutils.texi (stat invocation): Mention the automount +behavior with --cached=never. + +Fixes https://bugs.gnu.org/54287 + +Upstream-commit: 92cb8427c537f37edd43c5cef1909585201372ab +Signed-off-by: Kamil Dudka +--- + doc/coreutils.texi | 1 + + src/stat.c | 3 +++ + 2 files changed, 4 insertions(+) + +diff --git a/doc/coreutils.texi b/doc/coreutils.texi +index 19b535c..0f5c16a 100644 +--- a/doc/coreutils.texi ++++ b/doc/coreutils.texi +@@ -12564,6 +12564,7 @@ Always read the already cached attributes if available. + + @item never + Always sychronize with the latest file system attributes. ++This also mounts automounted files. + + @item default + Leave the caching behavior to the underlying file system. +diff --git a/src/stat.c b/src/stat.c +index 0c34501..803340a 100644 +--- a/src/stat.c ++++ b/src/stat.c +@@ -1381,6 +1381,9 @@ do_stat (char const *filename, char const *format, char const *format2) + else if (force_sync) + flags |= AT_STATX_FORCE_SYNC; + ++ if (! force_sync) ++ flags |= AT_NO_AUTOMOUNT; ++ + fd = statx (fd, pathname, flags, format_to_mask (format), &stx); + if (fd < 0) + { +-- +2.34.1 + diff --git a/coreutils-9.0-chmod-symlink.patch b/coreutils-9.0-chmod-symlink.patch new file mode 100644 index 0000000..fad3b7a --- /dev/null +++ b/coreutils-9.0-chmod-symlink.patch @@ -0,0 +1,114 @@ +From c76e70637e529481478e26683ebd73c40621c382 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Fri, 24 Sep 2021 20:57:41 +0100 +Subject: [PATCH] chmod: fix exit status when ignoring symlinks + +* src/chmod.c: Reorder enum so CH_NOT_APPLIED +can be treated as a non error. +* tests/chmod/ignore-symlink.sh: A new test. +* tests/local.mk: Reference the new test. +* NEWS: Mention the bug fix. +Fixes https://bugs.gnu.org/50784 + +Upstream-commit: e8b56ebd536e82b15542a00c888109471936bfda +Signed-off-by: Kamil Dudka +--- + NEWS | 6 ++++++ + src/chmod.c | 4 ++-- + tests/chmod/ignore-symlink.sh | 31 +++++++++++++++++++++++++++++++ + tests/local.mk | 1 + + 4 files changed, 40 insertions(+), 2 deletions(-) + create mode 100755 tests/chmod/ignore-symlink.sh + +diff --git a/NEWS b/NEWS +index f2fbcbb..5722a8b 100644 +--- a/NEWS ++++ b/NEWS +@@ -143,6 +143,12 @@ GNU coreutils NEWS -*- outline -*- + where avx2 instructions are supported. + A new --debug option will indicate if avx2 is being used. + ++** Bug fixes ++ ++ chmod -R no longer exits with error status when encountering symlinks. ++ All files would be processed correctly, but the exit status was incorrect. ++ [bug introduced in coreutils-9.0] ++ + + * Noteworthy changes in release 8.32 (2020-03-05) [stable] + +diff --git a/src/chmod.c b/src/chmod.c +index 37b04f5..57ac47f 100644 +--- a/src/chmod.c ++++ b/src/chmod.c +@@ -44,8 +44,8 @@ struct change_status + enum + { + CH_NO_STAT, +- CH_NOT_APPLIED, + CH_FAILED, ++ CH_NOT_APPLIED, + CH_NO_CHANGE_REQUESTED, + CH_SUCCEEDED + } +@@ -322,7 +322,7 @@ process_file (FTS *fts, FTSENT *ent) + if ( ! recurse) + fts_set (fts, ent, FTS_SKIP); + +- return CH_NO_CHANGE_REQUESTED <= ch.status; ++ return CH_NOT_APPLIED <= ch.status; + } + + /* Recursively change the modes of the specified FILES (the last entry +diff --git a/tests/chmod/ignore-symlink.sh b/tests/chmod/ignore-symlink.sh +new file mode 100755 +index 0000000..5ce3de8 +--- /dev/null ++++ b/tests/chmod/ignore-symlink.sh +@@ -0,0 +1,31 @@ ++#!/bin/sh ++# Test for proper exit code of chmod on a processed symlink. ++ ++# Copyright (C) 2021 Free Software Foundation, Inc. ++ ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ chmod ++ ++mkdir dir || framework_failure_ ++touch dir/f || framework_failure_ ++ln -s f dir/l || framework_failure_ ++ ++# This operation ignores symlinks but should succeed. ++chmod u+w -R dir 2> out || fail=1 ++ ++compare /dev/null out || fail=1 ++ ++Exit $fail +diff --git a/tests/local.mk b/tests/local.mk +index a76c808..a2164c9 100644 +--- a/tests/local.mk ++++ b/tests/local.mk +@@ -458,6 +458,7 @@ all_tests = \ + tests/chmod/c-option.sh \ + tests/chmod/equal-x.sh \ + tests/chmod/equals.sh \ ++ tests/chmod/ignore-symlink.sh \ + tests/chmod/inaccessible.sh \ + tests/chmod/octal.sh \ + tests/chmod/setgid.sh \ +-- +2.31.1 + diff --git a/coreutils-colorls.csh b/coreutils-colorls.csh index f631762..66ec2fa 100755 --- a/coreutils-colorls.csh +++ b/coreutils-colorls.csh @@ -15,11 +15,6 @@ alias l. 'ls -d .*' set COLORS=/etc/DIR_COLORS if ($?TERM) then - if ( -e "/etc/DIR_COLORS.256color" ) then - if ( "`/usr/bin/tput colors`" == "256" ) then - set COLORS=/etc/DIR_COLORS.256color - endif - endif if ( -e "/etc/DIR_COLORS.$TERM" ) then set COLORS="/etc/DIR_COLORS.$TERM" endif diff --git a/coreutils-colorls.sh b/coreutils-colorls.sh index ac92268..5162f1e 100755 --- a/coreutils-colorls.sh +++ b/coreutils-colorls.sh @@ -22,10 +22,6 @@ if [ -z "$USER_LS_COLORS" ]; then [ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.$TERM" ] && \ COLORS="/etc/DIR_COLORS.$TERM" - [ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.256color" ] && \ - [ "x`/usr/bin/tty -s && /usr/bin/tput colors 2>/dev/null`" = "x256" ] && \ - COLORS="/etc/DIR_COLORS.256color" - [ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS" ] && \ COLORS="/etc/DIR_COLORS" diff --git a/coreutils-df-direct.patch b/coreutils-df-direct.patch index 248a6ae..2571fa4 100644 --- a/coreutils-df-direct.patch +++ b/coreutils-df-direct.patch @@ -1,8 +1,20 @@ +From 6e36198f10a2f63b89c89ebb5d5c185b20fb3a63 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Mon, 29 Mar 2010 17:20:34 +0000 +Subject: [PATCH] coreutils-df-direct.patch + +--- + doc/coreutils.texi | 7 ++++++ + src/df.c | 34 ++++++++++++++++++++++++++-- + tests/df/direct.sh | 55 ++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 94 insertions(+), 2 deletions(-) + create mode 100755 tests/df/direct.sh + diff --git a/doc/coreutils.texi b/doc/coreutils.texi -index a507280..400e135 100644 +index 5b9a597..6810c15 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi -@@ -11303,6 +11303,13 @@ some systems (notably SunOS), doing this yields more up to date results, +@@ -12074,6 +12074,13 @@ some systems (notably Solaris), doing this yields more up to date results, but in general this option makes @command{df} much slower, especially when there are many or very busy file systems. @@ -15,12 +27,12 @@ index a507280..400e135 100644 + @item --total @opindex --total - @cindex grand total of disk size, usage and available space + @cindex grand total of file system size, usage and available space diff --git a/src/df.c b/src/df.c -index 8f760db..a7385fd 100644 +index 48025b9..c8efa5b 100644 --- a/src/df.c +++ b/src/df.c -@@ -120,6 +120,9 @@ static bool print_type; +@@ -125,6 +125,9 @@ static bool print_type; /* If true, print a grand total at the end. */ static bool print_grand_total; @@ -30,7 +42,7 @@ index 8f760db..a7385fd 100644 /* Grand total data. */ static struct fs_usage grand_fsu; -@@ -247,13 +250,15 @@ enum +@@ -252,13 +255,15 @@ enum NO_SYNC_OPTION = CHAR_MAX + 1, SYNC_OPTION, TOTAL_OPTION, @@ -47,7 +59,7 @@ index 8f760db..a7385fd 100644 {"inodes", no_argument, NULL, 'i'}, {"human-readable", no_argument, NULL, 'h'}, {"si", no_argument, NULL, 'H'}, -@@ -509,7 +514,10 @@ get_header (void) +@@ -583,7 +588,10 @@ get_header (void) for (col = 0; col < ncolumns; col++) { char *cell = NULL; @@ -59,7 +71,7 @@ index 8f760db..a7385fd 100644 if (columns[col]->field == SIZE_FIELD && (header_mode == DEFAULT_MODE -@@ -1397,6 +1405,19 @@ get_point (const char *point, const struct stat *statp) +@@ -1486,6 +1494,17 @@ get_point (char const *point, const struct stat *statp) static void get_entry (char const *name, struct stat const *statp) { @@ -68,18 +80,16 @@ index 8f760db..a7385fd 100644 + char *resolved = canonicalize_file_name (name); + if (resolved) + { -+ char *mp = find_mount_point (name, statp); -+ get_dev (NULL, mp, resolved, NULL, NULL, false, false, NULL, false); -+ free(mp); ++ get_dev (NULL, resolved, name, NULL, NULL, false, false, NULL, false); + free (resolved); + return; + } + } + if ((S_ISBLK (statp->st_mode) || S_ISCHR (statp->st_mode)) - && get_disk (name)) + && get_device (name)) return; -@@ -1467,6 +1488,7 @@ or all file systems by default.\n\ +@@ -1556,6 +1575,7 @@ 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\ @@ -87,7 +97,7 @@ index 8f760db..a7385fd 100644 -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); -@@ -1557,6 +1579,9 @@ main (int argc, char **argv) +@@ -1646,6 +1666,9 @@ main (int argc, char **argv) xstrtol_fatal (e, oi, c, long_options, optarg); } break; @@ -97,7 +107,7 @@ index 8f760db..a7385fd 100644 case 'i': if (header_mode == OUTPUT_MODE) { -@@ -1653,6 +1678,13 @@ main (int argc, char **argv) +@@ -1742,6 +1765,13 @@ main (int argc, char **argv) } } @@ -172,3 +182,6 @@ index 0000000..8e4cfb8 +compare file_out file_exp || fail=1 + +Exit $fail +-- +2.31.1 + diff --git a/coreutils-getgrouplist.patch b/coreutils-getgrouplist.patch index 5349337..93eef67 100644 --- a/coreutils-getgrouplist.patch +++ b/coreutils-getgrouplist.patch @@ -29,7 +29,7 @@ index 76474c2..0a9d221 100644 #include "xalloc-oversized.h" /* Work around an incompatibility of OS X 10.11: getgrouplist -@@ -121,9 +122,17 @@ mgetgroups (char const *username, gid_t gid, gid_t **groups) +@@ -119,9 +120,17 @@ mgetgroups (char const *username, gid_t gid, gid_t **groups) /* else no username, so fall through and use getgroups. */ #endif @@ -50,7 +50,7 @@ index 76474c2..0a9d221 100644 /* If we failed to count groups because there is no supplemental group support, then return an array containing just GID. -@@ -145,10 +154,25 @@ mgetgroups (char const *username, gid_t gid, gid_t **groups) +@@ -143,10 +152,25 @@ mgetgroups (char const *username, gid_t gid, gid_t **groups) if (g == NULL) return -1; @@ -84,7 +84,7 @@ diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4 index 62777c7..5180243 100644 --- a/m4/jm-macros.m4 +++ b/m4/jm-macros.m4 -@@ -82,6 +82,7 @@ AC_DEFUN([coreutils_MACROS], +@@ -68,6 +68,7 @@ AC_DEFUN([coreutils_MACROS], fchown fchmod ftruncate diff --git a/coreutils-i18n-cut-old.patch b/coreutils-i18n-cut-old.patch deleted file mode 100644 index 757ee0f..0000000 --- a/coreutils-i18n-cut-old.patch +++ /dev/null @@ -1,565 +0,0 @@ -diff --git a/src/cut.c b/src/cut.c -index 7ab6be4..022d0ad 100644 ---- a/src/cut.c -+++ b/src/cut.c -@@ -28,6 +28,11 @@ - #include - #include - #include -+ -+/* Get mbstate_t, mbrtowc(). */ -+#if HAVE_WCHAR_H -+# include -+#endif - #include "system.h" - - #include "error.h" -@@ -38,6 +43,18 @@ - - #include "set-fields.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 -+ - /* The official name of this program (e.g., no 'g' prefix). */ - #define PROGRAM_NAME "cut" - -@@ -54,6 +71,52 @@ - } \ - while (0) - -+/* Refill the buffer BUF to get a multibyte character. */ -+#define REFILL_BUFFER(BUF, BUFPOS, BUFLEN, STREAM) \ -+ do \ -+ { \ -+ if (BUFLEN < MB_LEN_MAX && !feof (STREAM) && !ferror (STREAM)) \ -+ { \ -+ memmove (BUF, BUFPOS, BUFLEN); \ -+ BUFLEN += fread (BUF + BUFLEN, sizeof(char), BUFSIZ, STREAM); \ -+ BUFPOS = BUF; \ -+ } \ -+ } \ -+ while (0) -+ -+/* Get wide character on BUFPOS. BUFPOS is not included after that. -+ If byte sequence is not valid as a character, CONVFAIL is true. Otherwise false. */ -+#define GET_NEXT_WC_FROM_BUFFER(WC, BUFPOS, BUFLEN, MBLENGTH, STATE, CONVFAIL) \ -+ do \ -+ { \ -+ mbstate_t state_bak; \ -+ \ -+ if (BUFLEN < 1) \ -+ { \ -+ WC = WEOF; \ -+ break; \ -+ } \ -+ \ -+ /* Get a wide character. */ \ -+ CONVFAIL = false; \ -+ state_bak = STATE; \ -+ MBLENGTH = mbrtowc ((wchar_t *)&WC, BUFPOS, BUFLEN, &STATE); \ -+ \ -+ switch (MBLENGTH) \ -+ { \ -+ case (size_t)-1: \ -+ case (size_t)-2: \ -+ CONVFAIL = true; \ -+ STATE = state_bak; \ -+ /* Fall througn. */ \ -+ \ -+ case 0: \ -+ MBLENGTH = 1; \ -+ break; \ -+ } \ -+ } \ -+ while (0) -+ - - /* Pointer inside RP. When checking if a byte or field is selected - by a finite range, we check if it is between CURRENT_RP.LO -@@ -61,6 +124,9 @@ - CURRENT_RP.HI then we make CURRENT_RP to point to the next range pair. */ - static struct field_range_pair *current_rp; - -+/* Length of the delimiter given as argument to -d. */ -+size_t delimlen; -+ - /* This buffer is used to support the semantics of the -s option - (or lack of same) when the specified field list includes (does - not include) the first field. In both of those cases, the entire -@@ -77,15 +143,25 @@ enum operating_mode - { - undefined_mode, - -- /* Output characters that are in the given bytes. */ -+ /* Output bytes that are at the given positions. */ - byte_mode, - -+ /* Output characters that are at the given positions. */ -+ character_mode, -+ - /* Output the given delimiter-separated fields. */ - field_mode - }; - - static enum operating_mode operating_mode; - -+/* If nonzero, when in byte mode, don't split multibyte characters. */ -+static int byte_mode_character_aware; -+ -+/* If nonzero, the function for single byte locale is work -+ if this program runs on multibyte locale. */ -+static int force_singlebyte_mode; -+ - /* If true do not output lines containing no delimiter characters. - Otherwise, all such lines are printed. This option is valid only - with field mode. */ -@@ -97,6 +173,9 @@ static bool complement; - - /* The delimiter character for field mode. */ - static unsigned char delim; -+#if HAVE_WCHAR_H -+static wchar_t wcdelim; -+#endif - - /* The delimiter for each line/record. */ - static unsigned char line_delim = '\n'; -@@ -164,7 +243,7 @@ Print selected parts of lines from each FILE to standard output.\n\ - -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\ -- -n (ignored)\n\ -+ -n with -b: don't split multibyte characters\n\ - "), stdout); - fputs (_("\ - --complement complement the set of selected bytes, characters\n\ -@@ -280,6 +359,82 @@ cut_bytes (FILE *stream) - } - } - -+#if HAVE_MBRTOWC -+/* This function is in use for the following case. -+ -+ 1. Read from the stream STREAM, printing to standard output any selected -+ characters. -+ -+ 2. Read from stream STREAM, printing to standard output any selected bytes, -+ without splitting multibyte characters. */ -+ -+static void -+cut_characters_or_cut_bytes_no_split (FILE *stream) -+{ -+ uintmax_t idx; /* number of bytes or characters in the line so far. */ -+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ -+ char *bufpos; /* Next read position of BUF. */ -+ size_t buflen; /* The length of the byte sequence in buf. */ -+ wint_t wc; /* A gotten wide character. */ -+ size_t mblength; /* The byte size of a multibyte character which shows -+ as same character as WC. */ -+ mbstate_t state; /* State of the stream. */ -+ bool convfail = false; /* true, when conversion failed. Otherwise false. */ -+ /* Whether to begin printing delimiters between ranges for the current line. -+ Set after we've begun printing data corresponding to the first range. */ -+ bool print_delimiter = false; -+ -+ idx = 0; -+ buflen = 0; -+ bufpos = buf; -+ memset (&state, '\0', sizeof(mbstate_t)); -+ -+ current_rp = frp; -+ -+ while (1) -+ { -+ REFILL_BUFFER (buf, bufpos, buflen, stream); -+ -+ GET_NEXT_WC_FROM_BUFFER (wc, bufpos, buflen, mblength, state, convfail); -+ (void) convfail; /* ignore unused */ -+ -+ if (wc == WEOF) -+ { -+ if (idx > 0) -+ putchar (line_delim); -+ break; -+ } -+ else if (wc == line_delim) -+ { -+ putchar (line_delim); -+ idx = 0; -+ print_delimiter = false; -+ current_rp = frp; -+ } -+ else -+ { -+ next_item (&idx); -+ if (print_kth (idx)) -+ { -+ if (output_delimiter_specified) -+ { -+ if (print_delimiter && is_range_start_index (idx)) -+ { -+ fwrite (output_delimiter_string, sizeof (char), -+ output_delimiter_length, stdout); -+ } -+ print_delimiter = true; -+ } -+ fwrite (bufpos, mblength, sizeof(char), stdout); -+ } -+ } -+ -+ buflen -= mblength; -+ bufpos += mblength; -+ } -+} -+#endif -+ - /* Read from stream STREAM, printing to standard output any selected fields. */ - - static void -@@ -425,13 +580,211 @@ cut_fields (FILE *stream) - } - } - -+#if HAVE_MBRTOWC -+static void -+cut_fields_mb (FILE *stream) -+{ -+ int c; -+ uintmax_t field_idx; -+ int found_any_selected_field; -+ int buffer_first_field; -+ int empty_input; -+ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ -+ char *bufpos; /* Next read position of BUF. */ -+ size_t buflen; /* The length of the byte sequence in buf. */ -+ wint_t wc = 0; /* A gotten wide character. */ -+ size_t mblength; /* The byte size of a multibyte character which shows -+ as same character as WC. */ -+ mbstate_t state; /* State of the stream. */ -+ bool convfail = false; /* true, when conversion failed. Otherwise false. */ -+ -+ current_rp = frp; -+ -+ found_any_selected_field = 0; -+ field_idx = 1; -+ bufpos = buf; -+ buflen = 0; -+ memset (&state, '\0', sizeof(mbstate_t)); -+ -+ c = getc (stream); -+ empty_input = (c == EOF); -+ if (c != EOF) -+ { -+ ungetc (c, stream); -+ wc = 0; -+ } -+ else -+ wc = WEOF; -+ -+ /* To support the semantics of the -s flag, we may have to buffer -+ all of the first field to determine whether it is `delimited.' -+ But that is unnecessary if all non-delimited lines must be printed -+ and the first field has been selected, or if non-delimited lines -+ must be suppressed and the first field has *not* been selected. -+ That is because a non-delimited line has exactly one field. */ -+ buffer_first_field = (suppress_non_delimited ^ !print_kth (1)); -+ -+ while (1) -+ { -+ if (field_idx == 1 && buffer_first_field) -+ { -+ int len = 0; -+ -+ while (1) -+ { -+ REFILL_BUFFER (buf, bufpos, buflen, stream); -+ -+ GET_NEXT_WC_FROM_BUFFER -+ (wc, bufpos, buflen, mblength, state, convfail); -+ -+ if (wc == WEOF) -+ break; -+ -+ field_1_buffer = xrealloc (field_1_buffer, len + mblength); -+ memcpy (field_1_buffer + len, bufpos, mblength); -+ len += mblength; -+ buflen -= mblength; -+ bufpos += mblength; -+ -+ if (!convfail && (wc == line_delim || wc == wcdelim)) -+ break; -+ } -+ -+ if (len <= 0 && wc == WEOF) -+ break; -+ -+ /* If the first field extends to the end of line (it is not -+ delimited) and we are printing all non-delimited lines, -+ print this one. */ -+ if (convfail || (!convfail && wc != wcdelim)) -+ { -+ if (suppress_non_delimited) -+ { -+ /* Empty. */ -+ } -+ else -+ { -+ fwrite (field_1_buffer, sizeof (char), len, stdout); -+ /* Make sure the output line is newline terminated. */ -+ if (convfail || (!convfail && wc != line_delim)) -+ putchar (line_delim); -+ } -+ continue; -+ } -+ -+ if (print_kth (1)) -+ { -+ /* Print the field, but not the trailing delimiter. */ -+ fwrite (field_1_buffer, sizeof (char), len - 1, stdout); -+ found_any_selected_field = 1; -+ } -+ next_item (&field_idx); -+ } -+ -+ if (wc != WEOF) -+ { -+ if (print_kth (field_idx)) -+ { -+ if (found_any_selected_field) -+ { -+ fwrite (output_delimiter_string, sizeof (char), -+ output_delimiter_length, stdout); -+ } -+ found_any_selected_field = 1; -+ } -+ -+ while (1) -+ { -+ REFILL_BUFFER (buf, bufpos, buflen, stream); -+ -+ GET_NEXT_WC_FROM_BUFFER -+ (wc, bufpos, buflen, mblength, state, convfail); -+ -+ if (wc == WEOF) -+ break; -+ else if (!convfail && (wc == wcdelim || wc == line_delim)) -+ { -+ buflen -= mblength; -+ bufpos += mblength; -+ break; -+ } -+ -+ if (print_kth (field_idx)) -+ fwrite (bufpos, mblength, sizeof(char), stdout); -+ -+ buflen -= mblength; -+ bufpos += mblength; -+ } -+ } -+ -+ if ((!convfail || wc == line_delim) && buflen < 1) -+ wc = WEOF; -+ -+ if (!convfail && wc == wcdelim) -+ next_item (&field_idx); -+ else if (wc == WEOF || (!convfail && wc == line_delim)) -+ { -+ if (found_any_selected_field -+ || (!empty_input && !(suppress_non_delimited && field_idx == 1))) -+ putchar (line_delim); -+ if (wc == WEOF) -+ break; -+ field_idx = 1; -+ current_rp = frp; -+ found_any_selected_field = 0; -+ } -+ } -+} -+#endif -+ - static void - cut_stream (FILE *stream) - { -- if (operating_mode == byte_mode) -- cut_bytes (stream); -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1 && !force_singlebyte_mode) -+ { -+ switch (operating_mode) -+ { -+ case byte_mode: -+ if (byte_mode_character_aware) -+ cut_characters_or_cut_bytes_no_split (stream); -+ else -+ cut_bytes (stream); -+ break; -+ -+ case character_mode: -+ cut_characters_or_cut_bytes_no_split (stream); -+ break; -+ -+ case field_mode: -+ if (delimlen == 1) -+ { -+ /* 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: -+ abort (); -+ } -+ } - else -- cut_fields (stream); -+#endif -+ { -+ if (operating_mode == field_mode) -+ cut_fields (stream); -+ else -+ cut_bytes (stream); -+ } - } - - /* Process file FILE to standard output. -@@ -483,6 +836,7 @@ main (int argc, char **argv) - bool ok; - bool delim_specified = false; - char *spec_list_string IF_LINT ( = NULL); -+ char mbdelim[MB_LEN_MAX + 1]; - - initialize_main (&argc, &argv); - set_program_name (argv[0]); -@@ -505,7 +859,6 @@ main (int argc, char **argv) - switch (optc) - { - case 'b': -- case 'c': - /* Build the byte list. */ - if (operating_mode != undefined_mode) - FATAL_ERROR (_("only one type of list may be specified")); -@@ -513,6 +866,14 @@ main (int argc, char **argv) - spec_list_string = optarg; - break; - -+ case 'c': -+ /* Build the character list. */ -+ if (operating_mode != undefined_mode) -+ FATAL_ERROR (_("only one type of list may be specified")); -+ operating_mode = character_mode; -+ spec_list_string = optarg; -+ break; -+ - case 'f': - /* Build the field list. */ - if (operating_mode != undefined_mode) -@@ -524,10 +885,38 @@ main (int argc, char **argv) - case 'd': - /* New delimiter. */ - /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ -- if (optarg[0] != '\0' && optarg[1] != '\0') -- FATAL_ERROR (_("the delimiter must be a single character")); -- delim = optarg[0]; -- delim_specified = true; -+ { -+#if HAVE_MBRTOWC -+ if(MB_CUR_MAX > 1) -+ { -+ mbstate_t state; -+ -+ memset (&state, '\0', sizeof(mbstate_t)); -+ delimlen = mbrtowc (&wcdelim, optarg, strnlen(optarg, MB_LEN_MAX), &state); -+ -+ if (delimlen == (size_t)-1 || delimlen == (size_t)-2) -+ ++force_singlebyte_mode; -+ else -+ { -+ delimlen = (delimlen < 1) ? 1 : delimlen; -+ if (wcdelim != L'\0' && *(optarg + delimlen) != '\0') -+ FATAL_ERROR (_("the delimiter must be a single character")); -+ memcpy (mbdelim, optarg, delimlen); -+ mbdelim[delimlen] = '\0'; -+ if (delimlen == 1) -+ delim = *optarg; -+ } -+ } -+ -+ if (MB_CUR_MAX <= 1 || force_singlebyte_mode) -+#endif -+ { -+ if (optarg[0] != '\0' && optarg[1] != '\0') -+ FATAL_ERROR (_("the delimiter must be a single character")); -+ delim = (unsigned char) optarg[0]; -+ } -+ delim_specified = true; -+ } - break; - - case OUTPUT_DELIMITER_OPTION: -@@ -540,6 +929,7 @@ main (int argc, char **argv) - break; - - case 'n': -+ byte_mode_character_aware = 1; - break; - - case 's': -@@ -579,15 +969,34 @@ main (int argc, char **argv) - | (complement ? SETFLD_COMPLEMENT : 0) ); - - if (!delim_specified) -- delim = '\t'; -+ { -+ delim = '\t'; -+#ifdef HAVE_MBRTOWC -+ wcdelim = L'\t'; -+ mbdelim[0] = '\t'; -+ mbdelim[1] = '\0'; -+ delimlen = 1; -+#endif -+ } - - if (output_delimiter_string == NULL) - { -- static char dummy[2]; -- dummy[0] = delim; -- dummy[1] = '\0'; -- output_delimiter_string = dummy; -- output_delimiter_length = 1; -+#ifdef HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1 && !force_singlebyte_mode) -+ { -+ output_delimiter_string = xstrdup(mbdelim); -+ output_delimiter_length = delimlen; -+ } -+ -+ if (MB_CUR_MAX <= 1 || force_singlebyte_mode) -+#endif -+ { -+ static char dummy[2]; -+ dummy[0] = delim; -+ dummy[1] = '\0'; -+ output_delimiter_string = dummy; -+ output_delimiter_length = 1; -+ } - } - - if (optind == argc) diff --git a/coreutils-i18n-expand-unexpand.patch b/coreutils-i18n-expand-unexpand.patch deleted file mode 100644 index b5f571f..0000000 --- a/coreutils-i18n-expand-unexpand.patch +++ /dev/null @@ -1,848 +0,0 @@ -From e87ab5b991b08092a7e07af82b3ec822a8604151 Mon Sep 17 00:00:00 2001 -From: Ondrej Oprala -Date: Wed, 5 Aug 2015 09:15:09 +0200 -Subject: [PATCH] expand,unexpand: add multibyte support -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -* NEWS: Mention the changes. -* bootstrap.conf: Add mbfile to the list of modules. -* configure.ac: Properly initialize mbfile. -* src/expand.c (expand): Iterate over multibyte characters properly. -* src/unexpand.c (unexpand): Iterate over multibyte characters -properly. -* tests/local.mk: Add new tests. -* tests/{expand,unexpand}/mb.sh: New tests. - -Co-authored-by: Pádraig Brady ---- - bootstrap.conf | 1 + - configure.ac | 2 + - lib/mbfile.c | 3 + - lib/mbfile.h | 255 +++++++++++++++++++++++++++++++++++++++++++++++++++ - m4/mbfile.m4 | 14 +++ - src/expand.c | 43 +++++---- - src/unexpand.c | 54 +++++++---- - tests/expand/mb.sh | 98 ++++++++++++++++++++ - tests/local.mk | 2 + - tests/unexpand/mb.sh | 97 ++++++++++++++++++++ - 10 files changed, 535 insertions(+), 34 deletions(-) - create mode 100644 lib/mbfile.c - create mode 100644 lib/mbfile.h - create mode 100644 m4/mbfile.m4 - create mode 100755 tests/expand/mb.sh - create mode 100755 tests/unexpand/mb.sh - -diff --git a/bootstrap.conf b/bootstrap.conf -index 8a0ff31..a1c78b2 100644 ---- a/bootstrap.conf -+++ b/bootstrap.conf -@@ -152,6 +152,7 @@ gnulib_modules=" - maintainer-makefile - malloc-gnu - manywarnings -+ mbfile - mbrlen - mbrtowc - mbsalign -diff --git a/configure.ac b/configure.ac -index 1e74b36..24c9725 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -427,6 +427,8 @@ fi - # I'm leaving it here for now. This whole thing needs to be modernized... - gl_WINSIZE_IN_PTEM - -+gl_MBFILE -+ - gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H - - if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \ -diff --git a/lib/mbfile.c b/lib/mbfile.c -new file mode 100644 -index 0000000..b0a468e ---- /dev/null -+++ b/lib/mbfile.c -@@ -0,0 +1,3 @@ -+#include -+#define MBFILE_INLINE _GL_EXTERN_INLINE -+#include "mbfile.h" -diff --git a/lib/mbfile.h b/lib/mbfile.h -new file mode 100644 -index 0000000..11f1b12 ---- /dev/null -+++ b/lib/mbfile.h -@@ -0,0 +1,255 @@ -+/* Multibyte character I/O: macros for multi-byte encodings. -+ Copyright (C) 2001, 2005, 2009-2015 Free Software Foundation, Inc. -+ -+ This program is free software: you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see . */ -+ -+/* Written by Mitsuru Chinen -+ and Bruno Haible . */ -+ -+/* The macros in this file implement multi-byte character input from a -+ stream. -+ -+ mb_file_t -+ is the type for multibyte character input stream, usable for variable -+ declarations. -+ -+ mbf_char_t -+ is the type for multibyte character or EOF, usable for variable -+ declarations. -+ -+ mbf_init (mbf, stream) -+ initializes the MB_FILE for reading from stream. -+ -+ mbf_getc (mbc, mbf) -+ reads the next multibyte character from mbf and stores it in mbc. -+ -+ mb_iseof (mbc) -+ returns true if mbc represents the EOF value. -+ -+ Here are the function prototypes of the macros. -+ -+ extern void mbf_init (mb_file_t mbf, FILE *stream); -+ extern void mbf_getc (mbf_char_t mbc, mb_file_t mbf); -+ extern bool mb_iseof (const mbf_char_t mbc); -+ */ -+ -+#ifndef _MBFILE_H -+#define _MBFILE_H 1 -+ -+#include -+#include -+#include -+#include -+ -+/* Tru64 with Desktop Toolkit C has a bug: must be included before -+ . -+ BSD/OS 4.1 has a bug: and must be included before -+ . */ -+#include -+#include -+#include -+ -+#include "mbchar.h" -+ -+#ifndef _GL_INLINE_HEADER_BEGIN -+ #error "Please include config.h first." -+#endif -+_GL_INLINE_HEADER_BEGIN -+#ifndef MBFILE_INLINE -+# define MBFILE_INLINE _GL_INLINE -+#endif -+ -+struct mbfile_multi { -+ FILE *fp; -+ bool eof_seen; -+ bool have_pushback; -+ mbstate_t state; -+ unsigned int bufcount; -+ char buf[MBCHAR_BUF_SIZE]; -+ struct mbchar pushback; -+}; -+ -+MBFILE_INLINE void -+mbfile_multi_getc (struct mbchar *mbc, struct mbfile_multi *mbf) -+{ -+ size_t bytes; -+ -+ /* If EOF has already been seen, don't use getc. This matters if -+ mbf->fp is connected to an interactive tty. */ -+ if (mbf->eof_seen) -+ goto eof; -+ -+ /* Return character pushed back, if there is one. */ -+ if (mbf->have_pushback) -+ { -+ mb_copy (mbc, &mbf->pushback); -+ mbf->have_pushback = false; -+ return; -+ } -+ -+ /* Before using mbrtowc, we need at least one byte. */ -+ if (mbf->bufcount == 0) -+ { -+ int c = getc (mbf->fp); -+ if (c == EOF) -+ { -+ mbf->eof_seen = true; -+ goto eof; -+ } -+ mbf->buf[0] = (unsigned char) c; -+ mbf->bufcount++; -+ } -+ -+ /* Handle most ASCII characters quickly, without calling mbrtowc(). */ -+ if (mbf->bufcount == 1 && mbsinit (&mbf->state) && is_basic (mbf->buf[0])) -+ { -+ /* These characters are part of the basic character set. ISO C 99 -+ guarantees that their wide character code is identical to their -+ char code. */ -+ mbc->wc = mbc->buf[0] = mbf->buf[0]; -+ mbc->wc_valid = true; -+ mbc->ptr = &mbc->buf[0]; -+ mbc->bytes = 1; -+ mbf->bufcount = 0; -+ return; -+ } -+ -+ /* Use mbrtowc on an increasing number of bytes. Read only as many bytes -+ from mbf->fp as needed. This is needed to give reasonable interactive -+ behaviour when mbf->fp is connected to an interactive tty. */ -+ for (;;) -+ { -+ /* We don't know whether the 'mbrtowc' function updates the state when -+ it returns -2, - this is the ISO C 99 and glibc-2.2 behaviour - or -+ not - amended ANSI C, glibc-2.1 and Solaris 2.7 behaviour. We -+ don't have an autoconf test for this, yet. -+ The new behaviour would allow us to feed the bytes one by one into -+ mbrtowc. But the old behaviour forces us to feed all bytes since -+ the end of the last character into mbrtowc. Since we want to retry -+ with more bytes when mbrtowc returns -2, we must backup the state -+ before calling mbrtowc, because implementations with the new -+ behaviour will clobber it. */ -+ mbstate_t backup_state = mbf->state; -+ -+ bytes = mbrtowc (&mbc->wc, &mbf->buf[0], mbf->bufcount, &mbf->state); -+ -+ if (bytes == (size_t) -1) -+ { -+ /* An invalid multibyte sequence was encountered. */ -+ /* Return a single byte. */ -+ bytes = 1; -+ mbc->wc_valid = false; -+ break; -+ } -+ else if (bytes == (size_t) -2) -+ { -+ /* An incomplete multibyte character. */ -+ mbf->state = backup_state; -+ if (mbf->bufcount == MBCHAR_BUF_SIZE) -+ { -+ /* An overlong incomplete multibyte sequence was encountered. */ -+ /* Return a single byte. */ -+ bytes = 1; -+ mbc->wc_valid = false; -+ break; -+ } -+ else -+ { -+ /* Read one more byte and retry mbrtowc. */ -+ int c = getc (mbf->fp); -+ if (c == EOF) -+ { -+ /* An incomplete multibyte character at the end. */ -+ mbf->eof_seen = true; -+ bytes = mbf->bufcount; -+ mbc->wc_valid = false; -+ break; -+ } -+ mbf->buf[mbf->bufcount] = (unsigned char) c; -+ mbf->bufcount++; -+ } -+ } -+ else -+ { -+ if (bytes == 0) -+ { -+ /* A null wide character was encountered. */ -+ bytes = 1; -+ assert (mbf->buf[0] == '\0'); -+ assert (mbc->wc == 0); -+ } -+ mbc->wc_valid = true; -+ break; -+ } -+ } -+ -+ /* Return the multibyte sequence mbf->buf[0..bytes-1]. */ -+ mbc->ptr = &mbc->buf[0]; -+ memcpy (&mbc->buf[0], &mbf->buf[0], bytes); -+ mbc->bytes = bytes; -+ -+ mbf->bufcount -= bytes; -+ if (mbf->bufcount > 0) -+ { -+ /* It's not worth calling memmove() for so few bytes. */ -+ unsigned int count = mbf->bufcount; -+ char *p = &mbf->buf[0]; -+ -+ do -+ { -+ *p = *(p + bytes); -+ p++; -+ } -+ while (--count > 0); -+ } -+ return; -+ -+eof: -+ /* An mbchar_t with bytes == 0 is used to indicate EOF. */ -+ mbc->ptr = NULL; -+ mbc->bytes = 0; -+ mbc->wc_valid = false; -+ return; -+} -+ -+MBFILE_INLINE void -+mbfile_multi_ungetc (const struct mbchar *mbc, struct mbfile_multi *mbf) -+{ -+ mb_copy (&mbf->pushback, mbc); -+ mbf->have_pushback = true; -+} -+ -+typedef struct mbfile_multi mb_file_t; -+ -+typedef mbchar_t mbf_char_t; -+ -+#define mbf_init(mbf, stream) \ -+ ((mbf).fp = (stream), \ -+ (mbf).eof_seen = false, \ -+ (mbf).have_pushback = false, \ -+ memset (&(mbf).state, '\0', sizeof (mbstate_t)), \ -+ (mbf).bufcount = 0) -+ -+#define mbf_getc(mbc, mbf) mbfile_multi_getc (&(mbc), &(mbf)) -+ -+#define mbf_ungetc(mbc, mbf) mbfile_multi_ungetc (&(mbc), &(mbf)) -+ -+#define mb_iseof(mbc) ((mbc).bytes == 0) -+ -+#ifndef _GL_INLINE_HEADER_BEGIN -+ #error "Please include config.h first." -+#endif -+_GL_INLINE_HEADER_BEGIN -+ -+#endif /* _MBFILE_H */ -diff --git a/m4/mbfile.m4 b/m4/mbfile.m4 -new file mode 100644 -index 0000000..8589902 ---- /dev/null -+++ b/m4/mbfile.m4 -@@ -0,0 +1,14 @@ -+# mbfile.m4 serial 7 -+dnl Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl autoconf tests required for use of mbfile.h -+dnl From Bruno Haible. -+ -+AC_DEFUN([gl_MBFILE], -+[ -+ AC_REQUIRE([AC_TYPE_MBSTATE_T]) -+ : -+]) -diff --git a/src/expand.c b/src/expand.c -index 9fa2e10..380e020 100644 ---- a/src/expand.c -+++ b/src/expand.c -@@ -37,6 +37,9 @@ - #include - #include - #include -+ -+#include -+ - #include "system.h" - #include "die.h" - #include "xstrndup.h" -@@ -100,19 +103,19 @@ expand (void) - { - /* Input stream. */ - FILE *fp = next_file (NULL); -+ mb_file_t mbf; -+ mbf_char_t c; - - if (!fp) - return; - -+ mbf_init (mbf, fp); -+ - while (true) - { -- /* Input character, or EOF. */ -- int c; -- - /* If true, perform translations. */ - bool convert = true; - -- - /* The following variables have valid values only when CONVERT - is true: */ - -@@ -122,17 +125,23 @@ expand (void) - /* Index in TAB_LIST of next tab stop to examine. */ - size_t tab_index = 0; - -- - /* Convert a line of text. */ - - do - { -- while ((c = getc (fp)) < 0 && (fp = next_file (fp))) -- continue; -+ do { -+ mbf_getc (c, mbf); -+ if (mb_iseof (c)) -+ { -+ mbf_init (mbf, fp = next_file (fp)); -+ continue; -+ } -+ } -+ while (false); - - if (convert) - { -- if (c == '\t') -+ if (mb_iseq (c, '\t')) - { - /* Column the next input tab stop is on. */ - uintmax_t next_tab_column; -@@ -151,32 +160,34 @@ expand (void) - if (putchar (' ') < 0) - die (EXIT_FAILURE, errno, _("write error")); - -- c = ' '; -+ mb_setascii (&c, ' '); - } -- else if (c == '\b') -+ else if (mb_iseq (c, '\b')) - { - /* Go back one column, and force recalculation of the - next tab stop. */ - column -= !!column; - tab_index -= !!tab_index; - } -- else -+ /* A leading control character could make us trip over. */ -+ else if (!mb_iscntrl (c)) - { -- column++; -+ column += mb_width (c); - if (!column) - die (EXIT_FAILURE, 0, _("input line is too long")); - } - -- convert &= convert_entire_line || !! isblank (c); -+ convert &= convert_entire_line || mb_isblank (c); - } - -- if (c < 0) -+ if (mb_iseof (c)) - return; - -- if (putchar (c) < 0) -+ mb_putc (c, stdout); -+ if (ferror (stdout)) - die (EXIT_FAILURE, errno, _("write error")); - } -- while (c != '\n'); -+ while (!mb_iseq (c, '\n')); - } - } - -diff --git a/src/unexpand.c b/src/unexpand.c -index 7801274..569a7ee 100644 ---- a/src/unexpand.c -+++ b/src/unexpand.c -@@ -38,6 +38,9 @@ - #include - #include - #include -+ -+#include -+ - #include "system.h" - #include "die.h" - #include "xstrndup.h" -@@ -107,11 +110,12 @@ unexpand (void) - { - /* Input stream. */ - FILE *fp = next_file (NULL); -+ mb_file_t mbf; - - /* The array of pending blanks. In non-POSIX locales, blanks can - include characters other than spaces, so the blanks must be - stored, not merely counted. */ -- char *pending_blank; -+ mbf_char_t *pending_blank; - - if (!fp) - return; -@@ -119,12 +123,14 @@ unexpand (void) - /* The worst case is a non-blank character, then one blank, then a - tab stop, then MAX_COLUMN_WIDTH - 1 blanks, then a non-blank; so - allocate MAX_COLUMN_WIDTH bytes to store the blanks. */ -- pending_blank = xmalloc (max_column_width); -+ pending_blank = xmalloc (max_column_width * sizeof (mbf_char_t)); -+ -+ mbf_init (mbf, fp); - - while (true) - { - /* Input character, or EOF. */ -- int c; -+ mbf_char_t c; - - /* If true, perform translations. */ - bool convert = true; -@@ -158,12 +164,19 @@ unexpand (void) - - do - { -- while ((c = getc (fp)) < 0 && (fp = next_file (fp))) -- continue; -+ do { -+ mbf_getc (c, mbf); -+ if (mb_iseof (c)) -+ { -+ mbf_init (mbf, fp = next_file (fp)); -+ continue; -+ } -+ } -+ while (false); - - if (convert) - { -- bool blank = !! isblank (c); -+ bool blank = mb_isblank (c); - - if (blank) - { -@@ -180,16 +193,16 @@ unexpand (void) - if (next_tab_column < column) - die (EXIT_FAILURE, 0, _("input line is too long")); - -- if (c == '\t') -+ if (mb_iseq (c, '\t')) - { - column = next_tab_column; - - if (pending) -- pending_blank[0] = '\t'; -+ mb_setascii (&pending_blank[0], '\t'); - } - else - { -- column++; -+ column += mb_width (c); - - if (! (prev_blank && column == next_tab_column)) - { -@@ -197,13 +210,14 @@ unexpand (void) - will be replaced by tabs. */ - if (column == next_tab_column) - one_blank_before_tab_stop = true; -- pending_blank[pending++] = c; -+ mb_copy (&pending_blank[pending++], &c); - prev_blank = true; - continue; - } - - /* Replace the pending blanks by a tab or two. */ -- pending_blank[0] = c = '\t'; -+ mb_setascii (&c, '\t'); -+ mb_setascii (&pending_blank[0], '\t'); - } - - /* Discard pending blanks, unless it was a single -@@ -211,7 +225,7 @@ unexpand (void) - pending = one_blank_before_tab_stop; - } - } -- else if (c == '\b') -+ else if (mb_iseq (c, '\b')) - { - /* Go back one column, and force recalculation of the - next tab stop. */ -@@ -221,7 +235,7 @@ unexpand (void) - } - else - { -- column++; -+ column += mb_width (c); - if (!column) - die (EXIT_FAILURE, 0, _("input line is too long")); - } -@@ -229,8 +243,11 @@ unexpand (void) - if (pending) - { - if (pending > 1 && one_blank_before_tab_stop) -- pending_blank[0] = '\t'; -- if (fwrite (pending_blank, 1, pending, stdout) != pending) -+ mb_setascii (&pending_blank[0], '\t'); -+ -+ for (int n = 0; n < pending; ++n) -+ mb_putc (pending_blank[n], stdout); -+ if (ferror (stdout)) - die (EXIT_FAILURE, errno, _("write error")); - pending = 0; - one_blank_before_tab_stop = false; -@@ -240,16 +257,17 @@ unexpand (void) - convert &= convert_entire_line || blank; - } - -- if (c < 0) -+ if (mb_iseof (c)) - { - free (pending_blank); - return; - } - -- if (putchar (c) < 0) -+ mb_putc (c, stdout); -+ if (ferror (stdout)) - die (EXIT_FAILURE, errno, _("write error")); - } -- while (c != '\n'); -+ while (!mb_iseq (c, '\n')); - } - } - -diff --git a/tests/expand/mb.sh b/tests/expand/mb.sh -new file mode 100755 -index 0000000..7971e18 ---- /dev/null -+++ b/tests/expand/mb.sh -@@ -0,0 +1,98 @@ -+#!/bin/sh -+ -+# Copyright (C) 2012-2015 Free Software Foundation, Inc. -+ -+# This program is free software: you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation, either version 3 of the License, or -+# (at your option) any later version. -+ -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+ -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src -+print_ver_ expand -+ -+export LC_ALL=en_US.UTF-8 -+ -+#input containing multibyte characters -+cat <<\EOF > in || framework_failure_ -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+EOF -+env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_ -+ -+cat <<\EOF > exp || framework_failure_ -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+ äöü . öüä. ä xx -+EOF -+ -+expand < 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) -+\u00E9\t|composed(1) -+e\u0301\t|decomposed(1) -+\u3000\t|ideo-space(2) -+\uFF0D\t|full-hypen(2) -+' > in || framework_failure_ -+ -+env printf '12345678 -+e |ascii(1) -+\u00E9 |composed(1) -+e\u0301 |decomposed(1) -+\u3000 |ideo-space(2) -+\uFF0D |full-hypen(2) -+' > exp || framework_failure_ -+ -+expand < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+#shouldn't fail with "input line too long" -+#when a line starts with a control character -+env printf '\n' > in || framework_failure_ -+ -+expand < in > out || fail=1 -+compare in out > /dev/null 2>&1 || fail=1 -+ -+#non-Unicode characters interspersed between Unicode ones -+env printf '12345678 -+\t\xFF| -+\xFF\t| -+\t\xFFä| -+ä\xFF\t| -+\tä\xFF| -+\xFF\tä| -+äbcdef\xFF\t| -+' > in || framework_failure_ -+ -+env printf '12345678 -+ \xFF| -+\xFF | -+ \xFFä| -+ä\xFF | -+ ä\xFF| -+\xFF ä| -+äbcdef\xFF | -+' > exp || framework_failure_ -+ -+expand < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+exit $fail -diff --git a/tests/local.mk b/tests/local.mk -index 192f776..8053397 100644 ---- a/tests/local.mk -+++ b/tests/local.mk -@@ -544,6 +544,7 @@ all_tests = \ - tests/du/threshold.sh \ - tests/du/trailing-slash.sh \ - tests/du/two-args.sh \ -+ tests/expand/mb.sh \ - tests/id/gnu-zero-uids.sh \ - tests/id/no-context.sh \ - tests/id/context.sh \ -@@ -684,6 +685,7 @@ all_tests = \ - tests/touch/read-only.sh \ - tests/touch/relative.sh \ - tests/touch/trailing-slash.sh \ -+ tests/unexpand/mb.sh \ - $(all_root_tests) - - # See tests/factor/create-test.sh. -diff --git a/tests/unexpand/mb.sh b/tests/unexpand/mb.sh -new file mode 100755 -index 0000000..60d4c1a ---- /dev/null -+++ b/tests/unexpand/mb.sh -@@ -0,0 +1,97 @@ -+#!/bin/sh -+ -+# Copyright (C) 2012-2015 Free Software Foundation, Inc. -+ -+# This program is free software: you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation, either version 3 of the License, or -+# (at your option) any later version. -+ -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+ -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src -+print_ver_ unexpand -+ -+export LC_ALL=en_US.UTF-8 -+ -+#input containing multibyte characters -+cat > in <<\EOF -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+ äöü . öüä. ä xx -+EOF -+ -+cat > exp <<\EOF -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+ äöü . öüä. ä xx -+EOF -+ -+unexpand -a < 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 -+e |ascii(1) -+\u00E9 |composed(1) -+e\u0301 |decomposed(1) -+\u3000 |ideo-space(2) -+\uFF0D |full-hypen(2) -+' > in || framework_failure_ -+ -+env printf '12345678 -+e\t|ascii(1) -+\u00E9\t|composed(1) -+e\u0301\t|decomposed(1) -+\u3000\t|ideo-space(2) -+\uFF0D\t|full-hypen(2) -+' > exp || framework_failure_ -+ -+unexpand -a < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+#test input where a blank of width > 1 is not being substituted -+in="$(LC_ALL=en_US.UTF-8 printf ' \u3000 ö ü ß')" -+exp='   ö ü ß' -+ -+unexpand -a < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+#non-Unicode characters interspersed between Unicode ones -+env printf '12345678 -+ \xFF| -+\xFF | -+ \xFFä| -+ä\xFF | -+ ä\xFF| -+\xFF ä| -+äbcdef\xFF | -+' > in || framework_failure_ -+ -+env printf '12345678 -+\t\xFF| -+\xFF\t| -+\t\xFFä| -+ä\xFF\t| -+\tä\xFF| -+\xFF\tä| -+äbcdef\xFF\t| -+' > exp || framework_failure_ -+ -+unexpand -a < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 --- -2.7.4 - diff --git a/coreutils-i18n-fix-unexpand.patch b/coreutils-i18n-fix-unexpand.patch deleted file mode 100644 index f0c347c..0000000 --- a/coreutils-i18n-fix-unexpand.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 02424bfcd719bbaa695f4e1c3ef17ad91b0d23c0 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Thu, 28 Jan 2016 20:57:22 +0100 -Subject: [PATCH] unexpand: fix blank line handling - - echo '' |./src/unexpand -a - -Really? ---- - src/unexpand.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/unexpand.c b/src/unexpand.c -index 569a7ee..3bbbd66 100644 ---- a/src/unexpand.c -+++ b/src/unexpand.c -@@ -233,7 +233,7 @@ unexpand (void) - next_tab_column = column; - tab_index -= !!tab_index; - } -- else -+ else if (!mb_iseq (c, '\n')) - { - column += mb_width (c); - if (!column) --- -2.7.4 - diff --git a/coreutils-i18n-fix2-expand-unexpand.patch b/coreutils-i18n-fix2-expand-unexpand.patch deleted file mode 100644 index b34d7b7..0000000 --- a/coreutils-i18n-fix2-expand-unexpand.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff --git a/src/expand.c b/src/expand.c -index 380e020..310b349 100644 ---- a/src/expand.c -+++ b/src/expand.c -@@ -129,15 +129,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 --git a/src/unexpand.c b/src/unexpand.c -index 3bbbd66..863a90a 100644 ---- a/src/unexpand.c -+++ b/src/unexpand.c -@@ -164,15 +164,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 --git a/tests/expand/mb.sh b/tests/expand/mb.sh -index 7971e18..031be7a 100755 ---- a/tests/expand/mb.sh -+++ b/tests/expand/mb.sh -@@ -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 --git a/tests/unexpand/mb.sh b/tests/unexpand/mb.sh -index 60d4c1a..8d75652 100755 ---- a/tests/unexpand/mb.sh -+++ b/tests/unexpand/mb.sh -@@ -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-i18n-fold-newline.patch b/coreutils-i18n-fold-newline.patch deleted file mode 100644 index f7286ef..0000000 --- a/coreutils-i18n-fold-newline.patch +++ /dev/null @@ -1,80 +0,0 @@ -From ff424639fe863cbd6963add1a79b97290c1606c6 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Fri, 3 Feb 2017 12:26:53 +0100 -Subject: [PATCH] fold.c: preserve new-lines in mutlibyte text - ---- - src/fold.c | 49 ++++++++++++++++++++++++------------------------- - 1 file changed, 24 insertions(+), 25 deletions(-) - -diff --git a/src/fold.c b/src/fold.c -index d23edd5..8c232a7 100644 ---- a/src/fold.c -+++ b/src/fold.c -@@ -342,39 +342,38 @@ fold_multibyte_text (FILE *istream, size_t width, int *saved_errno) - } - - rescan: -- if (operating_mode == byte_mode) /* byte mode */ -+ if (convfail) -+ increment = 1; -+ else if (wc == L'\n') -+ { -+ /* preserve newline */ -+ fwrite (line_out, sizeof(char), offset_out, stdout); -+ START_NEW_LINE; -+ continue; -+ } -+ else if (operating_mode == byte_mode) /* byte mode */ - increment = mblength; - else if (operating_mode == character_mode) /* character mode */ - increment = 1; -- else /* column mode */ -+ else /* column mode */ - { -- if (convfail) -- increment = 1; -- else -+ switch (wc) - { -- switch (wc) -- { -- case L'\n': -- fwrite (line_out, sizeof(char), offset_out, stdout); -- START_NEW_LINE; -- continue; -+ case L'\b': -+ increment = (column > 0) ? -1 : 0; -+ break; - -- case L'\b': -- increment = (column > 0) ? -1 : 0; -- break; -+ case L'\r': -+ increment = -1 * column; -+ break; - -- case L'\r': -- increment = -1 * column; -- break; -+ case L'\t': -+ increment = 8 - column % 8; -+ break; - -- case L'\t': -- increment = 8 - column % 8; -- break; -- -- default: -- increment = wcwidth (wc); -- increment = (increment < 0) ? 0 : increment; -- } -+ default: -+ increment = wcwidth (wc); -+ increment = (increment < 0) ? 0 : increment; - } - } - --- -2.7.4 - diff --git a/coreutils-i18n-sort-human.patch b/coreutils-i18n-sort-human.patch deleted file mode 100644 index 6752493..0000000 --- a/coreutils-i18n-sort-human.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 3976ef5a20369d8b490907ab2cba2d617305a5e0 Mon Sep 17 00:00:00 2001 -From: Kamil Dudka -Date: Mon, 30 May 2016 16:19:20 +0200 -Subject: [PATCH] sort: do not use static array 'blanks' in human_numcompare() - -... because the array is not initialized with MB locales. Note this is -rather a conservative fix. I plan to do more cleanup of the i18n patch -in Fedora to prevent mistakes like this in future updates of coreutils. ---- - src/sort.c | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/src/sort.c b/src/sort.c -index 9e07ad8..e47b039 100644 ---- a/src/sort.c -+++ b/src/sort.c -@@ -2304,12 +2304,10 @@ find_unit_order (char const *number) - < K/k < M < G < T < P < E < Z < Y */ - - static int --human_numcompare (char const *a, char const *b) -+human_numcompare (char *a, char *b) - { -- while (blanks[to_uchar (*a)]) -- a++; -- while (blanks[to_uchar (*b)]) -- b++; -+ skipblanks(&a, a + strlen(a)); -+ skipblanks(&b, b + strlen(b)); - - int diff = find_unit_order (a) - find_unit_order (b); - return (diff ? diff : strnumcmp (a, b, decimal_point, thousands_sep)); --- -2.5.5 - diff --git a/coreutils-i18n-un-expand-BOM.patch b/coreutils-i18n-un-expand-BOM.patch deleted file mode 100644 index 6210ce7..0000000 --- a/coreutils-i18n-un-expand-BOM.patch +++ /dev/null @@ -1,456 +0,0 @@ -From 7a7c776a4e228d180e74614fd8c8afcad5d4bdf7 Mon Sep 17 00:00:00 2001 -From: Jakub Martisko -Date: Thu, 7 Jul 2016 12:53:26 +0200 -Subject: [PATCH] coreutils-i18n-un-expand-BOM.patch - ---- - src/expand-common.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++ - src/expand-common.h | 12 ++++++ - src/expand.c | 45 +++++++++++++++++++- - src/unexpand.c | 43 ++++++++++++++++++- - tests/expand/mb.sh | 71 ++++++++++++++++++++++++++++++++ - tests/unexpand/mb.sh | 59 ++++++++++++++++++++++++++ - 6 files changed, 342 insertions(+), 2 deletions(-) - -diff --git a/src/expand-common.c b/src/expand-common.c -index 4657e46..97cbb09 100644 ---- a/src/expand-common.c -+++ b/src/expand-common.c -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include "system.h" - #include "die.h" - #include "error.h" -@@ -126,6 +127,119 @@ set_increment_size (uintmax_t tabval) - return ok; - } - -+extern int -+set_utf_locale (void) -+{ -+ /*try using some predefined locale */ -+ const char* predef_locales[] = {"C.UTF8","en_US.UTF8","en_GB.UTF8"}; -+ -+ const int predef_locales_count=3; -+ for (int i=0;ibufcount=0; -+ if (c == 0xEF) -+ { -+ c=fgetc(fp); -+ } -+ else -+ { -+ if (c != EOF) -+ { -+ ungetc(c,fp); -+ } -+ return false; -+ } -+ -+ if (c == 0xBB) -+ { -+ c=fgetc(fp); -+ } -+ else -+ { -+ if ( c!= EOF ) -+ { -+ mbf->buf[0]=(unsigned char) 0xEF; -+ mbf->bufcount=1; -+ ungetc(c,fp); -+ return false; -+ } -+ else -+ { -+ ungetc(0xEF,fp); -+ return false; -+ } -+ } -+ if (c == 0xBF) -+ { -+ mbf->bufcount=0; -+ return true; -+ } -+ else -+ { -+ if (c != EOF) -+ { -+ mbf->buf[0]=(unsigned char) 0xEF; -+ mbf->buf[1]=(unsigned char) 0xBB; -+ mbf->bufcount=2; -+ ungetc(c,fp); -+ return false; -+ } -+ else -+ { -+ mbf->buf[0]=(unsigned char) 0xEF; -+ mbf->bufcount=1; -+ ungetc(0xBB,fp); -+ return false; -+ } -+ } -+ return false; -+} -+ -+extern void -+print_bom(void) -+{ -+ putc (0xEF, stdout); -+ putc (0xBB, stdout); -+ putc (0xBF, stdout); -+} -+ - /* Add the comma or blank separated list of tab stops STOPS - to the list of tab stops. */ - extern void -diff --git a/src/expand-common.h b/src/expand-common.h -index 8cb2079..763bfda 100644 ---- a/src/expand-common.h -+++ b/src/expand-common.h -@@ -34,6 +34,18 @@ extern size_t max_column_width; - /* The desired exit status. */ - extern int exit_status; - -+extern int -+set_utf_locale (void); -+ -+extern bool -+check_utf_locale(void); -+ -+extern bool -+check_bom(FILE* fp, mb_file_t *mbf); -+ -+extern void -+print_bom(void); -+ - /* Add tab stop TABVAL to the end of 'tab_list'. */ - extern void - add_tab_stop (uintmax_t tabval); -diff --git a/src/expand.c b/src/expand.c -index 310b349..4136824 100644 ---- a/src/expand.c -+++ b/src/expand.c -@@ -103,11 +103,33 @@ expand (void) - FILE *fp = next_file (NULL); - mb_file_t mbf; - mbf_char_t c; -+ /* True if the starting locale is utf8. */ -+ bool using_utf_locale; -+ -+ /* True if the first file contains BOM header. */ -+ bool found_bom; -+ using_utf_locale=check_utf_locale(); - - if (!fp) - return; -- - mbf_init (mbf, fp); -+ found_bom=check_bom(fp,&mbf); -+ -+ if (using_utf_locale == false && found_bom == true) -+ { -+ /*try using some predefined locale */ -+ -+ if (set_utf_locale () != 0) -+ { -+ error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale")); -+ } -+ } -+ -+ -+ if (found_bom == true) -+ { -+ print_bom(); -+ } - - while (true) - { -@@ -132,6 +154,27 @@ expand (void) - if ((mb_iseof (c)) && (fp = next_file (fp))) - { - mbf_init (mbf, fp); -+ if (fp!=NULL) -+ { -+ if (check_bom(fp,&mbf)==true) -+ { -+ /*Not the first file - check BOM header*/ -+ if (using_utf_locale==false && found_bom==false) -+ { -+ /*BOM header in subsequent file but not in the first one. */ -+ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); -+ } -+ } -+ else -+ { -+ if(using_utf_locale==false && found_bom==true) -+ { -+ /*First file conatined BOM header - locale was switched to UTF -+ *all subsequent files should contain BOM. */ -+ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); -+ } -+ } -+ } - continue; - } - else -diff --git a/src/unexpand.c b/src/unexpand.c -index 863a90a..5681b58 100644 ---- a/src/unexpand.c -+++ b/src/unexpand.c -@@ -116,16 +116,36 @@ unexpand (void) - include characters other than spaces, so the blanks must be - stored, not merely counted. */ - mbf_char_t *pending_blank; -+ /* True if the starting locale is utf8. */ -+ bool using_utf_locale; -+ -+ /* True if the first file contains BOM header. */ -+ bool found_bom; -+ using_utf_locale=check_utf_locale(); - - if (!fp) - return; -+ mbf_init (mbf, fp); -+ found_bom=check_bom(fp,&mbf); -+ -+ if (using_utf_locale == false && found_bom == true) -+ { -+ /*try using some predefined locale */ - -+ if (set_utf_locale () != 0) -+ { -+ error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale")); -+ } -+ } - /* The worst case is a non-blank character, then one blank, then a - tab stop, then MAX_COLUMN_WIDTH - 1 blanks, then a non-blank; so - allocate MAX_COLUMN_WIDTH bytes to store the blanks. */ - pending_blank = xmalloc (max_column_width * sizeof (mbf_char_t)); - -- mbf_init (mbf, fp); -+ if (found_bom == true) -+ { -+ print_bom(); -+ } - - while (true) - { -@@ -169,6 +189,27 @@ unexpand (void) - if ((mb_iseof (c)) && (fp = next_file (fp))) - { - mbf_init (mbf, fp); -+ if (fp!=NULL) -+ { -+ if (check_bom(fp,&mbf)==true) -+ { -+ /*Not the first file - check BOM header*/ -+ if (using_utf_locale==false && found_bom==false) -+ { -+ /*BOM header in subsequent file but not in the first one. */ -+ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); -+ } -+ } -+ else -+ { -+ if(using_utf_locale==false && found_bom==true) -+ { -+ /*First file conatined BOM header - locale was switched to UTF -+ *all subsequent files should contain BOM. */ -+ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); -+ } -+ } -+ } - continue; - } - else -diff --git a/tests/expand/mb.sh b/tests/expand/mb.sh -index 031be7a..1621c84 100755 ---- a/tests/expand/mb.sh -+++ b/tests/expand/mb.sh -@@ -109,4 +109,75 @@ env printf '12345678 - expand < in > out || fail=1 - compare exp out > /dev/null 2>&1 || fail=1 - -+ -+ -+#BOM header test 1 -+printf "\xEF\xBB\xBF" > in; cat <<\EOF >> in || framework_failure_ -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+EOF -+env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_ -+ -+printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_ -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+ äöü . öüä. ä xx -+EOF -+ -+ -+expand < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+LANG=C expand < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+LC_ALL=C expand < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+ -+printf '\xEF\xBB\xBF' > in1; cat <<\EOF >> in1 || framework_failure_ -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+EOF -+env printf ' äöü\t. öüä. \tä xx\n' >> in1 || framework_failure_ -+ -+ -+printf '\xEF\xBB\xBF' > exp; cat <<\EOF >> exp || framework_failure_ -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+ äöü . öüä. ä xx -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+ äöü . öüä. ä xx -+EOF -+ -+expand in1 in1 > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+LANG=C expand in1 in1 > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+LC_ALL=C expand in1 in1 > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ - exit $fail -diff --git a/tests/unexpand/mb.sh b/tests/unexpand/mb.sh -index 8d75652..9d4ee3e 100755 ---- a/tests/unexpand/mb.sh -+++ b/tests/unexpand/mb.sh -@@ -111,3 +111,62 @@ env printf '12345678 - - unexpand -a < in > out || fail=1 - compare exp out > /dev/null 2>&1 || fail=1 -+ -+#BOM header test 1 -+printf "\xEF\xBB\xBF" > in; cat <<\EOF >> in || framework_failure_ -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+ äöü . öüä. ä xx -+EOF -+env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_ -+ -+printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_ -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+ äöü . öüä. ä xx -+EOF -+ -+unexpand < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+LANG=C unexpand < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+LC_ALL=C unexpand < in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+ -+printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_ -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+ äöü . öüä. ä xx -+1234567812345678123456781 -+. . . . -+a b c d -+. . . . -+ä ö ü ß -+. . . . -+ äöü . öüä. ä xx -+EOF -+ -+ -+unexpand in in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+LANG=C unexpand in in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 -+ -+LC_ALL=C unexpand in in > out || fail=1 -+compare exp out > /dev/null 2>&1 || fail=1 --- -2.9.3 - diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 4b8c9e5..4ff0911 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -1,37 +1,80 @@ -From 29117b2d07af00f4d4b87cf778e4294588ab1a83 Mon Sep 17 00:00:00 2001 -From: Kamil Dudka -Date: Thu, 1 Dec 2016 15:10:04 +0100 +From 01010419a6499768563e7b2f3fd56cf16edda75e Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 4 Oct 2021 08:54:37 +0200 Subject: [PATCH] coreutils-i18n.patch -TODO: merge upstream --- + bootstrap.conf | 1 + + configure.ac | 2 + lib/linebuffer.h | 8 + - src/fold.c | 308 ++++++++++++++++-- - src/join.c | 359 ++++++++++++++++++--- - src/pr.c | 443 ++++++++++++++++++++++--- - src/sort.c | 764 +++++++++++++++++++++++++++++++++++++++++--- - src/uniq.c | 265 ++++++++++++++- + lib/mbfile.c | 3 + + lib/mbfile.h | 255 ++++++++++++ + m4/mbfile.m4 | 14 + + src/cut.c | 508 +++++++++++++++++++++-- + src/expand-common.c | 114 ++++++ + src/expand-common.h | 12 + + src/expand.c | 90 +++- + src/fold.c | 312 ++++++++++++-- + src/join.c | 359 ++++++++++++++-- + src/local.mk | 4 +- + src/pr.c | 443 ++++++++++++++++++-- + src/sort.c | 792 +++++++++++++++++++++++++++++++++--- + src/unexpand.c | 101 ++++- + src/uniq.c | 119 +++++- + tests/Coreutils.pm | 3 + + tests/expand/mb.sh | 183 +++++++++ tests/i18n/sort.sh | 29 ++ - tests/local.mk | 2 + - tests/misc/expand.pl | 42 +++ + tests/local.mk | 4 + + tests/misc/expand.pl | 42 ++ tests/misc/fold.pl | 50 ++- tests/misc/join.pl | 50 +++ - tests/misc/sort-mb-tests.sh | 45 +++ - tests/misc/sort-merge.pl | 42 +++ - tests/misc/sort.pl | 40 ++- - tests/misc/unexpand.pl | 39 +++ - tests/misc/uniq.pl | 55 ++++ + tests/misc/sort-mb-tests.sh | 45 ++ + tests/misc/sort-merge.pl | 42 ++ + tests/misc/sort.pl | 40 +- + tests/misc/unexpand.pl | 39 ++ + tests/misc/uniq.pl | 55 +++ tests/pr/pr-tests.pl | 49 +++ - 17 files changed, 2430 insertions(+), 160 deletions(-) + tests/unexpand/mb.sh | 172 ++++++++ + 31 files changed, 3698 insertions(+), 242 deletions(-) + create mode 100644 lib/mbfile.c + create mode 100644 lib/mbfile.h + create mode 100644 m4/mbfile.m4 + create mode 100755 tests/expand/mb.sh create mode 100755 tests/i18n/sort.sh create mode 100755 tests/misc/sort-mb-tests.sh + create mode 100755 tests/unexpand/mb.sh +diff --git a/bootstrap.conf b/bootstrap.conf +index c1399e3..60b39cf 100644 +--- a/bootstrap.conf ++++ b/bootstrap.conf +@@ -162,6 +162,7 @@ gnulib_modules=" + maintainer-makefile + malloc-gnu + manywarnings ++ mbfile + mbrlen + mbrtowc + mbsalign +diff --git a/configure.ac b/configure.ac +index 7e4afc9..4656a35 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -476,6 +476,8 @@ fi + # I'm leaving it here for now. This whole thing needs to be modernized... + gl_WINSIZE_IN_PTEM + ++gl_MBFILE ++ + gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H + + if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \ diff --git a/lib/linebuffer.h b/lib/linebuffer.h -index 64181af..9b8fe5a 100644 +index 07d45ca..af62e6c 100644 --- a/lib/linebuffer.h +++ b/lib/linebuffer.h -@@ -21,6 +21,11 @@ - +@@ -22,6 +22,11 @@ + # include "idx.h" # include +/* Get mbstate_t. */ @@ -42,9 +85,9 @@ index 64181af..9b8fe5a 100644 /* A 'struct linebuffer' holds a line of text. */ struct linebuffer -@@ -28,6 +33,9 @@ struct linebuffer - size_t size; /* Allocated. */ - size_t length; /* Used. */ +@@ -29,6 +34,9 @@ struct linebuffer + idx_t size; /* Allocated. */ + idx_t length; /* Used. */ char *buffer; +# if HAVE_WCHAR_H + mbstate_t state; @@ -52,8 +95,1269 @@ index 64181af..9b8fe5a 100644 }; /* Initialize linebuffer LINEBUFFER for use. */ +diff --git a/lib/mbfile.c b/lib/mbfile.c +new file mode 100644 +index 0000000..b0a468e +--- /dev/null ++++ b/lib/mbfile.c +@@ -0,0 +1,3 @@ ++#include ++#define MBFILE_INLINE _GL_EXTERN_INLINE ++#include "mbfile.h" +diff --git a/lib/mbfile.h b/lib/mbfile.h +new file mode 100644 +index 0000000..11f1b12 +--- /dev/null ++++ b/lib/mbfile.h +@@ -0,0 +1,255 @@ ++/* Multibyte character I/O: macros for multi-byte encodings. ++ Copyright (C) 2001, 2005, 2009-2015 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++/* Written by Mitsuru Chinen ++ and Bruno Haible . */ ++ ++/* The macros in this file implement multi-byte character input from a ++ stream. ++ ++ mb_file_t ++ is the type for multibyte character input stream, usable for variable ++ declarations. ++ ++ mbf_char_t ++ is the type for multibyte character or EOF, usable for variable ++ declarations. ++ ++ mbf_init (mbf, stream) ++ initializes the MB_FILE for reading from stream. ++ ++ mbf_getc (mbc, mbf) ++ reads the next multibyte character from mbf and stores it in mbc. ++ ++ mb_iseof (mbc) ++ returns true if mbc represents the EOF value. ++ ++ Here are the function prototypes of the macros. ++ ++ extern void mbf_init (mb_file_t mbf, FILE *stream); ++ extern void mbf_getc (mbf_char_t mbc, mb_file_t mbf); ++ extern bool mb_iseof (const mbf_char_t mbc); ++ */ ++ ++#ifndef _MBFILE_H ++#define _MBFILE_H 1 ++ ++#include ++#include ++#include ++#include ++ ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.1 has a bug: and must be included before ++ . */ ++#include ++#include ++#include ++ ++#include "mbchar.h" ++ ++#ifndef _GL_INLINE_HEADER_BEGIN ++ #error "Please include config.h first." ++#endif ++_GL_INLINE_HEADER_BEGIN ++#ifndef MBFILE_INLINE ++# define MBFILE_INLINE _GL_INLINE ++#endif ++ ++struct mbfile_multi { ++ FILE *fp; ++ bool eof_seen; ++ bool have_pushback; ++ mbstate_t state; ++ unsigned int bufcount; ++ char buf[MBCHAR_BUF_SIZE]; ++ struct mbchar pushback; ++}; ++ ++MBFILE_INLINE void ++mbfile_multi_getc (struct mbchar *mbc, struct mbfile_multi *mbf) ++{ ++ size_t bytes; ++ ++ /* If EOF has already been seen, don't use getc. This matters if ++ mbf->fp is connected to an interactive tty. */ ++ if (mbf->eof_seen) ++ goto eof; ++ ++ /* Return character pushed back, if there is one. */ ++ if (mbf->have_pushback) ++ { ++ mb_copy (mbc, &mbf->pushback); ++ mbf->have_pushback = false; ++ return; ++ } ++ ++ /* Before using mbrtowc, we need at least one byte. */ ++ if (mbf->bufcount == 0) ++ { ++ int c = getc (mbf->fp); ++ if (c == EOF) ++ { ++ mbf->eof_seen = true; ++ goto eof; ++ } ++ mbf->buf[0] = (unsigned char) c; ++ mbf->bufcount++; ++ } ++ ++ /* Handle most ASCII characters quickly, without calling mbrtowc(). */ ++ if (mbf->bufcount == 1 && mbsinit (&mbf->state) && is_basic (mbf->buf[0])) ++ { ++ /* These characters are part of the basic character set. ISO C 99 ++ guarantees that their wide character code is identical to their ++ char code. */ ++ mbc->wc = mbc->buf[0] = mbf->buf[0]; ++ mbc->wc_valid = true; ++ mbc->ptr = &mbc->buf[0]; ++ mbc->bytes = 1; ++ mbf->bufcount = 0; ++ return; ++ } ++ ++ /* Use mbrtowc on an increasing number of bytes. Read only as many bytes ++ from mbf->fp as needed. This is needed to give reasonable interactive ++ behaviour when mbf->fp is connected to an interactive tty. */ ++ for (;;) ++ { ++ /* We don't know whether the 'mbrtowc' function updates the state when ++ it returns -2, - this is the ISO C 99 and glibc-2.2 behaviour - or ++ not - amended ANSI C, glibc-2.1 and Solaris 2.7 behaviour. We ++ don't have an autoconf test for this, yet. ++ The new behaviour would allow us to feed the bytes one by one into ++ mbrtowc. But the old behaviour forces us to feed all bytes since ++ the end of the last character into mbrtowc. Since we want to retry ++ with more bytes when mbrtowc returns -2, we must backup the state ++ before calling mbrtowc, because implementations with the new ++ behaviour will clobber it. */ ++ mbstate_t backup_state = mbf->state; ++ ++ bytes = mbrtowc (&mbc->wc, &mbf->buf[0], mbf->bufcount, &mbf->state); ++ ++ if (bytes == (size_t) -1) ++ { ++ /* An invalid multibyte sequence was encountered. */ ++ /* Return a single byte. */ ++ bytes = 1; ++ mbc->wc_valid = false; ++ break; ++ } ++ else if (bytes == (size_t) -2) ++ { ++ /* An incomplete multibyte character. */ ++ mbf->state = backup_state; ++ if (mbf->bufcount == MBCHAR_BUF_SIZE) ++ { ++ /* An overlong incomplete multibyte sequence was encountered. */ ++ /* Return a single byte. */ ++ bytes = 1; ++ mbc->wc_valid = false; ++ break; ++ } ++ else ++ { ++ /* Read one more byte and retry mbrtowc. */ ++ int c = getc (mbf->fp); ++ if (c == EOF) ++ { ++ /* An incomplete multibyte character at the end. */ ++ mbf->eof_seen = true; ++ bytes = mbf->bufcount; ++ mbc->wc_valid = false; ++ break; ++ } ++ mbf->buf[mbf->bufcount] = (unsigned char) c; ++ mbf->bufcount++; ++ } ++ } ++ else ++ { ++ if (bytes == 0) ++ { ++ /* A null wide character was encountered. */ ++ bytes = 1; ++ assert (mbf->buf[0] == '\0'); ++ assert (mbc->wc == 0); ++ } ++ mbc->wc_valid = true; ++ break; ++ } ++ } ++ ++ /* Return the multibyte sequence mbf->buf[0..bytes-1]. */ ++ mbc->ptr = &mbc->buf[0]; ++ memcpy (&mbc->buf[0], &mbf->buf[0], bytes); ++ mbc->bytes = bytes; ++ ++ mbf->bufcount -= bytes; ++ if (mbf->bufcount > 0) ++ { ++ /* It's not worth calling memmove() for so few bytes. */ ++ unsigned int count = mbf->bufcount; ++ char *p = &mbf->buf[0]; ++ ++ do ++ { ++ *p = *(p + bytes); ++ p++; ++ } ++ while (--count > 0); ++ } ++ return; ++ ++eof: ++ /* An mbchar_t with bytes == 0 is used to indicate EOF. */ ++ mbc->ptr = NULL; ++ mbc->bytes = 0; ++ mbc->wc_valid = false; ++ return; ++} ++ ++MBFILE_INLINE void ++mbfile_multi_ungetc (const struct mbchar *mbc, struct mbfile_multi *mbf) ++{ ++ mb_copy (&mbf->pushback, mbc); ++ mbf->have_pushback = true; ++} ++ ++typedef struct mbfile_multi mb_file_t; ++ ++typedef mbchar_t mbf_char_t; ++ ++#define mbf_init(mbf, stream) \ ++ ((mbf).fp = (stream), \ ++ (mbf).eof_seen = false, \ ++ (mbf).have_pushback = false, \ ++ memset (&(mbf).state, '\0', sizeof (mbstate_t)), \ ++ (mbf).bufcount = 0) ++ ++#define mbf_getc(mbc, mbf) mbfile_multi_getc (&(mbc), &(mbf)) ++ ++#define mbf_ungetc(mbc, mbf) mbfile_multi_ungetc (&(mbc), &(mbf)) ++ ++#define mb_iseof(mbc) ((mbc).bytes == 0) ++ ++#ifndef _GL_INLINE_HEADER_BEGIN ++ #error "Please include config.h first." ++#endif ++_GL_INLINE_HEADER_BEGIN ++ ++#endif /* _MBFILE_H */ +diff --git a/m4/mbfile.m4 b/m4/mbfile.m4 +new file mode 100644 +index 0000000..8589902 +--- /dev/null ++++ b/m4/mbfile.m4 +@@ -0,0 +1,14 @@ ++# mbfile.m4 serial 7 ++dnl Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++dnl autoconf tests required for use of mbfile.h ++dnl From Bruno Haible. ++ ++AC_DEFUN([gl_MBFILE], ++[ ++ AC_REQUIRE([AC_TYPE_MBSTATE_T]) ++ : ++]) +diff --git a/src/cut.c b/src/cut.c +index 6fd8978..faef877 100644 +--- a/src/cut.c ++++ b/src/cut.c +@@ -28,6 +28,11 @@ + #include + #include + #include ++ ++/* Get mbstate_t, mbrtowc(). */ ++#if HAVE_WCHAR_H ++# include ++#endif + #include "system.h" + + #include "error.h" +@@ -37,6 +42,18 @@ + + #include "set-fields.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 ++ + /* The official name of this program (e.g., no 'g' prefix). */ + #define PROGRAM_NAME "cut" + +@@ -53,6 +70,52 @@ + } \ + while (0) + ++/* Refill the buffer BUF to get a multibyte character. */ ++#define REFILL_BUFFER(BUF, BUFPOS, BUFLEN, STREAM) \ ++ do \ ++ { \ ++ if (BUFLEN < MB_LEN_MAX && !feof (STREAM) && !ferror (STREAM)) \ ++ { \ ++ memmove (BUF, BUFPOS, BUFLEN); \ ++ BUFLEN += fread (BUF + BUFLEN, sizeof(char), BUFSIZ, STREAM); \ ++ BUFPOS = BUF; \ ++ } \ ++ } \ ++ while (0) ++ ++/* Get wide character on BUFPOS. BUFPOS is not included after that. ++ If byte sequence is not valid as a character, CONVFAIL is true. Otherwise false. */ ++#define GET_NEXT_WC_FROM_BUFFER(WC, BUFPOS, BUFLEN, MBLENGTH, STATE, CONVFAIL) \ ++ do \ ++ { \ ++ mbstate_t state_bak; \ ++ \ ++ if (BUFLEN < 1) \ ++ { \ ++ WC = WEOF; \ ++ break; \ ++ } \ ++ \ ++ /* Get a wide character. */ \ ++ CONVFAIL = false; \ ++ state_bak = STATE; \ ++ MBLENGTH = mbrtowc ((wchar_t *)&WC, BUFPOS, BUFLEN, &STATE); \ ++ \ ++ switch (MBLENGTH) \ ++ { \ ++ case (size_t)-1: \ ++ case (size_t)-2: \ ++ CONVFAIL = true; \ ++ STATE = state_bak; \ ++ /* Fall througn. */ \ ++ \ ++ case 0: \ ++ MBLENGTH = 1; \ ++ break; \ ++ } \ ++ } \ ++ while (0) ++ + + /* Pointer inside RP. When checking if a byte or field is selected + by a finite range, we check if it is between CURRENT_RP.LO +@@ -60,6 +123,9 @@ + CURRENT_RP.HI then we make CURRENT_RP to point to the next range pair. */ + static struct field_range_pair *current_rp; + ++/* Length of the delimiter given as argument to -d. */ ++size_t delimlen; ++ + /* This buffer is used to support the semantics of the -s option + (or lack of same) when the specified field list includes (does + not include) the first field. In both of those cases, the entire +@@ -72,6 +138,29 @@ static char *field_1_buffer; + /* The number of bytes allocated for FIELD_1_BUFFER. */ + static size_t field_1_bufsize; + ++enum operating_mode ++ { ++ undefined_mode, ++ ++ /* Output bytes that are at the given positions. */ ++ byte_mode, ++ ++ /* Output characters that are at the given positions. */ ++ character_mode, ++ ++ /* Output the given delimiter-separated fields. */ ++ field_mode ++ }; ++ ++static enum operating_mode operating_mode; ++ ++/* If nonzero, when in byte mode, don't split multibyte characters. */ ++static int byte_mode_character_aware; ++ ++/* If nonzero, the function for single byte locale is work ++ if this program runs on multibyte locale. */ ++static int force_singlebyte_mode; ++ + /* If true do not output lines containing no delimiter characters. + Otherwise, all such lines are printed. This option is valid only + with field mode. */ +@@ -83,10 +172,16 @@ static bool complement; + + /* The delimiter character for field mode. */ + static unsigned char delim; ++#if HAVE_WCHAR_H ++static wchar_t wcdelim; ++#endif + + /* The delimiter for each line/record. */ + static unsigned char line_delim = '\n'; + ++/* True if the --output-delimiter=STRING option was specified. */ ++static bool output_delimiter_specified; ++ + /* The length of output_delimiter_string. */ + static size_t output_delimiter_length; + +@@ -94,9 +189,6 @@ static size_t output_delimiter_length; + string consisting of the input delimiter. */ + static char *output_delimiter_string; + +-/* The output delimiter string contents, if the default. */ +-static char output_delimiter_default[1]; +- + /* True if we have ever read standard input. */ + static bool have_read_stdin; + +@@ -150,7 +242,7 @@ Print selected parts of lines from each FILE to standard output.\n\ + -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\ +- -n (ignored)\n\ ++ -n with -b: don't split multibyte characters\n\ + "), stdout); + fputs (_("\ + --complement complement the set of selected bytes, characters\n\ +@@ -250,7 +342,7 @@ cut_bytes (FILE *stream) + next_item (&byte_idx); + if (print_kth (byte_idx)) + { +- if (output_delimiter_string != output_delimiter_default) ++ if (output_delimiter_specified) + { + if (print_delimiter && is_range_start_index (byte_idx)) + { +@@ -266,6 +358,82 @@ cut_bytes (FILE *stream) + } + } + ++#if HAVE_MBRTOWC ++/* This function is in use for the following case. ++ ++ 1. Read from the stream STREAM, printing to standard output any selected ++ characters. ++ ++ 2. Read from stream STREAM, printing to standard output any selected bytes, ++ without splitting multibyte characters. */ ++ ++static void ++cut_characters_or_cut_bytes_no_split (FILE *stream) ++{ ++ uintmax_t idx; /* number of bytes or characters in the line so far. */ ++ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ ++ char *bufpos; /* Next read position of BUF. */ ++ size_t buflen; /* The length of the byte sequence in buf. */ ++ wint_t wc; /* A gotten wide character. */ ++ size_t mblength; /* The byte size of a multibyte character which shows ++ as same character as WC. */ ++ mbstate_t state; /* State of the stream. */ ++ bool convfail = false; /* true, when conversion failed. Otherwise false. */ ++ /* Whether to begin printing delimiters between ranges for the current line. ++ Set after we've begun printing data corresponding to the first range. */ ++ bool print_delimiter = false; ++ ++ idx = 0; ++ buflen = 0; ++ bufpos = buf; ++ memset (&state, '\0', sizeof(mbstate_t)); ++ ++ current_rp = frp; ++ ++ while (1) ++ { ++ REFILL_BUFFER (buf, bufpos, buflen, stream); ++ ++ GET_NEXT_WC_FROM_BUFFER (wc, bufpos, buflen, mblength, state, convfail); ++ (void) convfail; /* ignore unused */ ++ ++ if (wc == WEOF) ++ { ++ if (idx > 0) ++ putchar (line_delim); ++ break; ++ } ++ else if (wc == line_delim) ++ { ++ putchar (line_delim); ++ idx = 0; ++ print_delimiter = false; ++ current_rp = frp; ++ } ++ else ++ { ++ next_item (&idx); ++ if (print_kth (idx)) ++ { ++ if (output_delimiter_specified) ++ { ++ if (print_delimiter && is_range_start_index (idx)) ++ { ++ fwrite (output_delimiter_string, sizeof (char), ++ output_delimiter_length, stdout); ++ } ++ print_delimiter = true; ++ } ++ fwrite (bufpos, mblength, sizeof(char), stdout); ++ } ++ } ++ ++ buflen -= mblength; ++ bufpos += mblength; ++ } ++} ++#endif ++ + /* Read from stream STREAM, printing to standard output any selected fields. */ + + static void +@@ -411,11 +579,218 @@ cut_fields (FILE *stream) + } + } + +-/* Process file FILE to standard output, using CUT_STREAM. ++#if HAVE_MBRTOWC ++static void ++cut_fields_mb (FILE *stream) ++{ ++ int c; ++ uintmax_t field_idx; ++ int found_any_selected_field; ++ int buffer_first_field; ++ int empty_input; ++ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ ++ char *bufpos; /* Next read position of BUF. */ ++ size_t buflen; /* The length of the byte sequence in buf. */ ++ wint_t wc = 0; /* A gotten wide character. */ ++ size_t mblength; /* The byte size of a multibyte character which shows ++ as same character as WC. */ ++ mbstate_t state; /* State of the stream. */ ++ bool convfail = false; /* true, when conversion failed. Otherwise false. */ ++ ++ current_rp = frp; ++ ++ found_any_selected_field = 0; ++ field_idx = 1; ++ bufpos = buf; ++ buflen = 0; ++ memset (&state, '\0', sizeof(mbstate_t)); ++ ++ c = getc (stream); ++ empty_input = (c == EOF); ++ if (c != EOF) ++ { ++ ungetc (c, stream); ++ wc = 0; ++ } ++ else ++ wc = WEOF; ++ ++ /* To support the semantics of the -s flag, we may have to buffer ++ all of the first field to determine whether it is `delimited.' ++ But that is unnecessary if all non-delimited lines must be printed ++ and the first field has been selected, or if non-delimited lines ++ must be suppressed and the first field has *not* been selected. ++ That is because a non-delimited line has exactly one field. */ ++ buffer_first_field = (suppress_non_delimited ^ !print_kth (1)); ++ ++ while (1) ++ { ++ if (field_idx == 1 && buffer_first_field) ++ { ++ int len = 0; ++ ++ while (1) ++ { ++ REFILL_BUFFER (buf, bufpos, buflen, stream); ++ ++ GET_NEXT_WC_FROM_BUFFER ++ (wc, bufpos, buflen, mblength, state, convfail); ++ ++ if (wc == WEOF) ++ break; ++ ++ field_1_buffer = xrealloc (field_1_buffer, len + mblength); ++ memcpy (field_1_buffer + len, bufpos, mblength); ++ len += mblength; ++ buflen -= mblength; ++ bufpos += mblength; ++ ++ if (!convfail && (wc == line_delim || wc == wcdelim)) ++ break; ++ } ++ ++ if (len <= 0 && wc == WEOF) ++ break; ++ ++ /* If the first field extends to the end of line (it is not ++ delimited) and we are printing all non-delimited lines, ++ print this one. */ ++ if (convfail || (!convfail && wc != wcdelim)) ++ { ++ if (suppress_non_delimited) ++ { ++ /* Empty. */ ++ } ++ else ++ { ++ fwrite (field_1_buffer, sizeof (char), len, stdout); ++ /* Make sure the output line is newline terminated. */ ++ if (convfail || (!convfail && wc != line_delim)) ++ putchar (line_delim); ++ } ++ continue; ++ } ++ ++ if (print_kth (1)) ++ { ++ /* Print the field, but not the trailing delimiter. */ ++ fwrite (field_1_buffer, sizeof (char), len - 1, stdout); ++ found_any_selected_field = 1; ++ } ++ next_item (&field_idx); ++ } ++ ++ if (wc != WEOF) ++ { ++ if (print_kth (field_idx)) ++ { ++ if (found_any_selected_field) ++ { ++ fwrite (output_delimiter_string, sizeof (char), ++ output_delimiter_length, stdout); ++ } ++ found_any_selected_field = 1; ++ } ++ ++ while (1) ++ { ++ REFILL_BUFFER (buf, bufpos, buflen, stream); ++ ++ GET_NEXT_WC_FROM_BUFFER ++ (wc, bufpos, buflen, mblength, state, convfail); ++ ++ if (wc == WEOF) ++ break; ++ else if (!convfail && (wc == wcdelim || wc == line_delim)) ++ { ++ buflen -= mblength; ++ bufpos += mblength; ++ break; ++ } ++ ++ if (print_kth (field_idx)) ++ fwrite (bufpos, mblength, sizeof(char), stdout); ++ ++ buflen -= mblength; ++ bufpos += mblength; ++ } ++ } ++ ++ if ((!convfail || wc == line_delim) && buflen < 1) ++ wc = WEOF; ++ ++ if (!convfail && wc == wcdelim) ++ next_item (&field_idx); ++ else if (wc == WEOF || (!convfail && wc == line_delim)) ++ { ++ if (found_any_selected_field ++ || (!empty_input && !(suppress_non_delimited && field_idx == 1))) ++ putchar (line_delim); ++ if (wc == WEOF) ++ break; ++ field_idx = 1; ++ current_rp = frp; ++ found_any_selected_field = 0; ++ } ++ } ++} ++#endif ++ ++static void ++cut_stream (FILE *stream) ++{ ++#if HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1 && !force_singlebyte_mode) ++ { ++ switch (operating_mode) ++ { ++ case byte_mode: ++ if (byte_mode_character_aware) ++ cut_characters_or_cut_bytes_no_split (stream); ++ else ++ cut_bytes (stream); ++ break; ++ ++ case character_mode: ++ cut_characters_or_cut_bytes_no_split (stream); ++ break; ++ ++ case field_mode: ++ if (delimlen == 1) ++ { ++ /* 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: ++ abort (); ++ } ++ } ++ else ++#endif ++ { ++ if (operating_mode == field_mode) ++ cut_fields (stream); ++ else ++ cut_bytes (stream); ++ } ++} ++ ++/* Process file FILE to standard output. + Return true if successful. */ + + static bool +-cut_file (char const *file, void (*cut_stream) (FILE *)) ++cut_file (char const *file) + { + FILE *stream; + +@@ -459,8 +834,8 @@ main (int argc, char **argv) + int optc; + bool ok; + bool delim_specified = false; +- bool byte_mode = false; +- char *spec_list_string = NULL; ++ char *spec_list_string IF_LINT ( = NULL); ++ char mbdelim[MB_LEN_MAX + 1]; + + initialize_main (&argc, &argv); + set_program_name (argv[0]); +@@ -470,6 +845,8 @@ main (int argc, char **argv) + + atexit (close_stdout); + ++ operating_mode = undefined_mode; ++ + /* By default, all non-delimited lines are printed. */ + suppress_non_delimited = false; + +@@ -481,35 +858,77 @@ main (int argc, char **argv) + switch (optc) + { + case 'b': +- case 'c': + /* Build the byte list. */ +- byte_mode = true; +- FALLTHROUGH; ++ if (operating_mode != undefined_mode) ++ FATAL_ERROR (_("only one type of list may be specified")); ++ operating_mode = byte_mode; ++ spec_list_string = optarg; ++ break; ++ ++ case 'c': ++ /* Build the character list. */ ++ if (operating_mode != undefined_mode) ++ FATAL_ERROR (_("only one type of list may be specified")); ++ operating_mode = character_mode; ++ spec_list_string = optarg; ++ break; ++ + case 'f': + /* Build the field list. */ +- if (spec_list_string) +- FATAL_ERROR (_("only one list may be specified")); ++ if (operating_mode != undefined_mode) ++ FATAL_ERROR (_("only one type of list may be specified")); ++ operating_mode = field_mode; + spec_list_string = optarg; + break; + + case 'd': + /* New delimiter. */ + /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ +- if (optarg[0] != '\0' && optarg[1] != '\0') +- FATAL_ERROR (_("the delimiter must be a single character")); +- delim = optarg[0]; +- delim_specified = true; ++ { ++#if HAVE_MBRTOWC ++ if(MB_CUR_MAX > 1) ++ { ++ mbstate_t state; ++ ++ memset (&state, '\0', sizeof(mbstate_t)); ++ delimlen = mbrtowc (&wcdelim, optarg, strnlen(optarg, MB_LEN_MAX), &state); ++ ++ if (delimlen == (size_t)-1 || delimlen == (size_t)-2) ++ ++force_singlebyte_mode; ++ else ++ { ++ delimlen = (delimlen < 1) ? 1 : delimlen; ++ if (wcdelim != L'\0' && *(optarg + delimlen) != '\0') ++ FATAL_ERROR (_("the delimiter must be a single character")); ++ memcpy (mbdelim, optarg, delimlen); ++ mbdelim[delimlen] = '\0'; ++ if (delimlen == 1) ++ delim = *optarg; ++ } ++ } ++ ++ if (MB_CUR_MAX <= 1 || force_singlebyte_mode) ++#endif ++ { ++ if (optarg[0] != '\0' && optarg[1] != '\0') ++ FATAL_ERROR (_("the delimiter must be a single character")); ++ delim = (unsigned char) optarg[0]; ++ } ++ delim_specified = true; ++ } + break; + + case OUTPUT_DELIMITER_OPTION: ++ output_delimiter_specified = true; + /* Interpret --output-delimiter='' to mean + 'use the NUL byte as the delimiter.' */ + output_delimiter_length = (optarg[0] == '\0' + ? 1 : strlen (optarg)); +- output_delimiter_string = optarg; ++ output_delimiter_string = xstrdup (optarg); + break; + + case 'n': ++ byte_mode_character_aware = 1; + break; + + case 's': +@@ -533,40 +952,57 @@ main (int argc, char **argv) + } + } + +- if (!spec_list_string) ++ if (operating_mode == undefined_mode) + FATAL_ERROR (_("you must specify a list of bytes, characters, or fields")); + +- if (byte_mode) +- { +- if (delim_specified) +- FATAL_ERROR (_("an input delimiter may be specified only\ ++ if (delim_specified && operating_mode != field_mode) ++ FATAL_ERROR (_("an input delimiter may be specified only\ + when operating on fields")); + +- if (suppress_non_delimited) +- FATAL_ERROR (_("suppressing non-delimited lines makes sense\n\ ++ if (suppress_non_delimited && operating_mode != field_mode) ++ FATAL_ERROR (_("suppressing non-delimited lines makes sense\n\ + \tonly when operating on fields")); +- } + + set_fields (spec_list_string, +- ((byte_mode ? SETFLD_ERRMSG_USE_POS : 0) +- | (complement ? SETFLD_COMPLEMENT : 0))); ++ ( (operating_mode == field_mode) ? 0 : SETFLD_ERRMSG_USE_POS) ++ | (complement ? SETFLD_COMPLEMENT : 0) ); + + if (!delim_specified) +- delim = '\t'; ++ { ++ delim = '\t'; ++#ifdef HAVE_MBRTOWC ++ wcdelim = L'\t'; ++ mbdelim[0] = '\t'; ++ mbdelim[1] = '\0'; ++ delimlen = 1; ++#endif ++ } + + if (output_delimiter_string == NULL) + { +- output_delimiter_default[0] = delim; +- output_delimiter_string = output_delimiter_default; +- output_delimiter_length = 1; ++#ifdef HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1 && !force_singlebyte_mode) ++ { ++ output_delimiter_string = xstrdup(mbdelim); ++ output_delimiter_length = delimlen; ++ } ++ ++ if (MB_CUR_MAX <= 1 || force_singlebyte_mode) ++#endif ++ { ++ static char dummy[2]; ++ dummy[0] = delim; ++ dummy[1] = '\0'; ++ output_delimiter_string = dummy; ++ output_delimiter_length = 1; ++ } + } + +- void (*cut_stream) (FILE *) = byte_mode ? cut_bytes : cut_fields; + if (optind == argc) +- ok = cut_file ("-", cut_stream); ++ ok = cut_file ("-"); + else + for (ok = true; optind < argc; optind++) +- ok &= cut_file (argv[optind], cut_stream); ++ ok &= cut_file (argv[optind]); + + + if (have_read_stdin && fclose (stdin) == EOF) +diff --git a/src/expand-common.c b/src/expand-common.c +index deec1bd..b39f740 100644 +--- a/src/expand-common.c ++++ b/src/expand-common.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include "system.h" + #include "die.h" + #include "error.h" +@@ -125,6 +126,119 @@ set_increment_size (uintmax_t tabval) + return ok; + } + ++extern int ++set_utf_locale (void) ++{ ++ /*try using some predefined locale */ ++ const char* predef_locales[] = {"C.UTF8","en_US.UTF8","en_GB.UTF8"}; ++ ++ const int predef_locales_count=3; ++ for (int i=0;ibufcount=0; ++ if (c == 0xEF) ++ { ++ c=fgetc(fp); ++ } ++ else ++ { ++ if (c != EOF) ++ { ++ ungetc(c,fp); ++ } ++ return false; ++ } ++ ++ if (c == 0xBB) ++ { ++ c=fgetc(fp); ++ } ++ else ++ { ++ if ( c!= EOF ) ++ { ++ mbf->buf[0]=(unsigned char) 0xEF; ++ mbf->bufcount=1; ++ ungetc(c,fp); ++ return false; ++ } ++ else ++ { ++ ungetc(0xEF,fp); ++ return false; ++ } ++ } ++ if (c == 0xBF) ++ { ++ mbf->bufcount=0; ++ return true; ++ } ++ else ++ { ++ if (c != EOF) ++ { ++ mbf->buf[0]=(unsigned char) 0xEF; ++ mbf->buf[1]=(unsigned char) 0xBB; ++ mbf->bufcount=2; ++ ungetc(c,fp); ++ return false; ++ } ++ else ++ { ++ mbf->buf[0]=(unsigned char) 0xEF; ++ mbf->bufcount=1; ++ ungetc(0xBB,fp); ++ return false; ++ } ++ } ++ return false; ++} ++ ++extern void ++print_bom(void) ++{ ++ putc (0xEF, stdout); ++ putc (0xBB, stdout); ++ putc (0xBF, stdout); ++} ++ + /* Add the comma or blank separated list of tab stops STOPS + to the list of tab stops. */ + extern void +diff --git a/src/expand-common.h b/src/expand-common.h +index 5f59a0e..835b9d5 100644 +--- a/src/expand-common.h ++++ b/src/expand-common.h +@@ -25,6 +25,18 @@ extern size_t max_column_width; + /* The desired exit status. */ + extern int exit_status; + ++extern int ++set_utf_locale (void); ++ ++extern bool ++check_utf_locale(void); ++ ++extern bool ++check_bom(FILE* fp, mb_file_t *mbf); ++ ++extern void ++print_bom(void); ++ + /* Add tab stop TABVAL to the end of 'tab_list'. */ + extern void + add_tab_stop (uintmax_t tabval); +diff --git a/src/expand.c b/src/expand.c +index ed78ca8..a4cefa1 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -37,6 +37,9 @@ + #include + #include + #include ++ ++#include ++ + #include "system.h" + #include "die.h" + +@@ -97,19 +100,41 @@ expand (void) + { + /* Input stream. */ + FILE *fp = next_file (NULL); ++ mb_file_t mbf; ++ mbf_char_t c; ++ /* True if the starting locale is utf8. */ ++ bool using_utf_locale; ++ ++ /* True if the first file contains BOM header. */ ++ bool found_bom; ++ using_utf_locale=check_utf_locale(); + + if (!fp) + return; ++ mbf_init (mbf, fp); ++ found_bom=check_bom(fp,&mbf); + +- while (true) ++ if (using_utf_locale == false && found_bom == true) ++ { ++ /*try using some predefined locale */ ++ ++ if (set_utf_locale () != 0) + { +- /* Input character, or EOF. */ +- int c; ++ error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale")); ++ } ++ } ++ ++ ++ if (found_bom == true) ++ { ++ print_bom(); ++ } + ++ while (true) ++ { + /* If true, perform translations. */ + bool convert = true; + +- + /* The following variables have valid values only when CONVERT + is true: */ + +@@ -119,17 +144,48 @@ expand (void) + /* Index in TAB_LIST of next tab stop to examine. */ + size_t tab_index = 0; + +- + /* Convert a line of text. */ + + do + { +- while ((c = getc (fp)) < 0 && (fp = next_file (fp))) +- continue; ++ while (true) { ++ mbf_getc (c, mbf); ++ if ((mb_iseof (c)) && (fp = next_file (fp))) ++ { ++ mbf_init (mbf, fp); ++ if (fp!=NULL) ++ { ++ if (check_bom(fp,&mbf)==true) ++ { ++ /*Not the first file - check BOM header*/ ++ if (using_utf_locale==false && found_bom==false) ++ { ++ /*BOM header in subsequent file but not in the first one. */ ++ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); ++ } ++ } ++ else ++ { ++ if(using_utf_locale==false && found_bom==true) ++ { ++ /*First file conatined BOM header - locale was switched to UTF ++ *all subsequent files should contain BOM. */ ++ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); ++ } ++ } ++ } ++ continue; ++ } ++ else ++ { ++ break; ++ } ++ } ++ + + if (convert) + { +- if (c == '\t') ++ if (mb_iseq (c, '\t')) + { + /* Column the next input tab stop is on. */ + uintmax_t next_tab_column; +@@ -148,32 +204,34 @@ expand (void) + if (putchar (' ') < 0) + die (EXIT_FAILURE, errno, _("write error")); + +- c = ' '; ++ mb_setascii (&c, ' '); + } +- else if (c == '\b') ++ else if (mb_iseq (c, '\b')) + { + /* Go back one column, and force recalculation of the + next tab stop. */ + column -= !!column; + tab_index -= !!tab_index; + } +- else ++ /* A leading control character could make us trip over. */ ++ else if (!mb_iscntrl (c)) + { +- column++; ++ column += mb_width (c); + if (!column) + die (EXIT_FAILURE, 0, _("input line is too long")); + } + +- convert &= convert_entire_line || !! isblank (c); ++ convert &= convert_entire_line || mb_isblank (c); + } + +- if (c < 0) ++ if (mb_iseof (c)) + return; + +- if (putchar (c) < 0) ++ mb_putc (c, stdout); ++ if (ferror (stdout)) + die (EXIT_FAILURE, errno, _("write error")); + } +- while (c != '\n'); ++ while (!mb_iseq (c, '\n')); + } + } + diff --git a/src/fold.c b/src/fold.c -index 8cd0d6b..d23edd5 100644 +index f07a90b..d32dbfd 100644 --- a/src/fold.c +++ b/src/fold.c @@ -22,12 +22,34 @@ @@ -203,12 +1507,15 @@ index 8cd0d6b..d23edd5 100644 /* Look for the last blank. */ while (logical_end) { -@@ -215,11 +252,221 @@ fold_file (char const *filename, size_t width) +@@ -215,13 +252,225 @@ fold_file (char const *filename, size_t width) line_out[offset_out++] = c; } - saved_errno = errno; + *saved_errno = errno; + if (!ferror (istream)) +- saved_errno = 0; ++ *saved_errno = 0; if (offset_out) fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); @@ -384,6 +1691,8 @@ index 8cd0d6b..d23edd5 100644 + } + + *saved_errno = errno; ++ if (!ferror (istream)) ++ *saved_errno = 0; + + if (offset_out) + fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); @@ -423,10 +1732,10 @@ index 8cd0d6b..d23edd5 100644 +#endif + fold_text (istream, width, &saved_errno); + - if (ferror (istream)) - { - error (0, saved_errno, "%s", quotef (filename)); -@@ -252,7 +499,8 @@ main (int argc, char **argv) + if (STREQ (filename, "-")) + clearerr (istream); + else if (fclose (istream) != 0 && !saved_errno) +@@ -252,7 +501,8 @@ main (int argc, char **argv) atexit (close_stdout); @@ -436,7 +1745,7 @@ index 8cd0d6b..d23edd5 100644 while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) { -@@ -261,7 +509,15 @@ main (int argc, char **argv) +@@ -261,7 +511,15 @@ main (int argc, char **argv) switch (optc) { case 'b': /* Count bytes rather than columns. */ @@ -454,7 +1763,7 @@ index 8cd0d6b..d23edd5 100644 case 's': /* Break at word boundaries. */ diff --git a/src/join.c b/src/join.c -index 98b461c..9990f38 100644 +index f2fd172..6c7d1ed 100644 --- a/src/join.c +++ b/src/join.c @@ -22,19 +22,33 @@ @@ -509,7 +1818,7 @@ index 98b461c..9990f38 100644 /* If nonzero, check that the input is correctly ordered. */ static enum -@@ -276,13 +292,14 @@ xfields (struct line *line) +@@ -280,13 +296,14 @@ xfields (struct line *line) if (ptr == lim) return; @@ -527,7 +1836,7 @@ index 98b461c..9990f38 100644 { /* Skip leading blanks before the first field. */ while (field_sep (*ptr)) -@@ -306,6 +323,147 @@ xfields (struct line *line) +@@ -310,6 +327,147 @@ xfields (struct line *line) extract_field (line, ptr, lim - ptr); } @@ -675,7 +1984,7 @@ index 98b461c..9990f38 100644 static void freeline (struct line *line) { -@@ -327,56 +485,133 @@ keycmp (struct line const *line1, struct line const *line2, +@@ -331,56 +489,133 @@ keycmp (struct line const *line1, struct line const *line2, size_t jf_1, size_t jf_2) { /* Start of field to compare in each file. */ @@ -832,7 +2141,7 @@ index 98b461c..9990f38 100644 } /* Check that successive input lines PREV and CURRENT from input file -@@ -468,6 +703,11 @@ get_line (FILE *fp, struct line **linep, int which) +@@ -472,6 +707,11 @@ get_line (FILE *fp, struct line **linep, int which) } ++line_no[which - 1]; @@ -844,7 +2153,7 @@ index 98b461c..9990f38 100644 xfields (line); if (prevline[which - 1]) -@@ -563,21 +803,28 @@ prfield (size_t n, struct line const *line) +@@ -567,21 +807,28 @@ prfield (size_t n, struct line const *line) /* Output all the fields in line, other than the join field. */ @@ -876,7 +2185,7 @@ index 98b461c..9990f38 100644 prfield (i, line); } } -@@ -588,7 +835,6 @@ static void +@@ -592,7 +839,6 @@ static void prjoin (struct line const *line1, struct line const *line2) { const struct outlist *outlist; @@ -884,7 +2193,7 @@ index 98b461c..9990f38 100644 size_t field; struct line const *line; -@@ -622,7 +868,7 @@ prjoin (struct line const *line1, struct line const *line2) +@@ -626,7 +872,7 @@ prjoin (struct line const *line1, struct line const *line2) o = o->next; if (o == NULL) break; @@ -893,7 +2202,7 @@ index 98b461c..9990f38 100644 } putchar (eolchar); } -@@ -1098,20 +1344,43 @@ main (int argc, char **argv) +@@ -1102,20 +1348,43 @@ main (int argc, char **argv) case 't': { @@ -946,8 +2255,23 @@ index 98b461c..9990f38 100644 } break; +diff --git a/src/local.mk b/src/local.mk +index e1d15ce..1a5ffaa 100644 +--- a/src/local.mk ++++ b/src/local.mk +@@ -434,8 +434,8 @@ src_base32_CPPFLAGS = -DBASE_TYPE=32 $(AM_CPPFLAGS) + src_basenc_SOURCES = src/basenc.c + src_basenc_CPPFLAGS = -DBASE_TYPE=42 $(AM_CPPFLAGS) + +-src_expand_SOURCES = src/expand.c src/expand-common.c +-src_unexpand_SOURCES = src/unexpand.c src/expand-common.c ++src_expand_SOURCES = src/expand.c src/expand-common.c lib/mbfile.c ++src_unexpand_SOURCES = src/unexpand.c src/expand-common.c lib/mbfile.c + + src_wc_SOURCES = src/wc.c + if USE_AVX2_WC_LINECOUNT diff --git a/src/pr.c b/src/pr.c -index 26f221f..633f50e 100644 +index 4c17c00..b4fab1c 100644 --- a/src/pr.c +++ b/src/pr.c @@ -311,6 +311,24 @@ @@ -1017,8 +2341,8 @@ index 26f221f..633f50e 100644 static bool print_page (void); static bool print_stored (COLUMN *p); @@ -429,6 +472,7 @@ static void add_line_number (COLUMN *p); - static void getoptnum (const char *n_str, int min, int *num, - const char *errfmt); + static void getoptnum (char const *n_str, int min, int *num, + char const *errfmt); static void getoptarg (char *arg, char switch_char, char *character, + int *character_length, int *character_width, int *number); @@ -1031,7 +2355,7 @@ index 26f221f..633f50e 100644 -static void print_char (char c); static void cleanup (void); static void print_sep_string (void); - static void separator_string (const char *optarg_S); + static void separator_string (char const *optarg_S); @@ -454,7 +497,7 @@ static COLUMN *column_vector; we store the leftmost columns contiguously in buff. To print a line from buff, get the index of the first character @@ -1085,7 +2409,7 @@ index 26f221f..633f50e 100644 static char *column_separator = (char *) " "; static char *line_separator = (char *) "\t"; -@@ -852,6 +905,13 @@ separator_string (const char *optarg_S) +@@ -853,6 +906,13 @@ separator_string (char const *optarg_S) integer_overflow (); col_sep_length = len; col_sep_string = optarg_S; @@ -1099,7 +2423,7 @@ index 26f221f..633f50e 100644 } int -@@ -876,6 +936,21 @@ main (int argc, char **argv) +@@ -877,6 +937,21 @@ main (int argc, char **argv) atexit (close_stdout); @@ -1121,7 +2445,7 @@ index 26f221f..633f50e 100644 n_files = 0; file_names = (argc > 1 ? xnmalloc (argc - 1, sizeof (char *)) -@@ -952,8 +1027,12 @@ main (int argc, char **argv) +@@ -953,8 +1028,12 @@ main (int argc, char **argv) break; case 'e': if (optarg) @@ -1136,7 +2460,7 @@ index 26f221f..633f50e 100644 /* Could check tab width > 0. */ untabify_input = true; break; -@@ -966,8 +1045,12 @@ main (int argc, char **argv) +@@ -967,8 +1046,12 @@ main (int argc, char **argv) break; case 'i': if (optarg) @@ -1151,7 +2475,7 @@ index 26f221f..633f50e 100644 /* Could check tab width > 0. */ tabify_output = true; break; -@@ -985,8 +1068,8 @@ main (int argc, char **argv) +@@ -986,8 +1069,8 @@ main (int argc, char **argv) case 'n': numbered_lines = true; if (optarg) @@ -1162,7 +2486,7 @@ index 26f221f..633f50e 100644 break; case 'N': skip_count = false; -@@ -1011,6 +1094,7 @@ main (int argc, char **argv) +@@ -1012,6 +1095,7 @@ main (int argc, char **argv) /* Reset an additional input of -s, -S dominates -s */ col_sep_string = ""; col_sep_length = 0; @@ -1170,7 +2494,7 @@ index 26f221f..633f50e 100644 use_col_separator = true; if (optarg) separator_string (optarg); -@@ -1166,10 +1250,45 @@ getoptnum (const char *n_str, int min, int *num, const char *err) +@@ -1166,10 +1250,45 @@ getoptnum (char const *n_str, int min, int *num, char const *err) a number. */ static void @@ -1239,7 +2563,7 @@ index 26f221f..633f50e 100644 use_col_separator = true; } /* It's rather pointless to define a TAB separator with column -@@ -1258,11 +1382,11 @@ init_parameters (int number_of_files) +@@ -1260,11 +1384,11 @@ init_parameters (int number_of_files) + TAB_WIDTH (chars_per_input_tab, chars_per_number); */ /* Estimate chars_per_text without any margin and keep it constant. */ @@ -1253,7 +2577,7 @@ index 26f221f..633f50e 100644 /* The number is part of the column width unless we are printing files in parallel. */ -@@ -1271,7 +1395,7 @@ init_parameters (int number_of_files) +@@ -1273,7 +1397,7 @@ init_parameters (int number_of_files) } int sep_chars, useful_chars; @@ -1262,7 +2586,7 @@ index 26f221f..633f50e 100644 sep_chars = INT_MAX; if (INT_SUBTRACT_WRAPV (chars_per_line - chars_used_by_number, sep_chars, &useful_chars)) -@@ -1294,7 +1418,7 @@ init_parameters (int number_of_files) +@@ -1296,7 +1420,7 @@ init_parameters (int number_of_files) We've to use 8 as the lower limit, if we use chars_per_default_tab = 8 to expand a tab which is not an input_tab-char. */ free (clump_buff); @@ -1271,7 +2595,7 @@ index 26f221f..633f50e 100644 } /* Open the necessary files, -@@ -1400,7 +1524,7 @@ init_funcs (void) +@@ -1402,7 +1526,7 @@ init_funcs (void) /* Enlarge p->start_position of first column to use the same form of padding_not_printed with all columns. */ @@ -1280,7 +2604,7 @@ index 26f221f..633f50e 100644 /* This loop takes care of all but the rightmost column. */ -@@ -1434,7 +1558,7 @@ init_funcs (void) +@@ -1436,7 +1560,7 @@ init_funcs (void) } else { @@ -1289,7 +2613,7 @@ index 26f221f..633f50e 100644 h_next = h + chars_per_column; } } -@@ -1725,9 +1849,9 @@ static void +@@ -1733,9 +1857,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -1301,7 +2625,7 @@ index 26f221f..633f50e 100644 padding_not_printed = ANYWHERE; } -@@ -2002,13 +2126,13 @@ store_char (char c) +@@ -2010,13 +2134,13 @@ store_char (char c) /* May be too generous. */ buff = X2REALLOC (buff, &buff_allocated); } @@ -1317,7 +2641,7 @@ index 26f221f..633f50e 100644 char *s; int num_width; -@@ -2025,22 +2149,24 @@ add_line_number (COLUMN *p) +@@ -2033,22 +2157,24 @@ add_line_number (COLUMN *p) /* Tabification is assumed for multiple columns, also for n-separators, but 'default n-separator = TAB' hasn't been given priority over equal column_width also specified by POSIX. */ @@ -1346,7 +2670,7 @@ index 26f221f..633f50e 100644 output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2199,7 +2325,7 @@ print_white_space (void) +@@ -2207,7 +2333,7 @@ print_white_space (void) while (goal - h_old > 1 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) { @@ -1355,7 +2679,7 @@ index 26f221f..633f50e 100644 h_old = h_new; } while (++h_old <= goal) -@@ -2219,6 +2345,7 @@ print_sep_string (void) +@@ -2227,6 +2353,7 @@ print_sep_string (void) { char const *s = col_sep_string; int l = col_sep_length; @@ -1363,7 +2687,7 @@ index 26f221f..633f50e 100644 if (separators_not_printed <= 0) { -@@ -2230,6 +2357,7 @@ print_sep_string (void) +@@ -2238,6 +2365,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -1371,7 +2695,7 @@ index 26f221f..633f50e 100644 while (l-- > 0) { /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2243,12 +2371,15 @@ print_sep_string (void) +@@ -2251,12 +2379,15 @@ print_sep_string (void) } else { @@ -1388,7 +2712,7 @@ index 26f221f..633f50e 100644 /* sep_string ends with some spaces */ if (spaces_not_printed > 0) print_white_space (); -@@ -2276,7 +2407,7 @@ print_clump (COLUMN *p, int n, char *clump) +@@ -2284,7 +2415,7 @@ print_clump (COLUMN *p, int n, char *clump) required number of tabs and spaces. */ static void @@ -1397,7 +2721,7 @@ index 26f221f..633f50e 100644 { if (tabify_output) { -@@ -2300,6 +2431,74 @@ print_char (char c) +@@ -2308,6 +2439,74 @@ print_char (char c) putchar (c); } @@ -1472,7 +2796,7 @@ index 26f221f..633f50e 100644 /* Skip to page PAGE before printing. PAGE may be larger than total number of pages. */ -@@ -2477,9 +2676,9 @@ read_line (COLUMN *p) +@@ -2485,9 +2684,9 @@ read_line (COLUMN *p) align_empty_cols = false; } @@ -1484,7 +2808,7 @@ index 26f221f..633f50e 100644 padding_not_printed = ANYWHERE; } -@@ -2548,7 +2747,7 @@ print_stored (COLUMN *p) +@@ -2556,7 +2755,7 @@ print_stored (COLUMN *p) COLUMN *q; int line = p->current_line++; @@ -1493,7 +2817,7 @@ index 26f221f..633f50e 100644 /* FIXME UMR: Uninitialized memory read: * This is occurring while in: -@@ -2560,7 +2759,7 @@ print_stored (COLUMN *p) +@@ -2568,7 +2767,7 @@ print_stored (COLUMN *p) xmalloc [xmalloc.c:94] init_store_cols [pr.c:1648] */ @@ -1502,7 +2826,7 @@ index 26f221f..633f50e 100644 pad_vertically = true; -@@ -2580,9 +2779,9 @@ print_stored (COLUMN *p) +@@ -2588,9 +2787,9 @@ print_stored (COLUMN *p) } } @@ -1514,7 +2838,7 @@ index 26f221f..633f50e 100644 padding_not_printed = ANYWHERE; } -@@ -2595,8 +2794,8 @@ print_stored (COLUMN *p) +@@ -2603,8 +2802,8 @@ print_stored (COLUMN *p) if (spaces_not_printed == 0) { output_position = p->start_position + end_vector[line]; @@ -1525,7 +2849,7 @@ index 26f221f..633f50e 100644 } return true; -@@ -2615,7 +2814,7 @@ print_stored (COLUMN *p) +@@ -2623,7 +2822,7 @@ print_stored (COLUMN *p) number of characters is 1.) */ static int @@ -1534,7 +2858,7 @@ index 26f221f..633f50e 100644 { unsigned char uc = c; char *s = clump_buff; -@@ -2625,10 +2824,10 @@ char_to_clump (char c) +@@ -2633,10 +2832,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8; @@ -1547,7 +2871,7 @@ index 26f221f..633f50e 100644 { width = TAB_WIDTH (chars_per_c, input_position); -@@ -2709,6 +2908,164 @@ char_to_clump (char c) +@@ -2717,6 +2916,164 @@ char_to_clump (char c) return chars; } @@ -1713,7 +3037,7 @@ index 26f221f..633f50e 100644 looking for more options and printing the next batch of files. diff --git a/src/sort.c b/src/sort.c -index 6d2eec5..f189a0d 100644 +index 3b775d6..a0ba243 100644 --- a/src/sort.c +++ b/src/sort.c @@ -29,6 +29,14 @@ @@ -1731,9 +3055,9 @@ index 6d2eec5..f189a0d 100644 #include "system.h" #include "argmatch.h" #include "die.h" -@@ -157,14 +165,39 @@ static int decimal_point; - /* Thousands separator; if -1, then there isn't one. */ - static int thousands_sep; +@@ -159,14 +167,39 @@ static int thousands_sep; + /* We currently ignore multi-byte grouping chars. */ + static bool thousands_sep_ignored; +/* True if -f is specified. */ +static bool folding; @@ -1772,9 +3096,9 @@ index 6d2eec5..f189a0d 100644 /* The kind of blanks for '-b' to skip in various options. */ enum blanktype { bl_start, bl_end, bl_both }; -@@ -338,13 +371,11 @@ static bool reverse; - they were read if all keys compare equal. */ - static bool stable; +@@ -343,13 +376,11 @@ static bool stable; + /* An int value outside char range. */ + enum { NON_CHAR = CHAR_MAX + 1 }; -/* If TAB has this value, blanks separate fields. */ -enum { TAB_DEFAULT = CHAR_MAX + 1 }; @@ -1789,7 +3113,7 @@ index 6d2eec5..f189a0d 100644 /* Flag to remove consecutive duplicate lines from the output. Only the last of a sequence of equal lines will be output. */ -@@ -802,6 +833,46 @@ reap_all (void) +@@ -805,6 +836,46 @@ reap_all (void) reap (-1); } @@ -1836,7 +3160,7 @@ index 6d2eec5..f189a0d 100644 /* Clean up any remaining temporary files. */ static void -@@ -1270,7 +1341,7 @@ zaptemp (char const *name) +@@ -1272,7 +1343,7 @@ zaptemp (char const *name) free (node); } @@ -1845,7 +3169,7 @@ index 6d2eec5..f189a0d 100644 static int struct_month_cmp (void const *m1, void const *m2) -@@ -1285,7 +1356,7 @@ struct_month_cmp (void const *m1, void const *m2) +@@ -1287,7 +1358,7 @@ struct_month_cmp (void const *m1, void const *m2) /* Initialize the character class tables. */ static void @@ -1854,7 +3178,7 @@ index 6d2eec5..f189a0d 100644 { size_t i; -@@ -1297,7 +1368,7 @@ inittables (void) +@@ -1299,7 +1370,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -1863,7 +3187,7 @@ index 6d2eec5..f189a0d 100644 /* If we're not in the "C" locale, read different names for months. */ if (hard_LC_TIME) { -@@ -1379,6 +1450,84 @@ specify_nmerge (int oi, char c, char const *s) +@@ -1381,6 +1452,84 @@ specify_nmerge (int oi, char c, char const *s) xstrtol_fatal (e, oi, c, long_options, s); } @@ -1948,7 +3272,7 @@ index 6d2eec5..f189a0d 100644 /* Specify the amount of main memory to use when sorting. */ static void specify_sort_size (int oi, char c, char const *s) -@@ -1610,7 +1759,7 @@ buffer_linelim (struct buffer const *buf) +@@ -1612,7 +1761,7 @@ buffer_linelim (struct buffer const *buf) by KEY in LINE. */ static char * @@ -1957,7 +3281,7 @@ index 6d2eec5..f189a0d 100644 { char *ptr = line->text, *lim = ptr + line->length - 1; size_t sword = key->sword; -@@ -1619,10 +1768,10 @@ begfield (struct line const *line, struct keyfield const *key) +@@ -1621,10 +1770,10 @@ begfield (struct line const *line, struct keyfield const *key) /* The leading field separator itself is included in a field when -t is absent. */ @@ -1970,7 +3294,7 @@ index 6d2eec5..f189a0d 100644 ++ptr; if (ptr < lim) ++ptr; -@@ -1648,11 +1797,70 @@ begfield (struct line const *line, struct keyfield const *key) +@@ -1650,12 +1799,71 @@ begfield (struct line const *line, struct keyfield const *key) return ptr; } @@ -2036,13 +3360,14 @@ index 6d2eec5..f189a0d 100644 /* Return the limit of (a pointer to the first character after) the field in LINE specified by KEY. */ + ATTRIBUTE_PURE static char * -limfield (struct line const *line, struct keyfield const *key) -+limfield_uni (const struct line *line, const struct keyfield *key) ++limfield_uni (struct line const *line, struct keyfield const *key) { char *ptr = line->text, *lim = ptr + line->length - 1; size_t eword = key->eword, echar = key->echar; -@@ -1667,10 +1875,10 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1670,10 +1878,10 @@ limfield (struct line const *line, struct keyfield const *key) 'beginning' is the first character following the delimiting TAB. Otherwise, leave PTR pointing at the first 'blank' character after the preceding field. */ @@ -2055,7 +3380,7 @@ index 6d2eec5..f189a0d 100644 ++ptr; if (ptr < lim && (eword || echar)) ++ptr; -@@ -1716,10 +1924,10 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1719,10 +1927,10 @@ limfield (struct line const *line, struct keyfield const *key) */ /* Make LIM point to the end of (one byte past) the current field. */ @@ -2068,12 +3393,12 @@ index 6d2eec5..f189a0d 100644 if (newlim) lim = newlim; } -@@ -1750,6 +1958,130 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1753,6 +1961,130 @@ limfield (struct line const *line, struct keyfield const *key) return ptr; } +#if HAVE_MBRTOWC -+static char * ++static char * _GL_ATTRIBUTE_PURE +limfield_mb (const struct line *line, const struct keyfield *key) +{ + char *ptr = line->text, *lim = ptr + line->length - 1; @@ -2199,7 +3524,7 @@ index 6d2eec5..f189a0d 100644 /* Fill BUF reading from FP, moving buf->left bytes from the end of buf->buf to the beginning first. If EOF is reached and the file wasn't terminated by a newline, supply one. Set up BUF's line -@@ -1836,8 +2168,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) +@@ -1839,8 +2171,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) else { if (key->skipsblanks) @@ -2224,16 +3549,32 @@ index 6d2eec5..f189a0d 100644 line->keybeg = line_start; } } -@@ -1987,7 +2333,7 @@ human_numcompare (char const *a, char const *b) - hideously fast. */ +@@ -1976,12 +2322,10 @@ find_unit_order (char const *number) + ATTRIBUTE_PURE + static int +-human_numcompare (char const *a, char const *b) ++human_numcompare (char *a, char *b) + { +- while (blanks[to_uchar (*a)]) +- a++; +- while (blanks[to_uchar (*b)]) +- b++; ++ skipblanks(&a, a + strlen(a)); ++ skipblanks(&b, b + strlen(b)); + + int diff = find_unit_order (a) - find_unit_order (b); + return (diff ? diff : strnumcmp (a, b, decimal_point, thousands_sep)); +@@ -1993,7 +2337,7 @@ human_numcompare (char const *a, char const *b) + + ATTRIBUTE_PURE static int -numcompare (char const *a, char const *b) +numcompare_uni (const char *a, const char *b) { while (blanks[to_uchar (*a)]) a++; -@@ -1997,6 +2343,25 @@ numcompare (char const *a, char const *b) +@@ -2003,6 +2347,25 @@ numcompare (char const *a, char const *b) return strnumcmp (a, b, decimal_point, thousands_sep); } @@ -2259,7 +3600,7 @@ index 6d2eec5..f189a0d 100644 /* Work around a problem whereby the long double value returned by glibc's strtold ("NaN", ...) contains uninitialized bits: clear all bytes of A and B before calling strtold. FIXME: remove this function if -@@ -2047,7 +2412,7 @@ general_numcompare (char const *sa, char const *sb) +@@ -2053,7 +2416,7 @@ general_numcompare (char const *sa, char const *sb) Return 0 if the name in S is not recognized. */ static int @@ -2268,7 +3609,7 @@ index 6d2eec5..f189a0d 100644 { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -2323,15 +2688,14 @@ debug_key (struct line const *line, struct keyfield const *key) +@@ -2329,15 +2692,14 @@ debug_key (struct line const *line, struct keyfield const *key) char saved = *lim; *lim = '\0'; @@ -2286,7 +3627,7 @@ index 6d2eec5..f189a0d 100644 else if (key->general_numeric) ignore_value (strtold (beg, &tighter_lim)); else if (key->numeric || key->human_numeric) -@@ -2465,7 +2829,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2483,7 +2845,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) /* Warn about significant leading blanks. */ bool implicit_skip = key_numeric (key) || key->month; bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */ @@ -2295,7 +3636,66 @@ index 6d2eec5..f189a0d 100644 && ((!key->skipsblanks && !implicit_skip) || (!key->skipsblanks && key->schar) || (!key->skipeblanks && key->echar))) -@@ -2523,11 +2887,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2531,9 +2893,9 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) + bool number_locale_warned = false; + if (basic_numeric_field_span) + { +- if (tab == TAB_DEFAULT +- ? thousands_sep != NON_CHAR && (isblank (to_uchar (thousands_sep))) +- : tab == thousands_sep) ++ if (tab_length ++ ? tab[0] == thousands_sep ++ : thousands_sep != NON_CHAR && (isblank (to_uchar (thousands_sep)))) + { + error (0, 0, + _("field separator %s is treated as a " +@@ -2544,9 +2906,9 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) + } + if (basic_numeric_field_span || general_numeric_field_span) + { +- if (tab == TAB_DEFAULT +- ? thousands_sep != NON_CHAR && (isblank (to_uchar (decimal_point))) +- : tab == decimal_point) ++ if (tab_length ++ ? tab[0] == decimal_point ++ : thousands_sep != NON_CHAR && (isblank (to_uchar (decimal_point)))) + { + error (0, 0, + _("field separator %s is treated as a " +@@ -2554,19 +2916,19 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) + quote (((char []) {decimal_point, 0}))); + number_locale_warned = true; + } +- else if (tab == '-') ++ else if (tab_length && tab[0] == '-') + { + error (0, 0, + _("field separator %s is treated as a " + "minus sign in numbers"), +- quote (((char []) {tab, 0}))); ++ quote (((char []) {tab[0], 0}))); + } +- else if (general_numeric_field_span && tab == '+') ++ else if (general_numeric_field_span && tab_length && tab[0] == '+') + { + error (0, 0, + _("field separator %s is treated as a " + "plus sign in numbers"), +- quote (((char []) {tab, 0}))); ++ quote (((char []) {tab[0], 0}))); + } + } + +@@ -2577,7 +2939,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) + { + error (0, 0, + _("%snumbers use %s as a decimal point in this locale"), +- tab == decimal_point ? "" : _("note "), ++ (tab_length && tab[0] == decimal_point) ? "" : _("note "), + quote (((char []) {decimal_point, 0}))); + + } +@@ -2610,11 +2972,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) error (0, 0, _("option '-r' only applies to last-resort comparison")); } @@ -2384,7 +3784,7 @@ index 6d2eec5..f189a0d 100644 { struct keyfield *key = keylist; -@@ -2612,7 +3052,7 @@ keycompare (struct line const *a, struct line const *b) +@@ -2699,7 +3137,7 @@ keycompare (struct line const *a, struct line const *b) else if (key->human_numeric) diff = human_numcompare (ta, tb); else if (key->month) @@ -2393,7 +3793,7 @@ index 6d2eec5..f189a0d 100644 else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2728,6 +3168,211 @@ keycompare (struct line const *a, struct line const *b) +@@ -2815,6 +3253,211 @@ keycompare (struct line const *a, struct line const *b) return key->reverse ? -diff : diff; } @@ -2605,7 +4005,7 @@ index 6d2eec5..f189a0d 100644 /* Compare two lines A and B, returning negative, zero, or positive depending on whether A compares less than, equal to, or greater than B. */ -@@ -2755,7 +3400,7 @@ compare (struct line const *a, struct line const *b) +@@ -2842,7 +3485,7 @@ compare (struct line const *a, struct line const *b) diff = - NONZERO (blen); else if (blen == 0) diff = 1; @@ -2614,7 +4014,7 @@ index 6d2eec5..f189a0d 100644 { /* xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4145,6 +4790,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) +@@ -4226,6 +4869,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) break; case 'f': key->translate = fold_toupper; @@ -2622,7 +4022,7 @@ index 6d2eec5..f189a0d 100644 break; case 'g': key->general_numeric = true; -@@ -4224,7 +4870,7 @@ main (int argc, char **argv) +@@ -4305,7 +4949,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -2631,8 +4031,8 @@ index 6d2eec5..f189a0d 100644 hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4245,6 +4891,29 @@ main (int argc, char **argv) - thousands_sep = -1; +@@ -4328,6 +4972,29 @@ main (int argc, char **argv) + thousands_sep = NON_CHAR; } +#if HAVE_MBRTOWC @@ -2661,7 +4061,7 @@ index 6d2eec5..f189a0d 100644 have_read_stdin = false; inittables (); -@@ -4519,13 +5188,34 @@ main (int argc, char **argv) +@@ -4602,13 +5269,34 @@ main (int argc, char **argv) case 't': { @@ -2700,7 +4100,7 @@ index 6d2eec5..f189a0d 100644 else { /* Provoke with 'sort -txx'. Complain about -@@ -4536,9 +5226,11 @@ main (int argc, char **argv) +@@ -4619,9 +5307,11 @@ main (int argc, char **argv) quote (optarg)); } } @@ -2714,21 +4114,214 @@ index 6d2eec5..f189a0d 100644 } break; -@@ -4767,12 +5459,10 @@ main (int argc, char **argv) - sort (files, nfiles, outfile, nthreads); +diff --git a/src/unexpand.c b/src/unexpand.c +index 7d6100f..04cd646 100644 +--- a/src/unexpand.c ++++ b/src/unexpand.c +@@ -38,6 +38,9 @@ + #include + #include + #include ++ ++#include ++ + #include "system.h" + #include "die.h" + +@@ -106,24 +109,47 @@ unexpand (void) + { + /* Input stream. */ + FILE *fp = next_file (NULL); ++ mb_file_t mbf; + + /* The array of pending blanks. In non-POSIX locales, blanks can + include characters other than spaces, so the blanks must be + stored, not merely counted. */ +- char *pending_blank; ++ mbf_char_t *pending_blank; ++ /* True if the starting locale is utf8. */ ++ bool using_utf_locale; ++ ++ /* True if the first file contains BOM header. */ ++ bool found_bom; ++ using_utf_locale=check_utf_locale(); + + if (!fp) + return; ++ mbf_init (mbf, fp); ++ found_bom=check_bom(fp,&mbf); ++ ++ if (using_utf_locale == false && found_bom == true) ++ { ++ /*try using some predefined locale */ + ++ if (set_utf_locale () != 0) ++ { ++ error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale")); ++ } ++ } + /* The worst case is a non-blank character, then one blank, then a + tab stop, then MAX_COLUMN_WIDTH - 1 blanks, then a non-blank; so + allocate MAX_COLUMN_WIDTH bytes to store the blanks. */ +- pending_blank = xmalloc (max_column_width); ++ pending_blank = xmalloc (max_column_width * sizeof (mbf_char_t)); ++ ++ if (found_bom == true) ++ { ++ print_bom(); ++ } + + while (true) + { + /* Input character, or EOF. */ +- int c; ++ mbf_char_t c; + + /* If true, perform translations. */ + bool convert = true; +@@ -157,12 +183,44 @@ unexpand (void) + + do + { +- while ((c = getc (fp)) < 0 && (fp = next_file (fp))) +- continue; ++ while (true) { ++ mbf_getc (c, mbf); ++ if ((mb_iseof (c)) && (fp = next_file (fp))) ++ { ++ mbf_init (mbf, fp); ++ if (fp!=NULL) ++ { ++ if (check_bom(fp,&mbf)==true) ++ { ++ /*Not the first file - check BOM header*/ ++ if (using_utf_locale==false && found_bom==false) ++ { ++ /*BOM header in subsequent file but not in the first one. */ ++ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); ++ } ++ } ++ else ++ { ++ if(using_utf_locale==false && found_bom==true) ++ { ++ /*First file conatined BOM header - locale was switched to UTF ++ *all subsequent files should contain BOM. */ ++ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); ++ } ++ } ++ } ++ continue; ++ } ++ else ++ { ++ break; ++ } ++ } ++ + + if (convert) + { +- bool blank = !! isblank (c); ++ bool blank = mb_isblank (c); + + if (blank) + { +@@ -179,16 +237,16 @@ unexpand (void) + if (next_tab_column < column) + die (EXIT_FAILURE, 0, _("input line is too long")); + +- if (c == '\t') ++ if (mb_iseq (c, '\t')) + { + column = next_tab_column; + + if (pending) +- pending_blank[0] = '\t'; ++ mb_setascii (&pending_blank[0], '\t'); + } + else + { +- column++; ++ column += mb_width (c); + + if (! (prev_blank && column == next_tab_column)) + { +@@ -196,13 +254,14 @@ unexpand (void) + will be replaced by tabs. */ + if (column == next_tab_column) + one_blank_before_tab_stop = true; +- pending_blank[pending++] = c; ++ mb_copy (&pending_blank[pending++], &c); + prev_blank = true; + continue; + } + + /* Replace the pending blanks by a tab or two. */ +- pending_blank[0] = c = '\t'; ++ mb_setascii (&c, '\t'); ++ mb_setascii (&pending_blank[0], '\t'); + } + + /* Discard pending blanks, unless it was a single +@@ -210,7 +269,7 @@ unexpand (void) + pending = one_blank_before_tab_stop; + } + } +- else if (c == '\b') ++ else if (mb_iseq (c, '\b')) + { + /* Go back one column, and force recalculation of the + next tab stop. */ +@@ -218,9 +277,9 @@ unexpand (void) + next_tab_column = column; + tab_index -= !!tab_index; + } +- else ++ else if (!mb_iseq (c, '\n')) + { +- column++; ++ column += mb_width (c); + if (!column) + die (EXIT_FAILURE, 0, _("input line is too long")); + } +@@ -228,8 +287,11 @@ unexpand (void) + if (pending) + { + if (pending > 1 && one_blank_before_tab_stop) +- pending_blank[0] = '\t'; +- if (fwrite (pending_blank, 1, pending, stdout) != pending) ++ mb_setascii (&pending_blank[0], '\t'); ++ ++ for (int n = 0; n < pending; ++n) ++ mb_putc (pending_blank[n], stdout); ++ if (ferror (stdout)) + die (EXIT_FAILURE, errno, _("write error")); + pending = 0; + one_blank_before_tab_stop = false; +@@ -239,16 +301,17 @@ unexpand (void) + convert &= convert_entire_line || blank; + } + +- if (c < 0) ++ if (mb_iseof (c)) + { + free (pending_blank); + return; + } + +- if (putchar (c) < 0) ++ mb_putc (c, stdout); ++ if (ferror (stdout)) + die (EXIT_FAILURE, errno, _("write error")); + } +- while (c != '\n'); ++ while (!mb_iseq (c, '\n')); } + } --#ifdef lint - if (files_from) - readtokens0_free (&tok); - else - free (files); --#endif - - if (have_read_stdin && fclose (stdin) == EOF) - sort_die (_("close failed"), "-"); diff --git a/src/uniq.c b/src/uniq.c -index 87a0c93..9f755d9 100644 +index e5996f0..871d47c 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -21,6 +21,17 @@ @@ -2749,12 +4342,8 @@ index 87a0c93..9f755d9 100644 #include "system.h" #include "argmatch.h" #include "linebuffer.h" -@@ -30,9 +41,21 @@ - #include "posixver.h" - #include "stdio--.h" - #include "xstrtol.h" --#include "memcasecmp.h" -+#include "xmemcoll.h" +@@ -33,6 +44,18 @@ + #include "memcasecmp.h" #include "quote.h" +/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC @@ -2783,16 +4372,16 @@ index 87a0c93..9f755d9 100644 static struct option const longopts[] = { {"count", no_argument, NULL, 'c'}, -@@ -253,7 +280,7 @@ size_opt (char const *opt, char const *msgid) - return a pointer to the beginning of the line's field to be compared. */ +@@ -254,7 +281,7 @@ size_opt (char const *opt, char const *msgid) - static char * _GL_ATTRIBUTE_PURE + ATTRIBUTE_PURE + static char * -find_field (struct linebuffer const *line) +find_field_uni (struct linebuffer *line) { size_t count; char const *lp = line->buffer; -@@ -273,6 +300,83 @@ find_field (struct linebuffer const *line) +@@ -274,6 +301,83 @@ find_field (struct linebuffer const *line) return line->buffer + i; } @@ -2876,225 +4465,7 @@ index 87a0c93..9f755d9 100644 /* Return false if two strings OLD and NEW match, true if not. OLD and NEW point not to the beginnings of the lines but rather to the beginnings of the fields to compare. -@@ -281,17 +385,113 @@ find_field (struct linebuffer const *line) - static bool - different (char *old, char *new, size_t oldlen, size_t newlen) - { -+ char *copy_old, *copy_new; -+ - if (check_chars < oldlen) - oldlen = check_chars; - if (check_chars < newlen) - newlen = check_chars; - - if (ignore_case) -- return oldlen != newlen || memcasecmp (old, new, oldlen); -+ { -+ size_t i; -+ -+ copy_old = xmalloc (oldlen + 1); -+ copy_new = xmalloc (oldlen + 1); -+ -+ for (i = 0; i < oldlen; i++) -+ { -+ copy_old[i] = toupper (old[i]); -+ copy_new[i] = toupper (new[i]); -+ } -+ bool rc = xmemcoll (copy_old, oldlen, copy_new, newlen); -+ free (copy_old); -+ free (copy_new); -+ return rc; -+ } - else -- return oldlen != newlen || memcmp (old, new, oldlen); -+ { -+ copy_old = (char *)old; -+ copy_new = (char *)new; -+ } -+ -+ 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) -+{ -+ size_t i, j, chars; -+ const char *str[2]; -+ char *copy[2]; -+ size_t len[2]; -+ mbstate_t state[2]; -+ size_t mblength; -+ wchar_t wc, uwc; -+ mbstate_t state_bak; -+ -+ str[0] = old; -+ str[1] = new; -+ len[0] = oldlen; -+ len[1] = newlen; -+ state[0] = oldstate; -+ state[1] = newstate; -+ -+ for (i = 0; i < 2; i++) -+ { -+ copy[i] = xmalloc (len[i] + 1); -+ memset (copy[i], '\0', len[i] + 1); -+ -+ for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++) -+ { -+ state_bak = state[i]; -+ mblength = mbrtowc (&wc, str[i] + j, len[i] - j, &(state[i])); -+ -+ switch (mblength) -+ { -+ case (size_t)-1: -+ case (size_t)-2: -+ state[i] = state_bak; -+ /* Fall through */ -+ case 0: -+ mblength = 1; -+ break; -+ -+ default: -+ if (ignore_case) -+ { -+ uwc = towupper (wc); -+ -+ if (uwc != wc) -+ { -+ mbstate_t state_wc; -+ size_t mblen; -+ -+ memset (&state_wc, '\0', sizeof(mbstate_t)); -+ mblen = wcrtomb (copy[i] + j, uwc, &state_wc); -+ assert (mblen != (size_t)-1); -+ } -+ else -+ memcpy (copy[i] + j, str[i] + j, mblength); -+ } -+ else -+ memcpy (copy[i] + j, str[i] + j, mblength); -+ } -+ j += mblength; -+ } -+ copy[i][j] = '\0'; -+ len[i] = j; -+ } -+ int rc = xmemcoll (copy[0], len[0], copy[1], len[1]); -+ free (copy[0]); -+ 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. -@@ -355,19 +555,38 @@ check_file (const char *infile, const char *outfile, char delimiter) - char *prevfield IF_LINT ( = NULL); - size_t prevlen IF_LINT ( = 0); - bool first_group_printed = false; -+#if HAVE_MBRTOWC -+ mbstate_t prevstate; -+ -+ memset (&prevstate, '\0', sizeof (mbstate_t)); -+#endif - - while (!feof (stdin)) - { - char *thisfield; - size_t thislen; - bool new_group; -+#if HAVE_MBRTOWC -+ mbstate_t thisstate; -+#endif - - if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) - break; - - thisfield = find_field (thisline); - thislen = thisline->length - 1 - (thisfield - thisline->buffer); -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ thisstate = thisline->state; - -+ new_group = (prevline->length == 0 -+ || different_multi (thisfield, prevfield, -+ thislen, prevlen, -+ thisstate, prevstate)); -+ } -+ else -+#endif - new_group = (prevline->length == 0 - || different (thisfield, prevfield, thislen, prevlen)); - -@@ -385,6 +604,10 @@ check_file (const char *infile, const char *outfile, char delimiter) - SWAP_LINES (prevline, thisline); - prevfield = thisfield; - prevlen = thislen; -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ prevstate = thisstate; -+#endif - first_group_printed = true; - } - } -@@ -397,17 +620,26 @@ check_file (const char *infile, const char *outfile, char delimiter) - size_t prevlen; - uintmax_t match_count = 0; - bool first_delimiter = true; -+#if HAVE_MBRTOWC -+ mbstate_t prevstate; -+#endif - - if (readlinebuffer_delim (prevline, stdin, delimiter) == 0) - goto closefiles; - prevfield = find_field (prevline); - prevlen = prevline->length - 1 - (prevfield - prevline->buffer); -+#if HAVE_MBRTOWC -+ prevstate = prevline->state; -+#endif - - while (!feof (stdin)) - { - bool match; - char *thisfield; - size_t thislen; -+#if HAVE_MBRTOWC -+ mbstate_t thisstate = thisline->state; -+#endif - if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) - { - if (ferror (stdin)) -@@ -416,6 +648,14 @@ check_file (const char *infile, const char *outfile, char delimiter) - } - thisfield = find_field (thisline); - thislen = thisline->length - 1 - (thisfield - thisline->buffer); -+#if HAVE_MBRTOWC -+ if (MB_CUR_MAX > 1) -+ { -+ match = !different_multi (thisfield, prevfield, -+ thislen, prevlen, thisstate, prevstate); -+ } -+ else -+#endif - match = !different (thisfield, prevfield, thislen, prevlen); - match_count += match; - -@@ -448,6 +688,9 @@ check_file (const char *infile, const char *outfile, char delimiter) - SWAP_LINES (prevline, thisline); - prevfield = thisfield; - prevlen = thislen; -+#if HAVE_MBRTOWC -+ prevstate = thisstate; -+#endif - if (!match) - match_count = 0; - } -@@ -493,6 +736,19 @@ main (int argc, char **argv) +@@ -494,6 +598,19 @@ main (int argc, char **argv) atexit (close_stdout); @@ -3114,6 +4485,209 @@ index 87a0c93..9f755d9 100644 skip_chars = 0; skip_fields = 0; check_chars = SIZE_MAX; +diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm +index fad7ab9..c9021a6 100644 +--- a/tests/Coreutils.pm ++++ b/tests/Coreutils.pm +@@ -264,6 +264,9 @@ sub run_tests ($$$$$) + # Yes, this is an arbitrary limit. If it causes trouble, + # consider removing it. + my $max = 30; ++ # The downstream i18n multi-byte tests have a "-mb" suffix. ++ # Therefore add 3 to the maximum test name length. ++ $max += 3; + if ($max < length $test_name) + { + warn "$program_name: $test_name: test name is too long (> $max)\n"; +diff --git a/tests/expand/mb.sh b/tests/expand/mb.sh +new file mode 100755 +index 0000000..dd6007c +--- /dev/null ++++ b/tests/expand/mb.sh +@@ -0,0 +1,183 @@ ++#!/bin/sh ++ ++# Copyright (C) 2012-2015 Free Software Foundation, Inc. ++ ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ expand ++ ++export LC_ALL=en_US.UTF-8 ++ ++#input containing multibyte characters ++cat <<\EOF > in || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++EOF ++env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_ ++ ++cat <<\EOF > exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++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) ++\u00E9\t|composed(1) ++e\u0301\t|decomposed(1) ++\u3000\t|ideo-space(2) ++\uFF0D\t|full-hypen(2) ++' > in || framework_failure_ ++ ++env printf '12345678 ++e |ascii(1) ++\u00E9 |composed(1) ++e\u0301 |decomposed(1) ++\u3000 |ideo-space(2) ++\uFF0D |full-hypen(2) ++' > exp || framework_failure_ ++ ++expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#shouldn't fail with "input line too long" ++#when a line starts with a control character ++env printf '\n' > in || framework_failure_ ++ ++expand < in > out || fail=1 ++compare in out > /dev/null 2>&1 || fail=1 ++ ++#non-Unicode characters interspersed between Unicode ones ++env printf '12345678 ++\t\xFF| ++\xFF\t| ++\t\xFFä| ++ä\xFF\t| ++\tä\xFF| ++\xFF\tä| ++äbcdef\xFF\t| ++' > in || framework_failure_ ++ ++env printf '12345678 ++ \xFF| ++\xFF | ++ \xFFä| ++ä\xFF | ++ ä\xFF| ++\xFF ä| ++äbcdef\xFF | ++' > exp || framework_failure_ ++ ++expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++ ++ ++#BOM header test 1 ++printf "\xEF\xBB\xBF" > in; cat <<\EOF >> in || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++EOF ++env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_ ++ ++printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++ ++expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LANG=C expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LC_ALL=C expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++ ++printf '\xEF\xBB\xBF' > in1; cat <<\EOF >> in1 || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++EOF ++env printf ' äöü\t. öüä. \tä xx\n' >> in1 || framework_failure_ ++ ++ ++printf '\xEF\xBB\xBF' > exp; cat <<\EOF >> exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++expand in1 in1 > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LANG=C expand in1 in1 > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LC_ALL=C expand in1 in1 > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++exit $fail diff --git a/tests/i18n/sort.sh b/tests/i18n/sort.sh new file mode 100755 index 0000000..26c95de @@ -3150,10 +4724,10 @@ index 0000000..26c95de + +Exit $fail diff --git a/tests/local.mk b/tests/local.mk -index 568944e..192f776 100644 +index 0f77786..dbe1843 100644 --- a/tests/local.mk +++ b/tests/local.mk -@@ -369,6 +369,8 @@ all_tests = \ +@@ -377,6 +377,8 @@ all_tests = \ tests/misc/sort-discrim.sh \ tests/misc/sort-files0-from.pl \ tests/misc/sort-float.sh \ @@ -3162,8 +4736,24 @@ index 568944e..192f776 100644 tests/misc/sort-h-thousands-sep.sh \ tests/misc/sort-merge.pl \ tests/misc/sort-merge-fdlimit.sh \ +@@ -576,6 +578,7 @@ all_tests = \ + tests/du/threshold.sh \ + tests/du/trailing-slash.sh \ + tests/du/two-args.sh \ ++ tests/expand/mb.sh \ + tests/id/gnu-zero-uids.sh \ + tests/id/no-context.sh \ + tests/id/context.sh \ +@@ -727,6 +730,7 @@ all_tests = \ + tests/touch/read-only.sh \ + tests/touch/relative.sh \ + tests/touch/trailing-slash.sh \ ++ tests/unexpand/mb.sh \ + $(all_root_tests) + + # See tests/factor/create-test.sh. diff --git a/tests/misc/expand.pl b/tests/misc/expand.pl -index 8a9cad1..9293e39 100755 +index 7a77e6f..27f6652 100755 --- a/tests/misc/expand.pl +++ b/tests/misc/expand.pl @@ -27,6 +27,15 @@ my $prog = 'expand'; @@ -3230,7 +4820,7 @@ index 8a9cad1..9293e39 100755 my $verbose = $ENV{VERBOSE}; diff --git a/tests/misc/fold.pl b/tests/misc/fold.pl -index 7b192b4..76f073f 100755 +index 2834f92..bc1616a 100755 --- a/tests/misc/fold.pl +++ b/tests/misc/fold.pl @@ -20,9 +20,18 @@ use strict; @@ -3303,7 +4893,7 @@ index 7b192b4..76f073f 100755 my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose); exit $fail; diff --git a/tests/misc/join.pl b/tests/misc/join.pl -index 4d399d8..07f2823 100755 +index 06ad777..be40204 100755 --- a/tests/misc/join.pl +++ b/tests/misc/join.pl @@ -25,6 +25,15 @@ my $limits = getlimits (); @@ -3424,7 +5014,7 @@ index 0000000..11836ba + +Exit $fail diff --git a/tests/misc/sort-merge.pl b/tests/misc/sort-merge.pl -index 23f6ed2..402a987 100755 +index 7eb4574..eda884c 100755 --- a/tests/misc/sort-merge.pl +++ b/tests/misc/sort-merge.pl @@ -26,6 +26,15 @@ my $prog = 'sort'; @@ -3484,7 +5074,7 @@ index 23f6ed2..402a987 100755 my $verbose = $ENV{VERBOSE}; diff --git a/tests/misc/sort.pl b/tests/misc/sort.pl -index c3e7f8e..6ecd3ff 100755 +index 0b0adca..fd27821 100755 --- a/tests/misc/sort.pl +++ b/tests/misc/sort.pl @@ -24,10 +24,15 @@ my $prog = 'sort'; @@ -3552,7 +5142,7 @@ index c3e7f8e..6ecd3ff 100755 my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; diff --git a/tests/misc/unexpand.pl b/tests/misc/unexpand.pl -index 6ba6d40..de86723 100755 +index 2e1906f..fe66012 100755 --- a/tests/misc/unexpand.pl +++ b/tests/misc/unexpand.pl @@ -27,6 +27,14 @@ my $limits = getlimits (); @@ -3609,7 +5199,7 @@ index 6ba6d40..de86723 100755 my $verbose = $ENV{VERBOSE}; diff --git a/tests/misc/uniq.pl b/tests/misc/uniq.pl -index f028036..8eaf59a 100755 +index aa163cd..91d617d 100755 --- a/tests/misc/uniq.pl +++ b/tests/misc/uniq.pl @@ -23,9 +23,17 @@ my $limits = getlimits (); @@ -3685,7 +5275,7 @@ index f028036..8eaf59a 100755 @Tests = triple_test \@Tests; diff --git a/tests/pr/pr-tests.pl b/tests/pr/pr-tests.pl -index ec3980a..136657d 100755 +index 7ac6d4c..ae6cc35 100755 --- a/tests/pr/pr-tests.pl +++ b/tests/pr/pr-tests.pl @@ -24,6 +24,15 @@ use strict; @@ -3704,9 +5294,9 @@ index ec3980a..136657d 100755 my @tv = ( # -b option is no longer an official option. But it's still working to -@@ -474,8 +483,48 @@ push @Tests, - {IN=>{2=>"a\n"}}, - {OUT=>"a\t\t\t\t \t\t\ta\n"} ]; +@@ -512,8 +521,48 @@ push @Tests, + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx\tx\tx\tx\tx\tx\n"} ]; +# Add _POSIX2_VERSION=199209 to the environment of each test +# that uses an old-style option like +1. @@ -3753,6 +5343,184 @@ index ec3980a..136657d 100755 my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; +diff --git a/tests/unexpand/mb.sh b/tests/unexpand/mb.sh +new file mode 100755 +index 0000000..8a82d74 +--- /dev/null ++++ b/tests/unexpand/mb.sh +@@ -0,0 +1,172 @@ ++#!/bin/sh ++ ++# Copyright (C) 2012-2015 Free Software Foundation, Inc. ++ ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ unexpand ++ ++export LC_ALL=en_US.UTF-8 ++ ++#input containing multibyte characters ++cat > in <<\EOF ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++cat > exp <<\EOF ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++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 ++e |ascii(1) ++\u00E9 |composed(1) ++e\u0301 |decomposed(1) ++\u3000 |ideo-space(2) ++\uFF0D |full-hypen(2) ++' > in || framework_failure_ ++ ++env printf '12345678 ++e\t|ascii(1) ++\u00E9\t|composed(1) ++e\u0301\t|decomposed(1) ++\u3000\t|ideo-space(2) ++\uFF0D\t|full-hypen(2) ++' > exp || framework_failure_ ++ ++unexpand -a < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#test input where a blank of width > 1 is not being substituted ++in="$(LC_ALL=en_US.UTF-8 printf ' \u3000 ö ü ß')" ++exp='   ö ü ß' ++ ++unexpand -a < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#non-Unicode characters interspersed between Unicode ones ++env printf '12345678 ++ \xFF| ++\xFF | ++ \xFFä| ++ä\xFF | ++ ä\xFF| ++\xFF ä| ++äbcdef\xFF | ++' > in || framework_failure_ ++ ++env printf '12345678 ++\t\xFF| ++\xFF\t| ++\t\xFFä| ++ä\xFF\t| ++\tä\xFF| ++\xFF\tä| ++äbcdef\xFF\t| ++' > exp || framework_failure_ ++ ++unexpand -a < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#BOM header test 1 ++printf "\xEF\xBB\xBF" > in; cat <<\EOF >> in || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_ ++ ++printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++unexpand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LANG=C unexpand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LC_ALL=C unexpand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++ ++printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++ ++unexpand in in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LANG=C unexpand in in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LC_ALL=C unexpand in in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 -- -2.7.4 +2.34.1 diff --git a/coreutils-keyring.gpg b/coreutils-keyring.gpg new file mode 100644 index 0000000..003a885 --- /dev/null +++ b/coreutils-keyring.gpg @@ -0,0 +1,312 @@ +Release GPG keyring of coreutils group. + +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBE58fE4BEADGS6VzDkx2OOQMPQedsmBtRs3S5sz9tzO51EwkS779js3Sjt96 +KlQM0SbwtbUxOFor42LRXJKUU9T/Jl3v3+onASvoHAUcuAL15WAhnY9cuQeFOvZP +/iy0I1+bV0CILrz364T6vL614obnBBdTg8ZqSZM+csRlpGwXJiuY6mkrsPLXakxA +35n/nAgQOcQPj36CuuvpCH4JKPkzklwUMqueDzXkYMNSdWmVnI+ZSfDmeiwzAbFY +tE5uGW+c3DzD98RGCLt3FLr86n24IDlaTZSsaWbTJVsur9s4sbp6rST3pspDSQYF +ShhJ5aqqEYIvPp5kXj2CZJjOFBnIkn+0aDSps+XrnZjJn/f8f9lIAg0/0JjmytHY +yopo6HFZMdtOvklmnsIuJ/fdyk7761+necYHf5dopVuv29PSu62+A/gnKGfGaqtY +AjXFfsiLp/+iTQ+LNV4hWFbFKHHZOn4G194pWl6nY1gArwQKPZ5p6uy5EXgiNPRs +C1CcuVZNJp1RiayhTI68uuI+cldBU6N7+yZKGhjDUQKjIZ3eDB8X7vsCC9S1GgvX +Hcv8mjcMcHtnoC0w0FiW35JYtAu9mY4+uQhoRPTyPHh+ufX+OdKf7q5BKCppY1r7 +HF1VRFKjSybhEwMeGBdj1EEY413/A8ynpgpHLosPT36n8HtAWUGu+TadZQARAQAB +tCFQw6FkcmFpZyBCcmFkeSA8UEBkcmFpZ0JyYWR5LmNvbT6JAjsEEwECACUCGwMG +CwkIBwMCBhUIAgkKCwQWAgMBAh4BAheABQJOfI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Rz0xU +MU+C/4EJjy7+3ycLV+M8gnJGVwp2+z1H1ESe5bH6hSgARqQ4pOfP9sbM7sNX/y17 +KMEAEQEAAYkCHwQYAQIACQUCTnx8TgIbDAAKCRDfb9lxMGA32aBIEADAGhbCehSj +Wv8SEw9gUpN+slmIDBnZ7uqQgXjWO5OnG2TrSJyPNAwfk6ESY6JeoGuiASL3EpqD +vRTVsIvDzzqhNBwVa+mi/q3lof9yNs74dmJYsH0P20+9lVzNfWATWUDA4cVYBvON +BloCK1cVvn9zqFvfjFBcRbZskcvMBVPxO2Fv4xAzX+omPDfCnweY8G7i71Z8Nnl/ +HVkSZMI9uXrtcde00oISHf5xUebJdx96dxnUCDLPUwPiIxxYN44KvIl3cnIB5qwu +BV8F2XXUtBdxZDJexqsCIoAD3rhRoWq6E2fRJKeqt/4TmxwjsJ8ZODp+ilXhqRe/ +shHttoOvbo5QBZNZMujxkqxXeu+j2E3Ry5mSiGX1SewwbT1iUppwGI15Uwhthhrc +PwbtWxxIyzPBU6awwlrTrYxNTB1n7WM99gcQctLWZpWnEaoAnEmIEcPjnM+c2NRw +UJmE/C5h9intY4fOa2a8hpUPx6UbMkfPl0bkIA2cduvQtAFKy/G/Jm4H+0trSmrD +c+o+rl7v9sMJ9wKkMUdAcqUgNP0TEHzDPbzvztcKBCLnNLoUTKNIN4eNJjMGk8Si +/OgiN1NKkuVz7I3i916mVxxlFjKEyLYU4tYYXsbB+ZJy4dTP/YWHbQulJYLgju6Z +ELphkzjc6eM3CaOZ73u4GVXotheeUabUHQ== +=drvb +-----END PGP PUBLIC KEY BLOCK----- \ No newline at end of file diff --git a/coreutils-selinux.patch b/coreutils-selinux.patch index 8274a23..1f7f3a3 100644 --- a/coreutils-selinux.patch +++ b/coreutils-selinux.patch @@ -1,3 +1,32 @@ +From d70ddb3eb845c494280e7365e2b889242e7e1bb9 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Mon, 4 Oct 2021 08:45:53 +0200 +Subject: [PATCH] coreutils-selinux.patch + +--- + doc/coreutils.texi | 5 +++++ + man/chcon.x | 2 +- + man/runcon.x | 2 +- + src/cp.c | 16 +++++++++++++++- + src/install.c | 10 ++++++++-- + 5 files changed, 30 insertions(+), 5 deletions(-) + +diff --git a/doc/coreutils.texi b/doc/coreutils.texi +index 6810c15..19b535c 100644 +--- a/doc/coreutils.texi ++++ b/doc/coreutils.texi +@@ -8766,6 +8766,11 @@ done + exit $fail + @end example + ++@item -c ++@cindex SELinux security context information, preserving ++Preserve SELinux security context of the original files if possible. ++Some file systems don't support storing of SELinux security context. ++ + @item --copy-contents + @cindex directories, copying recursively + @cindex copying directories recursively diff --git a/man/chcon.x b/man/chcon.x index 8c1ff6f..c84fb96 100644 --- a/man/chcon.x @@ -20,20 +49,20 @@ index d2df13e..5c5f5d8 100644 Run COMMAND with completely-specified CONTEXT, or with current or transitioned security context modified by one or more of LEVEL, diff --git a/src/cp.c b/src/cp.c -index 1b528c6..25dbb88 100644 +index c97a675..89fb8ec 100644 --- a/src/cp.c +++ b/src/cp.c -@@ -203,6 +203,9 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\ +@@ -191,6 +191,9 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\ + additional attributes: context, links, xattr,\ + \n\ all\n\ - "), stdout); - fputs (_("\ -+ -c deprecated, same as --preserve=context\n\ +"), stdout); + fputs (_("\ - --no-preserve=ATTR_LIST don't preserve the specified attributes\n\ - --parents use full source file name under DIRECTORY\n\ ++ -c deprecated, same as --preserve=context\n\ "), stdout); -@@ -929,7 +932,7 @@ main (int argc, char **argv) + fputs (_("\ + --no-preserve=ATTR_LIST don't preserve the specified attributes\n\ +@@ -954,7 +957,7 @@ main (int argc, char **argv) selinux_enabled = (0 < is_selinux_enabled ()); cp_option_init (&x); @@ -42,7 +71,7 @@ index 1b528c6..25dbb88 100644 long_opts, NULL)) != -1) { -@@ -977,6 +980,17 @@ main (int argc, char **argv) +@@ -1002,6 +1005,17 @@ main (int argc, char **argv) copy_contents = true; break; @@ -60,27 +89,11 @@ index 1b528c6..25dbb88 100644 case 'd': x.preserve_links = true; x.dereference = DEREF_NEVER; -diff --git a/doc/coreutils.texi b/doc/coreutils.texi -index 47e4480..cff2ead 100644 ---- a/doc/coreutils.texi -+++ b/doc/coreutils.texi -@@ -8083,6 +8083,11 @@ done - exit $fail - @end example - -+@item -c -+@cindex SELinux security context information, preserving -+Preserve SELinux security context of the original files if possible. -+Some file systems don't support storing of SELinux security context. -+ - @item --copy-contents - @cindex directories, copying recursively - @cindex copying directories recursively diff --git a/src/install.c b/src/install.c -index d79d597..437889a 100644 +index c9456fe..2b1bee9 100644 --- a/src/install.c +++ b/src/install.c -@@ -673,7 +673,7 @@ In the 4th form, create all components of the given DIRECTORY(ies).\n\ +@@ -638,7 +638,7 @@ In the 4th form, create all components of the given DIRECTORY(ies).\n\ -v, --verbose print the name of each directory as it is created\n\ "), stdout); fputs (_("\ @@ -89,7 +102,7 @@ index d79d597..437889a 100644 -Z set SELinux security context of destination\n\ file and each created directory to default type\n\ --context[=CTX] like -Z, or if CTX is specified then set the\n\ -@@ -824,7 +824,7 @@ main (int argc, char **argv) +@@ -790,7 +790,7 @@ main (int argc, char **argv) dir_arg = false; umask (0); @@ -98,7 +111,7 @@ index d79d597..437889a 100644 NULL)) != -1) { switch (optc) -@@ -885,6 +885,8 @@ main (int argc, char **argv) +@@ -851,6 +851,8 @@ main (int argc, char **argv) no_target_directory = true; break; @@ -107,7 +120,7 @@ index d79d597..437889a 100644 case PRESERVE_CONTEXT_OPTION: if (! selinux_enabled) { -@@ -892,6 +894,10 @@ main (int argc, char **argv) +@@ -858,6 +860,10 @@ main (int argc, char **argv) "this kernel is not SELinux-enabled")); break; } @@ -118,3 +131,6 @@ index d79d597..437889a 100644 x.preserve_security_context = true; use_default_selinux_context = false; break; +-- +2.31.1 + diff --git a/coreutils-ss.tar.xz.sig b/coreutils-ss.tar.xz.sig index b06e77a..65295cf 100644 --- a/core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sI2t3cO3eCu8iym8HFyRaUMxgrhAUj +szSez9+YaJSUeXQ8j/IWts38MHvmfXJ8h1XgY64SuDy339i7M04ZuKXGJosO6o98 +g2iHMJdbNEiIjewmw6NL5nNVx+4uszbfkK4BX13Cego2cJInfCmbkci+iLy5Jrs8 +Hyr2U5VSK0G86eUfUXflFCBMPjoPFybik3PrHi4JWrKeZedTPtgORvQzd5mllWc2 +MbJjCXAsUY/Bk4lf+DnASlfCcDCOrhdqvyrFra9SeXcHm+XqA7WKmxvHiYKjwnny +mB0Zi+o4TbHUG3LK6jDZWDh+8xg49S8One1YzvjHn2ZEg0fe/zB1RxBWbTPW9X2U +v8uo3MuzEhZCZ8KseJ7+BcqCfbKpdazDqetejRybjXLNbeho7onnSO9wKS4s85g0 +Zl0u24hy28l9PwkqBm+aC5AYAKc6gtqy9d+he/zIOV5YztK4YT3aEoaXdO5Xdz5c +A4Le2E4ZR8lo1wcGKMISElumadz4DvLTUSIZzyYO+Q2zNrJzggU= +=fgkP -----END PGP SIGNATURE----- diff --git a/coreutils.spec b/coreutils.spec index c30309c..1326f9b 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.31 -Release: 9999.2%{?dist} +Version: 9.0 +Release: 9999.1%{?dist} License: GPLv3+ Url: https://www.gnu.org/software/coreutils/ Source0: https://pixelbeat.org/cu/coreutils-ss.tar.xz @@ -21,7 +21,7 @@ Patch105: coreutils-8.26-selinuxenable.patch # downstream changes to default DIR_COLORS Patch102: coreutils-8.32-DIR_COLORS.patch -#do display processor type for uname -p/-i based on uname(2) syscall +# to be removed (#548834) Patch103: coreutils-8.2-uname-processortype.patch #df --direct Patch104: coreutils-df-direct.patch @@ -31,24 +31,9 @@ Patch107: coreutils-8.4-mkdir-modenote.patch # sh-utils #add info about TZ envvar to date manpage Patch703: sh-utils-2.0.11-dateman.patch -Patch713: coreutils-4.5.3-langinfo.patch # (sb) lin18nux/lsb compliance - multibyte functionality patch Patch800: coreutils-i18n.patch -# (sb) lin18nux/lsb compliance - expand/unexpand -Patch801: coreutils-i18n-expand-unexpand.patch -# i18n patch for cut - old version - used -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 -#(un)expand - test BOM headers -Patch806: coreutils-i18n-un-expand-BOM.patch -# make 'sort -h' work for arbitrary column even when using UTF-8 locales -Patch807: coreutils-i18n-sort-human.patch -# fold: preserve new-lines in mutlibyte text (#1418505) -Patch808: coreutils-i18n-fold-newline.patch #getgrouplist() patch from Ulrich Drepper. Patch908: coreutils-getgrouplist.patch @@ -73,17 +58,23 @@ BuildRequires: libattr-devel BuildRequires: libcap-devel BuildRequires: libselinux-devel BuildRequires: libselinux-utils +BuildRequires: make BuildRequires: openssl-devel BuildRequires: strace BuildRequires: texinfo + +# test-only dependencies +BuildRequires: perl-interpreter +BuildRequires: perl(FileHandle) %if 23 < 0%{?fedora} || 7 < 0%{?rhel} # needed by i18n test-cases BuildRequires: glibc-langpack-en +BuildRequires: glibc-langpack-fr +BuildRequires: glibc-langpack-ko %endif Requires: %{name}-common = %{version}-%{release} -Requires: ncurses Provides: coreutils-full = %{version}-%{release} %include %{SOURCE51} @@ -114,29 +105,31 @@ packaged as a single multicall binary. # yum obsoleting rules explained at: # https://bugzilla.redhat.com/show_bug.cgi?id=1107973#c7 Obsoletes: %{name} < 8.24-100 + +# info doc refers to "Specifying the Time Zone" from glibc-doc (#959597) +Suggests: glibc-doc + Summary: coreutils common optional components %description common Optional though recommended components, including documentation and translations. %prep -%autosetup -N -n %{name}-%{version}.99-f2034 +%autosetup -N -n %{name}-%{version}.193-54bec + +# will be regenerated in the build directories +rm -f src/fs.h # will be further modified by coreutils-8.32-DIR_COLORS.patch sed src/dircolors.hin \ -e 's| 00;36$| 01;36|' \ > DIR_COLORS -sed src/dircolors.hin \ - -e 's| 01;31$| 38;5;9|' \ - -e 's| 01;35$| 38;5;13|' \ - -e 's| 01;36$| 38;5;45|' \ - > DIR_COLORS.256color sed src/dircolors.hin \ -e 's| 01;31$| 00;31|' \ -e 's| 01;35$| 00;35|' \ > DIR_COLORS.lightbgcolor -# git add DIR_COLORS{,.256color,.lightbgcolor} +# git add DIR_COLORS{,.lightbgcolor} # git commit -m "clone DIR_COLORS before patching" # apply all patches @@ -150,14 +143,33 @@ autoreconf -fiv %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fpic" + +# disable -flto on ppc64le to make test-float pass (#1789115) +%ifarch ppc64le +CFLAGS="$CFLAGS -fno-lto" +%endif + +# Upstream suggests to build with -Dlint for static analyzers: +# https://lists.gnu.org/archive/html/coreutils/2018-06/msg00110.html +# ... and even for production binary RPMs: +# https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00130.html +# There is currently no measurable performance drop or other known downside. +CFLAGS="$CFLAGS -Dlint" + +# make mknod work again in chroot without /proc being mounted (#1811038) +export ac_cv_func_lchmod="no" + +# needed for out-of-tree build +%global _configure ../configure + %{expand:%%global optflags %{optflags} -D_GNU_SOURCE=1} for type in separate single; do - mkdir $type && \ - (cd $type && ln -s ../configure || exit 1 + mkdir -p $type && \ + (cd $type || exit $? if test $type = 'single'; then config_single='--enable-single-binary' config_single="$config_single --without-openssl" # smaller/slower sha*sum - config_single="$config_single --without-gmp" # expr/factor machine ints + config_single="$config_single --without-libgmp" # expr/factor machine ints else config_single='--with-openssl' # faster sha*sum fi @@ -167,10 +179,10 @@ for type in separate single; do --enable-no-install-program=kill,uptime \ --with-tty-group \ DEFAULT_POSIX2_VERSION=200112 alternative=199209 || : - make all %{?_smp_mflags} + %make_build all V=1 # make sure that parse-datetime.{c,y} ends up in debuginfo (#1555079) - ln -v ../lib/parse-datetime.{c,y} . + ln -fv ../lib/parse-datetime.{c,y} . ) done @@ -208,8 +220,7 @@ for type in separate single; do done mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d -install -p -c -m644 DIR_COLORS{,.256color,.lightbgcolor} \ - $RPM_BUILD_ROOT%{_sysconfdir} +install -p -c -m644 DIR_COLORS{,.lightbgcolor} $RPM_BUILD_ROOT%{_sysconfdir} install -p -c -m644 %SOURCE105 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/colorls.sh install -p -c -m644 %SOURCE106 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/colorls.csh diff --git a/rh_i18n_wip.tar.gz b/rh_i18n_wip.tar.gz deleted file mode 100644 index 24b7cdc4900b0cde562b1e8e70e4915972227e24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28954 zcmV(?K-a$?iwFP_rKnZ_1MD1WciYA>U&~*yR$7Y`35qu<%1Xn?l+E{axS|v%P4e(S zU@4*|0R{jiD~|trXJ&VCLx-KFNh>}l1oxPoot>QMKlYXX~*}u3M3>kmFHXN(Aam2%r8J5LXn`L0n zZUfHz&3f&6L1~AXt~0lh%G8}`zeEqNV=hrCtCi9mb{e%FtKwImLBo}^0W@`q&cRj*z%I>&d*jfP6}SdKpl5rg*;kJ1@lur~_9l8A zKHJRaT#j|#sc&uWE|>02$+G8jrfFAp0O%&RG)w#}*^b5EGlTaB=B!z-o7SK+XwF#^ zZdj)yx0{$CHk)X|t#+DwxK;cb;8y2$iG9f?+bg!@#xr@ac}C3T`X*$ z-7MTChtt9#4(FE70+-D=o*DNX`xkE2>-7@5TIz2nr_;$l$NJ<{e{(TDDX~%&T8}5+ zT%Jy*7w41HSEVWqd_5k$9G~kKle5EDIO(4_cHTc71)p4gg>F{5kuv^xwW+fBX;1Urk(jP2GJBuD%vteNA5d zPuBu>%75hCelsQioBigK{Qq4(N1nT412};}qh+=StYwk+;^ReEUz ze8}E%s|J(U5ud?Vv(1`=VYfYO4_FnMq4Zdd1Ulw){B}BIC)@#{AT)`&Fq|vYAUkaB z?!Gy@IGP-fr*+#IvJp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**c+F#br=ps?JJsYc!8{WST#&i!uieVP4T|G#`saR1>!Y3|Sh&;tSd2TYcV Ap#T5? diff --git a/sources b/sources index 5d48f9e..da3e0cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (coreutils-ss.tar.xz) = 06f5ad3bb3e1fedd2cb37b26a094e9dcebe7c9efb4d8d15b82fc1bdab67b03cec3e216359def73a599cf66ccb5fab7fa8927b164037d36f2ee38d1b82cf53824 +SHA512 (coreutils-ss.tar.xz) = 7f8fda5d3e65768f9b0aa5da7bbc84ac1e24a8e87a840bb9a013dd8875346b5e9ccc3613de95478c87b859dd2a454651768852cbd67e1466ec3f6d7fef4fe938 diff --git a/upstream-key.gpg b/upstream-key.gpg deleted file mode 100644 index dc6dc1d..0000000 --- a/upstream-key.gpg +++ /dev/null @@ -1,123 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.6 (GNU/Linux) - -mQGiBDftyYoRBACvICTt5AWe7kdbRtJ37IZ+ED5tBA/IbISfqUPO+HmL/J9JSfkV -QHbdQR5dj5mrU6BY5YOY7L4KOS6lH3AgvsZ/NhkDBraBPgnMkpDqFb7z4keCIebb -AmlcBL2VQNTo0Lczo319YoZ+UaNH53OddlBY944qBTa0AlcJuS1SgEp7pwCg+CUj -4SjVzqZh5lgPTS0bnYvF/n0D/iItZ7WAm37KW+9UjArWZD6NO+mVMNq4GWmhcSBD -uyJOZFxFQWXdFRdM9sNO7lkWYVCxpXyFzmQcBzdrAt+zx/3QadEbduGAqEKAROQU -gSDlMITWGK97/Cadn1YRSDcGKNlJX9jlJvt5Q/xh+CnJ8HTwO0PF9A5N/phFuMMB -UH0pA/0e5eIBsr2Wvxy39+nGnNv5b+5tHkGXSSHKyI7+zOdIBTtRQO7lwTG9ioKg -/yMqb9NCSf4GdyZiFJsQ+TWoSyk1bvFHt7YUOhTeii7Zgbk7Due2q+b9KzzyH/r2 -kf+fLh0lgiy/LfBhvsfO8M9dji3XDyZpBL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KCRD90t6s0zPLocAwAKCJ4wBEND4W -mzs6Sp47mWBsp96HRACfTH+SGkDfLqgkZ7JgEgzSDKGl4TyIXQQTEQIAFQUCN+3v -9gMLCgMDFQMCAxYCAQIXgAASCRD90t6s0zPLoQdlR1BHAAEBwDAAoInjAEQ0Phab -OzpKnjuZYGyn3odEAJ9Mf5IaQN8uqCRnsmASDNIMoaXhPLkBDQQ37cmSEAQAx3xz -BZlJikWJaiZGru3cEKYYnRFp8No2b4jhBwY9nKn8UIxuY5aQN4ka/k81wqjlC6cT -wn5R7kg2ha8eGXpwYhKGwn5MGvIxqfoj2tsQ76uluTowHA4seoavi7RGEDzm4Vpt -8Nua8krrZ2QPtLA86gkzL1QG5Bbv/o2Ldx8HHNcAAwcEAKcK2tj2X8RPgUarczXv -rdXMteeSFnI7fagbLpEfaTI2xa1ADLg5UO4M9Erz9m6k6xV6loxcBB9H5Ljm9GWf -el4T4p1lwzi3Lu5hKzIiFs+5vsy+fyEai4e5f6v9Ww3Q3Ec6UZpPZGyN+PDPlZxe -rf3ZIMogSGrrEBhprhLHReudiE4EGBECAAYFAjftyZIAEgkQ/dLerNMzy6EHZUdQ -RwABAQXiAKCilmALgD6mhccl4ISaUB5LfW74BQCgqd7wIfbV2+NKqf1Yuj75sryW -Ke4= -=zRdO ------END PGP PUBLIC KEY BLOCK----- From 3483a527eceb1c406d22da50b99aae93fd18570a Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 11 Apr 2022 15:42:29 +0200 Subject: [PATCH 20/22] add upstream patch to fix tests/misc/printf-mb.sh --- coreutils.spec | 2 ++ printf-mb-fr-test.patch | 55 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 printf-mb-fr-test.patch diff --git a/coreutils.spec b/coreutils.spec index 1326f9b..cb5db6c 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -13,6 +13,8 @@ Source106: coreutils-colorls.csh # do not make coreutils-single depend on /usr/bin/coreutils %global __requires_exclude ^%{_bindir}/coreutils$ +Patch0: printf-mb-fr-test.patch + # disable the test-lock gnulib test prone to deadlock Patch100: coreutils-8.26-test-lock.patch diff --git a/printf-mb-fr-test.patch b/printf-mb-fr-test.patch new file mode 100644 index 0000000..48e960b --- /dev/null +++ b/printf-mb-fr-test.patch @@ -0,0 +1,55 @@ +From 2dafb4c0616d1a12917e35278fb9a2f74461d5f7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Mon, 11 Apr 2022 13:47:44 +0100 +Subject: [PATCH] tests: printf-mb.sh: fix false failure with french + translations + +* tests/misc/printf-mb.sh: As per commit 04148c99c, +adjust non C warnings to those of LC_MESSAGES=C before comparison. +Reported by Adam Sampson +--- + tests/misc/printf-mb.sh | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +diff --git a/tests/misc/printf-mb.sh b/tests/misc/printf-mb.sh +index 69ed3dfe8..f2f32c8a7 100755 +--- a/tests/misc/printf-mb.sh ++++ b/tests/misc/printf-mb.sh +@@ -33,9 +33,9 @@ if test "$LOCALE_FR_UTF8" != "none"; then + #uni-byte + LC_ALL=C $prog '%04x\n' "'$($prog '\xe1')" >>out 2>>err + #valid multi-byte, with trailing +- LC_ALL=$f $prog '%04x\n' '"á"' >>out 2>>err ++ LC_ALL=$f $prog '%04x\n' '"á=' >>out 2>>err + #invalid multi-byte, with trailing +- LC_ALL=$f $prog '%04x\n' "'$($prog '\xe1')'" >>out 2>>err ++ LC_ALL=$f $prog '%04x\n' "'$($prog '\xe1')=" >>out 2>>err + ) + cat <<\EOF > exp || framework_failure_ + 00e1 +@@ -46,11 +46,19 @@ if test "$LOCALE_FR_UTF8" != "none"; then + EOF + compare exp out || fail=1 + ++ # Disparate LC_CTYPE and LC_MESSAGES problematic on macos, ++ # so just look for character in warning message, ++ # and normalize to LC_MESSAGES=C ++ C_WARNING='printf: '\ ++'warning: =: character(s) following character constant have been ignored' ++ ++ sed "s/printf:.*=.*/$C_WARNING/" < err > c_err || framework_failure_ ++ + cat < exp_err +-printf: warning: ": character(s) following character constant have been ignored +-printf: warning: ': character(s) following character constant have been ignored ++$C_WARNING ++$C_WARNING + EOF +- compare exp_err err || fail=1 ++ compare exp_err c_err || fail=1 + fi + + Exit $fail +-- +2.26.2 + From 605cad7f695d2e3c24aeb020b29fc7ef0630c7bd Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 14 Apr 2022 12:15:36 +0200 Subject: [PATCH 21/22] Revert "add upstream patch to fix tests/misc/printf-mb.sh" This reverts commit 3483a527eceb1c406d22da50b99aae93fd18570a. --- coreutils.spec | 2 -- printf-mb-fr-test.patch | 55 ----------------------------------------- 2 files changed, 57 deletions(-) delete mode 100644 printf-mb-fr-test.patch diff --git a/coreutils.spec b/coreutils.spec index cb5db6c..1326f9b 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -13,8 +13,6 @@ Source106: coreutils-colorls.csh # do not make coreutils-single depend on /usr/bin/coreutils %global __requires_exclude ^%{_bindir}/coreutils$ -Patch0: printf-mb-fr-test.patch - # disable the test-lock gnulib test prone to deadlock Patch100: coreutils-8.26-test-lock.patch diff --git a/printf-mb-fr-test.patch b/printf-mb-fr-test.patch deleted file mode 100644 index 48e960b..0000000 --- a/printf-mb-fr-test.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 2dafb4c0616d1a12917e35278fb9a2f74461d5f7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= -Date: Mon, 11 Apr 2022 13:47:44 +0100 -Subject: [PATCH] tests: printf-mb.sh: fix false failure with french - translations - -* tests/misc/printf-mb.sh: As per commit 04148c99c, -adjust non C warnings to those of LC_MESSAGES=C before comparison. -Reported by Adam Sampson ---- - tests/misc/printf-mb.sh | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -diff --git a/tests/misc/printf-mb.sh b/tests/misc/printf-mb.sh -index 69ed3dfe8..f2f32c8a7 100755 ---- a/tests/misc/printf-mb.sh -+++ b/tests/misc/printf-mb.sh -@@ -33,9 +33,9 @@ if test "$LOCALE_FR_UTF8" != "none"; then - #uni-byte - LC_ALL=C $prog '%04x\n' "'$($prog '\xe1')" >>out 2>>err - #valid multi-byte, with trailing -- LC_ALL=$f $prog '%04x\n' '"á"' >>out 2>>err -+ LC_ALL=$f $prog '%04x\n' '"á=' >>out 2>>err - #invalid multi-byte, with trailing -- LC_ALL=$f $prog '%04x\n' "'$($prog '\xe1')'" >>out 2>>err -+ LC_ALL=$f $prog '%04x\n' "'$($prog '\xe1')=" >>out 2>>err - ) - cat <<\EOF > exp || framework_failure_ - 00e1 -@@ -46,11 +46,19 @@ if test "$LOCALE_FR_UTF8" != "none"; then - EOF - compare exp out || fail=1 - -+ # Disparate LC_CTYPE and LC_MESSAGES problematic on macos, -+ # so just look for character in warning message, -+ # and normalize to LC_MESSAGES=C -+ C_WARNING='printf: '\ -+'warning: =: character(s) following character constant have been ignored' -+ -+ sed "s/printf:.*=.*/$C_WARNING/" < err > c_err || framework_failure_ -+ - cat < exp_err --printf: warning: ": character(s) following character constant have been ignored --printf: warning: ': character(s) following character constant have been ignored -+$C_WARNING -+$C_WARNING - EOF -- compare exp_err err || fail=1 -+ compare exp_err c_err || fail=1 - fi - - Exit $fail --- -2.26.2 - From 9b5374de008fe482807d115d88f8f1c1a6632c42 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 14 Apr 2022 12:21:25 +0200 Subject: [PATCH 22/22] new snapshot available: coreutils-9.0.209-87d5c --- coreutils-ss.tar.xz.sig | 26 +++++++++++++------------- coreutils.spec | 4 ++-- sources | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/coreutils-ss.tar.xz.sig b/coreutils-ss.tar.xz.sig index 65295cf..34c9c21 100644 --- a/coreutils-ss.tar.xz.sig +++ b/coreutils-ss.tar.xz.sig @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNATURE----- -iQIzBAABCAAdFiEEbD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Ib +PZZSHKnSzzw4yyrJFDiLELKEILdsqxVr7Bxbv52ZqBTLsSOW0mjR+LMC5yU/gjMT +DstU38k6L0SSSYh+6T0NCeW0Plxq17fLxDmQa8lfrnbW6rhtGu8eW4FdWa7n7qPC +qwsvRCLxc6Kd4Wpw5qOioyzCzV20bpwsJvvylfn2wnln7Pr0Xb2iEyh2Oi/KWWo5 +MiGdW8WR9vLScHSwzMyp8iTnwOZW6IBIfPkq3Nr3ExTz5m4bFPho7tDvHn+/BY3W +XXyJ/QJqyJqtOcC6wR8VK1eWtmgDDBKWDkJn1XTMAVVPmeF7BLH0WLCSpp4vVvQI +U9PKF+y6Gt3yqtoLbFbl5SyAmvH62fyvvoOSozO/evXADTMCZVKUgBywg6zM0yEA +FBM1GTzPoLa9pXStVFmqeT0UKo9YFez5E+m4bGlrbo2VPJh1Zws= +=94MD -----END PGP SIGNATURE----- diff --git a/coreutils.spec b/coreutils.spec index 1326f9b..8cf4c64 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: 9.0 -Release: 9999.1%{?dist} +Release: 9999.2%{?dist} License: GPLv3+ Url: https://www.gnu.org/software/coreutils/ Source0: https://pixelbeat.org/cu/coreutils-ss.tar.xz @@ -115,7 +115,7 @@ Optional though recommended components, including documentation and translations. %prep -%autosetup -N -n %{name}-%{version}.193-54bec +%autosetup -N -n %{name}-%{version}.209-87d5 # will be regenerated in the build directories rm -f src/fs.h diff --git a/sources b/sources index da3e0cf..04795af 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (coreutils-ss.tar.xz) = 7f8fda5d3e65768f9b0aa5da7bbc84ac1e24a8e87a840bb9a013dd8875346b5e9ccc3613de95478c87b859dd2a454651768852cbd67e1466ec3f6d7fef4fe938 +SHA512 (coreutils-ss.tar.xz) = 3d51477d0f5a2082dd723974554185c855eea28189875b9b7ce88605db044897b0b8b0244d06ff6eb9f6fee5c2279437539dd8518d5a30d02e824d3a54b51303