1 2007-12-30 Mike Frysinger <vapier@gentoo.org>
3 * src/dircolors.hin (TERM): Add gnome-256color.
5 2007-12-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7 * doc/coreutils.texi: Fix a typo. Avoid the term `relationals'.
9 2007-12-20 Jim Meyering <meyering@redhat.com>
11 Use comma-separated list in ./configure --help output.
12 * configure.ac: Map commas to spaces in excluded-program list.
13 Use a comma-separated list, not a space-separated one.
14 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG):
15 Expect list of program names to be comma-separated.
16 Reported by Jan Bauke Douma.
18 Avoid another "make check" failure due to omitted programs.
19 * tests/test-lib.sh (require_built_): New function.
20 * tests/misc/groups-version: Use it to skip this test if
21 either groups or id is not built.
23 Avoid spurious "make check" failures due to omitted programs.
24 * man/Makefile.am (distcheck-hook): Make check rules dependents of
25 this target, not of check-local, so that people aren't distracted by
26 failures due to programs omitted via --enable-no-install-program=...
28 2007-12-19 Paul Eggert <eggert@cs.ucla.edu>
30 * src/uniq.c (usage): Improve wording in --help "Note".
32 2007-12-18 Jim Meyering <meyering@redhat.com>
34 * src/uniq.c (usage): Note that sorting uniq's input is often useful.
35 Suggested by Eric Blake.
36 (usage): Say "key-selection", not "field-selection".
37 Quote example commands consistently.
39 2007-12-15 Jim Meyering <meyering@redhat.com>
43 * Makefile.cfg (gpg_key_ID): Use new, longer signing subkey.
45 2007-12-12 Jim Meyering <meyering@redhat.com>
47 * tests/mv/part-symlink: Redirect diff output to stderr.
49 2007-12-11 Jim Meyering <meyering@redhat.com>
51 Add a test to exercise today's bug fix.
52 * tests/misc/selinux: Test for today's bug fix.
53 * NEWS: Mention the SELinux "ls -l" fix.
55 2007-12-11 Paul Eggert <eggert@cs.ucla.edu>
57 "ls -l" wouldn't output "+" on SELinux hosts unless -Z was also given.
58 * src/ls.c (gobble_file): Also get the file context if -l is specified.
59 Treat getfilecon failures like file_has_acl failures.
60 (UNKNOWN_SECURITY_CONTEXT): New constant.
61 (clear_files): Don't free it.
62 (gobble_file): Set unknown security contexts to it; that way, we
63 don't have to have special cases for unknown contexts.
64 (print_long_format, print_file_name_and_frills): Don't worry
65 about scontext being null, since it's always some string now.
67 2007-12-11 Jim Meyering <meyering@redhat.com>
69 * NEWS: Add the "Bug fixes" heading.
71 2007-12-09 Jim Meyering <meyering@redhat.com>
73 "rm" as root would fail to unlink a non-directory on OS X 10.4.x
74 * src/remove.c (remove_entry) ["can unlink directories"]: Fix a
75 mistakenly reversed condition.
76 * NEWS: Mention this bug fix.
77 Reported by Pieter Bowman.
79 2007-12-08 Jim Meyering <meyering@redhat.com>
81 * src/c99-to-c89.diff: Adjust shred.c offsets.
83 2007-12-04 Jim Meyering <meyering@rho.meyering.net>
85 Reflect change in gnulib: don't include getpagesize.h,
86 now that it's provided by unistd.h.
87 * src/cat.c: Don't include getpagesize.h.
88 * src/copy.c: Likewise.
90 * src/shred.c: Likewise.
91 * src/split.c: Likewise.
93 2007-12-02 Jim Meyering <meyering@redhat.com>
95 Copy a .po file into place also when the target doesn't exist.
96 * bootstrap (gnulib_tool): ... not just when the checksum differs.
97 So now, if I manually remove po/xx.po, rerunning bootstrap will
98 copy the latest into place.
100 Make my-distcheck depend on "check".
101 * Makefile.maint (my-distcheck): Also depend on "check", so I can't tag
102 and release something that fails "make check" (however harmless) when
103 run in a checked-out-from-git dir, but not in the distributed tarball.
105 * NEWS: Add the usual "Noteworthy changes in release 6.9.91..." line.
107 Remove just-installed su, if unable to make it set-UID root.
108 Normally, su isn't even installed. However, if you configure with
109 --enable-install-program=su, and then install with insufficient
110 privileges, we now make sure to remove the just-installed binary.
111 * src/Makefile.am (install-exec-hook): Rename from install-exec-local,
112 so that this rule is guaranteed to be run *after* installation.
113 If unable to chown and chmod the installed "su" program, remove it.
114 Reported by Greg Schaefer.
116 2007-12-01 Bob Proulx <bob@proulx.com>
118 Make existing-perm-race executable.
119 * tests/cp/existing-perm-race: Update file mode.
121 2007-12-01 Jim Meyering <meyering@redhat.com>
125 * NEWS: Remove the now-untrue statement about cp vs. dangling symlinks
127 Change release procedure: tag *before* running e.g., "make stable".
128 * Makefile.maint (vc-dist): Don't tag. Now, you must apply the tag
129 before running "make beta", "make stable", etc.
130 (vc-tag-check): Remove rule. No longer makes sense.
132 * Makefile.maint (vc-tag-check): Correct check for existing git tag.
134 Defer NEWS and ChangeLog checks until after the version-changing tag.
135 * Makefile.maint (alpha beta major): Don't depend on the
136 news-date-check changelog-check targets. They must fail before
137 applying the version-changing tag. Instead, run them after "vc-dist".
139 * NEWS: Record release date and new version number.
140 Mention some of the SELinux changes.
141 * src/stat.c (main): Adjust a comment.
143 * TODO: Add some entries (documentation needed),
144 and remove the one for mktemp.
146 Add "extern" keyword to declaration of cp_options_default.
147 * src/copy.c (cp_options_default): Mark as "extern", so the
148 "sc_tight_scope" part of "make distcheck" passes.
150 2007-12-01 Jim Meyering <meyering@redhat.com>
152 Change comments: say bug present up to coreutils-6.9, not fixed in 6.10.
153 * tests/cut/Test.pm: Adjust comment.
154 * tests/misc/cut: Likewise.
155 * tests/misc/ls-misc: Likewise.
156 * tests/misc/od: Likewise.
157 * tests/misc/stty-invalid: Likewise.
158 * tests/tr/Test.pm: Likewise.
160 2007-11-29 Paul Eggert <eggert@cs.ucla.edu>
162 Add a test for cp -p and existing file permissions.
163 * tests/cp/Makefile.am (TESTS): Add existing-perm-race.
164 * tests/cp/existing-perm-race: New test. It isn't much of a
165 test yet, since it's hard to catch the race, but it has a FIXME
166 that will let us do a better test later.
168 2007-11-28 Paul Eggert <eggert@cs.ucla.edu>
170 Fix a security race with "cp -p A B" when B already exists.
171 * src/copy.h (struct cp_options): New member owner_privileges.
172 * src/copy.c (USE_ACL): Define to 0 if not defined, for convenience.
173 (owner_failure_ok): New function.
174 (set_owner): Avoid a security-related race by doing an extra chmod
175 first if it looks like there might be trouble right after a chown.
176 Accept a source struct stat rather than a uid and gid, and
177 accept a boolean NEW_DST and destination struct stat.
179 * src/copy.h (cp_options_default): New function, replacing the
180 old chown_privileges.
181 * src/copy.c (cp_options_default): Likewise.
182 * src/cp.c (cp_option_init): Use it.
183 * src/install.c (cp_option_init): Likewise.
184 * src/mv.c (cp_option_init): Likewise.
186 2007-11-30 Jim Meyering <meyering@redhat.com>
188 Avoid a spurious test failure when build directory is set-GID.
189 * tests/cp/fail-perm: Ensure that '.'s set-GID bit is off.
191 Be extra careful to quote $abs_top_builddir-derived names.
192 * tests/misc/ls-misc (shell_quote): New function.
193 Use it to quote file names derived from $abs_top_builddir,
194 in case it contains shell meta-characters. This is not currently
195 needed, since CuTmpdir detects the fishy name and skips the test.
196 But it's important enough to add the extra protection.
197 Reported by Ralf Wildenhues.
199 Include test name in the "unsafe working directory name" diagnostic.
200 * tests/CuTmpdir.pm (import): If $ME is '-', use $prefix.
202 2007-11-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
204 Add quotes to protect against white space in build dir name.
205 * tests/check.mk (TESTS_ENVIRONMENT): Quote $(abs_srcdir).
206 * tests/chmod/setgid: Quote absolute names.
207 * tests/misc/help-version: Likewise.
208 * tests/misc/pwd-unreadable-parent: Likewise.
209 * tests/rmdir/ignore: Likewise.
210 * tests/test-lib.sh: Likewise.
212 Define `tst', for CU_TEST_NAME.
213 * build-aux/check.mk (am__check_pre): Set `tst', for
214 CU_TEST_NAME in tests/check.mk.
216 * tests/CuTmpdir.pm (END): Do not do the cleanup if $dir is not
217 defined, because it then goes wild and changes the mode of all
218 directories below $HOME. Undefined $dir can happen if the test
219 is to be skipped because of an unsafe working directory name.
221 2007-11-28 Paul Eggert <eggert@cs.ucla.edu>
223 Close a file descriptor leak when cp --preserve=context fails.
224 * src/copy.c (copy_reg): Close dest_desc too, if getfscreatecon
227 2007-11-28 Jim Meyering <meyering@redhat.com>
229 * README: Document the known problem with gettext <= 0.17.
231 2007-11-28 Paul Eggert <eggert@cs.ucla.edu>
233 * gl/modules/randread (Depends-on): Remove nonexistent rand-isaac.
235 2007-11-27 Jim Meyering <meyering@redhat.com>
237 Don't block use of 'cat' or 'wc' in "make check".
238 * Makefile.maint (my-distcheck): Add "cat" and "wc" to the list
239 of programs that we can't blacklist.
241 Fix md5sum+sha*sum on sparc: regenerate files with latest autoconf.
242 * configure et al: Regenerate with very latest version of autoconf
243 (v2.61a-312-gb524b0f), to fix md5sum and sha*sum miscompilation
244 on big-endian systems (like sparc) due to lack of the required
245 definition in of WORDS_BIGENDIAN in lib/config.h.
247 2007-11-26 Jim Meyering <meyering@redhat.com>
249 setuidgid.c: more cleanup
250 * src/setuidgid.c: Include "mgetgroups.h".
251 (main): Don't presume there's a fixed limit on the maximum number
252 of group IDs. Don't use NGROUPS; it's artificially low.
253 Change the name of a local: s/gids_count/n_gids/.
254 Remove non-portable "const": s/const int tmp =.../int tmp =.../
256 2007-11-25 Jim Meyering <meyering@redhat.com>
258 Document install's -D option.
259 * doc/coreutils.texi (install invocation): Document -D.
260 Reported by Akim Demialle.
262 setuidgid: Update --help output.
263 * src/setuidgid.c (usage): Describe -g GID[,GID1...] option.
264 Mention that USER may be a numeric ID or a user name.
266 2007-11-24 Jim Meyering <meyering@redhat.com>
269 * tests/cp/preserve-gid: Split some long lines.
270 Prepend "+" to numeric uid and gid chown arguments, on principle.
273 setuidgid: minor clean-up.
274 * setuidgid.c: Include "xstrtoul.h".
275 (main): Detect overflow in string-to-gid_t and -to-uid_t conversions.
278 * src/setuidgid.c: Normalize leading white space: no more TABs.
280 Test the new feature: cp -p preserves the GID whenever possible.
281 * tests/cp/preserve-gid: New file. Test for today's change.
282 * tests/cp/Makefile.am (TESTS): Add preserve-gid.
283 * tests/Makefile.am (all_t): Add tc.
286 setuidgid: accept numeric UID, and new option -g GID,GID1,GID2,...
287 * src/setuidgid.c: Add functionality for the new test above.
289 "cp -p" tries to preserve GID even if preserving the UID fails.
290 * NEWS: Mention this new feature.
291 * src/copy.c (set_owner): Try to preserve just the GID,
292 when initial fchown/lchown fails.
293 * src/cp.c (re_protect): Likewise.
295 2007-11-23 Jim Meyering <meyering@redhat.com>
297 * src/runcon.c (main): Remove unused parameter, "envp".
299 Add tests to show new class of strings accepted by date -d.
300 * tests/misc/date (rel-1day, rel-plus1): New tests for the recent
301 change in gnulib's getdate.y.
302 * NEWS: Mention the fix.
304 2007-11-22 Jim Meyering <meyering@redhat.com>
306 Quiet warnings about unused parameters.
307 * src/copy.c (set_author) [!HAVE_STRUCT_STAT_ST_AUTHOR]:
308 "Use" each of the parameters.
310 * GNUmakefile: Correct the "rerunning..." diagnostic.
312 Make it easier to diagnose PATH-induced "make distcheck" failures.
313 * Makefile.maint (write_loser): Define.
314 (my-distcheck): Use an always-failing wrapper script, that gives
315 a diagnostic, not "false".
316 Run only "make -C tests check" with the restrictive PATH.
317 Run the new gnulib-tests/ with the usual PATH.
319 cp: by default, refuse to copy through a dangling destination symlink
320 * NEWS: Mention this change.
321 * doc/coreutils.texi (cp invocation): Describe the new behavior.
322 * src/copy.c: No longer include "canonicalize.h".
323 (copy_reg): Upon failure to open a dangling destination symlink,
324 don't canonicalize the name, but rather fail (default) or, with
325 POSIXLY_CORRECT, repeat the open call without O_EXCL (potentially
327 * src/copy.h (struct cp_options) [open_dangling_dest_symlink]:
328 New member. Reorder the others, grouping "bool" and "enum"
330 * tests/cp/thru-dangling: Test for changed and new behavior.
331 * src/cp.c (cp_option_init): Initialize new member.
332 * src/install.c (cp_option_init): Likewise.
333 * src/mv.c (cp_option_init): Likewise.
335 2007-11-21 Pádraig Brady <P@draigBrady.com>
337 * doc/coreutils.texi (split invocation): Improve the
338 descriptions of the split command options.
340 2007-11-21 Jim Meyering <meyering@redhat.com>
342 * src/c99-to-c89.diff: Adjust seq.c offsets.
344 2007-11-18 Paul Eggert <eggert@cs.ucla.edu>
346 * src/seq.c (print_numbers): Rewrite in an attempt to avoid the
347 more-general rounding issues exposed by the previous patch.
349 2007-11-18 Jim Meyering <meyering@redhat.com>
351 * src/c99-to-c89.diff: Adjust seq.c offsets.
353 Remove unused parameter in remove.c.
354 * src/remove.c (fd_to_subdirp): Remove unused parameter.
355 (remove_cwd_entries, remove_dir): Update callers.
357 bootstrap: work also with 4-argument variant of AC_INIT (from gnulib)
358 2007-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
359 * bootstrap (gnulib_extra_files): Adjust sed command.
361 2007-11-17 Jim Meyering <meyering@redhat.com>
363 Correct preceding patch.
364 * src/seq.c (print_numbers): Also handle first < last && step < 0.
365 * tests/misc/seq [empty-rev]: New test for this case.
367 "seq .1 .1" would mistakenly generate no output on some systems
369 * src/seq.c (print_numbers): Handle another floating point corner case.
370 This avoids failure of seq's eq-wid-7 test on FreeBSD 6.1.
372 2007-11-16 Paul Eggert <eggert@cs.ucla.edu>
374 Port tests/rmdir/ignore away from GNU/Linux.
375 * tests/rmdir/ignore: Don't assume that rmdir($PWD) will fail
376 with errno==ENOTEMPTY when $PWD is not empty; Posix also allows
377 rmdir to fail with errno==EBUSY.
379 2007-11-16 Jim Meyering <meyering@redhat.com>
381 Avoid an obscure new "make distcheck" failure.
382 * Makefile.maint (my-distcheck): Also allow 'mv', for its use
383 in gnulib-tests/Makefile.
385 2007-11-16 Paul Eggert <eggert@cs.ucla.edu>
387 Port readlink-fp-loop to Solaris.
388 * tests/misc/readlink-fp-loop (symlink_loop_msg): New var,
389 which records the symlink-loop message, whose wording is
390 not standardized by Posix. Do not rely on "echo x > p/1"
391 to work when p/1 has a lot of indirect symlinks. (I'm surprised
392 that it works on Linux. Perhaps a Linux bug?)
394 2007-11-15 Paul Eggert <eggert@cs.ucla.edu>
396 Port to Solaris 'make' and use a Posixish shell on Solaris.
397 * bootstrap.conf (gnulib_modules): Add gnu-make, posix-shell.
398 * build-aux/check.mk (SHELL): Set to $(PREFERABLY_POSIX_SHELL),
399 so that commands can assume Posix syntax.
400 (ENABLE_HARD_ERRORS, TEST_LOGS): Don't use GNU Make's "?=" syntax.
401 (SH_E_WORKAROUND): New macro.
402 (am__check_pre, $(TEST_SUITE_LOG)): Use it.
403 (am__check_pre): Fail if "mkdir" fails. Use $(SHELL)
404 rather than relying on the "#!/bin/sh" in the file, so that tests
405 can use Posix syntax.
406 (am__check_pre, am__tty_colors): Use $$src rather than $$<, to
407 support the Posix-make $(TEST_LOGS) rule.
408 (%.log: %.test, %.log: %$(EXEEXT)): Remove unused inference rules
409 that rely on a GNU Make extension and cause Solaris 'make' to fail.
410 (SUFFIXES): New macro, so that we can use Posix style inference rules.
411 (%.log: %): Use this rule only if GNU_MAKE.
412 Set $$src so that macros can use $$src rather than $$<.
413 (CHECK-FORCE, DEPENDENCY, $(TEST_LOGS)): New macros and rules,
414 which rely only on Posix 'make' semantics, and are used only with
415 non-GNU 'make' implementations. $(TEST_LOGS) invokes 'make'
416 recursively (and a bit inefficiently) to simulate the GNU 'make'
418 (.log.html): Renamed from "%.html: %.log", so that it relies only
419 on Posix 'make' semantics.
420 (check-clean, .PHONY): Do not depend on check-clean-local, since
421 Solaris 'make' complains about nonexistent rules like that.
422 * src/Makefile.am (SUFFIXES): Remove; no longer needed.
423 (groups): Use a specific rule rather than an inference rule that
424 is only instantiated once. The inference-rule approach does not
425 work with Solaris 'make', which gets confused by the "groups:
426 Makefile" line. It's not clear from the Posix spec that Solaris
427 'make' is buggy here, so instead of worrying about it, rewrite
428 the makefile so that it clearly conforms to Posix.
429 * tests/check.mk (TESTS_ENVIRONMENT): Export PACKAGE_BUGREPORT.
430 GNU 'make' does this automatically for us, but Solaris 'make'
433 2007-11-15 Paul Eggert <eggert@cs.ucla.edu>
435 Port to Solaris 8 perl, which does not support "use warnings;".
436 * tests/dd/skip-seek: Skip test if "use warnings;" fails.
437 * tests/du/files0-from: Likewise.
438 * tests/misc/base64: Likewise.
439 * tests/misc/basename: Likewise.
440 * tests/misc/cut: Likewise.
441 * tests/misc/date: Likewise.
442 * tests/misc/dircolors: Likewise.
443 * tests/misc/dirname: Likewise.
444 * tests/misc/expand: Likewise.
445 * tests/misc/expr: Likewise.
446 * tests/misc/factor: Likewise.
447 * tests/misc/fmt: Likewise.
448 * tests/misc/fold: Likewise.
449 * tests/misc/head-elide-tail: Likewise.
450 * tests/misc/ls-misc: Likewise.
451 * tests/misc/md5sum: Likewise.
452 * tests/misc/md5sum-newline: Likewise.
453 * tests/misc/mktemp: Likewise.
454 * tests/misc/od: Likewise.
455 * tests/misc/paste-no-nl: Likewise.
456 * tests/misc/pr: Likewise.
457 * tests/misc/seq: Likewise.
458 * tests/misc/sha1sum: Likewise.
459 * tests/misc/sha1sum-vec: Likewise.
460 * tests/misc/sha224sum: Likewise.
461 * tests/misc/sha256sum: Likewise.
462 * tests/misc/sha384sum: Likewise.
463 * tests/misc/sha512sum: Likewise.
464 * tests/misc/sort-merge: Likewise.
465 * tests/misc/stat-printf: Likewise.
466 * tests/misc/sum: Likewise.
467 * tests/misc/test-diag: Likewise.
468 * tests/misc/tsort: Likewise.
469 * tests/misc/unexpand: Likewise.
470 * tests/misc/wc-files0-from: Likewise.
471 * tests/misc/xstrtol: Likewise.
472 * tests/mv/i-1: Likewise.
473 * tests/rm/empty-name: Likewise.
474 * tests/rm/unreadable: Likewise.
476 2007-11-15 Andreas Schwab <schwab@suse.de>
478 * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix syntax error.
479 Remove trailing space from result.
481 2007-11-15 Jim Meyering <meyering@redhat.com>
483 Avoid misbehavior of a cross-device "mv" or "install".
484 Those programs must not dereference a destination symlink.
485 * src/copy.c (copy_reg): Don't treat a dangling destination symlink
486 differently in move mode. In move mode, the only way the added
487 O_EXCL can cause failure is when some other process has recreated
488 the file this code unlinked a few instructions before.
490 2007-11-14 Jim Meyering <meyering@redhat.com>
492 Another bootstrap kludge.
493 * bootstrap: Ensure gnulib-tests/test-*.sh are executable
495 #ifdef-out matchpathcon-related code, for now.
496 * src/install.c (setdefaultfilecon): #ifdef-out all of the
497 matchpathcon-related code, until it's more efficient.
498 (setdefaultfilecon): Instead of the above, stub-out the entire function.
500 Use gnulib's stpncpy module, now required by install.c
501 * bootstrap.conf (gnulib_modules): Add stpncpy.
503 Enable gnulib-tool's --with-tests option.
504 * bootstrap: After all is done, transform the generated
505 gnulib-tests/gnulib.mk.
506 * bootstrap.conf (gnulib_tool_option_extras): Set it here.
507 * gnulib-tests/Makefile.am: New file.
508 * Makefile.am (SUBDIRS): Add gnulib-tests.
509 * configure.ac (AC_CONFIG_FILES): Add gnulib-tests/Makefile.
510 * m4/jm-macros.m4 (coreutils_MACROS) [ARGMATCH_DIE_DECL]: Omit the
511 "extern " prefix to "void usage ()", so that the macro string value can
512 be used to construct a function definition in gnulib's test-argmatch.c.
514 2007-11-12 Benno Schulenberg <bensberg@justemail.net>
516 Clarify description of cp's -a option.
517 * src/cp.c (usage) [-a]: Remove unnecessary 'P'.
518 Since option -d of 'cp' includes the function of -P, mentioning the
519 latter in the description of option -a is redundant and therefore
520 slightly confusing, as the reader tries to figure out what it adds.
521 * doc/coreutils.texi (cp invocation): Likewise: s/-dpPR/-dpR/.
523 2007-11-09 Jim Meyering <meyering@redhat.com>
525 bootstrap: fix typo to enable use of $gnulib_tool_option_extras.
526 * bootstrap (gnulib_tool_options): Add a space before the use
527 of $gnulib_tool_option_extras, so that it's separated from the
530 install+SELinux: reduce a 12x performance hit to ~1.5x
531 * src/install.c (setdefaultfilecon): Call matchpathcon_init_prefix,
532 to mitigate what would otherwise be a large performance hit due to
533 the use of matchpathcon.
534 Dan Walsh suggested the use of matchpathcon_init_prefix.
535 * gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Define.
537 2007-11-08 Jim Meyering <meyering@redhat.com>
539 Adapt to gnulib's s/jm_/gl_/ cache variable renaming.
540 * configure.ac: Change the cache variable name prefix "jm_" to "gl_",
541 to match today's change in gnulib.
543 2007-11-05 Jim Meyering <meyering@redhat.com>
545 Fix bootstrap failure to handle files like lib/uniwidth/cjk.h.
546 * bootstrap (cp_mark_as_generated): Create any required parent
547 destination directories before copying a file into place.
549 * src/c99-to-c89.diff: Adjust offsets.
551 Don't use GNU-sed-specific \< \> operators here, either.
552 * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Use a loop, as below.
554 Use tighter regexps when performing name substitution.
555 * man/Makefile.am (mapped_name): Add ^ and $$ anchors.
557 Don't use GNU-sed-specific \< \> operators.
558 * configure.ac (MAN): Transform ginstall.1 to install.1 using
559 a loop, rather than sed with \<...\>.
560 Problem reported by Bruno Haible.
561 Andreas Schwab reminded me that \< and \> are not portable.
563 Get git-version-gen from gnulib.
564 * build-aux/git-version-gen: Remove file.
565 * build-aux/.gitignore: Add git-version-gen.
566 * bootstrap.conf (gnulib_modules): Add git-version-gen.
568 2007-11-03 Jim Meyering <meyering@redhat.com>
570 git-version-gen: Sync from autoconf's version.
571 * build-aux/git-version-gen: Run git-status
573 Sync copyright and scriptversion bits from gnulib.
574 * build-aux/git-version-gen: No semantic change.
576 Change the first '-' to '.' in the snapshot version string,
577 e.g., 6.9-377-08144 -> 6.9.377-08144
578 * build-aux/git-version-gen: ... and add comments.
580 seq: add another test for the %% bug.
581 * tests/misc/seq (fmt-c): Test the other fixed case, too.
583 2007-11-03 Paul Eggert <eggert@cs.ucla.edu>
585 Fix bug with "seq 10.8 0.1 10.95", plus another bug with %% in format.
587 * NEWS: Mention the %%-in-format bug fix.
588 * src/seq.c (struct layout): New type.
589 (long_double_format): New arg LAYOUT. Fill it in. Fix mishandling
591 (print_numbers): New arg LAYOUT. Don't convert LAST to output format
592 when deciding whether to go slightly past LAST. Instead, convert
593 X to output format and back. This fixes a bug reported by
595 <http://lists.gnu.org/archive/html/bug-coreutils/2007-10/msg00237.html>
596 where "seq 10.8 0.1 10.95" would output 11.0 on platforms where
597 10.95 rounds to a value that prints as 11.0 when only one digit
598 past the decimal point is asked for.
599 (main): Compute layout, for benefit of print_numbers.
600 * tests/misc/seq (float-3): Undo previous change, since the bug
602 (fmt-b): New test, for the %% bug.
604 2007-11-01 Jim Meyering <meyering@redhat.com>
606 * tests/misc/printf-surprise: Correct sed transform.
607 Reported by Bob Proulx.
609 Add example inspired by "make dist" running gzip and lzma in sequence.
610 * doc/coreutils.texi (tee invocation): Show how to run tar just
611 once, compressing the tee'd output streams in parallel.
613 Say that the first process substitution example is contrived.
614 * doc/coreutils.texi (tee invocation): ... and show how to do
615 it properly. Pointed out by James Antill.
617 Use mktemp, not mkdtemp, to create test directories.
618 * tests/test-lib.sh: Use the mktemp binary we've just built,
619 not the mkdtemp script.
620 * tests/mkdtemp: Remove file.
621 * tests/Makefile.am (EXTRA_DIST): Remove mkdtemp.
623 Adjust a seq subtest not to depend on the vagaries of floating point.
624 * tests/misc/seq (float-3): Use 10.94 as the endpoint, not 10.95,
625 since 10.95 was precisely in the middle of the interval, and with
626 a %.1f format could map to either 10.9 or 11.0.
627 Reported by Mike Frysinger
629 Make the new printf-surprise test more precise.
630 * tests/test-lib.sh (require_ulimit_): New function.
631 * tests/misc/printf-surprise: Use ulimit -v to trigger the fixed bug,
632 and rather than checking printf's exit status (which would go wrong
633 on FreeBSD 6.1, since their printf(3) function doesn't require
634 lots of memory in this case) simply test whether it outputs
637 Accommodate FreeBSD 6.1 hard-link-to-symlink differences.
638 * tests/cp/same-file: Detect when linking to a symlink links to
639 the target of the symlink (FreeBSD 6.1 does this, Linux does not),
640 and skip the few tests that would otherwise fail.
641 Redirect output of final comparison to stderr, since all stdout
642 is already redirected.
644 2007-10-31 Jim Meyering <meyering@redhat.com>
646 Fix a "make distcheck" failure.
647 * Makefile.maint (my-distcheck): Don't stub-out dirname,
648 since build-aux/check.mk now uses it.
650 * bootstrap.conf (gnulib_modules): Add xprintf-posix.
652 2007-10-30 Jim Meyering <meyering@redhat.com>
654 Avoid seq floating-point test failure on FreeBSD 6.1.
655 * tests/misc/seq (float-4): Also accept -0.0.
657 2007-10-29 Jim Meyering <meyering@redhat.com>
659 Change a "make dist" diagnostic.
660 * GNUmakefile: Don't imply that $(_curr-ver) is the new version string.
662 2007-10-29 Bob Proulx <bob@proulx.com>
664 Improve color terminal escape usage.
665 * build-aux/check.mk (am__tty_colors): Use 'tput' to deduce
666 terminal color capabilities.
668 2007-10-29 Jim Meyering <meyering@redhat.com>
670 Don't try to colorize a dumb terminal.
671 * build-aux/check.mk (am__tty_colors): Skip colors if $TERM is "dumb".
672 Thanks to Bob Proulx.
674 Remove gnulib's printf-posix module, for now.
675 * bootstrap.conf (gnulib_modules): It caused too many test failures.
677 Remove spurious semicolon after "else".
678 * build-aux/check.mk (am__tty_colors): Fix syntax error.
680 If $TERM is empty, don't use colors. This helps the buildbot,
681 since it produces its result in an environment with a tty, but
682 we don't want color codes in that case.
683 * build-aux/check.mk (am__tty_colors): Test for nonempty $TERM.
684 Suggestion from Bob Proulx.
686 Always initialize terminal colorization string variables.
687 * build-aux/check.mk (am__tty_colors): Always initialize red, grn, etc.,
688 In case they're defined in the environment.
690 Avoid test failure in non-srcdir build vs. the git tree.
691 * tests/check.mk (vc_exe_in_TESTS): Run this test only in a
692 srcdir build directory. Reported by Andreas Schwab.
694 2007-10-28 Jim Meyering <meyering@redhat.com>
696 Define ENOTSUP, not ENOSYS. Needed on OpenBSD 3.9.
697 * gl/lib/se-context.in.h (ENOTSUP): Define if missing.
698 * gl/lib/se-selinux.in.h: Likewise.
700 Define ENODATA, for FreeBSD 5.0 and 6.1.
701 * src/system.h (ENODATA): Define, if missing.
703 Run autoreconf, not just autoconf, to avoid warnings.
704 * GNUmakefile (dummy): Otherwise, we'd sometimes get a warning
705 about autoconf version mismatch between what was used to generate
706 aclocal.m4 and the currently-running autoconf.
708 Require gnulib's printf-posix module, to support Interix.
709 * bootstrap.conf (gnulib_modules): Add printf-posix.
711 Help xgettext recognize more printf-style format strings.
712 * bootstrap.conf (XGETTEXT_OPTIONS): Add directives for
713 error, error_at_line, xasprintf, xfprintf and xprintf.
715 2007-10-27 Jim Meyering <meyering@redhat.com>
717 Adjust format string so msgfmt doesn't object.
718 * src/df.c (main): Use "%s%s" (not %smsg) to print "msg" with or
719 without a "Warning: " prefix. Reported by Clytie Siddall.
721 Clean up tests/Makefile.am.
722 * tests/Makefile.am (EXTRA_DIST): Remove $(TESTS). No longer defined.
723 (TESTS_ENVIRONMENT): Remove definition.
725 2007-10-26 Jim Meyering <meyering@redhat.com>
727 * build-aux/check.mk: Merge with latest from Akim.
729 Add a test for the printf fix of 2007-10-21.
730 * tests/misc/printf-surprise: New file. Test for 2007-10-21's fix.
731 * tests/misc/Makefile.am (TESTS): Add printf-surprise.
733 2007-10-24 Micah Cowan <micah@cowan.name>
735 Remove vestiges of cvs-gnulib-checkout process. Now we use git.
736 * bootstrap: Remove support for now-unnecessary option, --cvs-user,
737 and envvars CVS_USER, CVS_RSH.
739 2007-10-24 Micah Cowan <micah@cowan.name>
741 Tell xgettext that "ARG1 % ARG2" is not a C format string.
742 * src/expr.c (usage): Add a comment to override xgettext's default
743 behavior, which would classify "ARG1 % ARG2" as a fprintf-style
744 format string. Reported by Clytie Siddall.
746 2007-10-24 Jim Meyering <meyering@redhat.com>
748 Avoid diagnostics from sha1sum when there is no cached checksum.
749 * bootstrap (update_po_files): Skip the sha1sum check if the po.s1
750 file hasn't been created yet.
752 Get gnulib from the git repository, not from an obsolete cvs one.
753 * bootstrap: Suggestion from Micah Cowan.
756 * README-hacking: Prefer the no-hyphen variant of git commands,
757 e.g., use "git pull" not "git-pull".
758 Don't presume that the only way to read this document is via a
759 prior git clone: provide instructions for cloning coreutils, too.
761 * README-hacking: Add "cd automake" in build instructions.
764 Don't fail part 2 of tests/rm/unreadable when run as root.
765 * tests/rm/unreadable: With UID == 0, expect different results.
766 Reported by Mike Frysinger.
768 2007-10-23 Jim Meyering <meyering@redhat.com>
770 * README-hacking: Refer to LZMA Utils <http://tukaani.org/lzma/>.
772 2007-10-22 Paul Eggert <eggert@cs.ucla.edu>
774 * README-hacking: Describe how to build with LZMA.
776 2007-10-22 Jim Meyering <meyering@redhat.com>
778 Remove git-version-gen's first parameter.
779 * build-aux/git-version-gen: Add comments.
780 Remove first command-line parameter.
781 * configure.ac: Remove corresponding first argument.
782 * GNUmakefile (_curr-ver): Likewise.
784 2007-10-21 Jim Meyering <meyering@redhat.com>
786 * NEWS: Mention the printf fix.
788 Reorder tests to run more basic ones earlier.
789 * tests/misc/Makefile.am (TESTS): Reorder.
790 * tests/Makefile.am (SUBDIRS): Reorder.
792 tr: do not reject an unmatched [:lower:] or [:upper:] in SET1.
793 * NEWS: Mention this.
794 * src/tr.c (get_next) [RE_CHAR_CLASS]: Don't skip the loop when
795 processing [:lower:] and [:upper:].
796 (main): Require [:lower:] or [:upper:] in SET1 only when
797 when one of those is specified in SET2.
798 * tests/tr/Test.pm: Add tests for this fix.
799 Reported by Per Starbäck.
801 2007-10-20 Jim Meyering <meyering@redhat.com>
803 * tests/misc/help-version: Add a comment.
805 Detect printf(3) failure due to ENOMEM.
806 * src/printf.c: Include "xprintf.h"
807 (print_direc): Use xprintf, rather than printf.
808 * bootstrap.conf (gnulib_modules): Add xprintf.
809 * po/POTFILES.in: Add lib/xprintf.c.
810 Reported by Bruno Haible.
812 Put always-failing programs first in PATH, so tests cannot mistakenly
813 run installed versions.
814 * Makefile.maint (my-distcheck): Set up a bogus bin/ dir, to be used
817 * doc/coreutils.texi (tee invocation): Fix typo. Add a little.
818 Add a cross-reference to bashref's Process Substitution node.
820 Adjust tests to pass, now that Test.pm ones use check.mk.
821 * tests/check.mk (vc_exe_in_TESTS): Adjust regexp not to match the
822 "TESTS = $x-tests" line in each Test.pm-derived Makefile.am file.
823 * tests/sort/main: Remove this unused file.
825 Ensure that Test.pm-derived tests use the right $PATH.
826 * tests/Makefile.am.in: Include $(top_srcdir)/tests/check.mk.
828 2007-10-20 Bob Proulx <bob@proulx.com>
830 Prevent "make check" from leaving mktemp /tmp/tmp.* files behind.
831 * tests/misc/help-version (mktemp_args): Tell mktemp to create
832 its temporary file in the current directory.
834 2007-10-16 Jim Meyering <meyering@redhat.com>
836 Show how to make tee redirect to multiple processes.
837 * doc/coreutils.texi (tee invocation): Tee can redirect output
838 to multiple _processes_, too.
840 2007-10-14 Jim Meyering <meyering@redhat.com>
842 Pull all TESTS_ENVIRONMENT settings "up" into tests/check.mk.
843 * tests/Makefile.am.in (TESTS_ENVIRONMENT): Remove definition.
844 * tests/chgrp/Makefile.am: Likewise.
845 * tests/chmod/Makefile.am: Likewise.
846 * tests/chown/Makefile.am: Likewise.
847 * tests/cp/Makefile.am: Likewise.
848 * tests/dd/Makefile.am: Likewise.
849 * tests/du/Makefile.am: Likewise.
850 * tests/install/Makefile.am: Likewise.
851 * tests/ln/Makefile.am: Likewise.
852 * tests/ls/Makefile.am: Likewise.
853 * tests/misc/Makefile.am: Likewise.
854 * tests/mkdir/Makefile.am: Likewise.
855 * tests/mv/Makefile.am: Likewise.
856 * tests/readlink/Makefile.am: Likewise.
857 * tests/rm/Makefile.am: Likewise.
858 * tests/rmdir/Makefile.am: Likewise.
859 * tests/tail-2/Makefile.am: Likewise.
860 * tests/touch/Makefile.am: Likewise.
861 * tests/check.mk (TESTS_ENVIRONMENT) [EXEEXT, EGREP, MAKE, PERL]:
862 [CONFIG_HEADER, build_programs, host_os, host_triplet, PATH]:
863 [REPLACE_GETCWD, CU_TEST_NAME]: Add definitions here.
864 * tests/misc/pwd-long: Use $abs_top_builddir/src, not $BUILD_SRC_DIR.
865 * tests/dd/skip-seek: Don't use $ENV{PROG}.
866 * tests/rm/empty-name: Likewise.
867 * tests/rm/unreadable: Likewise.
868 * tests/mv/i-1: Likewise.
871 * configure.ac (AC_INIT): Fix a typo (s/9.6/6.9/) that makes a
872 difference only when running "make dist" without a .git/ subdir.
874 2007-10-09 Jim Meyering <meyering@redhat.com>
876 Move the help-version test into misc/.
877 * tests/help-version: Move to...
878 * tests/misc/help-version: ...here.
879 Source test-lib.sh, as usual.
880 Use $abs_top_builddir, rather than ".." and "../..".
882 Make the runcon-no-reorder test slightly more general.
883 * tests/misc/runcon-no-reorder: Don't hard-code "unconstrained_t".
884 Use slightly more general "runcon $(id -Z)".
885 Suggestion from Stephen Smalley.
887 Skip the chcon test on a system with no SELinux support.
888 * tests/test-lib.sh (require_selinux_): New function.
889 * tests/misc/chcon: Use it.
890 * tests/misc/selinux: Use it here, too.
891 * tests/cp/cp-a-selinux: and here.
892 * tests/selinux: Remove file.
893 * tests/Makefile.am (EXTRA_DIST): Remove selinux.
894 Reported by Mike Frysinger and Bauke Jan Douma.
896 * src/dircolors.hin: Recognize .lzma as a compressed-file suffix.
898 * configure.ac (AM_INIT_AUTOMAKE): Use dist-lzma, rather than dist-bzip2.
900 Now that we don't install su, don't make misleading suggestions.
901 * src/Makefile.am (install-exec-local) [$(INSTALL_SU) != yes]:
902 Don't suggest running "make install-root".
903 (uninstall-local) [$(INSTALL_SU) != yes]: Don't even check
904 the installed binary.
906 2007-10-08 Jim Meyering <meyering@redhat.com>
908 When forming a truncated name, use the "[...]" prefix even for
909 an extremely long name in the current directory
910 * src/remove.c (full_filename_): Rename a local variable.
911 Use two separate "truncated" variables, in case the second
912 call to right_justify does not indicate any truncation -- which
913 would happen only if the single component FILENAME were longer
914 than 511 bytes and DIR_NAME were empty.
916 rm could malfunction under unusual circumstances:
917 When operating on a relative name longer than 511 bytes,
918 and (when either processing a directory that is neither writable
919 nor readable (but still searchable) or when determining whether
920 to prompt), and encountering an ENOMEM error while forming the
921 file name, rm would operate on a truncated-to-511-byte name
922 starting with "[...]" rather than the intended one.
923 * NEWS: Describe the bugs.
924 * src/remove.c: Correct two misuses of full_filename:
925 (full_filename0, xfull_filename): New functions.
926 (full_filename_): Rewrite to use full_filename0.
927 (AD_pop_and_chdir): Use xfull_filename, not full_filename.
928 (write_protected_non_symlink): Likewise.
930 2007-10-07 Jim Meyering <meyering@redhat.com>
932 Don't let a helper function modify errno.
933 * src/remove.c (full_filename_): Save and restore errno.
934 Spotted by Bruno Haible.
936 Reflect 2->3 GPL copyright version update in gnulib.
937 * gl/lib/tempname.h: Update copyright from gnulib.
938 * gl/lib/tempname.c: Likewise.
939 * .x-sc_GPL_version: Don't make an exception for those two files.
941 * configure.ac (AM_INIT_AUTOMAKE): Don't use dist-lzma just yet.
944 * NEWS: Mention this.
945 * README: Add mktemp to the list.
946 * AUTHORS: Add this: mktemp: Jim Meyering
947 * src/mktemp.c: New file.
948 * src/Makefile.am (bin_PROGRAMS): Add mktemp.
949 (mktemp_LDADD): Add $(LIB_GETHRXTIME).
950 * man/mktemp.x: New file.
951 * man/Makefile.am (dist_man_MANS): Add mktemp.1.
952 (mktemp.1): New dependency.
953 * man/.cvsignore: Add mktemp.1.
954 * man/.gitignore: New file.
955 * src/.cvsignore, src/.gitignore: Add mktemp.
956 * tests/misc/mktemp: New file.
957 * tests/misc/Makefile.am (TESTS): Add mktemp.
958 * tests/Coreutils.pm (run_tests): Give the POST-test function
959 access to stdout and stderr contents, so it can verify that
960 the named-on-stdout file/dir does indeed exist and has proper
963 * POTFILES.in: Add src/mktemp.c.
965 Make tempname more random, via the randint module.
966 * gl/modules/tempname (Depends-on): Add randint and stdbool.
967 * gl/lib/tempname.c: Include randint.h and stdbool.h.
968 (uint64_t): Remove definition. Not needed.
969 [_LIBC] (RANDOM_BITS): Remove this block, now that we have proper
971 (check_x_suffix): New function.
972 (gen_tempname_len): Rename from __gen_tempname.
973 Add a parameter, x_suffix_len, telling how many X's there must be at
974 the end of the template.
975 Use pseudo-random numbers all the way, rather than adding 7777
976 from one iteration to the next.
977 (__gen_tempname): New function, to call gen_tempname_len, requiring a
979 * gl/lib/tempname.h: Add prototype for gen_tempname_len.
981 Convert coreutils' rand*.{c,h,m4} into modules.
982 First step: move these files to gl/lib:
983 * lib/rand-isaac.c, lib/rand-isaac.h
984 * lib/randint.c, lib/randint.h
985 * lib/randperm.c, lib/randperm.h
986 * lib/randread.c, lib/randread.h
987 Step 2: add modules/rand* and remove now-unneeded .m4 files.
988 * gl/modules/randint: New file.
989 * gl/modules/randperm: New file.
990 * gl/modules/randread: New file.
991 * m4/randint.m4: Remove file.
992 * m4/randperm.m4: Remove file.
993 * m4/randread.m4: Remove file.
994 Step 3: use the new modules
995 * bootstrap.conf (gnulib_modules): Add randint and randperm.
996 * m4/prereq.m4 (gl_RANDINT, gl_RANDREAD, gl_RANDPERM): Don't require;
997 These have been removed.
998 (gl_ROOT_DEV_INO): Don't require; already handled via bootstrap.conf.
1000 Copy from gnulib the parts of tempname that we'll modify.
1001 * gl/lib/tempname.c: Copy from gnulib.
1002 * gl/lib/tempname.h: Likewise.
1003 * gl/modules/tempname: Likewise.
1004 Allow GPLv2 on temporarily(?)-imported file from gnulib/libc.
1005 * .x-sc_GPL_version: New file.
1006 * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version
1008 2007-10-07 Jim Meyering <meyering@redhat.com>
1010 Avoid a pseudo-leak in sort.
1011 * src/sort.c (main) [lint]: Avoid a nominal leak.
1013 Use puts, rather than printf ("%s\n". Slightly cleaner.
1014 * src/tsort.c (tsort): ...and more efficient.
1016 Avoid seq malfunction on non-POSIX systems: mingw, BeOS, Interix.
1017 * bootstrap.conf (gnulib_modules): Add vasprintf-posix.
1018 Suggestion from Bruno Haible.
1020 Avoid a used-uninitialized error.
1021 * src/copy.c (copy_internal): Don't overload "use_stat".
1023 2007-10-05 Jim Meyering <meyering@redhat.com>
1025 Make a failing cross-partition mv give a sensible diagnostic.
1026 A cross-partition move of a file in a sticky tmpdir and owned by
1027 another user would evoke an invalid diagnostic after copying it:
1028 mv: cannot remove `x': Operation not permitted
1029 Either of the following (mv.c, remove.c) changes would fix the bug by
1030 itself. I think it's slightly better to use both; the added cost is
1031 minimal: mv: an extra lstat-per-mv-cmdline-arg-that-goes-cross-partition,
1032 rm: an extra lstat-per-unlink-that-fails-w/EPERM.
1033 * src/remove.c (remove_entry): Also lstat the file upon EPERM.
1034 * src/mv.c (rm_option_init): Initialize root_dev_ino just as is done
1035 in rm, so that a cross-partition invoked remove.c:rm call works the
1036 same way as one invoked from the command-line use of "rm". That
1037 setting of root_dev_ino makes rm() do the equivalent of an additional
1038 lstat for each argument, which in turn gives rm enough information to
1039 issue the right diagnostic.
1040 * tests/mv/sticky-to-xpart (version): New file. Test for the above.
1041 * tests/mv/Makefile.am (TESTS): Add sticky-to-xpart.
1042 Arrange for "make check-root" to run the new root-only test.
1043 * tests/Makefile.am (tb): New target, to run the new root-only test.
1045 * src/c99-to-c89.diff: Adjust offsets.
1047 Add PACKAGE_VERSION to TESTS_ENVIRONMENT via check.mk.
1048 * tests/check.mk (TESTS_ENVIRONMENT): Add PACKAGE_VERSION here,
1049 rather than in every Makefile.am that needs it.
1050 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Remove PACKAGE_VERSION.
1051 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
1053 2007-10-04 Jim Meyering <jim@meyering.net>
1055 Adapt to new gnulib naming scheme.
1056 * gl/lib/se-context.in.h: Rename from gl/lib/se-context_.h.
1057 * gl/lib/se-selinux.in.h: Rename from gl/lib/se-selinux_.h.
1058 * gl/m4/selinux-context-h.m4: Remove use of AC_LIBSOURCES.
1059 * gl/m4/selinux-selinux-h.m4: Likewise.
1060 * gl/modules/selinux-h (Files, Makefile.am): Reflect renaming.
1061 (Makefile.am) [lib_SOURCES]: Add se-context.in.h and se-selinux.in.h.
1063 * lib/search_.h: Remove unused file.
1065 * bootstrap (slurp): Adapt to _.h -> .in.h name change.
1066 (update_po_files): Work also when there are no .po files in po/.
1068 Remove test program: lib/t-fpending.c.
1069 * lib/t-fpending.c: Remove file. Now, this test is in gnulib.
1070 * lib/Makefile.am: Remove associated rules.
1071 * .gitignore: Remove lib/t-fpending.
1073 2007-10-03 Jim Meyering <jim@meyering.net>
1075 * tests/misc/selinux: Skip this test if the initial chcon fails.
1077 2007-10-02 Jim Meyering <jim@meyering.net>
1079 Never copy through a symlink that cp has just created.
1080 * src/copy.c (copy_internal): When same-file detection requires
1081 'stat'ing the destination file, also 'lstat' it and ensure that
1082 it wasn't the destination of a preceding copy operation.
1083 This bug was introduced on 2007-06-18.
1084 * tests/cp/abuse: New test for the above.
1085 * tests/cp/Makefile.am (TESTS): Add abuse.
1087 2007-09-30 Jim Meyering <jim@meyering.net>
1089 cp: do not abbreviate in --help output.
1090 * src/cp.c (usage): Don't abbreviate: s/=link/=links/.
1091 Reported by Géraud Meyer in <http://bugs.debian.org/444137>.
1093 2007-09-29 Eric Blake <ebb9@byu.net>
1095 Test previous patch.
1096 * tests/misc/groups-dash: New test.
1097 * tests/misc/Makefile.am (TESTS): Add it.
1099 2007-09-28 Eric Blake <ebb9@byu.net>
1101 * src/groups.sh: Don't ignore first argument if later argument is --.
1103 2007-09-27 Jim Meyering <jim@meyering.net>
1105 Avoid spurious test failure when SELinux stats "selinux/class".
1106 * tests/ls/stat-free-symlinks: Grep for more precise /^stat("x"/.
1108 Move file-set and hash-triple modules to gnulib.
1109 * bootstrap.conf (gnulib_modules): Remove file-set, now that
1110 it's in gnulib, and the canonicalize module requires it there.
1111 * gl/lib/file-set.c, gl/lib/file-set.h, gl/modules/hash-triple: Remove.
1112 * gl/lib/hash-triple.c, gl/lib/hash-triple.h, gl/modules/file-set:
1115 Add a test to exercise a readlink bug.
1116 * tests/misc/readlink-fp-loop: New file. Test for the readlink bug
1117 fixed through today's change to Gnulib's canonicalize module.
1118 * tests/misc/Makefile.am (TESTS): Add readlink-fp-loop.
1119 Bug report and a test case from mpb.mail@gmail.com.
1121 2007-09-25 Pádraig Brady <P@draigBrady.com>
1123 * doc/coreutils.texi (date invocation):
1124 Make "Date input formats" easier to navigate to.
1126 2007-09-25 Jim Meyering <jim@meyering.net>
1128 Use XOR, not OR to combine bits.
1129 * gl/lib/hash-triple.c (triple_hash): Use XOR (^), not OR (|), to
1130 combine the bits from hashing the name and those of the inode number.
1131 Add a few comments and remove out-of-context ones.
1133 2007-09-24 Jim Meyering <jim@meyering.net>
1135 * NEWS: The recent rm-diagnostic fix also affects cross-partition "mv".
1137 copy.c: Remove definitions of factored-out functions.
1138 * src/copy.c: Include "file-set.h".
1139 (seen_file, record_file): Remove functions that I factored
1142 2007-09-22 Jim Meyering <jim@meyering.net>
1144 Don't print the commands of a 10-line script that's run in each subdir.
1145 * tests/check.mk (vc_exe_in_TESTS): Add a leading "@", to reduce noise.
1147 rm: give a sensible diagnostic when failing to remove a symlink
1148 On some systems (those with openat et al), when rm would fail to
1149 remove a symlink, it would fail with the misleading diagnostic,
1150 "Too many levels of symbolic links".
1151 * NEWS: Mention the bug fix.
1152 * src/remove.c (is_nondir_lstat): New function.
1153 (remove_entry): Use it to catch failed-to-remove symlink (and any
1154 other non-dir) here so that we don't fall through and try to treat
1155 it as directory, which -- with a symlink -- would provoke the bogus
1157 * tests/rm/fail-eacces: Add a test for the above.
1158 * src/c99-to-c89.diff: Adjust offsets.
1160 rm: fix a tiny, nearly inconsequential bug.
1161 Don't perform a "."-relative lstat, when the file in question
1162 may well not be in ".". Although this is a bug, a few attempts
1163 to exercise it on a linux-2.6.22 system failed. You probably need
1164 a pre-openat system to trigger the failure. The consequence of this
1165 bug would be a lower-quality diagnostic upon failed dir removal.
1166 * src/remove.c (is_dir_lstat): Add a parameter, fd_cwd.
1167 Use it instead of hard-coding AT_FDCWD.
1168 (remove_entry): Call is_dir_lstat with fd_cwd.
1170 2007-09-22 Karl Berry <karl@freefriends.org>
1172 * TODO: It'd be nice to add renice.
1174 2007-09-21 Jim Meyering <jim@meyering.net>
1176 Avoid test failure due to now-parallelized tests.
1177 * tests/du/two-args: Run "du .." from a sub-directory one level deeper.
1179 2007-09-16 Jim Meyering <jim@meyering.net>
1181 * tests/misc/tac-continue: Arrange to remove a temporary file.
1183 * tests/check.mk (vc_exe_in_TESTS): Don't rely on the value of
1184 $(TESTS), so that "make check TESTS=test-name" works once again.
1186 * tests/CuTmpdir.pm: Use File::Find + chmod syscall, not chmod -R.
1188 Revamp most test scripts.
1190 * tests/rm/v-slash: Avoid test failure with non-C locale.
1191 Reported by Michael Stone.
1193 Enable some previously omitted test scripts. Add a test cross-check.
1194 * tests/rm/Makefile.am (TESTS): Add empty-name and unreadable.
1195 * tests/rm/empty-name: Likewise.
1196 * tests/rm/unreadable: Reenable this test. Adjust for new rm.
1197 * tests/mkdir/Makefile.am: Add writable-under-readonly.
1198 * tests/mkdir/writable-under-readonly: Add some comments.
1199 This test is always skipped, for now.
1200 * tests/Makefile.am (ta): Hook up the new root-only script.
1201 * tests/tail-2/infloop-1: Make this test pass.
1202 * tests/tail-2/Makefile.am (TESTS): Add infloop-1.
1203 * tests/tail-2/fflush: Remove unused file.
1204 * tests/check.mk (vc_executable_is_in_TESTS): More portable.
1205 * tests/check.mk (check): Depend on the above.
1206 * build-aux/check.mk: Remove comment mentioning AUTHORS file.
1208 Factor out definitions in TESTS_ENVIRONMENT of srcdir, top_srcdir, etc.
1209 tests/check.mk (top_srcdir): Define.
1210 tests/*/Makefile.am: Remove definitions of $(srcdir), $(top_srcdir),
1211 $(abs_top_srcdir), and $(abs_top_builddir), since they're
1212 defined via the included tests/check.mk.
1214 tests/general: Remove from VC, this long-unused directory and contents.
1216 Adapt tests/tail-2/ to use test-lib.sh.
1217 Adapt tests/readlink/ to use test-lib.sh.
1219 Move the sole test in tests/ls-2/ to tests/misc/.
1220 * tests/ls-2/basic-1: Move this file to ...
1221 * tests/misc/ls-misc: ...here. Don't rely on $PROG in env.
1222 * tests/misc/Makefile.am (TESTS): Add ls-misc.
1223 * tests/Makefile.am (SUBDIRS): Remove ls-2.
1224 * tests/ls-2: Remove the directory.
1225 * configure.ac (AC_CONFIG_FILES): Remove tests/ls-2/Makefile.
1227 More misc, test-related changes. (some to allow running tests as root)
1229 Move all tests from test/{od,sha1sum,shred,stty} to tests/misc/.
1230 Reflect these renamings:
1233 sha1sum/basic-1 misc/sha1sum
1234 sha1sum/sample-vec misc/sha1sum-vec
1235 shred/exact misc/shred-exact
1236 shred/remove misc/shred-remove
1237 stty/basic-1 misc/stty
1238 stty/invalid misc/stty-invalid
1239 stty/row-col-1 misc/stty-row-col
1240 * tests/misc/Makefile.am (TESTS): Add the new files.
1241 * tests/Makefile.am (SUBDIRS): Remove the dir names.
1242 * tests/od, tests/sha1sum, tests/shred, tests/stty: Remove the
1244 * configure.ac (AC_CONFIG_FILES): Remove the corresponding Makefile
1247 Move the two tests in tests/tee to tests/misc/.
1248 * tests/tee/basic: Move this file to ...
1249 * tests/misc/tee: ...here. Don't rely on $PROG in env.
1250 * tests/tee/dash: Move this file to ...
1251 * tests/misc/tee-dash: ...here. Don't rely on $PROG in env.
1252 * tests/misc/Makefile.am (TESTS): Add tee.
1253 * tests/Makefile.am (SUBDIRS): Remove tee.
1254 * tests/tee: Remove the directory.
1255 * configure.ac (AC_CONFIG_FILES): Remove tests/tee/Makefile
1257 Move the two tests in tests/sum/ to tests/misc/.
1258 * tests/sum/basic-1: Move this file to ...
1259 * tests/misc/sum: ...here. Don't rely on $PROG in env.
1260 * tests/sum/sysv: Move this file to ...
1261 * tests/misc/sum-sysv: ...here. Adapt it to use test-lib.sh.
1262 * tests/misc/Makefile.am (TESTS): Add sum and sum-sysv.
1263 * tests/Makefile.am (SUBDIRS): Remove sum.
1264 * tests/sum: Remove the directory.
1265 * configure.ac (AC_CONFIG_FILES): Remove tests/sum/Makefile.
1267 Move the sole test in tests/tsort/ to tests/misc/tsort.
1268 * tests/tsort/basic-1: Move this file to ...
1269 * tests/misc/tsort: ...here. Don't rely on $PROG in env.
1270 * tests/misc/Makefile.am (TESTS): Add tsort.
1271 * tests/Makefile.am (SUBDIRS): Remove tsort.
1272 * tests/tsort: Remove the directory.
1273 * configure.ac (AC_CONFIG_FILES): Remove tests/tsort/Makefile.
1275 Move the sole test in tests/unexpand to tests/misc/unexpand.
1276 * tests/unexpand/basic-1: Move this file to ...
1277 * tests/misc/unexpand: ...here. Don't rely on $PROG in env.
1278 * tests/misc/Makefile.am (TESTS): Add unexpand.
1279 * tests/Makefile.am (SUBDIRS): Remove unexpand.
1280 * tests/unexpand: Remove the directory.
1281 * configure.ac (AC_CONFIG_FILES): Remove tests/unexpand/Makefile.
1283 Move the sole test in tests/seq to tests/misc/seq.
1284 * tests/seq/basic: Move this file to ...
1285 * tests/misc/seq: ...here. Don't rely on $PROG in env.
1286 * tests/misc/Makefile.am (TESTS): Add seq.
1287 * tests/Makefile.am (SUBDIRS): Remove seq.
1288 * tests/seq: Remove the directory.
1289 * configure.ac (AC_CONFIG_FILES): Remove tests/seq/Makefile
1291 Convert tests/mkdir/ to use test-lib.sh.
1293 Move the two tests in tests/md5sum to tests/misc/md5sum.
1294 * tests/md5sum/basic-1: Move this file to ...
1295 * tests/misc/md5sum: ...here. Don't rely on $PROG in env.
1296 * tests/md5sum/newline-1: Move this file to ...
1297 * tests/misc/md5sum-newline: ...here. Don't rely on $PROG in env.
1298 * tests/misc/Makefile.am (TESTS): Add md5sum.
1299 * tests/Makefile.am (SUBDIRS): Remove md5sum.
1300 * tests/md5sum: Remove the directory.
1301 * configure.ac (AC_CONFIG_FILES): Remove tests/md5sum/Makefile
1303 tests/sample-test: Update to use test-lib.sh.
1305 Convert tests/misc/ to use test-lib.sh, too.
1306 Convert tests/ls/, too.
1307 Convert tests/ln/, too.
1308 Convert tests/install/, too.
1310 Move the two tests in tests/fmt to tests/misc/fmt.
1311 * tests/fmt/basic: Move this file to ...
1312 * tests/misc/fmt: ...here. Don't rely on $PROG in env.
1313 * tests/fmt/long-line: Move this file to ...
1314 * tests/misc/fmt-long-line: ...here.
1315 * tests/misc/Makefile.am (TESTS): Add fmt.
1316 * tests/Makefile.am (SUBDIRS): Remove fmt.
1317 * tests/fmt: Remove the directory.
1318 * configure.ac (AC_CONFIG_FILES): Remove tests/fmt/Makefile
1320 Move the sole test in tests/factor to tests/misc/factor.
1321 * tests/factor/basic: Move this file to ...
1322 * tests/misc/factor: ...here. Don't rely on $PROG in env.
1323 * tests/misc/Makefile.am (TESTS): Add factor.
1324 * tests/Makefile.am (SUBDIRS): Remove factor.
1325 * tests/factor: Remove the directory.
1326 * configure.ac (AC_CONFIG_FILES): Remove tests/factor/Makefile
1328 Move the sole test in tests/expr to tests/misc/expr.
1329 * tests/expr/basic: Move this file to ...
1330 * tests/misc/expr: ...here. Don't rely on $PROG in env.
1331 * tests/misc/Makefile.am (TESTS): Add expr.
1332 * tests/Makefile.am (SUBDIRS): Remove expr.
1333 * tests/expr: Remove the directory.
1334 * configure.ac (AC_CONFIG_FILES): Remove tests/expr/Makefile
1336 Convert tests/du/*, too.
1338 Move the sole test in tests/dircolors to tests/misc/dircolors.
1339 * tests/dircolors/simple: Move this file to...
1340 * tests/misc/dircolors: ...here. Don't rely on $PROG in env.
1341 * tests/misc/Makefile.am (TESTS): Add dircolors.
1342 * tests/Makefile.am (SUBDIRS): Remove dircolors.
1343 * tests/dircolors: Remove the directory.
1344 * configure.ac (AC_CONFIG_FILES): Remove tests/dircolors/Makefile
1346 Convert tests/dd/*, too.
1348 Convert tests/mv, too.
1349 * tests/other-fs-tmpdir: Before, all callers would exit 77 upon
1350 failure to find the required dir. Now, exit 77 in this script so
1351 callers don't have to. Adjust callers.
1353 Adjust chgrp, chmod, chown, cp tests to use test-lib.sh.
1354 * tests/check.mk: Also define abs_top_builddir.
1356 Parallel "make check" support.
1357 * build-aux/check.mk: New file, from The Vaucanson Group.
1358 * .x-sc_GPL_version: New file, to allow "version 2 or later"
1359 in build-aux/check.mk.
1360 * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
1361 * tests/check.mk: New file.
1362 * tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.
1364 Begin factoring "sample-test" out of test scripts.
1365 * tests/test-lib.sh: New file, to be sourced by all tests that
1366 were previously derived from the "sample-test" template.
1367 * tests/mkdtemp: New file.
1368 * tests/touch/dir-1: Use test-lib.sh.
1369 * tests/touch/empty-file: Likewise.
1370 * tests/touch/fail-diag: Likewise.
1371 * tests/touch/fifo: Likewise.
1372 * tests/touch/no-create-missing: Likewise.
1373 * tests/touch/no-rights: Likewise. Also, don't sleep.
1374 * tests/touch/not-owner: Likewise.
1375 * tests/touch/obsolescent: Likewise.
1376 * tests/touch/read-only: Likewise.
1377 * tests/touch/relative: Likewise.
1378 * tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
1379 to get the parallel-"make check" bits.
1381 Move a slow test into tests/misc.
1382 * tests/check.mk: Wrapper.
1383 * tests/ls/time-1: Move this file to tests/misc/ls-time.
1384 * tests/misc/ls-time: New file. From tests/ls/time-1.
1385 * tests/ls/Makefile.am (TESTS): Remove time-1.
1386 * tests/misc/Makefile.am (TESTS): Add ls-time.
1388 Add support for parallel "make check" (in tests/misc, for now)
1390 2007-09-08 Jim Meyering <jim@meyering.net>
1392 Accommodate gnulib's renaming: __fpending.h -> fpending.h.
1393 * lib/t-fpending.c: Include "fpending.h", not "__fpending.h".
1395 2007-09-07 Jim Meyering <jim@meyering.net>
1397 chmod: don't ignore a dangling symlink
1398 * NEWS: Mention the bug fix.
1399 * src/chmod.c (process_file): Handle the case of FTS_SLNONE,
1400 i.e., give a diagnostic saying we cannot operate on such a file.
1401 * tests/chmod/thru-dangling: Compare new stderr output with expected.
1403 2007-09-07 Bob Proulx <bob@proulx.com>
1405 Add a test: demonstrate that chmod ignores a dangling symlink
1406 * tests/chmod/thru-dangling: New test. Fails.
1407 * tests/chmod/Makefile.am (TESTS): Add thru-dangling.
1409 2007-09-05 Jim Meyering <jim@meyering.net>
1411 Adapt to new SELinux behavior: "?" vs. new "unlabeled"
1412 * src/ls.c (gobble_file): Interpret the new "unlabeled" indicator
1413 from getfilecon/lgetfilecon the same way we interpret a negative
1414 return value: no security context. So we don't print the "+".
1415 * tests/selinux: Recognize that "unlabeled" means insufficient
1416 support for SELinux, just like "?".
1418 2007-09-03 Jim Meyering <jim@meyering.net>
1420 Invoke $(AUTOCONF) manually, if needed to get an updated version string.
1421 * GNUmakefile: Don't actually touch configure.ac.
1422 That would make git-version-gen always print "...-dirty".
1424 Don't change '-'s to '.'s in the string from git-describe.
1425 * build-aux/git-version-gen: Leave '-'s in the string from git-describe.
1426 Otherwise, s/-/./g would make it too hard to distinguish the base
1427 version number from the appended .DD suffixes.
1429 2007-09-03 Jim Meyering <jim@meyering.net>
1431 * README-hacking: Require rsync, rather than wget.
1433 2007-09-02 Jim Meyering <jim@meyering.net>
1435 * bootstrap (WGET_COMMAND): Remove code to set this variable.
1437 Ensure that $(VERSION) is up to date for dist-related targets.
1438 * GNUmakefile: Arrange to rerun autoconf, if the version reported by
1439 git-version-gen doesn't match $(VERSION), but only for dist targets.
1441 bootstrap: uses rsync to download the .po files
1442 * bootstrap (po_download_command_format): New global.
1443 (download_po_files): Use rsync.
1444 (update_po_files): Don't remove .po files after download,
1445 so future rsync runs can take advantage of the copies.
1447 2007-09-01 Jim Meyering <jim@meyering.net>
1449 * bootstrap (gnulib_tool): Make sha1sum check quietly.
1451 Ensure that snapshot version changes make it to groups, too.
1452 * src/Makefile.am (groups): Depend on Makefile.
1454 Make groups-version executable,
1455 * tests/misc/groups-version: ... as it was in the patch.
1457 2007-08-31 Eric Blake <ebb9@byu.net>
1459 Test yesterday's change to groups.
1460 * tests/misc/groups-version: New test.
1461 * tests/misc/Makefile.am (TESTS): Add groups-version.
1463 2007-08-31 Jim Meyering <jim@meyering.net>
1465 Solve the unnecessary-.po-file-regeneration problem once and for all.
1466 * bootstrap (download_po_files): New function, renamed from
1467 get_translations. Now, downloads, but doesn't update LINGUAS.
1468 (update_po_files): New function.
1470 2007-08-30 Jim Meyering <jim@meyering.net>
1472 Shorten the snapshot version string by removing the "g".
1473 * build-aux/git-version-gen: Remove git-describe's "g" that would
1474 always precede the abbreviated SHA1. Suggestion from Dmitry V. Levin.
1476 Perform the s,rm,/bin/rm, fix-up properly. No more kludge.
1477 * Makefile.am (EXTRA_DIST): Remove .kludge-stamp.
1478 (.kludge-stamp): Remove rule. Instead, ...
1479 (dist-hook): Do the job here, operating on the file in $(distdir).
1480 (rm_subst): Adjust regexp to match "rm -f rm$(EXEEXT)", not "rm -f rm".
1481 (MAINTAINERCLEANFILES): s/+=/=/, now that this is the sole use.
1482 (dist-hook): Remove the legacy-from-cvs install-sh is-executable check.
1483 * .gitignore: Remove .kludge-stamp.
1485 Make inter-release --version output more useful.
1486 Now, each snapshot has a version "number" like 6.9-219-g58ddd,
1487 which indicates that it is built using the 219th change set
1488 (in _some_ repository) following the "v6.9" tag, and that 58ddd
1489 is a prefix of the commit SHA1.
1490 * build-aux/git-version-gen: New file.
1491 * configure.ac: Run it to set the version.
1492 * Makefile.am (dist-hook): Arrange so that .version appears only
1493 in distribution tarballs, never in a checked-out repository.
1494 * .gitignore: Add .version here, too. Just in case.
1496 2007-08-30 Eric Blake <ebb9@byu.net>
1498 * src/.gitignore: Ignore *.exe for platforms with non-empty $(EXEEXT).
1500 2007-08-30 Eric Blake <ebb9@byu.net>
1502 Use PACKAGE_NAME instead of GNU_PACKAGE.
1503 * src/Makefile.am (.sh, uninstall-local): Adjust all users of
1504 hand-rolled GNU_PACKAGE to instead use autoconf-provided
1506 * src/basename.c (main): Likewise.
1507 * src/chroot.c (main): Likewise.
1508 * src/dirname.c (main): Likewise.
1509 * src/echo.c (main): Likewise.
1510 * src/expr.c (main): Likewise.
1511 * src/factor.c (main): Likewise.
1512 * src/groups.sh (version): Likewise. Also, reflect change in
1513 --version output due to GPLv3.
1514 * src/hostid.c (main): Likewise.
1515 * src/hostname.c (main): Likewise.
1516 * src/link.c (main): Likewise.
1517 * src/logname.c (main): Likewise.
1518 * src/nice.c (main): Likewise.
1519 * src/nohup.c (main): Likewise.
1520 * src/printenv.c (main): Likewise.
1521 * src/printf.c (main): Likewise.
1522 * src/pwd.c (main): Likewise.
1523 * src/setuidgid.c (main): Likewise.
1524 * src/sleep.c (main): Likewise.
1525 * src/system.h (case_GETOPT_VERSION_CHAR): Likewise.
1526 * src/test.c (main): Likewise.
1527 * src/true.c (main): Likewise.
1528 * src/unlink.c (main): Likewise.
1529 * src/uptime.c (main): Likewise.
1530 * src/users.c (main): Likewise.
1531 * src/whoami.c (main): Likewise.
1532 * src/yes.c (main): Likewise.
1533 * configure.ac (AC_CHECK_DECLS): No need to check strtoimax,
1534 strtoumax, since gnulib does this.
1536 2007-08-30 Jim Meyering <jim@meyering.net>
1538 Ensure that TMPDIR is valid. Otherwise, it would cause test failures.
1539 * tests/misc/tty-eof: Set TMPDIR=.
1540 * tests/misc/sort-compress: Likewise.
1542 Use EXIT_FAILURE, not EXIT_FAIL, now that EXIT_FAILURE is always 1.
1543 * src/system.h (EXIT_FAIL): Remove definition.
1544 * src/chroot.c (main): EXIT_FAIL -> EXIT_FAILURE.
1545 * src/env.c (main): Likewise.
1546 * src/nice.c (main): Likewise.
1547 * src/su.c (change_identity, main): Likewise.
1548 * src/tty.c (main): Likewise.
1549 Suggestion from Eric Blake.
1551 2007-08-28 Jim Meyering <jim@meyering.net>
1553 * src/test.c (usage): Note that [ honors --help and --version,
1554 but that test does not. Suggestion from Dan Jacobson.
1556 By default, do not install hostname anymore; no kidding, this time.
1557 * src/Makefile.am (EXTRA_PROGRAMS): Remove hostname from this list,
1558 now that it's no longer being installed by default. This should
1559 have been part of the 2007-08-21 change.
1560 (check-duplicate-no-install): New rule to ensure this doesn't
1562 (check): Depend on it.
1564 Reflect renaming: mreadlink-with-size -> areadlink-with-size.
1565 * bootstrap.conf: Update module name.
1566 * src/copy.c (copy_internal): Update header and function names.
1567 * src/ls.c (get_link_name): Likewise.
1568 * src/readlink.c (main): Likewise.
1569 * src/stat.c (print_stat): Likewise.
1571 Add file system type names and magic numbers from "man 2 statfs".
1572 * src/stat.c (human_fstype): Also handle BEFS, BFS, BINFMT_MISC,
1573 FUSECTL, HUGETLBFS, NFSD and OPENPROM.
1575 2007-08-27 Jim Meyering <jim@meyering.net>
1577 Add some file system type names and magic numbers from glibc.
1578 * src/stat.c (human_fstype): Add any file system names and values
1579 present in glibc's linux_fsinfo.h but not in this list.
1580 Alphabetize the S_* names and capitalize the hexadecimal constants.
1582 2007-08-26 Jim Meyering <jim@meyering.net>
1584 * tests/misc/fold: Fix a typo: missing \ in a diagnostic
1585 no one is likely ever to see.
1587 2007-08-25 Jim Meyering <jim@meyering.net>
1589 * src/dircolors.hin: Add .dz and .svgz as archive suffixes.
1591 Remove all .cvsignore files from version control.
1593 2007-08-24 Jim Meyering <jim@meyering.net>
1595 bootstrap: Ignore more.
1596 * bootstrap (symlink_to_dir): Add a directory name like
1597 uniwidth to e.g., lib/.gitignore.
1598 (slurp): Handle the sys_stat_.h -> sys mapping, too.
1599 * .hgignore: Remove this file, too.
1600 * Makefile.am (EXTRA_DIST): Remove .gitignore and .hgignore.
1602 No longer version-control .???ignore files in lib/, m4/, and po/.
1603 * .gitignore: Ignore a few files in lib/, m4/, and po/ that are not
1604 picked up automatically.
1605 * lib/.gitignore, lib/.cvsignore: Remove files.
1606 * m4/.gitignore, m4/.cvsignore: Remove files.
1607 * po/.gitignore, po/.cvsignore: Remove files.
1609 bootstrap: when fetching .po files, do not remove .gmo files.
1610 * bootstrap (get_translations): Don't remove *.gmo files!
1611 They can be expensive to regenerate.
1613 Create .gitignore and/or .cvsignore from scratch, if absent.
1614 This is in preparation for my removing those files from version
1615 control in the directories managed by gnulib-tool.
1616 * bootstrap: New setting: vc_ignore.
1617 (insert_sorted_if_absent): Create $file if absent.
1618 Adapt to new, possibly empty, list: $vc_ignore.
1620 * src/system.h (fseeko, ftello): Remove now-unneeded definitions.
1621 * src/od.c (LDBL_DIG): Remove now-unneeded definition.
1623 Arrange to use tag names like vM.N, rather than COREUTILS-M_N.
1624 * Makefile.maint (this-vc-tag) [git]: Simply use v$(VERSION).
1625 (this-vc-tag-regexp): New variable.
1626 (vc-tag-check): Use it, rather than $(this-vc-tag).
1628 2007-08-23 Jim Meyering <jim@meyering.net>
1630 * src/dircolors.hin: Add xterm-16color, xterm-88color and eterm-color.
1631 Suggestion from Dan Nicolaescu.
1633 Don't let ln be a party to destroying user data.
1634 * src/ln.c: Include "file-set.h", "hash.h" and "hash-triple.h".
1635 (dest_set, DEST_INFO_INITIAL_CAPACITY): New globals.
1636 (do_link): Refuse to remove a just-created link.
1637 Record a name,dev,ino triple for each link we create.
1638 (main): Initialize dest_set, if needed.
1639 * tests/mv/childproof: Test for the above fix.
1640 * NEWS: Document this.
1641 Reported by Eric Blake.
1643 Move functions from copy.c into new modules, since ln needs them, too.
1644 * bootstrap.conf (gnulib_modules): Add file-set.
1645 * gl/lib/file-set.c (record_file, seen_file): Functions from copy.c.
1646 * gl/lib/file-set.h: Add prototypes.
1647 * gl/lib/hash-triple.c (triple_hash, triple_hash_no_name):
1648 (triple_compare, triple_free): Functions from copy.c.
1649 * gl/lib/hash-triple.h (struct F_triple): Define. From copy.c.
1651 * gl/modules/file-set: New module.
1652 * gl/modules/hash-triple: New module.
1653 * src/Makefile.am (copy_sources): New variable.
1654 (ginstall_SOURCES, cp_SOURCES, mv_SOURCES): Use it.
1655 * src/copy.c: Include hash-triple.h.
1656 No longer include hash-pjw.h.
1657 (copy_internal): Don't pass a NULL third argument to record_file,
1658 since that function no longer accepts that.
1659 (record_file): Move this function to file-set.c.
1660 Along the way, remove the code to allow a NULL stat-buffer pointer.
1662 (seen_file): Move this function to file-set.c.
1663 (struct F_triple): Move declaration to hash-triple.h.
1664 (triple_compare, triple_free, triple_hash, triple_hash_no_name):
1665 Move these functions to hash-triple.c.
1667 bootstrap: generate more ignorable names
1668 * bootstrap (slurp): When generating ignorable names, also map
1669 .sin to .sed, .gperf to .c, and .y to .c.
1671 * Makefile.maint (patch-check): Don't remove temporaries upon failure.
1673 2007-08-22 Jim Meyering <jim@meyering.net>
1675 * src/c99-to-c89.diff: Adjust offsets.
1677 Change "rm --verbose -r a//" not to print extra slashes in a///b
1678 * src/remove.c (push_dir): Don't copy trailing slashes onto the stack.
1679 Reported by François Pinard.
1680 * tests/rm/v-slash: New file. Test for the above change.
1681 * tests/rm/Makefile.am (TESTS): Add v-slash.
1683 * src/date.c: Don't include "getline.h", now removed from gnulib;
1684 its declarations are now in <stdio.h>.
1685 * src/md5sum.c: Likewise.
1686 * src/dircolors.c: Likewise.
1688 * src/copy.c (DEST_INFO_INITIAL_CAPACITY): Correct a comment.
1690 2007-08-21 Jim Meyering <jim@meyering.net>
1692 By default, do not install hostname anymore.
1693 * configure.ac: Add "hostname" to the list of not-installed programs.
1694 * src/Makefile.am (no_install__progs): Add "hostname" here, too.
1695 * NEWS: Mention this.
1697 2007-08-20 Bob Proulx <bob@proulx.com>
1699 Clarify touch documentation of file arguments.
1700 * src/touch.c (usage): Improve wording of documentation regarding
1701 file argument handling and special handling of - argument.
1702 * doc/coreutils.texi (touch invocation): Likewise.
1703 Documentation problem reported by Vincent Lefevre.
1705 2007-08-20 Paul Eggert <eggert@cs.ucla.edu>
1707 * NEWS: The old cp -p bug affected coreutils releases before 6.0.
1708 Problem reported by Soren Spies in
1709 <http://lists.gnu.org/archive/html/bug-coreutils/2007-08/msg00106.html>.
1710 To be conservative, just say the bug was in all versions through 6.6.
1712 2007-08-19 Eric Blake <ebb9@byu.net>
1714 Avoid consuming too much seekable input when yesno is used.
1715 * bootstrap.conf (gnulib_modules): Add closein.
1716 * src/system.h (includes): Also include closein.h.
1717 * src/mv.c (main): Use close_stdin, not close_stdout.
1718 * src/cp.c (main): Likewise.
1719 * src/ln.c (main): Likewise.
1720 * src/rm.c (main): Likewise.
1721 * src/install.c (main): Likewise.
1722 * NEWS: Document the fix.
1724 2007-08-20 Jim Meyering <jim@meyering.net>
1726 Parallel "make check" support.
1727 * build-aux/check.mk: New file, from The Vaucanson Group.
1728 * .x-sc_GPL_version: New file, to allow "version 2 or later"
1729 in build-aux/check.mk.
1730 * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
1731 * tests/check.mk: New file.
1732 * tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.
1734 Begin factoring "sample-test" out of test scripts.
1735 * tests/test-lib.sh: New file, to be sourced by all tests that
1736 were previously derived from the "sample-test" template.
1737 * tests/mkdtemp: New file.
1738 * tests/touch/dir-1: Use test-lib.sh.
1739 * tests/touch/empty-file: Likewise.
1740 * tests/touch/fail-diag: Likewise.
1741 * tests/touch/fifo: Likewise.
1742 * tests/touch/no-create-missing: Likewise.
1743 * tests/touch/no-rights: Likewise. Also, don't sleep.
1744 * tests/touch/not-owner: Likewise.
1745 * tests/touch/obsolescent: Likewise.
1746 * tests/touch/read-only: Likewise.
1747 * tests/touch/relative: Likewise.
1748 * tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
1749 to get the parallel-"make check" bits.
1751 2007-08-18 Jim Meyering <jim@meyering.net>
1753 Use new "idcache.h" header.
1754 * src/ls.c: Remove ancient declarations of getuser and getgroup.
1755 Include "idcache.h", instead.
1757 Run each Coreutils.pm-based test in its own subdirectory.
1758 * tests/CuTmpdir.pm: New file.
1759 * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm.
1760 * tests/misc/od, tests/misc/base64, tests/misc/basename:
1761 * tests/misc/cut, tests/misc/date, tests/misc/dirname:
1762 * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail:
1763 * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum:
1764 * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum:
1765 * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag:
1766 * tests/misc/wc-files0-from, tests/misc/xstrtol:
1767 * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from:
1768 * tests/expr/basic, tests/factor/basic, tests/fmt/basic:
1769 * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1:
1770 * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec:
1771 * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1:
1772 * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it.
1773 * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test",
1774 not "../../src/test", so it works when run from a subdirectory.
1775 * tests/ls-2/tests: Create temp files and dirs from within the perl
1776 script, so that they're removed, when run from a subdirectory.
1777 * tests/ls-2/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir,
1778 so we can use "$ENV{abs_top_builddir}/src/test" in a test script.
1780 2007-08-16 Jim Meyering <jim@meyering.net>
1782 Consolidate od tests.
1783 * tests/misc/od: Perform od-zero-len's test here.
1784 Include boilerplate code, so tests run in a subdirectory.
1785 * tests/misc/od-zero-len: Remove this file.
1787 * tests/ls/time-1: Include sample-test boilerplate code.
1788 Remove the then-unnecessary, hard-coded envvar "unset" commands.
1790 2007-08-15 Jim Meyering <jim@meyering.net>
1792 Move a slow test into tests/misc.
1793 * tests/ls/time-1: Move this file to tests/misc/ls-time.
1794 * tests/misc/ls-time: New file. From tests/ls/time-1.
1795 * tests/ls/Makefile.am (TESTS): Remove time-1.
1796 * tests/misc/Makefile.am (TESTS): Add ls-time.
1798 od --skip (-j) works even on files in /proc, when the kernel lies
1799 * src/od.c (skip): Don't let kernel misinformation (nonempty files
1800 in /proc with stat.st_size == 0) make "od -j N" misbehave.
1801 Patch by Paul Eggert.
1802 * NEWS: Document this work-around.
1803 * tests/misc/od-zero-len: New file, test for the above.
1805 * src/printf.c (usage): Adjust summary to also mention OPTIONs.
1808 2007-08-14 Jim Meyering <jim@meyering.net>
1810 od: fix a bug that arises when skipping exact length of file
1811 * NEWS: Document the bug fix.
1812 * src/od.c (skip): Call fseek even when n_skip is exactly the
1813 same as the length of the current file. Otherwise, the next
1814 iteration would use unadjusted input stream pointer, thus ignoring
1815 the desired "skip". Report and patch by Paul GHALEB.
1817 * tests/misc/od: New file, test for the above.
1818 * tests/misc/Makefile.am (TESTS): Add od.
1820 2007-08-10 Paul Eggert <eggert@cs.ucla.edu>
1822 Accommodate more xstrtol changes.
1823 * src/df.c (long_options): Don't bother prepending "--" to long
1824 options that OPT_STR might decode, as that hack is no longer needed.
1825 (main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR.
1826 * src/du.c (long_options, main): Likewise.
1827 * src/ls.c (decode_switches): Likewise.
1828 * src/od.c (long_options, main): Likewise.
1829 * src/pr.c (first_last_page, main): Likewise.
1830 * src/sort.c (long_options, specify_sort_size): Likewise.
1831 * src/pr.c (first_last_page): Accept option index and option char
1832 instead of an assembled option string. All callers changed.
1833 * src/sort.c (specify_sort_size): Likewise.
1834 * src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT):
1837 2007-08-05 Jim Meyering <jim@meyering.net>
1839 Encapsulate a static variable.
1840 * src/system.h (opt_str_storage): Move static var into...
1841 (short_opt_str): ... new static inline function.
1842 (OPT_STR): Use the new function.
1844 2007-08-04 Jim Meyering <jim@meyering.net>
1846 Exercise xstrtol's diagnostics via pr's --pages option.
1847 * tests/misc/xstrtol: New file.
1848 * tests/misc/Makefile.am (TESTS): Add xstrtol.
1850 2007-08-04 Paul Eggert <eggert@cs.ucla.edu>
1852 Adapt to new human and xstrtol API.
1853 * src/df.c (long_options): Prepend "--" to long options that
1854 OPT_STR might decode.
1855 * src/du.c (long_options): Likewise.
1856 * src/od.c (long_options): Likewise.
1857 * src/sort.c (long_options): Likewise.
1858 * src/df.c (main): Adjust to new human and xstrtol API.
1859 * src/du.c (main): Likewise.
1860 * src/ls.c (decode_switches): Likewise.
1861 * src/od.c (main): Likewise.
1862 * src/pr.c (first_last_page): Likewise. New argument OPTION.
1863 All callers changed.
1864 * src/sort.c (specify_sort_size): New arg OPTION. All callers
1865 changed. Adjust to new xstrtol API.
1866 * src/system.h (opt_str_storage): New static var.
1867 (OPT_STR, LONG_OPT_STR, OPT_STR_INIT): New macros.
1869 2007-08-02 Jim Meyering <jim@meyering.net>
1871 Adjust one more test to accommodate the recent fts change.
1872 This matters only on systems with insufficient openat support.
1873 * tests/du/inacc-dest: Adjust expected diagnostic.
1875 Adjust the other two "no-x" tests and unify all three.
1876 * tests/du/no-x: Factor out du-specific bits.
1877 * tests/chmod/no-x: Use the same code.
1878 * tests/chgrp/no-x: Use the same code.
1880 Adapt du's no-x test not to fail on older Linux systems.
1881 * tests/du/no-x: Accept a third variant of the diagnostic.
1883 2007-07-31 Jim Meyering <jim@meyering.net>
1885 du: print size (probably incomplete) of each inaccessible directory
1886 * src/du.c (process_file): Print what we know of the size of a
1887 directory even when it is inaccessible. What we print is just the
1888 size of the directory itself, not counting any of its contents.
1889 * tests/du/inacc-dir: Test for this.
1890 * NEWS: Mention this change.
1892 Add a test for du not counting size of inaccessible directories.
1893 * tests/du/inacc-dir: New file. Test for fts.c bug fixed yesterday.
1894 * tests/du/Makefile.am (TESTS): Add inacc-dir.
1895 * NEWS: Mention the bug fix.
1897 2007-07-28 Jim Meyering <jim@meyering.net>
1899 Attempt to copy a regular file, even if stat says it is empty.
1900 * NEWS: Document this bug fix.
1901 * src/copy.c (copy_reg): Read from a regular file, even if it
1902 appears (stat.st_size == 0) to be empty. This reverts an
1903 optimization introduced on 2005-11-23 for coreutils-6.0.
1904 Otherwise, "cp /proc/cpuinfo /tmp" creates an empty file,
1905 on e.g., linux-2.6.20.
1906 * tests/cp/proc-zero-len: New file. Test for the above.
1907 * tests/cp/Makefile.am (TESTS): Add proc-zero-len.
1908 Reported by Dan Berrangé.
1910 2007-07-26 Bob Proulx <bob@proulx.com>
1912 sort: Improve sort --random-sort test.
1913 * tests/misc/sort-rand: If "locale" is available pick a random
1914 non-C locale and check "sort --random-sort" behavior using it.
1916 2007-07-24 Jim Meyering <jim@meyering.net>
1918 sort: add a test to exercise the affected code.
1919 * tests/sort/Test.pm (realloc-buf): Exercise the code that changed
1920 yesterday. No other test in all of "make check" does this.
1921 * NEWS: Mention the fix.
1923 2007-07-23 Paul Eggert <eggert@cs.ucla.edu>
1925 sort: avoid unaligned access.
1926 * src/sort.c (fillbuf): When enlarging the line buffer, ensure that
1927 the new size is a multiple of "sizeof (struct line)". This avoids
1928 alignment problems when indexing from the end of the buffer.
1929 Problem reported by Andreas Schwab in
1930 <http://lists.gnu.org/archive/html/bug-coreutils/2007-07/msg00158.html>.
1932 2007-07-23 Jim Meyering <jim@meyering.net>
1934 Update all copyright notices to use the newer form (e.g., remove
1935 the postal address, and add the 'licenses' URL).
1937 * COPYING: Update to Version 3.
1939 Update c99/c89 patch for new, copyright-change-induced offsets.
1940 * Makefile.maint (patch-check): Filter out '^Only in...' lines.
1941 * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
1943 2007-07-22 Jim Meyering <jim@meyering.net>
1945 * configure.ac: Arrange to rerun configure whenever src/Makefile.am
1946 changes. That file contains the list of program names that must be
1947 substituted into files like man/Makefile.
1948 Add quotes around AC_SUBST arguments.
1950 2007-07-21 Paul Eggert <eggert@cs.ucla.edu>
1952 * bootstrap (slurp): Work even in environments where "ls" defaults
1953 to "ls -A". Put in a FIXME, though, since the current code does
1954 not slurp files whose names start with ".", and this looks like
1955 it might be a troublesome area.
1957 2007-07-20 Jim Meyering <jim@meyering.net>
1959 Document and add a test for today's sort bug fix.
1960 * NEWS: Describe the bug fix.
1961 * tests/sort/Test.pm (obs-inval): Add a test for today's fix.
1963 2007-07-20 Andreas Schwab <schwab@suse.de>
1965 * src/sort.c (main): Don't free a pointer to non-malloc'd memory.
1967 2007-07-19 Jim Meyering <jim@meyering.net>
1969 Fix a portability bug in the new ls-color test.
1970 * tests/ls/stat-free-symlinks: Don't rely on the ability of
1971 a built-in printf to interpolate '\e'. Use '\033' instead.
1973 2007-07-18 Jim Meyering <jim@meyering.net>
1975 "cp -i --update older newer" no longer prompts; same for mv
1976 * src/copy.c (copy_internal): Perform "update" check before the
1977 possible interactive prompt. Reported by zeno_AT_biyg_DOT_org
1978 in <http://bugzilla.redhat.com/248591>
1979 * tests/mv/update: Add tests for the above.
1980 * NEWS: Mention the bug fix.
1982 2007-07-15 Jim Meyering <jim@meyering.net>
1984 ls --color: Don't stat symlinks when neither ORPHAN nor MISSING
1985 attribute has a color.
1986 * src/ls.c (main): Don't set check_symlink_color when C_EXEC is
1987 colored, unless ln=target (aka color_symlink_as_referent) is set.
1988 (gobble_file): Set f->linkok = true also when !check_symlink_color.
1989 http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10608/focus=10927
1990 Reported by Jeremy Maitin-Shepard.
1991 * tests/strace: New file, contents extracted from...
1992 * tests/mv/atomic: ...here. Source strace.
1993 * tests/ls/stat-free-symlinks: New file. Test for the above.
1994 Use strace to ensure that in this corner case, ls does not call stat.
1995 * tests/ls/Makefile.am (TESTS): Add stat-free-symlinks.
1996 * tests/Makefile.am (EXTRA_DIST): Add strace.
1998 2007-07-14 Jim Meyering <jim@meyering.net>
2000 Remove long-deprecated options.
2001 * NEWS: Mention this.
2002 * src/df.c, src/ls.c: Remove --kilobytes option.
2003 * src/du.c: Remove --kilobytes and --megabytes options.
2004 * src/who.c: Remove -i and --idle options.
2005 * src/ptx.c: Remove --copyright option.
2007 Change interface: make 2nd param _space_-separated, not comma-separated
2008 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Remove now-
2009 unnecessary use of tr.
2011 * configure.ac: Adjust caller, as well as the code that ensures the
2012 2nd parameter stays in sync with the list in src/Makefile.am.
2014 2007-07-14 Karel Zak <kzak@redhat.com>
2016 * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix typo: s/$2/$1/.
2017 (gl_INCLUDE_EXCLUDE_PROG): Quote first use of $2 parameter.
2018 Don't mix comma- and space-separated lists.
2019 Patch from Karel Zak.
2021 2007-07-13 Jim Meyering <jim@meyering.net>
2023 Warn about non-portable use of unescaped backslash at end of string,
2024 and treat it as if it were escaped.
2025 * src/tr.c (unquote): Considering that such usage would make GNU tr
2026 from coreutils-5.2.1 and earlier *fail*, the least we can do now is
2027 to warn about it. Solaris' tr ignores it.
2028 * NEWS: Mention this.
2030 Use proper backslash-quoting inside backticks.
2031 * configure.ac: Otherwise we run afoul of strict GNU tr:
2032 a string ending in a lone backslash would provoke a failure.
2034 2007-07-12 Jim Meyering <jim@meyering.net>
2036 Expand default-no-install prog list in ./configure --help output,
2037 and fix some []-quoting bugs in sed expressions.
2038 * configure.ac: Hard-code the list, "arch,su" here as well
2039 as in src/Makefile.am, and ensure the two stay in sync.
2040 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Use $2,
2041 rather than the nearly-equivalent shell variable.
2042 Karel Zak reported that ./configure --help's output included
2043 the literal string, $gl_no_install_progs_default.
2045 Clean up include-exclude-prog.m4.
2046 * m4/include-exclude-prog.m4 (gl_ADD_PROG): Don't modify MAN.
2047 (gl_REMOVE_PROG): Likewise.
2048 Add omitted "\>" in sed regexp.
2049 Remove any leading or trailing spaces.
2050 (gl_ADD_PROG): Remove any leading space.
2051 * configure.ac: Instead, derive $MAN from $optional_bin_progs.
2052 Append $(EXEEXT) to *all* names, not just the first one.
2054 2007-07-11 Jim Meyering <jim@meyering.net>
2056 If there's a GPL vN copyright comment, require that N == 3.
2057 * Makefile.maint (sc_GPL_version): New rule.
2058 * tests/misc/arch: Fix the sole violation.
2060 2007-07-10 Jim Meyering <jim@meyering.net>
2062 Skip "arch" test if it's not built.
2063 * tests/misc/Makefile.am (built_programs): Define.
2064 (TESTS_ENVIRONMENT): Add $(built_programs), for...
2065 * tests/misc/arch: ...this: skip the test if arch is not built.
2066 * src/Makefile.am (built_programs.list): New rule.
2067 * tests/Makefile.am (built_programs): Rename from all_programs.
2068 (TESTS_ENVIRONMENT): Use built_programs, not all_programs.
2069 * tests/help-version: Likewise.
2070 * NEWS: Mention that using --enable-no-install-program=X may
2071 cause "make check" to fail.
2073 Add support for enabling/disabling installation of specified programs.
2074 * NEWS: Mention new configure-time options.
2075 Mention that neither arch nor su is built/installed, by default.
2076 * m4/include-exclude-prog.m4: New file.
2077 * configure.ac: Use new macro, gl_ADD_PROG, rather than
2078 manually appending to OPTIONAL_BIN_PROGS and MAN.
2079 Move the code that adds "df" to the list of programs to build from
2080 m4/jm-macros into this file.
2081 Use gl_INCLUDE_EXCLUDE_PROG, then handle special cases: ginstall, [.
2082 (NO_INSTALL_PROGS_DEFAULT): AC_SUBST it. Used by man/Makefile.am.
2083 * man/Makefile.am (dist_man_MANS): Remove from this list all man pages
2084 corresponding to "bin" programs. Add $(MAN) instead.
2085 (optional_mans): Remove all uses.
2086 (check-x-vs-1): Adapt to work even though arch and su are typically
2087 no longer built (and neither are their .1 files).
2088 * src/Makefile.am (install_su): Rename from INSTALL_SU, now that
2089 INSTALL_SU has a different meaning. Use the new $(INSTALL_SU) value.
2091 2007-07-10 Karel Zak <kzak@redhat.com>
2094 * NEWS: Mention arch.
2095 * README: Add arch to the list of programs.
2096 * AUTHORS: Add arch.
2097 * src/uname.c: Include "uname.h".
2098 (PROGRAM_NAME): Handle arch, too.
2099 (ARCH_AUTHORS): Define.
2100 (uname_long_options, arch_long_options): Renamed and new globals.
2101 (usage): Handle arch-mode as well as uname-mode.
2102 (decode_switches): New function, extracted from main,
2103 to handle arch-mode as well as uname-mode.
2104 (main): Handle both modes.
2105 * src/uname-arch.c: New program, alias for "uname -m".
2106 * src/uname-uname.c: New file, default uname mode.
2107 * src/uname.h: New file, uname modes.
2108 * src/Makefile.am (EXTRA_PROGRAMS): Add arch.
2109 (uname_SOURCES, arch_SOURCES): Define.
2110 * man/arch.x: New file.
2111 * man/Makefile.am (dist_man_MANS): Add arch.1.
2112 (arch.1): New dependency.
2113 * tests/misc/arch: New test, compare "arch" with "uname -m"
2114 * configure.ac (OPTIONAL_BIN_PROGS): Add arch.
2116 * .x-sc_require_config_h: Exempt uname-arch.c and uname-uname.c
2117 from the always-include-<config.h> rule.
2119 2007-07-10 Jim Meyering <jim@meyering.net>
2121 Change "version 2" to "version 3" in all copyright notices.
2123 2007-07-09 Jim Meyering <jim@meyering.net>
2125 Compensate for new c99'isms in seq.c.
2126 * Makefile.maint (patch-check): Use -p1, not -p2, so a patch
2127 generated via "make patch-check REGEN=1" actually works.
2128 * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
2130 2007-07-09 Pádraig Brady <P@draigBrady.com>
2132 Fix the automatic number width formatting in seq.
2133 * src/seq.c: Fix the -w logic. Ignore spaces and '+'
2134 characters of input numbers when determining width.
2135 Set format correctly for input numbers in scientific notation.
2136 * tests/seq/basic: Add various number width tests.
2137 Details: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10903>
2139 2007-07-08 Jim Meyering <jim@meyering.net>
2141 Run the coreutils-specific code only if tests/Makefile.am.in exists.
2142 * bootstrap (mam_template): Move definition out of loop.
2144 Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
2145 * bootstrap (symlink_to_dir): Rename function from symlink_to_gnulib.
2146 Add a directory parameter. Update all callers.
2147 (cp_mark_as_generated): Also check for -- and link to -- files in gl/.
2149 * THANKS: Add Pádraig Brady.
2151 2007-07-08 Jim Meyering <jim@meyering.net>
2153 Adapt to deeper hierarchy in gnulib.
2154 * bootstrap (symlink_to_dir): If the destination directory doesn't
2155 exist, create it. This is required at least for "lib/uniwidth/cjk.h".
2157 Use <wchar.h>, not "wcwidth.h".
2158 * src/wc.c: Now that gnulib provides the POSIX-specified <wchar.h>,
2159 include it and <wctype.h>, rather than "wcwidth.h".
2160 * src/ls.c: Include <wchar.h>, rather than "wcwidth.h".
2162 2007-07-05 Jim Meyering <jim@meyering.net>
2164 setuidgid: set all groups, not just the primary one.
2165 I wanted to use the xgetgroups function from id.c, so factored
2166 it out and made it into a non-exiting function (hence the "m"
2167 prefix rather than "x").
2168 * src/setuidgid.c (main): Use mgetgroups.
2169 Include "mgetgroups.h".
2171 * src/id.c (xgetgroups): Remove function.
2172 Include "mgetgroups.h".
2173 (print_group_list): Use mgetgroups, not xgetgroups.
2175 * gl/modules/mgetgroups: New module.
2176 * gl/lib/mgetgroups.c: New file. mgetgroups is derived from
2177 id.c's xgetgroups function.
2178 * bootstrap.conf (gnulib_modules): Add mgetgroups.
2179 * gl/m4/mgetgroups.m4: New file.
2180 * gl/lib/mgetgroups.h: New file.
2182 * bootstrap: Merge in changes from gnulib.
2184 * src/id.c: Include "getugroups.h" rather than declaring manually.
2186 2007-07-04 Paul Eggert <eggert@cs.ucla.edu>
2188 * NEWS: pr -F no longer suppresses the footer or the first two blank
2189 lines in the header.
2190 * doc/coreutils.texi (pr invocation): Likewise. Also, a too-short
2191 page length implies -t, not -T.
2192 * src/pr.c (lines_per_header, lines_per_footer): Now constants.
2193 (init_parameters): Don't try to change them.
2194 (print_header): Use the same header and footer format regardless of
2195 wither form feeds are being used.
2196 (usage): Adjust to above change when describing too-short page length.
2197 Too-short page length impliesy -t, not -T.
2198 * tests/pr/2-S_f-t_notab: Adjust to the fact that -F now affects
2199 only formfeed handling; it does not change the header.
2200 * tests/pr/2-Sf-t_notab: Likewise.
2201 * tests/pr/2f-t_notab: Likewise.
2202 * tests/pr/2s_f-t_notab: Likewise.
2203 * tests/pr/2s_w60f-t_nota: Likewise.
2204 * tests/pr/2sf-t_notab: Likewise.
2205 * tests/pr/2sw60f-t_notab: Likewise.
2206 * tests/pr/2w60f-t_notab: Likewise.
2207 * tests/pr/3a3f-0F: Likewise.
2208 * tests/pr/3b3f-0F: Likewise.
2209 * tests/pr/3b3f-0FF: Likewise.
2210 * tests/pr/3b3f-FF: Likewise.
2211 * tests/pr/3f-0F: Likewise.
2212 * tests/pr/3f-FF: Likewise.
2213 * tests/pr/Test.pm: Likewise.
2214 * tests/pr/a3f-0F: Likewise.
2215 * tests/pr/a3f-0FF: Likewise.
2216 * tests/pr/a3f-FF: Likewise.
2217 * tests/pr/b3f-0F: Likewise.
2218 * tests/pr/b3f-0FF: Likewise.
2219 * tests/pr/b3f-FF: Likewise.
2220 * tests/pr/3-5l17f-t: Remove, since it's been renamed to another
2221 file whose name has a line count 7 larger,
2222 reflecting the new line count needed for this behavior.
2223 * tests/pr/3a3l8f-t: Likewise.
2224 * tests/pr/3b3l8f-t: Likewise.
2225 * tests/pr/3l17f-t: Likewise.
2226 * tests/pr/3ml17f-t: Likewise.
2227 * tests/pr/Ja3l17f-lm: Likewise.
2228 * tests/pr/Jb3l17f-lm: Likewise.
2229 * tests/pr/Jml17f-lm-lo: Likewise.
2230 * tests/pr/W-72l17f-ll: Likewise.
2231 * tests/pr/W20l17f-ll: Likewise.
2232 * tests/pr/W26l17f-ll: Likewise.
2233 * tests/pr/W27l17f-ll: Likewise.
2234 * tests/pr/W28l17f-ll: Likewise.
2235 * tests/pr/W35Ja3l17f-lm: Likewise.
2236 * tests/pr/W35Jb3l17f-lm: Likewise.
2237 * tests/pr/W35Jml17f-lmlo: Likewise.
2238 * tests/pr/W35a3l17f-lm: Likewise.
2239 * tests/pr/W35b3l17f-lm: Likewise.
2240 * tests/pr/W35ml17f-lm-lo: Likewise.
2241 * tests/pr/W72Jl17f-ll: Likewise.
2242 * tests/pr/a3l17f-lm: Likewise.
2243 * tests/pr/a3l8f-t: Likewise.
2244 * tests/pr/b3l17f-lm: Likewise.
2245 * tests/pr/b3l8f-t: Likewise.
2246 * tests/pr/l17f-t: Likewise.
2247 * tests/pr/ml17f-0F: Likewise.
2248 * tests/pr/ml17f-lm-lo: Likewise.
2249 * tests/pr/ml17f-t: Likewise.
2250 * tests/pr/ml17f-t-0F: Likewise.
2251 * tests/pr/n+2-5l17f-0FF: Likewise.
2252 * tests/pr/n+2l17f-0FF: Likewise.
2253 * tests/pr/n+2l17f-bl: Likewise.
2254 * tests/pr/n+3l17f-0FF: Likewise.
2255 * tests/pr/n+3l17f-bl: Likewise.
2256 * tests/pr/n+3ml13f-bl-FF: Likewise.
2257 * tests/pr/n+3ml17f-bl-tn: Likewise.
2258 * tests/pr/n+3ml17f-tn-bl: Likewise.
2259 * tests/pr/n+4b2l10f-0FF: Likewise.
2260 * tests/pr/n+5-8b3l10f-FF: Likewise.
2261 * tests/pr/n+5a3l6f-0FF: Likewise.
2262 * tests/pr/n+6b3l6f-FF: Likewise.
2263 * tests/pr/nJml17f-lmlmlo: Likewise.
2264 * tests/pr/nJml17f-lmlolm: Likewise.
2265 * tests/pr/nN1+3l17f-bl: Likewise.
2266 * tests/pr/nN15l17f-bl: Likewise.
2267 * tests/pr/nSml13-bl-FF: Likewise.
2268 * tests/pr/nSml13-t-t-FF: Likewise.
2269 * tests/pr/nSml13-t-tFFFF: Likewise.
2270 * tests/pr/nSml17-bl-FF: Likewise.
2271 * tests/pr/nSml17-t-t-FF: Likewise.
2272 * tests/pr/nSml17-t-tFFFF: Likewise.
2273 * tests/pr/nl17f-bl: Likewise.
2274 * tests/pr/o3Jml17f-lm-lo: Likewise.
2275 * tests/pr/o3a3Sl17f-tn: Likewise.
2276 * tests/pr/o3a3Snl17f-tn: Likewise.
2277 * tests/pr/o3a3l17f-tn: Likewise.
2278 * tests/pr/o3b3Sl17f-tn: Likewise.
2279 * tests/pr/o3b3Snl17f-tn: Likewise.
2280 * tests/pr/o3b3l17f-tn: Likewise.
2281 * tests/pr/o3mSl17f-bl-tn: Likewise.
2282 * tests/pr/o3mSnl17fbltn: Likewise.
2283 * tests/pr/o3ml17f-bl-tn: Likewise.
2284 * tests/pr/w72l17f-ll: Likewise.
2285 * tests/pr/3-5l24f-t: New file, containing the contents of the
2286 file with the same name but with the line count smaller by 7,
2287 reflecting the new behavior with -F.
2288 * tests/pr/3a3l15f-t: Likewise.
2289 * tests/pr/3b3l15f-t: Likewise.
2290 * tests/pr/3l24f-t: Likewise.
2291 * tests/pr/3ml24f-t: Likewise.
2292 * tests/pr/Ja3l24f-lm: Likewise.
2293 * tests/pr/Jb3l24f-lm: Likewise.
2294 * tests/pr/Jml24f-lm-lo: Likewise.
2295 * tests/pr/W-72l24f-ll: Likewise.
2296 * tests/pr/W20l24f-ll: Likewise.
2297 * tests/pr/W26l24f-ll: Likewise.
2298 * tests/pr/W27l24f-ll: Likewise.
2299 * tests/pr/W28l24f-ll: Likewise.
2300 * tests/pr/W35Ja3l24f-lm: Likewise.
2301 * tests/pr/W35Jb3l24f-lm: Likewise.
2302 * tests/pr/W35Jml24f-lmlo: Likewise.
2303 * tests/pr/W35a3l24f-lm: Likewise.
2304 * tests/pr/W35b3l24f-lm: Likewise.
2305 * tests/pr/W35ml24f-lm-lo: Likewise.
2306 * tests/pr/W72Jl24f-ll: Likewise.
2307 * tests/pr/a3l15f-t: Likewise.
2308 * tests/pr/a3l24f-lm: Likewise.
2309 * tests/pr/b3l15f-t: Likewise.
2310 * tests/pr/b3l24f-lm: Likewise.
2311 * tests/pr/l24f-t: Likewise.
2312 * tests/pr/ml24f-0F: Likewise.
2313 * tests/pr/ml24f-lm-lo: Likewise.
2314 * tests/pr/ml24f-t: Likewise.
2315 * tests/pr/ml24f-t-0F: Likewise.
2316 * tests/pr/n+2-5l24f-0FF: Likewise.
2317 * tests/pr/n+2l24f-0FF: Likewise.
2318 * tests/pr/n+2l24f-bl: Likewise.
2319 * tests/pr/n+3l24f-0FF: Likewise.
2320 * tests/pr/n+3l24f-bl: Likewise.
2321 * tests/pr/n+3ml20f-bl-FF: Likewise.
2322 * tests/pr/n+3ml24f-bl-tn: Likewise.
2323 * tests/pr/n+3ml24f-tn-bl: Likewise.
2324 * tests/pr/n+4b2l17f-0FF: Likewise.
2325 * tests/pr/n+5-8b3l17f-FF: Likewise.
2326 * tests/pr/n+5a3l13f-0FF: Likewise.
2327 * tests/pr/n+6b3l13f-FF: Likewise.
2328 * tests/pr/nJml24f-lmlmlo: Likewise.
2329 * tests/pr/nJml24f-lmlolm: Likewise.
2330 * tests/pr/nN1+3l24f-bl: Likewise.
2331 * tests/pr/nN15l24f-bl: Likewise.
2332 * tests/pr/nSml20-bl-FF: Likewise.
2333 * tests/pr/nSml20-t-t-FF: Likewise.
2334 * tests/pr/nSml20-t-tFFFF: Likewise.
2335 * tests/pr/nSml24-bl-FF: Likewise.
2336 * tests/pr/nSml24-t-t-FF: Likewise.
2337 * tests/pr/nSml24-t-tFFFF: Likewise.
2338 * tests/pr/nl24f-bl: Likewise.
2339 * tests/pr/o3Jml24f-lm-lo: Likewise.
2340 * tests/pr/o3a3Sl24f-tn: Likewise.
2341 * tests/pr/o3a3Snl24f-tn: Likewise.
2342 * tests/pr/o3a3l24f-tn: Likewise.
2343 * tests/pr/o3b3Sl24f-tn: Likewise.
2344 * tests/pr/o3b3Snl24f-tn: Likewise.
2345 * tests/pr/o3b3l24f-tn: Likewise.
2346 * tests/pr/o3mSl24f-bl-tn: Likewise.
2347 * tests/pr/o3mSnl24fbltn: Likewise.
2348 * tests/pr/o3ml24f-bl-tn: Likewise.
2349 * tests/pr/w72l24f-ll: Likewise.
2351 2007-06-23 Jim Meyering <jim@meyering.net>
2353 Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0.
2354 * src/base64.c (main): Likewise.
2355 * src/install.c (setdefaultfilecon): Likewise.
2356 * src/sort.c (main): Likewise.
2357 * Makefile.maint (sc_prohibit_strcmp): New rule.
2358 * .x-sc_prohibit_strcmp: New file, to list the few exceptions.
2359 * Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp.
2361 2007-06-22 Paul Eggert <eggert@cs.ucla.edu>
2363 * NEWS: seq no longer mishandles obvious cases like
2364 "seq 0 0.000001 0.000003" by omitting the last output number.
2365 * doc/coreutils.texi (seq invocation): Remove advice about workaround
2366 for seq off-by-one problem, since the bug is fixed now. Replace
2367 it with more-generic advice about rounding errors.
2368 * src/seq.c (long_double_format, print_numbers):
2369 New arg NUMERIC_FORMAT. All uses changed.
2371 2007-06-22 Pádraig Brady <P@draigBrady.com> (trivial change)
2373 * tests/seq/basic: Add test cases for seq off-by-one problem.
2375 2007-06-22 Jim Meyering <jim@meyering.net>
2377 * src/stat.c (long_options): Add a FIXME comment to help ensure
2378 that the deprecated and undocumented "--filesystem" option is
2381 2007-06-18 Paul Eggert <eggert@cs.ucla.edu>
2383 A few more symlink-related fixes. Fix a bug triggered by cp
2384 --parents and symlinks. Close some race conditions possible when
2385 the destination replaces a newly-created file with a symlink.
2386 * NEWS: Document that 'cp --parents' no longer mishandles
2387 symlinks in file name components of source.
2388 * src/copy.c (HAVE_LCHOWN): Default to false.
2389 (lchown) [!defined HAVE_LCHOWN]: Define to chown, for convenience.
2390 * src/cp.c (lchown) [!HAVE_LCHOWN]: Likewise.
2391 * src/install.c (lchown [!HAVE_LCHOWN]: Likewise.
2392 * src/copy.c (set_owner): Use lchown instead of chown, for safety
2393 in case the file got replaced by a symlink in the meantime.
2394 * src/cp.c (re_protect): Likewise.
2395 * src/install.c (change_attributes): Likewise.
2396 * src/copy.c (copy_internal): Use ordinary C rather than an #if.
2397 * src/cp.c (lchown) [!HAVE_LCHOWN]: Define to chown, for convenience.
2398 (struct dir_attr): Cache the entire struct stat of the directory,
2399 rather than just its mode, so that we needn't stat the directory
2400 twice (which can lead to races).
2401 (re_protect): Don't use XSTAT as that's not appropriate in
2402 this context (symlinks should be followed here). Instead, use
2403 the cached stat value.
2404 (make_dir_parents_private): Save dir's entire struct stat, not
2406 * tests/cp/cp-parents: Add test to check against bug with
2407 cp --parents and symlinks.
2409 2007-06-18 Jim Meyering <jim@meyering.net>
2411 Use mreadlink_with_size (doesn't exit), not xreadlink_with_size.
2412 * bootstrap.conf (gnulib_modules): Add readlink-with-size.
2413 Remove xreadlink and xreadlink-with-size.
2414 * src/copy.c (copy_internal): Use mreadlink_with_size,
2415 not xreadlink_with_size.
2416 * src/ls.c (get_link_name): Likewise.
2417 * src/readlink.c (main): Likewise.
2418 * src/stat.c (print_stat): Likewise.
2420 * README-hacking: Don't mention Gzip 1.2.4, now that 1.3.12 is out.
2422 2007-06-16 Jim Meyering <jim@meyering.net>
2424 Make chgrp and chown diagnostics consistent.
2425 * src/chown.c (main): Emit the diagnostic before the file name,
2426 not after it, to be consistent with chgrp's diagnostic.
2427 * src/chgrp.c (parse_group): Emit a ":" between the diagnostic
2429 Reported by Egmont Koblinger.
2430 * THANKS: Add Egmont Koblinger.
2432 2007-06-15 Paul Eggert <eggert@cs.ucla.edu>
2434 Correct cp's handling of destination symlinks in some cases.
2435 * NEWS: "cp" no longer considers a destination symlink to be the
2436 same as the referenced file when copying links or making backups.
2437 * src/copy.c (copy_reg): When following a symlink, use the
2438 followed name in later chown etc. requests, so that the created
2439 file is affected, rather than the symlink. Use O_NOFOLLOW on
2440 source when not dereferencing symlinks; this avoids a race.
2441 Preserve errno correctly when doing multiple open attempts on the
2443 (copy_internal): Follow destination symlinks only when copying a
2444 regular file and only when we don't intend to remove or rename the
2445 destination first, regardless of whether following source
2446 symlinks; this is because since POSIX and tradition (e.g.,
2447 FreeBSD) say we should ordinarily follow destination symlinks if
2448 the system calls would ordinarily do so.
2449 * src/copy.h (struct cp_options): Add comment that 'dereference'
2450 is only for source files.
2451 * src/cp.c (usage): Note that --derereference etc. are only for
2453 (make_dir_parents_private): Follow symlinks, regardless of whether
2454 --dereference is specified, because these are destination symlinks.
2455 * tests/cp/same-file: Adjust tests to match revised behavior.
2456 Filter out perror output since it might vary from host to host.
2457 Use sed alone instead of also using echo.
2459 * doc/coreutils.texi (cp invocation): Document the behavior better when
2460 the destination is a symlink. Clarify source versus destination
2461 symlinks. Describe the new behavior for destination symlinks.
2463 2007-06-15 Jim Meyering <jim@meyering.net>
2465 * src/copy.c: Include "canonicalize.h".
2466 (copy_reg): Use canonicalize_filename_mode to follow the symlink,
2467 so that we can always open with O_EXCL and avoid a race.
2469 2007-06-15 Jim Meyering <jim@meyering.net>
2471 Don't include "quote.h" when it is not used.
2472 * src/md5sum.c: Remove unnecessary inclusion of "quote.h".
2473 * src/expr.c: Likewise.
2474 * src/shred.c: Likewise.
2475 * Makefile.maint (sc_prohibit_quote_without_use): New rule.
2476 * src/c99-to-c89.diff: Adjust offsets.
2478 2007-06-14 Paul Eggert <eggert@cs.ucla.edu>
2480 Clarify what "cat" documentation means by "blank" lines.
2481 * doc/coreutils.texi (cat invocation): "Blank" lines actually mean
2483 * src/cat.c (usage): Say that "nonblank" means nonempty. Clarify
2486 2007-06-13 Jim Meyering <jim@meyering.net>
2488 rmdir: give better diagnostics
2489 * src/rmdir.c (remove_parents): Give a more descriptive/consistent
2490 diagnostic upon failure.
2492 Suggestion from Joey Hess.
2493 * THANKS: Add Joey Hess.
2495 Don't include "quotearg.h" when it is not used.
2496 * Makefile.maint (sc_prohibit_quotearg_without_use): New rule.
2497 * src/cp.c: Don't include "quotearg.h". It wasn't used.
2499 * README-hacking: List Gperf as a build-requirement, too.
2500 Reported by Steve Ward.
2502 2007-06-11 Jim Meyering <jim@meyering.net>
2504 * README: Mention README-hacking, for whose who start from
2505 cloned/checked-out sources rather than from a distribution tarball.
2506 Reported by Steve Ward.
2507 * THANKS: Add Steve Ward.
2509 2007-06-10 Jim Meyering <jim@meyering.net>
2511 bug-fix: cp would fail to write through a dangling symlink
2512 * NEWS: Mention the bug fix.
2513 * src/copy.c (copy_reg): When open fails with EEXIST, the destination
2514 is lstat'able, and a symlink, call open again, but now without O_EXCL.
2515 * tests/cp/thru-dangling: New file, to test for the above fix.
2516 * tests/cp/Makefile.am (TESTS): Add thru-dangling.
2517 * THANKS: Add Michael McLagan.
2518 Bug report from Michael McLagan in <http://bugzilla.redhat.com/243588>.
2520 2007-06-04 Paul Eggert <eggert@cs.ucla.edu>
2522 * doc/coreutils.texi (Common options): Mention that -h and
2523 --human-readable are equivalent to --block-size=human-readable.
2524 Documentation problem reported by Steve Ward in
2525 <http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00007.html>.
2526 (du invocation): Use optSi rather than duplicating the macro's
2527 contents (incorrectly, since we claimed a "B" was output).
2529 2007-05-31 Jim Meyering <jim@meyering.net>
2531 Pull printf-related code from gnulib, rather than using forked copy.
2532 * bootstrap.conf (gnulib_modules): Don't avoid size_max and xsize
2533 modules. While I dislike xsize-style overflow avoidance, maintaining
2534 a forked version of e.g., vasnprintf.c was too much work.
2536 2007-05-29 Jim Meyering <jim@meyering.net>
2538 * src/dircolors.hin: Add screen-256color.
2539 Suggested by sdl.web@gmail.com in <http://bugzilla.redhat.com/239266>.
2541 2007-05-26 Jim Meyering <jim@meyering.net>
2543 * TODO: Add an entry for comm --output-delimiter=STR
2545 2007-05-25 James Youngman <jay@gnu.org>
2547 wc: ignore multibyte-character decoding errors
2548 * src/wc.c (wc): Don't issue an error message when mbrtowc
2549 indicates that we have seen an invalid byte sequence. This
2550 makes "wc /bin/sh" bearable (though the word and line counts
2551 are likely not to be useful).
2552 * NEWS: Mention the change.
2554 2007-05-22 Jim Meyering <jim@meyering.net>
2556 Check for an up-to-date copyright year in coreutils.texi.
2557 * Makefile.maint (copyright-check): Also check for an up-to-date
2558 copyright year in doc/$().texi, if that file exists.
2559 * doc/coreutils.texi: Add 2007 to list of Copyright years.
2560 Reported by Karl Berry.
2562 cut: diagnose a range starting with 0 (-f 0-2) as invalid, and
2563 give a better diagnostic for a field-number/offset of 0.
2564 * NEWS: Mention the fix.
2565 * src/cut.c (ADD_RANGE_PAIR): Add an explicit check.
2566 Based on a patch from James Youngman.
2567 * tests/misc/cut: Add tests for the above.
2569 "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
2570 Also, diagnose the '-' in "cut -f -" as an invalid range, rather
2571 than interpreting it as the unlimited range, "1-".
2572 * NEWS: Mention these changes.
2573 * src/cut.c (set_fields): Don't interpret an accumulator "value"
2574 of 0 as an unspecified range endpoint.
2575 Give better diagnostics.
2576 Adjust a comment so that it is true also for 64-bit size_t.
2578 * tests/cut/Test.pm: Add tests for the above.
2580 stty: fix a harmless syntax nit
2581 * src/stty.c (visible): Use ";" as the statement terminator
2582 between two assignments, not ",".
2583 (integer_arg): Join an unnecessarily wrapped line.
2585 2007-05-20 Jim Meyering <jim@meyering.net>
2587 stty: diagnose an invalid hex value in 35-colon commmand-line argument
2588 * NEWS: Mention this.
2589 * src/stty.c (strtoul_tcflag_t, strtoul_cc_t): New functions.
2590 (recover_mode): Use those functions (not sscanf), to parse the
2592 * tests/stty/invalid: New file. Test for the above.
2593 * tests/stty/Makefile.am (TESTS): Add invalid.
2594 * .x-sc_prohibit_atoi_atof: Don't exempt stty.c from this check.
2595 Add tests/stty/invalid so we don't have to obfuscate the comment
2596 about sscanf therein.
2597 * Makefile.maint (sc_prohibit_atoi_atof): Mention sscanf in the
2600 * TODO: Remove some now-completed or no longer relevant items.
2602 2007-05-19 Jim Meyering <jim@meyering.net>
2604 Rename uses of futimens -> gl_futimens; glibc now declares the former.
2605 * src/copy.c (copy_reg): Reflect renaming: futimens -> gl_futimens.
2606 * src/touch.c (touch): Likewise.
2608 2007-05-18 Jim Meyering <jim@meyering.net>
2610 * Makefile.maint (my-distcheck): Remove -pedantic from $(CFLAGS)
2611 for now, to avoid c89-check failure due to use of #include_next.
2613 2007-05-15 Jim Meyering <jim@meyering.net>
2615 Generate a dozen test-related Makefile.am files at bootstrap-time.
2616 * README-hacking: Build-from-checkout now require Perl, too.
2617 * bootstrap: Now that these generated Makefile.am files are no longer
2618 under version control, they must be created at bootstrap time.
2620 2007-05-14 Paul Eggert <eggert@cs.ucla.edu>
2622 * man/chmod.x: Document chmod's behavior with setuid and setgid bits.
2623 Remove misleading implication about leading zero. Problem
2624 reported by Jan Engelhardt in
2625 <http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00134.html>.
2627 2007-05-13 Jim Meyering <jim@meyering.net>
2629 Remove the generated tests/*/Makefile.am files from version control.
2630 * tests/cut/Makefile.am: git-remove this generated file.
2631 * tests/head/Makefile.am: Likewise.
2632 * tests/join/Makefile.am: Likewise.
2633 * tests/pr/Makefile.am: Likewise.
2634 * tests/sort/Makefile.am: Likewise.
2635 * tests/tac/Makefile.am: Likewise.
2636 * tests/tail/Makefile.am: Likewise.
2637 * tests/test/Makefile.am: Likewise.
2638 * tests/tr/Makefile.am: Likewise.
2639 * tests/uniq/Makefile.am: Likewise.
2640 * tests/wc/Makefile.am: Likewise.
2641 * .cvsignore, .gitignore: Ignore these generated files.
2643 * src/.cvsignore, src/.gitignore: Add chcon here, ...
2644 * .cvsignore, .gitignore: ... not here.
2646 Test uniq's new --zero-terminated (-z) option.
2647 * tests/uniq/Test.pm: When possible, create a "-z"-testing variant
2648 of each existing test.
2649 (2z, 3z, 4z, 5z, 20z, 122, 123): New tests from James Youngman.
2651 2007-05-12 James Youngman <jay@gnu.org>
2653 Add -z option to uniq. Originally proposed by Egmont Koblinger.
2654 * NEWS: Mention uniq's new option: --zero-terminated (-z).
2655 * src/uniq.c: Add new option, --zero-terminated (-z), to make
2656 uniq use the NUL byte as separator/delimiter rather than newline.
2657 (check_file): Add a parameter: delimiter. Update caller.
2658 Use readlinebuffer_delim in place of readlinebuffer everywhere.
2659 (main): Handle the new option.
2660 (usage): Describe new option the same way sort does.
2661 * doc/coreutils.texi (uniq invocation): Describe the new option.
2663 2007-05-07 Jim Meyering <jim@meyering.net>
2665 * NEWS: Mention that last week's tr bug dates back to 1992.
2667 2007-05-04 Jim Meyering <jim@meyering.net>
2669 Avoid test failure when run with an unusual umask.
2670 * tests/ls/color-dtype-dir: Set umask to 022.
2671 Suggestion from AIDA Shinra.
2673 Avoid failure of root-only test when run with a restrictive umask.
2674 * tests/rm/no-give-up: Ensure that non-root can access "d/" through
2675 root-owned ".". Reported by AIDA Shinra.
2677 tr -c: don't abort when translating with S2 larger than complement of S1
2678 * src/tr.c (main): Remove invalid assertion triggered by e.g.,
2679 tr -c a '[b*256]'. There's nothing wrong with having Set2 larger
2680 than Set1. Reported by Guntram Blohm.
2681 * tests/tr/Test.pm (no-abort-1): Test for the above.
2682 * NEWS: Mention this bug fix.
2683 * THANKS: Add Guntram Blohm.
2685 2007-05-03 Jim Meyering <jim@meyering.net>
2687 Avoid test failure when run with a permissive umask.
2688 * tests/rm/no-give-up: Set permissions of test directory properly,
2689 i.e., not depending on umask prohibiting go=w.
2690 Reported by AIDA Shinra.
2692 2007-05-02 Paul Eggert <eggert@cs.ucla.edu>
2694 The following commands and options now support the standard size
2695 suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y:
2696 head -c, head -n, od -j, od -N, od -S, split -b, split -C,
2698 * doc/coreutils.texi (od invocation, head invocation, tail invocation):
2699 Document support for new size suffixes.
2700 (head invocation, tail invocation):
2701 Document that -n uses the same suffixes as -c.
2702 (tail invocation): More-clearly document what leading "+" does.
2703 * src/head.c (usage, string_to_integer): Support new suffixes.
2704 * src/od.c (usage, main): Likewise.
2705 * src/split.c (usage, main): Likewise.
2706 * src/tail.c (usage, parse_options): Likewise.
2707 Prompted by a patch from Evan Hunt.
2709 2007-05-02 Jim Meyering <jim@meyering.net>
2711 * src/du.c (usage): Tweak description of --dereference-args (-D) again.
2712 Prompted by another request for clarification from Justin Pryzby.
2714 Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.
2715 * tests/rm/fail-2eperm: Patch from AIDA Shinra.
2716 Reported by Peter Dyballa.
2717 * THANKS: Add AIDA Shinra and Peter Dyballa.
2719 2007-04-28 Paul Eggert <eggert@cs.ucla.edu>
2721 * src/nohup.c (usage): Describe how standard input and output
2724 2007-04-25 Jim Meyering <jim@meyering.net>
2726 * src/du.c (usage): Clarify description of --dereference-args (-D).
2727 Prompted by a report from Justin Pryzby.
2729 * bootstrap.conf (gnulib_modules): Add fseeko and ftello.
2730 (gnulib_modules): Add autobuild.
2732 2007-04-24 Jim Meyering <jim@meyering.net>
2734 * THANKS: Add Andreas Frische.
2735 * NEWS: Mention today's ls --color fix.
2736 * tests/ls-2/tests (sl-dangle): Add a test for today's fix.
2738 2007-04-24 Eric Blake <ebb9@byu.net>
2740 ls --color once again colors dangling symlinks correctly
2741 * src/ls.c (gobble_file): Much like the 2007-04-07 fix,
2742 add a term to the expression that decides whether we need
2743 stat and/or lstat calls. Reported by Andreas Frische.
2745 2007-04-16 Jim Meyering <jim@meyering.net>
2747 * src/cut.c (usage): Adjust synopsis to show that an OPTION is required.
2748 Reported by Rudolf Kastl.
2749 * THANKS: Add Rudolf Kastl.
2751 2007-04-11 Paul Eggert <eggert@cs.ucla.edu>
2753 split --line-bytes=N (-C N): don't create an empty file.
2754 * src/split.c (line_bytes_split): Don't create an empty line
2755 afterwards if the last buffer happens to be exactly full.
2756 * tests/misc/split-fail: Add a test case for this.
2757 * NEWS: mention this.
2759 2007-04-10 Jim Meyering <jim@meyering.net>
2761 ls: don't form or compute the length of strings that won't be used.
2762 * src/ls.c (gobble_file): Form and compute length of strings for
2763 block size, owner, group, author, major+minor numbers and file size
2764 only if they'll actually be used. I.e., don't form most of them
2765 when not producing long format output.
2767 2007-04-07 Jim Meyering <jim@meyering.net>
2769 Add a test for, and document, today's fix.
2770 * NEWS: Mention today's ls --color fix.
2771 * tests/ls-2/tests (sl-target): Add a test for today's fix.
2772 * THANKS: Add Kirk Kelsey.
2774 2007-04-07 Eric Blake <ebb9@byu.net>
2776 Fix a bug in how the LS_COLORS ln=target attribute is handled.
2777 * src/ls.c (gobble_file): Use "stat" (not lstat) also when the
2778 ln=target attribute applies. Reported by Kirk Kelsey.
2780 2007-04-02 Jim Meyering <jim@meyering.net>
2782 * src/copy.c (copy_reg): Initialize local "con", before calling
2783 getfscreatecon, in case that function (or its inline stub) does
2786 2007-04-01 Paul Eggert <eggert@cs.ucla.edu>
2788 * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
2789 ls -x DIR would sometimes output the wrong string in place of the
2791 * NEWS: Mention the bug fix.
2792 * tests/ls/x-option: New file.
2793 * tests/ls/Makefile.am (TESTS): Add x-option.
2795 gnulib moved md5 and sha1 modules into a new crypt/ directory; adapt
2796 * bootstrap.conf (gnulib_modules): Adjust to gnulib's renaming of
2797 md5 to crypt/md5 and sha1 to crypt/sha1.
2799 2007-03-30 Jim Meyering <jim@meyering.net>
2801 * NEWS: Mention these SELinux changes.
2803 * ChangeLog-selinux: Remove file.
2804 Move its contents into this file, removing old dates.
2806 * src/runcon.c (main): Don't reorder arguments. Reported by
2807 Ulrich Drepper in <http://bugzilla.redhat.com/232652>.
2808 * tests/misc/runcon-no-reorder: New file. Test for the above.
2809 * tests/misc/Makefile.am (TESTS): Add runcon-no-reorder.
2811 * src/runcon.c (main): Remove "." at end of a diagnostic.
2813 * src/runcon.c: New program.
2814 * src/Makefile.am (bin_PROGRAMS): Add runcon.
2815 (runcon_LDADD): Define.
2816 * README: Add runcon to the list of programs.
2817 * AUTHORS: Add this: runcon: Russell Coker
2818 * tests/help-version: Add runcon as an exception.
2819 * man/Makefile.am (dist_man_MANS): Add runcon.1.
2820 (runcon.1): New dependency.
2822 mkfifo, mknod: Accept new "-Z, --context=C" option.
2823 * src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>.
2825 * src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
2827 mkdir: Accept new "-Z, --context=C" option.
2828 * src/mkdir.c: Include <selinux/selinux.h>.
2830 * src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
2832 * tests/cp/cp-a-selinux: New file. Test for the bug reported in
2833 <http://bugzilla.redhat.com/219900>.
2834 * tests/cp/Makefile.am (TESTS): Add cp-a-selinux.
2836 * tests/selinux: New file.
2837 * tests/Makefile.am (EXTRA_DIST): Add selinux.
2838 * tests/misc/selinux: Source the new script, rather than open coding it.
2840 Change how "cp -a" and "cp --preserve=context" work with SELinux.
2841 Now, cp -a attempts to preserve context, but failure to do so does
2842 not change cp's exit status. However "cp --preserve=context" is
2843 similar, but failure *does* cause cp to exit with nonzero status.
2844 * src/copy.h (struct cp_options) [require_preserve_context]: New member.
2845 * src/copy.c (copy_reg, copy_internal): Implement the above.
2846 * src/mv.c (cp_option_init): Initialize the new member.
2847 * src/install.c (cp_option_init): Likewise.
2848 * src/cp.c (cp_option_init): Likewise.
2849 (decode_preserve_arg): Set it or reset it.
2851 cp, mv, install: add SELinux support, but unlike with the Red Hat
2852 patch, mv and cp do not provide the "-Z context" option.
2853 * src/copy.c: Include <selinux/selinux.h>.
2854 (restore_default_fscreatecon): New function.
2855 (copy_reg): Make cp --preserve=context work for existing destination.
2856 (copy_internal): Likewise for new destinations.
2857 * src/copy.h (cp_options) [preserve_security_context]: New member.
2858 * src/cp.c: Include <selinux/selinux.h>.
2859 (selinux_enabled): New global.
2860 (usage): Mention new --preserve=context option.
2861 (PRESERVE_CONTEXT): Define/use.
2862 (decode_preserve_arg): Handle PRESERVE_CONTEXT.
2863 (main): Remove an obsolete comment.
2864 If --preserve=context is specified on a system without SELinux
2865 enabled, give a diagnostic and fail.
2866 * src/mv.c: Include <selinux/selinux.h>.
2867 Set x->preserve_security_context if SELinux is enabled.
2868 * src/install.c: Accept new "-Z, --context=C" option.
2869 Accept --preserve-context option (but not -P option).
2870 Accept alternate spelling: --preserve_context, for now.
2871 Include <selinux/selinux.h> and "quotearg.h".
2872 (selinux_enabled, use_default_selinux_context): New globals.
2873 (PRESERVE_CONTEXT_OPTION): Define.
2874 (cp_option_init): Default: do not preserve security context.
2875 (setdefaultfilecon): New function.
2876 (main): Honor new options.
2877 * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD):
2879 * src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.
2881 * tests/misc/selinux [VERBOSE]: Print version info for each
2882 of the tested tools, not just ls.
2884 * src/c99-to-c89.diff: Remove the ls.c patch, now that I've
2885 temporarily removed the offending c99'ism.
2887 * src/chcon.c (usage): Split a string literal that was longer than 509.
2889 * src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.
2890 Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
2892 * src/c99-to-c89.diff: Adjust offsets.
2894 * AUTHORS: Add chcon.
2896 * src/c99-to-c89.diff: Remove trailing blanks.
2898 * src/chcon.c: Don't include "dirname.h". system.h already includes it.
2900 * gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.
2902 * src/c99-to-c89.diff: Handle a new c99'ism in ls.c.
2904 * src/id.c (main): Tweak id -Z diagnostic.
2906 id: Add SELinux support: -Z option.
2907 * src/id.c (main): Apply patches from Fedora, with these changes:
2908 Remove #ifdef WITH_SELINUX.
2909 Use error (EXIT_FAILURE, not fprintf+exit(1).
2910 * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
2912 stat: Add support for SELinux in the form of a %C format directive.
2913 * src/stat.c (follow_links): Make this variable file-global.
2914 (out_file_context): New function.
2915 (print_statfs): Honor %C.
2916 (print_stat): Honor %C.
2917 (do_stat): Remove follow_links parameter.
2918 (usage): Document the two %C directives.
2919 (main): Accept -Z (though it's a no-op).
2920 * src/Makefile.am (stat_LDADD): Define.
2922 ls: Add support for SELinux and a slightly modified -Z option.
2923 I started with the patches from Red Hat.
2924 The entries below tell how the code evolved.
2926 * src/ls.c (print_long_format, print_file_name_and_frills): When
2927 there is no security context (due to getfilecon/lgetfilecon failing
2928 with e.g. ENOTSUP), print it as "?", not "".
2929 * src/ls.c (print_file_name_and_frills): Make -Z work without -l.
2930 (length_of_file_name_and_frills): Likewise.
2932 * src/ls.c: Remove the --lcontext and --scontext options.
2933 Change the way -Z, --context work so that it no longer implies -l.
2934 Thus, -Z -l will work like -lcontext and -Z without -l will work
2937 Adjust tests to reflect new 'ls -l' syntax -- affects only
2938 systems with SELinux when operating on a file with no ACL.
2939 These tests assumed that everything before the first space on
2940 each line is the 10-byte mode string. But there may also be a "+"
2941 in the 11th column, just before the space. However, note that this
2942 is not new. The same thing would have happened even without the
2943 change below, when listing a file with an ACL.
2944 * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm:
2945 * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod:
2946 * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm:
2948 Don't make compilation depend on USE_ACL. An SELinux security
2949 context counts as an "alternate access control method", so ls
2950 must output a "+" for each file with a security context.
2951 * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally.
2952 (FILE_HAS_ACL): Remove macro definition. Use f->have_acl directly.
2953 (gobble_file): Record whether a file has a security context, and
2954 update the condition used to determine whether to print the "+".
2955 (gobble_file): Call getfilecon/lgetfilecon also when
2956 format == long_format, so that we get the "+".
2958 * src/ls.c (gobble_file): Add a comment explaining why (with a
2959 security context option) ls doesn't exit nonzero due to e.g.,
2960 getfilecon failing with errno == ENOTSUP.
2962 * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due
2965 * src/ls.c (gobble_file): Factor out three small blocks using
2966 getfilecon and lgetfilecon.
2967 Don't ignore return value from getfilecon and lgetfilecon.
2969 * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C
2971 (print_scontext_format): Likewise.
2972 (print_scontext): Declare to be "bool", not int. Adjust uses.
2974 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX).
2976 * tests/misc/chcon: New file.
2977 * tests/misc/chcon-fail: New file.
2978 * tests/Makefile.am (check-root): Run new, root-only misc/chcon test.
2979 * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail.
2981 * tests/misc/Makefile.am (TESTS): Add selinux.
2982 * tests/misc/selinux: New file.
2983 * tests/help-version: Skip chcon.
2984 * man/chcon.x: New file.
2985 * man/Makefile.am: Build chcon.1.
2988 * gl/modules/selinux-at: New module. Check for libselinux and set
2989 LIB_SELINUX here, unconditionally, rather than depending on
2990 the configure-time --enable-selinux option.
2991 * gl/modules/selinux-h: New module.
2992 * bootstrap.conf (gnulib_modules): Add selinux-at.
2993 * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files.
2994 * gl/lib/se-selinux_.h: New file.
2995 * gl/lib/se-context_.h: New file.
2996 * gl/m4/selinux-selinux-h.m4: New file.
2997 * gl/m4/selinux-context-h.m4: New file.
2998 * src/Makefile.am (bin_PROGRAMS): Add chcon.
2999 (chcon_LDADD): Define.
3000 * README: Add chcon to the list of programs.
3001 * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
3003 2007-03-29 Jim Meyering <jim@meyering.net>
3005 * .vg-suppressions: Add libc-getpwuid-leak.
3007 2007-03-28 Jim Meyering <jim@meyering.net>
3009 Help translators include translation team's web or email address.
3010 * src/system.h (emit_bug_reporting_address): New function.
3011 * src/base64.c: Use it rather than a literal printf.
3012 * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
3013 * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
3014 * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
3015 * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
3016 * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
3017 * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
3018 * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
3019 * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
3020 * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
3021 * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
3022 * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
3023 * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
3024 * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
3025 * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
3026 * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
3027 * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
3028 * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
3029 * src/who.c, src/whoami.c, src/yes.c: Likewise.
3031 * src/stty.c: Don't include "vasprintf.h", now that its
3032 declarations are guaranteed to be in gnulib's stdio.h.
3033 * src/who.c: Likewise.
3035 2007-03-27 Jim Meyering <jim@meyering.net>
3037 * README: Use "install", not "ginstall" in the list of program names.
3038 * src/Makefile.am (check-README): Substitute s/ginstall/install/.
3040 2007-03-25 Jim Meyering <jim@meyering.net>
3042 * src/c99-to-c89.diff: Regenerate.
3044 2007-03-25 Paul Eggert <eggert@cs.ucla.edu>
3046 Avoid the need for euidaccess and/or lstat on every directory entry
3047 with 'rm -r dir' (without -f), if we are root, or if we are removing
3048 a directory tree that is full of symbolic links.
3049 * bootstrap.conf (gnulib_modules): Add write-any-file.
3050 * src/copy.c: Include write-any-file.h.
3051 (UNWRITABLE): Remove macro, replacing with....
3052 (writable_destination): New function, which uses can_write_any_file
3053 to avoid the need for euidaccess when we are privileged.
3054 (overwrite_prompt, abandon_move): Use it.
3055 * src/remove.c: Include write-any-file.h.
3056 (D_TYPE): New macro.
3057 (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros.
3058 (write_protected_non_symlink): Don't bother to stat if we can write
3060 (prompt): New arg PDIRENT_TYPE. All callers changed.
3061 Use readdir dirent type to avoid the need for 'lstat' on each directory
3062 entry in cases like 'rm -r dir', if we are root, or if the tree is
3063 full of symbolic links.
3064 (DT_IS_KNOWN, DT_MUST_BE): Remove.
3065 (remove_entry): New arg DIRENT_TYPE_ARG. All callers changed.
3067 2007-03-24 Jim Meyering <jim@meyering.net>
3069 If strace malfunctions, skip the test rather than failing it.
3070 * tests/mv/atomic: Required on a mips-unknown-linux-gnu system
3071 running the aging linux-2.4.27-mipscvs-20040814.
3073 2007-03-23 Paul Eggert <eggert@cs.ucla.edu>
3075 * src/pathchk.c: Don't include euidaccess.h, as we don't call
3078 2007-03-23 Jim Meyering <jim@meyering.net>
3080 * README-package-renamed-to-coreutils: Add a URL for the FAQ,
3081 and a couple more archive links.
3083 2007-03-22 Jim Meyering <jim@meyering.net>
3085 Post-release version change.
3086 * NEWS: Add a line for 6.9+.
3087 * configure.ac (AC_INIT): Set new version string.
3090 * NEWS: Record release date and new version number.
3091 * configure.ac (AC_INIT): New version number.
3093 * tests/mv/hard-3: Correct the preceding change: $3 -> $2.
3095 2007-03-22 Paul Eggert <eggert@cs.ucla.edu>
3097 Improve a test script.
3098 * tests/mv/hard-3: Check for 'ls' failure, too.
3099 Generate more-useful debugging output when 'ls' fails.
3101 2007-03-21 Jim Meyering <jim@meyering.net>
3103 Fix a test script not to claim an ext2 file system is of type xfs.
3104 * tests/du/slink: When using df --local and df --type=TYPE,
3105 test only the exit code. Don't bother with stdout.
3106 Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
3108 * gl/lib/savewd.c: Remove this file, since the savewd_save change
3109 is now in gnulib. The other wasn't useful.
3111 2007-03-20 Jim Meyering <jim@meyering.net>
3113 * gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
3115 Skip part of this test when "." is not a local file system.
3116 * tests/install/basic-1: Otherwise, it would fail on some NFS
3118 * tests/mkdir/p-3: Likewise.
3120 2007-03-19 Paul Eggert <eggert@cs.ucla.edu>
3122 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
3123 Add $(LIB_ACL_TRIVIAL).
3125 2007-03-18 Jim Meyering <jim@meyering.net>
3127 Fix a generic NFS-related test failure.
3128 * tests/mkdir/p-3: When setting up an unreadable "." in an
3129 inaccessible parent, make the parent inaccessible *after* making "."
3130 unreadable. Otherwise, running "chmod a-r ." in an already-
3131 inaccessible parent would fail on NFS with "Stale NFS file handle".
3133 Fix a bug in how pr -m -s works.
3134 * NEWS: Describe how the fix affects pr.
3135 * src/pr.c (init_parameters): The --merge (-m) option does
3136 not imply --expand-tabs (-e), so don't set "untabify_input".
3137 Reported by Wis Macomson.
3138 * tests/misc/pr: New file. Test for the above fix.
3139 * tests/misc/Makefile.am (TESTS): Add pr.
3142 2007-03-17 Jim Meyering <jim@meyering.net>
3144 Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
3145 * bootstrap: Put ""s around use of $build_aux, in case
3146 someone uses a name containing shell meta-characters.
3147 Reported by Alfred M. Szmidt.
3148 * tests/misc/tty-eof: Add shuf to the list of tested commands.
3150 Avoid test failure on NFS-mounted Solaris ZFS file system.
3151 * tests/du/basic: Skip a test if "." is on a non-local file system.
3153 Avoid an obscure build failure, prefer waitpid over wait.
3154 * src/install.c (strip): Use waitpid, not wait. It's equivalent,
3155 but feels less obsolescent.
3157 * bootstrap: Don't use \> in grep regexp. For HP-UX.
3159 2007-03-16 Jim Meyering <jim@meyering.net>
3161 Begin adding support for Solaris ZFS (4 entries per trivial ACL)
3162 * gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
3163 (file_has_acl, copy_acl): Use it, rather than enumerating errno values.
3164 (is_trivial_acl): New function. Incomplete, for now.
3165 (file_has_acl, copy_acl): Use the new function, rather than
3166 counting the number of entries in an ACL.
3168 * bootstrap: Update from gnulib.
3170 * .x-sc_prohibit_atoi_atof: Add TODO here, too.
3172 2007-03-16 Paul Eggert <eggert@cs.ucla.edu>
3174 * src/copy.c: Include filemode.h.
3175 (overwrite_prompt): Say "try to overwrite", not "overwrite", to
3176 make it clearer that the attempt may fail. Problem reported by
3178 http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
3179 Output symbolic mode as well as numeric.
3180 * tests/mv/i-2 (fail): Adjust to new prompt format.
3182 2007-03-15 Jim Meyering <jim@meyering.net>
3184 Enforce policy: don't use *scanf functions.
3185 * Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
3186 * .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
3187 * TODO: note that stty.c needs this small clean-up.
3189 2007-03-13 Jim Meyering <jim@meyering.net>
3191 Prepare to work on ACL-related failure when using Solaris ZFS.
3192 * gl/lib/acl.c: New file, copied from gnulib.
3194 Work around a failing test due to an NFS-based race condition.
3195 * tests/cp/sparse: Accept a report that the copy is *smaller*.
3197 2007-03-12 Jim Meyering <jim@meyering.net>
3199 Make bootstrap.conf a tiny bit more generic.
3200 * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
3201 files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
3203 2007-03-10 Jim Meyering <jim@meyering.net>
3205 Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
3206 * gl/lib/savewd.c: Copy this file from gnulib, then change
3207 "errno != EACCES" to (errno != EACCES && errno != ESTALE).
3208 The symptom was this failure in tests/install/basic-1:
3209 ginstall: cannot create directory `rel/a': Stale NFS file handle
3211 The preceding change solved part of the problem. Now ginstall fails.
3212 * tests/install/basic-1: Temporarily, don't redirect ginstall's
3213 stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
3216 * tests/install/basic-1: When setting up an unreadable "." in an
3217 inaccessible parent, make the parent inaccessible *after* making "."
3218 unreadable. Otherwise, running "chmod a-r ." in an already-
3219 inaccessible parent would fail on NFS with "Stale NFS file handle".
3220 Reported by Bob Proulx.
3222 * Makefile.maint (po-check): Exclude c99-to-c89.diff.
3224 2007-03-09 Jim Meyering <jim@meyering.net>
3226 Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
3227 * tests/chgrp/basic: Don't let failure by chgrp to set the
3228 group of a symlink make this test fail. Do give a diagnostic.
3229 In the chgrp-no-change-ctime test, add darwin7.9.0 as another
3230 known-failing system.
3231 When failing on some other system, print $host_triplet, too.
3232 Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
3233 Reported by Peter Fales.
3235 2007-03-08 Jim Meyering <jim@meyering.net>
3237 * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
3239 2007-03-08 Paul Eggert <eggert@cs.ucla.edu>
3241 rm without -f: give a better diagnostic when euidaccess fails.
3242 * src/remove.c (write_protected_non_symlink): Return int, not bool,
3243 so that we can indicate failure too (as a postive error number).
3244 (prompt): If write_protected_non_symlink fails, report that error
3245 number and fail rather than charging ahead and removing the dubious
3246 entry. Redo the logic of printing a diagnostic so that we need to
3247 invoke quote (full_filename (...)) only once. More details at:
3248 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
3250 2007-03-08 Jim Meyering <jim@meyering.net>
3252 Generalize a few more cvs-isms.
3253 * bootstrap (checkout_only_file): Rename from CVS_only_file.
3254 Change comments and diagnostics not to say "CVS".
3256 * bootstrap: Run libtool, if necessary.
3258 Make bootstrap a little more general.
3259 * bootstrap (build_aux): Factor out/use this definition.
3260 Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
3261 (insert_sorted_if_absent): Move function definition "up", to
3262 precede new first use.
3263 If $build_aux/ doesn't exist initially, create it, and
3266 2007-03-03 Andrew Church <achurch@achurch.org> (tiny change)
3267 Paul Eggert <eggert@cs.ucla.edu>
3269 Fix a bug: cp -x would fail to set mount point permissions.
3270 * NEWS: mention cp -x bug fix
3271 * src/copy.c (copy_internal): Don't return immediately after
3272 copying a mount point that we do not intend to recurse under.
3273 Based on a patch by Andrew Church.
3275 2007-03-03 Jim Meyering <jim@meyering.net>
3277 pwd-unreadable-parent: Skip test on ia64/Linux, too.
3278 * tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
3279 Reported by Bob Proulx.
3281 2007-03-02 Jim Meyering <jim@meyering.net>
3283 pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
3284 * tests/misc/pwd-unreadable-parent: Rather than trying to decide
3285 whether this test has a chance of succeeding, run it only when
3286 $(host_os) is linux-gnu. It was failing on powerpc-apple-darwin8.8.0
3287 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
3289 * tests/misc/pwd-long: Also allow "+" in $PWD.
3291 Remove another coreutils-ism. Formatting cleanup.
3292 * Makefile.maint (my-distcheck): Update an outdated comment.
3293 (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
3294 (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
3296 2007-03-01 Jim Meyering <jim@meyering.net>
3298 * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
3299 (my-distcheck): Use the new variable, instead of too-long literal.
3301 Make "make syntax-check" rules less coreutils-specific.
3302 * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
3303 (sc_cast_of_alloca_return_value): Likewise.
3304 (sc_root_tests): Do nothing if there is no check-root target
3305 in tests/Makefile.am.
3307 Run the writable-files check only for release-building targets.
3308 * Makefile.maint (local-checks-available): Remove writable-files.
3309 (alpha beta major): Put it here, instead.
3311 "make syntax-check" now runs only Makefile.cfg-selected tests
3312 * Makefile.maint (syntax-check-rules): Hoist this definition so that
3313 it precedes the indirect use in the definition of $(local-check).
3314 (local-check): Use :=, not just "=".
3315 (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
3317 2007-02-28 Bruno Haible <bruno@clisp.org>
3319 * bootstrap.conf (gnulib_modules): Replace xreadlink with
3320 xreadlink-with-size. Add xreadlink.
3321 * src/copy.c (copy_internal): Update.
3322 * src/ls.c (is_directory): Update.
3323 * src/stat.c (print_stat): Update.
3324 * src/readlink.c (main): Use the one-argument xreadlink function.
3326 2007-02-28 Paul Eggert <eggert@cs.ucla.edu>
3328 * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
3329 Problem reported by Philip Rowlands in
3330 <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
3332 2007-02-28 Jim Meyering <jim@meyering.net>
3334 * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
3335 list of exceptions, for the "make distcheck" sc_file_system rule.
3337 * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
3339 2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
3341 Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
3342 * NEWS: With -P, the default block size and output format is not
3343 affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
3344 * src/df.c (main): Implement this.
3346 2007-02-27 Jim Meyering <jim@meyering.net>
3348 Add a test for the above.
3349 * tests/misc/df-P: New file.
3350 * tests/misc/Makefile.am (TESTS): Add df-P.
3352 2007-02-25 Jim Meyering <jim@meyering.net>
3354 * Makefile.maint (announcement): Adjust so that it works with
3355 announce-gen's --gnulib-snapshot-time-stamp option.
3356 Indent one of the command lines using TAB, not 8 spaces.
3358 Post-release version change.
3359 * NEWS: Add a line for 6.8+.
3360 * configure.ac (AC_INIT): Set new version string.
3362 2007-02-24 Jim Meyering <jim@meyering.net>
3365 * NEWS: Record release date and new version number.
3366 * configure.ac (AC_INIT): New version number.
3368 Don't skip this test on new-enough Linux/GNU systems.
3369 * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
3370 rather than for __GETCWD_PREFIX in config.h (the latter is no
3371 longer defined, ever, due to gnulib changes).
3372 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
3374 Remove the "gnits" option; it prohibits my using "+" as a version
3375 string suffix, and all it does (beyond the default "gnu" option)
3376 is to _require_ the THANKS file.
3377 * configure.ac (AM_INIT_AUTOMAKE): Remove it.
3379 Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
3380 * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
3381 * tests/chown/Makefile.am, tests/cp/Makefile.am:
3382 * tests/du/Makefile.am, tests/expr/Makefile.am:
3383 * tests/factor/Makefile.am, tests/general/Makefile.am:
3384 * tests/install/Makefile.am, tests/ln/Makefile.am:
3385 * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
3386 * tests/mv/Makefile.am, tests/readlink/Makefile.am:
3387 * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
3388 * tests/seq/Makefile.am, tests/stty/Makefile.am:
3389 * tests/tee/Makefile.am, tests/touch/Makefile.am:
3391 * README: Document the OSF/1 4.0d build failure and work-around.
3392 Reported by Bruno Haible.
3394 * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
3396 * configure.ac: Use 6.7+, not 6.7-dirty.
3398 2007-02-24 Paul Eggert <eggert@cs.ucla.edu>
3400 * NEWS: sort no longer compresses temporaries by default.
3401 * bootstrap.conf: Remove findprog.
3402 * doc/coreutils.texi (sort invocation): The default is to not
3403 compress. Don't treat "" specially.
3404 * src/sort.c: Don't include findprog.h.
3405 (create_temp): Compress only if the user specified --compress-program.
3406 * tests/misc/sort-compress: Adjusts tests to match new behavior.
3408 2007-02-24 Jim Meyering <jim@meyering.net>
3410 Avoid a shell syntax error, when building with an inadequate Perl.
3411 * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
3412 it can expand to "/.../missing perl".
3414 * man/Makefile.am (.x.1): Warn when unable to update a man page.
3415 Suggestion from Bruno Haible.
3417 2007-02-23 Bruno Haible <bruno@clisp.org>
3419 Handle better the combination of old Perl and a pre-c99 compiler.
3420 * man/Makefile.am (.x.1): If the autoconf test has determined that
3421 perl is missing or not a sufficient version, do nothing.
3423 * tests/readlink/can-e: Put the closing double-quote at the end of a
3424 backquoted word, not in the middle. Works around a bug in sh on
3426 * tests/readlink/can-f: Likewise.
3427 * tests/readlink/can-m: Likewise.
3429 * tests/du/slink: Skip the test if executing on an nfsv3 file system.
3430 This avoids a test failure at least on OSF/1 4.0d.
3432 2007-02-23 Jim Meyering <jim@meyering.net>
3434 * src/date.c (usage): Split a diagnostic that had grown to be
3435 longer than the C89 maximum of 509 bytes.
3437 2007-02-23 Ed Santiago <ed@edsantiago.com>
3439 * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
3440 for a separator. Include sample RFC 2822 and 3339 output.
3442 2007-02-23 Jim Meyering <jim@meyering.net>
3444 With -Dlint, make shuf free all heap-allocated storage.
3445 * src/shuf.c (main): Move declaration of input_lines to
3446 function scope, and initialize to NULL, so we can free it.
3447 [lint]: Free all malloc'd memory.
3448 * tests/misc/shuf: Also test shuf's -e and -i options.
3450 2007-02-22 Jim Meyering <jim@meyering.net>
3452 Merge in a change from some other incarnation of this file (gzip?)
3453 * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
3455 Adjust preceding change not to perform an unaligned access.
3456 * src/copy.c (copy_reg): Undo previous change. Instead, make
3457 it clearer that we're using a single-byte sentinel, and
3458 [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
3459 Reported by Andreas Schwab.
3461 Placate valgrind, wrt ./cp --sparse=always
3462 * src/copy.c (copy_reg): Place the sentinel by setting a
3463 full word's worth of bits, not just a single byte's worth.
3464 This avoids a harmless (but distracting) case of memory being
3467 2007-02-21 Paul Eggert <eggert@cs.ucla.edu>
3469 Honor dd's noatime flag if possible, even if not supported on build fs
3470 * doc/coreutils.texi (dd invocation): Warn that noatime might not be
3472 * src/dd.c (flags, usage): Look at O_NOATIME, not
3473 HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
3474 flag, so that dd attempts O_NOATIME even if the build file system
3475 does not support it. Problem reported by Jim Meyering today in
3477 * tests/dd/misc: Generate a warning, not a failure, if noatime
3480 2007-02-21 Jim Meyering <jim@meyering.net>
3482 * tests/misc/date: Remove vestigial use of Data::Dumper.
3484 2007-02-20 Paul Eggert <eggert@cs.ucla.edu>
3486 * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
3487 about out-of-range initializer with Sun C 5.8.
3489 2007-02-20 Jim Meyering <jim@meyering.net>
3491 * bootstrap (CVS_only_file): Use README-hacking.
3493 Now that we use GIT, not cvs, rename README-cvs.
3494 * README-hacking: Renamed from...
3495 Update to reflect that we now use git.
3497 * README-cvs: ...this.
3499 * src/env.c (main): When invoked with no arguments (i.e. when printing
3500 the environment), use a local variable to iterate through the global
3501 "environ" array, rather than "environ" itself. This is solely to
3502 avoid changing the environment for an LD_PRELOAD-substituted "puts"
3503 or "exit" function. Tiny patch by Harvey Eneman. See
3504 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
3507 * bootstrap: Move definitions of temporary directory names and the
3508 new bt_regex "up" to precede all uses, so it's clearer what their
3509 scope is. Also, use [.], rather than \\., since the former works
3512 * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
3513 Based on the bison 2007-02-19 change by Joel E. Denny.
3515 2007-02-19 Paul Eggert <eggert@cs.ucla.edu>
3517 * NEWS: sort now uses a --compress-program option rather than
3518 an environment variable.
3519 * doc/coreutils.texi (sort invocation): Document this.
3520 * src/sort.c (usage): Likewise.
3521 (COMPRESS_PROGRAM_OPTION): New const.
3522 (long_options, create_temp, main): Support new option.
3523 * tests/misc/sort-compress: Test it.
3525 2007-02-19 Jim Meyering <jim@meyering.net>
3527 * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
3529 2007-02-18 Jim Meyering <jim@meyering.net>
3531 * src/system.h: Don't include exit.h, now that it's subsumed
3532 by the gnulib-generated stdlib.h.
3534 * tests/rm/fail-eacces: Skip this test when running as root.
3535 Reported by Matthew Woehlke.
3537 * bootstrap: Use "._bootmp" as the temporary directory name,
3538 not ".#bootmp". The latter's "#" caused trouble with the new,
3539 gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
3541 2007-02-14 Paul Eggert <eggert@cs.ucla.edu>
3543 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3544 * src/dircolors.c: Include c-strcase.h.
3545 (dc_parse_stream): Use c_strcasecmp rather than
3546 strcasecmp to avoid unreliable results in locales like Turkish
3547 where strcasecmp is incompatible with the C locale.
3549 2007-02-13 Jim Meyering <jim@meyering.net>
3551 Also check for and print stderr output, in case a program fails.
3552 * tests/misc/tty-eof: Occasionally (not reproducible), this
3553 test would fail, with one or more programs exiting nonzero, e.g.,
3554 tty-eof: sha224sum exited with status 1 (expected 0)
3555 Now, maybe we'll get a clue, the next time that happens.
3557 2007-02-12 Jim Meyering <jim@meyering.net>
3559 * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
3561 * tests/misc/pwd-unreadable-parent: Skip the test if we're
3562 definitely using the replacement.
3563 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
3565 2007-02-10 Jim Meyering <jim@meyering.net>
3567 Remove excess leading spaces that would make help2man misbehave.
3568 * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
3569 * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
3570 * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
3571 * src/date.c (usage): Use two spaces after each optional flag, not one.
3572 Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
3574 * Makefile.maint (longopt_re): Relax the regexp, making square
3575 brackets optional, so it matches the newly reported violations, too.
3577 * src/csplit.c (usage): Use two spaces (not one) to separate
3578 each option string from its description, so help2man formats
3579 the derived man page properly. Reported by Thomas Huriaux in
3580 <http://bugs.debian.org/410407>.
3581 * src/df.c (usage): Likewise.
3582 * src/du.c (usage): Likewise.
3583 * src/install.c (usage): Likewise.
3584 * src/ls.c (usage): Likewise.
3586 2007-02-03 Jim Meyering <jim@meyering.net>
3588 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
3589 * NEWS: Mention the bug fix.
3590 * tests/misc/pwd-unreadable-parent: New file.
3591 * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
3593 2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
3595 * NEWS: Document fix for cp --preserve=mode.
3596 * src/copy.c (copy_internal): Omit the group- or other-writeable
3597 permissions when creating a directory, to avoid a race condition
3598 if the special mode bits aren't right just after the directory is
3600 * src/cp.c (make_dir_parents_private): Likewise.
3601 * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
3604 * NEWS: Document fix for cp --parents.
3605 * src/cp.c (make_dir_parents_private): Report the error sooner with
3606 "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
3607 creating the directory, DEST/DIR.
3608 * tests/cp/cp-parents: Test for the non-race-condition bug fixed
3609 by the above change.
3611 2007-02-02 Jim Meyering <jim@meyering.net>
3613 * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
3615 * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
3616 consistent, so this can be applied with patch -p0.
3617 Reported by Matthew Woehlke.
3619 Arrange for "make check-root" to run the new root-only test.
3620 * tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux.
3623 * Makefile.maint (patch-check): Use patch with its -p2 option,
3624 since that makes this check slightly more strict.
3626 Use a directory on a loopback device mounted with -o context=...
3627 * tests/cp/cp-a-selinux: Since this test now runs mount and umount,
3628 it is a root-only one.
3630 2007-01-29 Jim Meyering <jim@meyering.net>
3633 * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
3634 determine dev/inode or upon detecting a symlink loop.
3636 * src/ls.c: Rename three global variables.
3637 (cwd_file): Rename from 'files'.
3638 (cwd_n_alloc): Rename from 'nfiles'.
3639 (cwd_n_used): Rename from 'files_index'.
3641 Shave 8 bytes off the size of "struct fileinfo".
3642 * src/ls.c (fileinfo): Put all members of type "bool" together.
3644 2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
3646 Modify "ls" to sort its data faster, using the new gnulib mpsort
3647 module rather than qsort. This is particularly a win in
3648 environments where strcoll is slow, since mpsort typically calls
3649 strcoll less often than qsort does.
3650 * bootstrap.conf (gnulib_modules): Add mpsort.
3651 * src/ls.c: Include mpsort.h.
3652 (sorted_file, sorted_file_alloc): New vars, for a new vector of
3653 pointers to the file info, for speed.
3654 (clear_files, extract_dirs_from_files, sort_files, print_current_files):
3655 (print_many_per_line, print_horizontal, print_with_commas):
3656 (calculate_columns): Set and use new vector.
3657 (initialize_ordering_vector): New function.
3659 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3661 Adjust to today's change to gnulib, which added a module for
3662 string.h to replace the little include files like strcase.h.
3663 * src/dircolors.c: Don't include strcase.h.
3664 * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
3666 2007-01-26 Jim Meyering <jim@meyering.net>
3668 * src/dd.c (advance_input_after_read_error): Change diagnostic to
3669 say "invalid file offset" rather than "screwy file offset".
3671 * .x-sc_cast_of_argument_to_free: Remove this file.
3672 * Makefile.am (EXTRA_DIST): Likewise.
3674 2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
3676 * src/sort.c (create_temp): Remove superfluous access-X_OK
3677 check. find_in_path does this for us.
3679 2007-01-24 Jim Meyering <jim@meyering.net>
3681 Remove usually-skipped test.
3682 * tests/cp/open-perm-race: Remove this file. It is subsumed
3683 by parent-perm-race.
3684 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
3685 * tests/sort/Makefile.am: Regenerate.
3687 Pass "make distcheck" again.
3688 * src/sort.c (usage): Split a diagnostic that had grown to be
3689 longer than the C89 maximum of 509 bytes.
3690 * .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
3691 FIXME: this is just temporary, while we wait to remove the offending
3692 access-calling code.
3693 * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
3694 * Makefile.maint (sc_cast_of_argument_to_free): Use the
3695 canonical, $$($(CVS_LIST_EXCEPT)).
3696 * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
3698 2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
3700 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
3701 like it will be approved. Also add --check=quiet, --check=silent
3702 as long aliases, and --check=diagnose-first as an alias for -c.
3703 * doc/coreutils.texi (sort invocation): Document this.
3704 Also, mention that sort -c can take at most one file.
3705 * src/sort.c: Implement this.
3707 (usage): Document the change.
3708 (CHECK_OPTION): New constant.
3709 (long_options): --check now takes an optional argument, and is now
3710 treated differently from 'c'.
3711 (check_args, check_types): New constant arrays.
3712 (check): New arg CHECKONLY, which suppresses diagnostic if -C.
3713 (main): Parse the new options.
3714 * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
3717 2007-01-24 Jim Meyering <jim@meyering.net>
3720 * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
3721 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
3723 Don't depend on "which".
3724 * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
3725 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
3727 2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
3729 Test sort compression.
3730 * tests/misc/Makefile.am: Add the test.
3731 * tests/misc/sort-compress: New file containing the tests.
3733 2007-01-24 Jim Meyering <jim@meyering.net>
3735 * NEWS: sort temp file compression: tweak wording.
3736 * src/sort.c (struct sortfile) [name]: Declare member to be const.
3738 2007-01-21 Jim Meyering <jim@meyering.net>
3740 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
3741 In pipe_fork callers, use these named constants, not "2" and "8".
3742 (proctab, nprocs): Declare to be "static".
3743 (pipe_fork) [lint]: Initialize local, pid,
3744 to avoid unwarranted may-be-used-uninitialized warning.
3745 (create_temp): Use the active voice. Describe parameters, too.
3747 2007-01-21 James Youngman <jay@gnu.org>
3749 Centralize all the uses of sigprocmask(). Don't restore an invalid
3751 * src/sort.c (enter_cs, leave_cs): New functions for protecting
3752 code sequences against signal delivery.
3753 * (exit_cleanup): Use enter_cs and leave_cs instead of
3754 calling sigprocmask directly.
3755 (create_temp_file, pipe_fork, zaptemp): Likewise
3757 2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
3759 Add compression of temp files to sort.
3760 * NEWS: Mention this.
3761 * bootstrap.conf: Import findprog.
3762 * configure.ac: Add AC_FUNC_FORK.
3763 * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
3765 * src/sort.c (compress_program): New global, holds the name of the
3766 external compression program.
3767 (struct sortfile): New type used by mergepfs and friends instead
3768 of filenames to hold PIDs of compressor processes.
3769 (proctab): New global, holds compressor PIDs on which to wait.
3770 (enum procstate, struct procnode): New types used by proctab.
3771 (proctab_hasher, proctab_comparator): New functions for proctab.
3772 (nprocs): New global, number of forked but unreaped children.
3773 (reap, reap_some): New function, wait for/cleanup forked processes.
3774 (register_proc, update_proc, wait_proc): New functions for adding,
3775 modifying and removing proctab entries.
3776 (create_temp_file): Change parameter type to pointer to file
3777 descriptor, and return type to pointer to struct tempnode.
3778 (dup2_or_die): New function used in create_temp and open_temp.
3779 (pipe_fork): New function, creates a pipe and child process.
3780 (create_temp): Creates a temp file and possibly a compression
3781 program to which we filter output.
3782 (open_temp): Opens a compressed temp file and creates a
3783 decompression process through which to filter the input.
3784 (mergefps): Change FILES parameter type to struct sortfile array
3785 and update access accordingly. Use open_temp and reap_some.
3786 (avoid_trashing_input, merge): Change FILES parameter like
3787 mergefps and call create_temp instead of create_temp_file.
3788 (sort): Call create_temp instead of create_temp_file.
3790 (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
3792 The idea of compressing sorts temporary files was first
3793 suggested/implemented by Jay Soffian in 1998, and again
3794 by Charles Randall in 2001.
3796 2007-01-20 Jim Meyering <jim@meyering.net>
3798 * tests/misc/pwd-long: Work properly even when run from the
3799 wrong one of two or more bind-mounted sibling directories.
3800 Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
3802 2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
3804 Standardize on list of signals when an app catches signals.
3805 * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
3806 SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
3807 * src/ls.c (main): Likewise (except SIGPIPE was already caught).
3808 Note that ls.c is special, as it also catches SIGTSTP.
3809 * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
3810 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
3812 2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
3813 and Paul Eggert <eggert@cs.ucla.edu>
3815 * src/sort.c (cleanup): Clear temphead at the end.
3816 (exit_cleanup): New function.
3817 (main): Don't invoke atexit until we're ready.
3818 Invoke it with exit_cleanup, not with cleanup and close_stdout,
3819 to avoid a race condition with cleanup and signal handling. More
3820 details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
3822 2007-01-18 Jim Meyering <jim@meyering.net>
3824 * src/c99-to-c89.diff: Adjust remove.c offsets.
3826 2007-01-17 Jim Meyering <jim@meyering.net>
3828 Make "rm --interactive=never ..." never prompt.
3829 * NEWS: Mention this.
3830 * src/remove.h (enum rm_interactive): New ternary type.
3831 (struct rm_options) [interactive]: Use it, here -- rather than bool.
3832 * src/remove.c (prompt): Reflect type change.
3833 * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
3834 * src/rm.c (main): Add a FIXME comment for '-d' option.
3835 Adapt to type change of rm_options.interactive.
3837 * tests/rm/i-never: New file. Test for the above fix.
3838 * tests/rm/Makefile.am (TESTS): Add i-never.
3840 2007-01-15 Jim Meyering <jim@meyering.net>
3842 * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
3843 emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
3844 but that's ok, since fts_.h will eventually be renamed.
3846 * src/remove.c (remove_dir): Don't use errno in diagnostic.
3847 Root-only test failure reported by Alex van Hout and Jon Grosshart in
3848 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
3850 * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
3851 s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
3853 2007-01-14 Bruno Haible <bruno@clisp.org>
3855 Enable use of gnulib's new fchdir module.
3856 * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
3857 since we use canonicalize.
3858 (gnulib_modules): Add fchdir.
3859 * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
3861 2007-01-13 Jim Meyering <jim@meyering.net>
3863 * tests/cp/open-perm-race: Remove gdb-based test.
3864 It would run only when compiled with -g, and besides is now
3865 subsumed by file-perm-race.
3866 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
3868 * Transform all Makefile.am files so that when running "make check",
3869 CU_TEST_NAME is set to the name of the test. This is so that when I
3870 run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
3871 on the entire package it is more convenient to map a leak or error
3872 found in a valgrind log file back to the offending test.
3874 (echo tests/Makefile.am.in; find tests -name Makefile.am) \
3875 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
3876 -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
3878 2007-01-11 Jim Meyering <jim@meyering.net>
3880 Avoid a leak in expr's implementation of the ":" (match) operator.
3881 * src/expr.c (docolon): Free the regexp buffer using regfree, rather
3882 than doing it manually, being careful to set fastmap to NULL first.
3883 Free any re_regs.start and .end members, if necessary.
3885 * tests/misc/test-diag: Work also when libc's error function
3886 reports the entire program name ("../../src/test"), rather than
3887 just the final component.
3889 2007-01-10 Jim Meyering <jim@meyering.net>
3891 Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
3892 * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
3893 (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
3894 directory. Non-directory entries lack fts_statp data when using
3895 the FTS_NOSTAT option.
3897 2007-01-07 Jim Meyering <jim@meyering.net>
3899 * tests/sample-test: Update copyright date to 2007.
3900 * Makefile.maint (copyright-check): Also check the copyright date
3901 in tests/sample-test.
3903 2007-01-06 Jim Meyering <jim@meyering.net>
3905 * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
3906 based on examples from G.P. Halkes in
3907 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
3909 2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
3911 * src/fmt.c (copy_rest): Correct prefix handling.
3912 Don't elide a line with the prefix followed by only white space.
3913 (get_line): Move EOF-check to loop-termination condition.
3914 * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
3915 (pfx-2): Remove test; its premise was contrary to the documentation.
3917 2007-01-05 Jim Meyering <jim@meyering.net>
3919 Avoid a used-uninitialized bug for invalid input, i.e., when the size
3920 of the input, not counting newlines, is 1 % 4.
3921 * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
3922 It may be smaller when flushing.
3924 2007-01-05 Mike Frysinger <vapier@gentoo.org>
3926 * src/dircolors.hin: Add a TERM directive for cons25.
3928 2007-01-04 Jim Meyering <jim@meyering.net>
3930 * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
3931 case you don't have convenient access to glibc info documentation.
3933 Use the release year, not the current year.
3934 * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
3935 * src/Makefile.am (RELEASE_YEAR): Define it.
3937 Thanks to a prod from Eric Blake.
3939 Ensure that "group --version" always prints the current year.
3940 * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
3941 * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
3942 Suggestion from Eric Blake.
3944 When decoding, always allow newlines in input, with almost no
3946 * src/base64.c (do_decode): Initialize decode context.
3947 Call base64_decode one more time, after all input is processed.
3948 (usage): When decoding, newlines are always accepted.
3950 * tests/misc/base64: Add a bunch of tests, for the above.
3951 * gl/lib/base64.c: Include <string.h>.
3952 (base64_decode_ctx_init, get_4, decode_4): New functions.
3953 (base64_decode): Efficiently handle interspersed newlines.
3954 (base64_decode_alloc): Update signature.
3955 * gl/lib/base64.h (struct base64_decode_context): Define.
3956 (base64_decode_ctx_init): Add prototype.
3957 (base64_decode, base64_decode_alloc): Update prototypes.
3959 * gl/lib/base64.c: Copied from gnulib.
3960 * gl/lib/base64.h: Likewise.
3962 2007-01-03 Jim Meyering <jim@meyering.net>
3964 * THANKS: Add Evan Hunt.
3966 2007-01-03 Bruno Haible <bruno@clisp.org>
3968 Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
3969 * tests/chown/deref: Apply lang-default.
3970 * tests/misc/split-a: Likewise.
3971 * tests/mv/reply-no: Likewise.
3973 * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
3976 2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
3978 Now, "ls -FRL" always follows symbolic links on Linux.
3979 * NEWS: Mention this bug fix.
3980 * src/ls.c (gobble_file): Fix bug reported by
3981 Nobuyuki Tsuchimura in
3982 http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
3983 where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
3984 * tests/ls/follow-slink: Add a test for this case.
3986 2007-01-01 Jim Meyering <jim@meyering.net>
3988 * tests/rm/fail-eperm: Revert last change. The PATH=... setting
3989 is not honored at least on HP-UX 11.23 systems.
3990 Instead, simply transform the actual output diagnostic.
3991 Test failure reported by Bob Proulx.
3993 2006-12-30 Jim Meyering <jim@meyering.net>
3995 * bootstrap (gnulib_extra_files): Remove announce-gen.
3996 * bootstrap.conf (gnulib_modules): Add it here instead, now that
3999 * tests/misc/base64: Factor a long, repetitive string.
4001 * src/c99-to-c89.diff: Adjust remove.c offsets.
4003 Clean up after the change of 2006-12-28.
4004 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
4005 now that this function never modifies the pointer. Adjust comments
4006 and code accordingly.
4007 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
4008 now that AD_pop_and_chdir no longer does that.
4010 * tests/rm/fail-eperm: Avoid spurious differences (the error function
4011 from latest glibc no longer prints the full program_name): so don't
4012 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
4014 * tests/mv/acl (skip): Skip this test also if the destination
4015 directory, which is on a different file system, lacks ACL support.
4017 * src/copy.c (copy_reg): Rewrite a comment that was rendered
4018 inaccurate by the 2006-10-18 change.
4020 2006-12-28 Jim Meyering <jim@meyering.net>
4022 When moving "up" the hierarchy, be careful to remove a just-emptied
4023 directory before opening ".", to avoid trouble with file system
4024 implementations that cache readdir results at opendir-time.
4025 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
4026 Don't update **DIRP. Don't call fdopendir here.
4027 (remove_dir): Call fdopendir here instead.
4028 Report and patch from Mikulas Patocka:
4029 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
4031 2006-12-27 Jim Meyering <jim@meyering.net>
4033 * src/tail.c (usage): Mention +N for --bytes and --lines.
4034 Suggestion from Evan Hunt.
4036 2006-12-26 Jim Meyering <jim@meyering.net>
4038 * configure.ac: Require autoconf-2.61 and automake-1.10.
4039 Without the former (even with autoconf-2.60), "make distcheck"
4040 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
4041 due to an inttypes.h generated with CFLAGS including -pedantic.
4042 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
4044 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
4045 tag, using the release version number as the message.
4046 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
4048 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
4050 * NEWS: dd bs= operands now silently override later ibs= and obs=,
4052 * src/dd.c (scanargs): Implement it.
4053 * tests/dd/misc (outbytes): Test it.
4054 * doc/coreutils.texi (dd invocation): Specify that bs=N
4055 overrides later ibs and obs, undoing part of the
4056 previous change. (The behavior was wrong.)
4058 2006-12-20 Jim Meyering <jim@meyering.net>
4060 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
4061 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
4062 Don't let a non-directory get by with errno == EPERM, either.
4063 Check the file type directly (using cached stat value), rather
4064 than trying to guess it from errno values.
4065 Karl Berry reported that a cross-partition "mv /etc/issue ~"
4066 failed with the um,... suboptimal diagnostic,
4067 "mv: cannot remove `/etc/issue': Not a directory".
4068 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
4069 * tests/rm/fail-eacces: New file.
4070 * NEWS: Mention that both mv and rm are affected.
4072 "cut -f 2- A B" no longer triggers a double-free bug
4073 * src/cut.c (cut_fields): Set file-scoped global to NULL after
4074 freeing it. This avoids a double-free (and core dump on some systems)
4075 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
4076 James Hunt in <http://bugzilla.redhat.com/220312>.
4077 * NEWS: List this bug fix.
4078 * THANKS: Mention him.
4079 * tests/misc/cut: New file.
4080 * tests/misc/Makefile.am (TESTS): Add cut.
4082 2006-12-15 Jim Meyering <jim@meyering.net>
4084 * tests/cp/open-perm-race: Correct the gdb-existence check.
4085 Don't run either subsequent gdb command in a sub-shell.
4086 Reported by Thomas Schwinge.
4087 * THANKS: bring up to date.
4089 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
4091 Make sure cp -p isn't too generous with file permissions.
4092 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
4093 * tests/cp/file-perm-race: New file.
4095 Ensure cp -pR --parents isn't too generous with parent permissions.
4096 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
4097 * tests/cp/parent-perm-race: New file.
4099 2006-12-14 Jim Meyering <jim@meyering.net>
4101 * tests/chgrp/default-no-deref: Don't assume that files are created
4102 with the primary group by default. That's not true in a directory
4103 with the set-GID bit set.
4105 Don't hang when there's no input tty.
4106 * tests/cp/open-perm-race: Skip this test if there is no
4107 controlling input `terminal'.
4109 Test for a hard-to-detect race fix, using gdb.
4110 * tests/cp/open-perm-race: New file, to test for the
4111 cp --preserve=ownership fix of 2006-12-06.
4113 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
4114 (TESTS): Add open-perm-race.
4116 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
4117 * src/chown.c (main): Likewise.
4118 * src/chown-core.c (change_file_owner): Add to a comment.
4119 * tests/chown/preserve-root: Add tests.
4121 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
4122 * src/chmod.c (process_file): Do honor the --preserve-root option.
4123 * src/chown-core.c (change_file_owner): Likewise, but here, also
4124 handle the case in which a traversal would go "through" a symlink
4125 to root. Reported by Matthew M. Boedicker
4126 * tests/chown/preserve-root: Test for the above.
4127 * tests/chown/Makefile.am (TESTS): Add preserve-root.
4129 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
4130 to gnulib's m4/openat.m4.
4132 2006-12-13 Andreas Schwab <schwab@suse.de>
4134 Don't fail if mv/acl test succeeds.
4135 * tests/mv/acl (skip): Check for acl support in the file system.
4136 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
4137 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
4139 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
4141 Remove some arbitrary restrictions on size fields, so that
4142 commands like "sort -k 18446744073709551616" no longer fail merely
4143 because 18446744073709551616 doesn't fit in uintmax_t. The trick
4144 is that these fields can all be treated as effectively infinity;
4145 their exact values don't matter, since no internal buffer can be
4147 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
4148 ULONG_MAX if the code assumes this. Silently truncate too-large
4149 values to SIZE_MAX, as the remaining code will do the right thing
4151 * src/sort.c (parse_field_count): Likewise.
4152 * src/uniq.c (size_opt, main): Likewise.
4153 * tests/join/Test.pm (bigfield): New test.
4154 * tests/sort/Test.pm (bigfield): New test.
4155 * tests/uniq/Test.pm (121): New test.
4157 2006-12-13 Jim Meyering <jim@meyering.net>
4159 * tests/chgrp/default-no-deref: New test.
4160 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
4162 2006-12-12 Jim Meyering <jim@meyering.net>
4164 * src/system.h (SETVBUF): Remove definition, now that the
4165 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
4166 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
4167 * src/od.c (open_next_file): Likewise.
4169 2006-12-09 Jim Meyering <jim@meyering.net>
4171 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
4172 "source". I.e. "GNU coreutils 6.7".
4174 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
4175 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
4176 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
4178 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
4179 whenever uniq is expected to fail. This should catch the other case
4180 [test #112] in which uniq emits "cat: write error: Broken pipe" on
4183 2006-12-08 Jim Meyering <jim@meyering.net>
4185 Include bootstrap tool version info in the announcement form.
4186 * Makefile.maint (gnulib_snapshot_date): Define.
4187 (announcement): Use two new announce-gen options,
4188 --bootstrap-tools and --gnulib-snapshot-date.
4189 * Makefile.cfg (gnulib_dir): Set.
4191 Post-release version change.
4192 * NEWS: Add a line for 6.8-dirty.
4193 * configure.ac (AC_INIT): Set new version string.
4195 2006-12-07 Jim Meyering jim@meyering.net
4198 * NEWS: Record release date. Remove '-pre' suffix.
4199 * configure.ac (AC_INIT): Remove version string suffix.
4201 2006-12-07 Jim Meyering <jim@meyering.net>
4203 Make the output of "make check" more reproducible.
4204 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
4205 evoke diagnostics like this when COLUMNS=0 in the environment:
4206 ls: ignoring invalid width in environment variable COLUMNS: 0
4207 * tests/touch/no-rights: Likewise.
4208 * tests/help-version: Likewise.
4209 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
4210 118, since it emits "cat: write error: Broken pipe" on some systems.
4212 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
4214 * NEWS: Document the cp -p fix for special bits.
4215 * src/copy.c (set_owner): Now returns a three-way result, so
4216 that the caller can clear the special bits. All callers changed.
4217 (copy_reg): Don't set the special bits if chown failed.
4218 (copy_internal): Likewise.
4219 * tests/cp/special-bits: Test this fix.
4221 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
4223 * NEWS: Document the cp --preserve=ownership fix.
4224 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
4225 * src/copy.c (fchmod_or_lchmod): New function.
4226 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
4227 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
4228 When creating a file, use O_EXCL, so we're more likely to detect
4229 funny business by other processes. At the end, if permissions
4230 were omitted, chmod them back in.
4231 (copy_internal): If the ownership might change, omit some permissions
4232 at first, then restore them after chowning the file.
4233 * src/cp.c (make_dir_parents_private): Likewise.
4234 * src/copy.c (cached_umask): New function.
4235 * src/copy.h (cached_umask): New decl.
4237 2006-12-06 Jim Meyering <jim@meyering.net>
4239 Make the output of "make check" more reproducible.
4240 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
4242 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
4244 * src/install.c (install_file_in_file): Preserve time stamps
4245 before changing owner or file mode bits, for consistency with
4246 other coreutils programs.
4248 2006-12-03 Jim Meyering <jim@meyering.net>
4250 * tests/misc/date-sec: Output a fixed string.
4252 * NEWS: du --one-file-system (-x) would skip subdirectories of any
4253 directory listed as second or subsequent command line argument.
4254 * tests/du/one-file-system: New file. Test for today's fts.c fix.
4255 * tests/du/Makefile.am (TESTS): Add one-file-system.
4256 Reported by Mike Frysinger.
4258 2006-12-02 Jim Meyering <jim@meyering.net>
4260 * tests/du/basic: Generate 4KB file simply using printf, rather than
4261 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
4263 2006-11-28 Jim Meyering <jim@meyering.net>
4265 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
4266 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
4267 Reported by Matthew Woehlke.
4269 * tests/mv/dir2dir: Also accept EBUSY.
4270 Reported by Matthew Woehlke.
4272 2006-11-27 Jim Meyering <jim@meyering.net>
4274 * Makefile.maint (patch-check): Rewrite to diagnose failure.
4275 * src/c99-to-c89.diff: Adjust shred.c offsets.
4277 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
4279 Improve the check for departures from C89, and fix the departures
4281 * Makefile.maint (my-distcheck): Also check for C89 compatibility
4282 as best we can with GCC.
4283 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
4284 declaration; C89 doesn't allow this.
4285 * src/dcgen: Don't generate string literals longer than
4286 what C89 requires support for.
4287 * src/cut.c (usage): Don't use string literals longer than
4288 what C89 requires support for.
4289 * src/date.c (usage): Likewise.
4290 * src/dd.c (usage): Likewise.
4291 * src/du.c (usage): Likewise.
4292 * src/ls.c (usage): Likewise.
4293 * src/od.c (usage): Likewise.
4294 * src/readlink.c (usage): Likewise.
4295 * src/seq.c (usage): Likewise.
4296 * src/shred.c (usage): Likewise.
4298 2006-11-26 Mike Frysinger <vapier@gentoo.org>
4300 Recognize new archive, audio and image formats.
4301 Give audio files a separate color.
4302 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
4303 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
4304 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
4305 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
4306 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
4307 audio color to 00;36 to differentiate from image/video color.
4309 2006-11-26 Jim Meyering <jim@meyering.net>
4311 * Makefile.maint (patch-check): Compile patched sources with
4312 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
4313 no violations remain.
4315 * src/c99-to-c89.diff: Remove 3 bogus hunks.
4317 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
4320 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
4322 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
4324 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
4326 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
4327 while trying to retain the readability of C99 as much as possible.
4328 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
4329 Replace each of two uses with literal AT_FDCWD.
4330 (cache_stat_init): Return its argument, for convenience.
4331 Update the caller in remove_dir.
4332 (AD_pop_and_chdir): Return prev_dir rather than storing through
4333 a pointer argument. All uses changed.
4334 (AD_ensure_initialized): New function.
4335 (AD_mark_helper): Use it, to avoid the need for declaration
4337 (rm): Move cycle_check_init call into callee...
4339 Use an else clause in place of a "continue" statement.
4340 (close_preserve_errno): Remove.
4341 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
4343 2006-11-25 Jim Meyering <jim@meyering.net>
4345 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
4347 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
4349 * tests/du/inacc-dest: Skip this test when running as root.
4351 2006-11-23 Jim Meyering <jim@meyering.net>
4353 * announce-gen: Remove file. It's moving to gnulib.
4354 * bootstrap: Pull it from gnulib/build-aux instead.
4355 * Makefile.maint (announcement): Reflect move to ./build-aux.
4357 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
4358 rather than a pipeline that would sometimes evoke a diagnostic
4359 like "seq: write error: Broken pipe".
4361 * tests/help-version: Suppress dd transfer rate output.
4363 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
4365 2006-11-22 Jim Meyering <jim@meyering.net>
4367 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
4368 change "(:?..." to "(?:..." in regexps.
4370 Post-release version change.
4371 * NEWS: Add a line for 6.7-pre.
4372 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
4375 * NEWS: Record release date. Remove "-pre" suffix.
4376 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
4378 * announce-gen: Remove unused --release-archive-directory option.
4379 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
4381 Match version numbers in NEWS using tighter regular expressions.
4382 (main): Require the --gpg-key-id=ID option.
4383 * Makefile.maint (announcement): Don't use now-removed
4384 --release-archive-directory=... option.
4386 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
4388 2006-11-21 Jim Meyering <jim@meyering.net>
4390 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
4391 skip the test rather than failing. Reported by Michael Deutschmann.
4393 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
4394 rather than just "exit N".
4396 Arrange for "make check-root" to run the new root-only test.
4397 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
4400 2006-11-20 Jim Meyering <jim@meyering.net>
4402 Add a root-only test for today's lib/idcache.c fix.
4403 * tests/ls/nameless-uid: New file.
4404 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
4405 (TESTS_ENVIRONMENT): Add PERL to the list.
4407 2006-11-19 Jim Meyering <jim@meyering.net>
4409 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
4410 find the 7-second sleep annoyingly long. Besides, this test is
4411 probably far too specific and timing sensitive ever to trigger again.
4412 * tests/tail-2/assert: Likewise.
4414 Post-release version change.
4415 * NEWS: Add a line for 6.6-pre.
4416 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
4419 * NEWS: Record release date. Remove "-cvs" suffix.
4420 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4422 2006-11-18 Jim Meyering <jim@meyering.net>
4424 "ln --backup f f" produces a misleading diagnostic:
4425 ln: creating hard link `f' => `f': No such file or directory
4426 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
4427 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
4428 * tests/ln/Makefile.am (TESTS): Add hard-backup.
4429 * tests/ln/hard-backup: New test for the above.
4430 * NEWS: Mention this fix.
4432 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
4434 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
4436 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
4437 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
4438 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
4439 Omit unnecessary parenthesization of args.
4440 * src/od.c (EQUAL_BLOCKS): Likewise.
4441 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
4443 2006-11-16 Jim Meyering <jim@meyering.net>
4445 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
4446 automake we're skipping this test), and give a diagnostic to tell
4447 the user the same thing. Reported by Mike Grayson.
4449 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4451 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
4452 with `$(MAN)', computed at configure time; also, list them ...
4453 (optional_mans): ... in this new variable.
4454 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
4456 2006-11-16 Jim Meyering <jim@meyering.net>
4458 Help valgrind see that there is no leak in dd.c.
4459 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
4460 so we need not free them at all. This is easier than freeing
4461 both buffers at each of the early "return"s.
4463 * src/csplit.c (load_buffer): Plug an inconsequential leak.
4465 2006-11-15 Jim Meyering <jim@meyering.net>
4467 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
4468 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
4470 2006-11-14 Jim Meyering <jim@meyering.net>
4472 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
4473 remove the now-unnecessary use of AC_LIBSOURCES.
4475 Adapt to new version of gnulib-tool.
4476 * gl/modules/root-dev-ino: New file.
4477 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
4478 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
4479 * m4/root-dev-ino.m4: Move this file ...
4480 * gl/m4/root-dev-ino.m4: ... to here.
4482 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
4484 2006-11-13 Jim Meyering <jim@meyering.net>
4486 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
4489 Plug another technically-unimportant leak in sort.
4490 * src/sort.c (main): Don't allocate memory for each new key here.
4491 (insertkey): Allocate memory for each key here, instead.
4492 (key_init): Rename from new_key. Don't allocate.
4494 * src/sort.c (main): Plug a tiny memory leak.
4495 Move declaration of local "minus" down to be nearer point of use.
4497 2006-11-12 Jim Meyering <jim@meyering.net>
4499 du would exit early, when encountering an inaccessible directory
4500 Reported by Mike Frysinger, in
4501 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
4502 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
4503 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
4504 diagnostic from the expected output when using native fdopendir.
4505 * tests/chmod/no-x: Likewise.
4506 * tests/du/no-x: Likewise.
4507 * NEWS: Mention this bug fix.
4508 * tests/du/Makefile.am (TESTS): Add inacc-dest.
4510 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
4511 for xalloc.h itself.
4513 Avoid false-positive when testing via valgrind.
4514 * tests/mv/atomic: Grep strace output for a more specific pattern
4515 than just "unlink", since that got a false positive when testing
4516 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
4517 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
4519 2006-10-28 Jim Meyering <jim@meyering.net>
4521 * Makefile.maint (patch-check): Make it easier to regenerate
4522 the src/c99-to-c89.diff file. E.g., I do this:
4523 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
4525 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
4527 2006-10-26 Jim Meyering <jim@meyering.net>
4529 * src/system.h (ftello): Add a compile-time check for the highly
4530 unlikely condition of off_t narrower than long int, rather than
4531 handling it at run time. Based on a patch from Paul Eggert.
4533 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
4535 * tests/chmod/c-option: When double-quoting part of a word, prefer
4536 to double-quote the whole word. This is a bit easier to read (at
4537 least for me), and in some cases it avoids a shell bug with Tru64
4538 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
4539 "$abs_srcdir"/../setgid-check we now write
4540 "$abs_srcdir/../setgid-check".
4541 * tests/cp/cp-parents: Likewise.
4542 * tests/du/inaccessible-cwd: Likewise.
4543 * tests/du/long-from-unreadable: Likewise.
4544 * tests/install/basic-1: Likewise.
4545 * tests/install/trap: Likewise.
4546 * tests/misc/close-stdout: Likewise.
4547 * tests/mkdir/concurrent-1: Likewise.
4548 * tests/mkdir/p-1: Likewise.
4549 * tests/mkdir/p-3: Likewise.
4550 * tests/mkdir/parents: Likewise.
4551 * tests/mkdir/perm: Likewise.
4552 * tests/readlink/can-e: Likewise.
4553 * tests/readlink/can-f: Likewise.
4554 * tests/readlink/can-m: Likewise.
4555 * tests/rm/inaccessible: Likewise.
4556 * tests/rm/unread3: Likewise.
4557 * tests/touch/no-create-missing: Likewise.
4559 * lib/.cvsignore: Add uinttostr.c.
4561 2006-10-25 Jim Meyering <jim@meyering.net>
4563 Portability to Tru64 V4.0.
4564 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
4565 Define inline replacement function.
4566 This (along with a yesterday's fix for autoconf's
4567 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
4568 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
4570 2006-10-25 Bruno Haible <bruno@clisp.org>
4572 * src/cat.c (infile): Add "const" to declaration.
4573 * src/csplit.c (prefix): Likewise.
4574 * src/printf.c (cfcc_msg): Likewise.
4575 * src/tail.c (valid_file_spec): Likewise.
4576 * src/cut.c (cut_file): Likewise, for a parameter.
4577 * src/expr.c (str_value): Likewise.
4578 * src/fold.c (fold_file): Likewise.
4579 * src/pr.c (init_header): Likewise.
4580 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
4581 * src/tr.c (make_printable_str): Likewise.
4582 * src/nl.c (body_type, header_type, footer_type, current_type):
4583 (separator_str, build_type_arg, nl_file): Likewise, for many.
4584 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
4585 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
4587 2006-10-25 Jim Meyering <jim@meyering.net>
4589 * tests/sample-test: Update copyright year list to include only
4590 the current year, since this is what I'll want in any new test.
4592 2006-10-24 Jim Meyering <jim@meyering.net>
4594 * src/c99-to-c89.diff: Update to reflect new offsets.
4596 * NEWS: new feature: rm accepts new option: --one-file-system
4597 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
4598 * src/remove.h (struct rm_options) [one_file_system]: New member.
4599 * src/rm.c (rm_option_init): Initialize it.
4600 (usage): Document the option.
4601 * src/mv.c (rm_option_init): Likewise.
4602 * src/remove.c (remove_dir): With --one-file-system and --recursive,
4603 for each directory command line argument, do not affect a file system
4604 different from that of the starting directory. And give a diagnostic.
4605 * src/rm.c (ONE_FILE_SYSTEM): New enum.
4606 (main): Handle new option.
4607 * tests/rm/one-file-system: Test the above.
4608 * tests/rm/Makefile.am (TESTS): Add one-file-system.
4609 * tests/Makefile.am (check-root): Add the rm/one-file-system
4611 (EXTRA_DIST): Add other-fs-tmpdir.
4613 * tests/mv/setup: Removed. Renamed to...
4614 * tests/other-fs-tmpdir: ...this new file.
4615 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
4616 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
4617 * tests/mv/backup-is-src: Likewise.
4618 * tests/mv/hard-link-1: Likewise.
4619 * tests/mv/leak-fd: Likewise.
4620 * tests/mv/mv-special-1: Likewise.
4621 * tests/mv/part-fail: Likewise.
4622 * tests/mv/part-hardlink: Likewise.
4623 * tests/mv/part-rename: Likewise.
4624 * tests/mv/part-symlink: Likewise.
4625 * tests/mv/partition-perm: Likewise.
4626 * tests/mv/to-symlink: Likewise.
4627 * tests/mv/into-self-2: Likewise.
4629 Don't let a failure in one test stop "make -k" from running the others.
4630 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
4631 (check-root): Depend on them, rather than executing the five
4632 commands in a single rule. Reported by Greg Schafer.
4634 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
4636 * Makefile.maint (alpha beta major): Use a better log message for
4637 the automatic commit of .prev-version.
4639 2006-10-23 Jim Meyering <jim@meyering.net>
4641 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
4642 pwd via a shell. Instead, ensure that the absolute name of the
4643 pwd binary consists solely of reasonable characters.
4644 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
4645 clean-up code isn't run.
4647 * NEWS: Add a line for 6.5-cvs.
4648 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
4650 2006-10-22 Jim Meyering <jim@meyering.net>
4654 * NEWS: Record the 6.4 release date.
4655 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4657 * Makefile.maint: Complete the adaptation to function with a working
4658 directory that is using git (rather than cvs) for version control.
4660 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4662 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
4663 * tests/cp/cp-parents: Likewise.
4664 * tests/mkdir/parents: Likewise.
4665 * tests/mkdir/perm: Likewise.
4667 * tests/sample-test: Quote variables containing absolute build
4668 tree paths. In the cleanup trap, make sure `cd' succeeds before
4669 `chmod'ing and `rm'ing the temporary files.
4670 * tests/chgrp/basic: Likewise.
4671 * tests/chgrp/deref: Likewise.
4672 * tests/chgrp/no-x: Likewise.
4673 * tests/chgrp/posix-H: Likewise.
4674 * tests/chgrp/recurse: Likewise.
4675 * tests/chmod/c-option: Likewise.
4676 * tests/chmod/equal-x: Likewise.
4677 * tests/chmod/equals: Likewise.
4678 * tests/chmod/inaccessible: Likewise.
4679 * tests/chmod/no-x: Likewise.
4680 * tests/chmod/octal: Likewise.
4681 * tests/chmod/setgid: Likewise.
4682 * tests/chmod/umask-x: Likewise.
4683 * tests/chmod/usage: Likewise.
4684 * tests/chown/basic: Likewise.
4685 * tests/chown/deref: Likewise.
4686 * tests/chown/separator: Likewise.
4687 * tests/cp/acl: Likewise.
4688 * tests/cp/backup-1: Likewise.
4689 * tests/cp/backup-dir: Likewise.
4690 * tests/cp/backup-is-src: Likewise.
4691 * tests/cp/cp-HL: Likewise.
4692 * tests/cp/cp-deref: Likewise.
4693 * tests/cp/cp-i: Likewise.
4694 * tests/cp/cp-mv-backup: Likewise.
4695 * tests/cp/cp-parents: Likewise.
4696 * tests/cp/deref-slink: Likewise.
4697 * tests/cp/dir-rm-dest: Likewise.
4698 * tests/cp/dir-slash: Likewise.
4699 * tests/cp/dir-vs-file: Likewise.
4700 * tests/cp/fail-perm: Likewise.
4701 * tests/cp/into-self: Likewise.
4702 * tests/cp/link: Likewise.
4703 * tests/cp/link-no-deref: Likewise.
4704 * tests/cp/link-preserve: Likewise.
4705 * tests/cp/no-deref-link1: Likewise.
4706 * tests/cp/no-deref-link2: Likewise.
4707 * tests/cp/no-deref-link3: Likewise.
4708 * tests/cp/perm: Likewise.
4709 * tests/cp/preserve-2: Likewise.
4710 * tests/cp/r-vs-symlink: Likewise.
4711 * tests/cp/same-file: Likewise.
4712 * tests/cp/slink-2-slink: Likewise.
4713 * tests/cp/sparse: Likewise.
4714 * tests/cp/special-bits: Likewise.
4715 * tests/cp/src-base-dot: Likewise.
4716 * tests/cp/symlink-slash: Likewise.
4717 * tests/dd/not-rewound: Likewise.
4718 * tests/dd/skip-seek2: Likewise.
4719 * tests/dd/unblock-sync: Likewise.
4720 * tests/du/2g: Likewise.
4721 * tests/du/8gb: Likewise.
4722 * tests/du/basic: Likewise.
4723 * tests/du/deref: Likewise.
4724 * tests/du/deref-args: Likewise.
4725 * tests/du/exclude: Likewise.
4726 * tests/du/fd-leak: Likewise.
4727 * tests/du/hard-link: Likewise.
4728 * tests/du/inaccessible-cwd: Likewise.
4729 * tests/du/long-from-unreadable: Likewise.
4730 * tests/du/long-sloop: Likewise.
4731 * tests/du/no-deref: Likewise.
4732 * tests/du/no-x: Likewise.
4733 * tests/du/restore-wd: Likewise.
4734 * tests/du/slash: Likewise.
4735 * tests/du/slink: Likewise.
4736 * tests/du/trailing-slash: Likewise.
4737 * tests/du/two-args: Likewise.
4738 * tests/fmt/long-line: Likewise.
4739 * tests/install/basic-1: Likewise.
4740 * tests/install/create-leading: Likewise.
4741 * tests/install/d-slashdot: Likewise.
4742 * tests/install/trap: Likewise.
4743 * tests/ln/misc: Likewise.
4744 * tests/ln/target-1: Likewise.
4745 * tests/ls/color-dtype-dir: Likewise.
4746 * tests/ls/dangle: Likewise.
4747 * tests/ls/dired: Likewise.
4748 * tests/ls/file-type: Likewise.
4749 * tests/ls/follow-slink: Likewise.
4750 * tests/ls/infloop: Likewise.
4751 * tests/ls/inode: Likewise.
4752 * tests/ls/m-option: Likewise.
4753 * tests/ls/no-arg: Likewise.
4754 * tests/ls/recursive: Likewise.
4755 * tests/ls/rt-1: Likewise.
4756 * tests/ls/stat-dtype: Likewise.
4757 * tests/ls/stat-failed: Likewise.
4758 * tests/ls/stat-vs-dirent: Likewise.
4759 * tests/misc/cat-proc: Likewise.
4760 * tests/misc/close-stdout: Likewise.
4761 * tests/misc/csplit: Likewise.
4762 * tests/misc/date-sec: Likewise.
4763 * tests/misc/false-status: Likewise.
4764 * tests/misc/head-c: Likewise.
4765 * tests/misc/head-pos: Likewise.
4766 * tests/misc/mknod: Likewise.
4767 * tests/misc/nl: Likewise.
4768 * tests/misc/nohup: Likewise.
4769 * tests/misc/pathchk1: Likewise.
4770 * tests/misc/printf: Likewise.
4771 * tests/misc/printf-hex: Likewise.
4772 * tests/misc/pwd-long: Likewise.
4773 * tests/misc/shuf: Likewise.
4774 * tests/misc/sort-rand: Likewise.
4775 * tests/misc/split-a: Likewise.
4776 * tests/misc/split-fail: Likewise.
4777 * tests/misc/split-l: Likewise.
4778 * tests/misc/stat-fmt: Likewise.
4779 * tests/misc/tac-continue: Likewise.
4780 * tests/misc/wc-files0: Likewise.
4781 * tests/mkdir/concurrent-1: Likewise.
4782 * tests/mkdir/p-1: Likewise.
4783 * tests/mkdir/p-2: Likewise.
4784 * tests/mkdir/p-3: Likewise.
4785 * tests/mkdir/p-slashdot: Likewise.
4786 * tests/mkdir/p-thru-slink: Likewise.
4787 * tests/mkdir/p-v: Likewise.
4788 * tests/mkdir/parents: Likewise.
4789 * tests/mkdir/perm: Likewise.
4790 * tests/mkdir/t-slash: Likewise.
4791 * tests/mv/acl: Likewise.
4792 * tests/mv/atomic: Likewise.
4793 * tests/mv/backup-dir: Likewise.
4794 * tests/mv/childproof: Likewise.
4795 * tests/mv/diag: Likewise.
4796 * tests/mv/dir-file: Likewise.
4797 * tests/mv/dir2dir: Likewise.
4798 * tests/mv/dup-source: Likewise.
4799 * tests/mv/hard-2: Likewise.
4800 * tests/mv/hard-3: Likewise.
4801 * tests/mv/hard-4: Likewise.
4802 * tests/mv/hard-link-1: Likewise.
4803 * tests/mv/hard-verbose: Likewise.
4804 * tests/mv/i-2: Likewise.
4805 * tests/mv/i-3: Likewise.
4806 * tests/mv/i-4: Likewise.
4807 * tests/mv/i-5: Likewise.
4808 * tests/mv/i-link-no: Likewise.
4809 * tests/mv/into-self-4: Likewise.
4810 * tests/mv/leak-fd: Likewise.
4811 * tests/mv/mv-special-1: Likewise.
4812 * tests/mv/no-target-dir: Likewise.
4813 * tests/mv/part-fail: Likewise.
4814 * tests/mv/part-hardlink: Likewise.
4815 * tests/mv/part-rename: Likewise.
4816 * tests/mv/part-symlink: Likewise.
4817 * tests/mv/partition-perm: Likewise.
4818 * tests/mv/perm-1: Likewise.
4819 * tests/mv/reply-no: Likewise.
4820 * tests/mv/trailing-slash: Likewise.
4821 * tests/mv/update: Likewise.
4822 * tests/od/od-N: Likewise.
4823 * tests/od/x8: Likewise.
4824 * tests/readlink/can-e: Likewise.
4825 * tests/readlink/can-f: Likewise.
4826 * tests/readlink/can-m: Likewise.
4827 * tests/readlink/rl-1: Likewise.
4828 * tests/rm/cycle: Likewise.
4829 * tests/rm/dangling-symlink: Likewise.
4830 * tests/rm/deep-1: Likewise.
4831 * tests/rm/dir-no-w: Likewise.
4832 * tests/rm/dir-nonrecur: Likewise.
4833 * tests/rm/dot-rel: Likewise.
4834 * tests/rm/empty-inacc: Likewise.
4835 * tests/rm/f-1: Likewise.
4836 * tests/rm/fail-2eperm: Likewise.
4837 * tests/rm/hash: Likewise.
4838 * tests/rm/i-1: Likewise.
4839 * tests/rm/i-no-r: Likewise.
4840 * tests/rm/ignorable: Likewise.
4841 * tests/rm/inaccessible: Likewise.
4842 * tests/rm/interactive-always: Likewise.
4843 * tests/rm/interactive-once: Likewise.
4844 * tests/rm/ir-1: Likewise.
4845 * tests/rm/isatty: Likewise.
4846 * tests/rm/no-give-up: Likewise.
4847 * tests/rm/r-1: Likewise.
4848 * tests/rm/r-2: Likewise.
4849 * tests/rm/r-3: Likewise.
4850 * tests/rm/r-4: Likewise.
4851 * tests/rm/readdir-bug: Likewise.
4852 * tests/rm/rm1: Likewise.
4853 * tests/rm/rm2: Likewise.
4854 * tests/rm/rm3: Likewise.
4855 * tests/rm/rm4: Likewise.
4856 * tests/rm/rm5: Likewise.
4857 * tests/rm/sunos-1: Likewise.
4858 * tests/rm/unread2: Likewise.
4859 * tests/rm/unread3: Likewise.
4860 * tests/rmdir/fail-perm: Likewise.
4861 * tests/rmdir/t-slash: Likewise.
4862 * tests/shred/exact: Likewise.
4863 * tests/shred/remove: Likewise.
4864 * tests/sum/sysv: Likewise.
4865 * tests/tail-2/append-only: Likewise.
4866 * tests/tail-2/assert: Likewise.
4867 * tests/tail-2/assert-2: Likewise.
4868 * tests/tail-2/big-4gb: Likewise.
4869 * tests/tail-2/fflush: Likewise.
4870 * tests/tail-2/infloop-1: Likewise.
4871 * tests/tail-2/proc-ksyms: Likewise.
4872 * tests/tail-2/start-middle: Likewise.
4873 * tests/tail-2/tail-n0f: Likewise.
4874 * tests/tee/basic: Likewise.
4875 * tests/tee/dash: Likewise.
4876 * tests/touch/fail-diag: Likewise.
4877 * tests/touch/no-create-missing: Likewise.
4878 * tests/touch/not-owner: Likewise.
4879 * tests/touch/obsolescent: Likewise.
4880 * tests/touch/read-only: Likewise.
4881 * tests/touch/relative: Likewise.
4883 2006-10-21 Jim Meyering <jim@meyering.net>
4885 * NEWS: (cp --backup fix): Fix a typo.
4887 * .gitignore: Remove some references to files in subdirectories.
4888 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
4889 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
4891 * src/copy.c (copy_internal): Add a comment saying why we prefer
4894 Enable an fts optimization (call lstat only for directories,
4895 on some file system types) also with the --preserve-root option
4897 * src/chown-core.c (change_file_owner): Compare fts_statp-based
4898 dev/ino against root dev/ino only for directories.
4899 (chown_files): Don't let the root_dev_ino setting influence whether
4900 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
4902 2006-10-20 Jim Meyering <jim@meyering.net>
4904 * src/od.c (usage): Change description of default to use "-w16",
4905 not the now-invalid "-w 16" syntax. From Dan Jacobson.
4907 2006-10-19 Jim Meyering <jim@meyering.net>
4909 * bootstrap: Add names to each .gitignore file (if it exists)
4910 as well as to .cvsignore.
4912 * Makefile.maint (po-check): This rule didn't detect the new use
4913 of "gettext" (as opposed to the use of "_" everywhere else) in
4914 lib/xstrtol.h. Adjust the grep regexp so that now it does.
4916 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
4918 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
4919 when opening dst_name.
4920 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
4921 (SYSCALL) to test for failure in a system call.
4923 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
4924 a fifo. This preserves the special mode bits on Solaris 10, which
4925 is compatible with what Solaris 10 cp -R does.
4927 * src/copy.c (copy_internal): Remove redundant and confusing local
4930 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
4931 7777. This matches historical 'cp' behavior and avoids some
4932 (though not all) implementation-defined behavior of mkdir.
4933 * src/cp.c (make_dir_parents_private): Likewise.
4934 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
4935 than 777. This is required by POSIX. It doesn't make any difference
4936 in actual behavior on any host that I know of.
4938 2006-10-17 Jim Meyering <jim@meyering.net>
4940 * src/dd.c (usage): Use two spaces (not one) to separate the
4941 "fdatasync" option string from its description, so help2man formats
4942 the derived man page properly. Reported by Samuel Thibault
4943 in <http://bugs.debian.org/393649>.
4945 2006-10-16 Jim Meyering <jim@meyering.net>
4947 * .x-sc_trailing_blank: Remove names of files that are no longer
4950 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
4952 * src/groups.sh (version): Reword message to match the other programs.
4953 Problem reported by Eric Blake.
4955 2006-10-14 Jim Meyering <jim@meyering.net>
4957 * Makefile.maint (headers_with_interesting_macro_defs): Define.
4958 (.re-defmac, sc_always_defined_macros): New rules.
4960 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
4961 Instead, include "exit.h". This hereby retires the work-around for
4962 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
4964 * src/cksum.c (uint_fast32_t): Don't define.
4965 Instead, include <stdint.h>.
4967 * src/pinky.c (S_IWGRP): Don't define.
4968 It's already defined by "stat-macros.h" (included via system.h).
4970 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
4971 * Makefile.maint: Likewise, remove these targets/rules/variables:
4972 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
4973 (cvs_files, wget-update, automake_repo): Likewise.
4974 Move the comment about cvsu to build-aux/vc-list-files,
4975 where cvsu is actually used.
4977 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
4979 Work also when the working directory (with e.g. coreutils sources)
4980 is version controlled with git, rather than CVS.
4981 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
4983 In messages and comments, say e.g., "checked-out sources",
4984 rather than "CVS sources".
4985 (version_controlled_file): New function. Work for git as well as
4986 for CVS. Don't use grep's -q option.
4987 (slurp): Call it here, in place of CVS-specific code.
4989 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
4991 * src/copy.c (copy_internal): Although we do create a backup of each
4992 destination directory when in move mode, don't do that when copying.
4993 Reported by Peter Breitenlohner, in
4994 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
4995 * tests/cp/backup-dir: New file. Test for the above.
4996 * tests/cp/Makefile.am (TESTS): Add backup-dir.
4998 2006-10-13 Jim Meyering <jim@meyering.net>
5000 More chown/chgrp dereferencing-related fixes.
5001 * src/chown-core.c (change_file_owner): Don't use fts_statp if
5002 we're dereferencing symlinks.
5003 Reverse conjuncts, so that we use dereference file_stats
5004 (aka ent->fts_statp) only *after* we've confirmed that
5005 chopt->affect_symlink_referent is true. Otherwise, we might
5006 use ent->fts_statp uninitialized.
5007 Don't turn on FTS_NOSTAT when dereferencing symlinks.
5008 * tests/chown/deref: Update the expected diagnostic, now that
5009 this test case (trying to use "chown --dereference ..." on a
5010 dangling symlink) takes a different code path.
5012 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
5014 Sync from Bison, as follows:
5016 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5018 Fix problems with translating English-language diagnostics.
5019 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5020 respect to bison-runtime pot generation. The YY_ stuff
5021 wasn't being captured.
5023 2006-10-13 Jim Meyering <jim@meyering.net>
5025 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
5026 now that we're using fts_open with FTS_CWDFD.
5027 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
5028 chgrp, to exercise the above fix.
5029 * NEWS: Mention the above.
5031 * src/du-tests: Clean up a little, though it's still not portable.
5033 * .vg-suppressions: Add 3 more for debian unstable.
5035 * tests/ls/Test.pm: Remove long-unused file.
5036 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
5037 Suggestions from Bruno Haible.
5039 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5041 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
5042 (MAINTAINERCLEANFILES): Add .kludge-stamp.
5043 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
5044 instead of $(man_MANS).
5046 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5048 * configure.ac: Avoid compiler warnings about default return
5049 type in function definitions and unused variables in tests.
5050 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
5051 if this is #defined.
5053 2006-10-12 Jim Meyering <jim@meyering.net>
5055 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
5056 Call gl_INIT directly, rather than through the above.
5058 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5060 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5061 variable was sometimes used without being initialized. This
5062 messed up the installation of the INSTALL file in some cases.
5064 2006-10-11 Jim Meyering <jim@meyering.net>
5066 * src/ls.c (usage): Correct description of -s, --size.
5067 It works even without -l. Suggestion from Karl Berry.
5069 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
5071 * src/ls.c (quote_name): Use initializer rather than memset to
5072 initialize an object to zero. This is easier to read and is less
5073 likely to introduce a runtime error due to a mixup. It causes
5074 gcc -W to issue a warning, but you can work around this by
5075 appending -Wno-missing-field-initializers.
5076 * src/pathchk.c (portable_chars_only): Likewise.
5077 * src/shred.c (main): Likewise.
5078 * src/stty.c (main): Likewise.
5079 * src/tr.c (card_of_complement): Likewise.
5080 * src/wc.c (wc): Likewise.
5082 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5084 * src/sort.c (usage): Mention again that sort fields are origin 1.
5086 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
5089 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5090 --copy. Inspired by a suggestion from Bruno Haible.
5092 2006-10-09 Jim Meyering <jim@meyering.net>
5094 Avoid a compiler warning.
5095 * src/pathchk.c (portable_chars_only): Initialize variable of type
5096 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
5098 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
5100 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
5101 wrong file name in some cases. Lars Wendler reported a bug in
5103 * src/install.c (make_ancestor): New arg COMPONENT.
5104 * src/mkdir.c (make_ancestor): Likewise.
5105 * tests/install/basic-1: Check for install -Dv bug.
5106 * tests/mkdir/Makefile.am (TESTS): Add p-v.
5107 * tests/mkdir/p-v: New file, to test this bug.
5109 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5111 * src/chgrp.c: Don't include lchown.h; no longer needed.
5112 * src/chown.c: Likewise.
5114 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
5115 current file system has useful d_type info.
5117 * src/dd.c (flags): noatime and nofollow now depend on
5118 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
5119 (usage): Output info about noatime and nofollow only if
5120 they are known to work.
5121 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
5122 than O_NOFOLLOW, when testing whether it's possible to avoid a
5123 race condition reliably.
5125 2006-10-05 Jim Meyering <jim@meyering.net>
5127 * src/c99-to-c89.diff: Update to reflect new offsets.
5129 * tests/install/basic-1: Skip the latter part of this test if the
5130 just-built dd binary is not readable. Otherwise, this test would fail
5131 when binaries were created as root. Reported by Bauke Jan Douma in
5132 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
5134 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
5136 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
5137 MiB, since XFS hosts can legitimately have large values of
5138 st_blksize. Problem reported by Tony Ernst in
5139 <http://savannah.gnu.org/bugs/?17903>.
5141 2006-10-04 Jim Meyering <jim@meyering.net>
5143 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
5144 Paul Eggert pointed out that the specified file may exist,
5145 in spite of such an errno value.
5146 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
5147 * tests/rm/ignore-name-too-long: Remove file.
5148 * NEWS: Update here, too.
5150 2006-10-03 Jim Meyering <jim@meyering.net>
5152 * tests/rm/fail-eperm: Report failure also if rm is terminated by
5155 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
5156 and one in shred.c -- that were added before coreutils-6.3.
5157 Reported by Michael Deutschmann.
5159 * src/c99-to-c89.diff: Update to reflect new offsets.
5161 * src/remove.c (remove_entry): With -f, exit successfully in spite
5162 of a missing file under some very unusual conditions (with errno
5163 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
5165 With --force (-f), rm no longer fails for ENOTDIR.
5166 * src/remove.c (ignorable_missing): New function.
5167 Use it everywhere, rather than open-coding the test.
5168 Andreas Schwab reported the ENOTDIR problem.
5169 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
5171 * NEWS: Mention the bug fix.
5172 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
5173 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
5174 * tests/rm/Makefile.am (TESTS): Add the new file names.
5176 * bootstrap: Undo last change to this file, since now gnulib-tool
5177 sticks with the automake default in generating dependencies.
5179 * NEWS: Add a line for 6.4-cvs.
5180 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
5182 2006-09-30 Jim Meyering <jim@meyering.net>
5185 * NEWS: Record the 6.3 release date.
5186 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
5188 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
5190 * src/c99-to-c89.diff: Update offsets.
5192 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5194 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
5195 as it doesn't work with Solaris /bin/sh.
5197 2006-09-29 Jim Meyering <jim@meyering.net>
5199 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
5202 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
5203 use .1 as the increment. Actual output varies too much.
5204 [eq-wid-3]: New, commented out test.
5206 * src/shuf.c (read_input): Fix an off-by-one error that
5207 would cause an infloop for piped input of 8KB or more.
5208 * NEWS: Mention the fix.
5209 * tests/misc/shuf: Test for the above fix.
5211 Since any system may be affected by the Darwin readdir bug,
5212 perform the extra rewinddir unconditionally. The performance
5213 impact of rewinding a directory is negligible.
5214 * src/remove.c (NEED_REWIND): Define to use
5215 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
5217 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
5218 increment translates to a slightly larger value.
5219 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
5220 The final expected value wasn't being printed.
5222 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
5223 and NFS, whereby rm would not remove all files in a directory.
5224 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
5225 (NEED_REWIND): New macro, so that we incur the cost of the work-around
5226 rewinddir only on afflicted systems.
5227 * NEWS: Clarify and correct.
5228 * tests/rm/readdir-bug: New file. Test for the above fix.
5229 * tests/rm/Makefile.am (TESTS): Add it.
5230 Prompted by testing and analysis from Bruno Haible:
5231 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
5233 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
5235 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
5236 suggested for Debian stable, which uses Perl 5.8.4.
5238 2006-09-28 Jim Meyering <jim@meyering.net>
5240 Automatically generated dependencies are important even
5241 when all of the sources in a directory come from gnulib.
5242 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5243 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5245 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
5246 Ensure that IFS is set properly and unset PATH.
5248 Work properly even when the name of the selected file starts with "-".
5249 Invoke rm via "../../src/rm", and adjust expected output.
5250 Prompted by a patch from Tim Waugh.
5252 * README-cvs: Add Bison to the list of required packages.
5254 2006-09-26 Jim Meyering <jim@meyering.net>
5256 * src/c99-to-c89.diff: Update offsets.
5258 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
5259 it from removing a directory containing 188 or more entries.
5260 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
5261 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
5262 Reported by Matthew Woehlke.
5264 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
5266 * NEWS: "groups user" no longer outputs "user :"; you need at least
5267 two users. "groups" now processes options like --help more compatibly.
5268 * src/groups.sh: Implement the option-processing change.
5269 Handle user and group names with special characters more robustly.
5270 Report write errors instead of exiting silently with status 1.
5272 2006-09-26 Jim Meyering <jim@meyering.net>
5274 * README: Warn not to run autoreconf manually. Use bootstrap instead.
5276 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
5277 Rewrite to avoid using temporary, $status.
5279 * NEWS: Mention the bug fix.
5280 * src/groups.sh: Don't hide a write failure.
5281 Reported by Iain Calder <ic56@rogers.com>.
5283 2006-09-25 Jim Meyering <jim@meyering.net>
5285 * src/chown.c (usage): Clarify --dereference description.
5286 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
5288 2006-09-24 Jim Meyering <jim@meyering.net>
5290 * NEWS: Mention these fixes.
5291 * src/copy.c (copy_reg): With --verbose (-v), print
5292 "removed `file_name'" just after unlinking a file.
5293 (copy_internal): Likewise, in three more places.
5294 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
5295 * tests/mv/hard-verbose: New file. Test for the above fix.
5296 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
5298 * tests/help-version (sync_args): Don't call sync, since it spins up
5299 disks that I've deliberately caused to spin down (but not unmounted).
5301 * NEWS: Mention the improvement to sort.
5303 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
5304 as well as existing.
5306 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
5307 since that predated addition of d_type support.
5309 2006-09-23 Jim Meyering <jim@meyering.net>
5311 * gl/modules/getloadavg.diff: New file. Work around the way the latest
5312 version of the getloadavg module interacts with our bootstrap script.
5313 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5314 * Makefile.am (EXTRA_DIST): Sort file names.
5315 Add bootstrap and gl/modules/getloadavg.diff
5317 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5319 * bootstrap: Add support for --force.
5320 (usage): New function. Describe usage less tersely.
5321 (CVS_only_file): New var.
5323 * NEWS: Document fix for cp -i and mv -i.
5324 * src/copy.c (copy_internal): With -i, prompt even if the source
5325 is a directory and the destination is not. This is required by
5326 POSIX and gives the user a chance to bail out before failing.
5327 * tests/cp/Makefile.am (TESTS): Add cp-i.
5328 * tests/cp/cp-i: New file.
5329 * tests/mv/Makefile.am (TESTS): Add i-5.
5330 * tests/mv/i-5: New file.
5332 2006-09-20 Jim Meyering <jim@meyering.net>
5334 * NEWS: Mention the chmod bug fix.
5336 * tests/chmod/inaccessible: New test, specifically for this bug.
5337 Based on a test case from Paul Eggert.
5338 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
5340 Fix the 2006-09-18 bug differently.
5341 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
5342 tell fts_read to stat the file again, in case it has become
5343 accessible since the initial fts_open call.
5344 * src/chown-core.c (change_file_owner): Likewise.
5346 * src/chmod.c: Revert last change. There is a better way.
5347 * src/chown-core.c: Likewise.
5349 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
5351 * src/ln.c (target_directory_operand): Rewrite to avoid porting
5352 problem on Tandem reported by Matthew Woehlke in
5353 <https://savannah.gnu.org/bugs/?17172>.
5355 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5357 Fix bug where chmod, chown, and chgrp did not process operands
5358 left-to-right in some cases.
5359 * src/chmod.c (wd_errno): New var.
5360 (chmod_file): New function, with most of the contents of the
5361 old prcess_file function.
5362 (process_files): Use it. This gives file names to fts one
5363 at a time, so that they are processed left-to-right as POSIX
5365 * src/chown-core.c (wd_errno, chown_files): Likewise.
5366 (chown_file): New function.
5367 * tests/install/basic-1: Redo test so as to not workaround
5368 the chmod bug, thereby testing for it.
5370 * src/shuf.c (main): Quote the entire range when reporting an
5371 invalid one, rather than just the part that contained the error.
5373 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
5374 sometimes left behind if the test is skipped or interrupted.
5376 * bootstrap (symlink_to_gnulib): New function.
5377 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5378 to copies-of-gnulib.
5379 (cp_mark_as_generated, slurp, gnulib_files):
5380 Avoid making a copy if it's the same as the old version.
5381 (gnulib_files): Add support for this variable (used by Bison).
5383 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
5384 indicating flaw in kernel. Reword to say that the flaw isn't
5385 serious for coreutils, since the flaw does affect ls -i.
5387 * tests/chgrp/basic: Fix bug in test case exposed by building on
5388 Solaris 8 in a setgid directory. The test case incorrectly
5389 assumed that 'symlink' would be in group $g1.
5391 2006-09-18 Jim Meyering <jim@meyering.net>
5393 * NEWS: Add a line for 6.3-cvs.
5394 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
5397 * NEWS: Record the 6.2 release date.
5398 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
5400 2006-09-17 Jim Meyering <jim@meyering.net>
5402 * tests/chgrp/basic: On an OpenBSD system, rather than failing
5403 due to a known problem, merely warn about it.
5404 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
5405 Instead, use stat to test file system for desired results, directly.
5406 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
5408 * tests/envvar-check: Add more variable names to the list of those
5409 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
5410 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
5412 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
5414 * NEWS: Document that mkdir -p and install -d now fork on occasion.
5415 * bootstrap.conf (gnulib_modules): Add savewd.
5416 * src/install.c: Include savewd.h.
5417 (process_dir): New function.
5418 (main, install_file_in_file_parents): Use it, along with the new
5419 savewd module, to avoid some race conditions.
5420 * src/mkdir.c: Include savewd.h.
5421 (struct mkdir_options): New members make_ancestor_function, mode,
5423 (make_ancestor): Return 1 if the resulting directory is not readable.
5424 (process_dir): New function.
5425 (main): Use it, along with new savewd module, to avoid some
5426 race conditions. Fill in new slots of struct mkdir_options, so
5427 that callees get the values.
5428 * tests/install/basic-1: Test for coreutils 5.97 bug that was
5429 fixed in coreutils 6.0, and which should still be fixed with
5431 * tests/mkdir/p-3: Likewise.
5433 2006-09-15 Jim Meyering <jim@meyering.net>
5435 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
5436 The 2006-09-08 changes made it so "mv dir new-name/" would
5437 fail on NetBSD 1.6. This makes it work once again.
5439 2006-09-14 Jim Meyering <jim@meyering.net>
5441 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
5442 Instead, since it's a little fragile, assert the condition.
5443 (target_directory_operand): Update comment to reflect latest change.
5445 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5447 * src/who.c (print_user): Rewrite to avoid warning from
5448 GCC 4.1.1 with -Wall.
5450 2006-09-12 Jim Meyering <jim@meyering.net>
5452 * tests/mv/atomic: Check for specific strace output, rather than
5453 simply nonempty. RHEL AS 4 would fail this test due to strace
5454 generating "[ Process PID=14434 runs in 32 bit mode. ]".
5455 Reported by Nelson Beebe.
5457 2006-09-11 Jim Meyering <jim@meyering.net>
5459 * src/remove.c (remove_dir): Move new cache_stat_init call onto
5461 (rm_1): Move declaration of "st" and new cache_stat_init call
5462 "down" to nearer where they're used.
5463 * src/c99-to-c89.diff: Add another set of curly braces.
5465 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
5467 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
5468 substr's last operand is very large. Performance problem reported
5471 2006-09-09 Jim Meyering <jim@meyering.net>
5473 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
5475 (sc_require_config_h): Skip this test if there are no version-
5476 controlled .c files.
5477 (sc_prohibit_assert_without_use): Likewise.
5479 2006-09-08 Jim Meyering <jim@meyering.net>
5481 * bootstrap: Export CVS_RSH separate from its assignment, to work
5482 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
5484 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
5486 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
5487 no file operand is given, and standard input is any FIFO.
5488 This is in response to Open Group XCU ERN 114.
5489 * src/tail.c (main): Likewise.
5491 2006-09-08 Jim Meyering <jim@meyering.net>
5493 mv and "cp -r" no longer fail when invoked with two arguments
5494 where the first one names a directory and the second name ends in
5495 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
5496 now succeeds, once more. This reverts part of the 2004-06-27
5498 * NEWS: Say the above.
5499 * src/mv.c (target_directory_operand): Don't require (here)
5500 that the target operand "look like" a directory. This change
5501 pushes the test down to the rename syscall level, where a
5502 "mv dir existing-non-dir/" will mistakenly succeed on older systems
5503 that ignore trailing slashes in the rename destination argument.
5504 * src/cp.c (target_directory_operand): Likewise, but for cp.
5505 * tests/mv/trailing-slash: Exercise the above fixes.
5506 * tests/cp/trailing-slash: New file.
5507 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
5509 * bootstrap: Use the previously unused variable, $src,
5510 to avoid repeating "$GNULIB_SRCDIR/$file".
5512 * bootstrap (cp_mark_as_generated): Don't use "local", to
5513 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
5514 Rename now-global "$src" and "$dst" to have cp_ prefix.
5515 Safer, and avoids confusion.
5517 * bootstrap (cp_mark_as_generated): New function.
5518 (slurp): Use it to prepend editor hints and a warning that
5519 the file we're copying is generated.
5520 Suggestion from Bruce Korb.
5521 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
5522 Fix last-minute typo.
5524 2006-09-07 Jim Meyering <jim@meyering.net>
5526 * bootstrap: Revert last change. There are less disruptive ways
5527 to mark these generated files as read-only.
5529 * src/c99-to-c89.diff: Update to have proper offsets.
5531 2006-09-06 Jim Meyering <jim@meyering.net>
5533 Ensure that some gnulib-tool-generated files are read-only.
5534 * bootstrap (slurp): Put the body of this function in a sub-shell,
5535 with "umask a-w" so that all new files are read-only. Remove each
5536 file before we write to it, in case it's read-only.
5537 Make po/Makevars and runtime-po/Makevars read-only, too.
5539 2006-09-05 Jim Meyering <jim@meyering.net>
5541 * tests/cp/acl: Skip this test when cp lacks ACL support.
5542 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
5544 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
5545 context from change of 2006-09-02.
5547 2006-09-04 Jim Meyering <jim@meyering.net>
5549 * README-cvs: Fix typo in update command.
5551 2006-09-03 Jim Meyering <jim@meyering.net>
5553 * NEWS: Tweak the wording in the new change description so that
5554 no one can think this change causes e.g., `rm -fr foo../' to fail.
5556 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
5557 Use $CONFIG_HEADER, rather than hard-coding it.
5558 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
5560 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
5562 * NEWS: rm now rejects attempts to remove /, ./, and ../.
5563 * src/basename.c: Don't include dirname.h, since system.h does it now.
5564 * src/chmod.c: Likewise.
5565 * src/copy.c: Likewise.
5566 * src/cp.c: Likewise.
5567 * src/df.c: Likewise.
5568 * src/dircolors.c: Likewise.
5569 * src/dirname.c: Likewise.
5570 * src/du.c: Likewise.
5571 * src/install.c: Likewise.
5572 * src/ln.c: Likewise.
5573 * src/ls.c: Likewise.
5574 * src/mkdir.c: Likewise.
5575 * src/mv.c: Likewise.
5576 * src/remove.c: Likewise.
5577 * src/rm.c: Likewise.
5578 * src/rmdir.c: Likewise.
5579 * src/shred.c: Likewise.
5580 * src/split.c: Likewise.
5581 * src/su.c: Likewise.
5582 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
5584 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
5586 * src/rm.c (usage, main): --preserve-root is now the default.
5587 * src/remove.h: Fix comment.
5588 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
5589 (cache_statted, cache_stat_ok): New functions.
5590 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
5591 which is no longer needed with the new functions. All callers
5593 (prompt, is_dir_lstat, remove_entry, remove_dir):
5594 New struct stat * arg. All callers changed.
5595 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
5596 (remove_cwd_entries, remove_dir, rm_1):
5597 Use and maintain the file status cache.
5598 (prompt, remove_entry): Omit the first "directory" in the diagnostic
5599 "Cannot remove directory `foo': is a directory". This causes "rm"
5600 to pass a test case that it would otherwise fail now that it
5601 "knows" more about its argument. I think the diagnostic is better
5602 without the first "directory" anyway.
5603 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
5604 (rm_1): Reject attempts to remove /, ./, or ../.
5605 * tests/rm/Makefile.am (TESTS): Add r-4.
5606 * tests/rm/r-4: New file.
5608 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
5610 * src/stat.c: Include <stddef.h>
5611 (alignof): New macro.
5612 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
5614 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
5616 (print_statfs): If f_fsid isn't an integer, grab its words one
5617 at a time in little-endian order. This is a bit easier to configure
5618 and should avoid a compilation failure on MacOS reported by Bruno
5621 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
5623 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
5624 work around a Mac OS X porting problem reported by Bruno Haible in
5625 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
5626 (print_statfs): Use them.
5628 * bootstrap.conf (gnulib_modules): Add isapipe.
5629 * src/tail.c: Include isapipe.h.
5630 (IS_PIPE_LIKE_FILE_TYPE): Remove.
5631 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
5632 tailable, since this seems to be portable.
5633 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
5634 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
5636 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
5639 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
5641 * src/copy.c (copy_internal): Don't test whether macros like
5642 S_ISLNK are defined, since they're always defined now.
5643 * src/cp.c (main): Likewise.
5644 * src/ln.c (main): Likewise.
5645 * src/ls.c (get_link_name, make_link_name): Likewise.
5646 * src/mknod.c (main): Likewise.
5647 * src/mkfifo.c (usage): Likewise.
5648 * src/who.c (S_IWGRP): Likewise.
5650 Adjust to recent gnulib changes for the gnulib module.
5651 * bootstrap.conf (gnulib_modules): Add fcntl.
5652 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
5653 is already assuming these macros are defined.
5654 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
5655 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
5656 Remove; the fcntl module now handles these.
5658 Adjust to recent gnulib changes for the inttypes module.
5659 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
5660 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
5662 * src/system.h: Don't bother to include <stdint.h>, since we can
5663 now assume inttypes.h does the equivalent of including stdint.h.
5665 2006-08-27 Jim Meyering <jim@meyering.net>
5667 * src/copy.c (copy_internal): Don't make a backup if the last
5668 component of the source name is "." or "..".
5669 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
5670 * NEWS: Mention this.
5671 * tests/cp/src-base-dot: New file. Test for the above fix.
5672 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
5674 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
5675 (dot_or_dotdot): ...new static inline function.
5676 * src/remove.c (rm_1): Reflect this renaming.
5677 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
5679 * src/copy.c (copy_internal): Add comments.
5681 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
5683 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
5684 since Automake supplies them for us. It always did -I$(srcdir),
5685 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
5686 is now also doing -I../lib.
5688 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
5689 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
5690 since there might not be any .po files.
5691 (WGET_COMMAND): Set to empty if wget doesn't
5692 seem to be available.
5694 2006-08-26 Jim Meyering <jim@meyering.net>
5696 This test was failing in some environments.
5697 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
5698 to set LS_COLORS in the environment.
5699 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
5700 Reported by Bob Proulx.
5702 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
5704 * Makefile.am (EXTRA_DIST): Remove these files here, too:
5705 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
5706 .x-sc_two_space_separator_in_usage.
5708 Fix "mv --verbose --backup" so its output includes the
5709 " (backup: foo.~1~)" suffix also when backing up a directory.
5710 * NEWS: Report this bug fix.
5711 * src/copy.c (emit_verbose): New function, factored out of...
5712 (copy_internal): ...here. Use the new function.
5713 * tests/mv/backup-dir: Test for the above fix.
5714 * tests/mv/Makefile.am (TESTS): Add backup-dir.
5716 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
5718 * .x-sc_no_if_have_config_h: Remove; no longer needed.
5719 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
5720 * .x-sc_two_space_separator_in_usage: Likewise.
5721 * Makefile.maint (sc_no_have_config_h): Renamed from
5722 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
5723 is absent everywhere.
5724 * bootstrap.conf (gnulib_modules): Add config-h.
5725 * src/shred.c: Include <config.h> unconditionally, since
5726 we now assume config.h exists.
5727 * src/dircolors.c: Likewise.
5729 2006-08-26 Jim Meyering <jim@meyering.net>
5731 "ls --color" would highlight other-writable and sticky directories
5732 no differently than regular directories on a file system with
5733 dirent.d_type support.
5734 * NEWS: Say the above.
5735 * src/ls.c (gobble_file): With --color, also stat the file when
5736 we know it is a directory.
5737 Derived from an anonymous one-line fix and bug report:
5738 <http://savannah.gnu.org/bugs/?15043>.
5739 * tests/ls/color-dtype-dir: New file. Test for the above fix.
5740 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
5742 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
5744 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
5746 * bootstrap.conf: Add configmake, verify.
5747 * src/.cvsignore: Remove localedir.h.
5748 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
5749 subsumed by configmake.
5750 * src/system.h: Include configmake.h rather than localedir.h
5751 (LOCALEDIR): New macro.
5753 Rewrite to avoid some unnecessary casts, macros, literals.
5754 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
5756 (SECTOR_SIZE, SECTOR_MASK): New constants.
5757 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
5758 and use the SECTOR_* constants when applicable. Check for size <
5759 0 rather than size == -1, since negative-size files are a sign of
5762 2006-08-25 Bruno Haible <bruno@clisp.org>
5764 * src/shred.c (dopass): Assume a continuable error if EIO even
5765 if the current position is not a multiple of 512.
5767 2006-08-24 Jim Meyering <jim@meyering.net>
5769 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
5771 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
5773 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
5774 macro was being used without being defined.
5775 (SB_F_NAMEMAX): Remove cast.
5776 (f_fsid) [BeOS]: Likewise.
5777 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
5779 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
5781 (xstrcat): Remove. All uses changed to use the above functions.
5782 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
5783 buffer len. All uses changed. Output '?', not '*', for unknown
5784 data or errors. Do not assume signed values can be interchanged
5785 with unsigned when printing.
5786 (print_statfs): For %i, print the fsid as a single int, not as a
5788 (print_it): Quote invalid format better.
5790 * NEWS: printf supports the I flag.
5791 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
5793 2006-08-23 Bruno Haible <bruno@clisp.org>
5795 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
5796 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
5797 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
5799 * src/ls.c (SA_RESTART): Fallback define.
5801 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
5803 * src/system.h (EDQUOT): Define if not already defined.
5804 Problem reported by Bruno Haible for BeOS.
5806 * .cvsignore: Remove config.h, config.hin, as they are now
5808 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
5810 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
5812 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
5813 to accommodate today's gnulib change.
5815 2006-08-23 Jim Meyering <jim@meyering.net>
5817 * NEWS: Mention the sweeping infrastructure changes.
5819 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
5821 * bootstrap.conf (gnulib_modules): Add gnupload.
5822 * Makefile.maint (emit_upload_commands): gnupload is now
5824 * gnupload: Remove from CVS, since it's now a gnulib module.
5826 * bootstrap (bootstrap_conf_cleanup): Remove.
5827 (excluded_files): New var.
5828 * bootstrap.conf: Likewise.
5829 * bootstrap (slurp): Exclude files early if they're in the
5830 excluded_files list. That way, their names don't get put into
5833 * aclocal.m4, config.hin, configure:
5834 Remove from CVS, since ./bootstrap generates them automatically.
5835 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
5836 configure, *.cache, *.lineno, *.log.
5837 Remove more-specific entries. This catches files like configure.lineno.
5838 * man/.cvsignore: Add Makefile.in.
5839 * src/.cvsignore: Add Makefile.in.
5840 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
5843 * tests/chgrp/.cvsignore:
5844 * tests/chmod/.cvsignore:
5845 * tests/chown/.cvsignore:
5846 * tests/cp/.cvsignore:
5847 * tests/cut/.cvsignore:
5848 * tests/dd/.cvsignore:
5849 * tests/dircolors/.cvsignore:
5850 * tests/du/.cvsignore:
5851 * tests/expr/.cvsignore:
5852 * tests/factor/.cvsignore:
5853 * tests/fmt/.cvsignore:
5854 * tests/head/.cvsignore:
5855 * tests/install/.cvsignore:
5856 * tests/join/.cvsignore:
5857 * tests/ln/.cvsignore:
5858 * tests/ls/.cvsignore:
5859 * tests/ls-2/.cvsignore:
5860 * tests/md5sum/.cvsignore:
5861 * tests/misc/.cvsignore:
5862 * tests/mkdir/.cvsignore:
5863 * tests/mv/.cvsignore:
5864 * tests/od/.cvsignore:
5865 * tests/pr/.cvsignore:
5866 * tests/readlink/.cvsignore:
5867 * tests/rm/.cvsignore:
5868 * tests/rmdir/.cvsignore:
5869 * tests/seq/.cvsignore:
5870 * tests/sha1sum/.cvsignore:
5871 * tests/shred/.cvsignore:
5872 * tests/sort/.cvsignore:
5873 * tests/stty/.cvsignore:
5874 * tests/sum/.cvsignore:
5875 * tests/tac/.cvsignore:
5876 * tests/tail/.cvsignore:
5877 * tests/tail-2/.cvsignore:
5878 * tests/tee/.cvsignore:
5879 * tests/test/.cvsignore:
5880 * tests/touch/.cvsignore:
5881 * tests/tr/.cvsignore:
5882 * tests/tsort/.cvsignore:
5883 * tests/unexpand/.cvsignore:
5884 * tests/uniq/.cvsignore:
5885 * tests/wc/.cvsignore:
5886 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
5887 *.X, *.O, *-tests, build-script, mk-script if they're never
5888 created in this directory.
5890 2006-08-22 Bruno Haible <bruno@clisp.org>
5893 * src/uptime.c: Include OS.h if it exists.
5894 (print_uptime): On BeOS, use the get_system_info function (actually a
5895 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
5896 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
5898 2006-08-22 Jim Meyering <jim@meyering.net>
5900 * .cvsignore: Add ABOUT-NLS.
5902 Move the check-AUTHORS rule to be run as part of "make distcheck",
5903 rather than "make check".
5904 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
5905 cause "make check" to fail on systems unable to build all binaries.
5906 * Makefile.maint (check-AUTHORS): New rule.
5907 (local-checks-available): Add it here.
5908 Reported by Bruno Haible. Needed for BeOS.
5910 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
5912 * src/df.c (print_header, show_dev): Use a column width that
5913 depends on the block size of -P is specified and not autoscaling.
5914 Problem reported by Gustavo G. Rondina in:
5915 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
5917 2006-08-21 Jim Meyering <jim@meyering.net>
5919 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
5920 when the shell variable, SHELL, is not set.
5921 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
5922 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
5924 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
5925 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
5926 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
5927 od: invalid type string `u8';
5928 this system doesn't provide a 8-byte integral type
5929 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
5931 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
5933 Add a bootstrap procedure, so that the CVS version contains fewer
5934 files and we bootstrap the rest from gnulib, gettext, etc.
5935 * README-cvs: New file.
5936 * bootstrap: New file.
5937 * bootstrap.conf: New file.
5938 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
5939 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
5941 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
5942 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
5944 (gl_MACROS): Call just after gl_EARLY, just for clarity.
5945 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
5946 * src/kill.c (strtoimax): Remove decl.
5947 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
5948 * src/wc.c: Likewise.
5949 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
5950 declaration, so that we don't need to patch this file.
5951 * src/printf.c (strtoimax, strtoumax): Remove decls.
5952 * src/su.c: Include getpass.h.
5954 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
5955 Include inttypes.h unconditionally.
5956 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
5957 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
5958 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
5959 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
5960 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
5962 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
5963 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
5964 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
5965 * tests/cp/Makefile.in, tests/cut/Makefile.in:
5966 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
5967 * tests/du/Makefile.in, tests/expr/Makefile.in:
5968 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
5969 * tests/general/Makefile.in, tests/head/Makefile.in:
5970 * tests/install/Makefile.in, tests/join/Makefile.in:
5971 * tests/ln/Makefile.in, tests/ls/Makefile.in:
5972 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
5973 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
5974 * tests/mv/Makefile.in, tests/od/Makefile.in:
5975 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
5976 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
5977 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
5978 * tests/shred/Makefile.in, tests/sort/Makefile.in:
5979 * tests/stty/Makefile.in, tests/sum/Makefile.in:
5980 * tests/tac/Makefile.in, tests/tail/Makefile.in:
5981 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
5982 * tests/test/Makefile.in, tests/touch/Makefile.in:
5983 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
5984 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
5985 * tests/wc/Makefile.in:
5986 Remove from CVS, since ./bootstrap generates them automatically.
5988 2006-08-20 Eric Blake <ebb9@byu.net>
5990 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
5991 the patch from 2006-08-18 broke on cygwin.
5993 2006-08-20 Jim Meyering <jim@meyering.net>
5995 * NEWS: Add a line for 6.2-cvs.
5996 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
5998 2006-08-19 Jim Meyering <jim@meyering.net>
6001 * NEWS: Record the 6.1 release date.
6002 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
6004 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
6006 Avoid test failure when `make check' is run through debuild.
6007 * tests/help-version: Ensure that $SHELL is set to some value
6008 and exported. Patch from Sven Joachim. For details, see
6009 <http://bugs.debian.org/355368>.
6011 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
6013 * README: Describe potential "pre-C99 build failure", and work-around.
6015 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
6016 backed out due to updates provoked by the copyright changes.
6017 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
6018 it propagates to the derived Makefile.am files.
6019 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
6020 so we don't mistakenly edit them again.
6021 * tests/cut/Makefile.am: Regenerate.
6022 * tests/head/Makefile.am: Likewise.
6023 * tests/join/Makefile.am: Likewise.
6024 * tests/pr/Makefile.am: Likewise.
6025 * tests/sort/Makefile.am: Likewise.
6026 * tests/tac/Makefile.am: Likewise.
6027 * tests/tail/Makefile.am: Likewise.
6028 * tests/test/Makefile.am: Likewise.
6029 * tests/tr/Makefile.am: Likewise.
6030 * tests/uniq/Makefile.am: Likewise.
6031 * tests/wc/Makefile.am: Likewise.
6033 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
6034 when the file's apparent size is not a multiple of its block size.
6035 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
6036 For some file sizes, writing that single byte would unnecessarily
6037 waste a few file blocks. That write may have been necessary in the
6038 early days of Linux, but now, removing it should be safe.
6039 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
6040 * tests/cp/sparse: New test for the above.
6041 * tests/cp/Makefile.am (TESTS): Add sparse.
6043 * tests/sparse-file: New file, essence factored out of...
6044 * tests/du/8gb: ... here. Use the new script.
6046 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6048 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
6049 the CVS gettext manual now suggests 1000000.
6051 2006-08-18 Bruno Haible <bruno@clisp.org>
6053 Add support for NetBSD 3.0.
6054 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
6056 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
6057 has a field f_fstypename.
6058 This undoes the 2006-08-15 to src/stat.c.
6060 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
6062 Copyright notice fixes.
6064 * COPYING: Upgrade to latest version from FSF.
6066 * src/uname.c: Use (C) in copyright notice.
6068 * .vg-suppressions: Add copyright notice.
6069 * ChangeLog: Likewise.
6070 * ChangeLog-2005: Likewise.
6071 * Makefile.am: Likewise.
6074 * README-valgrind: Likewise.
6076 * announce-gen: Likewise.
6077 * man/Makefile.am: Likewise.
6078 * man/chmod.x: Likewise.
6079 * man/chown.x: Likewise.
6080 * man/df.x: Likewise.
6081 * man/du.x: Likewise.
6082 * man/rm.x: Likewise.
6083 * src/dircolors.hin: Likewise.
6084 * src/du-tests: Likewise.
6085 * src/extract-magic: Likewise.
6086 * src/tac-pipe.c: Likewise.
6087 * src/wheel-gen.pl: Likewise.
6088 * tests/Coreutils.pm: Likewise.
6089 * tests/Makefile.am.in: Likewise.
6090 * tests/acl: Likewise.
6091 * tests/envvar-check: Likewise.
6092 * tests/expensive: Likewise.
6093 * tests/group-names: Likewise.
6094 * tests/help-version: Likewise.
6095 * tests/mk-script: Likewise.
6096 * tests/priv-check: Likewise.
6097 * tests/rwx-to-mode: Likewise.
6098 * tests/sample-test: Likewise.
6099 * tests/setgid-check: Likewise.
6100 * tests/chgrp/basic: Likewise.
6101 * tests/chgrp/deref: Likewise.
6102 * tests/chgrp/no-x: Likewise.
6103 * tests/chgrp/posix-H: Likewise.
6104 * tests/chgrp/recurse: Likewise.
6105 * tests/chmod/c-option: Likewise.
6106 * tests/chmod/equal-x: Likewise.
6107 * tests/chmod/equals: Likewise.
6108 * tests/chmod/no-x: Likewise.
6109 * tests/chmod/octal: Likewise.
6110 * tests/chmod/setgid: Likewise.
6111 * tests/chmod/umask-x: Likewise.
6112 * tests/chmod/usage: Likewise.
6113 * tests/chown/basic: Likewise.
6114 * tests/chown/deref: Likewise.
6115 * tests/chown/separator: Likewise.
6116 * tests/cp/Makefile.am: Likewise.
6117 * tests/cp/acl: Likewise.
6118 * tests/cp/backup-1: Likewise.
6119 * tests/cp/backup-is-src: Likewise.
6120 * tests/cp/cp-HL: Likewise.
6121 * tests/cp/cp-deref: Likewise.
6122 * tests/cp/cp-mv-backup: Likewise.
6123 * tests/cp/cp-parents: Likewise.
6124 * tests/cp/deref-slink: Likewise.
6125 * tests/cp/dir-rm-dest: Likewise.
6126 * tests/cp/dir-slash: Likewise.
6127 * tests/cp/dir-vs-file: Likewise.
6128 * tests/cp/fail-perm: Likewise.
6129 * tests/cp/into-self: Likewise.
6130 * tests/cp/link: Likewise.
6131 * tests/cp/link-no-deref: Likewise.
6132 * tests/cp/link-preserve: Likewise.
6133 * tests/cp/no-deref-link1: Likewise.
6134 * tests/cp/no-deref-link2: Likewise.
6135 * tests/cp/no-deref-link3: Likewise.
6136 * tests/cp/perm: Likewise.
6137 * tests/cp/preserve-2: Likewise.
6138 * tests/cp/r-vs-symlink: Likewise.
6139 * tests/cp/same-file: Likewise.
6140 * tests/cp/slink-2-slink: Likewise.
6141 * tests/cp/special-bits: Likewise.
6142 * tests/cp/symlink-slash: Likewise.
6143 * tests/cut/Makefile.am: Likewise.
6144 * tests/cut/Test.pm: Likewise.
6145 * tests/dd/misc: Likewise.
6146 * tests/dd/not-rewound: Likewise.
6147 * tests/dd/skip-seek: Likewise.
6148 * tests/dd/skip-seek2: Likewise.
6149 * tests/dd/unblock-sync: Likewise.
6150 * tests/dircolors/simple: Likewise.
6151 * tests/du/2g: Likewise.
6152 * tests/du/8gb: Likewise.
6153 * tests/du/Makefile.am: Likewise.
6154 * tests/du/basic: Likewise.
6155 * tests/du/deref: Likewise.
6156 * tests/du/deref-args: Likewise.
6157 * tests/du/exclude: Likewise.
6158 * tests/du/fd-leak: Likewise.
6159 * tests/du/files0-from: Likewise.
6160 * tests/du/hard-link: Likewise.
6161 * tests/du/inaccessible-cwd: Likewise.
6162 * tests/du/long-from-unreadable: Likewise.
6163 * tests/du/long-sloop: Likewise.
6164 * tests/du/no-deref: Likewise.
6165 * tests/du/no-x: Likewise.
6166 * tests/du/restore-wd: Likewise.
6167 * tests/du/slash: Likewise.
6168 * tests/du/slink: Likewise.
6169 * tests/du/trailing-slash: Likewise.
6170 * tests/du/two-args: Likewise.
6171 * tests/expr/basic: Likewise.
6172 * tests/factor/basic: Likewise.
6173 * tests/fmt/basic: Likewise.
6174 * tests/fmt/long-line: Likewise.
6175 * tests/general/Makefile.am: Likewise.
6176 * tests/general/atgeneral.m4: Likewise.
6177 * tests/general/dd.at: Likewise.
6178 * tests/head/Makefile.am: Likewise.
6179 * tests/head/Test.pm: Likewise.
6180 * tests/install/basic-1: Likewise.
6181 * tests/install/create-leading: Likewise.
6182 * tests/install/d-slashdot: Likewise.
6183 * tests/install/trap: Likewise.
6184 * tests/join/Makefile.am: Likewise.
6185 * tests/join/Test.pm: Likewise.
6186 * tests/ln/backup-1: Likewise.
6187 * tests/ln/misc: Likewise.
6188 * tests/ln/sf-1: Likewise.
6189 * tests/ln/target-1: Likewise.
6190 * tests/ls/Makefile.am: Likewise.
6191 * tests/ls/Test.pm: Likewise.
6192 * tests/ls/dangle: Likewise.
6193 * tests/ls/dired: Likewise.
6194 * tests/ls/file-type: Likewise.
6195 * tests/ls/follow-slink: Likewise.
6196 * tests/ls/infloop: Likewise.
6197 * tests/ls/inode: Likewise.
6198 * tests/ls/m-option: Likewise.
6199 * tests/ls/no-arg: Likewise.
6200 * tests/ls/recursive: Likewise.
6201 * tests/ls/rt-1: Likewise.
6202 * tests/ls/stat-dtype: Likewise.
6203 * tests/ls/stat-failed: Likewise.
6204 * tests/ls/stat-vs-dirent: Likewise.
6205 * tests/ls/symlink-slash: Likewise.
6206 * tests/ls/time-1: Likewise.
6207 * tests/ls-2/tests: Likewise.
6208 * tests/md5sum/basic-1: Likewise.
6209 * tests/md5sum/newline-1: Likewise.
6210 * tests/misc/Makefile.am: Likewise.
6211 * tests/misc/base64: Likewise.
6212 * tests/misc/basename: Likewise.
6213 * tests/misc/cat-proc: Likewise.
6214 * tests/misc/close-stdout: Likewise.
6215 * tests/misc/csplit: Likewise.
6216 * tests/misc/date: Likewise.
6217 * tests/misc/date-sec: Likewise.
6218 * tests/misc/df: Likewise.
6219 * tests/misc/dirname: Likewise.
6220 * tests/misc/expand: Likewise.
6221 * tests/misc/false-status: Likewise.
6222 * tests/misc/fold: Likewise.
6223 * tests/misc/head-c: Likewise.
6224 * tests/misc/head-elide-tail: Likewise.
6225 * tests/misc/head-pos: Likewise.
6226 * tests/misc/mknod: Likewise.
6227 * tests/misc/nice: Likewise.
6228 * tests/misc/nl: Likewise.
6229 * tests/misc/nohup: Likewise.
6230 * tests/misc/paste-no-nl: Likewise.
6231 * tests/misc/pathchk1: Likewise.
6232 * tests/misc/printf: Likewise.
6233 * tests/misc/printf-hex: Likewise.
6234 * tests/misc/pwd-long: Likewise.
6235 * tests/misc/sha224sum: Likewise.
6236 * tests/misc/sha256sum: Likewise.
6237 * tests/misc/sha384sum: Likewise.
6238 * tests/misc/sha512sum: Likewise.
6239 * tests/misc/shuf: Likewise.
6240 * tests/misc/sort-merge: Likewise.
6241 * tests/misc/sort-rand: Likewise.
6242 * tests/misc/split-a: Likewise.
6243 * tests/misc/split-fail: Likewise.
6244 * tests/misc/split-l: Likewise.
6245 * tests/misc/stat-fmt: Likewise.
6246 * tests/misc/stat-printf: Likewise.
6247 * tests/misc/tac-continue: Likewise.
6248 * tests/misc/test-diag: Likewise.
6249 * tests/misc/tty-eof: Likewise.
6250 * tests/misc/wc-files0: Likewise.
6251 * tests/misc/wc-files0-from: Likewise.
6252 * tests/mkdir/concurrent-1: Likewise.
6253 * tests/mkdir/p-1: Likewise.
6254 * tests/mkdir/p-2: Likewise.
6255 * tests/mkdir/p-3: Likewise.
6256 * tests/mkdir/p-slashdot: Likewise.
6257 * tests/mkdir/p-thru-slink: Likewise.
6258 * tests/mkdir/parents: Likewise.
6259 * tests/mkdir/perm: Likewise.
6260 * tests/mkdir/special-1: Likewise.
6261 * tests/mkdir/t-slash: Likewise.
6262 * tests/mkdir/writable-under-readonly: Likewise.
6263 * tests/mv/Makefile.am: Likewise.
6264 * tests/mv/acl: Likewise.
6265 * tests/mv/atomic: Likewise.
6266 * tests/mv/backup-is-src: Likewise.
6267 * tests/mv/childproof: Likewise.
6268 * tests/mv/diag: Likewise.
6269 * tests/mv/dir-file: Likewise.
6270 * tests/mv/dir2dir: Likewise.
6271 * tests/mv/dup-source: Likewise.
6272 * tests/mv/force: Likewise.
6273 * tests/mv/hard-2: Likewise.
6274 * tests/mv/hard-3: Likewise.
6275 * tests/mv/hard-4: Likewise.
6276 * tests/mv/hard-link-1: Likewise.
6277 * tests/mv/i-1: Likewise.
6278 * tests/mv/i-2: Likewise.
6279 * tests/mv/i-3: Likewise.
6280 * tests/mv/i-4: Likewise.
6281 * tests/mv/i-link-no: Likewise.
6282 * tests/mv/into-self: Likewise.
6283 * tests/mv/into-self-2: Likewise.
6284 * tests/mv/into-self-3: Likewise.
6285 * tests/mv/into-self-4: Likewise.
6286 * tests/mv/leak-fd: Likewise.
6287 * tests/mv/mv-special-1: Likewise.
6288 * tests/mv/no-target-dir: Likewise.
6289 * tests/mv/part-fail: Likewise.
6290 * tests/mv/part-hardlink: Likewise.
6291 * tests/mv/part-rename: Likewise.
6292 * tests/mv/part-symlink: Likewise.
6293 * tests/mv/partition-perm: Likewise.
6294 * tests/mv/perm-1: Likewise.
6295 * tests/mv/reply-no: Likewise.
6296 * tests/mv/setup: Likewise.
6297 * tests/mv/to-symlink: Likewise.
6298 * tests/mv/trailing-slash: Likewise.
6299 * tests/mv/update: Likewise.
6300 * tests/mv/vfat: Likewise.
6301 * tests/od/od-N: Likewise.
6302 * tests/od/x8: Likewise.
6303 * tests/pr/Makefile.am: Likewise.
6304 * tests/pr/Test.pm: Likewise.
6305 * tests/readlink/can-e: Likewise.
6306 * tests/readlink/can-f: Likewise.
6307 * tests/readlink/can-m: Likewise.
6308 * tests/readlink/rl-1: Likewise.
6309 * tests/rm/Makefile.am: Likewise.
6310 * tests/rm/cycle: Likewise.
6311 * tests/rm/dangling-symlink: Likewise.
6312 * tests/rm/deep-1: Likewise.
6313 * tests/rm/dir-no-w: Likewise.
6314 * tests/rm/dir-nonrecur: Likewise.
6315 * tests/rm/dot-rel: Likewise.
6316 * tests/rm/empty-inacc: Likewise.
6317 * tests/rm/empty-name: Likewise.
6318 * tests/rm/f-1: Likewise.
6319 * tests/rm/fail-2eperm: Likewise.
6320 * tests/rm/fail-eperm: Likewise.
6321 * tests/rm/hash: Likewise.
6322 * tests/rm/i-1: Likewise.
6323 * tests/rm/i-no-r: Likewise.
6324 * tests/rm/inaccessible: Likewise.
6325 * tests/rm/interactive-always: Likewise.
6326 * tests/rm/interactive-once: Likewise.
6327 * tests/rm/ir-1: Likewise.
6328 * tests/rm/isatty: Likewise.
6329 * tests/rm/no-give-up: Likewise.
6330 * tests/rm/r-1: Likewise.
6331 * tests/rm/r-2: Likewise.
6332 * tests/rm/r-3: Likewise.
6333 * tests/rm/rm1: Likewise.
6334 * tests/rm/rm2: Likewise.
6335 * tests/rm/rm3: Likewise.
6336 * tests/rm/rm4: Likewise.
6337 * tests/rm/rm5: Likewise.
6338 * tests/rm/sunos-1: Likewise.
6339 * tests/rm/unread2: Likewise.
6340 * tests/rm/unread3: Likewise.
6341 * tests/rm/unreadable: Likewise.
6342 * tests/rmdir/fail-perm: Likewise.
6343 * tests/rmdir/ignore: Likewise.
6344 * tests/rmdir/t-slash: Likewise.
6345 * tests/seq/basic: Likewise.
6346 * tests/sha1sum/basic-1: Likewise.
6347 * tests/sha1sum/sample-vec: Likewise.
6348 * tests/shred/exact: Likewise.
6349 * tests/shred/remove: Likewise.
6350 * tests/sort/Makefile.am: Likewise.
6351 * tests/sort/Test.pm: Likewise.
6352 * tests/sort-time/Makefile: Likewise.
6353 * tests/sort-time/README: Likewise.
6354 * tests/sort-time/rand-gen: Likewise.
6355 * tests/stty/basic-1: Likewise.
6356 * tests/stty/row-col-1: Likewise.
6357 * tests/sum/basic-1: Likewise.
6358 * tests/sum/sysv: Likewise.
6359 * tests/tac/Makefile.am: Likewise.
6360 * tests/tac/Test.pm: Likewise.
6361 * tests/tail/Makefile.am: Likewise.
6362 * tests/tail/Test.pm: Likewise.
6363 * tests/tail-2/Makefile.am: Likewise.
6364 * tests/tail-2/append-only: Likewise.
6365 * tests/tail-2/assert: Likewise.
6366 * tests/tail-2/assert-2: Likewise.
6367 * tests/tail-2/big-4gb: Likewise.
6368 * tests/tail-2/fflush: Likewise.
6369 * tests/tail-2/infloop-1: Likewise.
6370 * tests/tail-2/proc-ksyms: Likewise.
6371 * tests/tail-2/start-middle: Likewise.
6372 * tests/tail-2/tail-n0f: Likewise.
6373 * tests/tee/basic: Likewise.
6374 * tests/tee/dash: Likewise.
6375 * tests/test/Makefile.am: Likewise.
6376 * tests/test/Test.pm: Likewise.
6377 * tests/touch/Makefile.am: Likewise.
6378 * tests/touch/dangling-symlink: Likewise.
6379 * tests/touch/empty-file: Likewise.
6380 * tests/touch/fail-diag: Likewise.
6381 * tests/touch/fifo: Likewise.
6382 * tests/touch/no-create-missing: Likewise.
6383 * tests/touch/no-rights: Likewise.
6384 * tests/touch/not-owner: Likewise.
6385 * tests/touch/obsolescent: Likewise.
6386 * tests/touch/read-only: Likewise.
6387 * tests/touch/relative: Likewise.
6388 * tests/tr/Makefile.am: Likewise.
6389 * tests/tr/Test.pm: Likewise.
6390 * tests/tr/failures: Likewise.
6391 * tests/tsort/basic-1: Likewise.
6392 * tests/unexpand/basic-1: Likewise.
6393 * tests/uniq/Makefile.am: Likewise.
6394 * tests/uniq/Test.pm: Likewise.
6395 * tests/wc/Makefile.am: Likewise.
6396 * tests/wc/Test.pm: Likewise.
6398 2006-08-17 Jim Meyering <jim@meyering.net>
6400 ls -CF would misalign columns in some cases.
6401 * src/ls.c (get_type_indicator): New function. extracted from...
6402 (print_type_indicator): ...here. Use it.
6403 (length_of_file_name_and_frills): Use it here, too, rather than
6404 assuming stat.st_mode is valid.
6405 Reported by Andreas Schwab, here:
6406 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
6407 See the test for this above. FYI, I did ls -CF /proc and visually
6408 inspected the result.
6410 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
6411 to mention the now-removed cp_options.xstat member.
6413 * Makefile.maint (patch-check): Adapt to work now that the patch
6414 modifies more than one file in src/.
6416 With this patch, permit building with Solaris cc on Solaris 7.
6417 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
6418 This integrates patches from Bruno Haible.
6420 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
6422 Fix some problems reported by Bruno Haible.
6423 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
6424 Skip this test if "chmod g+s d" silently does nothing.
6425 * tests/ls-2/tests: Skip this test suite if we can't set up files
6426 properly for the setuid-etc test. This simplifies some of the
6427 hacks we were using to work around porting problems.
6429 2006-08-16 Jim Meyering <jim@meyering.net>
6431 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
6432 * tests/cp/acl: Instead, skip the test if either setfacl
6434 Reported by Michael Stone.
6436 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
6438 * tests/lang-default (LC_ALL): Set to "C", so we get
6439 English-language diagnostics. Unset the other variables; it
6440 should be portable to use 'unset' for this stuff nowadays.
6441 Problem reported by Bruno Haible. Using "C" reverses the
6442 2000-10-22 change to fileutils in this area.
6444 Fix bugs when printing plurals of numbers that are not
6445 unsigned long int values.
6446 * src/system.h (select_plural): New function.
6447 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
6448 * src/uptime.c (print_uptime): Likewise.
6449 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
6450 print a floating point number, as reducing to 0 or 1 doesn't work
6451 for some languages. Instead, just use "s" for seconds since it
6452 doesn't need a plural form.
6454 2006-08-16 Bruno Haible <bruno@clisp.org>
6456 Old versions of gzip would write --help output to stderr, and it
6457 would be annoying to see that in the output of every "make" command.
6458 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
6461 2006-08-16 Andreas Schwab <schwab@suse.de>
6463 * tests/cp/acl: Don't use non-portable == operator for test.
6465 2006-08-16 Jim Meyering <jim@meyering.net>
6467 * tests/ls/stat-dtype: Use stat to test file system type, rather
6468 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
6470 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
6472 * NEWS: Mention that df exits with nonzero status if it generates
6473 no output. This change was in 6.0 but inadvertently unmentioned.
6474 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
6476 (show_dev): Don't set it until we actually output something.
6477 Print the header if this is the first output.
6478 (main): Don't print a header, as that is now show_dev's job.
6479 * tests/misc/Makefile.am (TESTS): Add df.
6480 * tests/misc/df: New file.
6482 2006-08-15 Eric Blake <ebb9@byu.net>
6484 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
6485 statvfs.f_type not present. See
6486 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
6488 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
6490 * src/dd.c (print_stats): Don't substitute "1" for number, as this
6491 causes confusion for the Hungarian translators. Problem reported
6492 by Egmont Koblinger here:
6493 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
6495 2006-08-15 Jim Meyering <jim@meyering.net>
6497 * .x-sc_require_config_h: Add lib/at-func.c.
6499 * NEWS: Add a line for 6.1-cvs.
6500 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
6502 2006-08-15 Jim Meyering <jim@meyering.net>
6505 * NEWS: Record the 6.0 release date.
6506 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
6508 * TODO: Add an item (convert to use gnulib-tool), add to the plan
6509 for id-vs-getgrouplist, and remove a few completed items.
6511 * Makefile.maint (alpha beta major): Fix syntax error.
6513 2006-08-13 Jim Meyering <jim@meyering.net>
6515 * src/shred.c (usage): Don't indent the second line of an item.
6516 Otherwise, help2man would misformat the output.
6517 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
6519 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6521 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
6522 Suggested by Eric Blake to avoid problems like
6523 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
6525 2006-08-11 Jim Meyering <jim@meyering.net>
6527 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
6528 failure that this test checks for (stat/dirent inode mismatch at
6529 a mount point), so continue to give a diagnostic about the failure,
6530 but don't actually count it as a failure.
6532 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
6534 * ABOUT-NLS: Update from gettext 0.15.
6535 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
6537 * src/csplit.c (struct control): Remove fastmap member.
6538 (extract_regexp): Allocate fastmap separately, since otherwise
6539 it might move due to a realloc. This fixes a bug that led
6540 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
6542 2006-08-10 Jim Meyering <jim@meyering.net>
6544 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
6545 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
6546 Redirect both stdout and stderr of df invocations.
6548 * src/dircolors.hin: Add a TERM directive for each of the following:
6549 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
6550 rxvt-cygwin-native, screen.linux, xterm-256color.
6551 Sort the TERM directives.
6552 From Mike Frysinger.
6554 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
6556 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
6557 See Debian bug 373736.
6559 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
6562 * src/.cvsignore: Add shuf.
6564 * Makefile.maint: Remove the po-update procedure; it doesn't
6565 work with the new repository on http://www.iro.umontreal.ca/.
6566 For now I guess we'll have to fix things by hand.
6567 (do-po-update, po-update): Remove. All references removed.
6569 * src/shuf.c (next_line): New function.
6570 (read_input): Use it, to avoid relying on GCC-specific behavior
6571 with void * arithmetic. Problem reported by Bob Proulx.
6572 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
6573 to detect this sort of problem automatically in the future.
6575 2006-08-09 Jim Meyering <jim@meyering.net>
6577 * src/ls.c: Add a compile-time check to ensure that filetype
6578 and filetype_letter have the same number of elements.
6580 * tests/misc/sort-rand: Remove use of --seed=S.
6582 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
6584 Add a command 'shuf', and modify shred and sort to use the new
6585 random number generator library of 'shuf'.
6587 * AUTHORS: Add shuf.
6589 * NEWS: Likewise. Mention new --random-source option for shred
6590 and sort. Move "sort +1 -2" notice to the appropriate section,
6591 and clarify its role with respect to POSIXLY_CORRECT.
6592 * man/.cvsignore: Add shuf.1.
6593 * man/Makefile.am (dist_man_MANS): Add shuf.1.
6594 (shuf.1): New dependency.
6595 * man/shuf.x: New file.
6596 * src/Makefile.am (bin_PROGRAMS): Add shuf.
6597 (EXTRA_DIST): Remove rand-isaac.c.
6598 (shuf_LDADD): New macro.
6599 * src/rand-isaac.c: Remove, moving most of its contents to
6601 * src/shuf.c: New file.
6602 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
6603 Don't include rand-isaac.c; include randint.h and randread.h instead.
6604 (RANDOM_SOURCE_OPTION): New enum.
6605 (long_opts, usage, main): New option --random-source.
6606 * src/sort.c: Likewise.
6607 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
6608 All callers changed to use randint interface.
6609 (fillrand): Remove. All callers changed to use randread interface.
6610 (dopass): Remove dependency on ISAAC buffer size.
6611 (genpattern): Don't wipe the random state here.
6612 (randint_source): New static var.
6613 (clear_random_data): New function.
6614 (main): Allocate random source, and arrange to wipe it on exit.
6615 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
6616 (longopts, usage, main): Remove undocumented --seed option;
6617 it's now replaced by --random-source.
6618 (rand_state, get_hash): Remove.
6619 (randread_source): New static var.
6620 (random_state, cmp_hashes, compare_random): New functions; they guarantee
6621 no collisions in the random hash function.
6622 (keycompare): Use compare_random for -R; don't fall back on comparing
6623 via memcoll, since compare_random does the right thing.
6624 * tests/misc/Makefile.am (TESTS): Add shuf.
6625 * tests/misc/shuf: New file.
6627 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
6629 * src/copy.c (set_author): Preserve the st_author field via the
6630 file descriptor dest_desc.
6632 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
6634 * NEWS: chmod now preserves setuid and setgid bits on directories
6635 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
6637 Fix test case problems if working directory is setgid,
6638 reported by Bob Proulx.
6639 * tests/cp/fail-perm: Use symbolic mode so that we clear
6640 setgid bit more reliably on directories.
6641 * tests/mkdir/special-1 (set_mode_string): Likewise.
6643 2006-07-27 Jim Meyering <jim@meyering.net>
6645 * src/chgrp.c (usage): Use correct grammar in description of the
6647 * src/chown.c (usage): Likewise.
6649 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
6651 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
6652 Correctly access SRC_SB's element ST_AUTHOR.
6654 2006-07-26 Jim Meyering <jim@meyering.net>
6656 * tests/ls/stat-failed: Adapt to match new expected output.
6659 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
6660 than having the code test for all of the other types first.
6661 Hoist the set-uid/gid-testing code "up" into this new block.
6662 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
6663 C_ORPHAN, not as C_FILE.
6665 2006-07-26 Jim Meyering <jim@meyering.net>
6667 Checking in a change from Paul.
6669 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
6671 * src/ls.c (DT_INIT): Remove. All uses removed.
6672 (enum filetype): Use an ordinary enum rather than trying to keep
6673 the values in sync with DT_FIFO etc. That way, we don't have
6674 to make special assumptions about them. All uses changed.
6675 (whiteout): New constant member of enum filetype.
6676 (filetype_letter): New constant, for use with enum filetype.
6677 (FILETYPE_INDICATORS): New initializer list.
6678 (print_dir): Add case for DT_WHT.
6679 (gobble_file): If stat fails, don't discard information from
6680 readdir; instead, preserve it so it can be printed.
6681 (print_long_format): Fall back on readdir result if stat info
6682 is not available. Use "?" to denote each unknown mode char,
6683 instead of an overall "?", since we now know some of the mode
6685 (print_type_indicator): Now that MODE isn't necessarily
6686 useful, guard all uses.
6687 Now that two blocks in the type-checking tree can set "type = C_FILE",
6688 move the suffix-handling code out and down.
6690 2006-07-26 Jim Meyering <jim@meyering.net>
6692 Prepare for the above change.
6693 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
6694 and adjust uses. From a patch by Paul Eggert.
6696 2006-07-26 Jim Meyering <jim@meyering.net>
6698 * src/ls.c: Correct indentation/formatting in a few places.
6700 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
6702 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
6703 Problem report and fix from Bob Proulx.
6704 * NEWS: Clarify the "chmod 0500" news, and correct the vague
6705 statements about compatibility with BSD.
6707 2006-07-25 Jim Meyering <jim@meyering.net>
6709 * src/ls.c (gobble_file): When handling a stat-failed entry,
6710 print the entry name not the absolute_name -- to be consistent
6711 with the usual case.
6712 * tests/ls/stat-failed: Update accordingly.
6714 * src/ls.c: Add parens around the new uses of ?: ternary operator.
6716 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
6719 Get --dired offsets right when handling stat-failed entries.
6720 * src/ls.c (print_long_format): Be careful to increment P by the
6721 appropriate amount, even when inode_number_width and nlink_width
6723 * tests/ls/stat-failed: Test for the above.
6725 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
6726 have_acl member. That would happen for a directory with both a
6727 non-stat'able entry and one with an ACL.
6729 * src/ls.c (gobble_file): Make it so failure to stat a
6730 non-command-line file provokes an exit status of 1, not 0.
6731 Say "cannot access" rather than "cannot stat".
6732 * tests/ls/stat-failed: New file/test, for the above.
6733 * tests/ls/Makefile.am (TESTS): Add stat-failed.
6734 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
6735 of "cannot access " to diagnostic.
6737 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
6739 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
6740 Replace all occurrences of "type == command_line" with the
6741 equivalent, "command_line_arg".
6743 * src/ls.c: Apply the stat-failed parts of Red Hat's
6744 coreutils-selinux.patch. From Ulrich Drepper.
6745 This makes it so files not mentioned on the command line (e.g.,
6746 names read from a directory that *is* mentioned on the command
6747 line) for which stat fails are still listed. With --color,
6748 such files are colored just like ORPHANs (aka dangling symlinks).
6750 * src/df.c (n_valid_args): Declare global to be static.
6752 2006-07-24 Jim Meyering <jim@meyering.net>
6754 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
6755 system lacks d_type support.
6757 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
6759 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
6761 2006-07-21 Jim Meyering <jim@meyering.net>
6763 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
6764 Reported by Tim Waugh.
6765 Also remove the comment duplicating much of --help output.
6767 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
6768 name so the list remains alphabetized.
6770 Fix another bug: ls --indicator-style=file-type would call
6771 stat for a symlink, even though it wasn't always needed.
6772 In some cases, that unnecessary stat would cause ls to fail.
6773 * src/ls.c (gobble_file): Don't treat symlinks specially (in
6774 requiring a stat syscall). Remove the offending exclusion.
6776 * NEWS: Mention the fix.
6778 * tests/ls/stat-dtype: New file/test, for the above fix.
6779 Also exercises the new df feature, below.
6781 * src/df.c (main): Fail and don't print the headers if no
6782 file system is processed. This makes it easy to test whether
6783 a specified directory is on a file system of a given type or types.
6784 Otherwise, applications would have had to parse df's output.
6785 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
6787 Fix a bug: ls --file-type worked like --indicator-style=slash,
6788 rather than like --indicator-style=file-type.
6789 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
6790 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
6792 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
6793 * NEWS: Mention the fix.
6794 * tests/ls-2/tests (file-type): New test, for the above fix.
6796 2006-07-19 Jim Meyering <jim@meyering.net>
6798 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
6800 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
6802 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
6804 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
6805 of directories alone unless you specify them explicitly.
6806 install and mkdir now implement X correctly.
6807 install now creates parent directories with mode 755, without
6808 changing their owner or group.
6809 * src/chmod.c (process_file): Adjust to mode_adjust API change.
6810 * src/install.c: Include mkancesdirs.h.
6811 (announce_mkdir, make_ancestor): New functions.
6812 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
6814 (dir_mode, dir_mode_bits): New vars.
6815 (main): Set dir modes separately from nondir, so that the X
6816 op of -m works correctly.
6817 (main): Remove cwd_errno cruft, since make_dir_parents no longer
6818 affects cwd. Adjust to new make_dir_parents API.
6819 (install_file_in_file_parents): 2nd arg is now char *, not char
6820 const *. Use mkancesdirs instead of rolling our own code.
6821 (change_attributes): Don't worry about AFS, since that kludge
6822 should not be needed any more.
6823 * src/mkdir.c (struct mkdir_options): New struct.
6824 (announce_mkdir, make_ancestor): New functions.
6825 (main): Use them. Adjust to mode_adjust API change. Stick with
6826 umask 0. Use make_dir_parents for all the work.
6827 * src/mkfifo.c (main): Adjust to new mode_adjust API.
6828 * src/mknod.c (main): Likewise.
6829 * tests/chmod/setgid: Do the setgid test instead of bailing.
6830 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
6831 GNU chmod now behaves like other versions of chmod.
6832 * tests/mkdir/perm: Add a test for the X bug.
6834 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
6836 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
6837 This doesn't fix any bugs, since OUT always equals stdout, but it
6838 makes the code easier to understand.
6840 2006-07-14 Jim Meyering <jim@meyering.net>
6842 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
6843 rather than open-coding it. Now supports mercurial, too.
6844 * .hgignore: New file.
6845 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
6846 all generated files, including ones like configure and po/*.po
6847 that are currently version-controlled in cvs.
6849 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
6850 They've been in CVS, just haven't been distributed before this.
6851 Distribute ChangeLog-2005, too.
6852 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
6854 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
6856 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
6859 2006-07-09 Jim Meyering <jim@meyering.net>
6861 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
6862 That happens with Linux/tmpfs.
6863 * tests/mv/Makefile.am (TESTS): Add dir2dir.
6865 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6867 Adjust to recent updates from gnulib.
6868 * src/dd.c (apply_translations): Use toupper rather than
6869 islower followed by toupper; it's simpler and typically
6870 faster now that we assume at least C89 semantics. Similarly
6872 * src/sort.c (inittables): Likewise.
6873 * src/expand.c (expand): Don't assume that isprint etc. return
6874 booleans (needed for pre-C99 hosts).
6875 * src/fmt.c (check_punctuation): Likewise.
6876 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
6877 * src/tr.c (is_char_class_member): Likewise.
6878 * src/unexpand.c (unexpand): Likewise.
6879 * src/join.c (is_blank): Remove; no longer needed. All uses
6880 replaced by isblank (to_uchar (...)).
6881 * src/pinky.c (create_fullname): Don't assume char is unsigned.
6882 * src/printf.c (print_esc): Likewise.
6883 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
6884 (copy_unescaped_string): Likewise.
6885 * src/stat.c (print_it): Likewise.
6886 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
6887 convenience on GNU systems. All uses changed. Don't bother
6888 looking for any dirent.h substitute other than ndir.h.
6889 (D_INO): Remove unnecessary parentheses.
6890 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
6891 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
6892 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
6893 to ctype.h equivalents.
6894 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
6897 2006-07-08 Jim Meyering <jim@meyering.net>
6899 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
6901 * Makefile.maint (sc_the_the): New rule.
6903 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
6904 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
6907 2006-07-07 Jim Meyering <jim@meyering.net>
6909 * NEWS: Mention that mv can now remove an empty destination directory,
6910 and give an example. Prompted by a report from Florent Bayle.
6912 2006-07-05 Jim Meyering <jim@meyering.net>
6914 * src/ls.c (usage): Correct the description of -G: it is useful
6915 only in a long listing. Reported by Martin Pool in
6916 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
6918 * man/chmod.x: Correct the description of the sticky bit. Reported
6919 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
6921 * src/copy.c (copy_internal): Don't work around old NFS clients like
6922 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
6923 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
6924 a banal failure as a recursive move-into-self failure.
6925 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
6927 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
6929 2006-07-03 Jim Meyering <jim@meyering.net>
6931 Plug another unusual leak.
6932 (AD_mark_helper): Free malloc'd filename if hash_insert says
6933 that string is already in the hash table.
6935 The dev/inode of the topmost directory in each hierarchy were not
6937 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
6938 (AD_push): Call it from here instead.
6940 Fix two small leaks.
6941 * src/remove.c (AD_stack_clear): New function.
6943 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
6945 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
6946 Add $VG_PATH_PREFIX as a prefix to $PATH
6948 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
6949 * tests/Makefile.am (evar-check): Remove rule.
6950 (EXTRA_DIST): Remove .env-warn.
6951 * tests/.env-warn: Remove file. No longer used.
6952 Suggestion from Eric Blake.
6954 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
6956 * src/system.h: Include <stdint.h> unconditionally, since we
6957 now assume the stdint module.
6959 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
6961 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
6962 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
6963 * src/tail.c (main): Implement this.
6964 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
6965 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
6967 2006-07-01 Jim Meyering <jim@meyering.net>
6969 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
6971 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
6974 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
6976 * NEWS: seq now uses long double internally rather than double.
6977 It now defaults to a minimal fixed point format if possible.
6978 It lets you use %a, %A, %E, %F, %G.
6979 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
6980 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
6981 (isfinite) [!defined isfinite]: New macro.
6982 (separator, terminator): Now points to const.
6983 (first, step, last): Remove.
6984 (usage): Update to match new behavior.
6985 (struct operand, operand): New type.
6986 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
6988 Compute and return a value of type operand, not double.
6989 (long_double_format): Renamed from valid_format, and now returns a
6990 new format with an "L" added if needed, if the original format was
6991 valid. Allow %a, %A, %E, %F, and %G formats.
6992 (print_numbers): Take numeric values as args rather than from globals.
6993 Print long double, not double.
6994 (get_width_format): Remove.
6995 (get_default_format): New function.
6996 (main): Implement new way of calculating default format.
6997 Don't worry about locale's representation of the decimal point, since
6998 the arguments are always processed in the C locale.
6999 * tests/seq/basic (neg-2): Adjust to new default format.
7000 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
7001 implementation should do the right thing.
7003 2006-06-30 Jim Meyering <jim@meyering.net>
7005 * tests/stty/basic-1: Work around an intermittent test failure
7006 on HP-UX 11.11. Report and analysis from Bob Proulx.
7007 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
7009 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
7011 * NEWS: Support obsolete usages like "sort +1 -2" even when
7012 conforming to POSIX 1003.1-2001, since this is a pure extension to
7013 POSIX. Problem reported by Christian in:
7014 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
7015 * src/sort.c (main): Implement this.
7017 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
7018 Autoconf 2.60 says this stuff was obsolete.
7020 2006-06-28 Jim Meyering <jim@meyering.net>
7022 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
7024 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
7026 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
7027 (set -x when VERBOSE=yes) when stderr is redirected before stdout
7028 causing shell tracing of the stdout redirection to be written to
7029 the stderr file. Avoid problem and test failure on HP-UX by
7030 redirecting stderr last.
7031 * tests/dd/unblock-sync: Order shell file redirections for
7032 stderr and stdout in the common style.
7033 tests/acl: Likewise.
7035 2006-06-27 Jim Meyering <jim@meyering.net>
7037 * tests/misc/cat-proc: Try to avoid any spurious numeric
7038 differences in frequently-changing /proc/cpuinfo.
7039 Reported by Nelson Beebe.
7041 2006-06-26 Jim Meyering <jim@meyering.net>
7043 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
7044 fd_to_subdirp failure, not just when errno == EACCES.
7045 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
7046 rmdir, here, even though rmdir may happen to be adequate.
7048 * NEWS: rm no longer fails to remove an empty, unreadable directory
7049 * src/remove.c (remove_cwd_entries): If we can't open a directory,
7050 and the failure is not being ignored, try to remove the directory
7051 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
7052 Problem report and test case from Paul Eggert in
7053 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
7055 * tests/rm/empty-inacc: New test, for the above.
7057 Avoid a segfault for wc --files0=- < /dev/null.
7058 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
7060 2006-06-25 Jim Meyering <jim@meyering.net>
7062 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
7063 contains a list of NUL-separated file names.
7065 * src/wc.c: Include "readtokens.h".
7066 (usage): Describe the new option, and adjust the `Usage':
7067 with this option, no FILE may be specified on the command line.
7068 (main): Handle the new option.
7069 * tests/misc/wc-files0: New tests, for the above.
7070 * tests/misc/wc-files0-from: Likewise.
7071 * tests/misc/Makefile.am (TESTS): Add wc-files0.
7073 2006-06-24 Jim Meyering <jim@meyering.net>
7075 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
7077 2006-06-22 Jim Meyering <jim@meyering.net>
7079 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
7080 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
7082 2006-06-19 Jim Meyering <jim@meyering.net>
7084 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7085 so this check is not run as part of "make distcheck".
7087 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
7089 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
7091 2006-06-18 Jim Meyering <jim@meyering.net>
7093 * tests/misc/pwd-long: Make error output a little clearer.
7095 2006-06-17 Jim Meyering <jim@meyering.net>
7097 * tests/rm/inaccessible: Skip this test on systems without openat
7098 support. Reported by Bob Proulx.
7100 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
7102 * tests/misc/mknod: Improve permission checks to handle
7103 running mkdir test in set-gid directories.
7105 2006-06-14 Jim Meyering <jim@meyering.net>
7107 * tests/du/basic: Revamp not to hard-code file system block sizes.
7109 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7111 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
7114 2006-06-11 Jim Meyering <jim@meyering.net>
7116 * .gitignore: New file.
7117 * Makefile.am (EXTRA_DIST): Add .gitignore.
7119 Setting TIME_STYLE=long-iso in the environment would make the
7120 cp/same-file test fail.
7121 * tests/envvar-check (vars): Add TIME_STYLE to the list.
7122 * tests/cp/same-file: Revert last change.
7123 Source the envvar-check script, to ensure that TIME_STYLE
7124 settings don't affect these tests.
7126 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7128 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
7129 uses POSIX time stamp formats. Problem reported by John Nixon in
7130 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
7132 2006-06-10 Jim Meyering <jim@meyering.net>
7134 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
7136 Require a "Version N.M" line at the top of the ChangeLog
7137 file only when making the actual release, not when running
7139 * Makefile.maint (maintainer-distcheck): Don't depend on
7141 (alpha beta major): Depend on it here, instead.
7143 2006-06-08 Jim Meyering <jim@meyering.net>
7145 Ensure that cat works with any of the options, -A -v -e -E -T,
7146 when applied to files in /proc and /sys, even when the FIONREAD
7147 ioctl produces nonsensical results. Before this change, cat would
7148 produce no output (or truncated output), for some linux kernels.
7150 * src/cat.c (write_pending): New function, factored out of cat.
7151 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
7152 that there are bytes to read. Some versions of linux-2.6.16 do that.
7153 Write any pending output before returning.
7154 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
7155 * NEWS: Mention this bug fix.
7156 * tests/misc/cat-proc: New file. Test for the above.
7157 * tests/misc/Makefile.am (TESTS): Add cat-proc.
7159 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7161 * src/expr.c (eval4): Detect overflow properly when multiplying
7164 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
7166 * NEWS: The 'expr' command now detects and reports integer overflow.
7167 (It would be better to use extended precision instead, but that
7168 would be more work.)
7169 * src/expr.c (integer_overflow): New function.
7170 (eval4, eval3): Check for integer overflow.
7172 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7174 Fix problems when building with Solaris/SVR4/etc. make, which uses a
7175 different and somewhat bogus implementation of VPATH. In the
7176 directory tests/misc, rename tests whose names might appear in the
7177 Automake-generated rules. For example, we can't use a test named
7178 'test', since Automake generates a rule that contains the text
7179 "if test -f ./$$tst; ...", and this might expand to something like
7180 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
7181 which executes the 'test' script rather than the 'test' command.
7182 * tests/misc/false-status: Renamed from tests/misc/false.
7183 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
7184 * tests/misc/sort-merge: Renamed from tests/misc/sort.
7185 ($prog): Set to 'sort' rather than to $PROG.
7186 * tests/misc/test-diag: Renamed from tests/misc/test.
7187 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
7188 in case Solaris make has prepended the directory.
7189 (TESTS): Adjust to above renamings.
7190 * tests/misc/expand: Don't assign to PROG; no longer needed
7191 now that Makefile.am sets PROG to the basename.
7192 * tests/misc/fold: Likewise.
7194 2006-06-03 Jim Meyering <jim@meyering.net>
7196 Make `cp --link --no-dereference' work also on systems where the
7197 link system call cannot create a hard link to a symbolic link.
7198 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
7199 the link syscall on a symlink when it would do the wrong thing.
7200 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
7201 * tests/cp/link-no-deref: New file/test for the above.
7202 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
7203 * NEWS: Mention the change (doesn't affect Linux).
7205 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
7207 Fix some porting problems in the test cases reported by
7208 Ralf Wildenhues for HP-UX 11.23 in:
7209 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
7210 * tests/help-version: Don't assume that \< \> works in sed.
7211 * tests/misc/close-stdout: Don't assume that >&- works.
7212 Add a /dev/full test.
7213 * tests/touch/no-create-missing: Don't assume that >&- works.
7215 2006-05-30 Jim Meyering <jim@meyering.net>
7217 * src/ls.c (usage): Add `v' to the list of sorting-related options.
7220 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7222 * tests/cp/fail-perm: source lang-default.
7223 * tests/rm/inaccessible: Likewise.
7225 2006-05-28 Jim Meyering <jim@meyering.net>
7227 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
7228 Recognize it, too. Reported by Ralf Wildenhues, in
7229 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
7231 2006-05-27 Jim Meyering <jim@meyering.net>
7233 * src/chgrp.c: Support new options: --preserve-root and
7234 --no-preserve-root. Somehow this program was skipped when those
7235 options were added to chown, chmod, and rm. Reported by
7236 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
7237 * NEWS: Mention this.
7239 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
7241 * NEWS: Remove mention of --seed. We'll replace it with something
7242 better, and don't want to indicate that it is supported.
7243 * src/sort.c (usage): Likewise.
7245 2006-05-20 Jim Meyering <jim@meyering.net>
7247 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
7249 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
7250 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
7251 FTS_COMFOLLOW. Spotted by Justin Pryzby.
7253 * gnupload: Merge changes from automake, retaining the ""--to...
7254 kludge to placate overzealous `make distcheck' check.
7256 2006-05-19 Jim Meyering <jim@meyering.net>
7258 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
7259 FTS_TIGHT_CYCLE_CHECK directory traversal option.
7260 Reported by Justin Pryzby in http://bugs.debian.org/367691
7262 2006-05-15 Jim Meyering <jim@meyering.net>
7264 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
7265 From Tomas Pospisek.
7267 2006-05-13 Jim Meyering <jim@meyering.net>
7269 * tests/mv/no-target-dir: Test two more cases.
7271 2006-05-11 Jim Meyering <jim@meyering.net>
7273 mv -T DIR EMPTY_DIR no longer fails unconditionally
7274 * src/copy.c (copy_internal): Don't manually prohibit a move where
7275 the destination is an existing directory. Sometimes doing that is
7276 valid. Let the rename system call enforce the rules. That is
7277 allowed only when the source is a directory and the destination
7278 directory (to be replaced) is empty. Reported by Eric Blake.
7279 * tests/mv/no-target-dir: New file/test for this.
7280 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
7281 * NEWS: Mention this.
7283 * tests/mv/atomic: New file/test for yesterday's fix.
7284 * tests/mv/Makefile.am (TESTS): Add atomic.
7286 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
7288 2006-05-10 Jim Meyering <jim@meyering.net>
7290 * src/copy.c (copy_internal): Don't explicitly unlink the destination
7291 when moving a symlink into the place of an existing non-directory.
7292 Reported by Joshua Hudson.
7293 * NEWS: mention this.
7295 2006-05-07 Jim Meyering <jim@meyering.net>
7297 * Makefile.maint (patch-check): Fail if patch generates any output,
7298 even merely for changed offsets.
7300 * src/c99-to-c89.diff: Adjust to reflect new offsets.
7302 * NEWS: Mention changes affecting df, pwd, shred.
7304 2006-05-06 Jim Meyering <jim@meyering.net>
7306 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
7307 system condition where dirent.d_ino != stat.st_ino.
7308 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
7310 2006-05-06 Eric Blake <ebb9@byu.net>
7312 * tests/ls/inode: Expand to test inode from readdir case.
7313 * tests/ls/follow-slink: Expand to test broken links encountered
7314 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
7316 2006-05-06 Eric Blake <ebb9@byu.net>
7318 * tests/mv/leak-fd: Work even on case-insensitive file system.
7320 2006-05-04 Jim Meyering <jim@meyering.net>
7322 * NEWS: Mention the 2006-03-19 pwd-related change that makes
7323 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
7325 2006-05-03 Jim Meyering <jim@meyering.net>
7327 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
7328 Use better macro parameter names: s/basename/key_name/,
7329 s/basefunc/key_cmp_func. Fix typo in comment.
7331 2006-04-29 Eric Blake <ebb9@byu.net>
7333 * src/ls.c (main): On systems with d_type, directories_first only
7334 implies format_needs_type, not format_needs_stat.
7336 2006-05-03 Jim Meyering <jim@meyering.net>
7338 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
7339 after comma in arg list, from Eric Blake.
7341 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7343 * tests/misc/date (relative-3): New test, derived from a bug
7344 report by John Thomas McDole.
7346 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
7348 New option for ls: --group-directories-first.
7349 It makes ls list directories before files.
7350 * NEWS [New features]: Mention it.
7351 * src/ls.c (sort_type): Rearrange to use as an array index when
7352 choosing sort function; added new sort_numtypes member for
7354 (time_type): Add new time_numtypes member for compile-time check.
7355 (directories_first): New global variable.
7356 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
7357 (long_options): Add --directories-first.
7358 (main): Support new option.
7359 (is_directory): New function.
7360 (extract_dirs_from_files): Use it.
7361 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
7362 (LIST_SORTFUNCTION_VARIANTS): New macros.
7363 (sort_functions): New global variable.
7364 (sort_files): Use it.
7365 (usage): Document new option.
7367 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
7369 * src/shred.c (fillrand): The assertion was way too weak, due to
7370 what must be a typo. Strengthen it to its intended value.
7371 (dopass): Don't use alloca; it's not worth the aggravation here,
7372 since it's used only to get a page-aligned buffer, and page
7373 alignment doesn't buy us much here. I'm suspicious that alloca
7374 causes problems on some hosts, due to a recent bug report by Adam
7375 Waltman: http://bugs.gentoo.org/130246.
7377 2006-04-18 Jim Meyering <jim@meyering.net>
7379 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
7380 sha384sum, sha512sum.
7382 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
7384 * src/chmod.c (describe_change): Adjust to filemode changes.
7385 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
7386 (print_long_format): Use (new) filemodestring rather than
7387 (old) mode_string, so that we get more file types right, at least
7388 in theory. Adjust to filemode changes.
7389 * src/stat.c (human_access): Likewise.
7391 2006-04-18 Jim Meyering <jim@meyering.net>
7393 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
7394 ignore file. This has never been enabled. Reported by Eric Blake.
7396 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
7398 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
7399 bug in Interix. Just call symlink or link directly. All uses changed.
7400 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
7401 * src/stat.c (USE_STATVFS): New macro.
7402 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
7403 (NAMEMAX_FORMAT): define a bit more clearly, now that the
7404 statvfs-using code is a bit more regular.
7405 * src/system.h (sync) [!HAVE_SYNC]: New macro.
7407 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
7409 * NEWS: csplit, nl, expr now conform to POSIX better, and are
7410 more-compatible with traditional Unix, with respect to regular
7412 * src/csplit.c (extract_regexp): Set re_syntax_options to a
7413 value that is compatible with what POSIX requires.
7414 * src/nl.c (build_type_arg): Likewise.
7415 * src/expr.c (docolon): Likewise. Also, don't let anchors match
7416 newline; this fixes an incompatibility with tradition and with POSIX.
7417 Don't warn about leading ^. POSIX says it is unspecified whether
7418 ^ is a special character, which means that implementations can
7419 either treat it as special or not, but either way a warning is not
7420 allowed (unless the regexp is otherwise invalid). Instead, anchor
7421 the expression but treat ^ as an anchor; this is the traditional
7422 behavior (e.g., Solaris 10).
7423 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
7424 and the like as invalid expressions (exit status 2), not as
7425 failure of 'expr' (exit status 3). This is more consistent with
7426 how Solaris behaves.
7427 * tests/expr/basic (fail-a): Adjust exit status to match new expr
7428 behavior, for status 2 versus 3.
7430 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
7431 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
7432 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
7433 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
7434 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
7435 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
7436 (bre61, bre62): New tests.
7437 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
7438 conforming to POSIX.
7441 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
7442 "if !". Do not assume that 'sed' can handle long, newline-free input.
7443 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
7445 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
7447 Adjust to new regex.h API (with new fastmap type), and clean
7448 up the regex storage allocation a bit.
7450 * src/csplit.c (struct control): Put re_compiled member at the
7451 end, since it's large. Change regexpr member from char * to bool;
7452 all uses changed. Add new member fastmap.
7453 (extract_regexp): regexp arg is now char const *, not char *.
7454 Don't bother duplicating the regular expression; it's not needed.
7455 Set fastmap from new fastmap member. Don't bother allocating
7456 a buffer, as the regexp code does a better job than we do.
7457 * src/expr.c (docolon): Allocate and use a fastmap.
7458 Don't bother allocating a buffer.
7459 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
7461 (build_type_arg): New fastmap arg. All uses changed.
7462 Don't bother allocating a buffer, but set a fastmap.
7463 * src/ptx.c (context_regex_string, word_regex_string): Remove.
7464 (context_regex, word_regex): New vars, replacing the above.
7466 (struct regex_data): New type.
7467 (compile_regex): Renamed from alloc_and_compile_regex, since
7468 we no longer allocate storage. Arg is now a struct regex_data *,
7469 not a const char *. All uses changed. Don't allocate the fastmap;
7470 instead, take it from the caller. Don't convert size_t to int,
7471 to avoid arithmetic overflow problems. Don't bother freeing
7472 storage afterwards; it's not worth the aggravation.
7473 * src/tac.c (compiled_separator_fastmap): New ver.
7474 (main): Use it. Don't bother allocating a buffer.
7476 2006-03-30 Jim Meyering <jim@meyering.net>
7478 * src/dd.c (iwrite): Remove assignment without effect.
7479 Reported by Felix Rauch Valenti.
7481 2006-03-22 Eric Blake <ebb9@byu.net>
7483 * src/ptx.c (usage): Remove mention of --copyright/-C.
7484 (main): Alias --copyright to --version plus a deprecation warning.
7485 * NEWS: Mention this.
7487 2006-03-27 Jim Meyering <jim@meyering.net>
7489 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
7490 use of strtod. Tiny patch from Nickolai Zeldovich.
7492 2006-03-11 Eric Blake <ebb9@byu.net>
7494 * tests/misc/dirname: New file.
7495 * tests/basename/Makefile.am: Delete.
7496 * tests/basename/basic: Move to...
7497 * tests/misc/basename: ... this new file. Add some tests,
7498 including fixed behavior for //.
7499 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
7500 * tests/Makefile.am (SUBDIRS): Remove basename.
7501 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
7503 Improvements to dirname/basename handling on platforms like
7504 cygwin with distinct // and with drive letters.
7505 * NEWS: Document new behavior.
7506 * src/basename.c (main): Don't strip suffix from file system
7508 * src/cp.c (target_directory_operand): Use new last_component.
7509 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
7510 traversing the string.
7511 * src/dircolors.c (guess_shell_syntax): Use new last_component.
7512 * src/install.c (target_directory_operand, install_file_in_dir):
7514 * src/ln.c (target_directory_operand, main): Likewise.
7515 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
7516 * src/mv.c (target_directory_operand, movefile): Likewise.
7517 * src/remove.c (rm_1): Likewise.
7518 * src/shred.c (wipename): Likewise.
7519 * src/split.c (next_file_name): Likewise.
7520 * src/su.c (log_su, run_shell): Likewise.
7522 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
7524 * NEWS: nohup diagnostics are now more precise, and nohup now
7525 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
7526 * src/nohup.c (main): Implement this.
7527 * tests/misc/nohup: Test the new behavior.
7529 2006-03-12 Jim Meyering <jim@meyering.net>
7531 * src/copy.c (set_author): Rename function, from preserve_author.
7533 * src/remove.c (AD_pop_and_chdir): Use new macro,
7534 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
7536 * src/system.h (SAME_INODE): Remove definition.
7537 Include "same-inode.h", instead.
7539 2006-03-11 Eric Blake <ebb9@byu.net>
7541 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
7543 2006-03-10 Jim Meyering <jim@meyering.net>
7545 Fix a bug whereby a user with write access to a directory being removed
7546 could cause the removal of that directory to fail with an erroneous
7547 diagnostic about a directory cycle. Reported by Vineet Chadha.
7549 * NEWS: Mention this.
7550 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
7551 leave (and try to rmdir) is the one whose dev_ino is being used to
7552 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
7554 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7556 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
7557 * src/dd.c (set_fd_flags): Handle file-creation flags on file
7558 descriptors, rather than ignoring them.
7559 * tests/dd/misc: Add test cases for append, nofollow, directory,
7560 and nolinks flags. Simplify redirection to /dev/null in some cases.
7562 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
7563 noatime test never tested anything.
7565 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
7567 * src/dd.c (flags, usage): New flags directory, nolinks.
7568 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
7570 * src/ls.c (usage): Mention that -f disables --color.
7571 Problem reported by Niels Möller.
7573 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
7575 * man/*.x: Add references to syscalls from utilities of the same name.
7577 2006-03-05 Jim Meyering <jim@meyering.net>
7579 * tests/help-version: Set SHELL, if not already set, in order to
7580 avoid failure when `make check' is run through debuild; dircolors
7581 would fail due to lack of $SHELL. Reported by Sven Joachim.
7583 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
7584 * src/base64.c (wrap_write, do_encode, main): Change type of
7585 parameters and locals, wrap_column, form size_t to uintmax_t.
7586 (main): Adjust to use xstrtoumax, accordingly.
7588 2006-03-03 Jim Meyering <jim@meyering.net>
7590 Don't fail when run from an environment with SHELL not a Bourne
7591 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
7592 * tests/dircolors/simple: Invoke each non-failing test with -b.
7593 Reported by Michael Stone.
7595 2006-02-27 Jim Meyering <jim@meyering.net>
7597 * tests/misc/base64: Derive --decode-using tests from the
7600 * tests/misc/base64: Factor out a long constant string.
7601 Split lines to stay within 80 columns.
7603 * tests/misc/Makefile.am (TESTS): Add base64.
7604 * tests/misc/base64: Test base64. From Simon Josefsson.
7606 * src/base64.c (do_decode): Use correct type for parameter,
7607 ignore_garbage: s/size_t/bool/.
7609 * src/base64.c: Don't include .h files already included by system.h:
7610 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
7611 Include "system.h" before the other lib/*.h header files.
7612 Include <sys/types.h> before "system.h".
7613 (wrap_write): Remove declaration of unused local, initial_column.
7614 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
7616 * README: Add base64 to the list.
7618 2006-02-17 Simon Josefsson <jas@extundo.com>
7620 New program: base64.
7621 * AUTHORS: Mention base64.
7623 * man/Makefile.am: Build base64.1.
7624 * man/base64.x: New file.
7625 * src/Makefile.am (bin_PROGRAMS): Add base64.
7626 * src/base64.c: New file.
7628 2006-02-25 Eric Blake <ebb9@byu.net>
7630 In ls, avoid calling stat for --inode (-i), when possible.
7631 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
7632 * src/system.h: ... here, for use in ...
7633 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
7635 (gobble_file): Add inode argument.
7636 (print_dir): Pass inode if available.
7637 (usage): Remove inaccuracy.
7639 2006-02-23 Jim Meyering <jim@meyering.net>
7641 * TODO: Update/correct some obsolete entries.
7643 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
7645 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
7646 * src/join.c (usage): Likewise.
7647 Documentation problem reported by Philip Kensche.
7649 2006-02-20 Eric Blake <ebb9@byu.net>
7651 * man/rm.x: Update documentation to match previous patch.
7653 2006-02-18 Eric Blake <ebb9@byu.net>
7655 New option for rm: --interactive=once (-I).
7656 * NEWS: Document it, along with change to rm --interactive.
7657 * TODO: Remove entry for implementing rm -I
7658 * src/rm.c (INTERACTIVE_OPTION): New enum value.
7659 (interactive_type): New enum.
7660 (long_opts): Let interactive take an optional argument.
7661 (interactive_args, interactive_types): New option arguments.
7662 (usage): Document -I, --interactive=WHEN. Use program_name
7663 instead of a basename.
7664 (main): New -I option, new behavior to --interactive.
7665 * tests/rm/interactive-once: New tests.
7666 * tests/rm/interactive-always: Ditto.
7667 * tests/rm/Makefile.am (TESTS): Run them.
7669 2006-02-18 Jim Meyering <jim@meyering.net>
7671 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
7672 expression match more of the target lines, e.g., those that start with
7673 `-S,' (short option followed by a comma) or that include `=[...]'.
7674 Patch by Nicolas François.
7675 Fix the four offenders thus exposed:
7676 * src/join.c (usage): Use two spaces (not one) to separate the
7677 --first-only option string from its description, so help2man formats
7678 the derived man page properly.
7679 * src/pr.c (usage): Likewise.
7680 * src/uniq.c (usage): Likewise.
7681 * src/install.c (usage): Likewise.
7683 2006-02-15 Jim Meyering <jim@meyering.net>
7685 * Makefile.maint (alpha beta major): For `make major', ensure that the
7686 version string is of the form N.N[.N]*, where N is one or more digits.
7688 2006-02-14 Jim Meyering <jim@meyering.net>
7690 * INSTALL: Update from gnulib.
7692 2006-02-13 Jim Meyering <jim@meyering.net>
7694 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
7696 2006-02-12 Jim Meyering <jim@meyering.net>
7698 * Makefile.maint (patch-check): New target.
7699 (local-checks-available): Add to the list.
7701 2006-02-11 Jim Meyering <jim@meyering.net>
7703 * src/c99-to-c89.diff: New file.
7704 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
7706 * .x-po-check: New file, with exclusions so that `make distcheck'
7708 * Makefile.am (EXTRA_DIST): Add .x-po-check.
7710 rm -r must remove an empty directory, even if it is inaccessible.
7711 * src/remove.c (close_preserve_errno): New function.
7712 (fd_to_subdirp): Don't print a diagnostic in this function.
7713 Do it from the callers instead, unless rmdir succeeds.
7714 (remove_cwd_entries, remove_dir): Adjust callers.
7715 * tests/rm/empty-inacc: New test for the above.
7716 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
7717 * NEWS: Mention this bug fix.
7718 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
7719 a tiny bit less precise: cannot remove `a/1': ... instead of
7720 cannot open directory `a/1': ...
7722 * Makefile.maint (syntax-check-rules): Automatically derive this
7723 list of sc_-prefixed rule names.
7725 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7727 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
7728 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
7729 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
7730 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
7731 go away? was that an accident?)
7732 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
7733 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
7734 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
7735 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
7736 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
7737 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
7738 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
7739 (author_mark_check, makefile_path_separator_check):
7740 Output line numbers, to simplify navigation of Emacs *compilation*
7742 (sc_prohibit_atoi_atof, sc_file_system):
7743 Rework slightly so that Makefile.maint doesn't get reported as a
7744 violation of its own syntax rules.
7745 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
7746 it at run-time (which didn't work with Bison). Fix a makefile typo,
7747 caught by Makefile.maint itself: spaces where a tab should be.
7748 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
7749 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
7750 Ignore djgpp and man subdirectories, to avoid false matches with
7751 Bison and coreutils, respectively. Use sort -u to remove the
7752 resulting duplicates.
7753 * gnupload: Rework slightly to avoid bogus warning from
7754 sc_two_space_separator_in_usage.
7756 2006-02-10 Jim Meyering <jim@meyering.net>
7758 Use gzip's --rsyncable option only if it's available.
7759 * Makefile.maint (gzip_rsyncable): New variable.
7762 2006-02-08 Jim Meyering <jim@meyering.net>
7764 * Makefile.maint (local-checks-available): Define in terms of
7765 the expansion, $(syntax-check-rules), rather than the single,
7766 top-level target `syntax-check', so that it's easier to exclude
7767 individual rules (via $(local-checks-to-skip)).
7768 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
7770 2006-02-07 Jim Meyering <jim@meyering.net>
7772 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
7773 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
7775 * tests/help-version (expected_failure_status_vdir):
7776 Redirect an expected disk-full diagnostic to /dev/null.
7778 2006-02-06 Jim Meyering <jim@meyering.net>
7780 * src/unexpand.c (usage): Use two spaces (not one) to separate the
7781 --first-only option string from its description, so help2man formats
7782 the derived man page properly.
7783 * src/rm.c (usage): Likewise for --no-preserve-root.
7784 * src/chown.c (usage): Likewise.
7785 * src/chgrp.c (usage): Likewise.
7787 Add a rule to ensure that the above doesn't happen again.
7788 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
7789 (syntax-check-rules): Add it.
7790 * .x-sc_two_space_separator_in_usage: New empty file.
7791 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
7793 2006-02-06 Jim Meyering <jim@meyering.net>
7795 * src/cp.c (usage): Use two spaces (not one) to separate each
7796 option string from its description, so help2man formats the
7797 derived man page properly.
7798 * src/mv.c (usage): Likewise.
7799 Patch from Nicolas François in http://bugs.debian.org/351601.
7801 2006-02-04 Jim Meyering <jim@meyering.net>
7803 * src/copy.c (copy_internal): cp -RL would fail when encountering
7804 the same directory more than once in the hierarchy beneath a single
7805 command-line argument. That is legitimate, e.g. when there are
7806 two or more symbolic links, each pointing to some directory that
7807 would not otherwise be copied. Reported by Christophe LYON.
7808 * tests/cp/cp-deref: New file. Test for today's fix.
7809 * tests/cp/Makefile.am (TESTS): Add cp-deref.
7810 * NEWS: Document this.
7812 2006-02-03 Jim Meyering <jim@meyering.net>
7814 * configure.ac: Require automake-1.9.6, not 1.8.3.
7816 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7818 * src/od.c (usage): Mention that -t a ignores high order bit.
7819 Documentation problem reported by Ed Avis.
7821 2006-02-01 Jim Meyering <jim@meyering.net>
7823 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
7825 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7827 * src/head.c (main): Use a better diagnostic when someone uses a
7828 trailing numeric option in an invalid way. Problem reported by
7830 * src/tail.c (parse_options): Likewise.
7832 2006-01-30 Jim Meyering <jim@meyering.net>
7834 * man/wc.x: Include `count' keyword in man page synopsis,
7835 per suggestion from http://bugs.debian.org/181585.
7837 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
7839 * src/df.c (show_dev): If the file system claims to have
7840 more available than total blocks, report the number of used
7841 blocks as being total - available (a negative number) rather
7842 than as garbage. Problem reported by Toralf Foerster.
7844 2006-01-24 Jim Meyering <jim@meyering.net>
7846 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
7847 to put a regular file in O_NONBLOCK mode fails with EPERM.
7848 That happens on Linux (up to 2.6.15) when using tail -f on a file with
7849 the append-only attribute. Reported by Dean Gaudet. For details,
7850 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
7851 * NEWS: Mention this fix.
7852 * tests/tail-2/append-only: New file. Test for the above.
7853 * tests/tail-2/Makefile.am (TESTS): Add append-only.
7854 * tests/Makefile.am (check-root): Add tail-2/append-only
7856 2006-01-21 Jim Meyering <jim@meyering.net>
7858 * NEWS: Mention fts-related improvements and bug fixes.
7860 2006-01-19 Jim Meyering <jim@meyering.net>
7862 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
7863 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
7865 2006-01-18 Jim Meyering <jim@meyering.net>
7867 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
7869 2006-01-17 Jim Meyering <jim@meyering.net>
7871 Now that fts no longer changes the current working directory, adjust
7872 its clients accordingly -- note that du.c uses fts but doesn't need
7873 any adjustment, since it doesn't operate on the actual files,
7874 but rather just uses the stat buffers provided by fts.
7876 * src/chown-core.c: Include "openat.h".
7877 Don't include "lchown.h".
7878 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
7879 calling openat, lchownat, chownat, rather than open, lchown, chown.
7881 * src/chmod.c: Include "openat.h".
7882 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
7884 * tests/du/long-from-unreadable: New test, to exercise one small
7887 2006-01-13 Jim Meyering <jim@meyering.net>
7889 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
7890 addition of new directories under tests/.
7892 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
7895 2006-01-12 Jim Meyering <jim@meyering.net>
7897 * tests/du/long-sloop: Adjust not to hard-code the expected
7898 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
7899 from that of GNU libc. Reported by Paul Eggert.
7901 * tests/du/long-sloop: Create file at end of symlink chain.
7903 * tests/misc/test: New file, with a test for one of the
7904 bugs fixed by yesterday's test.c changes.
7905 * tests/misc/Makefile.am (TESTS): Add test.
7907 2006-01-11 Jim Meyering <jim@meyering.net>
7909 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
7910 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
7911 a very long sequence of symbolic links (not necessarily a loop).
7912 * tests/du/Makefile.am (TESTS): Add long-sloop.
7914 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
7916 * src/test.c (test_syntax_error): Append a newline. All callers
7917 changed, except for the ones that didn't already append a newline.
7918 Bug reported by Eric Blake.
7920 2006-01-11 Jim Meyering <jim@meyering.net>
7922 * src/system.h (X2NREALLOC): Now that verify_true is no longer
7923 void, cast its result to void, to avoid gcc's warning that
7924 ``left-hand operand of comma expression has no effect''.
7925 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
7927 2006-01-10 Jim Meyering <jim@meyering.net>
7929 * tests/chmod/no-x: Add a test for today's fts.c fix.
7931 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
7933 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
7934 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
7936 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
7938 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
7939 Use verify_true instead of verify_expr, to sync with gnulib.
7941 2006-01-08 Jim Meyering <jim@meyering.net>
7943 * src/date.c (usage): Adjust the formatting of the entries for
7944 %::z and %:::z (separate with two spaces, not one) so that help2man
7945 formats them properly. Reported by Philip Rowlands.
7947 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
7949 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
7951 2006-01-06 Jim Meyering <jim@meyering.net>
7953 * Makefile.maint (copyright-check): Use date +%Y in place of
7956 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
7957 First off, the attribute should have been `volatile' (not static)
7958 to avoid longjmp-related risk of clobber. Secondly, now there is
7959 no longer any risk of a local variable being clobbered, so there's
7960 no need for any attribute at all.
7962 2006-01-05 Jim Meyering <jim@meyering.net>
7964 * src/remove.c: Give a few functions the inline attribute.
7965 (AD_pop_and_chdir): Use gotos to avoid some duplication.
7966 (AD_push): Rewrite an assertion so that the entire computation
7967 goes away when assertions are turned off.
7969 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
7970 It's already defined in "system.h".
7971 * Makefile.maint: Add a FIXME comment.
7973 2006-01-04 Jim Meyering <jim@meyering.net>
7975 * ChangeLog: Remove entries from 2005-10-22 and earlier.
7976 * ChangeLog-2005: New file, for entries up to version 5.92.
7978 2006-01-03 Jim Meyering <jim@meyering.net>
7980 * tests/du/no-x: Also allow a slightly different diagnostic -- the
7981 one you get when using openat-enabled fts.c and du (coming soon).
7982 * tests/chmod/no-x: Likewise.
7983 * tests/chgrp/no-x: Likewise.
7985 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
7987 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
7989 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
7990 (restricted_chown): Return it, if the file cannot be accessed due
7991 to EPERM, or if no uid or gid are required, or if the file is
7992 neither a directory nor a regular file. Rewrite to avoid gotos.
7993 (change_file_owner): Handle RC_do_ordinary_chown case.
7994 Rewrite to avoid gotos.
7995 * tests/chgrp/basic: Make sure we can change the group of
7998 * src/date.c (usage): Explain %g, %G, and %V a bit better.
8000 2006-01-02 Jim Meyering <jim@meyering.net>
8002 * src/copy.c (set_owner): Correct a comment.
8004 * src/tail.c (parse_options): Change warning to say that --retry
8005 is useful `mainly' (not `only') when following by name.
8006 Reported here: http://bugs.debian.org/273781
8008 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
8010 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
8011 * src/copy.c: Include lchmod.h.
8012 (copy_internal): Use lchmod rather than chmod.
8013 * src/cp.c: Include lchmod.h.
8014 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
8015 * src/mkdir.c: Include lchmod.h.
8016 (usage): Clarify -m's operation.
8017 (main): Use lchmod rather than chmod. Don't use lchmod unless the
8018 new mode contains bits outside the 777 range.
8019 * src/mkfifo.c (usage): Clarify -m's operation.
8020 (main): If -m is given, don't invoke chmod; use umask 0 instead.
8021 Report an error if -m asks for bits outside the 777 range.
8022 * src/mknod.c (usage, main): Likewise.
8024 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
8026 2005-12-27 Jim Meyering <jim@meyering.net>
8028 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
8029 (sc_prohibit_assert_without_use): New rule.
8030 (syntax-check-rules): Add it to the list.
8031 * .x-sc_prohibit_assert_without_use: New empty file.
8032 * Makefile.am (EXTRA_DIST): Add it.
8034 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
8036 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
8037 Don't include <assert.h>; it wasn't used.
8039 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
8041 * src/chown-core.c (restricted_chown):
8042 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
8043 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
8044 | O_NOFOLLOW too, for consistency with other dir-openers.
8045 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
8046 (is_empty_dir): Likewise.
8047 * src/shred.c (wipename): Likewise. Don't bother trying to open
8048 dir for writing, since POSIX prohibits it.
8050 2005-12-22 Jim Meyering <jim@meyering.net>
8052 * tests/help-version: Redirect stderr to /dev/full, to suppress
8053 write error diagnostic.
8055 2005-12-19 Jim Meyering <jim@meyering.net>
8057 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
8058 Avoid a minor race condition when `-m MODE' is specified, by using
8059 open, fchown, and close rather than just chown. To do that reliably --
8060 even with an overly restrictive umask -- ensure that each mkdir,
8061 mknod and mkfifo call uses a mode including at least owner-read access.
8062 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
8063 the subsequent chown (or equivalent open,fchown,close) fails.
8064 * tests/misc/mknod: New tests.
8065 * tests/misc/Makefile.am (TESTS): Add mknod.
8067 2005-12-17 Jim Meyering <jim@meyering.net>
8069 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
8070 e.g., on a named pipe.
8071 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
8072 place of all uses, since it is guaranteed (system.h) to be defined.
8074 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
8076 Add POSIX ACL support
8077 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
8078 is no requirement for ACL support; particularly, it does not exist
8079 on systems that have POSIX ACLs.
8080 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
8081 * src/cp.c (umask_kill): With default acls, the umask is not to be
8082 applied. Remove umask_kill, don't change the process umask, and let
8083 the kernel apply the umask where appropriate.
8084 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
8085 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
8087 (copy_reg, copy_internal): Use copy_acl and set_acl
8088 instead of fchown/chown. Fix the logic for POSIX ACLs.
8089 (chown_succeded): Remove; we now always copy acls and
8090 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
8091 did a chown before or not.
8092 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
8093 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
8094 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
8095 to link with it via $(LIB_ACL), for the utilities that need it.
8097 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
8099 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
8100 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
8101 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
8102 value is now signified by whether cwd_errno is null.
8103 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
8104 pointer-to-bool to pointer-to-errno-value. All callers changed.
8105 (rm_1): Don't bother setting a local cwd failure flag and then
8106 ORing it into the caller's. Just set the caller's.
8107 (rm): Use cwd failure errno value to print a slightly-better
8110 2005-12-15 Jim Meyering <jim@meyering.net>
8112 * src/stat.c (print_it): Properly handle a backslash at the
8113 end of a --printf format string. Reported by Paul Eggert.
8114 * tests/misc/stat-printf (end-bs): Add a test for the above.
8116 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
8118 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
8119 Don't assume /etc/passwd contains user names; use 'id' instead.
8121 2005-12-15 Jim Meyering <jim@meyering.net>
8123 stat: revert behavior of --format=FMT (-c)
8124 stat: add new option: --printf=FMT
8125 * NEWS: Mention this.
8126 * src/stat.c (isodigit, octtobin, hextobin): Define.
8127 (PRINTF_OPTION): Define.
8128 (interpret_backslash_escapes, trailing_delim): New globals.
8129 (usage): Document them. Alphabetize on long option names.
8130 (print_esc_char): New function.
8131 (print_it): Rewrite, in order to handle backslash escapes.
8132 (main): Handle new option. Set globals for --format, too.
8134 * tests/misc/stat-printf: Test --printf and --format.
8135 * tests/misc/Makefile.am (TESTS): Add stat-printf.
8137 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
8139 * NEWS: sort now reports incompatible options.
8140 * src/sort.c (incompatible_options, check_ordering_compatibility):
8142 (main): Use them. Don't bother with a usage message for
8143 "sort -c a b", for consistency with other error diagnostics.
8144 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
8147 * src/cat.c (main): Undo previous change. close_stdout already
8148 does the check, so the previous change wasn't necessary.
8150 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
8152 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
8154 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8156 Install a more-conservative approach for sort -R. It's the
8157 same basic idea as the existing code, except it uses the full ISAAC
8158 approach (called the "more kosher" approach in the existing comments).
8159 This makes "sort -R" quite a bit slower (about a factor of 2 on my
8160 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
8161 better to be conservative here at first, and review any performance
8162 improvements carefully.
8163 * .x-sc_require_config_h: Add src/rand-isaac.c.
8164 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
8165 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
8166 (shred_SOURCES, sort_SOURCES): Remove.
8167 (EXTRA_DIST): Add rand-isaac.c.
8168 * src/rand-isaac.c: Revert to what used to be in shred.c, without
8169 changing it to allow for varying numbers of words in the state.
8170 Alter so that we include rand-isaac.c directly rather than
8171 compiling it and linking to it. Don't include config.h or
8172 system.h; that's the includer's responsibility.
8173 Omit functions that are specific to shred.
8174 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
8175 (isaac_step, struct irand_state):
8176 Resurrect these, with the same defns that used to be in shred.c.
8177 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
8178 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
8180 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
8181 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
8182 (irand_init, irand32, irand_mod):
8183 Number of words is constant again.
8184 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
8185 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
8186 * src/sort.c: Likewise.
8187 * src/shred.c (fillrand, dopass, main): Undo previous change.
8188 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
8190 * src/sort.c: Don't include md5.h; it wasn't needed.
8191 (struct keyfield): Rename random_hash to random, for consistency
8192 with the other member names. All uses changed.
8193 (usage): Tweak wording to mention STRING for --seed option.
8194 (short_options): Rorder for consistency with other programs.
8195 (rand_state): Now a struct, not a pointer to one. All uses changed.
8196 (HASH_WORDS, HASH_SIZE): Remove.
8197 (get_hash): Remove comments around resbuf size, since we can assume C89.
8198 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
8199 (keycompare): Adjust to the new get_hash.
8201 (badfieldspec): Omit recently-introduced comment; it isn't needed.
8202 (main): Don't set need_random simply because gkey has it set; that
8203 doesn't necessarily mean we'll need random numbers.
8204 Redo seeding to match new get_hash approach.
8206 2005-12-10 Jim Meyering <jim@meyering.net>
8208 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
8210 Avoid shred segfault on 64-bit systems.
8211 * src/rand-isaac.c (isaac_refill): Don't try to negate a
8212 local of type uint32_t. Make the local an `int' instead.
8214 * NEWS: Mention sort's new options.
8216 * src/rand-isaac.c (isaac_mix): Declare to be static.
8217 Mark all other functions as `extern' so the tight-scope
8218 part of `make distcheck' passes once again.
8219 * src/rand-isaac.h (isaac_mix): Remove declaration.
8221 * src/sort.c (get_hash): Change position of `*' in parameter
8222 type to conform with convention.
8223 (main): Split a long line so it fits in 80 columns.
8224 (keycompare): Remove stray SPACE before TAB that was
8225 causing `make distcheck' to fail.
8227 * src/shred.c: Don't include gethrxtime.h. No longer needed.
8229 * tests/misc/sort-rand: New file: basic tests for the new options.
8230 * tests/misc/Makefile.am (TESTS): Add sort-rand.
8232 2005-12-10 Frederik Eaton <frederik@ofb.net>
8234 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
8235 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
8236 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
8237 Make state size runtime-configurable.
8238 (isaac_new, isaac_copy): New functions.
8239 * src/rand-isaac.h: New file.
8240 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
8241 (fillrand, main): Adjust to the fact that the state size is now
8242 runtime-configurable.
8243 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
8244 (usage): Add options --random-sort and --seed to implement a random
8246 Include md5.h and rand-isaac.h.
8247 (get_hash): New function.
8248 (rand_state): New var.
8249 (HASH_WORDS, HASH_SIZE): New macros.
8251 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8253 * tests/dd/misc: Add test for dd iflags=noatime.
8255 2005-12-09 Jim Meyering <jim@meyering.net>
8257 * src/sort.c (usage): Mention white space vs -b and -t options.
8260 2005-12-09 Eric Blake <ebb9@byu.net>
8262 * src/test.c (main): Fix misleading comment.
8264 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8266 * NEWS: Mention dd's new noatime flag.
8267 * src/system.h (O_NOATIME): Define to 0 if not already defined.
8268 * src/dd.c (flags, usage): Add support for noatime flag.
8270 2005-12-07 Jim Meyering <jim@meyering.net>
8272 Distribute the cvsu script, used only by `make syntax-check'.
8273 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
8274 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
8275 distribute a copy of this script.
8276 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
8278 * tests/mv/acl: exit-77 before the trap, not after, if we fail
8279 to create a temporary directory on another partition.
8280 From Andreas Gruenbacher.
8282 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
8284 * man/basename.x: Cross-reference to dirname and readlink.
8285 * man/dirname.x: Cross-reference to basename and readlink.
8287 2005-12-05 Andreas Gruenbacher
8289 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
8290 (set_owner, preserve_author): New functions, factored out of copy_reg.
8291 (copy_reg): Use them.
8292 (copy_internal): Use them here, too.
8294 2005-12-04 Jim Meyering <jim@meyering.net>
8296 * src/sleep.c (usage): Say what happens with two or more arguments.
8297 Suggested by Justin Pryzby.
8299 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
8302 2005-12-03 Jim Meyering <jim@meyering.net>
8304 * src/rm.c (long_opts): Change the name of each undocumented, for-
8305 testing-only option to start with `-', so that it cannot render
8306 ambiguous any prefix it happens to share with some other option name.
8307 Problem reported by Eric Blake.
8308 * src/head.c (long_options): Likewise.
8309 * src/tail.c (long_options): Likewise.
8311 * tests/misc/head-elide-tail: Update uses of undocumented, for-
8312 testing-only --presume* options to start with `---'.
8313 * tests/rm/dangling-symlink: Likewise.
8314 * tests/rm/dir-no-w: Likewise.
8315 * tests/rm/isatty: Likewise.
8317 2005-11-30 Jim Meyering <jim@meyering.net>
8319 * Makefile.maint: Add a comment about cvsu.
8321 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
8323 * NEWS: df updates for "none", "proc", inaccessible file systems.
8324 * src/df.c (show_point): Ignore inaccessible file systems.
8325 (usage): -a includes dummy file systems, not size-0 file systems.
8327 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
8328 to avoid collision with POSIX name space. All uses changed.
8330 2005-11-24 Jim Meyering <jim@meyering.net>
8332 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
8333 * tests/acl: Add `$0: ' prefix to diagnostics.
8335 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
8337 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
8339 * src/copy.c: Improve performance a bit by optimizing away
8340 unnecessary system calls and going to a block size of at least
8341 8192 (on normal hosts, anyway). This improved performance 5% on my
8342 Debian stable host (2.4.27 kernel, x86, copying from root
8343 ext3 file system to itself).
8344 Include "buffer-lcm.h".
8345 (copy_reg): Omit last argument. All callers changed.
8346 Use xmalloc to allocate rather than trusting alloca
8347 (which is unwise with large block sizes).
8348 Declare locals more locally, if possible.
8349 Use uintptr_t words instead of int words, for a bit more speed
8350 when looking for null blocks on 64-bit hosts.
8351 Optimize away reads of zero bytes on regular files.
8352 In the typical case, insist on 8 KiB buffers, at least.
8353 Avoid unnecessary extra call to fstat when checking for sparse files.
8354 Avoid now-unnecessary cast to off_t, and "0L".
8355 Avoid unnecessary test of *new_dst when checking for same owner
8358 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
8360 * src/remove.c (rm): Don't assume C99 for-loop syntax.
8362 2005-11-22 Jim Meyering <jim@meyering.net>
8364 * src/remove.c (AD_push): Remove debugging cruft.
8366 * tests/rm/unread2 (rm): Change expected diagnostic,
8367 `cannot open directory' to `cannot remove', to align with
8369 * tests/rm/rm2: Ensure that rm now continues removing entries
8370 even after certain types of failure.
8372 * src/remove.c: Rewrite. Now, this module is reentrant on systems
8373 that provide openat (Solaris), and on systems like Linux+procfs
8374 where our openat emulation code is reentrant. This also fixes a
8375 few low-probability leaks and eliminates some code that could,
8376 in very unusual circumstances, cause rm() (via a callee) to exit.
8377 * NEWS: Mention this.
8379 * configure.ac: Put copyright dates all on one line so the
8380 emacs function that updates them works properly.
8382 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8384 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
8385 Problem reported by Eric Blake.
8386 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
8387 we get a standard-conforming compiler. This relies on the new
8388 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
8389 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
8390 m4/c.m4 can go away with Autoconf 2.60 comes out.
8392 2005-11-17 Jim Meyering <jim@meyering.net>
8394 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
8395 (AD_mark_current_as_unremovable): Likewise, but for a local.
8398 * tests/mv/acl: Let traps handle removing temporary directories.
8400 Expect acl-related tests to fail, until the corresponding
8401 patches are committed.
8402 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
8403 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
8405 ACL tests, from Andreas Gruenbacher.
8406 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
8407 * tests/mv/Makefile.am (TESTS): Add acl.
8408 * tests/cp/Makefile.am (TESTS): Add acl.
8410 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
8412 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
8414 * NEWS: Improve quality of ln's diagnostics.
8415 * src/ln.c (do_link, usage): Likewise.
8416 (do_link): Don't use alloca on a buffer of unbounded size.
8418 2005-11-16 Jim Meyering <jim@meyering.net>
8420 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
8421 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
8422 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
8423 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
8424 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
8426 2005-11-14 Jim Meyering <jim@meyering.net>
8428 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
8430 2005-11-13 Jim Meyering <jim@meyering.net>
8432 * announce-gen: Accept new option, --gpg-key-id=ID and
8433 emit a blurb telling how to use the .sig files.
8434 * Makefile.cfg (gpg_key_ID): Define.
8435 * Makefile.maint (announcement): Use new option and key.
8437 Require that most .c files include <config.h>.
8438 * Makefile.maint (sc_require_config_h): New rule.
8439 (syntax-check-rules): Add it.
8440 * .x-sc_require_config_h: New file listing exceptions to the
8441 above rule. Some are legit, others are simply grandfathered in.
8442 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
8444 2005-11-12 Jim Meyering <jim@meyering.net>
8446 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
8448 2005-11-11 Jim Meyering <jim@meyering.net>
8450 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
8451 Mention new readlink options in 5.3.0's `New features' section.
8452 Spotted by Thomas Hood.
8454 2005-11-08 Jim Meyering <jim@meyering.net>
8456 * NEWS: Merge in changes from b5_9x branch.
8458 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
8460 * NEWS: ls now defaults to --time-style='locale', which in turn acts
8461 like --time-style='posix-long-iso' if the locale settings are messed up.
8462 * src/ls.c (decode_switches): Implement this.
8464 2005-11-08 Jim Meyering <jim@meyering.net>
8466 * tests/du/2g: s/expensive/very expensive/ in a comment.
8469 2005-10-17 Eric Blake <ebb9@byu.net>
8471 * src/ls.c (usage): Fix descriptions of --sort, --time.
8472 Reported by Vitaly A. Ostanin.
8474 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
8476 * src/ln.c: Include filenamecat.c.
8477 (FILE_BASENAME_CONCAT): Remove.
8478 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
8479 (main): Use file_name_concat, base_name, and strip_trailing_slashes
8480 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
8483 2005-11-04 Jim Meyering <jim@meyering.net>
8485 * src/du.c (process_file): Don't overflow for files of size >= 2^31
8486 on systems with stat.st_blocks of a signed 32-bit type.
8487 This bug causes trouble on some AIX 5.1 systems.
8488 Report and trivial patch from Paul Townsend:
8489 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
8490 * NEWS: Mention this.
8492 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
8493 * tests/du/Makefile.am (TESTS): Add it here.
8494 * tests/very-expensive: New file.
8495 * tests/Makefile.am (EXTRA_DIST): Add it here.
8496 * tests/cp/perm: Mark this test as `very-expensive', too.
8498 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
8500 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
8502 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
8504 * src/rm.c (usage): Don't mention rm -d.
8506 2005-11-02 Jim Meyering <jim@meyering.net>
8508 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
8509 From Andreas Schwab.
8511 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
8512 `M+N records in/out' lines don't pollute `make check' output.
8514 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
8515 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
8516 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
8517 to indicate that the input file should be piped into the command
8518 under test (via `cat FILE | $prog ...').
8520 * src/remove.c (remove_entry): Emit a better diagnostic when rm
8521 (without -r) fails to remove a directory on a non-Linux system.
8522 This change affects only newer Solaris systems (with priv_*
8523 functions like priv_allocset). Reported by Keith Thompson.
8525 * tests/rm/dir-nonrecur: New file/test for the above fix.
8526 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
8528 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
8530 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
8531 POSIX 1002.1-2001 requires.
8532 * src/tail.c (parse_obsolete_option): Implement this.
8533 Problem reported by Vincent Lefevre.
8534 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
8535 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
8536 (test_vector): Add special cases for _POSIX2_VERSION, and
8537 regularize the old ones a bit.
8538 * tests/touch/obsolescent: Add y2000 test.
8540 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
8542 * src/dd.c (skip): Fix off-by-one error reported by
8543 Theodoros V. Kalamatianos.
8545 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8547 * tests/mkdir/p-3: Require that the test be run as non-root.
8548 Problem and trivial fix reported by Theodoros V. Kalamatianos.
8550 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
8552 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
8553 boundary between DEST and SOURCE in the result.
8555 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
8557 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
8558 back to text, to sync with documentation and for backwards
8561 2005-10-25 Jim Meyering <jim@meyering.net>
8563 * tests/dircolors/simple (other-wr): Add an explicit test for
8564 the dircolors bug (NULL-dereference) fixed yesterday.
8566 2005-10-24 Jim Meyering <jim@meyering.net>
8568 * src/tac.c (tac_file): When determining whether a file is seekable,
8569 also test whether it is a tty. Using only the lseek-based test would
8570 give a false positive on Solaris. Reported by Peter Fales.
8572 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
8574 * tests/install/d-slashdot: New test, for "install -d" failure.
8575 * tests/install/Makefile.am (TESTS): Add d-slashdot.
8576 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
8577 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
8579 2005-10-24 Jim Meyering <jim@meyering.net>
8581 * src/dircolors.c (ls_codes): Add missing comma.
8582 Anonymous report and patch from
8583 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
8585 * src/dircolors.c: Add compile-time assertion that the slack_codes
8586 and ls_codes arrays have the same number of elements. This would
8587 have prevented the above-fixed bug.
8589 * src/expand.c (parse_tab_stops): Add a comment to make this function
8590 identical to the one in unexpand.c.
8591 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
8592 identical to the one in expand.c.
8594 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
8596 2005-10-23 Jim Meyering <jim@meyering.net>
8598 * src/md5sum.c (digest_check, main): Use ptr_align rather than
8599 a dangerous pointer-value-to-`unsigned' cast.
8600 * NEWS: mention the new sha* programs.
8601 * AUTHORS: Add new sha* programs.
8603 2005-08-28 David Madore <david.madore@ens.fr>
8605 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
8606 * README: Add their names to the list.
8607 * src/md5sum.c: Provide framework for computing sha-2 hashes.
8608 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
8609 Rules for compiling sha-2 utilities
8610 (noinst_HEADERS): Remove checksum.h.
8611 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
8613 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
8614 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
8615 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
8616 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
8617 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
8618 sha384sum, sha512sum test scripts here rather that each in its
8621 2005-08-28 David Madore <david.madore@ens.fr>
8623 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
8624 of the FIPS test vectors).
8626 2005-10-23 Jim Meyering <jim@meyering.net>
8628 * configure.ac: Use 6.0-cvs as the version string.
8629 * NEWS: Adjust accordingly.
8634 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
8636 Copying and distribution of this file, with or without
8637 modification, are permitted provided the copyright notice
8638 and this notice are preserved.