]> git.ipfire.org Git - thirdparty/coreutils.git/log
thirdparty/coreutils.git
2 months agotests: stty: avoid false failure if resizing terminal
Pádraig Brady [Fri, 23 Jan 2026 18:24:53 +0000 (18:24 +0000)] 
tests: stty: avoid false failure if resizing terminal

* tests/stty/stty-row-col.sh: Skip the test if we detect terminal
resizing.  Also more robustly restore the original size.

2 months agotests: readlink: avoid a false failure on Haiku
Collin Funk [Sat, 24 Jan 2026 09:18:24 +0000 (01:18 -0800)] 
tests: readlink: avoid a false failure on Haiku

* tests/readlink/readlink-posix.sh: Allow the "A" in "Argument" to be
capitalized in return value of strerror (EINVAL).

2 months agodoc: NEWS: add a missing quotation mark
Collin Funk [Sat, 24 Jan 2026 04:15:57 +0000 (20:15 -0800)] 
doc: NEWS: add a missing quotation mark

* NEWS: Add a closing quotation mark.

2 months agotests: usage_vs_refs.sh: fix false failure with Alpine
Pádraig Brady [Fri, 23 Jan 2026 19:19:59 +0000 (19:19 +0000)] 
tests: usage_vs_refs.sh: fix false failure with Alpine

