]> git.ipfire.org Git - thirdparty/coreutils.git/log
thirdparty/coreutils.git
5 months agomaint: chmod: prefer static initialization
Collin Funk [Fri, 20 Feb 2026 04:39:41 +0000 (20:39 -0800)] 
maint: chmod: prefer static initialization

* src/chmod.c (main): Remove unnecessary initializations.

5 months agomaint: head: prefer static initialization
Collin Funk [Fri, 20 Feb 2026 04:33:10 +0000 (20:33 -0800)] 
maint: head: prefer static initialization

* src/head.c (line_end): Initialize variable.
(main): Remove unnecessary initializations.

5 months agomaint: ln: prefer static initialization
Collin Funk [Fri, 20 Feb 2026 04:29:48 +0000 (20:29 -0800)] 
maint: ln: prefer static initialization

* src/ln.c (main): Remove unnecessary initializations.

5 months agomaint: nl: prefer static initialization
Collin Funk [Fri, 20 Feb 2026 04:22:16 +0000 (20:22 -0800)] 
maint: nl: prefer static initialization

* src/nl.c (main): Remove unnecessary initialization.

5 months agomaint: touch: prefer static initialization
Collin Funk [Fri, 20 Feb 2026 04:14:30 +0000 (20:14 -0800)] 
maint: touch: prefer static initialization

* src/touch.c (main): Remove unnecessary initializations.

5 months agomaint: fold: prefer static initialization
Collin Funk [Fri, 20 Feb 2026 04:10:58 +0000 (20:10 -0800)] 
maint: fold: prefer static initialization

* src/fold.c (main): Remove unnecessary initializations.

5 months agomaint: tee: prefer static initialization
Collin Funk [Fri, 20 Feb 2026 04:03:32 +0000 (20:03 -0800)] 
maint: tee: prefer static initialization

* src/tee.c (main): Remove unnecessary initializations.

5 months agomaint: rmdir: prefer static initialization
Collin Funk [Fri, 20 Feb 2026 04:00:03 +0000 (20:00 -0800)] 
maint: rmdir: prefer static initialization

* src/rmdir.c (main): Remove unnecessary initialization.

5 months agomaint: tty: prefer static initialization
Collin Funk [Fri, 20 Feb 2026 03:52:29 +0000 (19:52 -0800)] 
maint: tty: prefer static initialization

* src/tty.c (main): Remove unnecessary initialization.

5 months agomaint: tests: DRY a recent change
Pádraig Brady [Thu, 19 Feb 2026 19:42:14 +0000 (19:42 +0000)] 
maint: tests: DRY a recent change

* tests/pwd/pwd-long.sh: Adjust so complicated command is not repeated.

5 months agowc: add aarch64 Neon optimization for wc -l
Collin Funk [Wed, 18 Feb 2026 08:03:05 +0000 (00:03 -0800)] 
wc: add aarch64 Neon optimization for wc -l

Here is an example of the performance improvement:

    $ yes abcdefghijklmnopqrstuvwxyz | head -n 100000000 > input
    $ time ./src/wc-prev -l < input
    100000000

    real 0m0.793s
    user 0m0.630s
    sys 0m0.162s
    $ time ./src/wc -l < input
    100000000

    real 0m0.230s
    user 0m0.065s
    sys 0m0.164s

* NEWS: Mention the performance improvement.
* gnulib: Update to the latest commit.
* configure.ac: Check the the necessary intrinsics and functions.
* src/local.mk (noinst_LIBRARIES) [USE_NEON_WC_LINECOUNT]: Add
src/libwc_neon.a.
(src_libwc_neon_a_SOURCES, wc_neon_ldadd, src_libwc_neon_a_CFLAGS)
[USE_NEON_WC_LINECOUNT]: New variables.
(src_wc_LDADD) [USE_NEON_WC_LINECOUNT]: Add $(wc_neon_ldadd).
* src/wc.c [USE_NEON_WC_LINECOUNT]: Include sys/auxv.h and asm/hwcap.h.
(neon_supported) [USE_NEON_WC_LINECOUNT]: New function.
(wc_lines) [USE_NEON_WC_LINECOUNT]: Use neon_supported and
wc_lines_neon.
* src/wc.h (wc_lines_neon): Add declaration.
* src/wc_neon.c: New file.
* doc/coreutils.texi (Hardware Acceleration): Document the "-ASIMD"
hwcap and the variable used in ./configure to override detection of Neon
instructions.
* tests/wc/wc-cpu.sh: Also add "-ASIMD" to disable the use of Neon
instructions.

