aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2025-11-08tests: tail: avoid a test failure on GNU/HurdHEADmasterCollin Funk1-1/+2
* tests/tail/tail-c.sh: Allow 'tail -c 4096 /dev/urandom' to run forever on GNU/Hurd since lseek fails with ESPIPE.
2025-11-08chcon: fix memory leak in error pathPádraig Brady1-1/+4
* src/chcon.c (change_file_context): If compute_context_from_mask fails, free the previously allocated file_context. Fixes https://bugs.gnu.org/79780
2025-11-08tests: avoid false failure due to small timeoutPádraig Brady1-1/+1
* tests/tail/tail-c.sh: Tests that fail after a timeout should use as least 10s to avoid intermittent failures on slow/loaded hosts.
2025-11-07build: update gnulib submodule to latestCollin Funk1-0/+0
2025-11-07install: fix crash with --strip and large $PATH on ppc and sparcPádraig Brady2-0/+5
* gnulib: Update to the latest gnulib to pull in the fix (v1.0-2406-g89f63027de) to allocate the $PATH processing memory before the vfork call, which is required on ppc and sparc. * tests/install/basic-1.sh: Ensure posix_spawnp() suports a large $PATH, which needs careful handling with vfork() as detailed in gnulib.
2025-11-07doc: cksum: clarify support of --text and --binaryPádraig Brady1-3/+7
Make the documentation more accurate following v9.3-80-g5e1e0993b * doc/coreutils.texi (cksum common options): State that --text and --binary are actually supported, but only to support emulation of the legacy utils.
2025-11-06tests: wc: protect against a hang on GNU/HurdCollin Funk1-1/+2
Reported by Bruno Haible in <https://lists.gnu.org/r/coreutils/2025-11/msg00051.html>. * tests/wc/wc-total.sh: Skip a test that would exhaust memory on GNU/Hurd.
2025-11-05gnulib: update to latestPádraig Brady2-0/+3
* NEWS: Mention the nproc build fix for older Android.
2025-11-05doc: mention nanosecond decimal points with --iso-8601=nsCollin Funk1-0/+5
Many people are used to seeing ISO 8601 dates using a period separating seconds and nanoseconds. This behavior seems to be worth documenting given the bug reports: https://bugs.gnu.org/63119 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1118970 * doc/coreutils.texi (Options for date): Mention that 'date --iso-8601=ns' uses a comma as a separator, following the preference of ISO 8601. Give an example of how to get an ISO 8601 date with a period separator.
2025-11-04maint: adjust lseek_copy to handle non zero offsetsPádraig Brady1-2/+2
* src/copy-file-data.c (lseek_copy): hole_start is initialized only when ext_start == ipos. (infer_scantype): Update the hole_start initialization to the more logically correct POS, even though that init is only needed to suppress a -Wmaybe-uninitialized warning. Note gcc 15.2 at least doesn't seem to need that suppression.
2025-11-04tests: avoid skipping of LD_PRELOAD based df testsBernhard Voelker2-26/+84
It was seen that gnulib's read_file_system_list may use fopen instead of open. Adjust the df(1) tests to replace both library functions. * tests/df/no-mtab-status.sh: Change the shared library code invoked via LD_PRELOAD to override both fopen and open. While at it, perform varargs processing only when path is not "/proc/self/mountinfo". * tests/df/skip-duplicates.sh: Likewise.
2025-11-04tests: avoid skipping by fixing build of shared librariesBernhard Voelker2-2/+4
Two df(1) tests were skipped (since commit ee367bd38dac), because the build of the shared library in those tests failed. + gcc -Wall -shared --std=gnu99 -fPIC -O2 k.c -o k.so -ldl k.c: In function 'open': k.c:37:7: error: implicit declaration of function 'streq'; did you \ mean 'strsep'? [-Wimplicit-function-declaration] 37 | if (streq (path, "/proc/self/mountinfo")) | ^~~~~ | strsep Gnulib streq is not available in the tests. * tests/df/no-mtab-status.sh: Replace "streq" by "0==strcmp" in the shared library source. * tests/df/skip-duplicates.sh: Likewise.
2025-11-03tests: date: check that write errors are promptly diagnosedCollin Funk3-2/+13
This improvement is due to changes to Gnulib's fprintftime module. * NEWS: Mention the improvement. * src/getlimits.c (OFF64_T_MAX, OFF64_T_MIN): New macros. (main): Print them. * tests/misc/write-errors.sh: Call getlimits_. Add a date invocation.
2025-11-03doc: squashfs issue to be squashed in Linux 6.18Paul Eggert2-4/+6
2025-11-03tests: truncate: ensure negative args not parsed as optionsPádraig Brady1-0/+4
* tests/truncate/truncate-parameters.sh: Add a test case.
2025-11-03date: avoid a duplicated write error diagnoticPádraig Brady1-1/+2
* src/show-date.c (show_date): Only show the fprintftime() diagnostic if a further diagnostic will not be shown.
2025-11-03date: translate/clarify recent error messagePádraig Brady1-1/+1
* src/show-date.c (show_date): Flagged by syntax-check.
2025-11-03date: promptly diagnose write errors with --filePádraig Brady2-0/+4
* src/date.c (batch_convert): Check error state of stdout after each date is processed. * tests/misc/write-errors.sh: Add a test case.
2025-11-02tests: stty: filter out ispeed and ospeed from boolean optionsCollin Funk2-2/+2
* tests/stty/stty-pairs.sh: Also ignore lines starting with ispeed and ospeed. * tests/stty/stty.sh: Likewise. Reported by Bernhard Voelker.
2025-11-01date: diagnose fprintftime failurePaul Eggert1-6/+9
* src/show-date.c (show_date): Diagnose fprintftime failure, as it need not be an output error.
2025-11-01pr: improve nstrftime failure checkPaul Eggert1-5/+8
* src/pr.c (init_header): Do not report an nstrftime EOVERFLOW error as memory exhaustion. Instead, output the time as an integer. Also, work even if nstrftime (nullptr, SIZE_MAX, ...) would return PTRDIFF_MAX which means adding 1 would overflow..
2025-11-01ls: better nstrftime failure checkPaul Eggert1-5/+2
* src/ls.c (print_long_format): Streamline the checking for failure of nstrftime.
2025-11-01build: update gnulib submodule to latestPaul Eggert1-0/+0
2025-11-01tests: date: avoid test failure on NetBSDCollin Funk1-1/+7
* tests/date/date-tz.sh: Allow date to fail with large values for TZ since NetBSD's tzalloc function limits them to 256 bytes.
2025-11-01build: reduce explicit dependencies on macOS CoreFoundationPádraig Brady2-1/+5
* src/local.mk: Revert v9.7-322-gc2e1816a5, instead relying on the more focused v9.8-79-g532cd66af. When built with --disable-nls on macOS this will result in only some commands being linked with INTL_MACOSX_LIBS, thus resulting in env(1) at least not setting a __CF_USER_TEXT_ENCODING envirnoment variable.
2025-11-01build: fix macOS build without libintlGrisha Levit2-1/+11
A more precise fix than commit v9.7-322-gc2e1816a5 * configure.ac (USE_NLS): new AM_CONDITIONAL. * src/local.mk: add @INTL_MACOSX_LIBS@ to <prog>_LDADD that need it.
2025-11-01maint: ln: eliminate a clang -Wformat-extra-args warningBruno Haible1-12/+25
* src/ln.c (do_link): Don't pass unused arguments to error(). Don't use "%.0s" to consume a string argument without printing it.
2025-11-01maint: ls: adjust to gnulib nstrftime changesBruno Haible1-5/+7
* src/ls.c (align_nstrftime): Change return type to ptrdiff_t. (print_long_format): Treat a negative return value from align_nstrftime as failure.
2025-11-01build: update gnulib submodule to latestPádraig Brady1-0/+0
* gnulib: update to latest
2025-11-01copy: be more defensive/restrictive with posix_fadvisePádraig Brady1-8/+9
* src/copy-file-data.c (copy_file_data): Only give the POSIX_FADV_SEQUENTIAL hint when we _know_ we'll definitely use a read/write loop to copy the data. Also only apply the hint to the whole file, as we've seen OpenZFS at least special case that. (sparse_copy): Update stale comment.
2025-11-01copy: don't avoid copy-offload upon SEEK_HOLE indicating non-sparsePádraig Brady3-2/+27
* src/copy-file-data.c (infer_scantype): Fall back to a plain copy if SEEK_HOLE indicates non-sparse, as zero copy avoids copy offload. This was seen with transparently compressed files on OpenZFS. * tests/cp/sparse-perf.sh: Add a test case even though it might only trigger on compressed file systems that don't support reflink. * NEWS: Mention the bug fix. Addresses https://github.com/coreutils/coreutils/issues/122
2025-11-01copy: avoid posix_fadvise bypassing copy offload behaviorPádraig Brady1-2/+5
* src/copy-file-data.c (): pass 0 to posix_fadvise to indicate to EOF. coreutils 9.8 used OFF_T_MAX instead, which triggered OpenZFS 2.2.2 at least to synchronously (decompress and) populate the page cache. Addresses https://github.com/coreutils/coreutils/issues/122
2025-10-31timeout: use fork and execvp instead of posix_spawnCollin Funk3-27/+25
* NEWS: Remove timeout from the list of programs that use posix_spawn. * bootstrap.conf (gnulib_modules): Remove posix_spawnattr_setsigmask. * src/timeout.c: Don't include spawn.h. (main): Use fork and execvp instead of posix_spawn. This reverts commit dac96ce3e3a2424919fea6a17978b6e91e575d86.
2025-10-31doc: NEWS: mention that sort --compress=script needs a shebangPádraig Brady1-2/+3
* NEWS: Mention that we don't fall-back to executing /bin/sh <script> for malformed scripts that don't start with #!..., or any executable that returns ENOEXEC in general.
2025-10-31sort: optimize the lookups of the --compress-programBruno Haible1-10/+20
* src/sort.c (get_resolved_compress_program): New function. (pipe_child): Use it instead of calling find_in_given_path each time.
2025-10-30maint: avoid syntax-check failure from previous commitCollin Funk1-2/+2
* src/sort.c (pipe_child): Use nullptr instead of NULL.
2025-10-30sort: consistently diagnose access issues to --compress-programBruno Haible2-3/+27
* bootstrap.conf (gnulib_modules): Add findprog-in. * src/sort.c: Include findprog.h. (pipe_child): Look up the compress_program in $PATH and report errors such as ENOENT or EACCES before invoking posix_spawnp. This avoids inconsistency on systems that emulate posix_spawn through fork/exec, as they would otherwise treat such a failure as a generic failure and fail the sort, rather than continuing without compression.
2025-10-29sort: fix silent exit upon SIGPIPE from --compress-programPádraig Brady3-42/+77
* src/sort.c (main): Ignore SIGPIPE so we've more control over how we handle for stdout and compression programs. (sort_die): Handle EPIPE from stdout and mimic a standard SIGPIPE, otherwise reverting to a standard exit(SORT_FAILURE); * tests/sort/sort-compress-proc.sh: Add a test case. * NEWS: Mention the bug fix.
2025-10-29build: update gnulib submodule to latestCollin Funk1-0/+0
2025-10-28tests: fix new date/resolution.sh test on macOSPádraig Brady1-3/+4
* tests/date/resolution.sh: Fix comparison on systems with less than nano second reslution, where we use sed to discard the redundant trailing zeros output by date --resolution. Reported by Bruno Haible on macOS.
2025-10-28numfmt: ensure fields don't split on nbspPádraig Brady1-1/+2
* src/numfmt.c (newline_or_blank): Explicitly ensure we don't match NBSP as on platforms like NetBSD 10 or Solaris 11, NBSP is considered a blank character. This should have been part of commit v9.8-39-g8bc11f80a Solaris 11 test failure reported by Bruno Haible.
2025-10-27maint: prefer FTS_ROOTLEVEL when checking the fts_level of an FTSENTCollin Funk3-4/+4
* src/chcon.c (process_file): Use FTS_ROOTLEVEL instead of 0. * src/chmod.c (process_file): Likewise. * src/chown-core.c (change_file_owner): Likewise.
2025-10-27timeout: use the more efficient posix_spawn to invoke the commandCollin Funk3-25/+27
* NEWS: Mention the improvement. Consolidate the posix_spawn improvements into one item. * bootstrap.conf (gnulib_modules): Add posix_spawnattr_setsigmask. * src/timeout.c: Include spawn.h. (main): Setup signals using a posix_spawnattr_t object. Use posix_spawn instead of fork and execvp.
2025-10-27maint: prefer ckd_add for overflow checksCollin Funk5-12/+6
* src/cksum.c (cksum_slice8, crc32b_sum_stream): Use ckd_add to check for overflow. * src/cksum_avx2.c (cksum_avx2): Likewise. * src/cksum_avx512.c (cksum_avx512): Likewise. * src/cksum_pclmul.c (cksum_pclmul): Likewise. * src/cksum_vmull.c (cksum_vmull): Likewise.
2025-10-27build: don't build chcon or runcon unless selinux is availablePádraig Brady3-2/+18
The build can be force enabled with --with-selinux and vice versa. * build-aux/gen-lists-of-programs.sh: Move chcon and runcon to the list of optional programs. * configure.ac: Only enable chcon and runcon if selinux.h is available. * NEWS: Mention the Build-related change. Fixes https://github.com/coreutils/coreutils/issues/121
2025-10-25sort: use the more efficient posix_spawn to invoke --compress-programCollin Funk4-98/+134
* NEWS: Mention the improvement. Mention that 'sort' will continue without compressing temporary files if the program specified by --compress-program cannot be executed. * doc/coreutils.texi (sort invocation): Document the behavior when the program specified by --compress-program cannot be executed. * src/sort.c: Include spawn.h. (MAX_FORK_TRIES_COMPRESS, MAX_FORK_TRIES_DECOMPRESS): Remove definition. (MAX_TRIES_COMPRESS, MAX_TRIES_DECOMPRESS): New definitions based on MAX_FORK_TRIES_COMPRESS and MAX_FORK_TRIES_DECOMPRESS. (async_safe_die): Remove function. (posix_spawn_file_actions_move_fd): New function. (pipe_fork): Remove function. (pipe_child): New function based on pipe_fork. Return an error number instead of a pid. Use posix_spawnp instead of calling fork and expecting the caller to exec. (maybe_create_temp): Call pipe_child instead of pipe_fork. Print a warning to standard error if --compress-program cannot be executed and the error is different than the previous call. Remove code for the child process. (open_temp): Remove code for the child process. Improve error message. * tests/sort/sort-compress.sh: Add a test case for when the program specified by --compress-program does not exist.
2025-10-23maint: remove unnecessary ignore_value usageCollin Funk1-3/+2
* src/install.c: Remove ignore-value.h include. (strip): Don't use ignore_value on posix_spawnattr_destroy since it isn't declared with the warn_unused_result attribute. Pass the checked pointer to posix_spawnattr_destroy instead of the variable it points to.
2025-10-23install: enhance error diagnostic when running strip failsBernhard Voelker1-1/+7
* src/install.c (strip): Mention explicitly that the strip program failed in the case the user specified a custom strip program name.
2025-10-23split: cleanup after posix_spawnCollin Funk2-0/+4
* boostrap.conf (gnulib_modules): Add posix_spawn_file_actions_destroy. * src/split.c (cleanup): Call posix_spawnattr_destroy and posix_spawn_file_actions_destroy after a successful posix_spawn.
2025-10-23split: prefer posix_spawn to fork and execlCollin Funk3-37/+65
* NEWS: Mention the change. * bootstrap.conf (gnulib_modules): Add posix_spawn, posix_spawnattr_setsigdefault, posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2, and posix_spawn_file_actions_init. * src/split.c: Include spawn.h. (create): Use posix_spawn instead of fork and execl.