2008-05-31  Jim Meyering  <meyering@redhat.com>

	Version 6.12.
	* NEWS: Record release date.

	install: reenable matchpathcon-related code
	The underlying performance problem is being dealt with in Automake
	by limiting the number of install invocations, and in SELinux with
	incremental changes as well as a potential new implementation.
	* src/Makefile.am (ginstall_CPPFLAGS) [ENABLE_MATCHPATHCON]: Define.
	* src/install.c [ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT]:
	Rename to ENABLE_MATCHPATHCON.
	* NEWS: mention this change

2008-05-30  Jim Meyering  <meyering@redhat.com>

	configure.ac: remove explicit use of AB_INIT
	* configure.ac: Don't invoke AB_INIT directly, now that it's
	done automatically via gl_INIT.

	tests: ignore known failure on all Darwin 8.x / Mac OS X v10.4.x
	* tests/chgrp/basic: Update comment and host_triplet version test.

	tests: avoid failure with older version of Perl's File::Temp
	* tests/CuTmpdir.pm (import): Use &File::Temp::cleanup only
	if it is defined.  Reported by Bruno Haible in
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13652

	NEWS: mention that cp -p copies permissions more portably
	Based on wording suggested by Bruno Haible.

2008-05-29  Jim Meyering  <meyering@redhat.com>

	improve description of du's--separate-dirs option
	* coreutils.texi (du invocation): Prompted by Volker Badziong's
	report in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13646

	du.c: tiny cleanup (no semantic change)
	* src/du.c (process_file): Use "file", rather than
	equivalent "ent->fts_path".

