2018-07-01  Pádraig Brady  <P@draigBrady.com>

	version 8.30
	* NEWS: Record release date.

2018-06-30  Pádraig Brady  <P@draigBrady.com>

	tests: standardize perl usage in tests
	* tests/cp/fiemap-FMR.sh: Ensure perl is parameterized to $PERL,
	and ensure require_perl_ is used, so tests are skipped appropriately.
	* tests/cp/preserve-gid.sh: Likewise.
	* tests/du/long-from-unreadable.sh: Likewise.
	* tests/misc/env-S-script.sh: Likewise.
	* tests/misc/sort-benchmark-random.sh: Likewise.
	* tests/rm/deep-2.sh: Likewise.

	maint: copy: avoid new static analyzer warnings
	* src/copy.c (copy_internal): Use the lint protected src_mode,
	rather than accessing the src_sb again.  Also unconditionally
	populate src_sb when !x->move_mode and in lint mode.
	Reported by Kamil Dudka with coverity and clang analyzer.

	maint: fix recent stale comments and spelling mistakes
	* doc/coreutils.texi: s/seperator/separator/.
	* tests/misc/env-S.pl: Likewise.
	* src/env.c: Fix stale comment.

2018-06-27  Pádraig Brady  <P@draigBrady.com>

	maint: disable overly agressive sc_gitignore_redundant
	* cfg.mk (sc_gitignore_redundant): Disabled for now as too
	aggressive flagging entries like /lib/arg-nonnull.h in
	a newly checked out repo.

	env: adjust diagnostics provided for shebang usage
	* src/env.c (main): Don't process '-' specially since
	that causes an issue on the openbsd getopt implementation
	where a lone '-' is now processed as an option, and anyway
	it doesn't particuarly help diagnosing common shebang
	usage issues.  Also don't restrict the extra diagnostics
	for shebang usage to the case with 3 arguments, as
	further arguments can be passed to a script.
	* tests/misc/env-S.pl: Adjust accordingly.

2018-06-27  Assaf Gordon  <assafgordon@gmail.com>

	tests: accept getopt errors without single-quotes
	On OpenBSD 6.2, invalid single options produce error messages
	without single quotes:

	    $ ./src/chroot -/
	    chroot: unknown option -- /

	As opposed to other systems:

	    ./src/chroot: invalid option -- '/'

	Modify the grep search to accept this.

	* tests/misc/usage_vs_getopt.sh (checkprg): Change the grep pattern
	to accomodate no-single-quotes cases.

2018-06-27  Pádraig Brady  <P@draigBrady.com>

	tests: fix false failures when perl not available
	* tests/local.mk: Reference the stub that skips perl tests,
	with the correct path.

	tests: fix false failure with limited shebang lines
	* tests/misc/env-S-script.sh: Provide a wrapper to
	emulate shebang processing, but without length limits,
	which are 127 on Linux for example.

	maint: update gnulib to latest
	* gnulib: Update to latest, which incorporates
	a thread linking fix from Bruno Haible,
	which was seen on newer Ubuntu systems.

2018-06-27  Assaf Gordon  <assafgordon@gmail.com>

	tests: remove unused Data::Dumper perl module
	The module is not needed anymore (was used during development).
	Despite being a Perl core module, platforms like CentOS don't install
	it by default.  Reported by Bruno Haible at
	https://lists.gnu.org/r/coreutils/2018-06/msg00093.html.

	* tests/misc/csplit-suppress-matched.pl: Remove Data::Dumper.

2018-06-24  Carlos Santos  <casantos@datacom.com.br>

	maint: fix -Werror=suggest-attribute=malloc in expr.c
	Add attribute 'malloc' to mpz_get_str to prevent
	the following on GCC 8.1.1

	  src/expr.c:117:1: error: function might be candidate for attribute
	    'malloc' if it is known to return normally
	      [-Werror=suggest-attribute=malloc]
	   mpz_get_str (char const *str, int base, mpz_t z)
	   ^~~~~~~~~~~
	  cc1: all warnings being treated as errors

	* src/expr.c (mpz_get_str): Add _GL_ATTRIBUTE_MALLOC.

2018-06-24  Pádraig Brady  <P@draigBrady.com>

	maint: update gnulib to latest
	* gnulib: Update to latest.
	* .gitignore: Add new entries.
	* bootstrap.conf: Enable wchar-single, which will enable more
	efficient replacements of wcwidth and mbrtowc, as we indicate
	that the charset will no change between invocations of these functions.

	maint: sync longlong.h from gmp repo
	* src/longlong.h: Sync changes.  No functional change.

	maint: avoid false positive in src/fs-magic-compare
	* src/local.mk (fs_normalize_perl_subst): `make src/fs-magic-compare`
	was reporting incorrectly that AFS was not being handled.
	Add a mapping to our KAFS identifier.
	* .gitignore: Add intermediate files from `make src/fs-magic-compare`

