diff --git a/bugfix-remove-usr-local-lib-from-m4.patch b/bugfix-remove-usr-local-lib-from-m4.patch deleted file mode 100644 index 8537a91d1ce9d0e5b81d949c04d1082f50c49e6f..0000000000000000000000000000000000000000 --- a/bugfix-remove-usr-local-lib-from-m4.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 -index c9f5a6d..e8f94dd 100644 ---- a/m4/getloadavg.m4 -+++ b/m4/getloadavg.m4 -@@ -41,16 +41,6 @@ AC_CHECK_FUNC([getloadavg], [], - [LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes]) - fi - -- if test $gl_func_getloadavg_done = no; then -- # There is a commonly available library for RS/6000 AIX. -- # Since it is not a standard part of AIX, it might be installed locally. -- gl_getloadavg_LIBS=$LIBS -- LIBS="-L/usr/local/lib $LIBS" -- AC_CHECK_LIB([getloadavg], [getloadavg], -- [LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes], -- [LIBS=$gl_getloadavg_LIBS]) -- fi -- - # Set up the replacement function if necessary. - if test $gl_func_getloadavg_done = no; then - HAVE_GETLOADAVG=0 diff --git a/bugfix-selinux-flask.patch b/bugfix-selinux-flask.patch index 9f82f4dd3c90e9b1124c4b9aa56ff2a2c60ae8df..36ee21b1f865126c2a7377ceff3c9ff1e56ce38b 100644 --- a/bugfix-selinux-flask.patch +++ b/bugfix-selinux-flask.patch @@ -1,13 +1,21 @@ +From 664c7526e79016603ca9560604af118b43332a15 Mon Sep 17 00:00:00 2001 +From: overweight +Date: Wed, 29 Jul 2020 15:14:24 +0800 +Subject: [PATCH] bugfix-selinux-flask + +--- + m4/gnulib-comp.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 -index 1401e52..e98db6f 100644 +index dead90e..0abf0bd 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 -@@ -1751,11 +1751,11 @@ AC_DEFUN([gl_INIT], +@@ -1860,10 +1860,10 @@ AC_DEFUN([gl_INIT], AC_LIBOBJ([select]) fi gl_SYS_SELECT_MODULE_INDICATOR([select]) - AC_CHECK_HEADERS([selinux/flask.h]) - AC_LIBOBJ([selinux-at]) gl_HEADERS_SELINUX_SELINUX_H gl_HEADERS_SELINUX_CONTEXT_H if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then @@ -15,3 +23,6 @@ index 1401e52..e98db6f 100644 AC_LIBOBJ([getfilecon]) fi gl_SERVENT +-- +2.23.0 + diff --git a/0001-coreutils-8.31-i18n.patch b/coreutils-8.32-i18n.patch similarity index 92% rename from 0001-coreutils-8.31-i18n.patch rename to coreutils-8.32-i18n.patch index 6c376d29fa01afd807b3be81a68861260ee494d2..95d8503f04aff21fdcb30845b16f8075648f5f7b 100644 --- a/0001-coreutils-8.31-i18n.patch +++ b/coreutils-8.32-i18n.patch @@ -1,49 +1,49 @@ -From 4135d348d731717473baca6fed127123ce142eb5 Mon Sep 17 00:00:00 2001 -From: openEuler Buildteam -Date: Fri, 10 Jan 2020 13:52:36 +0800 -Subject: [PATCH] coreutils 8.31 i18n - +From 7c530f994f1a316c08aa01a9938eba7183943823 Mon Sep 17 00:00:00 2001 +From: build team +Date: Wed, 29 Jul 2020 14:29:49 +0800 +Subject: [PATCH] coreutils-8.32-i18n.patch +rework coreutils-8.32-i18n.patch --- bootstrap.conf | 1 + configure.ac | 2 + lib/linebuffer.h | 8 + lib/mbfile.c | 3 + - lib/mbfile.h | 255 +++++++++++++++ + lib/mbfile.h | 255 ++++++++++++ m4/mbfile.m4 | 14 + - src/cut.c | 441 ++++++++++++++++++++++++- - src/expand-common.c | 114 +++++++ + src/cut.c | 441 +++++++++++++++++++- + src/expand-common.c | 114 ++++++ src/expand-common.h | 12 + - src/expand.c | 90 +++++- - src/fold.c | 307 ++++++++++++++++-- - src/join.c | 359 +++++++++++++++++--- - src/pr.c | 443 ++++++++++++++++++++++--- - src/sort.c | 772 +++++++++++++++++++++++++++++++++++++++++--- - src/unexpand.c | 101 ++++-- - src/uniq.c | 265 ++++++++++++++- - tests/expand/mb.sh | 183 +++++++++++ + src/expand.c | 90 ++++- + src/fold.c | 307 ++++++++++++-- + src/join.c | 359 ++++++++++++++--- + src/pr.c | 443 +++++++++++++++++++-- + src/sort.c | 772 ++++++++++++++++++++++++++++++++++-- + src/unexpand.c | 101 ++++- + src/uniq.c | 119 +++++- + tests/expand/mb.sh | 183 +++++++++ tests/i18n/sort.sh | 29 ++ tests/local.mk | 4 + - tests/misc/expand.pl | 42 +++ + 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-merge.pl | 42 ++ + tests/misc/sort.pl | 40 +- + tests/misc/unexpand.pl | 39 ++ + tests/misc/uniq.pl | 55 +++ tests/pr/pr-tests.pl | 49 +++ - tests/unexpand/mb.sh | 172 ++++++++++ - 29 files changed, 3771 insertions(+), 216 deletions(-) + tests/unexpand/mb.sh | 172 ++++++++ + 29 files changed, 3631 insertions(+), 210 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 100644 tests/i18n/sort.sh - create mode 100644 tests/misc/sort-mb-tests.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 4926152..00c51e4 100644 +index db49c97..2a342c1 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -154,6 +154,7 @@ gnulib_modules=" @@ -55,10 +55,10 @@ index 4926152..00c51e4 100644 mbrtowc mbsalign diff --git a/configure.ac b/configure.ac -index 0ee01b2..f842d7a 100644 +index c2ad08c..f5da816 100644 --- a/configure.ac +++ b/configure.ac -@@ -438,6 +438,8 @@ fi +@@ -446,6 +446,8 @@ fi # I'm leaving it here for now. This whole thing needs to be modernized... gl_WINSIZE_IN_PTEM @@ -68,7 +68,7 @@ index 0ee01b2..f842d7a 100644 if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \ diff --git a/lib/linebuffer.h b/lib/linebuffer.h -index 397ad13..5cbc2a2 100644 +index b19fea7..1f0a1a2 100644 --- a/lib/linebuffer.h +++ b/lib/linebuffer.h @@ -21,6 +21,11 @@ @@ -384,7 +384,7 @@ index 0000000..8589902 + : +]) diff --git a/src/cut.c b/src/cut.c -index bb2e641..f2f32c1 100644 +index 0f6ba60..35ab5fc 100644 --- a/src/cut.c +++ b/src/cut.c @@ -28,6 +28,11 @@ @@ -949,7 +949,7 @@ index bb2e641..f2f32c1 100644 if (optind == argc) diff --git a/src/expand-common.c b/src/expand-common.c -index 4502c0c..b70bf70 100644 +index e4209a0..76be4d8 100644 --- a/src/expand-common.c +++ b/src/expand-common.c @@ -19,6 +19,7 @@ @@ -1081,7 +1081,7 @@ index 4502c0c..b70bf70 100644 to the list of tab stops. */ extern void diff --git a/src/expand-common.h b/src/expand-common.h -index 3f3bfbc..adefb47 100644 +index f304fbb..eaa2f15 100644 --- a/src/expand-common.h +++ b/src/expand-common.h @@ -34,6 +34,18 @@ extern size_t max_column_width; @@ -1104,7 +1104,7 @@ index 3f3bfbc..adefb47 100644 extern void add_tab_stop (uintmax_t tabval); diff --git a/src/expand.c b/src/expand.c -index 6aa0711..03a46ee 100644 +index 3412d7b..bf61aff 100644 --- a/src/expand.c +++ b/src/expand.c @@ -37,6 +37,9 @@ @@ -1260,7 +1260,7 @@ index 6aa0711..03a46ee 100644 } diff --git a/src/fold.c b/src/fold.c -index 1d637de..f1e5ba3 100644 +index 2221f72..917c652 100644 --- a/src/fold.c +++ b/src/fold.c @@ -22,12 +22,34 @@ @@ -1660,7 +1660,7 @@ index 1d637de..f1e5ba3 100644 case 's': /* Break at word boundaries. */ diff --git a/src/join.c b/src/join.c -index dd0ce42..d0f28d9 100644 +index 1accfd4..e27243f 100644 --- a/src/join.c +++ b/src/join.c @@ -22,19 +22,33 @@ @@ -2099,7 +2099,7 @@ index dd0ce42..d0f28d9 100644 } putchar (eolchar); } -@@ -1099,20 +1345,43 @@ main (int argc, char **argv) +@@ -1098,20 +1344,43 @@ main (int argc, char **argv) case 't': { @@ -2153,7 +2153,7 @@ index dd0ce42..d0f28d9 100644 break; diff --git a/src/pr.c b/src/pr.c -index 46c1938..4f1559f 100644 +index 1606082..6374a7f 100644 --- a/src/pr.c +++ b/src/pr.c @@ -311,6 +311,24 @@ @@ -2181,8 +2181,8 @@ index 46c1938..4f1559f 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. */ @@ -2200,7 +2200,7 @@ index 46c1938..4f1559f 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; @@ -2222,7 +2222,7 @@ index 46c1938..4f1559f 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, @@ -2230,7 +2230,7 @@ index 46c1938..4f1559f 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); @@ -2238,7 +2238,7 @@ index 46c1938..4f1559f 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]. */ @@ -2247,7 +2247,7 @@ index 46c1938..4f1559f 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. */ @@ -2256,7 +2256,7 @@ index 46c1938..4f1559f 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. */ @@ -2268,7 +2268,7 @@ index 46c1938..4f1559f 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. */ @@ -2283,7 +2283,7 @@ index 46c1938..4f1559f 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; @@ -2291,7 +2291,7 @@ index 46c1938..4f1559f 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; @@ -2305,7 +2305,7 @@ index 46c1938..4f1559f 100644 } int -@@ -875,6 +935,21 @@ main (int argc, char **argv) +@@ -876,6 +936,21 @@ main (int argc, char **argv) atexit (close_stdout); @@ -2327,7 +2327,7 @@ index 46c1938..4f1559f 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) @@ -2342,7 +2342,7 @@ index 46c1938..4f1559f 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) @@ -2357,7 +2357,7 @@ index 46c1938..4f1559f 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) @@ -2368,7 +2368,7 @@ index 46c1938..4f1559f 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; @@ -2376,7 +2376,7 @@ index 46c1938..4f1559f 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 @@ -2424,7 +2424,7 @@ index 46c1938..4f1559f 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; @@ -2436,7 +2436,7 @@ index 46c1938..4f1559f 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; @@ -2445,7 +2445,7 @@ index 46c1938..4f1559f 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. */ @@ -2459,7 +2459,7 @@ index 46c1938..4f1559f 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; @@ -2468,7 +2468,7 @@ index 46c1938..4f1559f 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); @@ -2477,7 +2477,7 @@ index 46c1938..4f1559f 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. */ @@ -2486,7 +2486,7 @@ index 46c1938..4f1559f 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 { @@ -2495,7 +2495,7 @@ index 46c1938..4f1559f 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; @@ -2507,7 +2507,7 @@ index 46c1938..4f1559f 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); } @@ -2523,7 +2523,7 @@ index 46c1938..4f1559f 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. */ @@ -2552,7 +2552,7 @@ index 46c1938..4f1559f 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) { @@ -2561,7 +2561,7 @@ index 46c1938..4f1559f 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; @@ -2569,7 +2569,7 @@ index 46c1938..4f1559f 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) { @@ -2577,7 +2577,7 @@ index 46c1938..4f1559f 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 { @@ -2594,7 +2594,7 @@ index 46c1938..4f1559f 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 @@ -2603,7 +2603,7 @@ index 46c1938..4f1559f 100644 { if (tabify_output) { -@@ -2299,6 +2430,74 @@ print_char (char c) +@@ -2300,6 +2431,74 @@ print_char (char c) putchar (c); } @@ -2678,7 +2678,7 @@ index 46c1938..4f1559f 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; } @@ -2690,7 +2690,7 @@ index 46c1938..4f1559f 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++; @@ -2699,7 +2699,7 @@ index 46c1938..4f1559f 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] */ @@ -2708,7 +2708,7 @@ index 46c1938..4f1559f 100644 pad_vertically = true; -@@ -2579,9 +2778,9 @@ print_stored (COLUMN *p) +@@ -2580,9 +2779,9 @@ print_stored (COLUMN *p) } } @@ -2720,7 +2720,7 @@ index 46c1938..4f1559f 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]; @@ -2731,7 +2731,7 @@ index 46c1938..4f1559f 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 @@ -2740,7 +2740,7 @@ index 46c1938..4f1559f 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; @@ -2753,7 +2753,7 @@ index 46c1938..4f1559f 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; } @@ -2919,7 +2919,7 @@ index 46c1938..4f1559f 100644 looking for more options and printing the next batch of files. diff --git a/src/sort.c b/src/sort.c -index d812aa9..01f2a9a 100644 +index 329ed45..8e1533e 100644 --- a/src/sort.c +++ b/src/sort.c @@ -29,6 +29,14 @@ @@ -2937,7 +2937,7 @@ index d812aa9..01f2a9a 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; @@ -2978,7 +2978,7 @@ index d812aa9..01f2a9a 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; @@ -2995,7 +2995,7 @@ index d812aa9..01f2a9a 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); } @@ -3042,7 +3042,7 @@ index d812aa9..01f2a9a 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); } @@ -3051,7 +3051,7 @@ index d812aa9..01f2a9a 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 @@ -3060,7 +3060,7 @@ index d812aa9..01f2a9a 100644 { size_t i; -@@ -1301,7 +1372,7 @@ inittables (void) +@@ -1297,7 +1368,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -3069,7 +3069,7 @@ index d812aa9..01f2a9a 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); } @@ -3154,7 +3154,7 @@ index d812aa9..01f2a9a 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 * @@ -3163,7 +3163,7 @@ index d812aa9..01f2a9a 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. */ @@ -3176,7 +3176,7 @@ index d812aa9..01f2a9a 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; } @@ -3248,7 +3248,7 @@ index d812aa9..01f2a9a 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. */ @@ -3261,7 +3261,7 @@ index d812aa9..01f2a9a 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. */ @@ -3274,7 +3274,7 @@ index d812aa9..01f2a9a 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; } @@ -3405,7 +3405,7 @@ index d812aa9..01f2a9a 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) @@ -3430,7 +3430,7 @@ index d812aa9..01f2a9a 100644 line->keybeg = line_start; } } -@@ -1975,12 +2321,10 @@ find_unit_order (char const *number) +@@ -1971,12 +2317,10 @@ find_unit_order (char const *number) < K/k < M < G < T < P < E < Z < Y */ static int @@ -3446,7 +3446,7 @@ index d812aa9..01f2a9a 100644 int diff = find_unit_order (a) - find_unit_order (b); return (diff ? diff : strnumcmp (a, b, decimal_point, thousands_sep)); -@@ -1991,7 +2335,7 @@ human_numcompare (char const *a, char const *b) +@@ -1987,7 +2331,7 @@ human_numcompare (char const *a, char const *b) hideously fast. */ static int @@ -3455,7 +3455,7 @@ index d812aa9..01f2a9a 100644 { while (blanks[to_uchar (*a)]) a++; -@@ -2001,6 +2345,25 @@ numcompare (char const *a, char const *b) +@@ -1997,6 +2341,25 @@ numcompare (char const *a, char const *b) return strnumcmp (a, b, decimal_point, thousands_sep); } @@ -3481,7 +3481,7 @@ index d812aa9..01f2a9a 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 +2414,7 @@ general_numcompare (char const *sa, char const *sb) +@@ -2047,7 +2410,7 @@ general_numcompare (char const *sa, char const *sb) Return 0 if the name in S is not recognized. */ static int @@ -3490,7 +3490,7 @@ index d812aa9..01f2a9a 100644 { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -2327,15 +2690,14 @@ debug_key (struct line const *line, struct keyfield const *key) +@@ -2323,15 +2686,14 @@ debug_key (struct line const *line, struct keyfield const *key) char saved = *lim; *lim = '\0'; @@ -3508,7 +3508,7 @@ index d812aa9..01f2a9a 100644 else if (key->general_numeric) ignore_value (strtold (beg, &tighter_lim)); else if (key->numeric || key->human_numeric) -@@ -2469,7 +2831,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2465,7 +2827,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 */ @@ -3517,7 +3517,7 @@ index d812aa9..01f2a9a 100644 && ((!key->skipsblanks && !implicit_skip) || (!key->skipsblanks && key->schar) || (!key->skipeblanks && key->echar))) -@@ -2527,11 +2889,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2523,11 +2885,87 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) error (0, 0, _("option '-r' only applies to last-resort comparison")); } @@ -3606,7 +3606,7 @@ index d812aa9..01f2a9a 100644 { struct keyfield *key = keylist; -@@ -2616,7 +3054,7 @@ keycompare (struct line const *a, struct line const *b) +@@ -2612,7 +3050,7 @@ keycompare (struct line const *a, struct line const *b) else if (key->human_numeric) diff = human_numcompare (ta, tb); else if (key->month) @@ -3615,7 +3615,7 @@ index d812aa9..01f2a9a 100644 else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2732,6 +3170,211 @@ keycompare (struct line const *a, struct line const *b) +@@ -2728,6 +3166,211 @@ keycompare (struct line const *a, struct line const *b) return key->reverse ? -diff : diff; } @@ -3827,7 +3827,7 @@ index d812aa9..01f2a9a 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 +3402,7 @@ compare (struct line const *a, struct line const *b) +@@ -2755,7 +3398,7 @@ compare (struct line const *a, struct line const *b) diff = - NONZERO (blen); else if (blen == 0) diff = 1; @@ -3836,7 +3836,7 @@ index d812aa9..01f2a9a 100644 { /* xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4149,6 +4792,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) +@@ -4145,6 +4788,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) break; case 'f': key->translate = fold_toupper; @@ -3844,7 +3844,7 @@ index d812aa9..01f2a9a 100644 break; case 'g': key->general_numeric = true; -@@ -4228,7 +4872,7 @@ main (int argc, char **argv) +@@ -4224,7 +4868,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -3853,7 +3853,7 @@ index d812aa9..01f2a9a 100644 hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4249,6 +4893,29 @@ main (int argc, char **argv) +@@ -4245,6 +4889,29 @@ main (int argc, char **argv) thousands_sep = -1; } @@ -3883,7 +3883,7 @@ index d812aa9..01f2a9a 100644 have_read_stdin = false; inittables (); -@@ -4523,13 +5190,34 @@ main (int argc, char **argv) +@@ -4519,13 +5186,34 @@ main (int argc, char **argv) case 't': { @@ -3922,7 +3922,7 @@ index d812aa9..01f2a9a 100644 else { /* Provoke with 'sort -txx'. Complain about -@@ -4540,9 +5228,11 @@ main (int argc, char **argv) +@@ -4536,9 +5224,11 @@ main (int argc, char **argv) quote (optarg)); } } @@ -3936,7 +3936,7 @@ index d812aa9..01f2a9a 100644 } break; -@@ -4771,12 +5461,10 @@ main (int argc, char **argv) +@@ -4767,12 +5457,10 @@ main (int argc, char **argv) sort (files, nfiles, outfile, nthreads); } @@ -3950,7 +3950,7 @@ index d812aa9..01f2a9a 100644 if (have_read_stdin && fclose (stdin) == EOF) sort_die (_("close failed"), "-"); diff --git a/src/unexpand.c b/src/unexpand.c -index 9d34749..1f6388b 100644 +index 09dafdb..7d5dd64 100644 --- a/src/unexpand.c +++ b/src/unexpand.c @@ -38,6 +38,9 @@ @@ -4156,7 +4156,7 @@ index 9d34749..1f6388b 100644 } diff --git a/src/uniq.c b/src/uniq.c -index 9600ec0..c2bbf15 100644 +index e024757..534231f 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -21,6 +21,17 @@ @@ -4177,12 +4177,8 @@ index 9600ec0..c2bbf15 100644 #include "system.h" #include "argmatch.h" #include "linebuffer.h" -@@ -32,9 +43,21 @@ - #include "stdio--.h" - #include "xmemcoll.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 @@ -4200,7 +4196,7 @@ index 9600ec0..c2bbf15 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 }; @@ -4211,7 +4207,7 @@ index 9600ec0..c2bbf15 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 @@ -4220,7 +4216,7 @@ index 9600ec0..c2bbf15 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; } @@ -4304,228 +4300,7 @@ index 9600ec0..c2bbf15 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) - 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) -@@ -295,15 +401,104 @@ different (char *old, char *new, size_t oldlen, size_t newlen) - - if (ignore_case) - { -- /* FIXME: This should invoke strcoll somehow. */ -- 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 if (hard_LC_COLLATE) -- return xmemcoll (old, oldlen, new, newlen) != 0; - 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. -@@ -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); - 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)); - -@@ -397,6 +611,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; - } - } -@@ -409,17 +627,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)) -@@ -428,6 +655,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; - -@@ -460,6 +695,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; - } -@@ -506,6 +744,19 @@ main (int argc, char **argv) +@@ -493,6 +597,19 @@ main (int argc, char **argv) atexit (close_stdout); @@ -4735,7 +4510,7 @@ index 0000000..dd6007c + +exit $fail diff --git a/tests/i18n/sort.sh b/tests/i18n/sort.sh -new file mode 100644 +new file mode 100755 index 0000000..26c95de --- /dev/null +++ b/tests/i18n/sort.sh @@ -4770,10 +4545,10 @@ index 0000000..26c95de + +Exit $fail diff --git a/tests/local.mk b/tests/local.mk -index e88d99f..0382090 100644 +index 594a9d0..5f7f775 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 \ @@ -4782,7 +4557,7 @@ index e88d99f..0382090 100644 tests/misc/sort-h-thousands-sep.sh \ tests/misc/sort-merge.pl \ tests/misc/sort-merge-fdlimit.sh \ -@@ -564,6 +566,7 @@ all_tests = \ +@@ -567,6 +569,7 @@ all_tests = \ tests/du/threshold.sh \ tests/du/trailing-slash.sh \ tests/du/two-args.sh \ @@ -4790,7 +4565,7 @@ index e88d99f..0382090 100644 tests/id/gnu-zero-uids.sh \ tests/id/no-context.sh \ tests/id/context.sh \ -@@ -709,6 +712,7 @@ all_tests = \ +@@ -714,6 +717,7 @@ all_tests = \ tests/touch/read-only.sh \ tests/touch/relative.sh \ tests/touch/trailing-slash.sh \ @@ -4799,7 +4574,7 @@ index e88d99f..0382090 100644 # See tests/factor/create-test.sh. diff --git a/tests/misc/expand.pl b/tests/misc/expand.pl -index 8d490bf..2c01de5 100755 +index 8e5beaf..040e321 100755 --- a/tests/misc/expand.pl +++ b/tests/misc/expand.pl @@ -27,6 +27,15 @@ my $prog = 'expand'; @@ -4866,7 +4641,7 @@ index 8d490bf..2c01de5 100755 my $verbose = $ENV{VERBOSE}; diff --git a/tests/misc/fold.pl b/tests/misc/fold.pl -index 02580c3..d4e2d9e 100755 +index 3a72629..af85ee5 100755 --- a/tests/misc/fold.pl +++ b/tests/misc/fold.pl @@ -20,9 +20,18 @@ use strict; @@ -4939,7 +4714,7 @@ index 02580c3..d4e2d9e 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 1e15b29..4aa4f41 100755 +index 8ab93ad..bdd3bc7 100755 --- a/tests/misc/join.pl +++ b/tests/misc/join.pl @@ -25,6 +25,15 @@ my $limits = getlimits (); @@ -5009,7 +4784,7 @@ index 1e15b29..4aa4f41 100755 my $verbose = $ENV{VERBOSE}; diff --git a/tests/misc/sort-mb-tests.sh b/tests/misc/sort-mb-tests.sh -new file mode 100644 +new file mode 100755 index 0000000..11836ba --- /dev/null +++ b/tests/misc/sort-mb-tests.sh @@ -5060,7 +4835,7 @@ index 0000000..11836ba + +Exit $fail diff --git a/tests/misc/sort-merge.pl b/tests/misc/sort-merge.pl -index 215f563..d7ce6cb 100755 +index 3a48580..4540d2f 100755 --- a/tests/misc/sort-merge.pl +++ b/tests/misc/sort-merge.pl @@ -26,6 +26,15 @@ my $prog = 'sort'; @@ -5120,7 +4895,7 @@ index 215f563..d7ce6cb 100755 my $verbose = $ENV{VERBOSE}; diff --git a/tests/misc/sort.pl b/tests/misc/sort.pl -index e2afc94..35bbe93 100755 +index 081618d..af217b4 100755 --- a/tests/misc/sort.pl +++ b/tests/misc/sort.pl @@ -24,10 +24,15 @@ my $prog = 'sort'; @@ -5188,7 +4963,7 @@ index e2afc94..35bbe93 100755 my $save_temps = $ENV{DEBUG}; my $verbose = $ENV{VERBOSE}; diff --git a/tests/misc/unexpand.pl b/tests/misc/unexpand.pl -index 7e2ecc3..9a77315 100755 +index c8f5ff9..518e820 100755 --- a/tests/misc/unexpand.pl +++ b/tests/misc/unexpand.pl @@ -27,6 +27,14 @@ my $limits = getlimits (); @@ -5245,7 +5020,7 @@ index 7e2ecc3..9a77315 100755 my $verbose = $ENV{VERBOSE}; diff --git a/tests/misc/uniq.pl b/tests/misc/uniq.pl -index 8961085..086be4b 100755 +index 6f332c8..ce49925 100755 --- a/tests/misc/uniq.pl +++ b/tests/misc/uniq.pl @@ -23,9 +23,17 @@ my $limits = getlimits (); @@ -5321,7 +5096,7 @@ index 8961085..086be4b 100755 @Tests = triple_test \@Tests; diff --git a/tests/pr/pr-tests.pl b/tests/pr/pr-tests.pl -index 815abba..676e491 100755 +index 2720369..8427f2b 100755 --- a/tests/pr/pr-tests.pl +++ b/tests/pr/pr-tests.pl @@ -24,6 +24,15 @@ use strict; @@ -5568,5 +5343,5 @@ index 0000000..8a82d74 +LC_ALL=C unexpand in in > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 -- -1.8.3.1 +2.23.0 diff --git a/coreutils-8.31.tar.xz b/coreutils-8.32.tar.xz similarity index 42% rename from coreutils-8.31.tar.xz rename to coreutils-8.32.tar.xz index 3769e33e64fad795370717f912543f834c54000f..ac6ccc8c5a82d5d6fc29535cf5487ea75353eabc 100644 Binary files a/coreutils-8.31.tar.xz and b/coreutils-8.32.tar.xz differ diff --git a/coreutils.spec b/coreutils.spec index f8531b891fa35d0aa66675900be88f6caa7958d3..608e0a07dc846ab453dacc0bf55f2449abc578d6 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,6 +1,6 @@ Name: coreutils -Version: 8.31 -Release: 5 +Version: 8.32 +Release: 1 License: GPLv3+ Summary: A set of basic GNU tools commonly used in shell scripts Url: https://www.gnu.org/software/coreutils/ @@ -10,17 +10,17 @@ Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz %global __requires_exclude ^%{_bindir}/coreutils$ %global user `ls -ld $USR_SCONF|awk '{print $3}'` -Patch1: 0001-coreutils-8.31-i18n.patch +Patch1: coreutils-8.32-i18n.patch Patch2: 0001-disable-test-of-rwlock.patch # uname -p/-i to display processor type Patch3: coreutils-8.2-uname-processortype.patch # df --direct Patch4: coreutils-df-direct.patch -Patch5: bugfix-remove-usr-local-lib-from-m4.patch -Patch6: bugfix-dummy_help2man.patch -Patch7: bugfix-selinux-flask.patch -Patch8: skip-the-tests-that-require-selinux-if-selinux-is-di.patch +Patch5: bugfix-dummy_help2man.patch +Patch6: skip-the-tests-that-require-selinux-if-selinux-is-di.patch +Patch7: bugfix-selinux-flask.patch +Patch8: coreutils-getgrouplist.patch Conflicts: filesystem < 3 # To avoid clobbering installs @@ -60,7 +60,7 @@ the old GNU fileutils, sh-utils, and textutils packages. %prep %autosetup -N -%autopatch -p1 +%autopatch -p1 (echo ">>> Fixing permissions on tests") 2>/dev/null find tests -name '*.sh' -perm 0644 -print -exec chmod 0755 '{}' '+' @@ -131,6 +131,9 @@ fi %{_mandir}/man*/* %changelog +* Mon Jul 27 2020 openEuler Buildteam - 8.32-1 +- update to 8.32 + * Thu Apr 30 2020 openEuler Buildteam - 8.31-5 - Judge if selinux is enabled for the tests that requires selinux