2008-05-27  Jim Meyering  <meyering@redhat.com>

	in 280+ tests/* files, use $srcdir, not $top_srcdir/tests

	prefer abs_srcdir over abs_top_srcdir, ...
	so that e.g., tests/* may refer to absolute names without
	hard-coding the name of the containing directory (tests/, here).
	* tests/check.mk (TESTS_ENVIRONMENT): Define abs_srcdir.
	* tests/pr/pr-tests: Use $abs_srcdir/pr not $abs_top_srcdir/tests/pr.
	* tests/chmod/c-option: Use $abs_srcdir, not $abs_top_srcdir/tests.
	* tests/cp/cp-parents: Likewise.
	* tests/mkdir/parents: Likewise.
	* tests/mkdir/perm: Likewise.
	* tests/mv/acl: Likewise.
	* tests/mv/backup-is-src: Likewise.
	* tests/mv/hard-link-1: Likewise.
	* tests/mv/into-self-2: Likewise.
	* tests/mv/leak-fd: Likewise.
	* tests/mv/mv-special-1: Likewise.
	* tests/mv/part-fail: Likewise.
	* tests/mv/part-hardlink: Likewise.
	* tests/mv/part-rename: Likewise.
	* tests/mv/part-symlink: Likewise.
	* tests/mv/partition-perm: Likewise.
	* tests/mv/sticky-to-xpart: Likewise.
	* tests/mv/to-symlink: Likewise.
	* tests/rm/one-file-system: Likewise.
	* tests/sample-test: Likewise.

	tests: generalize my-distcheck
	* maint.mk (my-distcheck): Accommodate missing gnulib-tests.

2008-05-26  Jim Meyering  <meyering@redhat.com>

	reflect renaming of acl.c in gnulib
	* POTFILES.in: s/acl.c/set-mode-acl.c/

	test installation results more thoroughly
	* maint.mk (my-distcheck): Ensure that properly-named binaries
	are installed.  Also check all man pages, except [.1.
	Move configure-time --prefix= to install-time prefix=.
	(my-instcheck, install-transform-check): Define.

	install many binaries at once, when possible
	* src/Makefile.am (install-exec-am): Override the standard
	automake-generated target, so we can decide whether to use
	the usual install-one-by-one rule, or whether we can use
	the new install-many-at-once rule:
	(cu-install-binPROGRAMS): New rule.

	* src/runcon.c: Add copyright comment.

	adjust AUTHORS and check-AUTHORS rule to accommodate
	* AUTHORS: Add coding: utf-8 comment at end.
	Spell François' and Torbjörn's names properly.
	* src/Makefile.am: Parse AUTHORS file more carefully.
	Use perl to join now-split lines.
	Use en_US.UTF-8 to generate --version output.

	* src/c99-to-c89.diff: Adjust offsets.

	adjust copyright dates

	convert the rest to use proper_name -- manually
	* src/base64.c (AUTHORS): Rename from AUTHOR, for consistency.

	convert 3-author programs to use proper_name
	g grep -E -l 'define AUTHORS "[^,]+", "[^,]+", "[^,]+"$'|xargs perl -pi -e \
	  's/(define AUTHORS) ("[^,]+"), ("[^,]+"), ("[^,]+")$/$1 \\\n  proper_name ($2), \\\n  proper_name ($3), \\\n  proper_name ($4)/'

	convert 2-author programs to use proper_name
	g grep -E -l 'define AUTHORS "[^,]+", "[^,]+"$'|xargs perl -pi -e \
	  's/(define AUTHORS) ("[^,]+"), ("[^,]+")$/$1 \\\n  proper_name ($2), \\\n  proper_name ($3)/'

	convert single-author programs to use proper_name
	g grep -E -l 'define AUTHORS "[^,]+"$'|xargs perl -pi -e \
	  's/(define AUTHORS) ("[^,]+")$/$1 proper_name ($2)/'

	use gnulib's proper_name_utf8 function, but *not* proper_name
	* bootstrap.conf (gnulib_modules): Add propername.
	(XGETTEXT_OPTIONS): Add options to tell xgettext about the functions.
	* src/cat.c, src/cp.c, src/df.c, src/du.c, src/split.c:
	Mark Torbjörn Granlund's name.
	* src/ptx.c: Mark François Pinard's name.
	Use "TRANSLATORS:" comment marker, rather than "Note to translators:".
	* src/system.h: Include propername.h.
	(proper_name): Define away.
	* src/Makefile.am (cat_LDADD, df_LDADD, du_LDADD, ptx_LDADD, split_LDADD):
	Initialize, so we can...
	(cat_LDADD, cp_LDADD, df_LDADD, du_LDADD, ptx_LDADD, split_LDADD):
	...Use "+=" to append $(LIBICONV) for each program that uses
	proper_name_utf8.

2008-05-24  Jim Meyering  <meyering@redhat.com>

	* POTFILES.in: Add lib/copy-acl.c.

2008-05-20  Jim Meyering  <meyering@redhat.com>

	install: avoid a leak in currently-ifdef'd-out code
	* src/install.c (setdefaultfilecon)
	[ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT]:
	Call matchpathcon_init_prefix only once.
	Suggestion from Stephen Smalley.  Reported by Ben Webb in
	<http://bugzilla.redhat.com/447410>.

2008-05-19  Jim Meyering  <meyering@redhat.com>

	use gnulib's base64 module, now that it's sync'd to match this one
	* gl/lib/base64.c: Remove file.
	* gl/lib/base64.h: Remove file.

2008-05-19  Pádraig Brady  <P@draigBrady.com>

	doc: clarify field delimiter description in uniq --help output
	* src/uniq.c: Clarify in help output that field delimiters are
	blanks and not the larger set of whitespace characters.

2008-05-17  Jim Meyering  <meyering@redhat.com>

	tests: skip when a debian libc6-2.7-11 bug makes printf segfault
	* tests/misc/printf-surprise: Detect case of a low-memory-provoked
	segfault and skip the test (this is actually a bug in snprintf).
	For details, see http://bugs.debian.org/481543

	tests: sync and update wc and du --files0-from tests
	* tests/du/files0-from: Sync from tests/misc/wc-files0-from.
	(minus-in-minus): New test.
	Adjust for new diagnostics.
	* tests/misc/wc-files0-from: Adjust for new diagnostics.

	du, wc: merge improved --files0-from=F-related diagnostics
	du gave a better diagnostic for one unusual case,
	and wc gave a better diagnostic for a different one.
	Now each diagnoses both unusual cases.
	* src/du.c (main): Disallow '-' as file name when reading from stdin.
	* src/wc.c (main): Give a better diagnostic for a zero-length file name.

	test invalid-option handling in all programs
	* tests/Makefile.am (TESTS): Add misc/invalid-opt.
	* tests/misc/invalid-opt: New file.

	tests: remove ugly /bin/sh wrapper around each perl-based test script
	* tests/check.mk (TESTS_ENVIRONMENT): Save and restore TMPDIR around
	envvar-check, so that the few scripts that require $TMPDIR don't fail.
	This is also good to let a user's default TMPDIR setting be used e.g.,
	in the search for an 'other-partition'.
	FIXME: this is pretty ugly.  maybe undo it and find a better way.
	(TESTS_ENVIRONMENT): Invoke perl scripts with $(PERL), and use -T
	if the script requires that.  Otherwise, use $(SHELL).

	* tests/misc/md5sum-newline: Create a file whose name contains
	a newline in Perl (resort to using "system", since open refuses).

	Fix old brokenness exposed by this change:
	* tests/du/files0-from: Correct test not to rely on stdin
	being attached to a non-tty.
	* tests/misc/sort (3g, 3h, 3i): Likewise: add explicit empty input file.
	Avoid warnings about using qw()-around-commas.

	* tests/rm/fail-eperm: Now that this test is run from a temporary
	subdirectory, adjust the full name of the "rm" program we're going
	to run.

	Change #!/bin/sh to #!/usr/bin/perl, and factor out the few lines
	of boilerplate code to invoke perl.  Do not "require 5.00x";
	a configure-time Perl test handles that
	* tests/dd/skip-seek:
	* tests/misc/base64:
	* tests/misc/basename:
	* tests/misc/cut:
	* tests/misc/date:
	* tests/misc/dircolors:
	* tests/misc/dirname:
	* tests/misc/expand:
	* tests/misc/expr:
	* tests/misc/factor:
	* tests/misc/fmt:
	* tests/misc/fold:
	* tests/misc/head:
	* tests/misc/head-elide-tail:
	* tests/misc/join:
	* tests/misc/ls-misc:
	* tests/misc/md5sum:
	* tests/misc/md5sum-newline:
	* tests/misc/mktemp:
	* tests/misc/od:
	* tests/misc/paste:
	* tests/misc/pr:
	* tests/misc/printf-cov:
	* tests/misc/seq:
	* tests/misc/sha1sum:
	* tests/misc/sha1sum-vec:
	* tests/misc/sha224sum:
	* tests/misc/sha256sum:
	* tests/misc/sha384sum:
	* tests/misc/sha512sum:
	* tests/misc/sort-merge:
	* tests/misc/stat-printf:
	* tests/misc/sum:
	* tests/misc/tac:
	* tests/misc/tail:
	* tests/misc/test:
	* tests/misc/test-diag:
	* tests/misc/tr:
	* tests/misc/tsort:
	* tests/misc/tty-eof:
	* tests/misc/unexpand:
	* tests/misc/uniq:
	* tests/misc/wc:
	* tests/misc/wc-files0-from:
	* tests/misc/xstrtol:
	* tests/mv/i-1:
	* tests/pr/pr-tests:
	* tests/rm/empty-name:
	* tests/rm/fail-eperm:
	* tests/rm/unreadable:

2008-05-16  Jim Meyering  <meyering@redhat.com>

	tests: allow to run Perl tests more cleanly
	Before this change, perl tests were run via a #!/bin/sh script
	in which perl was invoked via $(PERL) ... -- - <<\EOF.
	That made some stty tests fail due to the way stdin was usurped.
	* build-aux/check.mk (am__check_pre): Don't append $(SHELL) to this
	nominally automake-internal variable.
	* tests/check.mk (TESTS_ENVIRONMENT): Instead, define a shell function
	here, and append it to the more user-visible $(TESTS_ENVIRONMENT).

	tests: env-related clean up
	* tests/Coreutils.pm: tiny clean-up: s/env/env --/
	* tests/misc/help-version: Use "env" rather than an absolute file
	name prefix.
	* tests/misc/printf-surprise: Likewise.

	tests: improve coverage of printf.c
	* tests/misc/printf-cov: New file.
	* tests/Makefile.am (TESTS): Add misc/printf-cov.
	* tests/misc/help-version: Use env rather than abs file name prefix.

	make HACKING slightly more generic
	* HACKING: remove some uses of "coreutils"
	Point to git's own SubmittingPatches URL.

2008-05-15  Bruno Haible  <bruno@clisp.org>

	doc: some Unicode characters cannot be specified via \u or \U
	* doc/coreutils.texi (printf invocation): Clarify invalid ranges for
	Unicode character escape syntax.

2008-05-11  Jim Meyering  <meyering@redhat.com>

	move sha256 and sha512 modules to gnulib
	* bootstrap.conf (gnulib_modules) [sha256, sha512]: Add "crypto/"
	prefix to module name, now that they come from gnulib.
	* gl/lib/sha256.c: Remove file.
	* gl/lib/sha256.h: Likewise.
	* gl/lib/sha512.c: Likewise.
	* gl/lib/sha512.h: Likewise.
	* gl/lib/u64.h: Likewise.
	* gl/m4/sha256.m4: Likewise.
	* gl/m4/sha512.m4: Likewise.
	* gl/modules/sha256: Likewise.
	* gl/modules/sha512: Likewise.

2008-05-10  Jim Meyering  <meyering@redhat.com>

	now that the last of the mk-script-using tests is gone...
	* tests/Makefile.am (EXTRA_DIST): Remove Makefile.am.in and mk-script.
	Move/adjust SUBDIRS-related comments.
	* tests/Makefile.am.in: Remove file, no longer used.
	* tests/mk-script: Likewise.
	* bootstrap: Remove coreutils-specific SUBDIRS-related code.

	tests: remove directory, tests/join/
	* configure.ac (AC_CONFIG_FILES): Remove tests/join/Makefile.
	* tests/misc/join: New file, with tests from...
	* tests/join/Test.pm: ...here.  Remove file.
	* tests/Makefile.am (SUBDIRS): Remove definition.

	* tests/misc/tac: Also perform stdin and piped tests.

	tests: convert pr tests
	* configure.ac (AC_CONFIG_FILES): Remove tests/pr/Makefile.
	* tests/Makefile.am (SUBDIRS): Remove pr.
	* tests/pr/pr-tests: New file, with tests from...
	* tests/pr/Test.pm: ...here.  Remove file.
	* tests/Makefile.am (EXTRA_DIST): Add $(pr_data).
	(pr_data): List all of the pr's test-related data files.

	tests: remove directory, tests/tail/
	* configure.ac (AC_CONFIG_FILES): Remove tests/tail/Makefile.
	* tests/Makefile.am (SUBDIRS): Remove tail.
	* tests/misc/tail: New file, with tests from...
	* tests/tail/Test.pm: ...here.  Remove file.

2008-05-09  Bernhard Marx  <berny@bernhard-marx.de>

	doc: improve description of "niceness" values
	* doc/coreutils.texi (nice invocation):

2008-05-09  Jim Meyering  <meyering@redhat.com>

	tests: remove directory, tests/sort/
	* configure.ac (AC_CONFIG_FILES): Remove tests/sort/Makefile.
	* tests/Makefile.am (SUBDIRS): Remove sort.
	* tests/misc/sort: New file, with tests from...
	* tests/sort/Test.pm: ...here.  Remove file.

2008-05-08  Bruno Haible  <bruno@clisp.org>

	Speed up "wc -m" and "wc -w" in multibyte case.
	* src/wc.c: Include mbchar.h.
	(wc): New variable in_shift. Use it to avoid calling mbrtowc for most
	ASCII characters.  Reported via Jan Engelhardt in
	http://bugzilla.novell.com/381873 with discussion here
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13520

2008-05-08  Jim Meyering  <meyering@redhat.com>

	tests: remove directory, tests/tac/
	* configure.ac (AC_CONFIG_FILES): Remove tests/tac/Makefile.
	* tests/Makefile.am (SUBDIRS): Remove tac.
	* tests/misc/tac: Many new tests, from...
	* tests/tac/Test.pm: ...here.  Remove file.

	tests: remove directory, tests/test/
	* configure.ac (AC_CONFIG_FILES): Remove tests/test/Makefile.
	* tests/Makefile.am (SUBDIRS): Remove test.
	* tests/misc/test: Many new tests, from...
	* tests/test/Test.pm: ...here.  Remove file.

	tests: Coreutils.pm: support running a program that is a shell built-in
	* tests/Coreutils.pm (run_tests): Add support for running a
	program like 'test', that is a shell built-in.

2008-05-06  Jim Meyering  <meyering@redhat.com>

	* TODO: Bo Borgerson is rewriting support for cp --recursive

	tests: remove directory, tests/tr/
	* configure.ac (AC_CONFIG_FILES): Remove tests/tr/Makefile.
	* tests/Makefile.am (SUBDIRS): Remove tr.
	* tests/misc/tr: Many new tests, from...
	* tests/tr/Test.pm: ...here.  Remove file.
	* tests/tr/failures: Remove file.
	* tests/tr/TODO: Remove file.

	tests: skip another test if mcstransd is running
	* tests/test-lib.sh (skip_if_mcstransd_is_running_): New function,
	extracted from...
	* tests/misc/chcon: ...here.  Use function, not open-coded test.
	* tests/misc/selinux: Use the function here, too.
	Require root, not non-root.
	* tests/Makefile.am (root_tests): Add misc/selinux.

	tests: translate uniq-z-test-adding code to new framework
	* tests/misc/uniq (add-z-variants): New function.
	Use it.

	tests: remove directory, tests/uniq/
	* configure.ac (AC_CONFIG_FILES): Remove tests/uniq/Makefile.
	* tests/Makefile.am (SUBDIRS): Remove uniq.
	* tests/misc/uniq: Many new tests, from...
	* tests/uniq/Test.pm: ...here.  Remove file.

	tests: remove directory, tests/cut/
	* configure.ac (AC_CONFIG_FILES): Remove tests/cut/Makefile.
	* tests/Makefile.am (SUBDIRS): Remove cut.
	* tests/misc/cut: Many new tests, from...
	* tests/cut/Test.pm: ...here.  Remove file.

	tests: remove directory, tests/head/
	* configure.ac (AC_CONFIG_FILES): Remove tests/head/Makefile.
	* tests/Makefile.am (SUBDIRS): Remove head.
	* tests/misc/head: New file, derived from ...
	* tests/head/Test.pm: ...this.  Remove file.
	* tests/head/in: Remove file.
	* tests/head/in-1024: Remove file.
	* tests/Coreutils.pm (triple_test): New function.

	tests: Coreutils.pm improvements
	* tests/Coreutils.pm: Allow test names longer than 12.
	Print a useful diagnostic for bogus spec entry.

	Handle the combination of IN_PIPE and ENV properly.
	* tests/Coreutils.pm (run_tests): Put ENV right before command,
	not before the "cat INPUT_FILE |" prefix.

	tests: move "sparse-file" into test-lib.sh
	* tests/sparse-file: Remove file  Move contents into ...
	* tests/test-lib.sh (require_sparse_support_): ...here.  New function.
	* tests/cp/sparse: Use the function, not the file.
	* tests/du/8gb: Likewise.
	* tests/Makefile.am (EXTRA_DIST): Remove sparse-file.

	tests: move "group-names" into test-lib.sh
	* tests/group-names: Remove file  Move contents into ...
	* tests/test-lib.sh (require_membership_in_two_groups_): ...here.  New function.
	* tests/chgrp/basic: Use the function, not the file.
	* tests/chgrp/default-no-deref: Likewise.
	* tests/chgrp/deref: Likewise.
	* tests/chgrp/no-x: Likewise.
	* tests/chgrp/posix-H: Likewise.
	* tests/chgrp/recurse: Likewise.
	* tests/cp/existing-perm-race: Likewise.
	* tests/Makefile.am (EXTRA_DIST): Remove group-names.

	tests: use printf+sed rather than yes+head+tr
	* tests/misc/fmt-long-line: Minor clean-up.
	Using "yes" like that has caused trouble in the past.

	tests: save and restore TERM around use of TESTS_ENVIRONMENT,
	now that TESTS_ENVIRONMENT unsets it.
	* check.mk (am__check_pre): Save $TERM.
	(am__check_post): Restore saved value of TERM and export.

	tests: hoist the sourcing of "lang-default"
	* tests/check.mk (TESTS_ENVIRONMENT): Source lang-default here, ...
	... rather than in each of 100+ test scripts.
	* tests/chgrp/basic:
	* tests/chgrp/no-x:
	* tests/chmod/c-option:
	* tests/chmod/no-x:
	* tests/chmod/setgid:
	* tests/chmod/thru-dangling:
	* tests/chmod/umask-x:
	* tests/chmod/usage:
	* tests/chown/basic:
	* tests/chown/deref:
	* tests/chown/preserve-root:
	* tests/cp/abuse:
	* tests/cp/acl:
	* tests/cp/backup-is-src:
	* tests/cp/cp-a-selinux:
	* tests/cp/cp-i:
	* tests/cp/cp-mv-backup:
	* tests/cp/deref-slink:
	* tests/cp/fail-perm:
	* tests/cp/into-self:
	* tests/cp/link-preserve:
	* tests/cp/preserve-gid:
	* tests/cp/same-file:
	* tests/cp/slink-2-slink:
	* tests/cp/special-f:
	* tests/cp/symlink-slash:
	* tests/cp/thru-dangling:
	* tests/du/basic:
	* tests/du/hard-link:
	* tests/du/inacc-dest:
	* tests/du/long-sloop:
	* tests/du/no-x:
	* tests/install/basic-1:
	* tests/ln/hard-backup:
	* tests/ln/sf-1:
	* tests/ls/file-type:
	* tests/ls/infloop:
	* tests/ls/nameless-uid:
	* tests/ls/rt-1:
	* tests/ls/stat-failed:
	* tests/ls/symlink-slash:
	* tests/ls/x-option:
	* tests/misc/chcon:
	* tests/misc/chcon-fail:
	* tests/misc/csplit:
	* tests/misc/df-P:
	* tests/misc/groups-dash:
	* tests/misc/groups-version:
	* tests/misc/nohup:
	* tests/misc/printf-surprise:
	* tests/misc/runcon-no-reorder:
	* tests/misc/selinux:
	* tests/misc/split-a:
	* tests/misc/split-fail:
	* tests/misc/tac-continue:
	* tests/misc/wc-files0:
	* tests/mkdir/p-v:
	* tests/mkdir/selinux:
	* tests/mv/acl:
	* tests/mv/backup-dir:
	* tests/mv/backup-is-src:
	* tests/mv/childproof:
	* tests/mv/diag:
	* tests/mv/dir2dir:
	* tests/mv/dup-source:
	* tests/mv/force:
	* tests/mv/hard-link-1:
	* tests/mv/hard-verbose:
	* tests/mv/i-2:
	* tests/mv/i-3:
	* tests/mv/i-4:
	* tests/mv/i-5:
	* tests/mv/i-link-no:
	* tests/mv/into-self:
	* tests/mv/into-self-2:
	* tests/mv/into-self-3:
	* tests/mv/mv-special-1:
	* tests/mv/part-fail:
	* tests/mv/part-symlink:
	* tests/mv/partition-perm:
	* tests/mv/perm-1:
	* tests/mv/reply-no:
	* tests/mv/sticky-to-xpart:
	* tests/mv/update:
	* tests/rm/cycle:
	* tests/rm/dir-no-w:
	* tests/rm/dir-nonrecur:
	* tests/rm/fail-2eperm:
	* tests/rm/fail-eacces:
	* tests/rm/inaccessible:
	* tests/rm/interactive-always:
	* tests/rm/interactive-once:
	* tests/rm/isatty:
	* tests/rm/one-file-system:
	* tests/rm/r-1:
	* tests/rm/r-2:
	* tests/rm/rm1:
	* tests/rm/rm2:
	* tests/rm/rm3:
	* tests/rm/rm4:
	* tests/rm/rm5:
	* tests/rm/unread2:
	* tests/rm/v-slash:
	* tests/touch/fail-diag:
	* tests/touch/not-owner:

	tests: hoist envvar-check so it is run for every test
	I.e., also for Perl-based tests; not just the ones using test-lib.sh.
	* tests/check.mk (TESTS_ENVIRONMENT): Source envvar-check here, ...
	* tests/test-lib.sh: ...not here.

	fix typo in comments: s/ouput/output/
	adjust spelling in that same comment: s/localisation/localization/

	* tests/touch/Makefile.am: Remove now-unused file.

	tests: test split more thoroughly
	* tests/misc/split-a: Clean up.  Catch more failures.

	* tests/misc/wc: Remove an unused variable.

	tests: detect and check more uses of strcmp
	* maint.mk (sc_prohibit_strcmp): Relax regexp to recognize other
	formatting styles.

	avoid problems with sign-extended "char" operand to is* functions
	* src/cut.c (set_fields): Apply to_uchar to isblank operands.
	* src/uniq.c (find_field): Likewise.
	* src/seq.c (scan_arg): Likewise, for isspace.
	* tests/misc/uniq: New file.  Test for the above, but only
	when isspace(0240).
	* tests/Makefile.am (TESTS): Add misc/uniq.
	* configure.ac: Use gt_LOCALE_FR.
	* tests/check.mk (TESTS_ENVIRONMENT): Propagate LOCALE_FR to scripts.
	* NEWS: Mention the bug fixes.

	Before this patch, on FreeBSD 6:

	  $ printf 'x y z\nx \xa0 y z\n' > in
	  $ LC_ALL=fr_FR.UTF-8 uniq -f2 in|tr ' ' .
	  x.y.z
	  x. .y.z

	With the patch:

	  $ LC_ALL=fr_FR.UTF-8 uniq -f2 in|tr ' ' .
	  x.y.z

	This also affected many other locales:
	for i in $(locale -a); do test $(LC_ALL=$i ./uniq -f1 in|wc -l)
	  = $(LC_ALL=$i uniq -f1 in|wc -l) || echo $i ; done
	...
	en_GB.ISO8859-1
	en_GB.ISO8859-15
	en_GB.UTF-8
	en_IE.UTF-8
	en_NZ.ISO8859-1
	en_NZ.ISO8859-15
	en_NZ.UTF-8
	en_US.ISO8859-1
	en_US.ISO8859-15
	en_US.UTF-8
	...

2008-05-06  Bo Borgerson  <gigabo@gmail.com>

	base64: remove some unused/redundant getopt code
	* src/base64.c (struct option long_option): Remove redundant help/version
	option items.
	(main): Remove unused 'q' from short options.

2008-05-06  Jim Meyering  <meyering@redhat.com>

	help2man: fix perl 5.10 problem properly
	* man/help2man: Do pull LC_ALL via "use POSIX".
	Instead, limit the importing of gettext-related symbols
	to just those two we'll use: gettext and textdomain.

2008-05-05  Jim Meyering  <meyering@redhat.com>

	help2man: avoid failure with Debian unstable's Perl 5.10.0
	Avoid failure that produced this diagnostic:
	Constant subroutine main::LC_ALL redefined at /.../Exporter.pm
	* man/help2man: Don't include LC_ALL in the "use POSIX" list,
	since Locale::gettext->import will get it.

2008-05-05  Bo Borgerson  <gigabo@gmail.com>

	base64 module: adjust API so it's compatible with gnulib's
	* gl/lib/base64.c (base64_decode_ctx): If no context structure was passed in,
	treat newlines as garbage (this is the historical behavior).  Formerly
	base64_decode.
	(base64_decode_alloc_ctx): Formerly base64_decode_alloc.
	* gl/lib/base64.h (base64_decode): Macro for four-argument calls.
	(base64_decode_alloc): Likewise.
	* src/base64.c (do_decode): Call base64_decode_ctx instead of base64_decode.

2008-05-05  Jim Meyering  <meyering@redhat.com>

	* tests/misc/tac: Set execute bit.

	tac: avoid segfault for e.g., "echo > x; tac -r x x"
	* src/tac.c (tac_seekable): Move local "regs" declaration out
	to file scope, so its values aren't clobbered between calls.
	Discovered by Cristian Cadar, Daniel Dunbar and Dawson Engler,
	reported in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13501
	* NEWS: Mention the bug fix.
	* tests/Makefile.am (TESTS): Add misc/tac.
	* tests/misc/tac: New file.  Test for the above.

2008-04-30  Jim Meyering  <meyering@redhat.com>

	tests: avoid a "make check-root" failure when mcstransd is running
	* tests/misc/chcon: Skip this test if mcstransd seems to be running.

	tests: avoid spurious "make check-root" failure
	* README (Running tests as root): Also set PATH in suggested "sudo"
	command.  This avoids failure of at least tests/cp/cp-a-selinux
	when the default PATH does not contain /sbin.
	* tests/cp/cp-a-selinux: Don't redirect stderr to /dev/null.
	"mkfs" was failing due to /sbin not being in PATH.

2008-04-30  Bo Borgerson  <gigabo@gmail.com>

	Add Daniel Dunbar's lcov instructions to HACKING
	* HACKING: New section `Finding things to do', points to TODO file and
	gives instructions on generating an html coverage report as provided by
	Daniel Dunbar.
	* TODO: Add item for improving test coverage.  Point back to HACKING.

2008-04-29  Jim Meyering  <meyering@redhat.com>

	chcon, runcon: make --help print the bug-reporting address
	* src/chcon.c (usage): Use emit_bug_reporting_address.
	* src/runcon.c (usage): Likewise.
	* tests/misc/help-version: Don't exempt chcon and runcon.
	* NEWS: Mention this.

2008-04-28  Jim Meyering  <meyering@redhat.com>

	tests: don't hard-code coreutils list of tests/ SUBDIRS in bootstrap
	* bootstrap: Extract the list from tests/Makefile.am, and die
	when it is empty -- it will be, eventually.

2008-04-28  Bo Borgerson  <gigabo@gmail.com>

	tests: remove references to tests/wc from bootstrap
	* bootstrap: Don't try to initialize anything in tests/wc.

2008-04-28  Jim Meyering  <meyering@redhat.com>

	tests: slightly relax sc_cast_of_argument_to_free syntax check
	* maint.mk (sc_cast_of_argument_to_free): Relax regexp slightly.
	(sc_no_have_config_h): Add a comment.

2008-04-28  Bo Borgerson  <gigabo@gmail.com>

	tests: don't chmod after a failed chdir in cleanup
	* tests/CuTmpdir.pm (chmod_tree): Don't chmod if chdir failed.

	Only cleanup test dirs from the process that created them.
	* tests/CuTmpdir.pm (import): Use closure around current PID to avoid cleanup races.

2008-04-27  Jim Meyering  <meyering@redhat.com>

	move wc tests from own subdir into a single script
	* configure.ac (AC_CONFIG_FILES): Remove wc/Makefile from the list.
	* tests/Makefile.am (SUBDIRS): Remove wc from the list.
	(TESTS): Add misc/wc.
	* tests/misc/wc: New file, derived from tests/wc/Tests.pm.
	* tests/wc/Test.pm: Remove file.

	tests: remove temporary log file upon catchable signal
	* check.mk (am__check_pre): Add signal handler to remove $@-t.

	tests: don't source envvar-check manually, test-lib.sh does it
	* tests/cp/abuse: Remove ". $top_srcdir/tests/envvar-check".
	* tests/cp/parent-perm: Likewise.
	* tests/cp/special-f: Likewise.
	* tests/ls/proc-selinux-segfault: Likewise.
	* tests/misc/help-version: Likewise.
	* tests/mkdir/selinux: Likewise.
	* tests/mv/sticky-to-xpart: Likewise.
	* tests/touch/now-owned-by-other: Likewise.
	* tests/sample-test: Remove commented out suggestion.

	tests: ensure at least one failure when $built_programs is empty
	Before, this test and others would pass with empty $built_programs.
	* tests/misc/help-version: Fail if built_programs is empty.

	tests: improve perl-based tempdir handling
	Before, upon interrupt, directories would be left behind.
	* tests/CuTmpdir.pm: Remove temporary directory on interrupt.

	tests: reorder some tests in the long list
	* tests/Makefile.am (TESTS): Move some tests that use sleep
	"up" in the list so that they don't delay even a little the
	completion of "make check".  Also run a chmod test early.

	tests: put root-only (usually skipped) tests at the end
	* tests/Makefile.am (TESTS): Don't list root-only tests explicitly.
	Instead, just use $(root_tests).
	* tests/check.mk (vc_exe_in_TESTS): Now that root_tests are separate,
	parse out the union of $(TESTS) and $(root_tests).

	tests: move another file (expensive) into test-lib.sh
	* tests/expensive: Remove file.  Move contents into ...
	* tests/test-lib.sh (expensive_): ...here.  New function.
	* tests/du/fd-leak: Update caller to use the new function.
	* tests/mv/leak-fd: Likewise.
	* tests/rm/hash: Likewise.
	* tests/tail-2/big-4gb: Likewise.
	* tests/Makefile.am (EXTRA_DIST): Remove its name.

	tests: cp/perm (usually not run) was failing on systems with SELinux
	* tests/cp/perm: Use stat to get the permission string, not ls.
	This test was run only when RUN_VERY_EXPENSIVE_TESTS=yes was set
	in the environment.  It would fail on SELinux-enable systems
	because ls-generated permission strings would not match, e.g.,
	"test _-rw-r--r--+ = _-rw-r--r--" would fail.

	tweak HACKING advice

2008-04-24  Jim Meyering  <meyering@redhat.com>

	tests: do define built_programs
	* tests/check.mk (built_programs): Define here, where it's used.
	This definition was in now-removed tests/misc/Makefile.am.

2008-04-23  Jim Meyering  <meyering@redhat.com>

	tests: update commented-out examples in sample-test, too
	* tests/sample-test: Use $top_srcdir/tests/SCRIPT_NAME, not
	$top_srcdir/../SCRIPT_NAME here, too.

2008-04-23  Ondřej Vašík  <ovasik@redhat.com>

	tests: don't fail in a non-English locale
	* tests/chmod/thru-dangling: Source lang-default.
	* tests/cp/thru-dangling: Likewise.
	* tests/misc/printf-surprise: Likewise.

2008-04-23  Jim Meyering  <meyering@redhat.com>

	tests: remove now-unused Makefile.am
	* tests/misc/Makefile.am: Remove file.

2008-04-23  Ondřej Vašík  <ovasik@redhat.com>

	id: do not print SELinux context when invoked with a USERNAME argument
	* NEWS: Mention new behaviour.
	* src/id.c (main): Do not print SELinux context when user is specified.
	* tests/Makefile.am: Add the new test.
	* tests/misc/id-context: New file.  Test for the fix.
	Problem reported by Ronny Buchmann in http://bugzilla.redhat.com/443485.

2008-04-23  Jim Meyering  <meyering@redhat.com>

	id: do print the AFS-specific nameless group ID (called a PAG)
	In 6.11, we mistakenly suppressed the printing of certain group IDs,
	thinking they were useless AFS-specific artifacts.
	This change reverts that, so now they are printed once again.
	http://thread.gmane.org/gmane.org.fsf.announce/867/focus=13345
	This also reverts the bug-fix that applied solely to the new code
	used to avoid printing those IDs

	Revert "id bug fix: don't point to potentially clobbered static storage"
	This reverts commit f7d1c59c224f81a8bab5fa2afcaf815988f50467.
	Revert "Work around AFS bug: id and groups would print invalid group number."
	This reverts commit b7a836c0a3524cda8ef79c30c3fe7ea759ae4656.
	Revert "* src/c99-to-c89.diff: Accommodate a C99-ism in id.c."
	This reverts commit d44893c5dba4150b4ded9cf6aad316c1ef620c9f.

2008-04-22  Jim Meyering  <meyering@redhat.com>

	build: move a project-specific definition to cfg.mk
	* cfg.mk (old_NEWS_hash): Define here, ...
	* maint.mk: ... not here.
	(update-NEWS-hash): Update comment.
	Suggestion from Eric Blake.

	Accommodate building on OS/2 (www.ecomstation.com Ecs v2 rc4)
	* configure.ac: Filter out carriage returns in more places.
	Reported by Elbert Pol, details here:
	http://thread.gmane.org/gmane.org.fsf.announce/867/focus=13332

	guard against inserting a NEWS entry into a block for a prior release
	Without a guard like this, it is far too easy to apply a patch
	prepared against a preceding release, and not notice that a NEWS
	entry is inserted into the wrong block.
	* maint.mk (sc_immutable_NEWS): New rule.
	(update-NEWS-hash): New rule to update the hard-coded hash.

	tests: ensure that all exec-$PERL lines are the same
	* maint.mk (sc_perl_coreutils_test): New rule.

2008-04-21  Jim Meyering  <meyering@redhat.com>

	tests: skip (don't fail) rm/one-file-system when mount --bind fails
	* tests/rm/one-file-system: Reported by Allen Hewes.

	tests: convert umask-check to a function
	* tests/test-lib.sh (working_umask_or_skip_): New function, from...
	* tests/umask-check: ...here.  Remove file.
	* tests/Makefile.am (EXTRA_DIST): Remove umask-check.
	* tests/mkdir/perm: Use the function rather than sourcing the file.
	* tests/cp/cp-parents: Likewise.
	* tests/cp/parent-perm: Likewise.
	Bruno Haible reported that parent-perm was failing to run umask-check.

	tests: adjust perl -I to use $top_srcdir/tests, not $srcdir/..

	tests: clean up root tests; adapt to new layout
	* tests/Makefile.am (root_tests): New list.
	(check-root): Add 'SUBDIRS='.
	(root-hint): Point to README.
	* Makefile.am (check-root): Add 'SUBDIRS=' here, too.
	* maint.mk (sc_root_tests): Adapt rule to new syntax used
	in tests/Makefile.am.

	Revamp test-related Makefiles.
	One side-effect of this change is that "make check" now works even if
	you put "." early in your shell's search PATH (don't do that!).

	Remove all test-related Makefile.am files, except those generated
	by mk-script.  Instead, tests/Makefile.am now lists not only the
	tests directly under tests/, but also those in tests/*/ that are
	not generated by mk-script, e.g., cp/abuse, cp/acl, mv/i-1, etc.

	A lot of these changes are like this:

	-. $srcdir/../lang-default
	+. $top_srcdir/tests/lang-default

	-. $srcdir/../test-lib.sh
	+. $top_srcdir/tests/test-lib.sh

	* configure.ac (AC_CONFIG_FILES): Remove corresponding Makefiles.
	* tests/check.mk (vc_exe_in_TESTS): Relax syntax requirements.
	* tests/rwx-to-mode: Remove file.  Rewritten as...
	* tests/test-lib.sh (rwx_to_mode_): ...this new function.
	* tests/Makefile.am (EXTRA_DIST): Remove rwx-to-mode.
	(SUBDIRS): Remove each dir with a removed Makefile.am.
	(EXTRA_DIST): Add $(TESTS).
	(TESTS): Add over 300 entries.

