OpenBSD and Alpine Linux /bin/sh cannot handle a file descriptor limit
of 7.
* tests/ls/recursive.sh: Create 30 directories and use a file descriptor
limit of 20. Don't check the output since we have coverage for that
elsewhere.
Reported by Bruno Haible.
Map md5sum and sha{1,224,256,385,512} to use cksum logic,
which selects appropriate behavior at runtime, rather than
separate binaries for each closely related utility.
$ size src/coreutils # before
text data bss dec hex filename
1349509 6812 619312 1975633 1e2551 src/coreutils
$ size src/coreutils # after
text data bss dec hex filename
1306933 6748 619152 1932833 1d7e21 src/coreutils
* build-aux/gen-single-binary.sh: Map sha*sum to use cksum.c
* src/cksum.c: Adjust to behave more like sha*sum,
when the algorithm to something other than "crc".
* src/cksum.h: Expose the cksum_algorithm global and enum.
* src/coreutils-md5sum.c: Set cksum_algorithm and call cksum logic.
* src/coreutils-sha1sum.c: Likewise.
* src/coreutils-sha224sum.c Likewise.
* src/coreutils-sha256sum.c Likewise.
* src/coreutils-sha384sum.c Likewise.
* src/coreutils-sha512sum.c Likewise.
* NEWS: Mention the improvement.
* doc/coreutils.texi (quotingStyles): Expand on the advantages
of "shell-escape" quoting, and mention it's the default when
outputting to a tty. Also mention how it's also useful with
LC_ALL=C to further disambiguate output. Also reference the
separate page detailing various considerations and options
for file name quoting. Also move the mention of the default
quoting style to the top of the page where it's more obvious.
* src/install.c (change_timestamps): Initialize variables where they are
declared.
(need_copy, setdefaultfilecon, get_ids, mkancesdirs_safe_wd, main):
Declare variables where they are used instead of at the start of the
block.
* src/cp.c (re_protect): Initialize variables where they are declared.
(make_dir_parents_private, do_copy, main): Declare variables where they
are used instead of at the start of the block.
Previously the html-local make rule only worked for `make html`.
Instead add support for `make doc/coreutils.html` or `make web-manual`
through the use of a makeinfo wrapper.
* doc/local.mk: Move post processing from here to ...
* build-aux/makeinfo-wrapper.sh: ... here.
* cfg.mk: Ensure our wrapper is called with MAKEINFO.
Also pass --no-node-files so redirection html files
are not created for each anchor.
* doc/local.mk (html-local): Add html files to prerequisites so they are
generated before 'sed' is invoked. Also interate over the already
populated $(HTMLS) to be more general (to multiple html files),
and more portable (to non GNU make).
* doc/coreutils.texi: Explicitly supply empty arguments to macros,
as dvi (a required prerequisite to pdf) is more strict in its
handling of macro arguments.
* cfg.mk (sc_texi_ensure_empty_option_args): Add a syntax check,
since this is not verified in the default build.
Reported by Collin Funk.
* src/env.c (extract_varname, parse_signal_action_params)
(parse_block_signal_params, set_signal_proc_mask)
(list_signal_handling, main): Declare variables where they are used
instead of at the start of the function.
* src/pwd.c (find_dir_entry, robust_getcwd): Declare variables where
they are used.
(logical_getcwd, main): Likewise. Constify the result of getenv, since
the result cannot be modified.
The gethrxtime function uses a monotonic clock if available on the
system. The effect should be unnoticeable since we print --verbose
information every 5 seconds, but is more correct and we already do the
same in 'dd'.
* src/local.mk (src_shred_LDADD): Add $(GETHRXTIME_LIB).
* src/shred.c (dopass): Use xtime_t instead of time_t. Use gethrxtime
instead of time.
* tests/tac/tac-continue.sh: This test was very awkard to setup,
and thus always skipped. Instead move to a root only test
that creates an almost full partition itself.
* tests/local.mk: Move test to root only.
Suggested at https://github.com/uutils/coreutils/pull/9590
In some cases 'pinky' could run forever until interrupted:
$ ln -s /dev/zero ~/.plan
$ ln -s /dev/zero ~/.project
$ timeout -v 5 pinky -l collin > /dev/full
timeout: sending signal TERM to command ‘pinky’
After this change it will exit upon failing to write to standard output:
$ timeout -v 5 ./src/pinky -l collin > /dev/full
pinky: write error: No space left on device
* src/pinky.c: Include fadvise.h, filenamecat.h, full-write.h, and
ioblksize.h.
(cat_file): New function.
(print_entry): Check if standard output has it's error flag set after
printing a user entry.
(print_long_entry): Likewise. Use the new cat_file function.
* NEWS: Mention the improvement.
* doc/coreutils.texi (optAnchor): A new macro to output a
referencable anchor, called from ...
(optItem): ... here; a new macro to output all index entries
for each option item.
(optZero,optZeroTerminated): Show an example of the adjustment
done to each option description.
* doc/local.mk (html-local): Post-process the texinfo generated HTML
(`make html`) to remove our "-option" tag, and replace all
escaped _002d with a standard hyphen, which is fine in URLs.
POSIX.1-2024 added sig2str but leaves the behavior when called with
signal 0 unspecified. FreeBSD 15.0 does not return the signal name EXIT
like Gnulib's version causing a test failure. This fixes that and
changes the behavior to print 0 instead of EXIT, to avoid confusion when
the program does not exit.
* NEWS: Mention the change.
* src/timeout.c (cleanup): Use snprintf instead of sig2str if the signal
is 0.
* tests/timeout/timeout.sh: Updated the expected output.
* src/timeout.c (cleanup): Reset the default exit status
to EXIT_TIMEDOUT, if we have in fact received an ALARM.
Otherwise we would exit with status EXIT_CANCELED if
there was an issue writing --verbose output for example.
This also ensures a consistent exit status with ASAN enabled,
as with ASAN stderr is not explicitly closed by gnulib's
close_stdout handler.
* tests/mv/mv-special-2.sh: Add test to ensure we preserve
sparse files, character devices, symlinks, when moving across
file system boundaries.
Addresses https://github.com/coreutils/coreutils/issues/136
* tests/rm/fail-eperm.xpl: Remove this usually skipped non-root test.
* tests/rm/fail-2eperm.sh: Add the test to this root test instead.
* tests/local.mk: Remove the reference to *.xpl.