* tests/misc/usage_vs_refs.sh: Fix missing escape on literal {,
required by busybox grep.
Reported by Bruno Haible.

2 months agodoc: dir,vdir: add dircolors(1) reference to man pages
Egmont Koblinger [Thu, 22 Jan 2026 16:25:59 +0000 (16:25 +0000)] 
doc: dir,vdir: add dircolors(1) reference to man pages

* man/dir.x: Add dircolors(1) to "SEE ALSO" section.
* man/vdir.x: Likewise.

2 months agodoc: dir,vdir: fix anchor refs from --help
Pádraig Brady [Thu, 22 Jan 2026 16:23:41 +0000 (16:23 +0000)] 
doc: dir,vdir: fix anchor refs from --help

* src/system.h (oputs_): Map from dir,vdir to ls.

2 months agodoc: stat: fix highlighting of --format
Egmont Koblinger [Thu, 22 Jan 2026 16:15:26 +0000 (16:15 +0000)] 
doc: stat: fix highlighting of --format

* src/stat.c (usage): Add missing comma after -c.

2 months agodoc: NEWS: minor adjustments
Pádraig Brady [Thu, 22 Jan 2026 16:13:26 +0000 (16:13 +0000)] 
doc: NEWS: minor adjustments

* NEWS: Fix typos, and move item to more appropriate section.

2 months agodoc: pr: fix --help output output
Pádraig Brady [Thu, 22 Jan 2026 12:55:01 +0000 (12:55 +0000)] 
doc: pr: fix --help output output

* src/pr.c (usage): Use consistent alignment with -J,
and highlight --pages using oputs().

2 months agodoc: help2man: handle leading '+' in options
Pádraig Brady [Thu, 22 Jan 2026 12:45:13 +0000 (12:45 +0000)] 
doc: help2man: handle leading '+' in options

* man/help2man: Fix indentation of options with leading '+'.

2 months agotests: fix false failure with pr -COLS
Pádraig Brady [Thu, 22 Jan 2026 11:55:51 +0000 (11:55 +0000)] 
tests: fix false failure with pr -COLS

* tests/misc/usage_vs_getopt.sh: Fix false failure induced
by commit v9.9-239-ga06f0cf67

2 months agodoc: use TERM=dumb rather than HELP_NO_MARKUP to disable markup
Pádraig Brady [Thu, 22 Jan 2026 11:42:47 +0000 (11:42 +0000)] 
doc: use TERM=dumb rather than HELP_NO_MARKUP to disable markup

This is a more standard mechanism to disable markup.

* src/system.h (oputs_): Logic change to honor TERM=dumb,
rather than HELP_NO_MARKUP=something.
* doc/coreutils.texi: Adjust the description for --help.
* man/local.mk: Ensure TERM is set to something,
so that man pages have links included.
* man/viewman: Just honor users $TERM.
* tests/misc/getopt_vs_usage.sh: Remove env var complication,
as TERM is unset automatically.
* tests/misc/usage_vs_refs.sh: Likewise.
* NEWS: Adjust the change in behavior note.

2 months agotests: avoid false failure with non standard path
Pádraig Brady [Wed, 21 Jan 2026 19:30:21 +0000 (19:30 +0000)] 
tests: avoid false failure with non standard path

* tests/misc/usage_vs_refs.sh: Properly quote arguments
to avoid false failure with paths containing spaces etc.

2 months agotests: avoid infinite loop in dd failure edge case
Pádraig Brady [Wed, 21 Jan 2026 18:57:53 +0000 (18:57 +0000)] 
tests: avoid infinite loop in dd failure edge case

* tests/tee/tee.sh: If dd failed, then tee would spin
writing to the fifo forever, so add a timeout protection.
This was noticed with `export LD_PRELOAD=libasan.so.8`
with a non ASAN build, which induced a failure in dd invocations.

2 months agotests: avoid false failure with sanitizer builds
Pádraig Brady [Wed, 21 Jan 2026 17:31:24 +0000 (17:31 +0000)] 
tests: avoid false failure with sanitizer builds

* init.cfg (sanitizer_build_): Add a helper to detect if a program
is built against a sanitizer.
* tests/df/no-mtab-status-masked-proc.sh: Skip if a sanitizer build.

2 months agostat,tail: sync with latest Linux file systems
Pádraig Brady [Wed, 21 Jan 2026 16:29:03 +0000 (16:29 +0000)] 
stat,tail: sync with latest Linux file systems

* src/stat.c (human_fstype): Add "guest-memfd".
* NEWS: Mention the improvement.

2 months agotests: avoid false failure on setgid dir
Pádraig Brady [Wed, 21 Jan 2026 16:06:51 +0000 (16:06 +0000)] 
tests: avoid false failure on setgid dir

* tests/misc/mknod.sh: Skip a portion of the test
in the edge case of setgid directories.

2 months agols: --hyperlink: switch to more standard delimiters
Pádraig Brady [Tue, 20 Jan 2026 20:25:26 +0000 (20:25 +0000)] 
ls: --hyperlink: switch to more standard delimiters

* src/ls.c (quote_name): Use ST (ESC \) rather than BEL,
as that's the only terminator mentioned in at least
ECMA-48, DEC STD 070, and EK-VT520-RM.
* NEWS: Mention the change in behavior.
* tests/ls/hyperlink.sh: Adjust accordingly.

Suggested by Egmont Koblinger.

2 months agotests: ensure there is an anchor for each --help option
Pádraig Brady [Tue, 20 Jan 2026 19:27:49 +0000 (19:27 +0000)] 
tests: ensure there is an anchor for each --help option

* tests/misc/usage_vs_refs.sh: A new test to correlation options
listed in --help, and anchors referenced in the texinfo (html) manual.
* tests/local.mk: Add the new test.

2 months agodoc: NEWS: describe the --help markup configuration options
Pádraig Brady [Wed, 21 Jan 2026 14:03:08 +0000 (14:03 +0000)] 
doc: NEWS: describe the --help markup configuration options

* NEWS: Mention build and runtime config options.

2 months agodoc: adjust --help hyperlinks to more standard format
Pádraig Brady [Tue, 20 Jan 2026 20:33:34 +0000 (20:33 +0000)] 
doc: adjust --help hyperlinks to more standard format

* src/system.h (oputs_): Use ST rather than BEL.

2 months agodoc: add commentary on details of --help references
Pádraig Brady [Tue, 20 Jan 2026 20:03:03 +0000 (20:03 +0000)] 
doc: add commentary on details of --help references

* src/system.h: Mention why we don't bother with (the overhead of)
hostnames in these URLs, and why --help,--version link are special.

2 months agodoc: cp: group related -HLP descriptions
Pádraig Brady [Tue, 20 Jan 2026 19:23:42 +0000 (19:23 +0000)] 
doc: cp: group related -HLP descriptions

* src/cp (usage): The -HLP options are close
in functionality and close alphabetically, so describe together.
* doc/coreutils.texi (cp invocation): Likewise.

2 months agodoc: cp: document --keep-directory-symlink in correct location
Pádraig Brady [Tue, 20 Jan 2026 19:11:40 +0000 (19:11 +0000)] 
doc: cp: document --keep-directory-symlink in correct location

* src/cp.c (usage): Move to alphabetically in list.
* doc/coreutils.texi (mv invocation): Move description from here ...
(cp invocation): ... to here.

2 months agodoc: ls: document --block-size in the manual
Pádraig Brady [Tue, 20 Jan 2026 18:58:40 +0000 (18:58 +0000)] 
doc: ls: document --block-size in the manual

* doc/coreutils.texi (ls invocation): Document --block-size

2 months agodoc: who: document --users in manual
Pádraig Brady [Tue, 20 Jan 2026 17:43:32 +0000 (17:43 +0000)] 
doc: who: document --users in manual

* doc/coreutils.texi (who invocation): Mention that --users
is equivalent to -u.
* src/who.c (usage): Mention -u shows idle time.

2 months agodoc: id: document -a in manual
Pádraig Brady [Tue, 20 Jan 2026 17:40:34 +0000 (17:40 +0000)] 
doc: id: document -a in manual

* doc/coreutils.texi (id invocation): Mention this option is ignored.

2 months agodoc: more indexing fixes in manual
Pádraig Brady [Tue, 20 Jan 2026 17:37:42 +0000 (17:37 +0000)] 
doc: more indexing fixes in manual

* doc/coreutils.texi: Add missing anchors.
* src/pr.c (Usage): Adjust to use -COLS, to avoid a clash
with the additional anchor added to the manual.
Also markup the --columns option as done for other options.
* tests/split/line-bytes.sh: Also fix --lines-bytes typo here.

2 months agodoc: tty: fix indexing in texinfo
Egmont Koblinger [Mon, 19 Jan 2026 22:13:07 +0000 (22:13 +0000)] 
doc: tty: fix indexing in texinfo

* doc/coreutils.texi: Fix recently introduced typo.
* THANKS.in: Remove as now committed to the repo.

2 months agodoc: make legacy digest utility --help reference cksum nodes
Pádraig Brady [Tue, 20 Jan 2026 13:35:54 +0000 (13:35 +0000)] 
doc: make legacy digest utility --help reference cksum nodes

* src/system.h (oputs_): Map md5sum etc. to cksum urls,
as we only have cksum anchors in the manual to avoid
creating anchors for all of the legacy digest utilities.

2 months agodoc: tweak tests to avoid false failure with --help
Pádraig Brady [Sat, 17 Jan 2026 18:17:49 +0000 (18:17 +0000)] 
doc: tweak tests to avoid false failure with --help

* tests/df/df-output.sh: Use a more relaxed match.
* tests/du/inodes.sh: Likewise.

2 months agodoc: all: use option highlighting and more standard alignment
Pádraig Brady [Thu, 1 Jan 2026 16:31:44 +0000 (16:31 +0000)] 
doc: all: use option highlighting and more standard alignment

Adjust all utils to:
  - Have a separate translation per option
  - Use either oputs() or oprintf(), instead of fputs() or printf().
  - Use more standard alignment as discussed in previous commits.
  - Various tweaks to descriptions.

2 months agodoc: readlink: improve option ordering in texinfo
Pádraig Brady [Sat, 17 Jan 2026 15:29:07 +0000 (15:29 +0000)] 
doc: readlink: improve option ordering in texinfo

* doc/coreutils.texi (readlink invocation): Order -q,-s alphabetically.

2 months agodoc: chcon: use more standard -HLP desciptions
Pádraig Brady [Fri, 16 Jan 2026 14:40:27 +0000 (14:40 +0000)] 
doc: chcon: use more standard -HLP desciptions

* src/chcon.c (usage): Use emit_symlink_recurse_options ("-P").

2 months agodoc: highlight -HLP options
Pádraig Brady [Fri, 16 Jan 2026 14:35:44 +0000 (14:35 +0000)] 
doc: highlight -HLP options

* src/system.h (emit_symlink_recurse_options): Highlight -HLP,
for chmod, chcon etc.

2 months agodoc: put --help and --version descriptions on separate line
Pádraig Brady [Fri, 16 Jan 2026 17:24:13 +0000 (17:24 +0000)] 
doc: put --help and --version descriptions on separate line

* src/system.h: This aligns the output with the option
description format used in most commands

2 months agodoc: ls: put option description on separate line to option
Pádraig Brady [Sat, 3 Jan 2026 17:55:50 +0000 (17:55 +0000)] 
doc: ls: put option description on separate line to option

* src/ls.c (usage): This is less constrained when writing comments,
and more consistent in output alignment.  There is less delineation
between options and descripts, but given options are highlighted
by default now, this is a more appropriate format to use.
Note consistently showing description on the line following the option,
avoids any issue with the user needing to visually line up
the option with a description far to the right.
Note this format more closely aligns with that used in man pages.

2 months agodoc: viewman: a new helper to quickly view formatted man pages
Pádraig Brady [Tue, 30 Dec 2025 14:37:45 +0000 (14:37 +0000)] 
doc: viewman: a new helper to quickly view formatted man pages

Use like: man/viewman ls

* man/viewman: Generate man page on the fly, and view.

2 months agodoc: help2man: account for undisplayed markup in indenting calculations
Pádraig Brady [Fri, 16 Jan 2026 18:09:16 +0000 (18:09 +0000)] 
doc: help2man: account for undisplayed markup in indenting calculations

* man/help2man: This is significant with the indented line
following the dd bs=BYTES "option" at least.

2 months agodoc: help2man: convert all hyperlinks, not just ones in --options
Pádraig Brady [Thu, 15 Jan 2026 22:00:28 +0000 (22:00 +0000)] 
doc: help2man: convert all hyperlinks, not just ones in --options

* man/help2man: Make the (--?) part of the match optional.
Note we still extract the dashes, to support the existing
option matching logic in help2man.

2 months agodoc: help2man: support alternate format OSC hyperlinks
Pádraig Brady [Thu, 15 Jan 2026 21:36:09 +0000 (21:36 +0000)] 
doc: help2man: support alternate format OSC hyperlinks

* man/help2man: The BEL terminator format was already supported.
Add support for ESC + backslash terminator.  Also split out
and document the regular expression.

2 months agodoc: help2man: convert OSC hyperlinks
Pádraig Brady [Mon, 29 Dec 2025 20:58:30 +0000 (20:58 +0000)] 
doc: help2man: convert OSC hyperlinks

* man/help2man: Convert OSC hyperlinks to roff \X escapes,
which will be converted back to OSC hyperlinks when
the man page is displayed on the terminal.
Note formatting is removed from hyperlinked text by default,
thus relying on how the terminal highlights hyperlinks,
but --bold-refs is honored in this case, in which hyperlinked
text will be marked up as bold, which matches the default
markup used for non hyperlinked options.

2 months agodoc: help2man: recognise option description with smaller indent
Pádraig Brady [Sat, 3 Jan 2026 15:23:18 +0000 (15:23 +0000)] 
doc: help2man: recognise option description with smaller indent

* man/help2man: Allow for a smaller indented option description.
This smaller indentation is present in timeout --help output,
so now the line spacing in timeout.1 is more consistent.
Also having the description on a separate line with
a smaller indentation, is a more general way to present
option descriptions (and what the man page formatting uses already).
We'll be changing many utilities, especially with longer multi-line
descriptions to this new format.

2 months agodoc: help2man: strip ANSI codes
Pádraig Brady [Mon, 29 Dec 2025 16:46:15 +0000 (16:46 +0000)] 
doc: help2man: strip ANSI codes

* man/help2man: With these ANSI codes, output is corrupted,
so it's best to strip these, which allows --help to
outputting formatting and hyperlinks by default.

2 months agodoc: support highlighting printf formatted options
Pádraig Brady [Fri, 16 Jan 2026 12:36:36 +0000 (12:36 +0000)] 
doc: support highlighting printf formatted options

* src/system.h (oprintf): Add a printf wrapper that
calls oputs_() to markup the formatted text.

2 months agodoc: support more general option matching
Pádraig Brady [Sat, 17 Jan 2026 13:36:35 +0000 (13:36 +0000)] 
doc: support more general option matching

* src/system.h: Support "-p DIR, --tmpdir[=DIR]" option.
Previously only the "-p" was highlighted.
Support highlighting dd option syntax (no '-').
Support test(1) "FILE1 -nt FILE2" syntax.

2 months agodoc: parse any whitespace as an option/description delimiter
Pádraig Brady [Sun, 4 Jan 2026 15:11:57 +0000 (15:11 +0000)] 
doc: parse any whitespace as an option/description delimiter

* src/system.c (oputs_): Use isspace() rather than hardcoding.
Note we don't use c_isspace() as we need to support anything
coming from translations.

2 months agodoc: optimize logic to disable SGR output in --help
Pádraig Brady [Sat, 3 Jan 2026 17:15:12 +0000 (17:15 +0000)] 
doc: optimize logic to disable SGR output in --help

* src/system.h (oputs_): Simplify processing if neither
MANUAL_URL or BOLD_MAN_REFS is defined.  Also ensure
we only lookup the HELP_NO_MARKUP env var once per process.

2 months agodoc: move oputs() to system.h to support all commands
Pádraig Brady [Thu, 1 Jan 2026 16:45:45 +0000 (16:45 +0000)] 
doc: move oputs() to system.h to support all commands

* src/ls.c: Move non ls specific helper to ...
* src/system.h: ... here.

2 months agodoc: support a configurable manual url
Pádraig Brady [Thu, 1 Jan 2026 16:17:16 +0000 (16:17 +0000)] 
doc: support a configurable manual url

* configure.ac: Support ./configure --enable-manual-url=...
* src/ls.c (oputs): Adjust accordingly.

2 months agodoc: --help: --disable-bold-man-page-references configures bold refs
Pádraig Brady [Mon, 29 Dec 2025 16:34:47 +0000 (16:34 +0000)] 
doc: --help: --disable-bold-man-page-references configures bold refs

* configure.ac: Adjust help text for --disable-bold-man-page-references,
and also define BOLD_MAN_REFS.
* src/ls.c (oputs): Output bold iff BOLD_MAN_REFS is defined.

2 months agodoc: ls: support styling and links in --help output
Pádraig Brady [Tue, 25 Nov 2025 13:40:32 +0000 (13:40 +0000)] 
doc: ls: support styling and links in --help output

* src/ls.c (oputs): A new function that wraps puts(),
but also highlights the --option-text portion, and
adds links to the appropriate part of the online manual.
(usage): Call oputs() rather than puts().
* doc/coreutils.texi (--help): Document new HELP_NO_MARKUP env var,
which can be used in the edge case one wants to suppress ansi escapes.
* tests/misc/getopt_vs_usage.sh: Use HELP_NO_MARKUP to ensure the
test continues to pass.

2 months agotests: test: ensure whitespace ignored when parsing numbers
Pádraig Brady [Wed, 21 Jan 2026 13:45:53 +0000 (13:45 +0000)] 
tests: test: ensure whitespace ignored when parsing numbers

* tests/test/test.pl: Add a test case.

2 months agocksum: use more accurate program name in single binary mode
Pádraig Brady [Tue, 20 Jan 2026 14:07:01 +0000 (14:07 +0000)] 
cksum: use more accurate program name in single binary mode

Following commit v9.9-109-gcd5229222

* src/cksum.c (PROGRAM_NAME): In legacy mode, i.e., when built
as a single binary, set the PROGRAM_NAME dynamically based on
the selected digest type.  This is significant in --help
to ensure the correct texinfo node is referenced, and in
--version to ensure the correct utility name is output.

2 months agotests: dd: avoid a false test failure on Solaris 11.4
Collin Funk [Tue, 20 Jan 2026 02:26:45 +0000 (18:26 -0800)] 
tests: dd: avoid a false test failure on Solaris 11.4

* tests/dd/fail-ftruncate-fstat.sh: Replace the message used by Solaris
11.4 for strerror (EPERM) with the one we expect.

2 months agotests: sync: check that all files are processed even when errors occur
Collin Funk [Sun, 18 Jan 2026 23:18:18 +0000 (15:18 -0800)] 
tests: sync: check that all files are processed even when errors occur

* tests/misc/sync.sh: Add the test case.

2 months agotests: sync: also test that -d and -f don't block on a FIFO
Collin Funk [Sun, 18 Jan 2026 21:58:27 +0000 (13:58 -0800)] 
tests: sync: also test that -d and -f don't block on a FIFO

* tests/misc/sync.sh: Check 'sync fifo' with no arguments, -d, and -f
separately. Only perform the check for -f if RUN_EXPENSIVE_TESTS=yes
since it may be expensive.

2 months agobuild: update to latest gnulib
Pádraig Brady [Mon, 19 Jan 2026 17:56:10 +0000 (17:56 +0000)] 
build: update to latest gnulib

* gnulib: Update to latest.
* NEWS: Mention the bug fix.
https://github.com/coreutils/coreutils/issues/176

2 months agotests: env.sh: avoid multi-call binary considerations
oech3 [Sun, 18 Jan 2026 20:38:15 +0000 (05:38 +0900)] 
tests: env.sh: avoid multi-call binary considerations

A simpler fix than commit v9.9-4-g3b6efd555
which is less dependent on the exact behavior
of a multi-call binary.

* tests/env/env.sh: Use a local script rather than 'true'.
which may be a symlinked multi-call binary.
https://github.com/coreutils/coreutils/pull/174

2 months agodoc: post process html with non-GNU make programs
Collin Funk [Sun, 18 Jan 2026 05:23:15 +0000 (21:23 -0800)] 
doc: post process html with non-GNU make programs

* .gitignore (/build-aux/makeinfo-wrapper.sh):
* Makefile.am (EXTRA_DIST): Remove build-aux/makeinfo-wrapper.sh.
* build-aux/makeinfo-wrapper.sh.in: New file, renamed from
build-aux/makeinfo-wrapper.sh and modified to use @MAKEINFO@ instead of
makeinfo.
* cfg.mk (MAKEINFO): Remove variable.
* configure.ac: Add build-aux/makeinfo-wrapper.sh as a configure file.
* doc/local.mk (MAKEINFO): Define to
$(abs_top_builddir)/build-aux/makeinfo-wrapper.sh.
(AM_MAKEINFOFLAGS): Move over some values from the previous MAKEINFO
definition.

2 months agotests: strace: consider splice a "read" syscall
Pádraig Brady [Sun, 18 Jan 2026 16:56:24 +0000 (16:56 +0000)] 
tests: strace: consider splice a "read" syscall

* tests/cksum/cksum-c.sh: Add 'splice' to the injection set.
* tests/misc/read-errors.sh: Likewise.
From https://github.com/coreutils/coreutils/pull/167

2 months agomaint: prefer NULL to nullptr
Pádraig Brady [Sun, 18 Jan 2026 15:55:38 +0000 (15:55 +0000)] 
maint: prefer NULL to nullptr

NULL is best for C as discussed at:
https://bugs.gnu.org/66221#53

* bootstrap.conf: Remove dependency on nullptr.
* s/nullptr/NULL/.

2 months agodoc: add more redirections from legacy *sum to cksum
Pádraig Brady [Sun, 18 Jan 2026 13:35:17 +0000 (13:35 +0000)] 
doc: add more redirections from legacy *sum to cksum

*  doc/coreutils.texi (md5sum invocation, sha1sum invocation,
b2sum invocation, sha2 utilities): Mention these are legacy interfaces,
and reference 'cksum invocation'.
*  src/cksum.c (usage): Likewise.
*  man/md5sum.x: Redirect to cksum, rather than individual utils.
*  man/sha1sum.x: Likewise.

2 months agotests: use `command -v` to identify binary
Pádraig Brady [Sun, 18 Jan 2026 12:48:36 +0000 (12:48 +0000)] 
tests: use `command -v` to identify binary

* tests/misc/coreutils.sh: Be more flexibile by using `command -v`
to identify the binary to be executed, rather than linking
directly to the built binary.

2 months agobuild: fix error building html documentation from tarball
Collin Funk [Sun, 18 Jan 2026 04:09:52 +0000 (20:09 -0800)] 
build: fix error building html documentation from tarball

Reported by Egmont Koblinger <egmont@gmail.com> in
<https://lists.gnu.org/r/coreutils/2026-01/msg00111.html>.

* Makefile.am (EXTRA_DIST): Add build-aux/makeinfo-wrapper.sh.

2 months agotests: avoid a test hang on AIX
Collin Funk [Sat, 17 Jan 2026 22:26:26 +0000 (14:26 -0800)] 
tests: avoid a test hang on AIX

* init.cfg (uses_strace_): New function.
(require_strace_): Use it.
tests/cksum/cksum-c.sh: Likewise.
tests/misc/read-errors.sh: Likewise.

2 months agobuild: update gnulib submodule to latest
Collin Funk [Sat, 17 Jan 2026 22:12:27 +0000 (14:12 -0800)] 
build: update gnulib submodule to latest

2 months agomaint: remove sc_prohibit_NULL syntax check
Pádraig Brady [Sat, 17 Jan 2026 12:45:42 +0000 (12:45 +0000)] 
maint: remove sc_prohibit_NULL syntax check

* cfg.mk: NULL is fine and good in C as per:
https://bugs.gnu.org/66221#53

2 months agobuild: update gnulib submodule to latest
Pádraig Brady [Sat, 17 Jan 2026 12:45:08 +0000 (12:45 +0000)] 
build: update gnulib submodule to latest

2 months agomaint: pacify another gcc -Wzero-as-null-pointer-constant warning
Collin Funk [Sat, 17 Jan 2026 06:56:15 +0000 (22:56 -0800)] 
maint: pacify another gcc -Wzero-as-null-pointer-constant warning

* src/uptime.c (print_uptime): Add a timezone_t cast to zero. Don't use
nullptr since timezone_t is not a standardized and may be defined to
something other than a pointer.

2 months agomaint: spelling fixes
Paul Eggert [Fri, 16 Jan 2026 21:22:28 +0000 (13:22 -0800)] 
maint: spelling fixes

2 months agobuild: update gnulib submodule to latest
Paul Eggert [Fri, 16 Jan 2026 20:49:14 +0000 (12:49 -0800)] 
build: update gnulib submodule to latest

2 months agomaint: pacify gcc -Wzero-as-null-pointer-constant
Paul Eggert [Fri, 16 Jan 2026 06:34:27 +0000 (22:34 -0800)] 
maint: pacify gcc -Wzero-as-null-pointer-constant

* src/basenc.c (long_options):
* src/chcon.c (change_file_context):
* src/copy.c (is_ancestor):
* src/env.c (build_argv):
* src/expr.c (nomoreargs):
* src/factor.c (mp_no_factors):
* src/ls.c (long_options, main):
* src/selinux.c (defaultcon, restorecon_private):
* src/shred.c (dopass):
* src/shuf.c (long_opts):
* src/tac.c (output):
* src/test.c (term):
* src/uniq.c (check_file): Do not use ‘0’ as a null pointer
constant.  Although it is typically valid C, there are exceptions
(e.g., stdarg) and it a bit cleaner to be consistent.  This patch
uses NULL, not nullptr, as I have second thoughts about nullptr;
see <https://bugs.gnu.org/66221#53>.

2 months agobuild: fix link errors with multi-call binary and 'cksum' excluded
Collin Funk [Thu, 15 Jan 2026 01:18:11 +0000 (17:18 -0800)] 
build: fix link errors with multi-call binary and 'cksum' excluded

* src/local.mk (src_ls_LDADD, src_seq_LDADD, src_md5sum_LDADD)
(src_sha1sum_LDADD, src_sha224sum_LDADD, src_sha256sum_LDADD)
(src_sha384sum_LDADD, src_sha512sum_LDADD): Set to
$(src_cksum_LDADD).
Reported at https://github.com/coreutils/coreutils/issues/172

2 months agoall: with multi-call binary, only process options for known names
Pádraig Brady [Thu, 15 Jan 2026 14:56:26 +0000 (14:56 +0000)] 
all: with multi-call binary, only process options for known names

Setup
  $ ln -nsf src/coreutils foo

Before
  $ ./foo; echo $?
  foo: unknown program ‘foo’
  Try './foo --help' for more information.
  1
  ./foo --version; echo $?
  coreutils (GNU coreutils) 9.9.172-01993
  0

After
  $ ./foo; echo $?
  coreutils: unknown program 'foo'
  1
  $ ./foo --version; echo $?
  coreutils: unknown program 'foo'
  1

* src/coreutils.c (main): Don't process options if
we don't know they're intended for the multi-call binary.
Otherwise `foo --version` would return true, even though
foo was symlinked to the multi-call binary, but not supported.
* tests/misc/coreutils.sh: Add test cases.
* NEWS: Mention the change in behavior.

2 months agodoc: paste: give a CSV generation example
Pádraig Brady [Thu, 15 Jan 2026 15:22:49 +0000 (15:22 +0000)] 
doc: paste: give a CSV generation example

* doc/coreutils.texi (paste invocation): Provide an example
to comma separate data.

2 months agobuild: paste: fix build failure with C99
Pádraig Brady [Wed, 14 Jan 2026 11:38:59 +0000 (11:38 +0000)] 
build: paste: fix build failure with C99

GCC 10.2 gave the following error:
"error: a label can only be part of a statement
 and a declaration is not a statement"

* src/fold.c (fold_file): Add a ";" to avoid C2X specific syntax.

2 months agomaint: avoid syntax-check failure from previous commit
Collin Funk [Wed, 14 Jan 2026 04:45:32 +0000 (20:45 -0800)] 
maint: avoid syntax-check failure from previous commit

* src/copy-file-data.c (sparse_copy): Use nullptr instead of NULL.

2 months agocat: don’t treat copy_file_range EFBIG as fatal
Paul Eggert [Tue, 13 Jan 2026 17:35:12 +0000 (09:35 -0800)] 
cat: don’t treat copy_file_range EFBIG as fatal

* src/cat.c (copy_cat):
* src/copy-file-data.c (sparse_copy):
Don’t treat EFBIG as a reportable error from copy_file_range.
If the input is at EOF and the output position is 2**63 - 1,
copy_file_range (ifd, NULL, ofd, NULL, 2146435072, 0)
incorrectly fails with EFBIG.  Problem observed on Ubuntu 25.10
x86-64 with Linux kernel 6.17.0-8-generic #8-Ubuntu.
I am too lazy to report this kernel bug or add a coreutils test case.

2 months agobuild: update gnulib submodule to latest
Paul Eggert [Tue, 13 Jan 2026 16:13:30 +0000 (08:13 -0800)] 
build: update gnulib submodule to latest

2 months agocp: copy-file-data.c commentary fixes
Paul Eggert [Tue, 13 Jan 2026 15:27:31 +0000 (07:27 -0800)] 
cp: copy-file-data.c commentary fixes

* src/copy-file-data.c: Update commentary to match code better.

2 months agotests: ensure utilities correctly diagnose read errors
Pádraig Brady [Tue, 13 Jan 2026 02:04:11 +0000 (02:04 +0000)] 
tests: ensure utilities correctly diagnose read errors

* tests/misc/read-errors.sh: Ensure each utility calls a
read system call as requested.  Not doing so (say by avoiding
reading from a directory) is a layering violation.
Also ensure we diagnose the particular error encountered.

2 months agofmt: correctly diagnose read errors
Pádraig Brady [Tue, 13 Jan 2026 02:01:11 +0000 (02:01 +0000)] 
fmt: correctly diagnose read errors

* src/fmt.c (fmt): Pass errno to error() so that
the particular error is diagnosed.
* NEWS: Mention the improvement.

2 months agopaste: support multi-byte delimiters
Pádraig Brady [Mon, 12 Jan 2026 23:41:29 +0000 (23:41 +0000)] 
paste: support multi-byte delimiters

* src/paste.c (collapse_escapes): This is the central --delimiters
parsing function, so adjust to handle multi-byte chars with
mcel_scanz().  Populate a delimiters length array to support
characters of differing lengths.
(paste_serial): Use the delimiters length array to output
the appropriate delimiter.
(paste_parallel): Likewise.
* tests/paste/multi-byte.sh: A new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the improvement.

2 months agotests: nice: ensure large values are clamped
oech3 [Tue, 13 Jan 2026 14:10:23 +0000 (14:10 +0000)] 
tests: nice: ensure large values are clamped

* tests/nice/nice.sh: Ensure integers > UINTMAX_MAX are supported.
From https://github.com/coreutils/coreutils/pull/170

2 months agomaint: ptx: place long options without short options after CHAR_MAX
Collin Funk [Mon, 12 Jan 2026 04:43:37 +0000 (20:43 -0800)] 
maint: ptx: place long options without short options after CHAR_MAX

* src/ptx.c (FORMAT_OPTION): New constant.
(long_options): Use FORMAT_OPTION instead of 10.
(main): Likewise.

2 months agotests: cksum: use more general strace syscall injection
Dmitry V. Levin [Mon, 12 Jan 2026 15:11:22 +0000 (15:11 +0000)] 
tests: cksum: use more general strace syscall injection

* tests/cksum/cksum-c.sh: Match "read" with a regex
to match any of the read syscall variants.

2 months agotests: paste -d: test supported escape sequences
Pádraig Brady [Mon, 12 Jan 2026 00:43:35 +0000 (00:43 +0000)] 
tests: paste -d: test supported escape sequences

* tests/misc/paste.pl: Test all supported POSIX and GNU
backslash escape sequences.

2 months agodoc: paste: add more detail on operation and options
Pádraig Brady [Mon, 12 Jan 2026 00:12:35 +0000 (00:12 +0000)] 
doc: paste: add more detail on operation and options

* src/paste.c (usage): Mention how lines are processed
with and without the -s option.  Also mention that -d
supports backslash escapes.
* doc/coreutils.texi (paste invocation): Likewise.
Also detail the backslash escapes, noting which are non-POSIX.

2 months agomaint: ptx: reuse octhexdigits macros instead of redefining them
Collin Funk [Mon, 12 Jan 2026 04:22:52 +0000 (20:22 -0800)] 
maint: ptx: reuse octhexdigits macros instead of redefining them

* src/ptx.c: Include octhexdigits.h.
(HEXTOBIN, ISODIGIT, OCTTOBIN): Remove macros.
(unescape_string): Use the macros from octhexdigits.h instead of the
removed macros.

2 months agotests: date: test nested parenthesis comment handling
Pádraig Brady [Sun, 11 Jan 2026 18:51:19 +0000 (18:51 +0000)] 
tests: date: test nested parenthesis comment handling

* tests/date/date.pl: Add test cases.
Suggested by Sylvestre Ledru.

2 months agodoc: runcon: use more accurate synopsis format
Pádraig Brady [Sun, 11 Jan 2026 18:37:33 +0000 (18:37 +0000)] 
doc: runcon: use more accurate synopsis format

* src/runcon.c (usage): Align synopsis with format
used in other commands.
* doc/coreutils.texi (runcon invocation): Likewise.

2 months agotests: cksum: ensure --check handles I/O errors
oech3 [Sun, 11 Jan 2026 18:14:44 +0000 (18:14 +0000)] 
tests: cksum: ensure --check handles I/O errors

* tests/cksum/cksum-c.sh: Use strace to inject EIO upon read(),
and verify it's handled appropriately.
From https://github.com/coreutils/coreutils/pull/167

2 months agotests: cksum: ensure --check diagnoses read errors
Pádraig Brady [Sun, 11 Jan 2026 13:40:32 +0000 (13:40 +0000)] 
tests: cksum: ensure --check diagnoses read errors

* tests/misc/read-errors.sh: Add a test case.
Discussed in https://github.com/coreutils/coreutils/pull/167

2 months agobuild: support 'dist' and 'syntax-check' targets without libselinux
Pádraig Brady [Sat, 10 Jan 2026 16:37:13 +0000 (16:37 +0000)] 
build: support 'dist' and 'syntax-check' targets without libselinux

Following on from commit v9.8-60-g8ba47d09a ...
Without libselinux installed, runcon and chcon stub binaries
will not be built by default.  We separate these utilities out
to a separate "not built unless appropriate" class, so that
we can add these to EXTRA_MANS so that the 'check-x-vs-1'
target doesn't fail, and the 'dist' target includes
these man pages.

* build-aux/gen-lists-of-programs.sh: Separate out
build_if_appropriate_progs, and propagate that through
to no_install_progs_default which populates EXTRA_MANS.
* src/local.mk: Separate out build_if_appropriate__progs
for clarity and consistency.

2 months agobuild: update gnulib submodule to latest
Pádraig Brady [Sun, 11 Jan 2026 12:54:17 +0000 (12:54 +0000)] 
build: update gnulib submodule to latest

* gnulib: Update to latest mainly to pull in selinux module fixes.
* NEWS: Mention the build fix to honor --with-selinux building
stub chcon and runcon binaries on systems without libselinux.

2 months agocksum: promptly diagnose write errors
Collin Funk [Sat, 10 Jan 2026 05:17:26 +0000 (21:17 -0800)] 
cksum: promptly diagnose write errors

* src/cksum.c (output_file, digest_check): Check if standard output has
it's error flag set after printing.
* tests/misc/write-errors.sh: Add a test case that would previously run
forever.
* NEWS: Mention the improvement. Reorder alphabetically.

2 months agomaint: remove redundant processing in a test
Pádraig Brady [Fri, 9 Jan 2026 14:25:24 +0000 (14:25 +0000)] 
maint: remove redundant processing in a test

* tests/misc/write-errors.sh: This was a no-op anyway
due to inadequate escaping.  Also document the escaping requirement.

2 months agodu: promptly diagnose write errors
Pádraig Brady [Fri, 9 Jan 2026 14:20:56 +0000 (14:20 +0000)] 
du: promptly diagnose write errors

* src/du.c (print_size): Call write_error() if can't flush.
* tests/misc/write-errors.sh: Add a test case.
* NEWS: Mention the improvement.

2 months agowc: promptly diagnose write errors
Pádraig Brady [Fri, 9 Jan 2026 14:16:04 +0000 (14:16 +0000)] 
wc: promptly diagnose write errors

* src/wc.c (write_counts): Call write_error() if any pending errors.
* tests/misc/write-errors.sh: Add a test case.
* NEWS: Mention the improvement.