2008-04-20  Jim Meyering  <meyering@redhat.com>

	* tests/misc/Makefile.am (built_programs): Remove.  Unused.

	Use "env" to invoke potential built-ins.
	* tests/misc/pwd-unreadable-parent: Invoke pwd via "env -- pwd",
	rather than via an absolute name.
	* tests/touch/not-owner: Likewise for test.
	* tests/chmod/setgid: Likewise.

2008-04-19  Jim Meyering  <meyering@redhat.com>

	* .prev-version: Record previous version: 6.11.

	Version 6.11.
	* NEWS: Record release date.

	* maint.mk (writable-files): Fix syntax error.

	* doc/.gitignore: Add texinfo-related outputs.

2008-04-19  Sven Joachim  <svenjoac@gmx.de>

	* THANKS: Update my address, correct encoding for a name.

2008-04-19  Jim Meyering  <meyering@redhat.com>

	pr -e, with a mix of backspaces and TABs, could corrupt the heap
	* tests/pr/Test.pm: New tests for the above.
	* src/pr.c (char_to_clump): Ensure that "input_position" never
	goes below 0.
	Also, elide any backspace encountered when input_position is 0,
	to be compatible at least with /bin/pr from Solaris 10.
	This bug is present in the original version:
	b25038ce9a234ea0906ddcbd8a0012e917e6c661
	* NEWS [Bug fixes]: Mention this.
	Report and diagnosis by Cristian Cadar, Daniel Dunbar and Dawson Engler
	in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13272

