2025-09-22  Pádraig Brady  <P@draigBrady.com>

	version 9.8
	* NEWS: Record release date.

	build: update gnulib to latest
	* gnulib: Update to latest to pull Android build fixes,
	and fchownat fixes.

	tests: ls: avoid alignment check with non printable characters
	* tests/ls/block-size.sh: Skip the case where there are
	non-printable characters in ls' output, which is the case
	with NBSP thousands separators on FreeBSD 11 and 12.
	We may drop the MBSW_REJECT_UNPRINTABLE in future from
	ls and numfmt, but for now avoid these characters in the test.
	Reported by Bruno Haible.

	tests: du: avoid false failure in racy test
	* tests/du/move-dir-while-traversing.sh: Expand the work to avoid
	a false failure where du completes before the directory is moved.
	Also expand the timeout to our more standard 10s to avoid the
	"directory mover" being killed before du processes the directory.
	This doesn't perceptibly impact the run time of the test.
	Reported by Bruno Haible on a CentOS 7 system.

	build: revert gnulib update
	There is a pending issue with fchownat:
	https://lists.gnu.org/r/bug-gnulib/2025-09/msg00282.html

2025-09-21  Collin Funk  <collin.funk1@gmail.com>

	build: update gnulib submodule to latest

	build: fix missing declarations on Android
	* configure.ac: Check for statx using gl_CHECK_FUNCS_ANDROID since it is
	hidden for Android API level <= 30.
	* m4/jm-macros.m4 (coreutils_MACROS): Check for syncfs using
	gl_CHECK_FUNCS_ANDROID since it is hidden for Android API level <= 28.

2025-09-21  Paul Eggert  <eggert@cs.ucla.edu>

	maint: comment spelling fixes

	tests: fix OMP_NUM_THREADS misspelling
	* tests/nproc/nproc-quota.sh: Fix misspelling.

	maint: update bootstrap from Gnulib

2025-09-21  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure on older Linux kernels
	* tests/fold/fold-zero-width.sh: Check the shell was able to create
	the redirection file, as intermittently on CentOS 5,6,7 this wasn't
	the case, with the shell giving an xmalloc failure due to the ulimit.
	Reported by William Bader and Bruno Haible.

	tests: tail: avoid false failure with overlayfs
	* tests/tail/inotify-dir-recreate.sh: Add an extra check
	that inotify is in use, as it's required for this test.
	Inotify is avoided with overlayfs for which the
	df --local check is not sufficient exclusion for.

2025-09-20  Pádraig Brady  <P@draigBrady.com>

	tests: fold: avoid false failures on Solaris 10
	* tests/fold/fold-characters.sh: Ensure we have independent verification
	of the width of characters before testing based on those widths.
	* tests/fold/fold-zero-width.sh: Likewise.
	* tests/fold/fold.pl: Only compare the exit status,
	as the error message can be translated.

	tests: dd: avoid false failure on Solaris 10
	* tests/dd/no-allocate.sh: Give some extra space to the
	determined vm limit.

	tests: avoid false failure on CentOS 5,6,7
	* tests/fold/fold-zero-width.sh: Increase vm limit to avoid
	failures on CentOS 5,6,7.  Match the limit used in write-errors.sh
	as per commit v9.5-255-g0bd149403

2025-09-20  Collin Funk  <collin.funk1@gmail.com>

	doc: don't capitalize the first letter of cgroup
	This is the correct way to write it as described in the documentation:
	<https://docs.kernel.org/admin-guide/cgroup-v2.html#terminology>.

	* doc/coreutils.texi (nproc invocation): Use cgroup instead of Cgroup.

2025-09-20  Collin Funk  <collin.funk1@gmail.com>

	tests: env: skip a few tests if LD_LIBRARY_PATH is set
	* tests/env/env-null.sh: Skip test if LD_LIBRARY_PATH or platform's
	equivalent is set, since 'env -i' will unset it which may prevent
	programs from running.
	* tests/env/env-S.pl: Likewise.
	Issue and suggested fix reported by Bruno Haible.

2025-09-19  Grisha Levit  <grishalevit@gmail.com>

	touch: fix diagnostic on macOS 26
	* src/touch.c (touch): Do not use open_errno == EEXIST for diagnostic
	if file was a directory as macOS 26 sets it for open("/", O_CREAT, ...).

2025-09-19  Paul Eggert  <eggert@cs.ucla.edu>

	copy: pacify older clang
	* src/copy-file-data.c (copy_file_data):
	Redo conditionals for clarity.
	This pacifies the clang in FreeBSD 11 and OpenBSD 7.6.
	Problem reported by Bruno Haible in:
	https://lists.gnu.org/r/coreutils/2025-09/msg00104.html

2025-09-19  Collin Funk  <collin.funk1@gmail.com>

	dd: don't mistakenly use O_EXCL on GNU/Hurd
	* src/dd.c (v): Add the O_EXCL flag to the set of bits that we do not
	want to use for our definitions.
	* cfg.mk (sc_dd_O_FLAGS): Adjust to pass syntax-check.
	* NEWS: Mention the fix.
	Reported by Bruno Haible.

2025-09-19  Paul Eggert  <eggert@cs.ucla.edu>

	maint: we don’t use Gnulib’s fchownat module
	* bootstrap.conf (gnulib_modules): Remove fchownat.
	It is used only indirectly, via the chownat module.