5 months agotests: use system ENOTEMPTY message
Pádraig Brady [Tue, 17 Feb 2026 22:58:29 +0000 (22:58 +0000)] 
tests: use system ENOTEMPTY message

* tests/mv/dir2dir.sh: Map system specific messages.
* tests/rm/d-2.sh: Likewise.

5 months agomaint: tests: avoid ERANGE specific handling
Pádraig Brady [Tue, 17 Feb 2026 22:50:00 +0000 (22:50 +0000)] 
maint: tests: avoid ERANGE specific handling

* tests/fmt/base.pl: Verify ERANGE is diagnosed.
* tests/od/od.pl: Adjust determination of ERANGE.

5 months agomaint: tests: avoid ELOOP specific handling
Pádraig Brady [Tue, 17 Feb 2026 22:31:15 +0000 (22:31 +0000)] 
maint: tests: avoid ELOOP specific handling

* tests/du/long-sloop.sh: Adjust determination of ELOOP.

5 months agomaint: tests: avoid ENOSPC specific handling
Pádraig Brady [Tue, 17 Feb 2026 21:59:16 +0000 (21:59 +0000)] 
maint: tests: avoid ENOSPC specific handling

* tests/csplit/csplit-io-err.sh: Adjust determination of ENOSPC.
* tests/csplit/split-io-err.sh: Likewise.
* tests/fold/fold-zero-width.sh: Verify full ENOSPC message.
* tests/tac/tac-continue.sh: Likewise.
* tests/misc/io-errors.sh: Likewise.
* tests/misc/write-errors.sh: Likewise.

5 months agotests: use system ENOSPC message
Pádraig Brady [Tue, 17 Feb 2026 21:55:54 +0000 (21:55 +0000)] 
tests: use system ENOSPC message

* tests/head/head-write-error.sh: Verify ENOSPC is output.
* tests/misc/yes.sh: Likewise.

5 months agotests: use system ENOTSUP message
Pádraig Brady [Mon, 16 Feb 2026 12:54:35 +0000 (12:54 +0000)] 
tests: use system ENOTSUP message

* tests/cp/cp-mv-enotsup-xattr.sh: Don't hardcode "Operation not
supported".
* tests/cp/cp-a-selinux.sh: Likewise.

5 months agomaint: tests: avoid ENOTSUP specific handling
Pádraig Brady [Mon, 16 Feb 2026 12:50:32 +0000 (12:50 +0000)] 
maint: tests: avoid ENOTSUP specific handling

* tests/mv/mv-exchange.sh: Use ENOTSUP rather than
transforming variations.

5 months agotests: use system EACCES message
Pádraig Brady [Mon, 16 Feb 2026 12:09:34 +0000 (12:09 +0000)] 
tests: use system EACCES message

* tests/chgrp/no-x.sh: Don't harcode "Permission denied".
* tests/chmod/no-x.sh: Likewise.
* tests/du/inacc-dest.sh: Likewise.
* tests/du/no-x.sh: Likewise.
* tests/misc/nohup.sh: Likewise.
* tests/mv/part-fail.sh: Likewise.
* tests/mv/perm-1.sh: Likewise.
* tests/rm/fail-eacces.sh: Likewise.
* tests/rm/rm1.sh: Likewise.
* tests/rm/rm2.sh: Likewise.
* tests/rm/unread2.sh: Likewise.
* tests/rm/unreadable.pl: Likewise.

5 months agomaint: tests: avoid AIX specific EACCES handling
Pádraig Brady [Sat, 14 Feb 2026 13:50:48 +0000 (13:50 +0000)] 
maint: tests: avoid AIX specific EACCES handling

* tests/rm/inaccessible.sh: Remove AIX specific handling.
* tests/cp/fail-perm.sh: Likeise.  Also remove confusing
EPERM/HPUX mentions.
* tests/misc/sync.sh: Don't hardcode EISDIR and EACCES.

