1 2007-11-01 Jim Meyering <meyering@redhat.com>
3 Make the new printf-surprise test more precise.
4 * tests/test-lib.sh (require_ulimit_): New function.
5 * tests/misc/printf-surprise: Use ulimit -v to trigger the fixed bug,
6 and rather than checking printf's exit status (which would go wrong
7 on FreeBSD 6.1, since their printf(3) function doesn't require
8 lots of memory in this case) simply test whether it outputs
11 Accommodate FreeBSD 6.1 hard-link-to-symlink differences.
12 * tests/cp/same-file: Detect when linking to a symlink links to
13 the target of the symlink (FreeBSD 6.1 does this, Linux does not),
14 and skip the few tests that would otherwise fail.
15 Redirect output of final comparison to stderr, since all stdout
16 is already redirected.
18 2007-10-31 Jim Meyering <meyering@redhat.com>
20 Fix a "make distcheck" failure.
21 * Makefile.maint (my-distcheck): Don't stub-out dirname,
22 since build-aux/check.mk now uses it.
24 * bootstrap.conf (gnulib_modules): Add xprintf-posix.
26 2007-10-30 Jim Meyering <meyering@redhat.com>
28 Avoid seq floating-point test failure on FreeBSD 6.1.
29 * tests/misc/seq (float-4): Also accept -0.0.
31 2007-10-29 Jim Meyering <meyering@redhat.com>
33 Change a "make dist" diagnostic.
34 * GNUmakefile: Don't imply that $(_curr-ver) is the new version string.
36 2007-10-29 Bob Proulx <bob@proulx.com>
38 Improve color terminal escape usage.
39 * build-aux/check.mk (am__tty_colors): Use 'tput' to deduce
40 terminal color capabilities.
42 2007-10-29 Jim Meyering <meyering@redhat.com>
44 Don't try to colorize a dumb terminal.
45 * build-aux/check.mk (am__tty_colors): Skip colors if $TERM is "dumb".
48 Remove gnulib's printf-posix module, for now.
49 * bootstrap.conf (gnulib_modules): It caused too many test failures.
51 Remove spurious semicolon after "else".
52 * build-aux/check.mk (am__tty_colors): Fix syntax error.
54 If $TERM is empty, don't use colors. This helps the buildbot,
55 since it produces its result in an environment with a tty, but
56 we don't want color codes in that case.
57 * build-aux/check.mk (am__tty_colors): Test for nonempty $TERM.
58 Suggestion from Bob Proulx.
60 Always initialize terminal colorization string variables.
61 * build-aux/check.mk (am__tty_colors): Always initialize red, grn, etc.,
62 In case they're defined in the environment.
64 Avoid test failure in non-srcdir build vs. the git tree.
65 * tests/check.mk (vc_exe_in_TESTS): Run this test only in a
66 srcdir build directory. Reported by Andreas Schwab.
68 2007-10-28 Jim Meyering <meyering@redhat.com>
70 Define ENOTSUP, not ENOSYS. Needed on OpenBSD 3.9.
71 * gl/lib/se-context.in.h (ENOTSUP): Define if missing.
72 * gl/lib/se-selinux.in.h: Likewise.
74 Define ENODATA, for FreeBSD 5.0 and 6.1.
75 * src/system.h (ENODATA): Define, if missing.
77 Run autoreconf, not just autoconf, to avoid warnings.
78 * GNUmakefile (dummy): Otherwise, we'd sometimes get a warning
79 about autoconf version mismatch between what was used to generate
80 aclocal.m4 and the currently-running autoconf.
82 Require gnulib's printf-posix module, to support Interix.
83 * bootstrap.conf (gnulib_modules): Add printf-posix.
85 Help xgettext recognize more printf-style format strings.
86 * bootstrap.conf (XGETTEXT_OPTIONS): Add directives for
87 error, error_at_line, xasprintf, xfprintf and xprintf.
89 2007-10-27 Jim Meyering <meyering@redhat.com>
91 Adjust format string so msgfmt doesn't object.
92 * src/df.c (main): Use "%s%s" (not %smsg) to print "msg" with or
93 without a "Warning: " prefix. Reported by Clytie Siddall.
95 Clean up tests/Makefile.am.
96 * tests/Makefile.am (EXTRA_DIST): Remove $(TESTS). No longer defined.
97 (TESTS_ENVIRONMENT): Remove definition.
99 2007-10-26 Jim Meyering <meyering@redhat.com>
101 * build-aux/check.mk: Merge with latest from Akim.
103 Add a test for the printf fix of 2007-10-21.
104 * tests/misc/printf-surprise: New file. Test for 2007-10-21's fix.
105 * tests/misc/Makefile.am (TESTS): Add printf-surprise.
107 2007-10-24 Micah Cowan <micah@cowan.name>
109 Remove vestiges of cvs-gnulib-checkout process. Now we use git.
110 * bootstrap: Remove support for now-unnecessary option, --cvs-user,
111 and envvars CVS_USER, CVS_RSH.
113 2007-10-24 Micah Cowan <micah@cowan.name>
115 Tell xgettext that "ARG1 % ARG2" is not a C format string.
116 * src/expr.c (usage): Add a comment to override xgettext's default
117 behavior, which would classify "ARG1 % ARG2" as a fprintf-style
118 format string. Reported by Clytie Siddall.
120 2007-10-24 Jim Meyering <meyering@redhat.com>
122 Avoid diagnostics from sha1sum when there is no cached checksum.
123 * bootstrap (update_po_files): Skip the sha1sum check if the po.s1
124 file hasn't been created yet.
126 Get gnulib from the git repository, not from an obsolete cvs one.
127 * bootstrap: Suggestion from Micah Cowan.
130 * README-hacking: Prefer the no-hyphen variant of git commands,
131 e.g., use "git pull" not "git-pull".
132 Don't presume that the only way to read this document is via a
133 prior git clone: provide instructions for cloning coreutils, too.
135 * README-hacking: Add "cd automake" in build instructions.
138 Don't fail part 2 of tests/rm/unreadable when run as root.
139 * tests/rm/unreadable: With UID == 0, expect different results.
140 Reported by Mike Frysinger.
142 2007-10-23 Jim Meyering <meyering@redhat.com>
144 * README-hacking: Refer to LZMA Utils <http://tukaani.org/lzma/>.
146 2007-10-22 Paul Eggert <eggert@cs.ucla.edu>
148 * README-hacking: Describe how to build with LZMA.
150 2007-10-22 Jim Meyering <meyering@redhat.com>
152 Remove git-version-gen's first parameter.
153 * build-aux/git-version-gen: Add comments.
154 Remove first command-line parameter.
155 * configure.ac: Remove corresponding first argument.
156 * GNUmakefile (_curr-ver): Likewise.
158 2007-10-21 Jim Meyering <meyering@redhat.com>
160 * NEWS: Mention the printf fix.
162 Reorder tests to run more basic ones earlier.
163 * tests/misc/Makefile.am (TESTS): Reorder.
164 * tests/Makefile.am (SUBDIRS): Reorder.
166 tr: do not reject an unmatched [:lower:] or [:upper:] in SET1.
167 * NEWS: Mention this.
168 * src/tr.c (get_next) [RE_CHAR_CLASS]: Don't skip the loop when
169 processing [:lower:] and [:upper:].
170 (main): Require [:lower:] or [:upper:] in SET1 only when
171 when one of those is specified in SET2.
172 * tests/tr/Test.pm: Add tests for this fix.
173 Reported by Per Starbäck.
175 2007-10-20 Jim Meyering <meyering@redhat.com>
177 * tests/misc/help-version: Add a comment.
179 Detect printf(3) failure due to ENOMEM.
180 * src/printf.c: Include "xprintf.h"
181 (print_direc): Use xprintf, rather than printf.
182 * bootstrap.conf (gnulib_modules): Add xprintf.
183 * po/POTFILES.in: Add lib/xprintf.c.
184 Reported by Bruno Haible.
186 Put always-failing programs first in PATH, so tests cannot mistakenly
187 run installed versions.
188 * Makefile.maint (my-distcheck): Set up a bogus bin/ dir, to be used
191 * doc/coreutils.texi (tee invocation): Fix typo. Add a little.
192 Add a cross-reference to bashref's Process Substitution node.
194 Adjust tests to pass, now that Test.pm ones use check.mk.
195 * tests/check.mk (vc_exe_in_TESTS): Adjust regexp not to match the
196 "TESTS = $x-tests" line in each Test.pm-derived Makefile.am file.
197 * tests/sort/main: Remove this unused file.
199 Ensure that Test.pm-derived tests use the right $PATH.
200 * tests/Makefile.am.in: Include $(top_srcdir)/tests/check.mk.
202 2007-10-20 Bob Proulx <bob@proulx.com>
204 Prevent "make check" from leaving mktemp /tmp/tmp.* files behind.
205 * tests/misc/help-version (mktemp_args): Tell mktemp to create
206 its temporary file in the current directory.
208 2007-10-16 Jim Meyering <meyering@redhat.com>
210 Show how to make tee redirect to multiple processes.
211 * doc/coreutils.texi (tee invocation): Tee can redirect output
212 to multiple _processes_, too.
214 2007-10-14 Jim Meyering <meyering@redhat.com>
216 Pull all TESTS_ENVIRONMENT settings "up" into tests/check.mk.
217 * tests/Makefile.am.in (TESTS_ENVIRONMENT): Remove definition.
218 * tests/chgrp/Makefile.am: Likewise.
219 * tests/chmod/Makefile.am: Likewise.
220 * tests/chown/Makefile.am: Likewise.
221 * tests/cp/Makefile.am: Likewise.
222 * tests/dd/Makefile.am: Likewise.
223 * tests/du/Makefile.am: Likewise.
224 * tests/install/Makefile.am: Likewise.
225 * tests/ln/Makefile.am: Likewise.
226 * tests/ls/Makefile.am: Likewise.
227 * tests/misc/Makefile.am: Likewise.
228 * tests/mkdir/Makefile.am: Likewise.
229 * tests/mv/Makefile.am: Likewise.
230 * tests/readlink/Makefile.am: Likewise.
231 * tests/rm/Makefile.am: Likewise.
232 * tests/rmdir/Makefile.am: Likewise.
233 * tests/tail-2/Makefile.am: Likewise.
234 * tests/touch/Makefile.am: Likewise.
235 * tests/check.mk (TESTS_ENVIRONMENT) [EXEEXT, EGREP, MAKE, PERL]:
236 [CONFIG_HEADER, build_programs, host_os, host_triplet, PATH]:
237 [REPLACE_GETCWD, CU_TEST_NAME]: Add definitions here.
238 * tests/misc/pwd-long: Use $abs_top_builddir/src, not $BUILD_SRC_DIR.
239 * tests/dd/skip-seek: Don't use $ENV{PROG}.
240 * tests/rm/empty-name: Likewise.
241 * tests/rm/unreadable: Likewise.
242 * tests/mv/i-1: Likewise.
245 * configure.ac (AC_INIT): Fix a typo (s/9.6/6.9/) that makes a
246 difference only when running "make dist" without a .git/ subdir.
248 2007-10-09 Jim Meyering <meyering@redhat.com>
250 Move the help-version test into misc/.
251 * tests/help-version: Move to...
252 * tests/misc/help-version: ...here.
253 Source test-lib.sh, as usual.
254 Use $abs_top_builddir, rather than ".." and "../..".
256 Make the runcon-no-reorder test slightly more general.
257 * tests/misc/runcon-no-reorder: Don't hard-code "unconstrained_t".
258 Use slightly more general "runcon $(id -Z)".
259 Suggestion from Stephen Smalley.
261 Skip the chcon test on a system with no SELinux support.
262 * tests/test-lib.sh (require_selinux_): New function.
263 * tests/misc/chcon: Use it.
264 * tests/misc/selinux: Use it here, too.
265 * tests/cp/cp-a-selinux: and here.
266 * tests/selinux: Remove file.
267 * tests/Makefile.am (EXTRA_DIST): Remove selinux.
268 Reported by Mike Frysinger and Bauke Jan Douma.
270 * src/dircolors.hin: Recognize .lzma as a compressed-file suffix.
272 * configure.ac (AM_INIT_AUTOMAKE): Use dist-lzma, rather than dist-bzip2.
274 Now that we don't install su, don't make misleading suggestions.
275 * src/Makefile.am (install-exec-local) [$(INSTALL_SU) != yes]:
276 Don't suggest running "make install-root".
277 (uninstall-local) [$(INSTALL_SU) != yes]: Don't even check
278 the installed binary.
280 2007-10-08 Jim Meyering <meyering@redhat.com>
282 When forming a truncated name, use the "[...]" prefix even for
283 an extremely long name in the current directory
284 * src/remove.c (full_filename_): Rename a local variable.
285 Use two separate "truncated" variables, in case the second
286 call to right_justify does not indicate any truncation -- which
287 would happen only if the single component FILENAME were longer
288 than 511 bytes and DIR_NAME were empty.
290 rm could malfunction under unusual circumstances:
291 When operating on a relative name longer than 511 bytes,
292 and (when either processing a directory that is neither writable
293 nor readable (but still searchable) or when determining whether
294 to prompt), and encountering an ENOMEM error while forming the
295 file name, rm would operate on a truncated-to-511-byte name
296 starting with "[...]" rather than the intended one.
297 * NEWS: Describe the bugs.
298 * src/remove.c: Correct two misuses of full_filename:
299 (full_filename0, xfull_filename): New functions.
300 (full_filename_): Rewrite to use full_filename0.
301 (AD_pop_and_chdir): Use xfull_filename, not full_filename.
302 (write_protected_non_symlink): Likewise.
304 2007-10-07 Jim Meyering <meyering@redhat.com>
306 Don't let a helper function modify errno.
307 * src/remove.c (full_filename_): Save and restore errno.
308 Spotted by Bruno Haible.
310 Reflect 2->3 GPL copyright version update in gnulib.
311 * gl/lib/tempname.h: Update copyright from gnulib.
312 * gl/lib/tempname.c: Likewise.
313 * .x-sc_GPL_version: Don't make an exception for those two files.
315 * configure.ac (AM_INIT_AUTOMAKE): Don't use dist-lzma just yet.
318 * NEWS: Mention this.
319 * README: Add mktemp to the list.
320 * AUTHORS: Add this: mktemp: Jim Meyering
321 * src/mktemp.c: New file.
322 * src/Makefile.am (bin_PROGRAMS): Add mktemp.
323 (mktemp_LDADD): Add $(LIB_GETHRXTIME).
324 * man/mktemp.x: New file.
325 * man/Makefile.am (dist_man_MANS): Add mktemp.1.
326 (mktemp.1): New dependency.
327 * man/.cvsignore: Add mktemp.1.
328 * man/.gitignore: New file.
329 * src/.cvsignore, src/.gitignore: Add mktemp.
330 * tests/misc/mktemp: New file.
331 * tests/misc/Makefile.am (TESTS): Add mktemp.
332 * tests/Coreutils.pm (run_tests): Give the POST-test function
333 access to stdout and stderr contents, so it can verify that
334 the named-on-stdout file/dir does indeed exist and has proper
337 * POTFILES.in: Add src/mktemp.c.
339 Make tempname more random, via the randint module.
340 * gl/modules/tempname (Depends-on): Add randint and stdbool.
341 * gl/lib/tempname.c: Include randint.h and stdbool.h.
342 (uint64_t): Remove definition. Not needed.
343 [_LIBC] (RANDOM_BITS): Remove this block, now that we have proper
345 (check_x_suffix): New function.
346 (gen_tempname_len): Rename from __gen_tempname.
347 Add a parameter, x_suffix_len, telling how many X's there must be at
348 the end of the template.
349 Use pseudo-random numbers all the way, rather than adding 7777
350 from one iteration to the next.
351 (__gen_tempname): New function, to call gen_tempname_len, requiring a
353 * gl/lib/tempname.h: Add prototype for gen_tempname_len.
355 Convert coreutils' rand*.{c,h,m4} into modules.
356 First step: move these files to gl/lib:
357 * lib/rand-isaac.c, lib/rand-isaac.h
358 * lib/randint.c, lib/randint.h
359 * lib/randperm.c, lib/randperm.h
360 * lib/randread.c, lib/randread.h
361 Step 2: add modules/rand* and remove now-unneeded .m4 files.
362 * gl/modules/randint: New file.
363 * gl/modules/randperm: New file.
364 * gl/modules/randread: New file.
365 * m4/randint.m4: Remove file.
366 * m4/randperm.m4: Remove file.
367 * m4/randread.m4: Remove file.
368 Step 3: use the new modules
369 * bootstrap.conf (gnulib_modules): Add randint and randperm.
370 * m4/prereq.m4 (gl_RANDINT, gl_RANDREAD, gl_RANDPERM): Don't require;
371 These have been removed.
372 (gl_ROOT_DEV_INO): Don't require; already handled via bootstrap.conf.
374 Copy from gnulib the parts of tempname that we'll modify.
375 * gl/lib/tempname.c: Copy from gnulib.
376 * gl/lib/tempname.h: Likewise.
377 * gl/modules/tempname: Likewise.
378 Allow GPLv2 on temporarily(?)-imported file from gnulib/libc.
379 * .x-sc_GPL_version: New file.
380 * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version
382 2007-10-07 Jim Meyering <meyering@redhat.com>
384 Avoid a pseudo-leak in sort.
385 * src/sort.c (main) [lint]: Avoid a nominal leak.
387 Use puts, rather than printf ("%s\n". Slightly cleaner.
388 * src/tsort.c (tsort): ...and more efficient.
390 Avoid seq malfunction on non-POSIX systems: mingw, BeOS, Interix.
391 * bootstrap.conf (gnulib_modules): Add vasprintf-posix.
392 Suggestion from Bruno Haible.
394 Avoid a used-uninitialized error.
395 * src/copy.c (copy_internal): Don't overload "use_stat".
397 2007-10-05 Jim Meyering <meyering@redhat.com>
399 Make a failing cross-partition mv give a sensible diagnostic.
400 A cross-partition move of a file in a sticky tmpdir and owned by
401 another user would evoke an invalid diagnostic after copying it:
402 mv: cannot remove `x': Operation not permitted
403 Either of the following (mv.c, remove.c) changes would fix the bug by
404 itself. I think it's slightly better to use both; the added cost is
405 minimal: mv: an extra lstat-per-mv-cmdline-arg-that-goes-cross-partition,
406 rm: an extra lstat-per-unlink-that-fails-w/EPERM.
407 * src/remove.c (remove_entry): Also lstat the file upon EPERM.
408 * src/mv.c (rm_option_init): Initialize root_dev_ino just as is done
409 in rm, so that a cross-partition invoked remove.c:rm call works the
410 same way as one invoked from the command-line use of "rm". That
411 setting of root_dev_ino makes rm() do the equivalent of an additional
412 lstat for each argument, which in turn gives rm enough information to
413 issue the right diagnostic.
414 * tests/mv/sticky-to-xpart (version): New file. Test for the above.
415 * tests/mv/Makefile.am (TESTS): Add sticky-to-xpart.
416 Arrange for "make check-root" to run the new root-only test.
417 * tests/Makefile.am (tb): New target, to run the new root-only test.
419 * src/c99-to-c89.diff: Adjust offsets.
421 Add PACKAGE_VERSION to TESTS_ENVIRONMENT via check.mk.
422 * tests/check.mk (TESTS_ENVIRONMENT): Add PACKAGE_VERSION here,
423 rather than in every Makefile.am that needs it.
424 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Remove PACKAGE_VERSION.
425 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
427 2007-10-04 Jim Meyering <jim@meyering.net>
429 Adapt to new gnulib naming scheme.
430 * gl/lib/se-context.in.h: Rename from gl/lib/se-context_.h.
431 * gl/lib/se-selinux.in.h: Rename from gl/lib/se-selinux_.h.
432 * gl/m4/selinux-context-h.m4: Remove use of AC_LIBSOURCES.
433 * gl/m4/selinux-selinux-h.m4: Likewise.
434 * gl/modules/selinux-h (Files, Makefile.am): Reflect renaming.
435 (Makefile.am) [lib_SOURCES]: Add se-context.in.h and se-selinux.in.h.
437 * lib/search_.h: Remove unused file.
439 * bootstrap (slurp): Adapt to _.h -> .in.h name change.
440 (update_po_files): Work also when there are no .po files in po/.
442 Remove test program: lib/t-fpending.c.
443 * lib/t-fpending.c: Remove file. Now, this test is in gnulib.
444 * lib/Makefile.am: Remove associated rules.
445 * .gitignore: Remove lib/t-fpending.
447 2007-10-03 Jim Meyering <jim@meyering.net>
449 * tests/misc/selinux: Skip this test if the initial chcon fails.
451 2007-10-02 Jim Meyering <jim@meyering.net>
453 Never copy through a symlink that cp has just created.
454 * src/copy.c (copy_internal): When same-file detection requires
455 'stat'ing the destination file, also 'lstat' it and ensure that
456 it wasn't the destination of a preceding copy operation.
457 This bug was introduced on 2007-06-18.
458 * tests/cp/abuse: New test for the above.
459 * tests/cp/Makefile.am (TESTS): Add abuse.
461 2007-09-30 Jim Meyering <jim@meyering.net>
463 cp: do not abbreviate in --help output.
464 * src/cp.c (usage): Don't abbreviate: s/=link/=links/.
465 Reported by Géraud Meyer in <http://bugs.debian.org/444137>.
467 2007-09-29 Eric Blake <ebb9@byu.net>
470 * tests/misc/groups-dash: New test.
471 * tests/misc/Makefile.am (TESTS): Add it.
473 2007-09-28 Eric Blake <ebb9@byu.net>
475 * src/groups.sh: Don't ignore first argument if later argument is --.
477 2007-09-27 Jim Meyering <jim@meyering.net>
479 Avoid spurious test failure when SELinux stats "selinux/class".
480 * tests/ls/stat-free-symlinks: Grep for more precise /^stat("x"/.
482 Move file-set and hash-triple modules to gnulib.
483 * bootstrap.conf (gnulib_modules): Remove file-set, now that
484 it's in gnulib, and the canonicalize module requires it there.
485 * gl/lib/file-set.c, gl/lib/file-set.h, gl/modules/hash-triple: Remove.
486 * gl/lib/hash-triple.c, gl/lib/hash-triple.h, gl/modules/file-set:
489 Add a test to exercise a readlink bug.
490 * tests/misc/readlink-fp-loop: New file. Test for the readlink bug
491 fixed through today's change to Gnulib's canonicalize module.
492 * tests/misc/Makefile.am (TESTS): Add readlink-fp-loop.
493 Bug report and a test case from mpb.mail@gmail.com.
495 2007-09-25 Pádraig Brady <P@draigBrady.com>
497 * doc/coreutils.texi (date invocation):
498 Make "Date input formats" easier to navigate to.
500 2007-09-25 Jim Meyering <jim@meyering.net>
502 Use XOR, not OR to combine bits.
503 * gl/lib/hash-triple.c (triple_hash): Use XOR (^), not OR (|), to
504 combine the bits from hashing the name and those of the inode number.
505 Add a few comments and remove out-of-context ones.
507 2007-09-24 Jim Meyering <jim@meyering.net>
509 * NEWS: The recent rm-diagnostic fix also affects cross-partition "mv".
511 copy.c: Remove definitions of factored-out functions.
512 * src/copy.c: Include "file-set.h".
513 (seen_file, record_file): Remove functions that I factored
516 2007-09-22 Jim Meyering <jim@meyering.net>
518 Don't print the commands of a 10-line script that's run in each subdir.
519 * tests/check.mk (vc_exe_in_TESTS): Add a leading "@", to reduce noise.
521 rm: give a sensible diagnostic when failing to remove a symlink
522 On some systems (those with openat et al), when rm would fail to
523 remove a symlink, it would fail with the misleading diagnostic,
524 "Too many levels of symbolic links".
525 * NEWS: Mention the bug fix.
526 * src/remove.c (is_nondir_lstat): New function.
527 (remove_entry): Use it to catch failed-to-remove symlink (and any
528 other non-dir) here so that we don't fall through and try to treat
529 it as directory, which -- with a symlink -- would provoke the bogus
531 * tests/rm/fail-eacces: Add a test for the above.
532 * src/c99-to-c89.diff: Adjust offsets.
534 rm: fix a tiny, nearly inconsequential bug.
535 Don't perform a "."-relative lstat, when the file in question
536 may well not be in ".". Although this is a bug, a few attempts
537 to exercise it on a linux-2.6.22 system failed. You probably need
538 a pre-openat system to trigger the failure. The consequence of this
539 bug would be a lower-quality diagnostic upon failed dir removal.
540 * src/remove.c (is_dir_lstat): Add a parameter, fd_cwd.
541 Use it instead of hard-coding AT_FDCWD.
542 (remove_entry): Call is_dir_lstat with fd_cwd.
544 2007-09-22 Karl Berry <karl@freefriends.org>
546 * TODO: It'd be nice to add renice.
548 2007-09-21 Jim Meyering <jim@meyering.net>
550 Avoid test failure due to now-parallelized tests.
551 * tests/du/two-args: Run "du .." from a sub-directory one level deeper.
553 2007-09-16 Jim Meyering <jim@meyering.net>
555 * tests/misc/tac-continue: Arrange to remove a temporary file.
557 * tests/check.mk (vc_exe_in_TESTS): Don't rely on the value of
558 $(TESTS), so that "make check TESTS=test-name" works once again.
560 * tests/CuTmpdir.pm: Use File::Find + chmod syscall, not chmod -R.
562 Revamp most test scripts.
564 * tests/rm/v-slash: Avoid test failure with non-C locale.
565 Reported by Michael Stone.
567 Enable some previously omitted test scripts. Add a test cross-check.
568 * tests/rm/Makefile.am (TESTS): Add empty-name and unreadable.
569 * tests/rm/empty-name: Likewise.
570 * tests/rm/unreadable: Reenable this test. Adjust for new rm.
571 * tests/mkdir/Makefile.am: Add writable-under-readonly.
572 * tests/mkdir/writable-under-readonly: Add some comments.
573 This test is always skipped, for now.
574 * tests/Makefile.am (ta): Hook up the new root-only script.
575 * tests/tail-2/infloop-1: Make this test pass.
576 * tests/tail-2/Makefile.am (TESTS): Add infloop-1.
577 * tests/tail-2/fflush: Remove unused file.
578 * tests/check.mk (vc_executable_is_in_TESTS): More portable.
579 * tests/check.mk (check): Depend on the above.
580 * build-aux/check.mk: Remove comment mentioning AUTHORS file.
582 Factor out definitions in TESTS_ENVIRONMENT of srcdir, top_srcdir, etc.
583 tests/check.mk (top_srcdir): Define.
584 tests/*/Makefile.am: Remove definitions of $(srcdir), $(top_srcdir),
585 $(abs_top_srcdir), and $(abs_top_builddir), since they're
586 defined via the included tests/check.mk.
588 tests/general: Remove from VC, this long-unused directory and contents.
590 Adapt tests/tail-2/ to use test-lib.sh.
591 Adapt tests/readlink/ to use test-lib.sh.
593 Move the sole test in tests/ls-2/ to tests/misc/.
594 * tests/ls-2/basic-1: Move this file to ...
595 * tests/misc/ls-misc: ...here. Don't rely on $PROG in env.
596 * tests/misc/Makefile.am (TESTS): Add ls-misc.
597 * tests/Makefile.am (SUBDIRS): Remove ls-2.
598 * tests/ls-2: Remove the directory.
599 * configure.ac (AC_CONFIG_FILES): Remove tests/ls-2/Makefile.
601 More misc, test-related changes. (some to allow running tests as root)
603 Move all tests from test/{od,sha1sum,shred,stty} to tests/misc/.
604 Reflect these renamings:
607 sha1sum/basic-1 misc/sha1sum
608 sha1sum/sample-vec misc/sha1sum-vec
609 shred/exact misc/shred-exact
610 shred/remove misc/shred-remove
611 stty/basic-1 misc/stty
612 stty/invalid misc/stty-invalid
613 stty/row-col-1 misc/stty-row-col
614 * tests/misc/Makefile.am (TESTS): Add the new files.
615 * tests/Makefile.am (SUBDIRS): Remove the dir names.
616 * tests/od, tests/sha1sum, tests/shred, tests/stty: Remove the
618 * configure.ac (AC_CONFIG_FILES): Remove the corresponding Makefile
621 Move the two tests in tests/tee to tests/misc/.
622 * tests/tee/basic: Move this file to ...
623 * tests/misc/tee: ...here. Don't rely on $PROG in env.
624 * tests/tee/dash: Move this file to ...
625 * tests/misc/tee-dash: ...here. Don't rely on $PROG in env.
626 * tests/misc/Makefile.am (TESTS): Add tee.
627 * tests/Makefile.am (SUBDIRS): Remove tee.
628 * tests/tee: Remove the directory.
629 * configure.ac (AC_CONFIG_FILES): Remove tests/tee/Makefile
631 Move the two tests in tests/sum/ to tests/misc/.
632 * tests/sum/basic-1: Move this file to ...
633 * tests/misc/sum: ...here. Don't rely on $PROG in env.
634 * tests/sum/sysv: Move this file to ...
635 * tests/misc/sum-sysv: ...here. Adapt it to use test-lib.sh.
636 * tests/misc/Makefile.am (TESTS): Add sum and sum-sysv.
637 * tests/Makefile.am (SUBDIRS): Remove sum.
638 * tests/sum: Remove the directory.
639 * configure.ac (AC_CONFIG_FILES): Remove tests/sum/Makefile.
641 Move the sole test in tests/tsort/ to tests/misc/tsort.
642 * tests/tsort/basic-1: Move this file to ...
643 * tests/misc/tsort: ...here. Don't rely on $PROG in env.
644 * tests/misc/Makefile.am (TESTS): Add tsort.
645 * tests/Makefile.am (SUBDIRS): Remove tsort.
646 * tests/tsort: Remove the directory.
647 * configure.ac (AC_CONFIG_FILES): Remove tests/tsort/Makefile.
649 Move the sole test in tests/unexpand to tests/misc/unexpand.
650 * tests/unexpand/basic-1: Move this file to ...
651 * tests/misc/unexpand: ...here. Don't rely on $PROG in env.
652 * tests/misc/Makefile.am (TESTS): Add unexpand.
653 * tests/Makefile.am (SUBDIRS): Remove unexpand.
654 * tests/unexpand: Remove the directory.
655 * configure.ac (AC_CONFIG_FILES): Remove tests/unexpand/Makefile.
657 Move the sole test in tests/seq to tests/misc/seq.
658 * tests/seq/basic: Move this file to ...
659 * tests/misc/seq: ...here. Don't rely on $PROG in env.
660 * tests/misc/Makefile.am (TESTS): Add seq.
661 * tests/Makefile.am (SUBDIRS): Remove seq.
662 * tests/seq: Remove the directory.
663 * configure.ac (AC_CONFIG_FILES): Remove tests/seq/Makefile
665 Convert tests/mkdir/ to use test-lib.sh.
667 Move the two tests in tests/md5sum to tests/misc/md5sum.
668 * tests/md5sum/basic-1: Move this file to ...
669 * tests/misc/md5sum: ...here. Don't rely on $PROG in env.
670 * tests/md5sum/newline-1: Move this file to ...
671 * tests/misc/md5sum-newline: ...here. Don't rely on $PROG in env.
672 * tests/misc/Makefile.am (TESTS): Add md5sum.
673 * tests/Makefile.am (SUBDIRS): Remove md5sum.
674 * tests/md5sum: Remove the directory.
675 * configure.ac (AC_CONFIG_FILES): Remove tests/md5sum/Makefile
677 tests/sample-test: Update to use test-lib.sh.
679 Convert tests/misc/ to use test-lib.sh, too.
680 Convert tests/ls/, too.
681 Convert tests/ln/, too.
682 Convert tests/install/, too.
684 Move the two tests in tests/fmt to tests/misc/fmt.
685 * tests/fmt/basic: Move this file to ...
686 * tests/misc/fmt: ...here. Don't rely on $PROG in env.
687 * tests/fmt/long-line: Move this file to ...
688 * tests/misc/fmt-long-line: ...here.
689 * tests/misc/Makefile.am (TESTS): Add fmt.
690 * tests/Makefile.am (SUBDIRS): Remove fmt.
691 * tests/fmt: Remove the directory.
692 * configure.ac (AC_CONFIG_FILES): Remove tests/fmt/Makefile
694 Move the sole test in tests/factor to tests/misc/factor.
695 * tests/factor/basic: Move this file to ...
696 * tests/misc/factor: ...here. Don't rely on $PROG in env.
697 * tests/misc/Makefile.am (TESTS): Add factor.
698 * tests/Makefile.am (SUBDIRS): Remove factor.
699 * tests/factor: Remove the directory.
700 * configure.ac (AC_CONFIG_FILES): Remove tests/factor/Makefile
702 Move the sole test in tests/expr to tests/misc/expr.
703 * tests/expr/basic: Move this file to ...
704 * tests/misc/expr: ...here. Don't rely on $PROG in env.
705 * tests/misc/Makefile.am (TESTS): Add expr.
706 * tests/Makefile.am (SUBDIRS): Remove expr.
707 * tests/expr: Remove the directory.
708 * configure.ac (AC_CONFIG_FILES): Remove tests/expr/Makefile
710 Convert tests/du/*, too.
712 Move the sole test in tests/dircolors to tests/misc/dircolors.
713 * tests/dircolors/simple: Move this file to...
714 * tests/misc/dircolors: ...here. Don't rely on $PROG in env.
715 * tests/misc/Makefile.am (TESTS): Add dircolors.
716 * tests/Makefile.am (SUBDIRS): Remove dircolors.
717 * tests/dircolors: Remove the directory.
718 * configure.ac (AC_CONFIG_FILES): Remove tests/dircolors/Makefile
720 Convert tests/dd/*, too.
722 Convert tests/mv, too.
723 * tests/other-fs-tmpdir: Before, all callers would exit 77 upon
724 failure to find the required dir. Now, exit 77 in this script so
725 callers don't have to. Adjust callers.
727 Adjust chgrp, chmod, chown, cp tests to use test-lib.sh.
728 * tests/check.mk: Also define abs_top_builddir.
730 Parallel "make check" support.
731 * build-aux/check.mk: New file, from The Vaucanson Group.
732 * .x-sc_GPL_version: New file, to allow "version 2 or later"
733 in build-aux/check.mk.
734 * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
735 * tests/check.mk: New file.
736 * tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.
738 Begin factoring "sample-test" out of test scripts.
739 * tests/test-lib.sh: New file, to be sourced by all tests that
740 were previously derived from the "sample-test" template.
741 * tests/mkdtemp: New file.
742 * tests/touch/dir-1: Use test-lib.sh.
743 * tests/touch/empty-file: Likewise.
744 * tests/touch/fail-diag: Likewise.
745 * tests/touch/fifo: Likewise.
746 * tests/touch/no-create-missing: Likewise.
747 * tests/touch/no-rights: Likewise. Also, don't sleep.
748 * tests/touch/not-owner: Likewise.
749 * tests/touch/obsolescent: Likewise.
750 * tests/touch/read-only: Likewise.
751 * tests/touch/relative: Likewise.
752 * tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
753 to get the parallel-"make check" bits.
755 Move a slow test into tests/misc.
756 * tests/check.mk: Wrapper.
757 * tests/ls/time-1: Move this file to tests/misc/ls-time.
758 * tests/misc/ls-time: New file. From tests/ls/time-1.
759 * tests/ls/Makefile.am (TESTS): Remove time-1.
760 * tests/misc/Makefile.am (TESTS): Add ls-time.
762 Add support for parallel "make check" (in tests/misc, for now)
764 2007-09-08 Jim Meyering <jim@meyering.net>
766 Accommodate gnulib's renaming: __fpending.h -> fpending.h.
767 * lib/t-fpending.c: Include "fpending.h", not "__fpending.h".
769 2007-09-07 Jim Meyering <jim@meyering.net>
771 chmod: don't ignore a dangling symlink
772 * NEWS: Mention the bug fix.
773 * src/chmod.c (process_file): Handle the case of FTS_SLNONE,
774 i.e., give a diagnostic saying we cannot operate on such a file.
775 * tests/chmod/thru-dangling: Compare new stderr output with expected.
777 2007-09-07 Bob Proulx <bob@proulx.com>
779 Add a test: demonstrate that chmod ignores a dangling symlink
780 * tests/chmod/thru-dangling: New test. Fails.
781 * tests/chmod/Makefile.am (TESTS): Add thru-dangling.
783 2007-09-05 Jim Meyering <jim@meyering.net>
785 Adapt to new SELinux behavior: "?" vs. new "unlabeled"
786 * src/ls.c (gobble_file): Interpret the new "unlabeled" indicator
787 from getfilecon/lgetfilecon the same way we interpret a negative
788 return value: no security context. So we don't print the "+".
789 * tests/selinux: Recognize that "unlabeled" means insufficient
790 support for SELinux, just like "?".
792 2007-09-03 Jim Meyering <jim@meyering.net>
794 Invoke $(AUTOCONF) manually, if needed to get an updated version string.
795 * GNUmakefile: Don't actually touch configure.ac.
796 That would make git-version-gen always print "...-dirty".
798 Don't change '-'s to '.'s in the string from git-describe.
799 * build-aux/git-version-gen: Leave '-'s in the string from git-describe.
800 Otherwise, s/-/./g would make it too hard to distinguish the base
801 version number from the appended .DD suffixes.
803 2007-09-03 Jim Meyering <jim@meyering.net>
805 * README-hacking: Require rsync, rather than wget.
807 2007-09-02 Jim Meyering <jim@meyering.net>
809 * bootstrap (WGET_COMMAND): Remove code to set this variable.
811 Ensure that $(VERSION) is up to date for dist-related targets.
812 * GNUmakefile: Arrange to rerun autoconf, if the version reported by
813 git-version-gen doesn't match $(VERSION), but only for dist targets.
815 bootstrap: uses rsync to download the .po files
816 * bootstrap (po_download_command_format): New global.
817 (download_po_files): Use rsync.
818 (update_po_files): Don't remove .po files after download,
819 so future rsync runs can take advantage of the copies.
821 2007-09-01 Jim Meyering <jim@meyering.net>
823 * bootstrap (gnulib_tool): Make sha1sum check quietly.
825 Ensure that snapshot version changes make it to groups, too.
826 * src/Makefile.am (groups): Depend on Makefile.
828 Make groups-version executable,
829 * tests/misc/groups-version: ... as it was in the patch.
831 2007-08-31 Eric Blake <ebb9@byu.net>
833 Test yesterday's change to groups.
834 * tests/misc/groups-version: New test.
835 * tests/misc/Makefile.am (TESTS): Add groups-version.
837 2007-08-31 Jim Meyering <jim@meyering.net>
839 Solve the unnecessary-.po-file-regeneration problem once and for all.
840 * bootstrap (download_po_files): New function, renamed from
841 get_translations. Now, downloads, but doesn't update LINGUAS.
842 (update_po_files): New function.
844 2007-08-30 Jim Meyering <jim@meyering.net>
846 Shorten the snapshot version string by removing the "g".
847 * build-aux/git-version-gen: Remove git-describe's "g" that would
848 always precede the abbreviated SHA1. Suggestion from Dmitry V. Levin.
850 Perform the s,rm,/bin/rm, fix-up properly. No more kludge.
851 * Makefile.am (EXTRA_DIST): Remove .kludge-stamp.
852 (.kludge-stamp): Remove rule. Instead, ...
853 (dist-hook): Do the job here, operating on the file in $(distdir).
854 (rm_subst): Adjust regexp to match "rm -f rm$(EXEEXT)", not "rm -f rm".
855 (MAINTAINERCLEANFILES): s/+=/=/, now that this is the sole use.
856 (dist-hook): Remove the legacy-from-cvs install-sh is-executable check.
857 * .gitignore: Remove .kludge-stamp.
859 Make inter-release --version output more useful.
860 Now, each snapshot has a version "number" like 6.9-219-g58ddd,
861 which indicates that it is built using the 219th change set
862 (in _some_ repository) following the "v6.9" tag, and that 58ddd
863 is a prefix of the commit SHA1.
864 * build-aux/git-version-gen: New file.
865 * configure.ac: Run it to set the version.
866 * Makefile.am (dist-hook): Arrange so that .version appears only
867 in distribution tarballs, never in a checked-out repository.
868 * .gitignore: Add .version here, too. Just in case.
870 2007-08-30 Eric Blake <ebb9@byu.net>
872 * src/.gitignore: Ignore *.exe for platforms with non-empty $(EXEEXT).
874 2007-08-30 Eric Blake <ebb9@byu.net>
876 Use PACKAGE_NAME instead of GNU_PACKAGE.
877 * src/Makefile.am (.sh, uninstall-local): Adjust all users of
878 hand-rolled GNU_PACKAGE to instead use autoconf-provided
880 * src/basename.c (main): Likewise.
881 * src/chroot.c (main): Likewise.
882 * src/dirname.c (main): Likewise.
883 * src/echo.c (main): Likewise.
884 * src/expr.c (main): Likewise.
885 * src/factor.c (main): Likewise.
886 * src/groups.sh (version): Likewise. Also, reflect change in
887 --version output due to GPLv3.
888 * src/hostid.c (main): Likewise.
889 * src/hostname.c (main): Likewise.
890 * src/link.c (main): Likewise.
891 * src/logname.c (main): Likewise.
892 * src/nice.c (main): Likewise.
893 * src/nohup.c (main): Likewise.
894 * src/printenv.c (main): Likewise.
895 * src/printf.c (main): Likewise.
896 * src/pwd.c (main): Likewise.
897 * src/setuidgid.c (main): Likewise.
898 * src/sleep.c (main): Likewise.
899 * src/system.h (case_GETOPT_VERSION_CHAR): Likewise.
900 * src/test.c (main): Likewise.
901 * src/true.c (main): Likewise.
902 * src/unlink.c (main): Likewise.
903 * src/uptime.c (main): Likewise.
904 * src/users.c (main): Likewise.
905 * src/whoami.c (main): Likewise.
906 * src/yes.c (main): Likewise.
907 * configure.ac (AC_CHECK_DECLS): No need to check strtoimax,
908 strtoumax, since gnulib does this.
910 2007-08-30 Jim Meyering <jim@meyering.net>
912 Ensure that TMPDIR is valid. Otherwise, it would cause test failures.
913 * tests/misc/tty-eof: Set TMPDIR=.
914 * tests/misc/sort-compress: Likewise.
916 Use EXIT_FAILURE, not EXIT_FAIL, now that EXIT_FAILURE is always 1.
917 * src/system.h (EXIT_FAIL): Remove definition.
918 * src/chroot.c (main): EXIT_FAIL -> EXIT_FAILURE.
919 * src/env.c (main): Likewise.
920 * src/nice.c (main): Likewise.
921 * src/su.c (change_identity, main): Likewise.
922 * src/tty.c (main): Likewise.
923 Suggestion from Eric Blake.
925 2007-08-28 Jim Meyering <jim@meyering.net>
927 * src/test.c (usage): Note that [ honors --help and --version,
928 but that test does not. Suggestion from Dan Jacobson.
930 By default, do not install hostname anymore; no kidding, this time.
931 * src/Makefile.am (EXTRA_PROGRAMS): Remove hostname from this list,
932 now that it's no longer being installed by default. This should
933 have been part of the 2007-08-21 change.
934 (check-duplicate-no-install): New rule to ensure this doesn't
936 (check): Depend on it.
938 Reflect renaming: mreadlink-with-size -> areadlink-with-size.
939 * bootstrap.conf: Update module name.
940 * src/copy.c (copy_internal): Update header and function names.
941 * src/ls.c (get_link_name): Likewise.
942 * src/readlink.c (main): Likewise.
943 * src/stat.c (print_stat): Likewise.
945 Add file system type names and magic numbers from "man 2 statfs".
946 * src/stat.c (human_fstype): Also handle BEFS, BFS, BINFMT_MISC,
947 FUSECTL, HUGETLBFS, NFSD and OPENPROM.
949 2007-08-27 Jim Meyering <jim@meyering.net>
951 Add some file system type names and magic numbers from glibc.
952 * src/stat.c (human_fstype): Add any file system names and values
953 present in glibc's linux_fsinfo.h but not in this list.
954 Alphabetize the S_* names and capitalize the hexadecimal constants.
956 2007-08-26 Jim Meyering <jim@meyering.net>
958 * tests/misc/fold: Fix a typo: missing \ in a diagnostic
959 no one is likely ever to see.
961 2007-08-25 Jim Meyering <jim@meyering.net>
963 * src/dircolors.hin: Add .dz and .svgz as archive suffixes.
965 Remove all .cvsignore files from version control.
967 2007-08-24 Jim Meyering <jim@meyering.net>
969 bootstrap: Ignore more.
970 * bootstrap (symlink_to_dir): Add a directory name like
971 uniwidth to e.g., lib/.gitignore.
972 (slurp): Handle the sys_stat_.h -> sys mapping, too.
973 * .hgignore: Remove this file, too.
974 * Makefile.am (EXTRA_DIST): Remove .gitignore and .hgignore.
976 No longer version-control .???ignore files in lib/, m4/, and po/.
977 * .gitignore: Ignore a few files in lib/, m4/, and po/ that are not
978 picked up automatically.
979 * lib/.gitignore, lib/.cvsignore: Remove files.
980 * m4/.gitignore, m4/.cvsignore: Remove files.
981 * po/.gitignore, po/.cvsignore: Remove files.
983 bootstrap: when fetching .po files, do not remove .gmo files.
984 * bootstrap (get_translations): Don't remove *.gmo files!
985 They can be expensive to regenerate.
987 Create .gitignore and/or .cvsignore from scratch, if absent.
988 This is in preparation for my removing those files from version
989 control in the directories managed by gnulib-tool.
990 * bootstrap: New setting: vc_ignore.
991 (insert_sorted_if_absent): Create $file if absent.
992 Adapt to new, possibly empty, list: $vc_ignore.
994 * src/system.h (fseeko, ftello): Remove now-unneeded definitions.
995 * src/od.c (LDBL_DIG): Remove now-unneeded definition.
997 Arrange to use tag names like vM.N, rather than COREUTILS-M_N.
998 * Makefile.maint (this-vc-tag) [git]: Simply use v$(VERSION).
999 (this-vc-tag-regexp): New variable.
1000 (vc-tag-check): Use it, rather than $(this-vc-tag).
1002 2007-08-23 Jim Meyering <jim@meyering.net>
1004 * src/dircolors.hin: Add xterm-16color, xterm-88color and eterm-color.
1005 Suggestion from Dan Nicolaescu.
1007 Don't let ln be a party to destroying user data.
1008 * src/ln.c: Include "file-set.h", "hash.h" and "hash-triple.h".
1009 (dest_set, DEST_INFO_INITIAL_CAPACITY): New globals.
1010 (do_link): Refuse to remove a just-created link.
1011 Record a name,dev,ino triple for each link we create.
1012 (main): Initialize dest_set, if needed.
1013 * tests/mv/childproof: Test for the above fix.
1014 * NEWS: Document this.
1015 Reported by Eric Blake.
1017 Move functions from copy.c into new modules, since ln needs them, too.
1018 * bootstrap.conf (gnulib_modules): Add file-set.
1019 * gl/lib/file-set.c (record_file, seen_file): Functions from copy.c.
1020 * gl/lib/file-set.h: Add prototypes.
1021 * gl/lib/hash-triple.c (triple_hash, triple_hash_no_name):
1022 (triple_compare, triple_free): Functions from copy.c.
1023 * gl/lib/hash-triple.h (struct F_triple): Define. From copy.c.
1025 * gl/modules/file-set: New module.
1026 * gl/modules/hash-triple: New module.
1027 * src/Makefile.am (copy_sources): New variable.
1028 (ginstall_SOURCES, cp_SOURCES, mv_SOURCES): Use it.
1029 * src/copy.c: Include hash-triple.h.
1030 No longer include hash-pjw.h.
1031 (copy_internal): Don't pass a NULL third argument to record_file,
1032 since that function no longer accepts that.
1033 (record_file): Move this function to file-set.c.
1034 Along the way, remove the code to allow a NULL stat-buffer pointer.
1036 (seen_file): Move this function to file-set.c.
1037 (struct F_triple): Move declaration to hash-triple.h.
1038 (triple_compare, triple_free, triple_hash, triple_hash_no_name):
1039 Move these functions to hash-triple.c.
1041 bootstrap: generate more ignorable names
1042 * bootstrap (slurp): When generating ignorable names, also map
1043 .sin to .sed, .gperf to .c, and .y to .c.
1045 * Makefile.maint (patch-check): Don't remove temporaries upon failure.
1047 2007-08-22 Jim Meyering <jim@meyering.net>
1049 * src/c99-to-c89.diff: Adjust offsets.
1051 Change "rm --verbose -r a//" not to print extra slashes in a///b
1052 * src/remove.c (push_dir): Don't copy trailing slashes onto the stack.
1053 Reported by François Pinard.
1054 * tests/rm/v-slash: New file. Test for the above change.
1055 * tests/rm/Makefile.am (TESTS): Add v-slash.
1057 * src/date.c: Don't include "getline.h", now removed from gnulib;
1058 its declarations are now in <stdio.h>.
1059 * src/md5sum.c: Likewise.
1060 * src/dircolors.c: Likewise.
1062 * src/copy.c (DEST_INFO_INITIAL_CAPACITY): Correct a comment.
1064 2007-08-21 Jim Meyering <jim@meyering.net>
1066 By default, do not install hostname anymore.
1067 * configure.ac: Add "hostname" to the list of not-installed programs.
1068 * src/Makefile.am (no_install__progs): Add "hostname" here, too.
1069 * NEWS: Mention this.
1071 2007-08-20 Bob Proulx <bob@proulx.com>
1073 Clarify touch documentation of file arguments.
1074 * src/touch.c (usage): Improve wording of documentation regarding
1075 file argument handling and special handling of - argument.
1076 * doc/coreutils.texi (touch invocation): Likewise.
1077 Documentation problem reported by Vincent Lefevre.
1079 2007-08-20 Paul Eggert <eggert@cs.ucla.edu>
1081 * NEWS: The old cp -p bug affected coreutils releases before 6.0.
1082 Problem reported by Soren Spies in
1083 <http://lists.gnu.org/archive/html/bug-coreutils/2007-08/msg00106.html>.
1084 To be conservative, just say the bug was in all versions through 6.6.
1086 2007-08-19 Eric Blake <ebb9@byu.net>
1088 Avoid consuming too much seekable input when yesno is used.
1089 * bootstrap.conf (gnulib_modules): Add closein.
1090 * src/system.h (includes): Also include closein.h.
1091 * src/mv.c (main): Use close_stdin, not close_stdout.
1092 * src/cp.c (main): Likewise.
1093 * src/ln.c (main): Likewise.
1094 * src/rm.c (main): Likewise.
1095 * src/install.c (main): Likewise.
1096 * NEWS: Document the fix.
1098 2007-08-20 Jim Meyering <jim@meyering.net>
1100 Parallel "make check" support.
1101 * build-aux/check.mk: New file, from The Vaucanson Group.
1102 * .x-sc_GPL_version: New file, to allow "version 2 or later"
1103 in build-aux/check.mk.
1104 * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
1105 * tests/check.mk: New file.
1106 * tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.
1108 Begin factoring "sample-test" out of test scripts.
1109 * tests/test-lib.sh: New file, to be sourced by all tests that
1110 were previously derived from the "sample-test" template.
1111 * tests/mkdtemp: New file.
1112 * tests/touch/dir-1: Use test-lib.sh.
1113 * tests/touch/empty-file: Likewise.
1114 * tests/touch/fail-diag: Likewise.
1115 * tests/touch/fifo: Likewise.
1116 * tests/touch/no-create-missing: Likewise.
1117 * tests/touch/no-rights: Likewise. Also, don't sleep.
1118 * tests/touch/not-owner: Likewise.
1119 * tests/touch/obsolescent: Likewise.
1120 * tests/touch/read-only: Likewise.
1121 * tests/touch/relative: Likewise.
1122 * tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
1123 to get the parallel-"make check" bits.
1125 2007-08-18 Jim Meyering <jim@meyering.net>
1127 Use new "idcache.h" header.
1128 * src/ls.c: Remove ancient declarations of getuser and getgroup.
1129 Include "idcache.h", instead.
1131 Run each Coreutils.pm-based test in its own subdirectory.
1132 * tests/CuTmpdir.pm: New file.
1133 * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm.
1134 * tests/misc/od, tests/misc/base64, tests/misc/basename:
1135 * tests/misc/cut, tests/misc/date, tests/misc/dirname:
1136 * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail:
1137 * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum:
1138 * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum:
1139 * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag:
1140 * tests/misc/wc-files0-from, tests/misc/xstrtol:
1141 * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from:
1142 * tests/expr/basic, tests/factor/basic, tests/fmt/basic:
1143 * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1:
1144 * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec:
1145 * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1:
1146 * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it.
1147 * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test",
1148 not "../../src/test", so it works when run from a subdirectory.
1149 * tests/ls-2/tests: Create temp files and dirs from within the perl
1150 script, so that they're removed, when run from a subdirectory.
1151 * tests/ls-2/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir,
1152 so we can use "$ENV{abs_top_builddir}/src/test" in a test script.
1154 2007-08-16 Jim Meyering <jim@meyering.net>
1156 Consolidate od tests.
1157 * tests/misc/od: Perform od-zero-len's test here.
1158 Include boilerplate code, so tests run in a subdirectory.
1159 * tests/misc/od-zero-len: Remove this file.
1161 * tests/ls/time-1: Include sample-test boilerplate code.
1162 Remove the then-unnecessary, hard-coded envvar "unset" commands.
1164 2007-08-15 Jim Meyering <jim@meyering.net>
1166 Move a slow test into tests/misc.
1167 * tests/ls/time-1: Move this file to tests/misc/ls-time.
1168 * tests/misc/ls-time: New file. From tests/ls/time-1.
1169 * tests/ls/Makefile.am (TESTS): Remove time-1.
1170 * tests/misc/Makefile.am (TESTS): Add ls-time.
1172 od --skip (-j) works even on files in /proc, when the kernel lies
1173 * src/od.c (skip): Don't let kernel misinformation (nonempty files
1174 in /proc with stat.st_size == 0) make "od -j N" misbehave.
1175 Patch by Paul Eggert.
1176 * NEWS: Document this work-around.
1177 * tests/misc/od-zero-len: New file, test for the above.
1179 * src/printf.c (usage): Adjust summary to also mention OPTIONs.
1182 2007-08-14 Jim Meyering <jim@meyering.net>
1184 od: fix a bug that arises when skipping exact length of file
1185 * NEWS: Document the bug fix.
1186 * src/od.c (skip): Call fseek even when n_skip is exactly the
1187 same as the length of the current file. Otherwise, the next
1188 iteration would use unadjusted input stream pointer, thus ignoring
1189 the desired "skip". Report and patch by Paul GHALEB.
1191 * tests/misc/od: New file, test for the above.
1192 * tests/misc/Makefile.am (TESTS): Add od.
1194 2007-08-10 Paul Eggert <eggert@cs.ucla.edu>
1196 Accommodate more xstrtol changes.
1197 * src/df.c (long_options): Don't bother prepending "--" to long
1198 options that OPT_STR might decode, as that hack is no longer needed.
1199 (main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR.
1200 * src/du.c (long_options, main): Likewise.
1201 * src/ls.c (decode_switches): Likewise.
1202 * src/od.c (long_options, main): Likewise.
1203 * src/pr.c (first_last_page, main): Likewise.
1204 * src/sort.c (long_options, specify_sort_size): Likewise.
1205 * src/pr.c (first_last_page): Accept option index and option char
1206 instead of an assembled option string. All callers changed.
1207 * src/sort.c (specify_sort_size): Likewise.
1208 * src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT):
1211 2007-08-05 Jim Meyering <jim@meyering.net>
1213 Encapsulate a static variable.
1214 * src/system.h (opt_str_storage): Move static var into...
1215 (short_opt_str): ... new static inline function.
1216 (OPT_STR): Use the new function.
1218 2007-08-04 Jim Meyering <jim@meyering.net>
1220 Exercise xstrtol's diagnostics via pr's --pages option.
1221 * tests/misc/xstrtol: New file.
1222 * tests/misc/Makefile.am (TESTS): Add xstrtol.
1224 2007-08-04 Paul Eggert <eggert@cs.ucla.edu>
1226 Adapt to new human and xstrtol API.
1227 * src/df.c (long_options): Prepend "--" to long options that
1228 OPT_STR might decode.
1229 * src/du.c (long_options): Likewise.
1230 * src/od.c (long_options): Likewise.
1231 * src/sort.c (long_options): Likewise.
1232 * src/df.c (main): Adjust to new human and xstrtol API.
1233 * src/du.c (main): Likewise.
1234 * src/ls.c (decode_switches): Likewise.
1235 * src/od.c (main): Likewise.
1236 * src/pr.c (first_last_page): Likewise. New argument OPTION.
1237 All callers changed.
1238 * src/sort.c (specify_sort_size): New arg OPTION. All callers
1239 changed. Adjust to new xstrtol API.
1240 * src/system.h (opt_str_storage): New static var.
1241 (OPT_STR, LONG_OPT_STR, OPT_STR_INIT): New macros.
1243 2007-08-02 Jim Meyering <jim@meyering.net>
1245 Adjust one more test to accommodate the recent fts change.
1246 This matters only on systems with insufficient openat support.
1247 * tests/du/inacc-dest: Adjust expected diagnostic.
1249 Adjust the other two "no-x" tests and unify all three.
1250 * tests/du/no-x: Factor out du-specific bits.
1251 * tests/chmod/no-x: Use the same code.
1252 * tests/chgrp/no-x: Use the same code.
1254 Adapt du's no-x test not to fail on older Linux systems.
1255 * tests/du/no-x: Accept a third variant of the diagnostic.
1257 2007-07-31 Jim Meyering <jim@meyering.net>
1259 du: print size (probably incomplete) of each inaccessible directory
1260 * src/du.c (process_file): Print what we know of the size of a
1261 directory even when it is inaccessible. What we print is just the
1262 size of the directory itself, not counting any of its contents.
1263 * tests/du/inacc-dir: Test for this.
1264 * NEWS: Mention this change.
1266 Add a test for du not counting size of inaccessible directories.
1267 * tests/du/inacc-dir: New file. Test for fts.c bug fixed yesterday.
1268 * tests/du/Makefile.am (TESTS): Add inacc-dir.
1269 * NEWS: Mention the bug fix.
1271 2007-07-28 Jim Meyering <jim@meyering.net>
1273 Attempt to copy a regular file, even if stat says it is empty.
1274 * NEWS: Document this bug fix.
1275 * src/copy.c (copy_reg): Read from a regular file, even if it
1276 appears (stat.st_size == 0) to be empty. This reverts an
1277 optimization introduced on 2005-11-23 for coreutils-6.0.
1278 Otherwise, "cp /proc/cpuinfo /tmp" creates an empty file,
1279 on e.g., linux-2.6.20.
1280 * tests/cp/proc-zero-len: New file. Test for the above.
1281 * tests/cp/Makefile.am (TESTS): Add proc-zero-len.
1282 Reported by Dan Berrangé.
1284 2007-07-26 Bob Proulx <bob@proulx.com>
1286 sort: Improve sort --random-sort test.
1287 * tests/misc/sort-rand: If "locale" is available pick a random
1288 non-C locale and check "sort --random-sort" behavior using it.
1290 2007-07-24 Jim Meyering <jim@meyering.net>
1292 sort: add a test to exercise the affected code.
1293 * tests/sort/Test.pm (realloc-buf): Exercise the code that changed
1294 yesterday. No other test in all of "make check" does this.
1295 * NEWS: Mention the fix.
1297 2007-07-23 Paul Eggert <eggert@cs.ucla.edu>
1299 sort: avoid unaligned access.
1300 * src/sort.c (fillbuf): When enlarging the line buffer, ensure that
1301 the new size is a multiple of "sizeof (struct line)". This avoids
1302 alignment problems when indexing from the end of the buffer.
1303 Problem reported by Andreas Schwab in
1304 <http://lists.gnu.org/archive/html/bug-coreutils/2007-07/msg00158.html>.
1306 2007-07-23 Jim Meyering <jim@meyering.net>
1308 Update all copyright notices to use the newer form (e.g., remove
1309 the postal address, and add the 'licenses' URL).
1311 * COPYING: Update to Version 3.
1313 Update c99/c89 patch for new, copyright-change-induced offsets.
1314 * Makefile.maint (patch-check): Filter out '^Only in...' lines.
1315 * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
1317 2007-07-22 Jim Meyering <jim@meyering.net>
1319 * configure.ac: Arrange to rerun configure whenever src/Makefile.am
1320 changes. That file contains the list of program names that must be
1321 substituted into files like man/Makefile.
1322 Add quotes around AC_SUBST arguments.
1324 2007-07-21 Paul Eggert <eggert@cs.ucla.edu>
1326 * bootstrap (slurp): Work even in environments where "ls" defaults
1327 to "ls -A". Put in a FIXME, though, since the current code does
1328 not slurp files whose names start with ".", and this looks like
1329 it might be a troublesome area.
1331 2007-07-20 Jim Meyering <jim@meyering.net>
1333 Document and add a test for today's sort bug fix.
1334 * NEWS: Describe the bug fix.
1335 * tests/sort/Test.pm (obs-inval): Add a test for today's fix.
1337 2007-07-20 Andreas Schwab <schwab@suse.de>
1339 * src/sort.c (main): Don't free a pointer to non-malloc'd memory.
1341 2007-07-19 Jim Meyering <jim@meyering.net>
1343 Fix a portability bug in the new ls-color test.
1344 * tests/ls/stat-free-symlinks: Don't rely on the ability of
1345 a built-in printf to interpolate '\e'. Use '\033' instead.
1347 2007-07-18 Jim Meyering <jim@meyering.net>
1349 "cp -i --update older newer" no longer prompts; same for mv
1350 * src/copy.c (copy_internal): Perform "update" check before the
1351 possible interactive prompt. Reported by zeno_AT_biyg_DOT_org
1352 in <http://bugzilla.redhat.com/248591>
1353 * tests/mv/update: Add tests for the above.
1354 * NEWS: Mention the bug fix.
1356 2007-07-15 Jim Meyering <jim@meyering.net>
1358 ls --color: Don't stat symlinks when neither ORPHAN nor MISSING
1359 attribute has a color.
1360 * src/ls.c (main): Don't set check_symlink_color when C_EXEC is
1361 colored, unless ln=target (aka color_symlink_as_referent) is set.
1362 (gobble_file): Set f->linkok = true also when !check_symlink_color.
1363 http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10608/focus=10927
1364 Reported by Jeremy Maitin-Shepard.
1365 * tests/strace: New file, contents extracted from...
1366 * tests/mv/atomic: ...here. Source strace.
1367 * tests/ls/stat-free-symlinks: New file. Test for the above.
1368 Use strace to ensure that in this corner case, ls does not call stat.
1369 * tests/ls/Makefile.am (TESTS): Add stat-free-symlinks.
1370 * tests/Makefile.am (EXTRA_DIST): Add strace.
1372 2007-07-14 Jim Meyering <jim@meyering.net>
1374 Remove long-deprecated options.
1375 * NEWS: Mention this.
1376 * src/df.c, src/ls.c: Remove --kilobytes option.
1377 * src/du.c: Remove --kilobytes and --megabytes options.
1378 * src/who.c: Remove -i and --idle options.
1379 * src/ptx.c: Remove --copyright option.
1381 Change interface: make 2nd param _space_-separated, not comma-separated
1382 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Remove now-
1383 unnecessary use of tr.
1385 * configure.ac: Adjust caller, as well as the code that ensures the
1386 2nd parameter stays in sync with the list in src/Makefile.am.
1388 2007-07-14 Karel Zak <kzak@redhat.com>
1390 * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix typo: s/$2/$1/.
1391 (gl_INCLUDE_EXCLUDE_PROG): Quote first use of $2 parameter.
1392 Don't mix comma- and space-separated lists.
1393 Patch from Karel Zak.
1395 2007-07-13 Jim Meyering <jim@meyering.net>
1397 Warn about non-portable use of unescaped backslash at end of string,
1398 and treat it as if it were escaped.
1399 * src/tr.c (unquote): Considering that such usage would make GNU tr
1400 from coreutils-5.2.1 and earlier *fail*, the least we can do now is
1401 to warn about it. Solaris' tr ignores it.
1402 * NEWS: Mention this.
1404 Use proper backslash-quoting inside backticks.
1405 * configure.ac: Otherwise we run afoul of strict GNU tr:
1406 a string ending in a lone backslash would provoke a failure.
1408 2007-07-12 Jim Meyering <jim@meyering.net>
1410 Expand default-no-install prog list in ./configure --help output,
1411 and fix some []-quoting bugs in sed expressions.
1412 * configure.ac: Hard-code the list, "arch,su" here as well
1413 as in src/Makefile.am, and ensure the two stay in sync.
1414 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Use $2,
1415 rather than the nearly-equivalent shell variable.
1416 Karel Zak reported that ./configure --help's output included
1417 the literal string, $gl_no_install_progs_default.
1419 Clean up include-exclude-prog.m4.
1420 * m4/include-exclude-prog.m4 (gl_ADD_PROG): Don't modify MAN.
1421 (gl_REMOVE_PROG): Likewise.
1422 Add omitted "\>" in sed regexp.
1423 Remove any leading or trailing spaces.
1424 (gl_ADD_PROG): Remove any leading space.
1425 * configure.ac: Instead, derive $MAN from $optional_bin_progs.
1426 Append $(EXEEXT) to *all* names, not just the first one.
1428 2007-07-11 Jim Meyering <jim@meyering.net>
1430 If there's a GPL vN copyright comment, require that N == 3.
1431 * Makefile.maint (sc_GPL_version): New rule.
1432 * tests/misc/arch: Fix the sole violation.
1434 2007-07-10 Jim Meyering <jim@meyering.net>
1436 Skip "arch" test if it's not built.
1437 * tests/misc/Makefile.am (built_programs): Define.
1438 (TESTS_ENVIRONMENT): Add $(built_programs), for...
1439 * tests/misc/arch: ...this: skip the test if arch is not built.
1440 * src/Makefile.am (built_programs.list): New rule.
1441 * tests/Makefile.am (built_programs): Rename from all_programs.
1442 (TESTS_ENVIRONMENT): Use built_programs, not all_programs.
1443 * tests/help-version: Likewise.
1444 * NEWS: Mention that using --enable-no-install-program=X may
1445 cause "make check" to fail.
1447 Add support for enabling/disabling installation of specified programs.
1448 * NEWS: Mention new configure-time options.
1449 Mention that neither arch nor su is built/installed, by default.
1450 * m4/include-exclude-prog.m4: New file.
1451 * configure.ac: Use new macro, gl_ADD_PROG, rather than
1452 manually appending to OPTIONAL_BIN_PROGS and MAN.
1453 Move the code that adds "df" to the list of programs to build from
1454 m4/jm-macros into this file.
1455 Use gl_INCLUDE_EXCLUDE_PROG, then handle special cases: ginstall, [.
1456 (NO_INSTALL_PROGS_DEFAULT): AC_SUBST it. Used by man/Makefile.am.
1457 * man/Makefile.am (dist_man_MANS): Remove from this list all man pages
1458 corresponding to "bin" programs. Add $(MAN) instead.
1459 (optional_mans): Remove all uses.
1460 (check-x-vs-1): Adapt to work even though arch and su are typically
1461 no longer built (and neither are their .1 files).
1462 * src/Makefile.am (install_su): Rename from INSTALL_SU, now that
1463 INSTALL_SU has a different meaning. Use the new $(INSTALL_SU) value.
1465 2007-07-10 Karel Zak <kzak@redhat.com>
1468 * NEWS: Mention arch.
1469 * README: Add arch to the list of programs.
1470 * AUTHORS: Add arch.
1471 * src/uname.c: Include "uname.h".
1472 (PROGRAM_NAME): Handle arch, too.
1473 (ARCH_AUTHORS): Define.
1474 (uname_long_options, arch_long_options): Renamed and new globals.
1475 (usage): Handle arch-mode as well as uname-mode.
1476 (decode_switches): New function, extracted from main,
1477 to handle arch-mode as well as uname-mode.
1478 (main): Handle both modes.
1479 * src/uname-arch.c: New program, alias for "uname -m".
1480 * src/uname-uname.c: New file, default uname mode.
1481 * src/uname.h: New file, uname modes.
1482 * src/Makefile.am (EXTRA_PROGRAMS): Add arch.
1483 (uname_SOURCES, arch_SOURCES): Define.
1484 * man/arch.x: New file.
1485 * man/Makefile.am (dist_man_MANS): Add arch.1.
1486 (arch.1): New dependency.
1487 * tests/misc/arch: New test, compare "arch" with "uname -m"
1488 * configure.ac (OPTIONAL_BIN_PROGS): Add arch.
1490 * .x-sc_require_config_h: Exempt uname-arch.c and uname-uname.c
1491 from the always-include-<config.h> rule.
1493 2007-07-10 Jim Meyering <jim@meyering.net>
1495 Change "version 2" to "version 3" in all copyright notices.
1497 2007-07-09 Jim Meyering <jim@meyering.net>
1499 Compensate for new c99'isms in seq.c.
1500 * Makefile.maint (patch-check): Use -p1, not -p2, so a patch
1501 generated via "make patch-check REGEN=1" actually works.
1502 * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
1504 2007-07-09 Pádraig Brady <P@draigBrady.com>
1506 Fix the automatic number width formatting in seq.
1507 * src/seq.c: Fix the -w logic. Ignore spaces and '+'
1508 characters of input numbers when determining width.
1509 Set format correctly for input numbers in scientific notation.
1510 * tests/seq/basic: Add various number width tests.
1511 Details: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10903>
1513 2007-07-08 Jim Meyering <jim@meyering.net>
1515 Run the coreutils-specific code only if tests/Makefile.am.in exists.
1516 * bootstrap (mam_template): Move definition out of loop.
1518 Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
1519 * bootstrap (symlink_to_dir): Rename function from symlink_to_gnulib.
1520 Add a directory parameter. Update all callers.
1521 (cp_mark_as_generated): Also check for -- and link to -- files in gl/.
1523 * THANKS: Add Pádraig Brady.
1525 2007-07-08 Jim Meyering <jim@meyering.net>
1527 Adapt to deeper hierarchy in gnulib.
1528 * bootstrap (symlink_to_dir): If the destination directory doesn't
1529 exist, create it. This is required at least for "lib/uniwidth/cjk.h".
1531 Use <wchar.h>, not "wcwidth.h".
1532 * src/wc.c: Now that gnulib provides the POSIX-specified <wchar.h>,
1533 include it and <wctype.h>, rather than "wcwidth.h".
1534 * src/ls.c: Include <wchar.h>, rather than "wcwidth.h".
1536 2007-07-05 Jim Meyering <jim@meyering.net>
1538 setuidgid: set all groups, not just the primary one.
1539 I wanted to use the xgetgroups function from id.c, so factored
1540 it out and made it into a non-exiting function (hence the "m"
1541 prefix rather than "x").
1542 * src/setuidgid.c (main): Use mgetgroups.
1543 Include "mgetgroups.h".
1545 * src/id.c (xgetgroups): Remove function.
1546 Include "mgetgroups.h".
1547 (print_group_list): Use mgetgroups, not xgetgroups.
1549 * gl/modules/mgetgroups: New module.
1550 * gl/lib/mgetgroups.c: New file. mgetgroups is derived from
1551 id.c's xgetgroups function.
1552 * bootstrap.conf (gnulib_modules): Add mgetgroups.
1553 * gl/m4/mgetgroups.m4: New file.
1554 * gl/lib/mgetgroups.h: New file.
1556 * bootstrap: Merge in changes from gnulib.
1558 * src/id.c: Include "getugroups.h" rather than declaring manually.
1560 2007-07-04 Paul Eggert <eggert@cs.ucla.edu>
1562 * NEWS: pr -F no longer suppresses the footer or the first two blank
1563 lines in the header.
1564 * doc/coreutils.texi (pr invocation): Likewise. Also, a too-short
1565 page length implies -t, not -T.
1566 * src/pr.c (lines_per_header, lines_per_footer): Now constants.
1567 (init_parameters): Don't try to change them.
1568 (print_header): Use the same header and footer format regardless of
1569 wither form feeds are being used.
1570 (usage): Adjust to above change when describing too-short page length.
1571 Too-short page length impliesy -t, not -T.
1572 * tests/pr/2-S_f-t_notab: Adjust to the fact that -F now affects
1573 only formfeed handling; it does not change the header.
1574 * tests/pr/2-Sf-t_notab: Likewise.
1575 * tests/pr/2f-t_notab: Likewise.
1576 * tests/pr/2s_f-t_notab: Likewise.
1577 * tests/pr/2s_w60f-t_nota: Likewise.
1578 * tests/pr/2sf-t_notab: Likewise.
1579 * tests/pr/2sw60f-t_notab: Likewise.
1580 * tests/pr/2w60f-t_notab: Likewise.
1581 * tests/pr/3a3f-0F: Likewise.
1582 * tests/pr/3b3f-0F: Likewise.
1583 * tests/pr/3b3f-0FF: Likewise.
1584 * tests/pr/3b3f-FF: Likewise.
1585 * tests/pr/3f-0F: Likewise.
1586 * tests/pr/3f-FF: Likewise.
1587 * tests/pr/Test.pm: Likewise.
1588 * tests/pr/a3f-0F: Likewise.
1589 * tests/pr/a3f-0FF: Likewise.
1590 * tests/pr/a3f-FF: Likewise.
1591 * tests/pr/b3f-0F: Likewise.
1592 * tests/pr/b3f-0FF: Likewise.
1593 * tests/pr/b3f-FF: Likewise.
1594 * tests/pr/3-5l17f-t: Remove, since it's been renamed to another
1595 file whose name has a line count 7 larger,
1596 reflecting the new line count needed for this behavior.
1597 * tests/pr/3a3l8f-t: Likewise.
1598 * tests/pr/3b3l8f-t: Likewise.
1599 * tests/pr/3l17f-t: Likewise.
1600 * tests/pr/3ml17f-t: Likewise.
1601 * tests/pr/Ja3l17f-lm: Likewise.
1602 * tests/pr/Jb3l17f-lm: Likewise.
1603 * tests/pr/Jml17f-lm-lo: Likewise.
1604 * tests/pr/W-72l17f-ll: Likewise.
1605 * tests/pr/W20l17f-ll: Likewise.
1606 * tests/pr/W26l17f-ll: Likewise.
1607 * tests/pr/W27l17f-ll: Likewise.
1608 * tests/pr/W28l17f-ll: Likewise.
1609 * tests/pr/W35Ja3l17f-lm: Likewise.
1610 * tests/pr/W35Jb3l17f-lm: Likewise.
1611 * tests/pr/W35Jml17f-lmlo: Likewise.
1612 * tests/pr/W35a3l17f-lm: Likewise.
1613 * tests/pr/W35b3l17f-lm: Likewise.
1614 * tests/pr/W35ml17f-lm-lo: Likewise.
1615 * tests/pr/W72Jl17f-ll: Likewise.
1616 * tests/pr/a3l17f-lm: Likewise.
1617 * tests/pr/a3l8f-t: Likewise.
1618 * tests/pr/b3l17f-lm: Likewise.
1619 * tests/pr/b3l8f-t: Likewise.
1620 * tests/pr/l17f-t: Likewise.
1621 * tests/pr/ml17f-0F: Likewise.
1622 * tests/pr/ml17f-lm-lo: Likewise.
1623 * tests/pr/ml17f-t: Likewise.
1624 * tests/pr/ml17f-t-0F: Likewise.
1625 * tests/pr/n+2-5l17f-0FF: Likewise.
1626 * tests/pr/n+2l17f-0FF: Likewise.
1627 * tests/pr/n+2l17f-bl: Likewise.
1628 * tests/pr/n+3l17f-0FF: Likewise.
1629 * tests/pr/n+3l17f-bl: Likewise.
1630 * tests/pr/n+3ml13f-bl-FF: Likewise.
1631 * tests/pr/n+3ml17f-bl-tn: Likewise.
1632 * tests/pr/n+3ml17f-tn-bl: Likewise.
1633 * tests/pr/n+4b2l10f-0FF: Likewise.
1634 * tests/pr/n+5-8b3l10f-FF: Likewise.
1635 * tests/pr/n+5a3l6f-0FF: Likewise.
1636 * tests/pr/n+6b3l6f-FF: Likewise.
1637 * tests/pr/nJml17f-lmlmlo: Likewise.
1638 * tests/pr/nJml17f-lmlolm: Likewise.
1639 * tests/pr/nN1+3l17f-bl: Likewise.
1640 * tests/pr/nN15l17f-bl: Likewise.
1641 * tests/pr/nSml13-bl-FF: Likewise.
1642 * tests/pr/nSml13-t-t-FF: Likewise.
1643 * tests/pr/nSml13-t-tFFFF: Likewise.
1644 * tests/pr/nSml17-bl-FF: Likewise.
1645 * tests/pr/nSml17-t-t-FF: Likewise.
1646 * tests/pr/nSml17-t-tFFFF: Likewise.
1647 * tests/pr/nl17f-bl: Likewise.
1648 * tests/pr/o3Jml17f-lm-lo: Likewise.
1649 * tests/pr/o3a3Sl17f-tn: Likewise.
1650 * tests/pr/o3a3Snl17f-tn: Likewise.
1651 * tests/pr/o3a3l17f-tn: Likewise.
1652 * tests/pr/o3b3Sl17f-tn: Likewise.
1653 * tests/pr/o3b3Snl17f-tn: Likewise.
1654 * tests/pr/o3b3l17f-tn: Likewise.
1655 * tests/pr/o3mSl17f-bl-tn: Likewise.
1656 * tests/pr/o3mSnl17fbltn: Likewise.
1657 * tests/pr/o3ml17f-bl-tn: Likewise.
1658 * tests/pr/w72l17f-ll: Likewise.
1659 * tests/pr/3-5l24f-t: New file, containing the contents of the
1660 file with the same name but with the line count smaller by 7,
1661 reflecting the new behavior with -F.
1662 * tests/pr/3a3l15f-t: Likewise.
1663 * tests/pr/3b3l15f-t: Likewise.
1664 * tests/pr/3l24f-t: Likewise.
1665 * tests/pr/3ml24f-t: Likewise.
1666 * tests/pr/Ja3l24f-lm: Likewise.
1667 * tests/pr/Jb3l24f-lm: Likewise.
1668 * tests/pr/Jml24f-lm-lo: Likewise.
1669 * tests/pr/W-72l24f-ll: Likewise.
1670 * tests/pr/W20l24f-ll: Likewise.
1671 * tests/pr/W26l24f-ll: Likewise.
1672 * tests/pr/W27l24f-ll: Likewise.
1673 * tests/pr/W28l24f-ll: Likewise.
1674 * tests/pr/W35Ja3l24f-lm: Likewise.
1675 * tests/pr/W35Jb3l24f-lm: Likewise.
1676 * tests/pr/W35Jml24f-lmlo: Likewise.
1677 * tests/pr/W35a3l24f-lm: Likewise.
1678 * tests/pr/W35b3l24f-lm: Likewise.
1679 * tests/pr/W35ml24f-lm-lo: Likewise.
1680 * tests/pr/W72Jl24f-ll: Likewise.
1681 * tests/pr/a3l15f-t: Likewise.
1682 * tests/pr/a3l24f-lm: Likewise.
1683 * tests/pr/b3l15f-t: Likewise.
1684 * tests/pr/b3l24f-lm: Likewise.
1685 * tests/pr/l24f-t: Likewise.
1686 * tests/pr/ml24f-0F: Likewise.
1687 * tests/pr/ml24f-lm-lo: Likewise.
1688 * tests/pr/ml24f-t: Likewise.
1689 * tests/pr/ml24f-t-0F: Likewise.
1690 * tests/pr/n+2-5l24f-0FF: Likewise.
1691 * tests/pr/n+2l24f-0FF: Likewise.
1692 * tests/pr/n+2l24f-bl: Likewise.
1693 * tests/pr/n+3l24f-0FF: Likewise.
1694 * tests/pr/n+3l24f-bl: Likewise.
1695 * tests/pr/n+3ml20f-bl-FF: Likewise.
1696 * tests/pr/n+3ml24f-bl-tn: Likewise.
1697 * tests/pr/n+3ml24f-tn-bl: Likewise.
1698 * tests/pr/n+4b2l17f-0FF: Likewise.
1699 * tests/pr/n+5-8b3l17f-FF: Likewise.
1700 * tests/pr/n+5a3l13f-0FF: Likewise.
1701 * tests/pr/n+6b3l13f-FF: Likewise.
1702 * tests/pr/nJml24f-lmlmlo: Likewise.
1703 * tests/pr/nJml24f-lmlolm: Likewise.
1704 * tests/pr/nN1+3l24f-bl: Likewise.
1705 * tests/pr/nN15l24f-bl: Likewise.
1706 * tests/pr/nSml20-bl-FF: Likewise.
1707 * tests/pr/nSml20-t-t-FF: Likewise.
1708 * tests/pr/nSml20-t-tFFFF: Likewise.
1709 * tests/pr/nSml24-bl-FF: Likewise.
1710 * tests/pr/nSml24-t-t-FF: Likewise.
1711 * tests/pr/nSml24-t-tFFFF: Likewise.
1712 * tests/pr/nl24f-bl: Likewise.
1713 * tests/pr/o3Jml24f-lm-lo: Likewise.
1714 * tests/pr/o3a3Sl24f-tn: Likewise.
1715 * tests/pr/o3a3Snl24f-tn: Likewise.
1716 * tests/pr/o3a3l24f-tn: Likewise.
1717 * tests/pr/o3b3Sl24f-tn: Likewise.
1718 * tests/pr/o3b3Snl24f-tn: Likewise.
1719 * tests/pr/o3b3l24f-tn: Likewise.
1720 * tests/pr/o3mSl24f-bl-tn: Likewise.
1721 * tests/pr/o3mSnl24fbltn: Likewise.
1722 * tests/pr/o3ml24f-bl-tn: Likewise.
1723 * tests/pr/w72l24f-ll: Likewise.
1725 2007-06-23 Jim Meyering <jim@meyering.net>
1727 Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0.
1728 * src/base64.c (main): Likewise.
1729 * src/install.c (setdefaultfilecon): Likewise.
1730 * src/sort.c (main): Likewise.
1731 * Makefile.maint (sc_prohibit_strcmp): New rule.
1732 * .x-sc_prohibit_strcmp: New file, to list the few exceptions.
1733 * Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp.
1735 2007-06-22 Paul Eggert <eggert@cs.ucla.edu>
1737 * NEWS: seq no longer mishandles obvious cases like
1738 "seq 0 0.000001 0.000003" by omitting the last output number.
1739 * doc/coreutils.texi (seq invocation): Remove advice about workaround
1740 for seq off-by-one problem, since the bug is fixed now. Replace
1741 it with more-generic advice about rounding errors.
1742 * src/seq.c (long_double_format, print_numbers):
1743 New arg NUMERIC_FORMAT. All uses changed.
1745 2007-06-22 Pádraig Brady <P@draigBrady.com> (trivial change)
1747 * tests/seq/basic: Add test cases for seq off-by-one problem.
1749 2007-06-22 Jim Meyering <jim@meyering.net>
1751 * src/stat.c (long_options): Add a FIXME comment to help ensure
1752 that the deprecated and undocumented "--filesystem" option is
1755 2007-06-18 Paul Eggert <eggert@cs.ucla.edu>
1757 A few more symlink-related fixes. Fix a bug triggered by cp
1758 --parents and symlinks. Close some race conditions possible when
1759 the destination replaces a newly-created file with a symlink.
1760 * NEWS: Document that 'cp --parents' no longer mishandles
1761 symlinks in file name components of source.
1762 * src/copy.c (HAVE_LCHOWN): Default to false.
1763 (lchown) [!defined HAVE_LCHOWN]: Define to chown, for convenience.
1764 * src/cp.c (lchown) [!HAVE_LCHOWN]: Likewise.
1765 * src/install.c (lchown [!HAVE_LCHOWN]: Likewise.
1766 * src/copy.c (set_owner): Use lchown instead of chown, for safety
1767 in case the file got replaced by a symlink in the meantime.
1768 * src/cp.c (re_protect): Likewise.
1769 * src/install.c (change_attributes): Likewise.
1770 * src/copy.c (copy_internal): Use ordinary C rather than an #if.
1771 * src/cp.c (lchown) [!HAVE_LCHOWN]: Define to chown, for convenience.
1772 (struct dir_attr): Cache the entire struct stat of the directory,
1773 rather than just its mode, so that we needn't stat the directory
1774 twice (which can lead to races).
1775 (re_protect): Don't use XSTAT as that's not appropriate in
1776 this context (symlinks should be followed here). Instead, use
1777 the cached stat value.
1778 (make_dir_parents_private): Save dir's entire struct stat, not
1780 * tests/cp/cp-parents: Add test to check against bug with
1781 cp --parents and symlinks.
1783 2007-06-18 Jim Meyering <jim@meyering.net>
1785 Use mreadlink_with_size (doesn't exit), not xreadlink_with_size.
1786 * bootstrap.conf (gnulib_modules): Add readlink-with-size.
1787 Remove xreadlink and xreadlink-with-size.
1788 * src/copy.c (copy_internal): Use mreadlink_with_size,
1789 not xreadlink_with_size.
1790 * src/ls.c (get_link_name): Likewise.
1791 * src/readlink.c (main): Likewise.
1792 * src/stat.c (print_stat): Likewise.
1794 * README-hacking: Don't mention Gzip 1.2.4, now that 1.3.12 is out.
1796 2007-06-16 Jim Meyering <jim@meyering.net>
1798 Make chgrp and chown diagnostics consistent.
1799 * src/chown.c (main): Emit the diagnostic before the file name,
1800 not after it, to be consistent with chgrp's diagnostic.
1801 * src/chgrp.c (parse_group): Emit a ":" between the diagnostic
1803 Reported by Egmont Koblinger.
1804 * THANKS: Add Egmont Koblinger.
1806 2007-06-15 Paul Eggert <eggert@cs.ucla.edu>
1808 Correct cp's handling of destination symlinks in some cases.
1809 * NEWS: "cp" no longer considers a destination symlink to be the
1810 same as the referenced file when copying links or making backups.
1811 * src/copy.c (copy_reg): When following a symlink, use the
1812 followed name in later chown etc. requests, so that the created
1813 file is affected, rather than the symlink. Use O_NOFOLLOW on
1814 source when not dereferencing symlinks; this avoids a race.
1815 Preserve errno correctly when doing multiple open attempts on the
1817 (copy_internal): Follow destination symlinks only when copying a
1818 regular file and only when we don't intend to remove or rename the
1819 destination first, regardless of whether following source
1820 symlinks; this is because since POSIX and tradition (e.g.,
1821 FreeBSD) say we should ordinarily follow destination symlinks if
1822 the system calls would ordinarily do so.
1823 * src/copy.h (struct cp_options): Add comment that 'dereference'
1824 is only for source files.
1825 * src/cp.c (usage): Note that --derereference etc. are only for
1827 (make_dir_parents_private): Follow symlinks, regardless of whether
1828 --dereference is specified, because these are destination symlinks.
1829 * tests/cp/same-file: Adjust tests to match revised behavior.
1830 Filter out perror output since it might vary from host to host.
1831 Use sed alone instead of also using echo.
1833 * doc/coreutils.texi (cp invocation): Document the behavior better when
1834 the destination is a symlink. Clarify source versus destination
1835 symlinks. Describe the new behavior for destination symlinks.
1837 2007-06-15 Jim Meyering <jim@meyering.net>
1839 * src/copy.c: Include "canonicalize.h".
1840 (copy_reg): Use canonicalize_filename_mode to follow the symlink,
1841 so that we can always open with O_EXCL and avoid a race.
1843 2007-06-15 Jim Meyering <jim@meyering.net>
1845 Don't include "quote.h" when it is not used.
1846 * src/md5sum.c: Remove unnecessary inclusion of "quote.h".
1847 * src/expr.c: Likewise.
1848 * src/shred.c: Likewise.
1849 * Makefile.maint (sc_prohibit_quote_without_use): New rule.
1850 * src/c99-to-c89.diff: Adjust offsets.
1852 2007-06-14 Paul Eggert <eggert@cs.ucla.edu>
1854 Clarify what "cat" documentation means by "blank" lines.
1855 * doc/coreutils.texi (cat invocation): "Blank" lines actually mean
1857 * src/cat.c (usage): Say that "nonblank" means nonempty. Clarify
1860 2007-06-13 Jim Meyering <jim@meyering.net>
1862 rmdir: give better diagnostics
1863 * src/rmdir.c (remove_parents): Give a more descriptive/consistent
1864 diagnostic upon failure.
1866 Suggestion from Joey Hess.
1867 * THANKS: Add Joey Hess.
1869 Don't include "quotearg.h" when it is not used.
1870 * Makefile.maint (sc_prohibit_quotearg_without_use): New rule.
1871 * src/cp.c: Don't include "quotearg.h". It wasn't used.
1873 * README-hacking: List Gperf as a build-requirement, too.
1874 Reported by Steve Ward.
1876 2007-06-11 Jim Meyering <jim@meyering.net>
1878 * README: Mention README-hacking, for whose who start from
1879 cloned/checked-out sources rather than from a distribution tarball.
1880 Reported by Steve Ward.
1881 * THANKS: Add Steve Ward.
1883 2007-06-10 Jim Meyering <jim@meyering.net>
1885 bug-fix: cp would fail to write through a dangling symlink
1886 * NEWS: Mention the bug fix.
1887 * src/copy.c (copy_reg): When open fails with EEXIST, the destination
1888 is lstat'able, and a symlink, call open again, but now without O_EXCL.
1889 * tests/cp/thru-dangling: New file, to test for the above fix.
1890 * tests/cp/Makefile.am (TESTS): Add thru-dangling.
1891 * THANKS: Add Michael McLagan.
1892 Bug report from Michael McLagan in <http://bugzilla.redhat.com/243588>.
1894 2007-06-04 Paul Eggert <eggert@cs.ucla.edu>
1896 * doc/coreutils.texi (Common options): Mention that -h and
1897 --human-readable are equivalent to --block-size=human-readable.
1898 Documentation problem reported by Steve Ward in
1899 <http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00007.html>.
1900 (du invocation): Use optSi rather than duplicating the macro's
1901 contents (incorrectly, since we claimed a "B" was output).
1903 2007-05-31 Jim Meyering <jim@meyering.net>
1905 Pull printf-related code from gnulib, rather than using forked copy.
1906 * bootstrap.conf (gnulib_modules): Don't avoid size_max and xsize
1907 modules. While I dislike xsize-style overflow avoidance, maintaining
1908 a forked version of e.g., vasnprintf.c was too much work.
1910 2007-05-29 Jim Meyering <jim@meyering.net>
1912 * src/dircolors.hin: Add screen-256color.
1913 Suggested by sdl.web@gmail.com in <http://bugzilla.redhat.com/239266>.
1915 2007-05-26 Jim Meyering <jim@meyering.net>
1917 * TODO: Add an entry for comm --output-delimiter=STR
1919 2007-05-25 James Youngman <jay@gnu.org>
1921 wc: ignore multibyte-character decoding errors
1922 * src/wc.c (wc): Don't issue an error message when mbrtowc
1923 indicates that we have seen an invalid byte sequence. This
1924 makes "wc /bin/sh" bearable (though the word and line counts
1925 are likely not to be useful).
1926 * NEWS: Mention the change.
1928 2007-05-22 Jim Meyering <jim@meyering.net>
1930 Check for an up-to-date copyright year in coreutils.texi.
1931 * Makefile.maint (copyright-check): Also check for an up-to-date
1932 copyright year in doc/$().texi, if that file exists.
1933 * doc/coreutils.texi: Add 2007 to list of Copyright years.
1934 Reported by Karl Berry.
1936 cut: diagnose a range starting with 0 (-f 0-2) as invalid, and
1937 give a better diagnostic for a field-number/offset of 0.
1938 * NEWS: Mention the fix.
1939 * src/cut.c (ADD_RANGE_PAIR): Add an explicit check.
1940 Based on a patch from James Youngman.
1941 * tests/misc/cut: Add tests for the above.
1943 "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
1944 Also, diagnose the '-' in "cut -f -" as an invalid range, rather
1945 than interpreting it as the unlimited range, "1-".
1946 * NEWS: Mention these changes.
1947 * src/cut.c (set_fields): Don't interpret an accumulator "value"
1948 of 0 as an unspecified range endpoint.
1949 Give better diagnostics.
1950 Adjust a comment so that it is true also for 64-bit size_t.
1952 * tests/cut/Test.pm: Add tests for the above.
1954 stty: fix a harmless syntax nit
1955 * src/stty.c (visible): Use ";" as the statement terminator
1956 between two assignments, not ",".
1957 (integer_arg): Join an unnecessarily wrapped line.
1959 2007-05-20 Jim Meyering <jim@meyering.net>
1961 stty: diagnose an invalid hex value in 35-colon commmand-line argument
1962 * NEWS: Mention this.
1963 * src/stty.c (strtoul_tcflag_t, strtoul_cc_t): New functions.
1964 (recover_mode): Use those functions (not sscanf), to parse the
1966 * tests/stty/invalid: New file. Test for the above.
1967 * tests/stty/Makefile.am (TESTS): Add invalid.
1968 * .x-sc_prohibit_atoi_atof: Don't exempt stty.c from this check.
1969 Add tests/stty/invalid so we don't have to obfuscate the comment
1970 about sscanf therein.
1971 * Makefile.maint (sc_prohibit_atoi_atof): Mention sscanf in the
1974 * TODO: Remove some now-completed or no longer relevant items.
1976 2007-05-19 Jim Meyering <jim@meyering.net>
1978 Rename uses of futimens -> gl_futimens; glibc now declares the former.
1979 * src/copy.c (copy_reg): Reflect renaming: futimens -> gl_futimens.
1980 * src/touch.c (touch): Likewise.
1982 2007-05-18 Jim Meyering <jim@meyering.net>
1984 * Makefile.maint (my-distcheck): Remove -pedantic from $(CFLAGS)
1985 for now, to avoid c89-check failure due to use of #include_next.
1987 2007-05-15 Jim Meyering <jim@meyering.net>
1989 Generate a dozen test-related Makefile.am files at bootstrap-time.
1990 * README-hacking: Build-from-checkout now require Perl, too.
1991 * bootstrap: Now that these generated Makefile.am files are no longer
1992 under version control, they must be created at bootstrap time.
1994 2007-05-14 Paul Eggert <eggert@cs.ucla.edu>
1996 * man/chmod.x: Document chmod's behavior with setuid and setgid bits.
1997 Remove misleading implication about leading zero. Problem
1998 reported by Jan Engelhardt in
1999 <http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00134.html>.
2001 2007-05-13 Jim Meyering <jim@meyering.net>
2003 Remove the generated tests/*/Makefile.am files from version control.
2004 * tests/cut/Makefile.am: git-remove this generated file.
2005 * tests/head/Makefile.am: Likewise.
2006 * tests/join/Makefile.am: Likewise.
2007 * tests/pr/Makefile.am: Likewise.
2008 * tests/sort/Makefile.am: Likewise.
2009 * tests/tac/Makefile.am: Likewise.
2010 * tests/tail/Makefile.am: Likewise.
2011 * tests/test/Makefile.am: Likewise.
2012 * tests/tr/Makefile.am: Likewise.
2013 * tests/uniq/Makefile.am: Likewise.
2014 * tests/wc/Makefile.am: Likewise.
2015 * .cvsignore, .gitignore: Ignore these generated files.
2017 * src/.cvsignore, src/.gitignore: Add chcon here, ...
2018 * .cvsignore, .gitignore: ... not here.
2020 Test uniq's new --zero-terminated (-z) option.
2021 * tests/uniq/Test.pm: When possible, create a "-z"-testing variant
2022 of each existing test.
2023 (2z, 3z, 4z, 5z, 20z, 122, 123): New tests from James Youngman.
2025 2007-05-12 James Youngman <jay@gnu.org>
2027 Add -z option to uniq. Originally proposed by Egmont Koblinger.
2028 * NEWS: Mention uniq's new option: --zero-terminated (-z).
2029 * src/uniq.c: Add new option, --zero-terminated (-z), to make
2030 uniq use the NUL byte as separator/delimiter rather than newline.
2031 (check_file): Add a parameter: delimiter. Update caller.
2032 Use readlinebuffer_delim in place of readlinebuffer everywhere.
2033 (main): Handle the new option.
2034 (usage): Describe new option the same way sort does.
2035 * doc/coreutils.texi (uniq invocation): Describe the new option.
2037 2007-05-07 Jim Meyering <jim@meyering.net>
2039 * NEWS: Mention that last week's tr bug dates back to 1992.
2041 2007-05-04 Jim Meyering <jim@meyering.net>
2043 Avoid test failure when run with an unusual umask.
2044 * tests/ls/color-dtype-dir: Set umask to 022.
2045 Suggestion from AIDA Shinra.
2047 Avoid failure of root-only test when run with a restrictive umask.
2048 * tests/rm/no-give-up: Ensure that non-root can access "d/" through
2049 root-owned ".". Reported by AIDA Shinra.
2051 tr -c: don't abort when translating with S2 larger than complement of S1
2052 * src/tr.c (main): Remove invalid assertion triggered by e.g.,
2053 tr -c a '[b*256]'. There's nothing wrong with having Set2 larger
2054 than Set1. Reported by Guntram Blohm.
2055 * tests/tr/Test.pm (no-abort-1): Test for the above.
2056 * NEWS: Mention this bug fix.
2057 * THANKS: Add Guntram Blohm.
2059 2007-05-03 Jim Meyering <jim@meyering.net>
2061 Avoid test failure when run with a permissive umask.
2062 * tests/rm/no-give-up: Set permissions of test directory properly,
2063 i.e., not depending on umask prohibiting go=w.
2064 Reported by AIDA Shinra.
2066 2007-05-02 Paul Eggert <eggert@cs.ucla.edu>
2068 The following commands and options now support the standard size
2069 suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y:
2070 head -c, head -n, od -j, od -N, od -S, split -b, split -C,
2072 * doc/coreutils.texi (od invocation, head invocation, tail invocation):
2073 Document support for new size suffixes.
2074 (head invocation, tail invocation):
2075 Document that -n uses the same suffixes as -c.
2076 (tail invocation): More-clearly document what leading "+" does.
2077 * src/head.c (usage, string_to_integer): Support new suffixes.
2078 * src/od.c (usage, main): Likewise.
2079 * src/split.c (usage, main): Likewise.
2080 * src/tail.c (usage, parse_options): Likewise.
2081 Prompted by a patch from Evan Hunt.
2083 2007-05-02 Jim Meyering <jim@meyering.net>
2085 * src/du.c (usage): Tweak description of --dereference-args (-D) again.
2086 Prompted by another request for clarification from Justin Pryzby.
2088 Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.
2089 * tests/rm/fail-2eperm: Patch from AIDA Shinra.
2090 Reported by Peter Dyballa.
2091 * THANKS: Add AIDA Shinra and Peter Dyballa.
2093 2007-04-28 Paul Eggert <eggert@cs.ucla.edu>
2095 * src/nohup.c (usage): Describe how standard input and output
2098 2007-04-25 Jim Meyering <jim@meyering.net>
2100 * src/du.c (usage): Clarify description of --dereference-args (-D).
2101 Prompted by a report from Justin Pryzby.
2103 * bootstrap.conf (gnulib_modules): Add fseeko and ftello.
2104 (gnulib_modules): Add autobuild.
2106 2007-04-24 Jim Meyering <jim@meyering.net>
2108 * THANKS: Add Andreas Frische.
2109 * NEWS: Mention today's ls --color fix.
2110 * tests/ls-2/tests (sl-dangle): Add a test for today's fix.
2112 2007-04-24 Eric Blake <ebb9@byu.net>
2114 ls --color once again colors dangling symlinks correctly
2115 * src/ls.c (gobble_file): Much like the 2007-04-07 fix,
2116 add a term to the expression that decides whether we need
2117 stat and/or lstat calls. Reported by Andreas Frische.
2119 2007-04-16 Jim Meyering <jim@meyering.net>
2121 * src/cut.c (usage): Adjust synopsis to show that an OPTION is required.
2122 Reported by Rudolf Kastl.
2123 * THANKS: Add Rudolf Kastl.
2125 2007-04-11 Paul Eggert <eggert@cs.ucla.edu>
2127 split --line-bytes=N (-C N): don't create an empty file.
2128 * src/split.c (line_bytes_split): Don't create an empty line
2129 afterwards if the last buffer happens to be exactly full.
2130 * tests/misc/split-fail: Add a test case for this.
2131 * NEWS: mention this.
2133 2007-04-10 Jim Meyering <jim@meyering.net>
2135 ls: don't form or compute the length of strings that won't be used.
2136 * src/ls.c (gobble_file): Form and compute length of strings for
2137 block size, owner, group, author, major+minor numbers and file size
2138 only if they'll actually be used. I.e., don't form most of them
2139 when not producing long format output.
2141 2007-04-07 Jim Meyering <jim@meyering.net>
2143 Add a test for, and document, today's fix.
2144 * NEWS: Mention today's ls --color fix.
2145 * tests/ls-2/tests (sl-target): Add a test for today's fix.
2146 * THANKS: Add Kirk Kelsey.
2148 2007-04-07 Eric Blake <ebb9@byu.net>
2150 Fix a bug in how the LS_COLORS ln=target attribute is handled.
2151 * src/ls.c (gobble_file): Use "stat" (not lstat) also when the
2152 ln=target attribute applies. Reported by Kirk Kelsey.
2154 2007-04-02 Jim Meyering <jim@meyering.net>
2156 * src/copy.c (copy_reg): Initialize local "con", before calling
2157 getfscreatecon, in case that function (or its inline stub) does
2160 2007-04-01 Paul Eggert <eggert@cs.ucla.edu>
2162 * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
2163 ls -x DIR would sometimes output the wrong string in place of the
2165 * NEWS: Mention the bug fix.
2166 * tests/ls/x-option: New file.
2167 * tests/ls/Makefile.am (TESTS): Add x-option.
2169 gnulib moved md5 and sha1 modules into a new crypt/ directory; adapt
2170 * bootstrap.conf (gnulib_modules): Adjust to gnulib's renaming of
2171 md5 to crypt/md5 and sha1 to crypt/sha1.
2173 2007-03-30 Jim Meyering <jim@meyering.net>
2175 * NEWS: Mention these SELinux changes.
2177 * ChangeLog-selinux: Remove file.
2178 Move its contents into this file, removing old dates.
2180 * src/runcon.c (main): Don't reorder arguments. Reported by
2181 Ulrich Drepper in <http://bugzilla.redhat.com/232652>.
2182 * tests/misc/runcon-no-reorder: New file. Test for the above.
2183 * tests/misc/Makefile.am (TESTS): Add runcon-no-reorder.
2185 * src/runcon.c (main): Remove "." at end of a diagnostic.
2187 * src/runcon.c: New program.
2188 * src/Makefile.am (bin_PROGRAMS): Add runcon.
2189 (runcon_LDADD): Define.
2190 * README: Add runcon to the list of programs.
2191 * AUTHORS: Add this: runcon: Russell Coker
2192 * tests/help-version: Add runcon as an exception.
2193 * man/Makefile.am (dist_man_MANS): Add runcon.1.
2194 (runcon.1): New dependency.
2196 mkfifo, mknod: Accept new "-Z, --context=C" option.
2197 * src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>.
2199 * src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
2201 mkdir: Accept new "-Z, --context=C" option.
2202 * src/mkdir.c: Include <selinux/selinux.h>.
2204 * src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
2206 * tests/cp/cp-a-selinux: New file. Test for the bug reported in
2207 <http://bugzilla.redhat.com/219900>.
2208 * tests/cp/Makefile.am (TESTS): Add cp-a-selinux.
2210 * tests/selinux: New file.
2211 * tests/Makefile.am (EXTRA_DIST): Add selinux.
2212 * tests/misc/selinux: Source the new script, rather than open coding it.
2214 Change how "cp -a" and "cp --preserve=context" work with SELinux.
2215 Now, cp -a attempts to preserve context, but failure to do so does
2216 not change cp's exit status. However "cp --preserve=context" is
2217 similar, but failure *does* cause cp to exit with nonzero status.
2218 * src/copy.h (struct cp_options) [require_preserve_context]: New member.
2219 * src/copy.c (copy_reg, copy_internal): Implement the above.
2220 * src/mv.c (cp_option_init): Initialize the new member.
2221 * src/install.c (cp_option_init): Likewise.
2222 * src/cp.c (cp_option_init): Likewise.
2223 (decode_preserve_arg): Set it or reset it.
2225 cp, mv, install: add SELinux support, but unlike with the Red Hat
2226 patch, mv and cp do not provide the "-Z context" option.
2227 * src/copy.c: Include <selinux/selinux.h>.
2228 (restore_default_fscreatecon): New function.
2229 (copy_reg): Make cp --preserve=context work for existing destination.
2230 (copy_internal): Likewise for new destinations.
2231 * src/copy.h (cp_options) [preserve_security_context]: New member.
2232 * src/cp.c: Include <selinux/selinux.h>.
2233 (selinux_enabled): New global.
2234 (usage): Mention new --preserve=context option.
2235 (PRESERVE_CONTEXT): Define/use.
2236 (decode_preserve_arg): Handle PRESERVE_CONTEXT.
2237 (main): Remove an obsolete comment.
2238 If --preserve=context is specified on a system without SELinux
2239 enabled, give a diagnostic and fail.
2240 * src/mv.c: Include <selinux/selinux.h>.
2241 Set x->preserve_security_context if SELinux is enabled.
2242 * src/install.c: Accept new "-Z, --context=C" option.
2243 Accept --preserve-context option (but not -P option).
2244 Accept alternate spelling: --preserve_context, for now.
2245 Include <selinux/selinux.h> and "quotearg.h".
2246 (selinux_enabled, use_default_selinux_context): New globals.
2247 (PRESERVE_CONTEXT_OPTION): Define.
2248 (cp_option_init): Default: do not preserve security context.
2249 (setdefaultfilecon): New function.
2250 (main): Honor new options.
2251 * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD):
2253 * src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.
2255 * tests/misc/selinux [VERBOSE]: Print version info for each
2256 of the tested tools, not just ls.
2258 * src/c99-to-c89.diff: Remove the ls.c patch, now that I've
2259 temporarily removed the offending c99'ism.
2261 * src/chcon.c (usage): Split a string literal that was longer than 509.
2263 * src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.
2264 Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
2266 * src/c99-to-c89.diff: Adjust offsets.
2268 * AUTHORS: Add chcon.
2270 * src/c99-to-c89.diff: Remove trailing blanks.
2272 * src/chcon.c: Don't include "dirname.h". system.h already includes it.
2274 * gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.
2276 * src/c99-to-c89.diff: Handle a new c99'ism in ls.c.
2278 * src/id.c (main): Tweak id -Z diagnostic.
2280 id: Add SELinux support: -Z option.
2281 * src/id.c (main): Apply patches from Fedora, with these changes:
2282 Remove #ifdef WITH_SELINUX.
2283 Use error (EXIT_FAILURE, not fprintf+exit(1).
2284 * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
2286 stat: Add support for SELinux in the form of a %C format directive.
2287 * src/stat.c (follow_links): Make this variable file-global.
2288 (out_file_context): New function.
2289 (print_statfs): Honor %C.
2290 (print_stat): Honor %C.
2291 (do_stat): Remove follow_links parameter.
2292 (usage): Document the two %C directives.
2293 (main): Accept -Z (though it's a no-op).
2294 * src/Makefile.am (stat_LDADD): Define.
2296 ls: Add support for SELinux and a slightly modified -Z option.
2297 I started with the patches from Red Hat.
2298 The entries below tell how the code evolved.
2300 * src/ls.c (print_long_format, print_file_name_and_frills): When
2301 there is no security context (due to getfilecon/lgetfilecon failing
2302 with e.g. ENOTSUP), print it as "?", not "".
2303 * src/ls.c (print_file_name_and_frills): Make -Z work without -l.
2304 (length_of_file_name_and_frills): Likewise.
2306 * src/ls.c: Remove the --lcontext and --scontext options.
2307 Change the way -Z, --context work so that it no longer implies -l.
2308 Thus, -Z -l will work like -lcontext and -Z without -l will work
2311 Adjust tests to reflect new 'ls -l' syntax -- affects only
2312 systems with SELinux when operating on a file with no ACL.
2313 These tests assumed that everything before the first space on
2314 each line is the 10-byte mode string. But there may also be a "+"
2315 in the 11th column, just before the space. However, note that this
2316 is not new. The same thing would have happened even without the
2317 change below, when listing a file with an ACL.
2318 * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm:
2319 * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod:
2320 * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm:
2322 Don't make compilation depend on USE_ACL. An SELinux security
2323 context counts as an "alternate access control method", so ls
2324 must output a "+" for each file with a security context.
2325 * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally.
2326 (FILE_HAS_ACL): Remove macro definition. Use f->have_acl directly.
2327 (gobble_file): Record whether a file has a security context, and
2328 update the condition used to determine whether to print the "+".
2329 (gobble_file): Call getfilecon/lgetfilecon also when
2330 format == long_format, so that we get the "+".
2332 * src/ls.c (gobble_file): Add a comment explaining why (with a
2333 security context option) ls doesn't exit nonzero due to e.g.,
2334 getfilecon failing with errno == ENOTSUP.
2336 * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due
2339 * src/ls.c (gobble_file): Factor out three small blocks using
2340 getfilecon and lgetfilecon.
2341 Don't ignore return value from getfilecon and lgetfilecon.
2343 * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C
2345 (print_scontext_format): Likewise.
2346 (print_scontext): Declare to be "bool", not int. Adjust uses.
2348 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX).
2350 * tests/misc/chcon: New file.
2351 * tests/misc/chcon-fail: New file.
2352 * tests/Makefile.am (check-root): Run new, root-only misc/chcon test.
2353 * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail.
2355 * tests/misc/Makefile.am (TESTS): Add selinux.
2356 * tests/misc/selinux: New file.
2357 * tests/help-version: Skip chcon.
2358 * man/chcon.x: New file.
2359 * man/Makefile.am: Build chcon.1.
2362 * gl/modules/selinux-at: New module. Check for libselinux and set
2363 LIB_SELINUX here, unconditionally, rather than depending on
2364 the configure-time --enable-selinux option.
2365 * gl/modules/selinux-h: New module.
2366 * bootstrap.conf (gnulib_modules): Add selinux-at.
2367 * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files.
2368 * gl/lib/se-selinux_.h: New file.
2369 * gl/lib/se-context_.h: New file.
2370 * gl/m4/selinux-selinux-h.m4: New file.
2371 * gl/m4/selinux-context-h.m4: New file.
2372 * src/Makefile.am (bin_PROGRAMS): Add chcon.
2373 (chcon_LDADD): Define.
2374 * README: Add chcon to the list of programs.
2375 * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
2377 2007-03-29 Jim Meyering <jim@meyering.net>
2379 * .vg-suppressions: Add libc-getpwuid-leak.
2381 2007-03-28 Jim Meyering <jim@meyering.net>
2383 Help translators include translation team's web or email address.
2384 * src/system.h (emit_bug_reporting_address): New function.
2385 * src/base64.c: Use it rather than a literal printf.
2386 * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
2387 * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
2388 * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
2389 * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
2390 * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
2391 * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
2392 * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
2393 * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
2394 * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
2395 * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
2396 * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
2397 * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
2398 * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
2399 * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
2400 * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
2401 * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
2402 * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
2403 * src/who.c, src/whoami.c, src/yes.c: Likewise.
2405 * src/stty.c: Don't include "vasprintf.h", now that its
2406 declarations are guaranteed to be in gnulib's stdio.h.
2407 * src/who.c: Likewise.
2409 2007-03-27 Jim Meyering <jim@meyering.net>
2411 * README: Use "install", not "ginstall" in the list of program names.
2412 * src/Makefile.am (check-README): Substitute s/ginstall/install/.
2414 2007-03-25 Jim Meyering <jim@meyering.net>
2416 * src/c99-to-c89.diff: Regenerate.
2418 2007-03-25 Paul Eggert <eggert@cs.ucla.edu>
2420 Avoid the need for euidaccess and/or lstat on every directory entry
2421 with 'rm -r dir' (without -f), if we are root, or if we are removing
2422 a directory tree that is full of symbolic links.
2423 * bootstrap.conf (gnulib_modules): Add write-any-file.
2424 * src/copy.c: Include write-any-file.h.
2425 (UNWRITABLE): Remove macro, replacing with....
2426 (writable_destination): New function, which uses can_write_any_file
2427 to avoid the need for euidaccess when we are privileged.
2428 (overwrite_prompt, abandon_move): Use it.
2429 * src/remove.c: Include write-any-file.h.
2430 (D_TYPE): New macro.
2431 (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros.
2432 (write_protected_non_symlink): Don't bother to stat if we can write
2434 (prompt): New arg PDIRENT_TYPE. All callers changed.
2435 Use readdir dirent type to avoid the need for 'lstat' on each directory
2436 entry in cases like 'rm -r dir', if we are root, or if the tree is
2437 full of symbolic links.
2438 (DT_IS_KNOWN, DT_MUST_BE): Remove.
2439 (remove_entry): New arg DIRENT_TYPE_ARG. All callers changed.
2441 2007-03-24 Jim Meyering <jim@meyering.net>
2443 If strace malfunctions, skip the test rather than failing it.
2444 * tests/mv/atomic: Required on a mips-unknown-linux-gnu system
2445 running the aging linux-2.4.27-mipscvs-20040814.
2447 2007-03-23 Paul Eggert <eggert@cs.ucla.edu>
2449 * src/pathchk.c: Don't include euidaccess.h, as we don't call
2452 2007-03-23 Jim Meyering <jim@meyering.net>
2454 * README-package-renamed-to-coreutils: Add a URL for the FAQ,
2455 and a couple more archive links.
2457 2007-03-22 Jim Meyering <jim@meyering.net>
2459 Post-release version change.
2460 * NEWS: Add a line for 6.9+.
2461 * configure.ac (AC_INIT): Set new version string.
2464 * NEWS: Record release date and new version number.
2465 * configure.ac (AC_INIT): New version number.
2467 * tests/mv/hard-3: Correct the preceding change: $3 -> $2.
2469 2007-03-22 Paul Eggert <eggert@cs.ucla.edu>
2471 Improve a test script.
2472 * tests/mv/hard-3: Check for 'ls' failure, too.
2473 Generate more-useful debugging output when 'ls' fails.
2475 2007-03-21 Jim Meyering <jim@meyering.net>
2477 Fix a test script not to claim an ext2 file system is of type xfs.
2478 * tests/du/slink: When using df --local and df --type=TYPE,
2479 test only the exit code. Don't bother with stdout.
2480 Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
2482 * gl/lib/savewd.c: Remove this file, since the savewd_save change
2483 is now in gnulib. The other wasn't useful.
2485 2007-03-20 Jim Meyering <jim@meyering.net>
2487 * gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
2489 Skip part of this test when "." is not a local file system.
2490 * tests/install/basic-1: Otherwise, it would fail on some NFS
2492 * tests/mkdir/p-3: Likewise.
2494 2007-03-19 Paul Eggert <eggert@cs.ucla.edu>
2496 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
2497 Add $(LIB_ACL_TRIVIAL).
2499 2007-03-18 Jim Meyering <jim@meyering.net>
2501 Fix a generic NFS-related test failure.
2502 * tests/mkdir/p-3: When setting up an unreadable "." in an
2503 inaccessible parent, make the parent inaccessible *after* making "."
2504 unreadable. Otherwise, running "chmod a-r ." in an already-
2505 inaccessible parent would fail on NFS with "Stale NFS file handle".
2507 Fix a bug in how pr -m -s works.
2508 * NEWS: Describe how the fix affects pr.
2509 * src/pr.c (init_parameters): The --merge (-m) option does
2510 not imply --expand-tabs (-e), so don't set "untabify_input".
2511 Reported by Wis Macomson.
2512 * tests/misc/pr: New file. Test for the above fix.
2513 * tests/misc/Makefile.am (TESTS): Add pr.
2516 2007-03-17 Jim Meyering <jim@meyering.net>
2518 Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
2519 * bootstrap: Put ""s around use of $build_aux, in case
2520 someone uses a name containing shell meta-characters.
2521 Reported by Alfred M. Szmidt.
2522 * tests/misc/tty-eof: Add shuf to the list of tested commands.
2524 Avoid test failure on NFS-mounted Solaris ZFS file system.
2525 * tests/du/basic: Skip a test if "." is on a non-local file system.
2527 Avoid an obscure build failure, prefer waitpid over wait.
2528 * src/install.c (strip): Use waitpid, not wait. It's equivalent,
2529 but feels less obsolescent.
2531 * bootstrap: Don't use \> in grep regexp. For HP-UX.
2533 2007-03-16 Jim Meyering <jim@meyering.net>
2535 Begin adding support for Solaris ZFS (4 entries per trivial ACL)
2536 * gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
2537 (file_has_acl, copy_acl): Use it, rather than enumerating errno values.
2538 (is_trivial_acl): New function. Incomplete, for now.
2539 (file_has_acl, copy_acl): Use the new function, rather than
2540 counting the number of entries in an ACL.
2542 * bootstrap: Update from gnulib.
2544 * .x-sc_prohibit_atoi_atof: Add TODO here, too.
2546 2007-03-16 Paul Eggert <eggert@cs.ucla.edu>
2548 * src/copy.c: Include filemode.h.
2549 (overwrite_prompt): Say "try to overwrite", not "overwrite", to
2550 make it clearer that the attempt may fail. Problem reported by
2552 http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
2553 Output symbolic mode as well as numeric.
2554 * tests/mv/i-2 (fail): Adjust to new prompt format.
2556 2007-03-15 Jim Meyering <jim@meyering.net>
2558 Enforce policy: don't use *scanf functions.
2559 * Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
2560 * .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
2561 * TODO: note that stty.c needs this small clean-up.
2563 2007-03-13 Jim Meyering <jim@meyering.net>
2565 Prepare to work on ACL-related failure when using Solaris ZFS.
2566 * gl/lib/acl.c: New file, copied from gnulib.
2568 Work around a failing test due to an NFS-based race condition.
2569 * tests/cp/sparse: Accept a report that the copy is *smaller*.
2571 2007-03-12 Jim Meyering <jim@meyering.net>
2573 Make bootstrap.conf a tiny bit more generic.
2574 * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
2575 files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
2577 2007-03-10 Jim Meyering <jim@meyering.net>
2579 Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
2580 * gl/lib/savewd.c: Copy this file from gnulib, then change
2581 "errno != EACCES" to (errno != EACCES && errno != ESTALE).
2582 The symptom was this failure in tests/install/basic-1:
2583 ginstall: cannot create directory `rel/a': Stale NFS file handle
2585 The preceding change solved part of the problem. Now ginstall fails.
2586 * tests/install/basic-1: Temporarily, don't redirect ginstall's
2587 stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
2590 * tests/install/basic-1: When setting up an unreadable "." in an
2591 inaccessible parent, make the parent inaccessible *after* making "."
2592 unreadable. Otherwise, running "chmod a-r ." in an already-
2593 inaccessible parent would fail on NFS with "Stale NFS file handle".
2594 Reported by Bob Proulx.
2596 * Makefile.maint (po-check): Exclude c99-to-c89.diff.
2598 2007-03-09 Jim Meyering <jim@meyering.net>
2600 Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
2601 * tests/chgrp/basic: Don't let failure by chgrp to set the
2602 group of a symlink make this test fail. Do give a diagnostic.
2603 In the chgrp-no-change-ctime test, add darwin7.9.0 as another
2604 known-failing system.
2605 When failing on some other system, print $host_triplet, too.
2606 Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
2607 Reported by Peter Fales.
2609 2007-03-08 Jim Meyering <jim@meyering.net>
2611 * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
2613 2007-03-08 Paul Eggert <eggert@cs.ucla.edu>
2615 rm without -f: give a better diagnostic when euidaccess fails.
2616 * src/remove.c (write_protected_non_symlink): Return int, not bool,
2617 so that we can indicate failure too (as a postive error number).
2618 (prompt): If write_protected_non_symlink fails, report that error
2619 number and fail rather than charging ahead and removing the dubious
2620 entry. Redo the logic of printing a diagnostic so that we need to
2621 invoke quote (full_filename (...)) only once. More details at:
2622 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
2624 2007-03-08 Jim Meyering <jim@meyering.net>
2626 Generalize a few more cvs-isms.
2627 * bootstrap (checkout_only_file): Rename from CVS_only_file.
2628 Change comments and diagnostics not to say "CVS".
2630 * bootstrap: Run libtool, if necessary.
2632 Make bootstrap a little more general.
2633 * bootstrap (build_aux): Factor out/use this definition.
2634 Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
2635 (insert_sorted_if_absent): Move function definition "up", to
2636 precede new first use.
2637 If $build_aux/ doesn't exist initially, create it, and
2640 2007-03-03 Andrew Church <achurch@achurch.org> (tiny change)
2641 Paul Eggert <eggert@cs.ucla.edu>
2643 Fix a bug: cp -x would fail to set mount point permissions.
2644 * NEWS: mention cp -x bug fix
2645 * src/copy.c (copy_internal): Don't return immediately after
2646 copying a mount point that we do not intend to recurse under.
2647 Based on a patch by Andrew Church.
2649 2007-03-03 Jim Meyering <jim@meyering.net>
2651 pwd-unreadable-parent: Skip test on ia64/Linux, too.
2652 * tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
2653 Reported by Bob Proulx.
2655 2007-03-02 Jim Meyering <jim@meyering.net>
2657 pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
2658 * tests/misc/pwd-unreadable-parent: Rather than trying to decide
2659 whether this test has a chance of succeeding, run it only when
2660 $(host_os) is linux-gnu. It was failing on powerpc-apple-darwin8.8.0
2661 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
2663 * tests/misc/pwd-long: Also allow "+" in $PWD.
2665 Remove another coreutils-ism. Formatting cleanup.
2666 * Makefile.maint (my-distcheck): Update an outdated comment.
2667 (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
2668 (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
2670 2007-03-01 Jim Meyering <jim@meyering.net>
2672 * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
2673 (my-distcheck): Use the new variable, instead of too-long literal.
2675 Make "make syntax-check" rules less coreutils-specific.
2676 * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
2677 (sc_cast_of_alloca_return_value): Likewise.
2678 (sc_root_tests): Do nothing if there is no check-root target
2679 in tests/Makefile.am.
2681 Run the writable-files check only for release-building targets.
2682 * Makefile.maint (local-checks-available): Remove writable-files.
2683 (alpha beta major): Put it here, instead.
2685 "make syntax-check" now runs only Makefile.cfg-selected tests
2686 * Makefile.maint (syntax-check-rules): Hoist this definition so that
2687 it precedes the indirect use in the definition of $(local-check).
2688 (local-check): Use :=, not just "=".
2689 (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
2691 2007-02-28 Bruno Haible <bruno@clisp.org>
2693 * bootstrap.conf (gnulib_modules): Replace xreadlink with
2694 xreadlink-with-size. Add xreadlink.
2695 * src/copy.c (copy_internal): Update.
2696 * src/ls.c (is_directory): Update.
2697 * src/stat.c (print_stat): Update.
2698 * src/readlink.c (main): Use the one-argument xreadlink function.
2700 2007-02-28 Paul Eggert <eggert@cs.ucla.edu>
2702 * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
2703 Problem reported by Philip Rowlands in
2704 <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
2706 2007-02-28 Jim Meyering <jim@meyering.net>
2708 * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
2709 list of exceptions, for the "make distcheck" sc_file_system rule.
2711 * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
2713 2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
2715 Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
2716 * NEWS: With -P, the default block size and output format is not
2717 affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
2718 * src/df.c (main): Implement this.
2720 2007-02-27 Jim Meyering <jim@meyering.net>
2722 Add a test for the above.
2723 * tests/misc/df-P: New file.
2724 * tests/misc/Makefile.am (TESTS): Add df-P.
2726 2007-02-25 Jim Meyering <jim@meyering.net>
2728 * Makefile.maint (announcement): Adjust so that it works with
2729 announce-gen's --gnulib-snapshot-time-stamp option.
2730 Indent one of the command lines using TAB, not 8 spaces.
2732 Post-release version change.
2733 * NEWS: Add a line for 6.8+.
2734 * configure.ac (AC_INIT): Set new version string.
2736 2007-02-24 Jim Meyering <jim@meyering.net>
2739 * NEWS: Record release date and new version number.
2740 * configure.ac (AC_INIT): New version number.
2742 Don't skip this test on new-enough Linux/GNU systems.
2743 * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
2744 rather than for __GETCWD_PREFIX in config.h (the latter is no
2745 longer defined, ever, due to gnulib changes).
2746 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
2748 Remove the "gnits" option; it prohibits my using "+" as a version
2749 string suffix, and all it does (beyond the default "gnu" option)
2750 is to _require_ the THANKS file.
2751 * configure.ac (AM_INIT_AUTOMAKE): Remove it.
2753 Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
2754 * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
2755 * tests/chown/Makefile.am, tests/cp/Makefile.am:
2756 * tests/du/Makefile.am, tests/expr/Makefile.am:
2757 * tests/factor/Makefile.am, tests/general/Makefile.am:
2758 * tests/install/Makefile.am, tests/ln/Makefile.am:
2759 * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
2760 * tests/mv/Makefile.am, tests/readlink/Makefile.am:
2761 * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
2762 * tests/seq/Makefile.am, tests/stty/Makefile.am:
2763 * tests/tee/Makefile.am, tests/touch/Makefile.am:
2765 * README: Document the OSF/1 4.0d build failure and work-around.
2766 Reported by Bruno Haible.
2768 * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
2770 * configure.ac: Use 6.7+, not 6.7-dirty.
2772 2007-02-24 Paul Eggert <eggert@cs.ucla.edu>
2774 * NEWS: sort no longer compresses temporaries by default.
2775 * bootstrap.conf: Remove findprog.
2776 * doc/coreutils.texi (sort invocation): The default is to not
2777 compress. Don't treat "" specially.
2778 * src/sort.c: Don't include findprog.h.
2779 (create_temp): Compress only if the user specified --compress-program.
2780 * tests/misc/sort-compress: Adjusts tests to match new behavior.
2782 2007-02-24 Jim Meyering <jim@meyering.net>
2784 Avoid a shell syntax error, when building with an inadequate Perl.
2785 * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
2786 it can expand to "/.../missing perl".
2788 * man/Makefile.am (.x.1): Warn when unable to update a man page.
2789 Suggestion from Bruno Haible.
2791 2007-02-23 Bruno Haible <bruno@clisp.org>
2793 Handle better the combination of old Perl and a pre-c99 compiler.
2794 * man/Makefile.am (.x.1): If the autoconf test has determined that
2795 perl is missing or not a sufficient version, do nothing.
2797 * tests/readlink/can-e: Put the closing double-quote at the end of a
2798 backquoted word, not in the middle. Works around a bug in sh on
2800 * tests/readlink/can-f: Likewise.
2801 * tests/readlink/can-m: Likewise.
2803 * tests/du/slink: Skip the test if executing on an nfsv3 file system.
2804 This avoids a test failure at least on OSF/1 4.0d.
2806 2007-02-23 Jim Meyering <jim@meyering.net>
2808 * src/date.c (usage): Split a diagnostic that had grown to be
2809 longer than the C89 maximum of 509 bytes.
2811 2007-02-23 Ed Santiago <ed@edsantiago.com>
2813 * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
2814 for a separator. Include sample RFC 2822 and 3339 output.
2816 2007-02-23 Jim Meyering <jim@meyering.net>
2818 With -Dlint, make shuf free all heap-allocated storage.
2819 * src/shuf.c (main): Move declaration of input_lines to
2820 function scope, and initialize to NULL, so we can free it.
2821 [lint]: Free all malloc'd memory.
2822 * tests/misc/shuf: Also test shuf's -e and -i options.
2824 2007-02-22 Jim Meyering <jim@meyering.net>
2826 Merge in a change from some other incarnation of this file (gzip?)
2827 * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
2829 Adjust preceding change not to perform an unaligned access.
2830 * src/copy.c (copy_reg): Undo previous change. Instead, make
2831 it clearer that we're using a single-byte sentinel, and
2832 [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
2833 Reported by Andreas Schwab.
2835 Placate valgrind, wrt ./cp --sparse=always
2836 * src/copy.c (copy_reg): Place the sentinel by setting a
2837 full word's worth of bits, not just a single byte's worth.
2838 This avoids a harmless (but distracting) case of memory being
2841 2007-02-21 Paul Eggert <eggert@cs.ucla.edu>
2843 Honor dd's noatime flag if possible, even if not supported on build fs
2844 * doc/coreutils.texi (dd invocation): Warn that noatime might not be
2846 * src/dd.c (flags, usage): Look at O_NOATIME, not
2847 HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
2848 flag, so that dd attempts O_NOATIME even if the build file system
2849 does not support it. Problem reported by Jim Meyering today in
2851 * tests/dd/misc: Generate a warning, not a failure, if noatime
2854 2007-02-21 Jim Meyering <jim@meyering.net>
2856 * tests/misc/date: Remove vestigial use of Data::Dumper.
2858 2007-02-20 Paul Eggert <eggert@cs.ucla.edu>
2860 * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
2861 about out-of-range initializer with Sun C 5.8.
2863 2007-02-20 Jim Meyering <jim@meyering.net>
2865 * bootstrap (CVS_only_file): Use README-hacking.
2867 Now that we use GIT, not cvs, rename README-cvs.
2868 * README-hacking: Renamed from...
2869 Update to reflect that we now use git.
2871 * README-cvs: ...this.
2873 * src/env.c (main): When invoked with no arguments (i.e. when printing
2874 the environment), use a local variable to iterate through the global
2875 "environ" array, rather than "environ" itself. This is solely to
2876 avoid changing the environment for an LD_PRELOAD-substituted "puts"
2877 or "exit" function. Tiny patch by Harvey Eneman. See
2878 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
2881 * bootstrap: Move definitions of temporary directory names and the
2882 new bt_regex "up" to precede all uses, so it's clearer what their
2883 scope is. Also, use [.], rather than \\., since the former works
2886 * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
2887 Based on the bison 2007-02-19 change by Joel E. Denny.
2889 2007-02-19 Paul Eggert <eggert@cs.ucla.edu>
2891 * NEWS: sort now uses a --compress-program option rather than
2892 an environment variable.
2893 * doc/coreutils.texi (sort invocation): Document this.
2894 * src/sort.c (usage): Likewise.
2895 (COMPRESS_PROGRAM_OPTION): New const.
2896 (long_options, create_temp, main): Support new option.
2897 * tests/misc/sort-compress: Test it.
2899 2007-02-19 Jim Meyering <jim@meyering.net>
2901 * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
2903 2007-02-18 Jim Meyering <jim@meyering.net>
2905 * src/system.h: Don't include exit.h, now that it's subsumed
2906 by the gnulib-generated stdlib.h.
2908 * tests/rm/fail-eacces: Skip this test when running as root.
2909 Reported by Matthew Woehlke.
2911 * bootstrap: Use "._bootmp" as the temporary directory name,
2912 not ".#bootmp". The latter's "#" caused trouble with the new,
2913 gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
2915 2007-02-14 Paul Eggert <eggert@cs.ucla.edu>
2917 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
2918 * src/dircolors.c: Include c-strcase.h.
2919 (dc_parse_stream): Use c_strcasecmp rather than
2920 strcasecmp to avoid unreliable results in locales like Turkish
2921 where strcasecmp is incompatible with the C locale.
2923 2007-02-13 Jim Meyering <jim@meyering.net>
2925 Also check for and print stderr output, in case a program fails.
2926 * tests/misc/tty-eof: Occasionally (not reproducible), this
2927 test would fail, with one or more programs exiting nonzero, e.g.,
2928 tty-eof: sha224sum exited with status 1 (expected 0)
2929 Now, maybe we'll get a clue, the next time that happens.
2931 2007-02-12 Jim Meyering <jim@meyering.net>
2933 * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
2935 * tests/misc/pwd-unreadable-parent: Skip the test if we're
2936 definitely using the replacement.
2937 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
2939 2007-02-10 Jim Meyering <jim@meyering.net>
2941 Remove excess leading spaces that would make help2man misbehave.
2942 * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
2943 * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
2944 * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
2945 * src/date.c (usage): Use two spaces after each optional flag, not one.
2946 Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
2948 * Makefile.maint (longopt_re): Relax the regexp, making square
2949 brackets optional, so it matches the newly reported violations, too.
2951 * src/csplit.c (usage): Use two spaces (not one) to separate
2952 each option string from its description, so help2man formats
2953 the derived man page properly. Reported by Thomas Huriaux in
2954 <http://bugs.debian.org/410407>.
2955 * src/df.c (usage): Likewise.
2956 * src/du.c (usage): Likewise.
2957 * src/install.c (usage): Likewise.
2958 * src/ls.c (usage): Likewise.
2960 2007-02-03 Jim Meyering <jim@meyering.net>
2962 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
2963 * NEWS: Mention the bug fix.
2964 * tests/misc/pwd-unreadable-parent: New file.
2965 * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
2967 2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
2969 * NEWS: Document fix for cp --preserve=mode.
2970 * src/copy.c (copy_internal): Omit the group- or other-writeable
2971 permissions when creating a directory, to avoid a race condition
2972 if the special mode bits aren't right just after the directory is
2974 * src/cp.c (make_dir_parents_private): Likewise.
2975 * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
2978 * NEWS: Document fix for cp --parents.
2979 * src/cp.c (make_dir_parents_private): Report the error sooner with
2980 "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
2981 creating the directory, DEST/DIR.
2982 * tests/cp/cp-parents: Test for the non-race-condition bug fixed
2983 by the above change.
2985 2007-02-02 Jim Meyering <jim@meyering.net>
2987 * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
2989 * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
2990 consistent, so this can be applied with patch -p0.
2991 Reported by Matthew Woehlke.
2993 Arrange for "make check-root" to run the new root-only test.
2994 * tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux.
2997 * Makefile.maint (patch-check): Use patch with its -p2 option,
2998 since that makes this check slightly more strict.
3000 Use a directory on a loopback device mounted with -o context=...
3001 * tests/cp/cp-a-selinux: Since this test now runs mount and umount,
3002 it is a root-only one.
3004 2007-01-29 Jim Meyering <jim@meyering.net>
3007 * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
3008 determine dev/inode or upon detecting a symlink loop.
3010 * src/ls.c: Rename three global variables.
3011 (cwd_file): Rename from 'files'.
3012 (cwd_n_alloc): Rename from 'nfiles'.
3013 (cwd_n_used): Rename from 'files_index'.
3015 Shave 8 bytes off the size of "struct fileinfo".
3016 * src/ls.c (fileinfo): Put all members of type "bool" together.
3018 2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
3020 Modify "ls" to sort its data faster, using the new gnulib mpsort
3021 module rather than qsort. This is particularly a win in
3022 environments where strcoll is slow, since mpsort typically calls
3023 strcoll less often than qsort does.
3024 * bootstrap.conf (gnulib_modules): Add mpsort.
3025 * src/ls.c: Include mpsort.h.
3026 (sorted_file, sorted_file_alloc): New vars, for a new vector of
3027 pointers to the file info, for speed.
3028 (clear_files, extract_dirs_from_files, sort_files, print_current_files):
3029 (print_many_per_line, print_horizontal, print_with_commas):
3030 (calculate_columns): Set and use new vector.
3031 (initialize_ordering_vector): New function.
3033 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3035 Adjust to today's change to gnulib, which added a module for
3036 string.h to replace the little include files like strcase.h.
3037 * src/dircolors.c: Don't include strcase.h.
3038 * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
3040 2007-01-26 Jim Meyering <jim@meyering.net>
3042 * src/dd.c (advance_input_after_read_error): Change diagnostic to
3043 say "invalid file offset" rather than "screwy file offset".
3045 * .x-sc_cast_of_argument_to_free: Remove this file.
3046 * Makefile.am (EXTRA_DIST): Likewise.
3048 2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
3050 * src/sort.c (create_temp): Remove superfluous access-X_OK
3051 check. find_in_path does this for us.
3053 2007-01-24 Jim Meyering <jim@meyering.net>
3055 Remove usually-skipped test.
3056 * tests/cp/open-perm-race: Remove this file. It is subsumed
3057 by parent-perm-race.
3058 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
3059 * tests/sort/Makefile.am: Regenerate.
3061 Pass "make distcheck" again.
3062 * src/sort.c (usage): Split a diagnostic that had grown to be
3063 longer than the C89 maximum of 509 bytes.
3064 * .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
3065 FIXME: this is just temporary, while we wait to remove the offending
3066 access-calling code.
3067 * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
3068 * Makefile.maint (sc_cast_of_argument_to_free): Use the
3069 canonical, $$($(CVS_LIST_EXCEPT)).
3070 * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
3072 2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
3074 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
3075 like it will be approved. Also add --check=quiet, --check=silent
3076 as long aliases, and --check=diagnose-first as an alias for -c.
3077 * doc/coreutils.texi (sort invocation): Document this.
3078 Also, mention that sort -c can take at most one file.
3079 * src/sort.c: Implement this.
3081 (usage): Document the change.
3082 (CHECK_OPTION): New constant.
3083 (long_options): --check now takes an optional argument, and is now
3084 treated differently from 'c'.
3085 (check_args, check_types): New constant arrays.
3086 (check): New arg CHECKONLY, which suppresses diagnostic if -C.
3087 (main): Parse the new options.
3088 * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
3091 2007-01-24 Jim Meyering <jim@meyering.net>
3094 * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
3095 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
3097 Don't depend on "which".
3098 * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
3099 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
3101 2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
3103 Test sort compression.
3104 * tests/misc/Makefile.am: Add the test.
3105 * tests/misc/sort-compress: New file containing the tests.
3107 2007-01-24 Jim Meyering <jim@meyering.net>
3109 * NEWS: sort temp file compression: tweak wording.
3110 * src/sort.c (struct sortfile) [name]: Declare member to be const.
3112 2007-01-21 Jim Meyering <jim@meyering.net>
3114 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
3115 In pipe_fork callers, use these named constants, not "2" and "8".
3116 (proctab, nprocs): Declare to be "static".
3117 (pipe_fork) [lint]: Initialize local, pid,
3118 to avoid unwarranted may-be-used-uninitialized warning.
3119 (create_temp): Use the active voice. Describe parameters, too.
3121 2007-01-21 James Youngman <jay@gnu.org>
3123 Centralize all the uses of sigprocmask(). Don't restore an invalid
3125 * src/sort.c (enter_cs, leave_cs): New functions for protecting
3126 code sequences against signal delivery.
3127 * (exit_cleanup): Use enter_cs and leave_cs instead of
3128 calling sigprocmask directly.
3129 (create_temp_file, pipe_fork, zaptemp): Likewise
3131 2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
3133 Add compression of temp files to sort.
3134 * NEWS: Mention this.
3135 * bootstrap.conf: Import findprog.
3136 * configure.ac: Add AC_FUNC_FORK.
3137 * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
3139 * src/sort.c (compress_program): New global, holds the name of the
3140 external compression program.
3141 (struct sortfile): New type used by mergepfs and friends instead
3142 of filenames to hold PIDs of compressor processes.
3143 (proctab): New global, holds compressor PIDs on which to wait.
3144 (enum procstate, struct procnode): New types used by proctab.
3145 (proctab_hasher, proctab_comparator): New functions for proctab.
3146 (nprocs): New global, number of forked but unreaped children.
3147 (reap, reap_some): New function, wait for/cleanup forked processes.
3148 (register_proc, update_proc, wait_proc): New functions for adding,
3149 modifying and removing proctab entries.
3150 (create_temp_file): Change parameter type to pointer to file
3151 descriptor, and return type to pointer to struct tempnode.
3152 (dup2_or_die): New function used in create_temp and open_temp.
3153 (pipe_fork): New function, creates a pipe and child process.
3154 (create_temp): Creates a temp file and possibly a compression
3155 program to which we filter output.
3156 (open_temp): Opens a compressed temp file and creates a
3157 decompression process through which to filter the input.
3158 (mergefps): Change FILES parameter type to struct sortfile array
3159 and update access accordingly. Use open_temp and reap_some.
3160 (avoid_trashing_input, merge): Change FILES parameter like
3161 mergefps and call create_temp instead of create_temp_file.
3162 (sort): Call create_temp instead of create_temp_file.
3164 (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
3166 The idea of compressing sorts temporary files was first
3167 suggested/implemented by Jay Soffian in 1998, and again
3168 by Charles Randall in 2001.
3170 2007-01-20 Jim Meyering <jim@meyering.net>
3172 * tests/misc/pwd-long: Work properly even when run from the
3173 wrong one of two or more bind-mounted sibling directories.
3174 Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
3176 2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
3178 Standardize on list of signals when an app catches signals.
3179 * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
3180 SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
3181 * src/ls.c (main): Likewise (except SIGPIPE was already caught).
3182 Note that ls.c is special, as it also catches SIGTSTP.
3183 * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
3184 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
3186 2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
3187 and Paul Eggert <eggert@cs.ucla.edu>
3189 * src/sort.c (cleanup): Clear temphead at the end.
3190 (exit_cleanup): New function.
3191 (main): Don't invoke atexit until we're ready.
3192 Invoke it with exit_cleanup, not with cleanup and close_stdout,
3193 to avoid a race condition with cleanup and signal handling. More
3194 details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
3196 2007-01-18 Jim Meyering <jim@meyering.net>
3198 * src/c99-to-c89.diff: Adjust remove.c offsets.
3200 2007-01-17 Jim Meyering <jim@meyering.net>
3202 Make "rm --interactive=never ..." never prompt.
3203 * NEWS: Mention this.
3204 * src/remove.h (enum rm_interactive): New ternary type.
3205 (struct rm_options) [interactive]: Use it, here -- rather than bool.
3206 * src/remove.c (prompt): Reflect type change.
3207 * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
3208 * src/rm.c (main): Add a FIXME comment for '-d' option.
3209 Adapt to type change of rm_options.interactive.
3211 * tests/rm/i-never: New file. Test for the above fix.
3212 * tests/rm/Makefile.am (TESTS): Add i-never.
3214 2007-01-15 Jim Meyering <jim@meyering.net>
3216 * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
3217 emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
3218 but that's ok, since fts_.h will eventually be renamed.
3220 * src/remove.c (remove_dir): Don't use errno in diagnostic.
3221 Root-only test failure reported by Alex van Hout and Jon Grosshart in
3222 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
3224 * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
3225 s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
3227 2007-01-14 Bruno Haible <bruno@clisp.org>
3229 Enable use of gnulib's new fchdir module.
3230 * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
3231 since we use canonicalize.
3232 (gnulib_modules): Add fchdir.
3233 * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
3235 2007-01-13 Jim Meyering <jim@meyering.net>
3237 * tests/cp/open-perm-race: Remove gdb-based test.
3238 It would run only when compiled with -g, and besides is now
3239 subsumed by file-perm-race.
3240 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
3242 * Transform all Makefile.am files so that when running "make check",
3243 CU_TEST_NAME is set to the name of the test. This is so that when I
3244 run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
3245 on the entire package it is more convenient to map a leak or error
3246 found in a valgrind log file back to the offending test.
3248 (echo tests/Makefile.am.in; find tests -name Makefile.am) \
3249 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
3250 -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
3252 2007-01-11 Jim Meyering <jim@meyering.net>
3254 Avoid a leak in expr's implementation of the ":" (match) operator.
3255 * src/expr.c (docolon): Free the regexp buffer using regfree, rather
3256 than doing it manually, being careful to set fastmap to NULL first.
3257 Free any re_regs.start and .end members, if necessary.
3259 * tests/misc/test-diag: Work also when libc's error function
3260 reports the entire program name ("../../src/test"), rather than
3261 just the final component.
3263 2007-01-10 Jim Meyering <jim@meyering.net>
3265 Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
3266 * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
3267 (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
3268 directory. Non-directory entries lack fts_statp data when using
3269 the FTS_NOSTAT option.
3271 2007-01-07 Jim Meyering <jim@meyering.net>
3273 * tests/sample-test: Update copyright date to 2007.
3274 * Makefile.maint (copyright-check): Also check the copyright date
3275 in tests/sample-test.
3277 2007-01-06 Jim Meyering <jim@meyering.net>
3279 * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
3280 based on examples from G.P. Halkes in
3281 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
3283 2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
3285 * src/fmt.c (copy_rest): Correct prefix handling.
3286 Don't elide a line with the prefix followed by only white space.
3287 (get_line): Move EOF-check to loop-termination condition.
3288 * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
3289 (pfx-2): Remove test; its premise was contrary to the documentation.
3291 2007-01-05 Jim Meyering <jim@meyering.net>
3293 Avoid a used-uninitialized bug for invalid input, i.e., when the size
3294 of the input, not counting newlines, is 1 % 4.
3295 * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
3296 It may be smaller when flushing.
3298 2007-01-05 Mike Frysinger <vapier@gentoo.org>
3300 * src/dircolors.hin: Add a TERM directive for cons25.
3302 2007-01-04 Jim Meyering <jim@meyering.net>
3304 * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
3305 case you don't have convenient access to glibc info documentation.
3307 Use the release year, not the current year.
3308 * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
3309 * src/Makefile.am (RELEASE_YEAR): Define it.
3311 Thanks to a prod from Eric Blake.
3313 Ensure that "group --version" always prints the current year.
3314 * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
3315 * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
3316 Suggestion from Eric Blake.
3318 When decoding, always allow newlines in input, with almost no
3320 * src/base64.c (do_decode): Initialize decode context.
3321 Call base64_decode one more time, after all input is processed.
3322 (usage): When decoding, newlines are always accepted.
3324 * tests/misc/base64: Add a bunch of tests, for the above.
3325 * gl/lib/base64.c: Include <string.h>.
3326 (base64_decode_ctx_init, get_4, decode_4): New functions.
3327 (base64_decode): Efficiently handle interspersed newlines.
3328 (base64_decode_alloc): Update signature.
3329 * gl/lib/base64.h (struct base64_decode_context): Define.
3330 (base64_decode_ctx_init): Add prototype.
3331 (base64_decode, base64_decode_alloc): Update prototypes.
3333 * gl/lib/base64.c: Copied from gnulib.
3334 * gl/lib/base64.h: Likewise.
3336 2007-01-03 Jim Meyering <jim@meyering.net>
3338 * THANKS: Add Evan Hunt.
3340 2007-01-03 Bruno Haible <bruno@clisp.org>
3342 Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
3343 * tests/chown/deref: Apply lang-default.
3344 * tests/misc/split-a: Likewise.
3345 * tests/mv/reply-no: Likewise.
3347 * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
3350 2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
3352 Now, "ls -FRL" always follows symbolic links on Linux.
3353 * NEWS: Mention this bug fix.
3354 * src/ls.c (gobble_file): Fix bug reported by
3355 Nobuyuki Tsuchimura in
3356 http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
3357 where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
3358 * tests/ls/follow-slink: Add a test for this case.
3360 2007-01-01 Jim Meyering <jim@meyering.net>
3362 * tests/rm/fail-eperm: Revert last change. The PATH=... setting
3363 is not honored at least on HP-UX 11.23 systems.
3364 Instead, simply transform the actual output diagnostic.
3365 Test failure reported by Bob Proulx.
3367 2006-12-30 Jim Meyering <jim@meyering.net>
3369 * bootstrap (gnulib_extra_files): Remove announce-gen.
3370 * bootstrap.conf (gnulib_modules): Add it here instead, now that
3373 * tests/misc/base64: Factor a long, repetitive string.
3375 * src/c99-to-c89.diff: Adjust remove.c offsets.
3377 Clean up after the change of 2006-12-28.
3378 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
3379 now that this function never modifies the pointer. Adjust comments
3380 and code accordingly.
3381 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
3382 now that AD_pop_and_chdir no longer does that.
3384 * tests/rm/fail-eperm: Avoid spurious differences (the error function
3385 from latest glibc no longer prints the full program_name): so don't
3386 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
3388 * tests/mv/acl (skip): Skip this test also if the destination
3389 directory, which is on a different file system, lacks ACL support.
3391 * src/copy.c (copy_reg): Rewrite a comment that was rendered
3392 inaccurate by the 2006-10-18 change.
3394 2006-12-28 Jim Meyering <jim@meyering.net>
3396 When moving "up" the hierarchy, be careful to remove a just-emptied
3397 directory before opening ".", to avoid trouble with file system
3398 implementations that cache readdir results at opendir-time.
3399 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
3400 Don't update **DIRP. Don't call fdopendir here.
3401 (remove_dir): Call fdopendir here instead.
3402 Report and patch from Mikulas Patocka:
3403 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
3405 2006-12-27 Jim Meyering <jim@meyering.net>
3407 * src/tail.c (usage): Mention +N for --bytes and --lines.
3408 Suggestion from Evan Hunt.
3410 2006-12-26 Jim Meyering <jim@meyering.net>
3412 * configure.ac: Require autoconf-2.61 and automake-1.10.
3413 Without the former (even with autoconf-2.60), "make distcheck"
3414 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
3415 due to an inttypes.h generated with CFLAGS including -pedantic.
3416 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
3418 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
3419 tag, using the release version number as the message.
3420 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
3422 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
3424 * NEWS: dd bs= operands now silently override later ibs= and obs=,
3426 * src/dd.c (scanargs): Implement it.
3427 * tests/dd/misc (outbytes): Test it.
3428 * doc/coreutils.texi (dd invocation): Specify that bs=N
3429 overrides later ibs and obs, undoing part of the
3430 previous change. (The behavior was wrong.)
3432 2006-12-20 Jim Meyering <jim@meyering.net>
3434 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
3435 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
3436 Don't let a non-directory get by with errno == EPERM, either.
3437 Check the file type directly (using cached stat value), rather
3438 than trying to guess it from errno values.
3439 Karl Berry reported that a cross-partition "mv /etc/issue ~"
3440 failed with the um,... suboptimal diagnostic,
3441 "mv: cannot remove `/etc/issue': Not a directory".
3442 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
3443 * tests/rm/fail-eacces: New file.
3444 * NEWS: Mention that both mv and rm are affected.
3446 "cut -f 2- A B" no longer triggers a double-free bug
3447 * src/cut.c (cut_fields): Set file-scoped global to NULL after
3448 freeing it. This avoids a double-free (and core dump on some systems)
3449 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
3450 James Hunt in <http://bugzilla.redhat.com/220312>.
3451 * NEWS: List this bug fix.
3452 * THANKS: Mention him.
3453 * tests/misc/cut: New file.
3454 * tests/misc/Makefile.am (TESTS): Add cut.
3456 2006-12-15 Jim Meyering <jim@meyering.net>
3458 * tests/cp/open-perm-race: Correct the gdb-existence check.
3459 Don't run either subsequent gdb command in a sub-shell.
3460 Reported by Thomas Schwinge.
3461 * THANKS: bring up to date.
3463 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
3465 Make sure cp -p isn't too generous with file permissions.
3466 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
3467 * tests/cp/file-perm-race: New file.
3469 Ensure cp -pR --parents isn't too generous with parent permissions.
3470 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
3471 * tests/cp/parent-perm-race: New file.
3473 2006-12-14 Jim Meyering <jim@meyering.net>
3475 * tests/chgrp/default-no-deref: Don't assume that files are created
3476 with the primary group by default. That's not true in a directory
3477 with the set-GID bit set.
3479 Don't hang when there's no input tty.
3480 * tests/cp/open-perm-race: Skip this test if there is no
3481 controlling input `terminal'.
3483 Test for a hard-to-detect race fix, using gdb.
3484 * tests/cp/open-perm-race: New file, to test for the
3485 cp --preserve=ownership fix of 2006-12-06.
3487 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
3488 (TESTS): Add open-perm-race.
3490 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
3491 * src/chown.c (main): Likewise.
3492 * src/chown-core.c (change_file_owner): Add to a comment.
3493 * tests/chown/preserve-root: Add tests.
3495 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
3496 * src/chmod.c (process_file): Do honor the --preserve-root option.
3497 * src/chown-core.c (change_file_owner): Likewise, but here, also
3498 handle the case in which a traversal would go "through" a symlink
3499 to root. Reported by Matthew M. Boedicker
3500 * tests/chown/preserve-root: Test for the above.
3501 * tests/chown/Makefile.am (TESTS): Add preserve-root.
3503 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
3504 to gnulib's m4/openat.m4.
3506 2006-12-13 Andreas Schwab <schwab@suse.de>
3508 Don't fail if mv/acl test succeeds.
3509 * tests/mv/acl (skip): Check for acl support in the file system.
3510 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
3511 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
3513 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
3515 Remove some arbitrary restrictions on size fields, so that
3516 commands like "sort -k 18446744073709551616" no longer fail merely
3517 because 18446744073709551616 doesn't fit in uintmax_t. The trick
3518 is that these fields can all be treated as effectively infinity;
3519 their exact values don't matter, since no internal buffer can be
3521 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
3522 ULONG_MAX if the code assumes this. Silently truncate too-large
3523 values to SIZE_MAX, as the remaining code will do the right thing
3525 * src/sort.c (parse_field_count): Likewise.
3526 * src/uniq.c (size_opt, main): Likewise.
3527 * tests/join/Test.pm (bigfield): New test.
3528 * tests/sort/Test.pm (bigfield): New test.
3529 * tests/uniq/Test.pm (121): New test.
3531 2006-12-13 Jim Meyering <jim@meyering.net>
3533 * tests/chgrp/default-no-deref: New test.
3534 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
3536 2006-12-12 Jim Meyering <jim@meyering.net>
3538 * src/system.h (SETVBUF): Remove definition, now that the
3539 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
3540 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
3541 * src/od.c (open_next_file): Likewise.
3543 2006-12-09 Jim Meyering <jim@meyering.net>
3545 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
3546 "source". I.e. "GNU coreutils 6.7".
3548 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
3549 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
3550 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
3552 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
3553 whenever uniq is expected to fail. This should catch the other case
3554 [test #112] in which uniq emits "cat: write error: Broken pipe" on
3557 2006-12-08 Jim Meyering <jim@meyering.net>
3559 Include bootstrap tool version info in the announcement form.
3560 * Makefile.maint (gnulib_snapshot_date): Define.
3561 (announcement): Use two new announce-gen options,
3562 --bootstrap-tools and --gnulib-snapshot-date.
3563 * Makefile.cfg (gnulib_dir): Set.
3565 Post-release version change.
3566 * NEWS: Add a line for 6.8-dirty.
3567 * configure.ac (AC_INIT): Set new version string.
3569 2006-12-07 Jim Meyering jim@meyering.net
3572 * NEWS: Record release date. Remove '-pre' suffix.
3573 * configure.ac (AC_INIT): Remove version string suffix.
3575 2006-12-07 Jim Meyering <jim@meyering.net>
3577 Make the output of "make check" more reproducible.
3578 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
3579 evoke diagnostics like this when COLUMNS=0 in the environment:
3580 ls: ignoring invalid width in environment variable COLUMNS: 0
3581 * tests/touch/no-rights: Likewise.
3582 * tests/help-version: Likewise.
3583 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
3584 118, since it emits "cat: write error: Broken pipe" on some systems.
3586 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
3588 * NEWS: Document the cp -p fix for special bits.
3589 * src/copy.c (set_owner): Now returns a three-way result, so
3590 that the caller can clear the special bits. All callers changed.
3591 (copy_reg): Don't set the special bits if chown failed.
3592 (copy_internal): Likewise.
3593 * tests/cp/special-bits: Test this fix.
3595 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
3597 * NEWS: Document the cp --preserve=ownership fix.
3598 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
3599 * src/copy.c (fchmod_or_lchmod): New function.
3600 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
3601 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
3602 When creating a file, use O_EXCL, so we're more likely to detect
3603 funny business by other processes. At the end, if permissions
3604 were omitted, chmod them back in.
3605 (copy_internal): If the ownership might change, omit some permissions
3606 at first, then restore them after chowning the file.
3607 * src/cp.c (make_dir_parents_private): Likewise.
3608 * src/copy.c (cached_umask): New function.
3609 * src/copy.h (cached_umask): New decl.
3611 2006-12-06 Jim Meyering <jim@meyering.net>
3613 Make the output of "make check" more reproducible.
3614 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
3616 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
3618 * src/install.c (install_file_in_file): Preserve time stamps
3619 before changing owner or file mode bits, for consistency with
3620 other coreutils programs.
3622 2006-12-03 Jim Meyering <jim@meyering.net>
3624 * tests/misc/date-sec: Output a fixed string.
3626 * NEWS: du --one-file-system (-x) would skip subdirectories of any
3627 directory listed as second or subsequent command line argument.
3628 * tests/du/one-file-system: New file. Test for today's fts.c fix.
3629 * tests/du/Makefile.am (TESTS): Add one-file-system.
3630 Reported by Mike Frysinger.
3632 2006-12-02 Jim Meyering <jim@meyering.net>
3634 * tests/du/basic: Generate 4KB file simply using printf, rather than
3635 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
3637 2006-11-28 Jim Meyering <jim@meyering.net>
3639 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
3640 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
3641 Reported by Matthew Woehlke.
3643 * tests/mv/dir2dir: Also accept EBUSY.
3644 Reported by Matthew Woehlke.
3646 2006-11-27 Jim Meyering <jim@meyering.net>
3648 * Makefile.maint (patch-check): Rewrite to diagnose failure.
3649 * src/c99-to-c89.diff: Adjust shred.c offsets.
3651 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
3653 Improve the check for departures from C89, and fix the departures
3655 * Makefile.maint (my-distcheck): Also check for C89 compatibility
3656 as best we can with GCC.
3657 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
3658 declaration; C89 doesn't allow this.
3659 * src/dcgen: Don't generate string literals longer than
3660 what C89 requires support for.
3661 * src/cut.c (usage): Don't use string literals longer than
3662 what C89 requires support for.
3663 * src/date.c (usage): Likewise.
3664 * src/dd.c (usage): Likewise.
3665 * src/du.c (usage): Likewise.
3666 * src/ls.c (usage): Likewise.
3667 * src/od.c (usage): Likewise.
3668 * src/readlink.c (usage): Likewise.
3669 * src/seq.c (usage): Likewise.
3670 * src/shred.c (usage): Likewise.
3672 2006-11-26 Mike Frysinger <vapier@gentoo.org>
3674 Recognize new archive, audio and image formats.
3675 Give audio files a separate color.
3676 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
3677 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
3678 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
3679 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
3680 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
3681 audio color to 00;36 to differentiate from image/video color.
3683 2006-11-26 Jim Meyering <jim@meyering.net>
3685 * Makefile.maint (patch-check): Compile patched sources with
3686 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
3687 no violations remain.
3689 * src/c99-to-c89.diff: Remove 3 bogus hunks.
3691 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
3694 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
3696 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
3698 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
3700 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
3701 while trying to retain the readability of C99 as much as possible.
3702 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
3703 Replace each of two uses with literal AT_FDCWD.
3704 (cache_stat_init): Return its argument, for convenience.
3705 Update the caller in remove_dir.
3706 (AD_pop_and_chdir): Return prev_dir rather than storing through
3707 a pointer argument. All uses changed.
3708 (AD_ensure_initialized): New function.
3709 (AD_mark_helper): Use it, to avoid the need for declaration
3711 (rm): Move cycle_check_init call into callee...
3713 Use an else clause in place of a "continue" statement.
3714 (close_preserve_errno): Remove.
3715 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
3717 2006-11-25 Jim Meyering <jim@meyering.net>
3719 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
3721 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
3723 * tests/du/inacc-dest: Skip this test when running as root.
3725 2006-11-23 Jim Meyering <jim@meyering.net>
3727 * announce-gen: Remove file. It's moving to gnulib.
3728 * bootstrap: Pull it from gnulib/build-aux instead.
3729 * Makefile.maint (announcement): Reflect move to ./build-aux.
3731 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
3732 rather than a pipeline that would sometimes evoke a diagnostic
3733 like "seq: write error: Broken pipe".
3735 * tests/help-version: Suppress dd transfer rate output.
3737 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
3739 2006-11-22 Jim Meyering <jim@meyering.net>
3741 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
3742 change "(:?..." to "(?:..." in regexps.
3744 Post-release version change.
3745 * NEWS: Add a line for 6.7-pre.
3746 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
3749 * NEWS: Record release date. Remove "-pre" suffix.
3750 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
3752 * announce-gen: Remove unused --release-archive-directory option.
3753 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
3755 Match version numbers in NEWS using tighter regular expressions.
3756 (main): Require the --gpg-key-id=ID option.
3757 * Makefile.maint (announcement): Don't use now-removed
3758 --release-archive-directory=... option.
3760 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
3762 2006-11-21 Jim Meyering <jim@meyering.net>
3764 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
3765 skip the test rather than failing. Reported by Michael Deutschmann.
3767 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
3768 rather than just "exit N".
3770 Arrange for "make check-root" to run the new root-only test.
3771 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
3774 2006-11-20 Jim Meyering <jim@meyering.net>
3776 Add a root-only test for today's lib/idcache.c fix.
3777 * tests/ls/nameless-uid: New file.
3778 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
3779 (TESTS_ENVIRONMENT): Add PERL to the list.
3781 2006-11-19 Jim Meyering <jim@meyering.net>
3783 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
3784 find the 7-second sleep annoyingly long. Besides, this test is
3785 probably far too specific and timing sensitive ever to trigger again.
3786 * tests/tail-2/assert: Likewise.
3788 Post-release version change.
3789 * NEWS: Add a line for 6.6-pre.
3790 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
3793 * NEWS: Record release date. Remove "-cvs" suffix.
3794 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3796 2006-11-18 Jim Meyering <jim@meyering.net>
3798 "ln --backup f f" produces a misleading diagnostic:
3799 ln: creating hard link `f' => `f': No such file or directory
3800 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
3801 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
3802 * tests/ln/Makefile.am (TESTS): Add hard-backup.
3803 * tests/ln/hard-backup: New test for the above.
3804 * NEWS: Mention this fix.
3806 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
3808 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
3810 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
3811 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
3812 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
3813 Omit unnecessary parenthesization of args.
3814 * src/od.c (EQUAL_BLOCKS): Likewise.
3815 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
3817 2006-11-16 Jim Meyering <jim@meyering.net>
3819 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
3820 automake we're skipping this test), and give a diagnostic to tell
3821 the user the same thing. Reported by Mike Grayson.
3823 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3825 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
3826 with `$(MAN)', computed at configure time; also, list them ...
3827 (optional_mans): ... in this new variable.
3828 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
3830 2006-11-16 Jim Meyering <jim@meyering.net>
3832 Help valgrind see that there is no leak in dd.c.
3833 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
3834 so we need not free them at all. This is easier than freeing
3835 both buffers at each of the early "return"s.
3837 * src/csplit.c (load_buffer): Plug an inconsequential leak.
3839 2006-11-15 Jim Meyering <jim@meyering.net>
3841 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
3842 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
3844 2006-11-14 Jim Meyering <jim@meyering.net>
3846 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
3847 remove the now-unnecessary use of AC_LIBSOURCES.
3849 Adapt to new version of gnulib-tool.
3850 * gl/modules/root-dev-ino: New file.
3851 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
3852 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
3853 * m4/root-dev-ino.m4: Move this file ...
3854 * gl/m4/root-dev-ino.m4: ... to here.
3856 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
3858 2006-11-13 Jim Meyering <jim@meyering.net>
3860 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
3863 Plug another technically-unimportant leak in sort.
3864 * src/sort.c (main): Don't allocate memory for each new key here.
3865 (insertkey): Allocate memory for each key here, instead.
3866 (key_init): Rename from new_key. Don't allocate.
3868 * src/sort.c (main): Plug a tiny memory leak.
3869 Move declaration of local "minus" down to be nearer point of use.
3871 2006-11-12 Jim Meyering <jim@meyering.net>
3873 du would exit early, when encountering an inaccessible directory
3874 Reported by Mike Frysinger, in
3875 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
3876 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
3877 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
3878 diagnostic from the expected output when using native fdopendir.
3879 * tests/chmod/no-x: Likewise.
3880 * tests/du/no-x: Likewise.
3881 * NEWS: Mention this bug fix.
3882 * tests/du/Makefile.am (TESTS): Add inacc-dest.
3884 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
3885 for xalloc.h itself.
3887 Avoid false-positive when testing via valgrind.
3888 * tests/mv/atomic: Grep strace output for a more specific pattern
3889 than just "unlink", since that got a false positive when testing
3890 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
3891 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
3893 2006-10-28 Jim Meyering <jim@meyering.net>
3895 * Makefile.maint (patch-check): Make it easier to regenerate
3896 the src/c99-to-c89.diff file. E.g., I do this:
3897 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
3899 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
3901 2006-10-26 Jim Meyering <jim@meyering.net>
3903 * src/system.h (ftello): Add a compile-time check for the highly
3904 unlikely condition of off_t narrower than long int, rather than
3905 handling it at run time. Based on a patch from Paul Eggert.
3907 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
3909 * tests/chmod/c-option: When double-quoting part of a word, prefer
3910 to double-quote the whole word. This is a bit easier to read (at
3911 least for me), and in some cases it avoids a shell bug with Tru64
3912 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
3913 "$abs_srcdir"/../setgid-check we now write
3914 "$abs_srcdir/../setgid-check".
3915 * tests/cp/cp-parents: Likewise.
3916 * tests/du/inaccessible-cwd: Likewise.
3917 * tests/du/long-from-unreadable: Likewise.
3918 * tests/install/basic-1: Likewise.
3919 * tests/install/trap: Likewise.
3920 * tests/misc/close-stdout: Likewise.
3921 * tests/mkdir/concurrent-1: Likewise.
3922 * tests/mkdir/p-1: Likewise.
3923 * tests/mkdir/p-3: Likewise.
3924 * tests/mkdir/parents: Likewise.
3925 * tests/mkdir/perm: Likewise.
3926 * tests/readlink/can-e: Likewise.
3927 * tests/readlink/can-f: Likewise.
3928 * tests/readlink/can-m: Likewise.
3929 * tests/rm/inaccessible: Likewise.
3930 * tests/rm/unread3: Likewise.
3931 * tests/touch/no-create-missing: Likewise.
3933 * lib/.cvsignore: Add uinttostr.c.
3935 2006-10-25 Jim Meyering <jim@meyering.net>
3937 Portability to Tru64 V4.0.
3938 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
3939 Define inline replacement function.
3940 This (along with a yesterday's fix for autoconf's
3941 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
3942 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
3944 2006-10-25 Bruno Haible <bruno@clisp.org>
3946 * src/cat.c (infile): Add "const" to declaration.
3947 * src/csplit.c (prefix): Likewise.
3948 * src/printf.c (cfcc_msg): Likewise.
3949 * src/tail.c (valid_file_spec): Likewise.
3950 * src/cut.c (cut_file): Likewise, for a parameter.
3951 * src/expr.c (str_value): Likewise.
3952 * src/fold.c (fold_file): Likewise.
3953 * src/pr.c (init_header): Likewise.
3954 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
3955 * src/tr.c (make_printable_str): Likewise.
3956 * src/nl.c (body_type, header_type, footer_type, current_type):
3957 (separator_str, build_type_arg, nl_file): Likewise, for many.
3958 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
3959 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
3961 2006-10-25 Jim Meyering <jim@meyering.net>
3963 * tests/sample-test: Update copyright year list to include only
3964 the current year, since this is what I'll want in any new test.
3966 2006-10-24 Jim Meyering <jim@meyering.net>
3968 * src/c99-to-c89.diff: Update to reflect new offsets.
3970 * NEWS: new feature: rm accepts new option: --one-file-system
3971 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
3972 * src/remove.h (struct rm_options) [one_file_system]: New member.
3973 * src/rm.c (rm_option_init): Initialize it.
3974 (usage): Document the option.
3975 * src/mv.c (rm_option_init): Likewise.
3976 * src/remove.c (remove_dir): With --one-file-system and --recursive,
3977 for each directory command line argument, do not affect a file system
3978 different from that of the starting directory. And give a diagnostic.
3979 * src/rm.c (ONE_FILE_SYSTEM): New enum.
3980 (main): Handle new option.
3981 * tests/rm/one-file-system: Test the above.
3982 * tests/rm/Makefile.am (TESTS): Add one-file-system.
3983 * tests/Makefile.am (check-root): Add the rm/one-file-system
3985 (EXTRA_DIST): Add other-fs-tmpdir.
3987 * tests/mv/setup: Removed. Renamed to...
3988 * tests/other-fs-tmpdir: ...this new file.
3989 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
3990 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
3991 * tests/mv/backup-is-src: Likewise.
3992 * tests/mv/hard-link-1: Likewise.
3993 * tests/mv/leak-fd: Likewise.
3994 * tests/mv/mv-special-1: Likewise.
3995 * tests/mv/part-fail: Likewise.
3996 * tests/mv/part-hardlink: Likewise.
3997 * tests/mv/part-rename: Likewise.
3998 * tests/mv/part-symlink: Likewise.
3999 * tests/mv/partition-perm: Likewise.
4000 * tests/mv/to-symlink: Likewise.
4001 * tests/mv/into-self-2: Likewise.
4003 Don't let a failure in one test stop "make -k" from running the others.
4004 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
4005 (check-root): Depend on them, rather than executing the five
4006 commands in a single rule. Reported by Greg Schafer.
4008 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
4010 * Makefile.maint (alpha beta major): Use a better log message for
4011 the automatic commit of .prev-version.
4013 2006-10-23 Jim Meyering <jim@meyering.net>
4015 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
4016 pwd via a shell. Instead, ensure that the absolute name of the
4017 pwd binary consists solely of reasonable characters.
4018 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
4019 clean-up code isn't run.
4021 * NEWS: Add a line for 6.5-cvs.
4022 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
4024 2006-10-22 Jim Meyering <jim@meyering.net>
4028 * NEWS: Record the 6.4 release date.
4029 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4031 * Makefile.maint: Complete the adaptation to function with a working
4032 directory that is using git (rather than cvs) for version control.
4034 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4036 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
4037 * tests/cp/cp-parents: Likewise.
4038 * tests/mkdir/parents: Likewise.
4039 * tests/mkdir/perm: Likewise.
4041 * tests/sample-test: Quote variables containing absolute build
4042 tree paths. In the cleanup trap, make sure `cd' succeeds before
4043 `chmod'ing and `rm'ing the temporary files.
4044 * tests/chgrp/basic: Likewise.
4045 * tests/chgrp/deref: Likewise.
4046 * tests/chgrp/no-x: Likewise.
4047 * tests/chgrp/posix-H: Likewise.
4048 * tests/chgrp/recurse: Likewise.
4049 * tests/chmod/c-option: Likewise.
4050 * tests/chmod/equal-x: Likewise.
4051 * tests/chmod/equals: Likewise.
4052 * tests/chmod/inaccessible: Likewise.
4053 * tests/chmod/no-x: Likewise.
4054 * tests/chmod/octal: Likewise.
4055 * tests/chmod/setgid: Likewise.
4056 * tests/chmod/umask-x: Likewise.
4057 * tests/chmod/usage: Likewise.
4058 * tests/chown/basic: Likewise.
4059 * tests/chown/deref: Likewise.
4060 * tests/chown/separator: Likewise.
4061 * tests/cp/acl: Likewise.
4062 * tests/cp/backup-1: Likewise.
4063 * tests/cp/backup-dir: Likewise.
4064 * tests/cp/backup-is-src: Likewise.
4065 * tests/cp/cp-HL: Likewise.
4066 * tests/cp/cp-deref: Likewise.
4067 * tests/cp/cp-i: Likewise.
4068 * tests/cp/cp-mv-backup: Likewise.
4069 * tests/cp/cp-parents: Likewise.
4070 * tests/cp/deref-slink: Likewise.
4071 * tests/cp/dir-rm-dest: Likewise.
4072 * tests/cp/dir-slash: Likewise.
4073 * tests/cp/dir-vs-file: Likewise.
4074 * tests/cp/fail-perm: Likewise.
4075 * tests/cp/into-self: Likewise.
4076 * tests/cp/link: Likewise.
4077 * tests/cp/link-no-deref: Likewise.
4078 * tests/cp/link-preserve: Likewise.
4079 * tests/cp/no-deref-link1: Likewise.
4080 * tests/cp/no-deref-link2: Likewise.
4081 * tests/cp/no-deref-link3: Likewise.
4082 * tests/cp/perm: Likewise.
4083 * tests/cp/preserve-2: Likewise.
4084 * tests/cp/r-vs-symlink: Likewise.
4085 * tests/cp/same-file: Likewise.
4086 * tests/cp/slink-2-slink: Likewise.
4087 * tests/cp/sparse: Likewise.
4088 * tests/cp/special-bits: Likewise.
4089 * tests/cp/src-base-dot: Likewise.
4090 * tests/cp/symlink-slash: Likewise.
4091 * tests/dd/not-rewound: Likewise.
4092 * tests/dd/skip-seek2: Likewise.
4093 * tests/dd/unblock-sync: Likewise.
4094 * tests/du/2g: Likewise.
4095 * tests/du/8gb: Likewise.
4096 * tests/du/basic: Likewise.
4097 * tests/du/deref: Likewise.
4098 * tests/du/deref-args: Likewise.
4099 * tests/du/exclude: Likewise.
4100 * tests/du/fd-leak: Likewise.
4101 * tests/du/hard-link: Likewise.
4102 * tests/du/inaccessible-cwd: Likewise.
4103 * tests/du/long-from-unreadable: Likewise.
4104 * tests/du/long-sloop: Likewise.
4105 * tests/du/no-deref: Likewise.
4106 * tests/du/no-x: Likewise.
4107 * tests/du/restore-wd: Likewise.
4108 * tests/du/slash: Likewise.
4109 * tests/du/slink: Likewise.
4110 * tests/du/trailing-slash: Likewise.
4111 * tests/du/two-args: Likewise.
4112 * tests/fmt/long-line: Likewise.
4113 * tests/install/basic-1: Likewise.
4114 * tests/install/create-leading: Likewise.
4115 * tests/install/d-slashdot: Likewise.
4116 * tests/install/trap: Likewise.
4117 * tests/ln/misc: Likewise.
4118 * tests/ln/target-1: Likewise.
4119 * tests/ls/color-dtype-dir: Likewise.
4120 * tests/ls/dangle: Likewise.
4121 * tests/ls/dired: Likewise.
4122 * tests/ls/file-type: Likewise.
4123 * tests/ls/follow-slink: Likewise.
4124 * tests/ls/infloop: Likewise.
4125 * tests/ls/inode: Likewise.
4126 * tests/ls/m-option: Likewise.
4127 * tests/ls/no-arg: Likewise.
4128 * tests/ls/recursive: Likewise.
4129 * tests/ls/rt-1: Likewise.
4130 * tests/ls/stat-dtype: Likewise.
4131 * tests/ls/stat-failed: Likewise.
4132 * tests/ls/stat-vs-dirent: Likewise.
4133 * tests/misc/cat-proc: Likewise.
4134 * tests/misc/close-stdout: Likewise.
4135 * tests/misc/csplit: Likewise.
4136 * tests/misc/date-sec: Likewise.
4137 * tests/misc/false-status: Likewise.
4138 * tests/misc/head-c: Likewise.
4139 * tests/misc/head-pos: Likewise.
4140 * tests/misc/mknod: Likewise.
4141 * tests/misc/nl: Likewise.
4142 * tests/misc/nohup: Likewise.
4143 * tests/misc/pathchk1: Likewise.
4144 * tests/misc/printf: Likewise.
4145 * tests/misc/printf-hex: Likewise.
4146 * tests/misc/pwd-long: Likewise.
4147 * tests/misc/shuf: Likewise.
4148 * tests/misc/sort-rand: Likewise.
4149 * tests/misc/split-a: Likewise.
4150 * tests/misc/split-fail: Likewise.
4151 * tests/misc/split-l: Likewise.
4152 * tests/misc/stat-fmt: Likewise.
4153 * tests/misc/tac-continue: Likewise.
4154 * tests/misc/wc-files0: Likewise.
4155 * tests/mkdir/concurrent-1: Likewise.
4156 * tests/mkdir/p-1: Likewise.
4157 * tests/mkdir/p-2: Likewise.
4158 * tests/mkdir/p-3: Likewise.
4159 * tests/mkdir/p-slashdot: Likewise.
4160 * tests/mkdir/p-thru-slink: Likewise.
4161 * tests/mkdir/p-v: Likewise.
4162 * tests/mkdir/parents: Likewise.
4163 * tests/mkdir/perm: Likewise.
4164 * tests/mkdir/t-slash: Likewise.
4165 * tests/mv/acl: Likewise.
4166 * tests/mv/atomic: Likewise.
4167 * tests/mv/backup-dir: Likewise.
4168 * tests/mv/childproof: Likewise.
4169 * tests/mv/diag: Likewise.
4170 * tests/mv/dir-file: Likewise.
4171 * tests/mv/dir2dir: Likewise.
4172 * tests/mv/dup-source: Likewise.
4173 * tests/mv/hard-2: Likewise.
4174 * tests/mv/hard-3: Likewise.
4175 * tests/mv/hard-4: Likewise.
4176 * tests/mv/hard-link-1: Likewise.
4177 * tests/mv/hard-verbose: Likewise.
4178 * tests/mv/i-2: Likewise.
4179 * tests/mv/i-3: Likewise.
4180 * tests/mv/i-4: Likewise.
4181 * tests/mv/i-5: Likewise.
4182 * tests/mv/i-link-no: Likewise.
4183 * tests/mv/into-self-4: Likewise.
4184 * tests/mv/leak-fd: Likewise.
4185 * tests/mv/mv-special-1: Likewise.
4186 * tests/mv/no-target-dir: Likewise.
4187 * tests/mv/part-fail: Likewise.
4188 * tests/mv/part-hardlink: Likewise.
4189 * tests/mv/part-rename: Likewise.
4190 * tests/mv/part-symlink: Likewise.
4191 * tests/mv/partition-perm: Likewise.
4192 * tests/mv/perm-1: Likewise.
4193 * tests/mv/reply-no: Likewise.
4194 * tests/mv/trailing-slash: Likewise.
4195 * tests/mv/update: Likewise.
4196 * tests/od/od-N: Likewise.
4197 * tests/od/x8: Likewise.
4198 * tests/readlink/can-e: Likewise.
4199 * tests/readlink/can-f: Likewise.
4200 * tests/readlink/can-m: Likewise.
4201 * tests/readlink/rl-1: Likewise.
4202 * tests/rm/cycle: Likewise.
4203 * tests/rm/dangling-symlink: Likewise.
4204 * tests/rm/deep-1: Likewise.
4205 * tests/rm/dir-no-w: Likewise.
4206 * tests/rm/dir-nonrecur: Likewise.
4207 * tests/rm/dot-rel: Likewise.
4208 * tests/rm/empty-inacc: Likewise.
4209 * tests/rm/f-1: Likewise.
4210 * tests/rm/fail-2eperm: Likewise.
4211 * tests/rm/hash: Likewise.
4212 * tests/rm/i-1: Likewise.
4213 * tests/rm/i-no-r: Likewise.
4214 * tests/rm/ignorable: Likewise.
4215 * tests/rm/inaccessible: Likewise.
4216 * tests/rm/interactive-always: Likewise.
4217 * tests/rm/interactive-once: Likewise.
4218 * tests/rm/ir-1: Likewise.
4219 * tests/rm/isatty: Likewise.
4220 * tests/rm/no-give-up: Likewise.
4221 * tests/rm/r-1: Likewise.
4222 * tests/rm/r-2: Likewise.
4223 * tests/rm/r-3: Likewise.
4224 * tests/rm/r-4: Likewise.
4225 * tests/rm/readdir-bug: Likewise.
4226 * tests/rm/rm1: Likewise.
4227 * tests/rm/rm2: Likewise.
4228 * tests/rm/rm3: Likewise.
4229 * tests/rm/rm4: Likewise.
4230 * tests/rm/rm5: Likewise.
4231 * tests/rm/sunos-1: Likewise.
4232 * tests/rm/unread2: Likewise.
4233 * tests/rm/unread3: Likewise.
4234 * tests/rmdir/fail-perm: Likewise.
4235 * tests/rmdir/t-slash: Likewise.
4236 * tests/shred/exact: Likewise.
4237 * tests/shred/remove: Likewise.
4238 * tests/sum/sysv: Likewise.
4239 * tests/tail-2/append-only: Likewise.
4240 * tests/tail-2/assert: Likewise.
4241 * tests/tail-2/assert-2: Likewise.
4242 * tests/tail-2/big-4gb: Likewise.
4243 * tests/tail-2/fflush: Likewise.
4244 * tests/tail-2/infloop-1: Likewise.
4245 * tests/tail-2/proc-ksyms: Likewise.
4246 * tests/tail-2/start-middle: Likewise.
4247 * tests/tail-2/tail-n0f: Likewise.
4248 * tests/tee/basic: Likewise.
4249 * tests/tee/dash: Likewise.
4250 * tests/touch/fail-diag: Likewise.
4251 * tests/touch/no-create-missing: Likewise.
4252 * tests/touch/not-owner: Likewise.
4253 * tests/touch/obsolescent: Likewise.
4254 * tests/touch/read-only: Likewise.
4255 * tests/touch/relative: Likewise.
4257 2006-10-21 Jim Meyering <jim@meyering.net>
4259 * NEWS: (cp --backup fix): Fix a typo.
4261 * .gitignore: Remove some references to files in subdirectories.
4262 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
4263 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
4265 * src/copy.c (copy_internal): Add a comment saying why we prefer
4268 Enable an fts optimization (call lstat only for directories,
4269 on some file system types) also with the --preserve-root option
4271 * src/chown-core.c (change_file_owner): Compare fts_statp-based
4272 dev/ino against root dev/ino only for directories.
4273 (chown_files): Don't let the root_dev_ino setting influence whether
4274 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
4276 2006-10-20 Jim Meyering <jim@meyering.net>
4278 * src/od.c (usage): Change description of default to use "-w16",
4279 not the now-invalid "-w 16" syntax. From Dan Jacobson.
4281 2006-10-19 Jim Meyering <jim@meyering.net>
4283 * bootstrap: Add names to each .gitignore file (if it exists)
4284 as well as to .cvsignore.
4286 * Makefile.maint (po-check): This rule didn't detect the new use
4287 of "gettext" (as opposed to the use of "_" everywhere else) in
4288 lib/xstrtol.h. Adjust the grep regexp so that now it does.
4290 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
4292 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
4293 when opening dst_name.
4294 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
4295 (SYSCALL) to test for failure in a system call.
4297 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
4298 a fifo. This preserves the special mode bits on Solaris 10, which
4299 is compatible with what Solaris 10 cp -R does.
4301 * src/copy.c (copy_internal): Remove redundant and confusing local
4304 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
4305 7777. This matches historical 'cp' behavior and avoids some
4306 (though not all) implementation-defined behavior of mkdir.
4307 * src/cp.c (make_dir_parents_private): Likewise.
4308 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
4309 than 777. This is required by POSIX. It doesn't make any difference
4310 in actual behavior on any host that I know of.
4312 2006-10-17 Jim Meyering <jim@meyering.net>
4314 * src/dd.c (usage): Use two spaces (not one) to separate the
4315 "fdatasync" option string from its description, so help2man formats
4316 the derived man page properly. Reported by Samuel Thibault
4317 in <http://bugs.debian.org/393649>.
4319 2006-10-16 Jim Meyering <jim@meyering.net>
4321 * .x-sc_trailing_blank: Remove names of files that are no longer
4324 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
4326 * src/groups.sh (version): Reword message to match the other programs.
4327 Problem reported by Eric Blake.
4329 2006-10-14 Jim Meyering <jim@meyering.net>
4331 * Makefile.maint (headers_with_interesting_macro_defs): Define.
4332 (.re-defmac, sc_always_defined_macros): New rules.
4334 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
4335 Instead, include "exit.h". This hereby retires the work-around for
4336 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
4338 * src/cksum.c (uint_fast32_t): Don't define.
4339 Instead, include <stdint.h>.
4341 * src/pinky.c (S_IWGRP): Don't define.
4342 It's already defined by "stat-macros.h" (included via system.h).
4344 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
4345 * Makefile.maint: Likewise, remove these targets/rules/variables:
4346 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
4347 (cvs_files, wget-update, automake_repo): Likewise.
4348 Move the comment about cvsu to build-aux/vc-list-files,
4349 where cvsu is actually used.
4351 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
4353 Work also when the working directory (with e.g. coreutils sources)
4354 is version controlled with git, rather than CVS.
4355 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
4357 In messages and comments, say e.g., "checked-out sources",
4358 rather than "CVS sources".
4359 (version_controlled_file): New function. Work for git as well as
4360 for CVS. Don't use grep's -q option.
4361 (slurp): Call it here, in place of CVS-specific code.
4363 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
4365 * src/copy.c (copy_internal): Although we do create a backup of each
4366 destination directory when in move mode, don't do that when copying.
4367 Reported by Peter Breitenlohner, in
4368 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
4369 * tests/cp/backup-dir: New file. Test for the above.
4370 * tests/cp/Makefile.am (TESTS): Add backup-dir.
4372 2006-10-13 Jim Meyering <jim@meyering.net>
4374 More chown/chgrp dereferencing-related fixes.
4375 * src/chown-core.c (change_file_owner): Don't use fts_statp if
4376 we're dereferencing symlinks.
4377 Reverse conjuncts, so that we use dereference file_stats
4378 (aka ent->fts_statp) only *after* we've confirmed that
4379 chopt->affect_symlink_referent is true. Otherwise, we might
4380 use ent->fts_statp uninitialized.
4381 Don't turn on FTS_NOSTAT when dereferencing symlinks.
4382 * tests/chown/deref: Update the expected diagnostic, now that
4383 this test case (trying to use "chown --dereference ..." on a
4384 dangling symlink) takes a different code path.
4386 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
4388 Sync from Bison, as follows:
4390 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
4392 Fix problems with translating English-language diagnostics.
4393 * bootstrap: Fix bug introduced in recent bootstrap changes, with
4394 respect to bison-runtime pot generation. The YY_ stuff
4395 wasn't being captured.
4397 2006-10-13 Jim Meyering <jim@meyering.net>
4399 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
4400 now that we're using fts_open with FTS_CWDFD.
4401 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
4402 chgrp, to exercise the above fix.
4403 * NEWS: Mention the above.
4405 * src/du-tests: Clean up a little, though it's still not portable.
4407 * .vg-suppressions: Add 3 more for debian unstable.
4409 * tests/ls/Test.pm: Remove long-unused file.
4410 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
4411 Suggestions from Bruno Haible.
4413 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4415 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
4416 (MAINTAINERCLEANFILES): Add .kludge-stamp.
4417 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
4418 instead of $(man_MANS).
4420 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4422 * configure.ac: Avoid compiler warnings about default return
4423 type in function definitions and unused variables in tests.
4424 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
4425 if this is #defined.
4427 2006-10-12 Jim Meyering <jim@meyering.net>
4429 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
4430 Call gl_INIT directly, rather than through the above.
4432 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4434 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
4435 variable was sometimes used without being initialized. This
4436 messed up the installation of the INSTALL file in some cases.
4438 2006-10-11 Jim Meyering <jim@meyering.net>
4440 * src/ls.c (usage): Correct description of -s, --size.
4441 It works even without -l. Suggestion from Karl Berry.
4443 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
4445 * src/ls.c (quote_name): Use initializer rather than memset to
4446 initialize an object to zero. This is easier to read and is less
4447 likely to introduce a runtime error due to a mixup. It causes
4448 gcc -W to issue a warning, but you can work around this by
4449 appending -Wno-missing-field-initializers.
4450 * src/pathchk.c (portable_chars_only): Likewise.
4451 * src/shred.c (main): Likewise.
4452 * src/stty.c (main): Likewise.
4453 * src/tr.c (card_of_complement): Likewise.
4454 * src/wc.c (wc): Likewise.
4456 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4458 * src/sort.c (usage): Mention again that sort fields are origin 1.
4460 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
4463 * bootstrap (usage, main program, symlink_to_gnulib): Add option
4464 --copy. Inspired by a suggestion from Bruno Haible.
4466 2006-10-09 Jim Meyering <jim@meyering.net>
4468 Avoid a compiler warning.
4469 * src/pathchk.c (portable_chars_only): Initialize variable of type
4470 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
4472 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
4474 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
4475 wrong file name in some cases. Lars Wendler reported a bug in
4477 * src/install.c (make_ancestor): New arg COMPONENT.
4478 * src/mkdir.c (make_ancestor): Likewise.
4479 * tests/install/basic-1: Check for install -Dv bug.
4480 * tests/mkdir/Makefile.am (TESTS): Add p-v.
4481 * tests/mkdir/p-v: New file, to test this bug.
4483 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
4485 * src/chgrp.c: Don't include lchown.h; no longer needed.
4486 * src/chown.c: Likewise.
4488 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
4489 current file system has useful d_type info.
4491 * src/dd.c (flags): noatime and nofollow now depend on
4492 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
4493 (usage): Output info about noatime and nofollow only if
4494 they are known to work.
4495 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
4496 than O_NOFOLLOW, when testing whether it's possible to avoid a
4497 race condition reliably.
4499 2006-10-05 Jim Meyering <jim@meyering.net>
4501 * src/c99-to-c89.diff: Update to reflect new offsets.
4503 * tests/install/basic-1: Skip the latter part of this test if the
4504 just-built dd binary is not readable. Otherwise, this test would fail
4505 when binaries were created as root. Reported by Bauke Jan Douma in
4506 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
4508 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
4510 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
4511 MiB, since XFS hosts can legitimately have large values of
4512 st_blksize. Problem reported by Tony Ernst in
4513 <http://savannah.gnu.org/bugs/?17903>.
4515 2006-10-04 Jim Meyering <jim@meyering.net>
4517 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
4518 Paul Eggert pointed out that the specified file may exist,
4519 in spite of such an errno value.
4520 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
4521 * tests/rm/ignore-name-too-long: Remove file.
4522 * NEWS: Update here, too.
4524 2006-10-03 Jim Meyering <jim@meyering.net>
4526 * tests/rm/fail-eperm: Report failure also if rm is terminated by
4529 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
4530 and one in shred.c -- that were added before coreutils-6.3.
4531 Reported by Michael Deutschmann.
4533 * src/c99-to-c89.diff: Update to reflect new offsets.
4535 * src/remove.c (remove_entry): With -f, exit successfully in spite
4536 of a missing file under some very unusual conditions (with errno
4537 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
4539 With --force (-f), rm no longer fails for ENOTDIR.
4540 * src/remove.c (ignorable_missing): New function.
4541 Use it everywhere, rather than open-coding the test.
4542 Andreas Schwab reported the ENOTDIR problem.
4543 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
4545 * NEWS: Mention the bug fix.
4546 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
4547 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
4548 * tests/rm/Makefile.am (TESTS): Add the new file names.
4550 * bootstrap: Undo last change to this file, since now gnulib-tool
4551 sticks with the automake default in generating dependencies.
4553 * NEWS: Add a line for 6.4-cvs.
4554 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
4556 2006-09-30 Jim Meyering <jim@meyering.net>
4559 * NEWS: Record the 6.3 release date.
4560 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4562 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
4564 * src/c99-to-c89.diff: Update offsets.
4566 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
4568 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
4569 as it doesn't work with Solaris /bin/sh.
4571 2006-09-29 Jim Meyering <jim@meyering.net>
4573 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
4576 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
4577 use .1 as the increment. Actual output varies too much.
4578 [eq-wid-3]: New, commented out test.
4580 * src/shuf.c (read_input): Fix an off-by-one error that
4581 would cause an infloop for piped input of 8KB or more.
4582 * NEWS: Mention the fix.
4583 * tests/misc/shuf: Test for the above fix.
4585 Since any system may be affected by the Darwin readdir bug,
4586 perform the extra rewinddir unconditionally. The performance
4587 impact of rewinding a directory is negligible.
4588 * src/remove.c (NEED_REWIND): Define to use
4589 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
4591 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
4592 increment translates to a slightly larger value.
4593 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
4594 The final expected value wasn't being printed.
4596 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
4597 and NFS, whereby rm would not remove all files in a directory.
4598 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
4599 (NEED_REWIND): New macro, so that we incur the cost of the work-around
4600 rewinddir only on afflicted systems.
4601 * NEWS: Clarify and correct.
4602 * tests/rm/readdir-bug: New file. Test for the above fix.
4603 * tests/rm/Makefile.am (TESTS): Add it.
4604 Prompted by testing and analysis from Bruno Haible:
4605 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
4607 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
4609 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
4610 suggested for Debian stable, which uses Perl 5.8.4.
4612 2006-09-28 Jim Meyering <jim@meyering.net>
4614 Automatically generated dependencies are important even
4615 when all of the sources in a directory come from gnulib.
4616 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
4617 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
4619 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
4620 Ensure that IFS is set properly and unset PATH.
4622 Work properly even when the name of the selected file starts with "-".
4623 Invoke rm via "../../src/rm", and adjust expected output.
4624 Prompted by a patch from Tim Waugh.
4626 * README-cvs: Add Bison to the list of required packages.
4628 2006-09-26 Jim Meyering <jim@meyering.net>
4630 * src/c99-to-c89.diff: Update offsets.
4632 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
4633 it from removing a directory containing 188 or more entries.
4634 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
4635 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
4636 Reported by Matthew Woehlke.
4638 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
4640 * NEWS: "groups user" no longer outputs "user :"; you need at least
4641 two users. "groups" now processes options like --help more compatibly.
4642 * src/groups.sh: Implement the option-processing change.
4643 Handle user and group names with special characters more robustly.
4644 Report write errors instead of exiting silently with status 1.
4646 2006-09-26 Jim Meyering <jim@meyering.net>
4648 * README: Warn not to run autoreconf manually. Use bootstrap instead.
4650 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
4651 Rewrite to avoid using temporary, $status.
4653 * NEWS: Mention the bug fix.
4654 * src/groups.sh: Don't hide a write failure.
4655 Reported by Iain Calder <ic56@rogers.com>.
4657 2006-09-25 Jim Meyering <jim@meyering.net>
4659 * src/chown.c (usage): Clarify --dereference description.
4660 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
4662 2006-09-24 Jim Meyering <jim@meyering.net>
4664 * NEWS: Mention these fixes.
4665 * src/copy.c (copy_reg): With --verbose (-v), print
4666 "removed `file_name'" just after unlinking a file.
4667 (copy_internal): Likewise, in three more places.
4668 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
4669 * tests/mv/hard-verbose: New file. Test for the above fix.
4670 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
4672 * tests/help-version (sync_args): Don't call sync, since it spins up
4673 disks that I've deliberately caused to spin down (but not unmounted).
4675 * NEWS: Mention the improvement to sort.
4677 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
4678 as well as existing.
4680 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
4681 since that predated addition of d_type support.
4683 2006-09-23 Jim Meyering <jim@meyering.net>
4685 * gl/modules/getloadavg.diff: New file. Work around the way the latest
4686 version of the getloadavg module interacts with our bootstrap script.
4687 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
4688 * Makefile.am (EXTRA_DIST): Sort file names.
4689 Add bootstrap and gl/modules/getloadavg.diff
4691 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4693 * bootstrap: Add support for --force.
4694 (usage): New function. Describe usage less tersely.
4695 (CVS_only_file): New var.
4697 * NEWS: Document fix for cp -i and mv -i.
4698 * src/copy.c (copy_internal): With -i, prompt even if the source
4699 is a directory and the destination is not. This is required by
4700 POSIX and gives the user a chance to bail out before failing.
4701 * tests/cp/Makefile.am (TESTS): Add cp-i.
4702 * tests/cp/cp-i: New file.
4703 * tests/mv/Makefile.am (TESTS): Add i-5.
4704 * tests/mv/i-5: New file.
4706 2006-09-20 Jim Meyering <jim@meyering.net>
4708 * NEWS: Mention the chmod bug fix.
4710 * tests/chmod/inaccessible: New test, specifically for this bug.
4711 Based on a test case from Paul Eggert.
4712 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
4714 Fix the 2006-09-18 bug differently.
4715 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
4716 tell fts_read to stat the file again, in case it has become
4717 accessible since the initial fts_open call.
4718 * src/chown-core.c (change_file_owner): Likewise.
4720 * src/chmod.c: Revert last change. There is a better way.
4721 * src/chown-core.c: Likewise.
4723 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
4725 * src/ln.c (target_directory_operand): Rewrite to avoid porting
4726 problem on Tandem reported by Matthew Woehlke in
4727 <https://savannah.gnu.org/bugs/?17172>.
4729 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
4731 Fix bug where chmod, chown, and chgrp did not process operands
4732 left-to-right in some cases.
4733 * src/chmod.c (wd_errno): New var.
4734 (chmod_file): New function, with most of the contents of the
4735 old prcess_file function.
4736 (process_files): Use it. This gives file names to fts one
4737 at a time, so that they are processed left-to-right as POSIX
4739 * src/chown-core.c (wd_errno, chown_files): Likewise.
4740 (chown_file): New function.
4741 * tests/install/basic-1: Redo test so as to not workaround
4742 the chmod bug, thereby testing for it.
4744 * src/shuf.c (main): Quote the entire range when reporting an
4745 invalid one, rather than just the part that contained the error.
4747 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
4748 sometimes left behind if the test is skipped or interrupted.
4750 * bootstrap (symlink_to_gnulib): New function.
4751 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
4752 to copies-of-gnulib.
4753 (cp_mark_as_generated, slurp, gnulib_files):
4754 Avoid making a copy if it's the same as the old version.
4755 (gnulib_files): Add support for this variable (used by Bison).
4757 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
4758 indicating flaw in kernel. Reword to say that the flaw isn't
4759 serious for coreutils, since the flaw does affect ls -i.
4761 * tests/chgrp/basic: Fix bug in test case exposed by building on
4762 Solaris 8 in a setgid directory. The test case incorrectly
4763 assumed that 'symlink' would be in group $g1.
4765 2006-09-18 Jim Meyering <jim@meyering.net>
4767 * NEWS: Add a line for 6.3-cvs.
4768 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
4771 * NEWS: Record the 6.2 release date.
4772 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4774 2006-09-17 Jim Meyering <jim@meyering.net>
4776 * tests/chgrp/basic: On an OpenBSD system, rather than failing
4777 due to a known problem, merely warn about it.
4778 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
4779 Instead, use stat to test file system for desired results, directly.
4780 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
4782 * tests/envvar-check: Add more variable names to the list of those
4783 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
4784 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
4786 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
4788 * NEWS: Document that mkdir -p and install -d now fork on occasion.
4789 * bootstrap.conf (gnulib_modules): Add savewd.
4790 * src/install.c: Include savewd.h.
4791 (process_dir): New function.
4792 (main, install_file_in_file_parents): Use it, along with the new
4793 savewd module, to avoid some race conditions.
4794 * src/mkdir.c: Include savewd.h.
4795 (struct mkdir_options): New members make_ancestor_function, mode,
4797 (make_ancestor): Return 1 if the resulting directory is not readable.
4798 (process_dir): New function.
4799 (main): Use it, along with new savewd module, to avoid some
4800 race conditions. Fill in new slots of struct mkdir_options, so
4801 that callees get the values.
4802 * tests/install/basic-1: Test for coreutils 5.97 bug that was
4803 fixed in coreutils 6.0, and which should still be fixed with
4805 * tests/mkdir/p-3: Likewise.
4807 2006-09-15 Jim Meyering <jim@meyering.net>
4809 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
4810 The 2006-09-08 changes made it so "mv dir new-name/" would
4811 fail on NetBSD 1.6. This makes it work once again.
4813 2006-09-14 Jim Meyering <jim@meyering.net>
4815 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
4816 Instead, since it's a little fragile, assert the condition.
4817 (target_directory_operand): Update comment to reflect latest change.
4819 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
4821 * src/who.c (print_user): Rewrite to avoid warning from
4822 GCC 4.1.1 with -Wall.
4824 2006-09-12 Jim Meyering <jim@meyering.net>
4826 * tests/mv/atomic: Check for specific strace output, rather than
4827 simply nonempty. RHEL AS 4 would fail this test due to strace
4828 generating "[ Process PID=14434 runs in 32 bit mode. ]".
4829 Reported by Nelson Beebe.
4831 2006-09-11 Jim Meyering <jim@meyering.net>
4833 * src/remove.c (remove_dir): Move new cache_stat_init call onto
4835 (rm_1): Move declaration of "st" and new cache_stat_init call
4836 "down" to nearer where they're used.
4837 * src/c99-to-c89.diff: Add another set of curly braces.
4839 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
4841 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
4842 substr's last operand is very large. Performance problem reported
4845 2006-09-09 Jim Meyering <jim@meyering.net>
4847 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
4849 (sc_require_config_h): Skip this test if there are no version-
4850 controlled .c files.
4851 (sc_prohibit_assert_without_use): Likewise.
4853 2006-09-08 Jim Meyering <jim@meyering.net>
4855 * bootstrap: Export CVS_RSH separate from its assignment, to work
4856 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
4858 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
4860 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
4861 no file operand is given, and standard input is any FIFO.
4862 This is in response to Open Group XCU ERN 114.
4863 * src/tail.c (main): Likewise.
4865 2006-09-08 Jim Meyering <jim@meyering.net>
4867 mv and "cp -r" no longer fail when invoked with two arguments
4868 where the first one names a directory and the second name ends in
4869 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
4870 now succeeds, once more. This reverts part of the 2004-06-27
4872 * NEWS: Say the above.
4873 * src/mv.c (target_directory_operand): Don't require (here)
4874 that the target operand "look like" a directory. This change
4875 pushes the test down to the rename syscall level, where a
4876 "mv dir existing-non-dir/" will mistakenly succeed on older systems
4877 that ignore trailing slashes in the rename destination argument.
4878 * src/cp.c (target_directory_operand): Likewise, but for cp.
4879 * tests/mv/trailing-slash: Exercise the above fixes.
4880 * tests/cp/trailing-slash: New file.
4881 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
4883 * bootstrap: Use the previously unused variable, $src,
4884 to avoid repeating "$GNULIB_SRCDIR/$file".
4886 * bootstrap (cp_mark_as_generated): Don't use "local", to
4887 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
4888 Rename now-global "$src" and "$dst" to have cp_ prefix.
4889 Safer, and avoids confusion.
4891 * bootstrap (cp_mark_as_generated): New function.
4892 (slurp): Use it to prepend editor hints and a warning that
4893 the file we're copying is generated.
4894 Suggestion from Bruce Korb.
4895 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
4896 Fix last-minute typo.
4898 2006-09-07 Jim Meyering <jim@meyering.net>
4900 * bootstrap: Revert last change. There are less disruptive ways
4901 to mark these generated files as read-only.
4903 * src/c99-to-c89.diff: Update to have proper offsets.
4905 2006-09-06 Jim Meyering <jim@meyering.net>
4907 Ensure that some gnulib-tool-generated files are read-only.
4908 * bootstrap (slurp): Put the body of this function in a sub-shell,
4909 with "umask a-w" so that all new files are read-only. Remove each
4910 file before we write to it, in case it's read-only.
4911 Make po/Makevars and runtime-po/Makevars read-only, too.
4913 2006-09-05 Jim Meyering <jim@meyering.net>
4915 * tests/cp/acl: Skip this test when cp lacks ACL support.
4916 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
4918 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
4919 context from change of 2006-09-02.
4921 2006-09-04 Jim Meyering <jim@meyering.net>
4923 * README-cvs: Fix typo in update command.
4925 2006-09-03 Jim Meyering <jim@meyering.net>
4927 * NEWS: Tweak the wording in the new change description so that
4928 no one can think this change causes e.g., `rm -fr foo../' to fail.
4930 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
4931 Use $CONFIG_HEADER, rather than hard-coding it.
4932 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
4934 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
4936 * NEWS: rm now rejects attempts to remove /, ./, and ../.
4937 * src/basename.c: Don't include dirname.h, since system.h does it now.
4938 * src/chmod.c: Likewise.
4939 * src/copy.c: Likewise.
4940 * src/cp.c: Likewise.
4941 * src/df.c: Likewise.
4942 * src/dircolors.c: Likewise.
4943 * src/dirname.c: Likewise.
4944 * src/du.c: Likewise.
4945 * src/install.c: Likewise.
4946 * src/ln.c: Likewise.
4947 * src/ls.c: Likewise.
4948 * src/mkdir.c: Likewise.
4949 * src/mv.c: Likewise.
4950 * src/remove.c: Likewise.
4951 * src/rm.c: Likewise.
4952 * src/rmdir.c: Likewise.
4953 * src/shred.c: Likewise.
4954 * src/split.c: Likewise.
4955 * src/su.c: Likewise.
4956 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
4958 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
4960 * src/rm.c (usage, main): --preserve-root is now the default.
4961 * src/remove.h: Fix comment.
4962 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
4963 (cache_statted, cache_stat_ok): New functions.
4964 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
4965 which is no longer needed with the new functions. All callers
4967 (prompt, is_dir_lstat, remove_entry, remove_dir):
4968 New struct stat * arg. All callers changed.
4969 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
4970 (remove_cwd_entries, remove_dir, rm_1):
4971 Use and maintain the file status cache.
4972 (prompt, remove_entry): Omit the first "directory" in the diagnostic
4973 "Cannot remove directory `foo': is a directory". This causes "rm"
4974 to pass a test case that it would otherwise fail now that it
4975 "knows" more about its argument. I think the diagnostic is better
4976 without the first "directory" anyway.
4977 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
4978 (rm_1): Reject attempts to remove /, ./, or ../.
4979 * tests/rm/Makefile.am (TESTS): Add r-4.
4980 * tests/rm/r-4: New file.
4982 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
4984 * src/stat.c: Include <stddef.h>
4985 (alignof): New macro.
4986 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
4988 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
4990 (print_statfs): If f_fsid isn't an integer, grab its words one
4991 at a time in little-endian order. This is a bit easier to configure
4992 and should avoid a compilation failure on MacOS reported by Bruno
4995 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
4997 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
4998 work around a Mac OS X porting problem reported by Bruno Haible in
4999 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
5000 (print_statfs): Use them.
5002 * bootstrap.conf (gnulib_modules): Add isapipe.
5003 * src/tail.c: Include isapipe.h.
5004 (IS_PIPE_LIKE_FILE_TYPE): Remove.
5005 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
5006 tailable, since this seems to be portable.
5007 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
5008 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
5010 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
5013 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
5015 * src/copy.c (copy_internal): Don't test whether macros like
5016 S_ISLNK are defined, since they're always defined now.
5017 * src/cp.c (main): Likewise.
5018 * src/ln.c (main): Likewise.
5019 * src/ls.c (get_link_name, make_link_name): Likewise.
5020 * src/mknod.c (main): Likewise.
5021 * src/mkfifo.c (usage): Likewise.
5022 * src/who.c (S_IWGRP): Likewise.
5024 Adjust to recent gnulib changes for the gnulib module.
5025 * bootstrap.conf (gnulib_modules): Add fcntl.
5026 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
5027 is already assuming these macros are defined.
5028 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
5029 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
5030 Remove; the fcntl module now handles these.
5032 Adjust to recent gnulib changes for the inttypes module.
5033 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
5034 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
5036 * src/system.h: Don't bother to include <stdint.h>, since we can
5037 now assume inttypes.h does the equivalent of including stdint.h.
5039 2006-08-27 Jim Meyering <jim@meyering.net>
5041 * src/copy.c (copy_internal): Don't make a backup if the last
5042 component of the source name is "." or "..".
5043 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
5044 * NEWS: Mention this.
5045 * tests/cp/src-base-dot: New file. Test for the above fix.
5046 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
5048 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
5049 (dot_or_dotdot): ...new static inline function.
5050 * src/remove.c (rm_1): Reflect this renaming.
5051 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
5053 * src/copy.c (copy_internal): Add comments.
5055 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
5057 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
5058 since Automake supplies them for us. It always did -I$(srcdir),
5059 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
5060 is now also doing -I../lib.
5062 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
5063 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
5064 since there might not be any .po files.
5065 (WGET_COMMAND): Set to empty if wget doesn't
5066 seem to be available.
5068 2006-08-26 Jim Meyering <jim@meyering.net>
5070 This test was failing in some environments.
5071 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
5072 to set LS_COLORS in the environment.
5073 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
5074 Reported by Bob Proulx.
5076 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
5078 * Makefile.am (EXTRA_DIST): Remove these files here, too:
5079 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
5080 .x-sc_two_space_separator_in_usage.
5082 Fix "mv --verbose --backup" so its output includes the
5083 " (backup: foo.~1~)" suffix also when backing up a directory.
5084 * NEWS: Report this bug fix.
5085 * src/copy.c (emit_verbose): New function, factored out of...
5086 (copy_internal): ...here. Use the new function.
5087 * tests/mv/backup-dir: Test for the above fix.
5088 * tests/mv/Makefile.am (TESTS): Add backup-dir.
5090 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
5092 * .x-sc_no_if_have_config_h: Remove; no longer needed.
5093 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
5094 * .x-sc_two_space_separator_in_usage: Likewise.
5095 * Makefile.maint (sc_no_have_config_h): Renamed from
5096 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
5097 is absent everywhere.
5098 * bootstrap.conf (gnulib_modules): Add config-h.
5099 * src/shred.c: Include <config.h> unconditionally, since
5100 we now assume config.h exists.
5101 * src/dircolors.c: Likewise.
5103 2006-08-26 Jim Meyering <jim@meyering.net>
5105 "ls --color" would highlight other-writable and sticky directories
5106 no differently than regular directories on a file system with
5107 dirent.d_type support.
5108 * NEWS: Say the above.
5109 * src/ls.c (gobble_file): With --color, also stat the file when
5110 we know it is a directory.
5111 Derived from an anonymous one-line fix and bug report:
5112 <http://savannah.gnu.org/bugs/?15043>.
5113 * tests/ls/color-dtype-dir: New file. Test for the above fix.
5114 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
5116 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
5118 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
5120 * bootstrap.conf: Add configmake, verify.
5121 * src/.cvsignore: Remove localedir.h.
5122 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
5123 subsumed by configmake.
5124 * src/system.h: Include configmake.h rather than localedir.h
5125 (LOCALEDIR): New macro.
5127 Rewrite to avoid some unnecessary casts, macros, literals.
5128 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
5130 (SECTOR_SIZE, SECTOR_MASK): New constants.
5131 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
5132 and use the SECTOR_* constants when applicable. Check for size <
5133 0 rather than size == -1, since negative-size files are a sign of
5136 2006-08-25 Bruno Haible <bruno@clisp.org>
5138 * src/shred.c (dopass): Assume a continuable error if EIO even
5139 if the current position is not a multiple of 512.
5141 2006-08-24 Jim Meyering <jim@meyering.net>
5143 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
5145 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
5147 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
5148 macro was being used without being defined.
5149 (SB_F_NAMEMAX): Remove cast.
5150 (f_fsid) [BeOS]: Likewise.
5151 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
5153 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
5155 (xstrcat): Remove. All uses changed to use the above functions.
5156 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
5157 buffer len. All uses changed. Output '?', not '*', for unknown
5158 data or errors. Do not assume signed values can be interchanged
5159 with unsigned when printing.
5160 (print_statfs): For %i, print the fsid as a single int, not as a
5162 (print_it): Quote invalid format better.
5164 * NEWS: printf supports the I flag.
5165 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
5167 2006-08-23 Bruno Haible <bruno@clisp.org>
5169 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
5170 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
5171 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
5173 * src/ls.c (SA_RESTART): Fallback define.
5175 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
5177 * src/system.h (EDQUOT): Define if not already defined.
5178 Problem reported by Bruno Haible for BeOS.
5180 * .cvsignore: Remove config.h, config.hin, as they are now
5182 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
5184 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
5186 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
5187 to accommodate today's gnulib change.
5189 2006-08-23 Jim Meyering <jim@meyering.net>
5191 * NEWS: Mention the sweeping infrastructure changes.
5193 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
5195 * bootstrap.conf (gnulib_modules): Add gnupload.
5196 * Makefile.maint (emit_upload_commands): gnupload is now
5198 * gnupload: Remove from CVS, since it's now a gnulib module.
5200 * bootstrap (bootstrap_conf_cleanup): Remove.
5201 (excluded_files): New var.
5202 * bootstrap.conf: Likewise.
5203 * bootstrap (slurp): Exclude files early if they're in the
5204 excluded_files list. That way, their names don't get put into
5207 * aclocal.m4, config.hin, configure:
5208 Remove from CVS, since ./bootstrap generates them automatically.
5209 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
5210 configure, *.cache, *.lineno, *.log.
5211 Remove more-specific entries. This catches files like configure.lineno.
5212 * man/.cvsignore: Add Makefile.in.
5213 * src/.cvsignore: Add Makefile.in.
5214 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
5217 * tests/chgrp/.cvsignore:
5218 * tests/chmod/.cvsignore:
5219 * tests/chown/.cvsignore:
5220 * tests/cp/.cvsignore:
5221 * tests/cut/.cvsignore:
5222 * tests/dd/.cvsignore:
5223 * tests/dircolors/.cvsignore:
5224 * tests/du/.cvsignore:
5225 * tests/expr/.cvsignore:
5226 * tests/factor/.cvsignore:
5227 * tests/fmt/.cvsignore:
5228 * tests/head/.cvsignore:
5229 * tests/install/.cvsignore:
5230 * tests/join/.cvsignore:
5231 * tests/ln/.cvsignore:
5232 * tests/ls/.cvsignore:
5233 * tests/ls-2/.cvsignore:
5234 * tests/md5sum/.cvsignore:
5235 * tests/misc/.cvsignore:
5236 * tests/mkdir/.cvsignore:
5237 * tests/mv/.cvsignore:
5238 * tests/od/.cvsignore:
5239 * tests/pr/.cvsignore:
5240 * tests/readlink/.cvsignore:
5241 * tests/rm/.cvsignore:
5242 * tests/rmdir/.cvsignore:
5243 * tests/seq/.cvsignore:
5244 * tests/sha1sum/.cvsignore:
5245 * tests/shred/.cvsignore:
5246 * tests/sort/.cvsignore:
5247 * tests/stty/.cvsignore:
5248 * tests/sum/.cvsignore:
5249 * tests/tac/.cvsignore:
5250 * tests/tail/.cvsignore:
5251 * tests/tail-2/.cvsignore:
5252 * tests/tee/.cvsignore:
5253 * tests/test/.cvsignore:
5254 * tests/touch/.cvsignore:
5255 * tests/tr/.cvsignore:
5256 * tests/tsort/.cvsignore:
5257 * tests/unexpand/.cvsignore:
5258 * tests/uniq/.cvsignore:
5259 * tests/wc/.cvsignore:
5260 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
5261 *.X, *.O, *-tests, build-script, mk-script if they're never
5262 created in this directory.
5264 2006-08-22 Bruno Haible <bruno@clisp.org>
5267 * src/uptime.c: Include OS.h if it exists.
5268 (print_uptime): On BeOS, use the get_system_info function (actually a
5269 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
5270 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
5272 2006-08-22 Jim Meyering <jim@meyering.net>
5274 * .cvsignore: Add ABOUT-NLS.
5276 Move the check-AUTHORS rule to be run as part of "make distcheck",
5277 rather than "make check".
5278 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
5279 cause "make check" to fail on systems unable to build all binaries.
5280 * Makefile.maint (check-AUTHORS): New rule.
5281 (local-checks-available): Add it here.
5282 Reported by Bruno Haible. Needed for BeOS.
5284 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
5286 * src/df.c (print_header, show_dev): Use a column width that
5287 depends on the block size of -P is specified and not autoscaling.
5288 Problem reported by Gustavo G. Rondina in:
5289 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
5291 2006-08-21 Jim Meyering <jim@meyering.net>
5293 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
5294 when the shell variable, SHELL, is not set.
5295 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
5296 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
5298 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
5299 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
5300 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
5301 od: invalid type string `u8';
5302 this system doesn't provide a 8-byte integral type
5303 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
5305 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
5307 Add a bootstrap procedure, so that the CVS version contains fewer
5308 files and we bootstrap the rest from gnulib, gettext, etc.
5309 * README-cvs: New file.
5310 * bootstrap: New file.
5311 * bootstrap.conf: New file.
5312 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
5313 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
5315 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
5316 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
5318 (gl_MACROS): Call just after gl_EARLY, just for clarity.
5319 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
5320 * src/kill.c (strtoimax): Remove decl.
5321 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
5322 * src/wc.c: Likewise.
5323 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
5324 declaration, so that we don't need to patch this file.
5325 * src/printf.c (strtoimax, strtoumax): Remove decls.
5326 * src/su.c: Include getpass.h.
5328 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
5329 Include inttypes.h unconditionally.
5330 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
5331 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
5332 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
5333 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
5334 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
5336 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
5337 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
5338 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
5339 * tests/cp/Makefile.in, tests/cut/Makefile.in:
5340 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
5341 * tests/du/Makefile.in, tests/expr/Makefile.in:
5342 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
5343 * tests/general/Makefile.in, tests/head/Makefile.in:
5344 * tests/install/Makefile.in, tests/join/Makefile.in:
5345 * tests/ln/Makefile.in, tests/ls/Makefile.in:
5346 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
5347 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
5348 * tests/mv/Makefile.in, tests/od/Makefile.in:
5349 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
5350 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
5351 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
5352 * tests/shred/Makefile.in, tests/sort/Makefile.in:
5353 * tests/stty/Makefile.in, tests/sum/Makefile.in:
5354 * tests/tac/Makefile.in, tests/tail/Makefile.in:
5355 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
5356 * tests/test/Makefile.in, tests/touch/Makefile.in:
5357 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
5358 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
5359 * tests/wc/Makefile.in:
5360 Remove from CVS, since ./bootstrap generates them automatically.
5362 2006-08-20 Eric Blake <ebb9@byu.net>
5364 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
5365 the patch from 2006-08-18 broke on cygwin.
5367 2006-08-20 Jim Meyering <jim@meyering.net>
5369 * NEWS: Add a line for 6.2-cvs.
5370 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
5372 2006-08-19 Jim Meyering <jim@meyering.net>
5375 * NEWS: Record the 6.1 release date.
5376 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
5378 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
5380 Avoid test failure when `make check' is run through debuild.
5381 * tests/help-version: Ensure that $SHELL is set to some value
5382 and exported. Patch from Sven Joachim. For details, see
5383 <http://bugs.debian.org/355368>.
5385 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
5387 * README: Describe potential "pre-C99 build failure", and work-around.
5389 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
5390 backed out due to updates provoked by the copyright changes.
5391 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
5392 it propagates to the derived Makefile.am files.
5393 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
5394 so we don't mistakenly edit them again.
5395 * tests/cut/Makefile.am: Regenerate.
5396 * tests/head/Makefile.am: Likewise.
5397 * tests/join/Makefile.am: Likewise.
5398 * tests/pr/Makefile.am: Likewise.
5399 * tests/sort/Makefile.am: Likewise.
5400 * tests/tac/Makefile.am: Likewise.
5401 * tests/tail/Makefile.am: Likewise.
5402 * tests/test/Makefile.am: Likewise.
5403 * tests/tr/Makefile.am: Likewise.
5404 * tests/uniq/Makefile.am: Likewise.
5405 * tests/wc/Makefile.am: Likewise.
5407 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
5408 when the file's apparent size is not a multiple of its block size.
5409 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
5410 For some file sizes, writing that single byte would unnecessarily
5411 waste a few file blocks. That write may have been necessary in the
5412 early days of Linux, but now, removing it should be safe.
5413 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
5414 * tests/cp/sparse: New test for the above.
5415 * tests/cp/Makefile.am (TESTS): Add sparse.
5417 * tests/sparse-file: New file, essence factored out of...
5418 * tests/du/8gb: ... here. Use the new script.
5420 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
5422 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
5423 the CVS gettext manual now suggests 1000000.
5425 2006-08-18 Bruno Haible <bruno@clisp.org>
5427 Add support for NetBSD 3.0.
5428 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
5430 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
5431 has a field f_fstypename.
5432 This undoes the 2006-08-15 to src/stat.c.
5434 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
5436 Copyright notice fixes.
5438 * COPYING: Upgrade to latest version from FSF.
5440 * src/uname.c: Use (C) in copyright notice.
5442 * .vg-suppressions: Add copyright notice.
5443 * ChangeLog: Likewise.
5444 * ChangeLog-2005: Likewise.
5445 * Makefile.am: Likewise.
5448 * README-valgrind: Likewise.
5450 * announce-gen: Likewise.
5451 * man/Makefile.am: Likewise.
5452 * man/chmod.x: Likewise.
5453 * man/chown.x: Likewise.
5454 * man/df.x: Likewise.
5455 * man/du.x: Likewise.
5456 * man/rm.x: Likewise.
5457 * src/dircolors.hin: Likewise.
5458 * src/du-tests: Likewise.
5459 * src/extract-magic: Likewise.
5460 * src/tac-pipe.c: Likewise.
5461 * src/wheel-gen.pl: Likewise.
5462 * tests/Coreutils.pm: Likewise.
5463 * tests/Makefile.am.in: Likewise.
5464 * tests/acl: Likewise.
5465 * tests/envvar-check: Likewise.
5466 * tests/expensive: Likewise.
5467 * tests/group-names: Likewise.
5468 * tests/help-version: Likewise.
5469 * tests/mk-script: Likewise.
5470 * tests/priv-check: Likewise.
5471 * tests/rwx-to-mode: Likewise.
5472 * tests/sample-test: Likewise.
5473 * tests/setgid-check: Likewise.
5474 * tests/chgrp/basic: Likewise.
5475 * tests/chgrp/deref: Likewise.
5476 * tests/chgrp/no-x: Likewise.
5477 * tests/chgrp/posix-H: Likewise.
5478 * tests/chgrp/recurse: Likewise.
5479 * tests/chmod/c-option: Likewise.
5480 * tests/chmod/equal-x: Likewise.
5481 * tests/chmod/equals: Likewise.
5482 * tests/chmod/no-x: Likewise.
5483 * tests/chmod/octal: Likewise.
5484 * tests/chmod/setgid: Likewise.
5485 * tests/chmod/umask-x: Likewise.
5486 * tests/chmod/usage: Likewise.
5487 * tests/chown/basic: Likewise.
5488 * tests/chown/deref: Likewise.
5489 * tests/chown/separator: Likewise.
5490 * tests/cp/Makefile.am: Likewise.
5491 * tests/cp/acl: Likewise.
5492 * tests/cp/backup-1: Likewise.
5493 * tests/cp/backup-is-src: Likewise.
5494 * tests/cp/cp-HL: Likewise.
5495 * tests/cp/cp-deref: Likewise.
5496 * tests/cp/cp-mv-backup: Likewise.
5497 * tests/cp/cp-parents: Likewise.
5498 * tests/cp/deref-slink: Likewise.
5499 * tests/cp/dir-rm-dest: Likewise.
5500 * tests/cp/dir-slash: Likewise.
5501 * tests/cp/dir-vs-file: Likewise.
5502 * tests/cp/fail-perm: Likewise.
5503 * tests/cp/into-self: Likewise.
5504 * tests/cp/link: Likewise.
5505 * tests/cp/link-no-deref: Likewise.
5506 * tests/cp/link-preserve: Likewise.
5507 * tests/cp/no-deref-link1: Likewise.
5508 * tests/cp/no-deref-link2: Likewise.
5509 * tests/cp/no-deref-link3: Likewise.
5510 * tests/cp/perm: Likewise.
5511 * tests/cp/preserve-2: Likewise.
5512 * tests/cp/r-vs-symlink: Likewise.
5513 * tests/cp/same-file: Likewise.
5514 * tests/cp/slink-2-slink: Likewise.
5515 * tests/cp/special-bits: Likewise.
5516 * tests/cp/symlink-slash: Likewise.
5517 * tests/cut/Makefile.am: Likewise.
5518 * tests/cut/Test.pm: Likewise.
5519 * tests/dd/misc: Likewise.
5520 * tests/dd/not-rewound: Likewise.
5521 * tests/dd/skip-seek: Likewise.
5522 * tests/dd/skip-seek2: Likewise.
5523 * tests/dd/unblock-sync: Likewise.
5524 * tests/dircolors/simple: Likewise.
5525 * tests/du/2g: Likewise.
5526 * tests/du/8gb: Likewise.
5527 * tests/du/Makefile.am: Likewise.
5528 * tests/du/basic: Likewise.
5529 * tests/du/deref: Likewise.
5530 * tests/du/deref-args: Likewise.
5531 * tests/du/exclude: Likewise.
5532 * tests/du/fd-leak: Likewise.
5533 * tests/du/files0-from: Likewise.
5534 * tests/du/hard-link: Likewise.
5535 * tests/du/inaccessible-cwd: Likewise.
5536 * tests/du/long-from-unreadable: Likewise.
5537 * tests/du/long-sloop: Likewise.
5538 * tests/du/no-deref: Likewise.
5539 * tests/du/no-x: Likewise.
5540 * tests/du/restore-wd: Likewise.
5541 * tests/du/slash: Likewise.
5542 * tests/du/slink: Likewise.
5543 * tests/du/trailing-slash: Likewise.
5544 * tests/du/two-args: Likewise.
5545 * tests/expr/basic: Likewise.
5546 * tests/factor/basic: Likewise.
5547 * tests/fmt/basic: Likewise.
5548 * tests/fmt/long-line: Likewise.
5549 * tests/general/Makefile.am: Likewise.
5550 * tests/general/atgeneral.m4: Likewise.
5551 * tests/general/dd.at: Likewise.
5552 * tests/head/Makefile.am: Likewise.
5553 * tests/head/Test.pm: Likewise.
5554 * tests/install/basic-1: Likewise.
5555 * tests/install/create-leading: Likewise.
5556 * tests/install/d-slashdot: Likewise.
5557 * tests/install/trap: Likewise.
5558 * tests/join/Makefile.am: Likewise.
5559 * tests/join/Test.pm: Likewise.
5560 * tests/ln/backup-1: Likewise.
5561 * tests/ln/misc: Likewise.
5562 * tests/ln/sf-1: Likewise.
5563 * tests/ln/target-1: Likewise.
5564 * tests/ls/Makefile.am: Likewise.
5565 * tests/ls/Test.pm: Likewise.
5566 * tests/ls/dangle: Likewise.
5567 * tests/ls/dired: Likewise.
5568 * tests/ls/file-type: Likewise.
5569 * tests/ls/follow-slink: Likewise.
5570 * tests/ls/infloop: Likewise.
5571 * tests/ls/inode: Likewise.
5572 * tests/ls/m-option: Likewise.
5573 * tests/ls/no-arg: Likewise.
5574 * tests/ls/recursive: Likewise.
5575 * tests/ls/rt-1: Likewise.
5576 * tests/ls/stat-dtype: Likewise.
5577 * tests/ls/stat-failed: Likewise.
5578 * tests/ls/stat-vs-dirent: Likewise.
5579 * tests/ls/symlink-slash: Likewise.
5580 * tests/ls/time-1: Likewise.
5581 * tests/ls-2/tests: Likewise.
5582 * tests/md5sum/basic-1: Likewise.
5583 * tests/md5sum/newline-1: Likewise.
5584 * tests/misc/Makefile.am: Likewise.
5585 * tests/misc/base64: Likewise.
5586 * tests/misc/basename: Likewise.
5587 * tests/misc/cat-proc: Likewise.
5588 * tests/misc/close-stdout: Likewise.
5589 * tests/misc/csplit: Likewise.
5590 * tests/misc/date: Likewise.
5591 * tests/misc/date-sec: Likewise.
5592 * tests/misc/df: Likewise.
5593 * tests/misc/dirname: Likewise.
5594 * tests/misc/expand: Likewise.
5595 * tests/misc/false-status: Likewise.
5596 * tests/misc/fold: Likewise.
5597 * tests/misc/head-c: Likewise.
5598 * tests/misc/head-elide-tail: Likewise.
5599 * tests/misc/head-pos: Likewise.
5600 * tests/misc/mknod: Likewise.
5601 * tests/misc/nice: Likewise.
5602 * tests/misc/nl: Likewise.
5603 * tests/misc/nohup: Likewise.
5604 * tests/misc/paste-no-nl: Likewise.
5605 * tests/misc/pathchk1: Likewise.
5606 * tests/misc/printf: Likewise.
5607 * tests/misc/printf-hex: Likewise.
5608 * tests/misc/pwd-long: Likewise.
5609 * tests/misc/sha224sum: Likewise.
5610 * tests/misc/sha256sum: Likewise.
5611 * tests/misc/sha384sum: Likewise.
5612 * tests/misc/sha512sum: Likewise.
5613 * tests/misc/shuf: Likewise.
5614 * tests/misc/sort-merge: Likewise.
5615 * tests/misc/sort-rand: Likewise.
5616 * tests/misc/split-a: Likewise.
5617 * tests/misc/split-fail: Likewise.
5618 * tests/misc/split-l: Likewise.
5619 * tests/misc/stat-fmt: Likewise.
5620 * tests/misc/stat-printf: Likewise.
5621 * tests/misc/tac-continue: Likewise.
5622 * tests/misc/test-diag: Likewise.
5623 * tests/misc/tty-eof: Likewise.
5624 * tests/misc/wc-files0: Likewise.
5625 * tests/misc/wc-files0-from: Likewise.
5626 * tests/mkdir/concurrent-1: Likewise.
5627 * tests/mkdir/p-1: Likewise.
5628 * tests/mkdir/p-2: Likewise.
5629 * tests/mkdir/p-3: Likewise.
5630 * tests/mkdir/p-slashdot: Likewise.
5631 * tests/mkdir/p-thru-slink: Likewise.
5632 * tests/mkdir/parents: Likewise.
5633 * tests/mkdir/perm: Likewise.
5634 * tests/mkdir/special-1: Likewise.
5635 * tests/mkdir/t-slash: Likewise.
5636 * tests/mkdir/writable-under-readonly: Likewise.
5637 * tests/mv/Makefile.am: Likewise.
5638 * tests/mv/acl: Likewise.
5639 * tests/mv/atomic: Likewise.
5640 * tests/mv/backup-is-src: Likewise.
5641 * tests/mv/childproof: Likewise.
5642 * tests/mv/diag: Likewise.
5643 * tests/mv/dir-file: Likewise.
5644 * tests/mv/dir2dir: Likewise.
5645 * tests/mv/dup-source: Likewise.
5646 * tests/mv/force: Likewise.
5647 * tests/mv/hard-2: Likewise.
5648 * tests/mv/hard-3: Likewise.
5649 * tests/mv/hard-4: Likewise.
5650 * tests/mv/hard-link-1: Likewise.
5651 * tests/mv/i-1: Likewise.
5652 * tests/mv/i-2: Likewise.
5653 * tests/mv/i-3: Likewise.
5654 * tests/mv/i-4: Likewise.
5655 * tests/mv/i-link-no: Likewise.
5656 * tests/mv/into-self: Likewise.
5657 * tests/mv/into-self-2: Likewise.
5658 * tests/mv/into-self-3: Likewise.
5659 * tests/mv/into-self-4: Likewise.
5660 * tests/mv/leak-fd: Likewise.
5661 * tests/mv/mv-special-1: Likewise.
5662 * tests/mv/no-target-dir: Likewise.
5663 * tests/mv/part-fail: Likewise.
5664 * tests/mv/part-hardlink: Likewise.
5665 * tests/mv/part-rename: Likewise.
5666 * tests/mv/part-symlink: Likewise.
5667 * tests/mv/partition-perm: Likewise.
5668 * tests/mv/perm-1: Likewise.
5669 * tests/mv/reply-no: Likewise.
5670 * tests/mv/setup: Likewise.
5671 * tests/mv/to-symlink: Likewise.
5672 * tests/mv/trailing-slash: Likewise.
5673 * tests/mv/update: Likewise.
5674 * tests/mv/vfat: Likewise.
5675 * tests/od/od-N: Likewise.
5676 * tests/od/x8: Likewise.
5677 * tests/pr/Makefile.am: Likewise.
5678 * tests/pr/Test.pm: Likewise.
5679 * tests/readlink/can-e: Likewise.
5680 * tests/readlink/can-f: Likewise.
5681 * tests/readlink/can-m: Likewise.
5682 * tests/readlink/rl-1: Likewise.
5683 * tests/rm/Makefile.am: Likewise.
5684 * tests/rm/cycle: Likewise.
5685 * tests/rm/dangling-symlink: Likewise.
5686 * tests/rm/deep-1: Likewise.
5687 * tests/rm/dir-no-w: Likewise.
5688 * tests/rm/dir-nonrecur: Likewise.
5689 * tests/rm/dot-rel: Likewise.
5690 * tests/rm/empty-inacc: Likewise.
5691 * tests/rm/empty-name: Likewise.
5692 * tests/rm/f-1: Likewise.
5693 * tests/rm/fail-2eperm: Likewise.
5694 * tests/rm/fail-eperm: Likewise.
5695 * tests/rm/hash: Likewise.
5696 * tests/rm/i-1: Likewise.
5697 * tests/rm/i-no-r: Likewise.
5698 * tests/rm/inaccessible: Likewise.
5699 * tests/rm/interactive-always: Likewise.
5700 * tests/rm/interactive-once: Likewise.
5701 * tests/rm/ir-1: Likewise.
5702 * tests/rm/isatty: Likewise.
5703 * tests/rm/no-give-up: Likewise.
5704 * tests/rm/r-1: Likewise.
5705 * tests/rm/r-2: Likewise.
5706 * tests/rm/r-3: Likewise.
5707 * tests/rm/rm1: Likewise.
5708 * tests/rm/rm2: Likewise.
5709 * tests/rm/rm3: Likewise.
5710 * tests/rm/rm4: Likewise.
5711 * tests/rm/rm5: Likewise.
5712 * tests/rm/sunos-1: Likewise.
5713 * tests/rm/unread2: Likewise.
5714 * tests/rm/unread3: Likewise.
5715 * tests/rm/unreadable: Likewise.
5716 * tests/rmdir/fail-perm: Likewise.
5717 * tests/rmdir/ignore: Likewise.
5718 * tests/rmdir/t-slash: Likewise.
5719 * tests/seq/basic: Likewise.
5720 * tests/sha1sum/basic-1: Likewise.
5721 * tests/sha1sum/sample-vec: Likewise.
5722 * tests/shred/exact: Likewise.
5723 * tests/shred/remove: Likewise.
5724 * tests/sort/Makefile.am: Likewise.
5725 * tests/sort/Test.pm: Likewise.
5726 * tests/sort-time/Makefile: Likewise.
5727 * tests/sort-time/README: Likewise.
5728 * tests/sort-time/rand-gen: Likewise.
5729 * tests/stty/basic-1: Likewise.
5730 * tests/stty/row-col-1: Likewise.
5731 * tests/sum/basic-1: Likewise.
5732 * tests/sum/sysv: Likewise.
5733 * tests/tac/Makefile.am: Likewise.
5734 * tests/tac/Test.pm: Likewise.
5735 * tests/tail/Makefile.am: Likewise.
5736 * tests/tail/Test.pm: Likewise.
5737 * tests/tail-2/Makefile.am: Likewise.
5738 * tests/tail-2/append-only: Likewise.
5739 * tests/tail-2/assert: Likewise.
5740 * tests/tail-2/assert-2: Likewise.
5741 * tests/tail-2/big-4gb: Likewise.
5742 * tests/tail-2/fflush: Likewise.
5743 * tests/tail-2/infloop-1: Likewise.
5744 * tests/tail-2/proc-ksyms: Likewise.
5745 * tests/tail-2/start-middle: Likewise.
5746 * tests/tail-2/tail-n0f: Likewise.
5747 * tests/tee/basic: Likewise.
5748 * tests/tee/dash: Likewise.
5749 * tests/test/Makefile.am: Likewise.
5750 * tests/test/Test.pm: Likewise.
5751 * tests/touch/Makefile.am: Likewise.
5752 * tests/touch/dangling-symlink: Likewise.
5753 * tests/touch/empty-file: Likewise.
5754 * tests/touch/fail-diag: Likewise.
5755 * tests/touch/fifo: Likewise.
5756 * tests/touch/no-create-missing: Likewise.
5757 * tests/touch/no-rights: Likewise.
5758 * tests/touch/not-owner: Likewise.
5759 * tests/touch/obsolescent: Likewise.
5760 * tests/touch/read-only: Likewise.
5761 * tests/touch/relative: Likewise.
5762 * tests/tr/Makefile.am: Likewise.
5763 * tests/tr/Test.pm: Likewise.
5764 * tests/tr/failures: Likewise.
5765 * tests/tsort/basic-1: Likewise.
5766 * tests/unexpand/basic-1: Likewise.
5767 * tests/uniq/Makefile.am: Likewise.
5768 * tests/uniq/Test.pm: Likewise.
5769 * tests/wc/Makefile.am: Likewise.
5770 * tests/wc/Test.pm: Likewise.
5772 2006-08-17 Jim Meyering <jim@meyering.net>
5774 ls -CF would misalign columns in some cases.
5775 * src/ls.c (get_type_indicator): New function. extracted from...
5776 (print_type_indicator): ...here. Use it.
5777 (length_of_file_name_and_frills): Use it here, too, rather than
5778 assuming stat.st_mode is valid.
5779 Reported by Andreas Schwab, here:
5780 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
5781 See the test for this above. FYI, I did ls -CF /proc and visually
5782 inspected the result.
5784 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
5785 to mention the now-removed cp_options.xstat member.
5787 * Makefile.maint (patch-check): Adapt to work now that the patch
5788 modifies more than one file in src/.
5790 With this patch, permit building with Solaris cc on Solaris 7.
5791 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
5792 This integrates patches from Bruno Haible.
5794 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
5796 Fix some problems reported by Bruno Haible.
5797 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
5798 Skip this test if "chmod g+s d" silently does nothing.
5799 * tests/ls-2/tests: Skip this test suite if we can't set up files
5800 properly for the setuid-etc test. This simplifies some of the
5801 hacks we were using to work around porting problems.
5803 2006-08-16 Jim Meyering <jim@meyering.net>
5805 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
5806 * tests/cp/acl: Instead, skip the test if either setfacl
5808 Reported by Michael Stone.
5810 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
5812 * tests/lang-default (LC_ALL): Set to "C", so we get
5813 English-language diagnostics. Unset the other variables; it
5814 should be portable to use 'unset' for this stuff nowadays.
5815 Problem reported by Bruno Haible. Using "C" reverses the
5816 2000-10-22 change to fileutils in this area.
5818 Fix bugs when printing plurals of numbers that are not
5819 unsigned long int values.
5820 * src/system.h (select_plural): New function.
5821 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
5822 * src/uptime.c (print_uptime): Likewise.
5823 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
5824 print a floating point number, as reducing to 0 or 1 doesn't work
5825 for some languages. Instead, just use "s" for seconds since it
5826 doesn't need a plural form.
5828 2006-08-16 Bruno Haible <bruno@clisp.org>
5830 Old versions of gzip would write --help output to stderr, and it
5831 would be annoying to see that in the output of every "make" command.
5832 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
5835 2006-08-16 Andreas Schwab <schwab@suse.de>
5837 * tests/cp/acl: Don't use non-portable == operator for test.
5839 2006-08-16 Jim Meyering <jim@meyering.net>
5841 * tests/ls/stat-dtype: Use stat to test file system type, rather
5842 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
5844 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
5846 * NEWS: Mention that df exits with nonzero status if it generates
5847 no output. This change was in 6.0 but inadvertently unmentioned.
5848 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
5850 (show_dev): Don't set it until we actually output something.
5851 Print the header if this is the first output.
5852 (main): Don't print a header, as that is now show_dev's job.
5853 * tests/misc/Makefile.am (TESTS): Add df.
5854 * tests/misc/df: New file.
5856 2006-08-15 Eric Blake <ebb9@byu.net>
5858 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
5859 statvfs.f_type not present. See
5860 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
5862 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
5864 * src/dd.c (print_stats): Don't substitute "1" for number, as this
5865 causes confusion for the Hungarian translators. Problem reported
5866 by Egmont Koblinger here:
5867 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
5869 2006-08-15 Jim Meyering <jim@meyering.net>
5871 * .x-sc_require_config_h: Add lib/at-func.c.
5873 * NEWS: Add a line for 6.1-cvs.
5874 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
5876 2006-08-15 Jim Meyering <jim@meyering.net>
5879 * NEWS: Record the 6.0 release date.
5880 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
5882 * TODO: Add an item (convert to use gnulib-tool), add to the plan
5883 for id-vs-getgrouplist, and remove a few completed items.
5885 * Makefile.maint (alpha beta major): Fix syntax error.
5887 2006-08-13 Jim Meyering <jim@meyering.net>
5889 * src/shred.c (usage): Don't indent the second line of an item.
5890 Otherwise, help2man would misformat the output.
5891 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
5893 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
5895 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
5896 Suggested by Eric Blake to avoid problems like
5897 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
5899 2006-08-11 Jim Meyering <jim@meyering.net>
5901 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
5902 failure that this test checks for (stat/dirent inode mismatch at
5903 a mount point), so continue to give a diagnostic about the failure,
5904 but don't actually count it as a failure.
5906 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
5908 * ABOUT-NLS: Update from gettext 0.15.
5909 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
5911 * src/csplit.c (struct control): Remove fastmap member.
5912 (extract_regexp): Allocate fastmap separately, since otherwise
5913 it might move due to a realloc. This fixes a bug that led
5914 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
5916 2006-08-10 Jim Meyering <jim@meyering.net>
5918 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
5919 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
5920 Redirect both stdout and stderr of df invocations.
5922 * src/dircolors.hin: Add a TERM directive for each of the following:
5923 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
5924 rxvt-cygwin-native, screen.linux, xterm-256color.
5925 Sort the TERM directives.
5926 From Mike Frysinger.
5928 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
5930 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
5931 See Debian bug 373736.
5933 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
5936 * src/.cvsignore: Add shuf.
5938 * Makefile.maint: Remove the po-update procedure; it doesn't
5939 work with the new repository on http://www.iro.umontreal.ca/.
5940 For now I guess we'll have to fix things by hand.
5941 (do-po-update, po-update): Remove. All references removed.
5943 * src/shuf.c (next_line): New function.
5944 (read_input): Use it, to avoid relying on GCC-specific behavior
5945 with void * arithmetic. Problem reported by Bob Proulx.
5946 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
5947 to detect this sort of problem automatically in the future.
5949 2006-08-09 Jim Meyering <jim@meyering.net>
5951 * src/ls.c: Add a compile-time check to ensure that filetype
5952 and filetype_letter have the same number of elements.
5954 * tests/misc/sort-rand: Remove use of --seed=S.
5956 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
5958 Add a command 'shuf', and modify shred and sort to use the new
5959 random number generator library of 'shuf'.
5961 * AUTHORS: Add shuf.
5963 * NEWS: Likewise. Mention new --random-source option for shred
5964 and sort. Move "sort +1 -2" notice to the appropriate section,
5965 and clarify its role with respect to POSIXLY_CORRECT.
5966 * man/.cvsignore: Add shuf.1.
5967 * man/Makefile.am (dist_man_MANS): Add shuf.1.
5968 (shuf.1): New dependency.
5969 * man/shuf.x: New file.
5970 * src/Makefile.am (bin_PROGRAMS): Add shuf.
5971 (EXTRA_DIST): Remove rand-isaac.c.
5972 (shuf_LDADD): New macro.
5973 * src/rand-isaac.c: Remove, moving most of its contents to
5975 * src/shuf.c: New file.
5976 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
5977 Don't include rand-isaac.c; include randint.h and randread.h instead.
5978 (RANDOM_SOURCE_OPTION): New enum.
5979 (long_opts, usage, main): New option --random-source.
5980 * src/sort.c: Likewise.
5981 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
5982 All callers changed to use randint interface.
5983 (fillrand): Remove. All callers changed to use randread interface.
5984 (dopass): Remove dependency on ISAAC buffer size.
5985 (genpattern): Don't wipe the random state here.
5986 (randint_source): New static var.
5987 (clear_random_data): New function.
5988 (main): Allocate random source, and arrange to wipe it on exit.
5989 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
5990 (longopts, usage, main): Remove undocumented --seed option;
5991 it's now replaced by --random-source.
5992 (rand_state, get_hash): Remove.
5993 (randread_source): New static var.
5994 (random_state, cmp_hashes, compare_random): New functions; they guarantee
5995 no collisions in the random hash function.
5996 (keycompare): Use compare_random for -R; don't fall back on comparing
5997 via memcoll, since compare_random does the right thing.
5998 * tests/misc/Makefile.am (TESTS): Add shuf.
5999 * tests/misc/shuf: New file.
6001 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
6003 * src/copy.c (set_author): Preserve the st_author field via the
6004 file descriptor dest_desc.
6006 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
6008 * NEWS: chmod now preserves setuid and setgid bits on directories
6009 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
6011 Fix test case problems if working directory is setgid,
6012 reported by Bob Proulx.
6013 * tests/cp/fail-perm: Use symbolic mode so that we clear
6014 setgid bit more reliably on directories.
6015 * tests/mkdir/special-1 (set_mode_string): Likewise.
6017 2006-07-27 Jim Meyering <jim@meyering.net>
6019 * src/chgrp.c (usage): Use correct grammar in description of the
6021 * src/chown.c (usage): Likewise.
6023 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
6025 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
6026 Correctly access SRC_SB's element ST_AUTHOR.
6028 2006-07-26 Jim Meyering <jim@meyering.net>
6030 * tests/ls/stat-failed: Adapt to match new expected output.
6033 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
6034 than having the code test for all of the other types first.
6035 Hoist the set-uid/gid-testing code "up" into this new block.
6036 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
6037 C_ORPHAN, not as C_FILE.
6039 2006-07-26 Jim Meyering <jim@meyering.net>
6041 Checking in a change from Paul.
6043 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
6045 * src/ls.c (DT_INIT): Remove. All uses removed.
6046 (enum filetype): Use an ordinary enum rather than trying to keep
6047 the values in sync with DT_FIFO etc. That way, we don't have
6048 to make special assumptions about them. All uses changed.
6049 (whiteout): New constant member of enum filetype.
6050 (filetype_letter): New constant, for use with enum filetype.
6051 (FILETYPE_INDICATORS): New initializer list.
6052 (print_dir): Add case for DT_WHT.
6053 (gobble_file): If stat fails, don't discard information from
6054 readdir; instead, preserve it so it can be printed.
6055 (print_long_format): Fall back on readdir result if stat info
6056 is not available. Use "?" to denote each unknown mode char,
6057 instead of an overall "?", since we now know some of the mode
6059 (print_type_indicator): Now that MODE isn't necessarily
6060 useful, guard all uses.
6061 Now that two blocks in the type-checking tree can set "type = C_FILE",
6062 move the suffix-handling code out and down.
6064 2006-07-26 Jim Meyering <jim@meyering.net>
6066 Prepare for the above change.
6067 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
6068 and adjust uses. From a patch by Paul Eggert.
6070 2006-07-26 Jim Meyering <jim@meyering.net>
6072 * src/ls.c: Correct indentation/formatting in a few places.
6074 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
6076 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
6077 Problem report and fix from Bob Proulx.
6078 * NEWS: Clarify the "chmod 0500" news, and correct the vague
6079 statements about compatibility with BSD.
6081 2006-07-25 Jim Meyering <jim@meyering.net>
6083 * src/ls.c (gobble_file): When handling a stat-failed entry,
6084 print the entry name not the absolute_name -- to be consistent
6085 with the usual case.
6086 * tests/ls/stat-failed: Update accordingly.
6088 * src/ls.c: Add parens around the new uses of ?: ternary operator.
6090 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
6093 Get --dired offsets right when handling stat-failed entries.
6094 * src/ls.c (print_long_format): Be careful to increment P by the
6095 appropriate amount, even when inode_number_width and nlink_width
6097 * tests/ls/stat-failed: Test for the above.
6099 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
6100 have_acl member. That would happen for a directory with both a
6101 non-stat'able entry and one with an ACL.
6103 * src/ls.c (gobble_file): Make it so failure to stat a
6104 non-command-line file provokes an exit status of 1, not 0.
6105 Say "cannot access" rather than "cannot stat".
6106 * tests/ls/stat-failed: New file/test, for the above.
6107 * tests/ls/Makefile.am (TESTS): Add stat-failed.
6108 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
6109 of "cannot access " to diagnostic.
6111 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
6113 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
6114 Replace all occurrences of "type == command_line" with the
6115 equivalent, "command_line_arg".
6117 * src/ls.c: Apply the stat-failed parts of Red Hat's
6118 coreutils-selinux.patch. From Ulrich Drepper.
6119 This makes it so files not mentioned on the command line (e.g.,
6120 names read from a directory that *is* mentioned on the command
6121 line) for which stat fails are still listed. With --color,
6122 such files are colored just like ORPHANs (aka dangling symlinks).
6124 * src/df.c (n_valid_args): Declare global to be static.
6126 2006-07-24 Jim Meyering <jim@meyering.net>
6128 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
6129 system lacks d_type support.
6131 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
6133 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
6135 2006-07-21 Jim Meyering <jim@meyering.net>
6137 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
6138 Reported by Tim Waugh.
6139 Also remove the comment duplicating much of --help output.
6141 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
6142 name so the list remains alphabetized.
6144 Fix another bug: ls --indicator-style=file-type would call
6145 stat for a symlink, even though it wasn't always needed.
6146 In some cases, that unnecessary stat would cause ls to fail.
6147 * src/ls.c (gobble_file): Don't treat symlinks specially (in
6148 requiring a stat syscall). Remove the offending exclusion.
6150 * NEWS: Mention the fix.
6152 * tests/ls/stat-dtype: New file/test, for the above fix.
6153 Also exercises the new df feature, below.
6155 * src/df.c (main): Fail and don't print the headers if no
6156 file system is processed. This makes it easy to test whether
6157 a specified directory is on a file system of a given type or types.
6158 Otherwise, applications would have had to parse df's output.
6159 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
6161 Fix a bug: ls --file-type worked like --indicator-style=slash,
6162 rather than like --indicator-style=file-type.
6163 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
6164 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
6166 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
6167 * NEWS: Mention the fix.
6168 * tests/ls-2/tests (file-type): New test, for the above fix.
6170 2006-07-19 Jim Meyering <jim@meyering.net>
6172 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
6174 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
6176 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
6178 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
6179 of directories alone unless you specify them explicitly.
6180 install and mkdir now implement X correctly.
6181 install now creates parent directories with mode 755, without
6182 changing their owner or group.
6183 * src/chmod.c (process_file): Adjust to mode_adjust API change.
6184 * src/install.c: Include mkancesdirs.h.
6185 (announce_mkdir, make_ancestor): New functions.
6186 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
6188 (dir_mode, dir_mode_bits): New vars.
6189 (main): Set dir modes separately from nondir, so that the X
6190 op of -m works correctly.
6191 (main): Remove cwd_errno cruft, since make_dir_parents no longer
6192 affects cwd. Adjust to new make_dir_parents API.
6193 (install_file_in_file_parents): 2nd arg is now char *, not char
6194 const *. Use mkancesdirs instead of rolling our own code.
6195 (change_attributes): Don't worry about AFS, since that kludge
6196 should not be needed any more.
6197 * src/mkdir.c (struct mkdir_options): New struct.
6198 (announce_mkdir, make_ancestor): New functions.
6199 (main): Use them. Adjust to mode_adjust API change. Stick with
6200 umask 0. Use make_dir_parents for all the work.
6201 * src/mkfifo.c (main): Adjust to new mode_adjust API.
6202 * src/mknod.c (main): Likewise.
6203 * tests/chmod/setgid: Do the setgid test instead of bailing.
6204 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
6205 GNU chmod now behaves like other versions of chmod.
6206 * tests/mkdir/perm: Add a test for the X bug.
6208 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
6210 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
6211 This doesn't fix any bugs, since OUT always equals stdout, but it
6212 makes the code easier to understand.
6214 2006-07-14 Jim Meyering <jim@meyering.net>
6216 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
6217 rather than open-coding it. Now supports mercurial, too.
6218 * .hgignore: New file.
6219 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
6220 all generated files, including ones like configure and po/*.po
6221 that are currently version-controlled in cvs.
6223 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
6224 They've been in CVS, just haven't been distributed before this.
6225 Distribute ChangeLog-2005, too.
6226 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
6228 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
6230 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
6233 2006-07-09 Jim Meyering <jim@meyering.net>
6235 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
6236 That happens with Linux/tmpfs.
6237 * tests/mv/Makefile.am (TESTS): Add dir2dir.
6239 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6241 Adjust to recent updates from gnulib.
6242 * src/dd.c (apply_translations): Use toupper rather than
6243 islower followed by toupper; it's simpler and typically
6244 faster now that we assume at least C89 semantics. Similarly
6246 * src/sort.c (inittables): Likewise.
6247 * src/expand.c (expand): Don't assume that isprint etc. return
6248 booleans (needed for pre-C99 hosts).
6249 * src/fmt.c (check_punctuation): Likewise.
6250 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
6251 * src/tr.c (is_char_class_member): Likewise.
6252 * src/unexpand.c (unexpand): Likewise.
6253 * src/join.c (is_blank): Remove; no longer needed. All uses
6254 replaced by isblank (to_uchar (...)).
6255 * src/pinky.c (create_fullname): Don't assume char is unsigned.
6256 * src/printf.c (print_esc): Likewise.
6257 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
6258 (copy_unescaped_string): Likewise.
6259 * src/stat.c (print_it): Likewise.
6260 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
6261 convenience on GNU systems. All uses changed. Don't bother
6262 looking for any dirent.h substitute other than ndir.h.
6263 (D_INO): Remove unnecessary parentheses.
6264 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
6265 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
6266 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
6267 to ctype.h equivalents.
6268 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
6271 2006-07-08 Jim Meyering <jim@meyering.net>
6273 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
6275 * Makefile.maint (sc_the_the): New rule.
6277 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
6278 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
6281 2006-07-07 Jim Meyering <jim@meyering.net>
6283 * NEWS: Mention that mv can now remove an empty destination directory,
6284 and give an example. Prompted by a report from Florent Bayle.
6286 2006-07-05 Jim Meyering <jim@meyering.net>
6288 * src/ls.c (usage): Correct the description of -G: it is useful
6289 only in a long listing. Reported by Martin Pool in
6290 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
6292 * man/chmod.x: Correct the description of the sticky bit. Reported
6293 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
6295 * src/copy.c (copy_internal): Don't work around old NFS clients like
6296 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
6297 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
6298 a banal failure as a recursive move-into-self failure.
6299 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
6301 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
6303 2006-07-03 Jim Meyering <jim@meyering.net>
6305 Plug another unusual leak.
6306 (AD_mark_helper): Free malloc'd filename if hash_insert says
6307 that string is already in the hash table.
6309 The dev/inode of the topmost directory in each hierarchy were not
6311 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
6312 (AD_push): Call it from here instead.
6314 Fix two small leaks.
6315 * src/remove.c (AD_stack_clear): New function.
6317 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
6319 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
6320 Add $VG_PATH_PREFIX as a prefix to $PATH
6322 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
6323 * tests/Makefile.am (evar-check): Remove rule.
6324 (EXTRA_DIST): Remove .env-warn.
6325 * tests/.env-warn: Remove file. No longer used.
6326 Suggestion from Eric Blake.
6328 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
6330 * src/system.h: Include <stdint.h> unconditionally, since we
6331 now assume the stdint module.
6333 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
6335 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
6336 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
6337 * src/tail.c (main): Implement this.
6338 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
6339 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
6341 2006-07-01 Jim Meyering <jim@meyering.net>
6343 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
6345 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
6348 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
6350 * NEWS: seq now uses long double internally rather than double.
6351 It now defaults to a minimal fixed point format if possible.
6352 It lets you use %a, %A, %E, %F, %G.
6353 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
6354 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
6355 (isfinite) [!defined isfinite]: New macro.
6356 (separator, terminator): Now points to const.
6357 (first, step, last): Remove.
6358 (usage): Update to match new behavior.
6359 (struct operand, operand): New type.
6360 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
6362 Compute and return a value of type operand, not double.
6363 (long_double_format): Renamed from valid_format, and now returns a
6364 new format with an "L" added if needed, if the original format was
6365 valid. Allow %a, %A, %E, %F, and %G formats.
6366 (print_numbers): Take numeric values as args rather than from globals.
6367 Print long double, not double.
6368 (get_width_format): Remove.
6369 (get_default_format): New function.
6370 (main): Implement new way of calculating default format.
6371 Don't worry about locale's representation of the decimal point, since
6372 the arguments are always processed in the C locale.
6373 * tests/seq/basic (neg-2): Adjust to new default format.
6374 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
6375 implementation should do the right thing.
6377 2006-06-30 Jim Meyering <jim@meyering.net>
6379 * tests/stty/basic-1: Work around an intermittent test failure
6380 on HP-UX 11.11. Report and analysis from Bob Proulx.
6381 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
6383 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
6385 * NEWS: Support obsolete usages like "sort +1 -2" even when
6386 conforming to POSIX 1003.1-2001, since this is a pure extension to
6387 POSIX. Problem reported by Christian in:
6388 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
6389 * src/sort.c (main): Implement this.
6391 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
6392 Autoconf 2.60 says this stuff was obsolete.
6394 2006-06-28 Jim Meyering <jim@meyering.net>
6396 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
6398 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
6400 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
6401 (set -x when VERBOSE=yes) when stderr is redirected before stdout
6402 causing shell tracing of the stdout redirection to be written to
6403 the stderr file. Avoid problem and test failure on HP-UX by
6404 redirecting stderr last.
6405 * tests/dd/unblock-sync: Order shell file redirections for
6406 stderr and stdout in the common style.
6407 tests/acl: Likewise.
6409 2006-06-27 Jim Meyering <jim@meyering.net>
6411 * tests/misc/cat-proc: Try to avoid any spurious numeric
6412 differences in frequently-changing /proc/cpuinfo.
6413 Reported by Nelson Beebe.
6415 2006-06-26 Jim Meyering <jim@meyering.net>
6417 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
6418 fd_to_subdirp failure, not just when errno == EACCES.
6419 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
6420 rmdir, here, even though rmdir may happen to be adequate.
6422 * NEWS: rm no longer fails to remove an empty, unreadable directory
6423 * src/remove.c (remove_cwd_entries): If we can't open a directory,
6424 and the failure is not being ignored, try to remove the directory
6425 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
6426 Problem report and test case from Paul Eggert in
6427 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
6429 * tests/rm/empty-inacc: New test, for the above.
6431 Avoid a segfault for wc --files0=- < /dev/null.
6432 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
6434 2006-06-25 Jim Meyering <jim@meyering.net>
6436 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
6437 contains a list of NUL-separated file names.
6439 * src/wc.c: Include "readtokens.h".
6440 (usage): Describe the new option, and adjust the `Usage':
6441 with this option, no FILE may be specified on the command line.
6442 (main): Handle the new option.
6443 * tests/misc/wc-files0: New tests, for the above.
6444 * tests/misc/wc-files0-from: Likewise.
6445 * tests/misc/Makefile.am (TESTS): Add wc-files0.
6447 2006-06-24 Jim Meyering <jim@meyering.net>
6449 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
6451 2006-06-22 Jim Meyering <jim@meyering.net>
6453 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
6454 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
6456 2006-06-19 Jim Meyering <jim@meyering.net>
6458 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
6459 so this check is not run as part of "make distcheck".
6461 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
6463 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
6465 2006-06-18 Jim Meyering <jim@meyering.net>
6467 * tests/misc/pwd-long: Make error output a little clearer.
6469 2006-06-17 Jim Meyering <jim@meyering.net>
6471 * tests/rm/inaccessible: Skip this test on systems without openat
6472 support. Reported by Bob Proulx.
6474 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
6476 * tests/misc/mknod: Improve permission checks to handle
6477 running mkdir test in set-gid directories.
6479 2006-06-14 Jim Meyering <jim@meyering.net>
6481 * tests/du/basic: Revamp not to hard-code file system block sizes.
6483 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6485 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
6488 2006-06-11 Jim Meyering <jim@meyering.net>
6490 * .gitignore: New file.
6491 * Makefile.am (EXTRA_DIST): Add .gitignore.
6493 Setting TIME_STYLE=long-iso in the environment would make the
6494 cp/same-file test fail.
6495 * tests/envvar-check (vars): Add TIME_STYLE to the list.
6496 * tests/cp/same-file: Revert last change.
6497 Source the envvar-check script, to ensure that TIME_STYLE
6498 settings don't affect these tests.
6500 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6502 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
6503 uses POSIX time stamp formats. Problem reported by John Nixon in
6504 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
6506 2006-06-10 Jim Meyering <jim@meyering.net>
6508 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
6510 Require a "Version N.M" line at the top of the ChangeLog
6511 file only when making the actual release, not when running
6513 * Makefile.maint (maintainer-distcheck): Don't depend on
6515 (alpha beta major): Depend on it here, instead.
6517 2006-06-08 Jim Meyering <jim@meyering.net>
6519 Ensure that cat works with any of the options, -A -v -e -E -T,
6520 when applied to files in /proc and /sys, even when the FIONREAD
6521 ioctl produces nonsensical results. Before this change, cat would
6522 produce no output (or truncated output), for some linux kernels.
6524 * src/cat.c (write_pending): New function, factored out of cat.
6525 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
6526 that there are bytes to read. Some versions of linux-2.6.16 do that.
6527 Write any pending output before returning.
6528 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
6529 * NEWS: Mention this bug fix.
6530 * tests/misc/cat-proc: New file. Test for the above.
6531 * tests/misc/Makefile.am (TESTS): Add cat-proc.
6533 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6535 * src/expr.c (eval4): Detect overflow properly when multiplying
6538 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
6540 * NEWS: The 'expr' command now detects and reports integer overflow.
6541 (It would be better to use extended precision instead, but that
6542 would be more work.)
6543 * src/expr.c (integer_overflow): New function.
6544 (eval4, eval3): Check for integer overflow.
6546 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6548 Fix problems when building with Solaris/SVR4/etc. make, which uses a
6549 different and somewhat bogus implementation of VPATH. In the
6550 directory tests/misc, rename tests whose names might appear in the
6551 Automake-generated rules. For example, we can't use a test named
6552 'test', since Automake generates a rule that contains the text
6553 "if test -f ./$$tst; ...", and this might expand to something like
6554 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
6555 which executes the 'test' script rather than the 'test' command.
6556 * tests/misc/false-status: Renamed from tests/misc/false.
6557 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
6558 * tests/misc/sort-merge: Renamed from tests/misc/sort.
6559 ($prog): Set to 'sort' rather than to $PROG.
6560 * tests/misc/test-diag: Renamed from tests/misc/test.
6561 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
6562 in case Solaris make has prepended the directory.
6563 (TESTS): Adjust to above renamings.
6564 * tests/misc/expand: Don't assign to PROG; no longer needed
6565 now that Makefile.am sets PROG to the basename.
6566 * tests/misc/fold: Likewise.
6568 2006-06-03 Jim Meyering <jim@meyering.net>
6570 Make `cp --link --no-dereference' work also on systems where the
6571 link system call cannot create a hard link to a symbolic link.
6572 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
6573 the link syscall on a symlink when it would do the wrong thing.
6574 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
6575 * tests/cp/link-no-deref: New file/test for the above.
6576 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
6577 * NEWS: Mention the change (doesn't affect Linux).
6579 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
6581 Fix some porting problems in the test cases reported by
6582 Ralf Wildenhues for HP-UX 11.23 in:
6583 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
6584 * tests/help-version: Don't assume that \< \> works in sed.
6585 * tests/misc/close-stdout: Don't assume that >&- works.
6586 Add a /dev/full test.
6587 * tests/touch/no-create-missing: Don't assume that >&- works.
6589 2006-05-30 Jim Meyering <jim@meyering.net>
6591 * src/ls.c (usage): Add `v' to the list of sorting-related options.
6594 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6596 * tests/cp/fail-perm: source lang-default.
6597 * tests/rm/inaccessible: Likewise.
6599 2006-05-28 Jim Meyering <jim@meyering.net>
6601 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
6602 Recognize it, too. Reported by Ralf Wildenhues, in
6603 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
6605 2006-05-27 Jim Meyering <jim@meyering.net>
6607 * src/chgrp.c: Support new options: --preserve-root and
6608 --no-preserve-root. Somehow this program was skipped when those
6609 options were added to chown, chmod, and rm. Reported by
6610 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
6611 * NEWS: Mention this.
6613 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
6615 * NEWS: Remove mention of --seed. We'll replace it with something
6616 better, and don't want to indicate that it is supported.
6617 * src/sort.c (usage): Likewise.
6619 2006-05-20 Jim Meyering <jim@meyering.net>
6621 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
6623 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
6624 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
6625 FTS_COMFOLLOW. Spotted by Justin Pryzby.
6627 * gnupload: Merge changes from automake, retaining the ""--to...
6628 kludge to placate overzealous `make distcheck' check.
6630 2006-05-19 Jim Meyering <jim@meyering.net>
6632 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
6633 FTS_TIGHT_CYCLE_CHECK directory traversal option.
6634 Reported by Justin Pryzby in http://bugs.debian.org/367691
6636 2006-05-15 Jim Meyering <jim@meyering.net>
6638 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
6639 From Tomas Pospisek.
6641 2006-05-13 Jim Meyering <jim@meyering.net>
6643 * tests/mv/no-target-dir: Test two more cases.
6645 2006-05-11 Jim Meyering <jim@meyering.net>
6647 mv -T DIR EMPTY_DIR no longer fails unconditionally
6648 * src/copy.c (copy_internal): Don't manually prohibit a move where
6649 the destination is an existing directory. Sometimes doing that is
6650 valid. Let the rename system call enforce the rules. That is
6651 allowed only when the source is a directory and the destination
6652 directory (to be replaced) is empty. Reported by Eric Blake.
6653 * tests/mv/no-target-dir: New file/test for this.
6654 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
6655 * NEWS: Mention this.
6657 * tests/mv/atomic: New file/test for yesterday's fix.
6658 * tests/mv/Makefile.am (TESTS): Add atomic.
6660 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
6662 2006-05-10 Jim Meyering <jim@meyering.net>
6664 * src/copy.c (copy_internal): Don't explicitly unlink the destination
6665 when moving a symlink into the place of an existing non-directory.
6666 Reported by Joshua Hudson.
6667 * NEWS: mention this.
6669 2006-05-07 Jim Meyering <jim@meyering.net>
6671 * Makefile.maint (patch-check): Fail if patch generates any output,
6672 even merely for changed offsets.
6674 * src/c99-to-c89.diff: Adjust to reflect new offsets.
6676 * NEWS: Mention changes affecting df, pwd, shred.
6678 2006-05-06 Jim Meyering <jim@meyering.net>
6680 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
6681 system condition where dirent.d_ino != stat.st_ino.
6682 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
6684 2006-05-06 Eric Blake <ebb9@byu.net>
6686 * tests/ls/inode: Expand to test inode from readdir case.
6687 * tests/ls/follow-slink: Expand to test broken links encountered
6688 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
6690 2006-05-06 Eric Blake <ebb9@byu.net>
6692 * tests/mv/leak-fd: Work even on case-insensitive file system.
6694 2006-05-04 Jim Meyering <jim@meyering.net>
6696 * NEWS: Mention the 2006-03-19 pwd-related change that makes
6697 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
6699 2006-05-03 Jim Meyering <jim@meyering.net>
6701 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
6702 Use better macro parameter names: s/basename/key_name/,
6703 s/basefunc/key_cmp_func. Fix typo in comment.
6705 2006-04-29 Eric Blake <ebb9@byu.net>
6707 * src/ls.c (main): On systems with d_type, directories_first only
6708 implies format_needs_type, not format_needs_stat.
6710 2006-05-03 Jim Meyering <jim@meyering.net>
6712 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
6713 after comma in arg list, from Eric Blake.
6715 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
6717 * tests/misc/date (relative-3): New test, derived from a bug
6718 report by John Thomas McDole.
6720 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
6722 New option for ls: --group-directories-first.
6723 It makes ls list directories before files.
6724 * NEWS [New features]: Mention it.
6725 * src/ls.c (sort_type): Rearrange to use as an array index when
6726 choosing sort function; added new sort_numtypes member for
6728 (time_type): Add new time_numtypes member for compile-time check.
6729 (directories_first): New global variable.
6730 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
6731 (long_options): Add --directories-first.
6732 (main): Support new option.
6733 (is_directory): New function.
6734 (extract_dirs_from_files): Use it.
6735 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
6736 (LIST_SORTFUNCTION_VARIANTS): New macros.
6737 (sort_functions): New global variable.
6738 (sort_files): Use it.
6739 (usage): Document new option.
6741 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
6743 * src/shred.c (fillrand): The assertion was way too weak, due to
6744 what must be a typo. Strengthen it to its intended value.
6745 (dopass): Don't use alloca; it's not worth the aggravation here,
6746 since it's used only to get a page-aligned buffer, and page
6747 alignment doesn't buy us much here. I'm suspicious that alloca
6748 causes problems on some hosts, due to a recent bug report by Adam
6749 Waltman: http://bugs.gentoo.org/130246.
6751 2006-04-18 Jim Meyering <jim@meyering.net>
6753 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
6754 sha384sum, sha512sum.
6756 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
6758 * src/chmod.c (describe_change): Adjust to filemode changes.
6759 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
6760 (print_long_format): Use (new) filemodestring rather than
6761 (old) mode_string, so that we get more file types right, at least
6762 in theory. Adjust to filemode changes.
6763 * src/stat.c (human_access): Likewise.
6765 2006-04-18 Jim Meyering <jim@meyering.net>
6767 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
6768 ignore file. This has never been enabled. Reported by Eric Blake.
6770 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
6772 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
6773 bug in Interix. Just call symlink or link directly. All uses changed.
6774 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
6775 * src/stat.c (USE_STATVFS): New macro.
6776 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
6777 (NAMEMAX_FORMAT): define a bit more clearly, now that the
6778 statvfs-using code is a bit more regular.
6779 * src/system.h (sync) [!HAVE_SYNC]: New macro.
6781 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
6783 * NEWS: csplit, nl, expr now conform to POSIX better, and are
6784 more-compatible with traditional Unix, with respect to regular
6786 * src/csplit.c (extract_regexp): Set re_syntax_options to a
6787 value that is compatible with what POSIX requires.
6788 * src/nl.c (build_type_arg): Likewise.
6789 * src/expr.c (docolon): Likewise. Also, don't let anchors match
6790 newline; this fixes an incompatibility with tradition and with POSIX.
6791 Don't warn about leading ^. POSIX says it is unspecified whether
6792 ^ is a special character, which means that implementations can
6793 either treat it as special or not, but either way a warning is not
6794 allowed (unless the regexp is otherwise invalid). Instead, anchor
6795 the expression but treat ^ as an anchor; this is the traditional
6796 behavior (e.g., Solaris 10).
6797 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
6798 and the like as invalid expressions (exit status 2), not as
6799 failure of 'expr' (exit status 3). This is more consistent with
6800 how Solaris behaves.
6801 * tests/expr/basic (fail-a): Adjust exit status to match new expr
6802 behavior, for status 2 versus 3.
6804 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
6805 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
6806 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
6807 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
6808 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
6809 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
6810 (bre61, bre62): New tests.
6811 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
6812 conforming to POSIX.
6815 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
6816 "if !". Do not assume that 'sed' can handle long, newline-free input.
6817 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
6819 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
6821 Adjust to new regex.h API (with new fastmap type), and clean
6822 up the regex storage allocation a bit.
6824 * src/csplit.c (struct control): Put re_compiled member at the
6825 end, since it's large. Change regexpr member from char * to bool;
6826 all uses changed. Add new member fastmap.
6827 (extract_regexp): regexp arg is now char const *, not char *.
6828 Don't bother duplicating the regular expression; it's not needed.
6829 Set fastmap from new fastmap member. Don't bother allocating
6830 a buffer, as the regexp code does a better job than we do.
6831 * src/expr.c (docolon): Allocate and use a fastmap.
6832 Don't bother allocating a buffer.
6833 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
6835 (build_type_arg): New fastmap arg. All uses changed.
6836 Don't bother allocating a buffer, but set a fastmap.
6837 * src/ptx.c (context_regex_string, word_regex_string): Remove.
6838 (context_regex, word_regex): New vars, replacing the above.
6840 (struct regex_data): New type.
6841 (compile_regex): Renamed from alloc_and_compile_regex, since
6842 we no longer allocate storage. Arg is now a struct regex_data *,
6843 not a const char *. All uses changed. Don't allocate the fastmap;
6844 instead, take it from the caller. Don't convert size_t to int,
6845 to avoid arithmetic overflow problems. Don't bother freeing
6846 storage afterwards; it's not worth the aggravation.
6847 * src/tac.c (compiled_separator_fastmap): New ver.
6848 (main): Use it. Don't bother allocating a buffer.
6850 2006-03-30 Jim Meyering <jim@meyering.net>
6852 * src/dd.c (iwrite): Remove assignment without effect.
6853 Reported by Felix Rauch Valenti.
6855 2006-03-22 Eric Blake <ebb9@byu.net>
6857 * src/ptx.c (usage): Remove mention of --copyright/-C.
6858 (main): Alias --copyright to --version plus a deprecation warning.
6859 * NEWS: Mention this.
6861 2006-03-27 Jim Meyering <jim@meyering.net>
6863 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
6864 use of strtod. Tiny patch from Nickolai Zeldovich.
6866 2006-03-11 Eric Blake <ebb9@byu.net>
6868 * tests/misc/dirname: New file.
6869 * tests/basename/Makefile.am: Delete.
6870 * tests/basename/basic: Move to...
6871 * tests/misc/basename: ... this new file. Add some tests,
6872 including fixed behavior for //.
6873 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
6874 * tests/Makefile.am (SUBDIRS): Remove basename.
6875 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
6877 Improvements to dirname/basename handling on platforms like
6878 cygwin with distinct // and with drive letters.
6879 * NEWS: Document new behavior.
6880 * src/basename.c (main): Don't strip suffix from file system
6882 * src/cp.c (target_directory_operand): Use new last_component.
6883 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
6884 traversing the string.
6885 * src/dircolors.c (guess_shell_syntax): Use new last_component.
6886 * src/install.c (target_directory_operand, install_file_in_dir):
6888 * src/ln.c (target_directory_operand, main): Likewise.
6889 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
6890 * src/mv.c (target_directory_operand, movefile): Likewise.
6891 * src/remove.c (rm_1): Likewise.
6892 * src/shred.c (wipename): Likewise.
6893 * src/split.c (next_file_name): Likewise.
6894 * src/su.c (log_su, run_shell): Likewise.
6896 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
6898 * NEWS: nohup diagnostics are now more precise, and nohup now
6899 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
6900 * src/nohup.c (main): Implement this.
6901 * tests/misc/nohup: Test the new behavior.
6903 2006-03-12 Jim Meyering <jim@meyering.net>
6905 * src/copy.c (set_author): Rename function, from preserve_author.
6907 * src/remove.c (AD_pop_and_chdir): Use new macro,
6908 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
6910 * src/system.h (SAME_INODE): Remove definition.
6911 Include "same-inode.h", instead.
6913 2006-03-11 Eric Blake <ebb9@byu.net>
6915 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
6917 2006-03-10 Jim Meyering <jim@meyering.net>
6919 Fix a bug whereby a user with write access to a directory being removed
6920 could cause the removal of that directory to fail with an erroneous
6921 diagnostic about a directory cycle. Reported by Vineet Chadha.
6923 * NEWS: Mention this.
6924 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
6925 leave (and try to rmdir) is the one whose dev_ino is being used to
6926 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
6928 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
6930 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
6931 * src/dd.c (set_fd_flags): Handle file-creation flags on file
6932 descriptors, rather than ignoring them.
6933 * tests/dd/misc: Add test cases for append, nofollow, directory,
6934 and nolinks flags. Simplify redirection to /dev/null in some cases.
6936 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
6937 noatime test never tested anything.
6939 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
6941 * src/dd.c (flags, usage): New flags directory, nolinks.
6942 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
6944 * src/ls.c (usage): Mention that -f disables --color.
6945 Problem reported by Niels Möller.
6947 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
6949 * man/*.x: Add references to syscalls from utilities of the same name.
6951 2006-03-05 Jim Meyering <jim@meyering.net>
6953 * tests/help-version: Set SHELL, if not already set, in order to
6954 avoid failure when `make check' is run through debuild; dircolors
6955 would fail due to lack of $SHELL. Reported by Sven Joachim.
6957 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
6958 * src/base64.c (wrap_write, do_encode, main): Change type of
6959 parameters and locals, wrap_column, form size_t to uintmax_t.
6960 (main): Adjust to use xstrtoumax, accordingly.
6962 2006-03-03 Jim Meyering <jim@meyering.net>
6964 Don't fail when run from an environment with SHELL not a Bourne
6965 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
6966 * tests/dircolors/simple: Invoke each non-failing test with -b.
6967 Reported by Michael Stone.
6969 2006-02-27 Jim Meyering <jim@meyering.net>
6971 * tests/misc/base64: Derive --decode-using tests from the
6974 * tests/misc/base64: Factor out a long constant string.
6975 Split lines to stay within 80 columns.
6977 * tests/misc/Makefile.am (TESTS): Add base64.
6978 * tests/misc/base64: Test base64. From Simon Josefsson.
6980 * src/base64.c (do_decode): Use correct type for parameter,
6981 ignore_garbage: s/size_t/bool/.
6983 * src/base64.c: Don't include .h files already included by system.h:
6984 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
6985 Include "system.h" before the other lib/*.h header files.
6986 Include <sys/types.h> before "system.h".
6987 (wrap_write): Remove declaration of unused local, initial_column.
6988 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
6990 * README: Add base64 to the list.
6992 2006-02-17 Simon Josefsson <jas@extundo.com>
6994 New program: base64.
6995 * AUTHORS: Mention base64.
6997 * man/Makefile.am: Build base64.1.
6998 * man/base64.x: New file.
6999 * src/Makefile.am (bin_PROGRAMS): Add base64.
7000 * src/base64.c: New file.
7002 2006-02-25 Eric Blake <ebb9@byu.net>
7004 In ls, avoid calling stat for --inode (-i), when possible.
7005 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
7006 * src/system.h: ... here, for use in ...
7007 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
7009 (gobble_file): Add inode argument.
7010 (print_dir): Pass inode if available.
7011 (usage): Remove inaccuracy.
7013 2006-02-23 Jim Meyering <jim@meyering.net>
7015 * TODO: Update/correct some obsolete entries.
7017 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
7019 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
7020 * src/join.c (usage): Likewise.
7021 Documentation problem reported by Philip Kensche.
7023 2006-02-20 Eric Blake <ebb9@byu.net>
7025 * man/rm.x: Update documentation to match previous patch.
7027 2006-02-18 Eric Blake <ebb9@byu.net>
7029 New option for rm: --interactive=once (-I).
7030 * NEWS: Document it, along with change to rm --interactive.
7031 * TODO: Remove entry for implementing rm -I
7032 * src/rm.c (INTERACTIVE_OPTION): New enum value.
7033 (interactive_type): New enum.
7034 (long_opts): Let interactive take an optional argument.
7035 (interactive_args, interactive_types): New option arguments.
7036 (usage): Document -I, --interactive=WHEN. Use program_name
7037 instead of a basename.
7038 (main): New -I option, new behavior to --interactive.
7039 * tests/rm/interactive-once: New tests.
7040 * tests/rm/interactive-always: Ditto.
7041 * tests/rm/Makefile.am (TESTS): Run them.
7043 2006-02-18 Jim Meyering <jim@meyering.net>
7045 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
7046 expression match more of the target lines, e.g., those that start with
7047 `-S,' (short option followed by a comma) or that include `=[...]'.
7048 Patch by Nicolas François.
7049 Fix the four offenders thus exposed:
7050 * src/join.c (usage): Use two spaces (not one) to separate the
7051 --first-only option string from its description, so help2man formats
7052 the derived man page properly.
7053 * src/pr.c (usage): Likewise.
7054 * src/uniq.c (usage): Likewise.
7055 * src/install.c (usage): Likewise.
7057 2006-02-15 Jim Meyering <jim@meyering.net>
7059 * Makefile.maint (alpha beta major): For `make major', ensure that the
7060 version string is of the form N.N[.N]*, where N is one or more digits.
7062 2006-02-14 Jim Meyering <jim@meyering.net>
7064 * INSTALL: Update from gnulib.
7066 2006-02-13 Jim Meyering <jim@meyering.net>
7068 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
7070 2006-02-12 Jim Meyering <jim@meyering.net>
7072 * Makefile.maint (patch-check): New target.
7073 (local-checks-available): Add to the list.
7075 2006-02-11 Jim Meyering <jim@meyering.net>
7077 * src/c99-to-c89.diff: New file.
7078 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
7080 * .x-po-check: New file, with exclusions so that `make distcheck'
7082 * Makefile.am (EXTRA_DIST): Add .x-po-check.
7084 rm -r must remove an empty directory, even if it is inaccessible.
7085 * src/remove.c (close_preserve_errno): New function.
7086 (fd_to_subdirp): Don't print a diagnostic in this function.
7087 Do it from the callers instead, unless rmdir succeeds.
7088 (remove_cwd_entries, remove_dir): Adjust callers.
7089 * tests/rm/empty-inacc: New test for the above.
7090 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
7091 * NEWS: Mention this bug fix.
7092 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
7093 a tiny bit less precise: cannot remove `a/1': ... instead of
7094 cannot open directory `a/1': ...
7096 * Makefile.maint (syntax-check-rules): Automatically derive this
7097 list of sc_-prefixed rule names.
7099 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7101 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
7102 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
7103 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
7104 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
7105 go away? was that an accident?)
7106 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
7107 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
7108 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
7109 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
7110 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
7111 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
7112 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
7113 (author_mark_check, makefile_path_separator_check):
7114 Output line numbers, to simplify navigation of Emacs *compilation*
7116 (sc_prohibit_atoi_atof, sc_file_system):
7117 Rework slightly so that Makefile.maint doesn't get reported as a
7118 violation of its own syntax rules.
7119 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
7120 it at run-time (which didn't work with Bison). Fix a makefile typo,
7121 caught by Makefile.maint itself: spaces where a tab should be.
7122 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
7123 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
7124 Ignore djgpp and man subdirectories, to avoid false matches with
7125 Bison and coreutils, respectively. Use sort -u to remove the
7126 resulting duplicates.
7127 * gnupload: Rework slightly to avoid bogus warning from
7128 sc_two_space_separator_in_usage.
7130 2006-02-10 Jim Meyering <jim@meyering.net>
7132 Use gzip's --rsyncable option only if it's available.
7133 * Makefile.maint (gzip_rsyncable): New variable.
7136 2006-02-08 Jim Meyering <jim@meyering.net>
7138 * Makefile.maint (local-checks-available): Define in terms of
7139 the expansion, $(syntax-check-rules), rather than the single,
7140 top-level target `syntax-check', so that it's easier to exclude
7141 individual rules (via $(local-checks-to-skip)).
7142 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
7144 2006-02-07 Jim Meyering <jim@meyering.net>
7146 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
7147 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
7149 * tests/help-version (expected_failure_status_vdir):
7150 Redirect an expected disk-full diagnostic to /dev/null.
7152 2006-02-06 Jim Meyering <jim@meyering.net>
7154 * src/unexpand.c (usage): Use two spaces (not one) to separate the
7155 --first-only option string from its description, so help2man formats
7156 the derived man page properly.
7157 * src/rm.c (usage): Likewise for --no-preserve-root.
7158 * src/chown.c (usage): Likewise.
7159 * src/chgrp.c (usage): Likewise.
7161 Add a rule to ensure that the above doesn't happen again.
7162 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
7163 (syntax-check-rules): Add it.
7164 * .x-sc_two_space_separator_in_usage: New empty file.
7165 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
7167 2006-02-06 Jim Meyering <jim@meyering.net>
7169 * src/cp.c (usage): Use two spaces (not one) to separate each
7170 option string from its description, so help2man formats the
7171 derived man page properly.
7172 * src/mv.c (usage): Likewise.
7173 Patch from Nicolas François in http://bugs.debian.org/351601.
7175 2006-02-04 Jim Meyering <jim@meyering.net>
7177 * src/copy.c (copy_internal): cp -RL would fail when encountering
7178 the same directory more than once in the hierarchy beneath a single
7179 command-line argument. That is legitimate, e.g. when there are
7180 two or more symbolic links, each pointing to some directory that
7181 would not otherwise be copied. Reported by Christophe LYON.
7182 * tests/cp/cp-deref: New file. Test for today's fix.
7183 * tests/cp/Makefile.am (TESTS): Add cp-deref.
7184 * NEWS: Document this.
7186 2006-02-03 Jim Meyering <jim@meyering.net>
7188 * configure.ac: Require automake-1.9.6, not 1.8.3.
7190 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7192 * src/od.c (usage): Mention that -t a ignores high order bit.
7193 Documentation problem reported by Ed Avis.
7195 2006-02-01 Jim Meyering <jim@meyering.net>
7197 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
7199 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7201 * src/head.c (main): Use a better diagnostic when someone uses a
7202 trailing numeric option in an invalid way. Problem reported by
7204 * src/tail.c (parse_options): Likewise.
7206 2006-01-30 Jim Meyering <jim@meyering.net>
7208 * man/wc.x: Include `count' keyword in man page synopsis,
7209 per suggestion from http://bugs.debian.org/181585.
7211 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
7213 * src/df.c (show_dev): If the file system claims to have
7214 more available than total blocks, report the number of used
7215 blocks as being total - available (a negative number) rather
7216 than as garbage. Problem reported by Toralf Foerster.
7218 2006-01-24 Jim Meyering <jim@meyering.net>
7220 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
7221 to put a regular file in O_NONBLOCK mode fails with EPERM.
7222 That happens on Linux (up to 2.6.15) when using tail -f on a file with
7223 the append-only attribute. Reported by Dean Gaudet. For details,
7224 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
7225 * NEWS: Mention this fix.
7226 * tests/tail-2/append-only: New file. Test for the above.
7227 * tests/tail-2/Makefile.am (TESTS): Add append-only.
7228 * tests/Makefile.am (check-root): Add tail-2/append-only
7230 2006-01-21 Jim Meyering <jim@meyering.net>
7232 * NEWS: Mention fts-related improvements and bug fixes.
7234 2006-01-19 Jim Meyering <jim@meyering.net>
7236 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
7237 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
7239 2006-01-18 Jim Meyering <jim@meyering.net>
7241 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
7243 2006-01-17 Jim Meyering <jim@meyering.net>
7245 Now that fts no longer changes the current working directory, adjust
7246 its clients accordingly -- note that du.c uses fts but doesn't need
7247 any adjustment, since it doesn't operate on the actual files,
7248 but rather just uses the stat buffers provided by fts.
7250 * src/chown-core.c: Include "openat.h".
7251 Don't include "lchown.h".
7252 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
7253 calling openat, lchownat, chownat, rather than open, lchown, chown.
7255 * src/chmod.c: Include "openat.h".
7256 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
7258 * tests/du/long-from-unreadable: New test, to exercise one small
7261 2006-01-13 Jim Meyering <jim@meyering.net>
7263 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
7264 addition of new directories under tests/.
7266 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
7269 2006-01-12 Jim Meyering <jim@meyering.net>
7271 * tests/du/long-sloop: Adjust not to hard-code the expected
7272 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
7273 from that of GNU libc. Reported by Paul Eggert.
7275 * tests/du/long-sloop: Create file at end of symlink chain.
7277 * tests/misc/test: New file, with a test for one of the
7278 bugs fixed by yesterday's test.c changes.
7279 * tests/misc/Makefile.am (TESTS): Add test.
7281 2006-01-11 Jim Meyering <jim@meyering.net>
7283 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
7284 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
7285 a very long sequence of symbolic links (not necessarily a loop).
7286 * tests/du/Makefile.am (TESTS): Add long-sloop.
7288 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
7290 * src/test.c (test_syntax_error): Append a newline. All callers
7291 changed, except for the ones that didn't already append a newline.
7292 Bug reported by Eric Blake.
7294 2006-01-11 Jim Meyering <jim@meyering.net>
7296 * src/system.h (X2NREALLOC): Now that verify_true is no longer
7297 void, cast its result to void, to avoid gcc's warning that
7298 ``left-hand operand of comma expression has no effect''.
7299 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
7301 2006-01-10 Jim Meyering <jim@meyering.net>
7303 * tests/chmod/no-x: Add a test for today's fts.c fix.
7305 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
7307 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
7308 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
7310 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
7312 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
7313 Use verify_true instead of verify_expr, to sync with gnulib.
7315 2006-01-08 Jim Meyering <jim@meyering.net>
7317 * src/date.c (usage): Adjust the formatting of the entries for
7318 %::z and %:::z (separate with two spaces, not one) so that help2man
7319 formats them properly. Reported by Philip Rowlands.
7321 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
7323 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
7325 2006-01-06 Jim Meyering <jim@meyering.net>
7327 * Makefile.maint (copyright-check): Use date +%Y in place of
7330 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
7331 First off, the attribute should have been `volatile' (not static)
7332 to avoid longjmp-related risk of clobber. Secondly, now there is
7333 no longer any risk of a local variable being clobbered, so there's
7334 no need for any attribute at all.
7336 2006-01-05 Jim Meyering <jim@meyering.net>
7338 * src/remove.c: Give a few functions the inline attribute.
7339 (AD_pop_and_chdir): Use gotos to avoid some duplication.
7340 (AD_push): Rewrite an assertion so that the entire computation
7341 goes away when assertions are turned off.
7343 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
7344 It's already defined in "system.h".
7345 * Makefile.maint: Add a FIXME comment.
7347 2006-01-04 Jim Meyering <jim@meyering.net>
7349 * ChangeLog: Remove entries from 2005-10-22 and earlier.
7350 * ChangeLog-2005: New file, for entries up to version 5.92.
7352 2006-01-03 Jim Meyering <jim@meyering.net>
7354 * tests/du/no-x: Also allow a slightly different diagnostic -- the
7355 one you get when using openat-enabled fts.c and du (coming soon).
7356 * tests/chmod/no-x: Likewise.
7357 * tests/chgrp/no-x: Likewise.
7359 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
7361 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
7363 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
7364 (restricted_chown): Return it, if the file cannot be accessed due
7365 to EPERM, or if no uid or gid are required, or if the file is
7366 neither a directory nor a regular file. Rewrite to avoid gotos.
7367 (change_file_owner): Handle RC_do_ordinary_chown case.
7368 Rewrite to avoid gotos.
7369 * tests/chgrp/basic: Make sure we can change the group of
7372 * src/date.c (usage): Explain %g, %G, and %V a bit better.
7374 2006-01-02 Jim Meyering <jim@meyering.net>
7376 * src/copy.c (set_owner): Correct a comment.
7378 * src/tail.c (parse_options): Change warning to say that --retry
7379 is useful `mainly' (not `only') when following by name.
7380 Reported here: http://bugs.debian.org/273781
7382 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
7384 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
7385 * src/copy.c: Include lchmod.h.
7386 (copy_internal): Use lchmod rather than chmod.
7387 * src/cp.c: Include lchmod.h.
7388 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
7389 * src/mkdir.c: Include lchmod.h.
7390 (usage): Clarify -m's operation.
7391 (main): Use lchmod rather than chmod. Don't use lchmod unless the
7392 new mode contains bits outside the 777 range.
7393 * src/mkfifo.c (usage): Clarify -m's operation.
7394 (main): If -m is given, don't invoke chmod; use umask 0 instead.
7395 Report an error if -m asks for bits outside the 777 range.
7396 * src/mknod.c (usage, main): Likewise.
7398 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
7400 2005-12-27 Jim Meyering <jim@meyering.net>
7402 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
7403 (sc_prohibit_assert_without_use): New rule.
7404 (syntax-check-rules): Add it to the list.
7405 * .x-sc_prohibit_assert_without_use: New empty file.
7406 * Makefile.am (EXTRA_DIST): Add it.
7408 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
7410 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
7411 Don't include <assert.h>; it wasn't used.
7413 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
7415 * src/chown-core.c (restricted_chown):
7416 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
7417 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
7418 | O_NOFOLLOW too, for consistency with other dir-openers.
7419 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
7420 (is_empty_dir): Likewise.
7421 * src/shred.c (wipename): Likewise. Don't bother trying to open
7422 dir for writing, since POSIX prohibits it.
7424 2005-12-22 Jim Meyering <jim@meyering.net>
7426 * tests/help-version: Redirect stderr to /dev/full, to suppress
7427 write error diagnostic.
7429 2005-12-19 Jim Meyering <jim@meyering.net>
7431 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
7432 Avoid a minor race condition when `-m MODE' is specified, by using
7433 open, fchown, and close rather than just chown. To do that reliably --
7434 even with an overly restrictive umask -- ensure that each mkdir,
7435 mknod and mkfifo call uses a mode including at least owner-read access.
7436 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
7437 the subsequent chown (or equivalent open,fchown,close) fails.
7438 * tests/misc/mknod: New tests.
7439 * tests/misc/Makefile.am (TESTS): Add mknod.
7441 2005-12-17 Jim Meyering <jim@meyering.net>
7443 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
7444 e.g., on a named pipe.
7445 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
7446 place of all uses, since it is guaranteed (system.h) to be defined.
7448 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
7450 Add POSIX ACL support
7451 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
7452 is no requirement for ACL support; particularly, it does not exist
7453 on systems that have POSIX ACLs.
7454 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
7455 * src/cp.c (umask_kill): With default acls, the umask is not to be
7456 applied. Remove umask_kill, don't change the process umask, and let
7457 the kernel apply the umask where appropriate.
7458 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
7459 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
7461 (copy_reg, copy_internal): Use copy_acl and set_acl
7462 instead of fchown/chown. Fix the logic for POSIX ACLs.
7463 (chown_succeded): Remove; we now always copy acls and
7464 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
7465 did a chown before or not.
7466 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
7467 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
7468 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
7469 to link with it via $(LIB_ACL), for the utilities that need it.
7471 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
7473 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
7474 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
7475 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
7476 value is now signified by whether cwd_errno is null.
7477 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
7478 pointer-to-bool to pointer-to-errno-value. All callers changed.
7479 (rm_1): Don't bother setting a local cwd failure flag and then
7480 ORing it into the caller's. Just set the caller's.
7481 (rm): Use cwd failure errno value to print a slightly-better
7484 2005-12-15 Jim Meyering <jim@meyering.net>
7486 * src/stat.c (print_it): Properly handle a backslash at the
7487 end of a --printf format string. Reported by Paul Eggert.
7488 * tests/misc/stat-printf (end-bs): Add a test for the above.
7490 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
7492 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
7493 Don't assume /etc/passwd contains user names; use 'id' instead.
7495 2005-12-15 Jim Meyering <jim@meyering.net>
7497 stat: revert behavior of --format=FMT (-c)
7498 stat: add new option: --printf=FMT
7499 * NEWS: Mention this.
7500 * src/stat.c (isodigit, octtobin, hextobin): Define.
7501 (PRINTF_OPTION): Define.
7502 (interpret_backslash_escapes, trailing_delim): New globals.
7503 (usage): Document them. Alphabetize on long option names.
7504 (print_esc_char): New function.
7505 (print_it): Rewrite, in order to handle backslash escapes.
7506 (main): Handle new option. Set globals for --format, too.
7508 * tests/misc/stat-printf: Test --printf and --format.
7509 * tests/misc/Makefile.am (TESTS): Add stat-printf.
7511 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
7513 * NEWS: sort now reports incompatible options.
7514 * src/sort.c (incompatible_options, check_ordering_compatibility):
7516 (main): Use them. Don't bother with a usage message for
7517 "sort -c a b", for consistency with other error diagnostics.
7518 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
7521 * src/cat.c (main): Undo previous change. close_stdout already
7522 does the check, so the previous change wasn't necessary.
7524 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
7526 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
7528 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
7530 Install a more-conservative approach for sort -R. It's the
7531 same basic idea as the existing code, except it uses the full ISAAC
7532 approach (called the "more kosher" approach in the existing comments).
7533 This makes "sort -R" quite a bit slower (about a factor of 2 on my
7534 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
7535 better to be conservative here at first, and review any performance
7536 improvements carefully.
7537 * .x-sc_require_config_h: Add src/rand-isaac.c.
7538 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
7539 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
7540 (shred_SOURCES, sort_SOURCES): Remove.
7541 (EXTRA_DIST): Add rand-isaac.c.
7542 * src/rand-isaac.c: Revert to what used to be in shred.c, without
7543 changing it to allow for varying numbers of words in the state.
7544 Alter so that we include rand-isaac.c directly rather than
7545 compiling it and linking to it. Don't include config.h or
7546 system.h; that's the includer's responsibility.
7547 Omit functions that are specific to shred.
7548 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
7549 (isaac_step, struct irand_state):
7550 Resurrect these, with the same defns that used to be in shred.c.
7551 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
7552 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
7554 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
7555 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
7556 (irand_init, irand32, irand_mod):
7557 Number of words is constant again.
7558 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
7559 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
7560 * src/sort.c: Likewise.
7561 * src/shred.c (fillrand, dopass, main): Undo previous change.
7562 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
7564 * src/sort.c: Don't include md5.h; it wasn't needed.
7565 (struct keyfield): Rename random_hash to random, for consistency
7566 with the other member names. All uses changed.
7567 (usage): Tweak wording to mention STRING for --seed option.
7568 (short_options): Rorder for consistency with other programs.
7569 (rand_state): Now a struct, not a pointer to one. All uses changed.
7570 (HASH_WORDS, HASH_SIZE): Remove.
7571 (get_hash): Remove comments around resbuf size, since we can assume C89.
7572 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
7573 (keycompare): Adjust to the new get_hash.
7575 (badfieldspec): Omit recently-introduced comment; it isn't needed.
7576 (main): Don't set need_random simply because gkey has it set; that
7577 doesn't necessarily mean we'll need random numbers.
7578 Redo seeding to match new get_hash approach.
7580 2005-12-10 Jim Meyering <jim@meyering.net>
7582 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
7584 Avoid shred segfault on 64-bit systems.
7585 * src/rand-isaac.c (isaac_refill): Don't try to negate a
7586 local of type uint32_t. Make the local an `int' instead.
7588 * NEWS: Mention sort's new options.
7590 * src/rand-isaac.c (isaac_mix): Declare to be static.
7591 Mark all other functions as `extern' so the tight-scope
7592 part of `make distcheck' passes once again.
7593 * src/rand-isaac.h (isaac_mix): Remove declaration.
7595 * src/sort.c (get_hash): Change position of `*' in parameter
7596 type to conform with convention.
7597 (main): Split a long line so it fits in 80 columns.
7598 (keycompare): Remove stray SPACE before TAB that was
7599 causing `make distcheck' to fail.
7601 * src/shred.c: Don't include gethrxtime.h. No longer needed.
7603 * tests/misc/sort-rand: New file: basic tests for the new options.
7604 * tests/misc/Makefile.am (TESTS): Add sort-rand.
7606 2005-12-10 Frederik Eaton <frederik@ofb.net>
7608 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
7609 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
7610 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
7611 Make state size runtime-configurable.
7612 (isaac_new, isaac_copy): New functions.
7613 * src/rand-isaac.h: New file.
7614 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
7615 (fillrand, main): Adjust to the fact that the state size is now
7616 runtime-configurable.
7617 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
7618 (usage): Add options --random-sort and --seed to implement a random
7620 Include md5.h and rand-isaac.h.
7621 (get_hash): New function.
7622 (rand_state): New var.
7623 (HASH_WORDS, HASH_SIZE): New macros.
7625 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
7627 * tests/dd/misc: Add test for dd iflags=noatime.
7629 2005-12-09 Jim Meyering <jim@meyering.net>
7631 * src/sort.c (usage): Mention white space vs -b and -t options.
7634 2005-12-09 Eric Blake <ebb9@byu.net>
7636 * src/test.c (main): Fix misleading comment.
7638 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
7640 * NEWS: Mention dd's new noatime flag.
7641 * src/system.h (O_NOATIME): Define to 0 if not already defined.
7642 * src/dd.c (flags, usage): Add support for noatime flag.
7644 2005-12-07 Jim Meyering <jim@meyering.net>
7646 Distribute the cvsu script, used only by `make syntax-check'.
7647 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
7648 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
7649 distribute a copy of this script.
7650 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
7652 * tests/mv/acl: exit-77 before the trap, not after, if we fail
7653 to create a temporary directory on another partition.
7654 From Andreas Gruenbacher.
7656 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
7658 * man/basename.x: Cross-reference to dirname and readlink.
7659 * man/dirname.x: Cross-reference to basename and readlink.
7661 2005-12-05 Andreas Gruenbacher
7663 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
7664 (set_owner, preserve_author): New functions, factored out of copy_reg.
7665 (copy_reg): Use them.
7666 (copy_internal): Use them here, too.
7668 2005-12-04 Jim Meyering <jim@meyering.net>
7670 * src/sleep.c (usage): Say what happens with two or more arguments.
7671 Suggested by Justin Pryzby.
7673 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
7676 2005-12-03 Jim Meyering <jim@meyering.net>
7678 * src/rm.c (long_opts): Change the name of each undocumented, for-
7679 testing-only option to start with `-', so that it cannot render
7680 ambiguous any prefix it happens to share with some other option name.
7681 Problem reported by Eric Blake.
7682 * src/head.c (long_options): Likewise.
7683 * src/tail.c (long_options): Likewise.
7685 * tests/misc/head-elide-tail: Update uses of undocumented, for-
7686 testing-only --presume* options to start with `---'.
7687 * tests/rm/dangling-symlink: Likewise.
7688 * tests/rm/dir-no-w: Likewise.
7689 * tests/rm/isatty: Likewise.
7691 2005-11-30 Jim Meyering <jim@meyering.net>
7693 * Makefile.maint: Add a comment about cvsu.
7695 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
7697 * NEWS: df updates for "none", "proc", inaccessible file systems.
7698 * src/df.c (show_point): Ignore inaccessible file systems.
7699 (usage): -a includes dummy file systems, not size-0 file systems.
7701 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
7702 to avoid collision with POSIX name space. All uses changed.
7704 2005-11-24 Jim Meyering <jim@meyering.net>
7706 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
7707 * tests/acl: Add `$0: ' prefix to diagnostics.
7709 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
7711 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
7713 * src/copy.c: Improve performance a bit by optimizing away
7714 unnecessary system calls and going to a block size of at least
7715 8192 (on normal hosts, anyway). This improved performance 5% on my
7716 Debian stable host (2.4.27 kernel, x86, copying from root
7717 ext3 file system to itself).
7718 Include "buffer-lcm.h".
7719 (copy_reg): Omit last argument. All callers changed.
7720 Use xmalloc to allocate rather than trusting alloca
7721 (which is unwise with large block sizes).
7722 Declare locals more locally, if possible.
7723 Use uintptr_t words instead of int words, for a bit more speed
7724 when looking for null blocks on 64-bit hosts.
7725 Optimize away reads of zero bytes on regular files.
7726 In the typical case, insist on 8 KiB buffers, at least.
7727 Avoid unnecessary extra call to fstat when checking for sparse files.
7728 Avoid now-unnecessary cast to off_t, and "0L".
7729 Avoid unnecessary test of *new_dst when checking for same owner
7732 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
7734 * src/remove.c (rm): Don't assume C99 for-loop syntax.
7736 2005-11-22 Jim Meyering <jim@meyering.net>
7738 * src/remove.c (AD_push): Remove debugging cruft.
7740 * tests/rm/unread2 (rm): Change expected diagnostic,
7741 `cannot open directory' to `cannot remove', to align with
7743 * tests/rm/rm2: Ensure that rm now continues removing entries
7744 even after certain types of failure.
7746 * src/remove.c: Rewrite. Now, this module is reentrant on systems
7747 that provide openat (Solaris), and on systems like Linux+procfs
7748 where our openat emulation code is reentrant. This also fixes a
7749 few low-probability leaks and eliminates some code that could,
7750 in very unusual circumstances, cause rm() (via a callee) to exit.
7751 * NEWS: Mention this.
7753 * configure.ac: Put copyright dates all on one line so the
7754 emacs function that updates them works properly.
7756 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
7758 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
7759 Problem reported by Eric Blake.
7760 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
7761 we get a standard-conforming compiler. This relies on the new
7762 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
7763 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
7764 m4/c.m4 can go away with Autoconf 2.60 comes out.
7766 2005-11-17 Jim Meyering <jim@meyering.net>
7768 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
7769 (AD_mark_current_as_unremovable): Likewise, but for a local.
7772 * tests/mv/acl: Let traps handle removing temporary directories.
7774 Expect acl-related tests to fail, until the corresponding
7775 patches are committed.
7776 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
7777 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
7779 ACL tests, from Andreas Gruenbacher.
7780 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
7781 * tests/mv/Makefile.am (TESTS): Add acl.
7782 * tests/cp/Makefile.am (TESTS): Add acl.
7784 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
7786 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
7788 * NEWS: Improve quality of ln's diagnostics.
7789 * src/ln.c (do_link, usage): Likewise.
7790 (do_link): Don't use alloca on a buffer of unbounded size.
7792 2005-11-16 Jim Meyering <jim@meyering.net>
7794 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
7795 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
7796 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
7797 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
7798 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
7800 2005-11-14 Jim Meyering <jim@meyering.net>
7802 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
7804 2005-11-13 Jim Meyering <jim@meyering.net>
7806 * announce-gen: Accept new option, --gpg-key-id=ID and
7807 emit a blurb telling how to use the .sig files.
7808 * Makefile.cfg (gpg_key_ID): Define.
7809 * Makefile.maint (announcement): Use new option and key.
7811 Require that most .c files include <config.h>.
7812 * Makefile.maint (sc_require_config_h): New rule.
7813 (syntax-check-rules): Add it.
7814 * .x-sc_require_config_h: New file listing exceptions to the
7815 above rule. Some are legit, others are simply grandfathered in.
7816 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
7818 2005-11-12 Jim Meyering <jim@meyering.net>
7820 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
7822 2005-11-11 Jim Meyering <jim@meyering.net>
7824 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
7825 Mention new readlink options in 5.3.0's `New features' section.
7826 Spotted by Thomas Hood.
7828 2005-11-08 Jim Meyering <jim@meyering.net>
7830 * NEWS: Merge in changes from b5_9x branch.
7832 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
7834 * NEWS: ls now defaults to --time-style='locale', which in turn acts
7835 like --time-style='posix-long-iso' if the locale settings are messed up.
7836 * src/ls.c (decode_switches): Implement this.
7838 2005-11-08 Jim Meyering <jim@meyering.net>
7840 * tests/du/2g: s/expensive/very expensive/ in a comment.
7843 2005-10-17 Eric Blake <ebb9@byu.net>
7845 * src/ls.c (usage): Fix descriptions of --sort, --time.
7846 Reported by Vitaly A. Ostanin.
7848 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
7850 * src/ln.c: Include filenamecat.c.
7851 (FILE_BASENAME_CONCAT): Remove.
7852 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
7853 (main): Use file_name_concat, base_name, and strip_trailing_slashes
7854 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
7857 2005-11-04 Jim Meyering <jim@meyering.net>
7859 * src/du.c (process_file): Don't overflow for files of size >= 2^31
7860 on systems with stat.st_blocks of a signed 32-bit type.
7861 This bug causes trouble on some AIX 5.1 systems.
7862 Report and trivial patch from Paul Townsend:
7863 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
7864 * NEWS: Mention this.
7866 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
7867 * tests/du/Makefile.am (TESTS): Add it here.
7868 * tests/very-expensive: New file.
7869 * tests/Makefile.am (EXTRA_DIST): Add it here.
7870 * tests/cp/perm: Mark this test as `very-expensive', too.
7872 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
7874 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
7876 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
7878 * src/rm.c (usage): Don't mention rm -d.
7880 2005-11-02 Jim Meyering <jim@meyering.net>
7882 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
7883 From Andreas Schwab.
7885 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
7886 `M+N records in/out' lines don't pollute `make check' output.
7888 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
7889 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
7890 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
7891 to indicate that the input file should be piped into the command
7892 under test (via `cat FILE | $prog ...').
7894 * src/remove.c (remove_entry): Emit a better diagnostic when rm
7895 (without -r) fails to remove a directory on a non-Linux system.
7896 This change affects only newer Solaris systems (with priv_*
7897 functions like priv_allocset). Reported by Keith Thompson.
7899 * tests/rm/dir-nonrecur: New file/test for the above fix.
7900 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
7902 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
7904 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
7905 POSIX 1002.1-2001 requires.
7906 * src/tail.c (parse_obsolete_option): Implement this.
7907 Problem reported by Vincent Lefevre.
7908 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
7909 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
7910 (test_vector): Add special cases for _POSIX2_VERSION, and
7911 regularize the old ones a bit.
7912 * tests/touch/obsolescent: Add y2000 test.
7914 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
7916 * src/dd.c (skip): Fix off-by-one error reported by
7917 Theodoros V. Kalamatianos.
7919 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
7921 * tests/mkdir/p-3: Require that the test be run as non-root.
7922 Problem and trivial fix reported by Theodoros V. Kalamatianos.
7924 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
7926 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
7927 boundary between DEST and SOURCE in the result.
7929 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
7931 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
7932 back to text, to sync with documentation and for backwards
7935 2005-10-25 Jim Meyering <jim@meyering.net>
7937 * tests/dircolors/simple (other-wr): Add an explicit test for
7938 the dircolors bug (NULL-dereference) fixed yesterday.
7940 2005-10-24 Jim Meyering <jim@meyering.net>
7942 * src/tac.c (tac_file): When determining whether a file is seekable,
7943 also test whether it is a tty. Using only the lseek-based test would
7944 give a false positive on Solaris. Reported by Peter Fales.
7946 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
7948 * tests/install/d-slashdot: New test, for "install -d" failure.
7949 * tests/install/Makefile.am (TESTS): Add d-slashdot.
7950 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
7951 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
7953 2005-10-24 Jim Meyering <jim@meyering.net>
7955 * src/dircolors.c (ls_codes): Add missing comma.
7956 Anonymous report and patch from
7957 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
7959 * src/dircolors.c: Add compile-time assertion that the slack_codes
7960 and ls_codes arrays have the same number of elements. This would
7961 have prevented the above-fixed bug.
7963 * src/expand.c (parse_tab_stops): Add a comment to make this function
7964 identical to the one in unexpand.c.
7965 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
7966 identical to the one in expand.c.
7968 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
7970 2005-10-23 Jim Meyering <jim@meyering.net>
7972 * src/md5sum.c (digest_check, main): Use ptr_align rather than
7973 a dangerous pointer-value-to-`unsigned' cast.
7974 * NEWS: mention the new sha* programs.
7975 * AUTHORS: Add new sha* programs.
7977 2005-08-28 David Madore <david.madore@ens.fr>
7979 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
7980 * README: Add their names to the list.
7981 * src/md5sum.c: Provide framework for computing sha-2 hashes.
7982 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
7983 Rules for compiling sha-2 utilities
7984 (noinst_HEADERS): Remove checksum.h.
7985 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
7987 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
7988 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
7989 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
7990 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
7991 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
7992 sha384sum, sha512sum test scripts here rather that each in its
7995 2005-08-28 David Madore <david.madore@ens.fr>
7997 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
7998 of the FIPS test vectors).
8000 2005-10-23 Jim Meyering <jim@meyering.net>
8002 * configure.ac: Use 6.0-cvs as the version string.
8003 * NEWS: Adjust accordingly.
8008 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
8010 Copying and distribution of this file, with or without
8011 modification, are permitted provided the copyright notice
8012 and this notice are preserved.