2025-09-18  Bruno Haible  <bruno@clisp.org>

	fmt: eliminate a clang -Wformat-extra-args warning
	* src/fmt.c (fmt): When not reading from stdin, always mention the
	file name in the error message.

2025-09-18  Paul Eggert  <eggert@cs.ucla.edu>

	maint: we use Gnulib’s stddef-h module directly
	* bootstrap.conf (gnulib_modules): Add stddef-h, since the code
	uses ‘unreachable’ which is supplied by that module.

2025-09-18  Pádraig Brady  <P@draigBrady.com>

	tests: tail/overlay-headers.sh: protect against hang
	* tests/tail/overlay-headers.sh: Protect tail invocation with timeout,
	and extend the possible running period to 60 seconds like other tests.
	Reported by Brudno Haible on T2SDE Linux/alpha

	build: fix compile error on macOS
	* gnulib: Update to latest to pull fix
	for localcharset compile failure on macOS.

	tests: tests/tail/wait.sh: protect against hang
	* tests/tail/wait.sh: This test was seen to hang occasionally
	on an Alpine Linux 3.20 system, so protect the tail(1) call
	with `timeout 60` as done in similar tests.
	Reported by Bruno Haible.

	build: fix link failure on macOS
	* src/local.mk: Explicitly depend on @INTL_MACOS_LIBS@
	which may be not implicitly referenced (in LIBINTL) without gettext.
	This is a new transitive dependency through localename-unsafe.
	We add this globally to ease future maintenance as currently
	6 commands require the localename-unsafe dependency:
	date, du through show-date() (fprintftime), and
	ls, pr, stat, uptime through strftime().

2025-09-17  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib for stringeq adjustment
	* gnulib: Pull in stringeq adjustment.

	tests: write-errors.sh: avoid portability issue with dash
	* tests/misc/write-errors.sh: Use printf rather than echo
	since the echo builtin in dash will interpret backslashes.
	* tests/misc/read-errors.sh: Likewise for consistency.

	cksum,wc: inspect GLIBC_TUNABLES on all architectures
	* gnulib: Update gnulib to latest to pull in change
	to inspect GLIBC_TUNABLES on non x86_64 or aarch64 platforms.
	This was needed on 32 bit x86, which supports calling into
	accelerated code, and so requires inspection of GLIBC_TUNABLES
	to pass the disablement verification in tests/cksum/cksum.sh

2025-09-17  Paul Eggert  <eggert@cs.ucla.edu>

	maint: prefer memeq to memcmp
	* gl/modules/randread-tests (Depends-on): Add stringeq.
	* gl/tests/test-rand-isaac.c (main):
	* src/copy.c (source_is_dst_backup):
	* src/digest.c (b64_equal):
	* src/install.c (have_same_content):
	* src/ls.c (main, parse_ls_color):
	* src/nl.c (check_section):
	* src/od.c (write_block):
	* src/seq.c (seq_fast):
	* src/stty.c (eq_mode):
	* src/system.h (is_nul):
	Prefer memeq to memcmp when either will do.

	maint: STREQ → streq
	Use new Gnulib streq function instead of rolling our own macro.
	* bootstrap.conf (gnulib_modules): Add stringeq.
	* src/rm.c (main): Don’t assume streq is a macro that expands to (...),
	as it is now a function.
	* src/system.h:
	* tests/df/no-mtab-status.sh, tests/df/skip-duplicates.sh:
	(STREQ): Remove.  All uses replaced by streq.

	build: update gnulib submodule to latest

2025-09-17  Pádraig Brady  <P@draigBrady.com>

	tests: fix issues with fold-characters.sh test
	This was noticed with:

	  trap '' PIPE &&  # Ignore SIGPIPE
	  make check TESTS=tests/fold/fold-characters.sh SUBDIRS=.

	* tests/fold/fold-characters.sh: Move memory limit test to ...
	* tests/misc/write-errors.sh: ... which avoids "write error"
	messages on stderr due to the ignored SIGPIPE.  It also protects
	the fold invocation with a timeout(1) so that fold implementations
	that don't exit promptly upon write error don't hang the test suite
	(Like we would have done before commit v9.7-311-gc95c7ee76).

2025-09-17  Pádraig Brady  <P@draigBrady.com>

	doc: remove older ChangeLog items
	* Makefile.am: Update the oldest documented version
	to 8.32 which is now about 5 years old.

2025-09-17  Collin Funk  <collin.funk1@gmail.com>

	maint: remove unnecessary uintmaxtostr usage in printf
	* src/comm.c (compare_files): Use the "%ju" printf directive instead of
	"%s" and printing the result of umaxtostr.
	* src/df.c (get_header): Likewise.
	* src/ls.c (print_long_format): Likewise.
	* src/sort.c (check): Likewise.

2025-09-17  Pádraig Brady  <P@draigBrady.com>

	doc: add hardware acceleration configuration docs
	* NEWS: Mention the new GLIBC_TUNABLES feature.
	* doc/coreutils.texi (Hardware Acceleration): A new node
	detailing the build time and run time configuration options.

