1 2006-12-30 Jim Meyering <jim@meyering.net>
3 * bootstrap (gnulib_extra_files): Remove announce-gen.
4 * bootstrap.conf (gnulib_modules): Add it here instead, now that
7 * tests/misc/base64: Factor a long, repetitive string.
9 * src/c99-to-c89.diff: Adjust remove.c offsets.
11 Clean up after the change of 2006-12-28.
12 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
13 now that this function never modifies the pointer. Adjust comments
15 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
16 now that AD_pop_and_chdir no longer does that.
18 * tests/rm/fail-eperm: Avoid spurious differences (the error function
19 from latest glibc no longer prints the full program_name): so don't
20 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
22 * tests/mv/acl (skip): Skip this test also if the destination
23 directory, which is on a different file system, lacks ACL support.
25 * src/copy.c (copy_reg): Rewrite a comment that was rendered
26 inaccurate by the 2006-10-18 change.
28 2006-12-28 Jim Meyering <jim@meyering.net>
30 When moving "up" the hierarchy, be careful to remove a just-emptied
31 directory before opening ".", to avoid trouble with file system
32 implementations that cache readdir results at opendir-time.
33 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
34 Don't update **DIRP. Don't call fdopendir here.
35 (remove_dir): Call fdopendir here instead.
36 Report and patch from Mikulas Patocka:
37 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
39 2006-12-27 Jim Meyering <jim@meyering.net>
41 * src/tail.c (usage): Mention +N for --bytes and --lines.
42 Suggestion from Evan Hunt.
44 2006-12-26 Jim Meyering <jim@meyering.net>
46 * configure.ac: Require autoconf-2.61 and automake-1.10.
47 Without the former (even with autoconf-2.60), "make distcheck"
48 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
49 due to an inttypes.h generated with CFLAGS including -pedantic.
50 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
52 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
53 tag, using the release version number as the message.
54 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
56 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
58 * NEWS: dd bs= operands now silently override later ibs= and obs=,
60 * src/dd.c (scanargs): Implement it.
61 * tests/dd/misc (outbytes): Test it.
62 * doc/coreutils.texi (dd invocation): Specify that bs=N
63 overrides later ibs and obs, undoing part of the
64 previous change. (The behavior was wrong.)
66 2006-12-20 Jim Meyering <jim@meyering.net>
68 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
69 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
70 Don't let a non-directory get by with errno == EPERM, either.
71 Check the file type directly (using cached stat value), rather
72 than trying to guess it from errno values.
73 Karl Berry reported that a cross-partition "mv /etc/issue ~"
74 failed with the um,... suboptimal diagnostic,
75 "mv: cannot remove `/etc/issue': Not a directory".
76 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
77 * tests/rm/fail-eacces: New file.
78 * NEWS: Mention that both mv and rm are affected.
80 "cut -f 2- A B" no longer triggers a double-free bug
81 * src/cut.c (cut_fields): Set file-scoped global to NULL after
82 freeing it. This avoids a double-free (and core dump on some systems)
83 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
84 James Hunt in <http://bugzilla.redhat.com/220312>.
85 * NEWS: List this bug fix.
86 * THANKS: Mention him.
87 * tests/misc/cut: New file.
88 * tests/misc/Makefile.am (TESTS): Add cut.
90 2006-12-15 Jim Meyering <jim@meyering.net>
92 * tests/cp/open-perm-race: Correct the gdb-existence check.
93 Don't run either subsequent gdb command in a sub-shell.
94 Reported by Thomas Schwinge.
95 * THANKS: bring up to date.
97 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
99 Make sure cp -p isn't too generous with file permissions.
100 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
101 * tests/cp/file-perm-race: New file.
103 Ensure cp -pR --parents isn't too generous with parent permissions.
104 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
105 * tests/cp/parent-perm-race: New file.
107 2006-12-14 Jim Meyering <jim@meyering.net>
109 * tests/chgrp/default-no-deref: Don't assume that files are created
110 with the primary group by default. That's not true in a directory
111 with the set-GID bit set.
113 Don't hang when there's no input tty.
114 * tests/cp/open-perm-race: Skip this test if there is no
115 controlling input `terminal'.
117 Test for a hard-to-detect race fix, using gdb.
118 * tests/cp/open-perm-race: New file, to test for the
119 cp --preserve=ownership fix of 2006-12-06.
121 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
122 (TESTS): Add open-perm-race.
124 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
125 * src/chown.c (main): Likewise.
126 * src/chown-core.c (change_file_owner): Add to a comment.
127 * tests/chown/preserve-root: Add tests.
129 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
130 * src/chmod.c (process_file): Do honor the --preserve-root option.
131 * src/chown-core.c (change_file_owner): Likewise, but here, also
132 handle the case in which a traversal would go "through" a symlink
133 to root. Reported by Matthew M. Boedicker
134 * tests/chown/preserve-root: Test for the above.
135 * tests/chown/Makefile.am (TESTS): Add preserve-root.
137 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
138 to gnulib's m4/openat.m4.
140 2006-12-13 Andreas Schwab <schwab@suse.de>
142 Don't fail if mv/acl test succeeds.
143 * tests/mv/acl (skip): Check for acl support in the file system.
144 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
145 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
147 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
149 Remove some arbitrary restrictions on size fields, so that
150 commands like "sort -k 18446744073709551616" no longer fail merely
151 because 18446744073709551616 doesn't fit in uintmax_t. The trick
152 is that these fields can all be treated as effectively infinity;
153 their exact values don't matter, since no internal buffer can be
155 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
156 ULONG_MAX if the code assumes this. Silently truncate too-large
157 values to SIZE_MAX, as the remaining code will do the right thing
159 * src/sort.c (parse_field_count): Likewise.
160 * src/uniq.c (size_opt, main): Likewise.
161 * tests/join/Test.pm (bigfield): New test.
162 * tests/sort/Test.pm (bigfield): New test.
163 * tests/uniq/Test.pm (121): New test.
165 2006-12-13 Jim Meyering <jim@meyering.net>
167 * tests/chgrp/default-no-deref: New test.
168 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
170 2006-12-12 Jim Meyering <jim@meyering.net>
172 * src/system.h (SETVBUF): Remove definition, now that the
173 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
174 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
175 * src/od.c (open_next_file): Likewise.
177 2006-12-09 Jim Meyering <jim@meyering.net>
179 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
180 "source". I.e. "GNU coreutils 6.7".
182 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
183 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
184 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
186 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
187 whenever uniq is expected to fail. This should catch the other case
188 [test #112] in which uniq emits "cat: write error: Broken pipe" on
191 2006-12-08 Jim Meyering <jim@meyering.net>
193 Include bootstrap tool version info in the announcement form.
194 * Makefile.maint (gnulib_snapshot_date): Define.
195 (announcement): Use two new announce-gen options,
196 --bootstrap-tools and --gnulib-snapshot-date.
197 * Makefile.cfg (gnulib_dir): Set.
199 Post-release version change.
200 * NEWS: Add a line for 6.8-dirty.
201 * configure.ac (AC_INIT): Set new version string.
203 2006-12-07 Jim Meyering jim@meyering.net
206 * NEWS: Record release date. Remove '-pre' suffix.
207 * configure.ac (AC_INIT): Remove version string suffix.
209 2006-12-07 Jim Meyering <jim@meyering.net>
211 Make the output of "make check" more reproducible.
212 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
213 evoke diagnostics like this when COLUMNS=0 in the environment:
214 ls: ignoring invalid width in environment variable COLUMNS: 0
215 * tests/touch/no-rights: Likewise.
216 * tests/help-version: Likewise.
217 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
218 118, since it emits "cat: write error: Broken pipe" on some systems.
220 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
222 * NEWS: Document the cp -p fix for special bits.
223 * src/copy.c (set_owner): Now returns a three-way result, so
224 that the caller can clear the special bits. All callers changed.
225 (copy_reg): Don't set the special bits if chown failed.
226 (copy_internal): Likewise.
227 * tests/cp/special-bits: Test this fix.
229 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
231 * NEWS: Document the cp --preserve=ownership fix.
232 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
233 * src/copy.c (fchmod_or_lchmod): New function.
234 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
235 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
236 When creating a file, use O_EXCL, so we're more likely to detect
237 funny business by other processes. At the end, if permissions
238 were omitted, chmod them back in.
239 (copy_internal): If the ownership might change, omit some permissions
240 at first, then restore them after chowning the file.
241 * src/cp.c (make_dir_parents_private): Likewise.
242 * src/copy.c (cached_umask): New function.
243 * src/copy.h (cached_umask): New decl.
245 2006-12-06 Jim Meyering <jim@meyering.net>
247 Make the output of "make check" more reproducible.
248 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
250 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
252 * src/install.c (install_file_in_file): Preserve time stamps
253 before changing owner or file mode bits, for consistency with
254 other coreutils programs.
256 2006-12-03 Jim Meyering <jim@meyering.net>
258 * tests/misc/date-sec: Output a fixed string.
260 * NEWS: du --one-file-system (-x) would skip subdirectories of any
261 directory listed as second or subsequent command line argument.
262 * tests/du/one-file-system: New file. Test for today's fts.c fix.
263 * tests/du/Makefile.am (TESTS): Add one-file-system.
264 Reported by Mike Frysinger.
266 2006-12-02 Jim Meyering <jim@meyering.net>
268 * tests/du/basic: Generate 4KB file simply using printf, rather than
269 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
271 2006-11-28 Jim Meyering <jim@meyering.net>
273 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
274 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
275 Reported by Matthew Woehlke.
277 * tests/mv/dir2dir: Also accept EBUSY.
278 Reported by Matthew Woehlke.
280 2006-11-27 Jim Meyering <jim@meyering.net>
282 * Makefile.maint (patch-check): Rewrite to diagnose failure.
283 * src/c99-to-c89.diff: Adjust shred.c offsets.
285 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
287 Improve the check for departures from C89, and fix the departures
289 * Makefile.maint (my-distcheck): Also check for C89 compatibility
290 as best we can with GCC.
291 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
292 declaration; C89 doesn't allow this.
293 * src/dcgen: Don't generate string literals longer than
294 what C89 requires support for.
295 * src/cut.c (usage): Don't use string literals longer than
296 what C89 requires support for.
297 * src/date.c (usage): Likewise.
298 * src/dd.c (usage): Likewise.
299 * src/du.c (usage): Likewise.
300 * src/ls.c (usage): Likewise.
301 * src/od.c (usage): Likewise.
302 * src/readlink.c (usage): Likewise.
303 * src/seq.c (usage): Likewise.
304 * src/shred.c (usage): Likewise.
306 2006-11-26 Mike Frysinger <vapier@gentoo.org>
308 Recognize new archive, audio and image formats.
309 Give audio files a separate color.
310 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
311 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
312 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
313 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
314 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
315 audio color to 00;36 to differentiate from image/video color.
317 2006-11-26 Jim Meyering <jim@meyering.net>
319 * Makefile.maint (patch-check): Compile patched sources with
320 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
321 no violations remain.
323 * src/c99-to-c89.diff: Remove 3 bogus hunks.
325 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
328 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
330 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
332 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
334 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
335 while trying to retain the readability of C99 as much as possible.
336 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
337 Replace each of two uses with literal AT_FDCWD.
338 (cache_stat_init): Return its argument, for convenience.
339 Update the caller in remove_dir.
340 (AD_pop_and_chdir): Return prev_dir rather than storing through
341 a pointer argument. All uses changed.
342 (AD_ensure_initialized): New function.
343 (AD_mark_helper): Use it, to avoid the need for declaration
345 (rm): Move cycle_check_init call into callee...
347 Use an else clause in place of a "continue" statement.
348 (close_preserve_errno): Remove.
349 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
351 2006-11-25 Jim Meyering <jim@meyering.net>
353 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
355 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
357 * tests/du/inacc-dest: Skip this test when running as root.
359 2006-11-23 Jim Meyering <jim@meyering.net>
361 * announce-gen: Remove file. It's moving to gnulib.
362 * bootstrap: Pull it from gnulib/build-aux instead.
363 * Makefile.maint (announcement): Reflect move to ./build-aux.
365 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
366 rather than a pipeline that would sometimes evoke a diagnostic
367 like "seq: write error: Broken pipe".
369 * tests/help-version: Suppress dd transfer rate output.
371 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
373 2006-11-22 Jim Meyering <jim@meyering.net>
375 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
376 change "(:?..." to "(?:..." in regexps.
378 Post-release version change.
379 * NEWS: Add a line for 6.7-pre.
380 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
383 * NEWS: Record release date. Remove "-pre" suffix.
384 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
386 * announce-gen: Remove unused --release-archive-directory option.
387 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
389 Match version numbers in NEWS using tighter regular expressions.
390 (main): Require the --gpg-key-id=ID option.
391 * Makefile.maint (announcement): Don't use now-removed
392 --release-archive-directory=... option.
394 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
396 2006-11-21 Jim Meyering <jim@meyering.net>
398 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
399 skip the test rather than failing. Reported by Michael Deutschmann.
401 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
402 rather than just "exit N".
404 Arrange for "make check-root" to run the new root-only test.
405 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
408 2006-11-20 Jim Meyering <jim@meyering.net>
410 Add a root-only test for today's lib/idcache.c fix.
411 * tests/ls/nameless-uid: New file.
412 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
413 (TESTS_ENVIRONMENT): Add PERL to the list.
415 2006-11-19 Jim Meyering <jim@meyering.net>
417 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
418 find the 7-second sleep annoyingly long. Besides, this test is
419 probably far too specific and timing sensitive ever to trigger again.
420 * tests/tail-2/assert: Likewise.
422 Post-release version change.
423 * NEWS: Add a line for 6.6-pre.
424 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
427 * NEWS: Record release date. Remove "-cvs" suffix.
428 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
430 2006-11-18 Jim Meyering <jim@meyering.net>
432 "ln --backup f f" produces a misleading diagnostic:
433 ln: creating hard link `f' => `f': No such file or directory
434 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
435 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
436 * tests/ln/Makefile.am (TESTS): Add hard-backup.
437 * tests/ln/hard-backup: New test for the above.
438 * NEWS: Mention this fix.
440 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
442 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
444 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
445 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
446 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
447 Omit unnecessary parenthesization of args.
448 * src/od.c (EQUAL_BLOCKS): Likewise.
449 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
451 2006-11-16 Jim Meyering <jim@meyering.net>
453 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
454 automake we're skipping this test), and give a diagnostic to tell
455 the user the same thing. Reported by Mike Grayson.
457 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
459 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
460 with `$(MAN)', computed at configure time; also, list them ...
461 (optional_mans): ... in this new variable.
462 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
464 2006-11-16 Jim Meyering <jim@meyering.net>
466 Help valgrind see that there is no leak in dd.c.
467 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
468 so we need not free them at all. This is easier than freeing
469 both buffers at each of the early "return"s.
471 * src/csplit.c (load_buffer): Plug an inconsequential leak.
473 2006-11-15 Jim Meyering <jim@meyering.net>
475 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
476 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
478 2006-11-14 Jim Meyering <jim@meyering.net>
480 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
481 remove the now-unnecessary use of AC_LIBSOURCES.
483 Adapt to new version of gnulib-tool.
484 * gl/modules/root-dev-ino: New file.
485 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
486 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
487 * m4/root-dev-ino.m4: Move this file ...
488 * gl/m4/root-dev-ino.m4: ... to here.
490 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
492 2006-11-13 Jim Meyering <jim@meyering.net>
494 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
497 Plug another technically-unimportant leak in sort.
498 * src/sort.c (main): Don't allocate memory for each new key here.
499 (insertkey): Allocate memory for each key here, instead.
500 (key_init): Rename from new_key. Don't allocate.
502 * src/sort.c (main): Plug a tiny memory leak.
503 Move declaration of local "minus" down to be nearer point of use.
505 2006-11-12 Jim Meyering <jim@meyering.net>
507 du would exit early, when encountering an inaccessible directory
508 Reported by Mike Frysinger, in
509 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
510 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
511 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
512 diagnostic from the expected output when using native fdopendir.
513 * tests/chmod/no-x: Likewise.
514 * tests/du/no-x: Likewise.
515 * NEWS: Mention this bug fix.
516 * tests/du/Makefile.am (TESTS): Add inacc-dest.
518 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
521 Avoid false-positive when testing via valgrind.
522 * tests/mv/atomic: Grep strace output for a more specific pattern
523 than just "unlink", since that got a false positive when testing
524 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
525 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
527 2006-10-28 Jim Meyering <jim@meyering.net>
529 * Makefile.maint (patch-check): Make it easier to regenerate
530 the src/c99-to-c89.diff file. E.g., I do this:
531 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
533 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
535 2006-10-26 Jim Meyering <jim@meyering.net>
537 * src/system.h (ftello): Add a compile-time check for the highly
538 unlikely condition of off_t narrower than long int, rather than
539 handling it at run time. Based on a patch from Paul Eggert.
541 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
543 * tests/chmod/c-option: When double-quoting part of a word, prefer
544 to double-quote the whole word. This is a bit easier to read (at
545 least for me), and in some cases it avoids a shell bug with Tru64
546 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
547 "$abs_srcdir"/../setgid-check we now write
548 "$abs_srcdir/../setgid-check".
549 * tests/cp/cp-parents: Likewise.
550 * tests/du/inaccessible-cwd: Likewise.
551 * tests/du/long-from-unreadable: Likewise.
552 * tests/install/basic-1: Likewise.
553 * tests/install/trap: Likewise.
554 * tests/misc/close-stdout: Likewise.
555 * tests/mkdir/concurrent-1: Likewise.
556 * tests/mkdir/p-1: Likewise.
557 * tests/mkdir/p-3: Likewise.
558 * tests/mkdir/parents: Likewise.
559 * tests/mkdir/perm: Likewise.
560 * tests/readlink/can-e: Likewise.
561 * tests/readlink/can-f: Likewise.
562 * tests/readlink/can-m: Likewise.
563 * tests/rm/inaccessible: Likewise.
564 * tests/rm/unread3: Likewise.
565 * tests/touch/no-create-missing: Likewise.
567 * lib/.cvsignore: Add uinttostr.c.
569 2006-10-25 Jim Meyering <jim@meyering.net>
571 Portability to Tru64 V4.0.
572 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
573 Define inline replacement function.
574 This (along with a yesterday's fix for autoconf's
575 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
576 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
578 2006-10-25 Bruno Haible <bruno@clisp.org>
580 * src/cat.c (infile): Add "const" to declaration.
581 * src/csplit.c (prefix): Likewise.
582 * src/printf.c (cfcc_msg): Likewise.
583 * src/tail.c (valid_file_spec): Likewise.
584 * src/cut.c (cut_file): Likewise, for a parameter.
585 * src/expr.c (str_value): Likewise.
586 * src/fold.c (fold_file): Likewise.
587 * src/pr.c (init_header): Likewise.
588 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
589 * src/tr.c (make_printable_str): Likewise.
590 * src/nl.c (body_type, header_type, footer_type, current_type):
591 (separator_str, build_type_arg, nl_file): Likewise, for many.
592 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
593 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
595 2006-10-25 Jim Meyering <jim@meyering.net>
597 * tests/sample-test: Update copyright year list to include only
598 the current year, since this is what I'll want in any new test.
600 2006-10-24 Jim Meyering <jim@meyering.net>
602 * src/c99-to-c89.diff: Update to reflect new offsets.
604 * NEWS: new feature: rm accepts new option: --one-file-system
605 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
606 * src/remove.h (struct rm_options) [one_file_system]: New member.
607 * src/rm.c (rm_option_init): Initialize it.
608 (usage): Document the option.
609 * src/mv.c (rm_option_init): Likewise.
610 * src/remove.c (remove_dir): With --one-file-system and --recursive,
611 for each directory command line argument, do not affect a file system
612 different from that of the starting directory. And give a diagnostic.
613 * src/rm.c (ONE_FILE_SYSTEM): New enum.
614 (main): Handle new option.
615 * tests/rm/one-file-system: Test the above.
616 * tests/rm/Makefile.am (TESTS): Add one-file-system.
617 * tests/Makefile.am (check-root): Add the rm/one-file-system
619 (EXTRA_DIST): Add other-fs-tmpdir.
621 * tests/mv/setup: Removed. Renamed to...
622 * tests/other-fs-tmpdir: ...this new file.
623 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
624 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
625 * tests/mv/backup-is-src: Likewise.
626 * tests/mv/hard-link-1: Likewise.
627 * tests/mv/leak-fd: Likewise.
628 * tests/mv/mv-special-1: Likewise.
629 * tests/mv/part-fail: Likewise.
630 * tests/mv/part-hardlink: Likewise.
631 * tests/mv/part-rename: Likewise.
632 * tests/mv/part-symlink: Likewise.
633 * tests/mv/partition-perm: Likewise.
634 * tests/mv/to-symlink: Likewise.
635 * tests/mv/into-self-2: Likewise.
637 Don't let a failure in one test stop "make -k" from running the others.
638 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
639 (check-root): Depend on them, rather than executing the five
640 commands in a single rule. Reported by Greg Schafer.
642 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
644 * Makefile.maint (alpha beta major): Use a better log message for
645 the automatic commit of .prev-version.
647 2006-10-23 Jim Meyering <jim@meyering.net>
649 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
650 pwd via a shell. Instead, ensure that the absolute name of the
651 pwd binary consists solely of reasonable characters.
652 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
653 clean-up code isn't run.
655 * NEWS: Add a line for 6.5-cvs.
656 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
658 2006-10-22 Jim Meyering <jim@meyering.net>
662 * NEWS: Record the 6.4 release date.
663 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
665 * Makefile.maint: Complete the adaptation to function with a working
666 directory that is using git (rather than cvs) for version control.
668 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
670 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
671 * tests/cp/cp-parents: Likewise.
672 * tests/mkdir/parents: Likewise.
673 * tests/mkdir/perm: Likewise.
675 * tests/sample-test: Quote variables containing absolute build
676 tree paths. In the cleanup trap, make sure `cd' succeeds before
677 `chmod'ing and `rm'ing the temporary files.
678 * tests/chgrp/basic: Likewise.
679 * tests/chgrp/deref: Likewise.
680 * tests/chgrp/no-x: Likewise.
681 * tests/chgrp/posix-H: Likewise.
682 * tests/chgrp/recurse: Likewise.
683 * tests/chmod/c-option: Likewise.
684 * tests/chmod/equal-x: Likewise.
685 * tests/chmod/equals: Likewise.
686 * tests/chmod/inaccessible: Likewise.
687 * tests/chmod/no-x: Likewise.
688 * tests/chmod/octal: Likewise.
689 * tests/chmod/setgid: Likewise.
690 * tests/chmod/umask-x: Likewise.
691 * tests/chmod/usage: Likewise.
692 * tests/chown/basic: Likewise.
693 * tests/chown/deref: Likewise.
694 * tests/chown/separator: Likewise.
695 * tests/cp/acl: Likewise.
696 * tests/cp/backup-1: Likewise.
697 * tests/cp/backup-dir: Likewise.
698 * tests/cp/backup-is-src: Likewise.
699 * tests/cp/cp-HL: Likewise.
700 * tests/cp/cp-deref: Likewise.
701 * tests/cp/cp-i: Likewise.
702 * tests/cp/cp-mv-backup: Likewise.
703 * tests/cp/cp-parents: Likewise.
704 * tests/cp/deref-slink: Likewise.
705 * tests/cp/dir-rm-dest: Likewise.
706 * tests/cp/dir-slash: Likewise.
707 * tests/cp/dir-vs-file: Likewise.
708 * tests/cp/fail-perm: Likewise.
709 * tests/cp/into-self: Likewise.
710 * tests/cp/link: Likewise.
711 * tests/cp/link-no-deref: Likewise.
712 * tests/cp/link-preserve: Likewise.
713 * tests/cp/no-deref-link1: Likewise.
714 * tests/cp/no-deref-link2: Likewise.
715 * tests/cp/no-deref-link3: Likewise.
716 * tests/cp/perm: Likewise.
717 * tests/cp/preserve-2: Likewise.
718 * tests/cp/r-vs-symlink: Likewise.
719 * tests/cp/same-file: Likewise.
720 * tests/cp/slink-2-slink: Likewise.
721 * tests/cp/sparse: Likewise.
722 * tests/cp/special-bits: Likewise.
723 * tests/cp/src-base-dot: Likewise.
724 * tests/cp/symlink-slash: Likewise.
725 * tests/dd/not-rewound: Likewise.
726 * tests/dd/skip-seek2: Likewise.
727 * tests/dd/unblock-sync: Likewise.
728 * tests/du/2g: Likewise.
729 * tests/du/8gb: Likewise.
730 * tests/du/basic: Likewise.
731 * tests/du/deref: Likewise.
732 * tests/du/deref-args: Likewise.
733 * tests/du/exclude: Likewise.
734 * tests/du/fd-leak: Likewise.
735 * tests/du/hard-link: Likewise.
736 * tests/du/inaccessible-cwd: Likewise.
737 * tests/du/long-from-unreadable: Likewise.
738 * tests/du/long-sloop: Likewise.
739 * tests/du/no-deref: Likewise.
740 * tests/du/no-x: Likewise.
741 * tests/du/restore-wd: Likewise.
742 * tests/du/slash: Likewise.
743 * tests/du/slink: Likewise.
744 * tests/du/trailing-slash: Likewise.
745 * tests/du/two-args: Likewise.
746 * tests/fmt/long-line: Likewise.
747 * tests/install/basic-1: Likewise.
748 * tests/install/create-leading: Likewise.
749 * tests/install/d-slashdot: Likewise.
750 * tests/install/trap: Likewise.
751 * tests/ln/misc: Likewise.
752 * tests/ln/target-1: Likewise.
753 * tests/ls/color-dtype-dir: Likewise.
754 * tests/ls/dangle: Likewise.
755 * tests/ls/dired: Likewise.
756 * tests/ls/file-type: Likewise.
757 * tests/ls/follow-slink: Likewise.
758 * tests/ls/infloop: Likewise.
759 * tests/ls/inode: Likewise.
760 * tests/ls/m-option: Likewise.
761 * tests/ls/no-arg: Likewise.
762 * tests/ls/recursive: Likewise.
763 * tests/ls/rt-1: Likewise.
764 * tests/ls/stat-dtype: Likewise.
765 * tests/ls/stat-failed: Likewise.
766 * tests/ls/stat-vs-dirent: Likewise.
767 * tests/misc/cat-proc: Likewise.
768 * tests/misc/close-stdout: Likewise.
769 * tests/misc/csplit: Likewise.
770 * tests/misc/date-sec: Likewise.
771 * tests/misc/false-status: Likewise.
772 * tests/misc/head-c: Likewise.
773 * tests/misc/head-pos: Likewise.
774 * tests/misc/mknod: Likewise.
775 * tests/misc/nl: Likewise.
776 * tests/misc/nohup: Likewise.
777 * tests/misc/pathchk1: Likewise.
778 * tests/misc/printf: Likewise.
779 * tests/misc/printf-hex: Likewise.
780 * tests/misc/pwd-long: Likewise.
781 * tests/misc/shuf: Likewise.
782 * tests/misc/sort-rand: Likewise.
783 * tests/misc/split-a: Likewise.
784 * tests/misc/split-fail: Likewise.
785 * tests/misc/split-l: Likewise.
786 * tests/misc/stat-fmt: Likewise.
787 * tests/misc/tac-continue: Likewise.
788 * tests/misc/wc-files0: Likewise.
789 * tests/mkdir/concurrent-1: Likewise.
790 * tests/mkdir/p-1: Likewise.
791 * tests/mkdir/p-2: Likewise.
792 * tests/mkdir/p-3: Likewise.
793 * tests/mkdir/p-slashdot: Likewise.
794 * tests/mkdir/p-thru-slink: Likewise.
795 * tests/mkdir/p-v: Likewise.
796 * tests/mkdir/parents: Likewise.
797 * tests/mkdir/perm: Likewise.
798 * tests/mkdir/t-slash: Likewise.
799 * tests/mv/acl: Likewise.
800 * tests/mv/atomic: Likewise.
801 * tests/mv/backup-dir: Likewise.
802 * tests/mv/childproof: Likewise.
803 * tests/mv/diag: Likewise.
804 * tests/mv/dir-file: Likewise.
805 * tests/mv/dir2dir: Likewise.
806 * tests/mv/dup-source: Likewise.
807 * tests/mv/hard-2: Likewise.
808 * tests/mv/hard-3: Likewise.
809 * tests/mv/hard-4: Likewise.
810 * tests/mv/hard-link-1: Likewise.
811 * tests/mv/hard-verbose: Likewise.
812 * tests/mv/i-2: Likewise.
813 * tests/mv/i-3: Likewise.
814 * tests/mv/i-4: Likewise.
815 * tests/mv/i-5: Likewise.
816 * tests/mv/i-link-no: Likewise.
817 * tests/mv/into-self-4: Likewise.
818 * tests/mv/leak-fd: Likewise.
819 * tests/mv/mv-special-1: Likewise.
820 * tests/mv/no-target-dir: Likewise.
821 * tests/mv/part-fail: Likewise.
822 * tests/mv/part-hardlink: Likewise.
823 * tests/mv/part-rename: Likewise.
824 * tests/mv/part-symlink: Likewise.
825 * tests/mv/partition-perm: Likewise.
826 * tests/mv/perm-1: Likewise.
827 * tests/mv/reply-no: Likewise.
828 * tests/mv/trailing-slash: Likewise.
829 * tests/mv/update: Likewise.
830 * tests/od/od-N: Likewise.
831 * tests/od/x8: Likewise.
832 * tests/readlink/can-e: Likewise.
833 * tests/readlink/can-f: Likewise.
834 * tests/readlink/can-m: Likewise.
835 * tests/readlink/rl-1: Likewise.
836 * tests/rm/cycle: Likewise.
837 * tests/rm/dangling-symlink: Likewise.
838 * tests/rm/deep-1: Likewise.
839 * tests/rm/dir-no-w: Likewise.
840 * tests/rm/dir-nonrecur: Likewise.
841 * tests/rm/dot-rel: Likewise.
842 * tests/rm/empty-inacc: Likewise.
843 * tests/rm/f-1: Likewise.
844 * tests/rm/fail-2eperm: Likewise.
845 * tests/rm/hash: Likewise.
846 * tests/rm/i-1: Likewise.
847 * tests/rm/i-no-r: Likewise.
848 * tests/rm/ignorable: Likewise.
849 * tests/rm/inaccessible: Likewise.
850 * tests/rm/interactive-always: Likewise.
851 * tests/rm/interactive-once: Likewise.
852 * tests/rm/ir-1: Likewise.
853 * tests/rm/isatty: Likewise.
854 * tests/rm/no-give-up: Likewise.
855 * tests/rm/r-1: Likewise.
856 * tests/rm/r-2: Likewise.
857 * tests/rm/r-3: Likewise.
858 * tests/rm/r-4: Likewise.
859 * tests/rm/readdir-bug: Likewise.
860 * tests/rm/rm1: Likewise.
861 * tests/rm/rm2: Likewise.
862 * tests/rm/rm3: Likewise.
863 * tests/rm/rm4: Likewise.
864 * tests/rm/rm5: Likewise.
865 * tests/rm/sunos-1: Likewise.
866 * tests/rm/unread2: Likewise.
867 * tests/rm/unread3: Likewise.
868 * tests/rmdir/fail-perm: Likewise.
869 * tests/rmdir/t-slash: Likewise.
870 * tests/shred/exact: Likewise.
871 * tests/shred/remove: Likewise.
872 * tests/sum/sysv: Likewise.
873 * tests/tail-2/append-only: Likewise.
874 * tests/tail-2/assert: Likewise.
875 * tests/tail-2/assert-2: Likewise.
876 * tests/tail-2/big-4gb: Likewise.
877 * tests/tail-2/fflush: Likewise.
878 * tests/tail-2/infloop-1: Likewise.
879 * tests/tail-2/proc-ksyms: Likewise.
880 * tests/tail-2/start-middle: Likewise.
881 * tests/tail-2/tail-n0f: Likewise.
882 * tests/tee/basic: Likewise.
883 * tests/tee/dash: Likewise.
884 * tests/touch/fail-diag: Likewise.
885 * tests/touch/no-create-missing: Likewise.
886 * tests/touch/not-owner: Likewise.
887 * tests/touch/obsolescent: Likewise.
888 * tests/touch/read-only: Likewise.
889 * tests/touch/relative: Likewise.
891 2006-10-21 Jim Meyering <jim@meyering.net>
893 * NEWS: (cp --backup fix): Fix a typo.
895 * .gitignore: Remove some references to files in subdirectories.
896 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
897 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
899 * src/copy.c (copy_internal): Add a comment saying why we prefer
902 Enable an fts optimization (call lstat only for directories,
903 on some file system types) also with the --preserve-root option
905 * src/chown-core.c (change_file_owner): Compare fts_statp-based
906 dev/ino against root dev/ino only for directories.
907 (chown_files): Don't let the root_dev_ino setting influence whether
908 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
910 2006-10-20 Jim Meyering <jim@meyering.net>
912 * src/od.c (usage): Change description of default to use "-w16",
913 not the now-invalid "-w 16" syntax. From Dan Jacobson.
915 2006-10-19 Jim Meyering <jim@meyering.net>
917 * bootstrap: Add names to each .gitignore file (if it exists)
918 as well as to .cvsignore.
920 * Makefile.maint (po-check): This rule didn't detect the new use
921 of "gettext" (as opposed to the use of "_" everywhere else) in
922 lib/xstrtol.h. Adjust the grep regexp so that now it does.
924 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
926 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
927 when opening dst_name.
928 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
929 (SYSCALL) to test for failure in a system call.
931 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
932 a fifo. This preserves the special mode bits on Solaris 10, which
933 is compatible with what Solaris 10 cp -R does.
935 * src/copy.c (copy_internal): Remove redundant and confusing local
938 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
939 7777. This matches historical 'cp' behavior and avoids some
940 (though not all) implementation-defined behavior of mkdir.
941 * src/cp.c (make_dir_parents_private): Likewise.
942 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
943 than 777. This is required by POSIX. It doesn't make any difference
944 in actual behavior on any host that I know of.
946 2006-10-17 Jim Meyering <jim@meyering.net>
948 * src/dd.c (usage): Use two spaces (not one) to separate the
949 "fdatasync" option string from its description, so help2man formats
950 the derived man page properly. Reported by Samuel Thibault
951 in <http://bugs.debian.org/393649>.
953 2006-10-16 Jim Meyering <jim@meyering.net>
955 * .x-sc_trailing_blank: Remove names of files that are no longer
958 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
960 * src/groups.sh (version): Reword message to match the other programs.
961 Problem reported by Eric Blake.
963 2006-10-14 Jim Meyering <jim@meyering.net>
965 * Makefile.maint (headers_with_interesting_macro_defs): Define.
966 (.re-defmac, sc_always_defined_macros): New rules.
968 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
969 Instead, include "exit.h". This hereby retires the work-around for
970 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
972 * src/cksum.c (uint_fast32_t): Don't define.
973 Instead, include <stdint.h>.
975 * src/pinky.c (S_IWGRP): Don't define.
976 It's already defined by "stat-macros.h" (included via system.h).
978 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
979 * Makefile.maint: Likewise, remove these targets/rules/variables:
980 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
981 (cvs_files, wget-update, automake_repo): Likewise.
982 Move the comment about cvsu to build-aux/vc-list-files,
983 where cvsu is actually used.
985 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
987 Work also when the working directory (with e.g. coreutils sources)
988 is version controlled with git, rather than CVS.
989 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
991 In messages and comments, say e.g., "checked-out sources",
992 rather than "CVS sources".
993 (version_controlled_file): New function. Work for git as well as
994 for CVS. Don't use grep's -q option.
995 (slurp): Call it here, in place of CVS-specific code.
997 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
999 * src/copy.c (copy_internal): Although we do create a backup of each
1000 destination directory when in move mode, don't do that when copying.
1001 Reported by Peter Breitenlohner, in
1002 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
1003 * tests/cp/backup-dir: New file. Test for the above.
1004 * tests/cp/Makefile.am (TESTS): Add backup-dir.
1006 2006-10-13 Jim Meyering <jim@meyering.net>
1008 More chown/chgrp dereferencing-related fixes.
1009 * src/chown-core.c (change_file_owner): Don't use fts_statp if
1010 we're dereferencing symlinks.
1011 Reverse conjuncts, so that we use dereference file_stats
1012 (aka ent->fts_statp) only *after* we've confirmed that
1013 chopt->affect_symlink_referent is true. Otherwise, we might
1014 use ent->fts_statp uninitialized.
1015 Don't turn on FTS_NOSTAT when dereferencing symlinks.
1016 * tests/chown/deref: Update the expected diagnostic, now that
1017 this test case (trying to use "chown --dereference ..." on a
1018 dangling symlink) takes a different code path.
1020 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
1022 Sync from Bison, as follows:
1024 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
1026 Fix problems with translating English-language diagnostics.
1027 * bootstrap: Fix bug introduced in recent bootstrap changes, with
1028 respect to bison-runtime pot generation. The YY_ stuff
1029 wasn't being captured.
1031 2006-10-13 Jim Meyering <jim@meyering.net>
1033 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
1034 now that we're using fts_open with FTS_CWDFD.
1035 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
1036 chgrp, to exercise the above fix.
1037 * NEWS: Mention the above.
1039 * src/du-tests: Clean up a little, though it's still not portable.
1041 * .vg-suppressions: Add 3 more for debian unstable.
1043 * tests/ls/Test.pm: Remove long-unused file.
1044 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
1045 Suggestions from Bruno Haible.
1047 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1049 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
1050 (MAINTAINERCLEANFILES): Add .kludge-stamp.
1051 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
1052 instead of $(man_MANS).
1054 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1056 * configure.ac: Avoid compiler warnings about default return
1057 type in function definitions and unused variables in tests.
1058 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
1059 if this is #defined.
1061 2006-10-12 Jim Meyering <jim@meyering.net>
1063 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
1064 Call gl_INIT directly, rather than through the above.
1066 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1068 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
1069 variable was sometimes used without being initialized. This
1070 messed up the installation of the INSTALL file in some cases.
1072 2006-10-11 Jim Meyering <jim@meyering.net>
1074 * src/ls.c (usage): Correct description of -s, --size.
1075 It works even without -l. Suggestion from Karl Berry.
1077 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
1079 * src/ls.c (quote_name): Use initializer rather than memset to
1080 initialize an object to zero. This is easier to read and is less
1081 likely to introduce a runtime error due to a mixup. It causes
1082 gcc -W to issue a warning, but you can work around this by
1083 appending -Wno-missing-field-initializers.
1084 * src/pathchk.c (portable_chars_only): Likewise.
1085 * src/shred.c (main): Likewise.
1086 * src/stty.c (main): Likewise.
1087 * src/tr.c (card_of_complement): Likewise.
1088 * src/wc.c (wc): Likewise.
1090 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1092 * src/sort.c (usage): Mention again that sort fields are origin 1.
1094 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
1097 * bootstrap (usage, main program, symlink_to_gnulib): Add option
1098 --copy. Inspired by a suggestion from Bruno Haible.
1100 2006-10-09 Jim Meyering <jim@meyering.net>
1102 Avoid a compiler warning.
1103 * src/pathchk.c (portable_chars_only): Initialize variable of type
1104 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
1106 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
1108 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
1109 wrong file name in some cases. Lars Wendler reported a bug in
1111 * src/install.c (make_ancestor): New arg COMPONENT.
1112 * src/mkdir.c (make_ancestor): Likewise.
1113 * tests/install/basic-1: Check for install -Dv bug.
1114 * tests/mkdir/Makefile.am (TESTS): Add p-v.
1115 * tests/mkdir/p-v: New file, to test this bug.
1117 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
1119 * src/chgrp.c: Don't include lchown.h; no longer needed.
1120 * src/chown.c: Likewise.
1122 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
1123 current file system has useful d_type info.
1125 * src/dd.c (flags): noatime and nofollow now depend on
1126 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
1127 (usage): Output info about noatime and nofollow only if
1128 they are known to work.
1129 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
1130 than O_NOFOLLOW, when testing whether it's possible to avoid a
1131 race condition reliably.
1133 2006-10-05 Jim Meyering <jim@meyering.net>
1135 * src/c99-to-c89.diff: Update to reflect new offsets.
1137 * tests/install/basic-1: Skip the latter part of this test if the
1138 just-built dd binary is not readable. Otherwise, this test would fail
1139 when binaries were created as root. Reported by Bauke Jan Douma in
1140 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
1142 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
1144 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
1145 MiB, since XFS hosts can legitimately have large values of
1146 st_blksize. Problem reported by Tony Ernst in
1147 <http://savannah.gnu.org/bugs/?17903>.
1149 2006-10-04 Jim Meyering <jim@meyering.net>
1151 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
1152 Paul Eggert pointed out that the specified file may exist,
1153 in spite of such an errno value.
1154 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
1155 * tests/rm/ignore-name-too-long: Remove file.
1156 * NEWS: Update here, too.
1158 2006-10-03 Jim Meyering <jim@meyering.net>
1160 * tests/rm/fail-eperm: Report failure also if rm is terminated by
1163 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
1164 and one in shred.c -- that were added before coreutils-6.3.
1165 Reported by Michael Deutschmann.
1167 * src/c99-to-c89.diff: Update to reflect new offsets.
1169 * src/remove.c (remove_entry): With -f, exit successfully in spite
1170 of a missing file under some very unusual conditions (with errno
1171 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
1173 With --force (-f), rm no longer fails for ENOTDIR.
1174 * src/remove.c (ignorable_missing): New function.
1175 Use it everywhere, rather than open-coding the test.
1176 Andreas Schwab reported the ENOTDIR problem.
1177 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
1179 * NEWS: Mention the bug fix.
1180 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
1181 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
1182 * tests/rm/Makefile.am (TESTS): Add the new file names.
1184 * bootstrap: Undo last change to this file, since now gnulib-tool
1185 sticks with the automake default in generating dependencies.
1187 * NEWS: Add a line for 6.4-cvs.
1188 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
1190 2006-09-30 Jim Meyering <jim@meyering.net>
1193 * NEWS: Record the 6.3 release date.
1194 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1196 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
1198 * src/c99-to-c89.diff: Update offsets.
1200 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
1202 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
1203 as it doesn't work with Solaris /bin/sh.
1205 2006-09-29 Jim Meyering <jim@meyering.net>
1207 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
1210 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
1211 use .1 as the increment. Actual output varies too much.
1212 [eq-wid-3]: New, commented out test.
1214 * src/shuf.c (read_input): Fix an off-by-one error that
1215 would cause an infloop for piped input of 8KB or more.
1216 * NEWS: Mention the fix.
1217 * tests/misc/shuf: Test for the above fix.
1219 Since any system may be affected by the Darwin readdir bug,
1220 perform the extra rewinddir unconditionally. The performance
1221 impact of rewinding a directory is negligible.
1222 * src/remove.c (NEED_REWIND): Define to use
1223 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
1225 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
1226 increment translates to a slightly larger value.
1227 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
1228 The final expected value wasn't being printed.
1230 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
1231 and NFS, whereby rm would not remove all files in a directory.
1232 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
1233 (NEED_REWIND): New macro, so that we incur the cost of the work-around
1234 rewinddir only on afflicted systems.
1235 * NEWS: Clarify and correct.
1236 * tests/rm/readdir-bug: New file. Test for the above fix.
1237 * tests/rm/Makefile.am (TESTS): Add it.
1238 Prompted by testing and analysis from Bruno Haible:
1239 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
1241 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
1243 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
1244 suggested for Debian stable, which uses Perl 5.8.4.
1246 2006-09-28 Jim Meyering <jim@meyering.net>
1248 Automatically generated dependencies are important even
1249 when all of the sources in a directory come from gnulib.
1250 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
1251 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
1253 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
1254 Ensure that IFS is set properly and unset PATH.
1256 Work properly even when the name of the selected file starts with "-".
1257 Invoke rm via "../../src/rm", and adjust expected output.
1258 Prompted by a patch from Tim Waugh.
1260 * README-cvs: Add Bison to the list of required packages.
1262 2006-09-26 Jim Meyering <jim@meyering.net>
1264 * src/c99-to-c89.diff: Update offsets.
1266 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
1267 it from removing a directory containing 188 or more entries.
1268 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
1269 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
1270 Reported by Matthew Woehlke.
1272 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
1274 * NEWS: "groups user" no longer outputs "user :"; you need at least
1275 two users. "groups" now processes options like --help more compatibly.
1276 * src/groups.sh: Implement the option-processing change.
1277 Handle user and group names with special characters more robustly.
1278 Report write errors instead of exiting silently with status 1.
1280 2006-09-26 Jim Meyering <jim@meyering.net>
1282 * README: Warn not to run autoreconf manually. Use bootstrap instead.
1284 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
1285 Rewrite to avoid using temporary, $status.
1287 * NEWS: Mention the bug fix.
1288 * src/groups.sh: Don't hide a write failure.
1289 Reported by Iain Calder <ic56@rogers.com>.
1291 2006-09-25 Jim Meyering <jim@meyering.net>
1293 * src/chown.c (usage): Clarify --dereference description.
1294 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
1296 2006-09-24 Jim Meyering <jim@meyering.net>
1298 * NEWS: Mention these fixes.
1299 * src/copy.c (copy_reg): With --verbose (-v), print
1300 "removed `file_name'" just after unlinking a file.
1301 (copy_internal): Likewise, in three more places.
1302 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
1303 * tests/mv/hard-verbose: New file. Test for the above fix.
1304 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
1306 * tests/help-version (sync_args): Don't call sync, since it spins up
1307 disks that I've deliberately caused to spin down (but not unmounted).
1309 * NEWS: Mention the improvement to sort.
1311 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
1312 as well as existing.
1314 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
1315 since that predated addition of d_type support.
1317 2006-09-23 Jim Meyering <jim@meyering.net>
1319 * gl/modules/getloadavg.diff: New file. Work around the way the latest
1320 version of the getloadavg module interacts with our bootstrap script.
1321 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
1322 * Makefile.am (EXTRA_DIST): Sort file names.
1323 Add bootstrap and gl/modules/getloadavg.diff
1325 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1327 * bootstrap: Add support for --force.
1328 (usage): New function. Describe usage less tersely.
1329 (CVS_only_file): New var.
1331 * NEWS: Document fix for cp -i and mv -i.
1332 * src/copy.c (copy_internal): With -i, prompt even if the source
1333 is a directory and the destination is not. This is required by
1334 POSIX and gives the user a chance to bail out before failing.
1335 * tests/cp/Makefile.am (TESTS): Add cp-i.
1336 * tests/cp/cp-i: New file.
1337 * tests/mv/Makefile.am (TESTS): Add i-5.
1338 * tests/mv/i-5: New file.
1340 2006-09-20 Jim Meyering <jim@meyering.net>
1342 * NEWS: Mention the chmod bug fix.
1344 * tests/chmod/inaccessible: New test, specifically for this bug.
1345 Based on a test case from Paul Eggert.
1346 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
1348 Fix the 2006-09-18 bug differently.
1349 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
1350 tell fts_read to stat the file again, in case it has become
1351 accessible since the initial fts_open call.
1352 * src/chown-core.c (change_file_owner): Likewise.
1354 * src/chmod.c: Revert last change. There is a better way.
1355 * src/chown-core.c: Likewise.
1357 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
1359 * src/ln.c (target_directory_operand): Rewrite to avoid porting
1360 problem on Tandem reported by Matthew Woehlke in
1361 <https://savannah.gnu.org/bugs/?17172>.
1363 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
1365 Fix bug where chmod, chown, and chgrp did not process operands
1366 left-to-right in some cases.
1367 * src/chmod.c (wd_errno): New var.
1368 (chmod_file): New function, with most of the contents of the
1369 old prcess_file function.
1370 (process_files): Use it. This gives file names to fts one
1371 at a time, so that they are processed left-to-right as POSIX
1373 * src/chown-core.c (wd_errno, chown_files): Likewise.
1374 (chown_file): New function.
1375 * tests/install/basic-1: Redo test so as to not workaround
1376 the chmod bug, thereby testing for it.
1378 * src/shuf.c (main): Quote the entire range when reporting an
1379 invalid one, rather than just the part that contained the error.
1381 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
1382 sometimes left behind if the test is skipped or interrupted.
1384 * bootstrap (symlink_to_gnulib): New function.
1385 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
1386 to copies-of-gnulib.
1387 (cp_mark_as_generated, slurp, gnulib_files):
1388 Avoid making a copy if it's the same as the old version.
1389 (gnulib_files): Add support for this variable (used by Bison).
1391 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
1392 indicating flaw in kernel. Reword to say that the flaw isn't
1393 serious for coreutils, since the flaw does affect ls -i.
1395 * tests/chgrp/basic: Fix bug in test case exposed by building on
1396 Solaris 8 in a setgid directory. The test case incorrectly
1397 assumed that 'symlink' would be in group $g1.
1399 2006-09-18 Jim Meyering <jim@meyering.net>
1401 * NEWS: Add a line for 6.3-cvs.
1402 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
1405 * NEWS: Record the 6.2 release date.
1406 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1408 2006-09-17 Jim Meyering <jim@meyering.net>
1410 * tests/chgrp/basic: On an OpenBSD system, rather than failing
1411 due to a known problem, merely warn about it.
1412 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
1413 Instead, use stat to test file system for desired results, directly.
1414 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
1416 * tests/envvar-check: Add more variable names to the list of those
1417 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
1418 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
1420 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
1422 * NEWS: Document that mkdir -p and install -d now fork on occasion.
1423 * bootstrap.conf (gnulib_modules): Add savewd.
1424 * src/install.c: Include savewd.h.
1425 (process_dir): New function.
1426 (main, install_file_in_file_parents): Use it, along with the new
1427 savewd module, to avoid some race conditions.
1428 * src/mkdir.c: Include savewd.h.
1429 (struct mkdir_options): New members make_ancestor_function, mode,
1431 (make_ancestor): Return 1 if the resulting directory is not readable.
1432 (process_dir): New function.
1433 (main): Use it, along with new savewd module, to avoid some
1434 race conditions. Fill in new slots of struct mkdir_options, so
1435 that callees get the values.
1436 * tests/install/basic-1: Test for coreutils 5.97 bug that was
1437 fixed in coreutils 6.0, and which should still be fixed with
1439 * tests/mkdir/p-3: Likewise.
1441 2006-09-15 Jim Meyering <jim@meyering.net>
1443 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
1444 The 2006-09-08 changes made it so "mv dir new-name/" would
1445 fail on NetBSD 1.6. This makes it work once again.
1447 2006-09-14 Jim Meyering <jim@meyering.net>
1449 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
1450 Instead, since it's a little fragile, assert the condition.
1451 (target_directory_operand): Update comment to reflect latest change.
1453 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
1455 * src/who.c (print_user): Rewrite to avoid warning from
1456 GCC 4.1.1 with -Wall.
1458 2006-09-12 Jim Meyering <jim@meyering.net>
1460 * tests/mv/atomic: Check for specific strace output, rather than
1461 simply nonempty. RHEL AS 4 would fail this test due to strace
1462 generating "[ Process PID=14434 runs in 32 bit mode. ]".
1463 Reported by Nelson Beebe.
1465 2006-09-11 Jim Meyering <jim@meyering.net>
1467 * src/remove.c (remove_dir): Move new cache_stat_init call onto
1469 (rm_1): Move declaration of "st" and new cache_stat_init call
1470 "down" to nearer where they're used.
1471 * src/c99-to-c89.diff: Add another set of curly braces.
1473 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
1475 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
1476 substr's last operand is very large. Performance problem reported
1479 2006-09-09 Jim Meyering <jim@meyering.net>
1481 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
1483 (sc_require_config_h): Skip this test if there are no version-
1484 controlled .c files.
1485 (sc_prohibit_assert_without_use): Likewise.
1487 2006-09-08 Jim Meyering <jim@meyering.net>
1489 * bootstrap: Export CVS_RSH separate from its assignment, to work
1490 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
1492 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
1494 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
1495 no file operand is given, and standard input is any FIFO.
1496 This is in response to Open Group XCU ERN 114.
1497 * src/tail.c (main): Likewise.
1499 2006-09-08 Jim Meyering <jim@meyering.net>
1501 mv and "cp -r" no longer fail when invoked with two arguments
1502 where the first one names a directory and the second name ends in
1503 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
1504 now succeeds, once more. This reverts part of the 2004-06-27
1506 * NEWS: Say the above.
1507 * src/mv.c (target_directory_operand): Don't require (here)
1508 that the target operand "look like" a directory. This change
1509 pushes the test down to the rename syscall level, where a
1510 "mv dir existing-non-dir/" will mistakenly succeed on older systems
1511 that ignore trailing slashes in the rename destination argument.
1512 * src/cp.c (target_directory_operand): Likewise, but for cp.
1513 * tests/mv/trailing-slash: Exercise the above fixes.
1514 * tests/cp/trailing-slash: New file.
1515 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
1517 * bootstrap: Use the previously unused variable, $src,
1518 to avoid repeating "$GNULIB_SRCDIR/$file".
1520 * bootstrap (cp_mark_as_generated): Don't use "local", to
1521 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
1522 Rename now-global "$src" and "$dst" to have cp_ prefix.
1523 Safer, and avoids confusion.
1525 * bootstrap (cp_mark_as_generated): New function.
1526 (slurp): Use it to prepend editor hints and a warning that
1527 the file we're copying is generated.
1528 Suggestion from Bruce Korb.
1529 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
1530 Fix last-minute typo.
1532 2006-09-07 Jim Meyering <jim@meyering.net>
1534 * bootstrap: Revert last change. There are less disruptive ways
1535 to mark these generated files as read-only.
1537 * src/c99-to-c89.diff: Update to have proper offsets.
1539 2006-09-06 Jim Meyering <jim@meyering.net>
1541 Ensure that some gnulib-tool-generated files are read-only.
1542 * bootstrap (slurp): Put the body of this function in a sub-shell,
1543 with "umask a-w" so that all new files are read-only. Remove each
1544 file before we write to it, in case it's read-only.
1545 Make po/Makevars and runtime-po/Makevars read-only, too.
1547 2006-09-05 Jim Meyering <jim@meyering.net>
1549 * tests/cp/acl: Skip this test when cp lacks ACL support.
1550 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
1552 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
1553 context from change of 2006-09-02.
1555 2006-09-04 Jim Meyering <jim@meyering.net>
1557 * README-cvs: Fix typo in update command.
1559 2006-09-03 Jim Meyering <jim@meyering.net>
1561 * NEWS: Tweak the wording in the new change description so that
1562 no one can think this change causes e.g., `rm -fr foo../' to fail.
1564 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
1565 Use $CONFIG_HEADER, rather than hard-coding it.
1566 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
1568 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
1570 * NEWS: rm now rejects attempts to remove /, ./, and ../.
1571 * src/basename.c: Don't include dirname.h, since system.h does it now.
1572 * src/chmod.c: Likewise.
1573 * src/copy.c: Likewise.
1574 * src/cp.c: Likewise.
1575 * src/df.c: Likewise.
1576 * src/dircolors.c: Likewise.
1577 * src/dirname.c: Likewise.
1578 * src/du.c: Likewise.
1579 * src/install.c: Likewise.
1580 * src/ln.c: Likewise.
1581 * src/ls.c: Likewise.
1582 * src/mkdir.c: Likewise.
1583 * src/mv.c: Likewise.
1584 * src/remove.c: Likewise.
1585 * src/rm.c: Likewise.
1586 * src/rmdir.c: Likewise.
1587 * src/shred.c: Likewise.
1588 * src/split.c: Likewise.
1589 * src/su.c: Likewise.
1590 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
1592 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
1594 * src/rm.c (usage, main): --preserve-root is now the default.
1595 * src/remove.h: Fix comment.
1596 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
1597 (cache_statted, cache_stat_ok): New functions.
1598 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
1599 which is no longer needed with the new functions. All callers
1601 (prompt, is_dir_lstat, remove_entry, remove_dir):
1602 New struct stat * arg. All callers changed.
1603 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
1604 (remove_cwd_entries, remove_dir, rm_1):
1605 Use and maintain the file status cache.
1606 (prompt, remove_entry): Omit the first "directory" in the diagnostic
1607 "Cannot remove directory `foo': is a directory". This causes "rm"
1608 to pass a test case that it would otherwise fail now that it
1609 "knows" more about its argument. I think the diagnostic is better
1610 without the first "directory" anyway.
1611 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
1612 (rm_1): Reject attempts to remove /, ./, or ../.
1613 * tests/rm/Makefile.am (TESTS): Add r-4.
1614 * tests/rm/r-4: New file.
1616 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
1618 * src/stat.c: Include <stddef.h>
1619 (alignof): New macro.
1620 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
1622 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
1624 (print_statfs): If f_fsid isn't an integer, grab its words one
1625 at a time in little-endian order. This is a bit easier to configure
1626 and should avoid a compilation failure on MacOS reported by Bruno
1629 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
1631 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
1632 work around a Mac OS X porting problem reported by Bruno Haible in
1633 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
1634 (print_statfs): Use them.
1636 * bootstrap.conf (gnulib_modules): Add isapipe.
1637 * src/tail.c: Include isapipe.h.
1638 (IS_PIPE_LIKE_FILE_TYPE): Remove.
1639 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
1640 tailable, since this seems to be portable.
1641 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
1642 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
1644 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
1647 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
1649 * src/copy.c (copy_internal): Don't test whether macros like
1650 S_ISLNK are defined, since they're always defined now.
1651 * src/cp.c (main): Likewise.
1652 * src/ln.c (main): Likewise.
1653 * src/ls.c (get_link_name, make_link_name): Likewise.
1654 * src/mknod.c (main): Likewise.
1655 * src/mkfifo.c (usage): Likewise.
1656 * src/who.c (S_IWGRP): Likewise.
1658 Adjust to recent gnulib changes for the gnulib module.
1659 * bootstrap.conf (gnulib_modules): Add fcntl.
1660 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
1661 is already assuming these macros are defined.
1662 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
1663 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
1664 Remove; the fcntl module now handles these.
1666 Adjust to recent gnulib changes for the inttypes module.
1667 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
1668 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
1670 * src/system.h: Don't bother to include <stdint.h>, since we can
1671 now assume inttypes.h does the equivalent of including stdint.h.
1673 2006-08-27 Jim Meyering <jim@meyering.net>
1675 * src/copy.c (copy_internal): Don't make a backup if the last
1676 component of the source name is "." or "..".
1677 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
1678 * NEWS: Mention this.
1679 * tests/cp/src-base-dot: New file. Test for the above fix.
1680 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
1682 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
1683 (dot_or_dotdot): ...new static inline function.
1684 * src/remove.c (rm_1): Reflect this renaming.
1685 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
1687 * src/copy.c (copy_internal): Add comments.
1689 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
1691 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
1692 since Automake supplies them for us. It always did -I$(srcdir),
1693 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
1694 is now also doing -I../lib.
1696 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
1697 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
1698 since there might not be any .po files.
1699 (WGET_COMMAND): Set to empty if wget doesn't
1700 seem to be available.
1702 2006-08-26 Jim Meyering <jim@meyering.net>
1704 This test was failing in some environments.
1705 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
1706 to set LS_COLORS in the environment.
1707 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
1708 Reported by Bob Proulx.
1710 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
1712 * Makefile.am (EXTRA_DIST): Remove these files here, too:
1713 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
1714 .x-sc_two_space_separator_in_usage.
1716 Fix "mv --verbose --backup" so its output includes the
1717 " (backup: foo.~1~)" suffix also when backing up a directory.
1718 * NEWS: Report this bug fix.
1719 * src/copy.c (emit_verbose): New function, factored out of...
1720 (copy_internal): ...here. Use the new function.
1721 * tests/mv/backup-dir: Test for the above fix.
1722 * tests/mv/Makefile.am (TESTS): Add backup-dir.
1724 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
1726 * .x-sc_no_if_have_config_h: Remove; no longer needed.
1727 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
1728 * .x-sc_two_space_separator_in_usage: Likewise.
1729 * Makefile.maint (sc_no_have_config_h): Renamed from
1730 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
1731 is absent everywhere.
1732 * bootstrap.conf (gnulib_modules): Add config-h.
1733 * src/shred.c: Include <config.h> unconditionally, since
1734 we now assume config.h exists.
1735 * src/dircolors.c: Likewise.
1737 2006-08-26 Jim Meyering <jim@meyering.net>
1739 "ls --color" would highlight other-writable and sticky directories
1740 no differently than regular directories on a file system with
1741 dirent.d_type support.
1742 * NEWS: Say the above.
1743 * src/ls.c (gobble_file): With --color, also stat the file when
1744 we know it is a directory.
1745 Derived from an anonymous one-line fix and bug report:
1746 <http://savannah.gnu.org/bugs/?15043>.
1747 * tests/ls/color-dtype-dir: New file. Test for the above fix.
1748 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
1750 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
1752 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
1754 * bootstrap.conf: Add configmake, verify.
1755 * src/.cvsignore: Remove localedir.h.
1756 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
1757 subsumed by configmake.
1758 * src/system.h: Include configmake.h rather than localedir.h
1759 (LOCALEDIR): New macro.
1761 Rewrite to avoid some unnecessary casts, macros, literals.
1762 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
1764 (SECTOR_SIZE, SECTOR_MASK): New constants.
1765 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
1766 and use the SECTOR_* constants when applicable. Check for size <
1767 0 rather than size == -1, since negative-size files are a sign of
1770 2006-08-25 Bruno Haible <bruno@clisp.org>
1772 * src/shred.c (dopass): Assume a continuable error if EIO even
1773 if the current position is not a multiple of 512.
1775 2006-08-24 Jim Meyering <jim@meyering.net>
1777 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
1779 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
1781 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
1782 macro was being used without being defined.
1783 (SB_F_NAMEMAX): Remove cast.
1784 (f_fsid) [BeOS]: Likewise.
1785 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
1787 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
1789 (xstrcat): Remove. All uses changed to use the above functions.
1790 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
1791 buffer len. All uses changed. Output '?', not '*', for unknown
1792 data or errors. Do not assume signed values can be interchanged
1793 with unsigned when printing.
1794 (print_statfs): For %i, print the fsid as a single int, not as a
1796 (print_it): Quote invalid format better.
1798 * NEWS: printf supports the I flag.
1799 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
1801 2006-08-23 Bruno Haible <bruno@clisp.org>
1803 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
1804 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
1805 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
1807 * src/ls.c (SA_RESTART): Fallback define.
1809 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
1811 * src/system.h (EDQUOT): Define if not already defined.
1812 Problem reported by Bruno Haible for BeOS.
1814 * .cvsignore: Remove config.h, config.hin, as they are now
1816 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
1818 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
1820 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
1821 to accommodate today's gnulib change.
1823 2006-08-23 Jim Meyering <jim@meyering.net>
1825 * NEWS: Mention the sweeping infrastructure changes.
1827 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
1829 * bootstrap.conf (gnulib_modules): Add gnupload.
1830 * Makefile.maint (emit_upload_commands): gnupload is now
1832 * gnupload: Remove from CVS, since it's now a gnulib module.
1834 * bootstrap (bootstrap_conf_cleanup): Remove.
1835 (excluded_files): New var.
1836 * bootstrap.conf: Likewise.
1837 * bootstrap (slurp): Exclude files early if they're in the
1838 excluded_files list. That way, their names don't get put into
1841 * aclocal.m4, config.hin, configure:
1842 Remove from CVS, since ./bootstrap generates them automatically.
1843 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
1844 configure, *.cache, *.lineno, *.log.
1845 Remove more-specific entries. This catches files like configure.lineno.
1846 * man/.cvsignore: Add Makefile.in.
1847 * src/.cvsignore: Add Makefile.in.
1848 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
1851 * tests/chgrp/.cvsignore:
1852 * tests/chmod/.cvsignore:
1853 * tests/chown/.cvsignore:
1854 * tests/cp/.cvsignore:
1855 * tests/cut/.cvsignore:
1856 * tests/dd/.cvsignore:
1857 * tests/dircolors/.cvsignore:
1858 * tests/du/.cvsignore:
1859 * tests/expr/.cvsignore:
1860 * tests/factor/.cvsignore:
1861 * tests/fmt/.cvsignore:
1862 * tests/head/.cvsignore:
1863 * tests/install/.cvsignore:
1864 * tests/join/.cvsignore:
1865 * tests/ln/.cvsignore:
1866 * tests/ls/.cvsignore:
1867 * tests/ls-2/.cvsignore:
1868 * tests/md5sum/.cvsignore:
1869 * tests/misc/.cvsignore:
1870 * tests/mkdir/.cvsignore:
1871 * tests/mv/.cvsignore:
1872 * tests/od/.cvsignore:
1873 * tests/pr/.cvsignore:
1874 * tests/readlink/.cvsignore:
1875 * tests/rm/.cvsignore:
1876 * tests/rmdir/.cvsignore:
1877 * tests/seq/.cvsignore:
1878 * tests/sha1sum/.cvsignore:
1879 * tests/shred/.cvsignore:
1880 * tests/sort/.cvsignore:
1881 * tests/stty/.cvsignore:
1882 * tests/sum/.cvsignore:
1883 * tests/tac/.cvsignore:
1884 * tests/tail/.cvsignore:
1885 * tests/tail-2/.cvsignore:
1886 * tests/tee/.cvsignore:
1887 * tests/test/.cvsignore:
1888 * tests/touch/.cvsignore:
1889 * tests/tr/.cvsignore:
1890 * tests/tsort/.cvsignore:
1891 * tests/unexpand/.cvsignore:
1892 * tests/uniq/.cvsignore:
1893 * tests/wc/.cvsignore:
1894 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
1895 *.X, *.O, *-tests, build-script, mk-script if they're never
1896 created in this directory.
1898 2006-08-22 Bruno Haible <bruno@clisp.org>
1901 * src/uptime.c: Include OS.h if it exists.
1902 (print_uptime): On BeOS, use the get_system_info function (actually a
1903 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
1904 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
1906 2006-08-22 Jim Meyering <jim@meyering.net>
1908 * .cvsignore: Add ABOUT-NLS.
1910 Move the check-AUTHORS rule to be run as part of "make distcheck",
1911 rather than "make check".
1912 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
1913 cause "make check" to fail on systems unable to build all binaries.
1914 * Makefile.maint (check-AUTHORS): New rule.
1915 (local-checks-available): Add it here.
1916 Reported by Bruno Haible. Needed for BeOS.
1918 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
1920 * src/df.c (print_header, show_dev): Use a column width that
1921 depends on the block size of -P is specified and not autoscaling.
1922 Problem reported by Gustavo G. Rondina in:
1923 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
1925 2006-08-21 Jim Meyering <jim@meyering.net>
1927 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
1928 when the shell variable, SHELL, is not set.
1929 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
1930 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
1932 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
1933 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
1934 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
1935 od: invalid type string `u8';
1936 this system doesn't provide a 8-byte integral type
1937 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
1939 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
1941 Add a bootstrap procedure, so that the CVS version contains fewer
1942 files and we bootstrap the rest from gnulib, gettext, etc.
1943 * README-cvs: New file.
1944 * bootstrap: New file.
1945 * bootstrap.conf: New file.
1946 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
1947 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
1949 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
1950 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
1952 (gl_MACROS): Call just after gl_EARLY, just for clarity.
1953 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
1954 * src/kill.c (strtoimax): Remove decl.
1955 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
1956 * src/wc.c: Likewise.
1957 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
1958 declaration, so that we don't need to patch this file.
1959 * src/printf.c (strtoimax, strtoumax): Remove decls.
1960 * src/su.c: Include getpass.h.
1962 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
1963 Include inttypes.h unconditionally.
1964 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
1965 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
1966 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
1967 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
1968 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
1970 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
1971 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
1972 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
1973 * tests/cp/Makefile.in, tests/cut/Makefile.in:
1974 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
1975 * tests/du/Makefile.in, tests/expr/Makefile.in:
1976 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
1977 * tests/general/Makefile.in, tests/head/Makefile.in:
1978 * tests/install/Makefile.in, tests/join/Makefile.in:
1979 * tests/ln/Makefile.in, tests/ls/Makefile.in:
1980 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
1981 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
1982 * tests/mv/Makefile.in, tests/od/Makefile.in:
1983 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
1984 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
1985 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
1986 * tests/shred/Makefile.in, tests/sort/Makefile.in:
1987 * tests/stty/Makefile.in, tests/sum/Makefile.in:
1988 * tests/tac/Makefile.in, tests/tail/Makefile.in:
1989 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
1990 * tests/test/Makefile.in, tests/touch/Makefile.in:
1991 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
1992 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
1993 * tests/wc/Makefile.in:
1994 Remove from CVS, since ./bootstrap generates them automatically.
1996 2006-08-20 Eric Blake <ebb9@byu.net>
1998 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
1999 the patch from 2006-08-18 broke on cygwin.
2001 2006-08-20 Jim Meyering <jim@meyering.net>
2003 * NEWS: Add a line for 6.2-cvs.
2004 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
2006 2006-08-19 Jim Meyering <jim@meyering.net>
2009 * NEWS: Record the 6.1 release date.
2010 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2012 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
2014 Avoid test failure when `make check' is run through debuild.
2015 * tests/help-version: Ensure that $SHELL is set to some value
2016 and exported. Patch from Sven Joachim. For details, see
2017 <http://bugs.debian.org/355368>.
2019 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
2021 * README: Describe potential "pre-C99 build failure", and work-around.
2023 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
2024 backed out due to updates provoked by the copyright changes.
2025 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
2026 it propagates to the derived Makefile.am files.
2027 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
2028 so we don't mistakenly edit them again.
2029 * tests/cut/Makefile.am: Regenerate.
2030 * tests/head/Makefile.am: Likewise.
2031 * tests/join/Makefile.am: Likewise.
2032 * tests/pr/Makefile.am: Likewise.
2033 * tests/sort/Makefile.am: Likewise.
2034 * tests/tac/Makefile.am: Likewise.
2035 * tests/tail/Makefile.am: Likewise.
2036 * tests/test/Makefile.am: Likewise.
2037 * tests/tr/Makefile.am: Likewise.
2038 * tests/uniq/Makefile.am: Likewise.
2039 * tests/wc/Makefile.am: Likewise.
2041 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
2042 when the file's apparent size is not a multiple of its block size.
2043 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
2044 For some file sizes, writing that single byte would unnecessarily
2045 waste a few file blocks. That write may have been necessary in the
2046 early days of Linux, but now, removing it should be safe.
2047 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
2048 * tests/cp/sparse: New test for the above.
2049 * tests/cp/Makefile.am (TESTS): Add sparse.
2051 * tests/sparse-file: New file, essence factored out of...
2052 * tests/du/8gb: ... here. Use the new script.
2054 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
2056 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
2057 the CVS gettext manual now suggests 1000000.
2059 2006-08-18 Bruno Haible <bruno@clisp.org>
2061 Add support for NetBSD 3.0.
2062 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
2064 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
2065 has a field f_fstypename.
2066 This undoes the 2006-08-15 to src/stat.c.
2068 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
2070 Copyright notice fixes.
2072 * COPYING: Upgrade to latest version from FSF.
2074 * src/uname.c: Use (C) in copyright notice.
2076 * .vg-suppressions: Add copyright notice.
2077 * ChangeLog: Likewise.
2078 * ChangeLog-2005: Likewise.
2079 * Makefile.am: Likewise.
2082 * README-valgrind: Likewise.
2084 * announce-gen: Likewise.
2085 * man/Makefile.am: Likewise.
2086 * man/chmod.x: Likewise.
2087 * man/chown.x: Likewise.
2088 * man/df.x: Likewise.
2089 * man/du.x: Likewise.
2090 * man/rm.x: Likewise.
2091 * src/dircolors.hin: Likewise.
2092 * src/du-tests: Likewise.
2093 * src/extract-magic: Likewise.
2094 * src/tac-pipe.c: Likewise.
2095 * src/wheel-gen.pl: Likewise.
2096 * tests/Coreutils.pm: Likewise.
2097 * tests/Makefile.am.in: Likewise.
2098 * tests/acl: Likewise.
2099 * tests/envvar-check: Likewise.
2100 * tests/expensive: Likewise.
2101 * tests/group-names: Likewise.
2102 * tests/help-version: Likewise.
2103 * tests/mk-script: Likewise.
2104 * tests/priv-check: Likewise.
2105 * tests/rwx-to-mode: Likewise.
2106 * tests/sample-test: Likewise.
2107 * tests/setgid-check: Likewise.
2108 * tests/chgrp/basic: Likewise.
2109 * tests/chgrp/deref: Likewise.
2110 * tests/chgrp/no-x: Likewise.
2111 * tests/chgrp/posix-H: Likewise.
2112 * tests/chgrp/recurse: Likewise.
2113 * tests/chmod/c-option: Likewise.
2114 * tests/chmod/equal-x: Likewise.
2115 * tests/chmod/equals: Likewise.
2116 * tests/chmod/no-x: Likewise.
2117 * tests/chmod/octal: Likewise.
2118 * tests/chmod/setgid: Likewise.
2119 * tests/chmod/umask-x: Likewise.
2120 * tests/chmod/usage: Likewise.
2121 * tests/chown/basic: Likewise.
2122 * tests/chown/deref: Likewise.
2123 * tests/chown/separator: Likewise.
2124 * tests/cp/Makefile.am: Likewise.
2125 * tests/cp/acl: Likewise.
2126 * tests/cp/backup-1: Likewise.
2127 * tests/cp/backup-is-src: Likewise.
2128 * tests/cp/cp-HL: Likewise.
2129 * tests/cp/cp-deref: Likewise.
2130 * tests/cp/cp-mv-backup: Likewise.
2131 * tests/cp/cp-parents: Likewise.
2132 * tests/cp/deref-slink: Likewise.
2133 * tests/cp/dir-rm-dest: Likewise.
2134 * tests/cp/dir-slash: Likewise.
2135 * tests/cp/dir-vs-file: Likewise.
2136 * tests/cp/fail-perm: Likewise.
2137 * tests/cp/into-self: Likewise.
2138 * tests/cp/link: Likewise.
2139 * tests/cp/link-no-deref: Likewise.
2140 * tests/cp/link-preserve: Likewise.
2141 * tests/cp/no-deref-link1: Likewise.
2142 * tests/cp/no-deref-link2: Likewise.
2143 * tests/cp/no-deref-link3: Likewise.
2144 * tests/cp/perm: Likewise.
2145 * tests/cp/preserve-2: Likewise.
2146 * tests/cp/r-vs-symlink: Likewise.
2147 * tests/cp/same-file: Likewise.
2148 * tests/cp/slink-2-slink: Likewise.
2149 * tests/cp/special-bits: Likewise.
2150 * tests/cp/symlink-slash: Likewise.
2151 * tests/cut/Makefile.am: Likewise.
2152 * tests/cut/Test.pm: Likewise.
2153 * tests/dd/misc: Likewise.
2154 * tests/dd/not-rewound: Likewise.
2155 * tests/dd/skip-seek: Likewise.
2156 * tests/dd/skip-seek2: Likewise.
2157 * tests/dd/unblock-sync: Likewise.
2158 * tests/dircolors/simple: Likewise.
2159 * tests/du/2g: Likewise.
2160 * tests/du/8gb: Likewise.
2161 * tests/du/Makefile.am: Likewise.
2162 * tests/du/basic: Likewise.
2163 * tests/du/deref: Likewise.
2164 * tests/du/deref-args: Likewise.
2165 * tests/du/exclude: Likewise.
2166 * tests/du/fd-leak: Likewise.
2167 * tests/du/files0-from: Likewise.
2168 * tests/du/hard-link: Likewise.
2169 * tests/du/inaccessible-cwd: Likewise.
2170 * tests/du/long-from-unreadable: Likewise.
2171 * tests/du/long-sloop: Likewise.
2172 * tests/du/no-deref: Likewise.
2173 * tests/du/no-x: Likewise.
2174 * tests/du/restore-wd: Likewise.
2175 * tests/du/slash: Likewise.
2176 * tests/du/slink: Likewise.
2177 * tests/du/trailing-slash: Likewise.
2178 * tests/du/two-args: Likewise.
2179 * tests/expr/basic: Likewise.
2180 * tests/factor/basic: Likewise.
2181 * tests/fmt/basic: Likewise.
2182 * tests/fmt/long-line: Likewise.
2183 * tests/general/Makefile.am: Likewise.
2184 * tests/general/atgeneral.m4: Likewise.
2185 * tests/general/dd.at: Likewise.
2186 * tests/head/Makefile.am: Likewise.
2187 * tests/head/Test.pm: Likewise.
2188 * tests/install/basic-1: Likewise.
2189 * tests/install/create-leading: Likewise.
2190 * tests/install/d-slashdot: Likewise.
2191 * tests/install/trap: Likewise.
2192 * tests/join/Makefile.am: Likewise.
2193 * tests/join/Test.pm: Likewise.
2194 * tests/ln/backup-1: Likewise.
2195 * tests/ln/misc: Likewise.
2196 * tests/ln/sf-1: Likewise.
2197 * tests/ln/target-1: Likewise.
2198 * tests/ls/Makefile.am: Likewise.
2199 * tests/ls/Test.pm: Likewise.
2200 * tests/ls/dangle: Likewise.
2201 * tests/ls/dired: Likewise.
2202 * tests/ls/file-type: Likewise.
2203 * tests/ls/follow-slink: Likewise.
2204 * tests/ls/infloop: Likewise.
2205 * tests/ls/inode: Likewise.
2206 * tests/ls/m-option: Likewise.
2207 * tests/ls/no-arg: Likewise.
2208 * tests/ls/recursive: Likewise.
2209 * tests/ls/rt-1: Likewise.
2210 * tests/ls/stat-dtype: Likewise.
2211 * tests/ls/stat-failed: Likewise.
2212 * tests/ls/stat-vs-dirent: Likewise.
2213 * tests/ls/symlink-slash: Likewise.
2214 * tests/ls/time-1: Likewise.
2215 * tests/ls-2/tests: Likewise.
2216 * tests/md5sum/basic-1: Likewise.
2217 * tests/md5sum/newline-1: Likewise.
2218 * tests/misc/Makefile.am: Likewise.
2219 * tests/misc/base64: Likewise.
2220 * tests/misc/basename: Likewise.
2221 * tests/misc/cat-proc: Likewise.
2222 * tests/misc/close-stdout: Likewise.
2223 * tests/misc/csplit: Likewise.
2224 * tests/misc/date: Likewise.
2225 * tests/misc/date-sec: Likewise.
2226 * tests/misc/df: Likewise.
2227 * tests/misc/dirname: Likewise.
2228 * tests/misc/expand: Likewise.
2229 * tests/misc/false-status: Likewise.
2230 * tests/misc/fold: Likewise.
2231 * tests/misc/head-c: Likewise.
2232 * tests/misc/head-elide-tail: Likewise.
2233 * tests/misc/head-pos: Likewise.
2234 * tests/misc/mknod: Likewise.
2235 * tests/misc/nice: Likewise.
2236 * tests/misc/nl: Likewise.
2237 * tests/misc/nohup: Likewise.
2238 * tests/misc/paste-no-nl: Likewise.
2239 * tests/misc/pathchk1: Likewise.
2240 * tests/misc/printf: Likewise.
2241 * tests/misc/printf-hex: Likewise.
2242 * tests/misc/pwd-long: Likewise.
2243 * tests/misc/sha224sum: Likewise.
2244 * tests/misc/sha256sum: Likewise.
2245 * tests/misc/sha384sum: Likewise.
2246 * tests/misc/sha512sum: Likewise.
2247 * tests/misc/shuf: Likewise.
2248 * tests/misc/sort-merge: Likewise.
2249 * tests/misc/sort-rand: Likewise.
2250 * tests/misc/split-a: Likewise.
2251 * tests/misc/split-fail: Likewise.
2252 * tests/misc/split-l: Likewise.
2253 * tests/misc/stat-fmt: Likewise.
2254 * tests/misc/stat-printf: Likewise.
2255 * tests/misc/tac-continue: Likewise.
2256 * tests/misc/test-diag: Likewise.
2257 * tests/misc/tty-eof: Likewise.
2258 * tests/misc/wc-files0: Likewise.
2259 * tests/misc/wc-files0-from: Likewise.
2260 * tests/mkdir/concurrent-1: Likewise.
2261 * tests/mkdir/p-1: Likewise.
2262 * tests/mkdir/p-2: Likewise.
2263 * tests/mkdir/p-3: Likewise.
2264 * tests/mkdir/p-slashdot: Likewise.
2265 * tests/mkdir/p-thru-slink: Likewise.
2266 * tests/mkdir/parents: Likewise.
2267 * tests/mkdir/perm: Likewise.
2268 * tests/mkdir/special-1: Likewise.
2269 * tests/mkdir/t-slash: Likewise.
2270 * tests/mkdir/writable-under-readonly: Likewise.
2271 * tests/mv/Makefile.am: Likewise.
2272 * tests/mv/acl: Likewise.
2273 * tests/mv/atomic: Likewise.
2274 * tests/mv/backup-is-src: Likewise.
2275 * tests/mv/childproof: Likewise.
2276 * tests/mv/diag: Likewise.
2277 * tests/mv/dir-file: Likewise.
2278 * tests/mv/dir2dir: Likewise.
2279 * tests/mv/dup-source: Likewise.
2280 * tests/mv/force: Likewise.
2281 * tests/mv/hard-2: Likewise.
2282 * tests/mv/hard-3: Likewise.
2283 * tests/mv/hard-4: Likewise.
2284 * tests/mv/hard-link-1: Likewise.
2285 * tests/mv/i-1: Likewise.
2286 * tests/mv/i-2: Likewise.
2287 * tests/mv/i-3: Likewise.
2288 * tests/mv/i-4: Likewise.
2289 * tests/mv/i-link-no: Likewise.
2290 * tests/mv/into-self: Likewise.
2291 * tests/mv/into-self-2: Likewise.
2292 * tests/mv/into-self-3: Likewise.
2293 * tests/mv/into-self-4: Likewise.
2294 * tests/mv/leak-fd: Likewise.
2295 * tests/mv/mv-special-1: Likewise.
2296 * tests/mv/no-target-dir: Likewise.
2297 * tests/mv/part-fail: Likewise.
2298 * tests/mv/part-hardlink: Likewise.
2299 * tests/mv/part-rename: Likewise.
2300 * tests/mv/part-symlink: Likewise.
2301 * tests/mv/partition-perm: Likewise.
2302 * tests/mv/perm-1: Likewise.
2303 * tests/mv/reply-no: Likewise.
2304 * tests/mv/setup: Likewise.
2305 * tests/mv/to-symlink: Likewise.
2306 * tests/mv/trailing-slash: Likewise.
2307 * tests/mv/update: Likewise.
2308 * tests/mv/vfat: Likewise.
2309 * tests/od/od-N: Likewise.
2310 * tests/od/x8: Likewise.
2311 * tests/pr/Makefile.am: Likewise.
2312 * tests/pr/Test.pm: Likewise.
2313 * tests/readlink/can-e: Likewise.
2314 * tests/readlink/can-f: Likewise.
2315 * tests/readlink/can-m: Likewise.
2316 * tests/readlink/rl-1: Likewise.
2317 * tests/rm/Makefile.am: Likewise.
2318 * tests/rm/cycle: Likewise.
2319 * tests/rm/dangling-symlink: Likewise.
2320 * tests/rm/deep-1: Likewise.
2321 * tests/rm/dir-no-w: Likewise.
2322 * tests/rm/dir-nonrecur: Likewise.
2323 * tests/rm/dot-rel: Likewise.
2324 * tests/rm/empty-inacc: Likewise.
2325 * tests/rm/empty-name: Likewise.
2326 * tests/rm/f-1: Likewise.
2327 * tests/rm/fail-2eperm: Likewise.
2328 * tests/rm/fail-eperm: Likewise.
2329 * tests/rm/hash: Likewise.
2330 * tests/rm/i-1: Likewise.
2331 * tests/rm/i-no-r: Likewise.
2332 * tests/rm/inaccessible: Likewise.
2333 * tests/rm/interactive-always: Likewise.
2334 * tests/rm/interactive-once: Likewise.
2335 * tests/rm/ir-1: Likewise.
2336 * tests/rm/isatty: Likewise.
2337 * tests/rm/no-give-up: Likewise.
2338 * tests/rm/r-1: Likewise.
2339 * tests/rm/r-2: Likewise.
2340 * tests/rm/r-3: Likewise.
2341 * tests/rm/rm1: Likewise.
2342 * tests/rm/rm2: Likewise.
2343 * tests/rm/rm3: Likewise.
2344 * tests/rm/rm4: Likewise.
2345 * tests/rm/rm5: Likewise.
2346 * tests/rm/sunos-1: Likewise.
2347 * tests/rm/unread2: Likewise.
2348 * tests/rm/unread3: Likewise.
2349 * tests/rm/unreadable: Likewise.
2350 * tests/rmdir/fail-perm: Likewise.
2351 * tests/rmdir/ignore: Likewise.
2352 * tests/rmdir/t-slash: Likewise.
2353 * tests/seq/basic: Likewise.
2354 * tests/sha1sum/basic-1: Likewise.
2355 * tests/sha1sum/sample-vec: Likewise.
2356 * tests/shred/exact: Likewise.
2357 * tests/shred/remove: Likewise.
2358 * tests/sort/Makefile.am: Likewise.
2359 * tests/sort/Test.pm: Likewise.
2360 * tests/sort-time/Makefile: Likewise.
2361 * tests/sort-time/README: Likewise.
2362 * tests/sort-time/rand-gen: Likewise.
2363 * tests/stty/basic-1: Likewise.
2364 * tests/stty/row-col-1: Likewise.
2365 * tests/sum/basic-1: Likewise.
2366 * tests/sum/sysv: Likewise.
2367 * tests/tac/Makefile.am: Likewise.
2368 * tests/tac/Test.pm: Likewise.
2369 * tests/tail/Makefile.am: Likewise.
2370 * tests/tail/Test.pm: Likewise.
2371 * tests/tail-2/Makefile.am: Likewise.
2372 * tests/tail-2/append-only: Likewise.
2373 * tests/tail-2/assert: Likewise.
2374 * tests/tail-2/assert-2: Likewise.
2375 * tests/tail-2/big-4gb: Likewise.
2376 * tests/tail-2/fflush: Likewise.
2377 * tests/tail-2/infloop-1: Likewise.
2378 * tests/tail-2/proc-ksyms: Likewise.
2379 * tests/tail-2/start-middle: Likewise.
2380 * tests/tail-2/tail-n0f: Likewise.
2381 * tests/tee/basic: Likewise.
2382 * tests/tee/dash: Likewise.
2383 * tests/test/Makefile.am: Likewise.
2384 * tests/test/Test.pm: Likewise.
2385 * tests/touch/Makefile.am: Likewise.
2386 * tests/touch/dangling-symlink: Likewise.
2387 * tests/touch/empty-file: Likewise.
2388 * tests/touch/fail-diag: Likewise.
2389 * tests/touch/fifo: Likewise.
2390 * tests/touch/no-create-missing: Likewise.
2391 * tests/touch/no-rights: Likewise.
2392 * tests/touch/not-owner: Likewise.
2393 * tests/touch/obsolescent: Likewise.
2394 * tests/touch/read-only: Likewise.
2395 * tests/touch/relative: Likewise.
2396 * tests/tr/Makefile.am: Likewise.
2397 * tests/tr/Test.pm: Likewise.
2398 * tests/tr/failures: Likewise.
2399 * tests/tsort/basic-1: Likewise.
2400 * tests/unexpand/basic-1: Likewise.
2401 * tests/uniq/Makefile.am: Likewise.
2402 * tests/uniq/Test.pm: Likewise.
2403 * tests/wc/Makefile.am: Likewise.
2404 * tests/wc/Test.pm: Likewise.
2406 2006-08-17 Jim Meyering <jim@meyering.net>
2408 ls -CF would misalign columns in some cases.
2409 * src/ls.c (get_type_indicator): New function. extracted from...
2410 (print_type_indicator): ...here. Use it.
2411 (length_of_file_name_and_frills): Use it here, too, rather than
2412 assuming stat.st_mode is valid.
2413 Reported by Andreas Schwab, here:
2414 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
2415 See the test for this above. FYI, I did ls -CF /proc and visually
2416 inspected the result.
2418 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
2419 to mention the now-removed cp_options.xstat member.
2421 * Makefile.maint (patch-check): Adapt to work now that the patch
2422 modifies more than one file in src/.
2424 With this patch, permit building with Solaris cc on Solaris 7.
2425 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
2426 This integrates patches from Bruno Haible.
2428 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
2430 Fix some problems reported by Bruno Haible.
2431 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
2432 Skip this test if "chmod g+s d" silently does nothing.
2433 * tests/ls-2/tests: Skip this test suite if we can't set up files
2434 properly for the setuid-etc test. This simplifies some of the
2435 hacks we were using to work around porting problems.
2437 2006-08-16 Jim Meyering <jim@meyering.net>
2439 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
2440 * tests/cp/acl: Instead, skip the test if either setfacl
2442 Reported by Michael Stone.
2444 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
2446 * tests/lang-default (LC_ALL): Set to "C", so we get
2447 English-language diagnostics. Unset the other variables; it
2448 should be portable to use 'unset' for this stuff nowadays.
2449 Problem reported by Bruno Haible. Using "C" reverses the
2450 2000-10-22 change to fileutils in this area.
2452 Fix bugs when printing plurals of numbers that are not
2453 unsigned long int values.
2454 * src/system.h (select_plural): New function.
2455 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
2456 * src/uptime.c (print_uptime): Likewise.
2457 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
2458 print a floating point number, as reducing to 0 or 1 doesn't work
2459 for some languages. Instead, just use "s" for seconds since it
2460 doesn't need a plural form.
2462 2006-08-16 Bruno Haible <bruno@clisp.org>
2464 Old versions of gzip would write --help output to stderr, and it
2465 would be annoying to see that in the output of every "make" command.
2466 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
2469 2006-08-16 Andreas Schwab <schwab@suse.de>
2471 * tests/cp/acl: Don't use non-portable == operator for test.
2473 2006-08-16 Jim Meyering <jim@meyering.net>
2475 * tests/ls/stat-dtype: Use stat to test file system type, rather
2476 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
2478 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
2480 * NEWS: Mention that df exits with nonzero status if it generates
2481 no output. This change was in 6.0 but inadvertently unmentioned.
2482 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
2484 (show_dev): Don't set it until we actually output something.
2485 Print the header if this is the first output.
2486 (main): Don't print a header, as that is now show_dev's job.
2487 * tests/misc/Makefile.am (TESTS): Add df.
2488 * tests/misc/df: New file.
2490 2006-08-15 Eric Blake <ebb9@byu.net>
2492 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
2493 statvfs.f_type not present. See
2494 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
2496 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
2498 * src/dd.c (print_stats): Don't substitute "1" for number, as this
2499 causes confusion for the Hungarian translators. Problem reported
2500 by Egmont Koblinger here:
2501 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
2503 2006-08-15 Jim Meyering <jim@meyering.net>
2505 * .x-sc_require_config_h: Add lib/at-func.c.
2507 * NEWS: Add a line for 6.1-cvs.
2508 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
2510 2006-08-15 Jim Meyering <jim@meyering.net>
2513 * NEWS: Record the 6.0 release date.
2514 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2516 * TODO: Add an item (convert to use gnulib-tool), add to the plan
2517 for id-vs-getgrouplist, and remove a few completed items.
2519 * Makefile.maint (alpha beta major): Fix syntax error.
2521 2006-08-13 Jim Meyering <jim@meyering.net>
2523 * src/shred.c (usage): Don't indent the second line of an item.
2524 Otherwise, help2man would misformat the output.
2525 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
2527 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
2529 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
2530 Suggested by Eric Blake to avoid problems like
2531 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
2533 2006-08-11 Jim Meyering <jim@meyering.net>
2535 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
2536 failure that this test checks for (stat/dirent inode mismatch at
2537 a mount point), so continue to give a diagnostic about the failure,
2538 but don't actually count it as a failure.
2540 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
2542 * ABOUT-NLS: Update from gettext 0.15.
2543 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
2545 * src/csplit.c (struct control): Remove fastmap member.
2546 (extract_regexp): Allocate fastmap separately, since otherwise
2547 it might move due to a realloc. This fixes a bug that led
2548 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
2550 2006-08-10 Jim Meyering <jim@meyering.net>
2552 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
2553 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
2554 Redirect both stdout and stderr of df invocations.
2556 * src/dircolors.hin: Add a TERM directive for each of the following:
2557 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
2558 rxvt-cygwin-native, screen.linux, xterm-256color.
2559 Sort the TERM directives.
2560 From Mike Frysinger.
2562 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
2564 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
2565 See Debian bug 373736.
2567 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
2570 * src/.cvsignore: Add shuf.
2572 * Makefile.maint: Remove the po-update procedure; it doesn't
2573 work with the new repository on http://www.iro.umontreal.ca/.
2574 For now I guess we'll have to fix things by hand.
2575 (do-po-update, po-update): Remove. All references removed.
2577 * src/shuf.c (next_line): New function.
2578 (read_input): Use it, to avoid relying on GCC-specific behavior
2579 with void * arithmetic. Problem reported by Bob Proulx.
2580 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
2581 to detect this sort of problem automatically in the future.
2583 2006-08-09 Jim Meyering <jim@meyering.net>
2585 * src/ls.c: Add a compile-time check to ensure that filetype
2586 and filetype_letter have the same number of elements.
2588 * tests/misc/sort-rand: Remove use of --seed=S.
2590 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
2592 Add a command 'shuf', and modify shred and sort to use the new
2593 random number generator library of 'shuf'.
2595 * AUTHORS: Add shuf.
2597 * NEWS: Likewise. Mention new --random-source option for shred
2598 and sort. Move "sort +1 -2" notice to the appropriate section,
2599 and clarify its role with respect to POSIXLY_CORRECT.
2600 * man/.cvsignore: Add shuf.1.
2601 * man/Makefile.am (dist_man_MANS): Add shuf.1.
2602 (shuf.1): New dependency.
2603 * man/shuf.x: New file.
2604 * src/Makefile.am (bin_PROGRAMS): Add shuf.
2605 (EXTRA_DIST): Remove rand-isaac.c.
2606 (shuf_LDADD): New macro.
2607 * src/rand-isaac.c: Remove, moving most of its contents to
2609 * src/shuf.c: New file.
2610 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
2611 Don't include rand-isaac.c; include randint.h and randread.h instead.
2612 (RANDOM_SOURCE_OPTION): New enum.
2613 (long_opts, usage, main): New option --random-source.
2614 * src/sort.c: Likewise.
2615 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
2616 All callers changed to use randint interface.
2617 (fillrand): Remove. All callers changed to use randread interface.
2618 (dopass): Remove dependency on ISAAC buffer size.
2619 (genpattern): Don't wipe the random state here.
2620 (randint_source): New static var.
2621 (clear_random_data): New function.
2622 (main): Allocate random source, and arrange to wipe it on exit.
2623 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
2624 (longopts, usage, main): Remove undocumented --seed option;
2625 it's now replaced by --random-source.
2626 (rand_state, get_hash): Remove.
2627 (randread_source): New static var.
2628 (random_state, cmp_hashes, compare_random): New functions; they guarantee
2629 no collisions in the random hash function.
2630 (keycompare): Use compare_random for -R; don't fall back on comparing
2631 via memcoll, since compare_random does the right thing.
2632 * tests/misc/Makefile.am (TESTS): Add shuf.
2633 * tests/misc/shuf: New file.
2635 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
2637 * src/copy.c (set_author): Preserve the st_author field via the
2638 file descriptor dest_desc.
2640 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
2642 * NEWS: chmod now preserves setuid and setgid bits on directories
2643 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
2645 Fix test case problems if working directory is setgid,
2646 reported by Bob Proulx.
2647 * tests/cp/fail-perm: Use symbolic mode so that we clear
2648 setgid bit more reliably on directories.
2649 * tests/mkdir/special-1 (set_mode_string): Likewise.
2651 2006-07-27 Jim Meyering <jim@meyering.net>
2653 * src/chgrp.c (usage): Use correct grammar in description of the
2655 * src/chown.c (usage): Likewise.
2657 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
2659 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
2660 Correctly access SRC_SB's element ST_AUTHOR.
2662 2006-07-26 Jim Meyering <jim@meyering.net>
2664 * tests/ls/stat-failed: Adapt to match new expected output.
2667 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
2668 than having the code test for all of the other types first.
2669 Hoist the set-uid/gid-testing code "up" into this new block.
2670 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
2671 C_ORPHAN, not as C_FILE.
2673 2006-07-26 Jim Meyering <jim@meyering.net>
2675 Checking in a change from Paul.
2677 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
2679 * src/ls.c (DT_INIT): Remove. All uses removed.
2680 (enum filetype): Use an ordinary enum rather than trying to keep
2681 the values in sync with DT_FIFO etc. That way, we don't have
2682 to make special assumptions about them. All uses changed.
2683 (whiteout): New constant member of enum filetype.
2684 (filetype_letter): New constant, for use with enum filetype.
2685 (FILETYPE_INDICATORS): New initializer list.
2686 (print_dir): Add case for DT_WHT.
2687 (gobble_file): If stat fails, don't discard information from
2688 readdir; instead, preserve it so it can be printed.
2689 (print_long_format): Fall back on readdir result if stat info
2690 is not available. Use "?" to denote each unknown mode char,
2691 instead of an overall "?", since we now know some of the mode
2693 (print_type_indicator): Now that MODE isn't necessarily
2694 useful, guard all uses.
2695 Now that two blocks in the type-checking tree can set "type = C_FILE",
2696 move the suffix-handling code out and down.
2698 2006-07-26 Jim Meyering <jim@meyering.net>
2700 Prepare for the above change.
2701 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
2702 and adjust uses. From a patch by Paul Eggert.
2704 2006-07-26 Jim Meyering <jim@meyering.net>
2706 * src/ls.c: Correct indentation/formatting in a few places.
2708 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
2710 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
2711 Problem report and fix from Bob Proulx.
2712 * NEWS: Clarify the "chmod 0500" news, and correct the vague
2713 statements about compatibility with BSD.
2715 2006-07-25 Jim Meyering <jim@meyering.net>
2717 * src/ls.c (gobble_file): When handling a stat-failed entry,
2718 print the entry name not the absolute_name -- to be consistent
2719 with the usual case.
2720 * tests/ls/stat-failed: Update accordingly.
2722 * src/ls.c: Add parens around the new uses of ?: ternary operator.
2724 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
2727 Get --dired offsets right when handling stat-failed entries.
2728 * src/ls.c (print_long_format): Be careful to increment P by the
2729 appropriate amount, even when inode_number_width and nlink_width
2731 * tests/ls/stat-failed: Test for the above.
2733 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
2734 have_acl member. That would happen for a directory with both a
2735 non-stat'able entry and one with an ACL.
2737 * src/ls.c (gobble_file): Make it so failure to stat a
2738 non-command-line file provokes an exit status of 1, not 0.
2739 Say "cannot access" rather than "cannot stat".
2740 * tests/ls/stat-failed: New file/test, for the above.
2741 * tests/ls/Makefile.am (TESTS): Add stat-failed.
2742 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
2743 of "cannot access " to diagnostic.
2745 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
2747 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
2748 Replace all occurrences of "type == command_line" with the
2749 equivalent, "command_line_arg".
2751 * src/ls.c: Apply the stat-failed parts of Red Hat's
2752 coreutils-selinux.patch. From Ulrich Drepper.
2753 This makes it so files not mentioned on the command line (e.g.,
2754 names read from a directory that *is* mentioned on the command
2755 line) for which stat fails are still listed. With --color,
2756 such files are colored just like ORPHANs (aka dangling symlinks).
2758 * src/df.c (n_valid_args): Declare global to be static.
2760 2006-07-24 Jim Meyering <jim@meyering.net>
2762 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
2763 system lacks d_type support.
2765 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
2767 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
2769 2006-07-21 Jim Meyering <jim@meyering.net>
2771 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
2772 Reported by Tim Waugh.
2773 Also remove the comment duplicating much of --help output.
2775 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
2776 name so the list remains alphabetized.
2778 Fix another bug: ls --indicator-style=file-type would call
2779 stat for a symlink, even though it wasn't always needed.
2780 In some cases, that unnecessary stat would cause ls to fail.
2781 * src/ls.c (gobble_file): Don't treat symlinks specially (in
2782 requiring a stat syscall). Remove the offending exclusion.
2784 * NEWS: Mention the fix.
2786 * tests/ls/stat-dtype: New file/test, for the above fix.
2787 Also exercises the new df feature, below.
2789 * src/df.c (main): Fail and don't print the headers if no
2790 file system is processed. This makes it easy to test whether
2791 a specified directory is on a file system of a given type or types.
2792 Otherwise, applications would have had to parse df's output.
2793 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
2795 Fix a bug: ls --file-type worked like --indicator-style=slash,
2796 rather than like --indicator-style=file-type.
2797 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
2798 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
2800 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
2801 * NEWS: Mention the fix.
2802 * tests/ls-2/tests (file-type): New test, for the above fix.
2804 2006-07-19 Jim Meyering <jim@meyering.net>
2806 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
2808 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
2810 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
2812 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
2813 of directories alone unless you specify them explicitly.
2814 install and mkdir now implement X correctly.
2815 install now creates parent directories with mode 755, without
2816 changing their owner or group.
2817 * src/chmod.c (process_file): Adjust to mode_adjust API change.
2818 * src/install.c: Include mkancesdirs.h.
2819 (announce_mkdir, make_ancestor): New functions.
2820 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
2822 (dir_mode, dir_mode_bits): New vars.
2823 (main): Set dir modes separately from nondir, so that the X
2824 op of -m works correctly.
2825 (main): Remove cwd_errno cruft, since make_dir_parents no longer
2826 affects cwd. Adjust to new make_dir_parents API.
2827 (install_file_in_file_parents): 2nd arg is now char *, not char
2828 const *. Use mkancesdirs instead of rolling our own code.
2829 (change_attributes): Don't worry about AFS, since that kludge
2830 should not be needed any more.
2831 * src/mkdir.c (struct mkdir_options): New struct.
2832 (announce_mkdir, make_ancestor): New functions.
2833 (main): Use them. Adjust to mode_adjust API change. Stick with
2834 umask 0. Use make_dir_parents for all the work.
2835 * src/mkfifo.c (main): Adjust to new mode_adjust API.
2836 * src/mknod.c (main): Likewise.
2837 * tests/chmod/setgid: Do the setgid test instead of bailing.
2838 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
2839 GNU chmod now behaves like other versions of chmod.
2840 * tests/mkdir/perm: Add a test for the X bug.
2842 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
2844 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
2845 This doesn't fix any bugs, since OUT always equals stdout, but it
2846 makes the code easier to understand.
2848 2006-07-14 Jim Meyering <jim@meyering.net>
2850 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
2851 rather than open-coding it. Now supports mercurial, too.
2852 * .hgignore: New file.
2853 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
2854 all generated files, including ones like configure and po/*.po
2855 that are currently version-controlled in cvs.
2857 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
2858 They've been in CVS, just haven't been distributed before this.
2859 Distribute ChangeLog-2005, too.
2860 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
2862 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
2864 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
2867 2006-07-09 Jim Meyering <jim@meyering.net>
2869 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
2870 That happens with Linux/tmpfs.
2871 * tests/mv/Makefile.am (TESTS): Add dir2dir.
2873 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
2875 Adjust to recent updates from gnulib.
2876 * src/dd.c (apply_translations): Use toupper rather than
2877 islower followed by toupper; it's simpler and typically
2878 faster now that we assume at least C89 semantics. Similarly
2880 * src/sort.c (inittables): Likewise.
2881 * src/expand.c (expand): Don't assume that isprint etc. return
2882 booleans (needed for pre-C99 hosts).
2883 * src/fmt.c (check_punctuation): Likewise.
2884 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
2885 * src/tr.c (is_char_class_member): Likewise.
2886 * src/unexpand.c (unexpand): Likewise.
2887 * src/join.c (is_blank): Remove; no longer needed. All uses
2888 replaced by isblank (to_uchar (...)).
2889 * src/pinky.c (create_fullname): Don't assume char is unsigned.
2890 * src/printf.c (print_esc): Likewise.
2891 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
2892 (copy_unescaped_string): Likewise.
2893 * src/stat.c (print_it): Likewise.
2894 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
2895 convenience on GNU systems. All uses changed. Don't bother
2896 looking for any dirent.h substitute other than ndir.h.
2897 (D_INO): Remove unnecessary parentheses.
2898 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
2899 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
2900 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
2901 to ctype.h equivalents.
2902 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
2905 2006-07-08 Jim Meyering <jim@meyering.net>
2907 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
2909 * Makefile.maint (sc_the_the): New rule.
2911 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
2912 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
2915 2006-07-07 Jim Meyering <jim@meyering.net>
2917 * NEWS: Mention that mv can now remove an empty destination directory,
2918 and give an example. Prompted by a report from Florent Bayle.
2920 2006-07-05 Jim Meyering <jim@meyering.net>
2922 * src/ls.c (usage): Correct the description of -G: it is useful
2923 only in a long listing. Reported by Martin Pool in
2924 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
2926 * man/chmod.x: Correct the description of the sticky bit. Reported
2927 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
2929 * src/copy.c (copy_internal): Don't work around old NFS clients like
2930 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
2931 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
2932 a banal failure as a recursive move-into-self failure.
2933 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
2935 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
2937 2006-07-03 Jim Meyering <jim@meyering.net>
2939 Plug another unusual leak.
2940 (AD_mark_helper): Free malloc'd filename if hash_insert says
2941 that string is already in the hash table.
2943 The dev/inode of the topmost directory in each hierarchy were not
2945 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
2946 (AD_push): Call it from here instead.
2948 Fix two small leaks.
2949 * src/remove.c (AD_stack_clear): New function.
2951 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
2953 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
2954 Add $VG_PATH_PREFIX as a prefix to $PATH
2956 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
2957 * tests/Makefile.am (evar-check): Remove rule.
2958 (EXTRA_DIST): Remove .env-warn.
2959 * tests/.env-warn: Remove file. No longer used.
2960 Suggestion from Eric Blake.
2962 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
2964 * src/system.h: Include <stdint.h> unconditionally, since we
2965 now assume the stdint module.
2967 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
2969 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
2970 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
2971 * src/tail.c (main): Implement this.
2972 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
2973 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
2975 2006-07-01 Jim Meyering <jim@meyering.net>
2977 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
2979 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
2982 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
2984 * NEWS: seq now uses long double internally rather than double.
2985 It now defaults to a minimal fixed point format if possible.
2986 It lets you use %a, %A, %E, %F, %G.
2987 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
2988 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
2989 (isfinite) [!defined isfinite]: New macro.
2990 (separator, terminator): Now points to const.
2991 (first, step, last): Remove.
2992 (usage): Update to match new behavior.
2993 (struct operand, operand): New type.
2994 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
2996 Compute and return a value of type operand, not double.
2997 (long_double_format): Renamed from valid_format, and now returns a
2998 new format with an "L" added if needed, if the original format was
2999 valid. Allow %a, %A, %E, %F, and %G formats.
3000 (print_numbers): Take numeric values as args rather than from globals.
3001 Print long double, not double.
3002 (get_width_format): Remove.
3003 (get_default_format): New function.
3004 (main): Implement new way of calculating default format.
3005 Don't worry about locale's representation of the decimal point, since
3006 the arguments are always processed in the C locale.
3007 * tests/seq/basic (neg-2): Adjust to new default format.
3008 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
3009 implementation should do the right thing.
3011 2006-06-30 Jim Meyering <jim@meyering.net>
3013 * tests/stty/basic-1: Work around an intermittent test failure
3014 on HP-UX 11.11. Report and analysis from Bob Proulx.
3015 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
3017 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
3019 * NEWS: Support obsolete usages like "sort +1 -2" even when
3020 conforming to POSIX 1003.1-2001, since this is a pure extension to
3021 POSIX. Problem reported by Christian in:
3022 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
3023 * src/sort.c (main): Implement this.
3025 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
3026 Autoconf 2.60 says this stuff was obsolete.
3028 2006-06-28 Jim Meyering <jim@meyering.net>
3030 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
3032 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
3034 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
3035 (set -x when VERBOSE=yes) when stderr is redirected before stdout
3036 causing shell tracing of the stdout redirection to be written to
3037 the stderr file. Avoid problem and test failure on HP-UX by
3038 redirecting stderr last.
3039 * tests/dd/unblock-sync: Order shell file redirections for
3040 stderr and stdout in the common style.
3041 tests/acl: Likewise.
3043 2006-06-27 Jim Meyering <jim@meyering.net>
3045 * tests/misc/cat-proc: Try to avoid any spurious numeric
3046 differences in frequently-changing /proc/cpuinfo.
3047 Reported by Nelson Beebe.
3049 2006-06-26 Jim Meyering <jim@meyering.net>
3051 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
3052 fd_to_subdirp failure, not just when errno == EACCES.
3053 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
3054 rmdir, here, even though rmdir may happen to be adequate.
3056 * NEWS: rm no longer fails to remove an empty, unreadable directory
3057 * src/remove.c (remove_cwd_entries): If we can't open a directory,
3058 and the failure is not being ignored, try to remove the directory
3059 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
3060 Problem report and test case from Paul Eggert in
3061 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
3063 * tests/rm/empty-inacc: New test, for the above.
3065 Avoid a segfault for wc --files0=- < /dev/null.
3066 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
3068 2006-06-25 Jim Meyering <jim@meyering.net>
3070 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
3071 contains a list of NUL-separated file names.
3073 * src/wc.c: Include "readtokens.h".
3074 (usage): Describe the new option, and adjust the `Usage':
3075 with this option, no FILE may be specified on the command line.
3076 (main): Handle the new option.
3077 * tests/misc/wc-files0: New tests, for the above.
3078 * tests/misc/wc-files0-from: Likewise.
3079 * tests/misc/Makefile.am (TESTS): Add wc-files0.
3081 2006-06-24 Jim Meyering <jim@meyering.net>
3083 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
3085 2006-06-22 Jim Meyering <jim@meyering.net>
3087 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
3088 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
3090 2006-06-19 Jim Meyering <jim@meyering.net>
3092 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
3093 so this check is not run as part of "make distcheck".
3095 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
3097 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
3099 2006-06-18 Jim Meyering <jim@meyering.net>
3101 * tests/misc/pwd-long: Make error output a little clearer.
3103 2006-06-17 Jim Meyering <jim@meyering.net>
3105 * tests/rm/inaccessible: Skip this test on systems without openat
3106 support. Reported by Bob Proulx.
3108 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
3110 * tests/misc/mknod: Improve permission checks to handle
3111 running mkdir test in set-gid directories.
3113 2006-06-14 Jim Meyering <jim@meyering.net>
3115 * tests/du/basic: Revamp not to hard-code file system block sizes.
3117 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3119 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
3122 2006-06-11 Jim Meyering <jim@meyering.net>
3124 * .gitignore: New file.
3125 * Makefile.am (EXTRA_DIST): Add .gitignore.
3127 Setting TIME_STYLE=long-iso in the environment would make the
3128 cp/same-file test fail.
3129 * tests/envvar-check (vars): Add TIME_STYLE to the list.
3130 * tests/cp/same-file: Revert last change.
3131 Source the envvar-check script, to ensure that TIME_STYLE
3132 settings don't affect these tests.
3134 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
3136 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
3137 uses POSIX time stamp formats. Problem reported by John Nixon in
3138 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
3140 2006-06-10 Jim Meyering <jim@meyering.net>
3142 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
3144 Require a "Version N.M" line at the top of the ChangeLog
3145 file only when making the actual release, not when running
3147 * Makefile.maint (maintainer-distcheck): Don't depend on
3149 (alpha beta major): Depend on it here, instead.
3151 2006-06-08 Jim Meyering <jim@meyering.net>
3153 Ensure that cat works with any of the options, -A -v -e -E -T,
3154 when applied to files in /proc and /sys, even when the FIONREAD
3155 ioctl produces nonsensical results. Before this change, cat would
3156 produce no output (or truncated output), for some linux kernels.
3158 * src/cat.c (write_pending): New function, factored out of cat.
3159 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
3160 that there are bytes to read. Some versions of linux-2.6.16 do that.
3161 Write any pending output before returning.
3162 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
3163 * NEWS: Mention this bug fix.
3164 * tests/misc/cat-proc: New file. Test for the above.
3165 * tests/misc/Makefile.am (TESTS): Add cat-proc.
3167 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
3169 * src/expr.c (eval4): Detect overflow properly when multiplying
3172 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
3174 * NEWS: The 'expr' command now detects and reports integer overflow.
3175 (It would be better to use extended precision instead, but that
3176 would be more work.)
3177 * src/expr.c (integer_overflow): New function.
3178 (eval4, eval3): Check for integer overflow.
3180 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
3182 Fix problems when building with Solaris/SVR4/etc. make, which uses a
3183 different and somewhat bogus implementation of VPATH. In the
3184 directory tests/misc, rename tests whose names might appear in the
3185 Automake-generated rules. For example, we can't use a test named
3186 'test', since Automake generates a rule that contains the text
3187 "if test -f ./$$tst; ...", and this might expand to something like
3188 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
3189 which executes the 'test' script rather than the 'test' command.
3190 * tests/misc/false-status: Renamed from tests/misc/false.
3191 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
3192 * tests/misc/sort-merge: Renamed from tests/misc/sort.
3193 ($prog): Set to 'sort' rather than to $PROG.
3194 * tests/misc/test-diag: Renamed from tests/misc/test.
3195 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
3196 in case Solaris make has prepended the directory.
3197 (TESTS): Adjust to above renamings.
3198 * tests/misc/expand: Don't assign to PROG; no longer needed
3199 now that Makefile.am sets PROG to the basename.
3200 * tests/misc/fold: Likewise.
3202 2006-06-03 Jim Meyering <jim@meyering.net>
3204 Make `cp --link --no-dereference' work also on systems where the
3205 link system call cannot create a hard link to a symbolic link.
3206 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
3207 the link syscall on a symlink when it would do the wrong thing.
3208 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
3209 * tests/cp/link-no-deref: New file/test for the above.
3210 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
3211 * NEWS: Mention the change (doesn't affect Linux).
3213 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
3215 Fix some porting problems in the test cases reported by
3216 Ralf Wildenhues for HP-UX 11.23 in:
3217 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
3218 * tests/help-version: Don't assume that \< \> works in sed.
3219 * tests/misc/close-stdout: Don't assume that >&- works.
3220 Add a /dev/full test.
3221 * tests/touch/no-create-missing: Don't assume that >&- works.
3223 2006-05-30 Jim Meyering <jim@meyering.net>
3225 * src/ls.c (usage): Add `v' to the list of sorting-related options.
3228 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3230 * tests/cp/fail-perm: source lang-default.
3231 * tests/rm/inaccessible: Likewise.
3233 2006-05-28 Jim Meyering <jim@meyering.net>
3235 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
3236 Recognize it, too. Reported by Ralf Wildenhues, in
3237 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3239 2006-05-27 Jim Meyering <jim@meyering.net>
3241 * src/chgrp.c: Support new options: --preserve-root and
3242 --no-preserve-root. Somehow this program was skipped when those
3243 options were added to chown, chmod, and rm. Reported by
3244 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
3245 * NEWS: Mention this.
3247 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
3249 * NEWS: Remove mention of --seed. We'll replace it with something
3250 better, and don't want to indicate that it is supported.
3251 * src/sort.c (usage): Likewise.
3253 2006-05-20 Jim Meyering <jim@meyering.net>
3255 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
3257 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
3258 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
3259 FTS_COMFOLLOW. Spotted by Justin Pryzby.
3261 * gnupload: Merge changes from automake, retaining the ""--to...
3262 kludge to placate overzealous `make distcheck' check.
3264 2006-05-19 Jim Meyering <jim@meyering.net>
3266 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
3267 FTS_TIGHT_CYCLE_CHECK directory traversal option.
3268 Reported by Justin Pryzby in http://bugs.debian.org/367691
3270 2006-05-15 Jim Meyering <jim@meyering.net>
3272 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
3273 From Tomas Pospisek.
3275 2006-05-13 Jim Meyering <jim@meyering.net>
3277 * tests/mv/no-target-dir: Test two more cases.
3279 2006-05-11 Jim Meyering <jim@meyering.net>
3281 mv -T DIR EMPTY_DIR no longer fails unconditionally
3282 * src/copy.c (copy_internal): Don't manually prohibit a move where
3283 the destination is an existing directory. Sometimes doing that is
3284 valid. Let the rename system call enforce the rules. That is
3285 allowed only when the source is a directory and the destination
3286 directory (to be replaced) is empty. Reported by Eric Blake.
3287 * tests/mv/no-target-dir: New file/test for this.
3288 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
3289 * NEWS: Mention this.
3291 * tests/mv/atomic: New file/test for yesterday's fix.
3292 * tests/mv/Makefile.am (TESTS): Add atomic.
3294 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
3296 2006-05-10 Jim Meyering <jim@meyering.net>
3298 * src/copy.c (copy_internal): Don't explicitly unlink the destination
3299 when moving a symlink into the place of an existing non-directory.
3300 Reported by Joshua Hudson.
3301 * NEWS: mention this.
3303 2006-05-07 Jim Meyering <jim@meyering.net>
3305 * Makefile.maint (patch-check): Fail if patch generates any output,
3306 even merely for changed offsets.
3308 * src/c99-to-c89.diff: Adjust to reflect new offsets.
3310 * NEWS: Mention changes affecting df, pwd, shred.
3312 2006-05-06 Jim Meyering <jim@meyering.net>
3314 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
3315 system condition where dirent.d_ino != stat.st_ino.
3316 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
3318 2006-05-06 Eric Blake <ebb9@byu.net>
3320 * tests/ls/inode: Expand to test inode from readdir case.
3321 * tests/ls/follow-slink: Expand to test broken links encountered
3322 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
3324 2006-05-06 Eric Blake <ebb9@byu.net>
3326 * tests/mv/leak-fd: Work even on case-insensitive file system.
3328 2006-05-04 Jim Meyering <jim@meyering.net>
3330 * NEWS: Mention the 2006-03-19 pwd-related change that makes
3331 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
3333 2006-05-03 Jim Meyering <jim@meyering.net>
3335 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
3336 Use better macro parameter names: s/basename/key_name/,
3337 s/basefunc/key_cmp_func. Fix typo in comment.
3339 2006-04-29 Eric Blake <ebb9@byu.net>
3341 * src/ls.c (main): On systems with d_type, directories_first only
3342 implies format_needs_type, not format_needs_stat.
3344 2006-05-03 Jim Meyering <jim@meyering.net>
3346 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
3347 after comma in arg list, from Eric Blake.
3349 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
3351 * tests/misc/date (relative-3): New test, derived from a bug
3352 report by John Thomas McDole.
3354 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
3356 New option for ls: --group-directories-first.
3357 It makes ls list directories before files.
3358 * NEWS [New features]: Mention it.
3359 * src/ls.c (sort_type): Rearrange to use as an array index when
3360 choosing sort function; added new sort_numtypes member for
3362 (time_type): Add new time_numtypes member for compile-time check.
3363 (directories_first): New global variable.
3364 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
3365 (long_options): Add --directories-first.
3366 (main): Support new option.
3367 (is_directory): New function.
3368 (extract_dirs_from_files): Use it.
3369 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
3370 (LIST_SORTFUNCTION_VARIANTS): New macros.
3371 (sort_functions): New global variable.
3372 (sort_files): Use it.
3373 (usage): Document new option.
3375 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
3377 * src/shred.c (fillrand): The assertion was way too weak, due to
3378 what must be a typo. Strengthen it to its intended value.
3379 (dopass): Don't use alloca; it's not worth the aggravation here,
3380 since it's used only to get a page-aligned buffer, and page
3381 alignment doesn't buy us much here. I'm suspicious that alloca
3382 causes problems on some hosts, due to a recent bug report by Adam
3383 Waltman: http://bugs.gentoo.org/130246.
3385 2006-04-18 Jim Meyering <jim@meyering.net>
3387 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
3388 sha384sum, sha512sum.
3390 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
3392 * src/chmod.c (describe_change): Adjust to filemode changes.
3393 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
3394 (print_long_format): Use (new) filemodestring rather than
3395 (old) mode_string, so that we get more file types right, at least
3396 in theory. Adjust to filemode changes.
3397 * src/stat.c (human_access): Likewise.
3399 2006-04-18 Jim Meyering <jim@meyering.net>
3401 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
3402 ignore file. This has never been enabled. Reported by Eric Blake.
3404 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
3406 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
3407 bug in Interix. Just call symlink or link directly. All uses changed.
3408 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
3409 * src/stat.c (USE_STATVFS): New macro.
3410 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
3411 (NAMEMAX_FORMAT): define a bit more clearly, now that the
3412 statvfs-using code is a bit more regular.
3413 * src/system.h (sync) [!HAVE_SYNC]: New macro.
3415 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
3417 * NEWS: csplit, nl, expr now conform to POSIX better, and are
3418 more-compatible with traditional Unix, with respect to regular
3420 * src/csplit.c (extract_regexp): Set re_syntax_options to a
3421 value that is compatible with what POSIX requires.
3422 * src/nl.c (build_type_arg): Likewise.
3423 * src/expr.c (docolon): Likewise. Also, don't let anchors match
3424 newline; this fixes an incompatibility with tradition and with POSIX.
3425 Don't warn about leading ^. POSIX says it is unspecified whether
3426 ^ is a special character, which means that implementations can
3427 either treat it as special or not, but either way a warning is not
3428 allowed (unless the regexp is otherwise invalid). Instead, anchor
3429 the expression but treat ^ as an anchor; this is the traditional
3430 behavior (e.g., Solaris 10).
3431 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
3432 and the like as invalid expressions (exit status 2), not as
3433 failure of 'expr' (exit status 3). This is more consistent with
3434 how Solaris behaves.
3435 * tests/expr/basic (fail-a): Adjust exit status to match new expr
3436 behavior, for status 2 versus 3.
3438 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
3439 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
3440 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
3441 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
3442 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
3443 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
3444 (bre61, bre62): New tests.
3445 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
3446 conforming to POSIX.
3449 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
3450 "if !". Do not assume that 'sed' can handle long, newline-free input.
3451 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
3453 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
3455 Adjust to new regex.h API (with new fastmap type), and clean
3456 up the regex storage allocation a bit.
3458 * src/csplit.c (struct control): Put re_compiled member at the
3459 end, since it's large. Change regexpr member from char * to bool;
3460 all uses changed. Add new member fastmap.
3461 (extract_regexp): regexp arg is now char const *, not char *.
3462 Don't bother duplicating the regular expression; it's not needed.
3463 Set fastmap from new fastmap member. Don't bother allocating
3464 a buffer, as the regexp code does a better job than we do.
3465 * src/expr.c (docolon): Allocate and use a fastmap.
3466 Don't bother allocating a buffer.
3467 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
3469 (build_type_arg): New fastmap arg. All uses changed.
3470 Don't bother allocating a buffer, but set a fastmap.
3471 * src/ptx.c (context_regex_string, word_regex_string): Remove.
3472 (context_regex, word_regex): New vars, replacing the above.
3474 (struct regex_data): New type.
3475 (compile_regex): Renamed from alloc_and_compile_regex, since
3476 we no longer allocate storage. Arg is now a struct regex_data *,
3477 not a const char *. All uses changed. Don't allocate the fastmap;
3478 instead, take it from the caller. Don't convert size_t to int,
3479 to avoid arithmetic overflow problems. Don't bother freeing
3480 storage afterwards; it's not worth the aggravation.
3481 * src/tac.c (compiled_separator_fastmap): New ver.
3482 (main): Use it. Don't bother allocating a buffer.
3484 2006-03-30 Jim Meyering <jim@meyering.net>
3486 * src/dd.c (iwrite): Remove assignment without effect.
3487 Reported by Felix Rauch Valenti.
3489 2006-03-22 Eric Blake <ebb9@byu.net>
3491 * src/ptx.c (usage): Remove mention of --copyright/-C.
3492 (main): Alias --copyright to --version plus a deprecation warning.
3493 * NEWS: Mention this.
3495 2006-03-27 Jim Meyering <jim@meyering.net>
3497 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
3498 use of strtod. Tiny patch from Nickolai Zeldovich.
3500 2006-03-11 Eric Blake <ebb9@byu.net>
3502 * tests/misc/dirname: New file.
3503 * tests/basename/Makefile.am: Delete.
3504 * tests/basename/basic: Move to...
3505 * tests/misc/basename: ... this new file. Add some tests,
3506 including fixed behavior for //.
3507 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
3508 * tests/Makefile.am (SUBDIRS): Remove basename.
3509 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
3511 Improvements to dirname/basename handling on platforms like
3512 cygwin with distinct // and with drive letters.
3513 * NEWS: Document new behavior.
3514 * src/basename.c (main): Don't strip suffix from file system
3516 * src/cp.c (target_directory_operand): Use new last_component.
3517 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
3518 traversing the string.
3519 * src/dircolors.c (guess_shell_syntax): Use new last_component.
3520 * src/install.c (target_directory_operand, install_file_in_dir):
3522 * src/ln.c (target_directory_operand, main): Likewise.
3523 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
3524 * src/mv.c (target_directory_operand, movefile): Likewise.
3525 * src/remove.c (rm_1): Likewise.
3526 * src/shred.c (wipename): Likewise.
3527 * src/split.c (next_file_name): Likewise.
3528 * src/su.c (log_su, run_shell): Likewise.
3530 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
3532 * NEWS: nohup diagnostics are now more precise, and nohup now
3533 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
3534 * src/nohup.c (main): Implement this.
3535 * tests/misc/nohup: Test the new behavior.
3537 2006-03-12 Jim Meyering <jim@meyering.net>
3539 * src/copy.c (set_author): Rename function, from preserve_author.
3541 * src/remove.c (AD_pop_and_chdir): Use new macro,
3542 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
3544 * src/system.h (SAME_INODE): Remove definition.
3545 Include "same-inode.h", instead.
3547 2006-03-11 Eric Blake <ebb9@byu.net>
3549 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
3551 2006-03-10 Jim Meyering <jim@meyering.net>
3553 Fix a bug whereby a user with write access to a directory being removed
3554 could cause the removal of that directory to fail with an erroneous
3555 diagnostic about a directory cycle. Reported by Vineet Chadha.
3557 * NEWS: Mention this.
3558 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
3559 leave (and try to rmdir) is the one whose dev_ino is being used to
3560 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
3562 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
3564 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
3565 * src/dd.c (set_fd_flags): Handle file-creation flags on file
3566 descriptors, rather than ignoring them.
3567 * tests/dd/misc: Add test cases for append, nofollow, directory,
3568 and nolinks flags. Simplify redirection to /dev/null in some cases.
3570 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
3571 noatime test never tested anything.
3573 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
3575 * src/dd.c (flags, usage): New flags directory, nolinks.
3576 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
3578 * src/ls.c (usage): Mention that -f disables --color.
3579 Problem reported by Niels Möller.
3581 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
3583 * man/*.x: Add references to syscalls from utilities of the same name.
3585 2006-03-05 Jim Meyering <jim@meyering.net>
3587 * tests/help-version: Set SHELL, if not already set, in order to
3588 avoid failure when `make check' is run through debuild; dircolors
3589 would fail due to lack of $SHELL. Reported by Sven Joachim.
3591 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
3592 * src/base64.c (wrap_write, do_encode, main): Change type of
3593 parameters and locals, wrap_column, form size_t to uintmax_t.
3594 (main): Adjust to use xstrtoumax, accordingly.
3596 2006-03-03 Jim Meyering <jim@meyering.net>
3598 Don't fail when run from an environment with SHELL not a Bourne
3599 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
3600 * tests/dircolors/simple: Invoke each non-failing test with -b.
3601 Reported by Michael Stone.
3603 2006-02-27 Jim Meyering <jim@meyering.net>
3605 * tests/misc/base64: Derive --decode-using tests from the
3608 * tests/misc/base64: Factor out a long constant string.
3609 Split lines to stay within 80 columns.
3611 * tests/misc/Makefile.am (TESTS): Add base64.
3612 * tests/misc/base64: Test base64. From Simon Josefsson.
3614 * src/base64.c (do_decode): Use correct type for parameter,
3615 ignore_garbage: s/size_t/bool/.
3617 * src/base64.c: Don't include .h files already included by system.h:
3618 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
3619 Include "system.h" before the other lib/*.h header files.
3620 Include <sys/types.h> before "system.h".
3621 (wrap_write): Remove declaration of unused local, initial_column.
3622 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
3624 * README: Add base64 to the list.
3626 2006-02-17 Simon Josefsson <jas@extundo.com>
3628 New program: base64.
3629 * AUTHORS: Mention base64.
3631 * man/Makefile.am: Build base64.1.
3632 * man/base64.x: New file.
3633 * src/Makefile.am (bin_PROGRAMS): Add base64.
3634 * src/base64.c: New file.
3636 2006-02-25 Eric Blake <ebb9@byu.net>
3638 In ls, avoid calling stat for --inode (-i), when possible.
3639 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
3640 * src/system.h: ... here, for use in ...
3641 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
3643 (gobble_file): Add inode argument.
3644 (print_dir): Pass inode if available.
3645 (usage): Remove inaccuracy.
3647 2006-02-23 Jim Meyering <jim@meyering.net>
3649 * TODO: Update/correct some obsolete entries.
3651 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
3653 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
3654 * src/join.c (usage): Likewise.
3655 Documentation problem reported by Philip Kensche.
3657 2006-02-20 Eric Blake <ebb9@byu.net>
3659 * man/rm.x: Update documentation to match previous patch.
3661 2006-02-18 Eric Blake <ebb9@byu.net>
3663 New option for rm: --interactive=once (-I).
3664 * NEWS: Document it, along with change to rm --interactive.
3665 * TODO: Remove entry for implementing rm -I
3666 * src/rm.c (INTERACTIVE_OPTION): New enum value.
3667 (interactive_type): New enum.
3668 (long_opts): Let interactive take an optional argument.
3669 (interactive_args, interactive_types): New option arguments.
3670 (usage): Document -I, --interactive=WHEN. Use program_name
3671 instead of a basename.
3672 (main): New -I option, new behavior to --interactive.
3673 * tests/rm/interactive-once: New tests.
3674 * tests/rm/interactive-always: Ditto.
3675 * tests/rm/Makefile.am (TESTS): Run them.
3677 2006-02-18 Jim Meyering <jim@meyering.net>
3679 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
3680 expression match more of the target lines, e.g., those that start with
3681 `-S,' (short option followed by a comma) or that include `=[...]'.
3682 Patch by Nicolas François.
3683 Fix the four offenders thus exposed:
3684 * src/join.c (usage): Use two spaces (not one) to separate the
3685 --first-only option string from its description, so help2man formats
3686 the derived man page properly.
3687 * src/pr.c (usage): Likewise.
3688 * src/uniq.c (usage): Likewise.
3689 * src/install.c (usage): Likewise.
3691 2006-02-15 Jim Meyering <jim@meyering.net>
3693 * Makefile.maint (alpha beta major): For `make major', ensure that the
3694 version string is of the form N.N[.N]*, where N is one or more digits.
3696 2006-02-14 Jim Meyering <jim@meyering.net>
3698 * INSTALL: Update from gnulib.
3700 2006-02-13 Jim Meyering <jim@meyering.net>
3702 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
3704 2006-02-12 Jim Meyering <jim@meyering.net>
3706 * Makefile.maint (patch-check): New target.
3707 (local-checks-available): Add to the list.
3709 2006-02-11 Jim Meyering <jim@meyering.net>
3711 * src/c99-to-c89.diff: New file.
3712 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
3714 * .x-po-check: New file, with exclusions so that `make distcheck'
3716 * Makefile.am (EXTRA_DIST): Add .x-po-check.
3718 rm -r must remove an empty directory, even if it is inaccessible.
3719 * src/remove.c (close_preserve_errno): New function.
3720 (fd_to_subdirp): Don't print a diagnostic in this function.
3721 Do it from the callers instead, unless rmdir succeeds.
3722 (remove_cwd_entries, remove_dir): Adjust callers.
3723 * tests/rm/empty-inacc: New test for the above.
3724 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
3725 * NEWS: Mention this bug fix.
3726 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
3727 a tiny bit less precise: cannot remove `a/1': ... instead of
3728 cannot open directory `a/1': ...
3730 * Makefile.maint (syntax-check-rules): Automatically derive this
3731 list of sc_-prefixed rule names.
3733 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
3735 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
3736 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
3737 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
3738 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
3739 go away? was that an accident?)
3740 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3741 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
3742 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
3743 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
3744 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
3745 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
3746 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
3747 (author_mark_check, makefile_path_separator_check):
3748 Output line numbers, to simplify navigation of Emacs *compilation*
3750 (sc_prohibit_atoi_atof, sc_file_system):
3751 Rework slightly so that Makefile.maint doesn't get reported as a
3752 violation of its own syntax rules.
3753 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
3754 it at run-time (which didn't work with Bison). Fix a makefile typo,
3755 caught by Makefile.maint itself: spaces where a tab should be.
3756 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
3757 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
3758 Ignore djgpp and man subdirectories, to avoid false matches with
3759 Bison and coreutils, respectively. Use sort -u to remove the
3760 resulting duplicates.
3761 * gnupload: Rework slightly to avoid bogus warning from
3762 sc_two_space_separator_in_usage.
3764 2006-02-10 Jim Meyering <jim@meyering.net>
3766 Use gzip's --rsyncable option only if it's available.
3767 * Makefile.maint (gzip_rsyncable): New variable.
3770 2006-02-08 Jim Meyering <jim@meyering.net>
3772 * Makefile.maint (local-checks-available): Define in terms of
3773 the expansion, $(syntax-check-rules), rather than the single,
3774 top-level target `syntax-check', so that it's easier to exclude
3775 individual rules (via $(local-checks-to-skip)).
3776 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
3778 2006-02-07 Jim Meyering <jim@meyering.net>
3780 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
3781 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
3783 * tests/help-version (expected_failure_status_vdir):
3784 Redirect an expected disk-full diagnostic to /dev/null.
3786 2006-02-06 Jim Meyering <jim@meyering.net>
3788 * src/unexpand.c (usage): Use two spaces (not one) to separate the
3789 --first-only option string from its description, so help2man formats
3790 the derived man page properly.
3791 * src/rm.c (usage): Likewise for --no-preserve-root.
3792 * src/chown.c (usage): Likewise.
3793 * src/chgrp.c (usage): Likewise.
3795 Add a rule to ensure that the above doesn't happen again.
3796 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
3797 (syntax-check-rules): Add it.
3798 * .x-sc_two_space_separator_in_usage: New empty file.
3799 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
3801 2006-02-06 Jim Meyering <jim@meyering.net>
3803 * src/cp.c (usage): Use two spaces (not one) to separate each
3804 option string from its description, so help2man formats the
3805 derived man page properly.
3806 * src/mv.c (usage): Likewise.
3807 Patch from Nicolas François in http://bugs.debian.org/351601.
3809 2006-02-04 Jim Meyering <jim@meyering.net>
3811 * src/copy.c (copy_internal): cp -RL would fail when encountering
3812 the same directory more than once in the hierarchy beneath a single
3813 command-line argument. That is legitimate, e.g. when there are
3814 two or more symbolic links, each pointing to some directory that
3815 would not otherwise be copied. Reported by Christophe LYON.
3816 * tests/cp/cp-deref: New file. Test for today's fix.
3817 * tests/cp/Makefile.am (TESTS): Add cp-deref.
3818 * NEWS: Document this.
3820 2006-02-03 Jim Meyering <jim@meyering.net>
3822 * configure.ac: Require automake-1.9.6, not 1.8.3.
3824 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
3826 * src/od.c (usage): Mention that -t a ignores high order bit.
3827 Documentation problem reported by Ed Avis.
3829 2006-02-01 Jim Meyering <jim@meyering.net>
3831 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
3833 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
3835 * src/head.c (main): Use a better diagnostic when someone uses a
3836 trailing numeric option in an invalid way. Problem reported by
3838 * src/tail.c (parse_options): Likewise.
3840 2006-01-30 Jim Meyering <jim@meyering.net>
3842 * man/wc.x: Include `count' keyword in man page synopsis,
3843 per suggestion from http://bugs.debian.org/181585.
3845 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
3847 * src/df.c (show_dev): If the file system claims to have
3848 more available than total blocks, report the number of used
3849 blocks as being total - available (a negative number) rather
3850 than as garbage. Problem reported by Toralf Foerster.
3852 2006-01-24 Jim Meyering <jim@meyering.net>
3854 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
3855 to put a regular file in O_NONBLOCK mode fails with EPERM.
3856 That happens on Linux (up to 2.6.15) when using tail -f on a file with
3857 the append-only attribute. Reported by Dean Gaudet. For details,
3858 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
3859 * NEWS: Mention this fix.
3860 * tests/tail-2/append-only: New file. Test for the above.
3861 * tests/tail-2/Makefile.am (TESTS): Add append-only.
3862 * tests/Makefile.am (check-root): Add tail-2/append-only
3864 2006-01-21 Jim Meyering <jim@meyering.net>
3866 * NEWS: Mention fts-related improvements and bug fixes.
3868 2006-01-19 Jim Meyering <jim@meyering.net>
3870 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
3871 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
3873 2006-01-18 Jim Meyering <jim@meyering.net>
3875 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
3877 2006-01-17 Jim Meyering <jim@meyering.net>
3879 Now that fts no longer changes the current working directory, adjust
3880 its clients accordingly -- note that du.c uses fts but doesn't need
3881 any adjustment, since it doesn't operate on the actual files,
3882 but rather just uses the stat buffers provided by fts.
3884 * src/chown-core.c: Include "openat.h".
3885 Don't include "lchown.h".
3886 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
3887 calling openat, lchownat, chownat, rather than open, lchown, chown.
3889 * src/chmod.c: Include "openat.h".
3890 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
3892 * tests/du/long-from-unreadable: New test, to exercise one small
3895 2006-01-13 Jim Meyering <jim@meyering.net>
3897 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
3898 addition of new directories under tests/.
3900 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
3903 2006-01-12 Jim Meyering <jim@meyering.net>
3905 * tests/du/long-sloop: Adjust not to hard-code the expected
3906 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
3907 from that of GNU libc. Reported by Paul Eggert.
3909 * tests/du/long-sloop: Create file at end of symlink chain.
3911 * tests/misc/test: New file, with a test for one of the
3912 bugs fixed by yesterday's test.c changes.
3913 * tests/misc/Makefile.am (TESTS): Add test.
3915 2006-01-11 Jim Meyering <jim@meyering.net>
3917 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
3918 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
3919 a very long sequence of symbolic links (not necessarily a loop).
3920 * tests/du/Makefile.am (TESTS): Add long-sloop.
3922 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
3924 * src/test.c (test_syntax_error): Append a newline. All callers
3925 changed, except for the ones that didn't already append a newline.
3926 Bug reported by Eric Blake.
3928 2006-01-11 Jim Meyering <jim@meyering.net>
3930 * src/system.h (X2NREALLOC): Now that verify_true is no longer
3931 void, cast its result to void, to avoid gcc's warning that
3932 ``left-hand operand of comma expression has no effect''.
3933 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
3935 2006-01-10 Jim Meyering <jim@meyering.net>
3937 * tests/chmod/no-x: Add a test for today's fts.c fix.
3939 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
3941 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
3942 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
3944 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
3946 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
3947 Use verify_true instead of verify_expr, to sync with gnulib.
3949 2006-01-08 Jim Meyering <jim@meyering.net>
3951 * src/date.c (usage): Adjust the formatting of the entries for
3952 %::z and %:::z (separate with two spaces, not one) so that help2man
3953 formats them properly. Reported by Philip Rowlands.
3955 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
3957 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
3959 2006-01-06 Jim Meyering <jim@meyering.net>
3961 * Makefile.maint (copyright-check): Use date +%Y in place of
3964 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
3965 First off, the attribute should have been `volatile' (not static)
3966 to avoid longjmp-related risk of clobber. Secondly, now there is
3967 no longer any risk of a local variable being clobbered, so there's
3968 no need for any attribute at all.
3970 2006-01-05 Jim Meyering <jim@meyering.net>
3972 * src/remove.c: Give a few functions the inline attribute.
3973 (AD_pop_and_chdir): Use gotos to avoid some duplication.
3974 (AD_push): Rewrite an assertion so that the entire computation
3975 goes away when assertions are turned off.
3977 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
3978 It's already defined in "system.h".
3979 * Makefile.maint: Add a FIXME comment.
3981 2006-01-04 Jim Meyering <jim@meyering.net>
3983 * ChangeLog: Remove entries from 2005-10-22 and earlier.
3984 * ChangeLog-2005: New file, for entries up to version 5.92.
3986 2006-01-03 Jim Meyering <jim@meyering.net>
3988 * tests/du/no-x: Also allow a slightly different diagnostic -- the
3989 one you get when using openat-enabled fts.c and du (coming soon).
3990 * tests/chmod/no-x: Likewise.
3991 * tests/chgrp/no-x: Likewise.
3993 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
3995 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
3997 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
3998 (restricted_chown): Return it, if the file cannot be accessed due
3999 to EPERM, or if no uid or gid are required, or if the file is
4000 neither a directory nor a regular file. Rewrite to avoid gotos.
4001 (change_file_owner): Handle RC_do_ordinary_chown case.
4002 Rewrite to avoid gotos.
4003 * tests/chgrp/basic: Make sure we can change the group of
4006 * src/date.c (usage): Explain %g, %G, and %V a bit better.
4008 2006-01-02 Jim Meyering <jim@meyering.net>
4010 * src/copy.c (set_owner): Correct a comment.
4012 * src/tail.c (parse_options): Change warning to say that --retry
4013 is useful `mainly' (not `only') when following by name.
4014 Reported here: http://bugs.debian.org/273781
4016 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
4018 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
4019 * src/copy.c: Include lchmod.h.
4020 (copy_internal): Use lchmod rather than chmod.
4021 * src/cp.c: Include lchmod.h.
4022 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
4023 * src/mkdir.c: Include lchmod.h.
4024 (usage): Clarify -m's operation.
4025 (main): Use lchmod rather than chmod. Don't use lchmod unless the
4026 new mode contains bits outside the 777 range.
4027 * src/mkfifo.c (usage): Clarify -m's operation.
4028 (main): If -m is given, don't invoke chmod; use umask 0 instead.
4029 Report an error if -m asks for bits outside the 777 range.
4030 * src/mknod.c (usage, main): Likewise.
4032 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
4036 Copyright (C) 2006-2015 Free Software Foundation, Inc.
4038 Copying and distribution of this file, with or without
4039 modification, are permitted provided the copyright notice
4040 and this notice are preserved.