5 months agomaint: tests: avoid EPERM/EACCES specific handling
Pádraig Brady [Sat, 14 Feb 2026 12:23:00 +0000 (12:23 +0000)] 
maint: tests: avoid EPERM/EACCES specific handling

* tests/Coreutils.pm: Remove associated comment.
* tests/mv/sticky-to-xpart.sh: Use $EACCES and $EPERM.
* tests/rm/fail-2eperm.sh: Likewise.
* tests/touch/not-owner.sh: Likewise.

5 months agomaint: tests: avoid EPERM specific handling
Pádraig Brady [Sat, 14 Feb 2026 12:15:15 +0000 (12:15 +0000)] 
maint: tests: avoid EPERM specific handling

* tests/dd/fail-ftruncate-fstat.sh: Use $EPERM rather than
mapping specific strings to the Linux $EPERM.
* tests/mkdir/smack-no-root.sh: Use $EPERM rather than hardcoding.

5 months agomaint: expr: reduce variable scope
Collin Funk [Wed, 18 Feb 2026 02:45:33 +0000 (18:45 -0800)] 
maint: expr: reduce variable scope

* src/expr.c (mbs_logical_cspn, main, trace, docolon, eval7, eval6)
(eval5, eval4, eval3, eval2, eval1, eval): Declare variables where they
are used instead of at the start of the function.

5 months agotests: pwd: ensure our getcwd fallback is tested
Pádraig Brady [Tue, 17 Feb 2026 00:18:48 +0000 (00:18 +0000)] 
tests: pwd: ensure our getcwd fallback is tested

* tests/pwd/pwd-long.sh: Avoid the getcwd syscall,
to ensure our fallback getcwd code is exercised.
* NEWS: Mention the recent bug fix in pwd.

5 months agopwd: fix heap buffer overflow in file_name_prepend
Chris Down [Mon, 16 Feb 2026 05:06:31 +0000 (13:06 +0800)] 
pwd: fix heap buffer overflow in file_name_prepend

file_name_prepend works by right-aligning path data in a growing buffer.
When the buffer is too small, it then allocates a new buffer via
xpalloc() and copies existing data to the end of the new buffer.

Unfortunately, the memcpy destination is computed as buf + p->n_alloc -
n_free, but xpalloc has already updated p->n_alloc to the new (larger)
allocation size while n_free still reflects the old state. This places
the data at too high an offset, writing past the end of the buffer.

Update to properly calculate the destination offset.

Fixes: v9.5-171-g61ab25c35 ("pwd: prefer xpalloc to xnrealloc")
5 months agobuild: update gnulib submodule to latest
Paul Eggert [Sun, 15 Feb 2026 03:05:48 +0000 (19:05 -0800)] 
build: update gnulib submodule to latest

5 months agomaint: seq,who: prefer xasprintf
Collin Funk [Sat, 14 Feb 2026 22:48:45 +0000 (14:48 -0800)] 
maint: seq,who: prefer xasprintf

* src/seq.c (main): Use xasprintf instead of asprintf followed by a
check if the allocation fails.
* src/who.c (print_line): Likewise.

5 months agomaint: seq: reduce variable scope
Collin Funk [Sat, 14 Feb 2026 20:15:09 +0000 (12:15 -0800)] 
maint: seq: reduce variable scope

* src/seq.c (long_double_format, print_numbers, main): Declare variables
where they are used instead of at the start of the function.

5 months agotests: date: check that options can follow the format string
Collin Funk [Sat, 14 Feb 2026 06:26:59 +0000 (22:26 -0800)] 
tests: date: check that options can follow the format string

* tests/date/date.pl (@Tests): Add the test case.

5 months agodoc: relax github issue/pull-request instructions
Pádraig Brady [Thu, 12 Feb 2026 17:42:52 +0000 (17:42 +0000)] 
doc: relax github issue/pull-request instructions

Be more accepting of github issues and pull-requests.
Be a bit less verbose in info provided.

5 months agotests: sort: ensure --batch-size=(rlimit+1) fails
oech3 [Sun, 1 Feb 2026 13:46:42 +0000 (22:46 +0900)] 
tests: sort: ensure --batch-size=(rlimit+1) fails

