1
0
mirror of https://git.savannah.gnu.org/git/coreutils.git synced 2026-10-24 02:08:57 +03:00
Commit Graph

31824 Commits

Author SHA1 Message Date
Pádraig Brady
700d8235a3 all: only markup --help when outputting to tty
Since v9.10 (Feb 2026) --help always outputs bold and hyperlinks
even when output was not a tty, as this was thought more useful
with pagers and grep etc.  This change makes the more conservative
choice of only outputting markup to tty so that users who do not
have less setup to display color (-R), or users who enable color
by default in grep, get improved output (though without URLs etc.)

* src/system.h (oputs_): Call isatty() when not
forcing markup with $IN_HELP2MAN.  Also reverse the
double negatives to a more natural form.
* man/local.mk: Remove redundant assignment of $TERM.
* doc/coreutils.texi (common options): Mention that --help markup
requires output to be a tty, and that $IN_HELP2MAN overrides that.
* NEWS: Mention the change in behavior.
2026-10-10 21:02:48 +01:00
Pádraig Brady
a40b8d1191 tr: accept undocumented -u for FreeBSD / macOS compat
* src/tr.c (main): Accept -u to set stdout to unbuffered.
* NEWS: Mention the new feature.

Link: https://github.com/coreutils/coreutils/issues/374
2026-10-10 21:02:40 +01:00
Collin Funk
9c7cf20c3c doc: NEWS: mention the fix from the previous commit
* NEWS: Mention the crash when invoking various programs --help option
when configured with --disable-bold-man-page-references and
--disable-manual-url.
2026-10-08 21:17:26 -07:00
Nick Bowler
d66cf56e25 chroot,head,shred,sort,split,tail: fix crash when emitting --help
This crash only occurs when configured with both
--disable-bold-man-page-references and --disable-manual-url.

* src/system.h (oprintf_): Add a va_start and va_end call surrounding
the call to vprintf.
Copyright-paperwork-exempt: Yes
2026-10-08 21:16:23 -07:00
Collin Funk
c2dd4d5d34 tests: wc: simplify construction of the input file
* tests/wc/page-size.sh: Prefer 'truncate' redirecting 'head /dev/zero'.
Suggested by Andreas Schwab.
2026-10-08 17:49:14 -07:00
oech3
19ebb3e1a7 tests: ls: replace LD_PRELOAD of getxattr-speedup.sh with strace
* tests/ls/getxattr-speedup.sh: Replace LD_PRELOAD by strace
to support static executables.

Link: https://github.com/coreutils/coreutils/pull/368
2026-10-08 19:27:42 +01:00
Pádraig Brady
f23566441f basenc: improve base58 encoding performance without gmplib
$ ./configure --without-libgmp --quiet
  $ dd bs=64k count=1 if=/dev/urandom of=58.in

  $ time src/basenc-before --base58 58.in >/dev/null
  real	0m6.588s

  $ time src/basenc-after --base58 58.in >/dev/null
  real	0m3.463s