2025-09-16  Pádraig Brady  <P@draigBrady.com>

	fold: fix write error checks with invalid multi-byte input
	* src/fold.c (write_out): A new helper to check all writes.
	(fold-file): Use write_out() for all writes.
	* tests/fold/fold-zero-width.sh: Adjust to writing more
	data in various patterns, rather than two buffers of NULs.
	This is a more robust memory bound check, and the '\303' case
	tests this particular logic change.
	* NEWS: fold now exits immediately, not just promptly.

	fold: exit promptly upon write errors
	* NEWS: Mention the improvement.
	* src/fold.c (fold_file): Check for write errors
	after each buffer read from stdin.
	* tests/misc/write-errors.sh: Add test cases.

	maint: basenc: refactor overloaded use of ctx->i member
	* src/basenc.c (base_decode_context): Remove the shared "i" member,
	instead using per encoding data and access functions
	for tracking pending data.

	tests: fold/fold-zero-width.sh: avoid false failure with ENOSPC
	* tests/fold/fold-zero-width.sh: Check relatively large test file
	is created appropriately.  Also apply more idomatic wc -l usage.

	doc: NEWS: fold: clarify mem exhaustion trigger
	* NEWS: Long lines were not an issue in previously
	released coreutils, only the -w limitation was.

	maint: avoid syntax-check failures from recent commits
	* cfg.mk: Avoid spellcheck failures.
	* src/copy-file-data.c: Avoid sc_tight_scope and long_lines failure.
	* src/copy.h: Avoid indentation issues.

2025-09-16  Paul Eggert  <eggert@cs.ucla.edu>

	cp: create_hole now returns off_t
	* src/copy-file-data.c (create_hole): Refactor by returning
	resulting offset, not bool.  All callers changed.

	cp: prefer signed types in copy-file-data.c
	* src/copy-file-data.c (sparse_copy, lseek_copy)
	(copy_file_data): Prefer idx_t to size_t.
	(copy_file_data): Defend against st_size < 0, which can happen on
	ancient buggy platforms.  Check for overflow; the old code was
	wrong on theoretical-but-valid hosts where SIZE_MAX <= INT_MAX.

	cp: don’t allocate a separate zero buffer
	* src/copy-file-data.c (write_zeros): New args abuf, buf_size.
	Use the lazily-allocated buffer, which most likely already exists,
	rather than allocating a separate buffer just for zeros.
	This makes the code more reentrant as there is no longer
	a need for static storage here.  Although there is some CPU
	overhead due to the need to zero out the buffer for each file,
	the overhead is relatively small as the buffer is smallish
	and should be cached.  All callers changed.

	cp: refactor copying to return bytes copied
	This doesn’t change behavior; it simplifies future changes.
	* src/copy-file-data.c (sparse_copy, lseek_copy, copy_file_data):
	Return the number of bytes copied, or -1 on failure,
	instead of merely returning a success indication.
	All callers changed.

	cp: copy_file_data now supports ibytes
	This does not affect current coreutils behavior;
	it is merely to help make copy_file_data more useful in the future.
	* src/copy-file-data.c (lseek_copy): New arg ibytes.
	Caller changed.
	(copy_file_data): Implement the ibytes arg; formerly
	it was always treated as COUNT_MAX, though all callers
	currently pass COUNT_MAX so there was no problem in practice.

	cp: prefer signed type for file byte count
	* src/copy-file-data.c (sparse_copy): max_n_read arg is now
	of type count_t, not uintmax_t.  This is better for debugging
	with -fsanitize=undefined.

	cp: port better to old limited hosts
	Port better ancient platforms where OFF_T_MAX is only 2**31 - 1,
	but some devices have more than that many bytes.
	* src/copy-file-data.c (copy_file_data): Byte count is now
	count_t, not off_t.  All callers changed.  Since we need to check
	for overflow anyway, also check for too-small calls to fadvise.

	cp: refactor out data copying
	* po/POTFILES.in, src/local.mk (copy_sources): Add the new file.
	* src/copy.c: Move the #includes of alignalloc.h, buffer-lcm.h,
	fadvise.h, full-write.h, ioblksize.h to copy-file-data.c.
	(enum copy_debug_val, struct copy_debug): Move these decls to copy.h.
	(punch_hole, create_hole, is_CLONENOTSUP, sparse_copy)
	(write_zeros, lseek_copy, HAVE_STRUCT_STAT_ST_BLOCKS)
	(enum scantype, struct scan_inference, infer_scantype):
	Move to copy-file-data.c.
	(copy_reg): Move the data-copying part of this function
	to the new function copy_file_data in copy-file-data.c.
	* src/copy-file-data.c: New file, taken from part of copy.c.

	cp: refactor src/copy.c
	This is in preparation for splitting this large module.
	* src/copy.c (sparse_copy, lseek_copy): New arg DEBUG, used to
	identify copy debug info instead of using a static var.  All
	callers changed.
	(lseek_copy, infer_scantype): New args SRC_POS and POS.
	Callers changed.
	(copy_file_data): New function, with contents taken from copy.
	(copy_reg): Call it.

2025-09-16  Collin Funk  <collin.funk1@gmail.com>

	doc: NEWS: correct the previous commit
	* NEWS: The memory allocated by 'fold' in the past was also bounded by
	--width.

	doc: NEWS: mention fold can operate on very long lines
	* NEWS: Before commit fb9016d50 (fold: use fread instead of getline,
	2025-08-24), fold required that the maximum line size in a file fit into
	memory. Document that this is no longer the case.

	fold: fix out of bounds write with zero width characters
	* src/fold.c (fold_file): Prefer putchar ('\n') to copying characters.
	If we do not have room in the output buffer print it since it is not a
	full line of text.
	* tests/fold/fold-zero-width.sh: New test case.
	* tests/local.mk (all_tests): Add it.