2018-06-23  Bernhard Voelker  <mail@bernhard-voelker.de>

	tests: initialize fail=0 to avoid "unary operator expected" errors
	With an uninitialized variable 'fail', the unquoted use like
	  test $fail = 1
	lead to the shell error
	  "unary operator expected".

	The uninitialized 'fail' variable was a side effect of
	  https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=e91c0d4f9
	which was pulled into coreutils-v8.26 with
	  https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=ef9650170
	Coreutils test code relied and relies on 'fail' to be initialized,
	so initialize that variable here.

	* tests/local.mk (TESTS_ENVIRONMENT): Initialize fail=0.

2018-06-21  Jim Meyering  <meyering@fb.com>

	maint: do not depend directly on gnulib's now-unused ftello module
	* bootstrap.conf (gnulib_modules): Remove ftello, since it is
	no longer used directly, since v8.9-11-geab97b307.

2018-06-20  Pádraig Brady  <P@draigBrady.com>

	tests: provide an option to relax the need for gdb
	* tests/rm/r-root.sh: gdb provides extra protection,
	but is not strictly necessary.  So provide an option
	for maintainers to relax the requirements.

	rm: add --preserve-root=all to protect mounts
	* src/remove.c (rm_fts): With the --preserve-root=all extension,
	reject command line arguments that are mount points.
	* src/remove.h (rm_options): Add preserve_all_root to store config.
	* src/mv.c (rm_option_init): Init preserve_all_root to false.
	* src/rm.c (main): Init preserve_all_root as per option.
	(usage): Describe the new option.
	* src/remove.c (rm_fts): Lookup the parent device id,
	and reject the cli argument if a separate file system.
	* tests/rm/one-file-system.sh: Add a test case.
	* NEWS: Mention the new feature.

2018-06-20  Adam Borowski  <kilobyte@angband.pl>

	cp: add --reflink=never to force standard copy mode
	This mode is currently the default, but most if not all users of
	reflink-capable filesystems want --reflink=auto, which is often
	encapsulated into an alias.  Adding --reflink=never allows overriding
	such an alias.

	* doc/coreutils.texi (cp invocation): Describe the new option.
	* src/cp.c: Support --reflink=never.
	* tests/cp/reflink-auto.sh: Add a test case.
	* NEWS: Mention the new feature.

