SHA256
1
0
forked from pool/coreutils
Dominique Leuenberger 2023-04-23 20:43:11 +00:00 committed by Git OBS Bridge
commit 8e5eaa22ed
15 changed files with 195 additions and 285 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
size 5773008

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEbDfcEhIaUAa8HbgE32/ZcTBgN9kFAmQYdugACgkQ32/ZcTBg
N9k4HxAAr7vBX/LcT4lEItbgOWXehPnqD4ZeNz1KdzYdSJNV6CpmT5ivCM3Jen84
hB4EmEAi0ddjKR+eY3wUmFXILUmgABbUxsNz8ZLysHtktlzLy3Jxs1w0Qegwo4UY
WgXG7OSBxJCaKnQpYxYKL5brz+hU+7bB6HYtBmZw6P/AF/OotvoIs5omh/2hV9x2
gr8NhVz5VGd/A/btuOl1ZG2J4oZE/ysnHbzuwnWMo7FGEZ0tuQhqbVDwUjlHU6K9
JuwZ8vy+mix4RGVuKsMAzZSc6/tIVNbize1Dpckxzq+S55n9c5Z9UVcNYwPQAp/W
SqIIEO0sI+3Rii3jJsr819EnC/5ZbbPAgFk/3TDrRrwUEZSp4tOggmuM7ugrQQQ8
BSpnxZNWXBzitVFBAcQSasqHhLnPTxEJSTnPM/CBj3oKWjjkhGfxGlfS7FyF2sbL
dcpyoyC19oqob6Cl+SKz+LfIf+XzZFz1mBF8bn8uFTO5+8D/1VZNos1b/qC+y1Pn
/XHgficjHFj8R7Rstuknk+GF9SteAUgzitJaY0yLynRlo7TILxk1BLf1ErOQPS6G
iIHc38FO0OUmHTYakUPOS1A9AgwpwDxsGfwtxPcJSEaN3XCSPbMFNFKC61qnWCIP
N+tFayfE7yGGJGGenSB7qsMjCbB8icHtKf5OJwziTTaDUOZT0gU=
=V98/
-----END PGP SIGNATURE-----

BIN
coreutils-9.3.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

16
coreutils-9.3.tar.xz.sig Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEbDfcEhIaUAa8HbgE32/ZcTBgN9kFAmQ+r2YACgkQ32/ZcTBg
N9m/sRAAjHEe77ReKYJyJt5xvMY3mq8iSKL5hpKFX3onZwanElPzN+GFQdrvEEl9
8wSR4YObmcYg3H42oqqC94Ea+qtpUAwJ1DG6JXrBM2x2kKjmV7J1MwsLqkjCprBj
9VSMS6+xy/JB23x2pu+DGCbnBwCO7FZsbmt5h1orb73rR350ty0JOx5whAD6GL6p
+EJ1wNoVRknlGQskuVJBt0mpIf59s5fMlT8mGC22YReuqjf92qO8+CnTGWgUni9n
Lj5IHXUx/AQ4q+cVKHXf3Krwg7wLLRiNaUt/xmEn9buZuVCP09aKa6K+7QfGRE/L
YXaAwcTdAmzk8E0mXr9Z/XOT2+grbPhgJn5pb4L2IVKsqKw8VtJ8btBum1zQR0lP
PzXMpaHMJ/LZPNfeLC48GQ2R+x7uef3quUmTh5EQmq7IVnmZUdP5LUb5Nw44udLv
xUbeRP8aEni0IGTes+UkfP15HXIaqNG6Ij7pQoSzJZskRYJ/hmPp+py24Dv0I20B
rBTRvu+W0Bwpge7c2OcZJSnGEMjagGAzQ1jMpFlqLh9gotUymTy01jjFe1MD/ilL
IPStptSJFV4+LETgeEOdEvPN0E5UQqk7yqUp6bc81DOT6NFnSdWGetMrBy/PJSCn
KyTsNVeKUirimtozwfejUbhIdVA9a8KcDj4/KFLUe4F4cDa+inU=
=YhvD
-----END PGP SIGNATURE-----

View File