2025-09-16  Paul Eggert  <eggert@cs.ucla.edu>

	cp: improve umask caching
	* src/copy.c (cached_umask): Avoid syscalls when cached umask is 0.
	This can also help the compiler’s static analysis.

2025-09-14  Collin Funk  <collin.funk1@gmail.com>

	basenc: fix an uninitialized index when decoding an empty file
	* src/basenc.c (base64_decode_ctx_init_wrapper)
	(base64url_decode_ctx_init_wrapper)
	(base32_decode_ctx_init_wrapper)
	(base32hex_decode_ctx_init_wrapper): Initialize ctx->i to zero.
	Fixes https://bugs.gnu.org/79444

2025-09-14  Pádraig Brady  <P@draigBrady.com>

	maint: randperm: remove stale dependency
	* gl/modules/randperm: Remove assert-h dependency
	not required since commit v9.5-34-g26ba82015

2025-09-14  Pádraig Brady  <P@draigBrady.com>

	cksum,wc: support disabling hardware acceleration at runtime
	This is useful to give better test coverage at least,
	and may be useful for users to tune their environment.

	* bootstrap.conf: Reference the cpu-supports gnulib module.
	* src/cksum.c: Use cpu_supports() rather than __builtin_cpu_supports().
	* src/wc.c: Likewise.
	* tests/cksum/cksum.sh: Adjust to testing all implementations.
	* tests/wc/wc-cpu.sh: A new test to do likewise.
	* tests/local.mk: Reference the new wc test.

2025-09-14  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	Primarily to get the new cpu-supports module.

2025-09-13  Paul Eggert  <eggert@cs.ucla.edu>

	factor: port to strict C
	Problem found with Oracle Developer Studio 12.6.
	* src/factor.c (factor): Don’t return f() when f returns void.

2025-09-12  Collin Funk  <collin.funk1@gmail.com>

	maint: document some functions used by expand and unexpand
	* src/expand-common.h (get_next_tab_column, cleanup_file_list_stdin)
	(emit_tab_list_info): Document functions.
	* src/expand-common.c (cleanup_file_list_stdin, emit_tab_list_info):
	Likewise.

2025-09-10  Pádraig Brady  <P@draigBrady.com>

	maint: basenc: refactor all encodings to use finalize
	Finalize was required for base58, but it's a more general mechanism
	which simplifies the logic for all encodings

	* src/basenc.c (do_decode): Always call base_decode_ctx_finalize(),
	rather than the awkward double loop at end of buffer.
	* tests/basenc/basenc.pl: Add basenc finalization tests.

2025-09-10  Collin Funk  <collin.funk1@gmail.com>

	maint: cleanup libraries unnecessarily added to fold
	* src/local.mk (src_fold_LDADD): Remove $(MBRTOWC_LIB) since it is
	already added to LDADD. Remove $(LIBC32CONV) and $(LIBUNISTRING) which
	were for an uncommitted patch which used Gnulib's mbfile module.

2025-09-09  Pádraig Brady  <P@draigBrady.com>

	nohup: avoid FORTIFY runtime failure on Bionic libc
	The meaning of non-file permission umask bits is implementation defined.
	On Bionic libc, attempting to set them triggers a FORTIFY runtime check.

	  $ nohup true
	  FORTIFY: umask: called with invalid mask -601
	  Aborted                    nohup true

	* src/nohup.c: (main) Avoid setting non-permission bits in umask.
	Just clear the umask to ensure we create nohup.out with u+rw,
	as we restore the original umask before the exec().
	* tests/misc/nohup.sh: Add a test case.
	* NEWS: Mention the bug fix.

2025-09-08  Pádraig Brady  <P@draigBrady.com>

	basenc: ensure partial padding with newlines induces an error
	* src/basenc.c (has_padding): A more robust helper to
	identify padding in the presence of trailing newlines.
	(do_decode): Use has_padding() rather than just looking
	at the last character.
	* tests/basenc/base64.pl: Fully test commit v9.4-53-g378dc38f4
	by ensuring partially padded data is diagnosed.
	baddecode9 is the case fixed in this commit.
	* NEWS: Mention the bug fix.

2025-09-07  Pádraig Brady  <P@draigBrady.com>

	tests: ensure option aliases are supported
	This implicitly tests the previous commit to
	adjust how date(1) handles multiple named format options.
	Currrently it tests the following are supported:

	  chown  --quiet  --silent
	  date  --rfc-email  --rfc-822  --rfc-2822
	  date  --uct  --utc  --universal
	  dircolors  --bourne-shell  --sh
	  dircolors  --csh  --c-shell
	  head  --quiet  --silent

	* tests/misc/option-aliases.sh: A new test to ensure all
	option aliases supported by a command are supported.
	* Reference the new test.

2025-09-07  Pádraig Brady  <P@draigBrady.com>

	date: support overriding named formats
	* src/date.c (main): Allow specifying different named formats,
	with the last specified taking precedence.
	* NEWS: Mention the bug fix.

2025-09-07  Collin Funk  <collin.funk1@gmail.com>

	cksum: don't leak memory using -a sha3 with OpenSSL
	* gnulib: Update to the latest commit for latest changes to the
	crypto/sha3-buffer and crypto/sha3 modules.

