summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* maint: cleanups to NEWSHEADmasterPádraig Brady2023-05-131-4/+4
| | | | | * NEWS: Use more consistent wording, ordering, and formatting for recent entries.
* split: advise the kernel of sequential access patternPádraig Brady2023-05-082-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As split is often dealing with large files, ensure we indicate to the kernel our sequential access pattern. This was seen to operate 5% faster when reading from SSD, as tested with: dd bs=1M count=2K if=/dev/urandom of=big.in for split in split.orig split; do # Ensure big file is not cached dd of=big.in oflag=nocache conv=notrunc,fdatasync count=0 status=none # Test read efficiency CWD=$PWD; (cd /dev/shm && time $CWD/src/$split -n2 $CWD/big.in) done real 0m9.039s user 0m0.055s sys 0m3.510s real 0m8.568s user 0m0.056s sys 0m3.752s * src/split.c (main): Use fdadvise to help the kernel choose a more appropriate readahead buffer. * NEWS: Mention the improvement.
* doc: adjust build instructions for disabling year 2038 supportPádraig Brady2023-05-081-1/+1
| | | | * README-install: Adjust the instructions as per recent gnulib updates.
* build: update gnulib submodule to latestBernhard Voelker2023-05-073-4/+5
| | | | | | | | | | | | | | | | | | | | | | | This fixes failures in "very-expensive" tests on FTS with many directory entries: FAIL: tests/rm/ext3-perf FAIL: tests/rm/many-dir-entries-vs-OOM The following shows the problem in the former of the above tests: $ mkdir d && seq 400000 | env -C d xargs touch ) $ rm -rf d rm: traversal failed: d: Operation not supported Gnulib commit 3f0950f65abb (2023-04-26) introduced this regression which was fixed again with gnulib commit d4d8abb39eb0. See discussion in <https://lists.gnu.org/r/bug-gnulib/2023-05/msg00040.html> * bootstrap.conf (gnulib_modules): Change "year2038-required" to "year2038-recommended"; the module has been replaced. * gnulib: Update to latest. * tests/init.sh: Likewise.
* doc: time zone conversion examplePaul Eggert2023-05-071-0/+10
| | | | | * doc/coreutils.texi (Examples of date): Give time zone conversion example.
* doc: new subsection for date format specsPaul Eggert2023-05-071-12/+19
| | | | | | * doc/coreutils.texi (Date format specifiers): New subsection, which groups the date format specifiers without otherwise changing contents.
* pr: fix parsing of empty argumentsPádraig Brady2023-05-061-0/+6
| | | | | | | | | | | | | | | | | Before: $ pr --expand-tabs= pr: '-e' extra characters or invalid number in the argument: ‘SHELL=/bin/bash’: Value too large for defined data type After: $ pr --expand-tabs= pr: '-e': Invalid argument: ‘’ * src/pr.c (getoptarg): Ensure we don't parse beyond the end of an empty argument, thus outputting arbitrary stack info in subsequent error messages. Addresses https://bugs.debian.org/1035596
* cp: -p --parents: minor cleanup of previous patchPaul Eggert2023-05-051-25/+30
| | | | | | | This doesn’t change behavior; it just clarifies the code a bit. * src/cp.c (re_protect): New arg DST_SRC_NAME, for clarity, and so that we need to skip '/'s only once. Caller changed. Rename a couple of local variables to try to make things clearer.
* cp: -p --parents: fix failure to preserve permissions for absolute pathsPádraig Brady2023-05-033-5/+21
| | | | | | | * src/cp.c (re_protect): Ensure copy_acl() is passed an absolute path. * tests/cp/cp-parents.sh: Add a test case. * NEWS: Mention the bug. Fixes https://bugs.gnu.org/63245
* tests: provide more info on DEBUG=yesPádraig Brady2023-05-022-7/+6
| | | | | | * README: State that DEBUG=yes is particularly useful with perl tests. * tests/split/l-chunk.sh: Use the more standard $DEBUG variable rather than an internal $DEBUGGING variable.
* doc: provide more info on the default 32-bit cksum digestPádraig Brady2023-04-301-3/+7
| | | | | * doc/coreutils.texi (cksum invocation): Say that the default digest format is 32-bit and based on the Ethernet standard CRC.
* maint: remove redundant exit status handlingPádraig Brady2023-04-301-2/+1
| | | | | * src/numfmt.c: Remove redundant / confusing use of TIMEOUT_FAILURE.
* maint: simplify --enable-gcc-warnings='expensive'Paul Eggert2023-04-261-2/+1
| | | | | | * configure.ac (WERROR_CFLAGS): Omit mention of -Wno-analyzer-double-free, -Wno-analyzer-null-dereference, and -Wno-analyzer-use-after-free as manywarnings no longer uses them.
* maint: suppress GCC 13 false alarmsPaul Eggert2023-04-264-0/+22
| | | | | | * src/csplit.c, src/fmt.c, src/make-prime-list.c, src/nohup.c: Add pragmas to pacify GCC 13 when coreutils is configured with --enable-gcc-warnings='expensive'.
* chmod: pacify GCC 13Paul Eggert2023-04-261-9/+8
| | | | | | | * src/chmod.c (main): Use xpalloc instead of X2REALLOC, and make the corresponding variables signed instead of unsigned. When reallocating the buffer, this grows it by a factor of 1.5, not 2. This also pacifies gcc -Wanalyzer-null-dereference.
* csplit: pacify GCC 13Paul Eggert2023-04-261-26/+15
| | | | | | * src/csplit.c (load_buffer): Refactor for clarity. This also xpacifies gcc -Wanalyzer-use-of-uninitialized-value. When reallocating the buffer, grow it by a factor of 1.5, not 2.
* build: update gnulib submodule to latestPaul Eggert2023-04-261-0/+0
|
* tests: more cases for read input diagnosticsPádraig Brady2023-04-262-12/+21
| | | | | | * tests/misc/read-errors.sh: Exercise more modes of various utilities for better read error coverage. * tests/split/fail.sh: Remove part refactored into the above test.
* uniq: be more specific when diagnosing read errorsPádraig Brady2023-04-261-1/+1
| | | | * src/uniq.c (check_file): Use the errno when diagnosing read errors.
* build: fix build with -mno-ssse3Jaroslav Skarvada2023-04-261-0/+1
| | | | | | | | | Avoid the following error with -mno-ssse3: inlining failed in call to 'always_inline' '_mm_shuffle_epi8': target specific option mismatch * configure.ac: Ensure we use ssse3 specific code when checking whether to enable the pclmul cksum implementation.
* pr: fix infinite loop when double spacingPádraig Brady2023-04-253-1/+7
| | | | | | | | | | * src/pr.c (init_parameters): Ensure we avoid a 0 lines_per_body which was possible when adjusting for double spacing. That caused print_page() to always return true, causing an infinite loop. * tests/pr/pr-tests.pl: Add a test case. * NEWS: Mention the fix. Fixes https://bugs.debian.org/1034808
* copy: reduce verbosity of -i and -u with --verbosePádraig Brady2023-04-255-13/+21
| | | | | | | | | | | | | Since skipping of files is central to the operation of -i and -u, and with -u one may be updating few files out of many, reinstate the verbosity of this functionality as it was before 9.3. * src/copy.c (copy_internal): Only output "skipped" message with --debug. Also adjust so message never changes with --debug. * tests/cp/cp-i.sh: Adjust accordingly. * tests/mv/mv-n.sh: Likewise. * tests/cp/debug.sh: Add explicit test case for message. * NEWS: Mention the change in behavior.
* tests: ensure all utilities that read input diagnose errorsPádraig Brady2023-04-244-59/+80
| | | | | | | * tests/misc/read-errors.sh: Add a new test. * tests/misc/date-f.sh: Remove unneeded test. * tests/misc/dircolors.sh: Likewise. * tests/local.mk: Reference new test, and dereference removed ones.
* factor: diagnose errors reading the inputPádraig Brady2023-04-242-2/+7
| | | | | * src/factor.c (do_stdin): Exit with failure upon read errors. * NEWS: Mention the bug fix.
* numfmt: diagnose errors reading the inputPádraig Brady2023-04-242-2/+2
| | | | | * src/numfmt.c (main): Exit with failure upon read errors. * NEWS: Mention the bug fix.
* tsort: diagnose errors reading the inputPádraig Brady2023-04-242-1/+8
| | | | | * src/tsort.c (tsort): Check for errors after readtoken(). * NEWS: Mention the bug fix.
* cksum: fix failure to diagnose read errors with crc32Pádraig Brady2023-04-243-14/+5
| | | | | | | | The default crc32 mode fails to diagnose read errors. * src/cksum.c (cksum_slice8): Fix the check for read errors. (cksum_pclmul): Likewise. * NEWS: Mention the bug fix.
* tests: avoid failure when cp fails for proc filesAndreas Schwab2023-04-241-1/+7
| | | | | | | When run under QEmu emulation emulated /proc files have unstable inode numbers. * tests/cp/proc-short-read.sh: Skip if unstable inode numbers detected.
* install: support stripping files with a leading hyphenPádraig Brady2023-04-213-3/+22
| | | | | | | * src/install.c (strip): Prepend "./" to file names with a leading "-". * tests/install/strip-program.sh: Add a test case. * NEWS: Mention the bug fix. Reported in https://bugs.debian.org/1034429
* maint: post-release administriviaPádraig Brady2023-04-183-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 9.3v9.3Pádraig Brady2023-04-181-1/+1
| | | | * NEWS: Record release date.
* tests: avoid allocation checks on ZFSPádraig Brady2023-04-161-1/+3
| | | | | * tests/du/basic.sh: Allocation of files was seen to change asynchronously on ZFS, so avoid allocation comparisons there.
* tests: tty-eof: fix various issuesPádraig Brady2023-04-141-4/+8
| | | | | | | * tests/misc/tty-eof.pl: Ensure we don't erroneously skip commands with parameters. Comment as to why cut(1) is treated differently. Adjust expect calls to not wait needlessly for cut output.
* tests: avoid dependence on file layout for cp sparse checkPádraig Brady2023-04-131-14/+4
| | | | | | * tests/cp/sparse-2.sh: Don't depend on the copy taking <= allocation of the source. Instead leverage --debug to check that zero detection is being enabled.
* copy: --debug: indicate if NUL detection is used with SEEK_HOLEPádraig Brady2023-04-131-0/+4
| | | | | * src/copy.c (sparse_copy): With --sparse=always we also detect NULs in extents we're copying, so indicate this with --debug.
* doc: update re 32-bit buildsPaul Eggert2023-04-101-7/+7
| | | | | * README-install: Mention how to build on 32-bit-only hosts. This builds on a previous patch by Pádraig Brady.
* build: fix _Noreturn compilation failurePádraig Brady2023-04-103-3/+5
| | | | | | | | | Fix a build failure seen on gcc 3.4 on Solaris 10 at least. * src/crctab.c: Ensure we include config.h for all compilation units. This is now required for new _Noreturn usage in gnulib for stdint.h. * src/cksum.c: Update generation code to ensure config.h included. * cfg.mk: Remove crctab.c exclusion from the config.h check.
* tests: avoid non portable brace expansionPádraig Brady2023-04-101-2/+2
| | | | | * tests/cp/backup-dir.sh: Avoid non portable brace expansion which is not supported by FreeBSD or Solaris shells at least.
* maint: require support for post-2038 timestampsPaul Eggert2023-04-092-1/+6
| | | | | * bootstrap.conf (gnulib_modules): Replace year2038 with year2038-required.
* build: update gnulib submodule to latestPaul Eggert2023-04-091-0/+0
|
* wc: ensure we update file offsetPádraig Brady2023-04-083-1/+20
| | | | | | | | * src/wc.c (wc): Update the offset when not reading, and do read if we can't update the offset. * tests/misc/wc-proc.sh: Add a test case. * NEWS: Mention the bug fix. Fixes https://bugs.gnu.org/61300
* cp,mv: issue "skipped" messages when skipping filesPádraig Brady2023-04-084-12/+53
| | | | | | | | | * NEWS: Mention the change in behavior to issue a "not replaced" error diagnostic with -n, and the "skipped" message with -v. * src/copy.c (copy_internal): Adjust to output the "skipped" messages depending on -i, -n, -u. * tests/cp/cp-i.sh: Adjust accordingly. * tests/mv/mv-n.sh: Likewise.
* cp,mv: add --update=none to always skip existing filesPádraig Brady2023-04-088-36/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | Add --update=none which is equivalent to the --no-clobber behavior from before coreutils 9.2. I.e. existing files are unconditionally skipped, and them not being replaced does not affect the exit status. * src/copy.h [enum Update_type]: A new type to support parameters to the --update command line option. [enum Interactive]: Add I_ALWAYS_SKIP. * src/copy.c: Treat I_ALWAYS_SKIP like I_ALWAYS_NO (-n), except that we don't fail when skipping. * src/system.h (emit_update_parameters_note): A new function to output the description of the new --update parameters. * src/cp.c (main): Parse --update arguments, ensuring that -n takes precedence if specified. (usage): Describe the new option. Also allude that -u is related in the -n description. * src/mv.c: Accept the new --update parameters and update usage() accordingly. * doc/coreutils.texi (cp invocation): Describe the new --update parameters. Also reference --update from the --no-clobber description. (mv invocation): Likewise. * tests/mv/update.sh: Test the new parameters. * NEWS: Mention the new feature. Addresses https://bugs.gnu.org/62572
* cp: fix --backup with subdirectoriesPádraig Brady2023-04-043-2/+13
| | | | | | | | | * gnulib: Reference the latest gnulib including the fix to the backupfile module in commit 94496522. * tests/cp/backup-dir.sh: Add a test to ensure we rename appropriately when backing up through subdirs. * NEWS: Mention the bug fix. Fixes https://bugs.gnu.org/62607
* tests: tee: avoid false failure due to fifo usagePádraig Brady2023-03-311-1/+1
| | | | | | | | * tests/misc/tee.sh: Call cleanup_ in all cases to ensure there are no overlapping interactions on the fifo that might impact later parts of the test. This was seen to cause issue with dash on musl libc. Addresses https://bugs.gnu.org/62542
* tests: adjust csplit VM limitPádraig Brady2023-03-311-1/+1
| | | | | | | | * tests/misc/csplit-heap.sh: More memory is required to avoid a false failure on some systems. Noticed with musl libc with bash as the shell. This is confirmed to still easily trigger with the original memory leak being tested. Addresses https://bugs.gnu.org/62542
* wc: diagnose overflow of total countsPádraig Brady2023-03-313-7/+64
| | | | | | | | | * src/wc.c (wc): Use INT_ADD_WRAPV() to detect overflow. (main): Upon overflow, saturate the total, print a diagnostic, and set exit status. * tests/misc/wc-total.sh: Add a test case, which operates on BTRFS and 64 bit systems at least. Reported at https://bugs.debian.org/1027100
* dircolors: diagnose read errorsPádraig Brady2023-03-284-2/+36
| | | | | | | * NEWS: Mention the fix. * src/dircolors.c: Fail upon read error from getline(). * tests/misc/dircolors.sh: Add a new test. * tests/local.mk: Reference the new test.
* tests: add a test case for the previous date fixPádraig Brady2023-03-283-0/+34
| | | | | | * NEWS: Also mention this bug fix. * tests/misc/date-f.sh: Add a new test. * tests/local.mk: Reference the new test.
* date: diagnose -f read errorsPaul Eggert2023-03-281-1/+3
| | | | * src/date.c (batch_convert): Diagnose read errors, fixing Bug#62497.