@ -4,38 +4,38 @@ Date: Mon, 4 Oct 2021 08:54:37 +0200
Subject: [PATCH] coreutils-i18n.patch Subject: [PATCH] coreutils-i18n.patch
--- ---
bootstrap.conf | 1 + bootstrap.conf | 1
configure.ac | 2 + configure.ac | 2
lib/linebuffer.h | 8 + lib/linebuffer.h | 8
lib/mbfile.c | 3 + lib/mbfile.c | 3
lib/mbfile.h | 255 ++++++++++++ lib/mbfile.h | 255 ++++++++++++++
m4/mbfile.m4 | 14 + m4/mbfile.m4 | 14
src/cut.c | 508 +++++++++++++++++++++-- src/cut.c | 508 ++++++++++++++++++++++++++--
src/expand-common.c | 114 ++++++ src/expand-common.c | 114 ++++++
src/expand-common.h | 12 + src/expand-common.h | 12
src/expand.c | 90 +++- src/expand.c | 90 ++++
src/fold.c | 312 ++++++++++++-- src/fold.c | 312 +++++++++++++++--
src/join.c | 359 ++++++++++++++-- src/join.c | 236 +++++++++++--
src/local.mk | 4 +- src/local.mk | 4
src/pr.c | 443 ++++++++++++++++++-- src/pr.c | 443 ++++++++++++++++++++++--
src/sort.c | 792 +++++++++++++++++++++++++++++++++--- src/sort.c | 793 +++++++++++++++++++++++++++++++++++++++++---
src/unexpand.c | 102 ++++- src/unexpand.c | 102 ++++-
src/uniq.c | 119 +++++- src/uniq.c | 119 ++++++
tests/Coreutils.pm | 3 + tests/Coreutils.pm | 3
tests/expand/mb.sh | 183 +++++++++ tests/expand/mb.sh | 183 ++++++++++
tests/i18n/sort.sh | 29 ++ tests/i18n/sort.sh | 29 +
tests/local.mk | 4 + tests/local.mk | 4
tests/misc/expand.pl | 42 ++ tests/misc/expand.pl | 42 ++
tests/misc/fold.pl | 50 ++- tests/misc/fold.pl | 50 ++
tests/misc/join.pl | 50 +++ tests/misc/join.pl | 50 ++
tests/misc/sort-mb-tests.sh | 45 ++ tests/misc/sort-mb-tests.sh | 45 ++
tests/misc/sort-merge.pl | 42 ++ tests/misc/sort-merge.pl | 42 ++
tests/misc/sort.pl | 40 +- tests/misc/sort.pl | 40 ++
tests/misc/unexpand.pl | 39 ++ tests/misc/unexpand.pl | 39 ++
tests/misc/uniq.pl | 55 +++ tests/misc/uniq.pl | 55 +++
tests/pr/pr-tests.pl | 49 +++ tests/pr/pr-tests.pl | 49 ++
tests/unexpand/mb.sh | 172 ++++++++ tests/unexpand/mb.sh | 172 +++++++++
31 files changed, 3699 insertions(+), 242 deletions(-) 31 files changed, 3600 insertions(+), 219 deletions(-)
create mode 100644 lib/mbfile.c create mode 100644 lib/mbfile.c
create mode 100644 lib/mbfile.h create mode 100644 lib/mbfile.h
create mode 100644 m4/mbfile.m4 create mode 100644 m4/mbfile.m4
@ -44,10 +44,10 @@ Subject: [PATCH] coreutils-i18n.patch
create mode 100755 tests/misc/sort-mb-tests.sh create mode 100755 tests/misc/sort-mb-tests.sh
create mode 100755 tests/unexpand/mb.sh create mode 100755 tests/unexpand/mb.sh
Index: coreutils-9.2/bootstrap.conf Index: bootstrap.conf
=================================================================== ===================================================================
--- coreutils-9.2.orig/bootstrap.conf --- bootstrap.conf.orig
+++ coreutils-9.2/bootstrap.conf +++ bootstrap.conf
@@ -165,6 +165,7 @@ gnulib_modules=" @@ -165,6 +165,7 @@ gnulib_modules="
maintainer-makefile maintainer-makefile
malloc-gnu malloc-gnu
@ -56,10 +56,10 @@ Index: coreutils-9.2/bootstrap.conf
mbrlen mbrlen
mbrtowc mbrtowc
mbsalign mbsalign
Index: coreutils-9.2/configure.ac Index: configure.ac
=================================================================== ===================================================================
--- coreutils-9.2.orig/configure.ac --- configure.ac.orig
+++ coreutils-9.2/configure.ac +++ configure.ac
@@ -477,6 +477,8 @@ fi @@ -477,6 +477,8 @@ fi
# I'm leaving it here for now. This whole thing needs to be modernized... # I'm leaving it here for now. This whole thing needs to be modernized...
gl_WINSIZE_IN_PTEM gl_WINSIZE_IN_PTEM
@ -69,10 +69,10 @@ Index: coreutils-9.2/configure.ac
gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H
if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \ if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \
Index: coreutils-9.2/lib/linebuffer.h Index: lib/linebuffer.h
=================================================================== ===================================================================
--- coreutils-9.2.orig/lib/linebuffer.h --- lib/linebuffer.h.orig
+++ coreutils-9.2/lib/linebuffer.h +++ lib/linebuffer.h
@@ -22,6 +22,11 @@ @@ -22,6 +22,11 @@
# include "idx.h" # include "idx.h"
# include <stdio.h> # include <stdio.h>
@ -95,18 +95,18 @@ Index: coreutils-9.2/lib/linebuffer.h
}; };
/* Initialize linebuffer LINEBUFFER for use. */ /* Initialize linebuffer LINEBUFFER for use. */
Index: coreutils-9.2/lib/mbfile.c Index: lib/mbfile.c
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ coreutils-9.2/lib/mbfile.c +++ lib/mbfile.c
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
+#include <config.h> +#include <config.h>
+#define MBFILE_INLINE _GL_EXTERN_INLINE +#define MBFILE_INLINE _GL_EXTERN_INLINE
+#include "mbfile.h" +#include "mbfile.h"
Index: coreutils-9.2/lib/mbfile.h Index: lib/mbfile.h
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ coreutils-9.2/lib/mbfile.h +++ lib/mbfile.h
@@ -0,0 +1,255 @@ @@ -0,0 +1,255 @@
+/* Multibyte character I/O: macros for multi-byte encodings. +/* Multibyte character I/O: macros for multi-byte encodings.
+ Copyright (C) 2001, 2005, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2001, 2005, 2009-2015 Free Software Foundation, Inc.
@ -363,10 +363,10 @@ Index: coreutils-9.2/lib/mbfile.h
+_GL_INLINE_HEADER_BEGIN +_GL_INLINE_HEADER_BEGIN
+ +
+#endif /* _MBFILE_H */ +#endif /* _MBFILE_H */
Index: coreutils-9.2/m4/mbfile.m4 Index: m4/mbfile.m4
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ coreutils-9.2/m4/mbfile.m4 +++ m4/mbfile.m4
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
+# mbfile.m4 serial 7 +# mbfile.m4 serial 7
+dnl Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc.
@ -382,10 +382,10 @@ Index: coreutils-9.2/m4/mbfile.m4
+ AC_REQUIRE([AC_TYPE_MBSTATE_T]) + AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ : + :
+]) +])
Index: coreutils-9.2/src/cut.c Index: src/cut.c
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/cut.c --- src/cut.c.orig
+++ coreutils-9.2/src/cut.c +++ src/cut.c
@@ -28,6 +28,11 @@ @@ -28,6 +28,11 @@
#include <assert.h> #include <assert.h>
#include <getopt.h> #include <getopt.h>
@ -1042,10 +1042,10 @@ Index: coreutils-9.2/src/cut.c
if (have_read_stdin && fclose (stdin) == EOF) if (have_read_stdin && fclose (stdin) == EOF)
Index: coreutils-9.2/src/expand-common.c Index: src/expand-common.c
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/expand-common.c --- src/expand-common.c.orig
+++ coreutils-9.2/src/expand-common.c +++ src/expand-common.c
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
@ -1174,10 +1174,10 @@ Index: coreutils-9.2/src/expand-common.c
/* Add the comma or blank separated list of tab stops STOPS /* Add the comma or blank separated list of tab stops STOPS
to the list of tab stops. */ to the list of tab stops. */
extern void extern void
Index: coreutils-9.2/src/expand-common.h Index: src/expand-common.h
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/expand-common.h --- src/expand-common.h.orig
+++ coreutils-9.2/src/expand-common.h +++ src/expand-common.h
@@ -25,6 +25,18 @@ extern size_t max_column_width; @@ -25,6 +25,18 @@ extern size_t max_column_width;
/* The desired exit status. */ /* The desired exit status. */
extern int exit_status; extern int exit_status;
@ -1197,10 +1197,10 @@ Index: coreutils-9.2/src/expand-common.h
/* Add tab stop TABVAL to the end of 'tab_list'. */ /* Add tab stop TABVAL to the end of 'tab_list'. */
extern void extern void
add_tab_stop (uintmax_t tabval); add_tab_stop (uintmax_t tabval);
Index: coreutils-9.2/src/expand.c Index: src/expand.c
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/expand.c --- src/expand.c.orig
+++ coreutils-9.2/src/expand.c +++ src/expand.c
@@ -37,6 +37,9 @@ @@ -37,6 +37,9 @@
#include <stdio.h> #include <stdio.h>
#include <getopt.h> #include <getopt.h>
@ -1353,10 +1353,10 @@ Index: coreutils-9.2/src/expand.c
} }
} }
Index: coreutils-9.2/src/fold.c Index: src/fold.c
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/fold.c --- src/fold.c.orig
+++ coreutils-9.2/src/fold.c +++ src/fold.c
@@ -22,12 +22,34 @@ @@ -22,12 +22,34 @@
#include <getopt.h> #include <getopt.h>
#include <sys/types.h> #include <sys/types.h>
@ -1759,10 +1759,10 @@ Index: coreutils-9.2/src/fold.c
break; break;
case 's': /* Break at word boundaries. */ case 's': /* Break at word boundaries. */
Index: coreutils-9.2/src/join.c Index: src/join.c
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/join.c --- src/join.c.orig
+++ coreutils-9.2/src/join.c +++ src/join.c
@@ -22,19 +22,33 @@ @@ -22,19 +22,33 @@
#include <sys/types.h> #include <sys/types.h>
#include <getopt.h> #include <getopt.h>
@ -2095,10 +2095,10 @@ Index: coreutils-9.2/src/join.c
} }
break; break;
Index: coreutils-9.2/src/local.mk Index: src/local.mk
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/local.mk --- src/local.mk.orig
+++ coreutils-9.2/src/local.mk +++ src/local.mk
@@ -438,8 +438,8 @@ src_base32_CPPFLAGS = -DBASE_TYPE=32 $(A @@ -438,8 +438,8 @@ src_base32_CPPFLAGS = -DBASE_TYPE=32 $(A
src_basenc_SOURCES = src/basenc.c src_basenc_SOURCES = src/basenc.c
src_basenc_CPPFLAGS = -DBASE_TYPE=42 $(AM_CPPFLAGS) src_basenc_CPPFLAGS = -DBASE_TYPE=42 $(AM_CPPFLAGS)
@ -2110,10 +2110,10 @@ Index: coreutils-9.2/src/local.mk
src_wc_SOURCES = src/wc.c src_wc_SOURCES = src/wc.c
if USE_AVX2_WC_LINECOUNT if USE_AVX2_WC_LINECOUNT
Index: coreutils-9.2/src/pr.c Index: src/pr.c
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/pr.c --- src/pr.c.orig
+++ coreutils-9.2/src/pr.c +++ src/pr.c
@@ -311,6 +311,24 @@ @@ -311,6 +311,24 @@
#include <getopt.h> #include <getopt.h>
@ -2876,10 +2876,10 @@ Index: coreutils-9.2/src/pr.c
/* We've just printed some files and need to clean up things before /* We've just printed some files and need to clean up things before
looking for more options and printing the next batch of files. looking for more options and printing the next batch of files.
Index: coreutils-9.2/src/sort.c Index: src/sort.c
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/sort.c --- src/sort.c.orig
+++ coreutils-9.2/src/sort.c +++ src/sort.c
@@ -29,6 +29,14 @@ @@ -29,6 +29,14 @@
#include <sys/wait.h> #include <sys/wait.h>
#include <signal.h> #include <signal.h>
@ -3952,10 +3952,10 @@ Index: coreutils-9.2/src/sort.c
} }
break; break;
Index: coreutils-9.2/src/unexpand.c Index: src/unexpand.c
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/unexpand.c --- src/unexpand.c.orig
+++ coreutils-9.2/src/unexpand.c +++ src/unexpand.c
@@ -38,6 +38,9 @@ @@ -38,6 +38,9 @@
#include <stdio.h> #include <stdio.h>
#include <getopt.h> #include <getopt.h>
@ -4157,10 +4157,10 @@ Index: coreutils-9.2/src/unexpand.c
} }
} }
Index: coreutils-9.2/src/uniq.c Index: src/uniq.c
=================================================================== ===================================================================
--- coreutils-9.2.orig/src/uniq.c --- src/uniq.c.orig
+++ coreutils-9.2/src/uniq.c +++ src/uniq.c
@@ -21,6 +21,17 @@ @@ -21,6 +21,17 @@
#include <getopt.h> #include <getopt.h>
#include <sys/types.h> #include <sys/types.h>
@ -4322,10 +4322,10 @@ Index: coreutils-9.2/src/uniq.c
skip_chars = 0; skip_chars = 0;
skip_fields = 0; skip_fields = 0;
check_chars = SIZE_MAX; check_chars = SIZE_MAX;
Index: coreutils-9.2/tests/Coreutils.pm Index: tests/Coreutils.pm
=================================================================== ===================================================================
--- coreutils-9.2.orig/tests/Coreutils.pm --- tests/Coreutils.pm.orig
+++ coreutils-9.2/tests/Coreutils.pm +++ tests/Coreutils.pm
@@ -269,6 +269,9 @@ sub run_tests ($$$$$) @@ -269,6 +269,9 @@ sub run_tests ($$$$$)
# Yes, this is an arbitrary limit. If it causes trouble, # Yes, this is an arbitrary limit. If it causes trouble,
# consider removing it. # consider removing it.
@ -4336,10 +4336,10 @@ Index: coreutils-9.2/tests/Coreutils.pm
if ($max < length $test_name) if ($max < length $test_name)
{ {
warn "$program_name: $test_name: test name is too long (> $max)\n"; warn "$program_name: $test_name: test name is too long (> $max)\n";
Index: coreutils-9.2/tests/expand/mb.sh Index: tests/expand/mb.sh
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ coreutils-9.2/tests/expand/mb.sh +++ tests/expand/mb.sh
@@ -0,0 +1,183 @@ @@ -0,0 +1,183 @@
+#!/bin/sh +#!/bin/sh
+ +
@ -4524,10 +4524,10 @@ Index: coreutils-9.2/tests/expand/mb.sh
+compare exp out > /dev/null 2>&1 || fail=1 +compare exp out > /dev/null 2>&1 || fail=1
+ +
+exit $fail +exit $fail
Index: coreutils-9.2/tests/i18n/sort.sh Index: tests/i18n/sort.sh
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ coreutils-9.2/tests/i18n/sort.sh +++ tests/i18n/sort.sh
@@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
+#!/bin/sh +#!/bin/sh
+# Verify sort's multi-byte support. +# Verify sort's multi-byte support.
@ -4558,11 +4558,11 @@ Index: coreutils-9.2/tests/i18n/sort.sh
+ +
+ +
+Exit $fail +Exit $fail
Index: coreutils-9.2/tests/local.mk Index: tests/local.mk
=================================================================== ===================================================================
--- coreutils-9.2.orig/tests/local.mk --- tests/local.mk.orig
+++ coreutils-9.2/tests/local.mk +++ tests/local.mk
@@ -381,6 +381,8 @@ all_tests = \ @@ -383,6 +383,8 @@ all_tests = \
tests/misc/sort-discrim.sh \ tests/misc/sort-discrim.sh \
tests/misc/sort-files0-from.pl \ tests/misc/sort-files0-from.pl \
tests/misc/sort-float.sh \ tests/misc/sort-float.sh \
@ -4571,7 +4571,7 @@ Index: coreutils-9.2/tests/local.mk
tests/misc/sort-h-thousands-sep.sh \ tests/misc/sort-h-thousands-sep.sh \
tests/misc/sort-merge.pl \ tests/misc/sort-merge.pl \
tests/misc/sort-merge-fdlimit.sh \ tests/misc/sort-merge-fdlimit.sh \
@@ -582,6 +584,7 @@ all_tests = \ @@ -584,6 +586,7 @@ all_tests = \
tests/du/threshold.sh \ tests/du/threshold.sh \
tests/du/trailing-slash.sh \ tests/du/trailing-slash.sh \
tests/du/two-args.sh \ tests/du/two-args.sh \
@ -4579,7 +4579,7 @@ Index: coreutils-9.2/tests/local.mk
tests/id/gnu-zero-uids.sh \ tests/id/gnu-zero-uids.sh \
tests/id/no-context.sh \ tests/id/no-context.sh \
tests/id/context.sh \ tests/id/context.sh \
@@ -734,6 +737,7 @@ all_tests = \ @@ -736,6 +739,7 @@ all_tests = \
tests/touch/read-only.sh \ tests/touch/read-only.sh \
tests/touch/relative.sh \ tests/touch/relative.sh \
tests/touch/trailing-slash.sh \ tests/touch/trailing-slash.sh \
@ -4587,10 +4587,10 @@ Index: coreutils-9.2/tests/local.mk
$(all_root_tests) $(all_root_tests)
# See tests/factor/create-test.sh. # See tests/factor/create-test.sh.
Index: coreutils-9.2/tests/misc/expand.pl Index: tests/misc/expand.pl
=================================================================== ===================================================================
--- coreutils-9.2.orig/tests/misc/expand.pl --- tests/misc/expand.pl.orig
+++ coreutils-9.2/tests/misc/expand.pl +++ tests/misc/expand.pl
@@ -27,6 +27,15 @@ my $prog = 'expand'; @@ -27,6 +27,15 @@ my $prog = 'expand';
# Turn off localization of executable's output. # Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@ -4654,10 +4654,10 @@ Index: coreutils-9.2/tests/misc/expand.pl
my $save_temps = $ENV{DEBUG}; my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE}; my $verbose = $ENV{VERBOSE};
Index: coreutils-9.2/tests/misc/fold.pl Index: tests/misc/fold.pl
=================================================================== ===================================================================
--- coreutils-9.2.orig/tests/misc/fold.pl --- tests/misc/fold.pl.orig
+++ coreutils-9.2/tests/misc/fold.pl +++ tests/misc/fold.pl
@@ -20,9 +20,18 @@ use strict; @@ -20,9 +20,18 @@ use strict;
(my $program_name = $0) =~ s|.*/||; (my $program_name = $0) =~ s|.*/||;
@ -4727,10 +4727,10 @@ Index: coreutils-9.2/tests/misc/fold.pl
-my $prog = 'fold'; -my $prog = 'fold';
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose); my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
exit $fail; exit $fail;
Index: coreutils-9.2/tests/misc/join.pl Index: tests/misc/join.pl
=================================================================== ===================================================================
--- coreutils-9.2.orig/tests/misc/join.pl --- tests/misc/join.pl.orig
+++ coreutils-9.2/tests/misc/join.pl +++ tests/misc/join.pl
@@ -25,6 +25,15 @@ my $limits = getlimits (); @@ -25,6 +25,15 @@ my $limits = getlimits ();
my $prog = 'join'; my $prog = 'join';
@ -4797,10 +4797,10 @@ Index: coreutils-9.2/tests/misc/join.pl
my $save_temps = $ENV{DEBUG}; my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE}; my $verbose = $ENV{VERBOSE};
Index: coreutils-9.2/tests/misc/sort-mb-tests.sh Index: tests/misc/sort-mb-tests.sh
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ coreutils-9.2/tests/misc/sort-mb-tests.sh +++ tests/misc/sort-mb-tests.sh
@@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
+#!/bin/sh +#!/bin/sh
+# Verify sort's multi-byte support. +# Verify sort's multi-byte support.
@ -4847,10 +4847,10 @@ Index: coreutils-9.2/tests/misc/sort-mb-tests.sh
+compare exp out || { fail=1; cat out; } +compare exp out || { fail=1; cat out; }
+ +
+Exit $fail +Exit $fail
Index: coreutils-9.2/tests/misc/sort-merge.pl Index: tests/misc/sort-merge.pl
=================================================================== ===================================================================
--- coreutils-9.2.orig/tests/misc/sort-merge.pl --- tests/misc/sort-merge.pl.orig
+++ coreutils-9.2/tests/misc/sort-merge.pl +++ tests/misc/sort-merge.pl
@@ -26,6 +26,15 @@ my $prog = 'sort'; @@ -26,6 +26,15 @@ my $prog = 'sort';
# Turn off localization of executable's output. # Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@ -4907,10 +4907,10 @@ Index: coreutils-9.2/tests/misc/sort-merge.pl
my $save_temps = $ENV{DEBUG}; my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE}; my $verbose = $ENV{VERBOSE};
Index: coreutils-9.2/tests/misc/sort.pl Index: tests/misc/sort.pl
=================================================================== ===================================================================
--- coreutils-9.2.orig/tests/misc/sort.pl --- tests/misc/sort.pl.orig
+++ coreutils-9.2/tests/misc/sort.pl +++ tests/misc/sort.pl
@@ -24,10 +24,15 @@ my $prog = 'sort'; @@ -24,10 +24,15 @@ my $prog = 'sort';
# Turn off localization of executable's output. # Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@ -4975,10 +4975,10 @@ Index: coreutils-9.2/tests/misc/sort.pl
my $save_temps = $ENV{DEBUG}; my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE}; my $verbose = $ENV{VERBOSE};
Index: coreutils-9.2/tests/misc/unexpand.pl Index: tests/misc/unexpand.pl
=================================================================== ===================================================================
--- coreutils-9.2.orig/tests/misc/unexpand.pl --- tests/misc/unexpand.pl.orig
+++ coreutils-9.2/tests/misc/unexpand.pl +++ tests/misc/unexpand.pl
@@ -27,6 +27,14 @@ my $limits = getlimits (); @@ -27,6 +27,14 @@ my $limits = getlimits ();
my $prog = 'unexpand'; my $prog = 'unexpand';
@ -5032,10 +5032,10 @@ Index: coreutils-9.2/tests/misc/unexpand.pl
my $save_temps = $ENV{DEBUG}; my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE}; my $verbose = $ENV{VERBOSE};
Index: coreutils-9.2/tests/misc/uniq.pl Index: tests/misc/uniq.pl
=================================================================== ===================================================================
--- coreutils-9.2.orig/tests/misc/uniq.pl --- tests/misc/uniq.pl.orig
+++ coreutils-9.2/tests/misc/uniq.pl +++ tests/misc/uniq.pl
@@ -23,9 +23,17 @@ my $limits = getlimits (); @@ -23,9 +23,17 @@ my $limits = getlimits ();
my $prog = 'uniq'; my $prog = 'uniq';
my $try = "Try '$prog --help' for more information.\n"; my $try = "Try '$prog --help' for more information.\n";
@ -5108,10 +5108,10 @@ Index: coreutils-9.2/tests/misc/uniq.pl
@Tests = add_z_variants \@Tests; @Tests = add_z_variants \@Tests;
@Tests = triple_test \@Tests; @Tests = triple_test \@Tests;
Index: coreutils-9.2/tests/pr/pr-tests.pl Index: tests/pr/pr-tests.pl
=================================================================== ===================================================================
--- coreutils-9.2.orig/tests/pr/pr-tests.pl --- tests/pr/pr-tests.pl.orig
+++ coreutils-9.2/tests/pr/pr-tests.pl +++ tests/pr/pr-tests.pl
@@ -24,6 +24,15 @@ use strict; @@ -24,6 +24,15 @@ use strict;
my $prog = 'pr'; my $prog = 'pr';
my $normalize_strerror = "s/': .*/'/"; my $normalize_strerror = "s/': .*/'/";
@ -5177,10 +5177,10 @@ Index: coreutils-9.2/tests/pr/pr-tests.pl
my $save_temps = $ENV{DEBUG}; my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE}; my $verbose = $ENV{VERBOSE};
Index: coreutils-9.2/tests/unexpand/mb.sh Index: tests/unexpand/mb.sh
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ coreutils-9.2/tests/unexpand/mb.sh +++ tests/unexpand/mb.sh
@@ -0,0 +1,172 @@ @@ -0,0 +1,172 @@
+#!/bin/sh +#!/bin/sh
+ +

