1 2007-11-28 Paul Eggert <eggert@cs.ucla.edu>
3 Fix a security race with "cp -p A B" when B already exists.
4 * src/copy.h (struct cp_options): New member owner_privileges.
5 * src/copy.c (USE_ACL): Define to 0 if not defined, for convenience.
6 (owner_failure_ok): New function.
7 (set_owner): Avoid a security-related race by doing an extra chmod
8 first if it looks like there might be trouble right after a chown.
9 Accept a source struct stat rather than a uid and gid, and
10 accept a boolean NEW_DST and destination struct stat.
12 * src/copy.h (cp_options_default): New function, replacing the
14 * src/copy.c (cp_options_default): Likewise.
15 * src/cp.c (cp_option_init): Use it.
16 * src/install.c (cp_option_init): Likewise.
17 * src/mv.c (cp_option_init): Likewise.
19 2007-11-30 Jim Meyering <meyering@redhat.com>
21 Avoid a spurious test failure when build directory is set-GID.
22 * tests/cp/fail-perm: Ensure that '.'s set-GID bit is off.
24 Be extra careful to quote $abs_top_builddir-derived names.
25 * tests/misc/ls-misc (shell_quote): New function.
26 Use it to quote file names derived from $abs_top_builddir,
27 in case it contains shell meta-characters. This is not currently
28 needed, since CuTmpdir detects the fishy name and skips the test.
29 But it's important enough to add the extra protection.
30 Reported by Ralf Wildenhues.
32 Include test name in the "unsafe working directory name" diagnostic.
33 * tests/CuTmpdir.pm (import): If $ME is '-', use $prefix.
35 2007-11-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
37 Add quotes to protect against white space in build dir name.
38 * tests/check.mk (TESTS_ENVIRONMENT): Quote $(abs_srcdir).
39 * tests/chmod/setgid: Quote absolute names.
40 * tests/misc/help-version: Likewise.
41 * tests/misc/pwd-unreadable-parent: Likewise.
42 * tests/rmdir/ignore: Likewise.
43 * tests/test-lib.sh: Likewise.
45 Define `tst', for CU_TEST_NAME.
46 * build-aux/check.mk (am__check_pre): Set `tst', for
47 CU_TEST_NAME in tests/check.mk.
49 * tests/CuTmpdir.pm (END): Do not do the cleanup if $dir is not
50 defined, because it then goes wild and changes the mode of all
51 directories below $HOME. Undefined $dir can happen if the test
52 is to be skipped because of an unsafe working directory name.
54 2007-11-28 Paul Eggert <eggert@cs.ucla.edu>
56 Close a file descriptor leak when cp --preserve=context fails.
57 * src/copy.c (copy_reg): Close dest_desc too, if getfscreatecon
60 2007-11-28 Jim Meyering <meyering@redhat.com>
62 * README: Document the known problem with gettext <= 0.17.
64 2007-11-28 Paul Eggert <eggert@cs.ucla.edu>
66 * gl/modules/randread (Depends-on): Remove nonexistent rand-isaac.
68 2007-11-27 Jim Meyering <meyering@redhat.com>
70 Don't block use of 'cat' or 'wc' in "make check".
71 * Makefile.maint (my-distcheck): Add "cat" and "wc" to the list
72 of programs that we can't blacklist.
74 Fix md5sum+sha*sum on sparc: regenerate files with latest autoconf.
75 * configure et al: Regenerate with very latest version of autoconf
76 (v2.61a-312-gb524b0f), to fix md5sum and sha*sum miscompilation
77 on big-endian systems (like sparc) due to lack of the required
78 definition in of WORDS_BIGENDIAN in lib/config.h.
80 2007-11-26 Jim Meyering <meyering@redhat.com>
82 setuidgid.c: more cleanup
83 * src/setuidgid.c: Include "mgetgroups.h".
84 (main): Don't presume there's a fixed limit on the maximum number
85 of group IDs. Don't use NGROUPS; it's artificially low.
86 Change the name of a local: s/gids_count/n_gids/.
87 Remove non-portable "const": s/const int tmp =.../int tmp =.../
89 2007-11-25 Jim Meyering <meyering@redhat.com>
91 Document install's -D option.
92 * doc/coreutils.texi (install invocation): Document -D.
93 Reported by Akim Demialle.
95 setuidgid: Update --help output.
96 * src/setuidgid.c (usage): Describe -g GID[,GID1...] option.
97 Mention that USER may be a numeric ID or a user name.
99 2007-11-24 Jim Meyering <meyering@redhat.com>
102 * tests/cp/preserve-gid: Split some long lines.
103 Prepend "+" to numeric uid and gid chown arguments, on principle.
106 setuidgid: minor clean-up.
107 * setuidgid.c: Include "xstrtoul.h".
108 (main): Detect overflow in string-to-gid_t and -to-uid_t conversions.
111 * src/setuidgid.c: Normalize leading white space: no more TABs.
113 Test the new feature: cp -p preserves the GID whenever possible.
114 * tests/cp/preserve-gid: New file. Test for today's change.
115 * tests/cp/Makefile.am (TESTS): Add preserve-gid.
116 * tests/Makefile.am (all_t): Add tc.
119 setuidgid: accept numeric UID, and new option -g GID,GID1,GID2,...
120 * src/setuidgid.c: Add functionality for the new test above.
122 "cp -p" tries to preserve GID even if preserving the UID fails.
123 * NEWS: Mention this new feature.
124 * src/copy.c (set_owner): Try to preserve just the GID,
125 when initial fchown/lchown fails.
126 * src/cp.c (re_protect): Likewise.
128 2007-11-23 Jim Meyering <meyering@redhat.com>
130 * src/runcon.c (main): Remove unused parameter, "envp".
132 Add tests to show new class of strings accepted by date -d.
133 * tests/misc/date (rel-1day, rel-plus1): New tests for the recent
134 change in gnulib's getdate.y.
135 * NEWS: Mention the fix.
137 2007-11-22 Jim Meyering <meyering@redhat.com>
139 Quiet warnings about unused parameters.
140 * src/copy.c (set_author) [!HAVE_STRUCT_STAT_ST_AUTHOR]:
141 "Use" each of the parameters.
143 * GNUmakefile: Correct the "rerunning..." diagnostic.
145 Make it easier to diagnose PATH-induced "make distcheck" failures.
146 * Makefile.maint (write_loser): Define.
147 (my-distcheck): Use an always-failing wrapper script, that gives
148 a diagnostic, not "false".
149 Run only "make -C tests check" with the restrictive PATH.
150 Run the new gnulib-tests/ with the usual PATH.
152 cp: by default, refuse to copy through a dangling destination symlink
153 * NEWS: Mention this change.
154 * doc/coreutils.texi (cp invocation): Describe the new behavior.
155 * src/copy.c: No longer include "canonicalize.h".
156 (copy_reg): Upon failure to open a dangling destination symlink,
157 don't canonicalize the name, but rather fail (default) or, with
158 POSIXLY_CORRECT, repeat the open call without O_EXCL (potentially
160 * src/copy.h (struct cp_options) [open_dangling_dest_symlink]:
161 New member. Reorder the others, grouping "bool" and "enum"
163 * tests/cp/thru-dangling: Test for changed and new behavior.
164 * src/cp.c (cp_option_init): Initialize new member.
165 * src/install.c (cp_option_init): Likewise.
166 * src/mv.c (cp_option_init): Likewise.
168 2007-11-21 Pádraig Brady <P@draigBrady.com>
170 * doc/coreutils.texi (split invocation): Improve the
171 descriptions of the split command options.
173 2007-11-21 Jim Meyering <meyering@redhat.com>
175 * src/c99-to-c89.diff: Adjust seq.c offsets.
177 2007-11-18 Paul Eggert <eggert@cs.ucla.edu>
179 * src/seq.c (print_numbers): Rewrite in an attempt to avoid the
180 more-general rounding issues exposed by the previous patch.
182 2007-11-18 Jim Meyering <meyering@redhat.com>
184 * src/c99-to-c89.diff: Adjust seq.c offsets.
186 Remove unused parameter in remove.c.
187 * src/remove.c (fd_to_subdirp): Remove unused parameter.
188 (remove_cwd_entries, remove_dir): Update callers.
190 bootstrap: work also with 4-argument variant of AC_INIT (from gnulib)
191 2007-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
192 * bootstrap (gnulib_extra_files): Adjust sed command.
194 2007-11-17 Jim Meyering <meyering@redhat.com>
196 Correct preceding patch.
197 * src/seq.c (print_numbers): Also handle first < last && step < 0.
198 * tests/misc/seq [empty-rev]: New test for this case.
200 "seq .1 .1" would mistakenly generate no output on some systems
202 * src/seq.c (print_numbers): Handle another floating point corner case.
203 This avoids failure of seq's eq-wid-7 test on FreeBSD 6.1.
205 2007-11-16 Paul Eggert <eggert@cs.ucla.edu>
207 Port tests/rmdir/ignore away from GNU/Linux.
208 * tests/rmdir/ignore: Don't assume that rmdir($PWD) will fail
209 with errno==ENOTEMPTY when $PWD is not empty; Posix also allows
210 rmdir to fail with errno==EBUSY.
212 2007-11-16 Jim Meyering <meyering@redhat.com>
214 Avoid an obscure new "make distcheck" failure.
215 * Makefile.maint (my-distcheck): Also allow 'mv', for its use
216 in gnulib-tests/Makefile.
218 2007-11-16 Paul Eggert <eggert@cs.ucla.edu>
220 Port readlink-fp-loop to Solaris.
221 * tests/misc/readlink-fp-loop (symlink_loop_msg): New var,
222 which records the symlink-loop message, whose wording is
223 not standardized by Posix. Do not rely on "echo x > p/1"
224 to work when p/1 has a lot of indirect symlinks. (I'm surprised
225 that it works on Linux. Perhaps a Linux bug?)
227 2007-11-15 Paul Eggert <eggert@cs.ucla.edu>
229 Port to Solaris 'make' and use a Posixish shell on Solaris.
230 * bootstrap.conf (gnulib_modules): Add gnu-make, posix-shell.
231 * build-aux/check.mk (SHELL): Set to $(PREFERABLY_POSIX_SHELL),
232 so that commands can assume Posix syntax.
233 (ENABLE_HARD_ERRORS, TEST_LOGS): Don't use GNU Make's "?=" syntax.
234 (SH_E_WORKAROUND): New macro.
235 (am__check_pre, $(TEST_SUITE_LOG)): Use it.
236 (am__check_pre): Fail if "mkdir" fails. Use $(SHELL)
237 rather than relying on the "#!/bin/sh" in the file, so that tests
238 can use Posix syntax.
239 (am__check_pre, am__tty_colors): Use $$src rather than $$<, to
240 support the Posix-make $(TEST_LOGS) rule.
241 (%.log: %.test, %.log: %$(EXEEXT)): Remove unused inference rules
242 that rely on a GNU Make extension and cause Solaris 'make' to fail.
243 (SUFFIXES): New macro, so that we can use Posix style inference rules.
244 (%.log: %): Use this rule only if GNU_MAKE.
245 Set $$src so that macros can use $$src rather than $$<.
246 (CHECK-FORCE, DEPENDENCY, $(TEST_LOGS)): New macros and rules,
247 which rely only on Posix 'make' semantics, and are used only with
248 non-GNU 'make' implementations. $(TEST_LOGS) invokes 'make'
249 recursively (and a bit inefficiently) to simulate the GNU 'make'
251 (.log.html): Renamed from "%.html: %.log", so that it relies only
252 on Posix 'make' semantics.
253 (check-clean, .PHONY): Do not depend on check-clean-local, since
254 Solaris 'make' complains about nonexistent rules like that.
255 * src/Makefile.am (SUFFIXES): Remove; no longer needed.
256 (groups): Use a specific rule rather than an inference rule that
257 is only instantiated once. The inference-rule approach does not
258 work with Solaris 'make', which gets confused by the "groups:
259 Makefile" line. It's not clear from the Posix spec that Solaris
260 'make' is buggy here, so instead of worrying about it, rewrite
261 the makefile so that it clearly conforms to Posix.
262 * tests/check.mk (TESTS_ENVIRONMENT): Export PACKAGE_BUGREPORT.
263 GNU 'make' does this automatically for us, but Solaris 'make'
266 2007-11-15 Paul Eggert <eggert@cs.ucla.edu>
268 Port to Solaris 8 perl, which does not support "use warnings;".
269 * tests/dd/skip-seek: Skip test if "use warnings;" fails.
270 * tests/du/files0-from: Likewise.
271 * tests/misc/base64: Likewise.
272 * tests/misc/basename: Likewise.
273 * tests/misc/cut: Likewise.
274 * tests/misc/date: Likewise.
275 * tests/misc/dircolors: Likewise.
276 * tests/misc/dirname: Likewise.
277 * tests/misc/expand: Likewise.
278 * tests/misc/expr: Likewise.
279 * tests/misc/factor: Likewise.
280 * tests/misc/fmt: Likewise.
281 * tests/misc/fold: Likewise.
282 * tests/misc/head-elide-tail: Likewise.
283 * tests/misc/ls-misc: Likewise.
284 * tests/misc/md5sum: Likewise.
285 * tests/misc/md5sum-newline: Likewise.
286 * tests/misc/mktemp: Likewise.
287 * tests/misc/od: Likewise.
288 * tests/misc/paste-no-nl: Likewise.
289 * tests/misc/pr: Likewise.
290 * tests/misc/seq: Likewise.
291 * tests/misc/sha1sum: Likewise.
292 * tests/misc/sha1sum-vec: Likewise.
293 * tests/misc/sha224sum: Likewise.
294 * tests/misc/sha256sum: Likewise.
295 * tests/misc/sha384sum: Likewise.
296 * tests/misc/sha512sum: Likewise.
297 * tests/misc/sort-merge: Likewise.
298 * tests/misc/stat-printf: Likewise.
299 * tests/misc/sum: Likewise.
300 * tests/misc/test-diag: Likewise.
301 * tests/misc/tsort: Likewise.
302 * tests/misc/unexpand: Likewise.
303 * tests/misc/wc-files0-from: Likewise.
304 * tests/misc/xstrtol: Likewise.
305 * tests/mv/i-1: Likewise.
306 * tests/rm/empty-name: Likewise.
307 * tests/rm/unreadable: Likewise.
309 2007-11-15 Andreas Schwab <schwab@suse.de>
311 * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix syntax error.
312 Remove trailing space from result.
314 2007-11-15 Jim Meyering <meyering@redhat.com>
316 Avoid misbehavior of a cross-device "mv" or "install".
317 Those programs must not dereference a destination symlink.
318 * src/copy.c (copy_reg): Don't treat a dangling destination symlink
319 differently in move mode. In move mode, the only way the added
320 O_EXCL can cause failure is when some other process has recreated
321 the file this code unlinked a few instructions before.
323 2007-11-14 Jim Meyering <meyering@redhat.com>
325 Another bootstrap kludge.
326 * bootstrap: Ensure gnulib-tests/test-*.sh are executable
328 #ifdef-out matchpathcon-related code, for now.
329 * src/install.c (setdefaultfilecon): #ifdef-out all of the
330 matchpathcon-related code, until it's more efficient.
331 (setdefaultfilecon): Instead of the above, stub-out the entire function.
333 Use gnulib's stpncpy module, now required by install.c
334 * bootstrap.conf (gnulib_modules): Add stpncpy.
336 Enable gnulib-tool's --with-tests option.
337 * bootstrap: After all is done, transform the generated
338 gnulib-tests/gnulib.mk.
339 * bootstrap.conf (gnulib_tool_option_extras): Set it here.
340 * gnulib-tests/Makefile.am: New file.
341 * Makefile.am (SUBDIRS): Add gnulib-tests.
342 * configure.ac (AC_CONFIG_FILES): Add gnulib-tests/Makefile.
343 * m4/jm-macros.m4 (coreutils_MACROS) [ARGMATCH_DIE_DECL]: Omit the
344 "extern " prefix to "void usage ()", so that the macro string value can
345 be used to construct a function definition in gnulib's test-argmatch.c.
347 2007-11-12 Benno Schulenberg <bensberg@justemail.net>
349 Clarify description of cp's -a option.
350 * src/cp.c (usage) [-a]: Remove unnecessary 'P'.
351 Since option -d of 'cp' includes the function of -P, mentioning the
352 latter in the description of option -a is redundant and therefore
353 slightly confusing, as the reader tries to figure out what it adds.
354 * doc/coreutils.texi (cp invocation): Likewise: s/-dpPR/-dpR/.
356 2007-11-09 Jim Meyering <meyering@redhat.com>
358 bootstrap: fix typo to enable use of $gnulib_tool_option_extras.
359 * bootstrap (gnulib_tool_options): Add a space before the use
360 of $gnulib_tool_option_extras, so that it's separated from the
363 install+SELinux: reduce a 12x performance hit to ~1.5x
364 * src/install.c (setdefaultfilecon): Call matchpathcon_init_prefix,
365 to mitigate what would otherwise be a large performance hit due to
366 the use of matchpathcon.
367 Dan Walsh suggested the use of matchpathcon_init_prefix.
368 * gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Define.
370 2007-11-08 Jim Meyering <meyering@redhat.com>
372 Adapt to gnulib's s/jm_/gl_/ cache variable renaming.
373 * configure.ac: Change the cache variable name prefix "jm_" to "gl_",
374 to match today's change in gnulib.
376 2007-11-05 Jim Meyering <meyering@redhat.com>
378 Fix bootstrap failure to handle files like lib/uniwidth/cjk.h.
379 * bootstrap (cp_mark_as_generated): Create any required parent
380 destination directories before copying a file into place.
382 * src/c99-to-c89.diff: Adjust offsets.
384 Don't use GNU-sed-specific \< \> operators here, either.
385 * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Use a loop, as below.
387 Use tighter regexps when performing name substitution.
388 * man/Makefile.am (mapped_name): Add ^ and $$ anchors.
390 Don't use GNU-sed-specific \< \> operators.
391 * configure.ac (MAN): Transform ginstall.1 to install.1 using
392 a loop, rather than sed with \<...\>.
393 Problem reported by Bruno Haible.
394 Andreas Schwab reminded me that \< and \> are not portable.
396 Get git-version-gen from gnulib.
397 * build-aux/git-version-gen: Remove file.
398 * build-aux/.gitignore: Add git-version-gen.
399 * bootstrap.conf (gnulib_modules): Add git-version-gen.
401 2007-11-03 Jim Meyering <meyering@redhat.com>
403 git-version-gen: Sync from autoconf's version.
404 * build-aux/git-version-gen: Run git-status
406 Sync copyright and scriptversion bits from gnulib.
407 * build-aux/git-version-gen: No semantic change.
409 Change the first '-' to '.' in the snapshot version string,
410 e.g., 6.9-377-08144 -> 6.9.377-08144
411 * build-aux/git-version-gen: ... and add comments.
413 seq: add another test for the %% bug.
414 * tests/misc/seq (fmt-c): Test the other fixed case, too.
416 2007-11-03 Paul Eggert <eggert@cs.ucla.edu>
418 Fix bug with "seq 10.8 0.1 10.95", plus another bug with %% in format.
420 * NEWS: Mention the %%-in-format bug fix.
421 * src/seq.c (struct layout): New type.
422 (long_double_format): New arg LAYOUT. Fill it in. Fix mishandling
424 (print_numbers): New arg LAYOUT. Don't convert LAST to output format
425 when deciding whether to go slightly past LAST. Instead, convert
426 X to output format and back. This fixes a bug reported by
428 <http://lists.gnu.org/archive/html/bug-coreutils/2007-10/msg00237.html>
429 where "seq 10.8 0.1 10.95" would output 11.0 on platforms where
430 10.95 rounds to a value that prints as 11.0 when only one digit
431 past the decimal point is asked for.
432 (main): Compute layout, for benefit of print_numbers.
433 * tests/misc/seq (float-3): Undo previous change, since the bug
435 (fmt-b): New test, for the %% bug.
437 2007-11-01 Jim Meyering <meyering@redhat.com>
439 * tests/misc/printf-surprise: Correct sed transform.
440 Reported by Bob Proulx.
442 Add example inspired by "make dist" running gzip and lzma in sequence.
443 * doc/coreutils.texi (tee invocation): Show how to run tar just
444 once, compressing the tee'd output streams in parallel.
446 Say that the first process substitution example is contrived.
447 * doc/coreutils.texi (tee invocation): ... and show how to do
448 it properly. Pointed out by James Antill.
450 Use mktemp, not mkdtemp, to create test directories.
451 * tests/test-lib.sh: Use the mktemp binary we've just built,
452 not the mkdtemp script.
453 * tests/mkdtemp: Remove file.
454 * tests/Makefile.am (EXTRA_DIST): Remove mkdtemp.
456 Adjust a seq subtest not to depend on the vagaries of floating point.
457 * tests/misc/seq (float-3): Use 10.94 as the endpoint, not 10.95,
458 since 10.95 was precisely in the middle of the interval, and with
459 a %.1f format could map to either 10.9 or 11.0.
460 Reported by Mike Frysinger
462 Make the new printf-surprise test more precise.
463 * tests/test-lib.sh (require_ulimit_): New function.
464 * tests/misc/printf-surprise: Use ulimit -v to trigger the fixed bug,
465 and rather than checking printf's exit status (which would go wrong
466 on FreeBSD 6.1, since their printf(3) function doesn't require
467 lots of memory in this case) simply test whether it outputs
470 Accommodate FreeBSD 6.1 hard-link-to-symlink differences.
471 * tests/cp/same-file: Detect when linking to a symlink links to
472 the target of the symlink (FreeBSD 6.1 does this, Linux does not),
473 and skip the few tests that would otherwise fail.
474 Redirect output of final comparison to stderr, since all stdout
475 is already redirected.
477 2007-10-31 Jim Meyering <meyering@redhat.com>
479 Fix a "make distcheck" failure.
480 * Makefile.maint (my-distcheck): Don't stub-out dirname,
481 since build-aux/check.mk now uses it.
483 * bootstrap.conf (gnulib_modules): Add xprintf-posix.
485 2007-10-30 Jim Meyering <meyering@redhat.com>
487 Avoid seq floating-point test failure on FreeBSD 6.1.
488 * tests/misc/seq (float-4): Also accept -0.0.
490 2007-10-29 Jim Meyering <meyering@redhat.com>
492 Change a "make dist" diagnostic.
493 * GNUmakefile: Don't imply that $(_curr-ver) is the new version string.
495 2007-10-29 Bob Proulx <bob@proulx.com>
497 Improve color terminal escape usage.
498 * build-aux/check.mk (am__tty_colors): Use 'tput' to deduce
499 terminal color capabilities.
501 2007-10-29 Jim Meyering <meyering@redhat.com>
503 Don't try to colorize a dumb terminal.
504 * build-aux/check.mk (am__tty_colors): Skip colors if $TERM is "dumb".
505 Thanks to Bob Proulx.
507 Remove gnulib's printf-posix module, for now.
508 * bootstrap.conf (gnulib_modules): It caused too many test failures.
510 Remove spurious semicolon after "else".
511 * build-aux/check.mk (am__tty_colors): Fix syntax error.
513 If $TERM is empty, don't use colors. This helps the buildbot,
514 since it produces its result in an environment with a tty, but
515 we don't want color codes in that case.
516 * build-aux/check.mk (am__tty_colors): Test for nonempty $TERM.
517 Suggestion from Bob Proulx.
519 Always initialize terminal colorization string variables.
520 * build-aux/check.mk (am__tty_colors): Always initialize red, grn, etc.,
521 In case they're defined in the environment.
523 Avoid test failure in non-srcdir build vs. the git tree.
524 * tests/check.mk (vc_exe_in_TESTS): Run this test only in a
525 srcdir build directory. Reported by Andreas Schwab.
527 2007-10-28 Jim Meyering <meyering@redhat.com>
529 Define ENOTSUP, not ENOSYS. Needed on OpenBSD 3.9.
530 * gl/lib/se-context.in.h (ENOTSUP): Define if missing.
531 * gl/lib/se-selinux.in.h: Likewise.
533 Define ENODATA, for FreeBSD 5.0 and 6.1.
534 * src/system.h (ENODATA): Define, if missing.
536 Run autoreconf, not just autoconf, to avoid warnings.
537 * GNUmakefile (dummy): Otherwise, we'd sometimes get a warning
538 about autoconf version mismatch between what was used to generate
539 aclocal.m4 and the currently-running autoconf.
541 Require gnulib's printf-posix module, to support Interix.
542 * bootstrap.conf (gnulib_modules): Add printf-posix.
544 Help xgettext recognize more printf-style format strings.
545 * bootstrap.conf (XGETTEXT_OPTIONS): Add directives for
546 error, error_at_line, xasprintf, xfprintf and xprintf.
548 2007-10-27 Jim Meyering <meyering@redhat.com>
550 Adjust format string so msgfmt doesn't object.
551 * src/df.c (main): Use "%s%s" (not %smsg) to print "msg" with or
552 without a "Warning: " prefix. Reported by Clytie Siddall.
554 Clean up tests/Makefile.am.
555 * tests/Makefile.am (EXTRA_DIST): Remove $(TESTS). No longer defined.
556 (TESTS_ENVIRONMENT): Remove definition.
558 2007-10-26 Jim Meyering <meyering@redhat.com>
560 * build-aux/check.mk: Merge with latest from Akim.
562 Add a test for the printf fix of 2007-10-21.
563 * tests/misc/printf-surprise: New file. Test for 2007-10-21's fix.
564 * tests/misc/Makefile.am (TESTS): Add printf-surprise.
566 2007-10-24 Micah Cowan <micah@cowan.name>
568 Remove vestiges of cvs-gnulib-checkout process. Now we use git.
569 * bootstrap: Remove support for now-unnecessary option, --cvs-user,
570 and envvars CVS_USER, CVS_RSH.
572 2007-10-24 Micah Cowan <micah@cowan.name>
574 Tell xgettext that "ARG1 % ARG2" is not a C format string.
575 * src/expr.c (usage): Add a comment to override xgettext's default
576 behavior, which would classify "ARG1 % ARG2" as a fprintf-style
577 format string. Reported by Clytie Siddall.
579 2007-10-24 Jim Meyering <meyering@redhat.com>
581 Avoid diagnostics from sha1sum when there is no cached checksum.
582 * bootstrap (update_po_files): Skip the sha1sum check if the po.s1
583 file hasn't been created yet.
585 Get gnulib from the git repository, not from an obsolete cvs one.
586 * bootstrap: Suggestion from Micah Cowan.
589 * README-hacking: Prefer the no-hyphen variant of git commands,
590 e.g., use "git pull" not "git-pull".
591 Don't presume that the only way to read this document is via a
592 prior git clone: provide instructions for cloning coreutils, too.
594 * README-hacking: Add "cd automake" in build instructions.
597 Don't fail part 2 of tests/rm/unreadable when run as root.
598 * tests/rm/unreadable: With UID == 0, expect different results.
599 Reported by Mike Frysinger.
601 2007-10-23 Jim Meyering <meyering@redhat.com>
603 * README-hacking: Refer to LZMA Utils <http://tukaani.org/lzma/>.
605 2007-10-22 Paul Eggert <eggert@cs.ucla.edu>
607 * README-hacking: Describe how to build with LZMA.
609 2007-10-22 Jim Meyering <meyering@redhat.com>
611 Remove git-version-gen's first parameter.
612 * build-aux/git-version-gen: Add comments.
613 Remove first command-line parameter.
614 * configure.ac: Remove corresponding first argument.
615 * GNUmakefile (_curr-ver): Likewise.
617 2007-10-21 Jim Meyering <meyering@redhat.com>
619 * NEWS: Mention the printf fix.
621 Reorder tests to run more basic ones earlier.
622 * tests/misc/Makefile.am (TESTS): Reorder.
623 * tests/Makefile.am (SUBDIRS): Reorder.
625 tr: do not reject an unmatched [:lower:] or [:upper:] in SET1.
626 * NEWS: Mention this.
627 * src/tr.c (get_next) [RE_CHAR_CLASS]: Don't skip the loop when
628 processing [:lower:] and [:upper:].
629 (main): Require [:lower:] or [:upper:] in SET1 only when
630 when one of those is specified in SET2.
631 * tests/tr/Test.pm: Add tests for this fix.
632 Reported by Per Starbäck.
634 2007-10-20 Jim Meyering <meyering@redhat.com>
636 * tests/misc/help-version: Add a comment.
638 Detect printf(3) failure due to ENOMEM.
639 * src/printf.c: Include "xprintf.h"
640 (print_direc): Use xprintf, rather than printf.
641 * bootstrap.conf (gnulib_modules): Add xprintf.
642 * po/POTFILES.in: Add lib/xprintf.c.
643 Reported by Bruno Haible.
645 Put always-failing programs first in PATH, so tests cannot mistakenly
646 run installed versions.
647 * Makefile.maint (my-distcheck): Set up a bogus bin/ dir, to be used
650 * doc/coreutils.texi (tee invocation): Fix typo. Add a little.
651 Add a cross-reference to bashref's Process Substitution node.
653 Adjust tests to pass, now that Test.pm ones use check.mk.
654 * tests/check.mk (vc_exe_in_TESTS): Adjust regexp not to match the
655 "TESTS = $x-tests" line in each Test.pm-derived Makefile.am file.
656 * tests/sort/main: Remove this unused file.
658 Ensure that Test.pm-derived tests use the right $PATH.
659 * tests/Makefile.am.in: Include $(top_srcdir)/tests/check.mk.
661 2007-10-20 Bob Proulx <bob@proulx.com>
663 Prevent "make check" from leaving mktemp /tmp/tmp.* files behind.
664 * tests/misc/help-version (mktemp_args): Tell mktemp to create
665 its temporary file in the current directory.
667 2007-10-16 Jim Meyering <meyering@redhat.com>
669 Show how to make tee redirect to multiple processes.
670 * doc/coreutils.texi (tee invocation): Tee can redirect output
671 to multiple _processes_, too.
673 2007-10-14 Jim Meyering <meyering@redhat.com>
675 Pull all TESTS_ENVIRONMENT settings "up" into tests/check.mk.
676 * tests/Makefile.am.in (TESTS_ENVIRONMENT): Remove definition.
677 * tests/chgrp/Makefile.am: Likewise.
678 * tests/chmod/Makefile.am: Likewise.
679 * tests/chown/Makefile.am: Likewise.
680 * tests/cp/Makefile.am: Likewise.
681 * tests/dd/Makefile.am: Likewise.
682 * tests/du/Makefile.am: Likewise.
683 * tests/install/Makefile.am: Likewise.
684 * tests/ln/Makefile.am: Likewise.
685 * tests/ls/Makefile.am: Likewise.
686 * tests/misc/Makefile.am: Likewise.
687 * tests/mkdir/Makefile.am: Likewise.
688 * tests/mv/Makefile.am: Likewise.
689 * tests/readlink/Makefile.am: Likewise.
690 * tests/rm/Makefile.am: Likewise.
691 * tests/rmdir/Makefile.am: Likewise.
692 * tests/tail-2/Makefile.am: Likewise.
693 * tests/touch/Makefile.am: Likewise.
694 * tests/check.mk (TESTS_ENVIRONMENT) [EXEEXT, EGREP, MAKE, PERL]:
695 [CONFIG_HEADER, build_programs, host_os, host_triplet, PATH]:
696 [REPLACE_GETCWD, CU_TEST_NAME]: Add definitions here.
697 * tests/misc/pwd-long: Use $abs_top_builddir/src, not $BUILD_SRC_DIR.
698 * tests/dd/skip-seek: Don't use $ENV{PROG}.
699 * tests/rm/empty-name: Likewise.
700 * tests/rm/unreadable: Likewise.
701 * tests/mv/i-1: Likewise.
704 * configure.ac (AC_INIT): Fix a typo (s/9.6/6.9/) that makes a
705 difference only when running "make dist" without a .git/ subdir.
707 2007-10-09 Jim Meyering <meyering@redhat.com>
709 Move the help-version test into misc/.
710 * tests/help-version: Move to...
711 * tests/misc/help-version: ...here.
712 Source test-lib.sh, as usual.
713 Use $abs_top_builddir, rather than ".." and "../..".
715 Make the runcon-no-reorder test slightly more general.
716 * tests/misc/runcon-no-reorder: Don't hard-code "unconstrained_t".
717 Use slightly more general "runcon $(id -Z)".
718 Suggestion from Stephen Smalley.
720 Skip the chcon test on a system with no SELinux support.
721 * tests/test-lib.sh (require_selinux_): New function.
722 * tests/misc/chcon: Use it.
723 * tests/misc/selinux: Use it here, too.
724 * tests/cp/cp-a-selinux: and here.
725 * tests/selinux: Remove file.
726 * tests/Makefile.am (EXTRA_DIST): Remove selinux.
727 Reported by Mike Frysinger and Bauke Jan Douma.
729 * src/dircolors.hin: Recognize .lzma as a compressed-file suffix.
731 * configure.ac (AM_INIT_AUTOMAKE): Use dist-lzma, rather than dist-bzip2.
733 Now that we don't install su, don't make misleading suggestions.
734 * src/Makefile.am (install-exec-local) [$(INSTALL_SU) != yes]:
735 Don't suggest running "make install-root".
736 (uninstall-local) [$(INSTALL_SU) != yes]: Don't even check
737 the installed binary.
739 2007-10-08 Jim Meyering <meyering@redhat.com>
741 When forming a truncated name, use the "[...]" prefix even for
742 an extremely long name in the current directory
743 * src/remove.c (full_filename_): Rename a local variable.
744 Use two separate "truncated" variables, in case the second
745 call to right_justify does not indicate any truncation -- which
746 would happen only if the single component FILENAME were longer
747 than 511 bytes and DIR_NAME were empty.
749 rm could malfunction under unusual circumstances:
750 When operating on a relative name longer than 511 bytes,
751 and (when either processing a directory that is neither writable
752 nor readable (but still searchable) or when determining whether
753 to prompt), and encountering an ENOMEM error while forming the
754 file name, rm would operate on a truncated-to-511-byte name
755 starting with "[...]" rather than the intended one.
756 * NEWS: Describe the bugs.
757 * src/remove.c: Correct two misuses of full_filename:
758 (full_filename0, xfull_filename): New functions.
759 (full_filename_): Rewrite to use full_filename0.
760 (AD_pop_and_chdir): Use xfull_filename, not full_filename.
761 (write_protected_non_symlink): Likewise.
763 2007-10-07 Jim Meyering <meyering@redhat.com>
765 Don't let a helper function modify errno.
766 * src/remove.c (full_filename_): Save and restore errno.
767 Spotted by Bruno Haible.
769 Reflect 2->3 GPL copyright version update in gnulib.
770 * gl/lib/tempname.h: Update copyright from gnulib.
771 * gl/lib/tempname.c: Likewise.
772 * .x-sc_GPL_version: Don't make an exception for those two files.
774 * configure.ac (AM_INIT_AUTOMAKE): Don't use dist-lzma just yet.
777 * NEWS: Mention this.
778 * README: Add mktemp to the list.
779 * AUTHORS: Add this: mktemp: Jim Meyering
780 * src/mktemp.c: New file.
781 * src/Makefile.am (bin_PROGRAMS): Add mktemp.
782 (mktemp_LDADD): Add $(LIB_GETHRXTIME).
783 * man/mktemp.x: New file.
784 * man/Makefile.am (dist_man_MANS): Add mktemp.1.
785 (mktemp.1): New dependency.
786 * man/.cvsignore: Add mktemp.1.
787 * man/.gitignore: New file.
788 * src/.cvsignore, src/.gitignore: Add mktemp.
789 * tests/misc/mktemp: New file.
790 * tests/misc/Makefile.am (TESTS): Add mktemp.
791 * tests/Coreutils.pm (run_tests): Give the POST-test function
792 access to stdout and stderr contents, so it can verify that
793 the named-on-stdout file/dir does indeed exist and has proper
796 * POTFILES.in: Add src/mktemp.c.
798 Make tempname more random, via the randint module.
799 * gl/modules/tempname (Depends-on): Add randint and stdbool.
800 * gl/lib/tempname.c: Include randint.h and stdbool.h.
801 (uint64_t): Remove definition. Not needed.
802 [_LIBC] (RANDOM_BITS): Remove this block, now that we have proper
804 (check_x_suffix): New function.
805 (gen_tempname_len): Rename from __gen_tempname.
806 Add a parameter, x_suffix_len, telling how many X's there must be at
807 the end of the template.
808 Use pseudo-random numbers all the way, rather than adding 7777
809 from one iteration to the next.
810 (__gen_tempname): New function, to call gen_tempname_len, requiring a
812 * gl/lib/tempname.h: Add prototype for gen_tempname_len.
814 Convert coreutils' rand*.{c,h,m4} into modules.
815 First step: move these files to gl/lib:
816 * lib/rand-isaac.c, lib/rand-isaac.h
817 * lib/randint.c, lib/randint.h
818 * lib/randperm.c, lib/randperm.h
819 * lib/randread.c, lib/randread.h
820 Step 2: add modules/rand* and remove now-unneeded .m4 files.
821 * gl/modules/randint: New file.
822 * gl/modules/randperm: New file.
823 * gl/modules/randread: New file.
824 * m4/randint.m4: Remove file.
825 * m4/randperm.m4: Remove file.
826 * m4/randread.m4: Remove file.
827 Step 3: use the new modules
828 * bootstrap.conf (gnulib_modules): Add randint and randperm.
829 * m4/prereq.m4 (gl_RANDINT, gl_RANDREAD, gl_RANDPERM): Don't require;
830 These have been removed.
831 (gl_ROOT_DEV_INO): Don't require; already handled via bootstrap.conf.
833 Copy from gnulib the parts of tempname that we'll modify.
834 * gl/lib/tempname.c: Copy from gnulib.
835 * gl/lib/tempname.h: Likewise.
836 * gl/modules/tempname: Likewise.
837 Allow GPLv2 on temporarily(?)-imported file from gnulib/libc.
838 * .x-sc_GPL_version: New file.
839 * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version
841 2007-10-07 Jim Meyering <meyering@redhat.com>
843 Avoid a pseudo-leak in sort.
844 * src/sort.c (main) [lint]: Avoid a nominal leak.
846 Use puts, rather than printf ("%s\n". Slightly cleaner.
847 * src/tsort.c (tsort): ...and more efficient.
849 Avoid seq malfunction on non-POSIX systems: mingw, BeOS, Interix.
850 * bootstrap.conf (gnulib_modules): Add vasprintf-posix.
851 Suggestion from Bruno Haible.
853 Avoid a used-uninitialized error.
854 * src/copy.c (copy_internal): Don't overload "use_stat".
856 2007-10-05 Jim Meyering <meyering@redhat.com>
858 Make a failing cross-partition mv give a sensible diagnostic.
859 A cross-partition move of a file in a sticky tmpdir and owned by
860 another user would evoke an invalid diagnostic after copying it:
861 mv: cannot remove `x': Operation not permitted
862 Either of the following (mv.c, remove.c) changes would fix the bug by
863 itself. I think it's slightly better to use both; the added cost is
864 minimal: mv: an extra lstat-per-mv-cmdline-arg-that-goes-cross-partition,
865 rm: an extra lstat-per-unlink-that-fails-w/EPERM.
866 * src/remove.c (remove_entry): Also lstat the file upon EPERM.
867 * src/mv.c (rm_option_init): Initialize root_dev_ino just as is done
868 in rm, so that a cross-partition invoked remove.c:rm call works the
869 same way as one invoked from the command-line use of "rm". That
870 setting of root_dev_ino makes rm() do the equivalent of an additional
871 lstat for each argument, which in turn gives rm enough information to
872 issue the right diagnostic.
873 * tests/mv/sticky-to-xpart (version): New file. Test for the above.
874 * tests/mv/Makefile.am (TESTS): Add sticky-to-xpart.
875 Arrange for "make check-root" to run the new root-only test.
876 * tests/Makefile.am (tb): New target, to run the new root-only test.
878 * src/c99-to-c89.diff: Adjust offsets.
880 Add PACKAGE_VERSION to TESTS_ENVIRONMENT via check.mk.
881 * tests/check.mk (TESTS_ENVIRONMENT): Add PACKAGE_VERSION here,
882 rather than in every Makefile.am that needs it.
883 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Remove PACKAGE_VERSION.
884 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
886 2007-10-04 Jim Meyering <jim@meyering.net>
888 Adapt to new gnulib naming scheme.
889 * gl/lib/se-context.in.h: Rename from gl/lib/se-context_.h.
890 * gl/lib/se-selinux.in.h: Rename from gl/lib/se-selinux_.h.
891 * gl/m4/selinux-context-h.m4: Remove use of AC_LIBSOURCES.
892 * gl/m4/selinux-selinux-h.m4: Likewise.
893 * gl/modules/selinux-h (Files, Makefile.am): Reflect renaming.
894 (Makefile.am) [lib_SOURCES]: Add se-context.in.h and se-selinux.in.h.
896 * lib/search_.h: Remove unused file.
898 * bootstrap (slurp): Adapt to _.h -> .in.h name change.
899 (update_po_files): Work also when there are no .po files in po/.
901 Remove test program: lib/t-fpending.c.
902 * lib/t-fpending.c: Remove file. Now, this test is in gnulib.
903 * lib/Makefile.am: Remove associated rules.
904 * .gitignore: Remove lib/t-fpending.
906 2007-10-03 Jim Meyering <jim@meyering.net>
908 * tests/misc/selinux: Skip this test if the initial chcon fails.
910 2007-10-02 Jim Meyering <jim@meyering.net>
912 Never copy through a symlink that cp has just created.
913 * src/copy.c (copy_internal): When same-file detection requires
914 'stat'ing the destination file, also 'lstat' it and ensure that
915 it wasn't the destination of a preceding copy operation.
916 This bug was introduced on 2007-06-18.
917 * tests/cp/abuse: New test for the above.
918 * tests/cp/Makefile.am (TESTS): Add abuse.
920 2007-09-30 Jim Meyering <jim@meyering.net>
922 cp: do not abbreviate in --help output.
923 * src/cp.c (usage): Don't abbreviate: s/=link/=links/.
924 Reported by GĂ©raud Meyer in <http://bugs.debian.org/444137>.
926 2007-09-29 Eric Blake <ebb9@byu.net>
929 * tests/misc/groups-dash: New test.
930 * tests/misc/Makefile.am (TESTS): Add it.
932 2007-09-28 Eric Blake <ebb9@byu.net>
934 * src/groups.sh: Don't ignore first argument if later argument is --.
936 2007-09-27 Jim Meyering <jim@meyering.net>
938 Avoid spurious test failure when SELinux stats "selinux/class".
939 * tests/ls/stat-free-symlinks: Grep for more precise /^stat("x"/.
941 Move file-set and hash-triple modules to gnulib.
942 * bootstrap.conf (gnulib_modules): Remove file-set, now that
943 it's in gnulib, and the canonicalize module requires it there.
944 * gl/lib/file-set.c, gl/lib/file-set.h, gl/modules/hash-triple: Remove.
945 * gl/lib/hash-triple.c, gl/lib/hash-triple.h, gl/modules/file-set:
948 Add a test to exercise a readlink bug.
949 * tests/misc/readlink-fp-loop: New file. Test for the readlink bug
950 fixed through today's change to Gnulib's canonicalize module.
951 * tests/misc/Makefile.am (TESTS): Add readlink-fp-loop.
952 Bug report and a test case from mpb.mail@gmail.com.
954 2007-09-25 Pádraig Brady <P@draigBrady.com>
956 * doc/coreutils.texi (date invocation):
957 Make "Date input formats" easier to navigate to.
959 2007-09-25 Jim Meyering <jim@meyering.net>
961 Use XOR, not OR to combine bits.
962 * gl/lib/hash-triple.c (triple_hash): Use XOR (^), not OR (|), to
963 combine the bits from hashing the name and those of the inode number.
964 Add a few comments and remove out-of-context ones.
966 2007-09-24 Jim Meyering <jim@meyering.net>
968 * NEWS: The recent rm-diagnostic fix also affects cross-partition "mv".
970 copy.c: Remove definitions of factored-out functions.
971 * src/copy.c: Include "file-set.h".
972 (seen_file, record_file): Remove functions that I factored
975 2007-09-22 Jim Meyering <jim@meyering.net>
977 Don't print the commands of a 10-line script that's run in each subdir.
978 * tests/check.mk (vc_exe_in_TESTS): Add a leading "@", to reduce noise.
980 rm: give a sensible diagnostic when failing to remove a symlink
981 On some systems (those with openat et al), when rm would fail to
982 remove a symlink, it would fail with the misleading diagnostic,
983 "Too many levels of symbolic links".
984 * NEWS: Mention the bug fix.
985 * src/remove.c (is_nondir_lstat): New function.
986 (remove_entry): Use it to catch failed-to-remove symlink (and any
987 other non-dir) here so that we don't fall through and try to treat
988 it as directory, which -- with a symlink -- would provoke the bogus
990 * tests/rm/fail-eacces: Add a test for the above.
991 * src/c99-to-c89.diff: Adjust offsets.
993 rm: fix a tiny, nearly inconsequential bug.
994 Don't perform a "."-relative lstat, when the file in question
995 may well not be in ".". Although this is a bug, a few attempts
996 to exercise it on a linux-2.6.22 system failed. You probably need
997 a pre-openat system to trigger the failure. The consequence of this
998 bug would be a lower-quality diagnostic upon failed dir removal.
999 * src/remove.c (is_dir_lstat): Add a parameter, fd_cwd.
1000 Use it instead of hard-coding AT_FDCWD.
1001 (remove_entry): Call is_dir_lstat with fd_cwd.
1003 2007-09-22 Karl Berry <karl@freefriends.org>
1005 * TODO: It'd be nice to add renice.
1007 2007-09-21 Jim Meyering <jim@meyering.net>
1009 Avoid test failure due to now-parallelized tests.
1010 * tests/du/two-args: Run "du .." from a sub-directory one level deeper.
1012 2007-09-16 Jim Meyering <jim@meyering.net>
1014 * tests/misc/tac-continue: Arrange to remove a temporary file.
1016 * tests/check.mk (vc_exe_in_TESTS): Don't rely on the value of
1017 $(TESTS), so that "make check TESTS=test-name" works once again.
1019 * tests/CuTmpdir.pm: Use File::Find + chmod syscall, not chmod -R.
1021 Revamp most test scripts.
1023 * tests/rm/v-slash: Avoid test failure with non-C locale.
1024 Reported by Michael Stone.
1026 Enable some previously omitted test scripts. Add a test cross-check.
1027 * tests/rm/Makefile.am (TESTS): Add empty-name and unreadable.
1028 * tests/rm/empty-name: Likewise.
1029 * tests/rm/unreadable: Reenable this test. Adjust for new rm.
1030 * tests/mkdir/Makefile.am: Add writable-under-readonly.
1031 * tests/mkdir/writable-under-readonly: Add some comments.
1032 This test is always skipped, for now.
1033 * tests/Makefile.am (ta): Hook up the new root-only script.
1034 * tests/tail-2/infloop-1: Make this test pass.
1035 * tests/tail-2/Makefile.am (TESTS): Add infloop-1.
1036 * tests/tail-2/fflush: Remove unused file.
1037 * tests/check.mk (vc_executable_is_in_TESTS): More portable.
1038 * tests/check.mk (check): Depend on the above.
1039 * build-aux/check.mk: Remove comment mentioning AUTHORS file.
1041 Factor out definitions in TESTS_ENVIRONMENT of srcdir, top_srcdir, etc.
1042 tests/check.mk (top_srcdir): Define.
1043 tests/*/Makefile.am: Remove definitions of $(srcdir), $(top_srcdir),
1044 $(abs_top_srcdir), and $(abs_top_builddir), since they're
1045 defined via the included tests/check.mk.
1047 tests/general: Remove from VC, this long-unused directory and contents.
1049 Adapt tests/tail-2/ to use test-lib.sh.
1050 Adapt tests/readlink/ to use test-lib.sh.
1052 Move the sole test in tests/ls-2/ to tests/misc/.
1053 * tests/ls-2/basic-1: Move this file to ...
1054 * tests/misc/ls-misc: ...here. Don't rely on $PROG in env.
1055 * tests/misc/Makefile.am (TESTS): Add ls-misc.
1056 * tests/Makefile.am (SUBDIRS): Remove ls-2.
1057 * tests/ls-2: Remove the directory.
1058 * configure.ac (AC_CONFIG_FILES): Remove tests/ls-2/Makefile.
1060 More misc, test-related changes. (some to allow running tests as root)
1062 Move all tests from test/{od,sha1sum,shred,stty} to tests/misc/.
1063 Reflect these renamings:
1066 sha1sum/basic-1 misc/sha1sum
1067 sha1sum/sample-vec misc/sha1sum-vec
1068 shred/exact misc/shred-exact
1069 shred/remove misc/shred-remove
1070 stty/basic-1 misc/stty
1071 stty/invalid misc/stty-invalid
1072 stty/row-col-1 misc/stty-row-col
1073 * tests/misc/Makefile.am (TESTS): Add the new files.
1074 * tests/Makefile.am (SUBDIRS): Remove the dir names.
1075 * tests/od, tests/sha1sum, tests/shred, tests/stty: Remove the
1077 * configure.ac (AC_CONFIG_FILES): Remove the corresponding Makefile
1080 Move the two tests in tests/tee to tests/misc/.
1081 * tests/tee/basic: Move this file to ...
1082 * tests/misc/tee: ...here. Don't rely on $PROG in env.
1083 * tests/tee/dash: Move this file to ...
1084 * tests/misc/tee-dash: ...here. Don't rely on $PROG in env.
1085 * tests/misc/Makefile.am (TESTS): Add tee.
1086 * tests/Makefile.am (SUBDIRS): Remove tee.
1087 * tests/tee: Remove the directory.
1088 * configure.ac (AC_CONFIG_FILES): Remove tests/tee/Makefile
1090 Move the two tests in tests/sum/ to tests/misc/.
1091 * tests/sum/basic-1: Move this file to ...
1092 * tests/misc/sum: ...here. Don't rely on $PROG in env.
1093 * tests/sum/sysv: Move this file to ...
1094 * tests/misc/sum-sysv: ...here. Adapt it to use test-lib.sh.
1095 * tests/misc/Makefile.am (TESTS): Add sum and sum-sysv.
1096 * tests/Makefile.am (SUBDIRS): Remove sum.
1097 * tests/sum: Remove the directory.
1098 * configure.ac (AC_CONFIG_FILES): Remove tests/sum/Makefile.
1100 Move the sole test in tests/tsort/ to tests/misc/tsort.
1101 * tests/tsort/basic-1: Move this file to ...
1102 * tests/misc/tsort: ...here. Don't rely on $PROG in env.
1103 * tests/misc/Makefile.am (TESTS): Add tsort.
1104 * tests/Makefile.am (SUBDIRS): Remove tsort.
1105 * tests/tsort: Remove the directory.
1106 * configure.ac (AC_CONFIG_FILES): Remove tests/tsort/Makefile.
1108 Move the sole test in tests/unexpand to tests/misc/unexpand.
1109 * tests/unexpand/basic-1: Move this file to ...
1110 * tests/misc/unexpand: ...here. Don't rely on $PROG in env.
1111 * tests/misc/Makefile.am (TESTS): Add unexpand.
1112 * tests/Makefile.am (SUBDIRS): Remove unexpand.
1113 * tests/unexpand: Remove the directory.
1114 * configure.ac (AC_CONFIG_FILES): Remove tests/unexpand/Makefile.
1116 Move the sole test in tests/seq to tests/misc/seq.
1117 * tests/seq/basic: Move this file to ...
1118 * tests/misc/seq: ...here. Don't rely on $PROG in env.
1119 * tests/misc/Makefile.am (TESTS): Add seq.
1120 * tests/Makefile.am (SUBDIRS): Remove seq.
1121 * tests/seq: Remove the directory.
1122 * configure.ac (AC_CONFIG_FILES): Remove tests/seq/Makefile
1124 Convert tests/mkdir/ to use test-lib.sh.
1126 Move the two tests in tests/md5sum to tests/misc/md5sum.
1127 * tests/md5sum/basic-1: Move this file to ...
1128 * tests/misc/md5sum: ...here. Don't rely on $PROG in env.
1129 * tests/md5sum/newline-1: Move this file to ...
1130 * tests/misc/md5sum-newline: ...here. Don't rely on $PROG in env.
1131 * tests/misc/Makefile.am (TESTS): Add md5sum.
1132 * tests/Makefile.am (SUBDIRS): Remove md5sum.
1133 * tests/md5sum: Remove the directory.
1134 * configure.ac (AC_CONFIG_FILES): Remove tests/md5sum/Makefile
1136 tests/sample-test: Update to use test-lib.sh.
1138 Convert tests/misc/ to use test-lib.sh, too.
1139 Convert tests/ls/, too.
1140 Convert tests/ln/, too.
1141 Convert tests/install/, too.
1143 Move the two tests in tests/fmt to tests/misc/fmt.
1144 * tests/fmt/basic: Move this file to ...
1145 * tests/misc/fmt: ...here. Don't rely on $PROG in env.
1146 * tests/fmt/long-line: Move this file to ...
1147 * tests/misc/fmt-long-line: ...here.
1148 * tests/misc/Makefile.am (TESTS): Add fmt.
1149 * tests/Makefile.am (SUBDIRS): Remove fmt.
1150 * tests/fmt: Remove the directory.
1151 * configure.ac (AC_CONFIG_FILES): Remove tests/fmt/Makefile
1153 Move the sole test in tests/factor to tests/misc/factor.
1154 * tests/factor/basic: Move this file to ...
1155 * tests/misc/factor: ...here. Don't rely on $PROG in env.
1156 * tests/misc/Makefile.am (TESTS): Add factor.
1157 * tests/Makefile.am (SUBDIRS): Remove factor.
1158 * tests/factor: Remove the directory.
1159 * configure.ac (AC_CONFIG_FILES): Remove tests/factor/Makefile
1161 Move the sole test in tests/expr to tests/misc/expr.
1162 * tests/expr/basic: Move this file to ...
1163 * tests/misc/expr: ...here. Don't rely on $PROG in env.
1164 * tests/misc/Makefile.am (TESTS): Add expr.
1165 * tests/Makefile.am (SUBDIRS): Remove expr.
1166 * tests/expr: Remove the directory.
1167 * configure.ac (AC_CONFIG_FILES): Remove tests/expr/Makefile
1169 Convert tests/du/*, too.
1171 Move the sole test in tests/dircolors to tests/misc/dircolors.
1172 * tests/dircolors/simple: Move this file to...
1173 * tests/misc/dircolors: ...here. Don't rely on $PROG in env.
1174 * tests/misc/Makefile.am (TESTS): Add dircolors.
1175 * tests/Makefile.am (SUBDIRS): Remove dircolors.
1176 * tests/dircolors: Remove the directory.
1177 * configure.ac (AC_CONFIG_FILES): Remove tests/dircolors/Makefile
1179 Convert tests/dd/*, too.
1181 Convert tests/mv, too.
1182 * tests/other-fs-tmpdir: Before, all callers would exit 77 upon
1183 failure to find the required dir. Now, exit 77 in this script so
1184 callers don't have to. Adjust callers.
1186 Adjust chgrp, chmod, chown, cp tests to use test-lib.sh.
1187 * tests/check.mk: Also define abs_top_builddir.
1189 Parallel "make check" support.
1190 * build-aux/check.mk: New file, from The Vaucanson Group.
1191 * .x-sc_GPL_version: New file, to allow "version 2 or later"
1192 in build-aux/check.mk.
1193 * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
1194 * tests/check.mk: New file.
1195 * tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.
1197 Begin factoring "sample-test" out of test scripts.
1198 * tests/test-lib.sh: New file, to be sourced by all tests that
1199 were previously derived from the "sample-test" template.
1200 * tests/mkdtemp: New file.
1201 * tests/touch/dir-1: Use test-lib.sh.
1202 * tests/touch/empty-file: Likewise.
1203 * tests/touch/fail-diag: Likewise.
1204 * tests/touch/fifo: Likewise.
1205 * tests/touch/no-create-missing: Likewise.
1206 * tests/touch/no-rights: Likewise. Also, don't sleep.
1207 * tests/touch/not-owner: Likewise.
1208 * tests/touch/obsolescent: Likewise.
1209 * tests/touch/read-only: Likewise.
1210 * tests/touch/relative: Likewise.
1211 * tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
1212 to get the parallel-"make check" bits.
1214 Move a slow test into tests/misc.
1215 * tests/check.mk: Wrapper.
1216 * tests/ls/time-1: Move this file to tests/misc/ls-time.
1217 * tests/misc/ls-time: New file. From tests/ls/time-1.
1218 * tests/ls/Makefile.am (TESTS): Remove time-1.
1219 * tests/misc/Makefile.am (TESTS): Add ls-time.
1221 Add support for parallel "make check" (in tests/misc, for now)
1223 2007-09-08 Jim Meyering <jim@meyering.net>
1225 Accommodate gnulib's renaming: __fpending.h -> fpending.h.
1226 * lib/t-fpending.c: Include "fpending.h", not "__fpending.h".
1228 2007-09-07 Jim Meyering <jim@meyering.net>
1230 chmod: don't ignore a dangling symlink
1231 * NEWS: Mention the bug fix.
1232 * src/chmod.c (process_file): Handle the case of FTS_SLNONE,
1233 i.e., give a diagnostic saying we cannot operate on such a file.
1234 * tests/chmod/thru-dangling: Compare new stderr output with expected.
1236 2007-09-07 Bob Proulx <bob@proulx.com>
1238 Add a test: demonstrate that chmod ignores a dangling symlink
1239 * tests/chmod/thru-dangling: New test. Fails.
1240 * tests/chmod/Makefile.am (TESTS): Add thru-dangling.
1242 2007-09-05 Jim Meyering <jim@meyering.net>
1244 Adapt to new SELinux behavior: "?" vs. new "unlabeled"
1245 * src/ls.c (gobble_file): Interpret the new "unlabeled" indicator
1246 from getfilecon/lgetfilecon the same way we interpret a negative
1247 return value: no security context. So we don't print the "+".
1248 * tests/selinux: Recognize that "unlabeled" means insufficient
1249 support for SELinux, just like "?".
1251 2007-09-03 Jim Meyering <jim@meyering.net>
1253 Invoke $(AUTOCONF) manually, if needed to get an updated version string.
1254 * GNUmakefile: Don't actually touch configure.ac.
1255 That would make git-version-gen always print "...-dirty".
1257 Don't change '-'s to '.'s in the string from git-describe.
1258 * build-aux/git-version-gen: Leave '-'s in the string from git-describe.
1259 Otherwise, s/-/./g would make it too hard to distinguish the base
1260 version number from the appended .DD suffixes.
1262 2007-09-03 Jim Meyering <jim@meyering.net>
1264 * README-hacking: Require rsync, rather than wget.
1266 2007-09-02 Jim Meyering <jim@meyering.net>
1268 * bootstrap (WGET_COMMAND): Remove code to set this variable.
1270 Ensure that $(VERSION) is up to date for dist-related targets.
1271 * GNUmakefile: Arrange to rerun autoconf, if the version reported by
1272 git-version-gen doesn't match $(VERSION), but only for dist targets.
1274 bootstrap: uses rsync to download the .po files
1275 * bootstrap (po_download_command_format): New global.
1276 (download_po_files): Use rsync.
1277 (update_po_files): Don't remove .po files after download,
1278 so future rsync runs can take advantage of the copies.
1280 2007-09-01 Jim Meyering <jim@meyering.net>
1282 * bootstrap (gnulib_tool): Make sha1sum check quietly.
1284 Ensure that snapshot version changes make it to groups, too.
1285 * src/Makefile.am (groups): Depend on Makefile.
1287 Make groups-version executable,
1288 * tests/misc/groups-version: ... as it was in the patch.
1290 2007-08-31 Eric Blake <ebb9@byu.net>
1292 Test yesterday's change to groups.
1293 * tests/misc/groups-version: New test.
1294 * tests/misc/Makefile.am (TESTS): Add groups-version.
1296 2007-08-31 Jim Meyering <jim@meyering.net>
1298 Solve the unnecessary-.po-file-regeneration problem once and for all.
1299 * bootstrap (download_po_files): New function, renamed from
1300 get_translations. Now, downloads, but doesn't update LINGUAS.
1301 (update_po_files): New function.
1303 2007-08-30 Jim Meyering <jim@meyering.net>
1305 Shorten the snapshot version string by removing the "g".
1306 * build-aux/git-version-gen: Remove git-describe's "g" that would
1307 always precede the abbreviated SHA1. Suggestion from Dmitry V. Levin.
1309 Perform the s,rm,/bin/rm, fix-up properly. No more kludge.
1310 * Makefile.am (EXTRA_DIST): Remove .kludge-stamp.
1311 (.kludge-stamp): Remove rule. Instead, ...
1312 (dist-hook): Do the job here, operating on the file in $(distdir).
1313 (rm_subst): Adjust regexp to match "rm -f rm$(EXEEXT)", not "rm -f rm".
1314 (MAINTAINERCLEANFILES): s/+=/=/, now that this is the sole use.
1315 (dist-hook): Remove the legacy-from-cvs install-sh is-executable check.
1316 * .gitignore: Remove .kludge-stamp.
1318 Make inter-release --version output more useful.
1319 Now, each snapshot has a version "number" like 6.9-219-g58ddd,
1320 which indicates that it is built using the 219th change set
1321 (in _some_ repository) following the "v6.9" tag, and that 58ddd
1322 is a prefix of the commit SHA1.
1323 * build-aux/git-version-gen: New file.
1324 * configure.ac: Run it to set the version.
1325 * Makefile.am (dist-hook): Arrange so that .version appears only
1326 in distribution tarballs, never in a checked-out repository.
1327 * .gitignore: Add .version here, too. Just in case.
1329 2007-08-30 Eric Blake <ebb9@byu.net>
1331 * src/.gitignore: Ignore *.exe for platforms with non-empty $(EXEEXT).
1333 2007-08-30 Eric Blake <ebb9@byu.net>
1335 Use PACKAGE_NAME instead of GNU_PACKAGE.
1336 * src/Makefile.am (.sh, uninstall-local): Adjust all users of
1337 hand-rolled GNU_PACKAGE to instead use autoconf-provided
1339 * src/basename.c (main): Likewise.
1340 * src/chroot.c (main): Likewise.
1341 * src/dirname.c (main): Likewise.
1342 * src/echo.c (main): Likewise.
1343 * src/expr.c (main): Likewise.
1344 * src/factor.c (main): Likewise.
1345 * src/groups.sh (version): Likewise. Also, reflect change in
1346 --version output due to GPLv3.
1347 * src/hostid.c (main): Likewise.
1348 * src/hostname.c (main): Likewise.
1349 * src/link.c (main): Likewise.
1350 * src/logname.c (main): Likewise.
1351 * src/nice.c (main): Likewise.
1352 * src/nohup.c (main): Likewise.
1353 * src/printenv.c (main): Likewise.
1354 * src/printf.c (main): Likewise.
1355 * src/pwd.c (main): Likewise.
1356 * src/setuidgid.c (main): Likewise.
1357 * src/sleep.c (main): Likewise.
1358 * src/system.h (case_GETOPT_VERSION_CHAR): Likewise.
1359 * src/test.c (main): Likewise.
1360 * src/true.c (main): Likewise.
1361 * src/unlink.c (main): Likewise.
1362 * src/uptime.c (main): Likewise.
1363 * src/users.c (main): Likewise.
1364 * src/whoami.c (main): Likewise.
1365 * src/yes.c (main): Likewise.
1366 * configure.ac (AC_CHECK_DECLS): No need to check strtoimax,
1367 strtoumax, since gnulib does this.
1369 2007-08-30 Jim Meyering <jim@meyering.net>
1371 Ensure that TMPDIR is valid. Otherwise, it would cause test failures.
1372 * tests/misc/tty-eof: Set TMPDIR=.
1373 * tests/misc/sort-compress: Likewise.
1375 Use EXIT_FAILURE, not EXIT_FAIL, now that EXIT_FAILURE is always 1.
1376 * src/system.h (EXIT_FAIL): Remove definition.
1377 * src/chroot.c (main): EXIT_FAIL -> EXIT_FAILURE.
1378 * src/env.c (main): Likewise.
1379 * src/nice.c (main): Likewise.
1380 * src/su.c (change_identity, main): Likewise.
1381 * src/tty.c (main): Likewise.
1382 Suggestion from Eric Blake.
1384 2007-08-28 Jim Meyering <jim@meyering.net>
1386 * src/test.c (usage): Note that [ honors --help and --version,
1387 but that test does not. Suggestion from Dan Jacobson.
1389 By default, do not install hostname anymore; no kidding, this time.
1390 * src/Makefile.am (EXTRA_PROGRAMS): Remove hostname from this list,
1391 now that it's no longer being installed by default. This should
1392 have been part of the 2007-08-21 change.
1393 (check-duplicate-no-install): New rule to ensure this doesn't
1395 (check): Depend on it.
1397 Reflect renaming: mreadlink-with-size -> areadlink-with-size.
1398 * bootstrap.conf: Update module name.
1399 * src/copy.c (copy_internal): Update header and function names.
1400 * src/ls.c (get_link_name): Likewise.
1401 * src/readlink.c (main): Likewise.
1402 * src/stat.c (print_stat): Likewise.
1404 Add file system type names and magic numbers from "man 2 statfs".
1405 * src/stat.c (human_fstype): Also handle BEFS, BFS, BINFMT_MISC,
1406 FUSECTL, HUGETLBFS, NFSD and OPENPROM.
1408 2007-08-27 Jim Meyering <jim@meyering.net>
1410 Add some file system type names and magic numbers from glibc.
1411 * src/stat.c (human_fstype): Add any file system names and values
1412 present in glibc's linux_fsinfo.h but not in this list.
1413 Alphabetize the S_* names and capitalize the hexadecimal constants.
1415 2007-08-26 Jim Meyering <jim@meyering.net>
1417 * tests/misc/fold: Fix a typo: missing \ in a diagnostic
1418 no one is likely ever to see.
1420 2007-08-25 Jim Meyering <jim@meyering.net>
1422 * src/dircolors.hin: Add .dz and .svgz as archive suffixes.
1424 Remove all .cvsignore files from version control.
1426 2007-08-24 Jim Meyering <jim@meyering.net>
1428 bootstrap: Ignore more.
1429 * bootstrap (symlink_to_dir): Add a directory name like
1430 uniwidth to e.g., lib/.gitignore.
1431 (slurp): Handle the sys_stat_.h -> sys mapping, too.
1432 * .hgignore: Remove this file, too.
1433 * Makefile.am (EXTRA_DIST): Remove .gitignore and .hgignore.
1435 No longer version-control .???ignore files in lib/, m4/, and po/.
1436 * .gitignore: Ignore a few files in lib/, m4/, and po/ that are not
1437 picked up automatically.
1438 * lib/.gitignore, lib/.cvsignore: Remove files.
1439 * m4/.gitignore, m4/.cvsignore: Remove files.
1440 * po/.gitignore, po/.cvsignore: Remove files.
1442 bootstrap: when fetching .po files, do not remove .gmo files.
1443 * bootstrap (get_translations): Don't remove *.gmo files!
1444 They can be expensive to regenerate.
1446 Create .gitignore and/or .cvsignore from scratch, if absent.
1447 This is in preparation for my removing those files from version
1448 control in the directories managed by gnulib-tool.
1449 * bootstrap: New setting: vc_ignore.
1450 (insert_sorted_if_absent): Create $file if absent.
1451 Adapt to new, possibly empty, list: $vc_ignore.
1453 * src/system.h (fseeko, ftello): Remove now-unneeded definitions.
1454 * src/od.c (LDBL_DIG): Remove now-unneeded definition.
1456 Arrange to use tag names like vM.N, rather than COREUTILS-M_N.
1457 * Makefile.maint (this-vc-tag) [git]: Simply use v$(VERSION).
1458 (this-vc-tag-regexp): New variable.
1459 (vc-tag-check): Use it, rather than $(this-vc-tag).
1461 2007-08-23 Jim Meyering <jim@meyering.net>
1463 * src/dircolors.hin: Add xterm-16color, xterm-88color and eterm-color.
1464 Suggestion from Dan Nicolaescu.
1466 Don't let ln be a party to destroying user data.
1467 * src/ln.c: Include "file-set.h", "hash.h" and "hash-triple.h".
1468 (dest_set, DEST_INFO_INITIAL_CAPACITY): New globals.
1469 (do_link): Refuse to remove a just-created link.
1470 Record a name,dev,ino triple for each link we create.
1471 (main): Initialize dest_set, if needed.
1472 * tests/mv/childproof: Test for the above fix.
1473 * NEWS: Document this.
1474 Reported by Eric Blake.
1476 Move functions from copy.c into new modules, since ln needs them, too.
1477 * bootstrap.conf (gnulib_modules): Add file-set.
1478 * gl/lib/file-set.c (record_file, seen_file): Functions from copy.c.
1479 * gl/lib/file-set.h: Add prototypes.
1480 * gl/lib/hash-triple.c (triple_hash, triple_hash_no_name):
1481 (triple_compare, triple_free): Functions from copy.c.
1482 * gl/lib/hash-triple.h (struct F_triple): Define. From copy.c.
1484 * gl/modules/file-set: New module.
1485 * gl/modules/hash-triple: New module.
1486 * src/Makefile.am (copy_sources): New variable.
1487 (ginstall_SOURCES, cp_SOURCES, mv_SOURCES): Use it.
1488 * src/copy.c: Include hash-triple.h.
1489 No longer include hash-pjw.h.
1490 (copy_internal): Don't pass a NULL third argument to record_file,
1491 since that function no longer accepts that.
1492 (record_file): Move this function to file-set.c.
1493 Along the way, remove the code to allow a NULL stat-buffer pointer.
1495 (seen_file): Move this function to file-set.c.
1496 (struct F_triple): Move declaration to hash-triple.h.
1497 (triple_compare, triple_free, triple_hash, triple_hash_no_name):
1498 Move these functions to hash-triple.c.
1500 bootstrap: generate more ignorable names
1501 * bootstrap (slurp): When generating ignorable names, also map
1502 .sin to .sed, .gperf to .c, and .y to .c.
1504 * Makefile.maint (patch-check): Don't remove temporaries upon failure.
1506 2007-08-22 Jim Meyering <jim@meyering.net>
1508 * src/c99-to-c89.diff: Adjust offsets.
1510 Change "rm --verbose -r a//" not to print extra slashes in a///b
1511 * src/remove.c (push_dir): Don't copy trailing slashes onto the stack.
1512 Reported by François Pinard.
1513 * tests/rm/v-slash: New file. Test for the above change.
1514 * tests/rm/Makefile.am (TESTS): Add v-slash.
1516 * src/date.c: Don't include "getline.h", now removed from gnulib;
1517 its declarations are now in <stdio.h>.
1518 * src/md5sum.c: Likewise.
1519 * src/dircolors.c: Likewise.
1521 * src/copy.c (DEST_INFO_INITIAL_CAPACITY): Correct a comment.
1523 2007-08-21 Jim Meyering <jim@meyering.net>
1525 By default, do not install hostname anymore.
1526 * configure.ac: Add "hostname" to the list of not-installed programs.
1527 * src/Makefile.am (no_install__progs): Add "hostname" here, too.
1528 * NEWS: Mention this.
1530 2007-08-20 Bob Proulx <bob@proulx.com>
1532 Clarify touch documentation of file arguments.
1533 * src/touch.c (usage): Improve wording of documentation regarding
1534 file argument handling and special handling of - argument.
1535 * doc/coreutils.texi (touch invocation): Likewise.
1536 Documentation problem reported by Vincent Lefevre.
1538 2007-08-20 Paul Eggert <eggert@cs.ucla.edu>
1540 * NEWS: The old cp -p bug affected coreutils releases before 6.0.
1541 Problem reported by Soren Spies in
1542 <http://lists.gnu.org/archive/html/bug-coreutils/2007-08/msg00106.html>.
1543 To be conservative, just say the bug was in all versions through 6.6.
1545 2007-08-19 Eric Blake <ebb9@byu.net>
1547 Avoid consuming too much seekable input when yesno is used.
1548 * bootstrap.conf (gnulib_modules): Add closein.
1549 * src/system.h (includes): Also include closein.h.
1550 * src/mv.c (main): Use close_stdin, not close_stdout.
1551 * src/cp.c (main): Likewise.
1552 * src/ln.c (main): Likewise.
1553 * src/rm.c (main): Likewise.
1554 * src/install.c (main): Likewise.
1555 * NEWS: Document the fix.
1557 2007-08-20 Jim Meyering <jim@meyering.net>
1559 Parallel "make check" support.
1560 * build-aux/check.mk: New file, from The Vaucanson Group.
1561 * .x-sc_GPL_version: New file, to allow "version 2 or later"
1562 in build-aux/check.mk.
1563 * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
1564 * tests/check.mk: New file.
1565 * tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.
1567 Begin factoring "sample-test" out of test scripts.
1568 * tests/test-lib.sh: New file, to be sourced by all tests that
1569 were previously derived from the "sample-test" template.
1570 * tests/mkdtemp: New file.
1571 * tests/touch/dir-1: Use test-lib.sh.
1572 * tests/touch/empty-file: Likewise.
1573 * tests/touch/fail-diag: Likewise.
1574 * tests/touch/fifo: Likewise.
1575 * tests/touch/no-create-missing: Likewise.
1576 * tests/touch/no-rights: Likewise. Also, don't sleep.
1577 * tests/touch/not-owner: Likewise.
1578 * tests/touch/obsolescent: Likewise.
1579 * tests/touch/read-only: Likewise.
1580 * tests/touch/relative: Likewise.
1581 * tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
1582 to get the parallel-"make check" bits.
1584 2007-08-18 Jim Meyering <jim@meyering.net>
1586 Use new "idcache.h" header.
1587 * src/ls.c: Remove ancient declarations of getuser and getgroup.
1588 Include "idcache.h", instead.
1590 Run each Coreutils.pm-based test in its own subdirectory.
1591 * tests/CuTmpdir.pm: New file.
1592 * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm.
1593 * tests/misc/od, tests/misc/base64, tests/misc/basename:
1594 * tests/misc/cut, tests/misc/date, tests/misc/dirname:
1595 * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail:
1596 * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum:
1597 * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum:
1598 * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag:
1599 * tests/misc/wc-files0-from, tests/misc/xstrtol:
1600 * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from:
1601 * tests/expr/basic, tests/factor/basic, tests/fmt/basic:
1602 * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1:
1603 * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec:
1604 * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1:
1605 * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it.
1606 * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test",
1607 not "../../src/test", so it works when run from a subdirectory.
1608 * tests/ls-2/tests: Create temp files and dirs from within the perl
1609 script, so that they're removed, when run from a subdirectory.
1610 * tests/ls-2/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir,
1611 so we can use "$ENV{abs_top_builddir}/src/test" in a test script.
1613 2007-08-16 Jim Meyering <jim@meyering.net>
1615 Consolidate od tests.
1616 * tests/misc/od: Perform od-zero-len's test here.
1617 Include boilerplate code, so tests run in a subdirectory.
1618 * tests/misc/od-zero-len: Remove this file.
1620 * tests/ls/time-1: Include sample-test boilerplate code.
1621 Remove the then-unnecessary, hard-coded envvar "unset" commands.
1623 2007-08-15 Jim Meyering <jim@meyering.net>
1625 Move a slow test into tests/misc.
1626 * tests/ls/time-1: Move this file to tests/misc/ls-time.
1627 * tests/misc/ls-time: New file. From tests/ls/time-1.
1628 * tests/ls/Makefile.am (TESTS): Remove time-1.
1629 * tests/misc/Makefile.am (TESTS): Add ls-time.
1631 od --skip (-j) works even on files in /proc, when the kernel lies
1632 * src/od.c (skip): Don't let kernel misinformation (nonempty files
1633 in /proc with stat.st_size == 0) make "od -j N" misbehave.
1634 Patch by Paul Eggert.
1635 * NEWS: Document this work-around.
1636 * tests/misc/od-zero-len: New file, test for the above.
1638 * src/printf.c (usage): Adjust summary to also mention OPTIONs.
1641 2007-08-14 Jim Meyering <jim@meyering.net>
1643 od: fix a bug that arises when skipping exact length of file
1644 * NEWS: Document the bug fix.
1645 * src/od.c (skip): Call fseek even when n_skip is exactly the
1646 same as the length of the current file. Otherwise, the next
1647 iteration would use unadjusted input stream pointer, thus ignoring
1648 the desired "skip". Report and patch by Paul GHALEB.
1650 * tests/misc/od: New file, test for the above.
1651 * tests/misc/Makefile.am (TESTS): Add od.
1653 2007-08-10 Paul Eggert <eggert@cs.ucla.edu>
1655 Accommodate more xstrtol changes.
1656 * src/df.c (long_options): Don't bother prepending "--" to long
1657 options that OPT_STR might decode, as that hack is no longer needed.
1658 (main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR.
1659 * src/du.c (long_options, main): Likewise.
1660 * src/ls.c (decode_switches): Likewise.
1661 * src/od.c (long_options, main): Likewise.
1662 * src/pr.c (first_last_page, main): Likewise.
1663 * src/sort.c (long_options, specify_sort_size): Likewise.
1664 * src/pr.c (first_last_page): Accept option index and option char
1665 instead of an assembled option string. All callers changed.
1666 * src/sort.c (specify_sort_size): Likewise.
1667 * src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT):
1670 2007-08-05 Jim Meyering <jim@meyering.net>
1672 Encapsulate a static variable.
1673 * src/system.h (opt_str_storage): Move static var into...
1674 (short_opt_str): ... new static inline function.
1675 (OPT_STR): Use the new function.
1677 2007-08-04 Jim Meyering <jim@meyering.net>
1679 Exercise xstrtol's diagnostics via pr's --pages option.
1680 * tests/misc/xstrtol: New file.
1681 * tests/misc/Makefile.am (TESTS): Add xstrtol.
1683 2007-08-04 Paul Eggert <eggert@cs.ucla.edu>
1685 Adapt to new human and xstrtol API.
1686 * src/df.c (long_options): Prepend "--" to long options that
1687 OPT_STR might decode.
1688 * src/du.c (long_options): Likewise.
1689 * src/od.c (long_options): Likewise.
1690 * src/sort.c (long_options): Likewise.
1691 * src/df.c (main): Adjust to new human and xstrtol API.
1692 * src/du.c (main): Likewise.
1693 * src/ls.c (decode_switches): Likewise.
1694 * src/od.c (main): Likewise.
1695 * src/pr.c (first_last_page): Likewise. New argument OPTION.
1696 All callers changed.
1697 * src/sort.c (specify_sort_size): New arg OPTION. All callers
1698 changed. Adjust to new xstrtol API.
1699 * src/system.h (opt_str_storage): New static var.
1700 (OPT_STR, LONG_OPT_STR, OPT_STR_INIT): New macros.
1702 2007-08-02 Jim Meyering <jim@meyering.net>
1704 Adjust one more test to accommodate the recent fts change.
1705 This matters only on systems with insufficient openat support.
1706 * tests/du/inacc-dest: Adjust expected diagnostic.
1708 Adjust the other two "no-x" tests and unify all three.
1709 * tests/du/no-x: Factor out du-specific bits.
1710 * tests/chmod/no-x: Use the same code.
1711 * tests/chgrp/no-x: Use the same code.
1713 Adapt du's no-x test not to fail on older Linux systems.
1714 * tests/du/no-x: Accept a third variant of the diagnostic.
1716 2007-07-31 Jim Meyering <jim@meyering.net>
1718 du: print size (probably incomplete) of each inaccessible directory
1719 * src/du.c (process_file): Print what we know of the size of a
1720 directory even when it is inaccessible. What we print is just the
1721 size of the directory itself, not counting any of its contents.
1722 * tests/du/inacc-dir: Test for this.
1723 * NEWS: Mention this change.
1725 Add a test for du not counting size of inaccessible directories.
1726 * tests/du/inacc-dir: New file. Test for fts.c bug fixed yesterday.
1727 * tests/du/Makefile.am (TESTS): Add inacc-dir.
1728 * NEWS: Mention the bug fix.
1730 2007-07-28 Jim Meyering <jim@meyering.net>
1732 Attempt to copy a regular file, even if stat says it is empty.
1733 * NEWS: Document this bug fix.
1734 * src/copy.c (copy_reg): Read from a regular file, even if it
1735 appears (stat.st_size == 0) to be empty. This reverts an
1736 optimization introduced on 2005-11-23 for coreutils-6.0.
1737 Otherwise, "cp /proc/cpuinfo /tmp" creates an empty file,
1738 on e.g., linux-2.6.20.
1739 * tests/cp/proc-zero-len: New file. Test for the above.
1740 * tests/cp/Makefile.am (TESTS): Add proc-zero-len.
1741 Reported by Dan Berrangé.
1743 2007-07-26 Bob Proulx <bob@proulx.com>
1745 sort: Improve sort --random-sort test.
1746 * tests/misc/sort-rand: If "locale" is available pick a random
1747 non-C locale and check "sort --random-sort" behavior using it.
1749 2007-07-24 Jim Meyering <jim@meyering.net>
1751 sort: add a test to exercise the affected code.
1752 * tests/sort/Test.pm (realloc-buf): Exercise the code that changed
1753 yesterday. No other test in all of "make check" does this.
1754 * NEWS: Mention the fix.
1756 2007-07-23 Paul Eggert <eggert@cs.ucla.edu>
1758 sort: avoid unaligned access.
1759 * src/sort.c (fillbuf): When enlarging the line buffer, ensure that
1760 the new size is a multiple of "sizeof (struct line)". This avoids
1761 alignment problems when indexing from the end of the buffer.
1762 Problem reported by Andreas Schwab in
1763 <http://lists.gnu.org/archive/html/bug-coreutils/2007-07/msg00158.html>.
1765 2007-07-23 Jim Meyering <jim@meyering.net>
1767 Update all copyright notices to use the newer form (e.g., remove
1768 the postal address, and add the 'licenses' URL).
1770 * COPYING: Update to Version 3.
1772 Update c99/c89 patch for new, copyright-change-induced offsets.
1773 * Makefile.maint (patch-check): Filter out '^Only in...' lines.
1774 * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
1776 2007-07-22 Jim Meyering <jim@meyering.net>
1778 * configure.ac: Arrange to rerun configure whenever src/Makefile.am
1779 changes. That file contains the list of program names that must be
1780 substituted into files like man/Makefile.
1781 Add quotes around AC_SUBST arguments.
1783 2007-07-21 Paul Eggert <eggert@cs.ucla.edu>
1785 * bootstrap (slurp): Work even in environments where "ls" defaults
1786 to "ls -A". Put in a FIXME, though, since the current code does
1787 not slurp files whose names start with ".", and this looks like
1788 it might be a troublesome area.
1790 2007-07-20 Jim Meyering <jim@meyering.net>
1792 Document and add a test for today's sort bug fix.
1793 * NEWS: Describe the bug fix.
1794 * tests/sort/Test.pm (obs-inval): Add a test for today's fix.
1796 2007-07-20 Andreas Schwab <schwab@suse.de>
1798 * src/sort.c (main): Don't free a pointer to non-malloc'd memory.
1800 2007-07-19 Jim Meyering <jim@meyering.net>
1802 Fix a portability bug in the new ls-color test.
1803 * tests/ls/stat-free-symlinks: Don't rely on the ability of
1804 a built-in printf to interpolate '\e'. Use '\033' instead.
1806 2007-07-18 Jim Meyering <jim@meyering.net>
1808 "cp -i --update older newer" no longer prompts; same for mv
1809 * src/copy.c (copy_internal): Perform "update" check before the
1810 possible interactive prompt. Reported by zeno_AT_biyg_DOT_org
1811 in <http://bugzilla.redhat.com/248591>
1812 * tests/mv/update: Add tests for the above.
1813 * NEWS: Mention the bug fix.
1815 2007-07-15 Jim Meyering <jim@meyering.net>
1817 ls --color: Don't stat symlinks when neither ORPHAN nor MISSING
1818 attribute has a color.
1819 * src/ls.c (main): Don't set check_symlink_color when C_EXEC is
1820 colored, unless ln=target (aka color_symlink_as_referent) is set.
1821 (gobble_file): Set f->linkok = true also when !check_symlink_color.
1822 http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10608/focus=10927
1823 Reported by Jeremy Maitin-Shepard.
1824 * tests/strace: New file, contents extracted from...
1825 * tests/mv/atomic: ...here. Source strace.
1826 * tests/ls/stat-free-symlinks: New file. Test for the above.
1827 Use strace to ensure that in this corner case, ls does not call stat.
1828 * tests/ls/Makefile.am (TESTS): Add stat-free-symlinks.
1829 * tests/Makefile.am (EXTRA_DIST): Add strace.
1831 2007-07-14 Jim Meyering <jim@meyering.net>
1833 Remove long-deprecated options.
1834 * NEWS: Mention this.
1835 * src/df.c, src/ls.c: Remove --kilobytes option.
1836 * src/du.c: Remove --kilobytes and --megabytes options.
1837 * src/who.c: Remove -i and --idle options.
1838 * src/ptx.c: Remove --copyright option.
1840 Change interface: make 2nd param _space_-separated, not comma-separated
1841 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Remove now-
1842 unnecessary use of tr.
1844 * configure.ac: Adjust caller, as well as the code that ensures the
1845 2nd parameter stays in sync with the list in src/Makefile.am.
1847 2007-07-14 Karel Zak <kzak@redhat.com>
1849 * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix typo: s/$2/$1/.
1850 (gl_INCLUDE_EXCLUDE_PROG): Quote first use of $2 parameter.
1851 Don't mix comma- and space-separated lists.
1852 Patch from Karel Zak.
1854 2007-07-13 Jim Meyering <jim@meyering.net>
1856 Warn about non-portable use of unescaped backslash at end of string,
1857 and treat it as if it were escaped.
1858 * src/tr.c (unquote): Considering that such usage would make GNU tr
1859 from coreutils-5.2.1 and earlier *fail*, the least we can do now is
1860 to warn about it. Solaris' tr ignores it.
1861 * NEWS: Mention this.
1863 Use proper backslash-quoting inside backticks.
1864 * configure.ac: Otherwise we run afoul of strict GNU tr:
1865 a string ending in a lone backslash would provoke a failure.
1867 2007-07-12 Jim Meyering <jim@meyering.net>
1869 Expand default-no-install prog list in ./configure --help output,
1870 and fix some []-quoting bugs in sed expressions.
1871 * configure.ac: Hard-code the list, "arch,su" here as well
1872 as in src/Makefile.am, and ensure the two stay in sync.
1873 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Use $2,
1874 rather than the nearly-equivalent shell variable.
1875 Karel Zak reported that ./configure --help's output included
1876 the literal string, $gl_no_install_progs_default.
1878 Clean up include-exclude-prog.m4.
1879 * m4/include-exclude-prog.m4 (gl_ADD_PROG): Don't modify MAN.
1880 (gl_REMOVE_PROG): Likewise.
1881 Add omitted "\>" in sed regexp.
1882 Remove any leading or trailing spaces.
1883 (gl_ADD_PROG): Remove any leading space.
1884 * configure.ac: Instead, derive $MAN from $optional_bin_progs.
1885 Append $(EXEEXT) to *all* names, not just the first one.
1887 2007-07-11 Jim Meyering <jim@meyering.net>
1889 If there's a GPL vN copyright comment, require that N == 3.
1890 * Makefile.maint (sc_GPL_version): New rule.
1891 * tests/misc/arch: Fix the sole violation.
1893 2007-07-10 Jim Meyering <jim@meyering.net>
1895 Skip "arch" test if it's not built.
1896 * tests/misc/Makefile.am (built_programs): Define.
1897 (TESTS_ENVIRONMENT): Add $(built_programs), for...
1898 * tests/misc/arch: ...this: skip the test if arch is not built.
1899 * src/Makefile.am (built_programs.list): New rule.
1900 * tests/Makefile.am (built_programs): Rename from all_programs.
1901 (TESTS_ENVIRONMENT): Use built_programs, not all_programs.
1902 * tests/help-version: Likewise.
1903 * NEWS: Mention that using --enable-no-install-program=X may
1904 cause "make check" to fail.
1906 Add support for enabling/disabling installation of specified programs.
1907 * NEWS: Mention new configure-time options.
1908 Mention that neither arch nor su is built/installed, by default.
1909 * m4/include-exclude-prog.m4: New file.
1910 * configure.ac: Use new macro, gl_ADD_PROG, rather than
1911 manually appending to OPTIONAL_BIN_PROGS and MAN.
1912 Move the code that adds "df" to the list of programs to build from
1913 m4/jm-macros into this file.
1914 Use gl_INCLUDE_EXCLUDE_PROG, then handle special cases: ginstall, [.
1915 (NO_INSTALL_PROGS_DEFAULT): AC_SUBST it. Used by man/Makefile.am.
1916 * man/Makefile.am (dist_man_MANS): Remove from this list all man pages
1917 corresponding to "bin" programs. Add $(MAN) instead.
1918 (optional_mans): Remove all uses.
1919 (check-x-vs-1): Adapt to work even though arch and su are typically
1920 no longer built (and neither are their .1 files).
1921 * src/Makefile.am (install_su): Rename from INSTALL_SU, now that
1922 INSTALL_SU has a different meaning. Use the new $(INSTALL_SU) value.
1924 2007-07-10 Karel Zak <kzak@redhat.com>
1927 * NEWS: Mention arch.
1928 * README: Add arch to the list of programs.
1929 * AUTHORS: Add arch.
1930 * src/uname.c: Include "uname.h".
1931 (PROGRAM_NAME): Handle arch, too.
1932 (ARCH_AUTHORS): Define.
1933 (uname_long_options, arch_long_options): Renamed and new globals.
1934 (usage): Handle arch-mode as well as uname-mode.
1935 (decode_switches): New function, extracted from main,
1936 to handle arch-mode as well as uname-mode.
1937 (main): Handle both modes.
1938 * src/uname-arch.c: New program, alias for "uname -m".
1939 * src/uname-uname.c: New file, default uname mode.
1940 * src/uname.h: New file, uname modes.
1941 * src/Makefile.am (EXTRA_PROGRAMS): Add arch.
1942 (uname_SOURCES, arch_SOURCES): Define.
1943 * man/arch.x: New file.
1944 * man/Makefile.am (dist_man_MANS): Add arch.1.
1945 (arch.1): New dependency.
1946 * tests/misc/arch: New test, compare "arch" with "uname -m"
1947 * configure.ac (OPTIONAL_BIN_PROGS): Add arch.
1949 * .x-sc_require_config_h: Exempt uname-arch.c and uname-uname.c
1950 from the always-include-<config.h> rule.
1952 2007-07-10 Jim Meyering <jim@meyering.net>
1954 Change "version 2" to "version 3" in all copyright notices.
1956 2007-07-09 Jim Meyering <jim@meyering.net>
1958 Compensate for new c99'isms in seq.c.
1959 * Makefile.maint (patch-check): Use -p1, not -p2, so a patch
1960 generated via "make patch-check REGEN=1" actually works.
1961 * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
1963 2007-07-09 Pádraig Brady <P@draigBrady.com>
1965 Fix the automatic number width formatting in seq.
1966 * src/seq.c: Fix the -w logic. Ignore spaces and '+'
1967 characters of input numbers when determining width.
1968 Set format correctly for input numbers in scientific notation.
1969 * tests/seq/basic: Add various number width tests.
1970 Details: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10903>
1972 2007-07-08 Jim Meyering <jim@meyering.net>
1974 Run the coreutils-specific code only if tests/Makefile.am.in exists.
1975 * bootstrap (mam_template): Move definition out of loop.
1977 Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
1978 * bootstrap (symlink_to_dir): Rename function from symlink_to_gnulib.
1979 Add a directory parameter. Update all callers.
1980 (cp_mark_as_generated): Also check for -- and link to -- files in gl/.
1982 * THANKS: Add Pádraig Brady.
1984 2007-07-08 Jim Meyering <jim@meyering.net>
1986 Adapt to deeper hierarchy in gnulib.
1987 * bootstrap (symlink_to_dir): If the destination directory doesn't
1988 exist, create it. This is required at least for "lib/uniwidth/cjk.h".
1990 Use <wchar.h>, not "wcwidth.h".
1991 * src/wc.c: Now that gnulib provides the POSIX-specified <wchar.h>,
1992 include it and <wctype.h>, rather than "wcwidth.h".
1993 * src/ls.c: Include <wchar.h>, rather than "wcwidth.h".
1995 2007-07-05 Jim Meyering <jim@meyering.net>
1997 setuidgid: set all groups, not just the primary one.
1998 I wanted to use the xgetgroups function from id.c, so factored
1999 it out and made it into a non-exiting function (hence the "m"
2000 prefix rather than "x").
2001 * src/setuidgid.c (main): Use mgetgroups.
2002 Include "mgetgroups.h".
2004 * src/id.c (xgetgroups): Remove function.
2005 Include "mgetgroups.h".
2006 (print_group_list): Use mgetgroups, not xgetgroups.
2008 * gl/modules/mgetgroups: New module.
2009 * gl/lib/mgetgroups.c: New file. mgetgroups is derived from
2010 id.c's xgetgroups function.
2011 * bootstrap.conf (gnulib_modules): Add mgetgroups.
2012 * gl/m4/mgetgroups.m4: New file.
2013 * gl/lib/mgetgroups.h: New file.
2015 * bootstrap: Merge in changes from gnulib.
2017 * src/id.c: Include "getugroups.h" rather than declaring manually.
2019 2007-07-04 Paul Eggert <eggert@cs.ucla.edu>
2021 * NEWS: pr -F no longer suppresses the footer or the first two blank
2022 lines in the header.
2023 * doc/coreutils.texi (pr invocation): Likewise. Also, a too-short
2024 page length implies -t, not -T.
2025 * src/pr.c (lines_per_header, lines_per_footer): Now constants.
2026 (init_parameters): Don't try to change them.
2027 (print_header): Use the same header and footer format regardless of
2028 wither form feeds are being used.
2029 (usage): Adjust to above change when describing too-short page length.
2030 Too-short page length impliesy -t, not -T.
2031 * tests/pr/2-S_f-t_notab: Adjust to the fact that -F now affects
2032 only formfeed handling; it does not change the header.
2033 * tests/pr/2-Sf-t_notab: Likewise.
2034 * tests/pr/2f-t_notab: Likewise.
2035 * tests/pr/2s_f-t_notab: Likewise.
2036 * tests/pr/2s_w60f-t_nota: Likewise.
2037 * tests/pr/2sf-t_notab: Likewise.
2038 * tests/pr/2sw60f-t_notab: Likewise.
2039 * tests/pr/2w60f-t_notab: Likewise.
2040 * tests/pr/3a3f-0F: Likewise.
2041 * tests/pr/3b3f-0F: Likewise.
2042 * tests/pr/3b3f-0FF: Likewise.
2043 * tests/pr/3b3f-FF: Likewise.
2044 * tests/pr/3f-0F: Likewise.
2045 * tests/pr/3f-FF: Likewise.
2046 * tests/pr/Test.pm: Likewise.
2047 * tests/pr/a3f-0F: Likewise.
2048 * tests/pr/a3f-0FF: Likewise.
2049 * tests/pr/a3f-FF: Likewise.
2050 * tests/pr/b3f-0F: Likewise.
2051 * tests/pr/b3f-0FF: Likewise.
2052 * tests/pr/b3f-FF: Likewise.
2053 * tests/pr/3-5l17f-t: Remove, since it's been renamed to another
2054 file whose name has a line count 7 larger,
2055 reflecting the new line count needed for this behavior.
2056 * tests/pr/3a3l8f-t: Likewise.
2057 * tests/pr/3b3l8f-t: Likewise.
2058 * tests/pr/3l17f-t: Likewise.
2059 * tests/pr/3ml17f-t: Likewise.
2060 * tests/pr/Ja3l17f-lm: Likewise.
2061 * tests/pr/Jb3l17f-lm: Likewise.
2062 * tests/pr/Jml17f-lm-lo: Likewise.
2063 * tests/pr/W-72l17f-ll: Likewise.
2064 * tests/pr/W20l17f-ll: Likewise.
2065 * tests/pr/W26l17f-ll: Likewise.
2066 * tests/pr/W27l17f-ll: Likewise.
2067 * tests/pr/W28l17f-ll: Likewise.
2068 * tests/pr/W35Ja3l17f-lm: Likewise.
2069 * tests/pr/W35Jb3l17f-lm: Likewise.
2070 * tests/pr/W35Jml17f-lmlo: Likewise.
2071 * tests/pr/W35a3l17f-lm: Likewise.
2072 * tests/pr/W35b3l17f-lm: Likewise.
2073 * tests/pr/W35ml17f-lm-lo: Likewise.
2074 * tests/pr/W72Jl17f-ll: Likewise.
2075 * tests/pr/a3l17f-lm: Likewise.
2076 * tests/pr/a3l8f-t: Likewise.
2077 * tests/pr/b3l17f-lm: Likewise.
2078 * tests/pr/b3l8f-t: Likewise.
2079 * tests/pr/l17f-t: Likewise.
2080 * tests/pr/ml17f-0F: Likewise.
2081 * tests/pr/ml17f-lm-lo: Likewise.
2082 * tests/pr/ml17f-t: Likewise.
2083 * tests/pr/ml17f-t-0F: Likewise.
2084 * tests/pr/n+2-5l17f-0FF: Likewise.
2085 * tests/pr/n+2l17f-0FF: Likewise.
2086 * tests/pr/n+2l17f-bl: Likewise.
2087 * tests/pr/n+3l17f-0FF: Likewise.
2088 * tests/pr/n+3l17f-bl: Likewise.
2089 * tests/pr/n+3ml13f-bl-FF: Likewise.
2090 * tests/pr/n+3ml17f-bl-tn: Likewise.
2091 * tests/pr/n+3ml17f-tn-bl: Likewise.
2092 * tests/pr/n+4b2l10f-0FF: Likewise.
2093 * tests/pr/n+5-8b3l10f-FF: Likewise.
2094 * tests/pr/n+5a3l6f-0FF: Likewise.
2095 * tests/pr/n+6b3l6f-FF: Likewise.
2096 * tests/pr/nJml17f-lmlmlo: Likewise.
2097 * tests/pr/nJml17f-lmlolm: Likewise.
2098 * tests/pr/nN1+3l17f-bl: Likewise.
2099 * tests/pr/nN15l17f-bl: Likewise.
2100 * tests/pr/nSml13-bl-FF: Likewise.
2101 * tests/pr/nSml13-t-t-FF: Likewise.
2102 * tests/pr/nSml13-t-tFFFF: Likewise.
2103 * tests/pr/nSml17-bl-FF: Likewise.
2104 * tests/pr/nSml17-t-t-FF: Likewise.
2105 * tests/pr/nSml17-t-tFFFF: Likewise.
2106 * tests/pr/nl17f-bl: Likewise.
2107 * tests/pr/o3Jml17f-lm-lo: Likewise.
2108 * tests/pr/o3a3Sl17f-tn: Likewise.
2109 * tests/pr/o3a3Snl17f-tn: Likewise.
2110 * tests/pr/o3a3l17f-tn: Likewise.
2111 * tests/pr/o3b3Sl17f-tn: Likewise.
2112 * tests/pr/o3b3Snl17f-tn: Likewise.
2113 * tests/pr/o3b3l17f-tn: Likewise.
2114 * tests/pr/o3mSl17f-bl-tn: Likewise.
2115 * tests/pr/o3mSnl17fbltn: Likewise.
2116 * tests/pr/o3ml17f-bl-tn: Likewise.
2117 * tests/pr/w72l17f-ll: Likewise.
2118 * tests/pr/3-5l24f-t: New file, containing the contents of the
2119 file with the same name but with the line count smaller by 7,
2120 reflecting the new behavior with -F.
2121 * tests/pr/3a3l15f-t: Likewise.
2122 * tests/pr/3b3l15f-t: Likewise.
2123 * tests/pr/3l24f-t: Likewise.
2124 * tests/pr/3ml24f-t: Likewise.
2125 * tests/pr/Ja3l24f-lm: Likewise.
2126 * tests/pr/Jb3l24f-lm: Likewise.
2127 * tests/pr/Jml24f-lm-lo: Likewise.
2128 * tests/pr/W-72l24f-ll: Likewise.
2129 * tests/pr/W20l24f-ll: Likewise.
2130 * tests/pr/W26l24f-ll: Likewise.
2131 * tests/pr/W27l24f-ll: Likewise.
2132 * tests/pr/W28l24f-ll: Likewise.
2133 * tests/pr/W35Ja3l24f-lm: Likewise.
2134 * tests/pr/W35Jb3l24f-lm: Likewise.
2135 * tests/pr/W35Jml24f-lmlo: Likewise.
2136 * tests/pr/W35a3l24f-lm: Likewise.
2137 * tests/pr/W35b3l24f-lm: Likewise.
2138 * tests/pr/W35ml24f-lm-lo: Likewise.
2139 * tests/pr/W72Jl24f-ll: Likewise.
2140 * tests/pr/a3l15f-t: Likewise.
2141 * tests/pr/a3l24f-lm: Likewise.
2142 * tests/pr/b3l15f-t: Likewise.
2143 * tests/pr/b3l24f-lm: Likewise.
2144 * tests/pr/l24f-t: Likewise.
2145 * tests/pr/ml24f-0F: Likewise.
2146 * tests/pr/ml24f-lm-lo: Likewise.
2147 * tests/pr/ml24f-t: Likewise.
2148 * tests/pr/ml24f-t-0F: Likewise.
2149 * tests/pr/n+2-5l24f-0FF: Likewise.
2150 * tests/pr/n+2l24f-0FF: Likewise.
2151 * tests/pr/n+2l24f-bl: Likewise.
2152 * tests/pr/n+3l24f-0FF: Likewise.
2153 * tests/pr/n+3l24f-bl: Likewise.
2154 * tests/pr/n+3ml20f-bl-FF: Likewise.
2155 * tests/pr/n+3ml24f-bl-tn: Likewise.
2156 * tests/pr/n+3ml24f-tn-bl: Likewise.
2157 * tests/pr/n+4b2l17f-0FF: Likewise.
2158 * tests/pr/n+5-8b3l17f-FF: Likewise.
2159 * tests/pr/n+5a3l13f-0FF: Likewise.
2160 * tests/pr/n+6b3l13f-FF: Likewise.
2161 * tests/pr/nJml24f-lmlmlo: Likewise.
2162 * tests/pr/nJml24f-lmlolm: Likewise.
2163 * tests/pr/nN1+3l24f-bl: Likewise.
2164 * tests/pr/nN15l24f-bl: Likewise.
2165 * tests/pr/nSml20-bl-FF: Likewise.
2166 * tests/pr/nSml20-t-t-FF: Likewise.
2167 * tests/pr/nSml20-t-tFFFF: Likewise.
2168 * tests/pr/nSml24-bl-FF: Likewise.
2169 * tests/pr/nSml24-t-t-FF: Likewise.
2170 * tests/pr/nSml24-t-tFFFF: Likewise.
2171 * tests/pr/nl24f-bl: Likewise.
2172 * tests/pr/o3Jml24f-lm-lo: Likewise.
2173 * tests/pr/o3a3Sl24f-tn: Likewise.
2174 * tests/pr/o3a3Snl24f-tn: Likewise.
2175 * tests/pr/o3a3l24f-tn: Likewise.
2176 * tests/pr/o3b3Sl24f-tn: Likewise.
2177 * tests/pr/o3b3Snl24f-tn: Likewise.
2178 * tests/pr/o3b3l24f-tn: Likewise.
2179 * tests/pr/o3mSl24f-bl-tn: Likewise.
2180 * tests/pr/o3mSnl24fbltn: Likewise.
2181 * tests/pr/o3ml24f-bl-tn: Likewise.
2182 * tests/pr/w72l24f-ll: Likewise.
2184 2007-06-23 Jim Meyering <jim@meyering.net>
2186 Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0.
2187 * src/base64.c (main): Likewise.
2188 * src/install.c (setdefaultfilecon): Likewise.
2189 * src/sort.c (main): Likewise.
2190 * Makefile.maint (sc_prohibit_strcmp): New rule.
2191 * .x-sc_prohibit_strcmp: New file, to list the few exceptions.
2192 * Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp.
2194 2007-06-22 Paul Eggert <eggert@cs.ucla.edu>
2196 * NEWS: seq no longer mishandles obvious cases like
2197 "seq 0 0.000001 0.000003" by omitting the last output number.
2198 * doc/coreutils.texi (seq invocation): Remove advice about workaround
2199 for seq off-by-one problem, since the bug is fixed now. Replace
2200 it with more-generic advice about rounding errors.
2201 * src/seq.c (long_double_format, print_numbers):
2202 New arg NUMERIC_FORMAT. All uses changed.
2204 2007-06-22 Pádraig Brady <P@draigBrady.com> (trivial change)
2206 * tests/seq/basic: Add test cases for seq off-by-one problem.
2208 2007-06-22 Jim Meyering <jim@meyering.net>
2210 * src/stat.c (long_options): Add a FIXME comment to help ensure
2211 that the deprecated and undocumented "--filesystem" option is
2214 2007-06-18 Paul Eggert <eggert@cs.ucla.edu>
2216 A few more symlink-related fixes. Fix a bug triggered by cp
2217 --parents and symlinks. Close some race conditions possible when
2218 the destination replaces a newly-created file with a symlink.
2219 * NEWS: Document that 'cp --parents' no longer mishandles
2220 symlinks in file name components of source.
2221 * src/copy.c (HAVE_LCHOWN): Default to false.
2222 (lchown) [!defined HAVE_LCHOWN]: Define to chown, for convenience.
2223 * src/cp.c (lchown) [!HAVE_LCHOWN]: Likewise.
2224 * src/install.c (lchown [!HAVE_LCHOWN]: Likewise.
2225 * src/copy.c (set_owner): Use lchown instead of chown, for safety
2226 in case the file got replaced by a symlink in the meantime.
2227 * src/cp.c (re_protect): Likewise.
2228 * src/install.c (change_attributes): Likewise.
2229 * src/copy.c (copy_internal): Use ordinary C rather than an #if.
2230 * src/cp.c (lchown) [!HAVE_LCHOWN]: Define to chown, for convenience.
2231 (struct dir_attr): Cache the entire struct stat of the directory,
2232 rather than just its mode, so that we needn't stat the directory
2233 twice (which can lead to races).
2234 (re_protect): Don't use XSTAT as that's not appropriate in
2235 this context (symlinks should be followed here). Instead, use
2236 the cached stat value.
2237 (make_dir_parents_private): Save dir's entire struct stat, not
2239 * tests/cp/cp-parents: Add test to check against bug with
2240 cp --parents and symlinks.
2242 2007-06-18 Jim Meyering <jim@meyering.net>
2244 Use mreadlink_with_size (doesn't exit), not xreadlink_with_size.
2245 * bootstrap.conf (gnulib_modules): Add readlink-with-size.
2246 Remove xreadlink and xreadlink-with-size.
2247 * src/copy.c (copy_internal): Use mreadlink_with_size,
2248 not xreadlink_with_size.
2249 * src/ls.c (get_link_name): Likewise.
2250 * src/readlink.c (main): Likewise.
2251 * src/stat.c (print_stat): Likewise.
2253 * README-hacking: Don't mention Gzip 1.2.4, now that 1.3.12 is out.
2255 2007-06-16 Jim Meyering <jim@meyering.net>
2257 Make chgrp and chown diagnostics consistent.
2258 * src/chown.c (main): Emit the diagnostic before the file name,
2259 not after it, to be consistent with chgrp's diagnostic.
2260 * src/chgrp.c (parse_group): Emit a ":" between the diagnostic
2262 Reported by Egmont Koblinger.
2263 * THANKS: Add Egmont Koblinger.
2265 2007-06-15 Paul Eggert <eggert@cs.ucla.edu>
2267 Correct cp's handling of destination symlinks in some cases.
2268 * NEWS: "cp" no longer considers a destination symlink to be the
2269 same as the referenced file when copying links or making backups.
2270 * src/copy.c (copy_reg): When following a symlink, use the
2271 followed name in later chown etc. requests, so that the created
2272 file is affected, rather than the symlink. Use O_NOFOLLOW on
2273 source when not dereferencing symlinks; this avoids a race.
2274 Preserve errno correctly when doing multiple open attempts on the
2276 (copy_internal): Follow destination symlinks only when copying a
2277 regular file and only when we don't intend to remove or rename the
2278 destination first, regardless of whether following source
2279 symlinks; this is because since POSIX and tradition (e.g.,
2280 FreeBSD) say we should ordinarily follow destination symlinks if
2281 the system calls would ordinarily do so.
2282 * src/copy.h (struct cp_options): Add comment that 'dereference'
2283 is only for source files.
2284 * src/cp.c (usage): Note that --derereference etc. are only for
2286 (make_dir_parents_private): Follow symlinks, regardless of whether
2287 --dereference is specified, because these are destination symlinks.
2288 * tests/cp/same-file: Adjust tests to match revised behavior.
2289 Filter out perror output since it might vary from host to host.
2290 Use sed alone instead of also using echo.
2292 * doc/coreutils.texi (cp invocation): Document the behavior better when
2293 the destination is a symlink. Clarify source versus destination
2294 symlinks. Describe the new behavior for destination symlinks.
2296 2007-06-15 Jim Meyering <jim@meyering.net>
2298 * src/copy.c: Include "canonicalize.h".
2299 (copy_reg): Use canonicalize_filename_mode to follow the symlink,
2300 so that we can always open with O_EXCL and avoid a race.
2302 2007-06-15 Jim Meyering <jim@meyering.net>
2304 Don't include "quote.h" when it is not used.
2305 * src/md5sum.c: Remove unnecessary inclusion of "quote.h".
2306 * src/expr.c: Likewise.
2307 * src/shred.c: Likewise.
2308 * Makefile.maint (sc_prohibit_quote_without_use): New rule.
2309 * src/c99-to-c89.diff: Adjust offsets.
2311 2007-06-14 Paul Eggert <eggert@cs.ucla.edu>
2313 Clarify what "cat" documentation means by "blank" lines.
2314 * doc/coreutils.texi (cat invocation): "Blank" lines actually mean
2316 * src/cat.c (usage): Say that "nonblank" means nonempty. Clarify
2319 2007-06-13 Jim Meyering <jim@meyering.net>
2321 rmdir: give better diagnostics
2322 * src/rmdir.c (remove_parents): Give a more descriptive/consistent
2323 diagnostic upon failure.
2325 Suggestion from Joey Hess.
2326 * THANKS: Add Joey Hess.
2328 Don't include "quotearg.h" when it is not used.
2329 * Makefile.maint (sc_prohibit_quotearg_without_use): New rule.
2330 * src/cp.c: Don't include "quotearg.h". It wasn't used.
2332 * README-hacking: List Gperf as a build-requirement, too.
2333 Reported by Steve Ward.
2335 2007-06-11 Jim Meyering <jim@meyering.net>
2337 * README: Mention README-hacking, for whose who start from
2338 cloned/checked-out sources rather than from a distribution tarball.
2339 Reported by Steve Ward.
2340 * THANKS: Add Steve Ward.
2342 2007-06-10 Jim Meyering <jim@meyering.net>
2344 bug-fix: cp would fail to write through a dangling symlink
2345 * NEWS: Mention the bug fix.
2346 * src/copy.c (copy_reg): When open fails with EEXIST, the destination
2347 is lstat'able, and a symlink, call open again, but now without O_EXCL.
2348 * tests/cp/thru-dangling: New file, to test for the above fix.
2349 * tests/cp/Makefile.am (TESTS): Add thru-dangling.
2350 * THANKS: Add Michael McLagan.
2351 Bug report from Michael McLagan in <http://bugzilla.redhat.com/243588>.
2353 2007-06-04 Paul Eggert <eggert@cs.ucla.edu>
2355 * doc/coreutils.texi (Common options): Mention that -h and
2356 --human-readable are equivalent to --block-size=human-readable.
2357 Documentation problem reported by Steve Ward in
2358 <http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00007.html>.
2359 (du invocation): Use optSi rather than duplicating the macro's
2360 contents (incorrectly, since we claimed a "B" was output).
2362 2007-05-31 Jim Meyering <jim@meyering.net>
2364 Pull printf-related code from gnulib, rather than using forked copy.
2365 * bootstrap.conf (gnulib_modules): Don't avoid size_max and xsize
2366 modules. While I dislike xsize-style overflow avoidance, maintaining
2367 a forked version of e.g., vasnprintf.c was too much work.
2369 2007-05-29 Jim Meyering <jim@meyering.net>
2371 * src/dircolors.hin: Add screen-256color.
2372 Suggested by sdl.web@gmail.com in <http://bugzilla.redhat.com/239266>.
2374 2007-05-26 Jim Meyering <jim@meyering.net>
2376 * TODO: Add an entry for comm --output-delimiter=STR
2378 2007-05-25 James Youngman <jay@gnu.org>
2380 wc: ignore multibyte-character decoding errors
2381 * src/wc.c (wc): Don't issue an error message when mbrtowc
2382 indicates that we have seen an invalid byte sequence. This
2383 makes "wc /bin/sh" bearable (though the word and line counts
2384 are likely not to be useful).
2385 * NEWS: Mention the change.
2387 2007-05-22 Jim Meyering <jim@meyering.net>
2389 Check for an up-to-date copyright year in coreutils.texi.
2390 * Makefile.maint (copyright-check): Also check for an up-to-date
2391 copyright year in doc/$().texi, if that file exists.
2392 * doc/coreutils.texi: Add 2007 to list of Copyright years.
2393 Reported by Karl Berry.
2395 cut: diagnose a range starting with 0 (-f 0-2) as invalid, and
2396 give a better diagnostic for a field-number/offset of 0.
2397 * NEWS: Mention the fix.
2398 * src/cut.c (ADD_RANGE_PAIR): Add an explicit check.
2399 Based on a patch from James Youngman.
2400 * tests/misc/cut: Add tests for the above.
2402 "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
2403 Also, diagnose the '-' in "cut -f -" as an invalid range, rather
2404 than interpreting it as the unlimited range, "1-".
2405 * NEWS: Mention these changes.
2406 * src/cut.c (set_fields): Don't interpret an accumulator "value"
2407 of 0 as an unspecified range endpoint.
2408 Give better diagnostics.
2409 Adjust a comment so that it is true also for 64-bit size_t.
2411 * tests/cut/Test.pm: Add tests for the above.
2413 stty: fix a harmless syntax nit
2414 * src/stty.c (visible): Use ";" as the statement terminator
2415 between two assignments, not ",".
2416 (integer_arg): Join an unnecessarily wrapped line.
2418 2007-05-20 Jim Meyering <jim@meyering.net>
2420 stty: diagnose an invalid hex value in 35-colon commmand-line argument
2421 * NEWS: Mention this.
2422 * src/stty.c (strtoul_tcflag_t, strtoul_cc_t): New functions.
2423 (recover_mode): Use those functions (not sscanf), to parse the
2425 * tests/stty/invalid: New file. Test for the above.
2426 * tests/stty/Makefile.am (TESTS): Add invalid.
2427 * .x-sc_prohibit_atoi_atof: Don't exempt stty.c from this check.
2428 Add tests/stty/invalid so we don't have to obfuscate the comment
2429 about sscanf therein.
2430 * Makefile.maint (sc_prohibit_atoi_atof): Mention sscanf in the
2433 * TODO: Remove some now-completed or no longer relevant items.
2435 2007-05-19 Jim Meyering <jim@meyering.net>
2437 Rename uses of futimens -> gl_futimens; glibc now declares the former.
2438 * src/copy.c (copy_reg): Reflect renaming: futimens -> gl_futimens.
2439 * src/touch.c (touch): Likewise.
2441 2007-05-18 Jim Meyering <jim@meyering.net>
2443 * Makefile.maint (my-distcheck): Remove -pedantic from $(CFLAGS)
2444 for now, to avoid c89-check failure due to use of #include_next.
2446 2007-05-15 Jim Meyering <jim@meyering.net>
2448 Generate a dozen test-related Makefile.am files at bootstrap-time.
2449 * README-hacking: Build-from-checkout now require Perl, too.
2450 * bootstrap: Now that these generated Makefile.am files are no longer
2451 under version control, they must be created at bootstrap time.
2453 2007-05-14 Paul Eggert <eggert@cs.ucla.edu>
2455 * man/chmod.x: Document chmod's behavior with setuid and setgid bits.
2456 Remove misleading implication about leading zero. Problem
2457 reported by Jan Engelhardt in
2458 <http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00134.html>.
2460 2007-05-13 Jim Meyering <jim@meyering.net>
2462 Remove the generated tests/*/Makefile.am files from version control.
2463 * tests/cut/Makefile.am: git-remove this generated file.
2464 * tests/head/Makefile.am: Likewise.
2465 * tests/join/Makefile.am: Likewise.
2466 * tests/pr/Makefile.am: Likewise.
2467 * tests/sort/Makefile.am: Likewise.
2468 * tests/tac/Makefile.am: Likewise.
2469 * tests/tail/Makefile.am: Likewise.
2470 * tests/test/Makefile.am: Likewise.
2471 * tests/tr/Makefile.am: Likewise.
2472 * tests/uniq/Makefile.am: Likewise.
2473 * tests/wc/Makefile.am: Likewise.
2474 * .cvsignore, .gitignore: Ignore these generated files.
2476 * src/.cvsignore, src/.gitignore: Add chcon here, ...
2477 * .cvsignore, .gitignore: ... not here.
2479 Test uniq's new --zero-terminated (-z) option.
2480 * tests/uniq/Test.pm: When possible, create a "-z"-testing variant
2481 of each existing test.
2482 (2z, 3z, 4z, 5z, 20z, 122, 123): New tests from James Youngman.
2484 2007-05-12 James Youngman <jay@gnu.org>
2486 Add -z option to uniq. Originally proposed by Egmont Koblinger.
2487 * NEWS: Mention uniq's new option: --zero-terminated (-z).
2488 * src/uniq.c: Add new option, --zero-terminated (-z), to make
2489 uniq use the NUL byte as separator/delimiter rather than newline.
2490 (check_file): Add a parameter: delimiter. Update caller.
2491 Use readlinebuffer_delim in place of readlinebuffer everywhere.
2492 (main): Handle the new option.
2493 (usage): Describe new option the same way sort does.
2494 * doc/coreutils.texi (uniq invocation): Describe the new option.
2496 2007-05-07 Jim Meyering <jim@meyering.net>
2498 * NEWS: Mention that last week's tr bug dates back to 1992.
2500 2007-05-04 Jim Meyering <jim@meyering.net>
2502 Avoid test failure when run with an unusual umask.
2503 * tests/ls/color-dtype-dir: Set umask to 022.
2504 Suggestion from AIDA Shinra.
2506 Avoid failure of root-only test when run with a restrictive umask.
2507 * tests/rm/no-give-up: Ensure that non-root can access "d/" through
2508 root-owned ".". Reported by AIDA Shinra.
2510 tr -c: don't abort when translating with S2 larger than complement of S1
2511 * src/tr.c (main): Remove invalid assertion triggered by e.g.,
2512 tr -c a '[b*256]'. There's nothing wrong with having Set2 larger
2513 than Set1. Reported by Guntram Blohm.
2514 * tests/tr/Test.pm (no-abort-1): Test for the above.
2515 * NEWS: Mention this bug fix.
2516 * THANKS: Add Guntram Blohm.
2518 2007-05-03 Jim Meyering <jim@meyering.net>
2520 Avoid test failure when run with a permissive umask.
2521 * tests/rm/no-give-up: Set permissions of test directory properly,
2522 i.e., not depending on umask prohibiting go=w.
2523 Reported by AIDA Shinra.
2525 2007-05-02 Paul Eggert <eggert@cs.ucla.edu>
2527 The following commands and options now support the standard size
2528 suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y:
2529 head -c, head -n, od -j, od -N, od -S, split -b, split -C,
2531 * doc/coreutils.texi (od invocation, head invocation, tail invocation):
2532 Document support for new size suffixes.
2533 (head invocation, tail invocation):
2534 Document that -n uses the same suffixes as -c.
2535 (tail invocation): More-clearly document what leading "+" does.
2536 * src/head.c (usage, string_to_integer): Support new suffixes.
2537 * src/od.c (usage, main): Likewise.
2538 * src/split.c (usage, main): Likewise.
2539 * src/tail.c (usage, parse_options): Likewise.
2540 Prompted by a patch from Evan Hunt.
2542 2007-05-02 Jim Meyering <jim@meyering.net>
2544 * src/du.c (usage): Tweak description of --dereference-args (-D) again.
2545 Prompted by another request for clarification from Justin Pryzby.
2547 Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.
2548 * tests/rm/fail-2eperm: Patch from AIDA Shinra.
2549 Reported by Peter Dyballa.
2550 * THANKS: Add AIDA Shinra and Peter Dyballa.
2552 2007-04-28 Paul Eggert <eggert@cs.ucla.edu>
2554 * src/nohup.c (usage): Describe how standard input and output
2557 2007-04-25 Jim Meyering <jim@meyering.net>
2559 * src/du.c (usage): Clarify description of --dereference-args (-D).
2560 Prompted by a report from Justin Pryzby.
2562 * bootstrap.conf (gnulib_modules): Add fseeko and ftello.
2563 (gnulib_modules): Add autobuild.
2565 2007-04-24 Jim Meyering <jim@meyering.net>
2567 * THANKS: Add Andreas Frische.
2568 * NEWS: Mention today's ls --color fix.
2569 * tests/ls-2/tests (sl-dangle): Add a test for today's fix.
2571 2007-04-24 Eric Blake <ebb9@byu.net>
2573 ls --color once again colors dangling symlinks correctly
2574 * src/ls.c (gobble_file): Much like the 2007-04-07 fix,
2575 add a term to the expression that decides whether we need
2576 stat and/or lstat calls. Reported by Andreas Frische.
2578 2007-04-16 Jim Meyering <jim@meyering.net>
2580 * src/cut.c (usage): Adjust synopsis to show that an OPTION is required.
2581 Reported by Rudolf Kastl.
2582 * THANKS: Add Rudolf Kastl.
2584 2007-04-11 Paul Eggert <eggert@cs.ucla.edu>
2586 split --line-bytes=N (-C N): don't create an empty file.
2587 * src/split.c (line_bytes_split): Don't create an empty line
2588 afterwards if the last buffer happens to be exactly full.
2589 * tests/misc/split-fail: Add a test case for this.
2590 * NEWS: mention this.
2592 2007-04-10 Jim Meyering <jim@meyering.net>
2594 ls: don't form or compute the length of strings that won't be used.
2595 * src/ls.c (gobble_file): Form and compute length of strings for
2596 block size, owner, group, author, major+minor numbers and file size
2597 only if they'll actually be used. I.e., don't form most of them
2598 when not producing long format output.
2600 2007-04-07 Jim Meyering <jim@meyering.net>
2602 Add a test for, and document, today's fix.
2603 * NEWS: Mention today's ls --color fix.
2604 * tests/ls-2/tests (sl-target): Add a test for today's fix.
2605 * THANKS: Add Kirk Kelsey.
2607 2007-04-07 Eric Blake <ebb9@byu.net>
2609 Fix a bug in how the LS_COLORS ln=target attribute is handled.
2610 * src/ls.c (gobble_file): Use "stat" (not lstat) also when the
2611 ln=target attribute applies. Reported by Kirk Kelsey.
2613 2007-04-02 Jim Meyering <jim@meyering.net>
2615 * src/copy.c (copy_reg): Initialize local "con", before calling
2616 getfscreatecon, in case that function (or its inline stub) does
2619 2007-04-01 Paul Eggert <eggert@cs.ucla.edu>
2621 * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
2622 ls -x DIR would sometimes output the wrong string in place of the
2624 * NEWS: Mention the bug fix.
2625 * tests/ls/x-option: New file.
2626 * tests/ls/Makefile.am (TESTS): Add x-option.
2628 gnulib moved md5 and sha1 modules into a new crypt/ directory; adapt
2629 * bootstrap.conf (gnulib_modules): Adjust to gnulib's renaming of
2630 md5 to crypt/md5 and sha1 to crypt/sha1.
2632 2007-03-30 Jim Meyering <jim@meyering.net>
2634 * NEWS: Mention these SELinux changes.
2636 * ChangeLog-selinux: Remove file.
2637 Move its contents into this file, removing old dates.
2639 * src/runcon.c (main): Don't reorder arguments. Reported by
2640 Ulrich Drepper in <http://bugzilla.redhat.com/232652>.
2641 * tests/misc/runcon-no-reorder: New file. Test for the above.
2642 * tests/misc/Makefile.am (TESTS): Add runcon-no-reorder.
2644 * src/runcon.c (main): Remove "." at end of a diagnostic.
2646 * src/runcon.c: New program.
2647 * src/Makefile.am (bin_PROGRAMS): Add runcon.
2648 (runcon_LDADD): Define.
2649 * README: Add runcon to the list of programs.
2650 * AUTHORS: Add this: runcon: Russell Coker
2651 * tests/help-version: Add runcon as an exception.
2652 * man/Makefile.am (dist_man_MANS): Add runcon.1.
2653 (runcon.1): New dependency.
2655 mkfifo, mknod: Accept new "-Z, --context=C" option.
2656 * src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>.
2658 * src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
2660 mkdir: Accept new "-Z, --context=C" option.
2661 * src/mkdir.c: Include <selinux/selinux.h>.
2663 * src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
2665 * tests/cp/cp-a-selinux: New file. Test for the bug reported in
2666 <http://bugzilla.redhat.com/219900>.
2667 * tests/cp/Makefile.am (TESTS): Add cp-a-selinux.
2669 * tests/selinux: New file.
2670 * tests/Makefile.am (EXTRA_DIST): Add selinux.
2671 * tests/misc/selinux: Source the new script, rather than open coding it.
2673 Change how "cp -a" and "cp --preserve=context" work with SELinux.
2674 Now, cp -a attempts to preserve context, but failure to do so does
2675 not change cp's exit status. However "cp --preserve=context" is
2676 similar, but failure *does* cause cp to exit with nonzero status.
2677 * src/copy.h (struct cp_options) [require_preserve_context]: New member.
2678 * src/copy.c (copy_reg, copy_internal): Implement the above.
2679 * src/mv.c (cp_option_init): Initialize the new member.
2680 * src/install.c (cp_option_init): Likewise.
2681 * src/cp.c (cp_option_init): Likewise.
2682 (decode_preserve_arg): Set it or reset it.
2684 cp, mv, install: add SELinux support, but unlike with the Red Hat
2685 patch, mv and cp do not provide the "-Z context" option.
2686 * src/copy.c: Include <selinux/selinux.h>.
2687 (restore_default_fscreatecon): New function.
2688 (copy_reg): Make cp --preserve=context work for existing destination.
2689 (copy_internal): Likewise for new destinations.
2690 * src/copy.h (cp_options) [preserve_security_context]: New member.
2691 * src/cp.c: Include <selinux/selinux.h>.
2692 (selinux_enabled): New global.
2693 (usage): Mention new --preserve=context option.
2694 (PRESERVE_CONTEXT): Define/use.
2695 (decode_preserve_arg): Handle PRESERVE_CONTEXT.
2696 (main): Remove an obsolete comment.
2697 If --preserve=context is specified on a system without SELinux
2698 enabled, give a diagnostic and fail.
2699 * src/mv.c: Include <selinux/selinux.h>.
2700 Set x->preserve_security_context if SELinux is enabled.
2701 * src/install.c: Accept new "-Z, --context=C" option.
2702 Accept --preserve-context option (but not -P option).
2703 Accept alternate spelling: --preserve_context, for now.
2704 Include <selinux/selinux.h> and "quotearg.h".
2705 (selinux_enabled, use_default_selinux_context): New globals.
2706 (PRESERVE_CONTEXT_OPTION): Define.
2707 (cp_option_init): Default: do not preserve security context.
2708 (setdefaultfilecon): New function.
2709 (main): Honor new options.
2710 * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD):
2712 * src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.
2714 * tests/misc/selinux [VERBOSE]: Print version info for each
2715 of the tested tools, not just ls.
2717 * src/c99-to-c89.diff: Remove the ls.c patch, now that I've
2718 temporarily removed the offending c99'ism.
2720 * src/chcon.c (usage): Split a string literal that was longer than 509.
2722 * src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.
2723 Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
2725 * src/c99-to-c89.diff: Adjust offsets.
2727 * AUTHORS: Add chcon.
2729 * src/c99-to-c89.diff: Remove trailing blanks.
2731 * src/chcon.c: Don't include "dirname.h". system.h already includes it.
2733 * gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.
2735 * src/c99-to-c89.diff: Handle a new c99'ism in ls.c.
2737 * src/id.c (main): Tweak id -Z diagnostic.
2739 id: Add SELinux support: -Z option.
2740 * src/id.c (main): Apply patches from Fedora, with these changes:
2741 Remove #ifdef WITH_SELINUX.
2742 Use error (EXIT_FAILURE, not fprintf+exit(1).
2743 * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
2745 stat: Add support for SELinux in the form of a %C format directive.
2746 * src/stat.c (follow_links): Make this variable file-global.
2747 (out_file_context): New function.
2748 (print_statfs): Honor %C.
2749 (print_stat): Honor %C.
2750 (do_stat): Remove follow_links parameter.
2751 (usage): Document the two %C directives.
2752 (main): Accept -Z (though it's a no-op).
2753 * src/Makefile.am (stat_LDADD): Define.
2755 ls: Add support for SELinux and a slightly modified -Z option.
2756 I started with the patches from Red Hat.
2757 The entries below tell how the code evolved.
2759 * src/ls.c (print_long_format, print_file_name_and_frills): When
2760 there is no security context (due to getfilecon/lgetfilecon failing
2761 with e.g. ENOTSUP), print it as "?", not "".
2762 * src/ls.c (print_file_name_and_frills): Make -Z work without -l.
2763 (length_of_file_name_and_frills): Likewise.
2765 * src/ls.c: Remove the --lcontext and --scontext options.
2766 Change the way -Z, --context work so that it no longer implies -l.
2767 Thus, -Z -l will work like -lcontext and -Z without -l will work
2770 Adjust tests to reflect new 'ls -l' syntax -- affects only
2771 systems with SELinux when operating on a file with no ACL.
2772 These tests assumed that everything before the first space on
2773 each line is the 10-byte mode string. But there may also be a "+"
2774 in the 11th column, just before the space. However, note that this
2775 is not new. The same thing would have happened even without the
2776 change below, when listing a file with an ACL.
2777 * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm:
2778 * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod:
2779 * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm:
2781 Don't make compilation depend on USE_ACL. An SELinux security
2782 context counts as an "alternate access control method", so ls
2783 must output a "+" for each file with a security context.
2784 * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally.
2785 (FILE_HAS_ACL): Remove macro definition. Use f->have_acl directly.
2786 (gobble_file): Record whether a file has a security context, and
2787 update the condition used to determine whether to print the "+".
2788 (gobble_file): Call getfilecon/lgetfilecon also when
2789 format == long_format, so that we get the "+".
2791 * src/ls.c (gobble_file): Add a comment explaining why (with a
2792 security context option) ls doesn't exit nonzero due to e.g.,
2793 getfilecon failing with errno == ENOTSUP.
2795 * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due
2798 * src/ls.c (gobble_file): Factor out three small blocks using
2799 getfilecon and lgetfilecon.
2800 Don't ignore return value from getfilecon and lgetfilecon.
2802 * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C
2804 (print_scontext_format): Likewise.
2805 (print_scontext): Declare to be "bool", not int. Adjust uses.
2807 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX).
2809 * tests/misc/chcon: New file.
2810 * tests/misc/chcon-fail: New file.
2811 * tests/Makefile.am (check-root): Run new, root-only misc/chcon test.
2812 * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail.
2814 * tests/misc/Makefile.am (TESTS): Add selinux.
2815 * tests/misc/selinux: New file.
2816 * tests/help-version: Skip chcon.
2817 * man/chcon.x: New file.
2818 * man/Makefile.am: Build chcon.1.
2821 * gl/modules/selinux-at: New module. Check for libselinux and set
2822 LIB_SELINUX here, unconditionally, rather than depending on
2823 the configure-time --enable-selinux option.
2824 * gl/modules/selinux-h: New module.
2825 * bootstrap.conf (gnulib_modules): Add selinux-at.
2826 * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files.
2827 * gl/lib/se-selinux_.h: New file.
2828 * gl/lib/se-context_.h: New file.
2829 * gl/m4/selinux-selinux-h.m4: New file.
2830 * gl/m4/selinux-context-h.m4: New file.
2831 * src/Makefile.am (bin_PROGRAMS): Add chcon.
2832 (chcon_LDADD): Define.
2833 * README: Add chcon to the list of programs.
2834 * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
2836 2007-03-29 Jim Meyering <jim@meyering.net>
2838 * .vg-suppressions: Add libc-getpwuid-leak.
2840 2007-03-28 Jim Meyering <jim@meyering.net>
2842 Help translators include translation team's web or email address.
2843 * src/system.h (emit_bug_reporting_address): New function.
2844 * src/base64.c: Use it rather than a literal printf.
2845 * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
2846 * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
2847 * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
2848 * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
2849 * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
2850 * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
2851 * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
2852 * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
2853 * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
2854 * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
2855 * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
2856 * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
2857 * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
2858 * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
2859 * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
2860 * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
2861 * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
2862 * src/who.c, src/whoami.c, src/yes.c: Likewise.
2864 * src/stty.c: Don't include "vasprintf.h", now that its
2865 declarations are guaranteed to be in gnulib's stdio.h.
2866 * src/who.c: Likewise.
2868 2007-03-27 Jim Meyering <jim@meyering.net>
2870 * README: Use "install", not "ginstall" in the list of program names.
2871 * src/Makefile.am (check-README): Substitute s/ginstall/install/.
2873 2007-03-25 Jim Meyering <jim@meyering.net>
2875 * src/c99-to-c89.diff: Regenerate.
2877 2007-03-25 Paul Eggert <eggert@cs.ucla.edu>
2879 Avoid the need for euidaccess and/or lstat on every directory entry
2880 with 'rm -r dir' (without -f), if we are root, or if we are removing
2881 a directory tree that is full of symbolic links.
2882 * bootstrap.conf (gnulib_modules): Add write-any-file.
2883 * src/copy.c: Include write-any-file.h.
2884 (UNWRITABLE): Remove macro, replacing with....
2885 (writable_destination): New function, which uses can_write_any_file
2886 to avoid the need for euidaccess when we are privileged.
2887 (overwrite_prompt, abandon_move): Use it.
2888 * src/remove.c: Include write-any-file.h.
2889 (D_TYPE): New macro.
2890 (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros.
2891 (write_protected_non_symlink): Don't bother to stat if we can write
2893 (prompt): New arg PDIRENT_TYPE. All callers changed.
2894 Use readdir dirent type to avoid the need for 'lstat' on each directory
2895 entry in cases like 'rm -r dir', if we are root, or if the tree is
2896 full of symbolic links.
2897 (DT_IS_KNOWN, DT_MUST_BE): Remove.
2898 (remove_entry): New arg DIRENT_TYPE_ARG. All callers changed.
2900 2007-03-24 Jim Meyering <jim@meyering.net>
2902 If strace malfunctions, skip the test rather than failing it.
2903 * tests/mv/atomic: Required on a mips-unknown-linux-gnu system
2904 running the aging linux-2.4.27-mipscvs-20040814.
2906 2007-03-23 Paul Eggert <eggert@cs.ucla.edu>
2908 * src/pathchk.c: Don't include euidaccess.h, as we don't call
2911 2007-03-23 Jim Meyering <jim@meyering.net>
2913 * README-package-renamed-to-coreutils: Add a URL for the FAQ,
2914 and a couple more archive links.
2916 2007-03-22 Jim Meyering <jim@meyering.net>
2918 Post-release version change.
2919 * NEWS: Add a line for 6.9+.
2920 * configure.ac (AC_INIT): Set new version string.
2923 * NEWS: Record release date and new version number.
2924 * configure.ac (AC_INIT): New version number.
2926 * tests/mv/hard-3: Correct the preceding change: $3 -> $2.
2928 2007-03-22 Paul Eggert <eggert@cs.ucla.edu>
2930 Improve a test script.
2931 * tests/mv/hard-3: Check for 'ls' failure, too.
2932 Generate more-useful debugging output when 'ls' fails.
2934 2007-03-21 Jim Meyering <jim@meyering.net>
2936 Fix a test script not to claim an ext2 file system is of type xfs.
2937 * tests/du/slink: When using df --local and df --type=TYPE,
2938 test only the exit code. Don't bother with stdout.
2939 Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
2941 * gl/lib/savewd.c: Remove this file, since the savewd_save change
2942 is now in gnulib. The other wasn't useful.
2944 2007-03-20 Jim Meyering <jim@meyering.net>
2946 * gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
2948 Skip part of this test when "." is not a local file system.
2949 * tests/install/basic-1: Otherwise, it would fail on some NFS
2951 * tests/mkdir/p-3: Likewise.
2953 2007-03-19 Paul Eggert <eggert@cs.ucla.edu>
2955 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
2956 Add $(LIB_ACL_TRIVIAL).
2958 2007-03-18 Jim Meyering <jim@meyering.net>
2960 Fix a generic NFS-related test failure.
2961 * tests/mkdir/p-3: When setting up an unreadable "." in an
2962 inaccessible parent, make the parent inaccessible *after* making "."
2963 unreadable. Otherwise, running "chmod a-r ." in an already-
2964 inaccessible parent would fail on NFS with "Stale NFS file handle".
2966 Fix a bug in how pr -m -s works.
2967 * NEWS: Describe how the fix affects pr.
2968 * src/pr.c (init_parameters): The --merge (-m) option does
2969 not imply --expand-tabs (-e), so don't set "untabify_input".
2970 Reported by Wis Macomson.
2971 * tests/misc/pr: New file. Test for the above fix.
2972 * tests/misc/Makefile.am (TESTS): Add pr.
2975 2007-03-17 Jim Meyering <jim@meyering.net>
2977 Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
2978 * bootstrap: Put ""s around use of $build_aux, in case
2979 someone uses a name containing shell meta-characters.
2980 Reported by Alfred M. Szmidt.
2981 * tests/misc/tty-eof: Add shuf to the list of tested commands.
2983 Avoid test failure on NFS-mounted Solaris ZFS file system.
2984 * tests/du/basic: Skip a test if "." is on a non-local file system.
2986 Avoid an obscure build failure, prefer waitpid over wait.
2987 * src/install.c (strip): Use waitpid, not wait. It's equivalent,
2988 but feels less obsolescent.
2990 * bootstrap: Don't use \> in grep regexp. For HP-UX.
2992 2007-03-16 Jim Meyering <jim@meyering.net>
2994 Begin adding support for Solaris ZFS (4 entries per trivial ACL)
2995 * gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
2996 (file_has_acl, copy_acl): Use it, rather than enumerating errno values.
2997 (is_trivial_acl): New function. Incomplete, for now.
2998 (file_has_acl, copy_acl): Use the new function, rather than
2999 counting the number of entries in an ACL.
3001 * bootstrap: Update from gnulib.
3003 * .x-sc_prohibit_atoi_atof: Add TODO here, too.
3005 2007-03-16 Paul Eggert <eggert@cs.ucla.edu>
3007 * src/copy.c: Include filemode.h.
3008 (overwrite_prompt): Say "try to overwrite", not "overwrite", to
3009 make it clearer that the attempt may fail. Problem reported by
3011 http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
3012 Output symbolic mode as well as numeric.
3013 * tests/mv/i-2 (fail): Adjust to new prompt format.
3015 2007-03-15 Jim Meyering <jim@meyering.net>
3017 Enforce policy: don't use *scanf functions.
3018 * Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
3019 * .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
3020 * TODO: note that stty.c needs this small clean-up.
3022 2007-03-13 Jim Meyering <jim@meyering.net>
3024 Prepare to work on ACL-related failure when using Solaris ZFS.
3025 * gl/lib/acl.c: New file, copied from gnulib.
3027 Work around a failing test due to an NFS-based race condition.
3028 * tests/cp/sparse: Accept a report that the copy is *smaller*.
3030 2007-03-12 Jim Meyering <jim@meyering.net>
3032 Make bootstrap.conf a tiny bit more generic.
3033 * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
3034 files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
3036 2007-03-10 Jim Meyering <jim@meyering.net>
3038 Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
3039 * gl/lib/savewd.c: Copy this file from gnulib, then change
3040 "errno != EACCES" to (errno != EACCES && errno != ESTALE).
3041 The symptom was this failure in tests/install/basic-1:
3042 ginstall: cannot create directory `rel/a': Stale NFS file handle
3044 The preceding change solved part of the problem. Now ginstall fails.
3045 * tests/install/basic-1: Temporarily, don't redirect ginstall's
3046 stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
3049 * tests/install/basic-1: When setting up an unreadable "." in an
3050 inaccessible parent, make the parent inaccessible *after* making "."
3051 unreadable. Otherwise, running "chmod a-r ." in an already-
3052 inaccessible parent would fail on NFS with "Stale NFS file handle".
3053 Reported by Bob Proulx.
3055 * Makefile.maint (po-check): Exclude c99-to-c89.diff.
3057 2007-03-09 Jim Meyering <jim@meyering.net>
3059 Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
3060 * tests/chgrp/basic: Don't let failure by chgrp to set the
3061 group of a symlink make this test fail. Do give a diagnostic.
3062 In the chgrp-no-change-ctime test, add darwin7.9.0 as another
3063 known-failing system.
3064 When failing on some other system, print $host_triplet, too.
3065 Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
3066 Reported by Peter Fales.
3068 2007-03-08 Jim Meyering <jim@meyering.net>
3070 * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
3072 2007-03-08 Paul Eggert <eggert@cs.ucla.edu>
3074 rm without -f: give a better diagnostic when euidaccess fails.
3075 * src/remove.c (write_protected_non_symlink): Return int, not bool,
3076 so that we can indicate failure too (as a postive error number).
3077 (prompt): If write_protected_non_symlink fails, report that error
3078 number and fail rather than charging ahead and removing the dubious
3079 entry. Redo the logic of printing a diagnostic so that we need to
3080 invoke quote (full_filename (...)) only once. More details at:
3081 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
3083 2007-03-08 Jim Meyering <jim@meyering.net>
3085 Generalize a few more cvs-isms.
3086 * bootstrap (checkout_only_file): Rename from CVS_only_file.
3087 Change comments and diagnostics not to say "CVS".
3089 * bootstrap: Run libtool, if necessary.
3091 Make bootstrap a little more general.
3092 * bootstrap (build_aux): Factor out/use this definition.
3093 Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
3094 (insert_sorted_if_absent): Move function definition "up", to
3095 precede new first use.
3096 If $build_aux/ doesn't exist initially, create it, and
3099 2007-03-03 Andrew Church <achurch@achurch.org> (tiny change)
3100 Paul Eggert <eggert@cs.ucla.edu>
3102 Fix a bug: cp -x would fail to set mount point permissions.
3103 * NEWS: mention cp -x bug fix
3104 * src/copy.c (copy_internal): Don't return immediately after
3105 copying a mount point that we do not intend to recurse under.
3106 Based on a patch by Andrew Church.
3108 2007-03-03 Jim Meyering <jim@meyering.net>
3110 pwd-unreadable-parent: Skip test on ia64/Linux, too.
3111 * tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
3112 Reported by Bob Proulx.
3114 2007-03-02 Jim Meyering <jim@meyering.net>
3116 pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
3117 * tests/misc/pwd-unreadable-parent: Rather than trying to decide
3118 whether this test has a chance of succeeding, run it only when
3119 $(host_os) is linux-gnu. It was failing on powerpc-apple-darwin8.8.0
3120 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
3122 * tests/misc/pwd-long: Also allow "+" in $PWD.
3124 Remove another coreutils-ism. Formatting cleanup.
3125 * Makefile.maint (my-distcheck): Update an outdated comment.
3126 (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
3127 (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
3129 2007-03-01 Jim Meyering <jim@meyering.net>
3131 * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
3132 (my-distcheck): Use the new variable, instead of too-long literal.
3134 Make "make syntax-check" rules less coreutils-specific.
3135 * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
3136 (sc_cast_of_alloca_return_value): Likewise.
3137 (sc_root_tests): Do nothing if there is no check-root target
3138 in tests/Makefile.am.
3140 Run the writable-files check only for release-building targets.
3141 * Makefile.maint (local-checks-available): Remove writable-files.
3142 (alpha beta major): Put it here, instead.
3144 "make syntax-check" now runs only Makefile.cfg-selected tests
3145 * Makefile.maint (syntax-check-rules): Hoist this definition so that
3146 it precedes the indirect use in the definition of $(local-check).
3147 (local-check): Use :=, not just "=".
3148 (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
3150 2007-02-28 Bruno Haible <bruno@clisp.org>
3152 * bootstrap.conf (gnulib_modules): Replace xreadlink with
3153 xreadlink-with-size. Add xreadlink.
3154 * src/copy.c (copy_internal): Update.
3155 * src/ls.c (is_directory): Update.
3156 * src/stat.c (print_stat): Update.
3157 * src/readlink.c (main): Use the one-argument xreadlink function.
3159 2007-02-28 Paul Eggert <eggert@cs.ucla.edu>
3161 * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
3162 Problem reported by Philip Rowlands in
3163 <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
3165 2007-02-28 Jim Meyering <jim@meyering.net>
3167 * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
3168 list of exceptions, for the "make distcheck" sc_file_system rule.
3170 * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
3172 2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
3174 Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
3175 * NEWS: With -P, the default block size and output format is not
3176 affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
3177 * src/df.c (main): Implement this.
3179 2007-02-27 Jim Meyering <jim@meyering.net>
3181 Add a test for the above.
3182 * tests/misc/df-P: New file.
3183 * tests/misc/Makefile.am (TESTS): Add df-P.
3185 2007-02-25 Jim Meyering <jim@meyering.net>
3187 * Makefile.maint (announcement): Adjust so that it works with
3188 announce-gen's --gnulib-snapshot-time-stamp option.
3189 Indent one of the command lines using TAB, not 8 spaces.
3191 Post-release version change.
3192 * NEWS: Add a line for 6.8+.
3193 * configure.ac (AC_INIT): Set new version string.
3195 2007-02-24 Jim Meyering <jim@meyering.net>
3198 * NEWS: Record release date and new version number.
3199 * configure.ac (AC_INIT): New version number.
3201 Don't skip this test on new-enough Linux/GNU systems.
3202 * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
3203 rather than for __GETCWD_PREFIX in config.h (the latter is no
3204 longer defined, ever, due to gnulib changes).
3205 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
3207 Remove the "gnits" option; it prohibits my using "+" as a version
3208 string suffix, and all it does (beyond the default "gnu" option)
3209 is to _require_ the THANKS file.
3210 * configure.ac (AM_INIT_AUTOMAKE): Remove it.
3212 Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
3213 * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
3214 * tests/chown/Makefile.am, tests/cp/Makefile.am:
3215 * tests/du/Makefile.am, tests/expr/Makefile.am:
3216 * tests/factor/Makefile.am, tests/general/Makefile.am:
3217 * tests/install/Makefile.am, tests/ln/Makefile.am:
3218 * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
3219 * tests/mv/Makefile.am, tests/readlink/Makefile.am:
3220 * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
3221 * tests/seq/Makefile.am, tests/stty/Makefile.am:
3222 * tests/tee/Makefile.am, tests/touch/Makefile.am:
3224 * README: Document the OSF/1 4.0d build failure and work-around.
3225 Reported by Bruno Haible.
3227 * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
3229 * configure.ac: Use 6.7+, not 6.7-dirty.
3231 2007-02-24 Paul Eggert <eggert@cs.ucla.edu>
3233 * NEWS: sort no longer compresses temporaries by default.
3234 * bootstrap.conf: Remove findprog.
3235 * doc/coreutils.texi (sort invocation): The default is to not
3236 compress. Don't treat "" specially.
3237 * src/sort.c: Don't include findprog.h.
3238 (create_temp): Compress only if the user specified --compress-program.
3239 * tests/misc/sort-compress: Adjusts tests to match new behavior.
3241 2007-02-24 Jim Meyering <jim@meyering.net>
3243 Avoid a shell syntax error, when building with an inadequate Perl.
3244 * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
3245 it can expand to "/.../missing perl".
3247 * man/Makefile.am (.x.1): Warn when unable to update a man page.
3248 Suggestion from Bruno Haible.
3250 2007-02-23 Bruno Haible <bruno@clisp.org>
3252 Handle better the combination of old Perl and a pre-c99 compiler.
3253 * man/Makefile.am (.x.1): If the autoconf test has determined that
3254 perl is missing or not a sufficient version, do nothing.
3256 * tests/readlink/can-e: Put the closing double-quote at the end of a
3257 backquoted word, not in the middle. Works around a bug in sh on
3259 * tests/readlink/can-f: Likewise.
3260 * tests/readlink/can-m: Likewise.
3262 * tests/du/slink: Skip the test if executing on an nfsv3 file system.
3263 This avoids a test failure at least on OSF/1 4.0d.
3265 2007-02-23 Jim Meyering <jim@meyering.net>
3267 * src/date.c (usage): Split a diagnostic that had grown to be
3268 longer than the C89 maximum of 509 bytes.
3270 2007-02-23 Ed Santiago <ed@edsantiago.com>
3272 * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
3273 for a separator. Include sample RFC 2822 and 3339 output.
3275 2007-02-23 Jim Meyering <jim@meyering.net>
3277 With -Dlint, make shuf free all heap-allocated storage.
3278 * src/shuf.c (main): Move declaration of input_lines to
3279 function scope, and initialize to NULL, so we can free it.
3280 [lint]: Free all malloc'd memory.
3281 * tests/misc/shuf: Also test shuf's -e and -i options.
3283 2007-02-22 Jim Meyering <jim@meyering.net>
3285 Merge in a change from some other incarnation of this file (gzip?)
3286 * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
3288 Adjust preceding change not to perform an unaligned access.
3289 * src/copy.c (copy_reg): Undo previous change. Instead, make
3290 it clearer that we're using a single-byte sentinel, and
3291 [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
3292 Reported by Andreas Schwab.
3294 Placate valgrind, wrt ./cp --sparse=always
3295 * src/copy.c (copy_reg): Place the sentinel by setting a
3296 full word's worth of bits, not just a single byte's worth.
3297 This avoids a harmless (but distracting) case of memory being
3300 2007-02-21 Paul Eggert <eggert@cs.ucla.edu>
3302 Honor dd's noatime flag if possible, even if not supported on build fs
3303 * doc/coreutils.texi (dd invocation): Warn that noatime might not be
3305 * src/dd.c (flags, usage): Look at O_NOATIME, not
3306 HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
3307 flag, so that dd attempts O_NOATIME even if the build file system
3308 does not support it. Problem reported by Jim Meyering today in
3310 * tests/dd/misc: Generate a warning, not a failure, if noatime
3313 2007-02-21 Jim Meyering <jim@meyering.net>
3315 * tests/misc/date: Remove vestigial use of Data::Dumper.
3317 2007-02-20 Paul Eggert <eggert@cs.ucla.edu>
3319 * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
3320 about out-of-range initializer with Sun C 5.8.
3322 2007-02-20 Jim Meyering <jim@meyering.net>
3324 * bootstrap (CVS_only_file): Use README-hacking.
3326 Now that we use GIT, not cvs, rename README-cvs.
3327 * README-hacking: Renamed from...
3328 Update to reflect that we now use git.
3330 * README-cvs: ...this.
3332 * src/env.c (main): When invoked with no arguments (i.e. when printing
3333 the environment), use a local variable to iterate through the global
3334 "environ" array, rather than "environ" itself. This is solely to
3335 avoid changing the environment for an LD_PRELOAD-substituted "puts"
3336 or "exit" function. Tiny patch by Harvey Eneman. See
3337 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
3340 * bootstrap: Move definitions of temporary directory names and the
3341 new bt_regex "up" to precede all uses, so it's clearer what their
3342 scope is. Also, use [.], rather than \\., since the former works
3345 * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
3346 Based on the bison 2007-02-19 change by Joel E. Denny.
3348 2007-02-19 Paul Eggert <eggert@cs.ucla.edu>
3350 * NEWS: sort now uses a --compress-program option rather than
3351 an environment variable.
3352 * doc/coreutils.texi (sort invocation): Document this.
3353 * src/sort.c (usage): Likewise.
3354 (COMPRESS_PROGRAM_OPTION): New const.
3355 (long_options, create_temp, main): Support new option.
3356 * tests/misc/sort-compress: Test it.
3358 2007-02-19 Jim Meyering <jim@meyering.net>
3360 * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
3362 2007-02-18 Jim Meyering <jim@meyering.net>
3364 * src/system.h: Don't include exit.h, now that it's subsumed
3365 by the gnulib-generated stdlib.h.
3367 * tests/rm/fail-eacces: Skip this test when running as root.
3368 Reported by Matthew Woehlke.
3370 * bootstrap: Use "._bootmp" as the temporary directory name,
3371 not ".#bootmp". The latter's "#" caused trouble with the new,
3372 gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
3374 2007-02-14 Paul Eggert <eggert@cs.ucla.edu>
3376 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3377 * src/dircolors.c: Include c-strcase.h.
3378 (dc_parse_stream): Use c_strcasecmp rather than
3379 strcasecmp to avoid unreliable results in locales like Turkish
3380 where strcasecmp is incompatible with the C locale.
3382 2007-02-13 Jim Meyering <jim@meyering.net>
3384 Also check for and print stderr output, in case a program fails.
3385 * tests/misc/tty-eof: Occasionally (not reproducible), this
3386 test would fail, with one or more programs exiting nonzero, e.g.,
3387 tty-eof: sha224sum exited with status 1 (expected 0)
3388 Now, maybe we'll get a clue, the next time that happens.
3390 2007-02-12 Jim Meyering <jim@meyering.net>
3392 * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
3394 * tests/misc/pwd-unreadable-parent: Skip the test if we're
3395 definitely using the replacement.
3396 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
3398 2007-02-10 Jim Meyering <jim@meyering.net>
3400 Remove excess leading spaces that would make help2man misbehave.
3401 * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
3402 * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
3403 * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
3404 * src/date.c (usage): Use two spaces after each optional flag, not one.
3405 Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
3407 * Makefile.maint (longopt_re): Relax the regexp, making square
3408 brackets optional, so it matches the newly reported violations, too.
3410 * src/csplit.c (usage): Use two spaces (not one) to separate
3411 each option string from its description, so help2man formats
3412 the derived man page properly. Reported by Thomas Huriaux in
3413 <http://bugs.debian.org/410407>.
3414 * src/df.c (usage): Likewise.
3415 * src/du.c (usage): Likewise.
3416 * src/install.c (usage): Likewise.
3417 * src/ls.c (usage): Likewise.
3419 2007-02-03 Jim Meyering <jim@meyering.net>
3421 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
3422 * NEWS: Mention the bug fix.
3423 * tests/misc/pwd-unreadable-parent: New file.
3424 * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
3426 2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
3428 * NEWS: Document fix for cp --preserve=mode.
3429 * src/copy.c (copy_internal): Omit the group- or other-writeable
3430 permissions when creating a directory, to avoid a race condition
3431 if the special mode bits aren't right just after the directory is
3433 * src/cp.c (make_dir_parents_private): Likewise.
3434 * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
3437 * NEWS: Document fix for cp --parents.
3438 * src/cp.c (make_dir_parents_private): Report the error sooner with
3439 "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
3440 creating the directory, DEST/DIR.
3441 * tests/cp/cp-parents: Test for the non-race-condition bug fixed
3442 by the above change.
3444 2007-02-02 Jim Meyering <jim@meyering.net>
3446 * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
3448 * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
3449 consistent, so this can be applied with patch -p0.
3450 Reported by Matthew Woehlke.
3452 Arrange for "make check-root" to run the new root-only test.
3453 * tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux.
3456 * Makefile.maint (patch-check): Use patch with its -p2 option,
3457 since that makes this check slightly more strict.
3459 Use a directory on a loopback device mounted with -o context=...
3460 * tests/cp/cp-a-selinux: Since this test now runs mount and umount,
3461 it is a root-only one.
3463 2007-01-29 Jim Meyering <jim@meyering.net>
3466 * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
3467 determine dev/inode or upon detecting a symlink loop.
3469 * src/ls.c: Rename three global variables.
3470 (cwd_file): Rename from 'files'.
3471 (cwd_n_alloc): Rename from 'nfiles'.
3472 (cwd_n_used): Rename from 'files_index'.
3474 Shave 8 bytes off the size of "struct fileinfo".
3475 * src/ls.c (fileinfo): Put all members of type "bool" together.
3477 2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
3479 Modify "ls" to sort its data faster, using the new gnulib mpsort
3480 module rather than qsort. This is particularly a win in
3481 environments where strcoll is slow, since mpsort typically calls
3482 strcoll less often than qsort does.
3483 * bootstrap.conf (gnulib_modules): Add mpsort.
3484 * src/ls.c: Include mpsort.h.
3485 (sorted_file, sorted_file_alloc): New vars, for a new vector of
3486 pointers to the file info, for speed.
3487 (clear_files, extract_dirs_from_files, sort_files, print_current_files):
3488 (print_many_per_line, print_horizontal, print_with_commas):
3489 (calculate_columns): Set and use new vector.
3490 (initialize_ordering_vector): New function.
3492 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3494 Adjust to today's change to gnulib, which added a module for
3495 string.h to replace the little include files like strcase.h.
3496 * src/dircolors.c: Don't include strcase.h.
3497 * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
3499 2007-01-26 Jim Meyering <jim@meyering.net>
3501 * src/dd.c (advance_input_after_read_error): Change diagnostic to
3502 say "invalid file offset" rather than "screwy file offset".
3504 * .x-sc_cast_of_argument_to_free: Remove this file.
3505 * Makefile.am (EXTRA_DIST): Likewise.
3507 2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
3509 * src/sort.c (create_temp): Remove superfluous access-X_OK
3510 check. find_in_path does this for us.
3512 2007-01-24 Jim Meyering <jim@meyering.net>
3514 Remove usually-skipped test.
3515 * tests/cp/open-perm-race: Remove this file. It is subsumed
3516 by parent-perm-race.
3517 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
3518 * tests/sort/Makefile.am: Regenerate.
3520 Pass "make distcheck" again.
3521 * src/sort.c (usage): Split a diagnostic that had grown to be
3522 longer than the C89 maximum of 509 bytes.
3523 * .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
3524 FIXME: this is just temporary, while we wait to remove the offending
3525 access-calling code.
3526 * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
3527 * Makefile.maint (sc_cast_of_argument_to_free): Use the
3528 canonical, $$($(CVS_LIST_EXCEPT)).
3529 * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
3531 2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
3533 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
3534 like it will be approved. Also add --check=quiet, --check=silent
3535 as long aliases, and --check=diagnose-first as an alias for -c.
3536 * doc/coreutils.texi (sort invocation): Document this.
3537 Also, mention that sort -c can take at most one file.
3538 * src/sort.c: Implement this.
3540 (usage): Document the change.
3541 (CHECK_OPTION): New constant.
3542 (long_options): --check now takes an optional argument, and is now
3543 treated differently from 'c'.
3544 (check_args, check_types): New constant arrays.
3545 (check): New arg CHECKONLY, which suppresses diagnostic if -C.
3546 (main): Parse the new options.
3547 * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
3550 2007-01-24 Jim Meyering <jim@meyering.net>
3553 * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
3554 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
3556 Don't depend on "which".
3557 * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
3558 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
3560 2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
3562 Test sort compression.
3563 * tests/misc/Makefile.am: Add the test.
3564 * tests/misc/sort-compress: New file containing the tests.
3566 2007-01-24 Jim Meyering <jim@meyering.net>
3568 * NEWS: sort temp file compression: tweak wording.
3569 * src/sort.c (struct sortfile) [name]: Declare member to be const.
3571 2007-01-21 Jim Meyering <jim@meyering.net>
3573 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
3574 In pipe_fork callers, use these named constants, not "2" and "8".
3575 (proctab, nprocs): Declare to be "static".
3576 (pipe_fork) [lint]: Initialize local, pid,
3577 to avoid unwarranted may-be-used-uninitialized warning.
3578 (create_temp): Use the active voice. Describe parameters, too.
3580 2007-01-21 James Youngman <jay@gnu.org>
3582 Centralize all the uses of sigprocmask(). Don't restore an invalid
3584 * src/sort.c (enter_cs, leave_cs): New functions for protecting
3585 code sequences against signal delivery.
3586 * (exit_cleanup): Use enter_cs and leave_cs instead of
3587 calling sigprocmask directly.
3588 (create_temp_file, pipe_fork, zaptemp): Likewise
3590 2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
3592 Add compression of temp files to sort.
3593 * NEWS: Mention this.
3594 * bootstrap.conf: Import findprog.
3595 * configure.ac: Add AC_FUNC_FORK.
3596 * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
3598 * src/sort.c (compress_program): New global, holds the name of the
3599 external compression program.
3600 (struct sortfile): New type used by mergepfs and friends instead
3601 of filenames to hold PIDs of compressor processes.
3602 (proctab): New global, holds compressor PIDs on which to wait.
3603 (enum procstate, struct procnode): New types used by proctab.
3604 (proctab_hasher, proctab_comparator): New functions for proctab.
3605 (nprocs): New global, number of forked but unreaped children.
3606 (reap, reap_some): New function, wait for/cleanup forked processes.
3607 (register_proc, update_proc, wait_proc): New functions for adding,
3608 modifying and removing proctab entries.
3609 (create_temp_file): Change parameter type to pointer to file
3610 descriptor, and return type to pointer to struct tempnode.
3611 (dup2_or_die): New function used in create_temp and open_temp.
3612 (pipe_fork): New function, creates a pipe and child process.
3613 (create_temp): Creates a temp file and possibly a compression
3614 program to which we filter output.
3615 (open_temp): Opens a compressed temp file and creates a
3616 decompression process through which to filter the input.
3617 (mergefps): Change FILES parameter type to struct sortfile array
3618 and update access accordingly. Use open_temp and reap_some.
3619 (avoid_trashing_input, merge): Change FILES parameter like
3620 mergefps and call create_temp instead of create_temp_file.
3621 (sort): Call create_temp instead of create_temp_file.
3623 (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
3625 The idea of compressing sorts temporary files was first
3626 suggested/implemented by Jay Soffian in 1998, and again
3627 by Charles Randall in 2001.
3629 2007-01-20 Jim Meyering <jim@meyering.net>
3631 * tests/misc/pwd-long: Work properly even when run from the
3632 wrong one of two or more bind-mounted sibling directories.
3633 Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
3635 2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
3637 Standardize on list of signals when an app catches signals.
3638 * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
3639 SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
3640 * src/ls.c (main): Likewise (except SIGPIPE was already caught).
3641 Note that ls.c is special, as it also catches SIGTSTP.
3642 * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
3643 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
3645 2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
3646 and Paul Eggert <eggert@cs.ucla.edu>
3648 * src/sort.c (cleanup): Clear temphead at the end.
3649 (exit_cleanup): New function.
3650 (main): Don't invoke atexit until we're ready.
3651 Invoke it with exit_cleanup, not with cleanup and close_stdout,
3652 to avoid a race condition with cleanup and signal handling. More
3653 details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
3655 2007-01-18 Jim Meyering <jim@meyering.net>
3657 * src/c99-to-c89.diff: Adjust remove.c offsets.
3659 2007-01-17 Jim Meyering <jim@meyering.net>
3661 Make "rm --interactive=never ..." never prompt.
3662 * NEWS: Mention this.
3663 * src/remove.h (enum rm_interactive): New ternary type.
3664 (struct rm_options) [interactive]: Use it, here -- rather than bool.
3665 * src/remove.c (prompt): Reflect type change.
3666 * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
3667 * src/rm.c (main): Add a FIXME comment for '-d' option.
3668 Adapt to type change of rm_options.interactive.
3670 * tests/rm/i-never: New file. Test for the above fix.
3671 * tests/rm/Makefile.am (TESTS): Add i-never.
3673 2007-01-15 Jim Meyering <jim@meyering.net>
3675 * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
3676 emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
3677 but that's ok, since fts_.h will eventually be renamed.
3679 * src/remove.c (remove_dir): Don't use errno in diagnostic.
3680 Root-only test failure reported by Alex van Hout and Jon Grosshart in
3681 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
3683 * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
3684 s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
3686 2007-01-14 Bruno Haible <bruno@clisp.org>
3688 Enable use of gnulib's new fchdir module.
3689 * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
3690 since we use canonicalize.
3691 (gnulib_modules): Add fchdir.
3692 * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
3694 2007-01-13 Jim Meyering <jim@meyering.net>
3696 * tests/cp/open-perm-race: Remove gdb-based test.
3697 It would run only when compiled with -g, and besides is now
3698 subsumed by file-perm-race.
3699 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
3701 * Transform all Makefile.am files so that when running "make check",
3702 CU_TEST_NAME is set to the name of the test. This is so that when I
3703 run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
3704 on the entire package it is more convenient to map a leak or error
3705 found in a valgrind log file back to the offending test.
3707 (echo tests/Makefile.am.in; find tests -name Makefile.am) \
3708 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
3709 -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
3711 2007-01-11 Jim Meyering <jim@meyering.net>
3713 Avoid a leak in expr's implementation of the ":" (match) operator.
3714 * src/expr.c (docolon): Free the regexp buffer using regfree, rather
3715 than doing it manually, being careful to set fastmap to NULL first.
3716 Free any re_regs.start and .end members, if necessary.
3718 * tests/misc/test-diag: Work also when libc's error function
3719 reports the entire program name ("../../src/test"), rather than
3720 just the final component.
3722 2007-01-10 Jim Meyering <jim@meyering.net>
3724 Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
3725 * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
3726 (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
3727 directory. Non-directory entries lack fts_statp data when using
3728 the FTS_NOSTAT option.
3730 2007-01-07 Jim Meyering <jim@meyering.net>
3732 * tests/sample-test: Update copyright date to 2007.
3733 * Makefile.maint (copyright-check): Also check the copyright date
3734 in tests/sample-test.
3736 2007-01-06 Jim Meyering <jim@meyering.net>
3738 * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
3739 based on examples from G.P. Halkes in
3740 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
3742 2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
3744 * src/fmt.c (copy_rest): Correct prefix handling.
3745 Don't elide a line with the prefix followed by only white space.
3746 (get_line): Move EOF-check to loop-termination condition.
3747 * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
3748 (pfx-2): Remove test; its premise was contrary to the documentation.
3750 2007-01-05 Jim Meyering <jim@meyering.net>
3752 Avoid a used-uninitialized bug for invalid input, i.e., when the size
3753 of the input, not counting newlines, is 1 % 4.
3754 * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
3755 It may be smaller when flushing.
3757 2007-01-05 Mike Frysinger <vapier@gentoo.org>
3759 * src/dircolors.hin: Add a TERM directive for cons25.
3761 2007-01-04 Jim Meyering <jim@meyering.net>
3763 * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
3764 case you don't have convenient access to glibc info documentation.
3766 Use the release year, not the current year.
3767 * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
3768 * src/Makefile.am (RELEASE_YEAR): Define it.
3770 Thanks to a prod from Eric Blake.
3772 Ensure that "group --version" always prints the current year.
3773 * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
3774 * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
3775 Suggestion from Eric Blake.
3777 When decoding, always allow newlines in input, with almost no
3779 * src/base64.c (do_decode): Initialize decode context.
3780 Call base64_decode one more time, after all input is processed.
3781 (usage): When decoding, newlines are always accepted.
3783 * tests/misc/base64: Add a bunch of tests, for the above.
3784 * gl/lib/base64.c: Include <string.h>.
3785 (base64_decode_ctx_init, get_4, decode_4): New functions.
3786 (base64_decode): Efficiently handle interspersed newlines.
3787 (base64_decode_alloc): Update signature.
3788 * gl/lib/base64.h (struct base64_decode_context): Define.
3789 (base64_decode_ctx_init): Add prototype.
3790 (base64_decode, base64_decode_alloc): Update prototypes.
3792 * gl/lib/base64.c: Copied from gnulib.
3793 * gl/lib/base64.h: Likewise.
3795 2007-01-03 Jim Meyering <jim@meyering.net>
3797 * THANKS: Add Evan Hunt.
3799 2007-01-03 Bruno Haible <bruno@clisp.org>
3801 Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
3802 * tests/chown/deref: Apply lang-default.
3803 * tests/misc/split-a: Likewise.
3804 * tests/mv/reply-no: Likewise.
3806 * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
3809 2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
3811 Now, "ls -FRL" always follows symbolic links on Linux.
3812 * NEWS: Mention this bug fix.
3813 * src/ls.c (gobble_file): Fix bug reported by
3814 Nobuyuki Tsuchimura in
3815 http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
3816 where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
3817 * tests/ls/follow-slink: Add a test for this case.
3819 2007-01-01 Jim Meyering <jim@meyering.net>
3821 * tests/rm/fail-eperm: Revert last change. The PATH=... setting
3822 is not honored at least on HP-UX 11.23 systems.
3823 Instead, simply transform the actual output diagnostic.
3824 Test failure reported by Bob Proulx.
3826 2006-12-30 Jim Meyering <jim@meyering.net>
3828 * bootstrap (gnulib_extra_files): Remove announce-gen.
3829 * bootstrap.conf (gnulib_modules): Add it here instead, now that
3832 * tests/misc/base64: Factor a long, repetitive string.
3834 * src/c99-to-c89.diff: Adjust remove.c offsets.
3836 Clean up after the change of 2006-12-28.
3837 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
3838 now that this function never modifies the pointer. Adjust comments
3839 and code accordingly.
3840 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
3841 now that AD_pop_and_chdir no longer does that.
3843 * tests/rm/fail-eperm: Avoid spurious differences (the error function
3844 from latest glibc no longer prints the full program_name): so don't
3845 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
3847 * tests/mv/acl (skip): Skip this test also if the destination
3848 directory, which is on a different file system, lacks ACL support.
3850 * src/copy.c (copy_reg): Rewrite a comment that was rendered
3851 inaccurate by the 2006-10-18 change.
3853 2006-12-28 Jim Meyering <jim@meyering.net>
3855 When moving "up" the hierarchy, be careful to remove a just-emptied
3856 directory before opening ".", to avoid trouble with file system
3857 implementations that cache readdir results at opendir-time.
3858 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
3859 Don't update **DIRP. Don't call fdopendir here.
3860 (remove_dir): Call fdopendir here instead.
3861 Report and patch from Mikulas Patocka:
3862 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
3864 2006-12-27 Jim Meyering <jim@meyering.net>
3866 * src/tail.c (usage): Mention +N for --bytes and --lines.
3867 Suggestion from Evan Hunt.
3869 2006-12-26 Jim Meyering <jim@meyering.net>
3871 * configure.ac: Require autoconf-2.61 and automake-1.10.
3872 Without the former (even with autoconf-2.60), "make distcheck"
3873 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
3874 due to an inttypes.h generated with CFLAGS including -pedantic.
3875 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
3877 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
3878 tag, using the release version number as the message.
3879 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
3881 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
3883 * NEWS: dd bs= operands now silently override later ibs= and obs=,
3885 * src/dd.c (scanargs): Implement it.
3886 * tests/dd/misc (outbytes): Test it.
3887 * doc/coreutils.texi (dd invocation): Specify that bs=N
3888 overrides later ibs and obs, undoing part of the
3889 previous change. (The behavior was wrong.)
3891 2006-12-20 Jim Meyering <jim@meyering.net>
3893 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
3894 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
3895 Don't let a non-directory get by with errno == EPERM, either.
3896 Check the file type directly (using cached stat value), rather
3897 than trying to guess it from errno values.
3898 Karl Berry reported that a cross-partition "mv /etc/issue ~"
3899 failed with the um,... suboptimal diagnostic,
3900 "mv: cannot remove `/etc/issue': Not a directory".
3901 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
3902 * tests/rm/fail-eacces: New file.
3903 * NEWS: Mention that both mv and rm are affected.
3905 "cut -f 2- A B" no longer triggers a double-free bug
3906 * src/cut.c (cut_fields): Set file-scoped global to NULL after
3907 freeing it. This avoids a double-free (and core dump on some systems)
3908 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
3909 James Hunt in <http://bugzilla.redhat.com/220312>.
3910 * NEWS: List this bug fix.
3911 * THANKS: Mention him.
3912 * tests/misc/cut: New file.
3913 * tests/misc/Makefile.am (TESTS): Add cut.
3915 2006-12-15 Jim Meyering <jim@meyering.net>
3917 * tests/cp/open-perm-race: Correct the gdb-existence check.
3918 Don't run either subsequent gdb command in a sub-shell.
3919 Reported by Thomas Schwinge.
3920 * THANKS: bring up to date.
3922 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
3924 Make sure cp -p isn't too generous with file permissions.
3925 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
3926 * tests/cp/file-perm-race: New file.
3928 Ensure cp -pR --parents isn't too generous with parent permissions.
3929 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
3930 * tests/cp/parent-perm-race: New file.
3932 2006-12-14 Jim Meyering <jim@meyering.net>
3934 * tests/chgrp/default-no-deref: Don't assume that files are created
3935 with the primary group by default. That's not true in a directory
3936 with the set-GID bit set.
3938 Don't hang when there's no input tty.
3939 * tests/cp/open-perm-race: Skip this test if there is no
3940 controlling input `terminal'.
3942 Test for a hard-to-detect race fix, using gdb.
3943 * tests/cp/open-perm-race: New file, to test for the
3944 cp --preserve=ownership fix of 2006-12-06.
3946 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
3947 (TESTS): Add open-perm-race.
3949 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
3950 * src/chown.c (main): Likewise.
3951 * src/chown-core.c (change_file_owner): Add to a comment.
3952 * tests/chown/preserve-root: Add tests.
3954 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
3955 * src/chmod.c (process_file): Do honor the --preserve-root option.
3956 * src/chown-core.c (change_file_owner): Likewise, but here, also
3957 handle the case in which a traversal would go "through" a symlink
3958 to root. Reported by Matthew M. Boedicker
3959 * tests/chown/preserve-root: Test for the above.
3960 * tests/chown/Makefile.am (TESTS): Add preserve-root.
3962 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
3963 to gnulib's m4/openat.m4.
3965 2006-12-13 Andreas Schwab <schwab@suse.de>
3967 Don't fail if mv/acl test succeeds.
3968 * tests/mv/acl (skip): Check for acl support in the file system.
3969 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
3970 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
3972 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
3974 Remove some arbitrary restrictions on size fields, so that
3975 commands like "sort -k 18446744073709551616" no longer fail merely
3976 because 18446744073709551616 doesn't fit in uintmax_t. The trick
3977 is that these fields can all be treated as effectively infinity;
3978 their exact values don't matter, since no internal buffer can be
3980 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
3981 ULONG_MAX if the code assumes this. Silently truncate too-large
3982 values to SIZE_MAX, as the remaining code will do the right thing
3984 * src/sort.c (parse_field_count): Likewise.
3985 * src/uniq.c (size_opt, main): Likewise.
3986 * tests/join/Test.pm (bigfield): New test.
3987 * tests/sort/Test.pm (bigfield): New test.
3988 * tests/uniq/Test.pm (121): New test.
3990 2006-12-13 Jim Meyering <jim@meyering.net>
3992 * tests/chgrp/default-no-deref: New test.
3993 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
3995 2006-12-12 Jim Meyering <jim@meyering.net>
3997 * src/system.h (SETVBUF): Remove definition, now that the
3998 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
3999 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
4000 * src/od.c (open_next_file): Likewise.
4002 2006-12-09 Jim Meyering <jim@meyering.net>
4004 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
4005 "source". I.e. "GNU coreutils 6.7".
4007 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
4008 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
4009 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
4011 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
4012 whenever uniq is expected to fail. This should catch the other case
4013 [test #112] in which uniq emits "cat: write error: Broken pipe" on
4016 2006-12-08 Jim Meyering <jim@meyering.net>
4018 Include bootstrap tool version info in the announcement form.
4019 * Makefile.maint (gnulib_snapshot_date): Define.
4020 (announcement): Use two new announce-gen options,
4021 --bootstrap-tools and --gnulib-snapshot-date.
4022 * Makefile.cfg (gnulib_dir): Set.
4024 Post-release version change.
4025 * NEWS: Add a line for 6.8-dirty.
4026 * configure.ac (AC_INIT): Set new version string.
4028 2006-12-07 Jim Meyering jim@meyering.net
4031 * NEWS: Record release date. Remove '-pre' suffix.
4032 * configure.ac (AC_INIT): Remove version string suffix.
4034 2006-12-07 Jim Meyering <jim@meyering.net>
4036 Make the output of "make check" more reproducible.
4037 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
4038 evoke diagnostics like this when COLUMNS=0 in the environment:
4039 ls: ignoring invalid width in environment variable COLUMNS: 0
4040 * tests/touch/no-rights: Likewise.
4041 * tests/help-version: Likewise.
4042 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
4043 118, since it emits "cat: write error: Broken pipe" on some systems.
4045 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
4047 * NEWS: Document the cp -p fix for special bits.
4048 * src/copy.c (set_owner): Now returns a three-way result, so
4049 that the caller can clear the special bits. All callers changed.
4050 (copy_reg): Don't set the special bits if chown failed.
4051 (copy_internal): Likewise.
4052 * tests/cp/special-bits: Test this fix.
4054 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
4056 * NEWS: Document the cp --preserve=ownership fix.
4057 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
4058 * src/copy.c (fchmod_or_lchmod): New function.
4059 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
4060 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
4061 When creating a file, use O_EXCL, so we're more likely to detect
4062 funny business by other processes. At the end, if permissions
4063 were omitted, chmod them back in.
4064 (copy_internal): If the ownership might change, omit some permissions
4065 at first, then restore them after chowning the file.
4066 * src/cp.c (make_dir_parents_private): Likewise.
4067 * src/copy.c (cached_umask): New function.
4068 * src/copy.h (cached_umask): New decl.
4070 2006-12-06 Jim Meyering <jim@meyering.net>
4072 Make the output of "make check" more reproducible.
4073 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
4075 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
4077 * src/install.c (install_file_in_file): Preserve time stamps
4078 before changing owner or file mode bits, for consistency with
4079 other coreutils programs.
4081 2006-12-03 Jim Meyering <jim@meyering.net>
4083 * tests/misc/date-sec: Output a fixed string.
4085 * NEWS: du --one-file-system (-x) would skip subdirectories of any
4086 directory listed as second or subsequent command line argument.
4087 * tests/du/one-file-system: New file. Test for today's fts.c fix.
4088 * tests/du/Makefile.am (TESTS): Add one-file-system.
4089 Reported by Mike Frysinger.
4091 2006-12-02 Jim Meyering <jim@meyering.net>
4093 * tests/du/basic: Generate 4KB file simply using printf, rather than
4094 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
4096 2006-11-28 Jim Meyering <jim@meyering.net>
4098 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
4099 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
4100 Reported by Matthew Woehlke.
4102 * tests/mv/dir2dir: Also accept EBUSY.
4103 Reported by Matthew Woehlke.
4105 2006-11-27 Jim Meyering <jim@meyering.net>
4107 * Makefile.maint (patch-check): Rewrite to diagnose failure.
4108 * src/c99-to-c89.diff: Adjust shred.c offsets.
4110 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
4112 Improve the check for departures from C89, and fix the departures
4114 * Makefile.maint (my-distcheck): Also check for C89 compatibility
4115 as best we can with GCC.
4116 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
4117 declaration; C89 doesn't allow this.
4118 * src/dcgen: Don't generate string literals longer than
4119 what C89 requires support for.
4120 * src/cut.c (usage): Don't use string literals longer than
4121 what C89 requires support for.
4122 * src/date.c (usage): Likewise.
4123 * src/dd.c (usage): Likewise.
4124 * src/du.c (usage): Likewise.
4125 * src/ls.c (usage): Likewise.
4126 * src/od.c (usage): Likewise.
4127 * src/readlink.c (usage): Likewise.
4128 * src/seq.c (usage): Likewise.
4129 * src/shred.c (usage): Likewise.
4131 2006-11-26 Mike Frysinger <vapier@gentoo.org>
4133 Recognize new archive, audio and image formats.
4134 Give audio files a separate color.
4135 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
4136 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
4137 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
4138 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
4139 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
4140 audio color to 00;36 to differentiate from image/video color.
4142 2006-11-26 Jim Meyering <jim@meyering.net>
4144 * Makefile.maint (patch-check): Compile patched sources with
4145 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
4146 no violations remain.
4148 * src/c99-to-c89.diff: Remove 3 bogus hunks.
4150 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
4153 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
4155 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
4157 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
4159 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
4160 while trying to retain the readability of C99 as much as possible.
4161 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
4162 Replace each of two uses with literal AT_FDCWD.
4163 (cache_stat_init): Return its argument, for convenience.
4164 Update the caller in remove_dir.
4165 (AD_pop_and_chdir): Return prev_dir rather than storing through
4166 a pointer argument. All uses changed.
4167 (AD_ensure_initialized): New function.
4168 (AD_mark_helper): Use it, to avoid the need for declaration
4170 (rm): Move cycle_check_init call into callee...
4172 Use an else clause in place of a "continue" statement.
4173 (close_preserve_errno): Remove.
4174 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
4176 2006-11-25 Jim Meyering <jim@meyering.net>
4178 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
4180 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
4182 * tests/du/inacc-dest: Skip this test when running as root.
4184 2006-11-23 Jim Meyering <jim@meyering.net>
4186 * announce-gen: Remove file. It's moving to gnulib.
4187 * bootstrap: Pull it from gnulib/build-aux instead.
4188 * Makefile.maint (announcement): Reflect move to ./build-aux.
4190 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
4191 rather than a pipeline that would sometimes evoke a diagnostic
4192 like "seq: write error: Broken pipe".
4194 * tests/help-version: Suppress dd transfer rate output.
4196 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
4198 2006-11-22 Jim Meyering <jim@meyering.net>
4200 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
4201 change "(:?..." to "(?:..." in regexps.
4203 Post-release version change.
4204 * NEWS: Add a line for 6.7-pre.
4205 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
4208 * NEWS: Record release date. Remove "-pre" suffix.
4209 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
4211 * announce-gen: Remove unused --release-archive-directory option.
4212 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
4214 Match version numbers in NEWS using tighter regular expressions.
4215 (main): Require the --gpg-key-id=ID option.
4216 * Makefile.maint (announcement): Don't use now-removed
4217 --release-archive-directory=... option.
4219 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
4221 2006-11-21 Jim Meyering <jim@meyering.net>
4223 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
4224 skip the test rather than failing. Reported by Michael Deutschmann.
4226 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
4227 rather than just "exit N".
4229 Arrange for "make check-root" to run the new root-only test.
4230 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
4233 2006-11-20 Jim Meyering <jim@meyering.net>
4235 Add a root-only test for today's lib/idcache.c fix.
4236 * tests/ls/nameless-uid: New file.
4237 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
4238 (TESTS_ENVIRONMENT): Add PERL to the list.
4240 2006-11-19 Jim Meyering <jim@meyering.net>
4242 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
4243 find the 7-second sleep annoyingly long. Besides, this test is
4244 probably far too specific and timing sensitive ever to trigger again.
4245 * tests/tail-2/assert: Likewise.
4247 Post-release version change.
4248 * NEWS: Add a line for 6.6-pre.
4249 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
4252 * NEWS: Record release date. Remove "-cvs" suffix.
4253 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4255 2006-11-18 Jim Meyering <jim@meyering.net>
4257 "ln --backup f f" produces a misleading diagnostic:
4258 ln: creating hard link `f' => `f': No such file or directory
4259 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
4260 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
4261 * tests/ln/Makefile.am (TESTS): Add hard-backup.
4262 * tests/ln/hard-backup: New test for the above.
4263 * NEWS: Mention this fix.
4265 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
4267 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
4269 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
4270 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
4271 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
4272 Omit unnecessary parenthesization of args.
4273 * src/od.c (EQUAL_BLOCKS): Likewise.
4274 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
4276 2006-11-16 Jim Meyering <jim@meyering.net>
4278 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
4279 automake we're skipping this test), and give a diagnostic to tell
4280 the user the same thing. Reported by Mike Grayson.
4282 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4284 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
4285 with `$(MAN)', computed at configure time; also, list them ...
4286 (optional_mans): ... in this new variable.
4287 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
4289 2006-11-16 Jim Meyering <jim@meyering.net>
4291 Help valgrind see that there is no leak in dd.c.
4292 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
4293 so we need not free them at all. This is easier than freeing
4294 both buffers at each of the early "return"s.
4296 * src/csplit.c (load_buffer): Plug an inconsequential leak.
4298 2006-11-15 Jim Meyering <jim@meyering.net>
4300 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
4301 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
4303 2006-11-14 Jim Meyering <jim@meyering.net>
4305 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
4306 remove the now-unnecessary use of AC_LIBSOURCES.
4308 Adapt to new version of gnulib-tool.
4309 * gl/modules/root-dev-ino: New file.
4310 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
4311 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
4312 * m4/root-dev-ino.m4: Move this file ...
4313 * gl/m4/root-dev-ino.m4: ... to here.
4315 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
4317 2006-11-13 Jim Meyering <jim@meyering.net>
4319 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
4322 Plug another technically-unimportant leak in sort.
4323 * src/sort.c (main): Don't allocate memory for each new key here.
4324 (insertkey): Allocate memory for each key here, instead.
4325 (key_init): Rename from new_key. Don't allocate.
4327 * src/sort.c (main): Plug a tiny memory leak.
4328 Move declaration of local "minus" down to be nearer point of use.
4330 2006-11-12 Jim Meyering <jim@meyering.net>
4332 du would exit early, when encountering an inaccessible directory
4333 Reported by Mike Frysinger, in
4334 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
4335 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
4336 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
4337 diagnostic from the expected output when using native fdopendir.
4338 * tests/chmod/no-x: Likewise.
4339 * tests/du/no-x: Likewise.
4340 * NEWS: Mention this bug fix.
4341 * tests/du/Makefile.am (TESTS): Add inacc-dest.
4343 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
4344 for xalloc.h itself.
4346 Avoid false-positive when testing via valgrind.
4347 * tests/mv/atomic: Grep strace output for a more specific pattern
4348 than just "unlink", since that got a false positive when testing
4349 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
4350 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
4352 2006-10-28 Jim Meyering <jim@meyering.net>
4354 * Makefile.maint (patch-check): Make it easier to regenerate
4355 the src/c99-to-c89.diff file. E.g., I do this:
4356 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
4358 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
4360 2006-10-26 Jim Meyering <jim@meyering.net>
4362 * src/system.h (ftello): Add a compile-time check for the highly
4363 unlikely condition of off_t narrower than long int, rather than
4364 handling it at run time. Based on a patch from Paul Eggert.
4366 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
4368 * tests/chmod/c-option: When double-quoting part of a word, prefer
4369 to double-quote the whole word. This is a bit easier to read (at
4370 least for me), and in some cases it avoids a shell bug with Tru64
4371 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
4372 "$abs_srcdir"/../setgid-check we now write
4373 "$abs_srcdir/../setgid-check".
4374 * tests/cp/cp-parents: Likewise.
4375 * tests/du/inaccessible-cwd: Likewise.
4376 * tests/du/long-from-unreadable: Likewise.
4377 * tests/install/basic-1: Likewise.
4378 * tests/install/trap: Likewise.
4379 * tests/misc/close-stdout: Likewise.
4380 * tests/mkdir/concurrent-1: Likewise.
4381 * tests/mkdir/p-1: Likewise.
4382 * tests/mkdir/p-3: Likewise.
4383 * tests/mkdir/parents: Likewise.
4384 * tests/mkdir/perm: Likewise.
4385 * tests/readlink/can-e: Likewise.
4386 * tests/readlink/can-f: Likewise.
4387 * tests/readlink/can-m: Likewise.
4388 * tests/rm/inaccessible: Likewise.
4389 * tests/rm/unread3: Likewise.
4390 * tests/touch/no-create-missing: Likewise.
4392 * lib/.cvsignore: Add uinttostr.c.
4394 2006-10-25 Jim Meyering <jim@meyering.net>
4396 Portability to Tru64 V4.0.
4397 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
4398 Define inline replacement function.
4399 This (along with a yesterday's fix for autoconf's
4400 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
4401 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
4403 2006-10-25 Bruno Haible <bruno@clisp.org>
4405 * src/cat.c (infile): Add "const" to declaration.
4406 * src/csplit.c (prefix): Likewise.
4407 * src/printf.c (cfcc_msg): Likewise.
4408 * src/tail.c (valid_file_spec): Likewise.
4409 * src/cut.c (cut_file): Likewise, for a parameter.
4410 * src/expr.c (str_value): Likewise.
4411 * src/fold.c (fold_file): Likewise.
4412 * src/pr.c (init_header): Likewise.
4413 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
4414 * src/tr.c (make_printable_str): Likewise.
4415 * src/nl.c (body_type, header_type, footer_type, current_type):
4416 (separator_str, build_type_arg, nl_file): Likewise, for many.
4417 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
4418 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
4420 2006-10-25 Jim Meyering <jim@meyering.net>
4422 * tests/sample-test: Update copyright year list to include only
4423 the current year, since this is what I'll want in any new test.
4425 2006-10-24 Jim Meyering <jim@meyering.net>
4427 * src/c99-to-c89.diff: Update to reflect new offsets.
4429 * NEWS: new feature: rm accepts new option: --one-file-system
4430 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
4431 * src/remove.h (struct rm_options) [one_file_system]: New member.
4432 * src/rm.c (rm_option_init): Initialize it.
4433 (usage): Document the option.
4434 * src/mv.c (rm_option_init): Likewise.
4435 * src/remove.c (remove_dir): With --one-file-system and --recursive,
4436 for each directory command line argument, do not affect a file system
4437 different from that of the starting directory. And give a diagnostic.
4438 * src/rm.c (ONE_FILE_SYSTEM): New enum.
4439 (main): Handle new option.
4440 * tests/rm/one-file-system: Test the above.
4441 * tests/rm/Makefile.am (TESTS): Add one-file-system.
4442 * tests/Makefile.am (check-root): Add the rm/one-file-system
4444 (EXTRA_DIST): Add other-fs-tmpdir.
4446 * tests/mv/setup: Removed. Renamed to...
4447 * tests/other-fs-tmpdir: ...this new file.
4448 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
4449 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
4450 * tests/mv/backup-is-src: Likewise.
4451 * tests/mv/hard-link-1: Likewise.
4452 * tests/mv/leak-fd: Likewise.
4453 * tests/mv/mv-special-1: Likewise.
4454 * tests/mv/part-fail: Likewise.
4455 * tests/mv/part-hardlink: Likewise.
4456 * tests/mv/part-rename: Likewise.
4457 * tests/mv/part-symlink: Likewise.
4458 * tests/mv/partition-perm: Likewise.
4459 * tests/mv/to-symlink: Likewise.
4460 * tests/mv/into-self-2: Likewise.
4462 Don't let a failure in one test stop "make -k" from running the others.
4463 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
4464 (check-root): Depend on them, rather than executing the five
4465 commands in a single rule. Reported by Greg Schafer.
4467 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
4469 * Makefile.maint (alpha beta major): Use a better log message for
4470 the automatic commit of .prev-version.
4472 2006-10-23 Jim Meyering <jim@meyering.net>
4474 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
4475 pwd via a shell. Instead, ensure that the absolute name of the
4476 pwd binary consists solely of reasonable characters.
4477 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
4478 clean-up code isn't run.
4480 * NEWS: Add a line for 6.5-cvs.
4481 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
4483 2006-10-22 Jim Meyering <jim@meyering.net>
4487 * NEWS: Record the 6.4 release date.
4488 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4490 * Makefile.maint: Complete the adaptation to function with a working
4491 directory that is using git (rather than cvs) for version control.
4493 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4495 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
4496 * tests/cp/cp-parents: Likewise.
4497 * tests/mkdir/parents: Likewise.
4498 * tests/mkdir/perm: Likewise.
4500 * tests/sample-test: Quote variables containing absolute build
4501 tree paths. In the cleanup trap, make sure `cd' succeeds before
4502 `chmod'ing and `rm'ing the temporary files.
4503 * tests/chgrp/basic: Likewise.
4504 * tests/chgrp/deref: Likewise.
4505 * tests/chgrp/no-x: Likewise.
4506 * tests/chgrp/posix-H: Likewise.
4507 * tests/chgrp/recurse: Likewise.
4508 * tests/chmod/c-option: Likewise.
4509 * tests/chmod/equal-x: Likewise.
4510 * tests/chmod/equals: Likewise.
4511 * tests/chmod/inaccessible: Likewise.
4512 * tests/chmod/no-x: Likewise.
4513 * tests/chmod/octal: Likewise.
4514 * tests/chmod/setgid: Likewise.
4515 * tests/chmod/umask-x: Likewise.
4516 * tests/chmod/usage: Likewise.
4517 * tests/chown/basic: Likewise.
4518 * tests/chown/deref: Likewise.
4519 * tests/chown/separator: Likewise.
4520 * tests/cp/acl: Likewise.
4521 * tests/cp/backup-1: Likewise.
4522 * tests/cp/backup-dir: Likewise.
4523 * tests/cp/backup-is-src: Likewise.
4524 * tests/cp/cp-HL: Likewise.
4525 * tests/cp/cp-deref: Likewise.
4526 * tests/cp/cp-i: Likewise.
4527 * tests/cp/cp-mv-backup: Likewise.
4528 * tests/cp/cp-parents: Likewise.
4529 * tests/cp/deref-slink: Likewise.
4530 * tests/cp/dir-rm-dest: Likewise.
4531 * tests/cp/dir-slash: Likewise.
4532 * tests/cp/dir-vs-file: Likewise.
4533 * tests/cp/fail-perm: Likewise.
4534 * tests/cp/into-self: Likewise.
4535 * tests/cp/link: Likewise.
4536 * tests/cp/link-no-deref: Likewise.
4537 * tests/cp/link-preserve: Likewise.
4538 * tests/cp/no-deref-link1: Likewise.
4539 * tests/cp/no-deref-link2: Likewise.
4540 * tests/cp/no-deref-link3: Likewise.
4541 * tests/cp/perm: Likewise.
4542 * tests/cp/preserve-2: Likewise.
4543 * tests/cp/r-vs-symlink: Likewise.
4544 * tests/cp/same-file: Likewise.
4545 * tests/cp/slink-2-slink: Likewise.
4546 * tests/cp/sparse: Likewise.
4547 * tests/cp/special-bits: Likewise.
4548 * tests/cp/src-base-dot: Likewise.
4549 * tests/cp/symlink-slash: Likewise.
4550 * tests/dd/not-rewound: Likewise.
4551 * tests/dd/skip-seek2: Likewise.
4552 * tests/dd/unblock-sync: Likewise.
4553 * tests/du/2g: Likewise.
4554 * tests/du/8gb: Likewise.
4555 * tests/du/basic: Likewise.
4556 * tests/du/deref: Likewise.
4557 * tests/du/deref-args: Likewise.
4558 * tests/du/exclude: Likewise.
4559 * tests/du/fd-leak: Likewise.
4560 * tests/du/hard-link: Likewise.
4561 * tests/du/inaccessible-cwd: Likewise.
4562 * tests/du/long-from-unreadable: Likewise.
4563 * tests/du/long-sloop: Likewise.
4564 * tests/du/no-deref: Likewise.
4565 * tests/du/no-x: Likewise.
4566 * tests/du/restore-wd: Likewise.
4567 * tests/du/slash: Likewise.
4568 * tests/du/slink: Likewise.
4569 * tests/du/trailing-slash: Likewise.
4570 * tests/du/two-args: Likewise.
4571 * tests/fmt/long-line: Likewise.
4572 * tests/install/basic-1: Likewise.
4573 * tests/install/create-leading: Likewise.
4574 * tests/install/d-slashdot: Likewise.
4575 * tests/install/trap: Likewise.
4576 * tests/ln/misc: Likewise.
4577 * tests/ln/target-1: Likewise.
4578 * tests/ls/color-dtype-dir: Likewise.
4579 * tests/ls/dangle: Likewise.
4580 * tests/ls/dired: Likewise.
4581 * tests/ls/file-type: Likewise.
4582 * tests/ls/follow-slink: Likewise.
4583 * tests/ls/infloop: Likewise.
4584 * tests/ls/inode: Likewise.
4585 * tests/ls/m-option: Likewise.
4586 * tests/ls/no-arg: Likewise.
4587 * tests/ls/recursive: Likewise.
4588 * tests/ls/rt-1: Likewise.
4589 * tests/ls/stat-dtype: Likewise.
4590 * tests/ls/stat-failed: Likewise.
4591 * tests/ls/stat-vs-dirent: Likewise.
4592 * tests/misc/cat-proc: Likewise.
4593 * tests/misc/close-stdout: Likewise.
4594 * tests/misc/csplit: Likewise.
4595 * tests/misc/date-sec: Likewise.
4596 * tests/misc/false-status: Likewise.
4597 * tests/misc/head-c: Likewise.
4598 * tests/misc/head-pos: Likewise.
4599 * tests/misc/mknod: Likewise.
4600 * tests/misc/nl: Likewise.
4601 * tests/misc/nohup: Likewise.
4602 * tests/misc/pathchk1: Likewise.
4603 * tests/misc/printf: Likewise.
4604 * tests/misc/printf-hex: Likewise.
4605 * tests/misc/pwd-long: Likewise.
4606 * tests/misc/shuf: Likewise.
4607 * tests/misc/sort-rand: Likewise.
4608 * tests/misc/split-a: Likewise.
4609 * tests/misc/split-fail: Likewise.
4610 * tests/misc/split-l: Likewise.
4611 * tests/misc/stat-fmt: Likewise.
4612 * tests/misc/tac-continue: Likewise.
4613 * tests/misc/wc-files0: Likewise.
4614 * tests/mkdir/concurrent-1: Likewise.
4615 * tests/mkdir/p-1: Likewise.
4616 * tests/mkdir/p-2: Likewise.
4617 * tests/mkdir/p-3: Likewise.
4618 * tests/mkdir/p-slashdot: Likewise.
4619 * tests/mkdir/p-thru-slink: Likewise.
4620 * tests/mkdir/p-v: Likewise.
4621 * tests/mkdir/parents: Likewise.
4622 * tests/mkdir/perm: Likewise.
4623 * tests/mkdir/t-slash: Likewise.
4624 * tests/mv/acl: Likewise.
4625 * tests/mv/atomic: Likewise.
4626 * tests/mv/backup-dir: Likewise.
4627 * tests/mv/childproof: Likewise.
4628 * tests/mv/diag: Likewise.
4629 * tests/mv/dir-file: Likewise.
4630 * tests/mv/dir2dir: Likewise.
4631 * tests/mv/dup-source: Likewise.
4632 * tests/mv/hard-2: Likewise.
4633 * tests/mv/hard-3: Likewise.
4634 * tests/mv/hard-4: Likewise.
4635 * tests/mv/hard-link-1: Likewise.
4636 * tests/mv/hard-verbose: Likewise.
4637 * tests/mv/i-2: Likewise.
4638 * tests/mv/i-3: Likewise.
4639 * tests/mv/i-4: Likewise.
4640 * tests/mv/i-5: Likewise.
4641 * tests/mv/i-link-no: Likewise.
4642 * tests/mv/into-self-4: Likewise.
4643 * tests/mv/leak-fd: Likewise.
4644 * tests/mv/mv-special-1: Likewise.
4645 * tests/mv/no-target-dir: Likewise.
4646 * tests/mv/part-fail: Likewise.
4647 * tests/mv/part-hardlink: Likewise.
4648 * tests/mv/part-rename: Likewise.
4649 * tests/mv/part-symlink: Likewise.
4650 * tests/mv/partition-perm: Likewise.
4651 * tests/mv/perm-1: Likewise.
4652 * tests/mv/reply-no: Likewise.
4653 * tests/mv/trailing-slash: Likewise.
4654 * tests/mv/update: Likewise.
4655 * tests/od/od-N: Likewise.
4656 * tests/od/x8: Likewise.
4657 * tests/readlink/can-e: Likewise.
4658 * tests/readlink/can-f: Likewise.
4659 * tests/readlink/can-m: Likewise.
4660 * tests/readlink/rl-1: Likewise.
4661 * tests/rm/cycle: Likewise.
4662 * tests/rm/dangling-symlink: Likewise.
4663 * tests/rm/deep-1: Likewise.
4664 * tests/rm/dir-no-w: Likewise.
4665 * tests/rm/dir-nonrecur: Likewise.
4666 * tests/rm/dot-rel: Likewise.
4667 * tests/rm/empty-inacc: Likewise.
4668 * tests/rm/f-1: Likewise.
4669 * tests/rm/fail-2eperm: Likewise.
4670 * tests/rm/hash: Likewise.
4671 * tests/rm/i-1: Likewise.
4672 * tests/rm/i-no-r: Likewise.
4673 * tests/rm/ignorable: Likewise.
4674 * tests/rm/inaccessible: Likewise.
4675 * tests/rm/interactive-always: Likewise.
4676 * tests/rm/interactive-once: Likewise.
4677 * tests/rm/ir-1: Likewise.
4678 * tests/rm/isatty: Likewise.
4679 * tests/rm/no-give-up: Likewise.
4680 * tests/rm/r-1: Likewise.
4681 * tests/rm/r-2: Likewise.
4682 * tests/rm/r-3: Likewise.
4683 * tests/rm/r-4: Likewise.
4684 * tests/rm/readdir-bug: Likewise.
4685 * tests/rm/rm1: Likewise.
4686 * tests/rm/rm2: Likewise.
4687 * tests/rm/rm3: Likewise.
4688 * tests/rm/rm4: Likewise.
4689 * tests/rm/rm5: Likewise.
4690 * tests/rm/sunos-1: Likewise.
4691 * tests/rm/unread2: Likewise.
4692 * tests/rm/unread3: Likewise.
4693 * tests/rmdir/fail-perm: Likewise.
4694 * tests/rmdir/t-slash: Likewise.
4695 * tests/shred/exact: Likewise.
4696 * tests/shred/remove: Likewise.
4697 * tests/sum/sysv: Likewise.
4698 * tests/tail-2/append-only: Likewise.
4699 * tests/tail-2/assert: Likewise.
4700 * tests/tail-2/assert-2: Likewise.
4701 * tests/tail-2/big-4gb: Likewise.
4702 * tests/tail-2/fflush: Likewise.
4703 * tests/tail-2/infloop-1: Likewise.
4704 * tests/tail-2/proc-ksyms: Likewise.
4705 * tests/tail-2/start-middle: Likewise.
4706 * tests/tail-2/tail-n0f: Likewise.
4707 * tests/tee/basic: Likewise.
4708 * tests/tee/dash: Likewise.
4709 * tests/touch/fail-diag: Likewise.
4710 * tests/touch/no-create-missing: Likewise.
4711 * tests/touch/not-owner: Likewise.
4712 * tests/touch/obsolescent: Likewise.
4713 * tests/touch/read-only: Likewise.
4714 * tests/touch/relative: Likewise.
4716 2006-10-21 Jim Meyering <jim@meyering.net>
4718 * NEWS: (cp --backup fix): Fix a typo.
4720 * .gitignore: Remove some references to files in subdirectories.
4721 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
4722 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
4724 * src/copy.c (copy_internal): Add a comment saying why we prefer
4727 Enable an fts optimization (call lstat only for directories,
4728 on some file system types) also with the --preserve-root option
4730 * src/chown-core.c (change_file_owner): Compare fts_statp-based
4731 dev/ino against root dev/ino only for directories.
4732 (chown_files): Don't let the root_dev_ino setting influence whether
4733 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
4735 2006-10-20 Jim Meyering <jim@meyering.net>
4737 * src/od.c (usage): Change description of default to use "-w16",
4738 not the now-invalid "-w 16" syntax. From Dan Jacobson.
4740 2006-10-19 Jim Meyering <jim@meyering.net>
4742 * bootstrap: Add names to each .gitignore file (if it exists)
4743 as well as to .cvsignore.
4745 * Makefile.maint (po-check): This rule didn't detect the new use
4746 of "gettext" (as opposed to the use of "_" everywhere else) in
4747 lib/xstrtol.h. Adjust the grep regexp so that now it does.
4749 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
4751 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
4752 when opening dst_name.
4753 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
4754 (SYSCALL) to test for failure in a system call.
4756 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
4757 a fifo. This preserves the special mode bits on Solaris 10, which
4758 is compatible with what Solaris 10 cp -R does.
4760 * src/copy.c (copy_internal): Remove redundant and confusing local
4763 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
4764 7777. This matches historical 'cp' behavior and avoids some
4765 (though not all) implementation-defined behavior of mkdir.
4766 * src/cp.c (make_dir_parents_private): Likewise.
4767 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
4768 than 777. This is required by POSIX. It doesn't make any difference
4769 in actual behavior on any host that I know of.
4771 2006-10-17 Jim Meyering <jim@meyering.net>
4773 * src/dd.c (usage): Use two spaces (not one) to separate the
4774 "fdatasync" option string from its description, so help2man formats
4775 the derived man page properly. Reported by Samuel Thibault
4776 in <http://bugs.debian.org/393649>.
4778 2006-10-16 Jim Meyering <jim@meyering.net>
4780 * .x-sc_trailing_blank: Remove names of files that are no longer
4783 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
4785 * src/groups.sh (version): Reword message to match the other programs.
4786 Problem reported by Eric Blake.
4788 2006-10-14 Jim Meyering <jim@meyering.net>
4790 * Makefile.maint (headers_with_interesting_macro_defs): Define.
4791 (.re-defmac, sc_always_defined_macros): New rules.
4793 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
4794 Instead, include "exit.h". This hereby retires the work-around for
4795 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
4797 * src/cksum.c (uint_fast32_t): Don't define.
4798 Instead, include <stdint.h>.
4800 * src/pinky.c (S_IWGRP): Don't define.
4801 It's already defined by "stat-macros.h" (included via system.h).
4803 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
4804 * Makefile.maint: Likewise, remove these targets/rules/variables:
4805 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
4806 (cvs_files, wget-update, automake_repo): Likewise.
4807 Move the comment about cvsu to build-aux/vc-list-files,
4808 where cvsu is actually used.
4810 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
4812 Work also when the working directory (with e.g. coreutils sources)
4813 is version controlled with git, rather than CVS.
4814 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
4816 In messages and comments, say e.g., "checked-out sources",
4817 rather than "CVS sources".
4818 (version_controlled_file): New function. Work for git as well as
4819 for CVS. Don't use grep's -q option.
4820 (slurp): Call it here, in place of CVS-specific code.
4822 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
4824 * src/copy.c (copy_internal): Although we do create a backup of each
4825 destination directory when in move mode, don't do that when copying.
4826 Reported by Peter Breitenlohner, in
4827 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
4828 * tests/cp/backup-dir: New file. Test for the above.
4829 * tests/cp/Makefile.am (TESTS): Add backup-dir.
4831 2006-10-13 Jim Meyering <jim@meyering.net>
4833 More chown/chgrp dereferencing-related fixes.
4834 * src/chown-core.c (change_file_owner): Don't use fts_statp if
4835 we're dereferencing symlinks.
4836 Reverse conjuncts, so that we use dereference file_stats
4837 (aka ent->fts_statp) only *after* we've confirmed that
4838 chopt->affect_symlink_referent is true. Otherwise, we might
4839 use ent->fts_statp uninitialized.
4840 Don't turn on FTS_NOSTAT when dereferencing symlinks.
4841 * tests/chown/deref: Update the expected diagnostic, now that
4842 this test case (trying to use "chown --dereference ..." on a
4843 dangling symlink) takes a different code path.
4845 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
4847 Sync from Bison, as follows:
4849 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
4851 Fix problems with translating English-language diagnostics.
4852 * bootstrap: Fix bug introduced in recent bootstrap changes, with
4853 respect to bison-runtime pot generation. The YY_ stuff
4854 wasn't being captured.
4856 2006-10-13 Jim Meyering <jim@meyering.net>
4858 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
4859 now that we're using fts_open with FTS_CWDFD.
4860 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
4861 chgrp, to exercise the above fix.
4862 * NEWS: Mention the above.
4864 * src/du-tests: Clean up a little, though it's still not portable.
4866 * .vg-suppressions: Add 3 more for debian unstable.
4868 * tests/ls/Test.pm: Remove long-unused file.
4869 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
4870 Suggestions from Bruno Haible.
4872 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4874 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
4875 (MAINTAINERCLEANFILES): Add .kludge-stamp.
4876 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
4877 instead of $(man_MANS).
4879 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4881 * configure.ac: Avoid compiler warnings about default return
4882 type in function definitions and unused variables in tests.
4883 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
4884 if this is #defined.
4886 2006-10-12 Jim Meyering <jim@meyering.net>
4888 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
4889 Call gl_INIT directly, rather than through the above.
4891 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4893 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
4894 variable was sometimes used without being initialized. This
4895 messed up the installation of the INSTALL file in some cases.
4897 2006-10-11 Jim Meyering <jim@meyering.net>
4899 * src/ls.c (usage): Correct description of -s, --size.
4900 It works even without -l. Suggestion from Karl Berry.
4902 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
4904 * src/ls.c (quote_name): Use initializer rather than memset to
4905 initialize an object to zero. This is easier to read and is less
4906 likely to introduce a runtime error due to a mixup. It causes
4907 gcc -W to issue a warning, but you can work around this by
4908 appending -Wno-missing-field-initializers.
4909 * src/pathchk.c (portable_chars_only): Likewise.
4910 * src/shred.c (main): Likewise.
4911 * src/stty.c (main): Likewise.
4912 * src/tr.c (card_of_complement): Likewise.
4913 * src/wc.c (wc): Likewise.
4915 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4917 * src/sort.c (usage): Mention again that sort fields are origin 1.
4919 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
4922 * bootstrap (usage, main program, symlink_to_gnulib): Add option
4923 --copy. Inspired by a suggestion from Bruno Haible.
4925 2006-10-09 Jim Meyering <jim@meyering.net>
4927 Avoid a compiler warning.
4928 * src/pathchk.c (portable_chars_only): Initialize variable of type
4929 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
4931 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
4933 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
4934 wrong file name in some cases. Lars Wendler reported a bug in
4936 * src/install.c (make_ancestor): New arg COMPONENT.
4937 * src/mkdir.c (make_ancestor): Likewise.
4938 * tests/install/basic-1: Check for install -Dv bug.
4939 * tests/mkdir/Makefile.am (TESTS): Add p-v.
4940 * tests/mkdir/p-v: New file, to test this bug.
4942 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
4944 * src/chgrp.c: Don't include lchown.h; no longer needed.
4945 * src/chown.c: Likewise.
4947 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
4948 current file system has useful d_type info.
4950 * src/dd.c (flags): noatime and nofollow now depend on
4951 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
4952 (usage): Output info about noatime and nofollow only if
4953 they are known to work.
4954 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
4955 than O_NOFOLLOW, when testing whether it's possible to avoid a
4956 race condition reliably.
4958 2006-10-05 Jim Meyering <jim@meyering.net>
4960 * src/c99-to-c89.diff: Update to reflect new offsets.
4962 * tests/install/basic-1: Skip the latter part of this test if the
4963 just-built dd binary is not readable. Otherwise, this test would fail
4964 when binaries were created as root. Reported by Bauke Jan Douma in
4965 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
4967 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
4969 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
4970 MiB, since XFS hosts can legitimately have large values of
4971 st_blksize. Problem reported by Tony Ernst in
4972 <http://savannah.gnu.org/bugs/?17903>.
4974 2006-10-04 Jim Meyering <jim@meyering.net>
4976 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
4977 Paul Eggert pointed out that the specified file may exist,
4978 in spite of such an errno value.
4979 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
4980 * tests/rm/ignore-name-too-long: Remove file.
4981 * NEWS: Update here, too.
4983 2006-10-03 Jim Meyering <jim@meyering.net>
4985 * tests/rm/fail-eperm: Report failure also if rm is terminated by
4988 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
4989 and one in shred.c -- that were added before coreutils-6.3.
4990 Reported by Michael Deutschmann.
4992 * src/c99-to-c89.diff: Update to reflect new offsets.
4994 * src/remove.c (remove_entry): With -f, exit successfully in spite
4995 of a missing file under some very unusual conditions (with errno
4996 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
4998 With --force (-f), rm no longer fails for ENOTDIR.
4999 * src/remove.c (ignorable_missing): New function.
5000 Use it everywhere, rather than open-coding the test.
5001 Andreas Schwab reported the ENOTDIR problem.
5002 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
5004 * NEWS: Mention the bug fix.
5005 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
5006 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
5007 * tests/rm/Makefile.am (TESTS): Add the new file names.
5009 * bootstrap: Undo last change to this file, since now gnulib-tool
5010 sticks with the automake default in generating dependencies.
5012 * NEWS: Add a line for 6.4-cvs.
5013 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
5015 2006-09-30 Jim Meyering <jim@meyering.net>
5018 * NEWS: Record the 6.3 release date.
5019 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
5021 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
5023 * src/c99-to-c89.diff: Update offsets.
5025 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5027 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
5028 as it doesn't work with Solaris /bin/sh.
5030 2006-09-29 Jim Meyering <jim@meyering.net>
5032 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
5035 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
5036 use .1 as the increment. Actual output varies too much.
5037 [eq-wid-3]: New, commented out test.
5039 * src/shuf.c (read_input): Fix an off-by-one error that
5040 would cause an infloop for piped input of 8KB or more.
5041 * NEWS: Mention the fix.
5042 * tests/misc/shuf: Test for the above fix.
5044 Since any system may be affected by the Darwin readdir bug,
5045 perform the extra rewinddir unconditionally. The performance
5046 impact of rewinding a directory is negligible.
5047 * src/remove.c (NEED_REWIND): Define to use
5048 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
5050 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
5051 increment translates to a slightly larger value.
5052 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
5053 The final expected value wasn't being printed.
5055 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
5056 and NFS, whereby rm would not remove all files in a directory.
5057 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
5058 (NEED_REWIND): New macro, so that we incur the cost of the work-around
5059 rewinddir only on afflicted systems.
5060 * NEWS: Clarify and correct.
5061 * tests/rm/readdir-bug: New file. Test for the above fix.
5062 * tests/rm/Makefile.am (TESTS): Add it.
5063 Prompted by testing and analysis from Bruno Haible:
5064 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
5066 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
5068 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
5069 suggested for Debian stable, which uses Perl 5.8.4.
5071 2006-09-28 Jim Meyering <jim@meyering.net>
5073 Automatically generated dependencies are important even
5074 when all of the sources in a directory come from gnulib.
5075 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5076 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5078 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
5079 Ensure that IFS is set properly and unset PATH.
5081 Work properly even when the name of the selected file starts with "-".
5082 Invoke rm via "../../src/rm", and adjust expected output.
5083 Prompted by a patch from Tim Waugh.
5085 * README-cvs: Add Bison to the list of required packages.
5087 2006-09-26 Jim Meyering <jim@meyering.net>
5089 * src/c99-to-c89.diff: Update offsets.
5091 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
5092 it from removing a directory containing 188 or more entries.
5093 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
5094 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
5095 Reported by Matthew Woehlke.
5097 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
5099 * NEWS: "groups user" no longer outputs "user :"; you need at least
5100 two users. "groups" now processes options like --help more compatibly.
5101 * src/groups.sh: Implement the option-processing change.
5102 Handle user and group names with special characters more robustly.
5103 Report write errors instead of exiting silently with status 1.
5105 2006-09-26 Jim Meyering <jim@meyering.net>
5107 * README: Warn not to run autoreconf manually. Use bootstrap instead.
5109 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
5110 Rewrite to avoid using temporary, $status.
5112 * NEWS: Mention the bug fix.
5113 * src/groups.sh: Don't hide a write failure.
5114 Reported by Iain Calder <ic56@rogers.com>.
5116 2006-09-25 Jim Meyering <jim@meyering.net>
5118 * src/chown.c (usage): Clarify --dereference description.
5119 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
5121 2006-09-24 Jim Meyering <jim@meyering.net>
5123 * NEWS: Mention these fixes.
5124 * src/copy.c (copy_reg): With --verbose (-v), print
5125 "removed `file_name'" just after unlinking a file.
5126 (copy_internal): Likewise, in three more places.
5127 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
5128 * tests/mv/hard-verbose: New file. Test for the above fix.
5129 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
5131 * tests/help-version (sync_args): Don't call sync, since it spins up
5132 disks that I've deliberately caused to spin down (but not unmounted).
5134 * NEWS: Mention the improvement to sort.
5136 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
5137 as well as existing.
5139 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
5140 since that predated addition of d_type support.
5142 2006-09-23 Jim Meyering <jim@meyering.net>
5144 * gl/modules/getloadavg.diff: New file. Work around the way the latest
5145 version of the getloadavg module interacts with our bootstrap script.
5146 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5147 * Makefile.am (EXTRA_DIST): Sort file names.
5148 Add bootstrap and gl/modules/getloadavg.diff
5150 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5152 * bootstrap: Add support for --force.
5153 (usage): New function. Describe usage less tersely.
5154 (CVS_only_file): New var.
5156 * NEWS: Document fix for cp -i and mv -i.
5157 * src/copy.c (copy_internal): With -i, prompt even if the source
5158 is a directory and the destination is not. This is required by
5159 POSIX and gives the user a chance to bail out before failing.
5160 * tests/cp/Makefile.am (TESTS): Add cp-i.
5161 * tests/cp/cp-i: New file.
5162 * tests/mv/Makefile.am (TESTS): Add i-5.
5163 * tests/mv/i-5: New file.
5165 2006-09-20 Jim Meyering <jim@meyering.net>
5167 * NEWS: Mention the chmod bug fix.
5169 * tests/chmod/inaccessible: New test, specifically for this bug.
5170 Based on a test case from Paul Eggert.
5171 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
5173 Fix the 2006-09-18 bug differently.
5174 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
5175 tell fts_read to stat the file again, in case it has become
5176 accessible since the initial fts_open call.
5177 * src/chown-core.c (change_file_owner): Likewise.
5179 * src/chmod.c: Revert last change. There is a better way.
5180 * src/chown-core.c: Likewise.
5182 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
5184 * src/ln.c (target_directory_operand): Rewrite to avoid porting
5185 problem on Tandem reported by Matthew Woehlke in
5186 <https://savannah.gnu.org/bugs/?17172>.
5188 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5190 Fix bug where chmod, chown, and chgrp did not process operands
5191 left-to-right in some cases.
5192 * src/chmod.c (wd_errno): New var.
5193 (chmod_file): New function, with most of the contents of the
5194 old prcess_file function.
5195 (process_files): Use it. This gives file names to fts one
5196 at a time, so that they are processed left-to-right as POSIX
5198 * src/chown-core.c (wd_errno, chown_files): Likewise.
5199 (chown_file): New function.
5200 * tests/install/basic-1: Redo test so as to not workaround
5201 the chmod bug, thereby testing for it.
5203 * src/shuf.c (main): Quote the entire range when reporting an
5204 invalid one, rather than just the part that contained the error.
5206 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
5207 sometimes left behind if the test is skipped or interrupted.
5209 * bootstrap (symlink_to_gnulib): New function.
5210 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5211 to copies-of-gnulib.
5212 (cp_mark_as_generated, slurp, gnulib_files):
5213 Avoid making a copy if it's the same as the old version.
5214 (gnulib_files): Add support for this variable (used by Bison).
5216 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
5217 indicating flaw in kernel. Reword to say that the flaw isn't
5218 serious for coreutils, since the flaw does affect ls -i.
5220 * tests/chgrp/basic: Fix bug in test case exposed by building on
5221 Solaris 8 in a setgid directory. The test case incorrectly
5222 assumed that 'symlink' would be in group $g1.
5224 2006-09-18 Jim Meyering <jim@meyering.net>
5226 * NEWS: Add a line for 6.3-cvs.
5227 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
5230 * NEWS: Record the 6.2 release date.
5231 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
5233 2006-09-17 Jim Meyering <jim@meyering.net>
5235 * tests/chgrp/basic: On an OpenBSD system, rather than failing
5236 due to a known problem, merely warn about it.
5237 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
5238 Instead, use stat to test file system for desired results, directly.
5239 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
5241 * tests/envvar-check: Add more variable names to the list of those
5242 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
5243 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
5245 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
5247 * NEWS: Document that mkdir -p and install -d now fork on occasion.
5248 * bootstrap.conf (gnulib_modules): Add savewd.
5249 * src/install.c: Include savewd.h.
5250 (process_dir): New function.
5251 (main, install_file_in_file_parents): Use it, along with the new
5252 savewd module, to avoid some race conditions.
5253 * src/mkdir.c: Include savewd.h.
5254 (struct mkdir_options): New members make_ancestor_function, mode,
5256 (make_ancestor): Return 1 if the resulting directory is not readable.
5257 (process_dir): New function.
5258 (main): Use it, along with new savewd module, to avoid some
5259 race conditions. Fill in new slots of struct mkdir_options, so
5260 that callees get the values.
5261 * tests/install/basic-1: Test for coreutils 5.97 bug that was
5262 fixed in coreutils 6.0, and which should still be fixed with
5264 * tests/mkdir/p-3: Likewise.
5266 2006-09-15 Jim Meyering <jim@meyering.net>
5268 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
5269 The 2006-09-08 changes made it so "mv dir new-name/" would
5270 fail on NetBSD 1.6. This makes it work once again.
5272 2006-09-14 Jim Meyering <jim@meyering.net>
5274 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
5275 Instead, since it's a little fragile, assert the condition.
5276 (target_directory_operand): Update comment to reflect latest change.
5278 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5280 * src/who.c (print_user): Rewrite to avoid warning from
5281 GCC 4.1.1 with -Wall.
5283 2006-09-12 Jim Meyering <jim@meyering.net>
5285 * tests/mv/atomic: Check for specific strace output, rather than
5286 simply nonempty. RHEL AS 4 would fail this test due to strace
5287 generating "[ Process PID=14434 runs in 32 bit mode. ]".
5288 Reported by Nelson Beebe.
5290 2006-09-11 Jim Meyering <jim@meyering.net>
5292 * src/remove.c (remove_dir): Move new cache_stat_init call onto
5294 (rm_1): Move declaration of "st" and new cache_stat_init call
5295 "down" to nearer where they're used.
5296 * src/c99-to-c89.diff: Add another set of curly braces.
5298 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
5300 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
5301 substr's last operand is very large. Performance problem reported
5304 2006-09-09 Jim Meyering <jim@meyering.net>
5306 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
5308 (sc_require_config_h): Skip this test if there are no version-
5309 controlled .c files.
5310 (sc_prohibit_assert_without_use): Likewise.
5312 2006-09-08 Jim Meyering <jim@meyering.net>
5314 * bootstrap: Export CVS_RSH separate from its assignment, to work
5315 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
5317 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
5319 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
5320 no file operand is given, and standard input is any FIFO.
5321 This is in response to Open Group XCU ERN 114.
5322 * src/tail.c (main): Likewise.
5324 2006-09-08 Jim Meyering <jim@meyering.net>
5326 mv and "cp -r" no longer fail when invoked with two arguments
5327 where the first one names a directory and the second name ends in
5328 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
5329 now succeeds, once more. This reverts part of the 2004-06-27
5331 * NEWS: Say the above.
5332 * src/mv.c (target_directory_operand): Don't require (here)
5333 that the target operand "look like" a directory. This change
5334 pushes the test down to the rename syscall level, where a
5335 "mv dir existing-non-dir/" will mistakenly succeed on older systems
5336 that ignore trailing slashes in the rename destination argument.
5337 * src/cp.c (target_directory_operand): Likewise, but for cp.
5338 * tests/mv/trailing-slash: Exercise the above fixes.
5339 * tests/cp/trailing-slash: New file.
5340 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
5342 * bootstrap: Use the previously unused variable, $src,
5343 to avoid repeating "$GNULIB_SRCDIR/$file".
5345 * bootstrap (cp_mark_as_generated): Don't use "local", to
5346 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
5347 Rename now-global "$src" and "$dst" to have cp_ prefix.
5348 Safer, and avoids confusion.
5350 * bootstrap (cp_mark_as_generated): New function.
5351 (slurp): Use it to prepend editor hints and a warning that
5352 the file we're copying is generated.
5353 Suggestion from Bruce Korb.
5354 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
5355 Fix last-minute typo.
5357 2006-09-07 Jim Meyering <jim@meyering.net>
5359 * bootstrap: Revert last change. There are less disruptive ways
5360 to mark these generated files as read-only.
5362 * src/c99-to-c89.diff: Update to have proper offsets.
5364 2006-09-06 Jim Meyering <jim@meyering.net>
5366 Ensure that some gnulib-tool-generated files are read-only.
5367 * bootstrap (slurp): Put the body of this function in a sub-shell,
5368 with "umask a-w" so that all new files are read-only. Remove each
5369 file before we write to it, in case it's read-only.
5370 Make po/Makevars and runtime-po/Makevars read-only, too.
5372 2006-09-05 Jim Meyering <jim@meyering.net>
5374 * tests/cp/acl: Skip this test when cp lacks ACL support.
5375 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
5377 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
5378 context from change of 2006-09-02.
5380 2006-09-04 Jim Meyering <jim@meyering.net>
5382 * README-cvs: Fix typo in update command.
5384 2006-09-03 Jim Meyering <jim@meyering.net>
5386 * NEWS: Tweak the wording in the new change description so that
5387 no one can think this change causes e.g., `rm -fr foo../' to fail.
5389 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
5390 Use $CONFIG_HEADER, rather than hard-coding it.
5391 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
5393 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
5395 * NEWS: rm now rejects attempts to remove /, ./, and ../.
5396 * src/basename.c: Don't include dirname.h, since system.h does it now.
5397 * src/chmod.c: Likewise.
5398 * src/copy.c: Likewise.
5399 * src/cp.c: Likewise.
5400 * src/df.c: Likewise.
5401 * src/dircolors.c: Likewise.
5402 * src/dirname.c: Likewise.
5403 * src/du.c: Likewise.
5404 * src/install.c: Likewise.
5405 * src/ln.c: Likewise.
5406 * src/ls.c: Likewise.
5407 * src/mkdir.c: Likewise.
5408 * src/mv.c: Likewise.
5409 * src/remove.c: Likewise.
5410 * src/rm.c: Likewise.
5411 * src/rmdir.c: Likewise.
5412 * src/shred.c: Likewise.
5413 * src/split.c: Likewise.
5414 * src/su.c: Likewise.
5415 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
5417 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
5419 * src/rm.c (usage, main): --preserve-root is now the default.
5420 * src/remove.h: Fix comment.
5421 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
5422 (cache_statted, cache_stat_ok): New functions.
5423 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
5424 which is no longer needed with the new functions. All callers
5426 (prompt, is_dir_lstat, remove_entry, remove_dir):
5427 New struct stat * arg. All callers changed.
5428 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
5429 (remove_cwd_entries, remove_dir, rm_1):
5430 Use and maintain the file status cache.
5431 (prompt, remove_entry): Omit the first "directory" in the diagnostic
5432 "Cannot remove directory `foo': is a directory". This causes "rm"
5433 to pass a test case that it would otherwise fail now that it
5434 "knows" more about its argument. I think the diagnostic is better
5435 without the first "directory" anyway.
5436 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
5437 (rm_1): Reject attempts to remove /, ./, or ../.
5438 * tests/rm/Makefile.am (TESTS): Add r-4.
5439 * tests/rm/r-4: New file.
5441 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
5443 * src/stat.c: Include <stddef.h>
5444 (alignof): New macro.
5445 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
5447 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
5449 (print_statfs): If f_fsid isn't an integer, grab its words one
5450 at a time in little-endian order. This is a bit easier to configure
5451 and should avoid a compilation failure on MacOS reported by Bruno
5454 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
5456 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
5457 work around a Mac OS X porting problem reported by Bruno Haible in
5458 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
5459 (print_statfs): Use them.
5461 * bootstrap.conf (gnulib_modules): Add isapipe.
5462 * src/tail.c: Include isapipe.h.
5463 (IS_PIPE_LIKE_FILE_TYPE): Remove.
5464 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
5465 tailable, since this seems to be portable.
5466 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
5467 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
5469 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
5472 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
5474 * src/copy.c (copy_internal): Don't test whether macros like
5475 S_ISLNK are defined, since they're always defined now.
5476 * src/cp.c (main): Likewise.
5477 * src/ln.c (main): Likewise.
5478 * src/ls.c (get_link_name, make_link_name): Likewise.
5479 * src/mknod.c (main): Likewise.
5480 * src/mkfifo.c (usage): Likewise.
5481 * src/who.c (S_IWGRP): Likewise.
5483 Adjust to recent gnulib changes for the gnulib module.
5484 * bootstrap.conf (gnulib_modules): Add fcntl.
5485 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
5486 is already assuming these macros are defined.
5487 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
5488 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
5489 Remove; the fcntl module now handles these.
5491 Adjust to recent gnulib changes for the inttypes module.
5492 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
5493 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
5495 * src/system.h: Don't bother to include <stdint.h>, since we can
5496 now assume inttypes.h does the equivalent of including stdint.h.
5498 2006-08-27 Jim Meyering <jim@meyering.net>
5500 * src/copy.c (copy_internal): Don't make a backup if the last
5501 component of the source name is "." or "..".
5502 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
5503 * NEWS: Mention this.
5504 * tests/cp/src-base-dot: New file. Test for the above fix.
5505 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
5507 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
5508 (dot_or_dotdot): ...new static inline function.
5509 * src/remove.c (rm_1): Reflect this renaming.
5510 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
5512 * src/copy.c (copy_internal): Add comments.
5514 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
5516 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
5517 since Automake supplies them for us. It always did -I$(srcdir),
5518 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
5519 is now also doing -I../lib.
5521 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
5522 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
5523 since there might not be any .po files.
5524 (WGET_COMMAND): Set to empty if wget doesn't
5525 seem to be available.
5527 2006-08-26 Jim Meyering <jim@meyering.net>
5529 This test was failing in some environments.
5530 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
5531 to set LS_COLORS in the environment.
5532 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
5533 Reported by Bob Proulx.
5535 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
5537 * Makefile.am (EXTRA_DIST): Remove these files here, too:
5538 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
5539 .x-sc_two_space_separator_in_usage.
5541 Fix "mv --verbose --backup" so its output includes the
5542 " (backup: foo.~1~)" suffix also when backing up a directory.
5543 * NEWS: Report this bug fix.
5544 * src/copy.c (emit_verbose): New function, factored out of...
5545 (copy_internal): ...here. Use the new function.
5546 * tests/mv/backup-dir: Test for the above fix.
5547 * tests/mv/Makefile.am (TESTS): Add backup-dir.
5549 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
5551 * .x-sc_no_if_have_config_h: Remove; no longer needed.
5552 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
5553 * .x-sc_two_space_separator_in_usage: Likewise.
5554 * Makefile.maint (sc_no_have_config_h): Renamed from
5555 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
5556 is absent everywhere.
5557 * bootstrap.conf (gnulib_modules): Add config-h.
5558 * src/shred.c: Include <config.h> unconditionally, since
5559 we now assume config.h exists.
5560 * src/dircolors.c: Likewise.
5562 2006-08-26 Jim Meyering <jim@meyering.net>
5564 "ls --color" would highlight other-writable and sticky directories
5565 no differently than regular directories on a file system with
5566 dirent.d_type support.
5567 * NEWS: Say the above.
5568 * src/ls.c (gobble_file): With --color, also stat the file when
5569 we know it is a directory.
5570 Derived from an anonymous one-line fix and bug report:
5571 <http://savannah.gnu.org/bugs/?15043>.
5572 * tests/ls/color-dtype-dir: New file. Test for the above fix.
5573 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
5575 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
5577 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
5579 * bootstrap.conf: Add configmake, verify.
5580 * src/.cvsignore: Remove localedir.h.
5581 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
5582 subsumed by configmake.
5583 * src/system.h: Include configmake.h rather than localedir.h
5584 (LOCALEDIR): New macro.
5586 Rewrite to avoid some unnecessary casts, macros, literals.
5587 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
5589 (SECTOR_SIZE, SECTOR_MASK): New constants.
5590 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
5591 and use the SECTOR_* constants when applicable. Check for size <
5592 0 rather than size == -1, since negative-size files are a sign of
5595 2006-08-25 Bruno Haible <bruno@clisp.org>
5597 * src/shred.c (dopass): Assume a continuable error if EIO even
5598 if the current position is not a multiple of 512.
5600 2006-08-24 Jim Meyering <jim@meyering.net>
5602 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
5604 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
5606 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
5607 macro was being used without being defined.
5608 (SB_F_NAMEMAX): Remove cast.
5609 (f_fsid) [BeOS]: Likewise.
5610 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
5612 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
5614 (xstrcat): Remove. All uses changed to use the above functions.
5615 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
5616 buffer len. All uses changed. Output '?', not '*', for unknown
5617 data or errors. Do not assume signed values can be interchanged
5618 with unsigned when printing.
5619 (print_statfs): For %i, print the fsid as a single int, not as a
5621 (print_it): Quote invalid format better.
5623 * NEWS: printf supports the I flag.
5624 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
5626 2006-08-23 Bruno Haible <bruno@clisp.org>
5628 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
5629 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
5630 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
5632 * src/ls.c (SA_RESTART): Fallback define.
5634 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
5636 * src/system.h (EDQUOT): Define if not already defined.
5637 Problem reported by Bruno Haible for BeOS.
5639 * .cvsignore: Remove config.h, config.hin, as they are now
5641 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
5643 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
5645 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
5646 to accommodate today's gnulib change.
5648 2006-08-23 Jim Meyering <jim@meyering.net>
5650 * NEWS: Mention the sweeping infrastructure changes.
5652 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
5654 * bootstrap.conf (gnulib_modules): Add gnupload.
5655 * Makefile.maint (emit_upload_commands): gnupload is now
5657 * gnupload: Remove from CVS, since it's now a gnulib module.
5659 * bootstrap (bootstrap_conf_cleanup): Remove.
5660 (excluded_files): New var.
5661 * bootstrap.conf: Likewise.
5662 * bootstrap (slurp): Exclude files early if they're in the
5663 excluded_files list. That way, their names don't get put into
5666 * aclocal.m4, config.hin, configure:
5667 Remove from CVS, since ./bootstrap generates them automatically.
5668 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
5669 configure, *.cache, *.lineno, *.log.
5670 Remove more-specific entries. This catches files like configure.lineno.
5671 * man/.cvsignore: Add Makefile.in.
5672 * src/.cvsignore: Add Makefile.in.
5673 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
5676 * tests/chgrp/.cvsignore:
5677 * tests/chmod/.cvsignore:
5678 * tests/chown/.cvsignore:
5679 * tests/cp/.cvsignore:
5680 * tests/cut/.cvsignore:
5681 * tests/dd/.cvsignore:
5682 * tests/dircolors/.cvsignore:
5683 * tests/du/.cvsignore:
5684 * tests/expr/.cvsignore:
5685 * tests/factor/.cvsignore:
5686 * tests/fmt/.cvsignore:
5687 * tests/head/.cvsignore:
5688 * tests/install/.cvsignore:
5689 * tests/join/.cvsignore:
5690 * tests/ln/.cvsignore:
5691 * tests/ls/.cvsignore:
5692 * tests/ls-2/.cvsignore:
5693 * tests/md5sum/.cvsignore:
5694 * tests/misc/.cvsignore:
5695 * tests/mkdir/.cvsignore:
5696 * tests/mv/.cvsignore:
5697 * tests/od/.cvsignore:
5698 * tests/pr/.cvsignore:
5699 * tests/readlink/.cvsignore:
5700 * tests/rm/.cvsignore:
5701 * tests/rmdir/.cvsignore:
5702 * tests/seq/.cvsignore:
5703 * tests/sha1sum/.cvsignore:
5704 * tests/shred/.cvsignore:
5705 * tests/sort/.cvsignore:
5706 * tests/stty/.cvsignore:
5707 * tests/sum/.cvsignore:
5708 * tests/tac/.cvsignore:
5709 * tests/tail/.cvsignore:
5710 * tests/tail-2/.cvsignore:
5711 * tests/tee/.cvsignore:
5712 * tests/test/.cvsignore:
5713 * tests/touch/.cvsignore:
5714 * tests/tr/.cvsignore:
5715 * tests/tsort/.cvsignore:
5716 * tests/unexpand/.cvsignore:
5717 * tests/uniq/.cvsignore:
5718 * tests/wc/.cvsignore:
5719 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
5720 *.X, *.O, *-tests, build-script, mk-script if they're never
5721 created in this directory.
5723 2006-08-22 Bruno Haible <bruno@clisp.org>
5726 * src/uptime.c: Include OS.h if it exists.
5727 (print_uptime): On BeOS, use the get_system_info function (actually a
5728 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
5729 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
5731 2006-08-22 Jim Meyering <jim@meyering.net>
5733 * .cvsignore: Add ABOUT-NLS.
5735 Move the check-AUTHORS rule to be run as part of "make distcheck",
5736 rather than "make check".
5737 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
5738 cause "make check" to fail on systems unable to build all binaries.
5739 * Makefile.maint (check-AUTHORS): New rule.
5740 (local-checks-available): Add it here.
5741 Reported by Bruno Haible. Needed for BeOS.
5743 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
5745 * src/df.c (print_header, show_dev): Use a column width that
5746 depends on the block size of -P is specified and not autoscaling.
5747 Problem reported by Gustavo G. Rondina in:
5748 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
5750 2006-08-21 Jim Meyering <jim@meyering.net>
5752 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
5753 when the shell variable, SHELL, is not set.
5754 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
5755 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
5757 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
5758 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
5759 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
5760 od: invalid type string `u8';
5761 this system doesn't provide a 8-byte integral type
5762 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
5764 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
5766 Add a bootstrap procedure, so that the CVS version contains fewer
5767 files and we bootstrap the rest from gnulib, gettext, etc.
5768 * README-cvs: New file.
5769 * bootstrap: New file.
5770 * bootstrap.conf: New file.
5771 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
5772 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
5774 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
5775 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
5777 (gl_MACROS): Call just after gl_EARLY, just for clarity.
5778 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
5779 * src/kill.c (strtoimax): Remove decl.
5780 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
5781 * src/wc.c: Likewise.
5782 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
5783 declaration, so that we don't need to patch this file.
5784 * src/printf.c (strtoimax, strtoumax): Remove decls.
5785 * src/su.c: Include getpass.h.
5787 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
5788 Include inttypes.h unconditionally.
5789 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
5790 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
5791 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
5792 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
5793 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
5795 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
5796 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
5797 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
5798 * tests/cp/Makefile.in, tests/cut/Makefile.in:
5799 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
5800 * tests/du/Makefile.in, tests/expr/Makefile.in:
5801 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
5802 * tests/general/Makefile.in, tests/head/Makefile.in:
5803 * tests/install/Makefile.in, tests/join/Makefile.in:
5804 * tests/ln/Makefile.in, tests/ls/Makefile.in:
5805 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
5806 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
5807 * tests/mv/Makefile.in, tests/od/Makefile.in:
5808 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
5809 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
5810 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
5811 * tests/shred/Makefile.in, tests/sort/Makefile.in:
5812 * tests/stty/Makefile.in, tests/sum/Makefile.in:
5813 * tests/tac/Makefile.in, tests/tail/Makefile.in:
5814 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
5815 * tests/test/Makefile.in, tests/touch/Makefile.in:
5816 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
5817 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
5818 * tests/wc/Makefile.in:
5819 Remove from CVS, since ./bootstrap generates them automatically.
5821 2006-08-20 Eric Blake <ebb9@byu.net>
5823 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
5824 the patch from 2006-08-18 broke on cygwin.
5826 2006-08-20 Jim Meyering <jim@meyering.net>
5828 * NEWS: Add a line for 6.2-cvs.
5829 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
5831 2006-08-19 Jim Meyering <jim@meyering.net>
5834 * NEWS: Record the 6.1 release date.
5835 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
5837 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
5839 Avoid test failure when `make check' is run through debuild.
5840 * tests/help-version: Ensure that $SHELL is set to some value
5841 and exported. Patch from Sven Joachim. For details, see
5842 <http://bugs.debian.org/355368>.
5844 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
5846 * README: Describe potential "pre-C99 build failure", and work-around.
5848 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
5849 backed out due to updates provoked by the copyright changes.
5850 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
5851 it propagates to the derived Makefile.am files.
5852 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
5853 so we don't mistakenly edit them again.
5854 * tests/cut/Makefile.am: Regenerate.
5855 * tests/head/Makefile.am: Likewise.
5856 * tests/join/Makefile.am: Likewise.
5857 * tests/pr/Makefile.am: Likewise.
5858 * tests/sort/Makefile.am: Likewise.
5859 * tests/tac/Makefile.am: Likewise.
5860 * tests/tail/Makefile.am: Likewise.
5861 * tests/test/Makefile.am: Likewise.
5862 * tests/tr/Makefile.am: Likewise.
5863 * tests/uniq/Makefile.am: Likewise.
5864 * tests/wc/Makefile.am: Likewise.
5866 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
5867 when the file's apparent size is not a multiple of its block size.
5868 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
5869 For some file sizes, writing that single byte would unnecessarily
5870 waste a few file blocks. That write may have been necessary in the
5871 early days of Linux, but now, removing it should be safe.
5872 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
5873 * tests/cp/sparse: New test for the above.
5874 * tests/cp/Makefile.am (TESTS): Add sparse.
5876 * tests/sparse-file: New file, essence factored out of...
5877 * tests/du/8gb: ... here. Use the new script.
5879 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
5881 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
5882 the CVS gettext manual now suggests 1000000.
5884 2006-08-18 Bruno Haible <bruno@clisp.org>
5886 Add support for NetBSD 3.0.
5887 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
5889 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
5890 has a field f_fstypename.
5891 This undoes the 2006-08-15 to src/stat.c.
5893 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
5895 Copyright notice fixes.
5897 * COPYING: Upgrade to latest version from FSF.
5899 * src/uname.c: Use (C) in copyright notice.
5901 * .vg-suppressions: Add copyright notice.
5902 * ChangeLog: Likewise.
5903 * ChangeLog-2005: Likewise.
5904 * Makefile.am: Likewise.
5907 * README-valgrind: Likewise.
5909 * announce-gen: Likewise.
5910 * man/Makefile.am: Likewise.
5911 * man/chmod.x: Likewise.
5912 * man/chown.x: Likewise.
5913 * man/df.x: Likewise.
5914 * man/du.x: Likewise.
5915 * man/rm.x: Likewise.
5916 * src/dircolors.hin: Likewise.
5917 * src/du-tests: Likewise.
5918 * src/extract-magic: Likewise.
5919 * src/tac-pipe.c: Likewise.
5920 * src/wheel-gen.pl: Likewise.
5921 * tests/Coreutils.pm: Likewise.
5922 * tests/Makefile.am.in: Likewise.
5923 * tests/acl: Likewise.
5924 * tests/envvar-check: Likewise.
5925 * tests/expensive: Likewise.
5926 * tests/group-names: Likewise.
5927 * tests/help-version: Likewise.
5928 * tests/mk-script: Likewise.
5929 * tests/priv-check: Likewise.
5930 * tests/rwx-to-mode: Likewise.
5931 * tests/sample-test: Likewise.
5932 * tests/setgid-check: Likewise.
5933 * tests/chgrp/basic: Likewise.
5934 * tests/chgrp/deref: Likewise.
5935 * tests/chgrp/no-x: Likewise.
5936 * tests/chgrp/posix-H: Likewise.
5937 * tests/chgrp/recurse: Likewise.
5938 * tests/chmod/c-option: Likewise.
5939 * tests/chmod/equal-x: Likewise.
5940 * tests/chmod/equals: Likewise.
5941 * tests/chmod/no-x: Likewise.
5942 * tests/chmod/octal: Likewise.
5943 * tests/chmod/setgid: Likewise.
5944 * tests/chmod/umask-x: Likewise.
5945 * tests/chmod/usage: Likewise.
5946 * tests/chown/basic: Likewise.
5947 * tests/chown/deref: Likewise.
5948 * tests/chown/separator: Likewise.
5949 * tests/cp/Makefile.am: Likewise.
5950 * tests/cp/acl: Likewise.
5951 * tests/cp/backup-1: Likewise.
5952 * tests/cp/backup-is-src: Likewise.
5953 * tests/cp/cp-HL: Likewise.
5954 * tests/cp/cp-deref: Likewise.
5955 * tests/cp/cp-mv-backup: Likewise.
5956 * tests/cp/cp-parents: Likewise.
5957 * tests/cp/deref-slink: Likewise.
5958 * tests/cp/dir-rm-dest: Likewise.
5959 * tests/cp/dir-slash: Likewise.
5960 * tests/cp/dir-vs-file: Likewise.
5961 * tests/cp/fail-perm: Likewise.
5962 * tests/cp/into-self: Likewise.
5963 * tests/cp/link: Likewise.
5964 * tests/cp/link-no-deref: Likewise.
5965 * tests/cp/link-preserve: Likewise.
5966 * tests/cp/no-deref-link1: Likewise.
5967 * tests/cp/no-deref-link2: Likewise.
5968 * tests/cp/no-deref-link3: Likewise.
5969 * tests/cp/perm: Likewise.
5970 * tests/cp/preserve-2: Likewise.
5971 * tests/cp/r-vs-symlink: Likewise.
5972 * tests/cp/same-file: Likewise.
5973 * tests/cp/slink-2-slink: Likewise.
5974 * tests/cp/special-bits: Likewise.
5975 * tests/cp/symlink-slash: Likewise.
5976 * tests/cut/Makefile.am: Likewise.
5977 * tests/cut/Test.pm: Likewise.
5978 * tests/dd/misc: Likewise.
5979 * tests/dd/not-rewound: Likewise.
5980 * tests/dd/skip-seek: Likewise.
5981 * tests/dd/skip-seek2: Likewise.
5982 * tests/dd/unblock-sync: Likewise.
5983 * tests/dircolors/simple: Likewise.
5984 * tests/du/2g: Likewise.
5985 * tests/du/8gb: Likewise.
5986 * tests/du/Makefile.am: Likewise.
5987 * tests/du/basic: Likewise.
5988 * tests/du/deref: Likewise.
5989 * tests/du/deref-args: Likewise.
5990 * tests/du/exclude: Likewise.
5991 * tests/du/fd-leak: Likewise.
5992 * tests/du/files0-from: Likewise.
5993 * tests/du/hard-link: Likewise.
5994 * tests/du/inaccessible-cwd: Likewise.
5995 * tests/du/long-from-unreadable: Likewise.
5996 * tests/du/long-sloop: Likewise.
5997 * tests/du/no-deref: Likewise.
5998 * tests/du/no-x: Likewise.
5999 * tests/du/restore-wd: Likewise.
6000 * tests/du/slash: Likewise.
6001 * tests/du/slink: Likewise.
6002 * tests/du/trailing-slash: Likewise.
6003 * tests/du/two-args: Likewise.
6004 * tests/expr/basic: Likewise.
6005 * tests/factor/basic: Likewise.
6006 * tests/fmt/basic: Likewise.
6007 * tests/fmt/long-line: Likewise.
6008 * tests/general/Makefile.am: Likewise.
6009 * tests/general/atgeneral.m4: Likewise.
6010 * tests/general/dd.at: Likewise.
6011 * tests/head/Makefile.am: Likewise.
6012 * tests/head/Test.pm: Likewise.
6013 * tests/install/basic-1: Likewise.
6014 * tests/install/create-leading: Likewise.
6015 * tests/install/d-slashdot: Likewise.
6016 * tests/install/trap: Likewise.
6017 * tests/join/Makefile.am: Likewise.
6018 * tests/join/Test.pm: Likewise.
6019 * tests/ln/backup-1: Likewise.
6020 * tests/ln/misc: Likewise.
6021 * tests/ln/sf-1: Likewise.
6022 * tests/ln/target-1: Likewise.
6023 * tests/ls/Makefile.am: Likewise.
6024 * tests/ls/Test.pm: Likewise.
6025 * tests/ls/dangle: Likewise.
6026 * tests/ls/dired: Likewise.
6027 * tests/ls/file-type: Likewise.
6028 * tests/ls/follow-slink: Likewise.
6029 * tests/ls/infloop: Likewise.
6030 * tests/ls/inode: Likewise.
6031 * tests/ls/m-option: Likewise.
6032 * tests/ls/no-arg: Likewise.
6033 * tests/ls/recursive: Likewise.
6034 * tests/ls/rt-1: Likewise.
6035 * tests/ls/stat-dtype: Likewise.
6036 * tests/ls/stat-failed: Likewise.
6037 * tests/ls/stat-vs-dirent: Likewise.
6038 * tests/ls/symlink-slash: Likewise.
6039 * tests/ls/time-1: Likewise.
6040 * tests/ls-2/tests: Likewise.
6041 * tests/md5sum/basic-1: Likewise.
6042 * tests/md5sum/newline-1: Likewise.
6043 * tests/misc/Makefile.am: Likewise.
6044 * tests/misc/base64: Likewise.
6045 * tests/misc/basename: Likewise.
6046 * tests/misc/cat-proc: Likewise.
6047 * tests/misc/close-stdout: Likewise.
6048 * tests/misc/csplit: Likewise.
6049 * tests/misc/date: Likewise.
6050 * tests/misc/date-sec: Likewise.
6051 * tests/misc/df: Likewise.
6052 * tests/misc/dirname: Likewise.
6053 * tests/misc/expand: Likewise.
6054 * tests/misc/false-status: Likewise.
6055 * tests/misc/fold: Likewise.
6056 * tests/misc/head-c: Likewise.
6057 * tests/misc/head-elide-tail: Likewise.
6058 * tests/misc/head-pos: Likewise.
6059 * tests/misc/mknod: Likewise.
6060 * tests/misc/nice: Likewise.
6061 * tests/misc/nl: Likewise.
6062 * tests/misc/nohup: Likewise.
6063 * tests/misc/paste-no-nl: Likewise.
6064 * tests/misc/pathchk1: Likewise.
6065 * tests/misc/printf: Likewise.
6066 * tests/misc/printf-hex: Likewise.
6067 * tests/misc/pwd-long: Likewise.
6068 * tests/misc/sha224sum: Likewise.
6069 * tests/misc/sha256sum: Likewise.
6070 * tests/misc/sha384sum: Likewise.
6071 * tests/misc/sha512sum: Likewise.
6072 * tests/misc/shuf: Likewise.
6073 * tests/misc/sort-merge: Likewise.
6074 * tests/misc/sort-rand: Likewise.
6075 * tests/misc/split-a: Likewise.
6076 * tests/misc/split-fail: Likewise.
6077 * tests/misc/split-l: Likewise.
6078 * tests/misc/stat-fmt: Likewise.
6079 * tests/misc/stat-printf: Likewise.
6080 * tests/misc/tac-continue: Likewise.
6081 * tests/misc/test-diag: Likewise.
6082 * tests/misc/tty-eof: Likewise.
6083 * tests/misc/wc-files0: Likewise.
6084 * tests/misc/wc-files0-from: Likewise.
6085 * tests/mkdir/concurrent-1: Likewise.
6086 * tests/mkdir/p-1: Likewise.
6087 * tests/mkdir/p-2: Likewise.
6088 * tests/mkdir/p-3: Likewise.
6089 * tests/mkdir/p-slashdot: Likewise.
6090 * tests/mkdir/p-thru-slink: Likewise.
6091 * tests/mkdir/parents: Likewise.
6092 * tests/mkdir/perm: Likewise.
6093 * tests/mkdir/special-1: Likewise.
6094 * tests/mkdir/t-slash: Likewise.
6095 * tests/mkdir/writable-under-readonly: Likewise.
6096 * tests/mv/Makefile.am: Likewise.
6097 * tests/mv/acl: Likewise.
6098 * tests/mv/atomic: Likewise.
6099 * tests/mv/backup-is-src: Likewise.
6100 * tests/mv/childproof: Likewise.
6101 * tests/mv/diag: Likewise.
6102 * tests/mv/dir-file: Likewise.
6103 * tests/mv/dir2dir: Likewise.
6104 * tests/mv/dup-source: Likewise.
6105 * tests/mv/force: Likewise.
6106 * tests/mv/hard-2: Likewise.
6107 * tests/mv/hard-3: Likewise.
6108 * tests/mv/hard-4: Likewise.
6109 * tests/mv/hard-link-1: Likewise.
6110 * tests/mv/i-1: Likewise.
6111 * tests/mv/i-2: Likewise.
6112 * tests/mv/i-3: Likewise.
6113 * tests/mv/i-4: Likewise.
6114 * tests/mv/i-link-no: Likewise.
6115 * tests/mv/into-self: Likewise.
6116 * tests/mv/into-self-2: Likewise.
6117 * tests/mv/into-self-3: Likewise.
6118 * tests/mv/into-self-4: Likewise.
6119 * tests/mv/leak-fd: Likewise.
6120 * tests/mv/mv-special-1: Likewise.
6121 * tests/mv/no-target-dir: Likewise.
6122 * tests/mv/part-fail: Likewise.
6123 * tests/mv/part-hardlink: Likewise.
6124 * tests/mv/part-rename: Likewise.
6125 * tests/mv/part-symlink: Likewise.
6126 * tests/mv/partition-perm: Likewise.
6127 * tests/mv/perm-1: Likewise.
6128 * tests/mv/reply-no: Likewise.
6129 * tests/mv/setup: Likewise.
6130 * tests/mv/to-symlink: Likewise.
6131 * tests/mv/trailing-slash: Likewise.
6132 * tests/mv/update: Likewise.
6133 * tests/mv/vfat: Likewise.
6134 * tests/od/od-N: Likewise.
6135 * tests/od/x8: Likewise.
6136 * tests/pr/Makefile.am: Likewise.
6137 * tests/pr/Test.pm: Likewise.
6138 * tests/readlink/can-e: Likewise.
6139 * tests/readlink/can-f: Likewise.
6140 * tests/readlink/can-m: Likewise.
6141 * tests/readlink/rl-1: Likewise.
6142 * tests/rm/Makefile.am: Likewise.
6143 * tests/rm/cycle: Likewise.
6144 * tests/rm/dangling-symlink: Likewise.
6145 * tests/rm/deep-1: Likewise.
6146 * tests/rm/dir-no-w: Likewise.
6147 * tests/rm/dir-nonrecur: Likewise.
6148 * tests/rm/dot-rel: Likewise.
6149 * tests/rm/empty-inacc: Likewise.
6150 * tests/rm/empty-name: Likewise.
6151 * tests/rm/f-1: Likewise.
6152 * tests/rm/fail-2eperm: Likewise.
6153 * tests/rm/fail-eperm: Likewise.
6154 * tests/rm/hash: Likewise.
6155 * tests/rm/i-1: Likewise.
6156 * tests/rm/i-no-r: Likewise.
6157 * tests/rm/inaccessible: Likewise.
6158 * tests/rm/interactive-always: Likewise.
6159 * tests/rm/interactive-once: Likewise.
6160 * tests/rm/ir-1: Likewise.
6161 * tests/rm/isatty: Likewise.
6162 * tests/rm/no-give-up: Likewise.
6163 * tests/rm/r-1: Likewise.
6164 * tests/rm/r-2: Likewise.
6165 * tests/rm/r-3: Likewise.
6166 * tests/rm/rm1: Likewise.
6167 * tests/rm/rm2: Likewise.
6168 * tests/rm/rm3: Likewise.
6169 * tests/rm/rm4: Likewise.
6170 * tests/rm/rm5: Likewise.
6171 * tests/rm/sunos-1: Likewise.
6172 * tests/rm/unread2: Likewise.
6173 * tests/rm/unread3: Likewise.
6174 * tests/rm/unreadable: Likewise.
6175 * tests/rmdir/fail-perm: Likewise.
6176 * tests/rmdir/ignore: Likewise.
6177 * tests/rmdir/t-slash: Likewise.
6178 * tests/seq/basic: Likewise.
6179 * tests/sha1sum/basic-1: Likewise.
6180 * tests/sha1sum/sample-vec: Likewise.
6181 * tests/shred/exact: Likewise.
6182 * tests/shred/remove: Likewise.
6183 * tests/sort/Makefile.am: Likewise.
6184 * tests/sort/Test.pm: Likewise.
6185 * tests/sort-time/Makefile: Likewise.
6186 * tests/sort-time/README: Likewise.
6187 * tests/sort-time/rand-gen: Likewise.
6188 * tests/stty/basic-1: Likewise.
6189 * tests/stty/row-col-1: Likewise.
6190 * tests/sum/basic-1: Likewise.
6191 * tests/sum/sysv: Likewise.
6192 * tests/tac/Makefile.am: Likewise.
6193 * tests/tac/Test.pm: Likewise.
6194 * tests/tail/Makefile.am: Likewise.
6195 * tests/tail/Test.pm: Likewise.
6196 * tests/tail-2/Makefile.am: Likewise.
6197 * tests/tail-2/append-only: Likewise.
6198 * tests/tail-2/assert: Likewise.
6199 * tests/tail-2/assert-2: Likewise.
6200 * tests/tail-2/big-4gb: Likewise.
6201 * tests/tail-2/fflush: Likewise.
6202 * tests/tail-2/infloop-1: Likewise.
6203 * tests/tail-2/proc-ksyms: Likewise.
6204 * tests/tail-2/start-middle: Likewise.
6205 * tests/tail-2/tail-n0f: Likewise.
6206 * tests/tee/basic: Likewise.
6207 * tests/tee/dash: Likewise.
6208 * tests/test/Makefile.am: Likewise.
6209 * tests/test/Test.pm: Likewise.
6210 * tests/touch/Makefile.am: Likewise.
6211 * tests/touch/dangling-symlink: Likewise.
6212 * tests/touch/empty-file: Likewise.
6213 * tests/touch/fail-diag: Likewise.
6214 * tests/touch/fifo: Likewise.
6215 * tests/touch/no-create-missing: Likewise.
6216 * tests/touch/no-rights: Likewise.
6217 * tests/touch/not-owner: Likewise.
6218 * tests/touch/obsolescent: Likewise.
6219 * tests/touch/read-only: Likewise.
6220 * tests/touch/relative: Likewise.
6221 * tests/tr/Makefile.am: Likewise.
6222 * tests/tr/Test.pm: Likewise.
6223 * tests/tr/failures: Likewise.
6224 * tests/tsort/basic-1: Likewise.
6225 * tests/unexpand/basic-1: Likewise.
6226 * tests/uniq/Makefile.am: Likewise.
6227 * tests/uniq/Test.pm: Likewise.
6228 * tests/wc/Makefile.am: Likewise.
6229 * tests/wc/Test.pm: Likewise.
6231 2006-08-17 Jim Meyering <jim@meyering.net>
6233 ls -CF would misalign columns in some cases.
6234 * src/ls.c (get_type_indicator): New function. extracted from...
6235 (print_type_indicator): ...here. Use it.
6236 (length_of_file_name_and_frills): Use it here, too, rather than
6237 assuming stat.st_mode is valid.
6238 Reported by Andreas Schwab, here:
6239 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
6240 See the test for this above. FYI, I did ls -CF /proc and visually
6241 inspected the result.
6243 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
6244 to mention the now-removed cp_options.xstat member.
6246 * Makefile.maint (patch-check): Adapt to work now that the patch
6247 modifies more than one file in src/.
6249 With this patch, permit building with Solaris cc on Solaris 7.
6250 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
6251 This integrates patches from Bruno Haible.
6253 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
6255 Fix some problems reported by Bruno Haible.
6256 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
6257 Skip this test if "chmod g+s d" silently does nothing.
6258 * tests/ls-2/tests: Skip this test suite if we can't set up files
6259 properly for the setuid-etc test. This simplifies some of the
6260 hacks we were using to work around porting problems.
6262 2006-08-16 Jim Meyering <jim@meyering.net>
6264 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
6265 * tests/cp/acl: Instead, skip the test if either setfacl
6267 Reported by Michael Stone.
6269 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
6271 * tests/lang-default (LC_ALL): Set to "C", so we get
6272 English-language diagnostics. Unset the other variables; it
6273 should be portable to use 'unset' for this stuff nowadays.
6274 Problem reported by Bruno Haible. Using "C" reverses the
6275 2000-10-22 change to fileutils in this area.
6277 Fix bugs when printing plurals of numbers that are not
6278 unsigned long int values.
6279 * src/system.h (select_plural): New function.
6280 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
6281 * src/uptime.c (print_uptime): Likewise.
6282 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
6283 print a floating point number, as reducing to 0 or 1 doesn't work
6284 for some languages. Instead, just use "s" for seconds since it
6285 doesn't need a plural form.
6287 2006-08-16 Bruno Haible <bruno@clisp.org>
6289 Old versions of gzip would write --help output to stderr, and it
6290 would be annoying to see that in the output of every "make" command.
6291 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
6294 2006-08-16 Andreas Schwab <schwab@suse.de>
6296 * tests/cp/acl: Don't use non-portable == operator for test.
6298 2006-08-16 Jim Meyering <jim@meyering.net>
6300 * tests/ls/stat-dtype: Use stat to test file system type, rather
6301 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
6303 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
6305 * NEWS: Mention that df exits with nonzero status if it generates
6306 no output. This change was in 6.0 but inadvertently unmentioned.
6307 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
6309 (show_dev): Don't set it until we actually output something.
6310 Print the header if this is the first output.
6311 (main): Don't print a header, as that is now show_dev's job.
6312 * tests/misc/Makefile.am (TESTS): Add df.
6313 * tests/misc/df: New file.
6315 2006-08-15 Eric Blake <ebb9@byu.net>
6317 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
6318 statvfs.f_type not present. See
6319 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
6321 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
6323 * src/dd.c (print_stats): Don't substitute "1" for number, as this
6324 causes confusion for the Hungarian translators. Problem reported
6325 by Egmont Koblinger here:
6326 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
6328 2006-08-15 Jim Meyering <jim@meyering.net>
6330 * .x-sc_require_config_h: Add lib/at-func.c.
6332 * NEWS: Add a line for 6.1-cvs.
6333 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
6335 2006-08-15 Jim Meyering <jim@meyering.net>
6338 * NEWS: Record the 6.0 release date.
6339 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
6341 * TODO: Add an item (convert to use gnulib-tool), add to the plan
6342 for id-vs-getgrouplist, and remove a few completed items.
6344 * Makefile.maint (alpha beta major): Fix syntax error.
6346 2006-08-13 Jim Meyering <jim@meyering.net>
6348 * src/shred.c (usage): Don't indent the second line of an item.
6349 Otherwise, help2man would misformat the output.
6350 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
6352 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6354 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
6355 Suggested by Eric Blake to avoid problems like
6356 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
6358 2006-08-11 Jim Meyering <jim@meyering.net>
6360 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
6361 failure that this test checks for (stat/dirent inode mismatch at
6362 a mount point), so continue to give a diagnostic about the failure,
6363 but don't actually count it as a failure.
6365 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
6367 * ABOUT-NLS: Update from gettext 0.15.
6368 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
6370 * src/csplit.c (struct control): Remove fastmap member.
6371 (extract_regexp): Allocate fastmap separately, since otherwise
6372 it might move due to a realloc. This fixes a bug that led
6373 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
6375 2006-08-10 Jim Meyering <jim@meyering.net>
6377 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
6378 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
6379 Redirect both stdout and stderr of df invocations.
6381 * src/dircolors.hin: Add a TERM directive for each of the following:
6382 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
6383 rxvt-cygwin-native, screen.linux, xterm-256color.
6384 Sort the TERM directives.
6385 From Mike Frysinger.
6387 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
6389 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
6390 See Debian bug 373736.
6392 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
6395 * src/.cvsignore: Add shuf.
6397 * Makefile.maint: Remove the po-update procedure; it doesn't
6398 work with the new repository on http://www.iro.umontreal.ca/.
6399 For now I guess we'll have to fix things by hand.
6400 (do-po-update, po-update): Remove. All references removed.
6402 * src/shuf.c (next_line): New function.
6403 (read_input): Use it, to avoid relying on GCC-specific behavior
6404 with void * arithmetic. Problem reported by Bob Proulx.
6405 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
6406 to detect this sort of problem automatically in the future.
6408 2006-08-09 Jim Meyering <jim@meyering.net>
6410 * src/ls.c: Add a compile-time check to ensure that filetype
6411 and filetype_letter have the same number of elements.
6413 * tests/misc/sort-rand: Remove use of --seed=S.
6415 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
6417 Add a command 'shuf', and modify shred and sort to use the new
6418 random number generator library of 'shuf'.
6420 * AUTHORS: Add shuf.
6422 * NEWS: Likewise. Mention new --random-source option for shred
6423 and sort. Move "sort +1 -2" notice to the appropriate section,
6424 and clarify its role with respect to POSIXLY_CORRECT.
6425 * man/.cvsignore: Add shuf.1.
6426 * man/Makefile.am (dist_man_MANS): Add shuf.1.
6427 (shuf.1): New dependency.
6428 * man/shuf.x: New file.
6429 * src/Makefile.am (bin_PROGRAMS): Add shuf.
6430 (EXTRA_DIST): Remove rand-isaac.c.
6431 (shuf_LDADD): New macro.
6432 * src/rand-isaac.c: Remove, moving most of its contents to
6434 * src/shuf.c: New file.
6435 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
6436 Don't include rand-isaac.c; include randint.h and randread.h instead.
6437 (RANDOM_SOURCE_OPTION): New enum.
6438 (long_opts, usage, main): New option --random-source.
6439 * src/sort.c: Likewise.
6440 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
6441 All callers changed to use randint interface.
6442 (fillrand): Remove. All callers changed to use randread interface.
6443 (dopass): Remove dependency on ISAAC buffer size.
6444 (genpattern): Don't wipe the random state here.
6445 (randint_source): New static var.
6446 (clear_random_data): New function.
6447 (main): Allocate random source, and arrange to wipe it on exit.
6448 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
6449 (longopts, usage, main): Remove undocumented --seed option;
6450 it's now replaced by --random-source.
6451 (rand_state, get_hash): Remove.
6452 (randread_source): New static var.
6453 (random_state, cmp_hashes, compare_random): New functions; they guarantee
6454 no collisions in the random hash function.
6455 (keycompare): Use compare_random for -R; don't fall back on comparing
6456 via memcoll, since compare_random does the right thing.
6457 * tests/misc/Makefile.am (TESTS): Add shuf.
6458 * tests/misc/shuf: New file.
6460 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
6462 * src/copy.c (set_author): Preserve the st_author field via the
6463 file descriptor dest_desc.
6465 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
6467 * NEWS: chmod now preserves setuid and setgid bits on directories
6468 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
6470 Fix test case problems if working directory is setgid,
6471 reported by Bob Proulx.
6472 * tests/cp/fail-perm: Use symbolic mode so that we clear
6473 setgid bit more reliably on directories.
6474 * tests/mkdir/special-1 (set_mode_string): Likewise.
6476 2006-07-27 Jim Meyering <jim@meyering.net>
6478 * src/chgrp.c (usage): Use correct grammar in description of the
6480 * src/chown.c (usage): Likewise.
6482 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
6484 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
6485 Correctly access SRC_SB's element ST_AUTHOR.
6487 2006-07-26 Jim Meyering <jim@meyering.net>
6489 * tests/ls/stat-failed: Adapt to match new expected output.
6492 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
6493 than having the code test for all of the other types first.
6494 Hoist the set-uid/gid-testing code "up" into this new block.
6495 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
6496 C_ORPHAN, not as C_FILE.
6498 2006-07-26 Jim Meyering <jim@meyering.net>
6500 Checking in a change from Paul.
6502 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
6504 * src/ls.c (DT_INIT): Remove. All uses removed.
6505 (enum filetype): Use an ordinary enum rather than trying to keep
6506 the values in sync with DT_FIFO etc. That way, we don't have
6507 to make special assumptions about them. All uses changed.
6508 (whiteout): New constant member of enum filetype.
6509 (filetype_letter): New constant, for use with enum filetype.
6510 (FILETYPE_INDICATORS): New initializer list.
6511 (print_dir): Add case for DT_WHT.
6512 (gobble_file): If stat fails, don't discard information from
6513 readdir; instead, preserve it so it can be printed.
6514 (print_long_format): Fall back on readdir result if stat info
6515 is not available. Use "?" to denote each unknown mode char,
6516 instead of an overall "?", since we now know some of the mode
6518 (print_type_indicator): Now that MODE isn't necessarily
6519 useful, guard all uses.
6520 Now that two blocks in the type-checking tree can set "type = C_FILE",
6521 move the suffix-handling code out and down.
6523 2006-07-26 Jim Meyering <jim@meyering.net>
6525 Prepare for the above change.
6526 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
6527 and adjust uses. From a patch by Paul Eggert.
6529 2006-07-26 Jim Meyering <jim@meyering.net>
6531 * src/ls.c: Correct indentation/formatting in a few places.
6533 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
6535 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
6536 Problem report and fix from Bob Proulx.
6537 * NEWS: Clarify the "chmod 0500" news, and correct the vague
6538 statements about compatibility with BSD.
6540 2006-07-25 Jim Meyering <jim@meyering.net>
6542 * src/ls.c (gobble_file): When handling a stat-failed entry,
6543 print the entry name not the absolute_name -- to be consistent
6544 with the usual case.
6545 * tests/ls/stat-failed: Update accordingly.
6547 * src/ls.c: Add parens around the new uses of ?: ternary operator.
6549 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
6552 Get --dired offsets right when handling stat-failed entries.
6553 * src/ls.c (print_long_format): Be careful to increment P by the
6554 appropriate amount, even when inode_number_width and nlink_width
6556 * tests/ls/stat-failed: Test for the above.
6558 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
6559 have_acl member. That would happen for a directory with both a
6560 non-stat'able entry and one with an ACL.
6562 * src/ls.c (gobble_file): Make it so failure to stat a
6563 non-command-line file provokes an exit status of 1, not 0.
6564 Say "cannot access" rather than "cannot stat".
6565 * tests/ls/stat-failed: New file/test, for the above.
6566 * tests/ls/Makefile.am (TESTS): Add stat-failed.
6567 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
6568 of "cannot access " to diagnostic.
6570 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
6572 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
6573 Replace all occurrences of "type == command_line" with the
6574 equivalent, "command_line_arg".
6576 * src/ls.c: Apply the stat-failed parts of Red Hat's
6577 coreutils-selinux.patch. From Ulrich Drepper.
6578 This makes it so files not mentioned on the command line (e.g.,
6579 names read from a directory that *is* mentioned on the command
6580 line) for which stat fails are still listed. With --color,
6581 such files are colored just like ORPHANs (aka dangling symlinks).
6583 * src/df.c (n_valid_args): Declare global to be static.
6585 2006-07-24 Jim Meyering <jim@meyering.net>
6587 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
6588 system lacks d_type support.
6590 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
6592 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
6594 2006-07-21 Jim Meyering <jim@meyering.net>
6596 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
6597 Reported by Tim Waugh.
6598 Also remove the comment duplicating much of --help output.
6600 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
6601 name so the list remains alphabetized.
6603 Fix another bug: ls --indicator-style=file-type would call
6604 stat for a symlink, even though it wasn't always needed.
6605 In some cases, that unnecessary stat would cause ls to fail.
6606 * src/ls.c (gobble_file): Don't treat symlinks specially (in
6607 requiring a stat syscall). Remove the offending exclusion.
6609 * NEWS: Mention the fix.
6611 * tests/ls/stat-dtype: New file/test, for the above fix.
6612 Also exercises the new df feature, below.
6614 * src/df.c (main): Fail and don't print the headers if no
6615 file system is processed. This makes it easy to test whether
6616 a specified directory is on a file system of a given type or types.
6617 Otherwise, applications would have had to parse df's output.
6618 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
6620 Fix a bug: ls --file-type worked like --indicator-style=slash,
6621 rather than like --indicator-style=file-type.
6622 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
6623 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
6625 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
6626 * NEWS: Mention the fix.
6627 * tests/ls-2/tests (file-type): New test, for the above fix.
6629 2006-07-19 Jim Meyering <jim@meyering.net>
6631 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
6633 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
6635 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
6637 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
6638 of directories alone unless you specify them explicitly.
6639 install and mkdir now implement X correctly.
6640 install now creates parent directories with mode 755, without
6641 changing their owner or group.
6642 * src/chmod.c (process_file): Adjust to mode_adjust API change.
6643 * src/install.c: Include mkancesdirs.h.
6644 (announce_mkdir, make_ancestor): New functions.
6645 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
6647 (dir_mode, dir_mode_bits): New vars.
6648 (main): Set dir modes separately from nondir, so that the X
6649 op of -m works correctly.
6650 (main): Remove cwd_errno cruft, since make_dir_parents no longer
6651 affects cwd. Adjust to new make_dir_parents API.
6652 (install_file_in_file_parents): 2nd arg is now char *, not char
6653 const *. Use mkancesdirs instead of rolling our own code.
6654 (change_attributes): Don't worry about AFS, since that kludge
6655 should not be needed any more.
6656 * src/mkdir.c (struct mkdir_options): New struct.
6657 (announce_mkdir, make_ancestor): New functions.
6658 (main): Use them. Adjust to mode_adjust API change. Stick with
6659 umask 0. Use make_dir_parents for all the work.
6660 * src/mkfifo.c (main): Adjust to new mode_adjust API.
6661 * src/mknod.c (main): Likewise.
6662 * tests/chmod/setgid: Do the setgid test instead of bailing.
6663 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
6664 GNU chmod now behaves like other versions of chmod.
6665 * tests/mkdir/perm: Add a test for the X bug.
6667 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
6669 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
6670 This doesn't fix any bugs, since OUT always equals stdout, but it
6671 makes the code easier to understand.
6673 2006-07-14 Jim Meyering <jim@meyering.net>
6675 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
6676 rather than open-coding it. Now supports mercurial, too.
6677 * .hgignore: New file.
6678 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
6679 all generated files, including ones like configure and po/*.po
6680 that are currently version-controlled in cvs.
6682 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
6683 They've been in CVS, just haven't been distributed before this.
6684 Distribute ChangeLog-2005, too.
6685 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
6687 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
6689 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
6692 2006-07-09 Jim Meyering <jim@meyering.net>
6694 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
6695 That happens with Linux/tmpfs.
6696 * tests/mv/Makefile.am (TESTS): Add dir2dir.
6698 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6700 Adjust to recent updates from gnulib.
6701 * src/dd.c (apply_translations): Use toupper rather than
6702 islower followed by toupper; it's simpler and typically
6703 faster now that we assume at least C89 semantics. Similarly
6705 * src/sort.c (inittables): Likewise.
6706 * src/expand.c (expand): Don't assume that isprint etc. return
6707 booleans (needed for pre-C99 hosts).
6708 * src/fmt.c (check_punctuation): Likewise.
6709 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
6710 * src/tr.c (is_char_class_member): Likewise.
6711 * src/unexpand.c (unexpand): Likewise.
6712 * src/join.c (is_blank): Remove; no longer needed. All uses
6713 replaced by isblank (to_uchar (...)).
6714 * src/pinky.c (create_fullname): Don't assume char is unsigned.
6715 * src/printf.c (print_esc): Likewise.
6716 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
6717 (copy_unescaped_string): Likewise.
6718 * src/stat.c (print_it): Likewise.
6719 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
6720 convenience on GNU systems. All uses changed. Don't bother
6721 looking for any dirent.h substitute other than ndir.h.
6722 (D_INO): Remove unnecessary parentheses.
6723 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
6724 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
6725 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
6726 to ctype.h equivalents.
6727 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
6730 2006-07-08 Jim Meyering <jim@meyering.net>
6732 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
6734 * Makefile.maint (sc_the_the): New rule.
6736 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
6737 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
6740 2006-07-07 Jim Meyering <jim@meyering.net>
6742 * NEWS: Mention that mv can now remove an empty destination directory,
6743 and give an example. Prompted by a report from Florent Bayle.
6745 2006-07-05 Jim Meyering <jim@meyering.net>
6747 * src/ls.c (usage): Correct the description of -G: it is useful
6748 only in a long listing. Reported by Martin Pool in
6749 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
6751 * man/chmod.x: Correct the description of the sticky bit. Reported
6752 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
6754 * src/copy.c (copy_internal): Don't work around old NFS clients like
6755 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
6756 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
6757 a banal failure as a recursive move-into-self failure.
6758 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
6760 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
6762 2006-07-03 Jim Meyering <jim@meyering.net>
6764 Plug another unusual leak.
6765 (AD_mark_helper): Free malloc'd filename if hash_insert says
6766 that string is already in the hash table.
6768 The dev/inode of the topmost directory in each hierarchy were not
6770 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
6771 (AD_push): Call it from here instead.
6773 Fix two small leaks.
6774 * src/remove.c (AD_stack_clear): New function.
6776 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
6778 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
6779 Add $VG_PATH_PREFIX as a prefix to $PATH
6781 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
6782 * tests/Makefile.am (evar-check): Remove rule.
6783 (EXTRA_DIST): Remove .env-warn.
6784 * tests/.env-warn: Remove file. No longer used.
6785 Suggestion from Eric Blake.
6787 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
6789 * src/system.h: Include <stdint.h> unconditionally, since we
6790 now assume the stdint module.
6792 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
6794 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
6795 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
6796 * src/tail.c (main): Implement this.
6797 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
6798 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
6800 2006-07-01 Jim Meyering <jim@meyering.net>
6802 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
6804 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
6807 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
6809 * NEWS: seq now uses long double internally rather than double.
6810 It now defaults to a minimal fixed point format if possible.
6811 It lets you use %a, %A, %E, %F, %G.
6812 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
6813 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
6814 (isfinite) [!defined isfinite]: New macro.
6815 (separator, terminator): Now points to const.
6816 (first, step, last): Remove.
6817 (usage): Update to match new behavior.
6818 (struct operand, operand): New type.
6819 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
6821 Compute and return a value of type operand, not double.
6822 (long_double_format): Renamed from valid_format, and now returns a
6823 new format with an "L" added if needed, if the original format was
6824 valid. Allow %a, %A, %E, %F, and %G formats.
6825 (print_numbers): Take numeric values as args rather than from globals.
6826 Print long double, not double.
6827 (get_width_format): Remove.
6828 (get_default_format): New function.
6829 (main): Implement new way of calculating default format.
6830 Don't worry about locale's representation of the decimal point, since
6831 the arguments are always processed in the C locale.
6832 * tests/seq/basic (neg-2): Adjust to new default format.
6833 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
6834 implementation should do the right thing.
6836 2006-06-30 Jim Meyering <jim@meyering.net>
6838 * tests/stty/basic-1: Work around an intermittent test failure
6839 on HP-UX 11.11. Report and analysis from Bob Proulx.
6840 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
6842 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
6844 * NEWS: Support obsolete usages like "sort +1 -2" even when
6845 conforming to POSIX 1003.1-2001, since this is a pure extension to
6846 POSIX. Problem reported by Christian in:
6847 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
6848 * src/sort.c (main): Implement this.
6850 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
6851 Autoconf 2.60 says this stuff was obsolete.
6853 2006-06-28 Jim Meyering <jim@meyering.net>
6855 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
6857 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
6859 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
6860 (set -x when VERBOSE=yes) when stderr is redirected before stdout
6861 causing shell tracing of the stdout redirection to be written to
6862 the stderr file. Avoid problem and test failure on HP-UX by
6863 redirecting stderr last.
6864 * tests/dd/unblock-sync: Order shell file redirections for
6865 stderr and stdout in the common style.
6866 tests/acl: Likewise.
6868 2006-06-27 Jim Meyering <jim@meyering.net>
6870 * tests/misc/cat-proc: Try to avoid any spurious numeric
6871 differences in frequently-changing /proc/cpuinfo.
6872 Reported by Nelson Beebe.
6874 2006-06-26 Jim Meyering <jim@meyering.net>
6876 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
6877 fd_to_subdirp failure, not just when errno == EACCES.
6878 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
6879 rmdir, here, even though rmdir may happen to be adequate.
6881 * NEWS: rm no longer fails to remove an empty, unreadable directory
6882 * src/remove.c (remove_cwd_entries): If we can't open a directory,
6883 and the failure is not being ignored, try to remove the directory
6884 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
6885 Problem report and test case from Paul Eggert in
6886 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
6888 * tests/rm/empty-inacc: New test, for the above.
6890 Avoid a segfault for wc --files0=- < /dev/null.
6891 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
6893 2006-06-25 Jim Meyering <jim@meyering.net>
6895 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
6896 contains a list of NUL-separated file names.
6898 * src/wc.c: Include "readtokens.h".
6899 (usage): Describe the new option, and adjust the `Usage':
6900 with this option, no FILE may be specified on the command line.
6901 (main): Handle the new option.
6902 * tests/misc/wc-files0: New tests, for the above.
6903 * tests/misc/wc-files0-from: Likewise.
6904 * tests/misc/Makefile.am (TESTS): Add wc-files0.
6906 2006-06-24 Jim Meyering <jim@meyering.net>
6908 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
6910 2006-06-22 Jim Meyering <jim@meyering.net>
6912 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
6913 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
6915 2006-06-19 Jim Meyering <jim@meyering.net>
6917 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
6918 so this check is not run as part of "make distcheck".
6920 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
6922 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
6924 2006-06-18 Jim Meyering <jim@meyering.net>
6926 * tests/misc/pwd-long: Make error output a little clearer.
6928 2006-06-17 Jim Meyering <jim@meyering.net>
6930 * tests/rm/inaccessible: Skip this test on systems without openat
6931 support. Reported by Bob Proulx.
6933 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
6935 * tests/misc/mknod: Improve permission checks to handle
6936 running mkdir test in set-gid directories.
6938 2006-06-14 Jim Meyering <jim@meyering.net>
6940 * tests/du/basic: Revamp not to hard-code file system block sizes.
6942 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6944 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
6947 2006-06-11 Jim Meyering <jim@meyering.net>
6949 * .gitignore: New file.
6950 * Makefile.am (EXTRA_DIST): Add .gitignore.
6952 Setting TIME_STYLE=long-iso in the environment would make the
6953 cp/same-file test fail.
6954 * tests/envvar-check (vars): Add TIME_STYLE to the list.
6955 * tests/cp/same-file: Revert last change.
6956 Source the envvar-check script, to ensure that TIME_STYLE
6957 settings don't affect these tests.
6959 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6961 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
6962 uses POSIX time stamp formats. Problem reported by John Nixon in
6963 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
6965 2006-06-10 Jim Meyering <jim@meyering.net>
6967 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
6969 Require a "Version N.M" line at the top of the ChangeLog
6970 file only when making the actual release, not when running
6972 * Makefile.maint (maintainer-distcheck): Don't depend on
6974 (alpha beta major): Depend on it here, instead.
6976 2006-06-08 Jim Meyering <jim@meyering.net>
6978 Ensure that cat works with any of the options, -A -v -e -E -T,
6979 when applied to files in /proc and /sys, even when the FIONREAD
6980 ioctl produces nonsensical results. Before this change, cat would
6981 produce no output (or truncated output), for some linux kernels.
6983 * src/cat.c (write_pending): New function, factored out of cat.
6984 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
6985 that there are bytes to read. Some versions of linux-2.6.16 do that.
6986 Write any pending output before returning.
6987 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
6988 * NEWS: Mention this bug fix.
6989 * tests/misc/cat-proc: New file. Test for the above.
6990 * tests/misc/Makefile.am (TESTS): Add cat-proc.
6992 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6994 * src/expr.c (eval4): Detect overflow properly when multiplying
6997 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
6999 * NEWS: The 'expr' command now detects and reports integer overflow.
7000 (It would be better to use extended precision instead, but that
7001 would be more work.)
7002 * src/expr.c (integer_overflow): New function.
7003 (eval4, eval3): Check for integer overflow.
7005 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7007 Fix problems when building with Solaris/SVR4/etc. make, which uses a
7008 different and somewhat bogus implementation of VPATH. In the
7009 directory tests/misc, rename tests whose names might appear in the
7010 Automake-generated rules. For example, we can't use a test named
7011 'test', since Automake generates a rule that contains the text
7012 "if test -f ./$$tst; ...", and this might expand to something like
7013 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
7014 which executes the 'test' script rather than the 'test' command.
7015 * tests/misc/false-status: Renamed from tests/misc/false.
7016 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
7017 * tests/misc/sort-merge: Renamed from tests/misc/sort.
7018 ($prog): Set to 'sort' rather than to $PROG.
7019 * tests/misc/test-diag: Renamed from tests/misc/test.
7020 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
7021 in case Solaris make has prepended the directory.
7022 (TESTS): Adjust to above renamings.
7023 * tests/misc/expand: Don't assign to PROG; no longer needed
7024 now that Makefile.am sets PROG to the basename.
7025 * tests/misc/fold: Likewise.
7027 2006-06-03 Jim Meyering <jim@meyering.net>
7029 Make `cp --link --no-dereference' work also on systems where the
7030 link system call cannot create a hard link to a symbolic link.
7031 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
7032 the link syscall on a symlink when it would do the wrong thing.
7033 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
7034 * tests/cp/link-no-deref: New file/test for the above.
7035 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
7036 * NEWS: Mention the change (doesn't affect Linux).
7038 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
7040 Fix some porting problems in the test cases reported by
7041 Ralf Wildenhues for HP-UX 11.23 in:
7042 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
7043 * tests/help-version: Don't assume that \< \> works in sed.
7044 * tests/misc/close-stdout: Don't assume that >&- works.
7045 Add a /dev/full test.
7046 * tests/touch/no-create-missing: Don't assume that >&- works.
7048 2006-05-30 Jim Meyering <jim@meyering.net>
7050 * src/ls.c (usage): Add `v' to the list of sorting-related options.
7053 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7055 * tests/cp/fail-perm: source lang-default.
7056 * tests/rm/inaccessible: Likewise.
7058 2006-05-28 Jim Meyering <jim@meyering.net>
7060 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
7061 Recognize it, too. Reported by Ralf Wildenhues, in
7062 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
7064 2006-05-27 Jim Meyering <jim@meyering.net>
7066 * src/chgrp.c: Support new options: --preserve-root and
7067 --no-preserve-root. Somehow this program was skipped when those
7068 options were added to chown, chmod, and rm. Reported by
7069 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
7070 * NEWS: Mention this.
7072 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
7074 * NEWS: Remove mention of --seed. We'll replace it with something
7075 better, and don't want to indicate that it is supported.
7076 * src/sort.c (usage): Likewise.
7078 2006-05-20 Jim Meyering <jim@meyering.net>
7080 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
7082 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
7083 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
7084 FTS_COMFOLLOW. Spotted by Justin Pryzby.
7086 * gnupload: Merge changes from automake, retaining the ""--to...
7087 kludge to placate overzealous `make distcheck' check.
7089 2006-05-19 Jim Meyering <jim@meyering.net>
7091 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
7092 FTS_TIGHT_CYCLE_CHECK directory traversal option.
7093 Reported by Justin Pryzby in http://bugs.debian.org/367691
7095 2006-05-15 Jim Meyering <jim@meyering.net>
7097 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
7098 From Tomas Pospisek.
7100 2006-05-13 Jim Meyering <jim@meyering.net>
7102 * tests/mv/no-target-dir: Test two more cases.
7104 2006-05-11 Jim Meyering <jim@meyering.net>
7106 mv -T DIR EMPTY_DIR no longer fails unconditionally
7107 * src/copy.c (copy_internal): Don't manually prohibit a move where
7108 the destination is an existing directory. Sometimes doing that is
7109 valid. Let the rename system call enforce the rules. That is
7110 allowed only when the source is a directory and the destination
7111 directory (to be replaced) is empty. Reported by Eric Blake.
7112 * tests/mv/no-target-dir: New file/test for this.
7113 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
7114 * NEWS: Mention this.
7116 * tests/mv/atomic: New file/test for yesterday's fix.
7117 * tests/mv/Makefile.am (TESTS): Add atomic.
7119 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
7121 2006-05-10 Jim Meyering <jim@meyering.net>
7123 * src/copy.c (copy_internal): Don't explicitly unlink the destination
7124 when moving a symlink into the place of an existing non-directory.
7125 Reported by Joshua Hudson.
7126 * NEWS: mention this.
7128 2006-05-07 Jim Meyering <jim@meyering.net>
7130 * Makefile.maint (patch-check): Fail if patch generates any output,
7131 even merely for changed offsets.
7133 * src/c99-to-c89.diff: Adjust to reflect new offsets.
7135 * NEWS: Mention changes affecting df, pwd, shred.
7137 2006-05-06 Jim Meyering <jim@meyering.net>
7139 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
7140 system condition where dirent.d_ino != stat.st_ino.
7141 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
7143 2006-05-06 Eric Blake <ebb9@byu.net>
7145 * tests/ls/inode: Expand to test inode from readdir case.
7146 * tests/ls/follow-slink: Expand to test broken links encountered
7147 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
7149 2006-05-06 Eric Blake <ebb9@byu.net>
7151 * tests/mv/leak-fd: Work even on case-insensitive file system.
7153 2006-05-04 Jim Meyering <jim@meyering.net>
7155 * NEWS: Mention the 2006-03-19 pwd-related change that makes
7156 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
7158 2006-05-03 Jim Meyering <jim@meyering.net>
7160 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
7161 Use better macro parameter names: s/basename/key_name/,
7162 s/basefunc/key_cmp_func. Fix typo in comment.
7164 2006-04-29 Eric Blake <ebb9@byu.net>
7166 * src/ls.c (main): On systems with d_type, directories_first only
7167 implies format_needs_type, not format_needs_stat.
7169 2006-05-03 Jim Meyering <jim@meyering.net>
7171 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
7172 after comma in arg list, from Eric Blake.
7174 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7176 * tests/misc/date (relative-3): New test, derived from a bug
7177 report by John Thomas McDole.
7179 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
7181 New option for ls: --group-directories-first.
7182 It makes ls list directories before files.
7183 * NEWS [New features]: Mention it.
7184 * src/ls.c (sort_type): Rearrange to use as an array index when
7185 choosing sort function; added new sort_numtypes member for
7187 (time_type): Add new time_numtypes member for compile-time check.
7188 (directories_first): New global variable.
7189 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
7190 (long_options): Add --directories-first.
7191 (main): Support new option.
7192 (is_directory): New function.
7193 (extract_dirs_from_files): Use it.
7194 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
7195 (LIST_SORTFUNCTION_VARIANTS): New macros.
7196 (sort_functions): New global variable.
7197 (sort_files): Use it.
7198 (usage): Document new option.
7200 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
7202 * src/shred.c (fillrand): The assertion was way too weak, due to
7203 what must be a typo. Strengthen it to its intended value.
7204 (dopass): Don't use alloca; it's not worth the aggravation here,
7205 since it's used only to get a page-aligned buffer, and page
7206 alignment doesn't buy us much here. I'm suspicious that alloca
7207 causes problems on some hosts, due to a recent bug report by Adam
7208 Waltman: http://bugs.gentoo.org/130246.
7210 2006-04-18 Jim Meyering <jim@meyering.net>
7212 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
7213 sha384sum, sha512sum.
7215 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
7217 * src/chmod.c (describe_change): Adjust to filemode changes.
7218 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
7219 (print_long_format): Use (new) filemodestring rather than
7220 (old) mode_string, so that we get more file types right, at least
7221 in theory. Adjust to filemode changes.
7222 * src/stat.c (human_access): Likewise.
7224 2006-04-18 Jim Meyering <jim@meyering.net>
7226 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
7227 ignore file. This has never been enabled. Reported by Eric Blake.
7229 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
7231 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
7232 bug in Interix. Just call symlink or link directly. All uses changed.
7233 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
7234 * src/stat.c (USE_STATVFS): New macro.
7235 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
7236 (NAMEMAX_FORMAT): define a bit more clearly, now that the
7237 statvfs-using code is a bit more regular.
7238 * src/system.h (sync) [!HAVE_SYNC]: New macro.
7240 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
7242 * NEWS: csplit, nl, expr now conform to POSIX better, and are
7243 more-compatible with traditional Unix, with respect to regular
7245 * src/csplit.c (extract_regexp): Set re_syntax_options to a
7246 value that is compatible with what POSIX requires.
7247 * src/nl.c (build_type_arg): Likewise.
7248 * src/expr.c (docolon): Likewise. Also, don't let anchors match
7249 newline; this fixes an incompatibility with tradition and with POSIX.
7250 Don't warn about leading ^. POSIX says it is unspecified whether
7251 ^ is a special character, which means that implementations can
7252 either treat it as special or not, but either way a warning is not
7253 allowed (unless the regexp is otherwise invalid). Instead, anchor
7254 the expression but treat ^ as an anchor; this is the traditional
7255 behavior (e.g., Solaris 10).
7256 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
7257 and the like as invalid expressions (exit status 2), not as
7258 failure of 'expr' (exit status 3). This is more consistent with
7259 how Solaris behaves.
7260 * tests/expr/basic (fail-a): Adjust exit status to match new expr
7261 behavior, for status 2 versus 3.
7263 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
7264 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
7265 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
7266 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
7267 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
7268 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
7269 (bre61, bre62): New tests.
7270 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
7271 conforming to POSIX.
7274 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
7275 "if !". Do not assume that 'sed' can handle long, newline-free input.
7276 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
7278 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
7280 Adjust to new regex.h API (with new fastmap type), and clean
7281 up the regex storage allocation a bit.
7283 * src/csplit.c (struct control): Put re_compiled member at the
7284 end, since it's large. Change regexpr member from char * to bool;
7285 all uses changed. Add new member fastmap.
7286 (extract_regexp): regexp arg is now char const *, not char *.
7287 Don't bother duplicating the regular expression; it's not needed.
7288 Set fastmap from new fastmap member. Don't bother allocating
7289 a buffer, as the regexp code does a better job than we do.
7290 * src/expr.c (docolon): Allocate and use a fastmap.
7291 Don't bother allocating a buffer.
7292 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
7294 (build_type_arg): New fastmap arg. All uses changed.
7295 Don't bother allocating a buffer, but set a fastmap.
7296 * src/ptx.c (context_regex_string, word_regex_string): Remove.
7297 (context_regex, word_regex): New vars, replacing the above.
7299 (struct regex_data): New type.
7300 (compile_regex): Renamed from alloc_and_compile_regex, since
7301 we no longer allocate storage. Arg is now a struct regex_data *,
7302 not a const char *. All uses changed. Don't allocate the fastmap;
7303 instead, take it from the caller. Don't convert size_t to int,
7304 to avoid arithmetic overflow problems. Don't bother freeing
7305 storage afterwards; it's not worth the aggravation.
7306 * src/tac.c (compiled_separator_fastmap): New ver.
7307 (main): Use it. Don't bother allocating a buffer.
7309 2006-03-30 Jim Meyering <jim@meyering.net>
7311 * src/dd.c (iwrite): Remove assignment without effect.
7312 Reported by Felix Rauch Valenti.
7314 2006-03-22 Eric Blake <ebb9@byu.net>
7316 * src/ptx.c (usage): Remove mention of --copyright/-C.
7317 (main): Alias --copyright to --version plus a deprecation warning.
7318 * NEWS: Mention this.
7320 2006-03-27 Jim Meyering <jim@meyering.net>
7322 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
7323 use of strtod. Tiny patch from Nickolai Zeldovich.
7325 2006-03-11 Eric Blake <ebb9@byu.net>
7327 * tests/misc/dirname: New file.
7328 * tests/basename/Makefile.am: Delete.
7329 * tests/basename/basic: Move to...
7330 * tests/misc/basename: ... this new file. Add some tests,
7331 including fixed behavior for //.
7332 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
7333 * tests/Makefile.am (SUBDIRS): Remove basename.
7334 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
7336 Improvements to dirname/basename handling on platforms like
7337 cygwin with distinct // and with drive letters.
7338 * NEWS: Document new behavior.
7339 * src/basename.c (main): Don't strip suffix from file system
7341 * src/cp.c (target_directory_operand): Use new last_component.
7342 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
7343 traversing the string.
7344 * src/dircolors.c (guess_shell_syntax): Use new last_component.
7345 * src/install.c (target_directory_operand, install_file_in_dir):
7347 * src/ln.c (target_directory_operand, main): Likewise.
7348 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
7349 * src/mv.c (target_directory_operand, movefile): Likewise.
7350 * src/remove.c (rm_1): Likewise.
7351 * src/shred.c (wipename): Likewise.
7352 * src/split.c (next_file_name): Likewise.
7353 * src/su.c (log_su, run_shell): Likewise.
7355 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
7357 * NEWS: nohup diagnostics are now more precise, and nohup now
7358 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
7359 * src/nohup.c (main): Implement this.
7360 * tests/misc/nohup: Test the new behavior.
7362 2006-03-12 Jim Meyering <jim@meyering.net>
7364 * src/copy.c (set_author): Rename function, from preserve_author.
7366 * src/remove.c (AD_pop_and_chdir): Use new macro,
7367 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
7369 * src/system.h (SAME_INODE): Remove definition.
7370 Include "same-inode.h", instead.
7372 2006-03-11 Eric Blake <ebb9@byu.net>
7374 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
7376 2006-03-10 Jim Meyering <jim@meyering.net>
7378 Fix a bug whereby a user with write access to a directory being removed
7379 could cause the removal of that directory to fail with an erroneous
7380 diagnostic about a directory cycle. Reported by Vineet Chadha.
7382 * NEWS: Mention this.
7383 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
7384 leave (and try to rmdir) is the one whose dev_ino is being used to
7385 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
7387 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7389 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
7390 * src/dd.c (set_fd_flags): Handle file-creation flags on file
7391 descriptors, rather than ignoring them.
7392 * tests/dd/misc: Add test cases for append, nofollow, directory,
7393 and nolinks flags. Simplify redirection to /dev/null in some cases.
7395 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
7396 noatime test never tested anything.
7398 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
7400 * src/dd.c (flags, usage): New flags directory, nolinks.
7401 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
7403 * src/ls.c (usage): Mention that -f disables --color.
7404 Problem reported by Niels Möller.
7406 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
7408 * man/*.x: Add references to syscalls from utilities of the same name.
7410 2006-03-05 Jim Meyering <jim@meyering.net>
7412 * tests/help-version: Set SHELL, if not already set, in order to
7413 avoid failure when `make check' is run through debuild; dircolors
7414 would fail due to lack of $SHELL. Reported by Sven Joachim.
7416 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
7417 * src/base64.c (wrap_write, do_encode, main): Change type of
7418 parameters and locals, wrap_column, form size_t to uintmax_t.
7419 (main): Adjust to use xstrtoumax, accordingly.
7421 2006-03-03 Jim Meyering <jim@meyering.net>
7423 Don't fail when run from an environment with SHELL not a Bourne
7424 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
7425 * tests/dircolors/simple: Invoke each non-failing test with -b.
7426 Reported by Michael Stone.
7428 2006-02-27 Jim Meyering <jim@meyering.net>
7430 * tests/misc/base64: Derive --decode-using tests from the
7433 * tests/misc/base64: Factor out a long constant string.
7434 Split lines to stay within 80 columns.
7436 * tests/misc/Makefile.am (TESTS): Add base64.
7437 * tests/misc/base64: Test base64. From Simon Josefsson.
7439 * src/base64.c (do_decode): Use correct type for parameter,
7440 ignore_garbage: s/size_t/bool/.
7442 * src/base64.c: Don't include .h files already included by system.h:
7443 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
7444 Include "system.h" before the other lib/*.h header files.
7445 Include <sys/types.h> before "system.h".
7446 (wrap_write): Remove declaration of unused local, initial_column.
7447 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
7449 * README: Add base64 to the list.
7451 2006-02-17 Simon Josefsson <jas@extundo.com>
7453 New program: base64.
7454 * AUTHORS: Mention base64.
7456 * man/Makefile.am: Build base64.1.
7457 * man/base64.x: New file.
7458 * src/Makefile.am (bin_PROGRAMS): Add base64.
7459 * src/base64.c: New file.
7461 2006-02-25 Eric Blake <ebb9@byu.net>
7463 In ls, avoid calling stat for --inode (-i), when possible.
7464 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
7465 * src/system.h: ... here, for use in ...
7466 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
7468 (gobble_file): Add inode argument.
7469 (print_dir): Pass inode if available.
7470 (usage): Remove inaccuracy.
7472 2006-02-23 Jim Meyering <jim@meyering.net>
7474 * TODO: Update/correct some obsolete entries.
7476 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
7478 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
7479 * src/join.c (usage): Likewise.
7480 Documentation problem reported by Philip Kensche.
7482 2006-02-20 Eric Blake <ebb9@byu.net>
7484 * man/rm.x: Update documentation to match previous patch.
7486 2006-02-18 Eric Blake <ebb9@byu.net>
7488 New option for rm: --interactive=once (-I).
7489 * NEWS: Document it, along with change to rm --interactive.
7490 * TODO: Remove entry for implementing rm -I
7491 * src/rm.c (INTERACTIVE_OPTION): New enum value.
7492 (interactive_type): New enum.
7493 (long_opts): Let interactive take an optional argument.
7494 (interactive_args, interactive_types): New option arguments.
7495 (usage): Document -I, --interactive=WHEN. Use program_name
7496 instead of a basename.
7497 (main): New -I option, new behavior to --interactive.
7498 * tests/rm/interactive-once: New tests.
7499 * tests/rm/interactive-always: Ditto.
7500 * tests/rm/Makefile.am (TESTS): Run them.
7502 2006-02-18 Jim Meyering <jim@meyering.net>
7504 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
7505 expression match more of the target lines, e.g., those that start with
7506 `-S,' (short option followed by a comma) or that include `=[...]'.
7507 Patch by Nicolas François.
7508 Fix the four offenders thus exposed:
7509 * src/join.c (usage): Use two spaces (not one) to separate the
7510 --first-only option string from its description, so help2man formats
7511 the derived man page properly.
7512 * src/pr.c (usage): Likewise.
7513 * src/uniq.c (usage): Likewise.
7514 * src/install.c (usage): Likewise.
7516 2006-02-15 Jim Meyering <jim@meyering.net>
7518 * Makefile.maint (alpha beta major): For `make major', ensure that the
7519 version string is of the form N.N[.N]*, where N is one or more digits.
7521 2006-02-14 Jim Meyering <jim@meyering.net>
7523 * INSTALL: Update from gnulib.
7525 2006-02-13 Jim Meyering <jim@meyering.net>
7527 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
7529 2006-02-12 Jim Meyering <jim@meyering.net>
7531 * Makefile.maint (patch-check): New target.
7532 (local-checks-available): Add to the list.
7534 2006-02-11 Jim Meyering <jim@meyering.net>
7536 * src/c99-to-c89.diff: New file.
7537 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
7539 * .x-po-check: New file, with exclusions so that `make distcheck'
7541 * Makefile.am (EXTRA_DIST): Add .x-po-check.
7543 rm -r must remove an empty directory, even if it is inaccessible.
7544 * src/remove.c (close_preserve_errno): New function.
7545 (fd_to_subdirp): Don't print a diagnostic in this function.
7546 Do it from the callers instead, unless rmdir succeeds.
7547 (remove_cwd_entries, remove_dir): Adjust callers.
7548 * tests/rm/empty-inacc: New test for the above.
7549 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
7550 * NEWS: Mention this bug fix.
7551 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
7552 a tiny bit less precise: cannot remove `a/1': ... instead of
7553 cannot open directory `a/1': ...
7555 * Makefile.maint (syntax-check-rules): Automatically derive this
7556 list of sc_-prefixed rule names.
7558 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7560 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
7561 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
7562 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
7563 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
7564 go away? was that an accident?)
7565 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
7566 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
7567 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
7568 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
7569 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
7570 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
7571 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
7572 (author_mark_check, makefile_path_separator_check):
7573 Output line numbers, to simplify navigation of Emacs *compilation*
7575 (sc_prohibit_atoi_atof, sc_file_system):
7576 Rework slightly so that Makefile.maint doesn't get reported as a
7577 violation of its own syntax rules.
7578 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
7579 it at run-time (which didn't work with Bison). Fix a makefile typo,
7580 caught by Makefile.maint itself: spaces where a tab should be.
7581 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
7582 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
7583 Ignore djgpp and man subdirectories, to avoid false matches with
7584 Bison and coreutils, respectively. Use sort -u to remove the
7585 resulting duplicates.
7586 * gnupload: Rework slightly to avoid bogus warning from
7587 sc_two_space_separator_in_usage.
7589 2006-02-10 Jim Meyering <jim@meyering.net>
7591 Use gzip's --rsyncable option only if it's available.
7592 * Makefile.maint (gzip_rsyncable): New variable.
7595 2006-02-08 Jim Meyering <jim@meyering.net>
7597 * Makefile.maint (local-checks-available): Define in terms of
7598 the expansion, $(syntax-check-rules), rather than the single,
7599 top-level target `syntax-check', so that it's easier to exclude
7600 individual rules (via $(local-checks-to-skip)).
7601 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
7603 2006-02-07 Jim Meyering <jim@meyering.net>
7605 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
7606 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
7608 * tests/help-version (expected_failure_status_vdir):
7609 Redirect an expected disk-full diagnostic to /dev/null.
7611 2006-02-06 Jim Meyering <jim@meyering.net>
7613 * src/unexpand.c (usage): Use two spaces (not one) to separate the
7614 --first-only option string from its description, so help2man formats
7615 the derived man page properly.
7616 * src/rm.c (usage): Likewise for --no-preserve-root.
7617 * src/chown.c (usage): Likewise.
7618 * src/chgrp.c (usage): Likewise.
7620 Add a rule to ensure that the above doesn't happen again.
7621 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
7622 (syntax-check-rules): Add it.
7623 * .x-sc_two_space_separator_in_usage: New empty file.
7624 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
7626 2006-02-06 Jim Meyering <jim@meyering.net>
7628 * src/cp.c (usage): Use two spaces (not one) to separate each
7629 option string from its description, so help2man formats the
7630 derived man page properly.
7631 * src/mv.c (usage): Likewise.
7632 Patch from Nicolas François in http://bugs.debian.org/351601.
7634 2006-02-04 Jim Meyering <jim@meyering.net>
7636 * src/copy.c (copy_internal): cp -RL would fail when encountering
7637 the same directory more than once in the hierarchy beneath a single
7638 command-line argument. That is legitimate, e.g. when there are
7639 two or more symbolic links, each pointing to some directory that
7640 would not otherwise be copied. Reported by Christophe LYON.
7641 * tests/cp/cp-deref: New file. Test for today's fix.
7642 * tests/cp/Makefile.am (TESTS): Add cp-deref.
7643 * NEWS: Document this.
7645 2006-02-03 Jim Meyering <jim@meyering.net>
7647 * configure.ac: Require automake-1.9.6, not 1.8.3.
7649 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7651 * src/od.c (usage): Mention that -t a ignores high order bit.
7652 Documentation problem reported by Ed Avis.
7654 2006-02-01 Jim Meyering <jim@meyering.net>
7656 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
7658 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7660 * src/head.c (main): Use a better diagnostic when someone uses a
7661 trailing numeric option in an invalid way. Problem reported by
7663 * src/tail.c (parse_options): Likewise.
7665 2006-01-30 Jim Meyering <jim@meyering.net>
7667 * man/wc.x: Include `count' keyword in man page synopsis,
7668 per suggestion from http://bugs.debian.org/181585.
7670 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
7672 * src/df.c (show_dev): If the file system claims to have
7673 more available than total blocks, report the number of used
7674 blocks as being total - available (a negative number) rather
7675 than as garbage. Problem reported by Toralf Foerster.
7677 2006-01-24 Jim Meyering <jim@meyering.net>
7679 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
7680 to put a regular file in O_NONBLOCK mode fails with EPERM.
7681 That happens on Linux (up to 2.6.15) when using tail -f on a file with
7682 the append-only attribute. Reported by Dean Gaudet. For details,
7683 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
7684 * NEWS: Mention this fix.
7685 * tests/tail-2/append-only: New file. Test for the above.
7686 * tests/tail-2/Makefile.am (TESTS): Add append-only.
7687 * tests/Makefile.am (check-root): Add tail-2/append-only
7689 2006-01-21 Jim Meyering <jim@meyering.net>
7691 * NEWS: Mention fts-related improvements and bug fixes.
7693 2006-01-19 Jim Meyering <jim@meyering.net>
7695 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
7696 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
7698 2006-01-18 Jim Meyering <jim@meyering.net>
7700 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
7702 2006-01-17 Jim Meyering <jim@meyering.net>
7704 Now that fts no longer changes the current working directory, adjust
7705 its clients accordingly -- note that du.c uses fts but doesn't need
7706 any adjustment, since it doesn't operate on the actual files,
7707 but rather just uses the stat buffers provided by fts.
7709 * src/chown-core.c: Include "openat.h".
7710 Don't include "lchown.h".
7711 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
7712 calling openat, lchownat, chownat, rather than open, lchown, chown.
7714 * src/chmod.c: Include "openat.h".
7715 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
7717 * tests/du/long-from-unreadable: New test, to exercise one small
7720 2006-01-13 Jim Meyering <jim@meyering.net>
7722 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
7723 addition of new directories under tests/.
7725 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
7728 2006-01-12 Jim Meyering <jim@meyering.net>
7730 * tests/du/long-sloop: Adjust not to hard-code the expected
7731 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
7732 from that of GNU libc. Reported by Paul Eggert.
7734 * tests/du/long-sloop: Create file at end of symlink chain.
7736 * tests/misc/test: New file, with a test for one of the
7737 bugs fixed by yesterday's test.c changes.
7738 * tests/misc/Makefile.am (TESTS): Add test.
7740 2006-01-11 Jim Meyering <jim@meyering.net>
7742 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
7743 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
7744 a very long sequence of symbolic links (not necessarily a loop).
7745 * tests/du/Makefile.am (TESTS): Add long-sloop.
7747 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
7749 * src/test.c (test_syntax_error): Append a newline. All callers
7750 changed, except for the ones that didn't already append a newline.
7751 Bug reported by Eric Blake.
7753 2006-01-11 Jim Meyering <jim@meyering.net>
7755 * src/system.h (X2NREALLOC): Now that verify_true is no longer
7756 void, cast its result to void, to avoid gcc's warning that
7757 ``left-hand operand of comma expression has no effect''.
7758 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
7760 2006-01-10 Jim Meyering <jim@meyering.net>
7762 * tests/chmod/no-x: Add a test for today's fts.c fix.
7764 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
7766 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
7767 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
7769 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
7771 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
7772 Use verify_true instead of verify_expr, to sync with gnulib.
7774 2006-01-08 Jim Meyering <jim@meyering.net>
7776 * src/date.c (usage): Adjust the formatting of the entries for
7777 %::z and %:::z (separate with two spaces, not one) so that help2man
7778 formats them properly. Reported by Philip Rowlands.
7780 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
7782 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
7784 2006-01-06 Jim Meyering <jim@meyering.net>
7786 * Makefile.maint (copyright-check): Use date +%Y in place of
7789 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
7790 First off, the attribute should have been `volatile' (not static)
7791 to avoid longjmp-related risk of clobber. Secondly, now there is
7792 no longer any risk of a local variable being clobbered, so there's
7793 no need for any attribute at all.
7795 2006-01-05 Jim Meyering <jim@meyering.net>
7797 * src/remove.c: Give a few functions the inline attribute.
7798 (AD_pop_and_chdir): Use gotos to avoid some duplication.
7799 (AD_push): Rewrite an assertion so that the entire computation
7800 goes away when assertions are turned off.
7802 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
7803 It's already defined in "system.h".
7804 * Makefile.maint: Add a FIXME comment.
7806 2006-01-04 Jim Meyering <jim@meyering.net>
7808 * ChangeLog: Remove entries from 2005-10-22 and earlier.
7809 * ChangeLog-2005: New file, for entries up to version 5.92.
7811 2006-01-03 Jim Meyering <jim@meyering.net>
7813 * tests/du/no-x: Also allow a slightly different diagnostic -- the
7814 one you get when using openat-enabled fts.c and du (coming soon).
7815 * tests/chmod/no-x: Likewise.
7816 * tests/chgrp/no-x: Likewise.
7818 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
7820 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
7822 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
7823 (restricted_chown): Return it, if the file cannot be accessed due
7824 to EPERM, or if no uid or gid are required, or if the file is
7825 neither a directory nor a regular file. Rewrite to avoid gotos.
7826 (change_file_owner): Handle RC_do_ordinary_chown case.
7827 Rewrite to avoid gotos.
7828 * tests/chgrp/basic: Make sure we can change the group of
7831 * src/date.c (usage): Explain %g, %G, and %V a bit better.
7833 2006-01-02 Jim Meyering <jim@meyering.net>
7835 * src/copy.c (set_owner): Correct a comment.
7837 * src/tail.c (parse_options): Change warning to say that --retry
7838 is useful `mainly' (not `only') when following by name.
7839 Reported here: http://bugs.debian.org/273781
7841 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
7843 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
7844 * src/copy.c: Include lchmod.h.
7845 (copy_internal): Use lchmod rather than chmod.
7846 * src/cp.c: Include lchmod.h.
7847 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
7848 * src/mkdir.c: Include lchmod.h.
7849 (usage): Clarify -m's operation.
7850 (main): Use lchmod rather than chmod. Don't use lchmod unless the
7851 new mode contains bits outside the 777 range.
7852 * src/mkfifo.c (usage): Clarify -m's operation.
7853 (main): If -m is given, don't invoke chmod; use umask 0 instead.
7854 Report an error if -m asks for bits outside the 777 range.
7855 * src/mknod.c (usage, main): Likewise.
7857 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
7859 2005-12-27 Jim Meyering <jim@meyering.net>
7861 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
7862 (sc_prohibit_assert_without_use): New rule.
7863 (syntax-check-rules): Add it to the list.
7864 * .x-sc_prohibit_assert_without_use: New empty file.
7865 * Makefile.am (EXTRA_DIST): Add it.
7867 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
7869 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
7870 Don't include <assert.h>; it wasn't used.
7872 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
7874 * src/chown-core.c (restricted_chown):
7875 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
7876 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
7877 | O_NOFOLLOW too, for consistency with other dir-openers.
7878 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
7879 (is_empty_dir): Likewise.
7880 * src/shred.c (wipename): Likewise. Don't bother trying to open
7881 dir for writing, since POSIX prohibits it.
7883 2005-12-22 Jim Meyering <jim@meyering.net>
7885 * tests/help-version: Redirect stderr to /dev/full, to suppress
7886 write error diagnostic.
7888 2005-12-19 Jim Meyering <jim@meyering.net>
7890 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
7891 Avoid a minor race condition when `-m MODE' is specified, by using
7892 open, fchown, and close rather than just chown. To do that reliably --
7893 even with an overly restrictive umask -- ensure that each mkdir,
7894 mknod and mkfifo call uses a mode including at least owner-read access.
7895 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
7896 the subsequent chown (or equivalent open,fchown,close) fails.
7897 * tests/misc/mknod: New tests.
7898 * tests/misc/Makefile.am (TESTS): Add mknod.
7900 2005-12-17 Jim Meyering <jim@meyering.net>
7902 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
7903 e.g., on a named pipe.
7904 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
7905 place of all uses, since it is guaranteed (system.h) to be defined.
7907 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
7909 Add POSIX ACL support
7910 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
7911 is no requirement for ACL support; particularly, it does not exist
7912 on systems that have POSIX ACLs.
7913 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
7914 * src/cp.c (umask_kill): With default acls, the umask is not to be
7915 applied. Remove umask_kill, don't change the process umask, and let
7916 the kernel apply the umask where appropriate.
7917 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
7918 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
7920 (copy_reg, copy_internal): Use copy_acl and set_acl
7921 instead of fchown/chown. Fix the logic for POSIX ACLs.
7922 (chown_succeded): Remove; we now always copy acls and
7923 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
7924 did a chown before or not.
7925 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
7926 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
7927 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
7928 to link with it via $(LIB_ACL), for the utilities that need it.
7930 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
7932 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
7933 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
7934 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
7935 value is now signified by whether cwd_errno is null.
7936 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
7937 pointer-to-bool to pointer-to-errno-value. All callers changed.
7938 (rm_1): Don't bother setting a local cwd failure flag and then
7939 ORing it into the caller's. Just set the caller's.
7940 (rm): Use cwd failure errno value to print a slightly-better
7943 2005-12-15 Jim Meyering <jim@meyering.net>
7945 * src/stat.c (print_it): Properly handle a backslash at the
7946 end of a --printf format string. Reported by Paul Eggert.
7947 * tests/misc/stat-printf (end-bs): Add a test for the above.
7949 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
7951 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
7952 Don't assume /etc/passwd contains user names; use 'id' instead.
7954 2005-12-15 Jim Meyering <jim@meyering.net>
7956 stat: revert behavior of --format=FMT (-c)
7957 stat: add new option: --printf=FMT
7958 * NEWS: Mention this.
7959 * src/stat.c (isodigit, octtobin, hextobin): Define.
7960 (PRINTF_OPTION): Define.
7961 (interpret_backslash_escapes, trailing_delim): New globals.
7962 (usage): Document them. Alphabetize on long option names.
7963 (print_esc_char): New function.
7964 (print_it): Rewrite, in order to handle backslash escapes.
7965 (main): Handle new option. Set globals for --format, too.
7967 * tests/misc/stat-printf: Test --printf and --format.
7968 * tests/misc/Makefile.am (TESTS): Add stat-printf.
7970 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
7972 * NEWS: sort now reports incompatible options.
7973 * src/sort.c (incompatible_options, check_ordering_compatibility):
7975 (main): Use them. Don't bother with a usage message for
7976 "sort -c a b", for consistency with other error diagnostics.
7977 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
7980 * src/cat.c (main): Undo previous change. close_stdout already
7981 does the check, so the previous change wasn't necessary.
7983 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
7985 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
7987 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
7989 Install a more-conservative approach for sort -R. It's the
7990 same basic idea as the existing code, except it uses the full ISAAC
7991 approach (called the "more kosher" approach in the existing comments).
7992 This makes "sort -R" quite a bit slower (about a factor of 2 on my
7993 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
7994 better to be conservative here at first, and review any performance
7995 improvements carefully.
7996 * .x-sc_require_config_h: Add src/rand-isaac.c.
7997 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
7998 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
7999 (shred_SOURCES, sort_SOURCES): Remove.
8000 (EXTRA_DIST): Add rand-isaac.c.
8001 * src/rand-isaac.c: Revert to what used to be in shred.c, without
8002 changing it to allow for varying numbers of words in the state.
8003 Alter so that we include rand-isaac.c directly rather than
8004 compiling it and linking to it. Don't include config.h or
8005 system.h; that's the includer's responsibility.
8006 Omit functions that are specific to shred.
8007 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
8008 (isaac_step, struct irand_state):
8009 Resurrect these, with the same defns that used to be in shred.c.
8010 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
8011 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
8013 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
8014 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
8015 (irand_init, irand32, irand_mod):
8016 Number of words is constant again.
8017 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
8018 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
8019 * src/sort.c: Likewise.
8020 * src/shred.c (fillrand, dopass, main): Undo previous change.
8021 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
8023 * src/sort.c: Don't include md5.h; it wasn't needed.
8024 (struct keyfield): Rename random_hash to random, for consistency
8025 with the other member names. All uses changed.
8026 (usage): Tweak wording to mention STRING for --seed option.
8027 (short_options): Rorder for consistency with other programs.
8028 (rand_state): Now a struct, not a pointer to one. All uses changed.
8029 (HASH_WORDS, HASH_SIZE): Remove.
8030 (get_hash): Remove comments around resbuf size, since we can assume C89.
8031 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
8032 (keycompare): Adjust to the new get_hash.
8034 (badfieldspec): Omit recently-introduced comment; it isn't needed.
8035 (main): Don't set need_random simply because gkey has it set; that
8036 doesn't necessarily mean we'll need random numbers.
8037 Redo seeding to match new get_hash approach.
8039 2005-12-10 Jim Meyering <jim@meyering.net>
8041 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
8043 Avoid shred segfault on 64-bit systems.
8044 * src/rand-isaac.c (isaac_refill): Don't try to negate a
8045 local of type uint32_t. Make the local an `int' instead.
8047 * NEWS: Mention sort's new options.
8049 * src/rand-isaac.c (isaac_mix): Declare to be static.
8050 Mark all other functions as `extern' so the tight-scope
8051 part of `make distcheck' passes once again.
8052 * src/rand-isaac.h (isaac_mix): Remove declaration.
8054 * src/sort.c (get_hash): Change position of `*' in parameter
8055 type to conform with convention.
8056 (main): Split a long line so it fits in 80 columns.
8057 (keycompare): Remove stray SPACE before TAB that was
8058 causing `make distcheck' to fail.
8060 * src/shred.c: Don't include gethrxtime.h. No longer needed.
8062 * tests/misc/sort-rand: New file: basic tests for the new options.
8063 * tests/misc/Makefile.am (TESTS): Add sort-rand.
8065 2005-12-10 Frederik Eaton <frederik@ofb.net>
8067 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
8068 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
8069 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
8070 Make state size runtime-configurable.
8071 (isaac_new, isaac_copy): New functions.
8072 * src/rand-isaac.h: New file.
8073 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
8074 (fillrand, main): Adjust to the fact that the state size is now
8075 runtime-configurable.
8076 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
8077 (usage): Add options --random-sort and --seed to implement a random
8079 Include md5.h and rand-isaac.h.
8080 (get_hash): New function.
8081 (rand_state): New var.
8082 (HASH_WORDS, HASH_SIZE): New macros.
8084 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8086 * tests/dd/misc: Add test for dd iflags=noatime.
8088 2005-12-09 Jim Meyering <jim@meyering.net>
8090 * src/sort.c (usage): Mention white space vs -b and -t options.
8093 2005-12-09 Eric Blake <ebb9@byu.net>
8095 * src/test.c (main): Fix misleading comment.
8097 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8099 * NEWS: Mention dd's new noatime flag.
8100 * src/system.h (O_NOATIME): Define to 0 if not already defined.
8101 * src/dd.c (flags, usage): Add support for noatime flag.
8103 2005-12-07 Jim Meyering <jim@meyering.net>
8105 Distribute the cvsu script, used only by `make syntax-check'.
8106 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
8107 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
8108 distribute a copy of this script.
8109 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
8111 * tests/mv/acl: exit-77 before the trap, not after, if we fail
8112 to create a temporary directory on another partition.
8113 From Andreas Gruenbacher.
8115 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
8117 * man/basename.x: Cross-reference to dirname and readlink.
8118 * man/dirname.x: Cross-reference to basename and readlink.
8120 2005-12-05 Andreas Gruenbacher
8122 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
8123 (set_owner, preserve_author): New functions, factored out of copy_reg.
8124 (copy_reg): Use them.
8125 (copy_internal): Use them here, too.
8127 2005-12-04 Jim Meyering <jim@meyering.net>
8129 * src/sleep.c (usage): Say what happens with two or more arguments.
8130 Suggested by Justin Pryzby.
8132 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
8135 2005-12-03 Jim Meyering <jim@meyering.net>
8137 * src/rm.c (long_opts): Change the name of each undocumented, for-
8138 testing-only option to start with `-', so that it cannot render
8139 ambiguous any prefix it happens to share with some other option name.
8140 Problem reported by Eric Blake.
8141 * src/head.c (long_options): Likewise.
8142 * src/tail.c (long_options): Likewise.
8144 * tests/misc/head-elide-tail: Update uses of undocumented, for-
8145 testing-only --presume* options to start with `---'.
8146 * tests/rm/dangling-symlink: Likewise.
8147 * tests/rm/dir-no-w: Likewise.
8148 * tests/rm/isatty: Likewise.
8150 2005-11-30 Jim Meyering <jim@meyering.net>
8152 * Makefile.maint: Add a comment about cvsu.
8154 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
8156 * NEWS: df updates for "none", "proc", inaccessible file systems.
8157 * src/df.c (show_point): Ignore inaccessible file systems.
8158 (usage): -a includes dummy file systems, not size-0 file systems.
8160 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
8161 to avoid collision with POSIX name space. All uses changed.
8163 2005-11-24 Jim Meyering <jim@meyering.net>
8165 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
8166 * tests/acl: Add `$0: ' prefix to diagnostics.
8168 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
8170 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
8172 * src/copy.c: Improve performance a bit by optimizing away
8173 unnecessary system calls and going to a block size of at least
8174 8192 (on normal hosts, anyway). This improved performance 5% on my
8175 Debian stable host (2.4.27 kernel, x86, copying from root
8176 ext3 file system to itself).
8177 Include "buffer-lcm.h".
8178 (copy_reg): Omit last argument. All callers changed.
8179 Use xmalloc to allocate rather than trusting alloca
8180 (which is unwise with large block sizes).
8181 Declare locals more locally, if possible.
8182 Use uintptr_t words instead of int words, for a bit more speed
8183 when looking for null blocks on 64-bit hosts.
8184 Optimize away reads of zero bytes on regular files.
8185 In the typical case, insist on 8 KiB buffers, at least.
8186 Avoid unnecessary extra call to fstat when checking for sparse files.
8187 Avoid now-unnecessary cast to off_t, and "0L".
8188 Avoid unnecessary test of *new_dst when checking for same owner
8191 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
8193 * src/remove.c (rm): Don't assume C99 for-loop syntax.
8195 2005-11-22 Jim Meyering <jim@meyering.net>
8197 * src/remove.c (AD_push): Remove debugging cruft.
8199 * tests/rm/unread2 (rm): Change expected diagnostic,
8200 `cannot open directory' to `cannot remove', to align with
8202 * tests/rm/rm2: Ensure that rm now continues removing entries
8203 even after certain types of failure.
8205 * src/remove.c: Rewrite. Now, this module is reentrant on systems
8206 that provide openat (Solaris), and on systems like Linux+procfs
8207 where our openat emulation code is reentrant. This also fixes a
8208 few low-probability leaks and eliminates some code that could,
8209 in very unusual circumstances, cause rm() (via a callee) to exit.
8210 * NEWS: Mention this.
8212 * configure.ac: Put copyright dates all on one line so the
8213 emacs function that updates them works properly.
8215 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8217 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
8218 Problem reported by Eric Blake.
8219 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
8220 we get a standard-conforming compiler. This relies on the new
8221 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
8222 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
8223 m4/c.m4 can go away with Autoconf 2.60 comes out.
8225 2005-11-17 Jim Meyering <jim@meyering.net>
8227 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
8228 (AD_mark_current_as_unremovable): Likewise, but for a local.
8231 * tests/mv/acl: Let traps handle removing temporary directories.
8233 Expect acl-related tests to fail, until the corresponding
8234 patches are committed.
8235 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
8236 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
8238 ACL tests, from Andreas Gruenbacher.
8239 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
8240 * tests/mv/Makefile.am (TESTS): Add acl.
8241 * tests/cp/Makefile.am (TESTS): Add acl.
8243 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
8245 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
8247 * NEWS: Improve quality of ln's diagnostics.
8248 * src/ln.c (do_link, usage): Likewise.
8249 (do_link): Don't use alloca on a buffer of unbounded size.
8251 2005-11-16 Jim Meyering <jim@meyering.net>
8253 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
8254 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
8255 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
8256 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
8257 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
8259 2005-11-14 Jim Meyering <jim@meyering.net>
8261 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
8263 2005-11-13 Jim Meyering <jim@meyering.net>
8265 * announce-gen: Accept new option, --gpg-key-id=ID and
8266 emit a blurb telling how to use the .sig files.
8267 * Makefile.cfg (gpg_key_ID): Define.
8268 * Makefile.maint (announcement): Use new option and key.
8270 Require that most .c files include <config.h>.
8271 * Makefile.maint (sc_require_config_h): New rule.
8272 (syntax-check-rules): Add it.
8273 * .x-sc_require_config_h: New file listing exceptions to the
8274 above rule. Some are legit, others are simply grandfathered in.
8275 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
8277 2005-11-12 Jim Meyering <jim@meyering.net>
8279 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
8281 2005-11-11 Jim Meyering <jim@meyering.net>
8283 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
8284 Mention new readlink options in 5.3.0's `New features' section.
8285 Spotted by Thomas Hood.
8287 2005-11-08 Jim Meyering <jim@meyering.net>
8289 * NEWS: Merge in changes from b5_9x branch.
8291 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
8293 * NEWS: ls now defaults to --time-style='locale', which in turn acts
8294 like --time-style='posix-long-iso' if the locale settings are messed up.
8295 * src/ls.c (decode_switches): Implement this.
8297 2005-11-08 Jim Meyering <jim@meyering.net>
8299 * tests/du/2g: s/expensive/very expensive/ in a comment.
8302 2005-10-17 Eric Blake <ebb9@byu.net>
8304 * src/ls.c (usage): Fix descriptions of --sort, --time.
8305 Reported by Vitaly A. Ostanin.
8307 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
8309 * src/ln.c: Include filenamecat.c.
8310 (FILE_BASENAME_CONCAT): Remove.
8311 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
8312 (main): Use file_name_concat, base_name, and strip_trailing_slashes
8313 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
8316 2005-11-04 Jim Meyering <jim@meyering.net>
8318 * src/du.c (process_file): Don't overflow for files of size >= 2^31
8319 on systems with stat.st_blocks of a signed 32-bit type.
8320 This bug causes trouble on some AIX 5.1 systems.
8321 Report and trivial patch from Paul Townsend:
8322 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
8323 * NEWS: Mention this.
8325 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
8326 * tests/du/Makefile.am (TESTS): Add it here.
8327 * tests/very-expensive: New file.
8328 * tests/Makefile.am (EXTRA_DIST): Add it here.
8329 * tests/cp/perm: Mark this test as `very-expensive', too.
8331 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
8333 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
8335 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
8337 * src/rm.c (usage): Don't mention rm -d.
8339 2005-11-02 Jim Meyering <jim@meyering.net>
8341 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
8342 From Andreas Schwab.
8344 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
8345 `M+N records in/out' lines don't pollute `make check' output.
8347 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
8348 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
8349 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
8350 to indicate that the input file should be piped into the command
8351 under test (via `cat FILE | $prog ...').
8353 * src/remove.c (remove_entry): Emit a better diagnostic when rm
8354 (without -r) fails to remove a directory on a non-Linux system.
8355 This change affects only newer Solaris systems (with priv_*
8356 functions like priv_allocset). Reported by Keith Thompson.
8358 * tests/rm/dir-nonrecur: New file/test for the above fix.
8359 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
8361 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
8363 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
8364 POSIX 1002.1-2001 requires.
8365 * src/tail.c (parse_obsolete_option): Implement this.
8366 Problem reported by Vincent Lefevre.
8367 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
8368 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
8369 (test_vector): Add special cases for _POSIX2_VERSION, and
8370 regularize the old ones a bit.
8371 * tests/touch/obsolescent: Add y2000 test.
8373 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
8375 * src/dd.c (skip): Fix off-by-one error reported by
8376 Theodoros V. Kalamatianos.
8378 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8380 * tests/mkdir/p-3: Require that the test be run as non-root.
8381 Problem and trivial fix reported by Theodoros V. Kalamatianos.
8383 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
8385 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
8386 boundary between DEST and SOURCE in the result.
8388 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
8390 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
8391 back to text, to sync with documentation and for backwards
8394 2005-10-25 Jim Meyering <jim@meyering.net>
8396 * tests/dircolors/simple (other-wr): Add an explicit test for
8397 the dircolors bug (NULL-dereference) fixed yesterday.
8399 2005-10-24 Jim Meyering <jim@meyering.net>
8401 * src/tac.c (tac_file): When determining whether a file is seekable,
8402 also test whether it is a tty. Using only the lseek-based test would
8403 give a false positive on Solaris. Reported by Peter Fales.
8405 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
8407 * tests/install/d-slashdot: New test, for "install -d" failure.
8408 * tests/install/Makefile.am (TESTS): Add d-slashdot.
8409 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
8410 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
8412 2005-10-24 Jim Meyering <jim@meyering.net>
8414 * src/dircolors.c (ls_codes): Add missing comma.
8415 Anonymous report and patch from
8416 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
8418 * src/dircolors.c: Add compile-time assertion that the slack_codes
8419 and ls_codes arrays have the same number of elements. This would
8420 have prevented the above-fixed bug.
8422 * src/expand.c (parse_tab_stops): Add a comment to make this function
8423 identical to the one in unexpand.c.
8424 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
8425 identical to the one in expand.c.
8427 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
8429 2005-10-23 Jim Meyering <jim@meyering.net>
8431 * src/md5sum.c (digest_check, main): Use ptr_align rather than
8432 a dangerous pointer-value-to-`unsigned' cast.
8433 * NEWS: mention the new sha* programs.
8434 * AUTHORS: Add new sha* programs.
8436 2005-08-28 David Madore <david.madore@ens.fr>
8438 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
8439 * README: Add their names to the list.
8440 * src/md5sum.c: Provide framework for computing sha-2 hashes.
8441 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
8442 Rules for compiling sha-2 utilities
8443 (noinst_HEADERS): Remove checksum.h.
8444 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
8446 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
8447 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
8448 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
8449 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
8450 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
8451 sha384sum, sha512sum test scripts here rather that each in its
8454 2005-08-28 David Madore <david.madore@ens.fr>
8456 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
8457 of the FIPS test vectors).
8459 2005-10-23 Jim Meyering <jim@meyering.net>
8461 * configure.ac: Use 6.0-cvs as the version string.
8462 * NEWS: Adjust accordingly.
8467 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
8469 Copying and distribution of this file, with or without
8470 modification, are permitted provided the copyright notice
8471 and this notice are preserved.