Jim Meyering [Tue, 2 Oct 2007 09:10:22 +0000 (11:10 +0200)]
Never copy through a symlink that cp has just created.
* src/copy.c (copy_internal): When same-file detection requires
'stat'ing the destination file, also 'lstat' it and ensure that
it wasn't the destination of a preceding copy operation.
This bug was introduced on 2007-06-18.
* tests/cp/abuse: New test for the above.
* tests/cp/Makefile.am (TESTS): Add abuse.
Jim Meyering [Sun, 30 Sep 2007 07:05:10 +0000 (09:05 +0200)]
cp: do not abbreviate in --help output.
* src/cp.c (usage): Don't abbreviate: s/=link/=links/.
Reported by Géraud Meyer in <http://bugs.debian.org/444137>.
Signed-off-by: Jim Meyering <jim@meyering.net>
Eric Blake [Sat, 29 Sep 2007 14:56:50 +0000 (08:56 -0600)]
Fix testsuite on cygwin.
* check.mk (%.log): Also allow suffix-less tests, on platforms
where $(EXEEXT) is not empty.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Sat, 29 Sep 2007 14:49:20 +0000 (08:49 -0600)]
Test previous patch.
* tests/misc/groups-dash: New test.
* tests/misc/Makefile.am (TESTS): Add it.
Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake [Fri, 28 Sep 2007 23:09:30 +0000 (23:09 +0000)]
* src/groups.sh: Don't ignore first argument if later argument is --.
Signed-off-by: Eric Blake <ebb9@byu.net>
Jim Meyering [Thu, 27 Sep 2007 20:37:23 +0000 (22:37 +0200)]
Avoid spurious test failure when SELinux stats "selinux/class".
* tests/ls/stat-free-symlinks: Grep for more precise /^stat("x"/.
Jim Meyering [Tue, 25 Sep 2007 20:24:21 +0000 (22:24 +0200)]
Move file-set and hash-triple modules to gnulib.
* bootstrap.conf (gnulib_modules): Remove file-set, now that
it's in gnulib, and the canonicalize module requires it there.
* gl/lib/file-set.c, gl/lib/file-set.h, gl/modules/hash-triple: Remove.
* gl/lib/hash-triple.c, gl/lib/hash-triple.h, gl/modules/file-set: Remove.
Jim Meyering [Mon, 24 Sep 2007 07:53:57 +0000 (09:53 +0200)]
Add a test to exercise a readlink bug.
* tests/misc/readlink-fp-loop: New file. Test for the readlink bug
fixed through today's change to Gnulib's canonicalize module.
* tests/misc/Makefile.am (TESTS): Add readlink-fp-loop.
Bug report and a test case from mpb.mail@gmail.com.
Pádraig Brady [Tue, 25 Sep 2007 17:00:04 +0000 (18:00 +0100)]
Make "Date input formats" easier to find in info file
* doc/coreutils.texi (date invocation):
`man date` gives all options for the date command except
the description of the date input formats. Therefore it
should be easy to browse to this info using `info date`.
Signed-off-by: Pádraig Brady <P@draigBrady.com>
Jim Meyering [Tue, 25 Sep 2007 19:27:14 +0000 (21:27 +0200)]
Use XOR, not OR to combine bits.
* gl/lib/hash-triple.c (triple_hash): Use XOR (^), not OR (|), to
combine the bits from hashing the name and those of the inode number.
Add a few comments and remove out-of-context ones.
Jim Meyering [Mon, 24 Sep 2007 14:33:35 +0000 (16:33 +0200)]
* NEWS: The recent rm-diagnostic fix also affects cross-partition "mv".
Jim Meyering [Mon, 24 Sep 2007 13:09:17 +0000 (15:09 +0200)]
copy.c: Remove definitions of factored-out functions.
* src/copy.c: Include "file-set.h".
(seen_file, record_file): Remove functions that I factored
out on 2007-08-23.
Jim Meyering [Sat, 22 Sep 2007 21:26:37 +0000 (23:26 +0200)]
Don't print the commands of a 10-line script that's run in each subdir.
* tests/check.mk (vc_exe_in_TESTS): Add a leading "@", to reduce noise.
Jim Meyering [Sat, 22 Sep 2007 08:02:09 +0000 (10:02 +0200)]
rm: give a sensible diagnostic when failing to remove a symlink
On some systems (those with openat et al), when rm would fail to
remove a symlink, it would fail with the misleading diagnostic,
"Too many levels of symbolic links".
* NEWS: Mention the bug fix.
* src/remove.c (is_nondir_lstat): New function.
(remove_entry): Use it to catch failed-to-remove symlink (and any
other non-dir) here so that we don't fall through and try to treat
it as directory, which -- with a symlink -- would provoke the bogus
ELOOP failure.
* tests/rm/fail-eacces: Add a test for the above.
* src/c99-to-c89.diff: Adjust offsets.
Jim Meyering [Sat, 22 Sep 2007 06:40:47 +0000 (08:40 +0200)]
rm: fix a tiny, nearly inconsequential bug.
Don't perform a "."-relative lstat, when the file in question
may well not be in ".". Although this is a bug, a few attempts
to exercise it on a linux-2.6.22 system failed. You probably need
a pre-openat system to trigger the failure. The consequence of this
bug would be a lower-quality diagnostic upon failed dir removal.
* src/remove.c (is_dir_lstat): Add a parameter, fd_cwd.
Use it instead of hard-coding AT_FDCWD.
(remove_entry): Call is_dir_lstat with fd_cwd.
Signed-off-by: Jim Meyering <jim@meyering.net>
Karl Berry [Sat, 22 Sep 2007 06:28:21 +0000 (08:28 +0200)]
TODO: It'd be nice to add renice.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Fri, 21 Sep 2007 06:30:26 +0000 (08:30 +0200)]
Avoid a test failure due to now-parallelized tests.
* tests/du/two-args: Run "du .." from a sub-directory one level deeper.
Jim Meyering [Wed, 19 Sep 2007 09:13:46 +0000 (11:13 +0200)]
Fix typo in previous change.
Spotted by Andreas Schwab.
Jim Meyering [Wed, 19 Sep 2007 08:25:40 +0000 (10:25 +0200)]
* coreutils.texi (expr invocation): Correct description of relative
operator precedence. Reported by hanpingtian@gmail.com.
Jim Meyering [Sun, 16 Sep 2007 09:26:24 +0000 (11:26 +0200)]
tests/misc/tac-continue: Arrange to remove a temporary file.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Sun, 16 Sep 2007 09:20:55 +0000 (11:20 +0200)]
tests/check.mk (vc_exe_in_TESTS): Don't rely on the value of $(TESTS),
so that "make check TESTS=test-name" works once again.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Sun, 16 Sep 2007 09:07:59 +0000 (11:07 +0200)]
tests/CuTmpdir.pm: Use File::Find + chmod syscall, not chmod -R.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Sat, 15 Sep 2007 23:24:37 +0000 (01:24 +0200)]
Revamp most test scripts.
Add a ChangeLog entry summarizing the preceding 30+ change sets.
Jim Meyering [Sat, 15 Sep 2007 23:06:16 +0000 (01:06 +0200)]
* tests/rm/v-slash: Avoid test failure with non-C locale.
Reported by Michael Stone.
Jim Meyering [Thu, 13 Sep 2007 10:13:35 +0000 (12:13 +0200)]
Enable some previously omitted test scripts. Add a test cross-check.
* tests/rm/Makefile.am (TESTS): Add empty-name and unreadable.
* tests/rm/empty-name: Likewise.
* tests/rm/unreadable: Reenable this test. Adjust for new rm.
* tests/mkdir/Makefile.am: Add writable-under-readonly.
* tests/mkdir/writable-under-readonly: Add some comments.
This test is always skipped, for now.
* tests/Makefile.am (ta): Hook up the new root-only script.
* tests/tail-2/infloop-1: Make this test pass.
* tests/tail-2/Makefile.am (TESTS): Add infloop-1.
* tests/tail-2/fflush: Remove unused file.
* tests/check.mk (vc_executable_is_in_TESTS): More portable.
* tests/check.mk (check): Depend on the above.
* build-aux/check.mk: Remove comment mentioning AUTHORS file.
Jim Meyering [Thu, 13 Sep 2007 08:04:35 +0000 (10:04 +0200)]
Factor out definitions in TESTS_ENVIRONMENT of srcdir, top_srcdir, etc.
tests/check.mk (top_srcdir): Define.
tests/*/Makefile.am: Remove definitions of $(srcdir), $(top_srcdir),
$(abs_top_srcdir), and $(abs_top_builddir), since they're
defined via the included tests/check.mk.
Jim Meyering [Thu, 13 Sep 2007 07:22:39 +0000 (09:22 +0200)]
tests/general: Remove from VC, this long-unused directory and contents.
Jim Meyering [Thu, 13 Sep 2007 06:44:26 +0000 (08:44 +0200)]
Adapt tests/tail-2/ to use test-lib.sh.
Jim Meyering [Wed, 12 Sep 2007 16:14:36 +0000 (18:14 +0200)]
Adapt tests/readlink/ to use test-lib.sh.
Jim Meyering [Wed, 12 Sep 2007 13:55:54 +0000 (15:55 +0200)]
Move the sole test in tests/ls-2/ to tests/misc/.
* tests/ls-2/basic-1: Move this file to ...
* tests/misc/ls-misc: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add ls-misc.
* tests/Makefile.am (SUBDIRS): Remove ls-2.
* tests/ls-2: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/ls-2/Makefile.
Jim Meyering [Wed, 12 Sep 2007 12:52:26 +0000 (14:52 +0200)]
More misc, test-related changes. (some to allow running tests as root)
Jim Meyering [Tue, 11 Sep 2007 21:30:49 +0000 (23:30 +0200)]
Move all tests from test/{od,sha1sum,shred,stty} to tests/misc/.
Reflect these renamings:
od/od-N misc/od-N
od/x8 misc/od-x8
sha1sum/basic-1 misc/sha1sum
sha1sum/sample-vec misc/sha1sum-vec
shred/exact misc/shred-exact
shred/remove misc/shred-remove
stty/basic-1 misc/stty
stty/invalid misc/stty-invalid
stty/row-col-1 misc/stty-row-col
* tests/misc/Makefile.am (TESTS): Add the new files.
* tests/Makefile.am (SUBDIRS): Remove the dir names.
* tests/od, tests/sha1sum, tests/shred, tests/stty: Remove the directories.
* configure.ac (AC_CONFIG_FILES): Remove the corresponding Makefile names.
Jim Meyering [Tue, 11 Sep 2007 21:30:09 +0000 (23:30 +0200)]
Move the two tests in tests/tee to tests/misc/.
* tests/tee/basic: Move this file to ...
* tests/misc/tee: ...here. Don't rely on $PROG in env.
* tests/tee/dash: Move this file to ...
* tests/misc/tee-dash: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add tee.
* tests/Makefile.am (SUBDIRS): Remove tee.
* tests/tee: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/tee/Makefile
Jim Meyering [Mon, 10 Sep 2007 22:43:05 +0000 (00:43 +0200)]
Move the two tests in tests/sum/ to tests/misc/.
* tests/sum/basic-1: Move this file to ...
* tests/misc/sum: ...here. Don't rely on $PROG in env.
* tests/sum/sysv: Move this file to ...
* tests/misc/sum-sysv: ...here. Adapt it to use test-lib.sh.
* tests/misc/Makefile.am (TESTS): Add sum and sum-sysv.
* tests/Makefile.am (SUBDIRS): Remove sum.
* tests/sum: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/sum/Makefile.
Jim Meyering [Mon, 10 Sep 2007 19:29:46 +0000 (21:29 +0200)]
Move the sole test in tests/tsort/ to tests/misc/tsort.
* tests/tsort/basic-1: Move this file to ...
* tests/misc/tsort: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add tsort.
* tests/Makefile.am (SUBDIRS): Remove tsort.
* tests/tsort: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/tsort/Makefile.
Jim Meyering [Mon, 10 Sep 2007 17:08:31 +0000 (19:08 +0200)]
Move the sole test in tests/unexpand to tests/misc/unexpand.
* tests/unexpand/basic-1: Move this file to ...
* tests/misc/unexpand: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add unexpand.
* tests/Makefile.am (SUBDIRS): Remove unexpand.
* tests/unexpand: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/unexpand/Makefile.
Jim Meyering [Mon, 10 Sep 2007 17:01:39 +0000 (19:01 +0200)]
Move the sole test in tests/seq to tests/misc/seq.
* tests/seq/basic: Move this file to ...
* tests/misc/seq: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add seq.
* tests/Makefile.am (SUBDIRS): Remove seq.
* tests/seq: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/seq/Makefile
Jim Meyering [Mon, 10 Sep 2007 06:00:39 +0000 (08:00 +0200)]
Convert tests/mkdir/ to use test-lib.sh.
Jim Meyering [Sat, 8 Sep 2007 13:51:25 +0000 (15:51 +0200)]
Move the two tests in tests/md5sum to tests/misc/md5sum.
* tests/md5sum/basic-1: Move this file to ...
* tests/misc/md5sum: ...here. Don't rely on $PROG in env.
* tests/md5sum/newline-1: Move this file to ...
* tests/misc/md5sum-newline: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add md5sum.
* tests/Makefile.am (SUBDIRS): Remove md5sum.
* tests/md5sum: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/md5sum/Makefile
Jim Meyering [Sat, 8 Sep 2007 13:47:16 +0000 (15:47 +0200)]
tests/sample-test: Update to use test-lib.sh.
Jim Meyering [Sat, 8 Sep 2007 10:26:55 +0000 (12:26 +0200)]
Convert tests/misc/ to use test-lib.sh, too.
Jim Meyering [Sat, 8 Sep 2007 08:09:19 +0000 (10:09 +0200)]
Convert tests/ls/, too.
Jim Meyering [Sat, 8 Sep 2007 07:35:04 +0000 (09:35 +0200)]
Convert tests/ln/, too.
Jim Meyering [Sat, 8 Sep 2007 07:22:49 +0000 (09:22 +0200)]
Convert tests/install/, too.
Jim Meyering [Sat, 8 Sep 2007 06:57:42 +0000 (08:57 +0200)]
Move the two tests in tests/fmt to tests/misc/fmt.
* tests/fmt/basic: Move this file to ...
* tests/misc/fmt: ...here. Don't rely on $PROG in env.
* tests/fmt/long-line: Move this file to ...
* tests/misc/fmt-long-line: ...here.
* tests/misc/Makefile.am (TESTS): Add fmt.
* tests/Makefile.am (SUBDIRS): Remove fmt.
* tests/fmt: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/fmt/Makefile
Jim Meyering [Fri, 7 Sep 2007 21:54:49 +0000 (23:54 +0200)]
Move the sole test in tests/factor to tests/misc/factor.
* tests/factor/basic: Move this file to ...
* tests/misc/factor: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add factor.
* tests/Makefile.am (SUBDIRS): Remove factor.
* tests/factor: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/factor/Makefile
Jim Meyering [Fri, 7 Sep 2007 20:46:52 +0000 (22:46 +0200)]
Move the sole test in tests/expr to tests/misc/expr.
* tests/expr/basic: Move this file to ...
* tests/misc/expr: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add expr.
* tests/Makefile.am (SUBDIRS): Remove expr.
* tests/expr: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/expr/Makefile
Jim Meyering [Fri, 7 Sep 2007 13:25:23 +0000 (15:25 +0200)]
Convert tests/du/*, too.
Jim Meyering [Fri, 7 Sep 2007 12:34:37 +0000 (14:34 +0200)]
Move the sole test in tests/dircolors to tests/misc/dircolors.
* tests/dircolors/simple: Move this file to...
* tests/misc/dircolors: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add dircolors.
* tests/Makefile.am (SUBDIRS): Remove dircolors.
* tests/dircolors: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/dircolors/Makefile
Jim Meyering [Fri, 7 Sep 2007 12:28:47 +0000 (14:28 +0200)]
Convert tests/dd/*, too.
Jim Meyering [Thu, 6 Sep 2007 21:05:16 +0000 (23:05 +0200)]
Convert tests/mv, too.
* tests/other-fs-tmpdir: Before, all callers would exit 77 upon failure to
find the required dir. Now, exit 77 in this script so callers don't have to.
Adjust callers.
Jim Meyering [Thu, 6 Sep 2007 15:34:49 +0000 (17:34 +0200)]
Adjust chgrp, chmod, chown, cp tests to use test-lib.sh.
* tests/check.mk: Also define abs_top_builddir.
Jim Meyering [Thu, 16 Aug 2007 14:28:11 +0000 (16:28 +0200)]
Parallel "make check" support.
* build-aux/check.mk: New file, from The Vaucanson Group.
* .x-sc_GPL_version: New file, to allow "version 2 or later"
in build-aux/check.mk.
* Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
* tests/check.mk: New file.
* tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.
Begin factoring "sample-test" out of test scripts.
* tests/test-lib.sh: New file, to be sourced by all tests that
were previously derived from the "sample-test" template.
* tests/mkdtemp: New file.
* tests/touch/dir-1: Use test-lib.sh.
* tests/touch/empty-file: Likewise.
* tests/touch/fail-diag: Likewise.
* tests/touch/fifo: Likewise.
* tests/touch/no-create-missing: Likewise.
* tests/touch/no-rights: Likewise. Also, don't sleep.
* tests/touch/not-owner: Likewise.
* tests/touch/obsolescent: Likewise.
* tests/touch/read-only: Likewise.
* tests/touch/relative: Likewise.
* tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
to get the parallel-"make check" bits.
Move a slow test into tests/misc.
* tests/check.mk: Wrapper.
* tests/ls/time-1: Move this file to tests/misc/ls-time.
* tests/misc/ls-time: New file. From tests/ls/time-1.
* tests/ls/Makefile.am (TESTS): Remove time-1.
* tests/misc/Makefile.am (TESTS): Add ls-time.
Jim Meyering [Tue, 14 Aug 2007 08:21:48 +0000 (10:21 +0200)]
Add support for parallel "make check" (in tests/misc, for now)
Jim Meyering [Sat, 15 Sep 2007 06:39:53 +0000 (08:39 +0200)]
* vc-list-files: Remove mercurial support.
Check for CVS first. Adjust comments.
Jim Meyering [Sat, 8 Sep 2007 19:35:23 +0000 (21:35 +0200)]
Accommodate gnulib's renaming: __fpending.h -> fpending.h.
* lib/t-fpending.c: Include "fpending.h", not "__fpending.h".
Jim Meyering [Fri, 7 Sep 2007 08:37:08 +0000 (10:37 +0200)]
chmod: don't ignore a dangling symlink
* NEWS: Mention the bug fix.
* src/chmod.c (process_file): Handle the case of FTS_SLNONE,
i.e., give a diagnostic saying we cannot operate on such a file.
* tests/chmod/thru-dangling: Compare new stderr output with expected.
Bob Proulx [Fri, 7 Sep 2007 08:29:32 +0000 (10:29 +0200)]
Add a test: demonstrate that chmod ignores a dangling symlink
* tests/chmod/thru-dangling: New test. Fails.
* tests/chmod/Makefile.am (TESTS): Add thru-dangling.
Jim Meyering [Wed, 5 Sep 2007 08:57:54 +0000 (10:57 +0200)]
Adapt to new SELinux behavior: "?" vs. new "unlabeled"
* src/ls.c (gobble_file): Interpret the new "unlabeled" indicator
from getfilecon/lgetfilecon the same way we interpret a negative
return value: no security context. So we don't print the "+".
* tests/selinux: Recognize that "unlabeled" means insufficient
support for SELinux, just like "?".
Jim Meyering [Mon, 3 Sep 2007 08:52:49 +0000 (10:52 +0200)]
Run autoconf manually, if needed to get an updated version string.
* GNUmakefile: Don't actually touch configure.ac.
That would make git-version-gen always print "...-dirty".
Jim Meyering [Mon, 3 Sep 2007 08:38:14 +0000 (10:38 +0200)]
Don't change '-'s to '.'s in the string from git-describe.
* build-aux/git-version-gen: Leave '-'s in the string from git-describe.
Otherwise, s/-/./g would make it too hard to distinguish the base
version number from the appended .DD suffixes.
2007-09-03 Jim Meyering <jim@meyering.net>
Jim Meyering [Mon, 3 Sep 2007 07:06:10 +0000 (09:06 +0200)]
README-hacking: Require rsync, rather than wget.
Jim Meyering [Sun, 2 Sep 2007 11:49:49 +0000 (13:49 +0200)]
* bootstrap (WGET_COMMAND): Remove code to set this variable.
Jim Meyering [Sun, 2 Sep 2007 09:37:57 +0000 (11:37 +0200)]
Ensure that $(VERSION) is up to date for dist-related targets.
* GNUmakefile: Arrange to rerun autoconf, if the version reported
by git-version-gen doesn't match $(VERSION), but only for dist targets.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Sun, 2 Sep 2007 07:38:39 +0000 (09:38 +0200)]
bootstrap: uses rsync to download the .po files
* bootstrap (po_download_command_format): New global.
(download_po_files): Use rsync.
(update_po_files): Don't remove .po files after download,
so future rsync runs can take advantage of the copies.
Jim Meyering [Sat, 1 Sep 2007 17:00:09 +0000 (19:00 +0200)]
* bootstrap (gnulib_tool): Make sha1sum check quietly.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Sat, 1 Sep 2007 09:20:53 +0000 (11:20 +0200)]
Ensure that snapshot version changes make it to groups, too.
* src/Makefile.am (groups): Depend on Makefile.
Jim Meyering [Sat, 1 Sep 2007 09:20:42 +0000 (11:20 +0200)]
Make groups-version executable,
* tests/misc/groups-version: ... as it was in the patch.
Eric Blake [Fri, 31 Aug 2007 21:22:24 +0000 (23:22 +0200)]
Test yesterday's change to groups.
* tests/misc/groups-version: New test.
* tests/misc/Makefile.am (TESTS): Add groups-version.
Jim Meyering [Fri, 31 Aug 2007 20:17:53 +0000 (22:17 +0200)]
Solve the unnecessary-.po-file-regeneration problem once and for all.
* bootstrap (download_po_files): New function, renamed from
get_translations. Now, downloads, but doesn't update LINGUAS.
(update_po_files): New function.
Jim Meyering [Thu, 30 Aug 2007 21:13:06 +0000 (23:13 +0200)]
Shorten the snapshot version string by removing the "g".
* build-aux/git-version-gen: Remove git-describe's "g" that would
always precede the abbreviated SHA1. Suggestion from Dmitry V. Levin.
Jim Meyering [Thu, 30 Aug 2007 08:47:11 +0000 (10:47 +0200)]
Perform the s,rm,/bin/rm, fix-up properly. No more kludge.
* Makefile.am (EXTRA_DIST): Remove .kludge-stamp.
(.kludge-stamp): Remove rule. Instead, ...
(dist-hook): Do the job here, operating on the file in $(distdir).
(rm_subst): Adjust regexp to match "rm -f rm$(EXEEXT)", not "rm -f rm".
(MAINTAINERCLEANFILES): s/+=/=/, now that this is the sole use.
(dist-hook): Remove the legacy-from-cvs install-sh is-executable check.
* .gitignore: Remove .kludge-stamp.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Sat, 25 Aug 2007 22:48:41 +0000 (00:48 +0200)]
Make inter-release --version output more useful.
Now, each snapshot has a version "number" like 6.9-219-g58ddd,
which indicates that it is built using the 219th change set
(in _some_ repository) following the "v6.9" tag, and that 58ddd
is a prefix of the commit SHA1.
* build-aux/git-version-gen: New file.
* configure.ac: Run it to set the version.
* Makefile.am (dist-hook): Arrange so that .version appears only
in distribution tarballs, never in a checked-out repository.
* .gitignore: Add .version here, too. Just in case.
Signed-off-by: Jim Meyering <jim@meyering.net>
Eric Blake [Thu, 30 Aug 2007 03:02:24 +0000 (21:02 -0600)]
* src/.gitignore: Ignore *.exe for platforms with non-empty $(EXEEXT).
Eric Blake [Thu, 30 Aug 2007 15:11:59 +0000 (17:11 +0200)]
Use PACKAGE_NAME instead of GNU_PACKAGE.
* src/Makefile.am (.sh, uninstall-local): Adjust all users of
hand-rolled GNU_PACKAGE to instead use autoconf-provided
PACKAGE_NAME.
* src/basename.c (main): Likewise.
* src/chroot.c (main): Likewise.
* src/dirname.c (main): Likewise.
* src/echo.c (main): Likewise.
* src/expr.c (main): Likewise.
* src/factor.c (main): Likewise.
* src/groups.sh (version): Likewise. Also, reflect change in
--version output due to GPLv3.
* src/hostid.c (main): Likewise.
* src/hostname.c (main): Likewise.
* src/link.c (main): Likewise.
* src/logname.c (main): Likewise.
* src/nice.c (main): Likewise.
* src/nohup.c (main): Likewise.
* src/printenv.c (main): Likewise.
* src/printf.c (main): Likewise.
* src/pwd.c (main): Likewise.
* src/setuidgid.c (main): Likewise.
* src/sleep.c (main): Likewise.
* src/system.h (case_GETOPT_VERSION_CHAR): Likewise.
* src/test.c (main): Likewise.
* src/true.c (main): Likewise.
* src/unlink.c (main): Likewise.
* src/uptime.c (main): Likewise.
* src/users.c (main): Likewise.
* src/whoami.c (main): Likewise.
* src/yes.c (main): Likewise.
* configure.ac (AC_CHECK_DECLS): No need to check strtoimax,
strtoumax, since gnulib does this.
Jim Meyering [Tue, 28 Aug 2007 22:17:27 +0000 (00:17 +0200)]
Ensure that TMPDIR is valid. Otherwise, it would cause test failures.
* tests/misc/tty-eof: Set TMPDIR=.
* tests/misc/sort-compress: Likewise.
Jim Meyering [Tue, 28 Aug 2007 22:13:16 +0000 (00:13 +0200)]
Use EXIT_FAILURE, not EXIT_FAIL, now that EXIT_FAILURE is always 1.
* src/system.h (EXIT_FAIL): Remove definition.
* src/chroot.c (main): EXIT_FAIL -> EXIT_FAILURE.
* src/env.c (main): Likewise.
* src/nice.c (main): Likewise.
* src/su.c (change_identity, main): Likewise.
* src/tty.c (main): Likewise.
Suggestion from Eric Blake.
Jim Meyering [Tue, 28 Aug 2007 16:41:41 +0000 (18:41 +0200)]
* src/test.c (usage): Say that [ honors --help and --version, but test does not.
Jim Meyering [Tue, 28 Aug 2007 16:24:48 +0000 (18:24 +0200)]
By default, do not install hostname anymore; no kidding, this time.
* src/Makefile.am (EXTRA_PROGRAMS): Remove hostname from this list,
now that it's no longer being installed by default. This should
have been part of the 2007-08-21 change.
(check-duplicate-no-install): New rule to ensure this doesn't
happen again.
(check): Depend on it.
Jim Meyering [Tue, 28 Aug 2007 07:11:36 +0000 (09:11 +0200)]
Reflect renaming: mreadlink-with-size -> areadlink-with-size.
* bootstrap.conf: Update module name.
* src/copy.c (copy_internal): Update header and function names.
* src/ls.c (get_link_name): Likewise.
* src/readlink.c (main): Likewise.
* src/stat.c (print_stat): Likewise.
Jim Meyering [Mon, 27 Aug 2007 22:14:20 +0000 (00:14 +0200)]
Add file system type names and magic numbers from "man 2 statfs".
* src/stat.c (human_fstype): Also handle BEFS, BFS, BINFMT_MISC,
FUSECTL, HUGETLBFS, NFSD and OPENPROM.
Jim Meyering [Mon, 27 Aug 2007 21:46:49 +0000 (23:46 +0200)]
Add some file system type names and magic numbers from glibc.
* src/stat.c (human_fstype): Add any file system names and values
present in glibc's linux_fsinfo.h but not in this list.
Alphabetize the S_* names and capitalize the hexadecimal constants.
Jim Meyering [Sun, 26 Aug 2007 16:44:29 +0000 (18:44 +0200)]
tests/misc/fold: Fix a typo: missing \ in a never-seen diagnostic
Eric Blake [Sat, 25 Aug 2007 22:49:52 +0000 (00:49 +0200)]
Avoid case-insensitive clash in one-page-per-node html docs.
* coreutils.texi (Concept index): Rename from Index.
Jim Meyering [Sat, 25 Aug 2007 18:47:03 +0000 (20:47 +0200)]
* src/dircolors.hin: Add .dz and .svgz as archive suffixes.
Jim Meyering [Fri, 24 Aug 2007 22:27:11 +0000 (00:27 +0200)]
Remove all .cvsignore files from version control.
Jim Meyering [Fri, 24 Aug 2007 21:54:54 +0000 (23:54 +0200)]
bootstrap: Ignore more.
* bootstrap (symlink_to_dir): Add a directory name like
uniwidth to e.g., lib/.gitignore.
(slurp): Handle the sys_stat_.h -> sys mapping, too.
* .hgignore: Remove this file, too.
* Makefile.am (EXTRA_DIST): Remove .gitignore and .hgignore.
Jim Meyering [Fri, 24 Aug 2007 21:53:19 +0000 (23:53 +0200)]
No longer version-control .???ignore files in lib/, m4/, and po/.
* .gitignore: Ignore a few files in lib/, m4/, and po/ that are not
picked up automatically.
* lib/.gitignore, lib/.cvsignore: Remove files.
* m4/.gitignore, m4/.cvsignore: Remove files.
* po/.gitignore, po/.cvsignore: Remove files.
Jim Meyering [Fri, 24 Aug 2007 20:42:25 +0000 (22:42 +0200)]
bootstrap: when fetching .po files, do not remove .gmo files.
* bootstrap (get_translations): Don't remove *.gmo files!
They can be expensive to regenerate.
Jim Meyering [Fri, 24 Aug 2007 20:40:23 +0000 (22:40 +0200)]
Create .gitignore and/or .cvsignore from scratch, if absent.
This is in preparation for my removing those files from version
control in the directories managed by gnulib-tool.
* bootstrap: New setting: vc_ignore.
(insert_sorted_if_absent): Create $file if absent.
Adapt to new, possibly empty, list: $vc_ignore.
Jim Meyering [Fri, 24 Aug 2007 12:55:24 +0000 (14:55 +0200)]
* src/system.h (fseeko, ftello): Remove now-unneeded definitions.
Jim Meyering [Fri, 24 Aug 2007 12:51:55 +0000 (14:51 +0200)]
* src/od.c (LDBL_DIG): Remove now-unneeded definition.
Jim Meyering [Fri, 24 Aug 2007 12:07:06 +0000 (14:07 +0200)]
Arrange to use tag names like vM.N, rather than COREUTILS-M_N.
* Makefile.maint (this-vc-tag) [git]: Simply use v$(VERSION).
(this-vc-tag-regexp): New variable.
(vc-tag-check): Use it, rather than $(this-vc-tag).
Jim Meyering [Thu, 23 Aug 2007 14:33:11 +0000 (16:33 +0200)]
* src/dircolors.hin: Add xterm-16color, xterm-88color and eterm-color.
Suggestion from Dan Nicolaescu.
Jim Meyering [Thu, 23 Aug 2007 09:51:01 +0000 (11:51 +0200)]
Don't let ln be a party to destroying user data.
* src/ln.c: Include "file-set.h", "hash.h" and "hash-triple.h".
(dest_set, DEST_INFO_INITIAL_CAPACITY): New globals.
(do_link): Refuse to remove a just-created link.
Record a name,dev,ino triple for each link we create.
(main): Initialize dest_set, if needed.
* tests/mv/childproof: Test for the above fix.
* NEWS: Document this.
Reported by Eric Blake.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Thu, 23 Aug 2007 08:47:16 +0000 (10:47 +0200)]
Move functions from copy.c into new modules, since ln needs them, too.
* bootstrap.conf (gnulib_modules): Add file-set.
* gl/lib/file-set.c (record_file, seen_file): Functions from copy.c.
* gl/lib/file-set.h: Add prototypes.
* gl/lib/hash-triple.c (triple_hash, triple_hash_no_name):
(triple_compare, triple_free): Functions from copy.c.
* gl/lib/hash-triple.h (struct F_triple): Define. From copy.c.
Add prototypes.
* gl/modules/file-set: New module.
* gl/modules/hash-triple: New module.
* src/Makefile.am (copy_sources): New variable.
(ginstall_SOURCES, cp_SOURCES, mv_SOURCES): Use it.
* src/copy.c: Include hash-triple.h.
No longer include hash-pjw.h.
(copy_internal): Don't pass a NULL third argument to record_file,
since that function no longer accepts that.
(record_file): Move this function to file-set.c.
Along the way, remove the code to allow a NULL stat-buffer pointer.
Adjust sole caller.
(seen_file): Move this function to file-set.c.
(struct F_triple): Move declaration to hash-triple.h.
(triple_compare, triple_free, triple_hash, triple_hash_no_name):
Move these functions to hash-triple.c.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Thu, 23 Aug 2007 07:50:58 +0000 (09:50 +0200)]
bootstrap: generate more names and fix a bug
* bootstrap (slurp): Don't test for existence of $copied,
which is usually a newline-separated list of file names.
When generating ignorable names, also map .sin to .sed,
.gperf to .c, and .y to .c.
Jim Meyering [Thu, 23 Aug 2007 07:46:14 +0000 (09:46 +0200)]
* Makefile.maint (patch-check): Don't remove temporaries upon failure.
Jim Meyering [Wed, 22 Aug 2007 21:49:51 +0000 (23:49 +0200)]
* src/c99-to-c89.diff: Adjust offsets.
Jim Meyering [Wed, 22 Aug 2007 18:02:34 +0000 (20:02 +0200)]
Change "rm --verbose -r a//" not to print extra slashes in a///b
* src/remove.c (push_dir): Don't copy trailing slashes onto the stack.
Reported by François Pinard.
* tests/rm/v-slash: New file. Test for the above change.
* tests/rm/Makefile.am (TESTS): Add v-slash.