diff --git a/backport-tail-fix-tailing-larger-number-of-lines-in-regular-files.patch b/backport-tail-fix-tailing-larger-number-of-lines-in-regular-files.patch deleted file mode 100644 index 84b92eca1478d650d37d586d85dc7a2611e9bd07..0000000000000000000000000000000000000000 --- a/backport-tail-fix-tailing-larger-number-of-lines-in-regular-files.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 914972e80dbf82aac9ffe3ff1f67f1028e1a788b Mon Sep 17 00:00:00 2001 -From: Hannes Braun -Date: Wed, 24 Sep 2025 21:20:49 +0200 -Subject: [PATCH] tail: fix tailing larger number of lines in regular files - -* src/tail.c (file_lines): Seek to the previous block instead of the -beginning (or a little before) of the block that was just scanned. -Otherwise, the same block is read and scanned (at least partially) -again. This bug was introduced by commit v9.7-219-g976f8abc1. -* tests/tail/basic-seek.sh: Add a new test. -* tests/local.mk: Reference the new test. ---- - src/tail.c | 2 +- - tests/local.mk | 1 + - tests/tail/basic-seek.sh | 28 ++++++++++++++++++++++++++++ - 3 files changed, 34 insertions(+), 1 deletion(-) - create mode 100755 tests/tail/basic-seek.sh - -diff --git a/src/tail.c b/src/tail.c -index b8bef1d91c..c7779c77df 100644 ---- a/src/tail.c -+++ b/src/tail.c -@@ -596,7 +596,7 @@ file_lines (char const *prettyname, int fd, struct stat const *sb, - goto free_buffer; - } - -- pos = xlseek (fd, -bufsize, SEEK_CUR, prettyname); -+ pos = xlseek (fd, -(bufsize + bytes_read), SEEK_CUR, prettyname); - bytes_read = read (fd, buffer, bufsize); - if (bytes_read < 0) - { -diff --git a/tests/local.mk b/tests/local.mk -index ff5727f745..9663ee2da1 100644 ---- a/tests/local.mk -+++ b/tests/local.mk -@@ -179,6 +179,7 @@ all_tests = \ - tests/tty/tty-eof.pl \ - tests/misc/read-errors.sh \ - tests/misc/write-errors.sh \ -+ tests/tail/basic-seek.sh \ - tests/tail/inotify-hash-abuse.sh \ - tests/tail/inotify-hash-abuse2.sh \ - tests/tail/F-vs-missing.sh \ -diff --git a/tests/tail/basic-seek.sh b/tests/tail/basic-seek.sh -new file mode 100755 -index 0000000000..307ed667ea ---- /dev/null -+++ b/tests/tail/basic-seek.sh -@@ -0,0 +1,28 @@ -+#!/bin/sh -+# Verify that tail works when seeking within a file -+ -+# Copyright (C) 2025 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_ tail -+ -+yes '=================================' | -+ head -n1K > file.in || framework_failure_ -+ -+# This returned 139 in coreutils v9.8 -+test $(tail -n200 file.in | wc -l) = 200 || fail=1 -+ -+Exit $fail diff --git a/coreutils-9.8.tar.xz b/coreutils-9.9.tar.xz similarity index 32% rename from coreutils-9.8.tar.xz rename to coreutils-9.9.tar.xz index 79583a0c61747fb07ab54582749d1f71e43f8e17..62b08525fbbfad24b3d5f23b9b240e30546f5950 100644 --- a/coreutils-9.8.tar.xz +++ b/coreutils-9.9.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6d4fd2d852c9141a1c2a18a13d146a0cd7e45195f72293a4e4c044ec6ccca15 -size 6234824 +oid sha256:19bcb6ca867183c57d77155eae946c5eced88183143b45ca51ad7d26c628ca75 +size 6295160 diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index fc1cf721f11268c225a17354812a26c0bb5a18db..e0fedf68cda9bbb5e609801cdca52a14b69b70ec 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -1,10 +1,10 @@ -From c5b102c8d9ddf1cc1109858615de3a9d6d57b7e6 Mon Sep 17 00:00:00 2001 +From 8ed6dc273437dc92035be66ceb5ed5ff4c456720 Mon Sep 17 00:00:00 2001 From: rpm-build Date: Wed, 30 Aug 2023 17:19:58 +0200 Subject: [PATCH] coreutils-i18n.patch --- - bootstrap.conf | 1 + + bootstrap.conf | 2 + configure.ac | 6 + lib/linebuffer.h | 8 + lib/mbfile.c | 20 + @@ -16,7 +16,7 @@ Subject: [PATCH] coreutils-i18n.patch src/expand.c | 90 +++- src/local.mk | 4 +- src/pr.c | 443 ++++++++++++++++++-- - src/sort.c | 790 +++++++++++++++++++++++++++++++++--- + src/sort.c | 791 +++++++++++++++++++++++++++++++++--- src/unexpand.c | 101 ++++- tests/Coreutils.pm | 3 + tests/expand/mb.sh | 183 +++++++++ @@ -29,7 +29,7 @@ Subject: [PATCH] coreutils-i18n.patch tests/sort/sort-merge.pl | 42 ++ tests/sort/sort.pl | 40 +- tests/unexpand/mb.sh | 172 ++++++++ - 25 files changed, 2877 insertions(+), 167 deletions(-) + 25 files changed, 2879 insertions(+), 167 deletions(-) create mode 100644 lib/mbfile.c create mode 100644 lib/mbfile.h create mode 100644 m4/mbfile.m4 @@ -39,19 +39,20 @@ Subject: [PATCH] coreutils-i18n.patch create mode 100644 tests/unexpand/mb.sh diff --git a/bootstrap.conf b/bootstrap.conf -index b8feef9..ab1eb93 100644 +index ec68ac8..ec2fbbe 100644 --- a/bootstrap.conf +++ b/bootstrap.conf -@@ -169,6 +169,7 @@ gnulib_modules=" - maintainer-makefile +@@ -171,6 +171,8 @@ gnulib_modules=" malloc-gnu manywarnings + mbbuf ++ mbchar + mbfile mbrlen mbrtoc32 mbrtowc diff --git a/configure.ac b/configure.ac -index 274eff4..5a1cfa5 100644 +index 5e99ef3..ac07577 100644 --- a/configure.ac +++ b/configure.ac @@ -465,6 +465,12 @@ fi @@ -1091,7 +1092,7 @@ index f0effb9..36479d6 100644 if (have_read_stdin && fclose (stdin) == EOF) diff --git a/src/expand-common.c b/src/expand-common.c -index ca2ad4d..2ad24bf 100644 +index 14dd804..0d8eaaa 100644 --- a/src/expand-common.c +++ b/src/expand-common.c @@ -19,6 +19,7 @@ @@ -1102,7 +1103,7 @@ index ca2ad4d..2ad24bf 100644 #include "system.h" #include "c-ctype.h" #include "fadvise.h" -@@ -123,6 +124,119 @@ set_increment_size (colno tabval) +@@ -132,6 +133,119 @@ set_increment_size (colno tabval) return ok; } @@ -1401,10 +1402,10 @@ index 5ec7ce9..65ac315 100644 } diff --git a/src/local.mk b/src/local.mk -index 8f6d9a5..da16e59 100644 +index a8ad6b4..b0e61ec 100644 --- a/src/local.mk +++ b/src/local.mk -@@ -479,8 +479,8 @@ src_base32_CPPFLAGS = -DBASE_TYPE=32 $(AM_CPPFLAGS) +@@ -490,8 +490,8 @@ src_base32_CPPFLAGS = -DBASE_TYPE=32 $(AM_CPPFLAGS) src_basenc_SOURCES = src/basenc.c src_basenc_CPPFLAGS = -DBASE_TYPE=42 $(AM_CPPFLAGS) @@ -1414,9 +1415,9 @@ index 8f6d9a5..da16e59 100644 +src_unexpand_SOURCES = src/unexpand.c src/expand-common.c lib/mbfile.c lib/mbchar.c src_wc_SOURCES = src/wc.c - if USE_AVX2_WC_LINECOUNT + if USE_AVX512_WC_LINECOUNT diff --git a/src/pr.c b/src/pr.c -index 87974d0..999bae7 100644 +index 10b8c52..079c86c 100644 --- a/src/pr.c +++ b/src/pr.c @@ -312,6 +312,24 @@ @@ -1763,7 +1764,7 @@ index 87974d0..999bae7 100644 h_next = h + chars_per_column; } } -@@ -1748,9 +1872,9 @@ static void +@@ -1751,9 +1875,9 @@ static void align_column (COLUMN *p) { padding_not_printed = p->start_position; @@ -1775,7 +1776,7 @@ index 87974d0..999bae7 100644 padding_not_printed = ANYWHERE; } -@@ -2024,13 +2148,13 @@ store_char (char c) +@@ -2030,13 +2154,13 @@ store_char (char c) /* May be too generous. */ buff = xpalloc (buff, &buff_allocated, 1, -1, sizeof *buff); } @@ -1791,7 +1792,7 @@ index 87974d0..999bae7 100644 char *s; int num_width; -@@ -2047,22 +2171,24 @@ add_line_number (COLUMN *p) +@@ -2053,22 +2177,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. */ @@ -1820,7 +1821,7 @@ index 87974d0..999bae7 100644 output_position = POS_AFTER_TAB (chars_per_output_tab, output_position); } -@@ -2221,7 +2347,7 @@ print_white_space (void) +@@ -2227,7 +2353,7 @@ print_white_space (void) while (goal - h_old > 1 && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) { @@ -1829,7 +1830,7 @@ index 87974d0..999bae7 100644 h_old = h_new; } while (++h_old <= goal) -@@ -2241,6 +2367,7 @@ print_sep_string (void) +@@ -2247,6 +2373,7 @@ print_sep_string (void) { char const *s = col_sep_string; int l = col_sep_length; @@ -1837,7 +1838,7 @@ index 87974d0..999bae7 100644 if (separators_not_printed <= 0) { -@@ -2252,6 +2379,7 @@ print_sep_string (void) +@@ -2258,6 +2385,7 @@ print_sep_string (void) { for (; separators_not_printed > 0; --separators_not_printed) { @@ -1845,7 +1846,7 @@ index 87974d0..999bae7 100644 while (l-- > 0) { /* 3 types of sep_strings: spaces only, spaces and chars, -@@ -2265,12 +2393,15 @@ print_sep_string (void) +@@ -2271,12 +2399,15 @@ print_sep_string (void) } else { @@ -1862,7 +1863,7 @@ index 87974d0..999bae7 100644 /* sep_string ends with some spaces */ if (spaces_not_printed > 0) print_white_space (); -@@ -2298,7 +2429,7 @@ print_clump (COLUMN *p, int n, char *clump) +@@ -2307,7 +2438,7 @@ print_clump (COLUMN *p, int n, char *clump) required number of tabs and spaces. */ static void @@ -1871,7 +1872,7 @@ index 87974d0..999bae7 100644 { if (tabify_output) { -@@ -2322,6 +2453,74 @@ print_char (char c) +@@ -2331,6 +2462,74 @@ print_char (char c) putchar (c); } @@ -1946,7 +1947,7 @@ index 87974d0..999bae7 100644 /* Skip to page PAGE before printing. PAGE may be larger than total number of pages. */ -@@ -2498,9 +2697,9 @@ read_line (COLUMN *p) +@@ -2507,9 +2706,9 @@ read_line (COLUMN *p) align_empty_cols = false; } @@ -1958,7 +1959,7 @@ index 87974d0..999bae7 100644 padding_not_printed = ANYWHERE; } -@@ -2569,7 +2768,7 @@ print_stored (COLUMN *p) +@@ -2578,7 +2777,7 @@ print_stored (COLUMN *p) COLUMN *q; int line = p->current_line++; @@ -1967,7 +1968,7 @@ index 87974d0..999bae7 100644 /* FIXME UMR: Uninitialized memory read: * This is occurring while in: -@@ -2581,7 +2780,7 @@ print_stored (COLUMN *p) +@@ -2590,7 +2789,7 @@ print_stored (COLUMN *p) xmalloc [xmalloc.c:94] init_store_cols [pr.c:1648] */ @@ -1976,7 +1977,7 @@ index 87974d0..999bae7 100644 pad_vertically = true; -@@ -2601,9 +2800,9 @@ print_stored (COLUMN *p) +@@ -2610,9 +2809,9 @@ print_stored (COLUMN *p) } } @@ -1988,7 +1989,7 @@ index 87974d0..999bae7 100644 padding_not_printed = ANYWHERE; } -@@ -2616,8 +2815,8 @@ print_stored (COLUMN *p) +@@ -2625,8 +2824,8 @@ print_stored (COLUMN *p) if (spaces_not_printed == 0) { output_position = p->start_position + end_vector[line]; @@ -1999,7 +2000,7 @@ index 87974d0..999bae7 100644 } return true; -@@ -2636,7 +2835,7 @@ print_stored (COLUMN *p) +@@ -2645,7 +2844,7 @@ print_stored (COLUMN *p) number of characters is 1.) */ static int @@ -2008,7 +2009,7 @@ index 87974d0..999bae7 100644 { unsigned char uc = c; char *s = clump_buff; -@@ -2646,10 +2845,10 @@ char_to_clump (char c) +@@ -2655,10 +2854,10 @@ char_to_clump (char c) int chars; int chars_per_c = 8; @@ -2021,7 +2022,7 @@ index 87974d0..999bae7 100644 { width = TAB_WIDTH (chars_per_c, input_position); -@@ -2730,6 +2929,164 @@ char_to_clump (char c) +@@ -2739,6 +2938,164 @@ char_to_clump (char c) return chars; } @@ -2187,13 +2188,14 @@ index 87974d0..999bae7 100644 looking for more options and printing the next batch of files. diff --git a/src/sort.c b/src/sort.c -index 5a6a963..0b1b941 100644 +index 05d00cc..eb51f20 100644 --- a/src/sort.c +++ b/src/sort.c -@@ -29,6 +29,14 @@ - #include +@@ -30,6 +30,15 @@ #include #include + #include ++ +#if HAVE_WCHAR_H +# include +#endif @@ -2205,7 +2207,7 @@ index 5a6a963..0b1b941 100644 #include "system.h" #include "argmatch.h" #include "assure.h" -@@ -158,14 +166,39 @@ static int thousands_sep; +@@ -160,14 +169,39 @@ static int thousands_sep; /* We currently ignore multi-byte grouping chars. */ static bool thousands_sep_ignored; @@ -2246,7 +2248,7 @@ index 5a6a963..0b1b941 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 stable; +@@ -344,13 +378,11 @@ static bool stable; /* An int value outside char range. */ enum { NON_CHAR = CHAR_MAX + 1 }; @@ -2263,9 +2265,9 @@ index 5a6a963..0b1b941 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) - reap (-1); - } +@@ -386,6 +418,46 @@ struct tempnode + static struct tempnode *volatile temphead; + static struct tempnode *volatile *temptail = &temphead; +/* Function pointers. */ +static void @@ -2310,7 +2312,7 @@ index 5a6a963..0b1b941 100644 /* Clean up any remaining temporary files. */ static void -@@ -1273,7 +1344,7 @@ zaptemp (char const *name) +@@ -1343,7 +1415,7 @@ zaptemp (char const *name) free (node); } @@ -2319,7 +2321,7 @@ index 5a6a963..0b1b941 100644 static int struct_month_cmp (void const *m1, void const *m2) -@@ -1288,7 +1359,7 @@ struct_month_cmp (void const *m1, void const *m2) +@@ -1358,7 +1430,7 @@ struct_month_cmp (void const *m1, void const *m2) /* Initialize the character class tables. */ static void @@ -2328,7 +2330,7 @@ index 5a6a963..0b1b941 100644 { size_t i; -@@ -1300,7 +1371,7 @@ inittables (void) +@@ -1370,7 +1442,7 @@ inittables (void) fold_toupper[i] = toupper (i); } @@ -2337,7 +2339,7 @@ index 5a6a963..0b1b941 100644 /* If we're not in the "C" locale, read different names for months. */ if (hard_LC_TIME) { -@@ -1380,6 +1451,84 @@ specify_nmerge (int oi, char c, char const *s) +@@ -1450,6 +1522,84 @@ specify_nmerge (int oi, char c, char const *s) xstrtol_fatal (e, oi, c, long_options, s); } @@ -2422,7 +2424,7 @@ index 5a6a963..0b1b941 100644 /* Specify the amount of main memory to use when sorting. */ static void specify_sort_size (int oi, char c, char const *s) -@@ -1611,7 +1760,7 @@ buffer_linelim (struct buffer const *buf) +@@ -1676,7 +1826,7 @@ buffer_linelim (struct buffer const *buf) by KEY in LINE. */ static char * @@ -2431,7 +2433,7 @@ index 5a6a963..0b1b941 100644 { char *ptr = line->text, *lim = ptr + line->length - 1; size_t sword = key->sword; -@@ -1620,10 +1769,10 @@ begfield (struct line const *line, struct keyfield const *key) +@@ -1685,10 +1835,10 @@ begfield (struct line const *line, struct keyfield const *key) /* The leading field separator itself is included in a field when -t is absent. */ @@ -2444,7 +2446,7 @@ index 5a6a963..0b1b941 100644 ++ptr; if (ptr < lim) ++ptr; -@@ -1653,12 +1802,71 @@ begfield (struct line const *line, struct keyfield const *key) +@@ -1718,12 +1868,71 @@ begfield (struct line const *line, struct keyfield const *key) return ptr; } @@ -2517,7 +2519,7 @@ index 5a6a963..0b1b941 100644 { char *ptr = line->text, *lim = ptr + line->length - 1; size_t eword = key->eword, echar = key->echar; -@@ -1673,10 +1881,10 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1738,10 +1947,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. */ @@ -2530,7 +2532,7 @@ index 5a6a963..0b1b941 100644 ++ptr; if (ptr < lim && (eword || echar)) ++ptr; -@@ -1722,10 +1930,10 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1787,10 +1996,10 @@ limfield (struct line const *line, struct keyfield const *key) */ /* Make LIM point to the end of (one byte past) the current field. */ @@ -2543,7 +2545,7 @@ index 5a6a963..0b1b941 100644 if (newlim) lim = newlim; } -@@ -1760,6 +1968,130 @@ limfield (struct line const *line, struct keyfield const *key) +@@ -1825,6 +2034,130 @@ limfield (struct line const *line, struct keyfield const *key) return ptr; } @@ -2674,7 +2676,7 @@ index 5a6a963..0b1b941 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 -@@ -1846,8 +2178,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) +@@ -1911,8 +2244,22 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file) else { if (key->skipsblanks) @@ -2699,7 +2701,7 @@ index 5a6a963..0b1b941 100644 line->keybeg = line_start; } } -@@ -1985,12 +2331,10 @@ find_unit_order (char const *number) +@@ -2050,12 +2397,10 @@ find_unit_order (char const *number) ATTRIBUTE_PURE static int @@ -2715,7 +2717,7 @@ index 5a6a963..0b1b941 100644 int diff = find_unit_order (a) - find_unit_order (b); return (diff ? diff : strnumcmp (a, b, decimal_point, thousands_sep)); -@@ -2002,7 +2346,7 @@ human_numcompare (char const *a, char const *b) +@@ -2067,7 +2412,7 @@ human_numcompare (char const *a, char const *b) ATTRIBUTE_PURE static int @@ -2724,7 +2726,7 @@ index 5a6a963..0b1b941 100644 { while (blanks[to_uchar (*a)]) a++; -@@ -2012,6 +2356,25 @@ numcompare (char const *a, char const *b) +@@ -2077,6 +2422,25 @@ numcompare (char const *a, char const *b) return strnumcmp (a, b, decimal_point, thousands_sep); } @@ -2750,7 +2752,7 @@ index 5a6a963..0b1b941 100644 static int nan_compare (long double a, long double b) { -@@ -2053,7 +2416,7 @@ general_numcompare (char const *sa, char const *sb) +@@ -2118,7 +2482,7 @@ general_numcompare (char const *sa, char const *sb) Return 0 if the name in S is not recognized. */ static int @@ -2759,7 +2761,7 @@ index 5a6a963..0b1b941 100644 { size_t lo = 0; size_t hi = MONTHS_PER_YEAR; -@@ -2392,15 +2755,14 @@ debug_key (struct line const *line, struct keyfield const *key) +@@ -2457,15 +2821,14 @@ debug_key (struct line const *line, struct keyfield const *key) char saved = *lim; *lim = '\0'; @@ -2777,7 +2779,7 @@ index 5a6a963..0b1b941 100644 else if (key->general_numeric) ignore_value (strtold (beg, &tighter_lim)); else if (key->numeric || key->human_numeric) -@@ -2546,7 +2908,7 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2611,7 +2974,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 */ @@ -2786,7 +2788,7 @@ index 5a6a963..0b1b941 100644 && ((!key->skipsblanks && !implicit_skip) || (!key->skipsblanks && key->schar) || (!key->skipeblanks && key->echar))) -@@ -2594,9 +2956,9 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2659,9 +3022,9 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) bool number_locale_warned = false; if (basic_numeric_field_span) { @@ -2799,7 +2801,7 @@ index 5a6a963..0b1b941 100644 { error (0, 0, _("field separator %s is treated as a " -@@ -2607,9 +2969,9 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2672,9 +3035,9 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) } if (basic_numeric_field_span || general_numeric_field_span) { @@ -2812,7 +2814,7 @@ index 5a6a963..0b1b941 100644 { error (0, 0, _("field separator %s is treated as a " -@@ -2617,19 +2979,19 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) +@@ -2682,19 +3045,19 @@ key_warnings (struct keyfield const *gkey, bool gkey_only) quote (((char []) {decimal_point, 0}))); number_locale_warned = true; } @@ -2836,7 +2838,7 @@ index 5a6a963..0b1b941 100644 } } -@@ -2681,11 +3043,87 @@ diff_reversed (int diff, bool reversed) +@@ -2746,11 +3109,87 @@ diff_reversed (int diff, bool reversed) return reversed ? _GL_CMP (0, diff) : diff; } @@ -2925,7 +2927,7 @@ index 5a6a963..0b1b941 100644 { struct keyfield *key = keylist; -@@ -2766,7 +3204,7 @@ keycompare (struct line const *a, struct line const *b) +@@ -2831,7 +3270,7 @@ keycompare (struct line const *a, struct line const *b) else if (key->human_numeric) diff = human_numcompare (ta, tb); else if (key->month) @@ -2934,7 +2936,7 @@ index 5a6a963..0b1b941 100644 else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2876,6 +3314,211 @@ keycompare (struct line const *a, struct line const *b) +@@ -2941,6 +3380,211 @@ keycompare (struct line const *a, struct line const *b) return diff_reversed (diff, key->reverse); } @@ -3146,7 +3148,7 @@ index 5a6a963..0b1b941 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. */ -@@ -2903,7 +3546,7 @@ compare (struct line const *a, struct line const *b) +@@ -2968,7 +3612,7 @@ compare (struct line const *a, struct line const *b) diff = - NONZERO (blen); else if (blen == 0) diff = 1; @@ -3155,7 +3157,7 @@ index 5a6a963..0b1b941 100644 { /* xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4289,6 +4932,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) +@@ -4340,6 +4984,7 @@ set_ordering (char const *s, struct keyfield *key, enum blanktype blanktype) break; case 'f': key->translate = fold_toupper; @@ -3163,7 +3165,7 @@ index 5a6a963..0b1b941 100644 break; case 'g': key->general_numeric = true; -@@ -4368,7 +5012,7 @@ main (int argc, char **argv) +@@ -4419,7 +5064,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -3172,7 +3174,7 @@ index 5a6a963..0b1b941 100644 hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4391,6 +5035,29 @@ main (int argc, char **argv) +@@ -4442,6 +5087,29 @@ main (int argc, char **argv) thousands_sep = NON_CHAR; } @@ -3202,7 +3204,7 @@ index 5a6a963..0b1b941 100644 have_read_stdin = false; inittables (); -@@ -4661,13 +5328,34 @@ main (int argc, char **argv) +@@ -4717,13 +5385,34 @@ main (int argc, char **argv) case 't': { @@ -3241,7 +3243,7 @@ index 5a6a963..0b1b941 100644 else { /* Provoke with 'sort -txx'. Complain about -@@ -4678,9 +5366,11 @@ main (int argc, char **argv) +@@ -4734,9 +5423,11 @@ main (int argc, char **argv) quote (optarg)); } } @@ -3698,10 +3700,10 @@ index 0000000..26c95de + +Exit $fail diff --git a/tests/local.mk b/tests/local.mk -index 4aa199a..c553c81 100644 +index 53fc53e..0148422 100644 --- a/tests/local.mk +++ b/tests/local.mk -@@ -404,6 +404,8 @@ all_tests = \ +@@ -412,6 +412,8 @@ all_tests = \ tests/sort/sort-field-limit.sh \ tests/sort/sort-files0-from.pl \ tests/sort/sort-float.sh \ @@ -3710,7 +3712,7 @@ index 4aa199a..c553c81 100644 tests/sort/sort-h-thousands-sep.sh \ tests/sort/sort-merge.pl \ tests/sort/sort-merge-fdlimit.sh \ -@@ -609,6 +611,7 @@ all_tests = \ +@@ -618,6 +620,7 @@ all_tests = \ tests/du/threshold.sh \ tests/du/trailing-slash.sh \ tests/du/two-args.sh \ @@ -3718,7 +3720,7 @@ index 4aa199a..c553c81 100644 tests/id/gnu-zero-uids.sh \ tests/id/no-context.sh \ tests/id/context.sh \ -@@ -765,6 +768,7 @@ all_tests = \ +@@ -774,6 +777,7 @@ all_tests = \ tests/touch/read-only.sh \ tests/touch/relative.sh \ tests/touch/trailing-slash.sh \ @@ -3845,7 +3847,7 @@ index 0000000..11836ba + +Exit $fail diff --git a/tests/misc/unexpand.pl b/tests/misc/unexpand.pl -index 27d9c17..4976335 100755 +index bb7469c..c1dec95 100755 --- a/tests/misc/unexpand.pl +++ b/tests/misc/unexpand.pl @@ -27,6 +27,14 @@ my $limits = getlimits (); @@ -3863,7 +3865,7 @@ index 27d9c17..4976335 100755 my @Tests = ( ['a1', {IN=> ' 'x 1 ."y\n"}, {OUT=> ' 'x 1 ."y\n"}], -@@ -128,6 +136,37 @@ my @Tests = +@@ -132,6 +140,37 @@ my @Tests = ['ts2', '-t5,8', {IN=>"x\t \t y\n"}, {OUT=>"x\t\t y\n"}], ); @@ -4277,5 +4279,5 @@ index 0000000..8a82d74 +LC_ALL=C unexpand in in > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 -- -2.51.0 +2.47.3 diff --git a/coreutils.spec b/coreutils.spec index 790495cf97cb8f5bd3e5d2b1182afe8f081fa0c1..16ed19c679c7e61d42f63f7b8e97a43dcb5ddc8f 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,6 +1,6 @@ Name: coreutils -Version: 9.8 -Release: 2 +Version: 9.9 +Release: 1 License: GPL-3.0-or-later Summary: A set of basic GNU tools commonly used in shell scripts Url: https://www.gnu.org/software/coreutils/ @@ -21,7 +21,6 @@ Patch7: coreutils-i18n.patch Patch8: test-skip-overlay-filesystem-because-of-no-inotify_add_watch.patch # Upstream patches -Patch6001: backport-tail-fix-tailing-larger-number-of-lines-in-regular-files.patch Patch9001: coreutils-9.7-sw.patch @@ -152,6 +151,9 @@ popd %{_mandir}/man*/* %changelog +* Mon Nov 17 2025 Funda Wang - 9.9-1 +- update to 9.9 + * Thu Sep 25 2025 Funda Wang - 9.8-2 - tail: fix tailing larger number of lines in regular files