2025-09-05  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer c32isspace to iswspace
	* src/wc.c (wc): Replace call to iswspace with c32isspace.

	tests: fold: check if multi-byte spaces are treated as blank
	This avoids a test failure on FreeBSD 14, MacOS 15, and musl.
	Fix suggested by Pádraig Brady in:
	<https://bugs.gnu.org/79301#32>.
	* tests/fold/fold-spaces.sh (isblank): New function. Only run the tests
	if the character is treated as blank.
	Fixes https://bugs.gnu.org/79301

2025-09-04  Pádraig Brady  <P@draigBrady.com>

	doc: update the md5/sha1 "weak hash" advisory
	* doc/coreutils.texi: Adjust advisory for md5sum and sha1sum
	to include "sha3", and also the more general `cksum -a` interface.

	tests: cksum: check more length variants
	* tests/cksum/cksum-raw.sh: Adjust to non legacy naming,
	and also check various length variations.
	* tests/misc/read-errors.sh: Likewise.

	doc: NEWS: expand on the fold multi-byte enhancements
	* NEWS: Mention all of fold(1) got multi-byte enhancement,
	with -c being an ancillary part of that.

2025-09-04  Pádraig Brady  <P@draigBrady.com>

	cksum: prefer -a sha2 -l ###, to -a sha###
	To make the interface more concise and consistent,
	while being backwards compatible.

	* src/digest.c (main): Continue to support -a "sha###" but
	also support -a "sha2" and treat it like "sha3", except in...
	(output_file): ... maintain the legacy tags for better compatability.
	* doc/coreutils.texi (cksum invocation): Document the -a sha2 option.
	* tests/cksum/cksum-base64.pl: Adjust as per modified --help.
	* tests/cksum/cksum-c.sh: Add new supported SHA2-### tagged variant.
	* NEWS: Mention the new feature.

2025-09-04  Collin Funk  <collin.funk1@gmail.com>

	cksum: add support for SHA-3
	* src/digest.c: Include sha3.h.
	(BLAKE2B_MAX_LEN): Rename to
	DIGEST_MAX_LEN since it is also used for SHA-3.
	(sha3_sum_stream): New function.
	(enum Algorithm, algorithm_args, algorithm_args, algorithm_types)
	algorithm_tags, algorithm_bits, cksumfns, cksum_output_fns): Add entries
	for SHA-3.
	(usage): Mention that SHA-3 is supported. Mention requirements for
	--length with SHA-3.
	(split_3): Use DIGEST_MAX_LEN instead of BLAKE2B_MAX_LEN. Determine the
	length of the digest for SHA-3. Make sure it is 224, 256, 384, or 512.
	(digest_file): Set the digest length in bytes. Use DIGEST_MAX_LEN
	instead of BLAKE2B_MAX_LEN. Always append the digest length to SHA3 in
	the output.
	(main): Allow the use of --length with 'cksum -a sha3'.  Use
	DIGEST_MAX_LEN instead of BLAKE2B_MAX_LEN. Make sure it is 224, 256,
	384, or 512.
	* tests/cksum/cksum-base64.pl (@pairs): Add expected sha3 output.
	(fmt): Modify the output to use SHA3-512 since that is the default.
	(@Tests): Modify arguments for sha3 to use --length=512.
	* tests/cksum/cksum-sha3.sh: New test, based on tests/cksum/b2sum.sh.
	* tests/local.mk (all_tests): Add the test.
	* bootstrap.conf: Add crypto/sha3.
	* gnulib: Update to latest commit.
	* NEWS: Mention the change.
	* doc/coreutils.texi (cksum general options): Mention sha3 as a
	supported argument to the -a option. Mention that 'cksum -a sha3'
	supports the --length option. Mention that SHA-3 is considered secure.

	maint: avoid syntax-check failure from previous commit
	* src/df.c: Don't include uchar.h.
	* src/ls.c: Likewise.
	* src/wc.c: Likewise.

2025-09-04  Collin Funk  <collin.funk1@gmail.com>

	fold: check that characters are not non-breaking spaces when -s is used
	NetBSD 10 and Solaris 11.4 treat non-breaking spaces as blank
	characters unlike glibc.

	* src/system.h: Include uchar.h.
	(c32isnbspace): New function based on iswnbspace from src/wc.c.
	* src/fold.c (fold_file): Use it.
	* src/wc.c (iswnbspace): Remove function.
	(maybe_c32isnbspace): New function.
	(wc, main): Use it.
	Fixes https://bugs.gnu.org/79300

2025-09-04  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer issymlink to readlink with a small buffer
	* bootstrap.conf (gnulib_modules): Add issymlink and issymlinkat.
	* src/copy.c: Include issymlink.h.
	(copy_reg): Use issymlink instead of readlinkat.
	* src/rmdir.c: Include issymlink.h.
	(main): Use issymlink instead of readlink.
	* src/tail.c: Include issymlink.h.
	(recheck, any_symlinks): Use issymlink instead of readlink.
	* src/test.c: Include issymlink.h.
	(unary_operator): Use issymlink instead of readlink.

2025-09-04  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2025-09-04  Bruno Haible  <bruno@clisp.org>

	build: Update after gnulib changed
	* gnulib-tests/Makefile.am: Move the AM_CFLAGS assignment before the
	'include gnulib.mk'.

2025-09-03  Collin Funk  <collin.funk1@gmail.com>

	maint: avoid syntax-check failure from previous commit
	* tests/seq/seq-long-double.sh: Place comma after "I.e.".

