oech3 [Thu, 12 Feb 2026 17:07:30 +0000 (17:07 +0000)]
tests: coreutils: remove redundant validity check
* tests/misc/coreutils.sh: Remove the check for non-empty coreutils.h,
as the existing `print_ver_ coreutils` is sufficient to determine
support for single binary mode.
https://github.com/coreutils/coreutils/pull/189
Pádraig Brady [Sun, 8 Feb 2026 19:41:41 +0000 (19:41 +0000)]
tests: determine errno string more efficiently
* tests/misc/read-errors.sh: Use getlimits_ determined EIO error string,
rather than inferring the string from bash's output.
See https://bugs.gnu.org/80353
Pádraig Brady [Sun, 8 Feb 2026 19:34:13 +0000 (19:34 +0000)]
tests: getlimits: output error strings
* src/getlimits.c (main): Iterate over defined errnos,
and output shell compatible error strings.
* tests/Coreutils.pm: Adjust so shell quotes are stripped.
Collin Funk [Tue, 10 Feb 2026 06:30:48 +0000 (22:30 -0800)]
maint: pinky: reduce variable scope
* src/pinky.c (create_fullname, idle_string, print_entry)
(print_long_entry, main): Declare variables where they are used instead
of at the start of the function. Initialize variables where they are
declared.
Collin Funk [Sat, 7 Feb 2026 19:15:23 +0000 (11:15 -0800)]
nl: support multi-byte section delimiters
* NEWS: Mention the improvement.
* src/nl.c: Include mcel.h.
(DEFAULT_SECTION_DELIMITERS): Resize to fit 2 multi-byte characters.
(section_del_len): New variable.
(check_section): Compare against section_del_len instead of 2.
(main): Support multi-byte characters for the -d option.
* tests/nl/multibyte.sh: New file.
* tests/nl/nl.sh: New file, moved from tests/misc/nl.sh.
* tests/local.mk (all_tests): Add the new test. Adjust the existing
tests file name.
* cfg.mk (exclude_file_name_regexp--sc_space_tab): Adjust Adjust the
existing tests file name.
Sam James [Sun, 8 Feb 2026 00:25:40 +0000 (00:25 +0000)]
build: fix --enable-single-binary=hardlinks with dash
With dash as /bin/sh, you get the error
```
checking for sys/capability.h... yes
./configure: 95775: test: no: unexpected operator
checking for working fork... yes
```
* configure.ac: Use '=' in test for equality, not '==',
for POSIX shell compatibility.
* NEWS: Mention the build fix.
Collin Funk [Fri, 6 Feb 2026 05:18:25 +0000 (21:18 -0800)]
doc: kill: adjust documentation to produce html anchors for --help
* doc/coreutils.texi (kill invocation): Adjust documentation to use the
@optItem macros.
Fixes https://bugs.gnu.org/80339
Fixes https://github.com/coreutils/coreutils/issues/185
Pádraig Brady [Mon, 2 Feb 2026 20:15:17 +0000 (20:15 +0000)]
maintainer-makefile: propagate MAKEINFO to gendocs
Make this change temporarily in coreutils.
Move to gnulib after v9.10 is released.
* top/maint.mk (web-manual): Propagate MAKEINFO explicitly,
rather than requiring it exported in the environment,
which can be awkward on Solaris make for example.
Pádraig Brady [Fri, 30 Jan 2026 17:34:28 +0000 (17:34 +0000)]
doc: improve highlighting of dd --help translations
* src/system.h (oputs_): Ensure we're not matching '-' in
translated descriptions. Also support highlighting only
dd "foo=bar" when the description is separated with a single space.
Pádraig Brady [Tue, 27 Jan 2026 17:45:02 +0000 (17:45 +0000)]
doc: improve highlighting of single spaced translations
* src/system.h (oputs_): Translations sometimes use a single space
between an option and its description. They only do this though
for long options since they result in less available screen space.
Therefore be more strict with option matching once we've encountered
a long option, which supports the more varied formats often
associated with short options.
Paul Eggert [Mon, 26 Jan 2026 02:50:33 +0000 (18:50 -0800)]
doc: fix date(1) synopses etc
Font problem reported by Michael Aramini via Alejandro Colomar
<https://bugs.gnu.org/80258>. This patch also fixes some
longstanding confusion with date synopses.
* src/date.c (usage): Do not imply that only -u can be used with
MMDDhhmm..., and do not put misleading brackets around the latter.
Collin Funk [Sat, 24 Jan 2026 22:12:10 +0000 (14:12 -0800)]
tests: chgrp: allow a numeric user id to be printed
* tests/chgrp/from.sh: If 'id' cannot find a user name for user id 1,
expect the user id to be printed in the message of 'chgrp'.
Reported by Bruno Haible.
Pádraig Brady [Sat, 24 Jan 2026 18:04:46 +0000 (18:04 +0000)]
tail: fix EINTR handling on older systems
tail(1) could fail with an "Interrupted system call"
diagnostic, on some systems like Centos 5 (Linux 2.6.18).
This was seen with tests/tail/overlay-headers.sh
which sends SIGCONT, which should not induce a failure.
* src/tail.c (tail_forever_inotify): Retry the poll()
upon receiving a non terminating signal, and the syscall
is not automatically restarted by the system.
* NEWS: Mention the bug fix.
Reported by Bruno Haible.
Collin Funk [Sat, 24 Jan 2026 19:15:10 +0000 (11:15 -0800)]
tests: avoid failures if 'ulimit -n' cannot set file descriptor limits
This fixes test failures seen on Haiku.
* tests/ls/recursive.sh: Run 'ls' even if ulimit fails.
* tests/split/r-chunk.sh: Run 'split' even if ulimit fails.
* tests/sort/sort-merge-fdlimit.sh: Skip test if 'ulimit -n' cannot set
file descriptor limits.
Reported by Bruno Haible.
Pádraig Brady [Sat, 24 Jan 2026 13:34:35 +0000 (13:34 +0000)]
doc: nproc: mention OpenMP env vars in --help
* src/nproc.c (usage): Clarify the impact of 'OMP_NUM_THREADS'
and 'OMP_THREAD_LIMIT' in --help and the man page.
Also mention that nproc(1) will always return > 0.
Fixes https://bugs.gnu.org/80243
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.