2008-04-19  Mike Frysinger  <vapier@gentoo.org>

	* src/dircolors.hin: Add .flv.  Move .svgz to "image formats".

2008-04-19  Jim Meyering  <meyering@redhat.com>

	md5sum -c: ignore a line with a NUL byte among checksum hex digits
	* src/md5sum.c (hex_digits): Require that all "digest_hex_bytes"
	be hexadecimal digits, not just those before the first NUL byte.
	This bug dates back to the original version:
	3763a4f24eb21be40674d13ff7b04e078f473e85
	* tests/misc/md5sum (nul-in-cksum): Test for the above.
	* NEWS [Bug fixes]: Mention this.
	Prompted by a report from Flóki Pálsson in
	http://bugzilla.redhat.com/439531

2008-04-16  Matthew Woehlke  <mw_triad@users.sourceforge.net>

	tests: accommodate built-in mknod more cleanly still
	* tests/mkdir/selinux: Use "env" rather than "nice".

2008-04-16  Jim Meyering  <meyering@redhat.com>

	tests: accommodate built-in mknod more cleanly
	* tests/mkdir/selinux: Undo most of previous change,
	bc22dbbf844f31ddaf2e68b167d0128a985d73ab, and instead
	invoke the command via "nice".  Using "exec" should be
	enough, but isn't with OpenBSD's PD KSH v5.2.14 99/07/13.2.
	Eric Blake suggested using nice.

	mknod --help: note that this command may be a shell built-in
	* src/mknod.c (usage): Print USAGE_BUILTIN_WARNING.
	Suggestion from Eric Blake.

	avoid "may be used uninitialized" warning from newer gcc
	* src/md5sum.c (digest_check) [lint]: Initialize local, "filename".

	tests: add a comment explaining the potential failure

	tests: avoid mkdir/selinux failure when mknod is a shell built-in
	* tests/mkdir/selinux: Skip the mknod test if it's a built-in.