2025-09-02  Pádraig Brady  <P@draigBrady.com>

	seq: be more accurate with large integer start values
	* src/seq.c (main): Avoid possibly innacurate conversion
	to long double, for all digit start values.
	* tests/seq/seq-long-double.sh: Add a test case.
	* NEWS: Mention the improvement.
	Fixes https://bugs.gnu.org/79369

2025-09-01  Paul Eggert  <eggert@cs.ucla.edu>

	df: pacify static analysis
	Problem reported by Yubiao Hu <https://bugs.gnu.org/79336>.
	* src/df.c (get_dev): Assume MOUNT_POINT is non-null.

2025-08-31  Pádraig Brady  <P@draigBrady.com>

	ls: fix alignment with locale formatted --size
	Fix allocated size alignment in locales with multi-byte grouping chars.
	Tested with: LC_ALL=sv_SE.utf8 ls --size --block-size=\'k

	* src/ls.c (print_file_name_and_frills): Don't rely on
	printf("%*s", width, string) to pad multi-byte strings appropriately.
	Instead work out the padding required and use:
	printf("%*s%s", padding, "", string) to pad multi-byte appropriately.
	* tests/ls/block-size.sh: Add a test case.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/79347

2025-08-30  Pádraig Brady  <P@draigBrady.com>

	b2sum: --length: fix upper bound check
	* src/digest.c (main): Don't saturate -l to BLAKE2B_MAX_LEN,
	so that the subsequent bounds check is performed.
	* tests/cksum/b2sum.sh: Add a test case.
	* NEWS: Mention the fix introduced in commit v9.5-71-gf2c84fe63

2025-08-29  Collin Funk  <collin.funk1@gmail.com>

	fold: fix handling of invalid multi-byte characters
	* src/fold.c (fold_file): Continue the loop when we have buffered bytes
	but nothing left to read from the file.
	(adjust_column): Don't assume that the character is printable.
	* tests/fold/fold-characters.sh: Add a new test case.
	(bad_unicode): New function.

2025-08-27  Pádraig Brady  <P@draigBrady.com>

	tests: fold: add tests for multi-byte width
	* tests/fold/fold.pl: The i18n patch didn't actually test folding
	of multi-byte characters, so add tests for various multi-byte forms.

	tests: fold: copy i18n patch tests
	* tests/fold/fold.pl: Copy tests from Fedora,
	removing copy & pasted logic that was
	extraneous to either the i18n patch or upstream.

	tests: parameterize IO_BUFSIZE
	* src/getlimits.c (main): Output IO_BUFSIZE, useful for
	sizing data for tests.
	* tests/fold/fold-characters.sh: Use it rather than hardcoding.

2025-08-27  Pádraig Brady  <P@draigBrady.com>

	build: fold: fix build failure with C99
	GCC 10.2 gave the following error:
	"error: label at end of compound statement"

	* src/fold.c (fold_file): Add a ";" to avoid C2X specific syntax.

2025-08-27  Collin Funk  <collin.funk1@gmail.com>

	fold: don't truncate multibyte characters at the end of the buffer
	* src/fold.c (fold_file): Replace invalid characters with the original
	byte read. Copy multibyte sequences that may not yet be read to the
	start of the buffer before reading more bytes.
	* tests/fold/fold-characters.sh: Add a test case.

2025-08-26  Pádraig Brady  <P@draigBrady.com>

	tests: fold: consolidate all fold tests in tests/fold
	* tests/misc/fold.pl: Move from here to ...
	* tests/fold/fold.pl: ... here.
	* tests/local.mk: Adjust accordingly.

2025-08-26  Pádraig Brady  <P@draigBrady.com>

	tests: fold: add a memory constraint test
	Enforcing this interface behavior is worthwhile
	irrespective of our current implementation,
	to ensure future or other implementations conform.

	* tests/fold/fold-characters.sh: Ensure the fold implementation
	uses bounded memory.

2025-08-24  Collin Funk  <collin.funk1@gmail.com>

	fold: use fread instead of getline
	* src/fold.c: Include ioblksize.h.
	(fold_file): Use two IO_BUFSIZE-sized buffers. Use fread instead of
	getline. Check for if we reached the end of file.

2025-08-24  Pádraig Brady  <P@draigBrady.com>

	tests: nproc: fix false failure on some systems
	* tests/nproc/nproc-quota.sh: Also simulate sched_getscheduler()
	as this will not be called on older or non linux, or
	may return ENOSYS on Alpine.
	Fixes https://bugs.gnu.org/79299

2025-08-24  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer STRUCT_UTMP to struct gl_utmp
	* cfg.mk (sc_prohibit-struct-gl_utmp): New rule for 'make syntax-check'.
	* src/pinky.c (time_string, print_entry, scan_entries, short_pinky):
	Use STRUCT_UTMP instead of struct gl_utmp.
	* src/uptime.c (print_uptime, print_uptime, uptime): Likewise.
	* src/users.c (list_entries_users, users): Likewise.
	* src/who.c (time_string, print_user, print_boottime, print_deadprocs)
	(print_login, print_initspawn, print_clockchange, print_runlevel)
	list_entries_who, scan_entries, who): Likewise.

2025-08-23  Pádraig Brady  <P@draigBrady.com>

	tests: cp: ensure copy offload is not disabled for sparse files
	Related to commits v9.1-109-g879d2180d and v9.7-248-g306de6c26

	* tests/cp/sparse-perf.sh: This edge case was missed a couple of times,
	so add a test to ensure we attempt copy offload.