* src/basenc.c (base58_encode): Remove an affirm that is very expensive
in the minigmp implementation.  Essentially the same affirm was done
at the start of the function anyway.
* NEWS: Mention the improvement (including the impending similar
mpz_sizeinbase() removal from mini-gmp).
2026-10-08 13:45:41 +01:00
Pádraig Brady
f2d996bd1b tests: avoid NULs in test log
* tests/wc/page-size.sh: Remove NULs from logs,
also change from using Heredocs which are overkill.
2026-10-08 13:14:44 +01:00
Collin Funk
77e7674add tests: wc: add a test for the fix in the previous commit
* tests/wc/page-size.sh: New file.
* tests/local.mk (all_tests): Add the new test.
2026-10-08 00:39:50 -07:00
Paul Eggert
c3709a88f2 wc: fix buffer boundary calculations
Problem reported by Scott Orme (Bug#82013).
* src/wc.c (wc): Fix calculations of file sizes vs page size
vs block size.
2026-10-07 23:26:45 -07:00
Pádraig Brady
c00f9f8f99 maint: fold: remove persistent character width handling
This is now possible due to the previous changes
as default mode subtracts one column, and
-c subtracts one character, and every character counts as one,
so there is no need to track the last_character_width
(which is problematic anyway in the presence of
multiple backspaces).

* src/old.c (adjust_column): Just use the locally determined width.
2026-10-07 12:40:21 +01:00
Pádraig Brady
d454017b5d fold: restrict whole character backspace to -c
With POSIX (and the LI18NUX2000 patch) backspaces back up by 1 column.
This matches terminal output.  Note less(1) and thus grotty(1)
use per character backup accounting for their legacy bold/underline
markup format, so we'll keep --characters to enable that mode if needed.
This also avoids the issue of multiple backspaces
using the width of a single previous character.

* src/fold.c (adjust_column): Without -c,
have backspace back up by 1 column.
* doc/coreutils.texi (fold invocation): Mention that --characters
does per character width backspace accounting.
* tests/fold/fold-characters.sh: Add/Adjust test cases.
* NEWS: Mention the change in behavior.
2026-10-07 12:40:05 +01:00
Pádraig Brady
e7d10e546a fold: fix backspace accounting after TAB
* src/fold.c (adjust_column): Ensure BS goes back
1 column after a TAB.
* tests/fold/fold-characters.sh: Add test cases.
* NEWS: Mention the bug fix.
2026-10-07 12:40:05 +01:00
Pádraig Brady
1af1bbf33b fold: fix backspace handling with multi-cell characters
* src/fold.c (adjust_column): Clamp the column decrement to 0.
* tests/fold/fold-characters.sh: Add a test case.
* NEWS: Mention the bug fix.
2026-10-07 12:40:05 +01:00
Devel
329e1fc3f4 fmt: improve --goal error message
* src/fmt.c (main): Since -w and -g can both be specified,
provide a distinguishing validation message for --goal.

Link: https://github.com/coreutils/coreutils/pull/364
2026-10-07 12:33:44 +01:00
Ismail Ramzi
b9776257e8 chroot: prefer the in-chroot primary group with --userspec=USER
* src/chroot.c (main): When the primary group was inferred from the
uid outside the chroot, let a successful getpwuid() inside the chroot
replace it, as is already done for the uid and supplemental groups.
Previously the gid found outside persisted, so for example
'chroot --userspec=alice NEWROOT' ran with alice's uid from NEWROOT
but alice's gid from the host.
* NEWS: Mention the bug fix.

Link: https://github.com/coreutils/coreutils/pull/363
2026-10-07 12:33:14 +01:00
Collin Funk
9a38bb9186 tests: misc: skip a test if the absolute top build dir is unsafe
Without this change, this test would fail during 'make distcheck', for
example.

* tests/misc/exec-bad-unicode.sh: Skip the test if $abs_top_builddir has
spaces or special characters.
* cfg.mk (_tb_misc): Also match tests/misc/exec-bad-unicode.sh.
Reported by Bruno Haible.
2026-10-06 20:21:43 -07:00
Vidya m
d5ee8b245c maint: basenc: use the COUNTED_BY attribute for the base58 buffer
* src/basenc.c (struct base58_context): Declare capacity before the buf
member and annotate buf with COUNTED_BY.
(base58_encode_ctx_finalize, base58_decode_ctx_finalize): Reset size and
capacity to zero when freeing buf and setting it to NULL, so the
counted-by invariant holds.
Copyright-paperwork-exempt: Yes

Link: https://github.com/coreutils/coreutils/pull/362
2026-10-06 18:54:10 -07:00
Collin Funk
a0cec995fa tests: sum,cp: disable Unicode when executing Perl
* tests/local.mk (TESTS_ENVIRONMENT): Set PERL_UNICODE to 0.
* tests/cksum/sum-sysv.sh: Call binmode on STDOUT.
* tests/cp/copy-FMR.sh: Likewise.
* tests/cp/sparse-extents-2.sh: Likewise.
Fixes https://bugs.gnu.org/81994
2026-10-05 19:56:44 -07:00
Pádraig Brady
e6c09ec0b1 tests: fix false failure on SELinux disabled systems
* tests/misc/no-fork.sh: Use an "unused" placeholder
so runcon is invoked with the correct number of arguments
where `id -Z` doesn't return anything.
This is needed since commit v9.12-53-g8555a51f2
2026-10-05 12:37:08 +01:00
Collin Funk
98c8b158b6 tests: make checks for $LOCALE_FR and $LOCALE_FR_UTF8 consistent
* tests/cp/non-utf8-name.sh: Check for $LOCALE_FR and $LOCALE_FR_UTF8
being empty or the string "none".
* tests/date/percent-percent.sh: Likewise.
* tests/du/block-size.sh (test_unit): Likewise.
* tests/ls/non-utf8-hidden.sh: Likewise.
* tests/mktemp/bad-unicode.sh: Likewise.
* tests/sort/sort-unique.sh: Likewise.
* tests/df/problematic-chars.sh:  Check for $LOCALE_FR_UTF8 being empty
or the string "none".
* tests/expand/mb.sh: Likewise.
* tests/fold/fold-characters.sh: Likewise.
* tests/fold/fold-nbsp.sh: Likewise.
* tests/fold/fold-spaces.sh: Likewise.
* tests/fold/fold-zero-width.sh: Likewise.
* tests/join/join-utf8.sh: Likewise.
* tests/misc/sleep.sh: Likewise.
* tests/nl/multibyte.sh: Likewise.
* tests/paste/multi-byte.sh: Likewise.
* tests/printf/printf-mb.sh: Likewise.
* tests/printf/printf-quote.sh: Likewise.
* tests/sort/sort-debug-keys.sh: Likewise.
* tests/unexpand/mb.sh: Likewise.
2026-10-04 15:31:59 -07:00
Collin Funk
cf98d8e8ca tests: misc: test programs can execute invalid Unicode program names
* tests/misc/exec-bad-unicode.sh: New file.
* tests/local.mk (all_tests): Add the new test.
2026-10-04 14:31:04 -07:00
Collin Funk
8555a51f2d tests: misc: avoid an unnecessary 'eval'
* tests/misc/no-fork.sh: Adjust the quoting of the printf call instead
of using 'eval'.
2026-10-04 11:24:08 -07:00
Collin Funk
a2415242cb maint: ptx: silence -Wimplicit-fallthrough with clang
* src/ptx.c (matcher_error): Mark with _Noreturn.
2026-10-03 23:22:36 -07:00
Collin Funk
7fc7cf3a31 maint: pwd: use the COUNTED_BY attribute on the constructed file name
* src/pwd.c (struct file_name): Use COUNTED_BY on the buf member.
2026-10-03 15:40:46 -07:00
Collin Funk
a940d3c920 maint: factor: use the COUNTED_BY attribute for the list of factors
* src/factor.c (struct mp_factors): Use COUNTED_BY on the f member.
(mp_no_factors): Use 0 instead of NULL when initializing the return
value.
2026-10-03 15:40:46 -07:00
Pádraig Brady
b64df1ef3d all: fix U+0085 (next line) being considered a separator
cut, expand, fold, join, numfmt, unexpand, uniq, on non-GLIBC platforms
treated the \u0085 (next line) character as a blank character.

src/system.h (c32isvertspace): Include 0x0085 so c32issep() excludes it.
Also split out to ...
(c32isnewline): ... a new function, in case we need to
consider unicode newlines in isolation in future.
* tests/unexpand/mb.sh: Add a test case to both ensure
processing of \u0085 characters does not overflow a buffer,
and that those characters are not treated as separators.
* NEWS: Mention the fix.

Link: https://github.com/coreutils/coreutils/pull/361
2026-10-03 23:31:54 +01:00
Ismail Ramzi
52e5694f41 unexpand: fix heap overflow on negative-width whitespace
* src/unexpand.c (unexpand): Clamp a negative c32width() to 1 when
accumulating a blank, matching the sibling non-blank path and expand
and fold.  A separator whose display width is negative (e.g. U+0085
where c32issep() accepts it) left 'column' un-advanced, so the pending
blank buffer, sized for one byte of advance per blank, grew without
bound.
* NEWS: Mention the bug fix.

Link: https://github.com/coreutils/coreutils/pull/361
2026-10-03 23:31:49 +01:00
Pádraig Brady
3aae63af9a wc: optimize ASCII and UTF8 character counting
Generate ASCII and UTF-8 data:
  $ yes $(yes eeeaae | head -n10K | paste -s -d,) | head -n10K > ll.in
  $ yes $(yes éééááé | head -n9 | paste -s -d,) | head -n1M > mb.in

ASCII is 14x faster:
  $ time src/wc-before -m < ll.in
  real	0m1.801s
  $ time src/wc-after -m < ll.in
  real	0m0.123s

UTF-8 is 7x faster:
  $ time src/wc-before -m < mb.in
  real	0m1.399s
  $ time src/wc-after -m < mb.in
  real	0m0.189s

* src/wc.c (wc): Use the u8_count() routine like cut(1),
to optimize counting valid UTF-8 characters.
* tests/wc/wc.pl: Add a test case.
* NEWS: Mention the improvement.
2026-10-03 15:47:15 +01:00
Pádraig Brady
6c2dda15e0 maint: move utf8 specific routines to a new utf8 module
* bootstrap.conf: Reference the new "utf8" module.
* cfg.mk: Adjust checks as per mbbuf.
* gl/lib/utf8.c: Include the implementation.
* gl/lib/utf8.h: Add is_utf8_charset() and u8_count().
Note we don't give is_utf8_charset external-linkage
due to its static cache.
* gl/local.mk: Reference the new module files.
* gl/modules/utf8: Add the module definition and dependencies.
* src/cut.c: Use is_utf8_charset() and u8_count().
* src/numfmt.c: Use is_utf8_charset().
* src/system.h: Remove is_utf8_charset() definition.
2026-10-03 15:47:15 +01:00
Pádraig Brady
5ef76b9ac8 wc: fix handling of multi-byte chars spanning buffers
Commit v9.4-43-ga6064bb86 introduced this edge case
in handling multi-byte characters spanning the input buffer.

* src/wc.c (wc): Ensure we include the bytes previously read
but as yet unprocessed.
* tests/wc/mb-non-utf8.sh: Add a new test for miscounted GB118030 chars.
* tests/local.mk: Reference the new test.
* tests/wc/wc.pl: Add a new check for word count with a
UTF-8 space spanning a buffer boundary.
* NEWS: Mention the bug fix.
2026-10-03 15:47:15 +01:00
Collin Funk
f46ebfaa41 maint: od: fix -Wformat when DEBUG is defined
* src/od.c (main): Use %td instead of %d when printing an idx_t using
printf.
2026-10-02 21:46:20 -07:00
Collin Funk
6f36b64689 tests: readlink: add tests for the symbolic link infinite loop
* tests/readlink/rl-1.sh: Add tests for the 'readlink' invocations that
would cause an infinite loop before commit b66f3e4e2 (realpath: fix an
infinite loop when resolving symbolic links, 2026-09-25). Also test the
behavior without an option, which would not cause the infinite loop.
2026-09-29 20:43:15 -07:00
Pádraig Brady
0bbf12284a doc: NEWS: mention readlink also had an infinite loop bug
* NEWS: Mention the readlink and realpath options
that trigger the infinite loop bug.
2026-09-29 20:35:50 -07:00
Collin Funk
40e0b385b7 tests: realpath: add some additional tests for symlink loops
* tests/misc/realpath.sh: Test the flags supported by 'realpath' that
would previously infinite loop before commit b66f3e4e2 (realpath: fix an
infinite loop when resolving symbolic links, 2026-09-25). Test an
invocation which would avoid the infinite loop by not touching the file.
2026-09-29 20:10:24 -07:00
Collin Funk
c4b0996ee7 maint: join: use the COUNTED_BY attribute
* src/join.c (struct line): Use the COUNTED_BY attribute on the fields
member.
(struct seq): Use the COUNTED_BY attribute on the lines member.
(freeline): When setting a pointer using the COUNTED_BY attribute to
NULL, set its counter to zero.
2026-09-29 18:47:27 -07:00
Pádraig Brady
d97b6827c7 cut: -f -w: optimize no delimiters in uni-byte locales
Increases throughput when no delimiters found by up to 15x.

  $ yes | head -n10M > sl.in

  $ time LC_ALL=C src/cut-before -f10 -w sl.in >/dev/null
  real	0m0.171s

  $ time LC_ALL=C src/cut-after -f10 -w sl.in >/dev/null
  real	0m0.011s

* src/cut.c (cut_fields_bytesearch): Also add a byte search
shortcut for the -w case in uni-byte locales.
2026-09-29 13:34:32 +01:00
Pádraig Brady
08236d3b9b cut: -f -w: optimize short fields in uni-byte locales
Avoiding calling memchr2() for fields less than 16 bytes,
results in a 40% performance boost.

  $ yes $(yes eeeaae | head -n9 | paste -s -d' ') | head -n1M > asw.in

  $ time LC_ALL=C src/cut-before -f10 -w asw.in >/dev/null
  real	0m0.254s

  $ time LC_ALL=C src/cut-after -f10 -w asw.in >/dev/null
  real	0m0.151s

* src/cut.c (find_c_blank): A wrapper around memchr2()
to avoid its significant setup cost.
2026-09-29 13:34:04 +01:00
Pádraig Brady
f1101ce852 cut: -c: optimize ASCII and UTF-8 processing
These are the most common input encodings so worth optimizing for.

Performance was tested with GCC 16 on an i7-5600U with
CFLAGS='-march=native -O3 -flto' with the following setup:

$ yes | head -n10M > sl.in
$ yes $(yes eeeaae | head -n10K | paste -s -d' ') | head -n10K > llw.in
$ yes $(yes eeeaae | head -n9 | paste -s -d' ') | head -n1M > asw.in
$ yes $(yes éééááé | head -n9 | paste -s -d$'\xe2\x80\x83') |
   head -n1M > mbw.in

for type in sl llw asw mbw; do
  cat $type.in >/dev/null;
  for imp in '-before' '-after'; do
    echo ============ "${imp:-base}" $type ==============;
    for d in -c; do
      fields='-f1 -f10 -f100'
      test "$d" = "-c" && { fields='-c1 -c10 -c100000'; d=''; }
      for f in $fields; do
        for loc in C.UTF-8; do
          # Skip -b for UTF-8 as no different
          test "$loc" = C.UTF-8 && echo "$f" | grep -q -- -b \
           && continue
          # Skip multi-byte delimiter for C and not allowed
          test "$loc" = C && test $(echo -n "$d" | wc -c) -ge 4 \
           && continue
          bin=src/cut${imp}
          LC_ALL=$loc $bin $f $d /dev/null 2>/dev/null &&
          hyperfine --warmup=2 -m2 -M6 \
           "LC_ALL=$loc $bin $f $d $type.in >/dev/null" ||
          printf 'Benchmark 1: %s\n  unsupported\n\n' \
           "LC_ALL=$loc $bin $f $d $type.in >/dev/null"
        done;
      done;
    done;
  done;
done

After a little post-processing of the results, we get:

-- src/cut-before

| command         |       sl |      llw |      asw |      mbw |
| --------------- | -------- | -------- | -------- | -------- |
| UTF8 -c1        |  70.7 ms | 103.5 ms |  26.9 ms |  48.6 ms |
| UTF8 -c10       |  55.1 ms | 103.9 ms |  48.6 ms | 127.3 ms |
| UTF8 -c100000   |  54.7 ms |  1.585 s | 156.9 ms | 555.9 ms |

-- src/cut-after

| command         |       sl |      llw |      asw |      mbw |
| --------------- | -------- | -------- | -------- | -------- |
| UTF8 -c1        |  90.1 ms | 103.6 ms |  28.0 ms |  50.9 ms |
| UTF8 -c10       |  39.7 ms | 103.2 ms |  40.0 ms | 127.5 ms |
| UTF8 -c100000   |  39.0 ms | 104.4 ms |  18.5 ms |  30.3 ms |

* bootstrap.conf: Explicitly depend on unistr/u8-check.
* src/cut.c (cut_characters_mode): Quickly skip over unselected
ASCII/UTF-8 data.
* tests/cut/cut.pl: Add test cases.
2026-09-29 13:34:04 +01:00
Pádraig Brady
45cdd85366 cut: -c: optimize extracting the start of a line
Performance was tested with GCC 16 on an i7-5600U with
CFLAGS='-march=native -O3 -flto' with the following setup:

$ yes | head -n10M > sl.in
$ yes $(yes eeeaae | head -n10K | paste -s -d' ') | head -n10K > llw.in
$ yes $(yes eeeaae | head -n9 | paste -s -d' ') | head -n1M > asw.in
$ yes $(yes éééááé | head -n9 | paste -s -d$'\xe2\x80\x83') |
   head -n1M > mbw.in

for type in sl llw asw mbw; do
  cat $type.in >/dev/null;
  for imp in '-before' '-after'; do
    echo ============ "${imp:-base}" $type ==============;
    for d in -c; do
      fields='-f1 -f10 -f100'
      test "$d" = "-c" && { fields='-c1 -c10 -c100000'; d=''; }
      for f in $fields; do
        for loc in C.UTF-8; do
          # Skip -b for UTF-8 as no different
          test "$loc" = C.UTF-8 && echo "$f" | grep -q -- -b \
           && continue
          # Skip multi-byte delimiter for C and not allowed
          test "$loc" = C && test $(echo -n "$d" | wc -c) -ge 4 \
           && continue
          bin=src/cut${imp}
          LC_ALL=$loc $bin $f $d /dev/null 2>/dev/null &&
          hyperfine --warmup=2 -m2 -M6 \
           "LC_ALL=$loc $bin $f $d $type.in >/dev/null" ||
          printf 'Benchmark 1: %s\n  unsupported\n\n' \
           "LC_ALL=$loc $bin $f $d $type.in >/dev/null"
        done;
      done;
    done;
  done;
done

After a little post-processing of the results, we get:

-- src/cut-before

| command       |       sl |      llw |      asw |      mbw |
| ------------- | -------- | -------- | -------- | -------- |
| UTF8 -c1      |  60.7 ms |  1.244 s | 123.5 ms | 515.2 ms |
| UTF8 -c10     |  39.3 ms |  1.248 s | 127.4 ms | 526.0 ms |
| UTF8 -c100000 |  39.4 ms |  1.242 s | 121.4 ms | 514.3 ms |

-- src/cut-after

| command       |       sl |      llw |      asw |      mbw |
| ------------- | -------- | -------- | -------- | -------- |
| UTF8 -c1      |  70.9 ms | 105.5 ms |  27.0 ms |  47.6 ms |
| UTF8 -c10     |  55.7 ms | 105.7 ms |  48.2 ms | 126.8 ms |
| UTF8 -c100000 |  55.2 ms |  1.596 s | 158.8 ms | 555.1 ms |

* src/cut.c (cut_characters_mode): Shortcut the line delimiter
search if finished processing characters.
* tests/cut/cut.pl: Add a test case.
2026-09-29 13:34:00 +01:00
Iván Ezequiel Rodriguez
0e8455a8e2 maint: drop stale chmod/printf TODO items and clarify ls
* TODO: Remove chmod ctime and printf %a entries.
Replace ls --format with ls --printf.
2026-09-28 21:29:16 -07:00
Iván Ezequiel Rodriguez
49596f93d2 tests: printf: cover %a via round-trip processing
* tests/printf/printf.sh: Exercise %a without depending on a
particular hex form by round-tripping through %.10f.
Also check the 0x/0X prefix.
Suggested by Pádraig Brady.
2026-09-28 21:37:36 +01:00
Collin Funk
ace92d7dc2 maint: add zstandard compressed tarballs to .gitignore
* .gitignore: Add a pattern matching zstandard compressed tarballs and
their signatures.
2026-09-25 20:41:37 -07:00
Collin Funk
b66f3e4e27 realpath: fix an infinite loop when resolving symbolic links
Reported by Brian Foster in:
<https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/2161155>

* gnulib: Update to get commit b18879b9ed (canonicalize: Fix a missing
check for symlink loops., 2026-09-25)
* tests/misc/realpath.sh: Add a call to getlimits_. Add a test case.
* NEWS: Mention the bug fix.
2026-09-25 20:32:56 -07:00
Collin Funk
a350264f42 maint: pacify -Wimplicit-fallthrough=5
The assert function doesn't always cause the program to exit, so it
can't be marked _Noreturn. Therefore, even affirm (false), when it
expands to assert (false), will warn about an implicit fallthrough.

* src/cut.c (main): Move the affirm (false) case to the end of the
switch statement.
* src/numfmt.c (simple_strtod_fatal): Likewise.
* src/tr.c (string2_extend): Remove the call to unreachable () default
and combine it with the affirm (false) case.
2026-09-25 17:55:11 -07:00
Pádraig Brady
ae8c120c45 tests: date: avoid a false failure on NetBSD
The following errors were seen on NetBSD 11.99:

 Setting LC_CTYPE to 'de_DE' failed setlocale(3)
 Setting LC_MESSAGES to 'de_DE' failed setlocale(3)
 Setting LC_MONETARY to 'de_DE' failed setlocale(3)
 Setting LC_NUMERIC to 'de_DE' failed setlocale(3)
 Setting LC_TIME to 'de_DE' failed setlocale(3)

* tests/date/date.pl: Ignore setlocale() errors seen on NetBSD 11.99.
Reported at https://bugs.gnu.org/81923
2026-09-25 15:22:00 +01:00
Pádraig Brady
49efaeaaab tail: without inotify, ensure prompt output
This was seen with a NetBSD failure in the pipe-f2.sh test
due to it clearing the EOF indication on a fifo, and thus
blocking in the subsequent read.  That was discussed at:
https://lists.gnu.org/r/coreutils/2026-04/msg00129.html
https://bugs.gnu.org/81923
Note the NetBSD issue may be addressed in NetBSD 12 as
discussed in the bug above.

This is more defensive/consistent in the case
where a subsequent read on a file blocks.
We might be operating on non fifos after all.

* src/tail.c (tail_forever): Flush output before we might block.
* tests/tail/pipe-f2.sh: Test non inotify path on all platforms.
* NEWS: Mention the improvement.
2026-09-25 15:17:08 +01:00
Pádraig Brady
a5052b771f build: replace distributed gzipped sources with zstandard
zstd compressed sources are less than half the size
of gzip coompressed sources, so are a better secondary
distribution format in addition to xz.

* README-prereq: Remove gzip, Add zstd.
* bootstrap.conf (buildreq): Likewise.
Bump automake version check to 1.16.2 (released 2020).
* configure.ac (AM_INIT_AUTOMAKE): Disable gz, add dist-zstd.
Bump automake version requirement to 1.16.2.
* cfg.mk: Use compression level 18, and multi-threading.
* NEWS: Mention the change.
2026-09-25 13:19:24 +01:00
Collin Funk
b41cbfd6cc tests: readlink: check the output with multiple files
* tests/readlink/multi.sh: Add pwd to the print_ver_ call. Check the
output of the existing tests.
2026-09-23 19:42:11 -07:00
Kamila Szewczyk
d8d99b5cd8 dircolors: register the .bz3 compression format
* src/dircolors.hin: Register .bz3 and .tbz3 formats.
2026-09-23 13:53:41 +01:00