2018-06-20  Assaf Gordon  <assafgordon@gmail.com>

	env: add -S/--split-string option
	Adopted from FreeBSD's env(1), useful for specifing multiple
	parameters on a shebang (#!) script line, e.g:

	   #!/usr/bin/env -S perl -w -T

	Discussed in https://lists.gnu.org/r/coreutils/2018-04/msg00011.html

	* src/env.c (valid_escape_sequence,escape_char,scan_varname,
	  extract_varname,validate_split_str,build_argv,
	  parse_split_string): New functions.
	  (main): Process new option and call parse_split_string.
	  (usage): Mention new option.
	* tests/misc/env-S.pl: Test new option from the command line.
	* tests/misc/env-S-script.sh: Test new option from shebang scripts.
	* tests/local.mk (all_tests): Add new tests.
	* man/env.x (OPTIONS): Show a brief example of -S usage and point to
	the full documentation for more information.
	* doc/coreutils.texi (env invocation): Detail usage of -S/--split-string
	option.
	* NEWS: Mention new option.

2018-06-20  Assaf Gordon  <assafgordon@gmail.com>

	env: add -v/--debug option
	Prints verbose information about each step:

	  $ env -v -uFOO  -C /tmp BAR=BAZ date -u
	  env: unset:    FOO
	  env: setenv:   BAR=BAZ
	  env: chdir:    '/tmp'
	  env: executing: date
	  env:    arg[0]= ‘date’
	  env:    arg[1]= ‘-u’
	  Sun Apr 22 08:52:30 UTC 2018

	Inspired by FreeBSD's env(1).

	* src/env.c (usage): Mention new option.
	  (main): Print debug information if requested.
	* NEWS: Mention new option.
	* doc/coreutils.texi (env invocation): Mention -v/--debug.

2018-06-20  Assaf Gordon  <assafgordon@gmail.com>

	maint: refactor unsetenv call in env
	Keep unset envvars (-uFOO) in an array for later deletion,
	instead of reiterating over argv.  Done in preparation for
	'-S string' feature. Related to '-u' discussion in
	https://lists.gnu.org/r/coreutils/2018-04/msg00013.html

	* src/env.c (append_unset_var,unset_envvars): New functions.
	 (main): Use new functions.

2018-06-20  Kaxandra Labat  <kaxandra.labat@gmail.com>

	ls: ignore case when coloring file extensions
	* src/ls.c (get_color_indicator): s/STREQ_LEN/c_strncasecmp/
	* src/dircolors.hin: Remove a now redundant entry.
	* tests/ls/color-ext.sh: Add a new test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the change in behavior.

2018-06-20  Pádraig Brady  <P@draigBrady.com>

	md5sum,b2sum,sha*sum: support -z,--zero option
	* doc/coreutils.texi (md5sum invocation): Describe the new option,
	and how it's not supported by --check, and how it disables escaping.
	* src/md5sum.c (delim): A new global to parmeterize the out delimiter.
	(main): Don't enable file name escaping with -z, and output '\0'.
	* tests/misc/md5sum-newline.pl: Add a test case.
	* NEWS: Mention the new feature.

2018-06-20  Pádraig Brady  <P@draigBrady.com>

	wc: optimize processing of ASCII in multi byte locales
	===== Benchmark setup (on GNU/Linux) ====
	$ yes áááááááááááááááááááá | head -n100000 > mbc.txt
	$ yes 12345678901234567890 | head -n100000 > num.txt

	===== Before ====
	$ time src/wc -Lm < mbc.txt
	real    0m0.186s
	$ time src/wc -m < mbc.txt
	real    0m0.186s
	$ time src/wc -Lm < num.txt
	real    0m0.055s
	$ time src/wc -m < num.txt
	real    0m0.056s

	==== After ====
	$ time src/wc -Lm < mbc.txt
	real    0m0.196s
	$ time src/wc -m < mbc.txt
	real    0m0.173s
	$ time src/wc -Lm < num.txt
	real    0m0.031s
	$ time src/wc -m < num.txt
	real    0m0.028s

	* src/wc.c (wc): Only call wide variant functions like
	iswprint() and wcwidth() for non is_basic() characters.
	I.E. non ISO C "basic character set" characters.
	This is especially significant on OSX where wcwidth()
	is very expensive (about 10x in tests).
	* NEWS: Mention the improvement.
	Suggested by Eric Fischer.

2018-06-14  Paul Eggert  <eggert@cs.ucla.edu>

	doc: port test.1 to doclifter
	* man/test.x: Use \& instead of quoting (Bug#31803).

2018-06-13  Paul Eggert  <eggert@cs.ucla.edu>

	doc: port man pages to doclifter
	Problem reported by Eric S. Raymond (Bug#31803).
	* man/test.x: Add SYNOPSIS section, since help2man
	understandably gets confused by the square brackets.
	* src/ln.c (usage): Omit parenthetical "(Nth form)" in usage,
	as it confuses doclifter.

2018-06-03  Pádraig Brady  <P@draigBrady.com>

	cp: preserve existing permissions with --no-preserve=mode
	This issue was introduced in commit v8.19-145-g24ebca6

	* src/copy.c (copy_internal): With --no-preserve=mode,
	only reset permissions for newly created files.
	(copy_reg): Likewise.
	* NEWS: Mention the fix.
	* tests/cp/preserve-mode.sh: Add a test case.
	Fixes https://bugs.gnu.org/31675

2018-05-29  Pádraig Brady  <P@draigBrady.com>

	tests: fix periodic false failure in month alignment
	* tests/ls/abmon-align.sh: Base relative month adjustment
	from the middle of the month, to avoid failures due
	to months being repeated.
	Fixes https://bugs.gnu.org/31644

2018-05-25  Bjarni Ingi Gislason  <bjarniig@rhi.hi.is>

	doc: formatting fixes in "du.x" and "rm.x"
	Avoid warnings from: groff -b -e -mandoc -T utf8 -rF0 -t -w w -z

	* man/du.x: Change ".BR" to ".B" if there is only one argument.
	Protect an end-of-sentence indicator (.?!) with '\&'
	if it does not mean an end of a sentence.
	Change '--' to '\-\-' if it indicates an option.
	* man/rm.x: Change '\=' to '='.

2018-05-17  Pádraig Brady  <P@draigBrady.com>

	cp: with --force; replace self referential symlinks
	* src/copy.c (copy_internal): Don't fail immediately upon
	getting ELOOP when running stat() on the destination,
	rather proceeding if -f specified, allowing the link
	to be removed.  If the loop is not in the final component
	of the destination path, we still fail but at the
	subsequent unlink() stage.
	* doc/coreutils.texi (cp invocation): Adjust wording to say
	that --force doesn't work with dangling links, rather than
	all links that can't be traversed.
	* tests/cp/thru-dangling.sh: Add a test case.
	* NEWS: Mention the change in behavior.
	Discussed in https://bugs.gnu.org/31335

2018-05-15  Pádraig Brady  <P@draigBrady.com>

	cp: fix symlink checks when overwriting files
	Ensure this _does_ recreate the symlink
	  Given "path1" and "path2" are on different devices.
	  $ touch "path1/file"
	  $ cd path2/; ln -s path1/file
	  $ cp -dsf path1/file .

	Ensure this does _not_ overwrite file
	  $ touch file
	  $ ln -s file l1
	  $ cp -sf l1 file

	* src/copy.c (same_file_ok): Remove device ids from consideration,
	instead deferring to future EXDEV with --link or allowing
	the first case above to work.
	Also ensure that we do not exist this function too early,
	when the destination file is not a symlink, which protects
	against the second case.
	* tests/cp/cross-dev-symlink.sh: Add a test for the first case.
	* tests/cp/same-file.sh: Add a test for the second case above.
	* NEWS: Mention the bug fixes.
	* THANKS.in: Mention the reporters who also analyzed the code.
	Fixes https://bugs.gnu.org/31364

2018-05-15  Pádraig Brady  <P@draigBrady.com>

	cp: ensure --remove-destination doesn't traverse symlinks
	* src/cp.c (target_directory_operand): Allow through inaccessible
	arguments with -f or --remove.
	* doc/coreutils.texi (cp invocation): Clarify that -f doesn't directly
	impact the removal of non-traversable symlinks.
	* tests/cp/dir-rm-dest.sh: Test the new behavior.
	* tests/cp/thru-dangling.sh: Enforce -f behavior wrt symlinks.
	* NEWS: Mention the bug fix.
	Fixes https://bugs.gnu.org/31335

2018-05-14  Pádraig Brady  <P@draigBrady.com>

	maint: make chmod/chgrp/chown leak free under valgrind
	* src/chmod.c: Deallocate the mode change array in dev mode.
	* src/chown.c: Make chopt_free() actually deallocate, but
	only call in dev mode.
	* src/chgrp.c: Likewise.

	doc: improve formatting of nl --help
	* src/nl.c (usage): Better delineate the information.

2018-05-14  Paul Eggert  <eggert@cs.ucla.edu>

	who: simplify port to GCC 8
	* src/who.c (make_id_equals_comment): Use simpler workaround
	for GCC bug 85602.  Suggested by Martin Sebor in:
	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85602#c3

2018-05-03  Pádraig Brady  <P@draigBrady.com>

	build: make GCC 8 adjustments more portable
	* src/chown-core.h (chopt_free): Just define away this noop.
	* src/chown-core.c (chopt_free): Remove the empty implementation.

2018-05-03  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	maint: port to GCC 8
	* src/chown-core.h (chopt_free, gid_to_name, uid_to_name):
	No longer const.
	* src/make-prime-list.c (xalloc): Add malloc attribute.
	* src/who.c (make_id_equals_comment): Work around GCC bug 85602
	by using mempcpy rather than strncat.  Although the old code
	was correct, strncat raises so many hackles that it’s not
	worth maintaining its use here.

	maint: remove strpbrk module
	* bootstrap.conf (gnulib_modules): Remove obsolete module strpbrk.

	build: update gnulib submodule to latest

2018-04-20  Pádraig Brady  <P@draigBrady.com>

	doc: retroactively adjust info about tail and closed output
	* NEWS: Expand on the 8.28 description of how tail more
	responsively reacts to closed output, and move from "Improvements"
	to "Changed behavior".
	* cfg.mk (old_NEWS_hash): Regenerate.
	Fixes https://bugs.gnu.org/31225

2018-04-18  Pádraig Brady  <P@draigBrady.com>

	doc: timeout --help: mention 0 DURATION disables timeout
	* src/timeout.c (usage): Mention that a duration of 0 disables
	the associated timeout, which is both concise info and useful
	functionality as timeouts are frequently configured.

2018-04-05  Eric Blake  <eblake@redhat.com>

	doc: retroactively document -e/-u addition in NEWS
	Prompted by https://bugs.gnu.org/31045

	* NEWS: Update 8.8 blurb to mention other split additions.
	* cfg.mk (old_NEWS_hash): Regenerate.

2018-04-03  Paul Eggert  <eggert@cs.ucla.edu>

	doc: Clarify octal bits in permissions
	* doc/perm.texi (Numeric Modes): Briefly explain octal.
	Reorder description to make it more intuitive (Bug#29069).

2018-03-28  Tobias Stoeckmann  <tobias@stoeckmann.org>

	cut: improve large file support on 32 bit
	Increase max range from SIZE_MAX to UINTMAX_MAX, which will
	allow cut to support line lengths up to the max file size
	on all systems. The inherent SIZE_MAX limitation in cut was
	removed with the enhancements in https://bugs.gnu.org/13127.
	Also numfmt gets similarly increased --field ranges due to
	shared code.

	* src/cut.c: s/size_t/uintmax_t/.
	* src/numfmt.c: Likewise.
	* src/set-fields.c: Likewise.
	* src/set-fields.h: Likewise.
	* tests/misc/cut-huge-range.sh: Adjust accordingly.
	* tests/misc/numfmt.pl: Likewise.
	* NEWS: Mention the improvement.

2018-03-27  Pádraig Brady  <P@draigBrady.com>

	tests: avoid a recent syntax-check failure
	* tests/ls/a-option.sh: s/framework_failure/&_/.

2018-03-27  Paul Eggert  <eggert@cs.ucla.edu>

	ls: -A now overrides -a
	Problem reported by Karl Berry (Bug#30963).
	* NEWS: Mention this.
	* src/ls.c (decode_switches): Implement this.
	* tests/ls/a-option.sh: New file.
	* tests/local.mk (all_tests): Add it.

2018-03-24  Roland Hieber  <rohieb@rohieb.name>

	doc: fix two typos in github templates
	* .github/ISSUE_TEMPLATE.txt: Fix typo "coreitils" in the URL to the bug
	tracker.
	* .github/PULL_REQUEST_TEMPLATE.txt: Likewise.

2018-03-16  Pádraig Brady  <P@draigBrady.com>

	ls: increase the allowed abmon width from 5 to 12
	This will impact relatively few languages,
	and will make Arabic or Catalan etc.
	output unambiguous abbreviated month names.

	* src/ls.c (MAX_MON_WIDTH): Increase from 5 to 12.
	* NEWS: Mention the bug fix.
	* tests/ls/abmon-align.sh: Augment to check for ambiguous output.
	Fixes https://bugs.gnu.org/30814

2018-03-14  Brent Petit  <brent.petit@hpe.com>

	stat,tail: add support for the EXFS file system
	Enhanced XFS (EXFS) is a version of XFS maintained by HPE.
	EXFS uses a unique magic number to allow the use of community
	XFS, and EXFS filesystems at the same time.

	* src/stat.c (human_fstype): Add file system ID definition,
	and use "exfs" as the name.
	* NEWS: Mention the Improvement.

2018-03-06  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2018-03-05  Paul Eggert  <eggert@cs.ucla.edu>

	stat: work around IBM xlC bug
	Problem reported by John Wiersba (Bug#30718)
	* src/stat.c (human_time): Avoid giving an integer constant
	expression a name, as it runs afoul of a bug in IBM XL C/C++ for
	AIX 12.01.0000.0002.

2018-03-04  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: adjust email address of Keith Thompson in THANKS.in
	* THANKS.in (Keith Thompson): Update email address as requested by
	himself at https://lists.gnu.org/r/coreutils/2018-03/msg00004.html

2018-02-24  Pádraig Brady  <P@draigBrady.com>

	cp: set appropriate default permissions for special files
	This issue was introduced in commit v8.19-145-g24ebca6

	* src/copy.c (copy_internal): When setting default permissions
	to use with --no-preserve=mode, only set executable bits for
	directories or sockets.
	* NEWS: Mention the fix.
	* tests/cp/preserve-mode.sh: Add a test case.
	Fixes https://bugs.gnu.org/30534

2018-01-21  Pádraig Brady  <P@draigBrady.com>

	doc: use consistent example format in manual
	* doc/coreutils.texi: Use @example consistently
	as we don't need the smaller or fixed width representation.
	This is especially true for the synopsis of commands.
	@smallexample is rendered left aligned for HTML
	which is awkward to read with the center aligned main content.

2018-01-10  Paul Eggert  <eggert@cs.ucla.edu>

	mv: clarify ‘mv -n A A’ change

	mv: fewer syscalls for ‘mv a b’
	This builds on a previous patch for mv atomicity (Bug#29961).
	It merely improves performance; it does not fix bugs.
	* src/copy.h (struct cp_options): New members last_file, rename_errno.
	* src/copy.c (copy_internal): Support new rename_errno member
	for the copy options.  Avoid calling stat when new members
	suggest it’s not needed.
	(cp_options_default): Initialize new members.
	* src/mv.c: Include renameat2.h.
	(main): With two arguments, first call ‘renamat2 (AT_FDCWD, "a",
	AT_FDCWD, "b", RENAME_NOREPLACE)’.  Use its results to skip
	remaining processing if possible; for example, if it succeeds
	there is no need to stat either "a" or "b".  Also, set
	x.last_file when it is the last file to rename.

	mv: improve -n atomicity
	Problem reported by Kamil Dudka (Bug#29961).
	* NEWS: Mention this.
	* src/copy.c: Include renameat2.h.
	(copy_internal): If mv, try renameat2 first thing, with
	RENAME_NOREPLACE.  If this works, skip most of the remaining code.
	Also, fail quickly if it fails with EEXIST, and we are using -n.

2018-01-09  Michael Orlitzky  <michael@orlitzky.com>

	doc: warn about following symlinks recursively in chown/chgrp
	In both chown and chgrp (which shares its code with chown), operating
	on symlinks recursively has a window of vulnerability where the
	destination user or group can change the target of the operation.
	Warn about combining the --dereference, --recursive, and -L flags.

	* doc/coreutils.texi (warnOptDerefWithRec): Add macro.
	(node chown invocation): Add it to --dereference and -L.
	(node chgrp invocation): Likewise.

	See also: CVE-2017-18018

2018-01-05  Paul Eggert  <eggert@cs.ucla.edu>

	cp: remove ASSIGN_BASENAME_STRDUPA
	* src/cp.c (do_copy): Just use ASSIGN_STRDUPA, as this simplifies
	the code and uses less memory.

2018-01-04  Paul Eggert  <eggert@cs.ucla.edu>

	mv: -n overrides -u
	* NEWS: Mention these fixes.
	* doc/coreutils.texi (cp invocation, mv invocation):
	Mention that -n is silent, and that it overrides -u.
	* src/cp.c, src/mv.c (main): -n overrides -u.

2018-01-03  Paul Eggert  <eggert@cs.ucla.edu>

	tr: add -A, for compatibility with AIX tr
	Problem reported by Michael (Bug#29946).
	* src/tr.c (main): Add undocumented -A option.

2018-01-03  Michael Orlitzky  <michael@orlitzky.com>

	doc: clarify chown/chgrp --dereference defaults
	* doc/coreutils.texi: the documentation for the --dereference
	  flag of chown/chgrp states that it is the default mode of
	  operation. Document that this is only the case when operating
	  non-recursively.

2018-01-02  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure with xargs on AIX
	* tests/misc/shred-remove.sh: AIX xargs defaults to using
	'_' to indicate end of input, thus ignoring it.
	Rather than specifying -E to avoid this behavior, simplify
	by removing sed and xargs usage.

2018-01-01  Pádraig Brady  <P@draigBrady.com>

	maint: update all copyright year number ranges
	Run "make update-copyright" and then...

	* gnulib: Update to latest with copyright year adjusted.
	* tests/init.sh: Sync with gnulib to pick up copyright year.
	* bootstrap: Likewise.
	* tests/sample-test: Adjust to use the single most recent year.

2017-12-27  Pádraig Brady  <P@draigBrady.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 8.29
	* NEWS: Record release date.

2017-12-23  Pádraig Brady  <P@draigBrady.com>

	tests: avoid false failure on AIX 7.2
	* tests/tail-2/pipe-f.sh: Close stdout in a subshell
	to ensure the current shell isn't impacted.  Subsequent
	piped commands like `echo foo | blah` were seen to fail
	due to the previous closing of stdout.
	Reported by Assaf Gordon.

	doc: describe recent build checks for 32 bit time_t
	* README: Document the new handling of 32 bit time_t,
	with examples of how to build in 64 bit mode on AIX.
	Also mention that GNU make is desired on AIX
	due to its mishandling of the "[" target.
	Suggested by Assaf Gordon.

2017-12-21  Pádraig Brady  <P@draigBrady.com>

	tests: fix recent portability issues on solaris 10
	* tests/misc/ptx.pl: Escape the '^' character which is
	otherwise considered as a line continuation character.
	* tests/misc/shred-remove.sh: sed doesn't support \n.

	maint: remove reference to excluded changelog item
	* build-aux/git-log-fix: Remove old entry.

2017-12-20  Pádraig Brady  <P@draigBrady.com>

	maint: add doc/coverage to .gitignore
	* .gitignore: Ignore the generated coverage report.

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

2017-12-17  Bernhard Voelker  <mail@bernhard-voelker.de>

	doc: mention which privileges are needed to chmod
	POSIX specification for chmod(1):
	https://pubs.opengroup.org/onlinepubs/9699919799/utilities/chmod.html

	* doc/coreutils.texi (chmod invocation): Add a sentence about who can
	change the file mode bits of a file - (almost) a copy from what POSIX
	requires.

	Fixes https://bugs.gnu.org/29207.

2017-12-16  Pádraig Brady  <P@draigBrady.com>

	tests: fix recent regressions with dash
	* tests/misc/timeout.sh: dash outputs the "Killed"
	message to stderr rather than the terminal.
	* tests/misc/usage_vs_getopt.sh: dash doesn't yet
	support the POSIX proposed $'...' shell quoting syntax.

	build: avoid a signed overflow warning in ptx
	* src/ptx.c (fix_output_parameters): GCC 6.3.1 with
	./configure --enable-single-binary would give:
	  error: assuming signed overflow does not occur
	  when simplifying conditional to constant [-Werror=strict-overflow]
	    if (file_index > 0)
	So change the type of file_index to signed (size_t).

2017-12-10  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: adjust for the renamed nstrfime gnulib module
	* bootstrap.conf: s/strftime/nstrfrime/.

2017-12-10  Pádraig Brady  <P@draigBrady.com>

	build: update gnulib submodule to latest
	* gnulib: Update with various build/test fixes.

	tests: fix false failure in new dd/nocache_eof test
	* test/dd/nocache_eof.sh: Also handle fadvise64_64 which is
	used on 32 bit x86.  Note strace internally maps fadvise64_64
	to {arm,xtensa}_fadvise64_64.

	tail: fix tailing non seekable files on certain systems
	* src/tail.c (tail_bytes): On systems were blksize_t is unsigned
	and the same size or wider than off_t (android for example),
	our initialized (off_t) -1 would be promoted to unsigned before
	comparison, and thus fail to follow the appropriate path.
	* tests/tail-2/tail-c.sh: Add a test case.
	* NEWS: Mention the fix.
	This issue was introduced in commit v8.23-47-g2662702
	Reported at https://github.com/termux/termux-app/issues/233

	build: avoid build failure without sys/mtio.h
	* m4/jm-macros.m4: Check for the header.
	* src/dd.c: Avoid the workaround where the header
	is not available (on non glibc systems).
	* src/shred.c: Likewise.

	doc: reorganize ls -k and --time-style help
	* src/ls.c (usage): Clarify -k only applies to -s usage
	and directory 'total' lines.  Move the description
	of TIME_STYLE out of the option section as it was awkward
	to read and write there within 80 columns.

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

	doc: clarify numeric setuid handling in chmod man page
	* man/chmod.x: Update the information to state one can
	clear the setuid and setgid bits for directories numerically
	using an additional leading '0' or a leading '='.
	That has been supported since v8.15-64-g8931cdb.
	Fixes https://bugs.gnu.org/29390

	doc: shred: change 'truncate' to the more descriptive 'deallocate'
	* doc/coreutils.texi (shred invocation): s/truncate/deallocate/.
	* src/shred.c (usage): Likewise.
	Fixes https://bugs.gnu.org/29317

	doc: clarify that cp --force may recreate files
	* doc/coreutils.texi (cp invocation): The language used
	to describe recreating the file was a little confusing
	as it mentioned opening a removed file.
	Fixes https://bugs.gnu.org/29315

2017-12-04  Kamil Dudka  <kdudka@redhat.com>

	doc: fix default QUOTING_STYLE for %N format of stat(1)
	* doc/coreutils.texi (stat invocation): The default value
	of QUOTING_STYLE for the %N format of 'stat --printf' is
	'shell-escape-always'.
	Fixes https://bugs.gnu.org/29563
	Reported by Christian Groessler at
	https://bugzilla.redhat.com/1520399#c3

2017-12-02  Jean Delvare  <jdelvare@suse.de>

	tests: make ls/block-size more readable
	* tests/ls/block-size.sh: The output of the test was hard to read. Add
	comments saying what we are testing to make it easier to understand.

2017-11-29  Bernhard Voelker  <mail@bernhard-voelker.de>
	    Pádraig Brady  <P@draigBrady.com>

	tests: verify usage vs. getopt
	Verify that all options mentioned in usage are actually recognized
	by the program.

	* tests/misc/usage_vs_getopt.sh: Add test.
	* tests/local.mk (all_tests): Reference it.

2017-11-29  Pádraig Brady  <P@draigBrady.com>

	readlink: remove superfluous comma from usage output
	* src/readlink.c (usage): Remove ',' after --quiet option.

2017-11-29  Bernhard Voelker  <mail@bernhard-voelker.de>

	all: use consistent diagnostics for unknown long options
	Previously, e.g. cksum failed to output the offending unknown long
	option:
	  $ cksum --unknown-opt
	  cksum: invalid option -- '-'
	  Try 'cksum --help' for more information.
	i.e., it tried to diagnose '-' as short option.
	Instead, it should diagnose the unknown long option:
	  $ cksum --unknown-opt
	  cksum: unrecognized option '--unknown-opt'
	  Try 'cksum --help' for more information.

	* src/cksum.c (long_options): Add struct with null entry only.
	(main): Use it in the getopt_long call.
	* src/dd.c: Likewise.
	* src/hostid.c: Likewise.
	* src/hostname.c: Likewise.
	* src/link.c: Likewise.
	* src/logname.c: Likewise.
	* src/nohup.c: Likewise.
	* src/sleep.c: Likewise.
	* src/tsort.c: Likewise.
	* src/unlink.c: Likewise.
	* src/uptime.c: Likewise.
	* src/users.c: Likewise.
	* src/whoami.c: Likewise.
	* src/yes.c: Likewise.
	* NEWS (Improvements): Mention the fix.

2017-11-28  Pádraig Brady  <P@draigBrady.com>

	test: fix issues with tests/cp/preserve-mode.sh
	* tests/cp/preserve-mode.sh: This was the only use of awk,
	which may not be available on the system resulting
	in an ineffective test.  Also the permissions bits for
	directories were not being checked at all.

	build: update gnulib submodule to latest
	* gnulib: Update with various build/test fixes.

	build: update gnulib submodule to latest
	* gnulib: Update including various build fixes.

2017-11-27  Bernhard Voelker  <mail@bernhard-voelker.de>

	timeout: also support short -v option
	* src/timeout.c (main): Add short option character 'v' to getopt_long
	call.
	* tests/misc/timeout.sh: Run the test both for the long and the short
	option.

2017-11-24  Pádraig Brady  <P@draigBrady.com>

	dd: support iflag=direct with arbitrary sized files
	* src/dd.c (iread): Handle read error with a non-aligned
	file offset in the O_DIRECT case.  This is not an issue
	on XFS at least, but on EXT4 the final read will return
	EINVAL rather than the expected 0 to indicate EOF.
	* tests/dd/direct.sh: Test the iflag=direct case also.
	* NEWS: Mention the improvement.

2017-11-23  Pádraig Brady  <P@draigBrady.com>

	timeout: add --verbose to diagnose timeouts
	This is useful as handling in shell is complicated
	with the varying exit status in the --kill-after case.

	* src/timeout.c (main): Handle '-v' and store
	COMMAND for the diagnostic.
	(cleanup): Diagnose the signal name before sending.
	(usage): Document -v, --verbose.
	* doc/coreutils.texi (timeout invocation): Likewise.
	* tests/misc/timeout.sh: Add a test case.
	* NEWS: Mention the new feature
	Fixes https://bugs.gnu.org/21760

2017-11-18  Pádraig Brady  <P@draigBrady.com>

	tail: seek to the end of block devices
	* src/tail.c (tail_bytes): Try lseek(..., SEEK_END) when
	we can't determine the file size.
	* tests/tail-2/end-of-device.sh: Add a new root only test.
	* tests/local.mk: Reference the new test.
	* NEWS: Mention the improvement.
	Paul Eggert suggested using lseek() (rather than ioctl(BLKGETSIZE64)).
	Fixes https://bugs.gnu.org/29259

2017-11-14  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: include the module year2038 from gnulib
	* bootstrap.conf (gnulib_modules): Add 'year2038' to ensure that time_t
	is 64-bit (and thus works after 2038).

	Suggested by Bruno Haible in
	https://lists.gnu.org/r/bug-gnulib/2017-11/msg00022.html

2017-11-14  Bernhard Voelker  <mail@bernhard-voelker.de>

	maint: update gnulib to latest
	* gnulib: Update - mainly for the recent year2038 changes.
	* tests/init.sh: Update from gnulib/tests/init.sh.

2017-11-09  Assaf Gordon  <assafgordon@gmail.com>

	doc: add github issue/pull-request templates
	These templates instruct contributors not to use github, and instead
	use the upstream GNU development resources. Discussed in
	http://lists.gnu.org/archive/html/coreutils/2017-11/msg00007.html .

	* .github/ISSUE_TEMPLATE.txt,
	  .github/PULL_REQUEST_TEMPLATE.txt: New files.

2017-11-07  Jim Meyering  <meyering@fb.com>

	maint: make hook script reject "/archive/html" in lists.gnu.org URLS
	* scripts/git-hooks/commit-msg: Require the abbreviated "/r/"
	form in any log message URL.

	maint: shorten https://lists.gnu.org/archive/html/... links
	Each /archive/html/ part can be replace with /r/.
	Run this to induce the change:
	git grep -l archive/html|xargs perl -pi -e 's,/archive/html/,/r/,g'
	* TODO: Perform that substitution.
	* bootstrap: Likewise.
	* src/sort.c (sequential_sort): Likewise.
	* src/tail.c (tail_file): Likewise.
	* tests/misc/sort-merge-fdlimit.sh: Likewise.
	* tests/misc/stty-row-col.sh: Likewise.
	* tests/misc/unexpand.pl: Likewise.
	* tests/rm/readdir-bug.sh: Likewise.
	* tests/tail-2/inotify-rotate.sh: Likewise.

2017-11-06  Thomas Deutschmann  <whissi@gentoo.org>

	tests: avoid false failure with inaccessible mount points
	* tests/ls/readdir-mountpoint-inode.sh: Skip the test
	if any mount points are inaccessible by the current user.
	Fixes https://bugs.gnu.org/29167
	Reported at: https://bugs.gentoo.org/353164

2017-11-05  Bernhard Voelker  <mail@bernhard-voelker.de>

	doc: fix "Up" field of realpath usage examples
	Older versions of 'makeinfo' choke on a missing reference:

	  ./doc/coreutils.texi:14177: `Realpath usage examples' has no Up field\
	  (perhaps incorrect sectioning?).
	  makeinfo: Removing output file `doc/coreutils.info' due to errors; \
	  use --force to preserve.

	* doc/coreutils.texi (realpath invocation): Add a menu referencing
	the usage examples - introduced in v8.27-91-g7449f0d.

2017-11-05  Pádraig Brady  <P@draigBrady.com>

	maint: ensure https:// URLs are used in --help and man pages
	* configure.ac(AC_INIT): Specify the URL explicitly, so we're
	not dependent on unreleased autoconf.

2017-10-31  Assaf Gordon  <assafgordon@gmail.com>

	stat: output default formats for --terse in usage
	Suggested by L A Walsh in https://bugs.gnu.org/28763 .

	* src/stat.c (fmt_terse_fs): Define format for --terse -f here.
	(fmt_terse_regular): Define format for --terse here.
	(fmt_terse_selinux): Likewise for when SELinux is enabled.
	(default_format): Use the above constants.
	(usage): Output the formats for the terse modes.

2017-10-30  Pádraig Brady  <P@draigBrady.com>

	df: fix hang with fifo argument
	* src/df.c (main): stat() before open(), and avoid
	the optional open when given a fifo argument.
	* tests/df/unreadable.sh: Add a test case.
	* NEWS: Mention the fix.
	Fixes https://bugs.gnu.org/29038

2017-10-27  Jim Meyering  <meyering@fb.com>

	build: ls.c: apply _GL_ATTRIBUTE_PURE to more functions
	* src/ls.c (DEFINE_SORT_FUNCTIONS): Apply _GL_ATTRIBUTE_PURE
	to each strcmp-derived function definition, since GCC8 with
	-Wsuggest-attribute=pure now warns it is needed.

2017-10-25  Vincent Lefevre  <vincent@vinc17.net>

	doc: reference statfs(2) in the stat(1) man page
	* man/stat.x (SEE ALSO): Mention statfs(2) in addition to stat(2).
	Note statfs() is generally used rather than statvfs(),
	so we'll defer that reference to the SEE ALSO section of statfs(2).
