Consider:
1. In infer_scantype():
- SEEK_DATA returns 0
- hole punched at 0
- SEEK_HOLE returns 0 (now a hole)
- Cache scan_inference->hole_start = 0
2. In lseek_copy():
- data written at 0
- ext_start = 0, use cached hole_start = 0
- ext_len = 0
- now loop doesn't progress
* src/copy-file-data.c (lseek_copy): Apply a more defensive check
to ensure we only use the cached offsets in SCAN_INFERENCE once.
This protects against an infinite loop where an extent (at SRC_POS)
flip flops between data and hole extent while infer_scantype()
and lseek_copy() are inspecting it. I.e. ensure we use SEEK_HOLE
to progress the copy.
* tests/cp/nfs-removal-race.sh: This test was invalid since v8.32
as we now use fstatat() rather than stat(). Also since commit
v9.0-66-ge2daa8f79 we leverage the errno from open(O_DIRECTORY)
to avoid a stat, so pass --no-target-directory to ensure fstatat()
is called.
Discussed in https://github.com/coreutils/coreutils/pull/161
glibc 2.33 removed __xstat, making stat() a direct symbol. This test
previously only intercepted __xstat, causing it to skip on modern glibc
with 'LD_PRELOAD was ineffective'.
Changes:
- Intercept both __xstat (glibc < 2.33) and stat (glibc >= 2.33)
- Only mark 'preloaded' when stat is called on destination 'd',
ensuring the test verifies cp actually stats the destination
Align the -t implementation with the Heirloom project.
* src/ptx.c (usage): Describe -t, and also mention
the default width is 72 when not used.
* doc/coreutils.texi (ptx invocation): Likewise.
(main): Override the default width if -t is specified.
* tests/ptx/ptx.pl: Add test cases.
* NEWS: Mention the change in behavior.
The bad-speed test runs 'stty ispeed 9600' without a --file argument,
which requires a controlling terminal. Without it, stty fails early with
'Inappropriate ioctl for device' before reaching cfsetispeed, causing
the test to skip with a misleading 'LD_PRELOAD interception failed'
message.
* tests/stty/bad-speed.sh: Add require_controlling_input_terminal_
to match the other stty tests (stty.sh, stty-pairs.sh, stty-row-col.sh,
stty-invalid.sh) which all require a controlling terminal.
From https://github.com/coreutils/coreutils/pull/160
Commit v9.8-95-g4c0cf3864 intended to initialize
ext_start to src_pos, as was described at:
https://lists.gnu.org/r/coreutils/2025-11/msg00035.html
However ipos was inadvertently used, which is only
valid the first time through the loop.
* src/copy-file-data.c (lseek_copy): Use scan_inference->hole_start
only with the initial offset passed to lseek_copy().
* NEWS: Mention the bug fix.
Reported at https://github.com/coreutils/coreutils/issues/159
* tests/df/no-mtab-status-masked-proc.sh: A new test similar
to no-mtab-status.sh but should work with static builds.
* tests/local.mk: Reference the new test.
https://github.com/coreutils/coreutils/pull/156
* tests/env/env-signal-handler.sh: Test that --ignore-signal with no
options also ignores real-time signals. Test that real-time signals can
be ignored by explicitly listing them.
* src/getlimits.c (SIGRTMIN): Define to zero if signal.h does not define
this constant.
(SIGRTMAX): Define to SIGRTMIN - 1 if signal.h does not define this
constant.
(main): Print SIGRTMIN and SIGRTMAX.
* tests/split/split-io-err.sh: A new test to verify that with I/O
errors, we leave existing files but don't continue.
* tests/local.mk: Reference the new test.
* tests/misc/io-errors.sh: Verify that all commands diagnose write
errors, and handle a closed pipe appropriately.
* tests/local.mk: Reference the new test.
* src/sort.c (main): Don't override handler for SIGPIPE
(which we did since commit v9.9-34-ge63131b32),
since we've explicit handling for SIGPIPE.
Also move ignoring of SIGPIPE until after
--help and --version are processed.
* tests/csplit/csplit-io-err.sh: Replace this LD_PRELOAD test with...
* tests/csplit/csplit-io-err-2.sh: This more general test,
that leverages /dev/full.
* tests/local.mk: Remove tests/csplit/csplit-io-err-2.sh.
* src/dd.c (main): Reduce the scope of exit_status. Exit immediately if
ftruncate fails.
* tests/dd/fail-ftruncate-fstat.sh: New test.
* tests/local.mk (all_tests): Add the new test.
* NEWS: Mention the bug fix.
* src/chown.h (enum chown_modes): New type.
(CHOWN_CHOWN, CHOWN_CHGRP): Define as an enum instead of a macro.
* src/chown-chgrp.c (chown_mode): Use "enum chown_modes" instead of
"int".
* src/chown-chown.c (chown_mode): Likewise.
* src/ls.h (enum ls_modes): New type.
(LS_LS, LS_MULTI_COL, LS_LONG_FORMAT): Define as an enum instead of a
macro.
* src/ls-dir.c (ls_mode): Use "enum ls_modes" instead of "int".
* src/ls-ls.c (ls_mode): Likewise.
* src/ls-vdir.c (ls_mode): Likewise.
* src/uname.h (enum uname_modes): New type.
(UNAME_UNAME, UNAME_ARCH): Define as an enum instead of a macro.
* src/uname-arch.c (uname_mode): Use "enum uname_modes" instead of
"int".
* src/uname-uname.c (uname_mode): Likewise.
* doc/coreutils.texi (Introduction): Use ç instead of @,{c}.
(Character arrays): Use ö instead of @"o. Use Ł instead of @L{}.
(Formatting file timestamps): Use ä instead of @"a.
Following commit v9.3-92-g1b86b70dd
$TMPDIR is part of the interface and an important behavioral
characteristic of a command, which should be documented.
* doc/coreutils.texi (split invocation): Mention $TMPDIR is honored.
(tac invocation): Likewise.
* src/split.c (usage): Likewise.
* src/tac.c (usage): Likewise.
On a GNU/Linux system, we have the following:
$ LC_ALL=en_US.UTF-8 date -u -d 1:00
Sun Dec 14 01:00:00 AM UTC 2025
$ LC_ALL=en_US.UTF-8 locale date_fmt
%a %b %e %r %Z %Y
$ LC_ALL=en_US.UTF-8 locale t_fmt_ampm
%I:%M:%S %p
$ LC_ALL=nl_NL.UTF-8 date -u -d 1:00
zo 14 dec 2025 1:00:00 UTC
$ LC_ALL=nl_NL.UTF-8 locale date_fmt
%a %e %b %Y %k:%M:%S %Z
We respect the locales preference for a leading zero or leading space in
single digit hours.
* tests/date/date-locale-hour.sh: Check that the locales preference for
leading zeros or spaces in single digit hours is used.
* doc/coreutils.texi (dd invocation): Document the behavior of 'dd' on
multibyte characters and some unspecified behavior that will be
documented in a future POSIX release [1].
[1] https://austingroupbugs.net/view.php?id=1959
OpenBSD and Alpine Linux /bin/sh cannot handle a file descriptor limit
of 7.
* tests/ls/recursive.sh: Create 30 directories and use a file descriptor
limit of 20. Don't check the output since we have coverage for that
elsewhere.
Reported by Bruno Haible.
Map md5sum and sha{1,224,256,385,512} to use cksum logic,
which selects appropriate behavior at runtime, rather than
separate binaries for each closely related utility.
$ size src/coreutils # before
text data bss dec hex filename
1349509 6812 619312 1975633 1e2551 src/coreutils
$ size src/coreutils # after
text data bss dec hex filename
1306933 6748 619152 1932833 1d7e21 src/coreutils
* build-aux/gen-single-binary.sh: Map sha*sum to use cksum.c
* src/cksum.c: Adjust to behave more like sha*sum,
when the algorithm to something other than "crc".
* src/cksum.h: Expose the cksum_algorithm global and enum.
* src/coreutils-md5sum.c: Set cksum_algorithm and call cksum logic.
* src/coreutils-sha1sum.c: Likewise.
* src/coreutils-sha224sum.c Likewise.
* src/coreutils-sha256sum.c Likewise.
* src/coreutils-sha384sum.c Likewise.
* src/coreutils-sha512sum.c Likewise.
* NEWS: Mention the improvement.