1 2007-02-14 Paul Eggert <eggert@cs.ucla.edu>
3 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4 * src/dircolors.c: Include c-strcase.h.
5 (dc_parse_stream): Use c_strcasecmp rather than
6 strcasecmp to avoid unreliable results in locales like Turkish
7 where strcasecmp is incompatible with the C locale.
9 2007-02-13 Jim Meyering <jim@meyering.net>
11 Also check for and print stderr output, in case a program fails.
12 * tests/misc/tty-eof: Occasionally (not reproducible), this
13 test would fail, with one or more programs exiting nonzero, e.g.,
14 tty-eof: sha224sum exited with status 1 (expected 0)
15 Now, maybe we'll get a clue, the next time that happens.
17 2007-02-12 Jim Meyering <jim@meyering.net>
19 * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
21 * tests/misc/pwd-unreadable-parent: Skip the test if we're
22 definitely using the replacement.
23 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
25 2007-02-10 Jim Meyering <jim@meyering.net>
27 Remove excess leading spaces that would make help2man misbehave.
28 * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
29 * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
30 * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
31 * src/date.c (usage): Use two spaces after each optional flag, not one.
32 Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
34 * Makefile.maint (longopt_re): Relax the regexp, making square
35 brackets optional, so it matches the newly reported violations, too.
37 * src/csplit.c (usage): Use two spaces (not one) to separate
38 each option string from its description, so help2man formats
39 the derived man page properly. Reported by Thomas Huriaux in
40 <http://bugs.debian.org/410407>.
41 * src/df.c (usage): Likewise.
42 * src/du.c (usage): Likewise.
43 * src/install.c (usage): Likewise.
44 * src/ls.c (usage): Likewise.
46 2007-02-03 Jim Meyering <jim@meyering.net>
48 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
49 * NEWS: Mention the bug fix.
50 * tests/misc/pwd-unreadable-parent: New file.
51 * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
53 2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
55 * NEWS: Document fix for cp --preserve=mode.
56 * src/copy.c (copy_internal): Omit the group- or other-writeable
57 permissions when creating a directory, to avoid a race condition
58 if the special mode bits aren't right just after the directory is
60 * src/cp.c (make_dir_parents_private): Likewise.
61 * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
64 * NEWS: Document fix for cp --parents.
65 * src/cp.c (make_dir_parents_private): Report the error sooner with
66 "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
67 creating the directory, DEST/DIR.
68 * tests/cp/cp-parents: Test for the non-race-condition bug fixed
71 2007-02-02 Jim Meyering <jim@meyering.net>
73 * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
75 * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
76 consistent, so this can be applied with patch -p0.
77 Reported by Matthew Woehlke.
79 * Makefile.maint (patch-check): Use patch with its -p2 option,
80 since that makes this check slightly more strict.
82 2007-01-29 Jim Meyering <jim@meyering.net>
85 * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
86 determine dev/inode or upon detecting a symlink loop.
88 * src/ls.c: Rename three global variables.
89 (cwd_file): Rename from 'files'.
90 (cwd_n_alloc): Rename from 'nfiles'.
91 (cwd_n_used): Rename from 'files_index'.
93 Shave 8 bytes off the size of "struct fileinfo".
94 * src/ls.c (fileinfo): Put all members of type "bool" together.
96 2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
98 Modify "ls" to sort its data faster, using the new gnulib mpsort
99 module rather than qsort. This is particularly a win in
100 environments where strcoll is slow, since mpsort typically calls
101 strcoll less often than qsort does.
102 * bootstrap.conf (gnulib_modules): Add mpsort.
103 * src/ls.c: Include mpsort.h.
104 (sorted_file, sorted_file_alloc): New vars, for a new vector of
105 pointers to the file info, for speed.
106 (clear_files, extract_dirs_from_files, sort_files, print_current_files):
107 (print_many_per_line, print_horizontal, print_with_commas):
108 (calculate_columns): Set and use new vector.
109 (initialize_ordering_vector): New function.
111 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
113 Adjust to today's change to gnulib, which added a module for
114 string.h to replace the little include files like strcase.h.
115 * src/dircolors.c: Don't include strcase.h.
116 * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
118 2007-01-26 Jim Meyering <jim@meyering.net>
120 * src/dd.c (advance_input_after_read_error): Change diagnostic to
121 say "invalid file offset" rather than "screwy file offset".
123 * .x-sc_cast_of_argument_to_free: Remove this file.
124 * Makefile.am (EXTRA_DIST): Likewise.
126 2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
128 * src/sort.c (create_temp): Remove superfluous access-X_OK
129 check. find_in_path does this for us.
131 2007-01-24 Jim Meyering <jim@meyering.net>
133 Remove usually-skipped test.
134 * tests/cp/open-perm-race: Remove this file. It is subsumed
136 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
137 * tests/sort/Makefile.am: Regenerate.
139 Pass "make distcheck" again.
140 * src/sort.c (usage): Split a diagnostic that had grown to be
141 longer than the C89 maximum of 509 bytes.
142 * .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
143 FIXME: this is just temporary, while we wait to remove the offending
145 * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
146 * Makefile.maint (sc_cast_of_argument_to_free): Use the
147 canonical, $$($(CVS_LIST_EXCEPT)).
148 * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
150 2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
152 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
153 like it will be approved. Also add --check=quiet, --check=silent
154 as long aliases, and --check=diagnose-first as an alias for -c.
155 * doc/coreutils.texi (sort invocation): Document this.
156 Also, mention that sort -c can take at most one file.
157 * src/sort.c: Implement this.
159 (usage): Document the change.
160 (CHECK_OPTION): New constant.
161 (long_options): --check now takes an optional argument, and is now
162 treated differently from 'c'.
163 (check_args, check_types): New constant arrays.
164 (check): New arg CHECKONLY, which suppresses diagnostic if -C.
165 (main): Parse the new options.
166 * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
169 2007-01-24 Jim Meyering <jim@meyering.net>
172 * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
173 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
175 Don't depend on "which".
176 * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
177 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
179 2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
181 Test sort compression.
182 * tests/misc/Makefile.am: Add the test.
183 * tests/misc/sort-compress: New file containing the tests.
185 2007-01-24 Jim Meyering <jim@meyering.net>
187 * NEWS: sort temp file compression: tweak wording.
188 * src/sort.c (struct sortfile) [name]: Declare member to be const.
190 2007-01-21 Jim Meyering <jim@meyering.net>
192 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
193 In pipe_fork callers, use these named constants, not "2" and "8".
194 (proctab, nprocs): Declare to be "static".
195 (pipe_fork) [lint]: Initialize local, pid,
196 to avoid unwarranted may-be-used-uninitialized warning.
197 (create_temp): Use the active voice. Describe parameters, too.
199 2007-01-21 James Youngman <jay@gnu.org>
201 Centralize all the uses of sigprocmask(). Don't restore an invalid
203 * src/sort.c (enter_cs, leave_cs): New functions for protecting
204 code sequences against signal delivery.
205 * (exit_cleanup): Use enter_cs and leave_cs instead of
206 calling sigprocmask directly.
207 (create_temp_file, pipe_fork, zaptemp): Likewise
209 2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
211 Add compression of temp files to sort.
212 * NEWS: Mention this.
213 * bootstrap.conf: Import findprog.
214 * configure.ac: Add AC_FUNC_FORK.
215 * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
217 * src/sort.c (compress_program): New global, holds the name of the
218 external compression program.
219 (struct sortfile): New type used by mergepfs and friends instead
220 of filenames to hold PIDs of compressor processes.
221 (proctab): New global, holds compressor PIDs on which to wait.
222 (enum procstate, struct procnode): New types used by proctab.
223 (proctab_hasher, proctab_comparator): New functions for proctab.
224 (nprocs): New global, number of forked but unreaped children.
225 (reap, reap_some): New function, wait for/cleanup forked processes.
226 (register_proc, update_proc, wait_proc): New functions for adding,
227 modifying and removing proctab entries.
228 (create_temp_file): Change parameter type to pointer to file
229 descriptor, and return type to pointer to struct tempnode.
230 (dup2_or_die): New function used in create_temp and open_temp.
231 (pipe_fork): New function, creates a pipe and child process.
232 (create_temp): Creates a temp file and possibly a compression
233 program to which we filter output.
234 (open_temp): Opens a compressed temp file and creates a
235 decompression process through which to filter the input.
236 (mergefps): Change FILES parameter type to struct sortfile array
237 and update access accordingly. Use open_temp and reap_some.
238 (avoid_trashing_input, merge): Change FILES parameter like
239 mergefps and call create_temp instead of create_temp_file.
240 (sort): Call create_temp instead of create_temp_file.
242 (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
244 2007-01-20 Jim Meyering <jim@meyering.net>
246 * tests/misc/pwd-long: Work properly even when run from the
247 wrong one of two or more bind-mounted sibling directories.
248 Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
250 2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
252 Standardize on list of signals when an app catches signals.
253 * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
254 SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
255 * src/ls.c (main): Likewise (except SIGPIPE was already caught).
256 Note that ls.c is special, as it also catches SIGTSTP.
257 * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
258 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
260 2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
261 and Paul Eggert <eggert@cs.ucla.edu>
263 * src/sort.c (cleanup): Clear temphead at the end.
264 (exit_cleanup): New function.
265 (main): Don't invoke atexit until we're ready.
266 Invoke it with exit_cleanup, not with cleanup and close_stdout,
267 to avoid a race condition with cleanup and signal handling. More
268 details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
270 2007-01-18 Jim Meyering <jim@meyering.net>
272 * src/c99-to-c89.diff: Adjust remove.c offsets.
274 2007-01-17 Jim Meyering <jim@meyering.net>
276 Make "rm --interactive=never ..." never prompt.
277 * NEWS: Mention this.
278 * src/remove.h (enum rm_interactive): New ternary type.
279 (struct rm_options) [interactive]: Use it, here -- rather than bool.
280 * src/remove.c (prompt): Reflect type change.
281 * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
282 * src/rm.c (main): Add a FIXME comment for '-d' option.
283 Adapt to type change of rm_options.interactive.
285 * tests/rm/i-never: New file. Test for the above fix.
286 * tests/rm/Makefile.am (TESTS): Add i-never.
288 2007-01-15 Jim Meyering <jim@meyering.net>
290 * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
291 emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
292 but that's ok, since fts_.h will eventually be renamed.
294 * src/remove.c (remove_dir): Don't use errno in diagnostic.
295 Root-only test failure reported by Alex van Hout and Jon Grosshart in
296 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
298 * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
299 s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
301 2007-01-14 Bruno Haible <bruno@clisp.org>
303 Enable use of gnulib's new fchdir module.
304 * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
305 since we use canonicalize.
306 (gnulib_modules): Add fchdir.
307 * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
309 2007-01-13 Jim Meyering <jim@meyering.net>
311 * Transform all Makefile.am files so that when running "make check",
312 CU_TEST_NAME is set to the name of the test. This is so that when I
313 run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
314 on the entire package it is more convenient to map a leak or error
315 found in a valgrind log file back to the offending test.
317 (echo tests/Makefile.am.in; find tests -name Makefile.am) \
318 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
319 -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
321 2007-01-11 Jim Meyering <jim@meyering.net>
323 Avoid a leak in expr's implementation of the ":" (match) operator.
324 * src/expr.c (docolon): Free the regexp buffer using regfree, rather
325 than doing it manually, being careful to set fastmap to NULL first.
326 Free any re_regs.start and .end members, if necessary.
328 * tests/misc/test-diag: Work also when libc's error function
329 reports the entire program name ("../../src/test"), rather than
330 just the final component.
332 2007-01-10 Jim Meyering <jim@meyering.net>
334 Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
335 * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
336 (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
337 directory. Non-directory entries lack fts_statp data when using
338 the FTS_NOSTAT option.
340 2007-01-07 Jim Meyering <jim@meyering.net>
342 * tests/sample-test: Update copyright date to 2007.
343 * Makefile.maint (copyright-check): Also check the copyright date
344 in tests/sample-test.
346 2007-01-06 Jim Meyering <jim@meyering.net>
348 * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
349 based on examples from G.P. Halkes in
350 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
352 2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
354 * src/fmt.c (copy_rest): Correct prefix handling.
355 Don't elide a line with the prefix followed by only white space.
356 (get_line): Move EOF-check to loop-termination condition.
357 * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
358 (pfx-2): Remove test; its premise was contrary to the documentation.
360 2007-01-05 Jim Meyering <jim@meyering.net>
362 Avoid a used-uninitialized bug for invalid input, i.e., when the size
363 of the input, not counting newlines, is 1 % 4.
364 * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
365 It may be smaller when flushing.
367 2007-01-05 Mike Frysinger <vapier@gentoo.org>
369 * src/dircolors.hin: Add a TERM directive for cons25.
371 2007-01-04 Jim Meyering <jim@meyering.net>
373 * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
374 case you don't have convenient access to glibc info documentation.
376 Use the release year, not the current year.
377 * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
378 * src/Makefile.am (RELEASE_YEAR): Define it.
380 Thanks to a prod from Eric Blake.
382 Ensure that "group --version" always prints the current year.
383 * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
384 * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
385 Suggestion from Eric Blake.
387 When decoding, always allow newlines in input, with almost no
389 * src/base64.c (do_decode): Initialize decode context.
390 Call base64_decode one more time, after all input is processed.
391 (usage): When decoding, newlines are always accepted.
393 * tests/misc/base64: Add a bunch of tests, for the above.
394 * gl/lib/base64.c: Include <string.h>.
395 (base64_decode_ctx_init, get_4, decode_4): New functions.
396 (base64_decode): Efficiently handle interspersed newlines.
397 (base64_decode_alloc): Update signature.
398 * gl/lib/base64.h (struct base64_decode_context): Define.
399 (base64_decode_ctx_init): Add prototype.
400 (base64_decode, base64_decode_alloc): Update prototypes.
402 * gl/lib/base64.c: Copied from gnulib.
403 * gl/lib/base64.h: Likewise.
405 2007-01-03 Jim Meyering <jim@meyering.net>
407 * THANKS: Add Evan Hunt.
409 2007-01-03 Bruno Haible <bruno@clisp.org>
411 Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
412 * tests/chown/deref: Apply lang-default.
413 * tests/misc/split-a: Likewise.
414 * tests/mv/reply-no: Likewise.
416 * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
419 2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
421 Now, "ls -FRL" always follows symbolic links on Linux.
422 * NEWS: Mention this bug fix.
423 * src/ls.c (gobble_file): Fix bug reported by
424 Nobuyuki Tsuchimura in
425 http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
426 where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
427 * tests/ls/follow-slink: Add a test for this case.
429 2007-01-01 Jim Meyering <jim@meyering.net>
431 * tests/rm/fail-eperm: Revert last change. The PATH=... setting
432 is not honored at least on HP-UX 11.23 systems.
433 Instead, simply transform the actual output diagnostic.
434 Test failure reported by Bob Proulx.
436 2006-12-30 Jim Meyering <jim@meyering.net>
438 * bootstrap (gnulib_extra_files): Remove announce-gen.
439 * bootstrap.conf (gnulib_modules): Add it here instead, now that
442 * tests/misc/base64: Factor a long, repetitive string.
444 * src/c99-to-c89.diff: Adjust remove.c offsets.
446 Clean up after the change of 2006-12-28.
447 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
448 now that this function never modifies the pointer. Adjust comments
449 and code accordingly.
450 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
451 now that AD_pop_and_chdir no longer does that.
453 * tests/rm/fail-eperm: Avoid spurious differences (the error function
454 from latest glibc no longer prints the full program_name): so don't
455 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
457 * tests/mv/acl (skip): Skip this test also if the destination
458 directory, which is on a different file system, lacks ACL support.
460 * src/copy.c (copy_reg): Rewrite a comment that was rendered
461 inaccurate by the 2006-10-18 change.
463 2006-12-28 Jim Meyering <jim@meyering.net>
465 When moving "up" the hierarchy, be careful to remove a just-emptied
466 directory before opening ".", to avoid trouble with file system
467 implementations that cache readdir results at opendir-time.
468 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
469 Don't update **DIRP. Don't call fdopendir here.
470 (remove_dir): Call fdopendir here instead.
471 Report and patch from Mikulas Patocka:
472 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
474 2006-12-27 Jim Meyering <jim@meyering.net>
476 * src/tail.c (usage): Mention +N for --bytes and --lines.
477 Suggestion from Evan Hunt.
479 2006-12-26 Jim Meyering <jim@meyering.net>
481 * configure.ac: Require autoconf-2.61 and automake-1.10.
482 Without the former (even with autoconf-2.60), "make distcheck"
483 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
484 due to an inttypes.h generated with CFLAGS including -pedantic.
485 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
487 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
488 tag, using the release version number as the message.
489 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
491 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
493 * NEWS: dd bs= operands now silently override later ibs= and obs=,
495 * src/dd.c (scanargs): Implement it.
496 * tests/dd/misc (outbytes): Test it.
497 * doc/coreutils.texi (dd invocation): Specify that bs=N
498 overrides later ibs and obs, undoing part of the
499 previous change. (The behavior was wrong.)
501 2006-12-20 Jim Meyering <jim@meyering.net>
503 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
504 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
505 Don't let a non-directory get by with errno == EPERM, either.
506 Check the file type directly (using cached stat value), rather
507 than trying to guess it from errno values.
508 Karl Berry reported that a cross-partition "mv /etc/issue ~"
509 failed with the um,... suboptimal diagnostic,
510 "mv: cannot remove `/etc/issue': Not a directory".
511 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
512 * tests/rm/fail-eacces: New file.
513 * NEWS: Mention that both mv and rm are affected.
515 "cut -f 2- A B" no longer triggers a double-free bug
516 * src/cut.c (cut_fields): Set file-scoped global to NULL after
517 freeing it. This avoids a double-free (and core dump on some systems)
518 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
519 James Hunt in <http://bugzilla.redhat.com/220312>.
520 * NEWS: List this bug fix.
521 * THANKS: Mention him.
522 * tests/misc/cut: New file.
523 * tests/misc/Makefile.am (TESTS): Add cut.
525 2006-12-15 Jim Meyering <jim@meyering.net>
527 * tests/cp/open-perm-race: Correct the gdb-existence check.
528 Don't run either subsequent gdb command in a sub-shell.
529 Reported by Thomas Schwinge.
530 * THANKS: bring up to date.
532 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
534 Make sure cp -p isn't too generous with file permissions.
535 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
536 * tests/cp/file-perm-race: New file.
538 Ensure cp -pR --parents isn't too generous with parent permissions.
539 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
540 * tests/cp/parent-perm-race: New file.
542 2006-12-14 Jim Meyering <jim@meyering.net>
544 * tests/chgrp/default-no-deref: Don't assume that files are created
545 with the primary group by default. That's not true in a directory
546 with the set-GID bit set.
548 Don't hang when there's no input tty.
549 * tests/cp/open-perm-race: Skip this test if there is no
550 controlling input `terminal'.
552 Test for a hard-to-detect race fix, using gdb.
553 * tests/cp/open-perm-race: New file, to test for the
554 cp --preserve=ownership fix of 2006-12-06.
556 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
557 (TESTS): Add open-perm-race.
559 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
560 * src/chown.c (main): Likewise.
561 * src/chown-core.c (change_file_owner): Add to a comment.
562 * tests/chown/preserve-root: Add tests.
564 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
565 * src/chmod.c (process_file): Do honor the --preserve-root option.
566 * src/chown-core.c (change_file_owner): Likewise, but here, also
567 handle the case in which a traversal would go "through" a symlink
568 to root. Reported by Matthew M. Boedicker
569 * tests/chown/preserve-root: Test for the above.
570 * tests/chown/Makefile.am (TESTS): Add preserve-root.
572 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
573 to gnulib's m4/openat.m4.
575 2006-12-13 Andreas Schwab <schwab@suse.de>
577 Don't fail if mv/acl test succeeds.
578 * tests/mv/acl (skip): Check for acl support in the file system.
579 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
580 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
582 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
584 Remove some arbitrary restrictions on size fields, so that
585 commands like "sort -k 18446744073709551616" no longer fail merely
586 because 18446744073709551616 doesn't fit in uintmax_t. The trick
587 is that these fields can all be treated as effectively infinity;
588 their exact values don't matter, since no internal buffer can be
590 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
591 ULONG_MAX if the code assumes this. Silently truncate too-large
592 values to SIZE_MAX, as the remaining code will do the right thing
594 * src/sort.c (parse_field_count): Likewise.
595 * src/uniq.c (size_opt, main): Likewise.
596 * tests/join/Test.pm (bigfield): New test.
597 * tests/sort/Test.pm (bigfield): New test.
598 * tests/uniq/Test.pm (121): New test.
600 2006-12-13 Jim Meyering <jim@meyering.net>
602 * tests/chgrp/default-no-deref: New test.
603 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
605 2006-12-12 Jim Meyering <jim@meyering.net>
607 * src/system.h (SETVBUF): Remove definition, now that the
608 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
609 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
610 * src/od.c (open_next_file): Likewise.
612 2006-12-09 Jim Meyering <jim@meyering.net>
614 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
615 "source". I.e. "GNU coreutils 6.7".
617 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
618 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
619 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
621 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
622 whenever uniq is expected to fail. This should catch the other case
623 [test #112] in which uniq emits "cat: write error: Broken pipe" on
626 2006-12-08 Jim Meyering <jim@meyering.net>
628 Include bootstrap tool version info in the announcement form.
629 * Makefile.maint (gnulib_snapshot_date): Define.
630 (announcement): Use two new announce-gen options,
631 --bootstrap-tools and --gnulib-snapshot-date.
632 * Makefile.cfg (gnulib_dir): Set.
634 Post-release version change.
635 * NEWS: Add a line for 6.8-dirty.
636 * configure.ac (AC_INIT): Set new version string.
638 2006-12-07 Jim Meyering jim@meyering.net
641 * NEWS: Record release date. Remove '-pre' suffix.
642 * configure.ac (AC_INIT): Remove version string suffix.
644 2006-12-07 Jim Meyering <jim@meyering.net>
646 Make the output of "make check" more reproducible.
647 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
648 evoke diagnostics like this when COLUMNS=0 in the environment:
649 ls: ignoring invalid width in environment variable COLUMNS: 0
650 * tests/touch/no-rights: Likewise.
651 * tests/help-version: Likewise.
652 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
653 118, since it emits "cat: write error: Broken pipe" on some systems.
655 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
657 * NEWS: Document the cp -p fix for special bits.
658 * src/copy.c (set_owner): Now returns a three-way result, so
659 that the caller can clear the special bits. All callers changed.
660 (copy_reg): Don't set the special bits if chown failed.
661 (copy_internal): Likewise.
662 * tests/cp/special-bits: Test this fix.
664 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
666 * NEWS: Document the cp --preserve=ownership fix.
667 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
668 * src/copy.c (fchmod_or_lchmod): New function.
669 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
670 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
671 When creating a file, use O_EXCL, so we're more likely to detect
672 funny business by other processes. At the end, if permissions
673 were omitted, chmod them back in.
674 (copy_internal): If the ownership might change, omit some permissions
675 at first, then restore them after chowning the file.
676 * src/cp.c (make_dir_parents_private): Likewise.
677 * src/copy.c (cached_umask): New function.
678 * src/copy.h (cached_umask): New decl.
680 2006-12-06 Jim Meyering <jim@meyering.net>
682 Make the output of "make check" more reproducible.
683 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
685 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
687 * src/install.c (install_file_in_file): Preserve time stamps
688 before changing owner or file mode bits, for consistency with
689 other coreutils programs.
691 2006-12-03 Jim Meyering <jim@meyering.net>
693 * tests/misc/date-sec: Output a fixed string.
695 * NEWS: du --one-file-system (-x) would skip subdirectories of any
696 directory listed as second or subsequent command line argument.
697 * tests/du/one-file-system: New file. Test for today's fts.c fix.
698 * tests/du/Makefile.am (TESTS): Add one-file-system.
699 Reported by Mike Frysinger.
701 2006-12-02 Jim Meyering <jim@meyering.net>
703 * tests/du/basic: Generate 4KB file simply using printf, rather than
704 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
706 2006-11-28 Jim Meyering <jim@meyering.net>
708 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
709 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
710 Reported by Matthew Woehlke.
712 * tests/mv/dir2dir: Also accept EBUSY.
713 Reported by Matthew Woehlke.
715 2006-11-27 Jim Meyering <jim@meyering.net>
717 * Makefile.maint (patch-check): Rewrite to diagnose failure.
718 * src/c99-to-c89.diff: Adjust shred.c offsets.
720 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
722 Improve the check for departures from C89, and fix the departures
724 * Makefile.maint (my-distcheck): Also check for C89 compatibility
725 as best we can with GCC.
726 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
727 declaration; C89 doesn't allow this.
728 * src/dcgen: Don't generate string literals longer than
729 what C89 requires support for.
730 * src/cut.c (usage): Don't use string literals longer than
731 what C89 requires support for.
732 * src/date.c (usage): Likewise.
733 * src/dd.c (usage): Likewise.
734 * src/du.c (usage): Likewise.
735 * src/ls.c (usage): Likewise.
736 * src/od.c (usage): Likewise.
737 * src/readlink.c (usage): Likewise.
738 * src/seq.c (usage): Likewise.
739 * src/shred.c (usage): Likewise.
741 2006-11-26 Mike Frysinger <vapier@gentoo.org>
743 Recognize new archive, audio and image formats.
744 Give audio files a separate color.
745 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
746 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
747 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
748 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
749 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
750 audio color to 00;36 to differentiate from image/video color.
752 2006-11-26 Jim Meyering <jim@meyering.net>
754 * Makefile.maint (patch-check): Compile patched sources with
755 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
756 no violations remain.
758 * src/c99-to-c89.diff: Remove 3 bogus hunks.
760 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
763 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
765 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
767 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
769 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
770 while trying to retain the readability of C99 as much as possible.
771 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
772 Replace each of two uses with literal AT_FDCWD.
773 (cache_stat_init): Return its argument, for convenience.
774 Update the caller in remove_dir.
775 (AD_pop_and_chdir): Return prev_dir rather than storing through
776 a pointer argument. All uses changed.
777 (AD_ensure_initialized): New function.
778 (AD_mark_helper): Use it, to avoid the need for declaration
780 (rm): Move cycle_check_init call into callee...
782 Use an else clause in place of a "continue" statement.
783 (close_preserve_errno): Remove.
784 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
786 2006-11-25 Jim Meyering <jim@meyering.net>
788 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
790 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
792 * tests/du/inacc-dest: Skip this test when running as root.
794 2006-11-23 Jim Meyering <jim@meyering.net>
796 * announce-gen: Remove file. It's moving to gnulib.
797 * bootstrap: Pull it from gnulib/build-aux instead.
798 * Makefile.maint (announcement): Reflect move to ./build-aux.
800 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
801 rather than a pipeline that would sometimes evoke a diagnostic
802 like "seq: write error: Broken pipe".
804 * tests/help-version: Suppress dd transfer rate output.
806 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
808 2006-11-22 Jim Meyering <jim@meyering.net>
810 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
811 change "(:?..." to "(?:..." in regexps.
813 Post-release version change.
814 * NEWS: Add a line for 6.7-pre.
815 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
818 * NEWS: Record release date. Remove "-pre" suffix.
819 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
821 * announce-gen: Remove unused --release-archive-directory option.
822 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
824 Match version numbers in NEWS using tighter regular expressions.
825 (main): Require the --gpg-key-id=ID option.
826 * Makefile.maint (announcement): Don't use now-removed
827 --release-archive-directory=... option.
829 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
831 2006-11-21 Jim Meyering <jim@meyering.net>
833 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
834 skip the test rather than failing. Reported by Michael Deutschmann.
836 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
837 rather than just "exit N".
839 Arrange for "make check-root" to run the new root-only test.
840 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
843 2006-11-20 Jim Meyering <jim@meyering.net>
845 Add a root-only test for today's lib/idcache.c fix.
846 * tests/ls/nameless-uid: New file.
847 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
848 (TESTS_ENVIRONMENT): Add PERL to the list.
850 2006-11-19 Jim Meyering <jim@meyering.net>
852 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
853 find the 7-second sleep annoyingly long. Besides, this test is
854 probably far too specific and timing sensitive ever to trigger again.
855 * tests/tail-2/assert: Likewise.
857 Post-release version change.
858 * NEWS: Add a line for 6.6-pre.
859 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
862 * NEWS: Record release date. Remove "-cvs" suffix.
863 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
865 2006-11-18 Jim Meyering <jim@meyering.net>
867 "ln --backup f f" produces a misleading diagnostic:
868 ln: creating hard link `f' => `f': No such file or directory
869 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
870 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
871 * tests/ln/Makefile.am (TESTS): Add hard-backup.
872 * tests/ln/hard-backup: New test for the above.
873 * NEWS: Mention this fix.
875 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
877 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
879 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
880 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
881 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
882 Omit unnecessary parenthesization of args.
883 * src/od.c (EQUAL_BLOCKS): Likewise.
884 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
886 2006-11-16 Jim Meyering <jim@meyering.net>
888 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
889 automake we're skipping this test), and give a diagnostic to tell
890 the user the same thing. Reported by Mike Grayson.
892 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
894 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
895 with `$(MAN)', computed at configure time; also, list them ...
896 (optional_mans): ... in this new variable.
897 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
899 2006-11-16 Jim Meyering <jim@meyering.net>
901 Help valgrind see that there is no leak in dd.c.
902 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
903 so we need not free them at all. This is easier than freeing
904 both buffers at each of the early "return"s.
906 * src/csplit.c (load_buffer): Plug an inconsequential leak.
908 2006-11-15 Jim Meyering <jim@meyering.net>
910 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
911 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
913 2006-11-14 Jim Meyering <jim@meyering.net>
915 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
916 remove the now-unnecessary use of AC_LIBSOURCES.
918 Adapt to new version of gnulib-tool.
919 * gl/modules/root-dev-ino: New file.
920 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
921 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
922 * m4/root-dev-ino.m4: Move this file ...
923 * gl/m4/root-dev-ino.m4: ... to here.
925 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
927 2006-11-13 Jim Meyering <jim@meyering.net>
929 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
932 Plug another technically-unimportant leak in sort.
933 * src/sort.c (main): Don't allocate memory for each new key here.
934 (insertkey): Allocate memory for each key here, instead.
935 (key_init): Rename from new_key. Don't allocate.
937 * src/sort.c (main): Plug a tiny memory leak.
938 Move declaration of local "minus" down to be nearer point of use.
940 2006-11-12 Jim Meyering <jim@meyering.net>
942 du would exit early, when encountering an inaccessible directory
943 Reported by Mike Frysinger, in
944 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
945 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
946 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
947 diagnostic from the expected output when using native fdopendir.
948 * tests/chmod/no-x: Likewise.
949 * tests/du/no-x: Likewise.
950 * NEWS: Mention this bug fix.
951 * tests/du/Makefile.am (TESTS): Add inacc-dest.
953 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
956 Avoid false-positive when testing via valgrind.
957 * tests/mv/atomic: Grep strace output for a more specific pattern
958 than just "unlink", since that got a false positive when testing
959 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
960 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
962 2006-10-28 Jim Meyering <jim@meyering.net>
964 * Makefile.maint (patch-check): Make it easier to regenerate
965 the src/c99-to-c89.diff file. E.g., I do this:
966 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
968 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
970 2006-10-26 Jim Meyering <jim@meyering.net>
972 * src/system.h (ftello): Add a compile-time check for the highly
973 unlikely condition of off_t narrower than long int, rather than
974 handling it at run time. Based on a patch from Paul Eggert.
976 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
978 * tests/chmod/c-option: When double-quoting part of a word, prefer
979 to double-quote the whole word. This is a bit easier to read (at
980 least for me), and in some cases it avoids a shell bug with Tru64
981 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
982 "$abs_srcdir"/../setgid-check we now write
983 "$abs_srcdir/../setgid-check".
984 * tests/cp/cp-parents: Likewise.
985 * tests/du/inaccessible-cwd: Likewise.
986 * tests/du/long-from-unreadable: Likewise.
987 * tests/install/basic-1: Likewise.
988 * tests/install/trap: Likewise.
989 * tests/misc/close-stdout: Likewise.
990 * tests/mkdir/concurrent-1: Likewise.
991 * tests/mkdir/p-1: Likewise.
992 * tests/mkdir/p-3: Likewise.
993 * tests/mkdir/parents: Likewise.
994 * tests/mkdir/perm: Likewise.
995 * tests/readlink/can-e: Likewise.
996 * tests/readlink/can-f: Likewise.
997 * tests/readlink/can-m: Likewise.
998 * tests/rm/inaccessible: Likewise.
999 * tests/rm/unread3: Likewise.
1000 * tests/touch/no-create-missing: Likewise.
1002 * lib/.cvsignore: Add uinttostr.c.
1004 2006-10-25 Jim Meyering <jim@meyering.net>
1006 Portability to Tru64 V4.0.
1007 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
1008 Define inline replacement function.
1009 This (along with a yesterday's fix for autoconf's
1010 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
1011 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
1013 2006-10-25 Bruno Haible <bruno@clisp.org>
1015 * src/cat.c (infile): Add "const" to declaration.
1016 * src/csplit.c (prefix): Likewise.
1017 * src/printf.c (cfcc_msg): Likewise.
1018 * src/tail.c (valid_file_spec): Likewise.
1019 * src/cut.c (cut_file): Likewise, for a parameter.
1020 * src/expr.c (str_value): Likewise.
1021 * src/fold.c (fold_file): Likewise.
1022 * src/pr.c (init_header): Likewise.
1023 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
1024 * src/tr.c (make_printable_str): Likewise.
1025 * src/nl.c (body_type, header_type, footer_type, current_type):
1026 (separator_str, build_type_arg, nl_file): Likewise, for many.
1027 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
1028 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
1030 2006-10-25 Jim Meyering <jim@meyering.net>
1032 * tests/sample-test: Update copyright year list to include only
1033 the current year, since this is what I'll want in any new test.
1035 2006-10-24 Jim Meyering <jim@meyering.net>
1037 * src/c99-to-c89.diff: Update to reflect new offsets.
1039 * NEWS: new feature: rm accepts new option: --one-file-system
1040 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
1041 * src/remove.h (struct rm_options) [one_file_system]: New member.
1042 * src/rm.c (rm_option_init): Initialize it.
1043 (usage): Document the option.
1044 * src/mv.c (rm_option_init): Likewise.
1045 * src/remove.c (remove_dir): With --one-file-system and --recursive,
1046 for each directory command line argument, do not affect a file system
1047 different from that of the starting directory. And give a diagnostic.
1048 * src/rm.c (ONE_FILE_SYSTEM): New enum.
1049 (main): Handle new option.
1050 * tests/rm/one-file-system: Test the above.
1051 * tests/rm/Makefile.am (TESTS): Add one-file-system.
1052 * tests/Makefile.am (check-root): Add the rm/one-file-system
1054 (EXTRA_DIST): Add other-fs-tmpdir.
1056 * tests/mv/setup: Removed. Renamed to...
1057 * tests/other-fs-tmpdir: ...this new file.
1058 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
1059 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
1060 * tests/mv/backup-is-src: Likewise.
1061 * tests/mv/hard-link-1: Likewise.
1062 * tests/mv/leak-fd: Likewise.
1063 * tests/mv/mv-special-1: Likewise.
1064 * tests/mv/part-fail: Likewise.
1065 * tests/mv/part-hardlink: Likewise.
1066 * tests/mv/part-rename: Likewise.
1067 * tests/mv/part-symlink: Likewise.
1068 * tests/mv/partition-perm: Likewise.
1069 * tests/mv/to-symlink: Likewise.
1070 * tests/mv/into-self-2: Likewise.
1072 Don't let a failure in one test stop "make -k" from running the others.
1073 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
1074 (check-root): Depend on them, rather than executing the five
1075 commands in a single rule. Reported by Greg Schafer.
1077 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
1079 * Makefile.maint (alpha beta major): Use a better log message for
1080 the automatic commit of .prev-version.
1082 2006-10-23 Jim Meyering <jim@meyering.net>
1084 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
1085 pwd via a shell. Instead, ensure that the absolute name of the
1086 pwd binary consists solely of reasonable characters.
1087 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
1088 clean-up code isn't run.
1090 * NEWS: Add a line for 6.5-cvs.
1091 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
1093 2006-10-22 Jim Meyering <jim@meyering.net>
1097 * NEWS: Record the 6.4 release date.
1098 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1100 * Makefile.maint: Complete the adaptation to function with a working
1101 directory that is using git (rather than cvs) for version control.
1103 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1105 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
1106 * tests/cp/cp-parents: Likewise.
1107 * tests/mkdir/parents: Likewise.
1108 * tests/mkdir/perm: Likewise.
1110 * tests/sample-test: Quote variables containing absolute build
1111 tree paths. In the cleanup trap, make sure `cd' succeeds before
1112 `chmod'ing and `rm'ing the temporary files.
1113 * tests/chgrp/basic: Likewise.
1114 * tests/chgrp/deref: Likewise.
1115 * tests/chgrp/no-x: Likewise.
1116 * tests/chgrp/posix-H: Likewise.
1117 * tests/chgrp/recurse: Likewise.
1118 * tests/chmod/c-option: Likewise.
1119 * tests/chmod/equal-x: Likewise.
1120 * tests/chmod/equals: Likewise.
1121 * tests/chmod/inaccessible: Likewise.
1122 * tests/chmod/no-x: Likewise.
1123 * tests/chmod/octal: Likewise.
1124 * tests/chmod/setgid: Likewise.
1125 * tests/chmod/umask-x: Likewise.
1126 * tests/chmod/usage: Likewise.
1127 * tests/chown/basic: Likewise.
1128 * tests/chown/deref: Likewise.
1129 * tests/chown/separator: Likewise.
1130 * tests/cp/acl: Likewise.
1131 * tests/cp/backup-1: Likewise.
1132 * tests/cp/backup-dir: Likewise.
1133 * tests/cp/backup-is-src: Likewise.
1134 * tests/cp/cp-HL: Likewise.
1135 * tests/cp/cp-deref: Likewise.
1136 * tests/cp/cp-i: Likewise.
1137 * tests/cp/cp-mv-backup: Likewise.
1138 * tests/cp/cp-parents: Likewise.
1139 * tests/cp/deref-slink: Likewise.
1140 * tests/cp/dir-rm-dest: Likewise.
1141 * tests/cp/dir-slash: Likewise.
1142 * tests/cp/dir-vs-file: Likewise.
1143 * tests/cp/fail-perm: Likewise.
1144 * tests/cp/into-self: Likewise.
1145 * tests/cp/link: Likewise.
1146 * tests/cp/link-no-deref: Likewise.
1147 * tests/cp/link-preserve: Likewise.
1148 * tests/cp/no-deref-link1: Likewise.
1149 * tests/cp/no-deref-link2: Likewise.
1150 * tests/cp/no-deref-link3: Likewise.
1151 * tests/cp/perm: Likewise.
1152 * tests/cp/preserve-2: Likewise.
1153 * tests/cp/r-vs-symlink: Likewise.
1154 * tests/cp/same-file: Likewise.
1155 * tests/cp/slink-2-slink: Likewise.
1156 * tests/cp/sparse: Likewise.
1157 * tests/cp/special-bits: Likewise.
1158 * tests/cp/src-base-dot: Likewise.
1159 * tests/cp/symlink-slash: Likewise.
1160 * tests/dd/not-rewound: Likewise.
1161 * tests/dd/skip-seek2: Likewise.
1162 * tests/dd/unblock-sync: Likewise.
1163 * tests/du/2g: Likewise.
1164 * tests/du/8gb: Likewise.
1165 * tests/du/basic: Likewise.
1166 * tests/du/deref: Likewise.
1167 * tests/du/deref-args: Likewise.
1168 * tests/du/exclude: Likewise.
1169 * tests/du/fd-leak: Likewise.
1170 * tests/du/hard-link: Likewise.
1171 * tests/du/inaccessible-cwd: Likewise.
1172 * tests/du/long-from-unreadable: Likewise.
1173 * tests/du/long-sloop: Likewise.
1174 * tests/du/no-deref: Likewise.
1175 * tests/du/no-x: Likewise.
1176 * tests/du/restore-wd: Likewise.
1177 * tests/du/slash: Likewise.
1178 * tests/du/slink: Likewise.
1179 * tests/du/trailing-slash: Likewise.
1180 * tests/du/two-args: Likewise.
1181 * tests/fmt/long-line: Likewise.
1182 * tests/install/basic-1: Likewise.
1183 * tests/install/create-leading: Likewise.
1184 * tests/install/d-slashdot: Likewise.
1185 * tests/install/trap: Likewise.
1186 * tests/ln/misc: Likewise.
1187 * tests/ln/target-1: Likewise.
1188 * tests/ls/color-dtype-dir: Likewise.
1189 * tests/ls/dangle: Likewise.
1190 * tests/ls/dired: Likewise.
1191 * tests/ls/file-type: Likewise.
1192 * tests/ls/follow-slink: Likewise.
1193 * tests/ls/infloop: Likewise.
1194 * tests/ls/inode: Likewise.
1195 * tests/ls/m-option: Likewise.
1196 * tests/ls/no-arg: Likewise.
1197 * tests/ls/recursive: Likewise.
1198 * tests/ls/rt-1: Likewise.
1199 * tests/ls/stat-dtype: Likewise.
1200 * tests/ls/stat-failed: Likewise.
1201 * tests/ls/stat-vs-dirent: Likewise.
1202 * tests/misc/cat-proc: Likewise.
1203 * tests/misc/close-stdout: Likewise.
1204 * tests/misc/csplit: Likewise.
1205 * tests/misc/date-sec: Likewise.
1206 * tests/misc/false-status: Likewise.
1207 * tests/misc/head-c: Likewise.
1208 * tests/misc/head-pos: Likewise.
1209 * tests/misc/mknod: Likewise.
1210 * tests/misc/nl: Likewise.
1211 * tests/misc/nohup: Likewise.
1212 * tests/misc/pathchk1: Likewise.
1213 * tests/misc/printf: Likewise.
1214 * tests/misc/printf-hex: Likewise.
1215 * tests/misc/pwd-long: Likewise.
1216 * tests/misc/shuf: Likewise.
1217 * tests/misc/sort-rand: Likewise.
1218 * tests/misc/split-a: Likewise.
1219 * tests/misc/split-fail: Likewise.
1220 * tests/misc/split-l: Likewise.
1221 * tests/misc/stat-fmt: Likewise.
1222 * tests/misc/tac-continue: Likewise.
1223 * tests/misc/wc-files0: Likewise.
1224 * tests/mkdir/concurrent-1: Likewise.
1225 * tests/mkdir/p-1: Likewise.
1226 * tests/mkdir/p-2: Likewise.
1227 * tests/mkdir/p-3: Likewise.
1228 * tests/mkdir/p-slashdot: Likewise.
1229 * tests/mkdir/p-thru-slink: Likewise.
1230 * tests/mkdir/p-v: Likewise.
1231 * tests/mkdir/parents: Likewise.
1232 * tests/mkdir/perm: Likewise.
1233 * tests/mkdir/t-slash: Likewise.
1234 * tests/mv/acl: Likewise.
1235 * tests/mv/atomic: Likewise.
1236 * tests/mv/backup-dir: Likewise.
1237 * tests/mv/childproof: Likewise.
1238 * tests/mv/diag: Likewise.
1239 * tests/mv/dir-file: Likewise.
1240 * tests/mv/dir2dir: Likewise.
1241 * tests/mv/dup-source: Likewise.
1242 * tests/mv/hard-2: Likewise.
1243 * tests/mv/hard-3: Likewise.
1244 * tests/mv/hard-4: Likewise.
1245 * tests/mv/hard-link-1: Likewise.
1246 * tests/mv/hard-verbose: Likewise.
1247 * tests/mv/i-2: Likewise.
1248 * tests/mv/i-3: Likewise.
1249 * tests/mv/i-4: Likewise.
1250 * tests/mv/i-5: Likewise.
1251 * tests/mv/i-link-no: Likewise.
1252 * tests/mv/into-self-4: Likewise.
1253 * tests/mv/leak-fd: Likewise.
1254 * tests/mv/mv-special-1: Likewise.
1255 * tests/mv/no-target-dir: Likewise.
1256 * tests/mv/part-fail: Likewise.
1257 * tests/mv/part-hardlink: Likewise.
1258 * tests/mv/part-rename: Likewise.
1259 * tests/mv/part-symlink: Likewise.
1260 * tests/mv/partition-perm: Likewise.
1261 * tests/mv/perm-1: Likewise.
1262 * tests/mv/reply-no: Likewise.
1263 * tests/mv/trailing-slash: Likewise.
1264 * tests/mv/update: Likewise.
1265 * tests/od/od-N: Likewise.
1266 * tests/od/x8: Likewise.
1267 * tests/readlink/can-e: Likewise.
1268 * tests/readlink/can-f: Likewise.
1269 * tests/readlink/can-m: Likewise.
1270 * tests/readlink/rl-1: Likewise.
1271 * tests/rm/cycle: Likewise.
1272 * tests/rm/dangling-symlink: Likewise.
1273 * tests/rm/deep-1: Likewise.
1274 * tests/rm/dir-no-w: Likewise.
1275 * tests/rm/dir-nonrecur: Likewise.
1276 * tests/rm/dot-rel: Likewise.
1277 * tests/rm/empty-inacc: Likewise.
1278 * tests/rm/f-1: Likewise.
1279 * tests/rm/fail-2eperm: Likewise.
1280 * tests/rm/hash: Likewise.
1281 * tests/rm/i-1: Likewise.
1282 * tests/rm/i-no-r: Likewise.
1283 * tests/rm/ignorable: Likewise.
1284 * tests/rm/inaccessible: Likewise.
1285 * tests/rm/interactive-always: Likewise.
1286 * tests/rm/interactive-once: Likewise.
1287 * tests/rm/ir-1: Likewise.
1288 * tests/rm/isatty: Likewise.
1289 * tests/rm/no-give-up: Likewise.
1290 * tests/rm/r-1: Likewise.
1291 * tests/rm/r-2: Likewise.
1292 * tests/rm/r-3: Likewise.
1293 * tests/rm/r-4: Likewise.
1294 * tests/rm/readdir-bug: Likewise.
1295 * tests/rm/rm1: Likewise.
1296 * tests/rm/rm2: Likewise.
1297 * tests/rm/rm3: Likewise.
1298 * tests/rm/rm4: Likewise.
1299 * tests/rm/rm5: Likewise.
1300 * tests/rm/sunos-1: Likewise.
1301 * tests/rm/unread2: Likewise.
1302 * tests/rm/unread3: Likewise.
1303 * tests/rmdir/fail-perm: Likewise.
1304 * tests/rmdir/t-slash: Likewise.
1305 * tests/shred/exact: Likewise.
1306 * tests/shred/remove: Likewise.
1307 * tests/sum/sysv: Likewise.
1308 * tests/tail-2/append-only: Likewise.
1309 * tests/tail-2/assert: Likewise.
1310 * tests/tail-2/assert-2: Likewise.
1311 * tests/tail-2/big-4gb: Likewise.
1312 * tests/tail-2/fflush: Likewise.
1313 * tests/tail-2/infloop-1: Likewise.
1314 * tests/tail-2/proc-ksyms: Likewise.
1315 * tests/tail-2/start-middle: Likewise.
1316 * tests/tail-2/tail-n0f: Likewise.
1317 * tests/tee/basic: Likewise.
1318 * tests/tee/dash: Likewise.
1319 * tests/touch/fail-diag: Likewise.
1320 * tests/touch/no-create-missing: Likewise.
1321 * tests/touch/not-owner: Likewise.
1322 * tests/touch/obsolescent: Likewise.
1323 * tests/touch/read-only: Likewise.
1324 * tests/touch/relative: Likewise.
1326 2006-10-21 Jim Meyering <jim@meyering.net>
1328 * NEWS: (cp --backup fix): Fix a typo.
1330 * .gitignore: Remove some references to files in subdirectories.
1331 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
1332 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
1334 * src/copy.c (copy_internal): Add a comment saying why we prefer
1337 Enable an fts optimization (call lstat only for directories,
1338 on some file system types) also with the --preserve-root option
1340 * src/chown-core.c (change_file_owner): Compare fts_statp-based
1341 dev/ino against root dev/ino only for directories.
1342 (chown_files): Don't let the root_dev_ino setting influence whether
1343 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
1345 2006-10-20 Jim Meyering <jim@meyering.net>
1347 * src/od.c (usage): Change description of default to use "-w16",
1348 not the now-invalid "-w 16" syntax. From Dan Jacobson.
1350 2006-10-19 Jim Meyering <jim@meyering.net>
1352 * bootstrap: Add names to each .gitignore file (if it exists)
1353 as well as to .cvsignore.
1355 * Makefile.maint (po-check): This rule didn't detect the new use
1356 of "gettext" (as opposed to the use of "_" everywhere else) in
1357 lib/xstrtol.h. Adjust the grep regexp so that now it does.
1359 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
1361 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
1362 when opening dst_name.
1363 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
1364 (SYSCALL) to test for failure in a system call.
1366 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
1367 a fifo. This preserves the special mode bits on Solaris 10, which
1368 is compatible with what Solaris 10 cp -R does.
1370 * src/copy.c (copy_internal): Remove redundant and confusing local
1373 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
1374 7777. This matches historical 'cp' behavior and avoids some
1375 (though not all) implementation-defined behavior of mkdir.
1376 * src/cp.c (make_dir_parents_private): Likewise.
1377 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
1378 than 777. This is required by POSIX. It doesn't make any difference
1379 in actual behavior on any host that I know of.
1381 2006-10-17 Jim Meyering <jim@meyering.net>
1383 * src/dd.c (usage): Use two spaces (not one) to separate the
1384 "fdatasync" option string from its description, so help2man formats
1385 the derived man page properly. Reported by Samuel Thibault
1386 in <http://bugs.debian.org/393649>.
1388 2006-10-16 Jim Meyering <jim@meyering.net>
1390 * .x-sc_trailing_blank: Remove names of files that are no longer
1393 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
1395 * src/groups.sh (version): Reword message to match the other programs.
1396 Problem reported by Eric Blake.
1398 2006-10-14 Jim Meyering <jim@meyering.net>
1400 * Makefile.maint (headers_with_interesting_macro_defs): Define.
1401 (.re-defmac, sc_always_defined_macros): New rules.
1403 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
1404 Instead, include "exit.h". This hereby retires the work-around for
1405 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
1407 * src/cksum.c (uint_fast32_t): Don't define.
1408 Instead, include <stdint.h>.
1410 * src/pinky.c (S_IWGRP): Don't define.
1411 It's already defined by "stat-macros.h" (included via system.h).
1413 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
1414 * Makefile.maint: Likewise, remove these targets/rules/variables:
1415 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
1416 (cvs_files, wget-update, automake_repo): Likewise.
1417 Move the comment about cvsu to build-aux/vc-list-files,
1418 where cvsu is actually used.
1420 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
1422 Work also when the working directory (with e.g. coreutils sources)
1423 is version controlled with git, rather than CVS.
1424 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
1426 In messages and comments, say e.g., "checked-out sources",
1427 rather than "CVS sources".
1428 (version_controlled_file): New function. Work for git as well as
1429 for CVS. Don't use grep's -q option.
1430 (slurp): Call it here, in place of CVS-specific code.
1432 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
1434 * src/copy.c (copy_internal): Although we do create a backup of each
1435 destination directory when in move mode, don't do that when copying.
1436 Reported by Peter Breitenlohner, in
1437 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
1438 * tests/cp/backup-dir: New file. Test for the above.
1439 * tests/cp/Makefile.am (TESTS): Add backup-dir.
1441 2006-10-13 Jim Meyering <jim@meyering.net>
1443 More chown/chgrp dereferencing-related fixes.
1444 * src/chown-core.c (change_file_owner): Don't use fts_statp if
1445 we're dereferencing symlinks.
1446 Reverse conjuncts, so that we use dereference file_stats
1447 (aka ent->fts_statp) only *after* we've confirmed that
1448 chopt->affect_symlink_referent is true. Otherwise, we might
1449 use ent->fts_statp uninitialized.
1450 Don't turn on FTS_NOSTAT when dereferencing symlinks.
1451 * tests/chown/deref: Update the expected diagnostic, now that
1452 this test case (trying to use "chown --dereference ..." on a
1453 dangling symlink) takes a different code path.
1455 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
1457 Sync from Bison, as follows:
1459 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
1461 Fix problems with translating English-language diagnostics.
1462 * bootstrap: Fix bug introduced in recent bootstrap changes, with
1463 respect to bison-runtime pot generation. The YY_ stuff
1464 wasn't being captured.
1466 2006-10-13 Jim Meyering <jim@meyering.net>
1468 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
1469 now that we're using fts_open with FTS_CWDFD.
1470 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
1471 chgrp, to exercise the above fix.
1472 * NEWS: Mention the above.
1474 * src/du-tests: Clean up a little, though it's still not portable.
1476 * .vg-suppressions: Add 3 more for debian unstable.
1478 * tests/ls/Test.pm: Remove long-unused file.
1479 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
1480 Suggestions from Bruno Haible.
1482 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1484 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
1485 (MAINTAINERCLEANFILES): Add .kludge-stamp.
1486 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
1487 instead of $(man_MANS).
1489 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1491 * configure.ac: Avoid compiler warnings about default return
1492 type in function definitions and unused variables in tests.
1493 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
1494 if this is #defined.
1496 2006-10-12 Jim Meyering <jim@meyering.net>
1498 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
1499 Call gl_INIT directly, rather than through the above.
1501 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1503 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
1504 variable was sometimes used without being initialized. This
1505 messed up the installation of the INSTALL file in some cases.
1507 2006-10-11 Jim Meyering <jim@meyering.net>
1509 * src/ls.c (usage): Correct description of -s, --size.
1510 It works even without -l. Suggestion from Karl Berry.
1512 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
1514 * src/ls.c (quote_name): Use initializer rather than memset to
1515 initialize an object to zero. This is easier to read and is less
1516 likely to introduce a runtime error due to a mixup. It causes
1517 gcc -W to issue a warning, but you can work around this by
1518 appending -Wno-missing-field-initializers.
1519 * src/pathchk.c (portable_chars_only): Likewise.
1520 * src/shred.c (main): Likewise.
1521 * src/stty.c (main): Likewise.
1522 * src/tr.c (card_of_complement): Likewise.
1523 * src/wc.c (wc): Likewise.
1525 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1527 * src/sort.c (usage): Mention again that sort fields are origin 1.
1529 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
1532 * bootstrap (usage, main program, symlink_to_gnulib): Add option
1533 --copy. Inspired by a suggestion from Bruno Haible.
1535 2006-10-09 Jim Meyering <jim@meyering.net>
1537 Avoid a compiler warning.
1538 * src/pathchk.c (portable_chars_only): Initialize variable of type
1539 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
1541 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
1543 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
1544 wrong file name in some cases. Lars Wendler reported a bug in
1546 * src/install.c (make_ancestor): New arg COMPONENT.
1547 * src/mkdir.c (make_ancestor): Likewise.
1548 * tests/install/basic-1: Check for install -Dv bug.
1549 * tests/mkdir/Makefile.am (TESTS): Add p-v.
1550 * tests/mkdir/p-v: New file, to test this bug.
1552 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
1554 * src/chgrp.c: Don't include lchown.h; no longer needed.
1555 * src/chown.c: Likewise.
1557 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
1558 current file system has useful d_type info.
1560 * src/dd.c (flags): noatime and nofollow now depend on
1561 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
1562 (usage): Output info about noatime and nofollow only if
1563 they are known to work.
1564 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
1565 than O_NOFOLLOW, when testing whether it's possible to avoid a
1566 race condition reliably.
1568 2006-10-05 Jim Meyering <jim@meyering.net>
1570 * src/c99-to-c89.diff: Update to reflect new offsets.
1572 * tests/install/basic-1: Skip the latter part of this test if the
1573 just-built dd binary is not readable. Otherwise, this test would fail
1574 when binaries were created as root. Reported by Bauke Jan Douma in
1575 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
1577 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
1579 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
1580 MiB, since XFS hosts can legitimately have large values of
1581 st_blksize. Problem reported by Tony Ernst in
1582 <http://savannah.gnu.org/bugs/?17903>.
1584 2006-10-04 Jim Meyering <jim@meyering.net>
1586 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
1587 Paul Eggert pointed out that the specified file may exist,
1588 in spite of such an errno value.
1589 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
1590 * tests/rm/ignore-name-too-long: Remove file.
1591 * NEWS: Update here, too.
1593 2006-10-03 Jim Meyering <jim@meyering.net>
1595 * tests/rm/fail-eperm: Report failure also if rm is terminated by
1598 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
1599 and one in shred.c -- that were added before coreutils-6.3.
1600 Reported by Michael Deutschmann.
1602 * src/c99-to-c89.diff: Update to reflect new offsets.
1604 * src/remove.c (remove_entry): With -f, exit successfully in spite
1605 of a missing file under some very unusual conditions (with errno
1606 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
1608 With --force (-f), rm no longer fails for ENOTDIR.
1609 * src/remove.c (ignorable_missing): New function.
1610 Use it everywhere, rather than open-coding the test.
1611 Andreas Schwab reported the ENOTDIR problem.
1612 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
1614 * NEWS: Mention the bug fix.
1615 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
1616 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
1617 * tests/rm/Makefile.am (TESTS): Add the new file names.
1619 * bootstrap: Undo last change to this file, since now gnulib-tool
1620 sticks with the automake default in generating dependencies.
1622 * NEWS: Add a line for 6.4-cvs.
1623 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
1625 2006-09-30 Jim Meyering <jim@meyering.net>
1628 * NEWS: Record the 6.3 release date.
1629 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1631 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
1633 * src/c99-to-c89.diff: Update offsets.
1635 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
1637 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
1638 as it doesn't work with Solaris /bin/sh.
1640 2006-09-29 Jim Meyering <jim@meyering.net>
1642 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
1645 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
1646 use .1 as the increment. Actual output varies too much.
1647 [eq-wid-3]: New, commented out test.
1649 * src/shuf.c (read_input): Fix an off-by-one error that
1650 would cause an infloop for piped input of 8KB or more.
1651 * NEWS: Mention the fix.
1652 * tests/misc/shuf: Test for the above fix.
1654 Since any system may be affected by the Darwin readdir bug,
1655 perform the extra rewinddir unconditionally. The performance
1656 impact of rewinding a directory is negligible.
1657 * src/remove.c (NEED_REWIND): Define to use
1658 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
1660 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
1661 increment translates to a slightly larger value.
1662 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
1663 The final expected value wasn't being printed.
1665 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
1666 and NFS, whereby rm would not remove all files in a directory.
1667 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
1668 (NEED_REWIND): New macro, so that we incur the cost of the work-around
1669 rewinddir only on afflicted systems.
1670 * NEWS: Clarify and correct.
1671 * tests/rm/readdir-bug: New file. Test for the above fix.
1672 * tests/rm/Makefile.am (TESTS): Add it.
1673 Prompted by testing and analysis from Bruno Haible:
1674 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
1676 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
1678 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
1679 suggested for Debian stable, which uses Perl 5.8.4.
1681 2006-09-28 Jim Meyering <jim@meyering.net>
1683 Automatically generated dependencies are important even
1684 when all of the sources in a directory come from gnulib.
1685 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
1686 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
1688 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
1689 Ensure that IFS is set properly and unset PATH.
1691 Work properly even when the name of the selected file starts with "-".
1692 Invoke rm via "../../src/rm", and adjust expected output.
1693 Prompted by a patch from Tim Waugh.
1695 * README-cvs: Add Bison to the list of required packages.
1697 2006-09-26 Jim Meyering <jim@meyering.net>
1699 * src/c99-to-c89.diff: Update offsets.
1701 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
1702 it from removing a directory containing 188 or more entries.
1703 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
1704 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
1705 Reported by Matthew Woehlke.
1707 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
1709 * NEWS: "groups user" no longer outputs "user :"; you need at least
1710 two users. "groups" now processes options like --help more compatibly.
1711 * src/groups.sh: Implement the option-processing change.
1712 Handle user and group names with special characters more robustly.
1713 Report write errors instead of exiting silently with status 1.
1715 2006-09-26 Jim Meyering <jim@meyering.net>
1717 * README: Warn not to run autoreconf manually. Use bootstrap instead.
1719 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
1720 Rewrite to avoid using temporary, $status.
1722 * NEWS: Mention the bug fix.
1723 * src/groups.sh: Don't hide a write failure.
1724 Reported by Iain Calder <ic56@rogers.com>.
1726 2006-09-25 Jim Meyering <jim@meyering.net>
1728 * src/chown.c (usage): Clarify --dereference description.
1729 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
1731 2006-09-24 Jim Meyering <jim@meyering.net>
1733 * NEWS: Mention these fixes.
1734 * src/copy.c (copy_reg): With --verbose (-v), print
1735 "removed `file_name'" just after unlinking a file.
1736 (copy_internal): Likewise, in three more places.
1737 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
1738 * tests/mv/hard-verbose: New file. Test for the above fix.
1739 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
1741 * tests/help-version (sync_args): Don't call sync, since it spins up
1742 disks that I've deliberately caused to spin down (but not unmounted).
1744 * NEWS: Mention the improvement to sort.
1746 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
1747 as well as existing.
1749 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
1750 since that predated addition of d_type support.
1752 2006-09-23 Jim Meyering <jim@meyering.net>
1754 * gl/modules/getloadavg.diff: New file. Work around the way the latest
1755 version of the getloadavg module interacts with our bootstrap script.
1756 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
1757 * Makefile.am (EXTRA_DIST): Sort file names.
1758 Add bootstrap and gl/modules/getloadavg.diff
1760 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1762 * bootstrap: Add support for --force.
1763 (usage): New function. Describe usage less tersely.
1764 (CVS_only_file): New var.
1766 * NEWS: Document fix for cp -i and mv -i.
1767 * src/copy.c (copy_internal): With -i, prompt even if the source
1768 is a directory and the destination is not. This is required by
1769 POSIX and gives the user a chance to bail out before failing.
1770 * tests/cp/Makefile.am (TESTS): Add cp-i.
1771 * tests/cp/cp-i: New file.
1772 * tests/mv/Makefile.am (TESTS): Add i-5.
1773 * tests/mv/i-5: New file.
1775 2006-09-20 Jim Meyering <jim@meyering.net>
1777 * NEWS: Mention the chmod bug fix.
1779 * tests/chmod/inaccessible: New test, specifically for this bug.
1780 Based on a test case from Paul Eggert.
1781 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
1783 Fix the 2006-09-18 bug differently.
1784 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
1785 tell fts_read to stat the file again, in case it has become
1786 accessible since the initial fts_open call.
1787 * src/chown-core.c (change_file_owner): Likewise.
1789 * src/chmod.c: Revert last change. There is a better way.
1790 * src/chown-core.c: Likewise.
1792 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
1794 * src/ln.c (target_directory_operand): Rewrite to avoid porting
1795 problem on Tandem reported by Matthew Woehlke in
1796 <https://savannah.gnu.org/bugs/?17172>.
1798 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
1800 Fix bug where chmod, chown, and chgrp did not process operands
1801 left-to-right in some cases.
1802 * src/chmod.c (wd_errno): New var.
1803 (chmod_file): New function, with most of the contents of the
1804 old prcess_file function.
1805 (process_files): Use it. This gives file names to fts one
1806 at a time, so that they are processed left-to-right as POSIX
1808 * src/chown-core.c (wd_errno, chown_files): Likewise.
1809 (chown_file): New function.
1810 * tests/install/basic-1: Redo test so as to not workaround
1811 the chmod bug, thereby testing for it.
1813 * src/shuf.c (main): Quote the entire range when reporting an
1814 invalid one, rather than just the part that contained the error.
1816 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
1817 sometimes left behind if the test is skipped or interrupted.
1819 * bootstrap (symlink_to_gnulib): New function.
1820 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
1821 to copies-of-gnulib.
1822 (cp_mark_as_generated, slurp, gnulib_files):
1823 Avoid making a copy if it's the same as the old version.
1824 (gnulib_files): Add support for this variable (used by Bison).
1826 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
1827 indicating flaw in kernel. Reword to say that the flaw isn't
1828 serious for coreutils, since the flaw does affect ls -i.
1830 * tests/chgrp/basic: Fix bug in test case exposed by building on
1831 Solaris 8 in a setgid directory. The test case incorrectly
1832 assumed that 'symlink' would be in group $g1.
1834 2006-09-18 Jim Meyering <jim@meyering.net>
1836 * NEWS: Add a line for 6.3-cvs.
1837 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
1840 * NEWS: Record the 6.2 release date.
1841 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
1843 2006-09-17 Jim Meyering <jim@meyering.net>
1845 * tests/chgrp/basic: On an OpenBSD system, rather than failing
1846 due to a known problem, merely warn about it.
1847 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
1848 Instead, use stat to test file system for desired results, directly.
1849 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
1851 * tests/envvar-check: Add more variable names to the list of those
1852 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
1853 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
1855 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
1857 * NEWS: Document that mkdir -p and install -d now fork on occasion.
1858 * bootstrap.conf (gnulib_modules): Add savewd.
1859 * src/install.c: Include savewd.h.
1860 (process_dir): New function.
1861 (main, install_file_in_file_parents): Use it, along with the new
1862 savewd module, to avoid some race conditions.
1863 * src/mkdir.c: Include savewd.h.
1864 (struct mkdir_options): New members make_ancestor_function, mode,
1866 (make_ancestor): Return 1 if the resulting directory is not readable.
1867 (process_dir): New function.
1868 (main): Use it, along with new savewd module, to avoid some
1869 race conditions. Fill in new slots of struct mkdir_options, so
1870 that callees get the values.
1871 * tests/install/basic-1: Test for coreutils 5.97 bug that was
1872 fixed in coreutils 6.0, and which should still be fixed with
1874 * tests/mkdir/p-3: Likewise.
1876 2006-09-15 Jim Meyering <jim@meyering.net>
1878 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
1879 The 2006-09-08 changes made it so "mv dir new-name/" would
1880 fail on NetBSD 1.6. This makes it work once again.
1882 2006-09-14 Jim Meyering <jim@meyering.net>
1884 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
1885 Instead, since it's a little fragile, assert the condition.
1886 (target_directory_operand): Update comment to reflect latest change.
1888 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
1890 * src/who.c (print_user): Rewrite to avoid warning from
1891 GCC 4.1.1 with -Wall.
1893 2006-09-12 Jim Meyering <jim@meyering.net>
1895 * tests/mv/atomic: Check for specific strace output, rather than
1896 simply nonempty. RHEL AS 4 would fail this test due to strace
1897 generating "[ Process PID=14434 runs in 32 bit mode. ]".
1898 Reported by Nelson Beebe.
1900 2006-09-11 Jim Meyering <jim@meyering.net>
1902 * src/remove.c (remove_dir): Move new cache_stat_init call onto
1904 (rm_1): Move declaration of "st" and new cache_stat_init call
1905 "down" to nearer where they're used.
1906 * src/c99-to-c89.diff: Add another set of curly braces.
1908 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
1910 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
1911 substr's last operand is very large. Performance problem reported
1914 2006-09-09 Jim Meyering <jim@meyering.net>
1916 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
1918 (sc_require_config_h): Skip this test if there are no version-
1919 controlled .c files.
1920 (sc_prohibit_assert_without_use): Likewise.
1922 2006-09-08 Jim Meyering <jim@meyering.net>
1924 * bootstrap: Export CVS_RSH separate from its assignment, to work
1925 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
1927 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
1929 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
1930 no file operand is given, and standard input is any FIFO.
1931 This is in response to Open Group XCU ERN 114.
1932 * src/tail.c (main): Likewise.
1934 2006-09-08 Jim Meyering <jim@meyering.net>
1936 mv and "cp -r" no longer fail when invoked with two arguments
1937 where the first one names a directory and the second name ends in
1938 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
1939 now succeeds, once more. This reverts part of the 2004-06-27
1941 * NEWS: Say the above.
1942 * src/mv.c (target_directory_operand): Don't require (here)
1943 that the target operand "look like" a directory. This change
1944 pushes the test down to the rename syscall level, where a
1945 "mv dir existing-non-dir/" will mistakenly succeed on older systems
1946 that ignore trailing slashes in the rename destination argument.
1947 * src/cp.c (target_directory_operand): Likewise, but for cp.
1948 * tests/mv/trailing-slash: Exercise the above fixes.
1949 * tests/cp/trailing-slash: New file.
1950 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
1952 * bootstrap: Use the previously unused variable, $src,
1953 to avoid repeating "$GNULIB_SRCDIR/$file".
1955 * bootstrap (cp_mark_as_generated): Don't use "local", to
1956 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
1957 Rename now-global "$src" and "$dst" to have cp_ prefix.
1958 Safer, and avoids confusion.
1960 * bootstrap (cp_mark_as_generated): New function.
1961 (slurp): Use it to prepend editor hints and a warning that
1962 the file we're copying is generated.
1963 Suggestion from Bruce Korb.
1964 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
1965 Fix last-minute typo.
1967 2006-09-07 Jim Meyering <jim@meyering.net>
1969 * bootstrap: Revert last change. There are less disruptive ways
1970 to mark these generated files as read-only.
1972 * src/c99-to-c89.diff: Update to have proper offsets.
1974 2006-09-06 Jim Meyering <jim@meyering.net>
1976 Ensure that some gnulib-tool-generated files are read-only.
1977 * bootstrap (slurp): Put the body of this function in a sub-shell,
1978 with "umask a-w" so that all new files are read-only. Remove each
1979 file before we write to it, in case it's read-only.
1980 Make po/Makevars and runtime-po/Makevars read-only, too.
1982 2006-09-05 Jim Meyering <jim@meyering.net>
1984 * tests/cp/acl: Skip this test when cp lacks ACL support.
1985 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
1987 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
1988 context from change of 2006-09-02.
1990 2006-09-04 Jim Meyering <jim@meyering.net>
1992 * README-cvs: Fix typo in update command.
1994 2006-09-03 Jim Meyering <jim@meyering.net>
1996 * NEWS: Tweak the wording in the new change description so that
1997 no one can think this change causes e.g., `rm -fr foo../' to fail.
1999 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
2000 Use $CONFIG_HEADER, rather than hard-coding it.
2001 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
2003 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
2005 * NEWS: rm now rejects attempts to remove /, ./, and ../.
2006 * src/basename.c: Don't include dirname.h, since system.h does it now.
2007 * src/chmod.c: Likewise.
2008 * src/copy.c: Likewise.
2009 * src/cp.c: Likewise.
2010 * src/df.c: Likewise.
2011 * src/dircolors.c: Likewise.
2012 * src/dirname.c: Likewise.
2013 * src/du.c: Likewise.
2014 * src/install.c: Likewise.
2015 * src/ln.c: Likewise.
2016 * src/ls.c: Likewise.
2017 * src/mkdir.c: Likewise.
2018 * src/mv.c: Likewise.
2019 * src/remove.c: Likewise.
2020 * src/rm.c: Likewise.
2021 * src/rmdir.c: Likewise.
2022 * src/shred.c: Likewise.
2023 * src/split.c: Likewise.
2024 * src/su.c: Likewise.
2025 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
2027 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
2029 * src/rm.c (usage, main): --preserve-root is now the default.
2030 * src/remove.h: Fix comment.
2031 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
2032 (cache_statted, cache_stat_ok): New functions.
2033 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
2034 which is no longer needed with the new functions. All callers
2036 (prompt, is_dir_lstat, remove_entry, remove_dir):
2037 New struct stat * arg. All callers changed.
2038 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
2039 (remove_cwd_entries, remove_dir, rm_1):
2040 Use and maintain the file status cache.
2041 (prompt, remove_entry): Omit the first "directory" in the diagnostic
2042 "Cannot remove directory `foo': is a directory". This causes "rm"
2043 to pass a test case that it would otherwise fail now that it
2044 "knows" more about its argument. I think the diagnostic is better
2045 without the first "directory" anyway.
2046 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
2047 (rm_1): Reject attempts to remove /, ./, or ../.
2048 * tests/rm/Makefile.am (TESTS): Add r-4.
2049 * tests/rm/r-4: New file.
2051 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
2053 * src/stat.c: Include <stddef.h>
2054 (alignof): New macro.
2055 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
2057 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
2059 (print_statfs): If f_fsid isn't an integer, grab its words one
2060 at a time in little-endian order. This is a bit easier to configure
2061 and should avoid a compilation failure on MacOS reported by Bruno
2064 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
2066 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
2067 work around a Mac OS X porting problem reported by Bruno Haible in
2068 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
2069 (print_statfs): Use them.
2071 * bootstrap.conf (gnulib_modules): Add isapipe.
2072 * src/tail.c: Include isapipe.h.
2073 (IS_PIPE_LIKE_FILE_TYPE): Remove.
2074 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
2075 tailable, since this seems to be portable.
2076 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
2077 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
2079 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
2082 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
2084 * src/copy.c (copy_internal): Don't test whether macros like
2085 S_ISLNK are defined, since they're always defined now.
2086 * src/cp.c (main): Likewise.
2087 * src/ln.c (main): Likewise.
2088 * src/ls.c (get_link_name, make_link_name): Likewise.
2089 * src/mknod.c (main): Likewise.
2090 * src/mkfifo.c (usage): Likewise.
2091 * src/who.c (S_IWGRP): Likewise.
2093 Adjust to recent gnulib changes for the gnulib module.
2094 * bootstrap.conf (gnulib_modules): Add fcntl.
2095 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
2096 is already assuming these macros are defined.
2097 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
2098 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
2099 Remove; the fcntl module now handles these.
2101 Adjust to recent gnulib changes for the inttypes module.
2102 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
2103 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
2105 * src/system.h: Don't bother to include <stdint.h>, since we can
2106 now assume inttypes.h does the equivalent of including stdint.h.
2108 2006-08-27 Jim Meyering <jim@meyering.net>
2110 * src/copy.c (copy_internal): Don't make a backup if the last
2111 component of the source name is "." or "..".
2112 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
2113 * NEWS: Mention this.
2114 * tests/cp/src-base-dot: New file. Test for the above fix.
2115 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
2117 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
2118 (dot_or_dotdot): ...new static inline function.
2119 * src/remove.c (rm_1): Reflect this renaming.
2120 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
2122 * src/copy.c (copy_internal): Add comments.
2124 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
2126 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
2127 since Automake supplies them for us. It always did -I$(srcdir),
2128 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
2129 is now also doing -I../lib.
2131 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
2132 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
2133 since there might not be any .po files.
2134 (WGET_COMMAND): Set to empty if wget doesn't
2135 seem to be available.
2137 2006-08-26 Jim Meyering <jim@meyering.net>
2139 This test was failing in some environments.
2140 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
2141 to set LS_COLORS in the environment.
2142 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
2143 Reported by Bob Proulx.
2145 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
2147 * Makefile.am (EXTRA_DIST): Remove these files here, too:
2148 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
2149 .x-sc_two_space_separator_in_usage.
2151 Fix "mv --verbose --backup" so its output includes the
2152 " (backup: foo.~1~)" suffix also when backing up a directory.
2153 * NEWS: Report this bug fix.
2154 * src/copy.c (emit_verbose): New function, factored out of...
2155 (copy_internal): ...here. Use the new function.
2156 * tests/mv/backup-dir: Test for the above fix.
2157 * tests/mv/Makefile.am (TESTS): Add backup-dir.
2159 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
2161 * .x-sc_no_if_have_config_h: Remove; no longer needed.
2162 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
2163 * .x-sc_two_space_separator_in_usage: Likewise.
2164 * Makefile.maint (sc_no_have_config_h): Renamed from
2165 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
2166 is absent everywhere.
2167 * bootstrap.conf (gnulib_modules): Add config-h.
2168 * src/shred.c: Include <config.h> unconditionally, since
2169 we now assume config.h exists.
2170 * src/dircolors.c: Likewise.
2172 2006-08-26 Jim Meyering <jim@meyering.net>
2174 "ls --color" would highlight other-writable and sticky directories
2175 no differently than regular directories on a file system with
2176 dirent.d_type support.
2177 * NEWS: Say the above.
2178 * src/ls.c (gobble_file): With --color, also stat the file when
2179 we know it is a directory.
2180 Derived from an anonymous one-line fix and bug report:
2181 <http://savannah.gnu.org/bugs/?15043>.
2182 * tests/ls/color-dtype-dir: New file. Test for the above fix.
2183 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
2185 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
2187 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
2189 * bootstrap.conf: Add configmake, verify.
2190 * src/.cvsignore: Remove localedir.h.
2191 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
2192 subsumed by configmake.
2193 * src/system.h: Include configmake.h rather than localedir.h
2194 (LOCALEDIR): New macro.
2196 Rewrite to avoid some unnecessary casts, macros, literals.
2197 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
2199 (SECTOR_SIZE, SECTOR_MASK): New constants.
2200 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
2201 and use the SECTOR_* constants when applicable. Check for size <
2202 0 rather than size == -1, since negative-size files are a sign of
2205 2006-08-25 Bruno Haible <bruno@clisp.org>
2207 * src/shred.c (dopass): Assume a continuable error if EIO even
2208 if the current position is not a multiple of 512.
2210 2006-08-24 Jim Meyering <jim@meyering.net>
2212 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
2214 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
2216 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
2217 macro was being used without being defined.
2218 (SB_F_NAMEMAX): Remove cast.
2219 (f_fsid) [BeOS]: Likewise.
2220 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
2222 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
2224 (xstrcat): Remove. All uses changed to use the above functions.
2225 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
2226 buffer len. All uses changed. Output '?', not '*', for unknown
2227 data or errors. Do not assume signed values can be interchanged
2228 with unsigned when printing.
2229 (print_statfs): For %i, print the fsid as a single int, not as a
2231 (print_it): Quote invalid format better.
2233 * NEWS: printf supports the I flag.
2234 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
2236 2006-08-23 Bruno Haible <bruno@clisp.org>
2238 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
2239 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
2240 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
2242 * src/ls.c (SA_RESTART): Fallback define.
2244 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
2246 * src/system.h (EDQUOT): Define if not already defined.
2247 Problem reported by Bruno Haible for BeOS.
2249 * .cvsignore: Remove config.h, config.hin, as they are now
2251 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
2253 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
2255 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
2256 to accommodate today's gnulib change.
2258 2006-08-23 Jim Meyering <jim@meyering.net>
2260 * NEWS: Mention the sweeping infrastructure changes.
2262 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
2264 * bootstrap.conf (gnulib_modules): Add gnupload.
2265 * Makefile.maint (emit_upload_commands): gnupload is now
2267 * gnupload: Remove from CVS, since it's now a gnulib module.
2269 * bootstrap (bootstrap_conf_cleanup): Remove.
2270 (excluded_files): New var.
2271 * bootstrap.conf: Likewise.
2272 * bootstrap (slurp): Exclude files early if they're in the
2273 excluded_files list. That way, their names don't get put into
2276 * aclocal.m4, config.hin, configure:
2277 Remove from CVS, since ./bootstrap generates them automatically.
2278 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
2279 configure, *.cache, *.lineno, *.log.
2280 Remove more-specific entries. This catches files like configure.lineno.
2281 * man/.cvsignore: Add Makefile.in.
2282 * src/.cvsignore: Add Makefile.in.
2283 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
2286 * tests/chgrp/.cvsignore:
2287 * tests/chmod/.cvsignore:
2288 * tests/chown/.cvsignore:
2289 * tests/cp/.cvsignore:
2290 * tests/cut/.cvsignore:
2291 * tests/dd/.cvsignore:
2292 * tests/dircolors/.cvsignore:
2293 * tests/du/.cvsignore:
2294 * tests/expr/.cvsignore:
2295 * tests/factor/.cvsignore:
2296 * tests/fmt/.cvsignore:
2297 * tests/head/.cvsignore:
2298 * tests/install/.cvsignore:
2299 * tests/join/.cvsignore:
2300 * tests/ln/.cvsignore:
2301 * tests/ls/.cvsignore:
2302 * tests/ls-2/.cvsignore:
2303 * tests/md5sum/.cvsignore:
2304 * tests/misc/.cvsignore:
2305 * tests/mkdir/.cvsignore:
2306 * tests/mv/.cvsignore:
2307 * tests/od/.cvsignore:
2308 * tests/pr/.cvsignore:
2309 * tests/readlink/.cvsignore:
2310 * tests/rm/.cvsignore:
2311 * tests/rmdir/.cvsignore:
2312 * tests/seq/.cvsignore:
2313 * tests/sha1sum/.cvsignore:
2314 * tests/shred/.cvsignore:
2315 * tests/sort/.cvsignore:
2316 * tests/stty/.cvsignore:
2317 * tests/sum/.cvsignore:
2318 * tests/tac/.cvsignore:
2319 * tests/tail/.cvsignore:
2320 * tests/tail-2/.cvsignore:
2321 * tests/tee/.cvsignore:
2322 * tests/test/.cvsignore:
2323 * tests/touch/.cvsignore:
2324 * tests/tr/.cvsignore:
2325 * tests/tsort/.cvsignore:
2326 * tests/unexpand/.cvsignore:
2327 * tests/uniq/.cvsignore:
2328 * tests/wc/.cvsignore:
2329 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
2330 *.X, *.O, *-tests, build-script, mk-script if they're never
2331 created in this directory.
2333 2006-08-22 Bruno Haible <bruno@clisp.org>
2336 * src/uptime.c: Include OS.h if it exists.
2337 (print_uptime): On BeOS, use the get_system_info function (actually a
2338 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
2339 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
2341 2006-08-22 Jim Meyering <jim@meyering.net>
2343 * .cvsignore: Add ABOUT-NLS.
2345 Move the check-AUTHORS rule to be run as part of "make distcheck",
2346 rather than "make check".
2347 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
2348 cause "make check" to fail on systems unable to build all binaries.
2349 * Makefile.maint (check-AUTHORS): New rule.
2350 (local-checks-available): Add it here.
2351 Reported by Bruno Haible. Needed for BeOS.
2353 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
2355 * src/df.c (print_header, show_dev): Use a column width that
2356 depends on the block size of -P is specified and not autoscaling.
2357 Problem reported by Gustavo G. Rondina in:
2358 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
2360 2006-08-21 Jim Meyering <jim@meyering.net>
2362 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
2363 when the shell variable, SHELL, is not set.
2364 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
2365 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
2367 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
2368 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
2369 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
2370 od: invalid type string `u8';
2371 this system doesn't provide a 8-byte integral type
2372 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
2374 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
2376 Add a bootstrap procedure, so that the CVS version contains fewer
2377 files and we bootstrap the rest from gnulib, gettext, etc.
2378 * README-cvs: New file.
2379 * bootstrap: New file.
2380 * bootstrap.conf: New file.
2381 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
2382 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
2384 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
2385 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
2387 (gl_MACROS): Call just after gl_EARLY, just for clarity.
2388 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
2389 * src/kill.c (strtoimax): Remove decl.
2390 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
2391 * src/wc.c: Likewise.
2392 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
2393 declaration, so that we don't need to patch this file.
2394 * src/printf.c (strtoimax, strtoumax): Remove decls.
2395 * src/su.c: Include getpass.h.
2397 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
2398 Include inttypes.h unconditionally.
2399 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
2400 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
2401 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
2402 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
2403 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
2405 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
2406 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
2407 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
2408 * tests/cp/Makefile.in, tests/cut/Makefile.in:
2409 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
2410 * tests/du/Makefile.in, tests/expr/Makefile.in:
2411 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
2412 * tests/general/Makefile.in, tests/head/Makefile.in:
2413 * tests/install/Makefile.in, tests/join/Makefile.in:
2414 * tests/ln/Makefile.in, tests/ls/Makefile.in:
2415 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
2416 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
2417 * tests/mv/Makefile.in, tests/od/Makefile.in:
2418 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
2419 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
2420 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
2421 * tests/shred/Makefile.in, tests/sort/Makefile.in:
2422 * tests/stty/Makefile.in, tests/sum/Makefile.in:
2423 * tests/tac/Makefile.in, tests/tail/Makefile.in:
2424 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
2425 * tests/test/Makefile.in, tests/touch/Makefile.in:
2426 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
2427 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
2428 * tests/wc/Makefile.in:
2429 Remove from CVS, since ./bootstrap generates them automatically.
2431 2006-08-20 Eric Blake <ebb9@byu.net>
2433 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
2434 the patch from 2006-08-18 broke on cygwin.
2436 2006-08-20 Jim Meyering <jim@meyering.net>
2438 * NEWS: Add a line for 6.2-cvs.
2439 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
2441 2006-08-19 Jim Meyering <jim@meyering.net>
2444 * NEWS: Record the 6.1 release date.
2445 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2447 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
2449 Avoid test failure when `make check' is run through debuild.
2450 * tests/help-version: Ensure that $SHELL is set to some value
2451 and exported. Patch from Sven Joachim. For details, see
2452 <http://bugs.debian.org/355368>.
2454 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
2456 * README: Describe potential "pre-C99 build failure", and work-around.
2458 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
2459 backed out due to updates provoked by the copyright changes.
2460 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
2461 it propagates to the derived Makefile.am files.
2462 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
2463 so we don't mistakenly edit them again.
2464 * tests/cut/Makefile.am: Regenerate.
2465 * tests/head/Makefile.am: Likewise.
2466 * tests/join/Makefile.am: Likewise.
2467 * tests/pr/Makefile.am: Likewise.
2468 * tests/sort/Makefile.am: Likewise.
2469 * tests/tac/Makefile.am: Likewise.
2470 * tests/tail/Makefile.am: Likewise.
2471 * tests/test/Makefile.am: Likewise.
2472 * tests/tr/Makefile.am: Likewise.
2473 * tests/uniq/Makefile.am: Likewise.
2474 * tests/wc/Makefile.am: Likewise.
2476 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
2477 when the file's apparent size is not a multiple of its block size.
2478 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
2479 For some file sizes, writing that single byte would unnecessarily
2480 waste a few file blocks. That write may have been necessary in the
2481 early days of Linux, but now, removing it should be safe.
2482 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
2483 * tests/cp/sparse: New test for the above.
2484 * tests/cp/Makefile.am (TESTS): Add sparse.
2486 * tests/sparse-file: New file, essence factored out of...
2487 * tests/du/8gb: ... here. Use the new script.
2489 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
2491 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
2492 the CVS gettext manual now suggests 1000000.
2494 2006-08-18 Bruno Haible <bruno@clisp.org>
2496 Add support for NetBSD 3.0.
2497 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
2499 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
2500 has a field f_fstypename.
2501 This undoes the 2006-08-15 to src/stat.c.
2503 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
2505 Copyright notice fixes.
2507 * COPYING: Upgrade to latest version from FSF.
2509 * src/uname.c: Use (C) in copyright notice.
2511 * .vg-suppressions: Add copyright notice.
2512 * ChangeLog: Likewise.
2513 * ChangeLog-2005: Likewise.
2514 * Makefile.am: Likewise.
2517 * README-valgrind: Likewise.
2519 * announce-gen: Likewise.
2520 * man/Makefile.am: Likewise.
2521 * man/chmod.x: Likewise.
2522 * man/chown.x: Likewise.
2523 * man/df.x: Likewise.
2524 * man/du.x: Likewise.
2525 * man/rm.x: Likewise.
2526 * src/dircolors.hin: Likewise.
2527 * src/du-tests: Likewise.
2528 * src/extract-magic: Likewise.
2529 * src/tac-pipe.c: Likewise.
2530 * src/wheel-gen.pl: Likewise.
2531 * tests/Coreutils.pm: Likewise.
2532 * tests/Makefile.am.in: Likewise.
2533 * tests/acl: Likewise.
2534 * tests/envvar-check: Likewise.
2535 * tests/expensive: Likewise.
2536 * tests/group-names: Likewise.
2537 * tests/help-version: Likewise.
2538 * tests/mk-script: Likewise.
2539 * tests/priv-check: Likewise.
2540 * tests/rwx-to-mode: Likewise.
2541 * tests/sample-test: Likewise.
2542 * tests/setgid-check: Likewise.
2543 * tests/chgrp/basic: Likewise.
2544 * tests/chgrp/deref: Likewise.
2545 * tests/chgrp/no-x: Likewise.
2546 * tests/chgrp/posix-H: Likewise.
2547 * tests/chgrp/recurse: Likewise.
2548 * tests/chmod/c-option: Likewise.
2549 * tests/chmod/equal-x: Likewise.
2550 * tests/chmod/equals: Likewise.
2551 * tests/chmod/no-x: Likewise.
2552 * tests/chmod/octal: Likewise.
2553 * tests/chmod/setgid: Likewise.
2554 * tests/chmod/umask-x: Likewise.
2555 * tests/chmod/usage: Likewise.
2556 * tests/chown/basic: Likewise.
2557 * tests/chown/deref: Likewise.
2558 * tests/chown/separator: Likewise.
2559 * tests/cp/Makefile.am: Likewise.
2560 * tests/cp/acl: Likewise.
2561 * tests/cp/backup-1: Likewise.
2562 * tests/cp/backup-is-src: Likewise.
2563 * tests/cp/cp-HL: Likewise.
2564 * tests/cp/cp-deref: Likewise.
2565 * tests/cp/cp-mv-backup: Likewise.
2566 * tests/cp/cp-parents: Likewise.
2567 * tests/cp/deref-slink: Likewise.
2568 * tests/cp/dir-rm-dest: Likewise.
2569 * tests/cp/dir-slash: Likewise.
2570 * tests/cp/dir-vs-file: Likewise.
2571 * tests/cp/fail-perm: Likewise.
2572 * tests/cp/into-self: Likewise.
2573 * tests/cp/link: Likewise.
2574 * tests/cp/link-no-deref: Likewise.
2575 * tests/cp/link-preserve: Likewise.
2576 * tests/cp/no-deref-link1: Likewise.
2577 * tests/cp/no-deref-link2: Likewise.
2578 * tests/cp/no-deref-link3: Likewise.
2579 * tests/cp/perm: Likewise.
2580 * tests/cp/preserve-2: Likewise.
2581 * tests/cp/r-vs-symlink: Likewise.
2582 * tests/cp/same-file: Likewise.
2583 * tests/cp/slink-2-slink: Likewise.
2584 * tests/cp/special-bits: Likewise.
2585 * tests/cp/symlink-slash: Likewise.
2586 * tests/cut/Makefile.am: Likewise.
2587 * tests/cut/Test.pm: Likewise.
2588 * tests/dd/misc: Likewise.
2589 * tests/dd/not-rewound: Likewise.
2590 * tests/dd/skip-seek: Likewise.
2591 * tests/dd/skip-seek2: Likewise.
2592 * tests/dd/unblock-sync: Likewise.
2593 * tests/dircolors/simple: Likewise.
2594 * tests/du/2g: Likewise.
2595 * tests/du/8gb: Likewise.
2596 * tests/du/Makefile.am: Likewise.
2597 * tests/du/basic: Likewise.
2598 * tests/du/deref: Likewise.
2599 * tests/du/deref-args: Likewise.
2600 * tests/du/exclude: Likewise.
2601 * tests/du/fd-leak: Likewise.
2602 * tests/du/files0-from: Likewise.
2603 * tests/du/hard-link: Likewise.
2604 * tests/du/inaccessible-cwd: Likewise.
2605 * tests/du/long-from-unreadable: Likewise.
2606 * tests/du/long-sloop: Likewise.
2607 * tests/du/no-deref: Likewise.
2608 * tests/du/no-x: Likewise.
2609 * tests/du/restore-wd: Likewise.
2610 * tests/du/slash: Likewise.
2611 * tests/du/slink: Likewise.
2612 * tests/du/trailing-slash: Likewise.
2613 * tests/du/two-args: Likewise.
2614 * tests/expr/basic: Likewise.
2615 * tests/factor/basic: Likewise.
2616 * tests/fmt/basic: Likewise.
2617 * tests/fmt/long-line: Likewise.
2618 * tests/general/Makefile.am: Likewise.
2619 * tests/general/atgeneral.m4: Likewise.
2620 * tests/general/dd.at: Likewise.
2621 * tests/head/Makefile.am: Likewise.
2622 * tests/head/Test.pm: Likewise.
2623 * tests/install/basic-1: Likewise.
2624 * tests/install/create-leading: Likewise.
2625 * tests/install/d-slashdot: Likewise.
2626 * tests/install/trap: Likewise.
2627 * tests/join/Makefile.am: Likewise.
2628 * tests/join/Test.pm: Likewise.
2629 * tests/ln/backup-1: Likewise.
2630 * tests/ln/misc: Likewise.
2631 * tests/ln/sf-1: Likewise.
2632 * tests/ln/target-1: Likewise.
2633 * tests/ls/Makefile.am: Likewise.
2634 * tests/ls/Test.pm: Likewise.
2635 * tests/ls/dangle: Likewise.
2636 * tests/ls/dired: Likewise.
2637 * tests/ls/file-type: Likewise.
2638 * tests/ls/follow-slink: Likewise.
2639 * tests/ls/infloop: Likewise.
2640 * tests/ls/inode: Likewise.
2641 * tests/ls/m-option: Likewise.
2642 * tests/ls/no-arg: Likewise.
2643 * tests/ls/recursive: Likewise.
2644 * tests/ls/rt-1: Likewise.
2645 * tests/ls/stat-dtype: Likewise.
2646 * tests/ls/stat-failed: Likewise.
2647 * tests/ls/stat-vs-dirent: Likewise.
2648 * tests/ls/symlink-slash: Likewise.
2649 * tests/ls/time-1: Likewise.
2650 * tests/ls-2/tests: Likewise.
2651 * tests/md5sum/basic-1: Likewise.
2652 * tests/md5sum/newline-1: Likewise.
2653 * tests/misc/Makefile.am: Likewise.
2654 * tests/misc/base64: Likewise.
2655 * tests/misc/basename: Likewise.
2656 * tests/misc/cat-proc: Likewise.
2657 * tests/misc/close-stdout: Likewise.
2658 * tests/misc/csplit: Likewise.
2659 * tests/misc/date: Likewise.
2660 * tests/misc/date-sec: Likewise.
2661 * tests/misc/df: Likewise.
2662 * tests/misc/dirname: Likewise.
2663 * tests/misc/expand: Likewise.
2664 * tests/misc/false-status: Likewise.
2665 * tests/misc/fold: Likewise.
2666 * tests/misc/head-c: Likewise.
2667 * tests/misc/head-elide-tail: Likewise.
2668 * tests/misc/head-pos: Likewise.
2669 * tests/misc/mknod: Likewise.
2670 * tests/misc/nice: Likewise.
2671 * tests/misc/nl: Likewise.
2672 * tests/misc/nohup: Likewise.
2673 * tests/misc/paste-no-nl: Likewise.
2674 * tests/misc/pathchk1: Likewise.
2675 * tests/misc/printf: Likewise.
2676 * tests/misc/printf-hex: Likewise.
2677 * tests/misc/pwd-long: Likewise.
2678 * tests/misc/sha224sum: Likewise.
2679 * tests/misc/sha256sum: Likewise.
2680 * tests/misc/sha384sum: Likewise.
2681 * tests/misc/sha512sum: Likewise.
2682 * tests/misc/shuf: Likewise.
2683 * tests/misc/sort-merge: Likewise.
2684 * tests/misc/sort-rand: Likewise.
2685 * tests/misc/split-a: Likewise.
2686 * tests/misc/split-fail: Likewise.
2687 * tests/misc/split-l: Likewise.
2688 * tests/misc/stat-fmt: Likewise.
2689 * tests/misc/stat-printf: Likewise.
2690 * tests/misc/tac-continue: Likewise.
2691 * tests/misc/test-diag: Likewise.
2692 * tests/misc/tty-eof: Likewise.
2693 * tests/misc/wc-files0: Likewise.
2694 * tests/misc/wc-files0-from: Likewise.
2695 * tests/mkdir/concurrent-1: Likewise.
2696 * tests/mkdir/p-1: Likewise.
2697 * tests/mkdir/p-2: Likewise.
2698 * tests/mkdir/p-3: Likewise.
2699 * tests/mkdir/p-slashdot: Likewise.
2700 * tests/mkdir/p-thru-slink: Likewise.
2701 * tests/mkdir/parents: Likewise.
2702 * tests/mkdir/perm: Likewise.
2703 * tests/mkdir/special-1: Likewise.
2704 * tests/mkdir/t-slash: Likewise.
2705 * tests/mkdir/writable-under-readonly: Likewise.
2706 * tests/mv/Makefile.am: Likewise.
2707 * tests/mv/acl: Likewise.
2708 * tests/mv/atomic: Likewise.
2709 * tests/mv/backup-is-src: Likewise.
2710 * tests/mv/childproof: Likewise.
2711 * tests/mv/diag: Likewise.
2712 * tests/mv/dir-file: Likewise.
2713 * tests/mv/dir2dir: Likewise.
2714 * tests/mv/dup-source: Likewise.
2715 * tests/mv/force: Likewise.
2716 * tests/mv/hard-2: Likewise.
2717 * tests/mv/hard-3: Likewise.
2718 * tests/mv/hard-4: Likewise.
2719 * tests/mv/hard-link-1: Likewise.
2720 * tests/mv/i-1: Likewise.
2721 * tests/mv/i-2: Likewise.
2722 * tests/mv/i-3: Likewise.
2723 * tests/mv/i-4: Likewise.
2724 * tests/mv/i-link-no: Likewise.
2725 * tests/mv/into-self: Likewise.
2726 * tests/mv/into-self-2: Likewise.
2727 * tests/mv/into-self-3: Likewise.
2728 * tests/mv/into-self-4: Likewise.
2729 * tests/mv/leak-fd: Likewise.
2730 * tests/mv/mv-special-1: Likewise.
2731 * tests/mv/no-target-dir: Likewise.
2732 * tests/mv/part-fail: Likewise.
2733 * tests/mv/part-hardlink: Likewise.
2734 * tests/mv/part-rename: Likewise.
2735 * tests/mv/part-symlink: Likewise.
2736 * tests/mv/partition-perm: Likewise.
2737 * tests/mv/perm-1: Likewise.
2738 * tests/mv/reply-no: Likewise.
2739 * tests/mv/setup: Likewise.
2740 * tests/mv/to-symlink: Likewise.
2741 * tests/mv/trailing-slash: Likewise.
2742 * tests/mv/update: Likewise.
2743 * tests/mv/vfat: Likewise.
2744 * tests/od/od-N: Likewise.
2745 * tests/od/x8: Likewise.
2746 * tests/pr/Makefile.am: Likewise.
2747 * tests/pr/Test.pm: Likewise.
2748 * tests/readlink/can-e: Likewise.
2749 * tests/readlink/can-f: Likewise.
2750 * tests/readlink/can-m: Likewise.
2751 * tests/readlink/rl-1: Likewise.
2752 * tests/rm/Makefile.am: Likewise.
2753 * tests/rm/cycle: Likewise.
2754 * tests/rm/dangling-symlink: Likewise.
2755 * tests/rm/deep-1: Likewise.
2756 * tests/rm/dir-no-w: Likewise.
2757 * tests/rm/dir-nonrecur: Likewise.
2758 * tests/rm/dot-rel: Likewise.
2759 * tests/rm/empty-inacc: Likewise.
2760 * tests/rm/empty-name: Likewise.
2761 * tests/rm/f-1: Likewise.
2762 * tests/rm/fail-2eperm: Likewise.
2763 * tests/rm/fail-eperm: Likewise.
2764 * tests/rm/hash: Likewise.
2765 * tests/rm/i-1: Likewise.
2766 * tests/rm/i-no-r: Likewise.
2767 * tests/rm/inaccessible: Likewise.
2768 * tests/rm/interactive-always: Likewise.
2769 * tests/rm/interactive-once: Likewise.
2770 * tests/rm/ir-1: Likewise.
2771 * tests/rm/isatty: Likewise.
2772 * tests/rm/no-give-up: Likewise.
2773 * tests/rm/r-1: Likewise.
2774 * tests/rm/r-2: Likewise.
2775 * tests/rm/r-3: Likewise.
2776 * tests/rm/rm1: Likewise.
2777 * tests/rm/rm2: Likewise.
2778 * tests/rm/rm3: Likewise.
2779 * tests/rm/rm4: Likewise.
2780 * tests/rm/rm5: Likewise.
2781 * tests/rm/sunos-1: Likewise.
2782 * tests/rm/unread2: Likewise.
2783 * tests/rm/unread3: Likewise.
2784 * tests/rm/unreadable: Likewise.
2785 * tests/rmdir/fail-perm: Likewise.
2786 * tests/rmdir/ignore: Likewise.
2787 * tests/rmdir/t-slash: Likewise.
2788 * tests/seq/basic: Likewise.
2789 * tests/sha1sum/basic-1: Likewise.
2790 * tests/sha1sum/sample-vec: Likewise.
2791 * tests/shred/exact: Likewise.
2792 * tests/shred/remove: Likewise.
2793 * tests/sort/Makefile.am: Likewise.
2794 * tests/sort/Test.pm: Likewise.
2795 * tests/sort-time/Makefile: Likewise.
2796 * tests/sort-time/README: Likewise.
2797 * tests/sort-time/rand-gen: Likewise.
2798 * tests/stty/basic-1: Likewise.
2799 * tests/stty/row-col-1: Likewise.
2800 * tests/sum/basic-1: Likewise.
2801 * tests/sum/sysv: Likewise.
2802 * tests/tac/Makefile.am: Likewise.
2803 * tests/tac/Test.pm: Likewise.
2804 * tests/tail/Makefile.am: Likewise.
2805 * tests/tail/Test.pm: Likewise.
2806 * tests/tail-2/Makefile.am: Likewise.
2807 * tests/tail-2/append-only: Likewise.
2808 * tests/tail-2/assert: Likewise.
2809 * tests/tail-2/assert-2: Likewise.
2810 * tests/tail-2/big-4gb: Likewise.
2811 * tests/tail-2/fflush: Likewise.
2812 * tests/tail-2/infloop-1: Likewise.
2813 * tests/tail-2/proc-ksyms: Likewise.
2814 * tests/tail-2/start-middle: Likewise.
2815 * tests/tail-2/tail-n0f: Likewise.
2816 * tests/tee/basic: Likewise.
2817 * tests/tee/dash: Likewise.
2818 * tests/test/Makefile.am: Likewise.
2819 * tests/test/Test.pm: Likewise.
2820 * tests/touch/Makefile.am: Likewise.
2821 * tests/touch/dangling-symlink: Likewise.
2822 * tests/touch/empty-file: Likewise.
2823 * tests/touch/fail-diag: Likewise.
2824 * tests/touch/fifo: Likewise.
2825 * tests/touch/no-create-missing: Likewise.
2826 * tests/touch/no-rights: Likewise.
2827 * tests/touch/not-owner: Likewise.
2828 * tests/touch/obsolescent: Likewise.
2829 * tests/touch/read-only: Likewise.
2830 * tests/touch/relative: Likewise.
2831 * tests/tr/Makefile.am: Likewise.
2832 * tests/tr/Test.pm: Likewise.
2833 * tests/tr/failures: Likewise.
2834 * tests/tsort/basic-1: Likewise.
2835 * tests/unexpand/basic-1: Likewise.
2836 * tests/uniq/Makefile.am: Likewise.
2837 * tests/uniq/Test.pm: Likewise.
2838 * tests/wc/Makefile.am: Likewise.
2839 * tests/wc/Test.pm: Likewise.
2841 2006-08-17 Jim Meyering <jim@meyering.net>
2843 ls -CF would misalign columns in some cases.
2844 * src/ls.c (get_type_indicator): New function. extracted from...
2845 (print_type_indicator): ...here. Use it.
2846 (length_of_file_name_and_frills): Use it here, too, rather than
2847 assuming stat.st_mode is valid.
2848 Reported by Andreas Schwab, here:
2849 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
2850 See the test for this above. FYI, I did ls -CF /proc and visually
2851 inspected the result.
2853 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
2854 to mention the now-removed cp_options.xstat member.
2856 * Makefile.maint (patch-check): Adapt to work now that the patch
2857 modifies more than one file in src/.
2859 With this patch, permit building with Solaris cc on Solaris 7.
2860 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
2861 This integrates patches from Bruno Haible.
2863 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
2865 Fix some problems reported by Bruno Haible.
2866 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
2867 Skip this test if "chmod g+s d" silently does nothing.
2868 * tests/ls-2/tests: Skip this test suite if we can't set up files
2869 properly for the setuid-etc test. This simplifies some of the
2870 hacks we were using to work around porting problems.
2872 2006-08-16 Jim Meyering <jim@meyering.net>
2874 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
2875 * tests/cp/acl: Instead, skip the test if either setfacl
2877 Reported by Michael Stone.
2879 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
2881 * tests/lang-default (LC_ALL): Set to "C", so we get
2882 English-language diagnostics. Unset the other variables; it
2883 should be portable to use 'unset' for this stuff nowadays.
2884 Problem reported by Bruno Haible. Using "C" reverses the
2885 2000-10-22 change to fileutils in this area.
2887 Fix bugs when printing plurals of numbers that are not
2888 unsigned long int values.
2889 * src/system.h (select_plural): New function.
2890 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
2891 * src/uptime.c (print_uptime): Likewise.
2892 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
2893 print a floating point number, as reducing to 0 or 1 doesn't work
2894 for some languages. Instead, just use "s" for seconds since it
2895 doesn't need a plural form.
2897 2006-08-16 Bruno Haible <bruno@clisp.org>
2899 Old versions of gzip would write --help output to stderr, and it
2900 would be annoying to see that in the output of every "make" command.
2901 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
2904 2006-08-16 Andreas Schwab <schwab@suse.de>
2906 * tests/cp/acl: Don't use non-portable == operator for test.
2908 2006-08-16 Jim Meyering <jim@meyering.net>
2910 * tests/ls/stat-dtype: Use stat to test file system type, rather
2911 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
2913 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
2915 * NEWS: Mention that df exits with nonzero status if it generates
2916 no output. This change was in 6.0 but inadvertently unmentioned.
2917 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
2919 (show_dev): Don't set it until we actually output something.
2920 Print the header if this is the first output.
2921 (main): Don't print a header, as that is now show_dev's job.
2922 * tests/misc/Makefile.am (TESTS): Add df.
2923 * tests/misc/df: New file.
2925 2006-08-15 Eric Blake <ebb9@byu.net>
2927 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
2928 statvfs.f_type not present. See
2929 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
2931 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
2933 * src/dd.c (print_stats): Don't substitute "1" for number, as this
2934 causes confusion for the Hungarian translators. Problem reported
2935 by Egmont Koblinger here:
2936 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
2938 2006-08-15 Jim Meyering <jim@meyering.net>
2940 * .x-sc_require_config_h: Add lib/at-func.c.
2942 * NEWS: Add a line for 6.1-cvs.
2943 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
2945 2006-08-15 Jim Meyering <jim@meyering.net>
2948 * NEWS: Record the 6.0 release date.
2949 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2951 * TODO: Add an item (convert to use gnulib-tool), add to the plan
2952 for id-vs-getgrouplist, and remove a few completed items.
2954 * Makefile.maint (alpha beta major): Fix syntax error.
2956 2006-08-13 Jim Meyering <jim@meyering.net>
2958 * src/shred.c (usage): Don't indent the second line of an item.
2959 Otherwise, help2man would misformat the output.
2960 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
2962 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
2964 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
2965 Suggested by Eric Blake to avoid problems like
2966 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
2968 2006-08-11 Jim Meyering <jim@meyering.net>
2970 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
2971 failure that this test checks for (stat/dirent inode mismatch at
2972 a mount point), so continue to give a diagnostic about the failure,
2973 but don't actually count it as a failure.
2975 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
2977 * ABOUT-NLS: Update from gettext 0.15.
2978 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
2980 * src/csplit.c (struct control): Remove fastmap member.
2981 (extract_regexp): Allocate fastmap separately, since otherwise
2982 it might move due to a realloc. This fixes a bug that led
2983 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
2985 2006-08-10 Jim Meyering <jim@meyering.net>
2987 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
2988 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
2989 Redirect both stdout and stderr of df invocations.
2991 * src/dircolors.hin: Add a TERM directive for each of the following:
2992 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
2993 rxvt-cygwin-native, screen.linux, xterm-256color.
2994 Sort the TERM directives.
2995 From Mike Frysinger.
2997 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
2999 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
3000 See Debian bug 373736.
3002 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
3005 * src/.cvsignore: Add shuf.
3007 * Makefile.maint: Remove the po-update procedure; it doesn't
3008 work with the new repository on http://www.iro.umontreal.ca/.
3009 For now I guess we'll have to fix things by hand.
3010 (do-po-update, po-update): Remove. All references removed.
3012 * src/shuf.c (next_line): New function.
3013 (read_input): Use it, to avoid relying on GCC-specific behavior
3014 with void * arithmetic. Problem reported by Bob Proulx.
3015 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
3016 to detect this sort of problem automatically in the future.
3018 2006-08-09 Jim Meyering <jim@meyering.net>
3020 * src/ls.c: Add a compile-time check to ensure that filetype
3021 and filetype_letter have the same number of elements.
3023 * tests/misc/sort-rand: Remove use of --seed=S.
3025 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
3027 Add a command 'shuf', and modify shred and sort to use the new
3028 random number generator library of 'shuf'.
3030 * AUTHORS: Add shuf.
3032 * NEWS: Likewise. Mention new --random-source option for shred
3033 and sort. Move "sort +1 -2" notice to the appropriate section,
3034 and clarify its role with respect to POSIXLY_CORRECT.
3035 * man/.cvsignore: Add shuf.1.
3036 * man/Makefile.am (dist_man_MANS): Add shuf.1.
3037 (shuf.1): New dependency.
3038 * man/shuf.x: New file.
3039 * src/Makefile.am (bin_PROGRAMS): Add shuf.
3040 (EXTRA_DIST): Remove rand-isaac.c.
3041 (shuf_LDADD): New macro.
3042 * src/rand-isaac.c: Remove, moving most of its contents to
3044 * src/shuf.c: New file.
3045 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
3046 Don't include rand-isaac.c; include randint.h and randread.h instead.
3047 (RANDOM_SOURCE_OPTION): New enum.
3048 (long_opts, usage, main): New option --random-source.
3049 * src/sort.c: Likewise.
3050 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
3051 All callers changed to use randint interface.
3052 (fillrand): Remove. All callers changed to use randread interface.
3053 (dopass): Remove dependency on ISAAC buffer size.
3054 (genpattern): Don't wipe the random state here.
3055 (randint_source): New static var.
3056 (clear_random_data): New function.
3057 (main): Allocate random source, and arrange to wipe it on exit.
3058 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
3059 (longopts, usage, main): Remove undocumented --seed option;
3060 it's now replaced by --random-source.
3061 (rand_state, get_hash): Remove.
3062 (randread_source): New static var.
3063 (random_state, cmp_hashes, compare_random): New functions; they guarantee
3064 no collisions in the random hash function.
3065 (keycompare): Use compare_random for -R; don't fall back on comparing
3066 via memcoll, since compare_random does the right thing.
3067 * tests/misc/Makefile.am (TESTS): Add shuf.
3068 * tests/misc/shuf: New file.
3070 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
3072 * src/copy.c (set_author): Preserve the st_author field via the
3073 file descriptor dest_desc.
3075 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
3077 * NEWS: chmod now preserves setuid and setgid bits on directories
3078 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
3080 Fix test case problems if working directory is setgid,
3081 reported by Bob Proulx.
3082 * tests/cp/fail-perm: Use symbolic mode so that we clear
3083 setgid bit more reliably on directories.
3084 * tests/mkdir/special-1 (set_mode_string): Likewise.
3086 2006-07-27 Jim Meyering <jim@meyering.net>
3088 * src/chgrp.c (usage): Use correct grammar in description of the
3090 * src/chown.c (usage): Likewise.
3092 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
3094 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
3095 Correctly access SRC_SB's element ST_AUTHOR.
3097 2006-07-26 Jim Meyering <jim@meyering.net>
3099 * tests/ls/stat-failed: Adapt to match new expected output.
3102 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
3103 than having the code test for all of the other types first.
3104 Hoist the set-uid/gid-testing code "up" into this new block.
3105 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
3106 C_ORPHAN, not as C_FILE.
3108 2006-07-26 Jim Meyering <jim@meyering.net>
3110 Checking in a change from Paul.
3112 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
3114 * src/ls.c (DT_INIT): Remove. All uses removed.
3115 (enum filetype): Use an ordinary enum rather than trying to keep
3116 the values in sync with DT_FIFO etc. That way, we don't have
3117 to make special assumptions about them. All uses changed.
3118 (whiteout): New constant member of enum filetype.
3119 (filetype_letter): New constant, for use with enum filetype.
3120 (FILETYPE_INDICATORS): New initializer list.
3121 (print_dir): Add case for DT_WHT.
3122 (gobble_file): If stat fails, don't discard information from
3123 readdir; instead, preserve it so it can be printed.
3124 (print_long_format): Fall back on readdir result if stat info
3125 is not available. Use "?" to denote each unknown mode char,
3126 instead of an overall "?", since we now know some of the mode
3128 (print_type_indicator): Now that MODE isn't necessarily
3129 useful, guard all uses.
3130 Now that two blocks in the type-checking tree can set "type = C_FILE",
3131 move the suffix-handling code out and down.
3133 2006-07-26 Jim Meyering <jim@meyering.net>
3135 Prepare for the above change.
3136 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
3137 and adjust uses. From a patch by Paul Eggert.
3139 2006-07-26 Jim Meyering <jim@meyering.net>
3141 * src/ls.c: Correct indentation/formatting in a few places.
3143 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
3145 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
3146 Problem report and fix from Bob Proulx.
3147 * NEWS: Clarify the "chmod 0500" news, and correct the vague
3148 statements about compatibility with BSD.
3150 2006-07-25 Jim Meyering <jim@meyering.net>
3152 * src/ls.c (gobble_file): When handling a stat-failed entry,
3153 print the entry name not the absolute_name -- to be consistent
3154 with the usual case.
3155 * tests/ls/stat-failed: Update accordingly.
3157 * src/ls.c: Add parens around the new uses of ?: ternary operator.
3159 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
3162 Get --dired offsets right when handling stat-failed entries.
3163 * src/ls.c (print_long_format): Be careful to increment P by the
3164 appropriate amount, even when inode_number_width and nlink_width
3166 * tests/ls/stat-failed: Test for the above.
3168 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
3169 have_acl member. That would happen for a directory with both a
3170 non-stat'able entry and one with an ACL.
3172 * src/ls.c (gobble_file): Make it so failure to stat a
3173 non-command-line file provokes an exit status of 1, not 0.
3174 Say "cannot access" rather than "cannot stat".
3175 * tests/ls/stat-failed: New file/test, for the above.
3176 * tests/ls/Makefile.am (TESTS): Add stat-failed.
3177 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
3178 of "cannot access " to diagnostic.
3180 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
3182 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
3183 Replace all occurrences of "type == command_line" with the
3184 equivalent, "command_line_arg".
3186 * src/ls.c: Apply the stat-failed parts of Red Hat's
3187 coreutils-selinux.patch. From Ulrich Drepper.
3188 This makes it so files not mentioned on the command line (e.g.,
3189 names read from a directory that *is* mentioned on the command
3190 line) for which stat fails are still listed. With --color,
3191 such files are colored just like ORPHANs (aka dangling symlinks).
3193 * src/df.c (n_valid_args): Declare global to be static.
3195 2006-07-24 Jim Meyering <jim@meyering.net>
3197 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
3198 system lacks d_type support.
3200 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
3202 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
3204 2006-07-21 Jim Meyering <jim@meyering.net>
3206 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
3207 Reported by Tim Waugh.
3208 Also remove the comment duplicating much of --help output.
3210 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
3211 name so the list remains alphabetized.
3213 Fix another bug: ls --indicator-style=file-type would call
3214 stat for a symlink, even though it wasn't always needed.
3215 In some cases, that unnecessary stat would cause ls to fail.
3216 * src/ls.c (gobble_file): Don't treat symlinks specially (in
3217 requiring a stat syscall). Remove the offending exclusion.
3219 * NEWS: Mention the fix.
3221 * tests/ls/stat-dtype: New file/test, for the above fix.
3222 Also exercises the new df feature, below.
3224 * src/df.c (main): Fail and don't print the headers if no
3225 file system is processed. This makes it easy to test whether
3226 a specified directory is on a file system of a given type or types.
3227 Otherwise, applications would have had to parse df's output.
3228 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
3230 Fix a bug: ls --file-type worked like --indicator-style=slash,
3231 rather than like --indicator-style=file-type.
3232 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
3233 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
3235 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
3236 * NEWS: Mention the fix.
3237 * tests/ls-2/tests (file-type): New test, for the above fix.
3239 2006-07-19 Jim Meyering <jim@meyering.net>
3241 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
3243 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
3245 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
3247 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
3248 of directories alone unless you specify them explicitly.
3249 install and mkdir now implement X correctly.
3250 install now creates parent directories with mode 755, without
3251 changing their owner or group.
3252 * src/chmod.c (process_file): Adjust to mode_adjust API change.
3253 * src/install.c: Include mkancesdirs.h.
3254 (announce_mkdir, make_ancestor): New functions.
3255 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
3257 (dir_mode, dir_mode_bits): New vars.
3258 (main): Set dir modes separately from nondir, so that the X
3259 op of -m works correctly.
3260 (main): Remove cwd_errno cruft, since make_dir_parents no longer
3261 affects cwd. Adjust to new make_dir_parents API.
3262 (install_file_in_file_parents): 2nd arg is now char *, not char
3263 const *. Use mkancesdirs instead of rolling our own code.
3264 (change_attributes): Don't worry about AFS, since that kludge
3265 should not be needed any more.
3266 * src/mkdir.c (struct mkdir_options): New struct.
3267 (announce_mkdir, make_ancestor): New functions.
3268 (main): Use them. Adjust to mode_adjust API change. Stick with
3269 umask 0. Use make_dir_parents for all the work.
3270 * src/mkfifo.c (main): Adjust to new mode_adjust API.
3271 * src/mknod.c (main): Likewise.
3272 * tests/chmod/setgid: Do the setgid test instead of bailing.
3273 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
3274 GNU chmod now behaves like other versions of chmod.
3275 * tests/mkdir/perm: Add a test for the X bug.
3277 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
3279 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
3280 This doesn't fix any bugs, since OUT always equals stdout, but it
3281 makes the code easier to understand.
3283 2006-07-14 Jim Meyering <jim@meyering.net>
3285 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
3286 rather than open-coding it. Now supports mercurial, too.
3287 * .hgignore: New file.
3288 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
3289 all generated files, including ones like configure and po/*.po
3290 that are currently version-controlled in cvs.
3292 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
3293 They've been in CVS, just haven't been distributed before this.
3294 Distribute ChangeLog-2005, too.
3295 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
3297 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
3299 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
3302 2006-07-09 Jim Meyering <jim@meyering.net>
3304 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
3305 That happens with Linux/tmpfs.
3306 * tests/mv/Makefile.am (TESTS): Add dir2dir.
3308 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3310 Adjust to recent updates from gnulib.
3311 * src/dd.c (apply_translations): Use toupper rather than
3312 islower followed by toupper; it's simpler and typically
3313 faster now that we assume at least C89 semantics. Similarly
3315 * src/sort.c (inittables): Likewise.
3316 * src/expand.c (expand): Don't assume that isprint etc. return
3317 booleans (needed for pre-C99 hosts).
3318 * src/fmt.c (check_punctuation): Likewise.
3319 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
3320 * src/tr.c (is_char_class_member): Likewise.
3321 * src/unexpand.c (unexpand): Likewise.
3322 * src/join.c (is_blank): Remove; no longer needed. All uses
3323 replaced by isblank (to_uchar (...)).
3324 * src/pinky.c (create_fullname): Don't assume char is unsigned.
3325 * src/printf.c (print_esc): Likewise.
3326 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
3327 (copy_unescaped_string): Likewise.
3328 * src/stat.c (print_it): Likewise.
3329 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
3330 convenience on GNU systems. All uses changed. Don't bother
3331 looking for any dirent.h substitute other than ndir.h.
3332 (D_INO): Remove unnecessary parentheses.
3333 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
3334 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
3335 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
3336 to ctype.h equivalents.
3337 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
3340 2006-07-08 Jim Meyering <jim@meyering.net>
3342 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
3344 * Makefile.maint (sc_the_the): New rule.
3346 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
3347 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
3350 2006-07-07 Jim Meyering <jim@meyering.net>
3352 * NEWS: Mention that mv can now remove an empty destination directory,
3353 and give an example. Prompted by a report from Florent Bayle.
3355 2006-07-05 Jim Meyering <jim@meyering.net>
3357 * src/ls.c (usage): Correct the description of -G: it is useful
3358 only in a long listing. Reported by Martin Pool in
3359 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
3361 * man/chmod.x: Correct the description of the sticky bit. Reported
3362 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
3364 * src/copy.c (copy_internal): Don't work around old NFS clients like
3365 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
3366 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
3367 a banal failure as a recursive move-into-self failure.
3368 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
3370 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
3372 2006-07-03 Jim Meyering <jim@meyering.net>
3374 Plug another unusual leak.
3375 (AD_mark_helper): Free malloc'd filename if hash_insert says
3376 that string is already in the hash table.
3378 The dev/inode of the topmost directory in each hierarchy were not
3380 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
3381 (AD_push): Call it from here instead.
3383 Fix two small leaks.
3384 * src/remove.c (AD_stack_clear): New function.
3386 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
3388 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
3389 Add $VG_PATH_PREFIX as a prefix to $PATH
3391 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
3392 * tests/Makefile.am (evar-check): Remove rule.
3393 (EXTRA_DIST): Remove .env-warn.
3394 * tests/.env-warn: Remove file. No longer used.
3395 Suggestion from Eric Blake.
3397 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
3399 * src/system.h: Include <stdint.h> unconditionally, since we
3400 now assume the stdint module.
3402 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
3404 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
3405 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
3406 * src/tail.c (main): Implement this.
3407 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
3408 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
3410 2006-07-01 Jim Meyering <jim@meyering.net>
3412 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
3414 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
3417 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
3419 * NEWS: seq now uses long double internally rather than double.
3420 It now defaults to a minimal fixed point format if possible.
3421 It lets you use %a, %A, %E, %F, %G.
3422 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
3423 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
3424 (isfinite) [!defined isfinite]: New macro.
3425 (separator, terminator): Now points to const.
3426 (first, step, last): Remove.
3427 (usage): Update to match new behavior.
3428 (struct operand, operand): New type.
3429 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
3431 Compute and return a value of type operand, not double.
3432 (long_double_format): Renamed from valid_format, and now returns a
3433 new format with an "L" added if needed, if the original format was
3434 valid. Allow %a, %A, %E, %F, and %G formats.
3435 (print_numbers): Take numeric values as args rather than from globals.
3436 Print long double, not double.
3437 (get_width_format): Remove.
3438 (get_default_format): New function.
3439 (main): Implement new way of calculating default format.
3440 Don't worry about locale's representation of the decimal point, since
3441 the arguments are always processed in the C locale.
3442 * tests/seq/basic (neg-2): Adjust to new default format.
3443 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
3444 implementation should do the right thing.
3446 2006-06-30 Jim Meyering <jim@meyering.net>
3448 * tests/stty/basic-1: Work around an intermittent test failure
3449 on HP-UX 11.11. Report and analysis from Bob Proulx.
3450 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
3452 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
3454 * NEWS: Support obsolete usages like "sort +1 -2" even when
3455 conforming to POSIX 1003.1-2001, since this is a pure extension to
3456 POSIX. Problem reported by Christian in:
3457 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
3458 * src/sort.c (main): Implement this.
3460 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
3461 Autoconf 2.60 says this stuff was obsolete.
3463 2006-06-28 Jim Meyering <jim@meyering.net>
3465 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
3467 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
3469 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
3470 (set -x when VERBOSE=yes) when stderr is redirected before stdout
3471 causing shell tracing of the stdout redirection to be written to
3472 the stderr file. Avoid problem and test failure on HP-UX by
3473 redirecting stderr last.
3474 * tests/dd/unblock-sync: Order shell file redirections for
3475 stderr and stdout in the common style.
3476 tests/acl: Likewise.
3478 2006-06-27 Jim Meyering <jim@meyering.net>
3480 * tests/misc/cat-proc: Try to avoid any spurious numeric
3481 differences in frequently-changing /proc/cpuinfo.
3482 Reported by Nelson Beebe.
3484 2006-06-26 Jim Meyering <jim@meyering.net>
3486 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
3487 fd_to_subdirp failure, not just when errno == EACCES.
3488 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
3489 rmdir, here, even though rmdir may happen to be adequate.
3491 * NEWS: rm no longer fails to remove an empty, unreadable directory
3492 * src/remove.c (remove_cwd_entries): If we can't open a directory,
3493 and the failure is not being ignored, try to remove the directory
3494 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
3495 Problem report and test case from Paul Eggert in
3496 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
3498 * tests/rm/empty-inacc: New test, for the above.
3500 Avoid a segfault for wc --files0=- < /dev/null.
3501 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
3503 2006-06-25 Jim Meyering <jim@meyering.net>
3505 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
3506 contains a list of NUL-separated file names.
3508 * src/wc.c: Include "readtokens.h".
3509 (usage): Describe the new option, and adjust the `Usage':
3510 with this option, no FILE may be specified on the command line.
3511 (main): Handle the new option.
3512 * tests/misc/wc-files0: New tests, for the above.
3513 * tests/misc/wc-files0-from: Likewise.
3514 * tests/misc/Makefile.am (TESTS): Add wc-files0.
3516 2006-06-24 Jim Meyering <jim@meyering.net>
3518 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
3520 2006-06-22 Jim Meyering <jim@meyering.net>
3522 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
3523 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
3525 2006-06-19 Jim Meyering <jim@meyering.net>
3527 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
3528 so this check is not run as part of "make distcheck".
3530 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
3532 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
3534 2006-06-18 Jim Meyering <jim@meyering.net>
3536 * tests/misc/pwd-long: Make error output a little clearer.
3538 2006-06-17 Jim Meyering <jim@meyering.net>
3540 * tests/rm/inaccessible: Skip this test on systems without openat
3541 support. Reported by Bob Proulx.
3543 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
3545 * tests/misc/mknod: Improve permission checks to handle
3546 running mkdir test in set-gid directories.
3548 2006-06-14 Jim Meyering <jim@meyering.net>
3550 * tests/du/basic: Revamp not to hard-code file system block sizes.
3552 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3554 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
3557 2006-06-11 Jim Meyering <jim@meyering.net>
3559 * .gitignore: New file.
3560 * Makefile.am (EXTRA_DIST): Add .gitignore.
3562 Setting TIME_STYLE=long-iso in the environment would make the
3563 cp/same-file test fail.
3564 * tests/envvar-check (vars): Add TIME_STYLE to the list.
3565 * tests/cp/same-file: Revert last change.
3566 Source the envvar-check script, to ensure that TIME_STYLE
3567 settings don't affect these tests.
3569 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
3571 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
3572 uses POSIX time stamp formats. Problem reported by John Nixon in
3573 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
3575 2006-06-10 Jim Meyering <jim@meyering.net>
3577 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
3579 Require a "Version N.M" line at the top of the ChangeLog
3580 file only when making the actual release, not when running
3582 * Makefile.maint (maintainer-distcheck): Don't depend on
3584 (alpha beta major): Depend on it here, instead.
3586 2006-06-08 Jim Meyering <jim@meyering.net>
3588 Ensure that cat works with any of the options, -A -v -e -E -T,
3589 when applied to files in /proc and /sys, even when the FIONREAD
3590 ioctl produces nonsensical results. Before this change, cat would
3591 produce no output (or truncated output), for some linux kernels.
3593 * src/cat.c (write_pending): New function, factored out of cat.
3594 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
3595 that there are bytes to read. Some versions of linux-2.6.16 do that.
3596 Write any pending output before returning.
3597 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
3598 * NEWS: Mention this bug fix.
3599 * tests/misc/cat-proc: New file. Test for the above.
3600 * tests/misc/Makefile.am (TESTS): Add cat-proc.
3602 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
3604 * src/expr.c (eval4): Detect overflow properly when multiplying
3607 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
3609 * NEWS: The 'expr' command now detects and reports integer overflow.
3610 (It would be better to use extended precision instead, but that
3611 would be more work.)
3612 * src/expr.c (integer_overflow): New function.
3613 (eval4, eval3): Check for integer overflow.
3615 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
3617 Fix problems when building with Solaris/SVR4/etc. make, which uses a
3618 different and somewhat bogus implementation of VPATH. In the
3619 directory tests/misc, rename tests whose names might appear in the
3620 Automake-generated rules. For example, we can't use a test named
3621 'test', since Automake generates a rule that contains the text
3622 "if test -f ./$$tst; ...", and this might expand to something like
3623 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
3624 which executes the 'test' script rather than the 'test' command.
3625 * tests/misc/false-status: Renamed from tests/misc/false.
3626 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
3627 * tests/misc/sort-merge: Renamed from tests/misc/sort.
3628 ($prog): Set to 'sort' rather than to $PROG.
3629 * tests/misc/test-diag: Renamed from tests/misc/test.
3630 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
3631 in case Solaris make has prepended the directory.
3632 (TESTS): Adjust to above renamings.
3633 * tests/misc/expand: Don't assign to PROG; no longer needed
3634 now that Makefile.am sets PROG to the basename.
3635 * tests/misc/fold: Likewise.
3637 2006-06-03 Jim Meyering <jim@meyering.net>
3639 Make `cp --link --no-dereference' work also on systems where the
3640 link system call cannot create a hard link to a symbolic link.
3641 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
3642 the link syscall on a symlink when it would do the wrong thing.
3643 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
3644 * tests/cp/link-no-deref: New file/test for the above.
3645 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
3646 * NEWS: Mention the change (doesn't affect Linux).
3648 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
3650 Fix some porting problems in the test cases reported by
3651 Ralf Wildenhues for HP-UX 11.23 in:
3652 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
3653 * tests/help-version: Don't assume that \< \> works in sed.
3654 * tests/misc/close-stdout: Don't assume that >&- works.
3655 Add a /dev/full test.
3656 * tests/touch/no-create-missing: Don't assume that >&- works.
3658 2006-05-30 Jim Meyering <jim@meyering.net>
3660 * src/ls.c (usage): Add `v' to the list of sorting-related options.
3663 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3665 * tests/cp/fail-perm: source lang-default.
3666 * tests/rm/inaccessible: Likewise.
3668 2006-05-28 Jim Meyering <jim@meyering.net>
3670 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
3671 Recognize it, too. Reported by Ralf Wildenhues, in
3672 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
3674 2006-05-27 Jim Meyering <jim@meyering.net>
3676 * src/chgrp.c: Support new options: --preserve-root and
3677 --no-preserve-root. Somehow this program was skipped when those
3678 options were added to chown, chmod, and rm. Reported by
3679 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
3680 * NEWS: Mention this.
3682 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
3684 * NEWS: Remove mention of --seed. We'll replace it with something
3685 better, and don't want to indicate that it is supported.
3686 * src/sort.c (usage): Likewise.
3688 2006-05-20 Jim Meyering <jim@meyering.net>
3690 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
3692 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
3693 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
3694 FTS_COMFOLLOW. Spotted by Justin Pryzby.
3696 * gnupload: Merge changes from automake, retaining the ""--to...
3697 kludge to placate overzealous `make distcheck' check.
3699 2006-05-19 Jim Meyering <jim@meyering.net>
3701 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
3702 FTS_TIGHT_CYCLE_CHECK directory traversal option.
3703 Reported by Justin Pryzby in http://bugs.debian.org/367691
3705 2006-05-15 Jim Meyering <jim@meyering.net>
3707 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
3708 From Tomas Pospisek.
3710 2006-05-13 Jim Meyering <jim@meyering.net>
3712 * tests/mv/no-target-dir: Test two more cases.
3714 2006-05-11 Jim Meyering <jim@meyering.net>
3716 mv -T DIR EMPTY_DIR no longer fails unconditionally
3717 * src/copy.c (copy_internal): Don't manually prohibit a move where
3718 the destination is an existing directory. Sometimes doing that is
3719 valid. Let the rename system call enforce the rules. That is
3720 allowed only when the source is a directory and the destination
3721 directory (to be replaced) is empty. Reported by Eric Blake.
3722 * tests/mv/no-target-dir: New file/test for this.
3723 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
3724 * NEWS: Mention this.
3726 * tests/mv/atomic: New file/test for yesterday's fix.
3727 * tests/mv/Makefile.am (TESTS): Add atomic.
3729 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
3731 2006-05-10 Jim Meyering <jim@meyering.net>
3733 * src/copy.c (copy_internal): Don't explicitly unlink the destination
3734 when moving a symlink into the place of an existing non-directory.
3735 Reported by Joshua Hudson.
3736 * NEWS: mention this.
3738 2006-05-07 Jim Meyering <jim@meyering.net>
3740 * Makefile.maint (patch-check): Fail if patch generates any output,
3741 even merely for changed offsets.
3743 * src/c99-to-c89.diff: Adjust to reflect new offsets.
3745 * NEWS: Mention changes affecting df, pwd, shred.
3747 2006-05-06 Jim Meyering <jim@meyering.net>
3749 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
3750 system condition where dirent.d_ino != stat.st_ino.
3751 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
3753 2006-05-06 Eric Blake <ebb9@byu.net>
3755 * tests/ls/inode: Expand to test inode from readdir case.
3756 * tests/ls/follow-slink: Expand to test broken links encountered
3757 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
3759 2006-05-06 Eric Blake <ebb9@byu.net>
3761 * tests/mv/leak-fd: Work even on case-insensitive file system.
3763 2006-05-04 Jim Meyering <jim@meyering.net>
3765 * NEWS: Mention the 2006-03-19 pwd-related change that makes
3766 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
3768 2006-05-03 Jim Meyering <jim@meyering.net>
3770 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
3771 Use better macro parameter names: s/basename/key_name/,
3772 s/basefunc/key_cmp_func. Fix typo in comment.
3774 2006-04-29 Eric Blake <ebb9@byu.net>
3776 * src/ls.c (main): On systems with d_type, directories_first only
3777 implies format_needs_type, not format_needs_stat.
3779 2006-05-03 Jim Meyering <jim@meyering.net>
3781 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
3782 after comma in arg list, from Eric Blake.
3784 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
3786 * tests/misc/date (relative-3): New test, derived from a bug
3787 report by John Thomas McDole.
3789 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
3791 New option for ls: --group-directories-first.
3792 It makes ls list directories before files.
3793 * NEWS [New features]: Mention it.
3794 * src/ls.c (sort_type): Rearrange to use as an array index when
3795 choosing sort function; added new sort_numtypes member for
3797 (time_type): Add new time_numtypes member for compile-time check.
3798 (directories_first): New global variable.
3799 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
3800 (long_options): Add --directories-first.
3801 (main): Support new option.
3802 (is_directory): New function.
3803 (extract_dirs_from_files): Use it.
3804 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
3805 (LIST_SORTFUNCTION_VARIANTS): New macros.
3806 (sort_functions): New global variable.
3807 (sort_files): Use it.
3808 (usage): Document new option.
3810 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
3812 * src/shred.c (fillrand): The assertion was way too weak, due to
3813 what must be a typo. Strengthen it to its intended value.
3814 (dopass): Don't use alloca; it's not worth the aggravation here,
3815 since it's used only to get a page-aligned buffer, and page
3816 alignment doesn't buy us much here. I'm suspicious that alloca
3817 causes problems on some hosts, due to a recent bug report by Adam
3818 Waltman: http://bugs.gentoo.org/130246.
3820 2006-04-18 Jim Meyering <jim@meyering.net>
3822 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
3823 sha384sum, sha512sum.
3825 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
3827 * src/chmod.c (describe_change): Adjust to filemode changes.
3828 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
3829 (print_long_format): Use (new) filemodestring rather than
3830 (old) mode_string, so that we get more file types right, at least
3831 in theory. Adjust to filemode changes.
3832 * src/stat.c (human_access): Likewise.
3834 2006-04-18 Jim Meyering <jim@meyering.net>
3836 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
3837 ignore file. This has never been enabled. Reported by Eric Blake.
3839 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
3841 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
3842 bug in Interix. Just call symlink or link directly. All uses changed.
3843 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
3844 * src/stat.c (USE_STATVFS): New macro.
3845 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
3846 (NAMEMAX_FORMAT): define a bit more clearly, now that the
3847 statvfs-using code is a bit more regular.
3848 * src/system.h (sync) [!HAVE_SYNC]: New macro.
3850 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
3852 * NEWS: csplit, nl, expr now conform to POSIX better, and are
3853 more-compatible with traditional Unix, with respect to regular
3855 * src/csplit.c (extract_regexp): Set re_syntax_options to a
3856 value that is compatible with what POSIX requires.
3857 * src/nl.c (build_type_arg): Likewise.
3858 * src/expr.c (docolon): Likewise. Also, don't let anchors match
3859 newline; this fixes an incompatibility with tradition and with POSIX.
3860 Don't warn about leading ^. POSIX says it is unspecified whether
3861 ^ is a special character, which means that implementations can
3862 either treat it as special or not, but either way a warning is not
3863 allowed (unless the regexp is otherwise invalid). Instead, anchor
3864 the expression but treat ^ as an anchor; this is the traditional
3865 behavior (e.g., Solaris 10).
3866 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
3867 and the like as invalid expressions (exit status 2), not as
3868 failure of 'expr' (exit status 3). This is more consistent with
3869 how Solaris behaves.
3870 * tests/expr/basic (fail-a): Adjust exit status to match new expr
3871 behavior, for status 2 versus 3.
3873 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
3874 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
3875 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
3876 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
3877 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
3878 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
3879 (bre61, bre62): New tests.
3880 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
3881 conforming to POSIX.
3884 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
3885 "if !". Do not assume that 'sed' can handle long, newline-free input.
3886 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
3888 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
3890 Adjust to new regex.h API (with new fastmap type), and clean
3891 up the regex storage allocation a bit.
3893 * src/csplit.c (struct control): Put re_compiled member at the
3894 end, since it's large. Change regexpr member from char * to bool;
3895 all uses changed. Add new member fastmap.
3896 (extract_regexp): regexp arg is now char const *, not char *.
3897 Don't bother duplicating the regular expression; it's not needed.
3898 Set fastmap from new fastmap member. Don't bother allocating
3899 a buffer, as the regexp code does a better job than we do.
3900 * src/expr.c (docolon): Allocate and use a fastmap.
3901 Don't bother allocating a buffer.
3902 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
3904 (build_type_arg): New fastmap arg. All uses changed.
3905 Don't bother allocating a buffer, but set a fastmap.
3906 * src/ptx.c (context_regex_string, word_regex_string): Remove.
3907 (context_regex, word_regex): New vars, replacing the above.
3909 (struct regex_data): New type.
3910 (compile_regex): Renamed from alloc_and_compile_regex, since
3911 we no longer allocate storage. Arg is now a struct regex_data *,
3912 not a const char *. All uses changed. Don't allocate the fastmap;
3913 instead, take it from the caller. Don't convert size_t to int,
3914 to avoid arithmetic overflow problems. Don't bother freeing
3915 storage afterwards; it's not worth the aggravation.
3916 * src/tac.c (compiled_separator_fastmap): New ver.
3917 (main): Use it. Don't bother allocating a buffer.
3919 2006-03-30 Jim Meyering <jim@meyering.net>
3921 * src/dd.c (iwrite): Remove assignment without effect.
3922 Reported by Felix Rauch Valenti.
3924 2006-03-22 Eric Blake <ebb9@byu.net>
3926 * src/ptx.c (usage): Remove mention of --copyright/-C.
3927 (main): Alias --copyright to --version plus a deprecation warning.
3928 * NEWS: Mention this.
3930 2006-03-27 Jim Meyering <jim@meyering.net>
3932 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
3933 use of strtod. Tiny patch from Nickolai Zeldovich.
3935 2006-03-11 Eric Blake <ebb9@byu.net>
3937 * tests/misc/dirname: New file.
3938 * tests/basename/Makefile.am: Delete.
3939 * tests/basename/basic: Move to...
3940 * tests/misc/basename: ... this new file. Add some tests,
3941 including fixed behavior for //.
3942 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
3943 * tests/Makefile.am (SUBDIRS): Remove basename.
3944 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
3946 Improvements to dirname/basename handling on platforms like
3947 cygwin with distinct // and with drive letters.
3948 * NEWS: Document new behavior.
3949 * src/basename.c (main): Don't strip suffix from file system
3951 * src/cp.c (target_directory_operand): Use new last_component.
3952 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
3953 traversing the string.
3954 * src/dircolors.c (guess_shell_syntax): Use new last_component.
3955 * src/install.c (target_directory_operand, install_file_in_dir):
3957 * src/ln.c (target_directory_operand, main): Likewise.
3958 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
3959 * src/mv.c (target_directory_operand, movefile): Likewise.
3960 * src/remove.c (rm_1): Likewise.
3961 * src/shred.c (wipename): Likewise.
3962 * src/split.c (next_file_name): Likewise.
3963 * src/su.c (log_su, run_shell): Likewise.
3965 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
3967 * NEWS: nohup diagnostics are now more precise, and nohup now
3968 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
3969 * src/nohup.c (main): Implement this.
3970 * tests/misc/nohup: Test the new behavior.
3972 2006-03-12 Jim Meyering <jim@meyering.net>
3974 * src/copy.c (set_author): Rename function, from preserve_author.
3976 * src/remove.c (AD_pop_and_chdir): Use new macro,
3977 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
3979 * src/system.h (SAME_INODE): Remove definition.
3980 Include "same-inode.h", instead.
3982 2006-03-11 Eric Blake <ebb9@byu.net>
3984 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
3986 2006-03-10 Jim Meyering <jim@meyering.net>
3988 Fix a bug whereby a user with write access to a directory being removed
3989 could cause the removal of that directory to fail with an erroneous
3990 diagnostic about a directory cycle. Reported by Vineet Chadha.
3992 * NEWS: Mention this.
3993 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
3994 leave (and try to rmdir) is the one whose dev_ino is being used to
3995 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
3997 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
3999 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
4000 * src/dd.c (set_fd_flags): Handle file-creation flags on file
4001 descriptors, rather than ignoring them.
4002 * tests/dd/misc: Add test cases for append, nofollow, directory,
4003 and nolinks flags. Simplify redirection to /dev/null in some cases.
4005 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
4006 noatime test never tested anything.
4008 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
4010 * src/dd.c (flags, usage): New flags directory, nolinks.
4011 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
4013 * src/ls.c (usage): Mention that -f disables --color.
4014 Problem reported by Niels Möller.
4016 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
4018 * man/*.x: Add references to syscalls from utilities of the same name.
4020 2006-03-05 Jim Meyering <jim@meyering.net>
4022 * tests/help-version: Set SHELL, if not already set, in order to
4023 avoid failure when `make check' is run through debuild; dircolors
4024 would fail due to lack of $SHELL. Reported by Sven Joachim.
4026 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
4027 * src/base64.c (wrap_write, do_encode, main): Change type of
4028 parameters and locals, wrap_column, form size_t to uintmax_t.
4029 (main): Adjust to use xstrtoumax, accordingly.
4031 2006-03-03 Jim Meyering <jim@meyering.net>
4033 Don't fail when run from an environment with SHELL not a Bourne
4034 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
4035 * tests/dircolors/simple: Invoke each non-failing test with -b.
4036 Reported by Michael Stone.
4038 2006-02-27 Jim Meyering <jim@meyering.net>
4040 * tests/misc/base64: Derive --decode-using tests from the
4043 * tests/misc/base64: Factor out a long constant string.
4044 Split lines to stay within 80 columns.
4046 * tests/misc/Makefile.am (TESTS): Add base64.
4047 * tests/misc/base64: Test base64. From Simon Josefsson.
4049 * src/base64.c (do_decode): Use correct type for parameter,
4050 ignore_garbage: s/size_t/bool/.
4052 * src/base64.c: Don't include .h files already included by system.h:
4053 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
4054 Include "system.h" before the other lib/*.h header files.
4055 Include <sys/types.h> before "system.h".
4056 (wrap_write): Remove declaration of unused local, initial_column.
4057 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
4059 * README: Add base64 to the list.
4061 2006-02-17 Simon Josefsson <jas@extundo.com>
4063 New program: base64.
4064 * AUTHORS: Mention base64.
4066 * man/Makefile.am: Build base64.1.
4067 * man/base64.x: New file.
4068 * src/Makefile.am (bin_PROGRAMS): Add base64.
4069 * src/base64.c: New file.
4071 2006-02-25 Eric Blake <ebb9@byu.net>
4073 In ls, avoid calling stat for --inode (-i), when possible.
4074 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
4075 * src/system.h: ... here, for use in ...
4076 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
4078 (gobble_file): Add inode argument.
4079 (print_dir): Pass inode if available.
4080 (usage): Remove inaccuracy.
4082 2006-02-23 Jim Meyering <jim@meyering.net>
4084 * TODO: Update/correct some obsolete entries.
4086 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
4088 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
4089 * src/join.c (usage): Likewise.
4090 Documentation problem reported by Philip Kensche.
4092 2006-02-20 Eric Blake <ebb9@byu.net>
4094 * man/rm.x: Update documentation to match previous patch.
4096 2006-02-18 Eric Blake <ebb9@byu.net>
4098 New option for rm: --interactive=once (-I).
4099 * NEWS: Document it, along with change to rm --interactive.
4100 * TODO: Remove entry for implementing rm -I
4101 * src/rm.c (INTERACTIVE_OPTION): New enum value.
4102 (interactive_type): New enum.
4103 (long_opts): Let interactive take an optional argument.
4104 (interactive_args, interactive_types): New option arguments.
4105 (usage): Document -I, --interactive=WHEN. Use program_name
4106 instead of a basename.
4107 (main): New -I option, new behavior to --interactive.
4108 * tests/rm/interactive-once: New tests.
4109 * tests/rm/interactive-always: Ditto.
4110 * tests/rm/Makefile.am (TESTS): Run them.
4112 2006-02-18 Jim Meyering <jim@meyering.net>
4114 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
4115 expression match more of the target lines, e.g., those that start with
4116 `-S,' (short option followed by a comma) or that include `=[...]'.
4117 Patch by Nicolas François.
4118 Fix the four offenders thus exposed:
4119 * src/join.c (usage): Use two spaces (not one) to separate the
4120 --first-only option string from its description, so help2man formats
4121 the derived man page properly.
4122 * src/pr.c (usage): Likewise.
4123 * src/uniq.c (usage): Likewise.
4124 * src/install.c (usage): Likewise.
4126 2006-02-15 Jim Meyering <jim@meyering.net>
4128 * Makefile.maint (alpha beta major): For `make major', ensure that the
4129 version string is of the form N.N[.N]*, where N is one or more digits.
4131 2006-02-14 Jim Meyering <jim@meyering.net>
4133 * INSTALL: Update from gnulib.
4135 2006-02-13 Jim Meyering <jim@meyering.net>
4137 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
4139 2006-02-12 Jim Meyering <jim@meyering.net>
4141 * Makefile.maint (patch-check): New target.
4142 (local-checks-available): Add to the list.
4144 2006-02-11 Jim Meyering <jim@meyering.net>
4146 * src/c99-to-c89.diff: New file.
4147 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
4149 * .x-po-check: New file, with exclusions so that `make distcheck'
4151 * Makefile.am (EXTRA_DIST): Add .x-po-check.
4153 rm -r must remove an empty directory, even if it is inaccessible.
4154 * src/remove.c (close_preserve_errno): New function.
4155 (fd_to_subdirp): Don't print a diagnostic in this function.
4156 Do it from the callers instead, unless rmdir succeeds.
4157 (remove_cwd_entries, remove_dir): Adjust callers.
4158 * tests/rm/empty-inacc: New test for the above.
4159 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
4160 * NEWS: Mention this bug fix.
4161 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
4162 a tiny bit less precise: cannot remove `a/1': ... instead of
4163 cannot open directory `a/1': ...
4165 * Makefile.maint (syntax-check-rules): Automatically derive this
4166 list of sc_-prefixed rule names.
4168 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4170 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
4171 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
4172 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
4173 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
4174 go away? was that an accident?)
4175 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
4176 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
4177 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
4178 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
4179 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
4180 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
4181 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
4182 (author_mark_check, makefile_path_separator_check):
4183 Output line numbers, to simplify navigation of Emacs *compilation*
4185 (sc_prohibit_atoi_atof, sc_file_system):
4186 Rework slightly so that Makefile.maint doesn't get reported as a
4187 violation of its own syntax rules.
4188 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
4189 it at run-time (which didn't work with Bison). Fix a makefile typo,
4190 caught by Makefile.maint itself: spaces where a tab should be.
4191 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
4192 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
4193 Ignore djgpp and man subdirectories, to avoid false matches with
4194 Bison and coreutils, respectively. Use sort -u to remove the
4195 resulting duplicates.
4196 * gnupload: Rework slightly to avoid bogus warning from
4197 sc_two_space_separator_in_usage.
4199 2006-02-10 Jim Meyering <jim@meyering.net>
4201 Use gzip's --rsyncable option only if it's available.
4202 * Makefile.maint (gzip_rsyncable): New variable.
4205 2006-02-08 Jim Meyering <jim@meyering.net>
4207 * Makefile.maint (local-checks-available): Define in terms of
4208 the expansion, $(syntax-check-rules), rather than the single,
4209 top-level target `syntax-check', so that it's easier to exclude
4210 individual rules (via $(local-checks-to-skip)).
4211 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
4213 2006-02-07 Jim Meyering <jim@meyering.net>
4215 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
4216 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
4218 * tests/help-version (expected_failure_status_vdir):
4219 Redirect an expected disk-full diagnostic to /dev/null.
4221 2006-02-06 Jim Meyering <jim@meyering.net>
4223 * src/unexpand.c (usage): Use two spaces (not one) to separate the
4224 --first-only option string from its description, so help2man formats
4225 the derived man page properly.
4226 * src/rm.c (usage): Likewise for --no-preserve-root.
4227 * src/chown.c (usage): Likewise.
4228 * src/chgrp.c (usage): Likewise.
4230 Add a rule to ensure that the above doesn't happen again.
4231 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
4232 (syntax-check-rules): Add it.
4233 * .x-sc_two_space_separator_in_usage: New empty file.
4234 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
4236 2006-02-06 Jim Meyering <jim@meyering.net>
4238 * src/cp.c (usage): Use two spaces (not one) to separate each
4239 option string from its description, so help2man formats the
4240 derived man page properly.
4241 * src/mv.c (usage): Likewise.
4242 Patch from Nicolas François in http://bugs.debian.org/351601.
4244 2006-02-04 Jim Meyering <jim@meyering.net>
4246 * src/copy.c (copy_internal): cp -RL would fail when encountering
4247 the same directory more than once in the hierarchy beneath a single
4248 command-line argument. That is legitimate, e.g. when there are
4249 two or more symbolic links, each pointing to some directory that
4250 would not otherwise be copied. Reported by Christophe LYON.
4251 * tests/cp/cp-deref: New file. Test for today's fix.
4252 * tests/cp/Makefile.am (TESTS): Add cp-deref.
4253 * NEWS: Document this.
4255 2006-02-03 Jim Meyering <jim@meyering.net>
4257 * configure.ac: Require automake-1.9.6, not 1.8.3.
4259 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4261 * src/od.c (usage): Mention that -t a ignores high order bit.
4262 Documentation problem reported by Ed Avis.
4264 2006-02-01 Jim Meyering <jim@meyering.net>
4266 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
4268 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4270 * src/head.c (main): Use a better diagnostic when someone uses a
4271 trailing numeric option in an invalid way. Problem reported by
4273 * src/tail.c (parse_options): Likewise.
4275 2006-01-30 Jim Meyering <jim@meyering.net>
4277 * man/wc.x: Include `count' keyword in man page synopsis,
4278 per suggestion from http://bugs.debian.org/181585.
4280 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
4282 * src/df.c (show_dev): If the file system claims to have
4283 more available than total blocks, report the number of used
4284 blocks as being total - available (a negative number) rather
4285 than as garbage. Problem reported by Toralf Foerster.
4287 2006-01-24 Jim Meyering <jim@meyering.net>
4289 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
4290 to put a regular file in O_NONBLOCK mode fails with EPERM.
4291 That happens on Linux (up to 2.6.15) when using tail -f on a file with
4292 the append-only attribute. Reported by Dean Gaudet. For details,
4293 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
4294 * NEWS: Mention this fix.
4295 * tests/tail-2/append-only: New file. Test for the above.
4296 * tests/tail-2/Makefile.am (TESTS): Add append-only.
4297 * tests/Makefile.am (check-root): Add tail-2/append-only
4299 2006-01-21 Jim Meyering <jim@meyering.net>
4301 * NEWS: Mention fts-related improvements and bug fixes.
4303 2006-01-19 Jim Meyering <jim@meyering.net>
4305 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
4306 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
4308 2006-01-18 Jim Meyering <jim@meyering.net>
4310 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
4312 2006-01-17 Jim Meyering <jim@meyering.net>
4314 Now that fts no longer changes the current working directory, adjust
4315 its clients accordingly -- note that du.c uses fts but doesn't need
4316 any adjustment, since it doesn't operate on the actual files,
4317 but rather just uses the stat buffers provided by fts.
4319 * src/chown-core.c: Include "openat.h".
4320 Don't include "lchown.h".
4321 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
4322 calling openat, lchownat, chownat, rather than open, lchown, chown.
4324 * src/chmod.c: Include "openat.h".
4325 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
4327 * tests/du/long-from-unreadable: New test, to exercise one small
4330 2006-01-13 Jim Meyering <jim@meyering.net>
4332 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
4333 addition of new directories under tests/.
4335 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
4338 2006-01-12 Jim Meyering <jim@meyering.net>
4340 * tests/du/long-sloop: Adjust not to hard-code the expected
4341 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
4342 from that of GNU libc. Reported by Paul Eggert.
4344 * tests/du/long-sloop: Create file at end of symlink chain.
4346 * tests/misc/test: New file, with a test for one of the
4347 bugs fixed by yesterday's test.c changes.
4348 * tests/misc/Makefile.am (TESTS): Add test.
4350 2006-01-11 Jim Meyering <jim@meyering.net>
4352 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
4353 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
4354 a very long sequence of symbolic links (not necessarily a loop).
4355 * tests/du/Makefile.am (TESTS): Add long-sloop.
4357 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
4359 * src/test.c (test_syntax_error): Append a newline. All callers
4360 changed, except for the ones that didn't already append a newline.
4361 Bug reported by Eric Blake.
4363 2006-01-11 Jim Meyering <jim@meyering.net>
4365 * src/system.h (X2NREALLOC): Now that verify_true is no longer
4366 void, cast its result to void, to avoid gcc's warning that
4367 ``left-hand operand of comma expression has no effect''.
4368 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
4370 2006-01-10 Jim Meyering <jim@meyering.net>
4372 * tests/chmod/no-x: Add a test for today's fts.c fix.
4374 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
4376 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
4377 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
4379 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
4381 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
4382 Use verify_true instead of verify_expr, to sync with gnulib.
4384 2006-01-08 Jim Meyering <jim@meyering.net>
4386 * src/date.c (usage): Adjust the formatting of the entries for
4387 %::z and %:::z (separate with two spaces, not one) so that help2man
4388 formats them properly. Reported by Philip Rowlands.
4390 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
4392 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
4394 2006-01-06 Jim Meyering <jim@meyering.net>
4396 * Makefile.maint (copyright-check): Use date +%Y in place of
4399 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
4400 First off, the attribute should have been `volatile' (not static)
4401 to avoid longjmp-related risk of clobber. Secondly, now there is
4402 no longer any risk of a local variable being clobbered, so there's
4403 no need for any attribute at all.
4405 2006-01-05 Jim Meyering <jim@meyering.net>
4407 * src/remove.c: Give a few functions the inline attribute.
4408 (AD_pop_and_chdir): Use gotos to avoid some duplication.
4409 (AD_push): Rewrite an assertion so that the entire computation
4410 goes away when assertions are turned off.
4412 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
4413 It's already defined in "system.h".
4414 * Makefile.maint: Add a FIXME comment.
4416 2006-01-04 Jim Meyering <jim@meyering.net>
4418 * ChangeLog: Remove entries from 2005-10-22 and earlier.
4419 * ChangeLog-2005: New file, for entries up to version 5.92.
4421 2006-01-03 Jim Meyering <jim@meyering.net>
4423 * tests/du/no-x: Also allow a slightly different diagnostic -- the
4424 one you get when using openat-enabled fts.c and du (coming soon).
4425 * tests/chmod/no-x: Likewise.
4426 * tests/chgrp/no-x: Likewise.
4428 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
4430 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
4432 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
4433 (restricted_chown): Return it, if the file cannot be accessed due
4434 to EPERM, or if no uid or gid are required, or if the file is
4435 neither a directory nor a regular file. Rewrite to avoid gotos.
4436 (change_file_owner): Handle RC_do_ordinary_chown case.
4437 Rewrite to avoid gotos.
4438 * tests/chgrp/basic: Make sure we can change the group of
4441 * src/date.c (usage): Explain %g, %G, and %V a bit better.
4443 2006-01-02 Jim Meyering <jim@meyering.net>
4445 * src/copy.c (set_owner): Correct a comment.
4447 * src/tail.c (parse_options): Change warning to say that --retry
4448 is useful `mainly' (not `only') when following by name.
4449 Reported here: http://bugs.debian.org/273781
4451 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
4453 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
4454 * src/copy.c: Include lchmod.h.
4455 (copy_internal): Use lchmod rather than chmod.
4456 * src/cp.c: Include lchmod.h.
4457 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
4458 * src/mkdir.c: Include lchmod.h.
4459 (usage): Clarify -m's operation.
4460 (main): Use lchmod rather than chmod. Don't use lchmod unless the
4461 new mode contains bits outside the 777 range.
4462 * src/mkfifo.c (usage): Clarify -m's operation.
4463 (main): If -m is given, don't invoke chmod; use umask 0 instead.
4464 Report an error if -m asks for bits outside the 777 range.
4465 * src/mknod.c (usage, main): Likewise.
4467 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
4469 2005-12-27 Jim Meyering <jim@meyering.net>
4471 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
4472 (sc_prohibit_assert_without_use): New rule.
4473 (syntax-check-rules): Add it to the list.
4474 * .x-sc_prohibit_assert_without_use: New empty file.
4475 * Makefile.am (EXTRA_DIST): Add it.
4477 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
4479 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
4480 Don't include <assert.h>; it wasn't used.
4482 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
4484 * src/chown-core.c (restricted_chown):
4485 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
4486 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
4487 | O_NOFOLLOW too, for consistency with other dir-openers.
4488 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
4489 (is_empty_dir): Likewise.
4490 * src/shred.c (wipename): Likewise. Don't bother trying to open
4491 dir for writing, since POSIX prohibits it.
4493 2005-12-22 Jim Meyering <jim@meyering.net>
4495 * tests/help-version: Redirect stderr to /dev/full, to suppress
4496 write error diagnostic.
4498 2005-12-19 Jim Meyering <jim@meyering.net>
4500 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
4501 Avoid a minor race condition when `-m MODE' is specified, by using
4502 open, fchown, and close rather than just chown. To do that reliably --
4503 even with an overly restrictive umask -- ensure that each mkdir,
4504 mknod and mkfifo call uses a mode including at least owner-read access.
4505 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
4506 the subsequent chown (or equivalent open,fchown,close) fails.
4507 * tests/misc/mknod: New tests.
4508 * tests/misc/Makefile.am (TESTS): Add mknod.
4510 2005-12-17 Jim Meyering <jim@meyering.net>
4512 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
4513 e.g., on a named pipe.
4514 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
4515 place of all uses, since it is guaranteed (system.h) to be defined.
4517 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
4519 Add POSIX ACL support
4520 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
4521 is no requirement for ACL support; particularly, it does not exist
4522 on systems that have POSIX ACLs.
4523 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
4524 * src/cp.c (umask_kill): With default acls, the umask is not to be
4525 applied. Remove umask_kill, don't change the process umask, and let
4526 the kernel apply the umask where appropriate.
4527 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
4528 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
4530 (copy_reg, copy_internal): Use copy_acl and set_acl
4531 instead of fchown/chown. Fix the logic for POSIX ACLs.
4532 (chown_succeded): Remove; we now always copy acls and
4533 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
4534 did a chown before or not.
4535 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
4536 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
4537 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
4538 to link with it via $(LIB_ACL), for the utilities that need it.
4540 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
4542 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
4543 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
4544 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
4545 value is now signified by whether cwd_errno is null.
4546 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
4547 pointer-to-bool to pointer-to-errno-value. All callers changed.
4548 (rm_1): Don't bother setting a local cwd failure flag and then
4549 ORing it into the caller's. Just set the caller's.
4550 (rm): Use cwd failure errno value to print a slightly-better
4553 2005-12-15 Jim Meyering <jim@meyering.net>
4555 * src/stat.c (print_it): Properly handle a backslash at the
4556 end of a --printf format string. Reported by Paul Eggert.
4557 * tests/misc/stat-printf (end-bs): Add a test for the above.
4559 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
4561 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
4562 Don't assume /etc/passwd contains user names; use 'id' instead.
4564 2005-12-15 Jim Meyering <jim@meyering.net>
4566 stat: revert behavior of --format=FMT (-c)
4567 stat: add new option: --printf=FMT
4568 * NEWS: Mention this.
4569 * src/stat.c (isodigit, octtobin, hextobin): Define.
4570 (PRINTF_OPTION): Define.
4571 (interpret_backslash_escapes, trailing_delim): New globals.
4572 (usage): Document them. Alphabetize on long option names.
4573 (print_esc_char): New function.
4574 (print_it): Rewrite, in order to handle backslash escapes.
4575 (main): Handle new option. Set globals for --format, too.
4577 * tests/misc/stat-printf: Test --printf and --format.
4578 * tests/misc/Makefile.am (TESTS): Add stat-printf.
4580 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
4582 * NEWS: sort now reports incompatible options.
4583 * src/sort.c (incompatible_options, check_ordering_compatibility):
4585 (main): Use them. Don't bother with a usage message for
4586 "sort -c a b", for consistency with other error diagnostics.
4587 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
4590 * src/cat.c (main): Undo previous change. close_stdout already
4591 does the check, so the previous change wasn't necessary.
4593 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
4595 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
4597 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
4599 Install a more-conservative approach for sort -R. It's the
4600 same basic idea as the existing code, except it uses the full ISAAC
4601 approach (called the "more kosher" approach in the existing comments).
4602 This makes "sort -R" quite a bit slower (about a factor of 2 on my
4603 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
4604 better to be conservative here at first, and review any performance
4605 improvements carefully.
4606 * .x-sc_require_config_h: Add src/rand-isaac.c.
4607 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
4608 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
4609 (shred_SOURCES, sort_SOURCES): Remove.
4610 (EXTRA_DIST): Add rand-isaac.c.
4611 * src/rand-isaac.c: Revert to what used to be in shred.c, without
4612 changing it to allow for varying numbers of words in the state.
4613 Alter so that we include rand-isaac.c directly rather than
4614 compiling it and linking to it. Don't include config.h or
4615 system.h; that's the includer's responsibility.
4616 Omit functions that are specific to shred.
4617 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
4618 (isaac_step, struct irand_state):
4619 Resurrect these, with the same defns that used to be in shred.c.
4620 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
4621 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
4623 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
4624 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
4625 (irand_init, irand32, irand_mod):
4626 Number of words is constant again.
4627 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
4628 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
4629 * src/sort.c: Likewise.
4630 * src/shred.c (fillrand, dopass, main): Undo previous change.
4631 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
4633 * src/sort.c: Don't include md5.h; it wasn't needed.
4634 (struct keyfield): Rename random_hash to random, for consistency
4635 with the other member names. All uses changed.
4636 (usage): Tweak wording to mention STRING for --seed option.
4637 (short_options): Rorder for consistency with other programs.
4638 (rand_state): Now a struct, not a pointer to one. All uses changed.
4639 (HASH_WORDS, HASH_SIZE): Remove.
4640 (get_hash): Remove comments around resbuf size, since we can assume C89.
4641 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
4642 (keycompare): Adjust to the new get_hash.
4644 (badfieldspec): Omit recently-introduced comment; it isn't needed.
4645 (main): Don't set need_random simply because gkey has it set; that
4646 doesn't necessarily mean we'll need random numbers.
4647 Redo seeding to match new get_hash approach.
4649 2005-12-10 Jim Meyering <jim@meyering.net>
4651 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
4653 Avoid shred segfault on 64-bit systems.
4654 * src/rand-isaac.c (isaac_refill): Don't try to negate a
4655 local of type uint32_t. Make the local an `int' instead.
4657 * NEWS: Mention sort's new options.
4659 * src/rand-isaac.c (isaac_mix): Declare to be static.
4660 Mark all other functions as `extern' so the tight-scope
4661 part of `make distcheck' passes once again.
4662 * src/rand-isaac.h (isaac_mix): Remove declaration.
4664 * src/sort.c (get_hash): Change position of `*' in parameter
4665 type to conform with convention.
4666 (main): Split a long line so it fits in 80 columns.
4667 (keycompare): Remove stray SPACE before TAB that was
4668 causing `make distcheck' to fail.
4670 * src/shred.c: Don't include gethrxtime.h. No longer needed.
4672 * tests/misc/sort-rand: New file: basic tests for the new options.
4673 * tests/misc/Makefile.am (TESTS): Add sort-rand.
4675 2005-12-10 Frederik Eaton <frederik@ofb.net>
4677 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
4678 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
4679 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
4680 Make state size runtime-configurable.
4681 (isaac_new, isaac_copy): New functions.
4682 * src/rand-isaac.h: New file.
4683 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
4684 (fillrand, main): Adjust to the fact that the state size is now
4685 runtime-configurable.
4686 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
4687 (usage): Add options --random-sort and --seed to implement a random
4689 Include md5.h and rand-isaac.h.
4690 (get_hash): New function.
4691 (rand_state): New var.
4692 (HASH_WORDS, HASH_SIZE): New macros.
4694 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
4696 * tests/dd/misc: Add test for dd iflags=noatime.
4698 2005-12-09 Jim Meyering <jim@meyering.net>
4700 * src/sort.c (usage): Mention white space vs -b and -t options.
4703 2005-12-09 Eric Blake <ebb9@byu.net>
4705 * src/test.c (main): Fix misleading comment.
4707 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
4709 * NEWS: Mention dd's new noatime flag.
4710 * src/system.h (O_NOATIME): Define to 0 if not already defined.
4711 * src/dd.c (flags, usage): Add support for noatime flag.
4713 2005-12-07 Jim Meyering <jim@meyering.net>
4715 Distribute the cvsu script, used only by `make syntax-check'.
4716 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
4717 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
4718 distribute a copy of this script.
4719 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
4721 * tests/mv/acl: exit-77 before the trap, not after, if we fail
4722 to create a temporary directory on another partition.
4723 From Andreas Gruenbacher.
4725 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
4727 * man/basename.x: Cross-reference to dirname and readlink.
4728 * man/dirname.x: Cross-reference to basename and readlink.
4730 2005-12-05 Andreas Gruenbacher
4732 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
4733 (set_owner, preserve_author): New functions, factored out of copy_reg.
4734 (copy_reg): Use them.
4735 (copy_internal): Use them here, too.
4737 2005-12-04 Jim Meyering <jim@meyering.net>
4739 * src/sleep.c (usage): Say what happens with two or more arguments.
4740 Suggested by Justin Pryzby.
4742 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
4745 2005-12-03 Jim Meyering <jim@meyering.net>
4747 * src/rm.c (long_opts): Change the name of each undocumented, for-
4748 testing-only option to start with `-', so that it cannot render
4749 ambiguous any prefix it happens to share with some other option name.
4750 Problem reported by Eric Blake.
4751 * src/head.c (long_options): Likewise.
4752 * src/tail.c (long_options): Likewise.
4754 * tests/misc/head-elide-tail: Update uses of undocumented, for-
4755 testing-only --presume* options to start with `---'.
4756 * tests/rm/dangling-symlink: Likewise.
4757 * tests/rm/dir-no-w: Likewise.
4758 * tests/rm/isatty: Likewise.
4760 2005-11-30 Jim Meyering <jim@meyering.net>
4762 * Makefile.maint: Add a comment about cvsu.
4764 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
4766 * NEWS: df updates for "none", "proc", inaccessible file systems.
4767 * src/df.c (show_point): Ignore inaccessible file systems.
4768 (usage): -a includes dummy file systems, not size-0 file systems.
4770 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
4771 to avoid collision with POSIX name space. All uses changed.
4773 2005-11-24 Jim Meyering <jim@meyering.net>
4775 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
4776 * tests/acl: Add `$0: ' prefix to diagnostics.
4778 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
4780 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
4782 * src/copy.c: Improve performance a bit by optimizing away
4783 unnecessary system calls and going to a block size of at least
4784 8192 (on normal hosts, anyway). This improved performance 5% on my
4785 Debian stable host (2.4.27 kernel, x86, copying from root
4786 ext3 file system to itself).
4787 Include "buffer-lcm.h".
4788 (copy_reg): Omit last argument. All callers changed.
4789 Use xmalloc to allocate rather than trusting alloca
4790 (which is unwise with large block sizes).
4791 Declare locals more locally, if possible.
4792 Use uintptr_t words instead of int words, for a bit more speed
4793 when looking for null blocks on 64-bit hosts.
4794 Optimize away reads of zero bytes on regular files.
4795 In the typical case, insist on 8 KiB buffers, at least.
4796 Avoid unnecessary extra call to fstat when checking for sparse files.
4797 Avoid now-unnecessary cast to off_t, and "0L".
4798 Avoid unnecessary test of *new_dst when checking for same owner
4801 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
4803 * src/remove.c (rm): Don't assume C99 for-loop syntax.
4805 2005-11-22 Jim Meyering <jim@meyering.net>
4807 * src/remove.c (AD_push): Remove debugging cruft.
4809 * tests/rm/unread2 (rm): Change expected diagnostic,
4810 `cannot open directory' to `cannot remove', to align with
4812 * tests/rm/rm2: Ensure that rm now continues removing entries
4813 even after certain types of failure.
4815 * src/remove.c: Rewrite. Now, this module is reentrant on systems
4816 that provide openat (Solaris), and on systems like Linux+procfs
4817 where our openat emulation code is reentrant. This also fixes a
4818 few low-probability leaks and eliminates some code that could,
4819 in very unusual circumstances, cause rm() (via a callee) to exit.
4820 * NEWS: Mention this.
4822 * configure.ac: Put copyright dates all on one line so the
4823 emacs function that updates them works properly.
4825 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
4827 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
4828 Problem reported by Eric Blake.
4829 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
4830 we get a standard-conforming compiler. This relies on the new
4831 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
4832 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
4833 m4/c.m4 can go away with Autoconf 2.60 comes out.
4835 2005-11-17 Jim Meyering <jim@meyering.net>
4837 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
4838 (AD_mark_current_as_unremovable): Likewise, but for a local.
4841 * tests/mv/acl: Let traps handle removing temporary directories.
4843 Expect acl-related tests to fail, until the corresponding
4844 patches are committed.
4845 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
4846 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
4848 ACL tests, from Andreas Gruenbacher.
4849 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
4850 * tests/mv/Makefile.am (TESTS): Add acl.
4851 * tests/cp/Makefile.am (TESTS): Add acl.
4853 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
4855 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
4857 * NEWS: Improve quality of ln's diagnostics.
4858 * src/ln.c (do_link, usage): Likewise.
4859 (do_link): Don't use alloca on a buffer of unbounded size.
4861 2005-11-16 Jim Meyering <jim@meyering.net>
4863 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
4864 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
4865 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
4866 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
4867 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
4869 2005-11-14 Jim Meyering <jim@meyering.net>
4871 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
4873 2005-11-13 Jim Meyering <jim@meyering.net>
4875 * announce-gen: Accept new option, --gpg-key-id=ID and
4876 emit a blurb telling how to use the .sig files.
4877 * Makefile.cfg (gpg_key_ID): Define.
4878 * Makefile.maint (announcement): Use new option and key.
4880 Require that most .c files include <config.h>.
4881 * Makefile.maint (sc_require_config_h): New rule.
4882 (syntax-check-rules): Add it.
4883 * .x-sc_require_config_h: New file listing exceptions to the
4884 above rule. Some are legit, others are simply grandfathered in.
4885 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
4887 2005-11-12 Jim Meyering <jim@meyering.net>
4889 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
4891 2005-11-11 Jim Meyering <jim@meyering.net>
4893 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
4894 Mention new readlink options in 5.3.0's `New features' section.
4895 Spotted by Thomas Hood.
4897 2005-11-08 Jim Meyering <jim@meyering.net>
4899 * NEWS: Merge in changes from b5_9x branch.
4901 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
4903 * NEWS: ls now defaults to --time-style='locale', which in turn acts
4904 like --time-style='posix-long-iso' if the locale settings are messed up.
4905 * src/ls.c (decode_switches): Implement this.
4907 2005-11-08 Jim Meyering <jim@meyering.net>
4909 * tests/du/2g: s/expensive/very expensive/ in a comment.
4912 2005-10-17 Eric Blake <ebb9@byu.net>
4914 * src/ls.c (usage): Fix descriptions of --sort, --time.
4915 Reported by Vitaly A. Ostanin.
4917 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
4919 * src/ln.c: Include filenamecat.c.
4920 (FILE_BASENAME_CONCAT): Remove.
4921 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
4922 (main): Use file_name_concat, base_name, and strip_trailing_slashes
4923 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
4926 2005-11-04 Jim Meyering <jim@meyering.net>
4928 * src/du.c (process_file): Don't overflow for files of size >= 2^31
4929 on systems with stat.st_blocks of a signed 32-bit type.
4930 This bug causes trouble on some AIX 5.1 systems.
4931 Report and trivial patch from Paul Townsend:
4932 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
4933 * NEWS: Mention this.
4935 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
4936 * tests/du/Makefile.am (TESTS): Add it here.
4937 * tests/very-expensive: New file.
4938 * tests/Makefile.am (EXTRA_DIST): Add it here.
4939 * tests/cp/perm: Mark this test as `very-expensive', too.
4941 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
4943 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
4945 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
4947 * src/rm.c (usage): Don't mention rm -d.
4949 2005-11-02 Jim Meyering <jim@meyering.net>
4951 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
4952 From Andreas Schwab.
4954 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
4955 `M+N records in/out' lines don't pollute `make check' output.
4957 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
4958 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
4959 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
4960 to indicate that the input file should be piped into the command
4961 under test (via `cat FILE | $prog ...').
4963 * src/remove.c (remove_entry): Emit a better diagnostic when rm
4964 (without -r) fails to remove a directory on a non-Linux system.
4965 This change affects only newer Solaris systems (with priv_*
4966 functions like priv_allocset). Reported by Keith Thompson.
4968 * tests/rm/dir-nonrecur: New file/test for the above fix.
4969 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
4971 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
4973 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
4974 POSIX 1002.1-2001 requires.
4975 * src/tail.c (parse_obsolete_option): Implement this.
4976 Problem reported by Vincent Lefevre.
4977 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
4978 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
4979 (test_vector): Add special cases for _POSIX2_VERSION, and
4980 regularize the old ones a bit.
4981 * tests/touch/obsolescent: Add y2000 test.
4983 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
4985 * src/dd.c (skip): Fix off-by-one error reported by
4986 Theodoros V. Kalamatianos.
4988 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
4990 * tests/mkdir/p-3: Require that the test be run as non-root.
4991 Problem and trivial fix reported by Theodoros V. Kalamatianos.
4993 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
4995 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
4996 boundary between DEST and SOURCE in the result.
4998 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
5000 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
5001 back to text, to sync with documentation and for backwards
5004 2005-10-25 Jim Meyering <jim@meyering.net>
5006 * tests/dircolors/simple (other-wr): Add an explicit test for
5007 the dircolors bug (NULL-dereference) fixed yesterday.
5009 2005-10-24 Jim Meyering <jim@meyering.net>
5011 * src/tac.c (tac_file): When determining whether a file is seekable,
5012 also test whether it is a tty. Using only the lseek-based test would
5013 give a false positive on Solaris. Reported by Peter Fales.
5015 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
5017 * tests/install/d-slashdot: New test, for "install -d" failure.
5018 * tests/install/Makefile.am (TESTS): Add d-slashdot.
5019 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
5020 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
5022 2005-10-24 Jim Meyering <jim@meyering.net>
5024 * src/dircolors.c (ls_codes): Add missing comma.
5025 Anonymous report and patch from
5026 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
5028 * src/dircolors.c: Add compile-time assertion that the slack_codes
5029 and ls_codes arrays have the same number of elements. This would
5030 have prevented the above-fixed bug.
5032 * src/expand.c (parse_tab_stops): Add a comment to make this function
5033 identical to the one in unexpand.c.
5034 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
5035 identical to the one in expand.c.
5037 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
5039 2005-10-23 Jim Meyering <jim@meyering.net>
5041 * src/md5sum.c (digest_check, main): Use ptr_align rather than
5042 a dangerous pointer-value-to-`unsigned' cast.
5043 * NEWS: mention the new sha* programs.
5044 * AUTHORS: Add new sha* programs.
5046 2005-08-28 David Madore <david.madore@ens.fr>
5048 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
5049 * README: Add their names to the list.
5050 * src/md5sum.c: Provide framework for computing sha-2 hashes.
5051 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
5052 Rules for compiling sha-2 utilities
5053 (noinst_HEADERS): Remove checksum.h.
5054 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
5056 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
5057 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
5058 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
5059 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
5060 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
5061 sha384sum, sha512sum test scripts here rather that each in its
5064 2005-08-28 David Madore <david.madore@ens.fr>
5066 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
5067 of the FIPS test vectors).
5069 2005-10-23 Jim Meyering <jim@meyering.net>
5071 * configure.ac: Use 6.0-cvs as the version string.
5072 * NEWS: Adjust accordingly.
5077 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
5079 Copying and distribution of this file, with or without
5080 modification, are permitted provided the copyright notice
5081 and this notice are preserved.