platform/upstream/coreutils.git
17 years ago* bootstrap.conf (avoided_gnulib_modules): Fix my typo:
Jim Meyering [Mon, 15 Jan 2007 09:32:09 +0000 (10:32 +0100)]
* bootstrap.conf (avoided_gnulib_modules): Fix my typo:
s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/

17 years ago* fchdir-stub.c: Remove file. No longer needed.
Jim Meyering [Sun, 14 Jan 2007 16:18:51 +0000 (17:18 +0100)]
* fchdir-stub.c: Remove file.  No longer needed.

17 years agoEnable use of gnulib's new fchdir module.
Bruno Haible [Sun, 14 Jan 2007 16:15:49 +0000 (17:15 +0100)]
Enable use of gnulib's new fchdir module.
* bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
since we use canonicalize.
(gnulib_modules): Add fchdir.
* m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.

17 years agoPut CU_TEST_NAME in the environment for each test run by "make check".
Jim Meyering [Sat, 13 Jan 2007 10:32:19 +0000 (11:32 +0100)]
Put CU_TEST_NAME in the environment for each test run by "make check".

* Transform all Makefile.am files so that when running "make check",
CU_TEST_NAME is set to the name of the test.  This is so that when I
run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
on the entire package it is more convenient to map a leak or error
found in a valgrind log file back to the offending test.
Use this command:
(echo tests/Makefile.am.in; find tests -name Makefile.am) \
 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
   -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'

17 years agoRegenerate .cvsignore and .gitignore files.
Jim Meyering [Sat, 13 Jan 2007 10:22:01 +0000 (11:22 +0100)]
Regenerate .cvsignore and .gitignore files.

17 years agoAvoid a leak in expr's implementation of the ":" (match) operator.
Jim Meyering [Thu, 11 Jan 2007 18:31:27 +0000 (19:31 +0100)]
Avoid a leak in expr's implementation of the ":" (match) operator.
* src/expr.c (docolon): Free the regexp buffer using regfree, rather
than doing it manually, being careful to set fastmap to NULL first.
Free any re_regs.start and .end members, if necessary.

17 years ago* tests/misc/test-diag: Work also when libc's error function
Jim Meyering [Thu, 11 Jan 2007 17:59:24 +0000 (18:59 +0100)]
* tests/misc/test-diag: Work also when libc's error function
reports the entire program name ("../../src/test"), rather than
just the final component.

17 years agoMerge branch 'master' of /cu
Jim Meyering [Thu, 11 Jan 2007 13:50:09 +0000 (14:50 +0100)]
Merge branch 'master' of /cu

17 years agotrivial merge
Jim Meyering [Thu, 11 Jan 2007 13:49:19 +0000 (14:49 +0100)]
trivial merge