* tests/sort/sort-merge-fdlimit.sh: Add test case.
https://github.com/coreutils/coreutils/pull/182

5 months agotests: coreutils: remove redundant validity check
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

5 months agotests: cp: ensure --debug output failure is diagnosed
oech3 [Thu, 12 Feb 2026 16:32:19 +0000 (16:32 +0000)] 
tests: cp: ensure --debug output failure is diagnosed

* tests/cp/debug.sh: cp diagnostics are written to stdout,
so ensure output errors are diagnosed.
https://github.com/coreutils/coreutils/pull/192

5 months agotests: arch: add option parsing check
oech3 [Thu, 12 Feb 2026 16:24:13 +0000 (16:24 +0000)] 
tests: arch: add option parsing check

* tests/misc/arch.sh: Ensure -- to indicate end of options is accepted.
https://github.com/coreutils/coreutils/pull/191

5 months agotests: date: check dotted EU dates in combination
Pádraig Brady [Thu, 12 Feb 2026 14:50:16 +0000 (14:50 +0000)] 
tests: date: check dotted EU dates in combination

* tests/date/date.pl: Add other date elements
to ensure abbreviated dotted dates are parsed appropriately.
Corresponds to gnulib commit 451042cb76

5 months agobuild: update gnulib to latest
Pádraig Brady [Thu, 12 Feb 2026 14:03:28 +0000 (14:03 +0000)] 
build: update gnulib to latest

5 months agotests: determine errno string more efficiently
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

5 months agotests: getlimits: output error strings
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.

5 months agomaint: pinky: reduce variable scope
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.

5 months agomaint: remove extraneous code from test
Pádraig Brady [Mon, 9 Feb 2026 11:28:03 +0000 (11:28 +0000)] 
maint: remove extraneous code from test

* tests/misc/usage_vs_refs.sh: Remove copy and paste slop.
* tests/local.mk: Fix indentation.

5 months agonl: support multi-byte section delimiters
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.

5 months agotests: fix false failure with dash or ksh
Pádraig Brady [Sun, 8 Feb 2026 19:52:46 +0000 (19:52 +0000)] 
tests: fix false failure with dash or ksh

* tests/misc/read-errors.sh: Avoid dash or ksh as they
do _not_ print an error message upon EIO from read.
Fixes https://bugs.gnu.org/80353

5 months agodate: add tests and NEWS for dd.mm.yy support
Gabriel [Sun, 8 Feb 2026 16:01:44 +0000 (16:01 +0000)] 
date: add tests and NEWS for dd.mm.yy support

* NEWS: Mention the new feature.
* tests/date/date.pl: Add test cases.

5 months agobuild: update to latest gnulib
Pádraig Brady [Sun, 8 Feb 2026 16:24:00 +0000 (16:24 +0000)] 
build: update to latest gnulib

* gnulib: Update to pick up support for dd.mm.yy format
in parse-datetime.

5 months agobuild: fix --enable-single-binary=hardlinks with dash
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.

5 months agotests: ptx: ensure bad unicode is supported
oech3 [Sat, 7 Feb 2026 22:00:20 +0000 (22:00 +0000)] 
tests: ptx: ensure bad unicode is supported

* tests/ptx/ptx-overrun.sh: Ensure bad_unicode() is processed.

5 months agotests: cp: ensure read-only dir perms preserved
Sylvestre Ledru [Sat, 7 Feb 2026 15:20:46 +0000 (16:20 +0100)] 
tests: cp: ensure read-only dir perms preserved

* tests/cp/readonly-dir.sh: Add new test.
* tests/local.mk: Reference new test.
Identified here https://github.com/uutils/coreutils/issues/7961

5 months agodoc: NEWS: mention the recent kill documentation fix
Collin Funk [Sat, 7 Feb 2026 00:06:28 +0000 (16:06 -0800)] 
doc: NEWS: mention the recent kill documentation fix

* NEWS: Mention that the kill documentation now has the anchors expected
by 'kill --help'.

5 months agotests: fold: check that all files are processed
Collin Funk [Fri, 6 Feb 2026 08:43:25 +0000 (00:43 -0800)] 
tests: fold: check that all files are processed

