1 2007-02-10 Jim Meyering <meyering@rho.meyering.net>
3 * src/csplit.c (usage): Use two spaces (not one) to separate
4 each option string from its description, so help2man formats
5 the derived man page properly. Reported by Thomas Huriaux in
6 <http://bugs.debian.org/410407>.
7 * src/df.c (usage): Likewise.
8 * src/du.c (usage): Likewise.
9 * src/install.c (usage): Likewise.
10 * src/ls.c (usage): Likewise.
12 2007-02-03 Jim Meyering <jim@meyering.net>
14 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
15 * NEWS: Mention the bug fix.
16 * tests/misc/pwd-unreadable-parent: New file.
17 * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
19 2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
21 * NEWS: Document fix for cp --preserve=mode.
22 * src/copy.c (copy_internal): Omit the group- or other-writeable
23 permissions when creating a directory, to avoid a race condition
24 if the special mode bits aren't right just after the directory is
26 * src/cp.c (make_dir_parents_private): Likewise.
27 * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
30 * NEWS: Document fix for cp --parents.
31 * src/cp.c (make_dir_parents_private): Report the error sooner with
32 "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
33 creating the directory, DEST/DIR.
34 * tests/cp/cp-parents: Test for the non-race-condition bug fixed
37 2007-02-02 Jim Meyering <jim@meyering.net>
39 * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
41 * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
42 consistent, so this can be applied with patch -p0.
43 Reported by Matthew Woehlke.
45 * Makefile.maint (patch-check): Use patch with its -p2 option,
46 since that makes this check slightly more strict.
48 2007-01-29 Jim Meyering <jim@meyering.net>
51 * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
52 determine dev/inode or upon detecting a symlink loop.
54 * src/ls.c: Rename three global variables.
55 (cwd_file): Rename from 'files'.
56 (cwd_n_alloc): Rename from 'nfiles'.
57 (cwd_n_used): Rename from 'files_index'.
59 Shave 8 bytes off the size of "struct fileinfo".
60 * src/ls.c (fileinfo): Put all members of type "bool" together.
62 2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
64 Modify "ls" to sort its data faster, using the new gnulib mpsort
65 module rather than qsort. This is particularly a win in
66 environments where strcoll is slow, since mpsort typically calls
67 strcoll less often than qsort does.
68 * bootstrap.conf (gnulib_modules): Add mpsort.
69 * src/ls.c: Include mpsort.h.
70 (sorted_file, sorted_file_alloc): New vars, for a new vector of
71 pointers to the file info, for speed.
72 (clear_files, extract_dirs_from_files, sort_files, print_current_files):
73 (print_many_per_line, print_horizontal, print_with_commas):
74 (calculate_columns): Set and use new vector.
75 (initialize_ordering_vector): New function.
77 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
79 Adjust to today's change to gnulib, which added a module for
80 string.h to replace the little include files like strcase.h.
81 * src/dircolors.c: Don't include strcase.h.
82 * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
84 2007-01-26 Jim Meyering <jim@meyering.net>
86 * src/dd.c (advance_input_after_read_error): Change diagnostic to
87 say "invalid file offset" rather than "screwy file offset".
89 * .x-sc_cast_of_argument_to_free: Remove this file.
90 * Makefile.am (EXTRA_DIST): Likewise.
92 2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
94 * src/sort.c (create_temp): Remove superfluous access-X_OK
95 check. find_in_path does this for us.
97 2007-01-24 Jim Meyering <jim@meyering.net>
99 Remove usually-skipped test.
100 * tests/cp/open-perm-race: Remove this file. It is subsumed
102 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
103 * tests/sort/Makefile.am: Regenerate.
105 Pass "make distcheck" again.
106 * src/sort.c (usage): Split a diagnostic that had grown to be
107 longer than the C89 maximum of 509 bytes.
108 * .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
109 FIXME: this is just temporary, while we wait to remove the offending
111 * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
112 * Makefile.maint (sc_cast_of_argument_to_free): Use the
113 canonical, $$($(CVS_LIST_EXCEPT)).
114 * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
116 2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
118 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
119 like it will be approved. Also add --check=quiet, --check=silent
120 as long aliases, and --check=diagnose-first as an alias for -c.
121 * doc/coreutils.texi (sort invocation): Document this.
122 Also, mention that sort -c can take at most one file.
123 * src/sort.c: Implement this.
125 (usage): Document the change.
126 (CHECK_OPTION): New constant.
127 (long_options): --check now takes an optional argument, and is now
128 treated differently from 'c'.
129 (check_args, check_types): New constant arrays.
130 (check): New arg CHECKONLY, which suppresses diagnostic if -C.
131 (main): Parse the new options.
132 * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
135 2007-01-24 Jim Meyering <jim@meyering.net>
138 * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
139 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
141 Don't depend on "which".
142 * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
143 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
145 2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
147 Test sort compression.
148 * tests/misc/Makefile.am: Add the test.
149 * tests/misc/sort-compress: New file containing the tests.
151 2007-01-24 Jim Meyering <jim@meyering.net>
153 * NEWS: sort temp file compression: tweak wording.
154 * src/sort.c (struct sortfile) [name]: Declare member to be const.
156 2007-01-21 Jim Meyering <jim@meyering.net>
158 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
159 In pipe_fork callers, use these named constants, not "2" and "8".
160 (proctab, nprocs): Declare to be "static".
161 (pipe_fork) [lint]: Initialize local, pid,
162 to avoid unwarranted may-be-used-uninitialized warning.
163 (create_temp): Use the active voice. Describe parameters, too.
165 2007-01-21 James Youngman <jay@gnu.org>
167 Centralize all the uses of sigprocmask(). Don't restore an invalid
169 * src/sort.c (enter_cs, leave_cs): New functions for protecting
170 code sequences against signal delivery.
171 * (exit_cleanup): Use enter_cs and leave_cs instead of
172 calling sigprocmask directly.
173 (create_temp_file, pipe_fork, zaptemp): Likewise
175 2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
177 Add compression of temp files to sort.
178 * NEWS: Mention this.
179 * bootstrap.conf: Import findprog.
180 * configure.ac: Add AC_FUNC_FORK.
181 * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
183 * src/sort.c (compress_program): New global, holds the name of the
184 external compression program.
185 (struct sortfile): New type used by mergepfs and friends instead
186 of filenames to hold PIDs of compressor processes.
187 (proctab): New global, holds compressor PIDs on which to wait.
188 (enum procstate, struct procnode): New types used by proctab.
189 (proctab_hasher, proctab_comparator): New functions for proctab.
190 (nprocs): New global, number of forked but unreaped children.
191 (reap, reap_some): New function, wait for/cleanup forked processes.
192 (register_proc, update_proc, wait_proc): New functions for adding,
193 modifying and removing proctab entries.
194 (create_temp_file): Change parameter type to pointer to file
195 descriptor, and return type to pointer to struct tempnode.
196 (dup2_or_die): New function used in create_temp and open_temp.
197 (pipe_fork): New function, creates a pipe and child process.
198 (create_temp): Creates a temp file and possibly a compression
199 program to which we filter output.
200 (open_temp): Opens a compressed temp file and creates a
201 decompression process through which to filter the input.
202 (mergefps): Change FILES parameter type to struct sortfile array
203 and update access accordingly. Use open_temp and reap_some.
204 (avoid_trashing_input, merge): Change FILES parameter like
205 mergefps and call create_temp instead of create_temp_file.
206 (sort): Call create_temp instead of create_temp_file.
208 (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
210 2007-01-20 Jim Meyering <jim@meyering.net>
212 * tests/misc/pwd-long: Work properly even when run from the
213 wrong one of two or more bind-mounted sibling directories.
214 Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
216 2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
218 Standardize on list of signals when an app catches signals.
219 * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
220 SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
221 * src/ls.c (main): Likewise (except SIGPIPE was already caught).
222 Note that ls.c is special, as it also catches SIGTSTP.
223 * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
224 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
226 2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
227 and Paul Eggert <eggert@cs.ucla.edu>
229 * src/sort.c (cleanup): Clear temphead at the end.
230 (exit_cleanup): New function.
231 (main): Don't invoke atexit until we're ready.
232 Invoke it with exit_cleanup, not with cleanup and close_stdout,
233 to avoid a race condition with cleanup and signal handling. More
234 details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
236 2007-01-18 Jim Meyering <jim@meyering.net>
238 * src/c99-to-c89.diff: Adjust remove.c offsets.
240 2007-01-17 Jim Meyering <jim@meyering.net>
242 Make "rm --interactive=never ..." never prompt.
243 * NEWS: Mention this.
244 * src/remove.h (enum rm_interactive): New ternary type.
245 (struct rm_options) [interactive]: Use it, here -- rather than bool.
246 * src/remove.c (prompt): Reflect type change.
247 * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
248 * src/rm.c (main): Add a FIXME comment for '-d' option.
249 Adapt to type change of rm_options.interactive.
251 * tests/rm/i-never: New file. Test for the above fix.
252 * tests/rm/Makefile.am (TESTS): Add i-never.
254 2007-01-15 Jim Meyering <jim@meyering.net>
256 * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
257 emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
258 but that's ok, since fts_.h will eventually be renamed.
260 * src/remove.c (remove_dir): Don't use errno in diagnostic.
261 Root-only test failure reported by Alex van Hout and Jon Grosshart in
262 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
264 * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
265 s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
267 2007-01-14 Bruno Haible <bruno@clisp.org>
269 Enable use of gnulib's new fchdir module.
270 * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
271 since we use canonicalize.
272 (gnulib_modules): Add fchdir.
273 * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
275 2007-01-13 Jim Meyering <jim@meyering.net>
277 * Transform all Makefile.am files so that when running "make check",
278 CU_TEST_NAME is set to the name of the test. This is so that when I
279 run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
280 on the entire package it is more convenient to map a leak or error
281 found in a valgrind log file back to the offending test.
283 (echo tests/Makefile.am.in; find tests -name Makefile.am) \
284 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
285 -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
287 2007-01-11 Jim Meyering <jim@meyering.net>
289 Avoid a leak in expr's implementation of the ":" (match) operator.
290 * src/expr.c (docolon): Free the regexp buffer using regfree, rather
291 than doing it manually, being careful to set fastmap to NULL first.
292 Free any re_regs.start and .end members, if necessary.
294 * tests/misc/test-diag: Work also when libc's error function
295 reports the entire program name ("../../src/test"), rather than
296 just the final component.
298 2007-01-10 Jim Meyering <jim@meyering.net>
300 Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
301 * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
302 (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
303 directory. Non-directory entries lack fts_statp data when using
304 the FTS_NOSTAT option.
306 2007-01-07 Jim Meyering <jim@meyering.net>
308 * tests/sample-test: Update copyright date to 2007.
309 * Makefile.maint (copyright-check): Also check the copyright date
310 in tests/sample-test.
312 2007-01-06 Jim Meyering <jim@meyering.net>
314 * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
315 based on examples from G.P. Halkes in
316 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
318 2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
320 * src/fmt.c (copy_rest): Correct prefix handling.
321 Don't elide a line with the prefix followed by only white space.
322 (get_line): Move EOF-check to loop-termination condition.
323 * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
324 (pfx-2): Remove test; its premise was contrary to the documentation.
326 2007-01-05 Jim Meyering <jim@meyering.net>
328 Avoid a used-uninitialized bug for invalid input, i.e., when the size
329 of the input, not counting newlines, is 1 % 4.
330 * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
331 It may be smaller when flushing.
333 2007-01-05 Mike Frysinger <vapier@gentoo.org>
335 * src/dircolors.hin: Add a TERM directive for cons25.
337 2007-01-04 Jim Meyering <jim@meyering.net>
339 * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
340 case you don't have convenient access to glibc info documentation.
342 Use the release year, not the current year.
343 * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
344 * src/Makefile.am (RELEASE_YEAR): Define it.
346 Thanks to a prod from Eric Blake.
348 Ensure that "group --version" always prints the current year.
349 * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
350 * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
351 Suggestion from Eric Blake.
353 When decoding, always allow newlines in input, with almost no
355 * src/base64.c (do_decode): Initialize decode context.
356 Call base64_decode one more time, after all input is processed.
357 (usage): When decoding, newlines are always accepted.
359 * tests/misc/base64: Add a bunch of tests, for the above.
360 * gl/lib/base64.c: Include <string.h>.
361 (base64_decode_ctx_init, get_4, decode_4): New functions.
362 (base64_decode): Efficiently handle interspersed newlines.
363 (base64_decode_alloc): Update signature.
364 * gl/lib/base64.h (struct base64_decode_context): Define.
365 (base64_decode_ctx_init): Add prototype.
366 (base64_decode, base64_decode_alloc): Update prototypes.
368 * gl/lib/base64.c: Copied from gnulib.
369 * gl/lib/base64.h: Likewise.
371 2007-01-03 Jim Meyering <jim@meyering.net>
373 * THANKS: Add Evan Hunt.
375 2007-01-03 Bruno Haible <bruno@clisp.org>
377 Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
378 * tests/chown/deref: Apply lang-default.
379 * tests/misc/split-a: Likewise.
380 * tests/mv/reply-no: Likewise.
382 * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
385 2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
387 Now, "ls -FRL" always follows symbolic links on Linux.
388 * NEWS: Mention this bug fix.
389 * src/ls.c (gobble_file): Fix bug reported by
390 Nobuyuki Tsuchimura in
391 http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
392 where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
393 * tests/ls/follow-slink: Add a test for this case.
395 2007-01-01 Jim Meyering <jim@meyering.net>
397 * tests/rm/fail-eperm: Revert last change. The PATH=... setting
398 is not honored at least on HP-UX 11.23 systems.
399 Instead, simply transform the actual output diagnostic.
400 Test failure reported by Bob Proulx.
402 2006-12-30 Jim Meyering <jim@meyering.net>
404 * bootstrap (gnulib_extra_files): Remove announce-gen.
405 * bootstrap.conf (gnulib_modules): Add it here instead, now that
408 * tests/misc/base64: Factor a long, repetitive string.
410 * src/c99-to-c89.diff: Adjust remove.c offsets.
412 Clean up after the change of 2006-12-28.
413 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
414 now that this function never modifies the pointer. Adjust comments
415 and code accordingly.
416 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
417 now that AD_pop_and_chdir no longer does that.
419 * tests/rm/fail-eperm: Avoid spurious differences (the error function
420 from latest glibc no longer prints the full program_name): so don't
421 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
423 * tests/mv/acl (skip): Skip this test also if the destination
424 directory, which is on a different file system, lacks ACL support.
426 * src/copy.c (copy_reg): Rewrite a comment that was rendered
427 inaccurate by the 2006-10-18 change.
429 2006-12-28 Jim Meyering <jim@meyering.net>
431 When moving "up" the hierarchy, be careful to remove a just-emptied
432 directory before opening ".", to avoid trouble with file system
433 implementations that cache readdir results at opendir-time.
434 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
435 Don't update **DIRP. Don't call fdopendir here.
436 (remove_dir): Call fdopendir here instead.
437 Report and patch from Mikulas Patocka:
438 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
440 2006-12-27 Jim Meyering <jim@meyering.net>
442 * src/tail.c (usage): Mention +N for --bytes and --lines.
443 Suggestion from Evan Hunt.
445 2006-12-26 Jim Meyering <jim@meyering.net>
447 * configure.ac: Require autoconf-2.61 and automake-1.10.
448 Without the former (even with autoconf-2.60), "make distcheck"
449 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
450 due to an inttypes.h generated with CFLAGS including -pedantic.
451 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
453 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
454 tag, using the release version number as the message.
455 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
457 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
459 * NEWS: dd bs= operands now silently override later ibs= and obs=,
461 * src/dd.c (scanargs): Implement it.
462 * tests/dd/misc (outbytes): Test it.
463 * doc/coreutils.texi (dd invocation): Specify that bs=N
464 overrides later ibs and obs, undoing part of the
465 previous change. (The behavior was wrong.)
467 2006-12-20 Jim Meyering <jim@meyering.net>
469 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
470 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
471 Don't let a non-directory get by with errno == EPERM, either.
472 Check the file type directly (using cached stat value), rather
473 than trying to guess it from errno values.
474 Karl Berry reported that a cross-partition "mv /etc/issue ~"
475 failed with the um,... suboptimal diagnostic,
476 "mv: cannot remove `/etc/issue': Not a directory".
477 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
478 * tests/rm/fail-eacces: New file.
479 * NEWS: Mention that both mv and rm are affected.
481 "cut -f 2- A B" no longer triggers a double-free bug
482 * src/cut.c (cut_fields): Set file-scoped global to NULL after
483 freeing it. This avoids a double-free (and core dump on some systems)
484 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
485 James Hunt in <http://bugzilla.redhat.com/220312>.
486 * NEWS: List this bug fix.
487 * THANKS: Mention him.
488 * tests/misc/cut: New file.
489 * tests/misc/Makefile.am (TESTS): Add cut.
491 2006-12-15 Jim Meyering <jim@meyering.net>
493 * tests/cp/open-perm-race: Correct the gdb-existence check.
494 Don't run either subsequent gdb command in a sub-shell.
495 Reported by Thomas Schwinge.
496 * THANKS: bring up to date.
498 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
500 Make sure cp -p isn't too generous with file permissions.
501 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
502 * tests/cp/file-perm-race: New file.
504 Ensure cp -pR --parents isn't too generous with parent permissions.
505 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
506 * tests/cp/parent-perm-race: New file.
508 2006-12-14 Jim Meyering <jim@meyering.net>
510 * tests/chgrp/default-no-deref: Don't assume that files are created
511 with the primary group by default. That's not true in a directory
512 with the set-GID bit set.
514 Don't hang when there's no input tty.
515 * tests/cp/open-perm-race: Skip this test if there is no
516 controlling input `terminal'.
518 Test for a hard-to-detect race fix, using gdb.
519 * tests/cp/open-perm-race: New file, to test for the
520 cp --preserve=ownership fix of 2006-12-06.
522 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
523 (TESTS): Add open-perm-race.
525 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
526 * src/chown.c (main): Likewise.
527 * src/chown-core.c (change_file_owner): Add to a comment.
528 * tests/chown/preserve-root: Add tests.
530 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
531 * src/chmod.c (process_file): Do honor the --preserve-root option.
532 * src/chown-core.c (change_file_owner): Likewise, but here, also
533 handle the case in which a traversal would go "through" a symlink
534 to root. Reported by Matthew M. Boedicker
535 * tests/chown/preserve-root: Test for the above.
536 * tests/chown/Makefile.am (TESTS): Add preserve-root.
538 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
539 to gnulib's m4/openat.m4.
541 2006-12-13 Andreas Schwab <schwab@suse.de>
543 Don't fail if mv/acl test succeeds.
544 * tests/mv/acl (skip): Check for acl support in the file system.
545 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
546 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
548 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
550 Remove some arbitrary restrictions on size fields, so that
551 commands like "sort -k 18446744073709551616" no longer fail merely
552 because 18446744073709551616 doesn't fit in uintmax_t. The trick
553 is that these fields can all be treated as effectively infinity;
554 their exact values don't matter, since no internal buffer can be
556 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
557 ULONG_MAX if the code assumes this. Silently truncate too-large
558 values to SIZE_MAX, as the remaining code will do the right thing
560 * src/sort.c (parse_field_count): Likewise.
561 * src/uniq.c (size_opt, main): Likewise.
562 * tests/join/Test.pm (bigfield): New test.
563 * tests/sort/Test.pm (bigfield): New test.
564 * tests/uniq/Test.pm (121): New test.
566 2006-12-13 Jim Meyering <jim@meyering.net>
568 * tests/chgrp/default-no-deref: New test.
569 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
571 2006-12-12 Jim Meyering <jim@meyering.net>
573 * src/system.h (SETVBUF): Remove definition, now that the
574 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
575 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
576 * src/od.c (open_next_file): Likewise.
578 2006-12-09 Jim Meyering <jim@meyering.net>
580 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
581 "source". I.e. "GNU coreutils 6.7".
583 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
584 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
585 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
587 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
588 whenever uniq is expected to fail. This should catch the other case
589 [test #112] in which uniq emits "cat: write error: Broken pipe" on
592 2006-12-08 Jim Meyering <jim@meyering.net>
594 Include bootstrap tool version info in the announcement form.
595 * Makefile.maint (gnulib_snapshot_date): Define.
596 (announcement): Use two new announce-gen options,
597 --bootstrap-tools and --gnulib-snapshot-date.
598 * Makefile.cfg (gnulib_dir): Set.
600 Post-release version change.
601 * NEWS: Add a line for 6.8-dirty.
602 * configure.ac (AC_INIT): Set new version string.
604 2006-12-07 Jim Meyering jim@meyering.net
607 * NEWS: Record release date. Remove '-pre' suffix.
608 * configure.ac (AC_INIT): Remove version string suffix.
610 2006-12-07 Jim Meyering <jim@meyering.net>
612 Make the output of "make check" more reproducible.
613 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
614 evoke diagnostics like this when COLUMNS=0 in the environment:
615 ls: ignoring invalid width in environment variable COLUMNS: 0
616 * tests/touch/no-rights: Likewise.
617 * tests/help-version: Likewise.
618 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
619 118, since it emits "cat: write error: Broken pipe" on some systems.
621 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
623 * NEWS: Document the cp -p fix for special bits.
624 * src/copy.c (set_owner): Now returns a three-way result, so
625 that the caller can clear the special bits. All callers changed.
626 (copy_reg): Don't set the special bits if chown failed.
627 (copy_internal): Likewise.
628 * tests/cp/special-bits: Test this fix.
630 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
632 * NEWS: Document the cp --preserve=ownership fix.
633 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
634 * src/copy.c (fchmod_or_lchmod): New function.
635 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
636 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
637 When creating a file, use O_EXCL, so we're more likely to detect
638 funny business by other processes. At the end, if permissions
639 were omitted, chmod them back in.
640 (copy_internal): If the ownership might change, omit some permissions
641 at first, then restore them after chowning the file.
642 * src/cp.c (make_dir_parents_private): Likewise.
643 * src/copy.c (cached_umask): New function.
644 * src/copy.h (cached_umask): New decl.
646 2006-12-06 Jim Meyering <jim@meyering.net>
648 Make the output of "make check" more reproducible.
649 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
651 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
653 * src/install.c (install_file_in_file): Preserve time stamps
654 before changing owner or file mode bits, for consistency with
655 other coreutils programs.
657 2006-12-03 Jim Meyering <jim@meyering.net>
659 * tests/misc/date-sec: Output a fixed string.
661 * NEWS: du --one-file-system (-x) would skip subdirectories of any
662 directory listed as second or subsequent command line argument.
663 * tests/du/one-file-system: New file. Test for today's fts.c fix.
664 * tests/du/Makefile.am (TESTS): Add one-file-system.
665 Reported by Mike Frysinger.
667 2006-12-02 Jim Meyering <jim@meyering.net>
669 * tests/du/basic: Generate 4KB file simply using printf, rather than
670 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
672 2006-11-28 Jim Meyering <jim@meyering.net>
674 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
675 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
676 Reported by Matthew Woehlke.
678 * tests/mv/dir2dir: Also accept EBUSY.
679 Reported by Matthew Woehlke.
681 2006-11-27 Jim Meyering <jim@meyering.net>
683 * Makefile.maint (patch-check): Rewrite to diagnose failure.
684 * src/c99-to-c89.diff: Adjust shred.c offsets.
686 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
688 Improve the check for departures from C89, and fix the departures
690 * Makefile.maint (my-distcheck): Also check for C89 compatibility
691 as best we can with GCC.
692 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
693 declaration; C89 doesn't allow this.
694 * src/dcgen: Don't generate string literals longer than
695 what C89 requires support for.
696 * src/cut.c (usage): Don't use string literals longer than
697 what C89 requires support for.
698 * src/date.c (usage): Likewise.
699 * src/dd.c (usage): Likewise.
700 * src/du.c (usage): Likewise.
701 * src/ls.c (usage): Likewise.
702 * src/od.c (usage): Likewise.
703 * src/readlink.c (usage): Likewise.
704 * src/seq.c (usage): Likewise.
705 * src/shred.c (usage): Likewise.
707 2006-11-26 Mike Frysinger <vapier@gentoo.org>
709 Recognize new archive, audio and image formats.
710 Give audio files a separate color.
711 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
712 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
713 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
714 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
715 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
716 audio color to 00;36 to differentiate from image/video color.
718 2006-11-26 Jim Meyering <jim@meyering.net>
720 * Makefile.maint (patch-check): Compile patched sources with
721 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
722 no violations remain.
724 * src/c99-to-c89.diff: Remove 3 bogus hunks.
726 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
729 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
731 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
733 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
735 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
736 while trying to retain the readability of C99 as much as possible.
737 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
738 Replace each of two uses with literal AT_FDCWD.
739 (cache_stat_init): Return its argument, for convenience.
740 Update the caller in remove_dir.
741 (AD_pop_and_chdir): Return prev_dir rather than storing through
742 a pointer argument. All uses changed.
743 (AD_ensure_initialized): New function.
744 (AD_mark_helper): Use it, to avoid the need for declaration
746 (rm): Move cycle_check_init call into callee...
748 Use an else clause in place of a "continue" statement.
749 (close_preserve_errno): Remove.
750 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
752 2006-11-25 Jim Meyering <jim@meyering.net>
754 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
756 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
758 * tests/du/inacc-dest: Skip this test when running as root.
760 2006-11-23 Jim Meyering <jim@meyering.net>
762 * announce-gen: Remove file. It's moving to gnulib.
763 * bootstrap: Pull it from gnulib/build-aux instead.
764 * Makefile.maint (announcement): Reflect move to ./build-aux.
766 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
767 rather than a pipeline that would sometimes evoke a diagnostic
768 like "seq: write error: Broken pipe".
770 * tests/help-version: Suppress dd transfer rate output.
772 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
774 2006-11-22 Jim Meyering <jim@meyering.net>
776 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
777 change "(:?..." to "(?:..." in regexps.
779 Post-release version change.
780 * NEWS: Add a line for 6.7-pre.
781 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
784 * NEWS: Record release date. Remove "-pre" suffix.
785 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
787 * announce-gen: Remove unused --release-archive-directory option.
788 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
790 Match version numbers in NEWS using tighter regular expressions.
791 (main): Require the --gpg-key-id=ID option.
792 * Makefile.maint (announcement): Don't use now-removed
793 --release-archive-directory=... option.
795 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
797 2006-11-21 Jim Meyering <jim@meyering.net>
799 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
800 skip the test rather than failing. Reported by Michael Deutschmann.
802 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
803 rather than just "exit N".
805 Arrange for "make check-root" to run the new root-only test.
806 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
809 2006-11-20 Jim Meyering <jim@meyering.net>
811 Add a root-only test for today's lib/idcache.c fix.
812 * tests/ls/nameless-uid: New file.
813 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
814 (TESTS_ENVIRONMENT): Add PERL to the list.
816 2006-11-19 Jim Meyering <jim@meyering.net>
818 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
819 find the 7-second sleep annoyingly long. Besides, this test is
820 probably far too specific and timing sensitive ever to trigger again.
821 * tests/tail-2/assert: Likewise.
823 Post-release version change.
824 * NEWS: Add a line for 6.6-pre.
825 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
828 * NEWS: Record release date. Remove "-cvs" suffix.
829 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
831 2006-11-18 Jim Meyering <jim@meyering.net>
833 "ln --backup f f" produces a misleading diagnostic:
834 ln: creating hard link `f' => `f': No such file or directory
835 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
836 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
837 * tests/ln/Makefile.am (TESTS): Add hard-backup.
838 * tests/ln/hard-backup: New test for the above.
839 * NEWS: Mention this fix.
841 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
843 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
845 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
846 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
847 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
848 Omit unnecessary parenthesization of args.
849 * src/od.c (EQUAL_BLOCKS): Likewise.
850 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
852 2006-11-16 Jim Meyering <jim@meyering.net>
854 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
855 automake we're skipping this test), and give a diagnostic to tell
856 the user the same thing. Reported by Mike Grayson.
858 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
860 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
861 with `$(MAN)', computed at configure time; also, list them ...
862 (optional_mans): ... in this new variable.
863 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
865 2006-11-16 Jim Meyering <jim@meyering.net>
867 Help valgrind see that there is no leak in dd.c.
868 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
869 so we need not free them at all. This is easier than freeing
870 both buffers at each of the early "return"s.
872 * src/csplit.c (load_buffer): Plug an inconsequential leak.
874 2006-11-15 Jim Meyering <jim@meyering.net>
876 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
877 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
879 2006-11-14 Jim Meyering <jim@meyering.net>
881 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
882 remove the now-unnecessary use of AC_LIBSOURCES.
884 Adapt to new version of gnulib-tool.
885 * gl/modules/root-dev-ino: New file.
886 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
887 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
888 * m4/root-dev-ino.m4: Move this file ...
889 * gl/m4/root-dev-ino.m4: ... to here.
891 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
893 2006-11-13 Jim Meyering <jim@meyering.net>
895 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
898 Plug another technically-unimportant leak in sort.
899 * src/sort.c (main): Don't allocate memory for each new key here.
900 (insertkey): Allocate memory for each key here, instead.
901 (key_init): Rename from new_key. Don't allocate.
903 * src/sort.c (main): Plug a tiny memory leak.
904 Move declaration of local "minus" down to be nearer point of use.
906 2006-11-12 Jim Meyering <jim@meyering.net>
908 du would exit early, when encountering an inaccessible directory
909 Reported by Mike Frysinger, in
910 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
911 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
912 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
913 diagnostic from the expected output when using native fdopendir.
914 * tests/chmod/no-x: Likewise.
915 * tests/du/no-x: Likewise.
916 * NEWS: Mention this bug fix.
917 * tests/du/Makefile.am (TESTS): Add inacc-dest.
919 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
922 Avoid false-positive when testing via valgrind.
923 * tests/mv/atomic: Grep strace output for a more specific pattern
924 than just "unlink", since that got a false positive when testing
925 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
926 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
928 2006-10-28 Jim Meyering <jim@meyering.net>
930 * Makefile.maint (patch-check): Make it easier to regenerate
931 the src/c99-to-c89.diff file. E.g., I do this:
932 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
934 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
936 2006-10-26 Jim Meyering <jim@meyering.net>
938 * src/system.h (ftello): Add a compile-time check for the highly
939 unlikely condition of off_t narrower than long int, rather than
940 handling it at run time. Based on a patch from Paul Eggert.
942 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
944 * tests/chmod/c-option: When double-quoting part of a word, prefer
945 to double-quote the whole word. This is a bit easier to read (at
946 least for me), and in some cases it avoids a shell bug with Tru64
947 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
948 "$abs_srcdir"/../setgid-check we now write
949 "$abs_srcdir/../setgid-check".
950 * tests/cp/cp-parents: Likewise.
951 * tests/du/inaccessible-cwd: Likewise.
952 * tests/du/long-from-unreadable: Likewise.
953 * tests/install/basic-1: Likewise.
954 * tests/install/trap: Likewise.
955 * tests/misc/close-stdout: Likewise.
956 * tests/mkdir/concurrent-1: Likewise.
957 * tests/mkdir/p-1: Likewise.
958 * tests/mkdir/p-3: Likewise.
959 * tests/mkdir/parents: Likewise.
960 * tests/mkdir/perm: Likewise.
961 * tests/readlink/can-e: Likewise.
962 * tests/readlink/can-f: Likewise.
963 * tests/readlink/can-m: Likewise.
964 * tests/rm/inaccessible: Likewise.
965 * tests/rm/unread3: Likewise.
966 * tests/touch/no-create-missing: Likewise.
968 * lib/.cvsignore: Add uinttostr.c.
970 2006-10-25 Jim Meyering <jim@meyering.net>
972 Portability to Tru64 V4.0.
973 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
974 Define inline replacement function.
975 This (along with a yesterday's fix for autoconf's
976 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
977 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
979 2006-10-25 Bruno Haible <bruno@clisp.org>
981 * src/cat.c (infile): Add "const" to declaration.
982 * src/csplit.c (prefix): Likewise.
983 * src/printf.c (cfcc_msg): Likewise.
984 * src/tail.c (valid_file_spec): Likewise.
985 * src/cut.c (cut_file): Likewise, for a parameter.
986 * src/expr.c (str_value): Likewise.
987 * src/fold.c (fold_file): Likewise.
988 * src/pr.c (init_header): Likewise.
989 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
990 * src/tr.c (make_printable_str): Likewise.
991 * src/nl.c (body_type, header_type, footer_type, current_type):
992 (separator_str, build_type_arg, nl_file): Likewise, for many.
993 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
994 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
996 2006-10-25 Jim Meyering <jim@meyering.net>
998 * tests/sample-test: Update copyright year list to include only
999 the current year, since this is what I'll want in any new test.
1001 2006-10-24 Jim Meyering <jim@meyering.net>
1003 * src/c99-to-c89.diff: Update to reflect new offsets.
1005 * NEWS: new feature: rm accepts new option: --one-file-system
1006 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
1007 * src/remove.h (struct rm_options) [one_file_system]: New member.
1008 * src/rm.c (rm_option_init): Initialize it.
1009 (usage): Document the option.
1010 * src/mv.c (rm_option_init): Likewise.
1011 * src/remove.c (remove_dir): With --one-file-system and --recursive,
1012 for each directory command line argument, do not affect a file system
1013 different from that of the starting directory. And give a diagnostic.
1014 * src/rm.c (ONE_FILE_SYSTEM): New enum.
1015 (main): Handle new option.
1016 * tests/rm/one-file-system: Test the above.
1017 * tests/rm/Makefile.am (TESTS): Add one-file-system.
1018 * tests/Makefile.am (check-root): Add the rm/one-file-system
1020 (EXTRA_DIST): Add other-fs-tmpdir.
1022 * tests/mv/setup: Removed. Renamed to...
1023 * tests/other-fs-tmpdir: ...this new file.
1024 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
1025 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
1026 * tests/mv/backup-is-src: Likewise.
1027 * tests/mv/hard-link-1: Likewise.
1028 * tests/mv/leak-fd: Likewise.
1029 * tests/mv/mv-special-1: Likewise.
1030 * tests/mv/part-fail: Likewise.
1031 * tests/mv/part-hardlink: Likewise.
1032 * tests/mv/part-rename: Likewise.
1033 * tests/mv/part-symlink: Likewise.
1034 * tests/mv/partition-perm: Likewise.
1035 * tests/mv/to-symlink: Likewise.
1036 * tests/mv/into-self-2: Likewise.
1038 Don't let a failure in one test stop "make -k" from running the others.
1039 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
1040 (check-root): Depend on them, rather than executing the five
1041 commands in a single rule. Reported by Greg Schafer.
1043 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
1045 * Makefile.maint (alpha beta major): Use a better log message for
1046 the automatic commit of .prev-version.
1048 2006-10-23 Jim Meyering <jim@meyering.net>
1050 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
1051 pwd via a shell. Instead, ensure that the absolute name of the
1052 pwd binary consists solely of reasonable characters.
1053 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
1054 clean-up code isn't run.
1056 * NEWS: Add a line for 6.5-cvs.
1057 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
1059 2006-10-22 Jim Meyering <jim@meyering.net>
1063 * NEWS: Record the 6.4 release date.
1064 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1066 * Makefile.maint: Complete the adaptation to function with a working
1067 directory that is using git (rather than cvs) for version control.
1069 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1071 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
1072 * tests/cp/cp-parents: Likewise.
1073 * tests/mkdir/parents: Likewise.
1074 * tests/mkdir/perm: Likewise.
1076 * tests/sample-test: Quote variables containing absolute build
1077 tree paths. In the cleanup trap, make sure `cd' succeeds before
1078 `chmod'ing and `rm'ing the temporary files.
1079 * tests/chgrp/basic: Likewise.
1080 * tests/chgrp/deref: Likewise.
1081 * tests/chgrp/no-x: Likewise.
1082 * tests/chgrp/posix-H: Likewise.
1083 * tests/chgrp/recurse: Likewise.
1084 * tests/chmod/c-option: Likewise.
1085 * tests/chmod/equal-x: Likewise.
1086 * tests/chmod/equals: Likewise.
1087 * tests/chmod/inaccessible: Likewise.
1088 * tests/chmod/no-x: Likewise.
1089 * tests/chmod/octal: Likewise.
1090 * tests/chmod/setgid: Likewise.
1091 * tests/chmod/umask-x: Likewise.
1092 * tests/chmod/usage: Likewise.
1093 * tests/chown/basic: Likewise.
1094 * tests/chown/deref: Likewise.
1095 * tests/chown/separator: Likewise.
1096 * tests/cp/acl: Likewise.
1097 * tests/cp/backup-1: Likewise.
1098 * tests/cp/backup-dir: Likewise.
1099 * tests/cp/backup-is-src: Likewise.
1100 * tests/cp/cp-HL: Likewise.
1101 * tests/cp/cp-deref: Likewise.
1102 * tests/cp/cp-i: Likewise.
1103 * tests/cp/cp-mv-backup: Likewise.
1104 * tests/cp/cp-parents: Likewise.
1105 * tests/cp/deref-slink: Likewise.
1106 * tests/cp/dir-rm-dest: Likewise.
1107 * tests/cp/dir-slash: Likewise.
1108 * tests/cp/dir-vs-file: Likewise.
1109 * tests/cp/fail-perm: Likewise.
1110 * tests/cp/into-self: Likewise.
1111 * tests/cp/link: Likewise.
1112 * tests/cp/link-no-deref: Likewise.
1113 * tests/cp/link-preserve: Likewise.
1114 * tests/cp/no-deref-link1: Likewise.
1115 * tests/cp/no-deref-link2: Likewise.
1116 * tests/cp/no-deref-link3: Likewise.
1117 * tests/cp/perm: Likewise.
1118 * tests/cp/preserve-2: Likewise.
1119 * tests/cp/r-vs-symlink: Likewise.
1120 * tests/cp/same-file: Likewise.
1121 * tests/cp/slink-2-slink: Likewise.
1122 * tests/cp/sparse: Likewise.
1123 * tests/cp/special-bits: Likewise.
1124 * tests/cp/src-base-dot: Likewise.
1125 * tests/cp/symlink-slash: Likewise.
1126 * tests/dd/not-rewound: Likewise.
1127 * tests/dd/skip-seek2: Likewise.
1128 * tests/dd/unblock-sync: Likewise.
1129 * tests/du/2g: Likewise.
1130 * tests/du/8gb: Likewise.
1131 * tests/du/basic: Likewise.
1132 * tests/du/deref: Likewise.
1133 * tests/du/deref-args: Likewise.
1134 * tests/du/exclude: Likewise.
1135 * tests/du/fd-leak: Likewise.
1136 * tests/du/hard-link: Likewise.
1137 * tests/du/inaccessible-cwd: Likewise.
1138 * tests/du/long-from-unreadable: Likewise.
1139 * tests/du/long-sloop: Likewise.
1140 * tests/du/no-deref: Likewise.
1141 * tests/du/no-x: Likewise.
1142 * tests/du/restore-wd: Likewise.
1143 * tests/du/slash: Likewise.
1144 * tests/du/slink: Likewise.
1145 * tests/du/trailing-slash: Likewise.
1146 * tests/du/two-args: Likewise.
1147 * tests/fmt/long-line: Likewise.
1148 * tests/install/basic-1: Likewise.
1149 * tests/install/create-leading: Likewise.
1150 * tests/install/d-slashdot: Likewise.
1151 * tests/install/trap: Likewise.
1152 * tests/ln/misc: Likewise.
1153 * tests/ln/target-1: Likewise.
1154 * tests/ls/color-dtype-dir: Likewise.
1155 * tests/ls/dangle: Likewise.
1156 * tests/ls/dired: Likewise.
1157 * tests/ls/file-type: Likewise.
1158 * tests/ls/follow-slink: Likewise.
1159 * tests/ls/infloop: Likewise.
1160 * tests/ls/inode: Likewise.
1161 * tests/ls/m-option: Likewise.
1162 * tests/ls/no-arg: Likewise.
1163 * tests/ls/recursive: Likewise.
1164 * tests/ls/rt-1: Likewise.
1165 * tests/ls/stat-dtype: Likewise.
1166 * tests/ls/stat-failed: Likewise.
1167 * tests/ls/stat-vs-dirent: Likewise.
1168 * tests/misc/cat-proc: Likewise.
1169 * tests/misc/close-stdout: Likewise.
1170 * tests/misc/csplit: Likewise.
1171 * tests/misc/date-sec: Likewise.
1172 * tests/misc/false-status: Likewise.
1173 * tests/misc/head-c: Likewise.
1174 * tests/misc/head-pos: Likewise.
1175 * tests/misc/mknod: Likewise.
1176 * tests/misc/nl: Likewise.
1177 * tests/misc/nohup: Likewise.
1178 * tests/misc/pathchk1: Likewise.
1179 * tests/misc/printf: Likewise.
1180 * tests/misc/printf-hex: Likewise.
1181 * tests/misc/pwd-long: Likewise.
1182 * tests/misc/shuf: Likewise.
1183 * tests/misc/sort-rand: Likewise.
1184 * tests/misc/split-a: Likewise.
1185 * tests/misc/split-fail: Likewise.
1186 * tests/misc/split-l: Likewise.
1187 * tests/misc/stat-fmt: Likewise.
1188 * tests/misc/tac-continue: Likewise.
1189 * tests/misc/wc-files0: Likewise.
1190 * tests/mkdir/concurrent-1: Likewise.
1191 * tests/mkdir/p-1: Likewise.
1192 * tests/mkdir/p-2: Likewise.
1193 * tests/mkdir/p-3: Likewise.
1194 * tests/mkdir/p-slashdot: Likewise.
1195 * tests/mkdir/p-thru-slink: Likewise.
1196 * tests/mkdir/p-v: Likewise.
1197 * tests/mkdir/parents: Likewise.
1198 * tests/mkdir/perm: Likewise.
1199 * tests/mkdir/t-slash: Likewise.
1200 * tests/mv/acl: Likewise.
1201 * tests/mv/atomic: Likewise.
1202 * tests/mv/backup-dir: Likewise.
1203 * tests/mv/childproof: Likewise.
1204 * tests/mv/diag: Likewise.
1205 * tests/mv/dir-file: Likewise.
1206 * tests/mv/dir2dir: Likewise.
1207 * tests/mv/dup-source: Likewise.
1208 * tests/mv/hard-2: Likewise.
1209 * tests/mv/hard-3: Likewise.
1210 * tests/mv/hard-4: Likewise.
1211 * tests/mv/hard-link-1: Likewise.
1212 * tests/mv/hard-verbose: Likewise.
1213 * tests/mv/i-2: Likewise.
1214 * tests/mv/i-3: Likewise.
1215 * tests/mv/i-4: Likewise.
1216 * tests/mv/i-5: Likewise.
1217 * tests/mv/i-link-no: Likewise.
1218 * tests/mv/into-self-4: Likewise.
1219 * tests/mv/leak-fd: Likewise.
1220 * tests/mv/mv-special-1: Likewise.
1221 * tests/mv/no-target-dir: Likewise.
1222 * tests/mv/part-fail: Likewise.
1223 * tests/mv/part-hardlink: Likewise.
1224 * tests/mv/part-rename: Likewise.
1225 * tests/mv/part-symlink: Likewise.
1226 * tests/mv/partition-perm: Likewise.
1227 * tests/mv/perm-1: Likewise.
1228 * tests/mv/reply-no: Likewise.
1229 * tests/mv/trailing-slash: Likewise.
1230 * tests/mv/update: Likewise.
1231 * tests/od/od-N: Likewise.
1232 * tests/od/x8: Likewise.
1233 * tests/readlink/can-e: Likewise.
1234 * tests/readlink/can-f: Likewise.
1235 * tests/readlink/can-m: Likewise.
1236 * tests/readlink/rl-1: Likewise.
1237 * tests/rm/cycle: Likewise.
1238 * tests/rm/dangling-symlink: Likewise.
1239 * tests/rm/deep-1: Likewise.
1240 * tests/rm/dir-no-w: Likewise.
1241 * tests/rm/dir-nonrecur: Likewise.
1242 * tests/rm/dot-rel: Likewise.
1243 * tests/rm/empty-inacc: Likewise.
1244 * tests/rm/f-1: Likewise.
1245 * tests/rm/fail-2eperm: Likewise.
1246 * tests/rm/hash: Likewise.
1247 * tests/rm/i-1: Likewise.
1248 * tests/rm/i-no-r: Likewise.
1249 * tests/rm/ignorable: Likewise.
1250 * tests/rm/inaccessible: Likewise.
1251 * tests/rm/interactive-always: Likewise.
1252 * tests/rm/interactive-once: Likewise.
1253 * tests/rm/ir-1: Likewise.
1254 * tests/rm/isatty: Likewise.
1255 * tests/rm/no-give-up: Likewise.
1256 * tests/rm/r-1: Likewise.
1257 * tests/rm/r-2: Likewise.
1258 * tests/rm/r-3: Likewise.
1259 * tests/rm/r-4: Likewise.
1260 * tests/rm/readdir-bug: Likewise.
1261 * tests/rm/rm1: Likewise.
1262 * tests/rm/rm2: Likewise.
1263 * tests/rm/rm3: Likewise.
1264 * tests/rm/rm4: Likewise.
1265 * tests/rm/rm5: Likewise.
1266 * tests/rm/sunos-1: Likewise.
1267 * tests/rm/unread2: Likewise.
1268 * tests/rm/unread3: Likewise.
1269 * tests/rmdir/fail-perm: Likewise.
1270 * tests/rmdir/t-slash: Likewise.
1271 * tests/shred/exact: Likewise.
1272 * tests/shred/remove: Likewise.
1273 * tests/sum/sysv: Likewise.
1274 * tests/tail-2/append-only: Likewise.
1275 * tests/tail-2/assert: Likewise.
1276 * tests/tail-2/assert-2: Likewise.
1277 * tests/tail-2/big-4gb: Likewise.
1278 * tests/tail-2/fflush: Likewise.
1279 * tests/tail-2/infloop-1: Likewise.
1280 * tests/tail-2/proc-ksyms: Likewise.
1281 * tests/tail-2/start-middle: Likewise.
1282 * tests/tail-2/tail-n0f: Likewise.
1283 * tests/tee/basic: Likewise.
1284 * tests/tee/dash: Likewise.
1285 * tests/touch/fail-diag: Likewise.
1286 * tests/touch/no-create-missing: Likewise.
1287 * tests/touch/not-owner: Likewise.
1288 * tests/touch/obsolescent: Likewise.
1289 * tests/touch/read-only: Likewise.
1290 * tests/touch/relative: Likewise.
1292 2006-10-21 Jim Meyering <jim@meyering.net>
1294 * NEWS: (cp --backup fix): Fix a typo.
1296 * .gitignore: Remove some references to files in subdirectories.
1297 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
1298 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
1300 * src/copy.c (copy_internal): Add a comment saying why we prefer
1303 Enable an fts optimization (call lstat only for directories,
1304 on some file system types) also with the --preserve-root option
1306 * src/chown-core.c (change_file_owner): Compare fts_statp-based
1307 dev/ino against root dev/ino only for directories.
1308 (chown_files): Don't let the root_dev_ino setting influence whether
1309 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
1311 2006-10-20 Jim Meyering <jim@meyering.net>
1313 * src/od.c (usage): Change description of default to use "-w16",
1314 not the now-invalid "-w 16" syntax. From Dan Jacobson.
1316 2006-10-19 Jim Meyering <jim@meyering.net>
1318 * bootstrap: Add names to each .gitignore file (if it exists)
1319 as well as to .cvsignore.
1321 * Makefile.maint (po-check): This rule didn't detect the new use
1322 of "gettext" (as opposed to the use of "_" everywhere else) in
1323 lib/xstrtol.h. Adjust the grep regexp so that now it does.
1325 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
1327 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
1328 when opening dst_name.
1329 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
1330 (SYSCALL) to test for failure in a system call.
1332 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
1333 a fifo. This preserves the special mode bits on Solaris 10, which
1334 is compatible with what Solaris 10 cp -R does.
1336 * src/copy.c (copy_internal): Remove redundant and confusing local
1339 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
1340 7777. This matches historical 'cp' behavior and avoids some
1341 (though not all) implementation-defined behavior of mkdir.
1342 * src/cp.c (make_dir_parents_private): Likewise.
1343 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
1344 than 777. This is required by POSIX. It doesn't make any difference
1345 in actual behavior on any host that I know of.
1347 2006-10-17 Jim Meyering <jim@meyering.net>
1349 * src/dd.c (usage): Use two spaces (not one) to separate the
1350 "fdatasync" option string from its description, so help2man formats
1351 the derived man page properly. Reported by Samuel Thibault
1352 in <http://bugs.debian.org/393649>.
1354 2006-10-16 Jim Meyering <jim@meyering.net>
1356 * .x-sc_trailing_blank: Remove names of files that are no longer
1359 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
1361 * src/groups.sh (version): Reword message to match the other programs.
1362 Problem reported by Eric Blake.
1364 2006-10-14 Jim Meyering <jim@meyering.net>
1366 * Makefile.maint (headers_with_interesting_macro_defs): Define.
1367 (.re-defmac, sc_always_defined_macros): New rules.
1369 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
1370 Instead, include "exit.h". This hereby retires the work-around for
1371 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
1373 * src/cksum.c (uint_fast32_t): Don't define.
1374 Instead, include <stdint.h>.
1376 * src/pinky.c (S_IWGRP): Don't define.
1377 It's already defined by "stat-macros.h" (included via system.h).
1379 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
1380 * Makefile.maint: Likewise, remove these targets/rules/variables:
1381 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
1382 (cvs_files, wget-update, automake_repo): Likewise.
1383 Move the comment about cvsu to build-aux/vc-list-files,
1384 where cvsu is actually used.
1386 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
1388 Work also when the working directory (with e.g. coreutils sources)
1389 is version controlled with git, rather than CVS.
1390 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
1392 In messages and comments, say e.g., "checked-out sources",
1393 rather than "CVS sources".
1394 (version_controlled_file): New function. Work for git as well as
1395 for CVS. Don't use grep's -q option.
1396 (slurp): Call it here, in place of CVS-specific code.
1398 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
1400 * src/copy.c (copy_internal): Although we do create a backup of each
1401 destination directory when in move mode, don't do that when copying.
1402 Reported by Peter Breitenlohner, in
1403 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
1404 * tests/cp/backup-dir: New file. Test for the above.
1405 * tests/cp/Makefile.am (TESTS): Add backup-dir.
1407 2006-10-13 Jim Meyering <jim@meyering.net>
1409 More chown/chgrp dereferencing-related fixes.
1410 * src/chown-core.c (change_file_owner): Don't use fts_statp if
1411 we're dereferencing symlinks.
1412 Reverse conjuncts, so that we use dereference file_stats
1413 (aka ent->fts_statp) only *after* we've confirmed that
1414 chopt->affect_symlink_referent is true. Otherwise, we might
1415 use ent->fts_statp uninitialized.
1416 Don't turn on FTS_NOSTAT when dereferencing symlinks.
1417 * tests/chown/deref: Update the expected diagnostic, now that
1418 this test case (trying to use "chown --dereference ..." on a
1419 dangling symlink) takes a different code path.
1421 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
1423 Sync from Bison, as follows:
1425 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
1427 Fix problems with translating English-language diagnostics.
1428 * bootstrap: Fix bug introduced in recent bootstrap changes, with
1429 respect to bison-runtime pot generation. The YY_ stuff
1430 wasn't being captured.
1432 2006-10-13 Jim Meyering <jim@meyering.net>
1434 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
1435 now that we're using fts_open with FTS_CWDFD.
1436 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
1437 chgrp, to exercise the above fix.
1438 * NEWS: Mention the above.
1440 * src/du-tests: Clean up a little, though it's still not portable.
1442 * .vg-suppressions: Add 3 more for debian unstable.
1444 * tests/ls/Test.pm: Remove long-unused file.
1445 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
1446 Suggestions from Bruno Haible.
1448 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1450 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
1451 (MAINTAINERCLEANFILES): Add .kludge-stamp.
1452 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
1453 instead of $(man_MANS).
1455 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1457 * configure.ac: Avoid compiler warnings about default return
1458 type in function definitions and unused variables in tests.
1459 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
1460 if this is #defined.
1462 2006-10-12 Jim Meyering <jim@meyering.net>
1464 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
1465 Call gl_INIT directly, rather than through the above.
1467 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1469 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
1470 variable was sometimes used without being initialized. This
1471 messed up the installation of the INSTALL file in some cases.
1473 2006-10-11 Jim Meyering <jim@meyering.net>
1475 * src/ls.c (usage): Correct description of -s, --size.
1476 It works even without -l. Suggestion from Karl Berry.
1478 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
1480 * src/ls.c (quote_name): Use initializer rather than memset to
1481 initialize an object to zero. This is easier to read and is less
1482 likely to introduce a runtime error due to a mixup. It causes
1483 gcc -W to issue a warning, but you can work around this by
1484 appending -Wno-missing-field-initializers.
1485 * src/pathchk.c (portable_chars_only): Likewise.
1486 * src/shred.c (main): Likewise.
1487 * src/stty.c (main): Likewise.
1488 * src/tr.c (card_of_complement): Likewise.
1489 * src/wc.c (wc): Likewise.
1491 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1493 * src/sort.c (usage): Mention again that sort fields are origin 1.
1495 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
1498 * bootstrap (usage, main program, symlink_to_gnulib): Add option
1499 --copy. Inspired by a suggestion from Bruno Haible.
1501 2006-10-09 Jim Meyering <jim@meyering.net>
1503 Avoid a compiler warning.
1504 * src/pathchk.c (portable_chars_only): Initialize variable of type
1505 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
1507 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
1509 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
1510 wrong file name in some cases. Lars Wendler reported a bug in
1512 * src/install.c (make_ancestor): New arg COMPONENT.
1513 * src/mkdir.c (make_ancestor): Likewise.
1514 * tests/install/basic-1: Check for install -Dv bug.
1515 * tests/mkdir/Makefile.am (TESTS): Add p-v.
1516 * tests/mkdir/p-v: New file, to test this bug.
1518 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
1520 * src/chgrp.c: Don't include lchown.h; no longer needed.
1521 * src/chown.c: Likewise.
1523 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
1524 current file system has useful d_type info.
1526 * src/dd.c (flags): noatime and nofollow now depend on
1527 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
1528 (usage): Output info about noatime and nofollow only if
1529 they are known to work.
1530 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
1531 than O_NOFOLLOW, when testing whether it's possible to avoid a
1532 race condition reliably.
1534 2006-10-05 Jim Meyering <jim@meyering.net>
1536 * src/c99-to-c89.diff: Update to reflect new offsets.
1538 * tests/install/basic-1: Skip the latter part of this test if the
1539 just-built dd binary is not readable. Otherwise, this test would fail
1540 when binaries were created as root. Reported by Bauke Jan Douma in
1541 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
1543 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
1545 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
1546 MiB, since XFS hosts can legitimately have large values of
1547 st_blksize. Problem reported by Tony Ernst in
1548 <http://savannah.gnu.org/bugs/?17903>.
1550 2006-10-04 Jim Meyering <jim@meyering.net>
1552 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
1553 Paul Eggert pointed out that the specified file may exist,
1554 in spite of such an errno value.
1555 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
1556 * tests/rm/ignore-name-too-long: Remove file.
1557 * NEWS: Update here, too.
1559 2006-10-03 Jim Meyering <jim@meyering.net>
1561 * tests/rm/fail-eperm: Report failure also if rm is terminated by
1564 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
1565 and one in shred.c -- that were added before coreutils-6.3.
1566 Reported by Michael Deutschmann.
1568 * src/c99-to-c89.diff: Update to reflect new offsets.
1570 * src/remove.c (remove_entry): With -f, exit successfully in spite
1571 of a missing file under some very unusual conditions (with errno
1572 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
1574 With --force (-f), rm no longer fails for ENOTDIR.
1575 * src/remove.c (ignorable_missing): New function.
1576 Use it everywhere, rather than open-coding the test.
1577 Andreas Schwab reported the ENOTDIR problem.
1578 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
1580 * NEWS: Mention the bug fix.
1581 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
1582 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
1583 * tests/rm/Makefile.am (TESTS): Add the new file names.
1585 * bootstrap: Undo last change to this file, since now gnulib-tool
1586 sticks with the automake default in generating dependencies.
1588 * NEWS: Add a line for 6.4-cvs.
1589 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
1591 2006-09-30 Jim Meyering <jim@meyering.net>
1594 * NEWS: Record the 6.3 release date.
1595 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1597 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
1599 * src/c99-to-c89.diff: Update offsets.
1601 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
1603 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
1604 as it doesn't work with Solaris /bin/sh.
1606 2006-09-29 Jim Meyering <jim@meyering.net>
1608 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
1611 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
1612 use .1 as the increment. Actual output varies too much.
1613 [eq-wid-3]: New, commented out test.
1615 * src/shuf.c (read_input): Fix an off-by-one error that
1616 would cause an infloop for piped input of 8KB or more.
1617 * NEWS: Mention the fix.
1618 * tests/misc/shuf: Test for the above fix.
1620 Since any system may be affected by the Darwin readdir bug,
1621 perform the extra rewinddir unconditionally. The performance
1622 impact of rewinding a directory is negligible.
1623 * src/remove.c (NEED_REWIND): Define to use
1624 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
1626 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
1627 increment translates to a slightly larger value.
1628 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
1629 The final expected value wasn't being printed.
1631 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
1632 and NFS, whereby rm would not remove all files in a directory.
1633 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
1634 (NEED_REWIND): New macro, so that we incur the cost of the work-around
1635 rewinddir only on afflicted systems.
1636 * NEWS: Clarify and correct.
1637 * tests/rm/readdir-bug: New file. Test for the above fix.
1638 * tests/rm/Makefile.am (TESTS): Add it.
1639 Prompted by testing and analysis from Bruno Haible:
1640 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
1642 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
1644 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
1645 suggested for Debian stable, which uses Perl 5.8.4.
1647 2006-09-28 Jim Meyering <jim@meyering.net>
1649 Automatically generated dependencies are important even
1650 when all of the sources in a directory come from gnulib.
1651 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
1652 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
1654 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
1655 Ensure that IFS is set properly and unset PATH.
1657 Work properly even when the name of the selected file starts with "-".
1658 Invoke rm via "../../src/rm", and adjust expected output.
1659 Prompted by a patch from Tim Waugh.
1661 * README-cvs: Add Bison to the list of required packages.
1663 2006-09-26 Jim Meyering <jim@meyering.net>
1665 * src/c99-to-c89.diff: Update offsets.
1667 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
1668 it from removing a directory containing 188 or more entries.
1669 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
1670 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
1671 Reported by Matthew Woehlke.
1673 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
1675 * NEWS: "groups user" no longer outputs "user :"; you need at least
1676 two users. "groups" now processes options like --help more compatibly.
1677 * src/groups.sh: Implement the option-processing change.
1678 Handle user and group names with special characters more robustly.
1679 Report write errors instead of exiting silently with status 1.
1681 2006-09-26 Jim Meyering <jim@meyering.net>
1683 * README: Warn not to run autoreconf manually. Use bootstrap instead.
1685 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
1686 Rewrite to avoid using temporary, $status.
1688 * NEWS: Mention the bug fix.
1689 * src/groups.sh: Don't hide a write failure.
1690 Reported by Iain Calder <ic56@rogers.com>.
1692 2006-09-25 Jim Meyering <jim@meyering.net>
1694 * src/chown.c (usage): Clarify --dereference description.
1695 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
1697 2006-09-24 Jim Meyering <jim@meyering.net>
1699 * NEWS: Mention these fixes.
1700 * src/copy.c (copy_reg): With --verbose (-v), print
1701 "removed `file_name'" just after unlinking a file.
1702 (copy_internal): Likewise, in three more places.
1703 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
1704 * tests/mv/hard-verbose: New file. Test for the above fix.
1705 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
1707 * tests/help-version (sync_args): Don't call sync, since it spins up
1708 disks that I've deliberately caused to spin down (but not unmounted).
1710 * NEWS: Mention the improvement to sort.
1712 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
1713 as well as existing.
1715 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
1716 since that predated addition of d_type support.
1718 2006-09-23 Jim Meyering <jim@meyering.net>
1720 * gl/modules/getloadavg.diff: New file. Work around the way the latest
1721 version of the getloadavg module interacts with our bootstrap script.
1722 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
1723 * Makefile.am (EXTRA_DIST): Sort file names.
1724 Add bootstrap and gl/modules/getloadavg.diff
1726 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1728 * bootstrap: Add support for --force.
1729 (usage): New function. Describe usage less tersely.
1730 (CVS_only_file): New var.
1732 * NEWS: Document fix for cp -i and mv -i.
1733 * src/copy.c (copy_internal): With -i, prompt even if the source
1734 is a directory and the destination is not. This is required by
1735 POSIX and gives the user a chance to bail out before failing.
1736 * tests/cp/Makefile.am (TESTS): Add cp-i.
1737 * tests/cp/cp-i: New file.
1738 * tests/mv/Makefile.am (TESTS): Add i-5.
1739 * tests/mv/i-5: New file.
1741 2006-09-20 Jim Meyering <jim@meyering.net>
1743 * NEWS: Mention the chmod bug fix.
1745 * tests/chmod/inaccessible: New test, specifically for this bug.
1746 Based on a test case from Paul Eggert.
1747 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
1749 Fix the 2006-09-18 bug differently.
1750 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
1751 tell fts_read to stat the file again, in case it has become
1752 accessible since the initial fts_open call.
1753 * src/chown-core.c (change_file_owner): Likewise.
1755 * src/chmod.c: Revert last change. There is a better way.
1756 * src/chown-core.c: Likewise.
1758 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
1760 * src/ln.c (target_directory_operand): Rewrite to avoid porting
1761 problem on Tandem reported by Matthew Woehlke in
1762 <https://savannah.gnu.org/bugs/?17172>.
1764 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
1766 Fix bug where chmod, chown, and chgrp did not process operands
1767 left-to-right in some cases.
1768 * src/chmod.c (wd_errno): New var.
1769 (chmod_file): New function, with most of the contents of the
1770 old prcess_file function.
1771 (process_files): Use it. This gives file names to fts one
1772 at a time, so that they are processed left-to-right as POSIX
1774 * src/chown-core.c (wd_errno, chown_files): Likewise.
1775 (chown_file): New function.
1776 * tests/install/basic-1: Redo test so as to not workaround
1777 the chmod bug, thereby testing for it.
1779 * src/shuf.c (main): Quote the entire range when reporting an
1780 invalid one, rather than just the part that contained the error.
1782 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
1783 sometimes left behind if the test is skipped or interrupted.
1785 * bootstrap (symlink_to_gnulib): New function.
1786 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
1787 to copies-of-gnulib.
1788 (cp_mark_as_generated, slurp, gnulib_files):
1789 Avoid making a copy if it's the same as the old version.
1790 (gnulib_files): Add support for this variable (used by Bison).
1792 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
1793 indicating flaw in kernel. Reword to say that the flaw isn't
1794 serious for coreutils, since the flaw does affect ls -i.
1796 * tests/chgrp/basic: Fix bug in test case exposed by building on
1797 Solaris 8 in a setgid directory. The test case incorrectly
1798 assumed that 'symlink' would be in group $g1.
1800 2006-09-18 Jim Meyering <jim@meyering.net>
1802 * NEWS: Add a line for 6.3-cvs.
1803 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
1806 * NEWS: Record the 6.2 release date.
1807 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1809 2006-09-17 Jim Meyering <jim@meyering.net>
1811 * tests/chgrp/basic: On an OpenBSD system, rather than failing
1812 due to a known problem, merely warn about it.
1813 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
1814 Instead, use stat to test file system for desired results, directly.
1815 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
1817 * tests/envvar-check: Add more variable names to the list of those
1818 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
1819 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
1821 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
1823 * NEWS: Document that mkdir -p and install -d now fork on occasion.
1824 * bootstrap.conf (gnulib_modules): Add savewd.
1825 * src/install.c: Include savewd.h.
1826 (process_dir): New function.
1827 (main, install_file_in_file_parents): Use it, along with the new
1828 savewd module, to avoid some race conditions.
1829 * src/mkdir.c: Include savewd.h.
1830 (struct mkdir_options): New members make_ancestor_function, mode,
1832 (make_ancestor): Return 1 if the resulting directory is not readable.
1833 (process_dir): New function.
1834 (main): Use it, along with new savewd module, to avoid some
1835 race conditions. Fill in new slots of struct mkdir_options, so
1836 that callees get the values.
1837 * tests/install/basic-1: Test for coreutils 5.97 bug that was
1838 fixed in coreutils 6.0, and which should still be fixed with
1840 * tests/mkdir/p-3: Likewise.
1842 2006-09-15 Jim Meyering <jim@meyering.net>
1844 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
1845 The 2006-09-08 changes made it so "mv dir new-name/" would
1846 fail on NetBSD 1.6. This makes it work once again.
1848 2006-09-14 Jim Meyering <jim@meyering.net>
1850 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
1851 Instead, since it's a little fragile, assert the condition.
1852 (target_directory_operand): Update comment to reflect latest change.
1854 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
1856 * src/who.c (print_user): Rewrite to avoid warning from
1857 GCC 4.1.1 with -Wall.
1859 2006-09-12 Jim Meyering <jim@meyering.net>
1861 * tests/mv/atomic: Check for specific strace output, rather than
1862 simply nonempty. RHEL AS 4 would fail this test due to strace
1863 generating "[ Process PID=14434 runs in 32 bit mode. ]".
1864 Reported by Nelson Beebe.
1866 2006-09-11 Jim Meyering <jim@meyering.net>
1868 * src/remove.c (remove_dir): Move new cache_stat_init call onto
1870 (rm_1): Move declaration of "st" and new cache_stat_init call
1871 "down" to nearer where they're used.
1872 * src/c99-to-c89.diff: Add another set of curly braces.
1874 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
1876 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
1877 substr's last operand is very large. Performance problem reported
1880 2006-09-09 Jim Meyering <jim@meyering.net>
1882 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
1884 (sc_require_config_h): Skip this test if there are no version-
1885 controlled .c files.
1886 (sc_prohibit_assert_without_use): Likewise.
1888 2006-09-08 Jim Meyering <jim@meyering.net>
1890 * bootstrap: Export CVS_RSH separate from its assignment, to work
1891 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
1893 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
1895 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
1896 no file operand is given, and standard input is any FIFO.
1897 This is in response to Open Group XCU ERN 114.
1898 * src/tail.c (main): Likewise.
1900 2006-09-08 Jim Meyering <jim@meyering.net>
1902 mv and "cp -r" no longer fail when invoked with two arguments
1903 where the first one names a directory and the second name ends in
1904 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
1905 now succeeds, once more. This reverts part of the 2004-06-27
1907 * NEWS: Say the above.
1908 * src/mv.c (target_directory_operand): Don't require (here)
1909 that the target operand "look like" a directory. This change
1910 pushes the test down to the rename syscall level, where a
1911 "mv dir existing-non-dir/" will mistakenly succeed on older systems
1912 that ignore trailing slashes in the rename destination argument.
1913 * src/cp.c (target_directory_operand): Likewise, but for cp.
1914 * tests/mv/trailing-slash: Exercise the above fixes.
1915 * tests/cp/trailing-slash: New file.
1916 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
1918 * bootstrap: Use the previously unused variable, $src,
1919 to avoid repeating "$GNULIB_SRCDIR/$file".
1921 * bootstrap (cp_mark_as_generated): Don't use "local", to
1922 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
1923 Rename now-global "$src" and "$dst" to have cp_ prefix.
1924 Safer, and avoids confusion.
1926 * bootstrap (cp_mark_as_generated): New function.
1927 (slurp): Use it to prepend editor hints and a warning that
1928 the file we're copying is generated.
1929 Suggestion from Bruce Korb.
1930 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
1931 Fix last-minute typo.
1933 2006-09-07 Jim Meyering <jim@meyering.net>
1935 * bootstrap: Revert last change. There are less disruptive ways
1936 to mark these generated files as read-only.
1938 * src/c99-to-c89.diff: Update to have proper offsets.
1940 2006-09-06 Jim Meyering <jim@meyering.net>
1942 Ensure that some gnulib-tool-generated files are read-only.
1943 * bootstrap (slurp): Put the body of this function in a sub-shell,
1944 with "umask a-w" so that all new files are read-only. Remove each
1945 file before we write to it, in case it's read-only.
1946 Make po/Makevars and runtime-po/Makevars read-only, too.
1948 2006-09-05 Jim Meyering <jim@meyering.net>
1950 * tests/cp/acl: Skip this test when cp lacks ACL support.
1951 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
1953 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
1954 context from change of 2006-09-02.
1956 2006-09-04 Jim Meyering <jim@meyering.net>
1958 * README-cvs: Fix typo in update command.
1960 2006-09-03 Jim Meyering <jim@meyering.net>
1962 * NEWS: Tweak the wording in the new change description so that
1963 no one can think this change causes e.g., `rm -fr foo../' to fail.
1965 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
1966 Use $CONFIG_HEADER, rather than hard-coding it.
1967 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
1969 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
1971 * NEWS: rm now rejects attempts to remove /, ./, and ../.
1972 * src/basename.c: Don't include dirname.h, since system.h does it now.
1973 * src/chmod.c: Likewise.
1974 * src/copy.c: Likewise.
1975 * src/cp.c: Likewise.
1976 * src/df.c: Likewise.
1977 * src/dircolors.c: Likewise.
1978 * src/dirname.c: Likewise.
1979 * src/du.c: Likewise.
1980 * src/install.c: Likewise.
1981 * src/ln.c: Likewise.
1982 * src/ls.c: Likewise.
1983 * src/mkdir.c: Likewise.
1984 * src/mv.c: Likewise.
1985 * src/remove.c: Likewise.
1986 * src/rm.c: Likewise.
1987 * src/rmdir.c: Likewise.
1988 * src/shred.c: Likewise.
1989 * src/split.c: Likewise.
1990 * src/su.c: Likewise.
1991 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
1993 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
1995 * src/rm.c (usage, main): --preserve-root is now the default.
1996 * src/remove.h: Fix comment.
1997 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
1998 (cache_statted, cache_stat_ok): New functions.
1999 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
2000 which is no longer needed with the new functions. All callers
2002 (prompt, is_dir_lstat, remove_entry, remove_dir):
2003 New struct stat * arg. All callers changed.
2004 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
2005 (remove_cwd_entries, remove_dir, rm_1):
2006 Use and maintain the file status cache.
2007 (prompt, remove_entry): Omit the first "directory" in the diagnostic
2008 "Cannot remove directory `foo': is a directory". This causes "rm"
2009 to pass a test case that it would otherwise fail now that it
2010 "knows" more about its argument. I think the diagnostic is better
2011 without the first "directory" anyway.
2012 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
2013 (rm_1): Reject attempts to remove /, ./, or ../.
2014 * tests/rm/Makefile.am (TESTS): Add r-4.
2015 * tests/rm/r-4: New file.
2017 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
2019 * src/stat.c: Include <stddef.h>
2020 (alignof): New macro.
2021 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
2023 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
2025 (print_statfs): If f_fsid isn't an integer, grab its words one
2026 at a time in little-endian order. This is a bit easier to configure
2027 and should avoid a compilation failure on MacOS reported by Bruno
2030 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
2032 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
2033 work around a Mac OS X porting problem reported by Bruno Haible in
2034 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
2035 (print_statfs): Use them.
2037 * bootstrap.conf (gnulib_modules): Add isapipe.
2038 * src/tail.c: Include isapipe.h.
2039 (IS_PIPE_LIKE_FILE_TYPE): Remove.
2040 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
2041 tailable, since this seems to be portable.
2042 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
2043 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
2045 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
2048 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
2050 * src/copy.c (copy_internal): Don't test whether macros like
2051 S_ISLNK are defined, since they're always defined now.
2052 * src/cp.c (main): Likewise.
2053 * src/ln.c (main): Likewise.
2054 * src/ls.c (get_link_name, make_link_name): Likewise.
2055 * src/mknod.c (main): Likewise.
2056 * src/mkfifo.c (usage): Likewise.
2057 * src/who.c (S_IWGRP): Likewise.
2059 Adjust to recent gnulib changes for the gnulib module.
2060 * bootstrap.conf (gnulib_modules): Add fcntl.
2061 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
2062 is already assuming these macros are defined.
2063 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
2064 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
2065 Remove; the fcntl module now handles these.
2067 Adjust to recent gnulib changes for the inttypes module.
2068 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
2069 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
2071 * src/system.h: Don't bother to include <stdint.h>, since we can
2072 now assume inttypes.h does the equivalent of including stdint.h.
2074 2006-08-27 Jim Meyering <jim@meyering.net>
2076 * src/copy.c (copy_internal): Don't make a backup if the last
2077 component of the source name is "." or "..".
2078 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
2079 * NEWS: Mention this.
2080 * tests/cp/src-base-dot: New file. Test for the above fix.
2081 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
2083 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
2084 (dot_or_dotdot): ...new static inline function.
2085 * src/remove.c (rm_1): Reflect this renaming.
2086 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2088 * src/copy.c (copy_internal): Add comments.
2090 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
2092 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
2093 since Automake supplies them for us. It always did -I$(srcdir),
2094 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
2095 is now also doing -I../lib.
2097 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
2098 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
2099 since there might not be any .po files.
2100 (WGET_COMMAND): Set to empty if wget doesn't
2101 seem to be available.
2103 2006-08-26 Jim Meyering <jim@meyering.net>
2105 This test was failing in some environments.
2106 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
2107 to set LS_COLORS in the environment.
2108 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
2109 Reported by Bob Proulx.
2111 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
2113 * Makefile.am (EXTRA_DIST): Remove these files here, too:
2114 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
2115 .x-sc_two_space_separator_in_usage.
2117 Fix "mv --verbose --backup" so its output includes the
2118 " (backup: foo.~1~)" suffix also when backing up a directory.
2119 * NEWS: Report this bug fix.
2120 * src/copy.c (emit_verbose): New function, factored out of...
2121 (copy_internal): ...here. Use the new function.
2122 * tests/mv/backup-dir: Test for the above fix.
2123 * tests/mv/Makefile.am (TESTS): Add backup-dir.
2125 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
2127 * .x-sc_no_if_have_config_h: Remove; no longer needed.
2128 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
2129 * .x-sc_two_space_separator_in_usage: Likewise.
2130 * Makefile.maint (sc_no_have_config_h): Renamed from
2131 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
2132 is absent everywhere.
2133 * bootstrap.conf (gnulib_modules): Add config-h.
2134 * src/shred.c: Include <config.h> unconditionally, since
2135 we now assume config.h exists.
2136 * src/dircolors.c: Likewise.
2138 2006-08-26 Jim Meyering <jim@meyering.net>
2140 "ls --color" would highlight other-writable and sticky directories
2141 no differently than regular directories on a file system with
2142 dirent.d_type support.
2143 * NEWS: Say the above.
2144 * src/ls.c (gobble_file): With --color, also stat the file when
2145 we know it is a directory.
2146 Derived from an anonymous one-line fix and bug report:
2147 <http://savannah.gnu.org/bugs/?15043>.
2148 * tests/ls/color-dtype-dir: New file. Test for the above fix.
2149 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
2151 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
2153 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
2155 * bootstrap.conf: Add configmake, verify.
2156 * src/.cvsignore: Remove localedir.h.
2157 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
2158 subsumed by configmake.
2159 * src/system.h: Include configmake.h rather than localedir.h
2160 (LOCALEDIR): New macro.
2162 Rewrite to avoid some unnecessary casts, macros, literals.
2163 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
2165 (SECTOR_SIZE, SECTOR_MASK): New constants.
2166 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
2167 and use the SECTOR_* constants when applicable. Check for size <
2168 0 rather than size == -1, since negative-size files are a sign of
2171 2006-08-25 Bruno Haible <bruno@clisp.org>
2173 * src/shred.c (dopass): Assume a continuable error if EIO even
2174 if the current position is not a multiple of 512.
2176 2006-08-24 Jim Meyering <jim@meyering.net>
2178 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
2180 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
2182 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
2183 macro was being used without being defined.
2184 (SB_F_NAMEMAX): Remove cast.
2185 (f_fsid) [BeOS]: Likewise.
2186 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
2188 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
2190 (xstrcat): Remove. All uses changed to use the above functions.
2191 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
2192 buffer len. All uses changed. Output '?', not '*', for unknown
2193 data or errors. Do not assume signed values can be interchanged
2194 with unsigned when printing.
2195 (print_statfs): For %i, print the fsid as a single int, not as a
2197 (print_it): Quote invalid format better.
2199 * NEWS: printf supports the I flag.
2200 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
2202 2006-08-23 Bruno Haible <bruno@clisp.org>
2204 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
2205 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
2206 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
2208 * src/ls.c (SA_RESTART): Fallback define.
2210 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
2212 * src/system.h (EDQUOT): Define if not already defined.
2213 Problem reported by Bruno Haible for BeOS.
2215 * .cvsignore: Remove config.h, config.hin, as they are now
2217 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
2219 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
2221 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
2222 to accommodate today's gnulib change.
2224 2006-08-23 Jim Meyering <jim@meyering.net>
2226 * NEWS: Mention the sweeping infrastructure changes.
2228 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
2230 * bootstrap.conf (gnulib_modules): Add gnupload.
2231 * Makefile.maint (emit_upload_commands): gnupload is now
2233 * gnupload: Remove from CVS, since it's now a gnulib module.
2235 * bootstrap (bootstrap_conf_cleanup): Remove.
2236 (excluded_files): New var.
2237 * bootstrap.conf: Likewise.
2238 * bootstrap (slurp): Exclude files early if they're in the
2239 excluded_files list. That way, their names don't get put into
2242 * aclocal.m4, config.hin, configure:
2243 Remove from CVS, since ./bootstrap generates them automatically.
2244 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
2245 configure, *.cache, *.lineno, *.log.
2246 Remove more-specific entries. This catches files like configure.lineno.
2247 * man/.cvsignore: Add Makefile.in.
2248 * src/.cvsignore: Add Makefile.in.
2249 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
2252 * tests/chgrp/.cvsignore:
2253 * tests/chmod/.cvsignore:
2254 * tests/chown/.cvsignore:
2255 * tests/cp/.cvsignore:
2256 * tests/cut/.cvsignore:
2257 * tests/dd/.cvsignore:
2258 * tests/dircolors/.cvsignore:
2259 * tests/du/.cvsignore:
2260 * tests/expr/.cvsignore:
2261 * tests/factor/.cvsignore:
2262 * tests/fmt/.cvsignore:
2263 * tests/head/.cvsignore:
2264 * tests/install/.cvsignore:
2265 * tests/join/.cvsignore:
2266 * tests/ln/.cvsignore:
2267 * tests/ls/.cvsignore:
2268 * tests/ls-2/.cvsignore:
2269 * tests/md5sum/.cvsignore:
2270 * tests/misc/.cvsignore:
2271 * tests/mkdir/.cvsignore:
2272 * tests/mv/.cvsignore:
2273 * tests/od/.cvsignore:
2274 * tests/pr/.cvsignore:
2275 * tests/readlink/.cvsignore:
2276 * tests/rm/.cvsignore:
2277 * tests/rmdir/.cvsignore:
2278 * tests/seq/.cvsignore:
2279 * tests/sha1sum/.cvsignore:
2280 * tests/shred/.cvsignore:
2281 * tests/sort/.cvsignore:
2282 * tests/stty/.cvsignore:
2283 * tests/sum/.cvsignore:
2284 * tests/tac/.cvsignore:
2285 * tests/tail/.cvsignore:
2286 * tests/tail-2/.cvsignore:
2287 * tests/tee/.cvsignore:
2288 * tests/test/.cvsignore:
2289 * tests/touch/.cvsignore:
2290 * tests/tr/.cvsignore:
2291 * tests/tsort/.cvsignore:
2292 * tests/unexpand/.cvsignore:
2293 * tests/uniq/.cvsignore:
2294 * tests/wc/.cvsignore:
2295 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
2296 *.X, *.O, *-tests, build-script, mk-script if they're never
2297 created in this directory.
2299 2006-08-22 Bruno Haible <bruno@clisp.org>
2302 * src/uptime.c: Include OS.h if it exists.
2303 (print_uptime): On BeOS, use the get_system_info function (actually a
2304 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
2305 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
2307 2006-08-22 Jim Meyering <jim@meyering.net>
2309 * .cvsignore: Add ABOUT-NLS.
2311 Move the check-AUTHORS rule to be run as part of "make distcheck",
2312 rather than "make check".
2313 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
2314 cause "make check" to fail on systems unable to build all binaries.
2315 * Makefile.maint (check-AUTHORS): New rule.
2316 (local-checks-available): Add it here.
2317 Reported by Bruno Haible. Needed for BeOS.
2319 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
2321 * src/df.c (print_header, show_dev): Use a column width that
2322 depends on the block size of -P is specified and not autoscaling.
2323 Problem reported by Gustavo G. Rondina in:
2324 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
2326 2006-08-21 Jim Meyering <jim@meyering.net>
2328 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
2329 when the shell variable, SHELL, is not set.
2330 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
2331 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
2333 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
2334 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
2335 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
2336 od: invalid type string `u8';
2337 this system doesn't provide a 8-byte integral type
2338 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
2340 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
2342 Add a bootstrap procedure, so that the CVS version contains fewer
2343 files and we bootstrap the rest from gnulib, gettext, etc.
2344 * README-cvs: New file.
2345 * bootstrap: New file.
2346 * bootstrap.conf: New file.
2347 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
2348 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
2350 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
2351 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
2353 (gl_MACROS): Call just after gl_EARLY, just for clarity.
2354 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
2355 * src/kill.c (strtoimax): Remove decl.
2356 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
2357 * src/wc.c: Likewise.
2358 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
2359 declaration, so that we don't need to patch this file.
2360 * src/printf.c (strtoimax, strtoumax): Remove decls.
2361 * src/su.c: Include getpass.h.
2363 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
2364 Include inttypes.h unconditionally.
2365 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
2366 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
2367 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
2368 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
2369 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
2371 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
2372 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
2373 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
2374 * tests/cp/Makefile.in, tests/cut/Makefile.in:
2375 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
2376 * tests/du/Makefile.in, tests/expr/Makefile.in:
2377 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
2378 * tests/general/Makefile.in, tests/head/Makefile.in:
2379 * tests/install/Makefile.in, tests/join/Makefile.in:
2380 * tests/ln/Makefile.in, tests/ls/Makefile.in:
2381 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
2382 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
2383 * tests/mv/Makefile.in, tests/od/Makefile.in:
2384 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
2385 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
2386 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
2387 * tests/shred/Makefile.in, tests/sort/Makefile.in:
2388 * tests/stty/Makefile.in, tests/sum/Makefile.in:
2389 * tests/tac/Makefile.in, tests/tail/Makefile.in:
2390 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
2391 * tests/test/Makefile.in, tests/touch/Makefile.in:
2392 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
2393 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
2394 * tests/wc/Makefile.in:
2395 Remove from CVS, since ./bootstrap generates them automatically.
2397 2006-08-20 Eric Blake <ebb9@byu.net>
2399 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
2400 the patch from 2006-08-18 broke on cygwin.
2402 2006-08-20 Jim Meyering <jim@meyering.net>
2404 * NEWS: Add a line for 6.2-cvs.
2405 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
2407 2006-08-19 Jim Meyering <jim@meyering.net>
2410 * NEWS: Record the 6.1 release date.
2411 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2413 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
2415 Avoid test failure when `make check' is run through debuild.
2416 * tests/help-version: Ensure that $SHELL is set to some value
2417 and exported. Patch from Sven Joachim. For details, see
2418 <http://bugs.debian.org/355368>.
2420 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
2422 * README: Describe potential "pre-C99 build failure", and work-around.
2424 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
2425 backed out due to updates provoked by the copyright changes.
2426 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
2427 it propagates to the derived Makefile.am files.
2428 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
2429 so we don't mistakenly edit them again.
2430 * tests/cut/Makefile.am: Regenerate.
2431 * tests/head/Makefile.am: Likewise.
2432 * tests/join/Makefile.am: Likewise.
2433 * tests/pr/Makefile.am: Likewise.
2434 * tests/sort/Makefile.am: Likewise.
2435 * tests/tac/Makefile.am: Likewise.
2436 * tests/tail/Makefile.am: Likewise.
2437 * tests/test/Makefile.am: Likewise.
2438 * tests/tr/Makefile.am: Likewise.
2439 * tests/uniq/Makefile.am: Likewise.
2440 * tests/wc/Makefile.am: Likewise.
2442 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
2443 when the file's apparent size is not a multiple of its block size.
2444 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
2445 For some file sizes, writing that single byte would unnecessarily
2446 waste a few file blocks. That write may have been necessary in the
2447 early days of Linux, but now, removing it should be safe.
2448 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
2449 * tests/cp/sparse: New test for the above.
2450 * tests/cp/Makefile.am (TESTS): Add sparse.
2452 * tests/sparse-file: New file, essence factored out of...
2453 * tests/du/8gb: ... here. Use the new script.
2455 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
2457 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
2458 the CVS gettext manual now suggests 1000000.
2460 2006-08-18 Bruno Haible <bruno@clisp.org>
2462 Add support for NetBSD 3.0.
2463 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
2465 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
2466 has a field f_fstypename.
2467 This undoes the 2006-08-15 to src/stat.c.
2469 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
2471 Copyright notice fixes.
2473 * COPYING: Upgrade to latest version from FSF.
2475 * src/uname.c: Use (C) in copyright notice.
2477 * .vg-suppressions: Add copyright notice.
2478 * ChangeLog: Likewise.
2479 * ChangeLog-2005: Likewise.
2480 * Makefile.am: Likewise.
2483 * README-valgrind: Likewise.
2485 * announce-gen: Likewise.
2486 * man/Makefile.am: Likewise.
2487 * man/chmod.x: Likewise.
2488 * man/chown.x: Likewise.
2489 * man/df.x: Likewise.
2490 * man/du.x: Likewise.
2491 * man/rm.x: Likewise.
2492 * src/dircolors.hin: Likewise.
2493 * src/du-tests: Likewise.
2494 * src/extract-magic: Likewise.
2495 * src/tac-pipe.c: Likewise.
2496 * src/wheel-gen.pl: Likewise.
2497 * tests/Coreutils.pm: Likewise.
2498 * tests/Makefile.am.in: Likewise.
2499 * tests/acl: Likewise.
2500 * tests/envvar-check: Likewise.
2501 * tests/expensive: Likewise.
2502 * tests/group-names: Likewise.
2503 * tests/help-version: Likewise.
2504 * tests/mk-script: Likewise.
2505 * tests/priv-check: Likewise.
2506 * tests/rwx-to-mode: Likewise.
2507 * tests/sample-test: Likewise.
2508 * tests/setgid-check: Likewise.
2509 * tests/chgrp/basic: Likewise.
2510 * tests/chgrp/deref: Likewise.
2511 * tests/chgrp/no-x: Likewise.
2512 * tests/chgrp/posix-H: Likewise.
2513 * tests/chgrp/recurse: Likewise.
2514 * tests/chmod/c-option: Likewise.
2515 * tests/chmod/equal-x: Likewise.
2516 * tests/chmod/equals: Likewise.
2517 * tests/chmod/no-x: Likewise.
2518 * tests/chmod/octal: Likewise.
2519 * tests/chmod/setgid: Likewise.
2520 * tests/chmod/umask-x: Likewise.
2521 * tests/chmod/usage: Likewise.
2522 * tests/chown/basic: Likewise.
2523 * tests/chown/deref: Likewise.
2524 * tests/chown/separator: Likewise.
2525 * tests/cp/Makefile.am: Likewise.
2526 * tests/cp/acl: Likewise.
2527 * tests/cp/backup-1: Likewise.
2528 * tests/cp/backup-is-src: Likewise.
2529 * tests/cp/cp-HL: Likewise.
2530 * tests/cp/cp-deref: Likewise.
2531 * tests/cp/cp-mv-backup: Likewise.
2532 * tests/cp/cp-parents: Likewise.
2533 * tests/cp/deref-slink: Likewise.
2534 * tests/cp/dir-rm-dest: Likewise.
2535 * tests/cp/dir-slash: Likewise.
2536 * tests/cp/dir-vs-file: Likewise.
2537 * tests/cp/fail-perm: Likewise.
2538 * tests/cp/into-self: Likewise.
2539 * tests/cp/link: Likewise.
2540 * tests/cp/link-no-deref: Likewise.
2541 * tests/cp/link-preserve: Likewise.
2542 * tests/cp/no-deref-link1: Likewise.
2543 * tests/cp/no-deref-link2: Likewise.
2544 * tests/cp/no-deref-link3: Likewise.
2545 * tests/cp/perm: Likewise.
2546 * tests/cp/preserve-2: Likewise.
2547 * tests/cp/r-vs-symlink: Likewise.
2548 * tests/cp/same-file: Likewise.
2549 * tests/cp/slink-2-slink: Likewise.
2550 * tests/cp/special-bits: Likewise.
2551 * tests/cp/symlink-slash: Likewise.
2552 * tests/cut/Makefile.am: Likewise.
2553 * tests/cut/Test.pm: Likewise.
2554 * tests/dd/misc: Likewise.
2555 * tests/dd/not-rewound: Likewise.
2556 * tests/dd/skip-seek: Likewise.
2557 * tests/dd/skip-seek2: Likewise.
2558 * tests/dd/unblock-sync: Likewise.
2559 * tests/dircolors/simple: Likewise.
2560 * tests/du/2g: Likewise.
2561 * tests/du/8gb: Likewise.
2562 * tests/du/Makefile.am: Likewise.
2563 * tests/du/basic: Likewise.
2564 * tests/du/deref: Likewise.
2565 * tests/du/deref-args: Likewise.
2566 * tests/du/exclude: Likewise.
2567 * tests/du/fd-leak: Likewise.
2568 * tests/du/files0-from: Likewise.
2569 * tests/du/hard-link: Likewise.
2570 * tests/du/inaccessible-cwd: Likewise.
2571 * tests/du/long-from-unreadable: Likewise.
2572 * tests/du/long-sloop: Likewise.
2573 * tests/du/no-deref: Likewise.
2574 * tests/du/no-x: Likewise.
2575 * tests/du/restore-wd: Likewise.
2576 * tests/du/slash: Likewise.
2577 * tests/du/slink: Likewise.
2578 * tests/du/trailing-slash: Likewise.
2579 * tests/du/two-args: Likewise.
2580 * tests/expr/basic: Likewise.
2581 * tests/factor/basic: Likewise.
2582 * tests/fmt/basic: Likewise.
2583 * tests/fmt/long-line: Likewise.
2584 * tests/general/Makefile.am: Likewise.
2585 * tests/general/atgeneral.m4: Likewise.
2586 * tests/general/dd.at: Likewise.
2587 * tests/head/Makefile.am: Likewise.
2588 * tests/head/Test.pm: Likewise.
2589 * tests/install/basic-1: Likewise.
2590 * tests/install/create-leading: Likewise.
2591 * tests/install/d-slashdot: Likewise.
2592 * tests/install/trap: Likewise.
2593 * tests/join/Makefile.am: Likewise.
2594 * tests/join/Test.pm: Likewise.
2595 * tests/ln/backup-1: Likewise.
2596 * tests/ln/misc: Likewise.
2597 * tests/ln/sf-1: Likewise.
2598 * tests/ln/target-1: Likewise.
2599 * tests/ls/Makefile.am: Likewise.
2600 * tests/ls/Test.pm: Likewise.
2601 * tests/ls/dangle: Likewise.
2602 * tests/ls/dired: Likewise.
2603 * tests/ls/file-type: Likewise.
2604 * tests/ls/follow-slink: Likewise.
2605 * tests/ls/infloop: Likewise.
2606 * tests/ls/inode: Likewise.
2607 * tests/ls/m-option: Likewise.
2608 * tests/ls/no-arg: Likewise.
2609 * tests/ls/recursive: Likewise.
2610 * tests/ls/rt-1: Likewise.
2611 * tests/ls/stat-dtype: Likewise.
2612 * tests/ls/stat-failed: Likewise.
2613 * tests/ls/stat-vs-dirent: Likewise.
2614 * tests/ls/symlink-slash: Likewise.
2615 * tests/ls/time-1: Likewise.
2616 * tests/ls-2/tests: Likewise.
2617 * tests/md5sum/basic-1: Likewise.
2618 * tests/md5sum/newline-1: Likewise.
2619 * tests/misc/Makefile.am: Likewise.
2620 * tests/misc/base64: Likewise.
2621 * tests/misc/basename: Likewise.
2622 * tests/misc/cat-proc: Likewise.
2623 * tests/misc/close-stdout: Likewise.
2624 * tests/misc/csplit: Likewise.
2625 * tests/misc/date: Likewise.
2626 * tests/misc/date-sec: Likewise.
2627 * tests/misc/df: Likewise.
2628 * tests/misc/dirname: Likewise.
2629 * tests/misc/expand: Likewise.
2630 * tests/misc/false-status: Likewise.
2631 * tests/misc/fold: Likewise.
2632 * tests/misc/head-c: Likewise.
2633 * tests/misc/head-elide-tail: Likewise.
2634 * tests/misc/head-pos: Likewise.
2635 * tests/misc/mknod: Likewise.
2636 * tests/misc/nice: Likewise.
2637 * tests/misc/nl: Likewise.
2638 * tests/misc/nohup: Likewise.
2639 * tests/misc/paste-no-nl: Likewise.
2640 * tests/misc/pathchk1: Likewise.
2641 * tests/misc/printf: Likewise.
2642 * tests/misc/printf-hex: Likewise.
2643 * tests/misc/pwd-long: Likewise.
2644 * tests/misc/sha224sum: Likewise.
2645 * tests/misc/sha256sum: Likewise.
2646 * tests/misc/sha384sum: Likewise.
2647 * tests/misc/sha512sum: Likewise.
2648 * tests/misc/shuf: Likewise.
2649 * tests/misc/sort-merge: Likewise.
2650 * tests/misc/sort-rand: Likewise.
2651 * tests/misc/split-a: Likewise.
2652 * tests/misc/split-fail: Likewise.
2653 * tests/misc/split-l: Likewise.
2654 * tests/misc/stat-fmt: Likewise.
2655 * tests/misc/stat-printf: Likewise.
2656 * tests/misc/tac-continue: Likewise.
2657 * tests/misc/test-diag: Likewise.
2658 * tests/misc/tty-eof: Likewise.
2659 * tests/misc/wc-files0: Likewise.
2660 * tests/misc/wc-files0-from: Likewise.
2661 * tests/mkdir/concurrent-1: Likewise.
2662 * tests/mkdir/p-1: Likewise.
2663 * tests/mkdir/p-2: Likewise.
2664 * tests/mkdir/p-3: Likewise.
2665 * tests/mkdir/p-slashdot: Likewise.
2666 * tests/mkdir/p-thru-slink: Likewise.
2667 * tests/mkdir/parents: Likewise.
2668 * tests/mkdir/perm: Likewise.
2669 * tests/mkdir/special-1: Likewise.
2670 * tests/mkdir/t-slash: Likewise.
2671 * tests/mkdir/writable-under-readonly: Likewise.
2672 * tests/mv/Makefile.am: Likewise.
2673 * tests/mv/acl: Likewise.
2674 * tests/mv/atomic: Likewise.
2675 * tests/mv/backup-is-src: Likewise.
2676 * tests/mv/childproof: Likewise.
2677 * tests/mv/diag: Likewise.
2678 * tests/mv/dir-file: Likewise.
2679 * tests/mv/dir2dir: Likewise.
2680 * tests/mv/dup-source: Likewise.
2681 * tests/mv/force: Likewise.
2682 * tests/mv/hard-2: Likewise.
2683 * tests/mv/hard-3: Likewise.
2684 * tests/mv/hard-4: Likewise.
2685 * tests/mv/hard-link-1: Likewise.
2686 * tests/mv/i-1: Likewise.
2687 * tests/mv/i-2: Likewise.
2688 * tests/mv/i-3: Likewise.
2689 * tests/mv/i-4: Likewise.
2690 * tests/mv/i-link-no: Likewise.
2691 * tests/mv/into-self: Likewise.
2692 * tests/mv/into-self-2: Likewise.
2693 * tests/mv/into-self-3: Likewise.
2694 * tests/mv/into-self-4: Likewise.
2695 * tests/mv/leak-fd: Likewise.
2696 * tests/mv/mv-special-1: Likewise.
2697 * tests/mv/no-target-dir: Likewise.
2698 * tests/mv/part-fail: Likewise.
2699 * tests/mv/part-hardlink: Likewise.
2700 * tests/mv/part-rename: Likewise.
2701 * tests/mv/part-symlink: Likewise.
2702 * tests/mv/partition-perm: Likewise.
2703 * tests/mv/perm-1: Likewise.
2704 * tests/mv/reply-no: Likewise.
2705 * tests/mv/setup: Likewise.
2706 * tests/mv/to-symlink: Likewise.
2707 * tests/mv/trailing-slash: Likewise.
2708 * tests/mv/update: Likewise.
2709 * tests/mv/vfat: Likewise.
2710 * tests/od/od-N: Likewise.
2711 * tests/od/x8: Likewise.
2712 * tests/pr/Makefile.am: Likewise.
2713 * tests/pr/Test.pm: Likewise.
2714 * tests/readlink/can-e: Likewise.
2715 * tests/readlink/can-f: Likewise.
2716 * tests/readlink/can-m: Likewise.
2717 * tests/readlink/rl-1: Likewise.
2718 * tests/rm/Makefile.am: Likewise.
2719 * tests/rm/cycle: Likewise.
2720 * tests/rm/dangling-symlink: Likewise.
2721 * tests/rm/deep-1: Likewise.
2722 * tests/rm/dir-no-w: Likewise.
2723 * tests/rm/dir-nonrecur: Likewise.
2724 * tests/rm/dot-rel: Likewise.
2725 * tests/rm/empty-inacc: Likewise.
2726 * tests/rm/empty-name: Likewise.
2727 * tests/rm/f-1: Likewise.
2728 * tests/rm/fail-2eperm: Likewise.
2729 * tests/rm/fail-eperm: Likewise.
2730 * tests/rm/hash: Likewise.
2731 * tests/rm/i-1: Likewise.
2732 * tests/rm/i-no-r: Likewise.
2733 * tests/rm/inaccessible: Likewise.
2734 * tests/rm/interactive-always: Likewise.
2735 * tests/rm/interactive-once: Likewise.
2736 * tests/rm/ir-1: Likewise.
2737 * tests/rm/isatty: Likewise.
2738 * tests/rm/no-give-up: Likewise.
2739 * tests/rm/r-1: Likewise.
2740 * tests/rm/r-2: Likewise.
2741 * tests/rm/r-3: Likewise.
2742 * tests/rm/rm1: Likewise.
2743 * tests/rm/rm2: Likewise.
2744 * tests/rm/rm3: Likewise.
2745 * tests/rm/rm4: Likewise.
2746 * tests/rm/rm5: Likewise.
2747 * tests/rm/sunos-1: Likewise.
2748 * tests/rm/unread2: Likewise.
2749 * tests/rm/unread3: Likewise.
2750 * tests/rm/unreadable: Likewise.
2751 * tests/rmdir/fail-perm: Likewise.
2752 * tests/rmdir/ignore: Likewise.
2753 * tests/rmdir/t-slash: Likewise.
2754 * tests/seq/basic: Likewise.
2755 * tests/sha1sum/basic-1: Likewise.
2756 * tests/sha1sum/sample-vec: Likewise.
2757 * tests/shred/exact: Likewise.
2758 * tests/shred/remove: Likewise.
2759 * tests/sort/Makefile.am: Likewise.
2760 * tests/sort/Test.pm: Likewise.
2761 * tests/sort-time/Makefile: Likewise.
2762 * tests/sort-time/README: Likewise.
2763 * tests/sort-time/rand-gen: Likewise.
2764 * tests/stty/basic-1: Likewise.
2765 * tests/stty/row-col-1: Likewise.
2766 * tests/sum/basic-1: Likewise.
2767 * tests/sum/sysv: Likewise.
2768 * tests/tac/Makefile.am: Likewise.
2769 * tests/tac/Test.pm: Likewise.
2770 * tests/tail/Makefile.am: Likewise.
2771 * tests/tail/Test.pm: Likewise.
2772 * tests/tail-2/Makefile.am: Likewise.
2773 * tests/tail-2/append-only: Likewise.
2774 * tests/tail-2/assert: Likewise.
2775 * tests/tail-2/assert-2: Likewise.
2776 * tests/tail-2/big-4gb: Likewise.
2777 * tests/tail-2/fflush: Likewise.
2778 * tests/tail-2/infloop-1: Likewise.
2779 * tests/tail-2/proc-ksyms: Likewise.
2780 * tests/tail-2/start-middle: Likewise.
2781 * tests/tail-2/tail-n0f: Likewise.
2782 * tests/tee/basic: Likewise.
2783 * tests/tee/dash: Likewise.
2784 * tests/test/Makefile.am: Likewise.
2785 * tests/test/Test.pm: Likewise.
2786 * tests/touch/Makefile.am: Likewise.
2787 * tests/touch/dangling-symlink: Likewise.
2788 * tests/touch/empty-file: Likewise.
2789 * tests/touch/fail-diag: Likewise.
2790 * tests/touch/fifo: Likewise.
2791 * tests/touch/no-create-missing: Likewise.
2792 * tests/touch/no-rights: Likewise.
2793 * tests/touch/not-owner: Likewise.
2794 * tests/touch/obsolescent: Likewise.
2795 * tests/touch/read-only: Likewise.
2796 * tests/touch/relative: Likewise.
2797 * tests/tr/Makefile.am: Likewise.
2798 * tests/tr/Test.pm: Likewise.
2799 * tests/tr/failures: Likewise.
2800 * tests/tsort/basic-1: Likewise.
2801 * tests/unexpand/basic-1: Likewise.
2802 * tests/uniq/Makefile.am: Likewise.
2803 * tests/uniq/Test.pm: Likewise.
2804 * tests/wc/Makefile.am: Likewise.
2805 * tests/wc/Test.pm: Likewise.
2807 2006-08-17 Jim Meyering <jim@meyering.net>
2809 ls -CF would misalign columns in some cases.
2810 * src/ls.c (get_type_indicator): New function. extracted from...
2811 (print_type_indicator): ...here. Use it.
2812 (length_of_file_name_and_frills): Use it here, too, rather than
2813 assuming stat.st_mode is valid.
2814 Reported by Andreas Schwab, here:
2815 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
2816 See the test for this above. FYI, I did ls -CF /proc and visually
2817 inspected the result.
2819 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
2820 to mention the now-removed cp_options.xstat member.
2822 * Makefile.maint (patch-check): Adapt to work now that the patch
2823 modifies more than one file in src/.
2825 With this patch, permit building with Solaris cc on Solaris 7.
2826 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
2827 This integrates patches from Bruno Haible.
2829 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
2831 Fix some problems reported by Bruno Haible.
2832 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
2833 Skip this test if "chmod g+s d" silently does nothing.
2834 * tests/ls-2/tests: Skip this test suite if we can't set up files
2835 properly for the setuid-etc test. This simplifies some of the
2836 hacks we were using to work around porting problems.
2838 2006-08-16 Jim Meyering <jim@meyering.net>
2840 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
2841 * tests/cp/acl: Instead, skip the test if either setfacl
2843 Reported by Michael Stone.
2845 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
2847 * tests/lang-default (LC_ALL): Set to "C", so we get
2848 English-language diagnostics. Unset the other variables; it
2849 should be portable to use 'unset' for this stuff nowadays.
2850 Problem reported by Bruno Haible. Using "C" reverses the
2851 2000-10-22 change to fileutils in this area.
2853 Fix bugs when printing plurals of numbers that are not
2854 unsigned long int values.
2855 * src/system.h (select_plural): New function.
2856 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
2857 * src/uptime.c (print_uptime): Likewise.
2858 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
2859 print a floating point number, as reducing to 0 or 1 doesn't work
2860 for some languages. Instead, just use "s" for seconds since it
2861 doesn't need a plural form.
2863 2006-08-16 Bruno Haible <bruno@clisp.org>
2865 Old versions of gzip would write --help output to stderr, and it
2866 would be annoying to see that in the output of every "make" command.
2867 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
2870 2006-08-16 Andreas Schwab <schwab@suse.de>
2872 * tests/cp/acl: Don't use non-portable == operator for test.
2874 2006-08-16 Jim Meyering <jim@meyering.net>
2876 * tests/ls/stat-dtype: Use stat to test file system type, rather
2877 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
2879 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
2881 * NEWS: Mention that df exits with nonzero status if it generates
2882 no output. This change was in 6.0 but inadvertently unmentioned.
2883 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
2885 (show_dev): Don't set it until we actually output something.
2886 Print the header if this is the first output.
2887 (main): Don't print a header, as that is now show_dev's job.
2888 * tests/misc/Makefile.am (TESTS): Add df.
2889 * tests/misc/df: New file.
2891 2006-08-15 Eric Blake <ebb9@byu.net>
2893 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
2894 statvfs.f_type not present. See
2895 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
2897 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
2899 * src/dd.c (print_stats): Don't substitute "1" for number, as this
2900 causes confusion for the Hungarian translators. Problem reported
2901 by Egmont Koblinger here:
2902 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
2904 2006-08-15 Jim Meyering <jim@meyering.net>
2906 * .x-sc_require_config_h: Add lib/at-func.c.
2908 * NEWS: Add a line for 6.1-cvs.
2909 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
2911 2006-08-15 Jim Meyering <jim@meyering.net>
2914 * NEWS: Record the 6.0 release date.
2915 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2917 * TODO: Add an item (convert to use gnulib-tool), add to the plan
2918 for id-vs-getgrouplist, and remove a few completed items.
2920 * Makefile.maint (alpha beta major): Fix syntax error.
2922 2006-08-13 Jim Meyering <jim@meyering.net>
2924 * src/shred.c (usage): Don't indent the second line of an item.
2925 Otherwise, help2man would misformat the output.
2926 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
2928 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
2930 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
2931 Suggested by Eric Blake to avoid problems like
2932 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
2934 2006-08-11 Jim Meyering <jim@meyering.net>
2936 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
2937 failure that this test checks for (stat/dirent inode mismatch at
2938 a mount point), so continue to give a diagnostic about the failure,
2939 but don't actually count it as a failure.
2941 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
2943 * ABOUT-NLS: Update from gettext 0.15.
2944 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
2946 * src/csplit.c (struct control): Remove fastmap member.
2947 (extract_regexp): Allocate fastmap separately, since otherwise
2948 it might move due to a realloc. This fixes a bug that led
2949 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
2951 2006-08-10 Jim Meyering <jim@meyering.net>
2953 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
2954 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
2955 Redirect both stdout and stderr of df invocations.
2957 * src/dircolors.hin: Add a TERM directive for each of the following:
2958 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
2959 rxvt-cygwin-native, screen.linux, xterm-256color.
2960 Sort the TERM directives.
2961 From Mike Frysinger.
2963 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
2965 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
2966 See Debian bug 373736.
2968 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
2971 * src/.cvsignore: Add shuf.
2973 * Makefile.maint: Remove the po-update procedure; it doesn't
2974 work with the new repository on http://www.iro.umontreal.ca/.
2975 For now I guess we'll have to fix things by hand.
2976 (do-po-update, po-update): Remove. All references removed.
2978 * src/shuf.c (next_line): New function.
2979 (read_input): Use it, to avoid relying on GCC-specific behavior
2980 with void * arithmetic. Problem reported by Bob Proulx.
2981 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
2982 to detect this sort of problem automatically in the future.
2984 2006-08-09 Jim Meyering <jim@meyering.net>
2986 * src/ls.c: Add a compile-time check to ensure that filetype
2987 and filetype_letter have the same number of elements.
2989 * tests/misc/sort-rand: Remove use of --seed=S.
2991 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
2993 Add a command 'shuf', and modify shred and sort to use the new
2994 random number generator library of 'shuf'.
2996 * AUTHORS: Add shuf.
2998 * NEWS: Likewise. Mention new --random-source option for shred
2999 and sort. Move "sort +1 -2" notice to the appropriate section,
3000 and clarify its role with respect to POSIXLY_CORRECT.
3001 * man/.cvsignore: Add shuf.1.
3002 * man/Makefile.am (dist_man_MANS): Add shuf.1.
3003 (shuf.1): New dependency.
3004 * man/shuf.x: New file.
3005 * src/Makefile.am (bin_PROGRAMS): Add shuf.
3006 (EXTRA_DIST): Remove rand-isaac.c.
3007 (shuf_LDADD): New macro.
3008 * src/rand-isaac.c: Remove, moving most of its contents to
3010 * src/shuf.c: New file.
3011 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
3012 Don't include rand-isaac.c; include randint.h and randread.h instead.
3013 (RANDOM_SOURCE_OPTION): New enum.
3014 (long_opts, usage, main): New option --random-source.
3015 * src/sort.c: Likewise.
3016 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
3017 All callers changed to use randint interface.
3018 (fillrand): Remove. All callers changed to use randread interface.
3019 (dopass): Remove dependency on ISAAC buffer size.
3020 (genpattern): Don't wipe the random state here.
3021 (randint_source): New static var.
3022 (clear_random_data): New function.
3023 (main): Allocate random source, and arrange to wipe it on exit.
3024 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
3025 (longopts, usage, main): Remove undocumented --seed option;
3026 it's now replaced by --random-source.
3027 (rand_state, get_hash): Remove.
3028 (randread_source): New static var.
3029 (random_state, cmp_hashes, compare_random): New functions; they guarantee
3030 no collisions in the random hash function.
3031 (keycompare): Use compare_random for -R; don't fall back on comparing
3032 via memcoll, since compare_random does the right thing.
3033 * tests/misc/Makefile.am (TESTS): Add shuf.
3034 * tests/misc/shuf: New file.
3036 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
3038 * src/copy.c (set_author): Preserve the st_author field via the
3039 file descriptor dest_desc.
3041 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
3043 * NEWS: chmod now preserves setuid and setgid bits on directories
3044 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
3046 Fix test case problems if working directory is setgid,
3047 reported by Bob Proulx.
3048 * tests/cp/fail-perm: Use symbolic mode so that we clear
3049 setgid bit more reliably on directories.
3050 * tests/mkdir/special-1 (set_mode_string): Likewise.
3052 2006-07-27 Jim Meyering <jim@meyering.net>
3054 * src/chgrp.c (usage): Use correct grammar in description of the
3056 * src/chown.c (usage): Likewise.
3058 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
3060 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
3061 Correctly access SRC_SB's element ST_AUTHOR.
3063 2006-07-26 Jim Meyering <jim@meyering.net>
3065 * tests/ls/stat-failed: Adapt to match new expected output.
3068 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
3069 than having the code test for all of the other types first.
3070 Hoist the set-uid/gid-testing code "up" into this new block.
3071 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
3072 C_ORPHAN, not as C_FILE.
3074 2006-07-26 Jim Meyering <jim@meyering.net>
3076 Checking in a change from Paul.
3078 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
3080 * src/ls.c (DT_INIT): Remove. All uses removed.
3081 (enum filetype): Use an ordinary enum rather than trying to keep
3082 the values in sync with DT_FIFO etc. That way, we don't have
3083 to make special assumptions about them. All uses changed.
3084 (whiteout): New constant member of enum filetype.
3085 (filetype_letter): New constant, for use with enum filetype.
3086 (FILETYPE_INDICATORS): New initializer list.
3087 (print_dir): Add case for DT_WHT.
3088 (gobble_file): If stat fails, don't discard information from
3089 readdir; instead, preserve it so it can be printed.
3090 (print_long_format): Fall back on readdir result if stat info
3091 is not available. Use "?" to denote each unknown mode char,
3092 instead of an overall "?", since we now know some of the mode
3094 (print_type_indicator): Now that MODE isn't necessarily
3095 useful, guard all uses.
3096 Now that two blocks in the type-checking tree can set "type = C_FILE",
3097 move the suffix-handling code out and down.
3099 2006-07-26 Jim Meyering <jim@meyering.net>
3101 Prepare for the above change.
3102 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
3103 and adjust uses. From a patch by Paul Eggert.
3105 2006-07-26 Jim Meyering <jim@meyering.net>
3107 * src/ls.c: Correct indentation/formatting in a few places.
3109 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
3111 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
3112 Problem report and fix from Bob Proulx.
3113 * NEWS: Clarify the "chmod 0500" news, and correct the vague
3114 statements about compatibility with BSD.
3116 2006-07-25 Jim Meyering <jim@meyering.net>
3118 * src/ls.c (gobble_file): When handling a stat-failed entry,
3119 print the entry name not the absolute_name -- to be consistent
3120 with the usual case.
3121 * tests/ls/stat-failed: Update accordingly.
3123 * src/ls.c: Add parens around the new uses of ?: ternary operator.
3125 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
3128 Get --dired offsets right when handling stat-failed entries.
3129 * src/ls.c (print_long_format): Be careful to increment P by the
3130 appropriate amount, even when inode_number_width and nlink_width
3132 * tests/ls/stat-failed: Test for the above.
3134 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
3135 have_acl member. That would happen for a directory with both a
3136 non-stat'able entry and one with an ACL.
3138 * src/ls.c (gobble_file): Make it so failure to stat a
3139 non-command-line file provokes an exit status of 1, not 0.
3140 Say "cannot access" rather than "cannot stat".
3141 * tests/ls/stat-failed: New file/test, for the above.
3142 * tests/ls/Makefile.am (TESTS): Add stat-failed.
3143 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
3144 of "cannot access " to diagnostic.
3146 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
3148 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
3149 Replace all occurrences of "type == command_line" with the
3150 equivalent, "command_line_arg".
3152 * src/ls.c: Apply the stat-failed parts of Red Hat's
3153 coreutils-selinux.patch. From Ulrich Drepper.
3154 This makes it so files not mentioned on the command line (e.g.,
3155 names read from a directory that *is* mentioned on the command
3156 line) for which stat fails are still listed. With --color,
3157 such files are colored just like ORPHANs (aka dangling symlinks).
3159 * src/df.c (n_valid_args): Declare global to be static.
3161 2006-07-24 Jim Meyering <jim@meyering.net>
3163 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
3164 system lacks d_type support.
3166 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
3168 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
3170 2006-07-21 Jim Meyering <jim@meyering.net>
3172 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
3173 Reported by Tim Waugh.
3174 Also remove the comment duplicating much of --help output.
3176 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
3177 name so the list remains alphabetized.
3179 Fix another bug: ls --indicator-style=file-type would call
3180 stat for a symlink, even though it wasn't always needed.
3181 In some cases, that unnecessary stat would cause ls to fail.
3182 * src/ls.c (gobble_file): Don't treat symlinks specially (in
3183 requiring a stat syscall). Remove the offending exclusion.
3185 * NEWS: Mention the fix.
3187 * tests/ls/stat-dtype: New file/test, for the above fix.
3188 Also exercises the new df feature, below.
3190 * src/df.c (main): Fail and don't print the headers if no
3191 file system is processed. This makes it easy to test whether
3192 a specified directory is on a file system of a given type or types.
3193 Otherwise, applications would have had to parse df's output.
3194 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
3196 Fix a bug: ls --file-type worked like --indicator-style=slash,
3197 rather than like --indicator-style=file-type.
3198 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
3199 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
3201 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
3202 * NEWS: Mention the fix.
3203 * tests/ls-2/tests (file-type): New test, for the above fix.
3205 2006-07-19 Jim Meyering <jim@meyering.net>
3207 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
3209 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
3211 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
3213 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
3214 of directories alone unless you specify them explicitly.
3215 install and mkdir now implement X correctly.
3216 install now creates parent directories with mode 755, without
3217 changing their owner or group.
3218 * src/chmod.c (process_file): Adjust to mode_adjust API change.
3219 * src/install.c: Include mkancesdirs.h.
3220 (announce_mkdir, make_ancestor): New functions.
3221 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
3223 (dir_mode, dir_mode_bits): New vars.
3224 (main): Set dir modes separately from nondir, so that the X
3225 op of -m works correctly.
3226 (main): Remove cwd_errno cruft, since make_dir_parents no longer
3227 affects cwd. Adjust to new make_dir_parents API.
3228 (install_file_in_file_parents): 2nd arg is now char *, not char
3229 const *. Use mkancesdirs instead of rolling our own code.
3230 (change_attributes): Don't worry about AFS, since that kludge
3231 should not be needed any more.
3232 * src/mkdir.c (struct mkdir_options): New struct.
3233 (announce_mkdir, make_ancestor): New functions.
3234 (main): Use them. Adjust to mode_adjust API change. Stick with
3235 umask 0. Use make_dir_parents for all the work.
3236 * src/mkfifo.c (main): Adjust to new mode_adjust API.
3237 * src/mknod.c (main): Likewise.
3238 * tests/chmod/setgid: Do the setgid test instead of bailing.
3239 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
3240 GNU chmod now behaves like other versions of chmod.
3241 * tests/mkdir/perm: Add a test for the X bug.
3243 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
3245 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
3246 This doesn't fix any bugs, since OUT always equals stdout, but it
3247 makes the code easier to understand.
3249 2006-07-14 Jim Meyering <jim@meyering.net>
3251 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
3252 rather than open-coding it. Now supports mercurial, too.
3253 * .hgignore: New file.
3254 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
3255 all generated files, including ones like configure and po/*.po
3256 that are currently version-controlled in cvs.
3258 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
3259 They've been in CVS, just haven't been distributed before this.
3260 Distribute ChangeLog-2005, too.
3261 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
3263 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
3265 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
3268 2006-07-09 Jim Meyering <jim@meyering.net>
3270 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
3271 That happens with Linux/tmpfs.
3272 * tests/mv/Makefile.am (TESTS): Add dir2dir.
3274 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3276 Adjust to recent updates from gnulib.
3277 * src/dd.c (apply_translations): Use toupper rather than
3278 islower followed by toupper; it's simpler and typically
3279 faster now that we assume at least C89 semantics. Similarly
3281 * src/sort.c (inittables): Likewise.
3282 * src/expand.c (expand): Don't assume that isprint etc. return
3283 booleans (needed for pre-C99 hosts).
3284 * src/fmt.c (check_punctuation): Likewise.
3285 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
3286 * src/tr.c (is_char_class_member): Likewise.
3287 * src/unexpand.c (unexpand): Likewise.
3288 * src/join.c (is_blank): Remove; no longer needed. All uses
3289 replaced by isblank (to_uchar (...)).
3290 * src/pinky.c (create_fullname): Don't assume char is unsigned.
3291 * src/printf.c (print_esc): Likewise.
3292 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
3293 (copy_unescaped_string): Likewise.
3294 * src/stat.c (print_it): Likewise.
3295 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
3296 convenience on GNU systems. All uses changed. Don't bother
3297 looking for any dirent.h substitute other than ndir.h.
3298 (D_INO): Remove unnecessary parentheses.
3299 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
3300 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
3301 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
3302 to ctype.h equivalents.
3303 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
3306 2006-07-08 Jim Meyering <jim@meyering.net>
3308 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
3310 * Makefile.maint (sc_the_the): New rule.
3312 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
3313 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
3316 2006-07-07 Jim Meyering <jim@meyering.net>
3318 * NEWS: Mention that mv can now remove an empty destination directory,
3319 and give an example. Prompted by a report from Florent Bayle.
3321 2006-07-05 Jim Meyering <jim@meyering.net>
3323 * src/ls.c (usage): Correct the description of -G: it is useful
3324 only in a long listing. Reported by Martin Pool in
3325 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
3327 * man/chmod.x: Correct the description of the sticky bit. Reported
3328 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
3330 * src/copy.c (copy_internal): Don't work around old NFS clients like
3331 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
3332 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
3333 a banal failure as a recursive move-into-self failure.
3334 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
3336 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
3338 2006-07-03 Jim Meyering <jim@meyering.net>
3340 Plug another unusual leak.
3341 (AD_mark_helper): Free malloc'd filename if hash_insert says
3342 that string is already in the hash table.
3344 The dev/inode of the topmost directory in each hierarchy were not
3346 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
3347 (AD_push): Call it from here instead.
3349 Fix two small leaks.
3350 * src/remove.c (AD_stack_clear): New function.
3352 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
3354 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
3355 Add $VG_PATH_PREFIX as a prefix to $PATH
3357 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
3358 * tests/Makefile.am (evar-check): Remove rule.
3359 (EXTRA_DIST): Remove .env-warn.
3360 * tests/.env-warn: Remove file. No longer used.
3361 Suggestion from Eric Blake.
3363 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
3365 * src/system.h: Include <stdint.h> unconditionally, since we
3366 now assume the stdint module.
3368 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
3370 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
3371 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
3372 * src/tail.c (main): Implement this.
3373 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
3374 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
3376 2006-07-01 Jim Meyering <jim@meyering.net>
3378 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
3380 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
3383 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
3385 * NEWS: seq now uses long double internally rather than double.
3386 It now defaults to a minimal fixed point format if possible.
3387 It lets you use %a, %A, %E, %F, %G.
3388 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
3389 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
3390 (isfinite) [!defined isfinite]: New macro.
3391 (separator, terminator): Now points to const.
3392 (first, step, last): Remove.
3393 (usage): Update to match new behavior.
3394 (struct operand, operand): New type.
3395 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
3397 Compute and return a value of type operand, not double.
3398 (long_double_format): Renamed from valid_format, and now returns a
3399 new format with an "L" added if needed, if the original format was
3400 valid. Allow %a, %A, %E, %F, and %G formats.
3401 (print_numbers): Take numeric values as args rather than from globals.
3402 Print long double, not double.
3403 (get_width_format): Remove.
3404 (get_default_format): New function.
3405 (main): Implement new way of calculating default format.
3406 Don't worry about locale's representation of the decimal point, since
3407 the arguments are always processed in the C locale.
3408 * tests/seq/basic (neg-2): Adjust to new default format.
3409 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
3410 implementation should do the right thing.
3412 2006-06-30 Jim Meyering <jim@meyering.net>
3414 * tests/stty/basic-1: Work around an intermittent test failure
3415 on HP-UX 11.11. Report and analysis from Bob Proulx.
3416 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
3418 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
3420 * NEWS: Support obsolete usages like "sort +1 -2" even when
3421 conforming to POSIX 1003.1-2001, since this is a pure extension to
3422 POSIX. Problem reported by Christian in:
3423 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
3424 * src/sort.c (main): Implement this.
3426 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
3427 Autoconf 2.60 says this stuff was obsolete.
3429 2006-06-28 Jim Meyering <jim@meyering.net>
3431 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
3433 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
3435 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
3436 (set -x when VERBOSE=yes) when stderr is redirected before stdout
3437 causing shell tracing of the stdout redirection to be written to
3438 the stderr file. Avoid problem and test failure on HP-UX by
3439 redirecting stderr last.
3440 * tests/dd/unblock-sync: Order shell file redirections for
3441 stderr and stdout in the common style.
3442 tests/acl: Likewise.
3444 2006-06-27 Jim Meyering <jim@meyering.net>
3446 * tests/misc/cat-proc: Try to avoid any spurious numeric
3447 differences in frequently-changing /proc/cpuinfo.
3448 Reported by Nelson Beebe.
3450 2006-06-26 Jim Meyering <jim@meyering.net>
3452 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
3453 fd_to_subdirp failure, not just when errno == EACCES.
3454 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
3455 rmdir, here, even though rmdir may happen to be adequate.
3457 * NEWS: rm no longer fails to remove an empty, unreadable directory
3458 * src/remove.c (remove_cwd_entries): If we can't open a directory,
3459 and the failure is not being ignored, try to remove the directory
3460 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
3461 Problem report and test case from Paul Eggert in
3462 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
3464 * tests/rm/empty-inacc: New test, for the above.
3466 Avoid a segfault for wc --files0=- < /dev/null.
3467 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
3469 2006-06-25 Jim Meyering <jim@meyering.net>
3471 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
3472 contains a list of NUL-separated file names.
3474 * src/wc.c: Include "readtokens.h".
3475 (usage): Describe the new option, and adjust the `Usage':
3476 with this option, no FILE may be specified on the command line.
3477 (main): Handle the new option.
3478 * tests/misc/wc-files0: New tests, for the above.
3479 * tests/misc/wc-files0-from: Likewise.
3480 * tests/misc/Makefile.am (TESTS): Add wc-files0.
3482 2006-06-24 Jim Meyering <jim@meyering.net>
3484 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
3486 2006-06-22 Jim Meyering <jim@meyering.net>
3488 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
3489 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
3491 2006-06-19 Jim Meyering <jim@meyering.net>
3493 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
3494 so this check is not run as part of "make distcheck".
3496 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
3498 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
3500 2006-06-18 Jim Meyering <jim@meyering.net>
3502 * tests/misc/pwd-long: Make error output a little clearer.
3504 2006-06-17 Jim Meyering <jim@meyering.net>
3506 * tests/rm/inaccessible: Skip this test on systems without openat
3507 support. Reported by Bob Proulx.
3509 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
3511 * tests/misc/mknod: Improve permission checks to handle
3512 running mkdir test in set-gid directories.
3514 2006-06-14 Jim Meyering <jim@meyering.net>
3516 * tests/du/basic: Revamp not to hard-code file system block sizes.
3518 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3520 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
3523 2006-06-11 Jim Meyering <jim@meyering.net>
3525 * .gitignore: New file.
3526 * Makefile.am (EXTRA_DIST): Add .gitignore.
3528 Setting TIME_STYLE=long-iso in the environment would make the
3529 cp/same-file test fail.
3530 * tests/envvar-check (vars): Add TIME_STYLE to the list.
3531 * tests/cp/same-file: Revert last change.
3532 Source the envvar-check script, to ensure that TIME_STYLE
3533 settings don't affect these tests.
3535 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
3537 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
3538 uses POSIX time stamp formats. Problem reported by John Nixon in
3539 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
3541 2006-06-10 Jim Meyering <jim@meyering.net>
3543 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
3545 Require a "Version N.M" line at the top of the ChangeLog
3546 file only when making the actual release, not when running
3548 * Makefile.maint (maintainer-distcheck): Don't depend on
3550 (alpha beta major): Depend on it here, instead.
3552 2006-06-08 Jim Meyering <jim@meyering.net>
3554 Ensure that cat works with any of the options, -A -v -e -E -T,
3555 when applied to files in /proc and /sys, even when the FIONREAD
3556 ioctl produces nonsensical results. Before this change, cat would
3557 produce no output (or truncated output), for some linux kernels.
3559 * src/cat.c (write_pending): New function, factored out of cat.
3560 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
3561 that there are bytes to read. Some versions of linux-2.6.16 do that.
3562 Write any pending output before returning.
3563 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
3564 * NEWS: Mention this bug fix.
3565 * tests/misc/cat-proc: New file. Test for the above.
3566 * tests/misc/Makefile.am (TESTS): Add cat-proc.
3568 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
3570 * src/expr.c (eval4): Detect overflow properly when multiplying
3573 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
3575 * NEWS: The 'expr' command now detects and reports integer overflow.
3576 (It would be better to use extended precision instead, but that
3577 would be more work.)
3578 * src/expr.c (integer_overflow): New function.
3579 (eval4, eval3): Check for integer overflow.
3581 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
3583 Fix problems when building with Solaris/SVR4/etc. make, which uses a
3584 different and somewhat bogus implementation of VPATH. In the
3585 directory tests/misc, rename tests whose names might appear in the
3586 Automake-generated rules. For example, we can't use a test named
3587 'test', since Automake generates a rule that contains the text
3588 "if test -f ./$$tst; ...", and this might expand to something like
3589 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
3590 which executes the 'test' script rather than the 'test' command.
3591 * tests/misc/false-status: Renamed from tests/misc/false.
3592 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
3593 * tests/misc/sort-merge: Renamed from tests/misc/sort.
3594 ($prog): Set to 'sort' rather than to $PROG.
3595 * tests/misc/test-diag: Renamed from tests/misc/test.
3596 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
3597 in case Solaris make has prepended the directory.
3598 (TESTS): Adjust to above renamings.
3599 * tests/misc/expand: Don't assign to PROG; no longer needed
3600 now that Makefile.am sets PROG to the basename.
3601 * tests/misc/fold: Likewise.
3603 2006-06-03 Jim Meyering <jim@meyering.net>
3605 Make `cp --link --no-dereference' work also on systems where the
3606 link system call cannot create a hard link to a symbolic link.
3607 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
3608 the link syscall on a symlink when it would do the wrong thing.
3609 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
3610 * tests/cp/link-no-deref: New file/test for the above.
3611 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
3612 * NEWS: Mention the change (doesn't affect Linux).
3614 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
3616 Fix some porting problems in the test cases reported by
3617 Ralf Wildenhues for HP-UX 11.23 in:
3618 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
3619 * tests/help-version: Don't assume that \< \> works in sed.
3620 * tests/misc/close-stdout: Don't assume that >&- works.
3621 Add a /dev/full test.
3622 * tests/touch/no-create-missing: Don't assume that >&- works.
3624 2006-05-30 Jim Meyering <jim@meyering.net>
3626 * src/ls.c (usage): Add `v' to the list of sorting-related options.
3629 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3631 * tests/cp/fail-perm: source lang-default.
3632 * tests/rm/inaccessible: Likewise.
3634 2006-05-28 Jim Meyering <jim@meyering.net>
3636 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
3637 Recognize it, too. Reported by Ralf Wildenhues, in
3638 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3640 2006-05-27 Jim Meyering <jim@meyering.net>
3642 * src/chgrp.c: Support new options: --preserve-root and
3643 --no-preserve-root. Somehow this program was skipped when those
3644 options were added to chown, chmod, and rm. Reported by
3645 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
3646 * NEWS: Mention this.
3648 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
3650 * NEWS: Remove mention of --seed. We'll replace it with something
3651 better, and don't want to indicate that it is supported.
3652 * src/sort.c (usage): Likewise.
3654 2006-05-20 Jim Meyering <jim@meyering.net>
3656 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
3658 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
3659 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
3660 FTS_COMFOLLOW. Spotted by Justin Pryzby.
3662 * gnupload: Merge changes from automake, retaining the ""--to...
3663 kludge to placate overzealous `make distcheck' check.
3665 2006-05-19 Jim Meyering <jim@meyering.net>
3667 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
3668 FTS_TIGHT_CYCLE_CHECK directory traversal option.
3669 Reported by Justin Pryzby in http://bugs.debian.org/367691
3671 2006-05-15 Jim Meyering <jim@meyering.net>
3673 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
3674 From Tomas Pospisek.
3676 2006-05-13 Jim Meyering <jim@meyering.net>
3678 * tests/mv/no-target-dir: Test two more cases.
3680 2006-05-11 Jim Meyering <jim@meyering.net>
3682 mv -T DIR EMPTY_DIR no longer fails unconditionally
3683 * src/copy.c (copy_internal): Don't manually prohibit a move where
3684 the destination is an existing directory. Sometimes doing that is
3685 valid. Let the rename system call enforce the rules. That is
3686 allowed only when the source is a directory and the destination
3687 directory (to be replaced) is empty. Reported by Eric Blake.
3688 * tests/mv/no-target-dir: New file/test for this.
3689 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
3690 * NEWS: Mention this.
3692 * tests/mv/atomic: New file/test for yesterday's fix.
3693 * tests/mv/Makefile.am (TESTS): Add atomic.
3695 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
3697 2006-05-10 Jim Meyering <jim@meyering.net>
3699 * src/copy.c (copy_internal): Don't explicitly unlink the destination
3700 when moving a symlink into the place of an existing non-directory.
3701 Reported by Joshua Hudson.
3702 * NEWS: mention this.
3704 2006-05-07 Jim Meyering <jim@meyering.net>
3706 * Makefile.maint (patch-check): Fail if patch generates any output,
3707 even merely for changed offsets.
3709 * src/c99-to-c89.diff: Adjust to reflect new offsets.
3711 * NEWS: Mention changes affecting df, pwd, shred.
3713 2006-05-06 Jim Meyering <jim@meyering.net>
3715 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
3716 system condition where dirent.d_ino != stat.st_ino.
3717 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
3719 2006-05-06 Eric Blake <ebb9@byu.net>
3721 * tests/ls/inode: Expand to test inode from readdir case.
3722 * tests/ls/follow-slink: Expand to test broken links encountered
3723 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
3725 2006-05-06 Eric Blake <ebb9@byu.net>
3727 * tests/mv/leak-fd: Work even on case-insensitive file system.
3729 2006-05-04 Jim Meyering <jim@meyering.net>
3731 * NEWS: Mention the 2006-03-19 pwd-related change that makes
3732 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
3734 2006-05-03 Jim Meyering <jim@meyering.net>
3736 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
3737 Use better macro parameter names: s/basename/key_name/,
3738 s/basefunc/key_cmp_func. Fix typo in comment.
3740 2006-04-29 Eric Blake <ebb9@byu.net>
3742 * src/ls.c (main): On systems with d_type, directories_first only
3743 implies format_needs_type, not format_needs_stat.
3745 2006-05-03 Jim Meyering <jim@meyering.net>
3747 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
3748 after comma in arg list, from Eric Blake.
3750 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
3752 * tests/misc/date (relative-3): New test, derived from a bug
3753 report by John Thomas McDole.
3755 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
3757 New option for ls: --group-directories-first.
3758 It makes ls list directories before files.
3759 * NEWS [New features]: Mention it.
3760 * src/ls.c (sort_type): Rearrange to use as an array index when
3761 choosing sort function; added new sort_numtypes member for
3763 (time_type): Add new time_numtypes member for compile-time check.
3764 (directories_first): New global variable.
3765 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
3766 (long_options): Add --directories-first.
3767 (main): Support new option.
3768 (is_directory): New function.
3769 (extract_dirs_from_files): Use it.
3770 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
3771 (LIST_SORTFUNCTION_VARIANTS): New macros.
3772 (sort_functions): New global variable.
3773 (sort_files): Use it.
3774 (usage): Document new option.
3776 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
3778 * src/shred.c (fillrand): The assertion was way too weak, due to
3779 what must be a typo. Strengthen it to its intended value.
3780 (dopass): Don't use alloca; it's not worth the aggravation here,
3781 since it's used only to get a page-aligned buffer, and page
3782 alignment doesn't buy us much here. I'm suspicious that alloca
3783 causes problems on some hosts, due to a recent bug report by Adam
3784 Waltman: http://bugs.gentoo.org/130246.
3786 2006-04-18 Jim Meyering <jim@meyering.net>
3788 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
3789 sha384sum, sha512sum.
3791 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
3793 * src/chmod.c (describe_change): Adjust to filemode changes.
3794 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
3795 (print_long_format): Use (new) filemodestring rather than
3796 (old) mode_string, so that we get more file types right, at least
3797 in theory. Adjust to filemode changes.
3798 * src/stat.c (human_access): Likewise.
3800 2006-04-18 Jim Meyering <jim@meyering.net>
3802 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
3803 ignore file. This has never been enabled. Reported by Eric Blake.
3805 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
3807 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
3808 bug in Interix. Just call symlink or link directly. All uses changed.
3809 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
3810 * src/stat.c (USE_STATVFS): New macro.
3811 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
3812 (NAMEMAX_FORMAT): define a bit more clearly, now that the
3813 statvfs-using code is a bit more regular.
3814 * src/system.h (sync) [!HAVE_SYNC]: New macro.
3816 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
3818 * NEWS: csplit, nl, expr now conform to POSIX better, and are
3819 more-compatible with traditional Unix, with respect to regular
3821 * src/csplit.c (extract_regexp): Set re_syntax_options to a
3822 value that is compatible with what POSIX requires.
3823 * src/nl.c (build_type_arg): Likewise.
3824 * src/expr.c (docolon): Likewise. Also, don't let anchors match
3825 newline; this fixes an incompatibility with tradition and with POSIX.
3826 Don't warn about leading ^. POSIX says it is unspecified whether
3827 ^ is a special character, which means that implementations can
3828 either treat it as special or not, but either way a warning is not
3829 allowed (unless the regexp is otherwise invalid). Instead, anchor
3830 the expression but treat ^ as an anchor; this is the traditional
3831 behavior (e.g., Solaris 10).
3832 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
3833 and the like as invalid expressions (exit status 2), not as
3834 failure of 'expr' (exit status 3). This is more consistent with
3835 how Solaris behaves.
3836 * tests/expr/basic (fail-a): Adjust exit status to match new expr
3837 behavior, for status 2 versus 3.
3839 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
3840 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
3841 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
3842 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
3843 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
3844 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
3845 (bre61, bre62): New tests.
3846 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
3847 conforming to POSIX.
3850 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
3851 "if !". Do not assume that 'sed' can handle long, newline-free input.
3852 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
3854 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
3856 Adjust to new regex.h API (with new fastmap type), and clean
3857 up the regex storage allocation a bit.
3859 * src/csplit.c (struct control): Put re_compiled member at the
3860 end, since it's large. Change regexpr member from char * to bool;
3861 all uses changed. Add new member fastmap.
3862 (extract_regexp): regexp arg is now char const *, not char *.
3863 Don't bother duplicating the regular expression; it's not needed.
3864 Set fastmap from new fastmap member. Don't bother allocating
3865 a buffer, as the regexp code does a better job than we do.
3866 * src/expr.c (docolon): Allocate and use a fastmap.
3867 Don't bother allocating a buffer.
3868 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
3870 (build_type_arg): New fastmap arg. All uses changed.
3871 Don't bother allocating a buffer, but set a fastmap.
3872 * src/ptx.c (context_regex_string, word_regex_string): Remove.
3873 (context_regex, word_regex): New vars, replacing the above.
3875 (struct regex_data): New type.
3876 (compile_regex): Renamed from alloc_and_compile_regex, since
3877 we no longer allocate storage. Arg is now a struct regex_data *,
3878 not a const char *. All uses changed. Don't allocate the fastmap;
3879 instead, take it from the caller. Don't convert size_t to int,
3880 to avoid arithmetic overflow problems. Don't bother freeing
3881 storage afterwards; it's not worth the aggravation.
3882 * src/tac.c (compiled_separator_fastmap): New ver.
3883 (main): Use it. Don't bother allocating a buffer.
3885 2006-03-30 Jim Meyering <jim@meyering.net>
3887 * src/dd.c (iwrite): Remove assignment without effect.
3888 Reported by Felix Rauch Valenti.
3890 2006-03-22 Eric Blake <ebb9@byu.net>
3892 * src/ptx.c (usage): Remove mention of --copyright/-C.
3893 (main): Alias --copyright to --version plus a deprecation warning.
3894 * NEWS: Mention this.
3896 2006-03-27 Jim Meyering <jim@meyering.net>
3898 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
3899 use of strtod. Tiny patch from Nickolai Zeldovich.
3901 2006-03-11 Eric Blake <ebb9@byu.net>
3903 * tests/misc/dirname: New file.
3904 * tests/basename/Makefile.am: Delete.
3905 * tests/basename/basic: Move to...
3906 * tests/misc/basename: ... this new file. Add some tests,
3907 including fixed behavior for //.
3908 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
3909 * tests/Makefile.am (SUBDIRS): Remove basename.
3910 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
3912 Improvements to dirname/basename handling on platforms like
3913 cygwin with distinct // and with drive letters.
3914 * NEWS: Document new behavior.
3915 * src/basename.c (main): Don't strip suffix from file system
3917 * src/cp.c (target_directory_operand): Use new last_component.
3918 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
3919 traversing the string.
3920 * src/dircolors.c (guess_shell_syntax): Use new last_component.
3921 * src/install.c (target_directory_operand, install_file_in_dir):
3923 * src/ln.c (target_directory_operand, main): Likewise.
3924 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
3925 * src/mv.c (target_directory_operand, movefile): Likewise.
3926 * src/remove.c (rm_1): Likewise.
3927 * src/shred.c (wipename): Likewise.
3928 * src/split.c (next_file_name): Likewise.
3929 * src/su.c (log_su, run_shell): Likewise.
3931 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
3933 * NEWS: nohup diagnostics are now more precise, and nohup now
3934 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
3935 * src/nohup.c (main): Implement this.
3936 * tests/misc/nohup: Test the new behavior.
3938 2006-03-12 Jim Meyering <jim@meyering.net>
3940 * src/copy.c (set_author): Rename function, from preserve_author.
3942 * src/remove.c (AD_pop_and_chdir): Use new macro,
3943 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
3945 * src/system.h (SAME_INODE): Remove definition.
3946 Include "same-inode.h", instead.
3948 2006-03-11 Eric Blake <ebb9@byu.net>
3950 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
3952 2006-03-10 Jim Meyering <jim@meyering.net>
3954 Fix a bug whereby a user with write access to a directory being removed
3955 could cause the removal of that directory to fail with an erroneous
3956 diagnostic about a directory cycle. Reported by Vineet Chadha.
3958 * NEWS: Mention this.
3959 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
3960 leave (and try to rmdir) is the one whose dev_ino is being used to
3961 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
3963 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
3965 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
3966 * src/dd.c (set_fd_flags): Handle file-creation flags on file
3967 descriptors, rather than ignoring them.
3968 * tests/dd/misc: Add test cases for append, nofollow, directory,
3969 and nolinks flags. Simplify redirection to /dev/null in some cases.
3971 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
3972 noatime test never tested anything.
3974 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
3976 * src/dd.c (flags, usage): New flags directory, nolinks.
3977 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
3979 * src/ls.c (usage): Mention that -f disables --color.
3980 Problem reported by Niels Möller.
3982 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
3984 * man/*.x: Add references to syscalls from utilities of the same name.
3986 2006-03-05 Jim Meyering <jim@meyering.net>
3988 * tests/help-version: Set SHELL, if not already set, in order to
3989 avoid failure when `make check' is run through debuild; dircolors
3990 would fail due to lack of $SHELL. Reported by Sven Joachim.
3992 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
3993 * src/base64.c (wrap_write, do_encode, main): Change type of
3994 parameters and locals, wrap_column, form size_t to uintmax_t.
3995 (main): Adjust to use xstrtoumax, accordingly.
3997 2006-03-03 Jim Meyering <jim@meyering.net>
3999 Don't fail when run from an environment with SHELL not a Bourne
4000 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
4001 * tests/dircolors/simple: Invoke each non-failing test with -b.
4002 Reported by Michael Stone.
4004 2006-02-27 Jim Meyering <jim@meyering.net>
4006 * tests/misc/base64: Derive --decode-using tests from the
4009 * tests/misc/base64: Factor out a long constant string.
4010 Split lines to stay within 80 columns.
4012 * tests/misc/Makefile.am (TESTS): Add base64.
4013 * tests/misc/base64: Test base64. From Simon Josefsson.
4015 * src/base64.c (do_decode): Use correct type for parameter,
4016 ignore_garbage: s/size_t/bool/.
4018 * src/base64.c: Don't include .h files already included by system.h:
4019 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
4020 Include "system.h" before the other lib/*.h header files.
4021 Include <sys/types.h> before "system.h".
4022 (wrap_write): Remove declaration of unused local, initial_column.
4023 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
4025 * README: Add base64 to the list.
4027 2006-02-17 Simon Josefsson <jas@extundo.com>
4029 New program: base64.
4030 * AUTHORS: Mention base64.
4032 * man/Makefile.am: Build base64.1.
4033 * man/base64.x: New file.
4034 * src/Makefile.am (bin_PROGRAMS): Add base64.
4035 * src/base64.c: New file.
4037 2006-02-25 Eric Blake <ebb9@byu.net>
4039 In ls, avoid calling stat for --inode (-i), when possible.
4040 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
4041 * src/system.h: ... here, for use in ...
4042 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
4044 (gobble_file): Add inode argument.
4045 (print_dir): Pass inode if available.
4046 (usage): Remove inaccuracy.
4048 2006-02-23 Jim Meyering <jim@meyering.net>
4050 * TODO: Update/correct some obsolete entries.
4052 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
4054 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
4055 * src/join.c (usage): Likewise.
4056 Documentation problem reported by Philip Kensche.
4058 2006-02-20 Eric Blake <ebb9@byu.net>
4060 * man/rm.x: Update documentation to match previous patch.
4062 2006-02-18 Eric Blake <ebb9@byu.net>
4064 New option for rm: --interactive=once (-I).
4065 * NEWS: Document it, along with change to rm --interactive.
4066 * TODO: Remove entry for implementing rm -I
4067 * src/rm.c (INTERACTIVE_OPTION): New enum value.
4068 (interactive_type): New enum.
4069 (long_opts): Let interactive take an optional argument.
4070 (interactive_args, interactive_types): New option arguments.
4071 (usage): Document -I, --interactive=WHEN. Use program_name
4072 instead of a basename.
4073 (main): New -I option, new behavior to --interactive.
4074 * tests/rm/interactive-once: New tests.
4075 * tests/rm/interactive-always: Ditto.
4076 * tests/rm/Makefile.am (TESTS): Run them.
4078 2006-02-18 Jim Meyering <jim@meyering.net>
4080 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
4081 expression match more of the target lines, e.g., those that start with
4082 `-S,' (short option followed by a comma) or that include `=[...]'.
4083 Patch by Nicolas François.
4084 Fix the four offenders thus exposed:
4085 * src/join.c (usage): Use two spaces (not one) to separate the
4086 --first-only option string from its description, so help2man formats
4087 the derived man page properly.
4088 * src/pr.c (usage): Likewise.
4089 * src/uniq.c (usage): Likewise.
4090 * src/install.c (usage): Likewise.
4092 2006-02-15 Jim Meyering <jim@meyering.net>
4094 * Makefile.maint (alpha beta major): For `make major', ensure that the
4095 version string is of the form N.N[.N]*, where N is one or more digits.
4097 2006-02-14 Jim Meyering <jim@meyering.net>
4099 * INSTALL: Update from gnulib.
4101 2006-02-13 Jim Meyering <jim@meyering.net>
4103 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
4105 2006-02-12 Jim Meyering <jim@meyering.net>
4107 * Makefile.maint (patch-check): New target.
4108 (local-checks-available): Add to the list.
4110 2006-02-11 Jim Meyering <jim@meyering.net>
4112 * src/c99-to-c89.diff: New file.
4113 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
4115 * .x-po-check: New file, with exclusions so that `make distcheck'
4117 * Makefile.am (EXTRA_DIST): Add .x-po-check.
4119 rm -r must remove an empty directory, even if it is inaccessible.
4120 * src/remove.c (close_preserve_errno): New function.
4121 (fd_to_subdirp): Don't print a diagnostic in this function.
4122 Do it from the callers instead, unless rmdir succeeds.
4123 (remove_cwd_entries, remove_dir): Adjust callers.
4124 * tests/rm/empty-inacc: New test for the above.
4125 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
4126 * NEWS: Mention this bug fix.
4127 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
4128 a tiny bit less precise: cannot remove `a/1': ... instead of
4129 cannot open directory `a/1': ...
4131 * Makefile.maint (syntax-check-rules): Automatically derive this
4132 list of sc_-prefixed rule names.
4134 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4136 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
4137 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
4138 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
4139 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
4140 go away? was that an accident?)
4141 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
4142 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
4143 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
4144 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
4145 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
4146 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
4147 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
4148 (author_mark_check, makefile_path_separator_check):
4149 Output line numbers, to simplify navigation of Emacs *compilation*
4151 (sc_prohibit_atoi_atof, sc_file_system):
4152 Rework slightly so that Makefile.maint doesn't get reported as a
4153 violation of its own syntax rules.
4154 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
4155 it at run-time (which didn't work with Bison). Fix a makefile typo,
4156 caught by Makefile.maint itself: spaces where a tab should be.
4157 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
4158 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
4159 Ignore djgpp and man subdirectories, to avoid false matches with
4160 Bison and coreutils, respectively. Use sort -u to remove the
4161 resulting duplicates.
4162 * gnupload: Rework slightly to avoid bogus warning from
4163 sc_two_space_separator_in_usage.
4165 2006-02-10 Jim Meyering <jim@meyering.net>
4167 Use gzip's --rsyncable option only if it's available.
4168 * Makefile.maint (gzip_rsyncable): New variable.
4171 2006-02-08 Jim Meyering <jim@meyering.net>
4173 * Makefile.maint (local-checks-available): Define in terms of
4174 the expansion, $(syntax-check-rules), rather than the single,
4175 top-level target `syntax-check', so that it's easier to exclude
4176 individual rules (via $(local-checks-to-skip)).
4177 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
4179 2006-02-07 Jim Meyering <jim@meyering.net>
4181 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
4182 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
4184 * tests/help-version (expected_failure_status_vdir):
4185 Redirect an expected disk-full diagnostic to /dev/null.
4187 2006-02-06 Jim Meyering <jim@meyering.net>
4189 * src/unexpand.c (usage): Use two spaces (not one) to separate the
4190 --first-only option string from its description, so help2man formats
4191 the derived man page properly.
4192 * src/rm.c (usage): Likewise for --no-preserve-root.
4193 * src/chown.c (usage): Likewise.
4194 * src/chgrp.c (usage): Likewise.
4196 Add a rule to ensure that the above doesn't happen again.
4197 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
4198 (syntax-check-rules): Add it.
4199 * .x-sc_two_space_separator_in_usage: New empty file.
4200 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
4202 2006-02-06 Jim Meyering <jim@meyering.net>
4204 * src/cp.c (usage): Use two spaces (not one) to separate each
4205 option string from its description, so help2man formats the
4206 derived man page properly.
4207 * src/mv.c (usage): Likewise.
4208 Patch from Nicolas François in http://bugs.debian.org/351601.
4210 2006-02-04 Jim Meyering <jim@meyering.net>
4212 * src/copy.c (copy_internal): cp -RL would fail when encountering
4213 the same directory more than once in the hierarchy beneath a single
4214 command-line argument. That is legitimate, e.g. when there are
4215 two or more symbolic links, each pointing to some directory that
4216 would not otherwise be copied. Reported by Christophe LYON.
4217 * tests/cp/cp-deref: New file. Test for today's fix.
4218 * tests/cp/Makefile.am (TESTS): Add cp-deref.
4219 * NEWS: Document this.
4221 2006-02-03 Jim Meyering <jim@meyering.net>
4223 * configure.ac: Require automake-1.9.6, not 1.8.3.
4225 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4227 * src/od.c (usage): Mention that -t a ignores high order bit.
4228 Documentation problem reported by Ed Avis.
4230 2006-02-01 Jim Meyering <jim@meyering.net>
4232 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
4234 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4236 * src/head.c (main): Use a better diagnostic when someone uses a
4237 trailing numeric option in an invalid way. Problem reported by
4239 * src/tail.c (parse_options): Likewise.
4241 2006-01-30 Jim Meyering <jim@meyering.net>
4243 * man/wc.x: Include `count' keyword in man page synopsis,
4244 per suggestion from http://bugs.debian.org/181585.
4246 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
4248 * src/df.c (show_dev): If the file system claims to have
4249 more available than total blocks, report the number of used
4250 blocks as being total - available (a negative number) rather
4251 than as garbage. Problem reported by Toralf Foerster.
4253 2006-01-24 Jim Meyering <jim@meyering.net>
4255 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
4256 to put a regular file in O_NONBLOCK mode fails with EPERM.
4257 That happens on Linux (up to 2.6.15) when using tail -f on a file with
4258 the append-only attribute. Reported by Dean Gaudet. For details,
4259 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
4260 * NEWS: Mention this fix.
4261 * tests/tail-2/append-only: New file. Test for the above.
4262 * tests/tail-2/Makefile.am (TESTS): Add append-only.
4263 * tests/Makefile.am (check-root): Add tail-2/append-only
4265 2006-01-21 Jim Meyering <jim@meyering.net>
4267 * NEWS: Mention fts-related improvements and bug fixes.
4269 2006-01-19 Jim Meyering <jim@meyering.net>
4271 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
4272 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
4274 2006-01-18 Jim Meyering <jim@meyering.net>
4276 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
4278 2006-01-17 Jim Meyering <jim@meyering.net>
4280 Now that fts no longer changes the current working directory, adjust
4281 its clients accordingly -- note that du.c uses fts but doesn't need
4282 any adjustment, since it doesn't operate on the actual files,
4283 but rather just uses the stat buffers provided by fts.
4285 * src/chown-core.c: Include "openat.h".
4286 Don't include "lchown.h".
4287 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
4288 calling openat, lchownat, chownat, rather than open, lchown, chown.
4290 * src/chmod.c: Include "openat.h".
4291 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
4293 * tests/du/long-from-unreadable: New test, to exercise one small
4296 2006-01-13 Jim Meyering <jim@meyering.net>
4298 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
4299 addition of new directories under tests/.
4301 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
4304 2006-01-12 Jim Meyering <jim@meyering.net>
4306 * tests/du/long-sloop: Adjust not to hard-code the expected
4307 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
4308 from that of GNU libc. Reported by Paul Eggert.
4310 * tests/du/long-sloop: Create file at end of symlink chain.
4312 * tests/misc/test: New file, with a test for one of the
4313 bugs fixed by yesterday's test.c changes.
4314 * tests/misc/Makefile.am (TESTS): Add test.
4316 2006-01-11 Jim Meyering <jim@meyering.net>
4318 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
4319 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
4320 a very long sequence of symbolic links (not necessarily a loop).
4321 * tests/du/Makefile.am (TESTS): Add long-sloop.
4323 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
4325 * src/test.c (test_syntax_error): Append a newline. All callers
4326 changed, except for the ones that didn't already append a newline.
4327 Bug reported by Eric Blake.
4329 2006-01-11 Jim Meyering <jim@meyering.net>
4331 * src/system.h (X2NREALLOC): Now that verify_true is no longer
4332 void, cast its result to void, to avoid gcc's warning that
4333 ``left-hand operand of comma expression has no effect''.
4334 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
4336 2006-01-10 Jim Meyering <jim@meyering.net>
4338 * tests/chmod/no-x: Add a test for today's fts.c fix.
4340 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
4342 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
4343 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
4345 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
4347 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
4348 Use verify_true instead of verify_expr, to sync with gnulib.
4350 2006-01-08 Jim Meyering <jim@meyering.net>
4352 * src/date.c (usage): Adjust the formatting of the entries for
4353 %::z and %:::z (separate with two spaces, not one) so that help2man
4354 formats them properly. Reported by Philip Rowlands.
4356 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
4358 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
4360 2006-01-06 Jim Meyering <jim@meyering.net>
4362 * Makefile.maint (copyright-check): Use date +%Y in place of
4365 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
4366 First off, the attribute should have been `volatile' (not static)
4367 to avoid longjmp-related risk of clobber. Secondly, now there is
4368 no longer any risk of a local variable being clobbered, so there's
4369 no need for any attribute at all.
4371 2006-01-05 Jim Meyering <jim@meyering.net>
4373 * src/remove.c: Give a few functions the inline attribute.
4374 (AD_pop_and_chdir): Use gotos to avoid some duplication.
4375 (AD_push): Rewrite an assertion so that the entire computation
4376 goes away when assertions are turned off.
4378 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
4379 It's already defined in "system.h".
4380 * Makefile.maint: Add a FIXME comment.
4382 2006-01-04 Jim Meyering <jim@meyering.net>
4384 * ChangeLog: Remove entries from 2005-10-22 and earlier.
4385 * ChangeLog-2005: New file, for entries up to version 5.92.
4387 2006-01-03 Jim Meyering <jim@meyering.net>
4389 * tests/du/no-x: Also allow a slightly different diagnostic -- the
4390 one you get when using openat-enabled fts.c and du (coming soon).
4391 * tests/chmod/no-x: Likewise.
4392 * tests/chgrp/no-x: Likewise.
4394 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
4396 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
4398 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
4399 (restricted_chown): Return it, if the file cannot be accessed due
4400 to EPERM, or if no uid or gid are required, or if the file is
4401 neither a directory nor a regular file. Rewrite to avoid gotos.
4402 (change_file_owner): Handle RC_do_ordinary_chown case.
4403 Rewrite to avoid gotos.
4404 * tests/chgrp/basic: Make sure we can change the group of
4407 * src/date.c (usage): Explain %g, %G, and %V a bit better.
4409 2006-01-02 Jim Meyering <jim@meyering.net>
4411 * src/copy.c (set_owner): Correct a comment.
4413 * src/tail.c (parse_options): Change warning to say that --retry
4414 is useful `mainly' (not `only') when following by name.
4415 Reported here: http://bugs.debian.org/273781
4417 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
4419 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
4420 * src/copy.c: Include lchmod.h.
4421 (copy_internal): Use lchmod rather than chmod.
4422 * src/cp.c: Include lchmod.h.
4423 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
4424 * src/mkdir.c: Include lchmod.h.
4425 (usage): Clarify -m's operation.
4426 (main): Use lchmod rather than chmod. Don't use lchmod unless the
4427 new mode contains bits outside the 777 range.
4428 * src/mkfifo.c (usage): Clarify -m's operation.
4429 (main): If -m is given, don't invoke chmod; use umask 0 instead.
4430 Report an error if -m asks for bits outside the 777 range.
4431 * src/mknod.c (usage, main): Likewise.
4433 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
4435 2005-12-27 Jim Meyering <jim@meyering.net>
4437 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
4438 (sc_prohibit_assert_without_use): New rule.
4439 (syntax-check-rules): Add it to the list.
4440 * .x-sc_prohibit_assert_without_use: New empty file.
4441 * Makefile.am (EXTRA_DIST): Add it.
4443 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
4445 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
4446 Don't include <assert.h>; it wasn't used.
4448 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
4450 * src/chown-core.c (restricted_chown):
4451 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
4452 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
4453 | O_NOFOLLOW too, for consistency with other dir-openers.
4454 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
4455 (is_empty_dir): Likewise.
4456 * src/shred.c (wipename): Likewise. Don't bother trying to open
4457 dir for writing, since POSIX prohibits it.
4459 2005-12-22 Jim Meyering <jim@meyering.net>
4461 * tests/help-version: Redirect stderr to /dev/full, to suppress
4462 write error diagnostic.
4464 2005-12-19 Jim Meyering <jim@meyering.net>
4466 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
4467 Avoid a minor race condition when `-m MODE' is specified, by using
4468 open, fchown, and close rather than just chown. To do that reliably --
4469 even with an overly restrictive umask -- ensure that each mkdir,
4470 mknod and mkfifo call uses a mode including at least owner-read access.
4471 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
4472 the subsequent chown (or equivalent open,fchown,close) fails.
4473 * tests/misc/mknod: New tests.
4474 * tests/misc/Makefile.am (TESTS): Add mknod.
4476 2005-12-17 Jim Meyering <jim@meyering.net>
4478 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
4479 e.g., on a named pipe.
4480 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
4481 place of all uses, since it is guaranteed (system.h) to be defined.
4483 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
4485 Add POSIX ACL support
4486 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
4487 is no requirement for ACL support; particularly, it does not exist
4488 on systems that have POSIX ACLs.
4489 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
4490 * src/cp.c (umask_kill): With default acls, the umask is not to be
4491 applied. Remove umask_kill, don't change the process umask, and let
4492 the kernel apply the umask where appropriate.
4493 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
4494 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
4496 (copy_reg, copy_internal): Use copy_acl and set_acl
4497 instead of fchown/chown. Fix the logic for POSIX ACLs.
4498 (chown_succeded): Remove; we now always copy acls and
4499 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
4500 did a chown before or not.
4501 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
4502 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
4503 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
4504 to link with it via $(LIB_ACL), for the utilities that need it.
4506 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
4508 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
4509 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
4510 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
4511 value is now signified by whether cwd_errno is null.
4512 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
4513 pointer-to-bool to pointer-to-errno-value. All callers changed.
4514 (rm_1): Don't bother setting a local cwd failure flag and then
4515 ORing it into the caller's. Just set the caller's.
4516 (rm): Use cwd failure errno value to print a slightly-better
4519 2005-12-15 Jim Meyering <jim@meyering.net>
4521 * src/stat.c (print_it): Properly handle a backslash at the
4522 end of a --printf format string. Reported by Paul Eggert.
4523 * tests/misc/stat-printf (end-bs): Add a test for the above.
4525 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
4527 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
4528 Don't assume /etc/passwd contains user names; use 'id' instead.
4530 2005-12-15 Jim Meyering <jim@meyering.net>
4532 stat: revert behavior of --format=FMT (-c)
4533 stat: add new option: --printf=FMT
4534 * NEWS: Mention this.
4535 * src/stat.c (isodigit, octtobin, hextobin): Define.
4536 (PRINTF_OPTION): Define.
4537 (interpret_backslash_escapes, trailing_delim): New globals.
4538 (usage): Document them. Alphabetize on long option names.
4539 (print_esc_char): New function.
4540 (print_it): Rewrite, in order to handle backslash escapes.
4541 (main): Handle new option. Set globals for --format, too.
4543 * tests/misc/stat-printf: Test --printf and --format.
4544 * tests/misc/Makefile.am (TESTS): Add stat-printf.
4546 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
4548 * NEWS: sort now reports incompatible options.
4549 * src/sort.c (incompatible_options, check_ordering_compatibility):
4551 (main): Use them. Don't bother with a usage message for
4552 "sort -c a b", for consistency with other error diagnostics.
4553 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
4556 * src/cat.c (main): Undo previous change. close_stdout already
4557 does the check, so the previous change wasn't necessary.
4559 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
4561 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
4563 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
4565 Install a more-conservative approach for sort -R. It's the
4566 same basic idea as the existing code, except it uses the full ISAAC
4567 approach (called the "more kosher" approach in the existing comments).
4568 This makes "sort -R" quite a bit slower (about a factor of 2 on my
4569 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
4570 better to be conservative here at first, and review any performance
4571 improvements carefully.
4572 * .x-sc_require_config_h: Add src/rand-isaac.c.
4573 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
4574 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
4575 (shred_SOURCES, sort_SOURCES): Remove.
4576 (EXTRA_DIST): Add rand-isaac.c.
4577 * src/rand-isaac.c: Revert to what used to be in shred.c, without
4578 changing it to allow for varying numbers of words in the state.
4579 Alter so that we include rand-isaac.c directly rather than
4580 compiling it and linking to it. Don't include config.h or
4581 system.h; that's the includer's responsibility.
4582 Omit functions that are specific to shred.
4583 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
4584 (isaac_step, struct irand_state):
4585 Resurrect these, with the same defns that used to be in shred.c.
4586 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
4587 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
4589 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
4590 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
4591 (irand_init, irand32, irand_mod):
4592 Number of words is constant again.
4593 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
4594 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
4595 * src/sort.c: Likewise.
4596 * src/shred.c (fillrand, dopass, main): Undo previous change.
4597 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
4599 * src/sort.c: Don't include md5.h; it wasn't needed.
4600 (struct keyfield): Rename random_hash to random, for consistency
4601 with the other member names. All uses changed.
4602 (usage): Tweak wording to mention STRING for --seed option.
4603 (short_options): Rorder for consistency with other programs.
4604 (rand_state): Now a struct, not a pointer to one. All uses changed.
4605 (HASH_WORDS, HASH_SIZE): Remove.
4606 (get_hash): Remove comments around resbuf size, since we can assume C89.
4607 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
4608 (keycompare): Adjust to the new get_hash.
4610 (badfieldspec): Omit recently-introduced comment; it isn't needed.
4611 (main): Don't set need_random simply because gkey has it set; that
4612 doesn't necessarily mean we'll need random numbers.
4613 Redo seeding to match new get_hash approach.
4615 2005-12-10 Jim Meyering <jim@meyering.net>
4617 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
4619 Avoid shred segfault on 64-bit systems.
4620 * src/rand-isaac.c (isaac_refill): Don't try to negate a
4621 local of type uint32_t. Make the local an `int' instead.
4623 * NEWS: Mention sort's new options.
4625 * src/rand-isaac.c (isaac_mix): Declare to be static.
4626 Mark all other functions as `extern' so the tight-scope
4627 part of `make distcheck' passes once again.
4628 * src/rand-isaac.h (isaac_mix): Remove declaration.
4630 * src/sort.c (get_hash): Change position of `*' in parameter
4631 type to conform with convention.
4632 (main): Split a long line so it fits in 80 columns.
4633 (keycompare): Remove stray SPACE before TAB that was
4634 causing `make distcheck' to fail.
4636 * src/shred.c: Don't include gethrxtime.h. No longer needed.
4638 * tests/misc/sort-rand: New file: basic tests for the new options.
4639 * tests/misc/Makefile.am (TESTS): Add sort-rand.
4641 2005-12-10 Frederik Eaton <frederik@ofb.net>
4643 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
4644 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
4645 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
4646 Make state size runtime-configurable.
4647 (isaac_new, isaac_copy): New functions.
4648 * src/rand-isaac.h: New file.
4649 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
4650 (fillrand, main): Adjust to the fact that the state size is now
4651 runtime-configurable.
4652 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
4653 (usage): Add options --random-sort and --seed to implement a random
4655 Include md5.h and rand-isaac.h.
4656 (get_hash): New function.
4657 (rand_state): New var.
4658 (HASH_WORDS, HASH_SIZE): New macros.
4660 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
4662 * tests/dd/misc: Add test for dd iflags=noatime.
4664 2005-12-09 Jim Meyering <jim@meyering.net>
4666 * src/sort.c (usage): Mention white space vs -b and -t options.
4669 2005-12-09 Eric Blake <ebb9@byu.net>
4671 * src/test.c (main): Fix misleading comment.
4673 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
4675 * NEWS: Mention dd's new noatime flag.
4676 * src/system.h (O_NOATIME): Define to 0 if not already defined.
4677 * src/dd.c (flags, usage): Add support for noatime flag.
4679 2005-12-07 Jim Meyering <jim@meyering.net>
4681 Distribute the cvsu script, used only by `make syntax-check'.
4682 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
4683 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
4684 distribute a copy of this script.
4685 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
4687 * tests/mv/acl: exit-77 before the trap, not after, if we fail
4688 to create a temporary directory on another partition.
4689 From Andreas Gruenbacher.
4691 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
4693 * man/basename.x: Cross-reference to dirname and readlink.
4694 * man/dirname.x: Cross-reference to basename and readlink.
4696 2005-12-05 Andreas Gruenbacher
4698 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
4699 (set_owner, preserve_author): New functions, factored out of copy_reg.
4700 (copy_reg): Use them.
4701 (copy_internal): Use them here, too.
4703 2005-12-04 Jim Meyering <jim@meyering.net>
4705 * src/sleep.c (usage): Say what happens with two or more arguments.
4706 Suggested by Justin Pryzby.
4708 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
4711 2005-12-03 Jim Meyering <jim@meyering.net>
4713 * src/rm.c (long_opts): Change the name of each undocumented, for-
4714 testing-only option to start with `-', so that it cannot render
4715 ambiguous any prefix it happens to share with some other option name.
4716 Problem reported by Eric Blake.
4717 * src/head.c (long_options): Likewise.
4718 * src/tail.c (long_options): Likewise.
4720 * tests/misc/head-elide-tail: Update uses of undocumented, for-
4721 testing-only --presume* options to start with `---'.
4722 * tests/rm/dangling-symlink: Likewise.
4723 * tests/rm/dir-no-w: Likewise.
4724 * tests/rm/isatty: Likewise.
4726 2005-11-30 Jim Meyering <jim@meyering.net>
4728 * Makefile.maint: Add a comment about cvsu.
4730 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
4732 * NEWS: df updates for "none", "proc", inaccessible file systems.
4733 * src/df.c (show_point): Ignore inaccessible file systems.
4734 (usage): -a includes dummy file systems, not size-0 file systems.
4736 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
4737 to avoid collision with POSIX name space. All uses changed.
4739 2005-11-24 Jim Meyering <jim@meyering.net>
4741 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
4742 * tests/acl: Add `$0: ' prefix to diagnostics.
4744 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
4746 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
4748 * src/copy.c: Improve performance a bit by optimizing away
4749 unnecessary system calls and going to a block size of at least
4750 8192 (on normal hosts, anyway). This improved performance 5% on my
4751 Debian stable host (2.4.27 kernel, x86, copying from root
4752 ext3 file system to itself).
4753 Include "buffer-lcm.h".
4754 (copy_reg): Omit last argument. All callers changed.
4755 Use xmalloc to allocate rather than trusting alloca
4756 (which is unwise with large block sizes).
4757 Declare locals more locally, if possible.
4758 Use uintptr_t words instead of int words, for a bit more speed
4759 when looking for null blocks on 64-bit hosts.
4760 Optimize away reads of zero bytes on regular files.
4761 In the typical case, insist on 8 KiB buffers, at least.
4762 Avoid unnecessary extra call to fstat when checking for sparse files.
4763 Avoid now-unnecessary cast to off_t, and "0L".
4764 Avoid unnecessary test of *new_dst when checking for same owner
4767 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
4769 * src/remove.c (rm): Don't assume C99 for-loop syntax.
4771 2005-11-22 Jim Meyering <jim@meyering.net>
4773 * src/remove.c (AD_push): Remove debugging cruft.
4775 * tests/rm/unread2 (rm): Change expected diagnostic,
4776 `cannot open directory' to `cannot remove', to align with
4778 * tests/rm/rm2: Ensure that rm now continues removing entries
4779 even after certain types of failure.
4781 * src/remove.c: Rewrite. Now, this module is reentrant on systems
4782 that provide openat (Solaris), and on systems like Linux+procfs
4783 where our openat emulation code is reentrant. This also fixes a
4784 few low-probability leaks and eliminates some code that could,
4785 in very unusual circumstances, cause rm() (via a callee) to exit.
4786 * NEWS: Mention this.
4788 * configure.ac: Put copyright dates all on one line so the
4789 emacs function that updates them works properly.
4791 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
4793 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
4794 Problem reported by Eric Blake.
4795 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
4796 we get a standard-conforming compiler. This relies on the new
4797 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
4798 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
4799 m4/c.m4 can go away with Autoconf 2.60 comes out.
4801 2005-11-17 Jim Meyering <jim@meyering.net>
4803 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
4804 (AD_mark_current_as_unremovable): Likewise, but for a local.
4807 * tests/mv/acl: Let traps handle removing temporary directories.
4809 Expect acl-related tests to fail, until the corresponding
4810 patches are committed.
4811 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
4812 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
4814 ACL tests, from Andreas Gruenbacher.
4815 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
4816 * tests/mv/Makefile.am (TESTS): Add acl.
4817 * tests/cp/Makefile.am (TESTS): Add acl.
4819 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
4821 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
4823 * NEWS: Improve quality of ln's diagnostics.
4824 * src/ln.c (do_link, usage): Likewise.
4825 (do_link): Don't use alloca on a buffer of unbounded size.
4827 2005-11-16 Jim Meyering <jim@meyering.net>
4829 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
4830 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
4831 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
4832 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
4833 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
4835 2005-11-14 Jim Meyering <jim@meyering.net>
4837 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
4839 2005-11-13 Jim Meyering <jim@meyering.net>
4841 * announce-gen: Accept new option, --gpg-key-id=ID and
4842 emit a blurb telling how to use the .sig files.
4843 * Makefile.cfg (gpg_key_ID): Define.
4844 * Makefile.maint (announcement): Use new option and key.
4846 Require that most .c files include <config.h>.
4847 * Makefile.maint (sc_require_config_h): New rule.
4848 (syntax-check-rules): Add it.
4849 * .x-sc_require_config_h: New file listing exceptions to the
4850 above rule. Some are legit, others are simply grandfathered in.
4851 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
4853 2005-11-12 Jim Meyering <jim@meyering.net>
4855 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
4857 2005-11-11 Jim Meyering <jim@meyering.net>
4859 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
4860 Mention new readlink options in 5.3.0's `New features' section.
4861 Spotted by Thomas Hood.
4863 2005-11-08 Jim Meyering <jim@meyering.net>
4865 * NEWS: Merge in changes from b5_9x branch.
4867 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
4869 * NEWS: ls now defaults to --time-style='locale', which in turn acts
4870 like --time-style='posix-long-iso' if the locale settings are messed up.
4871 * src/ls.c (decode_switches): Implement this.
4873 2005-11-08 Jim Meyering <jim@meyering.net>
4875 * tests/du/2g: s/expensive/very expensive/ in a comment.
4878 2005-10-17 Eric Blake <ebb9@byu.net>
4880 * src/ls.c (usage): Fix descriptions of --sort, --time.
4881 Reported by Vitaly A. Ostanin.
4883 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
4885 * src/ln.c: Include filenamecat.c.
4886 (FILE_BASENAME_CONCAT): Remove.
4887 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
4888 (main): Use file_name_concat, base_name, and strip_trailing_slashes
4889 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
4892 2005-11-04 Jim Meyering <jim@meyering.net>
4894 * src/du.c (process_file): Don't overflow for files of size >= 2^31
4895 on systems with stat.st_blocks of a signed 32-bit type.
4896 This bug causes trouble on some AIX 5.1 systems.
4897 Report and trivial patch from Paul Townsend:
4898 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
4899 * NEWS: Mention this.
4901 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
4902 * tests/du/Makefile.am (TESTS): Add it here.
4903 * tests/very-expensive: New file.
4904 * tests/Makefile.am (EXTRA_DIST): Add it here.
4905 * tests/cp/perm: Mark this test as `very-expensive', too.
4907 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
4909 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
4911 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
4913 * src/rm.c (usage): Don't mention rm -d.
4915 2005-11-02 Jim Meyering <jim@meyering.net>
4917 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
4918 From Andreas Schwab.
4920 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
4921 `M+N records in/out' lines don't pollute `make check' output.
4923 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
4924 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
4925 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
4926 to indicate that the input file should be piped into the command
4927 under test (via `cat FILE | $prog ...').
4929 * src/remove.c (remove_entry): Emit a better diagnostic when rm
4930 (without -r) fails to remove a directory on a non-Linux system.
4931 This change affects only newer Solaris systems (with priv_*
4932 functions like priv_allocset). Reported by Keith Thompson.
4934 * tests/rm/dir-nonrecur: New file/test for the above fix.
4935 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
4937 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
4939 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
4940 POSIX 1002.1-2001 requires.
4941 * src/tail.c (parse_obsolete_option): Implement this.
4942 Problem reported by Vincent Lefevre.
4943 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
4944 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
4945 (test_vector): Add special cases for _POSIX2_VERSION, and
4946 regularize the old ones a bit.
4947 * tests/touch/obsolescent: Add y2000 test.
4949 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
4951 * src/dd.c (skip): Fix off-by-one error reported by
4952 Theodoros V. Kalamatianos.
4954 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
4956 * tests/mkdir/p-3: Require that the test be run as non-root.
4957 Problem and trivial fix reported by Theodoros V. Kalamatianos.
4959 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
4961 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
4962 boundary between DEST and SOURCE in the result.
4964 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
4966 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
4967 back to text, to sync with documentation and for backwards
4970 2005-10-25 Jim Meyering <jim@meyering.net>
4972 * tests/dircolors/simple (other-wr): Add an explicit test for
4973 the dircolors bug (NULL-dereference) fixed yesterday.
4975 2005-10-24 Jim Meyering <jim@meyering.net>
4977 * src/tac.c (tac_file): When determining whether a file is seekable,
4978 also test whether it is a tty. Using only the lseek-based test would
4979 give a false positive on Solaris. Reported by Peter Fales.
4981 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
4983 * tests/install/d-slashdot: New test, for "install -d" failure.
4984 * tests/install/Makefile.am (TESTS): Add d-slashdot.
4985 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
4986 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
4988 2005-10-24 Jim Meyering <jim@meyering.net>
4990 * src/dircolors.c (ls_codes): Add missing comma.
4991 Anonymous report and patch from
4992 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
4994 * src/dircolors.c: Add compile-time assertion that the slack_codes
4995 and ls_codes arrays have the same number of elements. This would
4996 have prevented the above-fixed bug.
4998 * src/expand.c (parse_tab_stops): Add a comment to make this function
4999 identical to the one in unexpand.c.
5000 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
5001 identical to the one in expand.c.
5003 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
5005 2005-10-23 Jim Meyering <jim@meyering.net>
5007 * src/md5sum.c (digest_check, main): Use ptr_align rather than
5008 a dangerous pointer-value-to-`unsigned' cast.
5009 * NEWS: mention the new sha* programs.
5010 * AUTHORS: Add new sha* programs.
5012 2005-08-28 David Madore <david.madore@ens.fr>
5014 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
5015 * README: Add their names to the list.
5016 * src/md5sum.c: Provide framework for computing sha-2 hashes.
5017 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
5018 Rules for compiling sha-2 utilities
5019 (noinst_HEADERS): Remove checksum.h.
5020 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
5022 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
5023 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
5024 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
5025 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
5026 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
5027 sha384sum, sha512sum test scripts here rather that each in its
5030 2005-08-28 David Madore <david.madore@ens.fr>
5032 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
5033 of the FIPS test vectors).
5035 2005-10-23 Jim Meyering <jim@meyering.net>
5037 * configure.ac: Use 6.0-cvs as the version string.
5038 * NEWS: Adjust accordingly.
5043 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
5045 Copying and distribution of this file, with or without
5046 modification, are permitted provided the copyright notice
5047 and this notice are preserved.