View File

@ -37,7 +37,7 @@ Index: tests/misc/help-version.sh
=================================================================== ===================================================================
--- tests/misc/help-version.sh.orig --- tests/misc/help-version.sh.orig
+++ tests/misc/help-version.sh +++ tests/misc/help-version.sh
@@ -240,6 +240,7 @@ parted_setup () { args="-s $tmp_in mklab @@ -241,6 +241,7 @@ parted_setup () { args="-s $tmp_in mklab
for i in $built_programs; do for i in $built_programs; do
# Skip these. # Skip these.
case $i in chroot|stty|tty|false|chcon|runcon|coreutils) continue;; esac case $i in chroot|stty|tty|false|chcon|runcon|coreutils) continue;; esac

View File

@ -31,7 +31,7 @@ Index: doc/coreutils.texi
* hostid invocation:: Print numeric host identifier * hostid invocation:: Print numeric host identifier
* uptime invocation:: Print system uptime and load * uptime invocation:: Print system uptime and load
@@ -16203,7 +16201,6 @@ information. @@ -16227,7 +16225,6 @@ information.
* arch invocation:: Print machine hardware name. * arch invocation:: Print machine hardware name.
* nproc invocation:: Print the number of processors. * nproc invocation:: Print the number of processors.
* uname invocation:: Print system information. * uname invocation:: Print system information.
@ -39,7 +39,7 @@ Index: doc/coreutils.texi
* hostid invocation:: Print numeric host identifier. * hostid invocation:: Print numeric host identifier.
* uptime invocation:: Print system uptime and load. * uptime invocation:: Print system uptime and load.
@end menu @end menu
@@ -17094,15 +17091,6 @@ Note this is non-portable (even across G @@ -17118,15 +17115,6 @@ Note this is non-portable (even across G
Print the machine hardware name (sometimes called the hardware class Print the machine hardware name (sometimes called the hardware class
or hardware type). or hardware type).
@ -55,7 +55,7 @@ Index: doc/coreutils.texi
@item -p @item -p
@itemx --processor @itemx --processor
@opindex -p @opindex -p
@@ -17156,34 +17144,6 @@ Print the kernel version. @@ -17180,34 +17168,6 @@ Print the kernel version.
@exitstatus @exitstatus

View File

@ -33,7 +33,7 @@ Index: doc/coreutils.texi
Delaying Delaying
* sleep invocation:: Delay for a specified time * sleep invocation:: Delay for a specified time
@@ -18604,90 +18598,6 @@ timeout -s INT 5s env --ignore-signal=IN @@ -18628,90 +18622,6 @@ timeout -s INT 5s env --ignore-signal=IN
timeout -s INT -k 3s 5s env --ignore-signal=INT sleep 20 timeout -s INT -k 3s 5s env --ignore-signal=INT sleep 20
@end example @end example

View File

@ -21,7 +21,7 @@ Index: gnulib-tests/gnulib.mk
=================================================================== ===================================================================
--- gnulib-tests/gnulib.mk.orig --- gnulib-tests/gnulib.mk.orig
+++ gnulib-tests/gnulib.mk +++ gnulib-tests/gnulib.mk
@@ -2676,9 +2676,10 @@ EXTRA_DIST += test-timespec.c macros.h @@ -2765,9 +2765,10 @@ EXTRA_DIST += test-timespec.c macros.h
## begin gnulib module tls-tests ## begin gnulib module tls-tests

View File

@ -16,7 +16,7 @@ Index: tests/local.mk
=================================================================== ===================================================================
--- tests/local.mk.orig --- tests/local.mk.orig
+++ tests/local.mk +++ tests/local.mk
@@ -743,14 +743,9 @@ all_tests = \ @@ -745,14 +745,9 @@ all_tests = \
# See tests/factor/create-test.sh. # See tests/factor/create-test.sh.
tf = tests/factor tf = tests/factor
factor_tests = \ factor_tests = \

View File

@ -6,7 +6,7 @@ Index: tests/init.sh
=================================================================== ===================================================================
--- tests/init.sh.orig --- tests/init.sh.orig
+++ tests/init.sh +++ tests/init.sh
@@ -685,6 +685,16 @@ compare () @@ -690,6 +690,16 @@ compare ()
} }
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------