* tests/fold/multiple-files.sh: New file.
* tests/local.mk (all_tests): Add the test.

5 months agotests: nl: check that all files are processed
Collin Funk [Fri, 6 Feb 2026 08:38:14 +0000 (00:38 -0800)] 
tests: nl: check that all files are processed

* tests/misc/nl.sh: Add a test case.

5 months agomaint: unexpand: remove dead store
Dr. David Alan Gilbert [Fri, 30 Jan 2026 00:41:09 +0000 (00:41 +0000)] 
maint: unexpand: remove dead store

The assign to next_tab_column in the backspace branch is never
read; in fact it's always written and then read solely inside the
blank branch.

Move the declaration of 'next_tab_column' down into the blank
branch, and remove its assignment in the backspace branch.

Spotted by the 'infer' static checker.

* src/unexpand.c (unexpand): Remove dead store of next_tab_column.

5 months agotests: ptx: add a robustness test case
oech3 [Fri, 6 Feb 2026 13:51:24 +0000 (13:51 +0000)] 
tests: ptx: add a robustness test case

* tests/ptx/ptx-overrun.sh: Ensure input is processed without issue.
https://github.com/coreutils/coreutils/pull/184

5 months agodoc: pr: use -COLS consistently
Pádraig Brady [Sat, 31 Jan 2026 22:19:40 +0000 (22:19 +0000)] 
doc: pr: use -COLS consistently

Help this back from release as would break a couple of translations.

* src/pr.c: Use COLS rather than COLUMN consistently
in comments and usage().

5 months agodoc: kill: adjust documentation to produce html anchors for --help
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

5 months agomaint: remove local maintainer-makefile adjustment
Pádraig Brady [Thu, 5 Feb 2026 12:58:35 +0000 (12:58 +0000)] 
maint: remove local maintainer-makefile adjustment

* gl/top/maint.mk.diff: Remove as the fix is now in gnulib.
* gl/local.mk: Remove the diff reference.

5 months agomaint: update gnulib to latest
Pádraig Brady [Thu, 5 Feb 2026 12:56:30 +0000 (12:56 +0000)] 
maint: update gnulib to latest

5 months agobuild: propagate $SHELL to makeinfo-wrapper.sh
Pádraig Brady [Wed, 4 Feb 2026 21:12:28 +0000 (21:12 +0000)] 
build: propagate $SHELL to makeinfo-wrapper.sh

A user that had an environment with SHELL=/usr/bin/fish
reported the following when trying to build info docs:

  build-aux/missing (line 4): Unsupported use of '='. In fish

* doc/local.mk: Propagate make's SHELL to our
makeinfo wrapper, so that the substituted ${SHELL}
uses a compatible shell from the Makefile.

5 months agotests: df: check that --sync always calls sync before statfs
Collin Funk [Mon, 2 Feb 2026 05:32:03 +0000 (21:32 -0800)] 
tests: df: check that --sync always calls sync before statfs

* tests/df/sync.sh: New file.
* tests/local.mk (all_tests): Add the test.

5 months agostat,df: remove an unnecessary alloca
Collin Funk [Sun, 1 Feb 2026 20:34:36 +0000 (12:34 -0800)] 
stat,df: remove an unnecessary alloca

* src/find-mount-point.c (find_mount_point): Don't call ASSIGN_STRDUPA
on the result of dir_name.

5 months agomaint: post-release administrivia
Pádraig Brady [Wed, 4 Feb 2026 12:20:32 +0000 (12:20 +0000)] 
maint: post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

5 months agoversion 9.10 v9.10
Pádraig Brady [Wed, 4 Feb 2026 11:45:38 +0000 (11:45 +0000)] 
version 9.10

* NEWS: Record release date.

5 months agomaintainer-makefile: propagate MAKEINFO to gendocs
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.

5 months agotests: avoid false failure sync'ing busy systems
Pádraig Brady [Mon, 2 Feb 2026 11:54:02 +0000 (11:54 +0000)] 
tests: avoid false failure sync'ing busy systems

* tests/misc/sync.sh: Increase the timeout to 60s,
and restrict the case to when RUN_VERY_EXPENSIVE_TESTS=yes.