2025-08-23  Collin Funk  <collin.funk1@gmail.com>

	fold: add the --characters option
	* src/fold.c: Include mcel.h.
	(count_bytes): Remove variable.
	(counting_mode, last_character_width): New variables.
	(shortopts, long_options): Add the option.
	(adjust_column): If --characters is in used account for number of
	characters instead of their width.
	(fold_file): Use getline and iterate over the result with mcel functions
	to handle multibyte characters.
	(main): Check for the option.
	* src/local.mk (src_fold_LDADD): Add $(LIBC32CONV), $(LIBUNISTRING), and
	$(MBRTOWC_LIB).
	* tests/fold/fold-characters.sh: New file.
	* tests/fold/fold-spaces.sh: New file.
	* tests/fold/fold-nbsp.sh: New file.
	* tests/local.mk (all_tests): Add the tests.
	* NEWS: Mention the new option.
	* doc/coreutils.texi (fold invocation): Likewise.

2025-08-23  Paul Eggert  <eggert@cs.ucla.edu>

	cp: improve hole handling on squashfs
	Better fix for problem reported by Jeremy Allison
	<https://bugs.gnu.org/79267>.
	* src/copy.c (struct scan_inference): New type, replacing
	union scan_inference.  All uses changed.  This is so
	infer_scantype can report the first hole's offset when known.
	(lseek_copy): 5th arg is now struct scan_inference const *,
	not just off_t.  All uses changed.
	(infer_scantype): If SEEK_SET+SEEK_HOLE do not find a hole,
	fall back on ZERO_SCANTYPE.

	cp: go back to copy_file_range optimization
	This reverts part of the previous change.
	* src/copy.c (lseek_copy): When calling sparse_copy, do not
	ask it to scan for zeros unless --sparse=always, so that it
	can use copy_file_range which can be far more efficient.

2025-08-21  Paul Eggert  <eggert@cs.ucla.edu>

	cp: always punch holes that we make
	Problem reported by Jeremy Allison <https://bugs.gnu.org/79267>.
	* src/copy.c (create_hole, sparse_copy): Omit arg PUNCH_HOLES,
	as we always punch holes now.  All uses changed.
	(lseek_copy): When calling sparse_copy, scan for holes when
	sparse_mode == SPARSE_AUTO, as that means we are making holes.
	(copy_reg): Always punch any hole made at end.

2025-08-21  Pádraig Brady  <P@draigBrady.com>

	tests: nproc: add a test for cgroup quotas
	* tests/nproc/nproc-quota.sh: New root only test.
	* tests/local.mk: Reference the new test.

2025-08-19  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer https to http
	* doc/sort-version.texi (Other version/natural sort implementations):
	Use https in documentation link.
	* tests/chmod/symlinks.sh: Use https in license text.

2025-08-19  Pádraig Brady  <P@draigBrady.com>

	nproc: honor cgroup v2 CPU quotas
	* NEWS: Mention the new feature.
	* doc/coreutils.texi (nproc invocation): Mention that
	cgroup CPU quotas can limit the reported number.
	* gnulib: Update to new nproc gnulib implementation:
	https://github.com/coreutils/gnulib/commit/9b07115f4a

2025-08-19  Collin Funk  <collin.funk1@gmail.com>

	logname: list David MacKenzie as the author
	* src/logname.c (AUTHORS): List David as the author.
	* AUTHORS: Likewise.

2025-08-15  Paul Eggert  <eggert@cs.ucla.edu>

	realpath: improve doc and NEWS

2025-08-15  Collin Funk  <collin.funk1@gmail.com>

	maint: avoid syntax-check failure from previous commit
	* src/tsort.c: Don't include long-options.h since the previous commit
	removed the call to parse_gnu_standard_options_only. This avoids a
	sc_prohibit_long_options_without_use syntax-check failure.

2025-08-15  Paul Eggert  <eggert@cs.ucla.edu>

	tsort: add do-nothing -w option
	This is for conformance to POSIX.1-2024
	* src/tsort.c: Include getopt.h.
	(main): Accept and ignore -w.  Do not bother altering
	the usage message, as the option is useless.
	* tests/misc/tsort.pl (cycle-3): New test.

2025-08-12  Pádraig Brady  <P@draigBrady.com>

	maint: use short form bug URLs
	* cfg.mk (sc_prohibit-long-form-bug-urls): Disallow long form in code.
	* scripts/git-hooks/commit-msg: Disallow long form in commit messages.
	* NEWS: Shorten long urls.
	* bootstrap.conf: Likewise.
	* configure.ac: Likewise.
	* scripts/git-hooks/commit-msg: Likewise.
	* src/csplit.c: Likewise.
	* src/fmt.c: Likewise.
	* src/make-prime-list.c: Likewise.
	* src/nohup.c: Likewise.
	* tests/od/od-float.sh: Likewise.
	* tests/rm/r-root.sh: Likewise.
	* tests/tail/inotify-race.sh: Likewise.
	* tests/tail/inotify-race2.sh: Likewise.

2025-08-12  Bruno Haible  <bruno@clisp.org>

	basenc: Don't trigger undefined behaviour in mini-gmp
	* src/basenc.c (base58_encode): Avoid calling mpz_import on an empty
	limb sequence.