View File

@ -1,3 +1,7 @@
---
tests/du/move-dir-while-traversing.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: tests/du/move-dir-while-traversing.sh Index: tests/du/move-dir-while-traversing.sh
=================================================================== ===================================================================
--- tests/du/move-dir-while-traversing.sh.orig --- tests/du/move-dir-while-traversing.sh.orig

View File

@ -1,3 +1,44 @@
-------------------------------------------------------------------
Thu Apr 20 09:19:20 UTC 2023 - Bernhard Voelker <mail@bernhard-voelker.de>
- update to 9.3:
Bug fixes:
* cp --reflink=auto (the default), mv, and install
will again fall back to a standard copy in more cases.
Previously copies could fail with permission errors on
more restricted systems like android or containers etc.
[bug introduced in coreutils-9.2]
* cp --recursive --backup will again operate correctly.
Previousy it may have issued "File exists" errors when
it failed to appropriately rename files being replaced.
[bug introduced in coreutils-9.2]
* date --file and dircolors will now diagnose a failure to read a file.
Previously they would have silently ignored the failure.
[This bug was present in "the beginning".]
* md5sum --check again correctly prints the status of each file checked.
Previously the status for files was printed as 'OK' once any file had passed.
This also applies to cksum, sha*sum, and b2sum.
[bug introduced in coreutils-9.2]
* wc will now diagnose if any total counts have overflowed.
[This bug was present in "the beginning".]
* `wc -c` will again correctly update the read offset of inputs.
Previously it deduced the size of inputs while leaving the offset unchanged.
[bug introduced in coreutils-8.27]
* Coreutils programs no longer fail for timestamps past the year 2038
on obsolete configurations with 32-bit signed time_t, because the
build procedure now rejects these configurations.
[This bug was present in "the beginning".]
Changes in behavior:
* 'cp -n' and 'mv -n' now issue an error diagnostic if skipping a file,
to correspond with -n inducing a nonzero exit status as of coreutils 9.2.
Similarly 'cp -v' and 'mv -v' will output a message for each file skipped
due to -n, -i, or -u.
New features:
* cp and mv now support --update=none to always skip existing files
in the destination, while not affecting the exit status.
This is equivalent to the --no-clobber behavior from before v9.2.
- drop fix-reflink-fallback.patch (upstream).
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Apr 6 16:12:43 UTC 2023 - Dirk Müller <dmueller@suse.com> Thu Apr 6 16:12:43 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -28,7 +28,7 @@
%global psuffix %{nil} %global psuffix %{nil}
%endif %endif
Name: coreutils%{?psuffix} Name: coreutils%{?psuffix}
Version: 9.2 Version: 9.3
Release: 0 Release: 0
Summary: GNU Core Utilities Summary: GNU Core Utilities
License: GPL-3.0-or-later License: GPL-3.0-or-later
@ -42,8 +42,6 @@ Patch1: coreutils-remove_hostname_documentation.patch
Patch3: coreutils-remove_kill_documentation.patch Patch3: coreutils-remove_kill_documentation.patch
Patch4: coreutils-i18n.patch Patch4: coreutils-i18n.patch
Patch8: coreutils-sysinfo.patch Patch8: coreutils-sysinfo.patch
# PATCH-FIX-UPSTREAM: https://github.com/coreutils/coreutils/commit/093a8b4bfaba60005f14493ce7ef11ed665a0176
Patch9: fix-reflink-fallback.patch
Patch16: coreutils-invalid-ids.patch Patch16: coreutils-invalid-ids.patch
# OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option. # OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option.
Patch100: coreutils-build-timeout-as-pie.patch Patch100: coreutils-build-timeout-as-pie.patch
@ -135,11 +133,10 @@ This package contains the documentation for the GNU Core Utilities.
%prep %prep
%setup -q -n coreutils-%{version} %setup -q -n coreutils-%{version}
%patch4 -p1 %patch4
%patch1 %patch1
%patch3 %patch3
%patch8 %patch8
%patch9 -p1
%patch16 %patch16
# #
%if 0%{?suse_version} <= 1320 %if 0%{?suse_version} <= 1320