5 months agodoc: improve highlighting of dd --help translations
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.

5 months agomaint: avoid prohibit-const-char syntax check failure
Pádraig Brady [Fri, 30 Jan 2026 14:12:12 +0000 (14:12 +0000)] 
maint: avoid prohibit-const-char syntax check failure

* src/copy.c: Avoid prohibit-const-char failure,
newly triggered by the (correct) recent adjustment.

5 months agodoc: move xgettext: hint to the correct translated string
Pádraig Brady [Fri, 30 Jan 2026 13:28:41 +0000 (13:28 +0000)] 
doc: move xgettext: hint to the correct translated string

* src/fmt.c (usage): Move comment down to the newly separated string.
Discussed in https://github.com/coreutils/coreutils/issues/178

5 months agomaint: space between ‘char’ and ‘*’
Paul Eggert [Wed, 28 Jan 2026 19:20:57 +0000 (11:20 -0800)] 
maint: space between ‘char’ and ‘*’

5 months agotests: date: test that %% in the string is not replaced
Collin Funk [Mon, 26 Jan 2026 06:56:47 +0000 (22:56 -0800)] 
tests: date: test that %% in the string is not replaced

* tests/date/percent-percent.sh: New file.
* tests/local.mk (all_tests): Add it.

5 months agodoc: improve highlighting of single spaced translations
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.

5 months agomaint: avoid syntax-check failure
Collin Funk [Tue, 27 Jan 2026 02:47:17 +0000 (18:47 -0800)] 
maint: avoid syntax-check failure

* man/date.x: Add a copyright header to fix sc_copyright_check.
Reported by Bruno Haible.

5 months agotests: tac: test --regex with anchors in the separator
Collin Funk [Mon, 26 Jan 2026 01:12:18 +0000 (17:12 -0800)] 
tests: tac: test --regex with anchors in the separator

* tests/tac/tac.pl (@Tests): Add a few test cases.

5 months agodoc: fit in 80 columns
Paul Eggert [Mon, 26 Jan 2026 22:59:55 +0000 (14:59 -0800)] 
doc: fit in 80 columns

5 months agodoc: fix date(1) synopses etc
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.

5 months agotests: mktemp: export LC_ALL
Collin Funk [Sun, 25 Jan 2026 19:27:00 +0000 (11:27 -0800)] 
tests: mktemp: export LC_ALL

* tests/mktemp/bad-unicode.sh: Run this test case using multiple
locales.

5 months agodoc: support TAB as a delimiter between --option and description
Pádraig Brady [Sun, 25 Jan 2026 19:52:59 +0000 (19:52 +0000)] 
doc: support TAB as a delimiter between --option and description

* src/system.h (oputs_): Treat a single TAB as an option delimiter.
Some zh translations use this delimiter format.

5 months agotests: chgrp: allow a numeric user id to be printed
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.

5 months agotail: fix EINTR handling on older systems
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.

5 months agotests: avoid failures if 'ulimit -n' cannot set file descriptor limits
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.

5 months agotests: dd: avoid EPERM false failure on Solaris
Pádraig Brady [Sat, 24 Jan 2026 13:58:29 +0000 (13:58 +0000)] 
tests: dd: avoid EPERM false failure on Solaris

* tests/dd/fail-ftruncate-fstat.sh: Also map the "Not owner"
error for EPERM seen on earlier Solaris 11 releases.
Reported by Bruno Haible.

5 months agodoc: nproc: mention OpenMP env vars in --help
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

5 months agobuild: update to latest gnulib
Pádraig Brady [Sat, 24 Jan 2026 13:03:51 +0000 (13:03 +0000)] 
build: update to latest gnulib

* gnulib:
  - getdelim, getline: Don't replace these functions on glibc
  - selinux: fix link errors with termux

5 months agotests: recognize SELinux support on Android
Bruno Haible [Sat, 24 Jan 2026 06:42:33 +0000 (07:42 +0100)] 
tests: recognize SELinux support on Android

* init.cfg (require_selinux_): Also try to see if 'mount' lists the
selinuxfs.

5 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.

5 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).

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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().

5 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 '+'.

5 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

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.