summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* version 9.1v9.1Pádraig Brady2022-04-151-1/+1
| | | | * NEWS: Record release date.
* doc: avoid unicode errors in texi conversionPádraig Brady2022-04-151-1/+1
| | | | | | | | | | | Avoid "Unicode character U+#1 not supported, sorry" error when converting from texi to dvi or pdf. * doc/coreutils.texi (tr invocation): Avoid the @U{XXXX} texi representation, as even though info and html can represent these characters directly, there are conversion errors for pdf and dvi. Instead use the more abstract shell $'\uXXXX' representation.
* build: copy: fix build on macos 10.12Pádraig Brady2022-04-141-0/+5
| | | | | | * src/copy.c (copy_reg): Handle the case where CLONE_NOOWNERCOPY is not defined. Reported by Jeffrey Walton
* tail: detect closed stdout on SolarisPádraig Brady2022-04-133-6/+8
| | | | | | | | | * src/tail.c (check_output_alive): Use poll() on Solaris. Also handle POLLHUP, which Solaris returns in this case. * tests/tail-2/pipe-f.sh: Use `head -n2` rather than `sed 2q` as Solaris sed does not exit in this case. * NEWS: Mention the improvement. Reported by Bruno Haible.
* maint: syntax-check: fix preprocessor indentationPádraig Brady2022-04-131-1/+1
| | | | * gl/lib/targetdir.h: Keep '#' at start of line.
* cp,mv,install: omit an ‘inline’Paul Eggert2022-04-121-1/+1
| | | | | * gl/lib/targetdir.c (target_directory_operand): Omit unnecessary ‘inline’.
* cp,mv,install: improve EACCES targetdir messagesPaul Eggert2022-04-121-16/+34
| | | | | | | | | | | | | | This improves on the fix for --target-directory diagnostics bugs on Solaris 11. Problem reported by Bruno Haible and Pádraig Brady; see: https://lists.gnu.org/r/coreutils/2022-04/msg00044.html Also, omit some unnecessary stat calls. * gl/lib/targetdir.c (target_directory_operand): If !O_DIRECTORY, do not bother calling open if stat failed with errno != EOVERFLOW. Rename is_a_dir to try_to_open since that’s closer to what it means. If the open failed with EACCES and we used O_SEARCH, look at stat results to see whether errno should be ENOTDIR for better diagnostics. Treat EOVERFLOW as an “I don’t know whether it’s a directory and there’s no easy way to find out” rather than as an error.
* cp,mv,install: avoid excess stat calls on non-GNUPaul Eggert2022-04-125-16/+22
| | | | | | | | | * gl/lib/targetdir.c (target_directory_operand): New arg ST. All callers changed. * src/cp.c (do_copy): * src/mv.c (main): Avoid unnecessary stat call if target_directory_operand already got the status.
* cp,mv,install: modularize targetdirPaul Eggert2022-04-128-74/+171
| | | | | | | | | | | Move target directory code out of system.h to a new targetdir module. This doesn’t change functionality. * bootstrap.conf (gnulib_modules): Add targetdir. * src/cp.c, src/install.c, src/mv.c: Include targetdir.h. * src/system.h (must_be_working_directory, target_directory_operand) (targetdir_dirfd_valid): Move from here ... * gl/lib/targetdir.c, gl/lib/targetdir.h, gl/modules/targetdir: ... to these new files.
* cp,mv,install: avoid EACCES with non directory destinationPádraig Brady2022-04-132-12/+11
| | | | | | | | | | * src/system.h (target_directory_operand): Also check with stat() on systems with O_SEARCH, to avoid open("file", O_SEARCH|O_DIRECTORY) returning EACCES rather than ENOTDIR, which was seen on Solaris 11.4 when operating on non dirs without execute bit set. * NEWS: Remove related bug entry, as that issue was only introduced after coreutils v9.0 was released. Reported by Bruno Haible.
* sync: support syncing files on cygwinPádraig Brady2022-04-131-2/+2
| | | | | * src/sync.c (sync_arg): Similarly to AIX, Cygwin 2.9.0 was seen to need write access to have permission to sync a file.
* tests: cygwin: handle ENOENT from execvp(".")Pádraig Brady2022-04-134-8/+8
| | | | | | | | | * tests/misc/env.sh: Verify with another command that execvp() doesn not return ENOENT, before testing the exit code from the command in question. * tests/misc/nice-fail.sh: Likewise. * tests/misc/stdbuf.sh: Likewise. * tests/misc/timeout-parameters.sh: Likewise.
* tests: env-S.pl: unset cygwin hardwired env varsPádraig Brady2022-04-131-2/+6
| | | | * tests/misc/env-S.pl: Unset SYSTEMROOT and WINDIR.
* tests: md5sum: fix false failures on cygwinPádraig Brady2022-04-122-2/+2
| | | | | | | | * tests/misc/md5sum-newline.pl: Avoid binary '*' tags when comparing checksums. * tests/misc/md5sum-bsd.sh: Avoid binary '*' tags so that we correctly trigger the ambiguity test. Reported by Bruno Haible
* tests: b2sum.sh: fix false failure on cygwinPádraig Brady2022-04-111-2/+4
| | | | | * tests/misc/b2sum.sh: Avoid binary '*' tags when comparing checksums. Reported by Bruno Haible
* tests: dircolors.pl: avoid false failure with TERM=dumbPádraig Brady2022-04-111-0/+5
| | | | | | | * tests/Coreutils.pm: Ensure an unset $TERM env var, which is required on perl 5.22.2 on Solaris 11 OpenIndiana at least, where TERM was being reset to 'dumb'. Reported By Bruno Haible.
* tests: printf-mb.sh: fix false failure with french translationsPádraig Brady2022-04-111-5/+13
| | | | | | * tests/misc/printf-mb.sh: As per commit 04148c99c, adjust non C warnings before comparison, to those of LC_MESSAGES=C. Reported by Adam Sampson
* tests: stty.sh: skip on systems without perlPádraig Brady2022-04-101-0/+1
| | | | | * init.cfg (stty_reversible_init_): Add require_perl_ to ensure we skip rather than error, without perl.
* cp,mv,install: avoid opening non directory destinationPádraig Brady2022-04-093-11/+27
| | | | | | | | | | | | | | | | | commit v9.0-66-ge2daa8f79 introduced an issue, for example where cp could hang when overwriting a destination fifo, when it would try to open() the fifo on systems like Solaris 10 that didn't support the O_DIRECTORY flag. This is still racy on such systems, but only in the case where a directory is replaced by a fifo in the small window between stat() and open(). * src/system.h (target_directory_operand): On systems without O_DIRECTORY, ensure the file is a directory before attempting to open(). * tests/cp/special-f.sh: Protect cp with timeout(1), as cp was seen to hang when trying to overwrite an existing fifo. * NEWS: Mention the bug fix.
* doc: install --compare: clarify mode of operationPádraig Brady2022-04-092-4/+5
| | | | | | | | | * doc/coreutils.texi (install invocation): For the --compare option, clarify that the ownership or permissions of the source files don't matter. Also don't imply --owner or --group need to be specified for --compare to be effective. * src/install.c (usage): Add more detail on what's being compared. Fixes https://bugs.gnu.org/50889
* doc: remove older ChangeLog itemsPádraig Brady2022-04-081-1/+1
| | | | | * Makefile.am: Update the oldest documented version to 8.27 which is now about 5 years old.
* maint: remove obsolete statat gnulib moduleBernhard Voelker2022-04-081-1/+0
| | | | * bootstrap.conf (gnulib_modules): Remove statat.
* build: update gnulib submodule to latestPádraig Brady2022-04-075-16/+21
| | | | | | | | * gnulib: Update to latest * src/copy.c: Replace deprecated {l,}statat(), with fstatat(). * src/cp.c: Likewise. * src/install.c: Likewise. * src/remove.c: Likewise.
* factor: improve support on RISCV and loongsonPádraig Brady2022-04-041-2/+13
| | | | | * src/longlong.h: Pull in RISCV fix and loongarch64 support from https://gmplib.org/repo/gmp/log/tip/longlong.h
* doc: describe `dd iseek` as a feature not a changePádraig Brady2022-04-031-3/+3
| | | | | * NEWS: Move description from "Changes in behavior" to "New features".
* ls: avoid expensive capability lookup by defaultPádraig Brady2022-04-033-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Lookup of file-based capabilities adds 30% overhead to the common case of ls --color usage. Since the use of file capabilities is very rare, it doesn't make sense to pay this cost in the common case. It's better to use getcap to inspect capabilities, and the following run shows only 8 files using capabilities on my fedora 35 distro (14 years after the feature was introduced to the linux kernel). $ getcap -r / /usr/bin/arping = cap_net_raw+p /usr/bin/clockdiff = cap_net_raw+p /usr/bin/gnome-keyring-daemon = cap_ipc_lock+ep /usr/bin/gnome-shell = cap_sys_nice+ep /usr/bin/newgidmap = cap_setgid+ep /usr/bin/newuidmap = cap_setuid+ep /usr/sbin/mtr-packet = cap_net_raw+ep /usr/sbin/suexec = cap_setgid,cap_setuid+ep * src/dircolors.hin: Set "CAPABILITY" to "00", to indicate unused. * src/ls.c: Set the default C_CAP color to not colored. * NEWS: Mention the change in behavior.
* dircolors: colorize backup files with bright blackVille Skyttä2022-04-032-1/+19
| | | | | | | | * src/dircolors.hin: Add patterns for suffixes for "backup files". The color used is so they stand out less than non-backup files, and bright black works well on both light and dark backgrounds. * THANKS.in: Remove duplicate. Fixes https://bugs.gnu.org/54521
* doc: join: clarify that -e only effective for -12jo fieldsPádraig Brady2022-03-291-1/+5
| | | | | | | | * src/join.c (usage): Clarify that -e is not sufficient to enable output of missing fields from one of the inputs. Rather the -12jo options are required to explicitly enable output of those fields. Fixes https://bugs.gnu.org/54625
* maint: sync latest bootstrap from gnulibPádraig Brady2022-03-251-4/+21
| | | | * bootstrap: Should have updated this with the last gnulib update.
* tests: improve recent printf testPádraig Brady2022-03-201-0/+4
| | | | | | * tests/misc/printf-mb.sh: Given we shortcut the single char (invalid multi-byte) case, add a case to ensure we're correctly checking the return from mbrtowc().
* printf: support printing the numeric value of multi-byte charsPádraig Brady2022-03-194-0/+71
| | | | | | | | * src/printf.c (STRTOX): Update to support multi-byte chars. * tests/misc/printf-mb.sh: Add a new test. * tests/local.mk: Reference the new test. * NEWS: Mention the improvement. Fixes https://bugs.gnu.org/54388
* maint: move build-related NEWS item to its own sectionPádraig Brady2022-03-181-3/+5
| | | | * NEWS: Follow other Build-related patterns in NEWS.
* doc: test: clarify that -rwx don't just check perm bitsPádraig Brady2022-03-123-6/+13
| | | | | | | | * src/test.c (usage): State that -rwx is determined by user access, rather than permission bits. * doc/coreutils.texi (Access permission tests): Likewise. * man/test.x [SEE ALSO]: access(2). Fixes https://bugs.gnu.org/54338
* maint: address syntax-check issues in recent commitPádraig Brady2022-03-072-3/+3
| | | | | | * cfg.mk (sc_die_EXIT_FAILURE): Generalize to match any EXIT_ define, and also relax to ignore error() usage with ternary operator. * src/chroot.c (main): Use () to avoid the sc_error_quotes check.
* stat: only automount with --cached=neverPádraig Brady2022-03-073-0/+8
| | | | | | | | | | | Revert to the default behavior before the introduction of statx(). * src/stat.c (do_stat): Set AT_NO_AUTOMOUNT without --cached=never. * doc/coreutils.texi (stat invocation): Mention the automount behavior with --cached=never. * NEWS: Mention the change in behavior. Fixes https://bugs.gnu.org/54287
* ls: avoid triggering automountsRohan Sable2022-03-072-1/+4
| | | | | | | | | | | | | statx() has different defaults wrt automounting compared to stat() or lstat(), so explicitly set the AT_NO_AUTOMOUNT flag to suppress that behavior, and avoid unintended operations or potential errors. * src/ls.c (do_statx): Pass AT_NO_AUTOMOUNT to avoid this behavior. * NEWS: Mention the change in behavior. Fixes https://bugs.gnu.org/54286 Signed-off-by: Rohan Sable <rsable@redhat.com>
* build: ensure AT_NO_AUTOMOUNT is definedPádraig Brady2022-03-071-0/+0
| | | | | update gnulib submodule to latest, where this is the only change
* date: fix newly-introduced %%-N bugPaul Eggert2022-03-052-5/+13
| | | | | * src/date.c (adjust_resolution): Don’t mishandle %%-N. * tests/misc/date.pl (pct-pct): New test.
* chown: warn about USER.GROUPPaul Eggert2022-02-244-12/+22
| | | | | | Suggested by Dan Jacobson (Bug#44770). * src/chown.c, src/chroot.c (main): Issue warnings if obsolete USER.GROUP notation is present.
* build: update gnulib submodule to latestPaul Eggert2022-02-241-0/+0
|
* fmt: fix invalid multi-byte splitting on macOSPádraig Brady2022-02-244-2/+57
| | | | | | | | | | | On macOS, isspace(0x85) returns true, which results in splitting within multi-byte characters. * src/fmt.c (get_line): s/isspace/c_isspace/. * tests/fmt/non-space.sh: Add a new test. * tests/local.mk: Reference new test. * NEWS: Mention the fix. Addresses https://bugs.gnu.org/54124
* tests: improve compat with macOSPádraig Brady2022-02-241-2/+2
| | | | | | * tests/misc/wc-nbsp.sh: Only the en_US.iso8859-1 form is accepted on macOS 10.15.7 at least. GNU/Linux also accepts ISO-8859-1 (and canonicalizes the charmap to this).
* dd: counts ending in "B" now count bytesPaul Eggert2022-02-225-126/+116
| | | | | | | | | | This implements my suggestion in Bug#54112. * src/dd.c (usage): Document the change. (parse_integer, scanargs): Implement the change. Omit some now-obsolete checks for invalid flags. * tests/dd/bytes.sh: Test the new behavior, while retaining checks for the now-obsolete usage. * tests/dd/nocache_eof.sh: Avoid now-obsolete usage.
* dd: improve doc relative to POSIXPaul Eggert2022-02-221-18/+72
| | | | | * doc/coreutils.texi (dd invocation): Improve documentation, clarifying whether features are extensions to POSIX.
* dd: support iseek= and oseek=Paul Eggert2022-02-224-10/+27
| | | | | | Alias iseek=N to skip=N, oseek=N to seek=N (Bug#45648). * src/dd.c (scanargs): Parse iseek= and oseek=. * tests/dd/skip-seek.pl (sk-seek5): New test case.
* cp: avoid unnecessary buffer allocationPaul Eggert2022-02-211-9/+12
| | | | | | | Do not allocate I/O buffer if copy_file_range suffices. * src/copy.c (sparse_copy, lseek_copy): Buffer arg is now char ** instead of char *, and buffer is now allocated only if needed. All uses changed.
* build: update gnulib submodule to latestPaul Eggert2022-02-191-0/+0
|
* doc: env: fix man page reference of exec(2) to exec(3p)Pádraig Brady2022-02-151-1/+1
| | | | * man/env.x: Change exec() reference from section 2 to 3p.
* doc: use bold style for man page referencesPádraig Brady2022-02-153-2/+28
| | | | | | | | | | | | | | It's more common to use bold style than not, for references to other man pages. Ideally each man page renderer would highlight references, but currently some rely on styles in the page itself. * man/help2man: Implement a --bold-refs option that will mark up references like "name(1)" with bold style around the "name" component. * man/local.mk: Pass --bold-refs to our help2man unless disabled. * configure.ac: Add a --disable-bold-man-page-references option. Addresses https://bugs.gnu.org/53977
* dircolors: speed up processing of TERM entriesPádraig Brady2022-02-151-8/+4
| | | | | * src/dircolors.c (main): Avoid glob matching when we've already matched in a group of {COLOR,}TERM entries.