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/.
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.
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.
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.
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.
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>
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.
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.
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.
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.
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.
Jim Meyering [Thu, 23 Nov 2006 08:09:53 +0000 (09:09 +0100)]
* tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
rather than a pipeline that would sometimes evoke a diagnostic
like "seq: write error: Broken pipe".
Paul Eggert [Thu, 23 Nov 2006 00:06:42 +0000 (01:06 +0100)]
* randread.c (__attribute__): Don't define if __attribute__ is already defined.
Otherwise, the code won't conform to C99, since
the macro arg is spelled differently by some include file, and the
compilation fails with pedantic GCC.
Jim Meyering [Wed, 22 Nov 2006 11:35:02 +0000 (12:35 +0100)]
* announce-gen: Remove unused --release-archive-directory option.
(print_news_deltas): Accept new adjective, "Noteworthy", in addition
to the old "Major".
Match version numbers in NEWS using tighter regular expressions.
(main): Require the --gpg-key-id=ID option.
Jim Meyering [Mon, 20 Nov 2006 10:31:05 +0000 (11:31 +0100)]
Add a root-only test for today's lib/idcache.c fix.
* tests/ls/nameless-uid: New file.
* tests/ls/Makefile.am (TESTS): Add nameless-uid.
(TESTS_ENVIRONMENT): Add PERL to the list.
Jim Meyering [Sun, 19 Nov 2006 22:19:06 +0000 (23:19 +0100)]
* tests/tail-2/assert-2: Mark as a very-expensive test, because I
find the 7-second sleep annoyingly long. Besides, this test is
probably far too specific and timing sensitive ever to trigger again.
* tests/tail-2/assert: Likewise.
Jim Meyering [Sat, 18 Nov 2006 19:00:39 +0000 (20:00 +0100)]
"ln --backup f f" produces a misleading diagnostic:
ln: creating hard link `f' => `f': No such file or directory
* src/ln.c (do_link): Give a better diagnostic in this unusual case.
(do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
* tests/ln/Makefile.am (TESTS): Add hard-backup.
* tests/ln/hard-backup: New test for the above.
Jim Meyering [Thu, 16 Nov 2006 09:05:36 +0000 (10:05 +0100)]
* tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
automake we're skipping this test), and give a diagnostic to tell
the user the same thing. Reported by Mike Grayson.
Ralf Wildenhues [Thu, 16 Nov 2006 08:57:34 +0000 (09:57 +0100)]
Arrange to install manpages only for tools that are installed.
* man/Makefile.am (dist_man_MANS): Replace all optional manpages
with `$(MAN)', computed at configure time; also, list them ...
(optional_mans): ... in this new variable.
(max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
Jim Meyering [Thu, 16 Nov 2006 08:15:47 +0000 (09:15 +0100)]
Help valgrind see that there is no leak in dd.c.
* src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
so we need not free them at all. This is easier than freeing
both buffers at each of the early "return"s.
Jim Meyering [Tue, 14 Nov 2006 13:02:18 +0000 (14:02 +0100)]
Adapt to new version of gnulib-tool.
* gl/modules/root-dev-ino: New file.
* lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
* gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
* m4/root-dev-ino.m4: Move this file ...
* gl/m4/root-dev-ino.m4: ... to here.
* bootstrap.conf (gnulib_modules): Add root-dev-ino.
Jim Meyering [Mon, 13 Nov 2006 14:19:22 +0000 (15:19 +0100)]
Plug another technically-unimportant leak in sort.
* src/sort.c (main): Don't allocate memory for each new key here.
(insertkey): Allocate memory for each key here, instead.
(key_init): Rename from new_key. Don't allocate.
Jim Meyering [Sun, 12 Nov 2006 17:42:24 +0000 (18:42 +0100)]
du would exit early, when encountering an inaccessible directory
Reported by Mike Frysinger, in
http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
* tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
* tests/chgrp/no-x: Remove the "fts_read failed: ..."
diagnostic from the expected output when using native fdopendir.
* tests/chmod/no-x: Likewise.
* tests/du/no-x: Likewise.
Jim Meyering [Sun, 12 Nov 2006 07:22:46 +0000 (08:22 +0100)]
Avoid false-positive when testing via valgrind.
* tests/mv/atomic: Grep strace output for a more specific pattern
than just "unlink", since that got a false positive when testing
under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
* tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
Jim Meyering [Sat, 28 Oct 2006 16:23:30 +0000 (18:23 +0200)]
* Makefile.maint (patch-check): Make it easier to regenerate
the src/c99-to-c89.diff file. E.g., I do this:
make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
Jim Meyering [Sat, 28 Oct 2006 16:19:05 +0000 (18:19 +0200)]
* coreutils.texi (wc invocation): When giving the order in which
the various "counts" are listed, also mention "maximum line length".
Prompted by a report from Vincent LeFevre.
Jim Meyering [Thu, 26 Oct 2006 13:16:41 +0000 (15:16 +0200)]
* src/system.h (ftello): Add a compile-time check for the highly
unlikely condition of off_t narrower than long int, rather than
handling it at run time. Based on a patch from Paul Eggert.
Jim Meyering [Thu, 26 Oct 2006 09:03:30 +0000 (11:03 +0200)]
Avoid a shell bug in Tru64 4.0 sh's handling of double-quoted strings.
[patch by Paul Eggert]
* tests/chmod/c-option: When double-quoting part of a word, prefer
to double-quote the whole word. This is a bit easier to read (at
least for me), and in some cases it avoids a shell bug with Tru64
4.0 sh reported by Nelson H. F. Beebe. For example, instead of
"$abs_srcdir"/../setgid-check we now write
"$abs_srcdir/../setgid-check".
Jim Meyering [Wed, 25 Oct 2006 09:47:06 +0000 (11:47 +0200)]
Portability to Tru64 V4.0.
* src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
Define inline replacement function.
This (along with a yesterday's fix for autoconf's
_AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
Jim Meyering [Tue, 24 Oct 2006 22:01:33 +0000 (00:01 +0200)]
new feature: rm accepts new option: --one-file-system
Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
* src/remove.h (struct rm_options) [one_file_system]: New member.
* src/rm.c (rm_option_init): Initialize it.
(usage): Document the option.
* src/mv.c (rm_option_init): Likewise.
* src/remove.c (remove_dir): With --one-file-system and --recursive,
for each directory command line argument, do not affect a file system
different from that of the starting directory. And give a diagnostic.
* src/rm.c (ONE_FILE_SYSTEM): New enum.
(main): Handle new option.
* tests/rm/one-file-system: Test the above.
* tests/rm/Makefile.am (TESTS): Add one-file-system.
* tests/Makefile.am (check-root): Add the rm/one-file-system
test to the list.
(EXTRA_DIST): Add other-fs-tmpdir.
Jim Meyering [Tue, 24 Oct 2006 06:43:58 +0000 (08:43 +0200)]
Don't let a failure in one test stop "make -k".
* tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
(check-root): Depend on them, rather than executing the five
commands in a single rule. Reported by Greg Schafer.
Jim Meyering [Mon, 23 Oct 2006 09:52:48 +0000 (11:52 +0200)]
* tests/misc/pwd-long: Undo last change, since it made Perl invoke
pwd via a shell. Instead, ensure that the absolute name of the
pwd binary consists solely of reasonable characters.