17 years agoDon't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
Jim Meyering [Wed, 10 Jan 2007 21:00:44 +0000 (22:00 +0100)]
Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
* src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
(change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
directory.  Non-directory entries lack fts_statp data when using
the FTS_NOSTAT option.

17 years ago* tests/sample-test: Update copyright date to 2007.
Jim Meyering [Sun, 7 Jan 2007 17:38:56 +0000 (18:38 +0100)]
* tests/sample-test: Update copyright date to 2007.
* Makefile.maint (copyright-check): Also check the copyright date
in tests/sample-test.

17 years ago* tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
Jim Meyering [Sat, 6 Jan 2007 09:42:17 +0000 (10:42 +0100)]
* tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
based on examples from G.P. Halkes in
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.

17 years ago* src/fmt.c (copy_rest): Correct prefix handling.
G.P. Halkes [Sat, 6 Jan 2007 08:49:47 +0000 (09:49 +0100)]
* src/fmt.c (copy_rest): Correct prefix handling.
Don't elide a line with the prefix followed by only white space.
(get_line): Move EOF-check to loop-termination condition.
* tests/fmt/basic (pfx-1): Adjust test to expect desired result.
(pfx-2): Remove test; its premise was contrary to the documentation.

17 years agoAvoid a used-uninitialized bug for invalid input, i.e., when the size
Jim Meyering [Fri, 5 Jan 2007 11:30:51 +0000 (12:30 +0100)]
Avoid a used-uninitialized bug for invalid input, i.e., when the size
of the input, not counting newlines, is 1 % 4.
* gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
It may be smaller when flushing.

17 years ago* src/dircolors.hin: Add a TERM directive for cons25.
Mike Frysinger [Fri, 5 Jan 2007 08:52:10 +0000 (09:52 +0100)]
* src/dircolors.hin: Add a TERM directive for cons25.

17 years agoUse the release year, not the current year.
Jim Meyering [Thu, 4 Jan 2007 14:34:29 +0000 (15:34 +0100)]
Use the release year, not the current year.
* src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
* src/Makefile.am (RELEASE_YEAR): Define it.
(.sh): Use it.
Thanks to a prod from Eric Blake.

17 years agoEnsure that "group --version" always prints the current year.
Jim Meyering [Thu, 4 Jan 2007 13:55:42 +0000 (14:55 +0100)]
Ensure that "group --version" always prints the current year.
* src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
* src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
Suggestion from Eric Blake.

17 years ago* Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
Jim Meyering [Thu, 4 Jan 2007 11:08:36 +0000 (12:08 +0100)]
* Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
case you don't have convenient access to glibc info documentation.

17 years ago.cvsignore, .gitignore: Add fchownat.c and wctype-related files.
Jim Meyering [Thu, 4 Jan 2007 11:01:48 +0000 (12:01 +0100)]
.cvsignore, .gitignore: Add fchownat.c and wctype-related files.

17 years ago[ChangeLog]
Jim Meyering [Thu, 4 Jan 2007 10:52:52 +0000 (11:52 +0100)]
[ChangeLog]
When decoding, always allow newlines in input, with almost no
performance impact.
* src/base64.c (do_decode): Initialize decode context.
Call base64_decode one more time, after all input is processed.
(usage): When decoding, newlines are always accepted.

* tests/misc/base64: Add a bunch of tests, for the above.
* gl/lib/base64.c: Include <string.h>.
(base64_decode_ctx_init, get_4, decode_4): New functions.
(base64_decode): Efficiently handle interspersed newlines.
(base64_decode_alloc): Update signature.
* gl/lib/base64.h (struct base64_decode_context): Define.
(base64_decode_ctx_init): Add prototype.
(base64_decode, base64_decode_alloc): Update prototypes.
[doc/ChangeLog]
* coreutils.texi (base64 invocation): When decoding, newlines
are always accepted.

17 years ago* gl/lib/base64.c: Copied from gnulib.
Jim Meyering [Thu, 4 Jan 2007 10:36:54 +0000 (11:36 +0100)]
* gl/lib/base64.c: Copied from gnulib.
* gl/lib/base64.h: Likewise.

17 years ago[oops] Document what the ".0" in e.g., "-k 2,3.0" means, and...
Evan Hunt [Wed, 3 Jan 2007 11:24:35 +0000 (12:24 +0100)]
[oops] Document what the ".0" in e.g., "-k 2,3.0" means, and...
* coreutils.texi (sort invocation): ... that it can be applied to the
field-end spec, but not the field-start one.  Patch from Evan Hunt.

Signed-off-by: Jim Meyering <jim@meyering.net>
17 years agoDocument what the ".0" in e.g., "-k 2,3.0" means, and...
Evan Hunt [Wed, 3 Jan 2007 11:04:24 +0000 (12:04 +0100)]
Document what the ".0" in e.g., "-k 2,3.0" means, and...
* coreutils.texi (sort invocation): ... that it can be applied to the
field-end spec, but not the field-start one.  Patch from Evan Hunt.

Signed-off-by: Jim Meyering <jim@meyering.net>
17 years agoAvoid spurious test failures on MacOS X 10.3.9, in a German locale.
Bruno Haible [Wed, 3 Jan 2007 09:51:37 +0000 (10:51 +0100)]
Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
* tests/chown/deref: Apply lang-default.
* tests/misc/split-a: Likewise.
* tests/mv/reply-no: Likewise.

Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago* src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
Bruno Haible [Wed, 3 Jan 2007 09:46:25 +0000 (10:46 +0100)]
* src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
Needed on MacOS X.

Signed-off-by: Jim Meyering <jim@meyering.net>
17 years agoNow, "ls -FRL" always follows symbolic links on Linux.
Paul Eggert [Tue, 2 Jan 2007 06:27:22 +0000 (07:27 +0100)]
Now, "ls -FRL" always follows symbolic links on Linux.
* NEWS: Mention this bug fix.
* src/ls.c (gobble_file): Fix bug reported by
Nobuyuki Tsuchimura in
http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
* tests/ls/follow-slink: Add a test for this case.

Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago* tests/rm/fail-eperm: Instead, simply transform the actual output diagnostic.
Jim Meyering [Mon, 1 Jan 2007 09:56:01 +0000 (10:56 +0100)]
* tests/rm/fail-eperm: Instead, simply transform the actual output diagnostic.
Test failure reported by Bob Proulx.

17 years ago* tests/rm/fail-eperm: Revert last change. The PATH=... setting
Jim Meyering [Mon, 1 Jan 2007 08:51:43 +0000 (09:51 +0100)]
* tests/rm/fail-eperm: Revert last change.  The PATH=... setting
is not honored at least on HP-UX 11.23 systems.

17 years ago* bootstrap (gnulib_extra_files): Remove announce-gen.
Jim Meyering [Sat, 30 Dec 2006 21:16:35 +0000 (22:16 +0100)]
* bootstrap (gnulib_extra_files): Remove announce-gen.
* bootstrap.conf (gnulib_modules): Add it here instead, now that
it's a module.

17 years ago* tests/misc/base64: Factor a long, repetitive string.
Jim Meyering [Sat, 30 Dec 2006 16:46:09 +0000 (17:46 +0100)]
* tests/misc/base64: Factor a long, repetitive string.

17 years ago* src/c99-to-c89.diff: Adjust remove.c offsets.
Jim Meyering [Sat, 30 Dec 2006 15:19:26 +0000 (16:19 +0100)]
* src/c99-to-c89.diff: Adjust remove.c offsets.

17 years agoClean up after the change of 2006-12-28.
Jim Meyering [Sat, 30 Dec 2006 15:12:23 +0000 (16:12 +0100)]
Clean up after the change of 2006-12-28.
* src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
now that this function never modifies the pointer.  Adjust comments
and code accordingly.
(remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
now that AD_pop_and_chdir no longer does that.

17 years ago* tests/rm/fail-eperm: Avoid spurious differences (the error function
Jim Meyering [Sat, 30 Dec 2006 11:50:43 +0000 (12:50 +0100)]
* tests/rm/fail-eperm: Avoid spurious differences (the error function
from latest glibc no longer prints the full program_name): so don't
invoke rm via ../../src/rm.  Instead, invoke it via "PATH=../../src rm".

17 years ago* tests/mv/acl (skip): Skip this test also if the destination
Jim Meyering [Sat, 30 Dec 2006 10:49:04 +0000 (11:49 +0100)]
* tests/mv/acl (skip): Skip this test also if the destination
directory, which is on a different file system, lacks ACL support.

17 years ago* src/copy.c (copy_reg): Rewrite a comment that was rendered
Jim Meyering [Sat, 30 Dec 2006 08:34:31 +0000 (09:34 +0100)]
* src/copy.c (copy_reg): Rewrite a comment that was rendered
inaccurate by the 2006-10-18 change.

17 years agoWhen moving "up" the hierarchy, be careful to remove a just-emptied
Jim Meyering [Thu, 28 Dec 2006 18:37:07 +0000 (19:37 +0100)]
When moving "up" the hierarchy, be careful to remove a just-emptied
directory before opening ".", to avoid trouble with file system
implementations that cache readdir results at opendir-time.
* src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
Don't update **DIRP.  Don't call fdopendir here.
(remove_dir): Call fdopendir here instead.
Report and patch from Mikulas Patocka:
<http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>

17 years agoRemove 2006-12-24 entry (the corresponding change was never committed).
Jim Meyering [Thu, 28 Dec 2006 08:25:26 +0000 (09:25 +0100)]
Remove 2006-12-24 entry (the corresponding change was never committed).
The underlying problem was fixed on 2006-12-26, by requiring a new-enough
version of autoconf.

17 years ago* src/tail.c (usage): Mention +N for --bytes and --lines.
Jim Meyering [Wed, 27 Dec 2006 15:00:15 +0000 (16:00 +0100)]
* src/tail.c (usage): Mention +N for --bytes and --lines.
Suggestion from Evan Hunt.

17 years ago* configure.ac: Require autoconf-2.61 and automake-1.10.
Jim Meyering [Wed, 27 Dec 2006 10:27:54 +0000 (11:27 +0100)]
* configure.ac: Require autoconf-2.61 and automake-1.10.
Without the former (even with autoconf-2.60), "make distcheck"
would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
due to an inttypes.h generated with CFLAGS including -pedantic.
With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.

17 years ago* Makefile.maint (VC-tag): Define, so as to gpg-sign each release
Jim Meyering [Tue, 26 Dec 2006 15:42:33 +0000 (16:42 +0100)]
* Makefile.maint (VC-tag): Define, so as to gpg-sign each release
tag, using the release version number as the message.
(vc-dist): Use $(VC-tag), rather than "$(VC) tag".

2006-12-24  Jim Meyering  <jim@meyering.net>

* Makefile.maint (my-distcheck): Don't *configure* with
restrictive CFLAGS ('-Werror -ansi -pedantic -Wno-long-long'),
since it ends up provoking errors in generation of inttypes.h
on an Ubuntu edgy-based system.  That leads to compilation
failure due to e.g., imaxabs redefinition.
Instead, configure with default CFLAGS, and compile the
package with restrictive CFLAGS.

17 years ago* NEWS: dd bs= operands now silently override later ibs= and obs=,
Paul Eggert [Fri, 22 Dec 2006 09:09:37 +0000 (10:09 +0100)]
* NEWS: dd bs= operands now silently override later ibs= and obs=,
as POSIX requires.
* src/dd.c (scanargs): Implement it.
* tests/dd/misc (outbytes): Test it.
* doc/coreutils.texi (dd invocation): Specify that bs=N
overrides later ibs and obs, undoing part of the
previous change.  (The behavior was wrong.)

17 years ago* coreutils.texi (dd invocation): Specify that bs=N overrides only any
Jim Meyering [Thu, 21 Dec 2006 10:13:48 +0000 (11:13 +0100)]
* coreutils.texi (dd invocation): Specify that bs=N overrides only any
_preceding_ ibs and obs settings.  Spotted by Andreas Schwab.

17 years ago* Makefile.maint (patch-check): Fix shell quoting.
Jim Meyering [Thu, 21 Dec 2006 10:05:16 +0000 (11:05 +0100)]
* Makefile.maint (patch-check): Fix shell quoting.

17 years ago* coreutils.texi (dd invocation): Add to the description of cbs.
Jim Meyering [Thu, 21 Dec 2006 09:24:51 +0000 (10:24 +0100)]
* coreutils.texi (dd invocation): Add to the description of cbs.

17 years ago* coreutils.texi (dd invocation): Improve the documentation
Jim Meyering [Thu, 21 Dec 2006 09:18:58 +0000 (10:18 +0100)]
* coreutils.texi (dd invocation): Improve the documentation
for bs, ibs, obs, and cbs.  Suggestion from Dan Jacobson.
Patch by Olivier Delhomme.

17 years ago"rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
Jim Meyering [Wed, 20 Dec 2006 18:56:20 +0000 (19:56 +0100)]
"rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
* src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
Karl Berry reported that a cross-partition "mv /etc/issue ~"
failed with the um,... suboptimal diagnostic,
"mv: cannot remove `/etc/issue': Not a directory".
* tests/rm/Makefile.am (TESTS): Add fail-eacces.
* tests/rm/fail-eacces: New file.
* NEWS: Mention that both mv and rm are affected.

17 years ago"cut -f 2- A B" no longer triggers a double-free bug
Jim Meyering [Wed, 20 Dec 2006 13:25:55 +0000 (14:25 +0100)]
"cut -f 2- A B" no longer triggers a double-free bug
* src/cut.c (cut_fields): Set file-scoped global to NULL after
freeing it.  This avoids a double-free (and core dump on some systems)
for this usage: "echo 1>a; echo 2>b; cut -f2- a b".  Reported by
James Hunt in <http://bugzilla.redhat.com/220312>.
* NEWS: List this bug fix.
* THANKS: Mention him.
* tests/misc/cut: New file.
* tests/misc/Makefile.am (TESTS): Add cut.

17 years ago* tests/cp/open-perm-race: Correct the gdb-existence check.
Jim Meyering [Fri, 15 Dec 2006 09:43:20 +0000 (10:43 +0100)]
* tests/cp/open-perm-race: Correct the gdb-existence check.
Don't run either subsequent gdb command in a sub-shell.
Reported by Thomas Schwinge.
* THANKS: bring up to date.

17 years agoMake sure cp -p isn't too generous with file permissions.
Paul Eggert [Fri, 15 Dec 2006 08:50:40 +0000 (09:50 +0100)]
Make sure cp -p isn't too generous with file permissions.
* tests/cp/Makefile.am (TESTS): Add file-perm-race.
* tests/cp/file-perm-race: New file.
Signed-off-by: Jim Meyering <jim@meyering.net>
17 years agoEnsure cp -pR --parents isn't too generous with parent permissions.
Paul Eggert [Fri, 15 Dec 2006 08:44:58 +0000 (09:44 +0100)]
Ensure cp -pR --parents isn't too generous with parent permissions.
* tests/cp/Makefile.am (TESTS): Add parent-perm-race.
* tests/cp/parent-perm-race: New file.
Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago* tests/chgrp/default-no-deref: Don't assume that files are created
Jim Meyering [Thu, 14 Dec 2006 20:07:49 +0000 (21:07 +0100)]
* tests/chgrp/default-no-deref: Don't assume that files are created
with the primary group by default.  That's not true in a directory
with the set-GID bit set.

17 years agoDon't hang when there's no input tty.
Jim Meyering [Thu, 14 Dec 2006 18:32:10 +0000 (19:32 +0100)]
Don't hang when there's no input tty.
* tests/cp/open-perm-race: Skip this test if there is no
controlling input `terminal'.

17 years agoTest for a hard-to-detect race fix, using gdb.
Jim Meyering [Thu, 14 Dec 2006 16:17:31 +0000 (17:17 +0100)]
Test for a hard-to-detect race fix, using gdb.
* tests/cp/open-perm-race: New file, to test for the
cp --preserve=ownership fix of 2006-12-06.
* tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
(TESTS): Add open-perm-race.

17 years agochgrp, chown: Don't prohibit -RLh, aka -RL with --no-dereference.
Jim Meyering [Thu, 14 Dec 2006 14:41:05 +0000 (15:41 +0100)]
chgrp, chown: Don't prohibit -RLh, aka -RL with --no-dereference.
* src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
* src/chown.c (main): Likewise.
* src/chown-core.c (change_file_owner): Add to a comment.
* tests/chown/preserve-root: Add tests.
* doc/coreutils.texi (Treating / specially): With --preserve-root,
chgrp and chown will not modify "/", even through a symlink.

17 years ago* NEWS: --preserve-root now works with chgrp, chmod, and chown.
Jim Meyering [Thu, 14 Dec 2006 10:09:44 +0000 (11:09 +0100)]
* NEWS: --preserve-root now works with chgrp, chmod, and chown.
* src/chmod.c (process_file): Do honor the --preserve-root option.
* src/chown-core.c (change_file_owner): Likewise, but here, also
handle the case in which a traversal would go "through" a symlink
to root.  Reported by Matthew M. Boedicker
* tests/chown/preserve-root: Test for the above.
* tests/chown/Makefile.am (TESTS): Add preserve-root.

17 years ago* coreutils.texi: Remove two doubled words.
Jim Meyering [Thu, 14 Dec 2006 08:15:51 +0000 (09:15 +0100)]
* coreutils.texi: Remove two doubled words.

17 years ago* NEWS: Mention the chmod fix induced by the recent change to gnulib's openat.m4.
Jim Meyering [Wed, 13 Dec 2006 23:22:50 +0000 (00:22 +0100)]
* NEWS: Mention the chmod fix induced by the recent change to gnulib's openat.m4.

17 years agoDon't fail if mv/acl test succeeds.
Andreas Schwab [Wed, 13 Dec 2006 21:26:23 +0000 (22:26 +0100)]
Don't fail if mv/acl test succeeds.
* tests/mv/acl (skip): Check for acl support in the file system.
* tests/mv/Makefile.am (XFAIL_TESTS): Remove.
(TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
Signed-off-by: Jim Meyering <jim@meyering.net>
17 years agoRemove some arbitrary restrictions on size fields,
Paul Eggert [Wed, 13 Dec 2006 21:03:54 +0000 (22:03 +0100)]
Remove some arbitrary restrictions on size fields,
so that commands like "sort -k 18446744073709551616" no longer fail merely
because 18446744073709551616 doesn't fit in uintmax_t.  The trick is that
these fields can all be treated as effectively infinity;  their exact
values don't matter, since no internal buffer can be that long.
* src/join.c (string_to_join_field): Verify that SIZE_MAX <= ULONG_MAX
if the code assumes this.  Silently truncate too-large values to SIZE_MAX,
as the remaining code will do the right thing in this case.
* src/sort.c (parse_field_count): Likewise.
* src/uniq.c (size_opt, main): Likewise.
* tests/join/Test.pm (bigfield): New test.
* tests/sort/Test.pm (bigfield): New test.
* tests/uniq/Test.pm (121): New test.
Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago* tests/chgrp/default-no-deref: New test.
Jim Meyering [Wed, 13 Dec 2006 12:28:17 +0000 (13:28 +0100)]
* tests/chgrp/default-no-deref: New test.
* tests/chgrp/Makefile.am (TESTS): Add default-no-deref.

17 years ago* jm-macros.m4: Remove AC_FUNC_SETVBUF_REVERSED, now that it's a no-op.
Jim Meyering [Tue, 12 Dec 2006 13:41:30 +0000 (14:41 +0100)]
* jm-macros.m4: Remove AC_FUNC_SETVBUF_REVERSED, now that it's a no-op.

17 years ago* src/system.h (SETVBUF): Remove definition, now that the
Jim Meyering [Tue, 12 Dec 2006 13:34:23 +0000 (14:34 +0100)]
* src/system.h (SETVBUF): Remove definition, now that the
autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
* src/tee.c (tee_files): s/SETVBUF/setvbuf/.
* src/od.c (open_next_file): Likewise.

17 years ago* man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
Jim Meyering [Sat, 9 Dec 2006 18:20:56 +0000 (19:20 +0100)]
* man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
"source".  I.e. "GNU coreutils 6.7".

17 years ago* NEWS: With the change from "-pre" to "-dirty" suffix, also change
Jim Meyering [Sat, 9 Dec 2006 14:57:06 +0000 (15:57 +0100)]
* NEWS: With the change from "-pre" to "-dirty" suffix, also change
from NEXT_VER-pre to CUR_VER-dirty.  So, this is 6.7-dirty.
* configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.

17 years ago* tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
Jim Meyering [Sat, 9 Dec 2006 13:17:00 +0000 (14:17 +0100)]
* tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
whenever uniq is expected to fail.  This should catch the other case
[test #112] in which uniq emits "cat: write error: Broken pipe" on
some systems.

17 years agoInclude bootstrap tool version info in the announcement form.
Jim Meyering [Fri, 8 Dec 2006 09:28:05 +0000 (10:28 +0100)]
Include bootstrap tool version info in the announcement form.
* Makefile.maint (gnulib_snapshot_date): Define.
(announcement): Use two new announce-gen options,
--bootstrap-tools and --gnulib-snapshot-date.
* Makefile.cfg (gnulib_dir): Set.

17 years agoPost-release version change.
Jim Meyering [Fri, 8 Dec 2006 07:28:04 +0000 (08:28 +0100)]
Post-release version change.
* NEWS: Add a line for 6.8-dirty.
* configure.ac (AC_INIT): Set new version string.

17 years ago.prev-version: Record previous version: 6.7.
Jim Meyering [Thu, 7 Dec 2006 23:19:29 +0000 (00:19 +0100)]
.prev-version: Record previous version: 6.7.

17 years agoVersion 6.7. COREUTILS-6_7 v6.7
Jim Meyering [Thu, 7 Dec 2006 23:00:19 +0000 (00:00 +0100)]
Version 6.7.
* NEWS: Record release date.  Remove '-pre' suffix.
* configure.ac (AC_INIT): Remove version string suffix.

17 years ago* tests/touch/empty-file: Use envvar-check, so "make check" doesn't
Jim Meyering [Thu, 7 Dec 2006 09:11:40 +0000 (10:11 +0100)]
* tests/touch/empty-file: Use envvar-check, so "make check" doesn't
evoke diagnostics like this when COLUMNS=0 in the environment:
ls: ignoring invalid width in environment variable COLUMNS: 0
* tests/touch/no-rights: Likewise.
* tests/help-version: Likewise.

17 years agoMake the output of "make check" more reproducible.
Jim Meyering [Thu, 7 Dec 2006 09:04:04 +0000 (10:04 +0100)]
Make the output of "make check" more reproducible.
* tests/uniq/Test.pm: Don't perform the pipe-reading version of test
118, since it emits "cat: write error: Broken pipe" on some systems.

17 years agocp -p now clears special bits if it fails to preserve owner or group
Paul Eggert [Thu, 7 Dec 2006 07:10:35 +0000 (08:10 +0100)]
cp -p now clears special bits if it fails to preserve owner or group
* NEWS: Document the cp -p fix for special bits.
* src/copy.c (set_owner): Now returns a three-way result, so
that the caller can clear the special bits.  All callers changed.
(copy_reg): Don't set the special bits if chown failed.
(copy_internal): Likewise.
* tests/cp/special-bits: Test this fix.
Signed-off-by: Jim Meyering <jim@meyering.net>
17 years ago* NEWS: Document the cp --preserve=ownership fix.
Paul Eggert [Wed, 6 Dec 2006 19:44:08 +0000 (20:44 +0100)]
* NEWS: Document the cp --preserve=ownership fix.
* m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
* src/copy.c (fchmod_or_lchmod): New function.
(copy_reg): New arg OMITTED_PERMISSIONS.  All uses changed.
Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
When creating a file, use O_EXCL, so we're more likely to detect
funny business by other processes.  At the end, if permissions
were omitted, chmod them back in.
(copy_internal): If the ownership might change, omit some permissions
at first, then restore them after chowning the file.
* src/cp.c (make_dir_parents_private): Likewise.
* src/copy.c (cached_umask): New function.
* src/copy.h (cached_umask): New decl.

17 years agoMake the output of "make check" more reproducible.
Jim Meyering [Wed, 6 Dec 2006 15:36:29 +0000 (16:36 +0100)]
Make the output of "make check" more reproducible.
* tests/misc/date-sec: Don't emit any diagnostic about sleeping.

17 years agoNEWS: the du bug affects coreutils-6.4, 6.5 and 6.6.
Jim Meyering [Wed, 6 Dec 2006 12:18:43 +0000 (13:18 +0100)]
NEWS: the du bug affects coreutils-6.4, 6.5 and 6.6.

17 years agoinstall.c: Preserve time stamps before changing owner or file mode bits,
Paul Eggert [Mon, 4 Dec 2006 09:06:11 +0000 (10:06 +0100)]
install.c: Preserve time stamps before changing owner or file mode bits,
for consistency with other coreutils programs.

17 years ago* Makefile.am (libcoreutils_a_SOURCES): Remove xmemcoll.c and
Jim Meyering [Sun, 3 Dec 2006 18:42:26 +0000 (19:42 +0100)]
* Makefile.am (libcoreutils_a_SOURCES): Remove xmemcoll.c and
xmemcoll.h.  Now, they're handled by the gnulib xmemcoll module.

17 years ago* tests/misc/date-sec: Output a fixed string.
Jim Meyering [Sun, 3 Dec 2006 15:01:41 +0000 (16:01 +0100)]
* tests/misc/date-sec: Output a fixed string.

17 years agoAdd "Reported by"
Jim Meyering [Sun, 3 Dec 2006 10:32:31 +0000 (11:32 +0100)]
Add "Reported by"

17 years ago* NEWS: du --one-file-system (-x) would skip subdirectories of any
Jim Meyering [Sun, 3 Dec 2006 10:17:35 +0000 (11:17 +0100)]
* NEWS: du --one-file-system (-x) would skip subdirectories of any
directory listed as second or subsequent command line argument.
* tests/du/one-file-system: New file.  Test for today's fts.c fix.
* tests/du/Makefile.am (TESTS): Add one-file-system.

17 years ago* tests/du/basic: Generate 4KB file simply using printf, rather than
Jim Meyering [Sat, 2 Dec 2006 21:04:13 +0000 (22:04 +0100)]
* tests/du/basic: Generate 4KB file simply using printf, rather than
seq+head.  This avoids a spurious "Broken pipe" diagnostic from seq.

17 years ago* perm.texi (Mode Structure): Fix typo: s/setgid/setuid/.
Jim Meyering [Tue, 28 Nov 2006 22:03:08 +0000 (23:03 +0100)]
* perm.texi (Mode Structure): Fix typo: s/setgid/setuid/.
Reported by Georg Neis as Debian bug 400778.

17 years ago* tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
Jim Meyering [Tue, 28 Nov 2006 12:36:37 +0000 (13:36 +0100)]
* tests/mv/no-target-dir: Detect a buggy rename syscall.  If found,
skip this test.  This happens at least on ia64 linux-2.4.19 w/ext3.
Reported by Matthew Woehlke.

17 years ago* tests/mv/dir2dir: Also accept EBUSY.
Jim Meyering [Tue, 28 Nov 2006 08:21:00 +0000 (09:21 +0100)]
* tests/mv/dir2dir: Also accept EBUSY.
Reported by Matthew Woehlke.

17 years ago* Makefile.maint (patch-check): Rewrite to diagnose failure.
Jim Meyering [Mon, 27 Nov 2006 13:38:35 +0000 (14:38 +0100)]
* Makefile.maint (patch-check): Rewrite to diagnose failure.
* src/c99-to-c89.diff: Adjust shred.c offsets.

17 years agoImprove the check for departures from C89, and fix the departures
Paul Eggert [Mon, 27 Nov 2006 10:27:46 +0000 (11:27 +0100)]
Improve the check for departures from C89, and fix the departures
I found.
* Makefile.maint (my-distcheck): Also check for C89 compatibility
as best we can with GCC.
* src/stat.c (PRINTF_OPTION): Omit comma before } in enum
declaration; C89 doesn't allow this.
* src/dcgen: Don't generate string literals longer than
what C89 requires support for.
* src/cut.c (usage): Don't use string literals longer than
what C89 requires support for.
* src/date.c (usage): Likewise.
* src/dd.c (usage): Likewise.
* src/du.c (usage): Likewise.
* src/ls.c (usage): Likewise.
* src/od.c (usage): Likewise.
* src/readlink.c (usage): Likewise.
* src/seq.c (usage): Likewise.
* src/shred.c (usage): Likewise.

17 years agorecognize new archive, audio, image formats; give audio files a separate color
Mike Frysinger [Mon, 27 Nov 2006 07:58:40 +0000 (08:58 +0100)]
recognize new archive, audio, image formats; give audio files a separate color
* src/dircolors.hin: Add comments for common .sh and .csh scripts.
Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
suffixes.  Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
.qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes.  Change
audio color to 00;36 to differentiate from image/video color.

17 years ago* Makefile.maint (patch-check): Compile patched sources with
Jim Meyering [Sun, 26 Nov 2006 17:51:27 +0000 (18:51 +0100)]
* Makefile.maint (patch-check): Compile patched sources with
CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
no violations remain.

17 years ago* src/c99-to-c89.diff: Remove 3 bogus hunks.
Jim Meyering [Sun, 26 Nov 2006 17:49:55 +0000 (18:49 +0100)]
* src/c99-to-c89.diff: Remove 3 bogus hunks.

17 years ago* src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
Jim Meyering [Sun, 26 Nov 2006 17:47:54 +0000 (18:47 +0100)]
* src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
Update callers.

17 years ago* src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
Jim Meyering [Sun, 26 Nov 2006 17:42:56 +0000 (18:42 +0100)]
* src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.

17 years ago* src/rm.c (main): Remove unnecessary (assuming C99) braces.
Jim Meyering [Sun, 26 Nov 2006 17:35:38 +0000 (18:35 +0100)]
* src/rm.c (main): Remove unnecessary (assuming C99) braces.

17 years agoReflect that these are Paul's changes. I've divided them into separate
Jim Meyering [Sun, 26 Nov 2006 10:07:15 +0000 (11:07 +0100)]
Reflect that these are Paul's changes. I've divided them into separate

deltas.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years agoPort parts of the code to C89 to minimize the need for c99-to-c89.diff,
Paul Eggert [Sun, 26 Nov 2006 10:02:48 +0000 (11:02 +0100)]
Port parts of the code to C89 to minimize the need for c99-to-c89.diff,

while trying to retain the readability of C99 as much as possible.
* src/remove.c (close_preserve_errno): Remove.
(fd_to_subdirp): Rewrite to avoid the need for decl after statement.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* src/remove.c (rm): Move cycle_check_init call into callee...
Paul Eggert [Sat, 25 Nov 2006 10:13:05 +0000 (11:13 +0100)]
* src/remove.c (rm): Move cycle_check_init call into callee...

Use an else clause in place of a "continue" statement.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* src/remove.c (AD_ensure_initialized): New function.
Paul Eggert [Sat, 25 Nov 2006 10:08:20 +0000 (11:08 +0100)]
* src/remove.c (AD_ensure_initialized): New function.

after statement.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* src/remove.c (AD_pop_and_chdir): Return prev_dir rather than storing through
Paul Eggert [Sat, 25 Nov 2006 10:01:28 +0000 (11:01 +0100)]
* src/remove.c (AD_pop_and_chdir): Return prev_dir rather than storing through

a pointer argument.  All uses changed.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* src/remove.c (cache_stat_init): Return its argument, for convenience.
Paul Eggert [Sat, 25 Nov 2006 09:59:22 +0000 (10:59 +0100)]
* src/remove.c (cache_stat_init): Return its argument, for convenience.

Update the caller in remove_dir.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* src/remove.c (rm_1): Remove decl of local, fd_cwd.
Paul Eggert [Sat, 25 Nov 2006 09:55:32 +0000 (10:55 +0100)]
* src/remove.c (rm_1): Remove decl of local, fd_cwd.

Replace each of two uses with literal AT_FDCWD.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
17 years ago* Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
Jim Meyering [Sat, 25 Nov 2006 18:16:26 +0000 (19:16 +0100)]
* Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.