2008-04-15  Jim Meyering  <meyering@redhat.com>

	md5sum, sha1sum, etc: handle invalid input (i.e., don't segfault)
	* src/md5sum.c (bsd_split_3): Return right away if s_len == 0.
	* tests/misc/md5sum (bsd-segv): New test for the above.
	* tests/misc/sha1sum (bsd-segv): Likewise.
	* NEWS: Mention the bug fix.
	Reported by Cristian Cadar, Daniel Dunbar and Dawson Engler.

2008-04-14  Jim Meyering  <meyering@redhat.com>

	tests: don't fail on systems without a "stat" syscall
	* tests/test-lib.sh (require_strace_): Add a syscall parameter.
	* tests/ls/stat-free-symlinks: Update caller.
	* tests/mv/atomic: Likewise.
	* tests/mv/atomic2: Likewise.
	Reported by Mike Frysinger in
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13222

	tests: accommodate a different errno string on Irix 6.5
	* tests/mkdir/selinux: Also handle "Not supported".
	Reported by Peter Fales.

	seq: work around floating point inaccuracies on more systems
	* src/seq.c: Include <math.h> for fabs.
	Include <float.h> for DBL_EPSILON.
	(abs_rel_diff): New function.
	(print_numbers): Use abs_rel_diff rather than a strict equality test.
	Without this change, Solaris 8 and Irix 6.2 would fail the float-6
	test.  Reported by Peter Fales in
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13183
	* src/c99-to-c89.diff: Adjust seq.c offsets.

	doc: fix typo
	* coreutils.texi (sort invocation): s/Whitespace/White space/

2008-04-12  Jim Meyering  <meyering@redhat.com>

	tests: Accommodate a different errno value on OSF/1 4.0F.
	* tests/mkdir/selinux: Also handle "Function not implemented".

	Avoid link failure when using mkstemp replacement.
	* src/Makefile.am (tac_LDADD): Add $(LIB_CLOCK_GETTIME).
	This is necessary at least on a DEC Alpha OSF/1 4.0F.

	tests: always enable VERBOSE output, now that test framework works better
	* cfg.mk: Set VERBOSE=yes.
	* tests/check.mk: Likewise.

2008-04-11  Jim Meyering  <meyering@redhat.com>

	doc: avoid "make pdf" failure (due to texi2dvi bug?)
	* doc/coreutils.texi (filesZeroFromOption):
	Comment out @cindex-in-@macro use.

	doc: use a valid texinfo macro name
	* doc/coreutils.texi (filesZeroFromOption): s/0/Zero/

2008-04-08  Jim Meyering  <meyering@redhat.com>

	tests: accommodate a different errno value on HPUX-10.20
	* tests/mkdir/selinux: Also handle "Unknown system error".
	Reported by Peter Fales.

2008-04-06  Jim Meyering  <meyering@redhat.com>

	doc: factor out --files0-from duplication
	* coreutils.texi (wc invocation) [files0fromOption]: New macro.  Use it.
	(du invocation): Use it here, too.

	* src/c99-to-c89.diff: Adjust remove.c diffs.

2008-04-06  Jim Meyering  <jim@meyering.net>

	remove.c: accommodate systems with negative errno values
	This is required at least on Haiku and BeOS.
	* src/remove.c (write_protected_non_symlink): Return 1 for a write-
	protected non-symlink, 0 if we determine it's not, and -1 upon
	error (setting errno accordingly only in this final case).
	(prompt): Deal with the changed semantics of the above function.
	Based on this patch from Axel Dörfler:
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13071

2008-04-05  Jim Meyering  <meyering@redhat.com>

	Accommodate building on OS/2 (www.ecomstation.com Ecs v2 rc4)
	* configure.in: Also filter out carriage returns from the value
	of $no_install_progs_default.  Reported by Elbert Pol.

2008-04-02  Jim Meyering  <meyering@redhat.com>

	"touch E; mkfifo F; cp -fR F E" no longer fails due to existing E
	* src/copy.c (copy_internal): Revert change of 2005-03-01,
	4303f0454592421eea48be87777d32a49e1d5e5b
	Prompted by Michael Stone, who pointed me to an old bug report from
	Ian Jackson: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/7504
	* tests/cp/special-f: New file.  Test for the above.
	* tests/cp/Makefile.am (TESTS): Add special-f.
	* NEWS: mention this bug fix.

	copy.c: remove an in-function #ifdef
	* src/copy.c (rpl_mkfifo) [! HAVE_MKFIFO]: New function.
	(mkfifo) [! HAVE_MKFIFO]: Define to rpl_mkfifo.
	(copy_internal): Remove #ifdef.

	HACKING: rename README-contribution-guidelines
	README-contribution-guidelines: Rename to ..
	HACKING: ...this.

2008-04-01  Jim Meyering  <meyering@redhat.com>

	bootstrap: remove dangling *.[ch] symlinks from lib
	* bootstrap [dangling symlink removal]: Match *.[ch] files, too.
	Suggestion from Eric Blake.

	bootstrap: make find's -depth option be the first.
	* bootstrap [dangling symlink removal]: Move find's -depth
	option to precede all others, to avoid a warning.

	* bootstrap: Remove dangling symlinks from lib (aka $source_base), too.

	Avoid root-only SELinux-related test failures w/o mcstransd.
	When mcstransd is not running (i.e., after service mcstrans stop),
	"make check" as root would provoke two test failures.
	* tests/cp/cp-a-selinux: Use the context, root:object_r:tmp_t:s0,
	that works both with and without mcstransd.
	Thanks to Eric Paris for the tip and to Ondřej Vašík for alerting
	me to the problem.
	Reported by Robert Scheck in <http://bugzilla.redhat.com/436717>.

	root tests: Set NON_ROOT_USERNAME if not set already.
	* tests/test-lib.sh (require_root_): This avoids failure of a
	couple of root-only tests that require a value for that envvar.

	texinfo formatting tweaks
	* coreutils.texi: Avoid some overfull hbox warnings.
	(Treating / specially): Use @file{/} rather than a bare /.

	printf doc: xref print(3) and libc's "Output Conversion Syntax" node
	* coreutils.texi (printf invocation): Add xref.
	Use "The GNU C Library Reference Manual" as the name of the 'libc'
	document consistently.
	* man/printf.x: Add See also: printf(3).
	Suggested by A. Costa in http://bugs.debian.org/465522

2008-03-31  Jim Meyering  <meyering@redhat.com>

	Emit "#line 1" right after the two 'read-only/GENERATED' lines.
	* bootstrap (cp_mark_as_generated): This preserves line numbering
	e.g., in assertions, which is important when correlating between
	coreutils test failures and the original files in gnulib/tests.
	Suggested by Eric Blake.

	* README-contribution-guidelines: Mention how to amend a commit.
	Suggestion from Pádraig Brady.

	Begin documenting contribution guidelines.
	* README-contribution-guidelines: New file.  For now, not distributed.

	"rm -r DIR" would mistakenly prompt about very long names
	* src/remove.c (write_protected_non_symlink): Return 0(-1) when
	euidaccess_stat pronounces a writable(not-writable) file, not -1(0).
	* tests/rm/deep-2: New file.  Test for the above-fixed bug.
	* tests/rm/Makefile.am (TESTS): Add deep-2.
	Discovered while reviewing this change:
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13071

	* NEWS: Note the dd bug fix.  The bug was introduced over 8 years ago:
	9fca49f67c16c8b42c32e185808fe187cedb0fa7

2008-03-31  Paul Eggert  <eggert@cs.ucla.edu>

	dd bug fix: accept e.g., if=/dev/stdin and of=/dev/stdout
	* lib/fd-reopen.c: Work even if FILE is "/dev/stdin".
	Problem reported by Geoffrey Lee in <http://bugs.debian.org/290727>.
	* tests/dd/misc: Check for this bug.

2008-03-29  Jim Meyering  <meyering@redhat.com>

	avoid failure of new test on kernel without SELinux support
	* tests/mkdir/selinux: Also accept ENOENT.
	Reported by Sven Joachim.

	tests: accept ENOTSUP message as well as the EINVAL one
	This test would fail on most non-Linux systems because the original
	expected an "Invalid argument" diagnostic, yet they all produced
	"Operation not supported".
	* tests/mkdir/selinux: Accept both strings.  Factor out duplication.

	Work around a recent glibc/getopt.c diagnostic change.
	* tests/misc/factor: Map new "-- '1'" to expected "-- 1".

2008-03-28  Jim Meyering  <meyering@redhat.com>

	mknod, mkfifo: don't segfault when diagnosing invalid SELinux context
	Identical to the bug fixed by 72d052896a9092b811961a8f3e6ca5d151a59be5.
	* src/mkfifo.c (main): Use "scontext", not NULL optarg in diagnostic.
	* src/mknod.c (main): Likewise.
	Reported by Cristian Cadar, Daniel Dunbar and Dawson Engler.
	* tests/mkdir/selinux: Test for the above fixes.
	* NEWS: Mention the fixes.

	Fix typo in old NEWS and ChangeLog: s/commmand/command/.
	* ChangeLog-2007: Likewise.
	* NEWS: Likewise.
	Prompted by http://bugzilla.redhat.com/439410

2008-03-28  Pádraig Brady  <P@draigBrady.com>

	tests: Factor out code that's going to be reused.
	* tests/test-lib.sh (mkfifo_or_skip_): New function, factored out of...
	* tests/touch/fifo: ...here.

2008-03-28  Jim Meyering  <meyering@redhat.com>

	Require that "(exit $fail); exit $fail" be last line of each test.
	* maint.mk (sc_require_test_exit_idiom): New rule to enforce policy.
	* tests/cp/acl: Adhere to the new policy.
	* tests/cp/preserve-gid: Likewise.
	* tests/dd/misc:
	* tests/install/create-leading:
	* tests/ln/sf-1:
	* tests/ls/symlink-slash:
	* tests/misc/help-version:
	* tests/misc/ls-time:
	* tests/misc/nice:
	* tests/misc/shred-remove:
	* tests/misc/stty:
	* tests/misc/stty-row-col:
	* tests/mkdir/p-1:
	* tests/mkdir/p-2:
	* tests/mkdir/p-3:
	* tests/mkdir/p-v:
	* tests/mkdir/special-1:
	* tests/mkdir/writable-under-readonly:
	* tests/mv/acl:
	* tests/mv/backup-is-src:
	* tests/mv/diag:
	* tests/mv/dir-file:
	* tests/mv/force:
	* tests/mv/hard-link-1:
	* tests/mv/i-2:
	* tests/mv/i-4:
	* tests/mv/into-self:
	* tests/mv/into-self-2:
	* tests/mv/into-self-3:
	* tests/mv/partition-perm:
	* tests/mv/to-symlink:
	* tests/rmdir/ignore:
	* tests/tail-2/assert:
	* tests/tail-2/assert-2:
	* tests/touch/dangling-symlink:
	* tests/touch/dir-1:
	* tests/touch/empty-file:
	* tests/touch/fifo:
	* tests/touch/no-rights: Likewise.

	Perform explicit exit-nonzero if the embedded Perl script fails.
	* tests/misc/pwd-long: Add canonical '(exit $fail); exit $fail'.

2008-03-27  Jim Meyering  <meyering@redhat.com>

	paste -d\\: avoid heap overrun for backslash at end of delim list
	* src/paste.c: Include "quotearg.h".
	(collapse_escapes): Handle backslash-escaped backslash explicitly.
	Handle unescaped backslash at end of string by returning nonzero,
	rather than by overrunning memory.
	(main): Diagnose an invalid delimiter list -- carefully.
	Reported by Cristian Cadar, Daniel Dunbar and Dawson Engler.
	* tests/misc/paste-no-nl (delim-bs): Add a test to demonstrate the
	heap-smashing capability.
	(delim-bs2): Prior to coreutils-5.1.2, this bug was a little harder
	to demonstrate: it would corrupt a first-argument containing e.g., \b
	* NEWS: Mention the bug fix.
	* tests/misc/Makefile.am (TESTS): Reflect renaming.
	* tests/misc/paste: Rename from paste-no-nl.

2008-03-26  Jim Meyering  <meyering@redhat.com>

	* src/join.c (keycmp): Document new parameters.

	Test for mkdir bug fix.
	* tests/mkdir/selinux: New file: test for today's fix.
	* tests/mkdir/Makefile.am (TESTS): Add selinux.

2008-03-26  Daniel Dunbar  <daniel@zuster.org>

	mkdir -Z x d: don't segfault when diagnosing invalid context "x" (tiny change)
	* src/mkdir.c (main): Use "scontext", not NULL optarg in diagnostic.
	Reported by Cristian Cadar, Daniel Dunbar and Dawson Engler.
	* NEWS: Mention the bug fix.

2008-03-25  Peter Fales  <psfales@alcatel-lucent.com>

	id bug fix: don't point to potentially clobbered static storage
	On at least Mac OS, when calling getpwuid twice with the same UID,
	the static storage containing results from the first call is
	invalidated by the second call.
	* src/id.c (main): Point to a copy of the user name string.

2008-03-25  Eric Blake  <ebb9@byu.net>

	Use new gnulib gnumakefile module.
	* bootstrap.conf (gnulib_modules): Pull in new module.
	* GNUmakefile: Remove from version control.
	* .gitignore: Update.
	* configure.ac (AC_CONFIG_LINKS): Delete; rely on gnulib to do
	this now.
	* Makefile.am (EXTRA_DIST, distclean-local): Likewise.

2008-03-25  Jim Meyering  <meyering@redhat.com>

	join bug fix: adapt keycmp to work with new order-checking feature
	* src/join.c (keycmp): Add two join-field parameters.
	(check_order, join): Update callers.
	Reported by Dmitry V. Levin in
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12731/focus=13017
	* tests/join/Test.pm (chkodr-7): New test for this fix.

2008-03-23  Jim Meyering  <meyering@redhat.com>

	join.c: syntax/style tweaks
	* src/join.c (check_order): Rename from checkorder.
	Move definition to precede first use and remove prototype.
	Use EXIT_FAILURE, rather than "1".
	(key_cmp): Move definition to precede first use.

2008-03-22  Jim Meyering  <meyering@redhat.com>

	portability: work around a "busybox sed" limitation
	* configure.ac: While every other sed tested supports usage like
	'/\(re\)/{s//\1/;...<NEWLINE>}', and POSIX appears to requires this,
	busybox's sed does not support it.  So duplicate the regexp:
	'/\(re\)/{s/\(re\)/\1/;...<NEWLINE>}'.  Reported by Vincent Lefevre:
	<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13013>.

2008-03-21  Jim Meyering  <meyering@redhat.com>

	* src/c99-to-c89.diff: Adjust seq.c offsets.

	ptx: avoid heap overrun for backslash at end of optarg string
	* src/ptx.c (copy_unescaped_string): Ignore a lone backslash
	at end of string.  Reported by Cristian Cadar, Daniel Dunbar
	and Dawson Engler.  Details here:
	<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13005>.
	* tests/misc/Makefile.am (TESTS): Add ptx-overrun.
	* tests/misc/ptx-overrun: New file.  Test for the above fix.
	* NEWS: Mention the fix.

	ptx.c readability
	* src/ptx.c (copy_unescaped_string): Add braces around 80+-line
	single-stmt while-loop body.

	Write NEWS and update c99-to-c89 patch for today's rm improvement.
	* NEWS: call this a "portability improvement" ;-)
	* src/c99-to-c89.diff: Adjust remove.c offsets.

