summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorLines
2026-05-16tests: tail: ensure --pid is responsive to intermittent inputHEADmasterPádraig Brady-2/+41
* tests/tail/pid-pipe.sh: Ensure not only open() is handled asynchronously with --pid.
2026-05-15maint: chroot: remove unnecessary root-dev-ino.h includeCollin Funk-1/+0
The only use of this header was removed in commit d52092958 (chroot: call chroot() unconditionally to handle bind mounted "/", 2014-10-15). * src/chroot.c: Don't include root-dev-ino.h.
2026-05-15maint: expr: remove unnecessary xstrtol.h includeCollin Funk-1/+0
It has not been needed since commit 130464448 (maint: use Gnulib libgmp module, 2020-07-07). * src/expr.c: Don't include xstrtol.h.
2026-05-15maint: basenc: remove unnecessary xdectoint.h includeCollin Funk-1/+0
The only use of this header was removed in commit 97d8dcc5c (basenc: prefer signed to unsigned integers, 2021-08-27). * src/basenc.c: Don't include xdectoint.h.
2026-05-15maint: shred: remove unnecessary setjmp.h includeCollin Funk-1/+0
It has not been needed since commit 9fd2c631b (Remove all uses of signals; modern hosts have /dev/random and don't need this gorp., 2005-04-09). * src/shred.c: Don't include setjmp.h.
2026-05-15tests: date: test format options combined with format stringsCollin Funk-0/+14
* tests/date/date.pl (@Tests): Add a few test cases.
2026-05-14tests: mktemp: test the creation of hidden files in a subdirectoryCollin Funk-0/+19
* tests/mktemp/mktemp.pl (@Tests): Add two test cases.
2026-05-14test: mktemp: test creation of a directory with a subdirectory templateCollin Funk-3/+12
* tests/mktemp/mktemp.pl (@Tests): Remove an unlink call handled in the previous call to check_tmp. Add a test case.
2026-05-14tests: shred: check shred explicit deallocationPádraig Brady-1/+10
* tests/shred/shred-remove.sh: Ensure shred deallocates with read-only directories, or '-' used to represent standard output.
2026-05-14maint: sc_prohibit_test_empty: add avoidance commentPádraig Brady-0/+1
* cfg.mk: Describe how to avoid the syntax check in the case of possibly large / binary input.
2026-05-13doc: shred: mention unsupported file typesCollin Funk-0/+9
* src/shred.c (usage): Mention the behavior of 'shred' on FIFOs, sockets, and terminals. * doc/coreutils.texi (shred invocation): Likewise. Addresses https://bugs.gnu.org/30177
2026-05-11tests: date: test the behavior with multiple --iso-8601 optionsCollin Funk-0/+8
* tests/date/date.pl (@Tests): Add test cases.
2026-05-11doc: fix --enable-single-binary configure helpLeonid Evdokimov-1/+1
* configure.ac: Fix optional indication with square brackets.
2026-05-10maint: pacify GCC 16 -Wuseless-castPaul Eggert-20/+25
This mostly either removes casts if they are always no-ops, or replaces casts (TYPE)(EXPR) with compound literals (TYPE){EXPR}. Compound literals are a bit safer anyway, as casts are too powerful in C. * src/cksum_avx2.c (cksum_avx2): * src/cksum_avx512.c (cksum_avx512): * src/cksum_crc.c (cksum_slice8): * src/cksum_pclmul.c (cksum_pclmul): * src/cp-hash.c (remember_copied): * src/numfmt.c (simple_strtod_float): * src/system.h (x_timestyle_match): Omit no-op casts. * src/cp-hash.c (src_to_dest_hash): * src/dd.c (dd_copy): * src/df.c (devlist_hash): * src/env.c (splitbuf_append_byte): * src/getlimits.c (print_int, main): * src/ls.c (dev_ino_hash): * src/truncate.c (do_ftruncate): Replace casts with compound literals. * src/factor.c: Ignore -Wuseless-cast, as we include the imported longlong.h file, which has many of them. * src/numfmt.c (powerld): 2nd arg is now ptrdiff_t, not int, so that integers are not silently mishandled in outlandish cases.
2026-05-10shred: don't block when opening FIFOs with no readersCollin Funk-7/+66
* NEWS: Mention the bug fix. * src/shred.c (wipefile): Open the file with O_NONBLOCK. * tests/shred/fifo.sh: New file. * tests/local.mk (all_tests): Add the new test.
2026-05-09doc: help2man: preserve layout of tablesPádraig Brady-5/+78
This is useful in many man pages like date , dd, od, tr, ... where there are tables presented, where extraneous lines between each entry are best avoided. * man/help2man: Use .PD 0 (Paragraph Distance) to avoid extraneous blank lines within .TP delineated tables. Also use explicit widths with .TP in such tables, to preserve the alignment from the --help output.
2026-05-09doc: date: group format sequences by functionPádraig Brady-40/+55
* src/date.c (usage): Grouping alphabetically is less useful. Suggested by Bruno Haible.
2026-05-08doc: date: show examples for format sequences in --helpPádraig Brady-46/+124
* src/date.c (usage): Show example to aid scanning of format sequences.
2026-05-07shuf: prefer fwrite over fputs and fputcCollin Funk-6/+29
On an AMD Ryzen 7 3700X running GNU/Linux: $ timeout 30 taskset 1 ./src/shuf-prev \ -r -i 1000000-1000000 | pv -r > /dev/null [ 302MiB/s] $ timeout 30 taskset 1 ./src/shuf \ -r -i 1000000-1000000 | pv -r > /dev/null [ 434MiB/s] * src/shuf.c (print_number): New function. (write_permuted_numbers, write_random_numbers): Use it. * tests/shuf/shuf.sh: Add a test case to run 'shuf -i' with varying numbers of digits to check that the string conversion is correct.
2026-05-05tests: head: test 'head -n 0' and 'head -c 0' open files for readingCollin Funk-0/+82
* tests/head/head-n0.sh: New file. * tests/local.mk: Add the new test case.
2026-05-05tests: ls: verify correct alignment with ACLsSylvestre Ledru-0/+15
* tests/ls/acl.sh: Check that the gap between the '+' indicator and the link count is the same whether the listing contains one or several ACL entries. https://github.com/coreutils/coreutils/pull/251
2026-05-04ls: exclude newline from consideration in line widthPádraig Brady-5/+38
* src/ls.c (calculate_columns): Treat width as inclusive max. (print_with_separator): Likewise. Also handle commas explicitly, since they're not catered for by an implicit newline in the count. * tests/ls/w-option.sh: Adjust exact-fit column tests. Note this change also makes the existing `ls -w4 -x -T0 a b` test behave consistently with other output width limits. Also add the test case from: https://github.com/coreutils/coreutils/pull/213 * tests/ls/m-option.sh: Add a test case to ensure appropriate wrapping when trailing comma at the line limit. * NEWS: Mention the change in behavior.
2026-05-04ls: fix too few display columns edge casePádraig Brady-4/+22
In the edge case where the right most column would consist of only files taking 1 or 2 cells, we accounted for 3 cells, which would result in using 1 column too few. This should have been part of commit v8.24-59-ge71be1292 * src/ls.c (init_column_info): Don't account for separator in the the final column. * tests/ls/w-option.sh: Add a test case.
2026-05-04tests: fix false failure with spaces in hierarchyPádraig Brady-3/+5
* tests/sort/sort-buffer-size.sh: Use `pwd` rather than $PWD, and quote appropriately. Reported by Bruno Haible.
2026-05-03tests: tee: ensure tee is non bufferedPádraig Brady-0/+6
* tests/tee/tee.sh: tests/misc/responsive.sh only confirms responsiveness to lines, so add a test for non line terminated. https://github.com/coreutils/coreutils/pull/259
2026-05-03doc: fix typo in chmod examplePádraig Brady-2/+2
* doc/coreutils.texi (chmod invocation): s/file/foo/ to match comment, and previous example.
2026-05-02tests: all: ensure closed stdin is handled appropriatelyCollin Funk-0/+87
* tests/misc/close-stdin.sh: New file. * tests/local.mk (all_tests): Add the new test.
2026-05-02doc: reference detailed "numeric mode" info from chmod.1Pádraig Brady-1/+3
Note were links are not supported (like on Solaris or FreeBSD), the text still displays normally. * man/chmod.x: Link from "numeric mode" in chmod man page, to more detailed online info.
2026-05-01build: fix compilation error on Alpine Linux and OpenBSDPádraig Brady-1/+1
* gl/lib/mbbuf.h: Define MBBUF_EOF in terms of MCEL_CHAR_MAX, rather than depending on the stdint module. Reported by Bruno Haible.
2026-04-30sum,cksum: consistently emit detailed write errorsCollin Funk-3/+12
Previously the string from strerror would only be printed for some algorithms: $ cksum -a sha2 -l 256 /dev/null > /dev/full cksum: write error: No space left on device $ cksum -a sysv /dev/null > /dev/full cksum: write error This patch fixes it so that the error information is always printed: $ ./src/cksum -a sha2 -l 256 /dev/null > /dev/full cksum: write error: No space left on device $ ./src/cksum -a sysv /dev/null > /dev/full cksum: write error: No space left on device * src/cksum.c (output_file): Don't check for a write error here. (main): Check for it here instead. * tests/misc/io-errors.sh: Add a 'cksum' invocation for each supported algorithm. https://github.com/coreutils/coreutils/issues/258
2026-04-30test: adjust -g description in --helpMax Downey Twiss-1/+1
This matches the manual, as well as the -u option, and should help reduce confusion. * src/test.c (usage): Fix -g documentation to match the structure of -u
2026-04-29unexpand: fix heap overflowPádraig Brady-1/+12
* src/unexpand.c (unexpand): Use xinmalloc() to gracefully handle overflow. Also use the runtime locale specific MB_CUR_MAX rather than the worst case MB_LEN_MAX. * tests/unexpand/mb.sh: Add a test case that fails in a default glibc build with either MB_CUR_MAX or MB_LEN_MAX. * NEWS: Mention the bug fix. Reported by Michał Majchrowicz.
2026-04-29unexpand: consolidate error messagesPádraig Brady-2/+2
* src/unexpand.c (main): Use the same error as in parse_tab_stops().
2026-04-29cut: use MCEL_LEN_MAX rather than MB_LEN_MAXPádraig Brady-2/+2
* src/cut.c: We use the mcel interface to populate these arrays, so restrict to the mcel supported max. This is more efficient as generally stateful encodings are not used or supported.
2026-04-29sort: use more dynamic memory allocation with pipesPádraig Brady-31/+244
The default memory allocation with pipes was too passive/static, resulting in not allocating enough memory to enable threading. By dynamically reallocating the buffer when reading from unknown sized inputs we better use available memory and threads. $ time seq 10000000 -1 0 | sort-old >/dev/null real 0m16.523s user 0m16.900s sys 0m0.167s $ time seq 10000000 -1 0 | sort-old -S1G >/dev/null real 0m12.263s user 0m29.646s sys 0m0.527s $ time seq 10000000 -1 0 | sort-new >/dev/null real 0m12.994s user 0m31.266s sys 0m0.716s It also avoids the overhead of writing to temp files for modestly sized inputs. For example the following input would induce interaction with temp storage: $ seq 125000 | wc -c 763895 * src/sort.c (sort_buffer_size): Rename to ... (sort_buffer_policy): ... here, and adjust to set an initial size and limit, rather than just a size. (fillbuf): Add a POLICY parameter, and use that to call maybe_growbuf() as needed. (maybe_growbuf): Return true if POLICY dictates we should grow the buffer, and try_growbuf() was able to reallocate the larger buffer. * tests/sort/sort-buffer-size.sh: Add a new test. * tests/local.mk: Reference new test. * NEWS: Mention the improvement. Related to https://bugs.gnu.org/10877
2026-04-28pinky: don't print output in the wrong order when fully bufferedCollin Funk-10/+13
* NEWS: Mention the bug fix. * src/pinky.c (cat_file): Prefer streams to file descriptors when writing to standard output.
2026-04-28uniq: fix read overrun with -wPaul Eggert-2/+9
Problem reported by Michał Majchrowicz. * src/uniq.c (find_field): Fix typo. * tests/uniq/uniq.pl (add_z_variants): Test for the bug.
2026-04-27tests: avoid false failure with perl-IO-Tty >= 1.24Pádraig Brady-1/+2
* tests/misc/tty-eof.pl: https://bugzilla.redhat.com/2463168
2026-04-26build: remove USE_NLSPaul Eggert-1/+0
* configure.ac (USE_NLS): Remove. The need for this went away in commit 1d58e4ddab548f574210da57ca44890a73efe9f8 dated 2025-11-20 10:43:06 2025 +0000.
2026-04-25doc: apply man page formatting suggestions from manpage-l10nPádraig Brady-8/+8
* src/basenc.c: Add (1) to base64 and base32 references. * src/cksum.c. Likewise for cksum references. * src/echo.c: Use "bell" in descriptions rather than BEL. * src/printf.c: Likewise. * src/id.c: Separate -u,-U,-G so marked up appropriately. Fixes https://bugs.gnu.org/80904
2026-04-25tests: all: ensure closed stdout is handled appropriatelyPádraig Brady-7/+23
* tests/misc/io-errors.sh: Add a check to ensure we diagose writing to closed stdout. Also ensure we exit with failure in other cases. * tests/misc/write-errors.sh: Likewise.
2026-04-25doc: remove redundant "Report translation bugs to" in --helpBruno Haible-13/+5
* configure.ac: Define PACKAGE_L10N_BUGREPORT. * man/local.mk (run_help2man): Set the IN_HELP2MAN environment variable. * src/system.h (emit_ancillary_info): Don't emit "Report any translation bugs to" line; this is already done by emit_bug_reporting_address() in version-etc.c. Fixes https://bugs.gnu.org/80886
2026-04-25build: update gnulib to latestPádraig Brady-0/+1
* gl/lib/mbbuf.h: Explicitly include string.h needed since gnulib commit b6d5b2f72
2026-04-24tests: tail: avoid a rare false failurePádraig Brady-5/+13
I noticed a single failure on cfarm29 (Linux 6.12 ppc64le), where the output was missing: -tail: directory containing watched file was removed -tail: inotify cannot be used, reverting to polling -tail: 'dir/file' has appeared; following new file * tests/tail/inotify-dir-recreate.sh: Leverage the new tail --debug output to sync to a point where we know the inotify watches are in place. Also normalize the file argument quoting a bit.
2026-04-23dd: avoid recursive parsing of multipliersPádraig Brady-31/+62
* src/dd.c (parse_integer): Use iterative rather than recursive parsing, to avoid potential stack overflow. * tests/dd/bytes.sh: Add a test case. https://github.com/coreutils/coreutils/issues/254
2026-04-22comm: don't close standard input twiceCollin Funk-3/+49
* NEWS: Mention the bug fix. * src/comm.c (usage): Remove mention that FILE1 and FILE2 cannot both be standard input. (compare_files): Only close standard input once. * doc/coreutils.texi (comm invocation): Document the behavior of 'comm - -' which is not portable to all implementations. * tests/comm/dash-dash.sh: New file. * tests/misc/comm.pl: Move to tests/comm/comm.pl. * tests/local.mk (all_tests): Add the new test. Rename the existing test.
2026-04-20maint: post-release administriviaPádraig Brady-2/+5
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2026-04-20version 9.11v9.11Pádraig Brady-1/+1
* NEWS: Record release date.
2026-04-19doc: NEWS item for who systemd fixPaul Eggert-0/+6
2026-04-19build: update gnulib submodule to latestPaul Eggert-0/+0