2025-08-10  Collin Funk  <collin.funk1@gmail.com>

	realpath: support the -E option required by POSIX
	* src/realpath.c (longopts): Add the option.
	(main): Likewise.
	(usage): Add the option to the --help message.
	* tests/misc/realpath.sh: Add a simple test.
	* doc/coreutils.texi (realpath invocation): Mention the new option.
	* NEWS: Likewise.

2025-08-10  Pádraig Brady  <P@draigBrady.com>

	doc: --base58: add example usage to info
	* doc/coreutils.texi (basenc invocation): Add an example
	using --base58 to generate a unique ID.  This also demonstrates
	compound usage of the basenc command, to convert to/from binary.

2025-08-09  Pádraig Brady  <P@draigBrady.com>

	doc: rearrange NEWS to more standard ordering
	* NEWS: Also move items to more appropriate sections.
	Also use more consistent quoting.

2025-08-09  Pádraig Brady  <P@draigBrady.com>

	basenc: add base58 support
	A 58 character encoding that:
	 - avoids visually ambiguous 0OIl characters
	 - uses only alphanumeric characters
	Described at:
	 - https://tools.ietf.org/html/draft-msporny-base58-03

	This implementation uses GMP (or gnulib's gmp fallback).
	Performance is good in comparison to other implementations.
	For example when using libgmp on an i7-5600U system,
	encoding is 530 times faster, and decoding 830 times faster
	than the implementation using arbitrary precision ints in cpython 3.13.

	Memory use is proportional to the size of input.

	Encoding benchmarks:

	  $ time yes | head -c65535 | src/basenc --base58 -w0 >file.enc
	  real    0m0.018s

	  ./configure --quiet --without-libgmp && make -j $(nproc)
	  $ time yes | head -c65535 | src/basenc --base58 -w0 >file.enc
	  real    0m3.431s

	  # dnf install python3-base58
	  $ time yes | head -c65535 | base58 >file.enc  # cpython 3.13
	  real    0m9.700s

	Decoding benchmarks:

	  $ time src/basenc --base58 -d <file.enc >/dev/null
	  real    0m0.010s

	  $ ./configure --without-libgmp && make  # gnulib gmp
	  $ time src/basenc --base58 -d <file.enc >/dev/null
	  real    0m0.145s

	  $ time base58 -d <file.enc >/dev/null  # cpython 3.13
	  real    0m8.302s

	* src/basenc.c (base_decode_ctx_finalize, base_encode_ctx_init,
	base_encode_ctx, base_encode_ctx_finalize): New functions to
	provide more general processing functionality.
	(base58_{de,en}code_ctx{_init,,_finalize}): New functions to
	accumulate all input before calling ...
	(base58_{de,en}code): ... the GMP based encoding/decoding routines.
	(do_encode, do_decode): Call the ctx variants if enabled.
	* doc/coreutils.texi (basenc invocation): Describe the new option,
	and indicate the main use case being interactive user use.
	* src/local.mk: Link basenc with GMP.
	* tests/basenc/basenc.pl: Add test cases.
	* NEWS: Mention the new feature.

2025-08-09  Pádraig Brady  <P@draigBrady.com>

	basenc: fix stripping of '=' chars in some encodings
	* src/basenc.c (do_decode): With -i ensure we strip '=' chars
	if there is no padding for the chosen encoding.
	* tests/basenc/basenc.pl: Add a test case.
	* NEWS: Mention the bug fix.

2025-08-09  Collin Funk  <collin.funk1@gmail.com>

	maint: prefer attribute.h in .c files
	* src/basenc.c (base16_encode, z85_encoding, do_decode): Use
	ATTRIBUTE_NONSTRING instead of ATTRIBUTE_NONSTRING.
	* src/basenc.c (sc_prohibit-_gl-attributes): New rule for
	'make syntax-check'.

2025-08-08  Paul Eggert  <eggert@cs.ucla.edu>

	cp: omit some needless lseek calls
	The sparse code sometimes issued multiple lseeks against the
	same file without doing anything in betwee.  Optimize them away
	by keeping track of the last hole output, in a way that
	crosses the sparse_copy function call boundary.
	* src/copy.c (sparse_copy): New arg hole_size, replacing old args
	scan_holes and last_write_made_hole.  All callers changed.
	(sparse_copy, lseek_copy): Do not create hole at
	end; let the caller deal with it.  All callers changed.
	(lseek_copy): New args hole_size and total_n_read.  Caller changed.
	(copy_reg): Create hole at end for both lseek_copy and sparse_copy.

	cp: --sparse=always was missing some holes
	The sparse code assumed that st_blksize was the minimum hole size.
	However, st_blksize is an optimum I/O buffer size, not the file
	system fundamental block size.  Use ST_NBLOCKSIZE instead;
	although it may underestimate the true block size that just slows
	‘cp’ down a bit, without introducing bugs.
	* src/copy.c (sparse_copy): Arg scan_holes replaces
	the old hole_size arg.  All callers changed.
	(lseek_copy): Remove hole_size arg; no longer needed.
	Caller changed.

2025-08-06  Collin Funk  <collin.funk1@gmail.com>

	maint: use consistent references to standard files in messages
	* cfg.mk (sc_standard_outputs): Add a grep command for source files.
	* src/du.c (main): Use standard input instead of stdin, standard output
	instead of stdout, and standard error instead of stderr in messages.