2008-03-21  Ingo Weinhold  <ingo_weinhold@gmx.de>

	remove.c: Accommodate systems with negative errno values.
	* src/remove.c (cache_fstatat): Store errno value directly in
	the st_ino field, rather than trying to shoehorn it into st_size.
	This is required at least on BeOS and Haiku.

2008-03-21  Jim Meyering  <meyering@redhat.com>

	* src/seq.c (long_double_format): Add a comment.

	* GNUmakefile: Update from gnulib.

2008-03-20  Jim Meyering  <meyering@redhat.com>

	Remove today's automake kludge, altogether.  Fix properly.
	* man/Makefile.am: Use dist_man1_MANS instead of dist_man_MANS.
	Suggestion from Ralf Wildenhues.

	Add a check to detect this problem, in case it reappears.
	* maint.mk (my-distcheck): Run "make install", and then ensure
	that ls.1 is installed.

	Kludge to make automake generate install-man rules
	* man/Makefile.am (dist_man_MANS): Add a literal, rm.1.
	Without this, "make install" would not install man pages.
	However, with this kludge, the rm.1 man page is installed
	even when you configure with --enable-no-install-program=rm.

	Revert recent man/Makefile.am change.
	Revert 4b544e447eb78fd1f031a026a499f6aed177808a.
	* man/Makefile.am: That change was only a band-aid.  It solved
	the stated problem, but not a deeper one: that "make install"
	would no longer man pages.  Reported by Dmitry V. Levin.
	The latter problem arose in
	167b8025aca487de001da2448c1aebc2747bc1d3 with the removal of
	the sole literal from the definition of dist_man_MANS.  When
	automake perceives dist_man_MANS as empty, it no longer emits
	the install-man* rules.

2008-03-20  Eric Blake  <ebb9@byu.net>

	Sync GNUmakefile with gnulib.
	* GNUmakefile (Makefile.cfg): Rename...
	(cfg.mk): ...to this, and make optional.
	(GNUmakefile.cfg): Delete, redundant with cfg.mk.
	(Makefile.maint): Rename...
	(maint.mk): ...to this.
	(all) [!_have-Makefile]: Rename...
	(abort-due-to-no-makefile): ...to this, and invoke via
	.DEFAULT_GOAL to pick up all targets.
	* Makefile.cfg: Rename...
	* cfg.mk: ...to this.
	* Makefile.maint: Rename...
	* maint.mk ...to this.
	(ME): Reflect rename.
	(makefile-check, m4-check, author_mark_check, msg): Use $(ME)
	rather than hard-coded name.
	* Makefile.am (EXTRA_DIST): Distribute renamed files.
	* .x-sc_file_system: Remove Makefile.maint along with others. No longer needed.
	* .x-sc_obsolete_symbols: Likewise.
	* .x-sc_prohibit_atoi_atof: Reflect renaming and remove no-longer-VC'd names.
	* TODO: Likewise.

2008-03-19  Bob Proulx  <bob@proulx.com>

	make check: Remove /tmp/ls-creating debug code.
	* tests/misc/ls-misc: Remove debug code creating /tmp/ls.