View File

@ -1,132 +0,0 @@
From 093a8b4bfaba60005f14493ce7ef11ed665a0176 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Thu, 23 Mar 2023 13:19:04 +0000
Subject: [PATCH] copy: fix --reflink=auto to fallback in more cases
On restricted systems like android or some containers,
FICLONE could return EPERM, EACCES, or ENOTTY,
which would have induced the command to fail to copy
rather than falling back to a more standard copy.
* src/copy.c (is_terminal_failure): A new function refactored
from handle_clone_fail().
(is_CLONENOTSUP): Merge in the handling of EACCES, ENOTTY, EPERM
as they also pertain to determination of whether cloning is supported
if we ever use this function in that context.
(handle_clone_fail): Use is_terminal_failure() in all cases,
so that we assume a terminal failure in less errno cases.
* NEWS: Mention the bug fix.
Addresses https://bugs.gnu.org/62404
---
NEWS | 8 +++++++
src/copy.c | 62 ++++++++++++++++++++++++++++++------------------------
2 files changed, 43 insertions(+), 27 deletions(-)
Index: coreutils-9.2/src/copy.c
===================================================================
--- coreutils-9.2.orig/src/copy.c
+++ coreutils-9.2/src/copy.c
@@ -278,15 +278,27 @@ create_hole (int fd, char const *name, b
}
-/* Whether the errno from FICLONE, or copy_file_range
- indicates operation is not supported for this file or file system. */
+/* Whether the errno indicates the operation is a transient failure.
+ I.e., a failure that would indicate the operation _is_ supported,
+ but has failed in a terminal way. */
+
+static bool
+is_terminal_error (int err)
+{
+ return err == EIO || err == ENOMEM || err == ENOSPC || err == EDQUOT;
+}
+
+
+/* Whether the errno from FICLONE, or copy_file_range indicates
+ the operation is not supported/allowed for this file or process. */
static bool
is_CLONENOTSUP (int err)
{
- return err == ENOSYS || is_ENOTSUP (err)
+ return err == ENOSYS || err == ENOTTY || is_ENOTSUP (err)
|| err == EINVAL || err == EBADF
- || err == EXDEV || err == ETXTBSY;
+ || err == EXDEV || err == ETXTBSY
+ || err == EPERM || err == EACCES;
}
@@ -339,20 +351,18 @@ sparse_copy (int src_fd, int dest_fd, ch
{
copy_debug.offload = COPY_DEBUG_UNSUPPORTED;
- if (is_CLONENOTSUP (errno))
- break;
-
- /* copy_file_range might not be enabled in seccomp filters,
- so retry with a standard copy. EPERM can also occur
- for immutable files, but that would only be in the edge case
- where the file is made immutable after creating/truncating,
+ /* Consider operation unsupported only if no data copied.
+ For example, EPERM could occur if copy_file_range not enabled
+ in seccomp filters, so retry with a standard copy. EPERM can
+ also occur for immutable files, but that would only be in the
+ edge case where the file is made immutable after creating,
in which case the (more accurate) error is still shown. */
- if (errno == EPERM && *total_n_read == 0)
+ if (*total_n_read == 0 && is_CLONENOTSUP (errno))
break;
/* ENOENT was seen sometimes across CIFS shares, resulting in
no data being copied, but subsequent standard copies succeed. */
- if (errno == ENOENT && *total_n_read == 0)
+ if (*total_n_read == 0 && errno == ENOENT)
break;
if (errno == EINTR)
@@ -1172,17 +1182,15 @@ handle_clone_fail (int dst_dirfd, char c
char const* src_name, char const* dst_name,
int dest_desc, bool new_dst, enum Reflink_type reflink_mode)
{
- /* If the clone operation is creating the destination,
- then don't try and cater for all non transient file system errors,
- and instead only cater for specific transient errors. */
- bool transient_failure;
- if (dest_desc < 0) /* currently for fclonefileat(). */
- transient_failure = errno == EIO || errno == ENOMEM
- || errno == ENOSPC || errno == EDQUOT;
- else /* currently for FICLONE. */
- transient_failure = ! is_CLONENOTSUP (errno);
+ /* When the clone operation fails, report failure only with errno values
+ known to mean trouble when the clone is supported and called properly.
+ Do not report failure merely because !is_CLONENOTSUP (errno),
+ as systems may yield oddball errno values here with FICLONE.
+ Also is_CLONENOTSUP() is not appropriate for the range of errnos
+ possible from fclonefileat(), so it's more consistent to avoid. */
+ bool report_failure = is_terminal_error (errno);
- if (reflink_mode == REFLINK_ALWAYS || transient_failure)
+ if (reflink_mode == REFLINK_ALWAYS || report_failure)
error (0, errno, _("failed to clone %s from %s"),
quoteaf_n (0, dst_name), quoteaf_n (1, src_name));
@@ -1190,14 +1198,14 @@ handle_clone_fail (int dst_dirfd, char c
but cloned no data. */
if (new_dst /* currently not for fclonefileat(). */
&& reflink_mode == REFLINK_ALWAYS
- && ((! transient_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
+ && ((! report_failure) || lseek (dest_desc, 0, SEEK_END) == 0)
&& unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT)
error (0, errno, _("cannot remove %s"), quoteaf (dst_name));
- if (! transient_failure)
+ if (! report_failure)
copy_debug.reflink = COPY_DEBUG_UNSUPPORTED;
- if (reflink_mode == REFLINK_ALWAYS || transient_failure)
+ if (reflink_mode == REFLINK_ALWAYS || report_failure)
return false;
return true;