2008-03-19  Jim Meyering  <meyering@redhat.com>

	bootstrap: restore kludge removed on 2008-03-12: it's still necessary.
	* bootstrap: Make the gnulib-tests/test-*.sh scripts executable.
	This restores code removed by dec8bb25bb6da2fe9fe6dd63c0fbbd593a0e94cb.
	Reported by Bob Proulx.

	Check for -- and remove -- some unnecessarily included header files.
	* Makefile.maint: Add checks for a handful of additional header files.
	* src/mktemp.c: Don't include "long-options.h".  Not used.
	* src/pr.c: Don't include "inttostr.h".  Not used.
	* src/printenv.c: Don't include "error.h".  Not used.
	* src/test.c: Don't include "error.h".  Not used.
	* src/touch.c: Don't include "safe-read.h".  Not used.

	Remove more vestiges of CVS.
	* Makefile.maint (VC_LIST): Rename from CVS_LIST.
	(VC_LIST_EXCEPT): Rename from CVS_LIST_EXCEPT.

	mv: never unlink a destination file before calling rename
	While cp --preserve=links must unlink certain destination files,
	mv must never do that.
	* src/copy.c (copy_internal): Pull the '! x->move_mode' test "up",
	so it affects the entire condition, and not just DEREF_NEVER mode.
	Reported by James Ralston in <http://bugzilla.redhat.com/438076>.
	* tests/mv/atomic2: New file.  Test for the above fix.
	* tests/mv/Makefile.am (TESTS): Add atomic2.
	* NEWS: Mention the bug-fix.
	[Bug introduced in 367719ba5f1dbd5e2f7fa2466c441f23f66a7c9e]

	"make" would not always update man/*.1 files (but "make dist" would)
	* man/Makefile.am (BUILT_SOURCES): Define, so that "make" always
	updates man/*.1 files.  Reported by Bob Proulx.

2008-03-18  Jim Meyering  <meyering@redhat.com>

	syntax-check: Make the space-before-open-paren optional.
	* Makefile.maint (sc_prohibit_assert_without_use): Match also
	when there is no space before the opening parenthesis.
	(sc_prohibit_getopt_without_use): Likewise.
	(sc_prohibit_quotearg_without_use): Likewise.
	(sc_prohibit_quote_without_use): Likewise.

	* Makefile.maint (sc_no_have_config_h): Use a more precise regexp.

	* Makefile.maint (CVS): Remove now-unused definition.

	Factor out duplication in sc_prohibit_*_without_use rules.
	* Makefile.maint (_header_without_use): New "command",
	factored out of four sc_prohibit_HEADER_without_use rules.
	(sc_prohibit_assert_without_use): Rewrite using $(_header_without_use).
	(sc_prohibit_getopt_without_use): Likewise.
	(sc_prohibit_quotearg_without_use): Likewise.
	(sc_prohibit_quote_without_use): Likewise.

2008-03-18  Dmitry V. Levin  <ldv@altlinux.org>

	Correct typo in "make syntax-check" diagnostic.
	* Makefile.maint (sc_prohibit_getopt_without_use): s/assert.h/getopt.h/

2008-03-16  Jim Meyering  <meyering@redhat.com>

	Prohibit inclusion of getopt.h without use.
	* Makefile.maint (sc_prohibit_getopt_without_use): New rule.

	Include <getopt.h> only if used.
	* src/group-list.c: Don't include <getopt.h>.
	* src/printf.c: Likewise.

2008-03-16  J. Scott Edwards  <qrw.software@gmail.com>

	sha512_process_bytes: fix a bug in processing a buffer where length&64 != 0
	* gl/lib/sha512.c (sha512_process_bytes): s/63/127/.

2008-03-12  Jim Meyering  <meyering@redhat.com>

	Generalize GNUmakefile, ...
	...so that it can be used unmodified by autoconf.
	* GNUmakefile: Include optional file, GNUmakefile.cfg.
	Autoconf will use this to override _autoreconf and to export PATH.
	(_autoreconf): Define.
	(_dummy): cd to $(srcdir) before removing autom4te.cache.

	* bootstrap: Sync from gnulib and remove part of a local kludge.

2008-03-10  Ondřej Vašík  <ovasik@redhat.com>

	install, rmdir: write --verbose output to stdout, not to stderr.
	* src/install.c (announce_mkdir): Write verbose output to stdout,
	not to stderr.
	* src/mkdir.c (announce mkdir): Use prog_fprintf for verbose output.
	* src/prog-fprintf.c (prog_fprintf): New function and file.
	* src/prog-fprintf.h: New file.
	* src/rmdir.c (main): Write verbose output to stdout, not to stderr.
	Quote directory name in a diagnostic.
	* src/rmdir.c (remove_parents): Write verbose output to stdout,
	not to stderr.
	* doc/coreutils.texi: Mention that shred verbose output is to stderr.
	* NEWS: Mention the changes.

2008-03-10  Jim Meyering  <meyering@redhat.com>

	make syntax-check: also check src/*.h files for extern functions,
	* src/Makefile.am (sc_tight_scope): ... now that there is one.

2008-03-07  Jim Meyering  <meyering@redhat.com>

	dd: avoid unnecessary, but harmless close_stdout call.
	* src/dd.c (close_stdout_required): New global.
	(maybe_close_stdout): New function.
	(main): Set the global.
	Reported by Ulrich Drepper in http://bugzilla.redhat.com/436368

2008-03-06  Jim Meyering  <meyering@redhat.com>

	Now that ChangeLog is no longer under version control, ...
	* Makefile.maint (alpha beta major): Don't make changelog-check.
	(changelog-version-check): Rename from changelog-check.

2008-03-05  Jim Meyering  <meyering@redhat.com>

	* src/c99-to-c89.diff: Accommodate a C99-ism in id.c.

2008-03-05  ribalba  <geerd.dietger.hoffmann@gmail.com>

	Work around AFS bug: id and groups would print invalid group number.
	* src/id.c (main): Call print_group_list with a user name, if possible.
	* src/groups.c (main): Likewise.
	* NEWS: Mention this.
	For details, see
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12852
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12875

2008-03-05  Jim Meyering  <meyering@redhat.com>

	Now that Makefile.maint is used in VPATH builds, too...
	* Makefile.maint (prev_version_file): Prefix with $(srcdir)/.
	(syntax-check-rules): Prefix $(ME) with $(srcdir)/.

	Avoid new "make distcheck" failure, now that VPATH has GNUmakefile.
	* GNUmakefile: Remove commands to create ".version".
	They were unnecessary, and caused creation of a newer .version
	file in a VPATH build, which in turn caused creation of updated
	man/*.1 files reflecting the newer time stamp on .version.
	Those *.1 files were not removed (since they're distributed), and
	the fact that they remained after "distclean" triggered the failure.

2008-03-04  Eric Blake  <ebb9@byu.net>

	Reinstate GNUmakefile patch, but with workaround for automake.
	* configure.ac (AC_CONFIG_LINKS): Use shell variable to bypass
	automake distclean rules.
	* Makefile.am (distclean-local): Clean GNUmakefile in VPATH builds,
	since we are bypassing automake.
	* GNUmakefile (_is-dist-target): 'distclean' is not a dist target.

2008-03-04  Jim Meyering  <meyering@redhat.com>

	Clarify comment and attribute preceding change: Reported by Ralf Wildenhues.

	Comment out yesterday's VPATH-friendly addition, for now.
	* configure.ac: ...while we wait for a fixed version of automake.

2008-03-03  Eric Blake  <ebb9@byu.net>

	Use m4_PACKAGE_VERSION, not AC_AUTOCONF_VERSION.
	* configure.ac: The latter is only in post-2.61 autoconf.

	GNUmakefile build tweaks.
	* GNUmakefile: When Makefile is not present, make common targets depend
	on "all" in order to trigger nicer error message.
	* configure.ac: If autoconf is new enough, link GNUmakefile into VPATH
	builds.
	For more details, see
	<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/12853>.

2008-03-03  Simon Josefsson  <simon@josefsson.org>

	Define SHA*_DIGEST_SIZE symbols.
	* gl/lib/sha256.h (SHA224_DIGEST_SIZE, SHA256_DIGEST_SIZE): Define.
	* gl/lib/sha512.h (SHA384_DIGEST_SIZE, SHA512_DIGEST_SIZE): Define.

2008-03-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	Fix so that out-of-tree VPATH "make dist" works, too.
	* GNUmakefile: Add $(srcdir)/ prefix to git-version-gen and argument.

2008-03-02  Jim Meyering  <meyering@redhat.com>

	One more for non-srcdir "make dist".
	* GNUmakefile: Also cd $(srcdir) before running autoreconf.

	Adjust so that non-srcdir "make dist" works, too.
	* GNUmakefile: Add $(srcdir)/ prefix to git-version-gen and argument.

	Don't infringe namespace of "sub"-Makefiles.
	* GNUmakefile (_dummy, _have-Makefile): Add "_" prefix.

	Create sha256 and sha512 modules and move files into gl/.
	* bootstrap.conf (gnulib_modules): Add sha256 and sha512.
	* m4/prereq.m4: Don't require gl_SHA256 or gl_SHA512.
	* gl/modules/sha512: New file.
	* gl/modules/sha256: New file.
	* m4/sha256.m4: Move to ...
	* gl/m4/sha256.m4: ...here, removing use of AC_SOURCES.
	* m4/sha512.m4: Move to ...
	* gl/m4/sha512.m4: ...here, removing use of AC_SOURCES.
	* lib/sha256.c, lib/sha256.h: Move to ...
	* gl/lib/sha256.c, gl/lib/sha256.h: ...here.
	* lib/sha512.c, lib/sha512.h: Move to ...
	* gl/lib/sha512.c, gl/lib/sha512.h: ...here.
	* lib/u64.h: Move to ...
	* gl/lib/u64.h: ...here.

	* bootstrap: Remove only *.m4, and only from $m4_base/.  Rewrite the comment.

	* bootstrap: Sync from gnulib.

2008-03-01  Jim Meyering  <meyering@redhat.com>

	Don't skip the groups-version test.
	* tests/Makefile.am (built_programs): Remove unused definition.
	* src/Makefile.am (built_programs.list): Print a space-separated
	list of program names, not NL-separated, since all clients now
	expect a space-separated list.

	Don't exempt "groups" from write-failure test, now that it's a C program.
	* tests/misc/help-version: Since groups is no longer a shell
	script, a buggy bourne shell can't cause trouble.

	* configure.ac (AC_INIT): Use .tarball-version, not .version.

	Don't depend on gnulib's deprecated "free" module.
	* bootstrap.conf (obsolete_gnulib_modules): Remove free.
	* gl/modules/mgetgroups (Depends-on): Remove free.

2008-02-29  Jim Meyering  <meyering@redhat.com>

	Merge bootstrap changes from gnulib.
	* bootstrap (MSGID_BUGS_ADDRESS): Define and use.
	(version_controlled_file): Use "git rm", not "git-rm".

	Use "git tag", not "git-tag", in preparation for git-1.6.0.
	* Makefile.maint (VC-tag): Remove '-': s/git-tag/git tag/

2008-02-28  Jim Meyering  <meyering@redhat.com>

	Make copyright comments consistent.
	* src/mktemp.c: Update copyright to use newer form.

	Make first copyright lines consistent. Some did not end in ", Inc.".
	Due to that missing ", Inc" at end of line, emacs' copyright-updating
	code missed some opportunities.  This corrects most of those, and
	adds some mistakenly omitted years.
	* src/chown-core.c: Adjust.
	* src/chown-core.h: Likewise.
	* src/copy.c: Likewise.
	* src/copy.h: Likewise.
	* src/cp-hash.c: Likewise.
	* src/cp.c: Likewise.
	* src/group-list.h: Likewise.
	* src/mktemp.c: Likewise.
	* src/stat.c: Likewise.
	* tests/chmod/equal-x: Likewise.
	* tests/dd/skip-seek: Likewise.
	* tests/envvar-check: Likewise.
	* tests/mv/into-self-2: Likewise.

2008-02-25  Bob Proulx  <bob@proulx.com>

	Fix test failure where rm would appear to succeed incorrectly.
	* tests/rm/fail-eperm: Ignore files that were opportunistically chosen
	to test permission failures but disappear before we can finish the test.

2008-02-24  Jim Meyering  <meyering@redhat.com>

	* gl/lib/mgetgroups.c (mgetgroups): Parenthesize correctly.

	* gl/lib/mgetgroups.c: Include <stdlib.h>.

2008-02-23  Jim Meyering  <meyering@redhat.com>

	Avoid test failures when root (/) is not readable.
	* tests/test-lib.sh (require_readable_root_): New function.
	* tests/misc/pwd-long: Skip this test when / is unreadable.
	* tests/du/slash: Likewise.
	This is required at least for Mandrake/Mandriva in "secure" mode.
	Reported by Theodoros V. Kalamatianos in
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12800

2008-02-22  Jim Meyering  <meyering@redhat.com>

	id: avoid race when a group is added between getgrouplist calls
	* gl/lib/mgetgroups.c (mgetgroups) [N_GROUPS_INIT]: Rename enum.
	Use a larger value.
	Update *groups only upon success.
	Iterate upon failed getgrouplist.

2008-02-21  James Youngman  <jay@gnu.org>

	id: use getgrouplist when possible
	* gl/m4/mgetgroups.m4: Check for getgrouplist.
	* gl/lib/mgetgroups.c (mgetgroups): Use getgrouplist, if available.
	* TODO: Remove the item about switching to getgrouplist.
	* NEWS: mention this

2008-02-21  Paul Eggert  <eggert@CS.UCLA.EDU>

	du vs. hard links and argument order: improve documentation
	* doc/coreutils.texi (du invocation): Document default behavior on
	hard links, and why argument order matters.

2008-02-20  James Youngman  <jay@gnu.org>

	join: avoid new leaks
	* src/join.c (prevline): Make prevline module-level static, so that
	the allocated items can be freed at exit.
	(free_prevline): new atexit function; frees items in prevline[].
	Use ARRAY_CARDINALITY, so include "argmatch.h" to get that.
	(main): Arrange for free_prevline to be called during exit.
	(get_line): Free prevline[which - 1] also, as that
	will have been allocated by dup_line.

2008-02-20  Jim Meyering  <meyering@redhat.com>

	Remove xdelta support, clean up distcheck process.
	* Makefile.maint (writable-files): Don't create $(release_archive_dir).
	(my-distcheck): Don't depend on prev-tgz.
	Remove xdelta-related variables and uses.
	(alpha beta major): Skip steps if $(release_archive_dir) doesn't exist.

	* bootstrap: Remove dangling symlinks before invoking aclocal.

2008-02-20  Andreas Schwab  <schwab@suse.de>

	sort: add --sort=... option.
	* src/sort.c (SORT_OPTION): New enum.
	(sort_args, sort_types): Define.
	(usage, long_options, main): New option --sort.
	* tests/sort/Test.pm: Test it.
	* doc/coreutils.texi (sort invocation): Document --sort option.
	* NEWS: Mention this.

2008-02-19  Jim Meyering  <meyering@redhat.com>

	2008-02-19  Jim Meyering  <meyering@redhat.com>
	* TODO: Remove final seq-related item.

	* src/c99-to-c89.diff: Adjust seq.c offsets.  Accommodate a new C99-ism.

2008-02-19  Steven Schubiger  <schubiger@gmail.com>

	seq: give better diagnostics for invalid formats.
	* src/seq.c: (validate_format): New function.
	(main): Use it.
	* tests/misc/seq (fmt-d, fmt-e): Test for expected diagnostics with
	invalid formats.
	* NEWS: Mention this change.
	* TODO: Remove this item.
	[jm: src/seq.c: make diagnostics more consistent
	 tests/misc/seq (fmt-eos1): adjust the expected diagnostic ]

2008-02-19  James Youngman  <jay@gnu.org>

	join: new options: --check-order and --nocheck-order.
	* src/join.c: Support --check-order and --nocheck-order.
	New variables check_input_order, seen_unpairable and
	issued_disorder_warning[]. For --check-order, verify that the
	input files are in sorted order.  For the default case, check the
	order only if there are unpairable lines.
	(join): Perform ordering checks after reaching EOF on either
	input.
	(usage): Mention --check-order and --nocheck-order.
	(dupline): Save a copy of the previously-read input line so that
	we can detect disorder on the input.
	(get_line): Temporarily save a copy of the previous line (by
	calling dupline) and check relative ordering (by calling
	checkorder) before returning the newly-read line.
	(getseq, join): Tell get_line which file we are reading from.
	(advance_seq): New function, factoring out some of the code
	commonly surrounding calls to getseq.
	(checkorder): New function.  Verifies that a pair of consecutive
	input lines are in sorted order.
	* doc/coreutils.texi (join invocation): Document the new options
	--check-order and --nocheck-order.
	* tests/join/Test.pm (tv): Added tests for --check-order and
	--nocheck-order.
	* NEWS: Mention this new feature.

	Fix non-srcdir "make distcheck" failure.
	* Makefile.am (check-ls-dircolors): Look for sources under
	$(srcdir), not under ".".

2008-02-18  Jim Meyering  <meyering@redhat.com>

	seq: give a proper diagnostic for an invalid --format=% option
	* src/seq.c (long_double_format): Handle '%' at end of string.
	* tests/misc/seq [fmt-eos1, fmt-eos2]: New tests for the bug.
	* NEWS: Mention this.
	Reported by Pádraig Brady.

2008-02-17  Jim Meyering  <meyering@redhat.com>

	.gitignore, src/.gitignore: ignore more

	Clean up Makefile.maint.
	* Makefile.maint: Remove obsolete comments.
	(local-checks-available): Remove changelog-check.

	Clean up ls.c.
	* src/ls.c (put_indicator): Use fwrite, not a loop.

	Ensure that dircolors.c and ls.c remain in sync.
	* Makefile.am (check-ls-dircolors): New rule.
	(distcheck-hook): Depend on it.

	Expand "ls --color" tests to also use the dircolors defaults.
	* tests/misc/ls-misc: Adjust this test so each is run twice.  First, as usual,
	and the second time with LS_COLORS set using the default settings
	produced by running dircolors.
	* tests/Coreutils.pm: See below.

	This required some changes:
	  - save and restore $ENV{LS_COLORS} for each individual test
	  that requires a specific value.
	  - Since this is the first test to call the run_tests command more
	  than once, it has exposed that that function erroneously modifies
	  the \@Tests array.  Fix that in tests/Coreutils.pm.

	Adjust dircolors to match ls.c.
	* src/dircolors.hin: comment out NORMAL and FILE, define RESET.
	* src/dircolors.c (slack_codes) Add "RESET".
	(ls_codes): Add "rs".

2008-02-17  Ed Avis  <ed@membled.com>

	ls --color no longer outputs unnecessary escape sequences
	In --color mode, plain files do not get any color, not even white.
	When no highlighting is required, ls outputs no escape sequence at all.
	* src/ls.c (print_with_color):
	(used_color): New global.
	(indicator_no) [C_RESET]: New enum value.
	(indicator_name) ["rs"]: Corresponding new string.
	(color_indicator): Make the 'normal' and 'file' markers be NULL.
	Use "rs" (C_RESET) to reset to ordinary colors.
	(process_signals): Restore default colors only if necessary.
	(main): Don't call prep_non_filename_text here.
	(print_name_with_quoting): Call it here, instead.
	(prep_non_filename_text): Use C_RESET, not C_NORM.
	(print_color_indicator): Return bool, not void.
	Print nothing, when possible.
	(put_indicator): Call prep_non_filename_text the first time.
	* tests/misc/ls-misc: Test for above.
	* tests/ls/color-dtype-dir: Adapt: no escapes around regular file name.
	* TODO: Remove item.
	* NEWS: Mention this.

2008-02-17  Dan Jacobson  <jidanni@jidanni.org>

	ls: Improve description of --group-directories-first.
	* src/ls.c (usage) [--group-directories-first]: Improve description.
	* doc/coreutils.texi (Which files are listed): Likewise.

2008-02-16  Jim Meyering  <meyering@redhat.com>

	Avoid tests/cp/acl test failure.
	* tests/check.mk (TESTS_ENVIRONMENT) [CONFIG_HEADER]: Define
	to an absolute name, so it can be used from any point in the
	test hierarchy.  Reported by James Youngman.

2008-02-16  James Youngman  <jay@gnu.org>

	Use the gettime module in ls.c.
	Implement TODO list item to make ls.c use the gettime module.
	* TODO (ls): Now that we use gettime, remove the TODO entry.
	* src/ls.c: Use timespec.h and the gettime module.
	(current_time): Change type from time_t to struct timespec.
	(current_time_ns): Removed.
	(get_current_time): Removed.
	(print_long_format): Remove when and when_ns, since we have
	when_timespec anyway.  Change type of variable six_months_ago from
	time_t to struct timespec.

2008-02-14  Jim Meyering  <meyering@redhat.com>

	groups: don't test printf and putchar calls for failure
	They are unnecessary, since we use gnulib's closeout module.
	* src/group-list.c (print_group): Remove explicit error tests.
	* src/groups.c (main): Likewise.
	(write_error): Remove function.

2008-02-13  James Youngman  <jay@gnu.org>

	Replace groups.sh with groups.c.
	* src/groups.c (main): New file, replacing groups.sh.
	* src/group-list.c, src/group-list.h: New files, factored out of id.c,
	implementing the functionality that "id" and "groups" have in common.
	* src/id.c (print_full_info): Avoid a segfault when trying to print
	an error message if getgroups fails.
	(print_group_list): Move to group-list.c.
	(print_group): Likewise.
	* man/Makefile.am: When building groups.1, obtain the help text
	from src/groups.c, not src/groups.sh.
	(noinst_HEADERS): Add group-list.h.
	(group): Remove rule.
	(dist_man_MANS): Remove groups.1.
	* doc/coreutils.texi (groups: Print group names a user is in):
	Explain why "groups" and "groups $(id -un)" give different results
	in existing login sessions after you change the group database.
	(id: Print user identity): Likewise for "id".
	* po/POTFILES.in: Add src/group-list.c and src/groups.c.
	* NEWS: mention this.
	* AUTHORS: Update.

2008-02-12  Jim Meyering  <meyering@redhat.com>

	Move more test_skip_-using code to follow ". test-lib.sh".
	* tests/mv/acl: Likewise.
	* tests/cp/acl: Likewise.

2008-02-12  Peter Fales  <psfales@alcatel-lucent.com>

	tests/touch/not-owner: Source test-lib.sh before using skip_test_.

2008-02-12  Jim Meyering  <meyering@redhat.com>

	* tests/Makefile.am (EXTRA_DIST): Remove strace.

2008-02-11  Jim Meyering  <meyering@redhat.com>

	tests: Migrate sourced strace file into a function, require_strace_.
	* tests/strace: Remove file.
	* tests/test-lib.sh (require_strace_): New function.
	* tests/mv/atomic: Use require_strace_, rather than ". strace".
	* tests/ls/stat-free-symlinks: Likewise.
	Peter Fales reported that stat-free-symlinks failed without strace.

	* tests/rm/inaccessible: Source test-lib.sh *before* using skip_test_.
	Reported by Peter Fales.

2008-02-10  Jim Meyering  <meyering@redhat.com>

	Ensure there are no removable (useless) if-before-free tests.
	* bootstrap.conf (gnulib_modules): Add useless-if-before-free.
	* Makefile.maint (sc_avoid_if_before_free): New rule.

	Use a better dirname emulation.
	* build-aux/check.mk (_dirname): Define.
	(am__check_pre): Use it.

	Avoid test failure when run with risky PATH ("." before /usr/bin).
	* build-aux/check.mk (approx_dirname_filter): Define.
	(am__check_pre): Emulate dirname using sed.
	Report and suggested fix from Bruno Haible in
	http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12587/focus=12590

	* build-aux/.gitignore: Remove file from version control. It's generated.

	Generate ChangeLog from git log.
	* bootstrap.conf (gnulib_modules): Add gitlog-to-changelog.
	Ensure that ChangeLog exists, for automake.
	* Makefile.am (gen-ChangeLog): New rule.
	(dist-hook): Depend on it.
	(EXTRA_DIST): Add ChangeLog-2006, ChangeLog-2007, ChangeLog-2008.

	Remove ChangeLog, dividing its content into ChangeLog-200?
	* ChangeLog: Remove file.
	* ChangeLog-2005: Prepend the 2005 entries.
	* ChangeLog-2006: New file.
	* ChangeLog-2007: New file.
	* ChangeLog-2008: New file.

	* ChangeLog: Manually update copyright notice at *bottom*.

2008-02-09  Jim Meyering  <meyering@redhat.com>

	tests: rm/fail-eperm: require-non-root in perl, not sh
	Since it creates no temporaries and since it requires non-root,
	do the require-non-root bit in perl, rather than using test-lib.sh.

	tests: Remove priv-check.  Use new require_root_ function instead.
	* tests/priv-check: Remove file.
	* tests/Makefile.am (EXTRA_DIST): Remove priv-check.
	* tests/test-lib.sh (require_root_): New function.
	Use this function rather than sourcing the priv-check file.
	* tests/sample-test: Use require_root_ rather than priv-check.
	* tests/chown/basic: Likewise.
	* tests/cp/cp-a-selinux: Likewise.
	* tests/cp/preserve-gid: Likewise.
	* tests/cp/special-bits: Likewise.
	* tests/ls/nameless-uid: Likewise.
	* tests/misc/chcon: Likewise.
	* tests/mkdir/writable-under-readonly: Likewise.
	* tests/mv/sticky-to-xpart: Likewise.
	* tests/rm/fail-2eperm: Likewise.
	* tests/rm/no-give-up: Likewise.
	* tests/rm/one-file-system: Likewise.
	* tests/tail-2/append-only: Likewise.
	* tests/touch/now-owned-by-other: Likewise.
	* tests/rm/fail-eperm: Use skip_if_root_ rather than priv-check.
	* Makefile.maint (sc_root_tests): Reflect this change:
	search for the new function name.

	tests: factor out the perl-requiring code in many test scripts
	* tests/require-perl: New file.
	* tests/Makefile.am (EXTRA_DIST): Add require-perl.
	* tests/dd/skip-seek: Use it, and remove manual tests.
	* tests/du/files0-from: Likewise.
	* tests/ls/nameless-uid: Likewise.
	* tests/misc/base64: Likewise.
	* tests/misc/basename: Likewise.
	* tests/misc/cut: Likewise.
	* tests/misc/date: Likewise.
	* tests/misc/dircolors: Likewise.
	* tests/misc/dirname: Likewise.
	* tests/misc/expand: Likewise.
	* tests/misc/expr: Likewise.
	* tests/misc/factor: Likewise.
	* tests/misc/fmt: Likewise.
	* tests/misc/fold: Likewise.
	* tests/misc/head-elide-tail: Likewise.
	* tests/misc/ls-misc: Likewise.
	* tests/misc/md5sum: Likewise.
	* tests/misc/md5sum-newline: Likewise.
	* tests/misc/mktemp: Likewise.
	* tests/misc/od: Likewise.
	* tests/misc/paste-no-nl: Likewise.
	* tests/misc/pr: Likewise.
	* tests/misc/pwd-long: Likewise.
	* tests/misc/seq: Likewise.
	* tests/misc/sha1sum: Likewise.
	* tests/misc/sha1sum-vec: Likewise.
	* tests/misc/sha224sum: Likewise.
	* tests/misc/sha256sum: Likewise.
	* tests/misc/sha384sum: Likewise.
	* tests/misc/sha512sum: Likewise.
	* tests/misc/sort-merge: Likewise.
	* tests/misc/stat-printf: Likewise.
	* tests/misc/sum: Likewise.
	* tests/misc/sum-sysv: Likewise.
	* tests/misc/test-diag: Likewise.
	* tests/misc/tsort: Likewise.
	* tests/misc/tty-eof: Likewise.
	* tests/misc/unexpand: Likewise.
	* tests/misc/wc-files0-from: Likewise.
	* tests/misc/xstrtol: Likewise.
	* tests/mv/i-1: Likewise.
	* tests/rm/empty-name: Likewise.
	* tests/rm/fail-eperm: Likewise.
	* tests/rm/unreadable: Likewise.

	(EXTRA_DIST): *do* require require-perl as a stand-alone, 'source'able script.

	tests: call skip_test_ in place of echo+exit 77
	* tests/mv/no-target-dir: Likewise.
	* tests/other-fs-tmpdir: Likewise.
	* tests/rm/empty-name: Likewise.
	* tests/rm/fail-eperm: Likewise.
	* tests/rm/inaccessible: Likewise.
	* tests/rm/isatty: Likewise.
	* tests/rm/unreadable: Likewise.
	* tests/setgid-check: Likewise.
	* tests/sparse-file: Likewise.
	* tests/strace: Likewise.
	* tests/tail-2/append-only: Likewise.
	* tests/tail-2/big-4gb: Likewise.
	* tests/tail-2/tail-n0f: Likewise.
	* tests/touch/dangling-symlink: Likewise.
	* tests/touch/fifo: Likewise.
	* tests/touch/not-owner: Likewise.
	* tests/mv/i-3: Likewise.
	* tests/umask-check: Likewise.
	* tests/mv/acl: Likewise.
	* tests/cp/acl: Likewise.
	* tests/chgrp/deref: Likewise.
	* tests/chmod/setgid: Likewise.
	* tests/cp/existing-perm-race: Likewise.
	* tests/cp/file-perm-race: Likewise.
	* tests/cp/parent-perm-race: Likewise.
	* tests/du/2g: Likewise.
	* tests/du/8gb: Likewise.
	* tests/du/long-from-unreadable: Likewise.
	* tests/du/long-sloop: Likewise.
	* tests/du/slink: Likewise.
	* tests/ls/nameless-uid: Likewise.
	* tests/ls/stat-dtype: Likewise.
	* tests/misc/cat-proc: Likewise.
	* tests/misc/md5sum-newline: Likewise.
	* tests/misc/nice: Likewise.
	* tests/misc/od-x8: Likewise.
	* tests/misc/pwd-unreadable-parent: Likewise.
	* tests/misc/selinux: Likewise.
	* tests/misc/stty-row-col: Likewise.
	* tests/misc/tac-continue: Likewise.
	* tests/misc/arch: Likewise, and source $srcdir/../test-lib.sh *before*
	the use of skip_test_.

	tests: move the very-expensive file into test-lib.sh
	* tests/very-expensive: Remove file.
	* tests/test-lib.sh (very_expensive_): New function.
	* tests/Makefile.am (EXTRA_DIST): Remove very-expensive.
	* tests/cp/perm: Call the new function, rather than sourcing the file.
	* tests/tail-2/assert: Likewise.
	* tests/tail-2/assert-2: Likewise.
	* tests/du/2g: Likewise.

	tests: start migrating sourced-file function-like tests into test-lib.sh.
	* tests/acl: Remove file.
	* tests/test-lib.sh (require_acl_): New function.
	* tests/cp/acl: Use require_acl_ instead.
	* tests/mv/acl: Likewise.
	* tests/Makefile.am (EXTRA_DIST): Remove acl.

	tests: mv/acl: Don't mention "yes" as a partition name in diagnostic.
