1 2007-08-24 Jim Meyering <jim@meyering.net>
3 bootstrap: Ignore more.
4 * bootstrap (symlink_to_dir): Add a directory name like
5 uniwidth to e.g., lib/.gitignore.
6 (slurp): Handle the sys_stat_.h -> sys mapping, too.
7 * .hgignore: Remove this file, too.
8 * Makefile.am (EXTRA_DIST): Remove .gitignore and .hgignore.
10 No longer version-control .???ignore files in lib/, m4/, and po/.
11 * .gitignore: Ignore a few files in lib/, m4/, and po/ that are not
12 picked up automatically.
13 * lib/.gitignore, lib/.cvsignore: Remove files.
14 * m4/.gitignore, m4/.cvsignore: Remove files.
15 * po/.gitignore, po/.cvsignore: Remove files.
17 bootstrap: when fetching .po files, do not remove .gmo files.
18 * bootstrap (get_translations): Don't remove *.gmo files!
19 They can be expensive to regenerate.
21 Create .gitignore and/or .cvsignore from scratch, if absent.
22 This is in preparation for my removing those files from version
23 control in the directories managed by gnulib-tool.
24 * bootstrap: New setting: vc_ignore.
25 (insert_sorted_if_absent): Create $file if absent.
26 Adapt to new, possibly empty, list: $vc_ignore.
28 * src/system.h (fseeko, ftello): Remove now-unneeded definitions.
29 * src/od.c (LDBL_DIG): Remove now-unneeded definition.
31 Arrange to use tag names like vM.N, rather than COREUTILS-M_N.
32 * Makefile.maint (this-vc-tag) [git]: Simply use v$(VERSION).
33 (this-vc-tag-regexp): New variable.
34 (vc-tag-check): Use it, rather than $(this-vc-tag).
36 2007-08-23 Jim Meyering <jim@meyering.net>
38 * src/dircolors.hin: Add xterm-16color, xterm-88color and eterm-color.
39 Suggestion from Dan Nicolaescu.
41 Don't let ln be a party to destroying user data.
42 * src/ln.c: Include "file-set.h", "hash.h" and "hash-triple.h".
43 (dest_set, DEST_INFO_INITIAL_CAPACITY): New globals.
44 (do_link): Refuse to remove a just-created link.
45 Record a name,dev,ino triple for each link we create.
46 (main): Initialize dest_set, if needed.
47 * tests/mv/childproof: Test for the above fix.
48 * NEWS: Document this.
49 Reported by Eric Blake.
51 Move functions from copy.c into new modules, since ln needs them, too.
52 * bootstrap.conf (gnulib_modules): Add file-set.
53 * gl/lib/file-set.c (record_file, seen_file): Functions from copy.c.
54 * gl/lib/file-set.h: Add prototypes.
55 * gl/lib/hash-triple.c (triple_hash, triple_hash_no_name):
56 (triple_compare, triple_free): Functions from copy.c.
57 * gl/lib/hash-triple.h (struct F_triple): Define. From copy.c.
59 * gl/modules/file-set: New module.
60 * gl/modules/hash-triple: New module.
61 * src/Makefile.am (copy_sources): New variable.
62 (ginstall_SOURCES, cp_SOURCES, mv_SOURCES): Use it.
63 * src/copy.c: Include hash-triple.h.
64 No longer include hash-pjw.h.
65 (copy_internal): Don't pass a NULL third argument to record_file,
66 since that function no longer accepts that.
67 (record_file): Move this function to file-set.c.
68 Along the way, remove the code to allow a NULL stat-buffer pointer.
70 (seen_file): Move this function to file-set.c.
71 (struct F_triple): Move declaration to hash-triple.h.
72 (triple_compare, triple_free, triple_hash, triple_hash_no_name):
73 Move these functions to hash-triple.c.
75 bootstrap: generate more ignorable names
76 * bootstrap (slurp): When generating ignorable names, also map
77 .sin to .sed, .gperf to .c, and .y to .c.
79 * Makefile.maint (patch-check): Don't remove temporaries upon failure.
81 2007-08-22 Jim Meyering <jim@meyering.net>
83 * src/c99-to-c89.diff: Adjust offsets.
85 Change "rm --verbose -r a//" not to print extra slashes in a///b
86 * src/remove.c (push_dir): Don't copy trailing slashes onto the stack.
87 Reported by François Pinard.
88 * tests/rm/v-slash: New file. Test for the above change.
89 * tests/rm/Makefile.am (TESTS): Add v-slash.
91 * src/date.c: Don't include "getline.h", now removed from gnulib;
92 its declarations are now in <stdio.h>.
93 * src/md5sum.c: Likewise.
94 * src/dircolors.c: Likewise.
96 * src/copy.c (DEST_INFO_INITIAL_CAPACITY): Correct a comment.
98 2007-08-21 Jim Meyering <jim@meyering.net>
100 By default, do not install hostname anymore.
101 * configure.ac: Add "hostname" to the list of not-installed programs.
102 * src/Makefile.am (no_install__progs): Add "hostname" here, too.
103 * NEWS: Mention this.
105 2007-08-20 Bob Proulx <bob@proulx.com>
107 Clarify touch documentation of file arguments.
108 * src/touch.c (usage): Improve wording of documentation regarding
109 file argument handling and special handling of - argument.
110 * doc/coreutils.texi (touch invocation): Likewise.
111 Documentation problem reported by Vincent Lefevre.
113 2007-08-20 Paul Eggert <eggert@cs.ucla.edu>
115 * NEWS: The old cp -p bug affected coreutils releases before 6.0.
116 Problem reported by Soren Spies in
117 <http://lists.gnu.org/archive/html/bug-coreutils/2007-08/msg00106.html>.
118 To be conservative, just say the bug was in all versions through 6.6.
120 2007-08-19 Eric Blake <ebb9@byu.net>
122 Avoid consuming too much seekable input when yesno is used.
123 * bootstrap.conf (gnulib_modules): Add closein.
124 * src/system.h (includes): Also include closein.h.
125 * src/mv.c (main): Use close_stdin, not close_stdout.
126 * src/cp.c (main): Likewise.
127 * src/ln.c (main): Likewise.
128 * src/rm.c (main): Likewise.
129 * src/install.c (main): Likewise.
130 * NEWS: Document the fix.
132 2007-08-18 Jim Meyering <jim@meyering.net>
134 Use new "idcache.h" header.
135 * src/ls.c: Remove ancient declarations of getuser and getgroup.
136 Include "idcache.h", instead.
138 Run each Coreutils.pm-based test in its own subdirectory.
139 * tests/CuTmpdir.pm: New file.
140 * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm.
141 * tests/misc/od, tests/misc/base64, tests/misc/basename:
142 * tests/misc/cut, tests/misc/date, tests/misc/dirname:
143 * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail:
144 * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum:
145 * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum:
146 * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag:
147 * tests/misc/wc-files0-from, tests/misc/xstrtol:
148 * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from:
149 * tests/expr/basic, tests/factor/basic, tests/fmt/basic:
150 * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1:
151 * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec:
152 * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1:
153 * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it.
154 * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test",
155 not "../../src/test", so it works when run from a subdirectory.
156 * tests/ls-2/tests: Create temp files and dirs from within the perl
157 script, so that they're removed, when run from a subdirectory.
158 * tests/ls-2/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir,
159 so we can use "$ENV{abs_top_builddir}/src/test" in a test script.
161 2007-08-16 Jim Meyering <jim@meyering.net>
163 Consolidate od tests.
164 * tests/misc/od: Perform od-zero-len's test here.
165 Include boilerplate code, so tests run in a subdirectory.
166 * tests/misc/od-zero-len: Remove this file.
168 * tests/ls/time-1: Include sample-test boilerplate code.
169 Remove the then-unnecessary, hard-coded envvar "unset" commands.
171 2007-08-15 Jim Meyering <jim@meyering.net>
173 od --skip (-j) works even on files in /proc, when the kernel lies
174 * src/od.c (skip): Don't let kernel misinformation (nonempty files
175 in /proc with stat.st_size == 0) make "od -j N" misbehave.
176 Patch by Paul Eggert.
177 * NEWS: Document this work-around.
178 * tests/misc/od-zero-len: New file, test for the above.
180 * src/printf.c (usage): Adjust summary to also mention OPTIONs.
183 2007-08-14 Jim Meyering <jim@meyering.net>
185 od: fix a bug that arises when skipping exact length of file
186 * NEWS: Document the bug fix.
187 * src/od.c (skip): Call fseek even when n_skip is exactly the
188 same as the length of the current file. Otherwise, the next
189 iteration would use unadjusted input stream pointer, thus ignoring
190 the desired "skip". Report and patch by Paul GHALEB.
192 * tests/misc/od: New file, test for the above.
193 * tests/misc/Makefile.am (TESTS): Add od.
195 2007-08-10 Paul Eggert <eggert@cs.ucla.edu>
197 Accommodate more xstrtol changes.
198 * src/df.c (long_options): Don't bother prepending "--" to long
199 options that OPT_STR might decode, as that hack is no longer needed.
200 (main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR.
201 * src/du.c (long_options, main): Likewise.
202 * src/ls.c (decode_switches): Likewise.
203 * src/od.c (long_options, main): Likewise.
204 * src/pr.c (first_last_page, main): Likewise.
205 * src/sort.c (long_options, specify_sort_size): Likewise.
206 * src/pr.c (first_last_page): Accept option index and option char
207 instead of an assembled option string. All callers changed.
208 * src/sort.c (specify_sort_size): Likewise.
209 * src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT):
212 2007-08-05 Jim Meyering <jim@meyering.net>
214 Encapsulate a static variable.
215 * src/system.h (opt_str_storage): Move static var into...
216 (short_opt_str): ... new static inline function.
217 (OPT_STR): Use the new function.
219 2007-08-04 Jim Meyering <jim@meyering.net>
221 Exercise xstrtol's diagnostics via pr's --pages option.
222 * tests/misc/xstrtol: New file.
223 * tests/misc/Makefile.am (TESTS): Add xstrtol.
225 2007-08-04 Paul Eggert <eggert@cs.ucla.edu>
227 Adapt to new human and xstrtol API.
228 * src/df.c (long_options): Prepend "--" to long options that
229 OPT_STR might decode.
230 * src/du.c (long_options): Likewise.
231 * src/od.c (long_options): Likewise.
232 * src/sort.c (long_options): Likewise.
233 * src/df.c (main): Adjust to new human and xstrtol API.
234 * src/du.c (main): Likewise.
235 * src/ls.c (decode_switches): Likewise.
236 * src/od.c (main): Likewise.
237 * src/pr.c (first_last_page): Likewise. New argument OPTION.
239 * src/sort.c (specify_sort_size): New arg OPTION. All callers
240 changed. Adjust to new xstrtol API.
241 * src/system.h (opt_str_storage): New static var.
242 (OPT_STR, LONG_OPT_STR, OPT_STR_INIT): New macros.
244 2007-08-02 Jim Meyering <jim@meyering.net>
246 Adjust one more test to accommodate the recent fts change.
247 This matters only on systems with insufficient openat support.
248 * tests/du/inacc-dest: Adjust expected diagnostic.
250 Adjust the other two "no-x" tests and unify all three.
251 * tests/du/no-x: Factor out du-specific bits.
252 * tests/chmod/no-x: Use the same code.
253 * tests/chgrp/no-x: Use the same code.
255 Adapt du's no-x test not to fail on older Linux systems.
256 * tests/du/no-x: Accept a third variant of the diagnostic.
258 2007-07-31 Jim Meyering <jim@meyering.net>
260 du: print size (probably incomplete) of each inaccessible directory
261 * src/du.c (process_file): Print what we know of the size of a
262 directory even when it is inaccessible. What we print is just the
263 size of the directory itself, not counting any of its contents.
264 * tests/du/inacc-dir: Test for this.
265 * NEWS: Mention this change.
267 Add a test for du not counting size of inaccessible directories.
268 * tests/du/inacc-dir: New file. Test for fts.c bug fixed yesterday.
269 * tests/du/Makefile.am (TESTS): Add inacc-dir.
270 * NEWS: Mention the bug fix.
272 2007-07-28 Jim Meyering <jim@meyering.net>
274 Attempt to copy a regular file, even if stat says it is empty.
275 * NEWS: Document this bug fix.
276 * src/copy.c (copy_reg): Read from a regular file, even if it
277 appears (stat.st_size == 0) to be empty. This reverts an
278 optimization introduced on 2005-11-23 for coreutils-6.0.
279 Otherwise, "cp /proc/cpuinfo /tmp" creates an empty file,
280 on e.g., linux-2.6.20.
281 * tests/cp/proc-zero-len: New file. Test for the above.
282 * tests/cp/Makefile.am (TESTS): Add proc-zero-len.
283 Reported by Dan Berrangé.
285 2007-07-26 Bob Proulx <bob@proulx.com>
287 sort: Improve sort --random-sort test.
288 * tests/misc/sort-rand: If "locale" is available pick a random
289 non-C locale and check "sort --random-sort" behavior using it.
291 2007-07-24 Jim Meyering <jim@meyering.net>
293 sort: add a test to exercise the affected code.
294 * tests/sort/Test.pm (realloc-buf): Exercise the code that changed
295 yesterday. No other test in all of "make check" does this.
296 * NEWS: Mention the fix.
298 2007-07-23 Paul Eggert <eggert@cs.ucla.edu>
300 sort: avoid unaligned access.
301 * src/sort.c (fillbuf): When enlarging the line buffer, ensure that
302 the new size is a multiple of "sizeof (struct line)". This avoids
303 alignment problems when indexing from the end of the buffer.
304 Problem reported by Andreas Schwab in
305 <http://lists.gnu.org/archive/html/bug-coreutils/2007-07/msg00158.html>.
307 2007-07-23 Jim Meyering <jim@meyering.net>
309 Update all copyright notices to use the newer form (e.g., remove
310 the postal address, and add the 'licenses' URL).
312 * COPYING: Update to Version 3.
314 Update c99/c89 patch for new, copyright-change-induced offsets.
315 * Makefile.maint (patch-check): Filter out '^Only in...' lines.
316 * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
318 2007-07-22 Jim Meyering <jim@meyering.net>
320 * configure.ac: Arrange to rerun configure whenever src/Makefile.am
321 changes. That file contains the list of program names that must be
322 substituted into files like man/Makefile.
323 Add quotes around AC_SUBST arguments.
325 2007-07-21 Paul Eggert <eggert@cs.ucla.edu>
327 * bootstrap (slurp): Work even in environments where "ls" defaults
328 to "ls -A". Put in a FIXME, though, since the current code does
329 not slurp files whose names start with ".", and this looks like
330 it might be a troublesome area.
332 2007-07-20 Jim Meyering <jim@meyering.net>
334 Document and add a test for today's sort bug fix.
335 * NEWS: Describe the bug fix.
336 * tests/sort/Test.pm (obs-inval): Add a test for today's fix.
338 2007-07-20 Andreas Schwab <schwab@suse.de>
340 * src/sort.c (main): Don't free a pointer to non-malloc'd memory.
342 2007-07-19 Jim Meyering <jim@meyering.net>
344 Fix a portability bug in the new ls-color test.
345 * tests/ls/stat-free-symlinks: Don't rely on the ability of
346 a built-in printf to interpolate '\e'. Use '\033' instead.
348 2007-07-18 Jim Meyering <jim@meyering.net>
350 "cp -i --update older newer" no longer prompts; same for mv
351 * src/copy.c (copy_internal): Perform "update" check before the
352 possible interactive prompt. Reported by zeno_AT_biyg_DOT_org
353 in <http://bugzilla.redhat.com/248591>
354 * tests/mv/update: Add tests for the above.
355 * NEWS: Mention the bug fix.
357 2007-07-15 Jim Meyering <jim@meyering.net>
359 ls --color: Don't stat symlinks when neither ORPHAN nor MISSING
360 attribute has a color.
361 * src/ls.c (main): Don't set check_symlink_color when C_EXEC is
362 colored, unless ln=target (aka color_symlink_as_referent) is set.
363 (gobble_file): Set f->linkok = true also when !check_symlink_color.
364 http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10608/focus=10927
365 Reported by Jeremy Maitin-Shepard.
366 * tests/strace: New file, contents extracted from...
367 * tests/mv/atomic: ...here. Source strace.
368 * tests/ls/stat-free-symlinks: New file. Test for the above.
369 Use strace to ensure that in this corner case, ls does not call stat.
370 * tests/ls/Makefile.am (TESTS): Add stat-free-symlinks.
371 * tests/Makefile.am (EXTRA_DIST): Add strace.
373 2007-07-14 Jim Meyering <jim@meyering.net>
375 Remove long-deprecated options.
376 * NEWS: Mention this.
377 * src/df.c, src/ls.c: Remove --kilobytes option.
378 * src/du.c: Remove --kilobytes and --megabytes options.
379 * src/who.c: Remove -i and --idle options.
380 * src/ptx.c: Remove --copyright option.
382 Change interface: make 2nd param _space_-separated, not comma-separated
383 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Remove now-
384 unnecessary use of tr.
386 * configure.ac: Adjust caller, as well as the code that ensures the
387 2nd parameter stays in sync with the list in src/Makefile.am.
389 2007-07-14 Karel Zak <kzak@redhat.com>
391 * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix typo: s/$2/$1/.
392 (gl_INCLUDE_EXCLUDE_PROG): Quote first use of $2 parameter.
393 Don't mix comma- and space-separated lists.
394 Patch from Karel Zak.
396 2007-07-13 Jim Meyering <jim@meyering.net>
398 Warn about non-portable use of unescaped backslash at end of string,
399 and treat it as if it were escaped.
400 * src/tr.c (unquote): Considering that such usage would make GNU tr
401 from coreutils-5.2.1 and earlier *fail*, the least we can do now is
402 to warn about it. Solaris' tr ignores it.
403 * NEWS: Mention this.
405 Use proper backslash-quoting inside backticks.
406 * configure.ac: Otherwise we run afoul of strict GNU tr:
407 a string ending in a lone backslash would provoke a failure.
409 2007-07-12 Jim Meyering <jim@meyering.net>
411 Expand default-no-install prog list in ./configure --help output,
412 and fix some []-quoting bugs in sed expressions.
413 * configure.ac: Hard-code the list, "arch,su" here as well
414 as in src/Makefile.am, and ensure the two stay in sync.
415 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Use $2,
416 rather than the nearly-equivalent shell variable.
417 Karel Zak reported that ./configure --help's output included
418 the literal string, $gl_no_install_progs_default.
420 Clean up include-exclude-prog.m4.
421 * m4/include-exclude-prog.m4 (gl_ADD_PROG): Don't modify MAN.
422 (gl_REMOVE_PROG): Likewise.
423 Add omitted "\>" in sed regexp.
424 Remove any leading or trailing spaces.
425 (gl_ADD_PROG): Remove any leading space.
426 * configure.ac: Instead, derive $MAN from $optional_bin_progs.
427 Append $(EXEEXT) to *all* names, not just the first one.
429 2007-07-11 Jim Meyering <jim@meyering.net>
431 If there's a GPL vN copyright comment, require that N == 3.
432 * Makefile.maint (sc_GPL_version): New rule.
433 * tests/misc/arch: Fix the sole violation.
435 2007-07-10 Jim Meyering <jim@meyering.net>
437 Skip "arch" test if it's not built.
438 * tests/misc/Makefile.am (built_programs): Define.
439 (TESTS_ENVIRONMENT): Add $(built_programs), for...
440 * tests/misc/arch: ...this: skip the test if arch is not built.
441 * src/Makefile.am (built_programs.list): New rule.
442 * tests/Makefile.am (built_programs): Rename from all_programs.
443 (TESTS_ENVIRONMENT): Use built_programs, not all_programs.
444 * tests/help-version: Likewise.
445 * NEWS: Mention that using --enable-no-install-program=X may
446 cause "make check" to fail.
448 Add support for enabling/disabling installation of specified programs.
449 * NEWS: Mention new configure-time options.
450 Mention that neither arch nor su is built/installed, by default.
451 * m4/include-exclude-prog.m4: New file.
452 * configure.ac: Use new macro, gl_ADD_PROG, rather than
453 manually appending to OPTIONAL_BIN_PROGS and MAN.
454 Move the code that adds "df" to the list of programs to build from
455 m4/jm-macros into this file.
456 Use gl_INCLUDE_EXCLUDE_PROG, then handle special cases: ginstall, [.
457 (NO_INSTALL_PROGS_DEFAULT): AC_SUBST it. Used by man/Makefile.am.
458 * man/Makefile.am (dist_man_MANS): Remove from this list all man pages
459 corresponding to "bin" programs. Add $(MAN) instead.
460 (optional_mans): Remove all uses.
461 (check-x-vs-1): Adapt to work even though arch and su are typically
462 no longer built (and neither are their .1 files).
463 * src/Makefile.am (install_su): Rename from INSTALL_SU, now that
464 INSTALL_SU has a different meaning. Use the new $(INSTALL_SU) value.
466 2007-07-10 Karel Zak <kzak@redhat.com>
469 * NEWS: Mention arch.
470 * README: Add arch to the list of programs.
472 * src/uname.c: Include "uname.h".
473 (PROGRAM_NAME): Handle arch, too.
474 (ARCH_AUTHORS): Define.
475 (uname_long_options, arch_long_options): Renamed and new globals.
476 (usage): Handle arch-mode as well as uname-mode.
477 (decode_switches): New function, extracted from main,
478 to handle arch-mode as well as uname-mode.
479 (main): Handle both modes.
480 * src/uname-arch.c: New program, alias for "uname -m".
481 * src/uname-uname.c: New file, default uname mode.
482 * src/uname.h: New file, uname modes.
483 * src/Makefile.am (EXTRA_PROGRAMS): Add arch.
484 (uname_SOURCES, arch_SOURCES): Define.
485 * man/arch.x: New file.
486 * man/Makefile.am (dist_man_MANS): Add arch.1.
487 (arch.1): New dependency.
488 * tests/misc/arch: New test, compare "arch" with "uname -m"
489 * configure.ac (OPTIONAL_BIN_PROGS): Add arch.
491 * .x-sc_require_config_h: Exempt uname-arch.c and uname-uname.c
492 from the always-include-<config.h> rule.
494 2007-07-10 Jim Meyering <jim@meyering.net>
496 Change "version 2" to "version 3" in all copyright notices.
498 2007-07-09 Jim Meyering <jim@meyering.net>
500 Compensate for new c99'isms in seq.c.
501 * Makefile.maint (patch-check): Use -p1, not -p2, so a patch
502 generated via "make patch-check REGEN=1" actually works.
503 * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
505 2007-07-09 Pádraig Brady <P@draigBrady.com>
507 Fix the automatic number width formatting in seq.
508 * src/seq.c: Fix the -w logic. Ignore spaces and '+'
509 characters of input numbers when determining width.
510 Set format correctly for input numbers in scientific notation.
511 * tests/seq/basic: Add various number width tests.
512 Details: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10903>
514 2007-07-08 Jim Meyering <jim@meyering.net>
516 Run the coreutils-specific code only if tests/Makefile.am.in exists.
517 * bootstrap (mam_template): Move definition out of loop.
519 Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
520 * bootstrap (symlink_to_dir): Rename function from symlink_to_gnulib.
521 Add a directory parameter. Update all callers.
522 (cp_mark_as_generated): Also check for -- and link to -- files in gl/.
524 * THANKS: Add Pádraig Brady.
526 2007-07-08 Jim Meyering <jim@meyering.net>
528 Adapt to deeper hierarchy in gnulib.
529 * bootstrap (symlink_to_dir): If the destination directory doesn't
530 exist, create it. This is required at least for "lib/uniwidth/cjk.h".
532 Use <wchar.h>, not "wcwidth.h".
533 * src/wc.c: Now that gnulib provides the POSIX-specified <wchar.h>,
534 include it and <wctype.h>, rather than "wcwidth.h".
535 * src/ls.c: Include <wchar.h>, rather than "wcwidth.h".
537 2007-07-05 Jim Meyering <jim@meyering.net>
539 setuidgid: set all groups, not just the primary one.
540 I wanted to use the xgetgroups function from id.c, so factored
541 it out and made it into a non-exiting function (hence the "m"
542 prefix rather than "x").
543 * src/setuidgid.c (main): Use mgetgroups.
544 Include "mgetgroups.h".
546 * src/id.c (xgetgroups): Remove function.
547 Include "mgetgroups.h".
548 (print_group_list): Use mgetgroups, not xgetgroups.
550 * gl/modules/mgetgroups: New module.
551 * gl/lib/mgetgroups.c: New file. mgetgroups is derived from
552 id.c's xgetgroups function.
553 * bootstrap.conf (gnulib_modules): Add mgetgroups.
554 * gl/m4/mgetgroups.m4: New file.
555 * gl/lib/mgetgroups.h: New file.
557 * bootstrap: Merge in changes from gnulib.
559 * src/id.c: Include "getugroups.h" rather than declaring manually.
561 2007-07-04 Paul Eggert <eggert@cs.ucla.edu>
563 * NEWS: pr -F no longer suppresses the footer or the first two blank
565 * doc/coreutils.texi (pr invocation): Likewise. Also, a too-short
566 page length implies -t, not -T.
567 * src/pr.c (lines_per_header, lines_per_footer): Now constants.
568 (init_parameters): Don't try to change them.
569 (print_header): Use the same header and footer format regardless of
570 wither form feeds are being used.
571 (usage): Adjust to above change when describing too-short page length.
572 Too-short page length impliesy -t, not -T.
573 * tests/pr/2-S_f-t_notab: Adjust to the fact that -F now affects
574 only formfeed handling; it does not change the header.
575 * tests/pr/2-Sf-t_notab: Likewise.
576 * tests/pr/2f-t_notab: Likewise.
577 * tests/pr/2s_f-t_notab: Likewise.
578 * tests/pr/2s_w60f-t_nota: Likewise.
579 * tests/pr/2sf-t_notab: Likewise.
580 * tests/pr/2sw60f-t_notab: Likewise.
581 * tests/pr/2w60f-t_notab: Likewise.
582 * tests/pr/3a3f-0F: Likewise.
583 * tests/pr/3b3f-0F: Likewise.
584 * tests/pr/3b3f-0FF: Likewise.
585 * tests/pr/3b3f-FF: Likewise.
586 * tests/pr/3f-0F: Likewise.
587 * tests/pr/3f-FF: Likewise.
588 * tests/pr/Test.pm: Likewise.
589 * tests/pr/a3f-0F: Likewise.
590 * tests/pr/a3f-0FF: Likewise.
591 * tests/pr/a3f-FF: Likewise.
592 * tests/pr/b3f-0F: Likewise.
593 * tests/pr/b3f-0FF: Likewise.
594 * tests/pr/b3f-FF: Likewise.
595 * tests/pr/3-5l17f-t: Remove, since it's been renamed to another
596 file whose name has a line count 7 larger,
597 reflecting the new line count needed for this behavior.
598 * tests/pr/3a3l8f-t: Likewise.
599 * tests/pr/3b3l8f-t: Likewise.
600 * tests/pr/3l17f-t: Likewise.
601 * tests/pr/3ml17f-t: Likewise.
602 * tests/pr/Ja3l17f-lm: Likewise.
603 * tests/pr/Jb3l17f-lm: Likewise.
604 * tests/pr/Jml17f-lm-lo: Likewise.
605 * tests/pr/W-72l17f-ll: Likewise.
606 * tests/pr/W20l17f-ll: Likewise.
607 * tests/pr/W26l17f-ll: Likewise.
608 * tests/pr/W27l17f-ll: Likewise.
609 * tests/pr/W28l17f-ll: Likewise.
610 * tests/pr/W35Ja3l17f-lm: Likewise.
611 * tests/pr/W35Jb3l17f-lm: Likewise.
612 * tests/pr/W35Jml17f-lmlo: Likewise.
613 * tests/pr/W35a3l17f-lm: Likewise.
614 * tests/pr/W35b3l17f-lm: Likewise.
615 * tests/pr/W35ml17f-lm-lo: Likewise.
616 * tests/pr/W72Jl17f-ll: Likewise.
617 * tests/pr/a3l17f-lm: Likewise.
618 * tests/pr/a3l8f-t: Likewise.
619 * tests/pr/b3l17f-lm: Likewise.
620 * tests/pr/b3l8f-t: Likewise.
621 * tests/pr/l17f-t: Likewise.
622 * tests/pr/ml17f-0F: Likewise.
623 * tests/pr/ml17f-lm-lo: Likewise.
624 * tests/pr/ml17f-t: Likewise.
625 * tests/pr/ml17f-t-0F: Likewise.
626 * tests/pr/n+2-5l17f-0FF: Likewise.
627 * tests/pr/n+2l17f-0FF: Likewise.
628 * tests/pr/n+2l17f-bl: Likewise.
629 * tests/pr/n+3l17f-0FF: Likewise.
630 * tests/pr/n+3l17f-bl: Likewise.
631 * tests/pr/n+3ml13f-bl-FF: Likewise.
632 * tests/pr/n+3ml17f-bl-tn: Likewise.
633 * tests/pr/n+3ml17f-tn-bl: Likewise.
634 * tests/pr/n+4b2l10f-0FF: Likewise.
635 * tests/pr/n+5-8b3l10f-FF: Likewise.
636 * tests/pr/n+5a3l6f-0FF: Likewise.
637 * tests/pr/n+6b3l6f-FF: Likewise.
638 * tests/pr/nJml17f-lmlmlo: Likewise.
639 * tests/pr/nJml17f-lmlolm: Likewise.
640 * tests/pr/nN1+3l17f-bl: Likewise.
641 * tests/pr/nN15l17f-bl: Likewise.
642 * tests/pr/nSml13-bl-FF: Likewise.
643 * tests/pr/nSml13-t-t-FF: Likewise.
644 * tests/pr/nSml13-t-tFFFF: Likewise.
645 * tests/pr/nSml17-bl-FF: Likewise.
646 * tests/pr/nSml17-t-t-FF: Likewise.
647 * tests/pr/nSml17-t-tFFFF: Likewise.
648 * tests/pr/nl17f-bl: Likewise.
649 * tests/pr/o3Jml17f-lm-lo: Likewise.
650 * tests/pr/o3a3Sl17f-tn: Likewise.
651 * tests/pr/o3a3Snl17f-tn: Likewise.
652 * tests/pr/o3a3l17f-tn: Likewise.
653 * tests/pr/o3b3Sl17f-tn: Likewise.
654 * tests/pr/o3b3Snl17f-tn: Likewise.
655 * tests/pr/o3b3l17f-tn: Likewise.
656 * tests/pr/o3mSl17f-bl-tn: Likewise.
657 * tests/pr/o3mSnl17fbltn: Likewise.
658 * tests/pr/o3ml17f-bl-tn: Likewise.
659 * tests/pr/w72l17f-ll: Likewise.
660 * tests/pr/3-5l24f-t: New file, containing the contents of the
661 file with the same name but with the line count smaller by 7,
662 reflecting the new behavior with -F.
663 * tests/pr/3a3l15f-t: Likewise.
664 * tests/pr/3b3l15f-t: Likewise.
665 * tests/pr/3l24f-t: Likewise.
666 * tests/pr/3ml24f-t: Likewise.
667 * tests/pr/Ja3l24f-lm: Likewise.
668 * tests/pr/Jb3l24f-lm: Likewise.
669 * tests/pr/Jml24f-lm-lo: Likewise.
670 * tests/pr/W-72l24f-ll: Likewise.
671 * tests/pr/W20l24f-ll: Likewise.
672 * tests/pr/W26l24f-ll: Likewise.
673 * tests/pr/W27l24f-ll: Likewise.
674 * tests/pr/W28l24f-ll: Likewise.
675 * tests/pr/W35Ja3l24f-lm: Likewise.
676 * tests/pr/W35Jb3l24f-lm: Likewise.
677 * tests/pr/W35Jml24f-lmlo: Likewise.
678 * tests/pr/W35a3l24f-lm: Likewise.
679 * tests/pr/W35b3l24f-lm: Likewise.
680 * tests/pr/W35ml24f-lm-lo: Likewise.
681 * tests/pr/W72Jl24f-ll: Likewise.
682 * tests/pr/a3l15f-t: Likewise.
683 * tests/pr/a3l24f-lm: Likewise.
684 * tests/pr/b3l15f-t: Likewise.
685 * tests/pr/b3l24f-lm: Likewise.
686 * tests/pr/l24f-t: Likewise.
687 * tests/pr/ml24f-0F: Likewise.
688 * tests/pr/ml24f-lm-lo: Likewise.
689 * tests/pr/ml24f-t: Likewise.
690 * tests/pr/ml24f-t-0F: Likewise.
691 * tests/pr/n+2-5l24f-0FF: Likewise.
692 * tests/pr/n+2l24f-0FF: Likewise.
693 * tests/pr/n+2l24f-bl: Likewise.
694 * tests/pr/n+3l24f-0FF: Likewise.
695 * tests/pr/n+3l24f-bl: Likewise.
696 * tests/pr/n+3ml20f-bl-FF: Likewise.
697 * tests/pr/n+3ml24f-bl-tn: Likewise.
698 * tests/pr/n+3ml24f-tn-bl: Likewise.
699 * tests/pr/n+4b2l17f-0FF: Likewise.
700 * tests/pr/n+5-8b3l17f-FF: Likewise.
701 * tests/pr/n+5a3l13f-0FF: Likewise.
702 * tests/pr/n+6b3l13f-FF: Likewise.
703 * tests/pr/nJml24f-lmlmlo: Likewise.
704 * tests/pr/nJml24f-lmlolm: Likewise.
705 * tests/pr/nN1+3l24f-bl: Likewise.
706 * tests/pr/nN15l24f-bl: Likewise.
707 * tests/pr/nSml20-bl-FF: Likewise.
708 * tests/pr/nSml20-t-t-FF: Likewise.
709 * tests/pr/nSml20-t-tFFFF: Likewise.
710 * tests/pr/nSml24-bl-FF: Likewise.
711 * tests/pr/nSml24-t-t-FF: Likewise.
712 * tests/pr/nSml24-t-tFFFF: Likewise.
713 * tests/pr/nl24f-bl: Likewise.
714 * tests/pr/o3Jml24f-lm-lo: Likewise.
715 * tests/pr/o3a3Sl24f-tn: Likewise.
716 * tests/pr/o3a3Snl24f-tn: Likewise.
717 * tests/pr/o3a3l24f-tn: Likewise.
718 * tests/pr/o3b3Sl24f-tn: Likewise.
719 * tests/pr/o3b3Snl24f-tn: Likewise.
720 * tests/pr/o3b3l24f-tn: Likewise.
721 * tests/pr/o3mSl24f-bl-tn: Likewise.
722 * tests/pr/o3mSnl24fbltn: Likewise.
723 * tests/pr/o3ml24f-bl-tn: Likewise.
724 * tests/pr/w72l24f-ll: Likewise.
726 2007-06-23 Jim Meyering <jim@meyering.net>
728 Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0.
729 * src/base64.c (main): Likewise.
730 * src/install.c (setdefaultfilecon): Likewise.
731 * src/sort.c (main): Likewise.
732 * Makefile.maint (sc_prohibit_strcmp): New rule.
733 * .x-sc_prohibit_strcmp: New file, to list the few exceptions.
734 * Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp.
736 2007-06-22 Paul Eggert <eggert@cs.ucla.edu>
738 * NEWS: seq no longer mishandles obvious cases like
739 "seq 0 0.000001 0.000003" by omitting the last output number.
740 * doc/coreutils.texi (seq invocation): Remove advice about workaround
741 for seq off-by-one problem, since the bug is fixed now. Replace
742 it with more-generic advice about rounding errors.
743 * src/seq.c (long_double_format, print_numbers):
744 New arg NUMERIC_FORMAT. All uses changed.
746 2007-06-22 Pádraig Brady <P@draigBrady.com> (trivial change)
748 * tests/seq/basic: Add test cases for seq off-by-one problem.
750 2007-06-22 Jim Meyering <jim@meyering.net>
752 * src/stat.c (long_options): Add a FIXME comment to help ensure
753 that the deprecated and undocumented "--filesystem" option is
756 2007-06-18 Paul Eggert <eggert@cs.ucla.edu>
758 A few more symlink-related fixes. Fix a bug triggered by cp
759 --parents and symlinks. Close some race conditions possible when
760 the destination replaces a newly-created file with a symlink.
761 * NEWS: Document that 'cp --parents' no longer mishandles
762 symlinks in file name components of source.
763 * src/copy.c (HAVE_LCHOWN): Default to false.
764 (lchown) [!defined HAVE_LCHOWN]: Define to chown, for convenience.
765 * src/cp.c (lchown) [!HAVE_LCHOWN]: Likewise.
766 * src/install.c (lchown [!HAVE_LCHOWN]: Likewise.
767 * src/copy.c (set_owner): Use lchown instead of chown, for safety
768 in case the file got replaced by a symlink in the meantime.
769 * src/cp.c (re_protect): Likewise.
770 * src/install.c (change_attributes): Likewise.
771 * src/copy.c (copy_internal): Use ordinary C rather than an #if.
772 * src/cp.c (lchown) [!HAVE_LCHOWN]: Define to chown, for convenience.
773 (struct dir_attr): Cache the entire struct stat of the directory,
774 rather than just its mode, so that we needn't stat the directory
775 twice (which can lead to races).
776 (re_protect): Don't use XSTAT as that's not appropriate in
777 this context (symlinks should be followed here). Instead, use
778 the cached stat value.
779 (make_dir_parents_private): Save dir's entire struct stat, not
781 * tests/cp/cp-parents: Add test to check against bug with
782 cp --parents and symlinks.
784 2007-06-18 Jim Meyering <jim@meyering.net>
786 Use mreadlink_with_size (doesn't exit), not xreadlink_with_size.
787 * bootstrap.conf (gnulib_modules): Add readlink-with-size.
788 Remove xreadlink and xreadlink-with-size.
789 * src/copy.c (copy_internal): Use mreadlink_with_size,
790 not xreadlink_with_size.
791 * src/ls.c (get_link_name): Likewise.
792 * src/readlink.c (main): Likewise.
793 * src/stat.c (print_stat): Likewise.
795 * README-hacking: Don't mention Gzip 1.2.4, now that 1.3.12 is out.
797 2007-06-16 Jim Meyering <jim@meyering.net>
799 Make chgrp and chown diagnostics consistent.
800 * src/chown.c (main): Emit the diagnostic before the file name,
801 not after it, to be consistent with chgrp's diagnostic.
802 * src/chgrp.c (parse_group): Emit a ":" between the diagnostic
804 Reported by Egmont Koblinger.
805 * THANKS: Add Egmont Koblinger.
807 2007-06-15 Paul Eggert <eggert@cs.ucla.edu>
809 Correct cp's handling of destination symlinks in some cases.
810 * NEWS: "cp" no longer considers a destination symlink to be the
811 same as the referenced file when copying links or making backups.
812 * src/copy.c (copy_reg): When following a symlink, use the
813 followed name in later chown etc. requests, so that the created
814 file is affected, rather than the symlink. Use O_NOFOLLOW on
815 source when not dereferencing symlinks; this avoids a race.
816 Preserve errno correctly when doing multiple open attempts on the
818 (copy_internal): Follow destination symlinks only when copying a
819 regular file and only when we don't intend to remove or rename the
820 destination first, regardless of whether following source
821 symlinks; this is because since POSIX and tradition (e.g.,
822 FreeBSD) say we should ordinarily follow destination symlinks if
823 the system calls would ordinarily do so.
824 * src/copy.h (struct cp_options): Add comment that 'dereference'
825 is only for source files.
826 * src/cp.c (usage): Note that --derereference etc. are only for
828 (make_dir_parents_private): Follow symlinks, regardless of whether
829 --dereference is specified, because these are destination symlinks.
830 * tests/cp/same-file: Adjust tests to match revised behavior.
831 Filter out perror output since it might vary from host to host.
832 Use sed alone instead of also using echo.
834 * doc/coreutils.texi (cp invocation): Document the behavior better when
835 the destination is a symlink. Clarify source versus destination
836 symlinks. Describe the new behavior for destination symlinks.
838 2007-06-15 Jim Meyering <jim@meyering.net>
840 * src/copy.c: Include "canonicalize.h".
841 (copy_reg): Use canonicalize_filename_mode to follow the symlink,
842 so that we can always open with O_EXCL and avoid a race.
844 2007-06-15 Jim Meyering <jim@meyering.net>
846 Don't include "quote.h" when it is not used.
847 * src/md5sum.c: Remove unnecessary inclusion of "quote.h".
848 * src/expr.c: Likewise.
849 * src/shred.c: Likewise.
850 * Makefile.maint (sc_prohibit_quote_without_use): New rule.
851 * src/c99-to-c89.diff: Adjust offsets.
853 2007-06-14 Paul Eggert <eggert@cs.ucla.edu>
855 Clarify what "cat" documentation means by "blank" lines.
856 * doc/coreutils.texi (cat invocation): "Blank" lines actually mean
858 * src/cat.c (usage): Say that "nonblank" means nonempty. Clarify
861 2007-06-13 Jim Meyering <jim@meyering.net>
863 rmdir: give better diagnostics
864 * src/rmdir.c (remove_parents): Give a more descriptive/consistent
865 diagnostic upon failure.
867 Suggestion from Joey Hess.
868 * THANKS: Add Joey Hess.
870 Don't include "quotearg.h" when it is not used.
871 * Makefile.maint (sc_prohibit_quotearg_without_use): New rule.
872 * src/cp.c: Don't include "quotearg.h". It wasn't used.
874 * README-hacking: List Gperf as a build-requirement, too.
875 Reported by Steve Ward.
877 2007-06-11 Jim Meyering <jim@meyering.net>
879 * README: Mention README-hacking, for whose who start from
880 cloned/checked-out sources rather than from a distribution tarball.
881 Reported by Steve Ward.
882 * THANKS: Add Steve Ward.
884 2007-06-10 Jim Meyering <jim@meyering.net>
886 bug-fix: cp would fail to write through a dangling symlink
887 * NEWS: Mention the bug fix.
888 * src/copy.c (copy_reg): When open fails with EEXIST, the destination
889 is lstat'able, and a symlink, call open again, but now without O_EXCL.
890 * tests/cp/thru-dangling: New file, to test for the above fix.
891 * tests/cp/Makefile.am (TESTS): Add thru-dangling.
892 * THANKS: Add Michael McLagan.
893 Bug report from Michael McLagan in <http://bugzilla.redhat.com/243588>.
895 2007-06-04 Paul Eggert <eggert@cs.ucla.edu>
897 * doc/coreutils.texi (Common options): Mention that -h and
898 --human-readable are equivalent to --block-size=human-readable.
899 Documentation problem reported by Steve Ward in
900 <http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00007.html>.
901 (du invocation): Use optSi rather than duplicating the macro's
902 contents (incorrectly, since we claimed a "B" was output).
904 2007-05-31 Jim Meyering <jim@meyering.net>
906 Pull printf-related code from gnulib, rather than using forked copy.
907 * bootstrap.conf (gnulib_modules): Don't avoid size_max and xsize
908 modules. While I dislike xsize-style overflow avoidance, maintaining
909 a forked version of e.g., vasnprintf.c was too much work.
911 2007-05-29 Jim Meyering <jim@meyering.net>
913 * src/dircolors.hin: Add screen-256color.
914 Suggested by sdl.web@gmail.com in <http://bugzilla.redhat.com/239266>.
916 2007-05-26 Jim Meyering <jim@meyering.net>
918 * TODO: Add an entry for comm --output-delimiter=STR
920 2007-05-25 James Youngman <jay@gnu.org>
922 wc: ignore multibyte-character decoding errors
923 * src/wc.c (wc): Don't issue an error message when mbrtowc
924 indicates that we have seen an invalid byte sequence. This
925 makes "wc /bin/sh" bearable (though the word and line counts
926 are likely not to be useful).
927 * NEWS: Mention the change.
929 2007-05-22 Jim Meyering <jim@meyering.net>
931 Check for an up-to-date copyright year in coreutils.texi.
932 * Makefile.maint (copyright-check): Also check for an up-to-date
933 copyright year in doc/$().texi, if that file exists.
934 * doc/coreutils.texi: Add 2007 to list of Copyright years.
935 Reported by Karl Berry.
937 cut: diagnose a range starting with 0 (-f 0-2) as invalid, and
938 give a better diagnostic for a field-number/offset of 0.
939 * NEWS: Mention the fix.
940 * src/cut.c (ADD_RANGE_PAIR): Add an explicit check.
941 Based on a patch from James Youngman.
942 * tests/misc/cut: Add tests for the above.
944 "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
945 Also, diagnose the '-' in "cut -f -" as an invalid range, rather
946 than interpreting it as the unlimited range, "1-".
947 * NEWS: Mention these changes.
948 * src/cut.c (set_fields): Don't interpret an accumulator "value"
949 of 0 as an unspecified range endpoint.
950 Give better diagnostics.
951 Adjust a comment so that it is true also for 64-bit size_t.
953 * tests/cut/Test.pm: Add tests for the above.
955 stty: fix a harmless syntax nit
956 * src/stty.c (visible): Use ";" as the statement terminator
957 between two assignments, not ",".
958 (integer_arg): Join an unnecessarily wrapped line.
960 2007-05-20 Jim Meyering <jim@meyering.net>
962 stty: diagnose an invalid hex value in 35-colon commmand-line argument
963 * NEWS: Mention this.
964 * src/stty.c (strtoul_tcflag_t, strtoul_cc_t): New functions.
965 (recover_mode): Use those functions (not sscanf), to parse the
967 * tests/stty/invalid: New file. Test for the above.
968 * tests/stty/Makefile.am (TESTS): Add invalid.
969 * .x-sc_prohibit_atoi_atof: Don't exempt stty.c from this check.
970 Add tests/stty/invalid so we don't have to obfuscate the comment
971 about sscanf therein.
972 * Makefile.maint (sc_prohibit_atoi_atof): Mention sscanf in the
975 * TODO: Remove some now-completed or no longer relevant items.
977 2007-05-19 Jim Meyering <jim@meyering.net>
979 Rename uses of futimens -> gl_futimens; glibc now declares the former.
980 * src/copy.c (copy_reg): Reflect renaming: futimens -> gl_futimens.
981 * src/touch.c (touch): Likewise.
983 2007-05-18 Jim Meyering <jim@meyering.net>
985 * Makefile.maint (my-distcheck): Remove -pedantic from $(CFLAGS)
986 for now, to avoid c89-check failure due to use of #include_next.
988 2007-05-15 Jim Meyering <jim@meyering.net>
990 Generate a dozen test-related Makefile.am files at bootstrap-time.
991 * README-hacking: Build-from-checkout now require Perl, too.
992 * bootstrap: Now that these generated Makefile.am files are no longer
993 under version control, they must be created at bootstrap time.
995 2007-05-14 Paul Eggert <eggert@cs.ucla.edu>
997 * man/chmod.x: Document chmod's behavior with setuid and setgid bits.
998 Remove misleading implication about leading zero. Problem
999 reported by Jan Engelhardt in
1000 <http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00134.html>.
1002 2007-05-13 Jim Meyering <jim@meyering.net>
1004 Remove the generated tests/*/Makefile.am files from version control.
1005 * tests/cut/Makefile.am: git-remove this generated file.
1006 * tests/head/Makefile.am: Likewise.
1007 * tests/join/Makefile.am: Likewise.
1008 * tests/pr/Makefile.am: Likewise.
1009 * tests/sort/Makefile.am: Likewise.
1010 * tests/tac/Makefile.am: Likewise.
1011 * tests/tail/Makefile.am: Likewise.
1012 * tests/test/Makefile.am: Likewise.
1013 * tests/tr/Makefile.am: Likewise.
1014 * tests/uniq/Makefile.am: Likewise.
1015 * tests/wc/Makefile.am: Likewise.
1016 * .cvsignore, .gitignore: Ignore these generated files.
1018 * src/.cvsignore, src/.gitignore: Add chcon here, ...
1019 * .cvsignore, .gitignore: ... not here.
1021 Test uniq's new --zero-terminated (-z) option.
1022 * tests/uniq/Test.pm: When possible, create a "-z"-testing variant
1023 of each existing test.
1024 (2z, 3z, 4z, 5z, 20z, 122, 123): New tests from James Youngman.
1026 2007-05-12 James Youngman <jay@gnu.org>
1028 Add -z option to uniq. Originally proposed by Egmont Koblinger.
1029 * NEWS: Mention uniq's new option: --zero-terminated (-z).
1030 * src/uniq.c: Add new option, --zero-terminated (-z), to make
1031 uniq use the NUL byte as separator/delimiter rather than newline.
1032 (check_file): Add a parameter: delimiter. Update caller.
1033 Use readlinebuffer_delim in place of readlinebuffer everywhere.
1034 (main): Handle the new option.
1035 (usage): Describe new option the same way sort does.
1036 * doc/coreutils.texi (uniq invocation): Describe the new option.
1038 2007-05-07 Jim Meyering <jim@meyering.net>
1040 * NEWS: Mention that last week's tr bug dates back to 1992.
1042 2007-05-04 Jim Meyering <jim@meyering.net>
1044 Avoid test failure when run with an unusual umask.
1045 * tests/ls/color-dtype-dir: Set umask to 022.
1046 Suggestion from AIDA Shinra.
1048 Avoid failure of root-only test when run with a restrictive umask.
1049 * tests/rm/no-give-up: Ensure that non-root can access "d/" through
1050 root-owned ".". Reported by AIDA Shinra.
1052 tr -c: don't abort when translating with S2 larger than complement of S1
1053 * src/tr.c (main): Remove invalid assertion triggered by e.g.,
1054 tr -c a '[b*256]'. There's nothing wrong with having Set2 larger
1055 than Set1. Reported by Guntram Blohm.
1056 * tests/tr/Test.pm (no-abort-1): Test for the above.
1057 * NEWS: Mention this bug fix.
1058 * THANKS: Add Guntram Blohm.
1060 2007-05-03 Jim Meyering <jim@meyering.net>
1062 Avoid test failure when run with a permissive umask.
1063 * tests/rm/no-give-up: Set permissions of test directory properly,
1064 i.e., not depending on umask prohibiting go=w.
1065 Reported by AIDA Shinra.
1067 2007-05-02 Paul Eggert <eggert@cs.ucla.edu>
1069 The following commands and options now support the standard size
1070 suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y:
1071 head -c, head -n, od -j, od -N, od -S, split -b, split -C,
1073 * doc/coreutils.texi (od invocation, head invocation, tail invocation):
1074 Document support for new size suffixes.
1075 (head invocation, tail invocation):
1076 Document that -n uses the same suffixes as -c.
1077 (tail invocation): More-clearly document what leading "+" does.
1078 * src/head.c (usage, string_to_integer): Support new suffixes.
1079 * src/od.c (usage, main): Likewise.
1080 * src/split.c (usage, main): Likewise.
1081 * src/tail.c (usage, parse_options): Likewise.
1082 Prompted by a patch from Evan Hunt.
1084 2007-05-02 Jim Meyering <jim@meyering.net>
1086 * src/du.c (usage): Tweak description of --dereference-args (-D) again.
1087 Prompted by another request for clarification from Justin Pryzby.
1089 Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.
1090 * tests/rm/fail-2eperm: Patch from AIDA Shinra.
1091 Reported by Peter Dyballa.
1092 * THANKS: Add AIDA Shinra and Peter Dyballa.
1094 2007-04-28 Paul Eggert <eggert@cs.ucla.edu>
1096 * src/nohup.c (usage): Describe how standard input and output
1099 2007-04-25 Jim Meyering <jim@meyering.net>
1101 * src/du.c (usage): Clarify description of --dereference-args (-D).
1102 Prompted by a report from Justin Pryzby.
1104 * bootstrap.conf (gnulib_modules): Add fseeko and ftello.
1105 (gnulib_modules): Add autobuild.
1107 2007-04-24 Jim Meyering <jim@meyering.net>
1109 * THANKS: Add Andreas Frische.
1110 * NEWS: Mention today's ls --color fix.
1111 * tests/ls-2/tests (sl-dangle): Add a test for today's fix.
1113 2007-04-24 Eric Blake <ebb9@byu.net>
1115 ls --color once again colors dangling symlinks correctly
1116 * src/ls.c (gobble_file): Much like the 2007-04-07 fix,
1117 add a term to the expression that decides whether we need
1118 stat and/or lstat calls. Reported by Andreas Frische.
1120 2007-04-16 Jim Meyering <jim@meyering.net>
1122 * src/cut.c (usage): Adjust synopsis to show that an OPTION is required.
1123 Reported by Rudolf Kastl.
1124 * THANKS: Add Rudolf Kastl.
1126 2007-04-11 Paul Eggert <eggert@cs.ucla.edu>
1128 split --line-bytes=N (-C N): don't create an empty file.
1129 * src/split.c (line_bytes_split): Don't create an empty line
1130 afterwards if the last buffer happens to be exactly full.
1131 * tests/misc/split-fail: Add a test case for this.
1132 * NEWS: mention this.
1134 2007-04-10 Jim Meyering <jim@meyering.net>
1136 ls: don't form or compute the length of strings that won't be used.
1137 * src/ls.c (gobble_file): Form and compute length of strings for
1138 block size, owner, group, author, major+minor numbers and file size
1139 only if they'll actually be used. I.e., don't form most of them
1140 when not producing long format output.
1142 2007-04-07 Jim Meyering <jim@meyering.net>
1144 Add a test for, and document, today's fix.
1145 * NEWS: Mention today's ls --color fix.
1146 * tests/ls-2/tests (sl-target): Add a test for today's fix.
1147 * THANKS: Add Kirk Kelsey.
1149 2007-04-07 Eric Blake <ebb9@byu.net>
1151 Fix a bug in how the LS_COLORS ln=target attribute is handled.
1152 * src/ls.c (gobble_file): Use "stat" (not lstat) also when the
1153 ln=target attribute applies. Reported by Kirk Kelsey.
1155 2007-04-02 Jim Meyering <jim@meyering.net>
1157 * src/copy.c (copy_reg): Initialize local "con", before calling
1158 getfscreatecon, in case that function (or its inline stub) does
1161 2007-04-01 Paul Eggert <eggert@cs.ucla.edu>
1163 * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
1164 ls -x DIR would sometimes output the wrong string in place of the
1166 * NEWS: Mention the bug fix.
1167 * tests/ls/x-option: New file.
1168 * tests/ls/Makefile.am (TESTS): Add x-option.
1170 gnulib moved md5 and sha1 modules into a new crypt/ directory; adapt
1171 * bootstrap.conf (gnulib_modules): Adjust to gnulib's renaming of
1172 md5 to crypt/md5 and sha1 to crypt/sha1.
1174 2007-03-30 Jim Meyering <jim@meyering.net>
1176 * NEWS: Mention these SELinux changes.
1178 * ChangeLog-selinux: Remove file.
1179 Move its contents into this file, removing old dates.
1181 * src/runcon.c (main): Don't reorder arguments. Reported by
1182 Ulrich Drepper in <http://bugzilla.redhat.com/232652>.
1183 * tests/misc/runcon-no-reorder: New file. Test for the above.
1184 * tests/misc/Makefile.am (TESTS): Add runcon-no-reorder.
1186 * src/runcon.c (main): Remove "." at end of a diagnostic.
1188 * src/runcon.c: New program.
1189 * src/Makefile.am (bin_PROGRAMS): Add runcon.
1190 (runcon_LDADD): Define.
1191 * README: Add runcon to the list of programs.
1192 * AUTHORS: Add this: runcon: Russell Coker
1193 * tests/help-version: Add runcon as an exception.
1194 * man/Makefile.am (dist_man_MANS): Add runcon.1.
1195 (runcon.1): New dependency.
1197 mkfifo, mknod: Accept new "-Z, --context=C" option.
1198 * src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>.
1200 * src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
1202 mkdir: Accept new "-Z, --context=C" option.
1203 * src/mkdir.c: Include <selinux/selinux.h>.
1205 * src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
1207 * tests/cp/cp-a-selinux: New file. Test for the bug reported in
1208 <http://bugzilla.redhat.com/219900>.
1209 * tests/cp/Makefile.am (TESTS): Add cp-a-selinux.
1211 * tests/selinux: New file.
1212 * tests/Makefile.am (EXTRA_DIST): Add selinux.
1213 * tests/misc/selinux: Source the new script, rather than open coding it.
1215 Change how "cp -a" and "cp --preserve=context" work with SELinux.
1216 Now, cp -a attempts to preserve context, but failure to do so does
1217 not change cp's exit status. However "cp --preserve=context" is
1218 similar, but failure *does* cause cp to exit with nonzero status.
1219 * src/copy.h (struct cp_options) [require_preserve_context]: New member.
1220 * src/copy.c (copy_reg, copy_internal): Implement the above.
1221 * src/mv.c (cp_option_init): Initialize the new member.
1222 * src/install.c (cp_option_init): Likewise.
1223 * src/cp.c (cp_option_init): Likewise.
1224 (decode_preserve_arg): Set it or reset it.
1226 cp, mv, install: add SELinux support, but unlike with the Red Hat
1227 patch, mv and cp do not provide the "-Z context" option.
1228 * src/copy.c: Include <selinux/selinux.h>.
1229 (restore_default_fscreatecon): New function.
1230 (copy_reg): Make cp --preserve=context work for existing destination.
1231 (copy_internal): Likewise for new destinations.
1232 * src/copy.h (cp_options) [preserve_security_context]: New member.
1233 * src/cp.c: Include <selinux/selinux.h>.
1234 (selinux_enabled): New global.
1235 (usage): Mention new --preserve=context option.
1236 (PRESERVE_CONTEXT): Define/use.
1237 (decode_preserve_arg): Handle PRESERVE_CONTEXT.
1238 (main): Remove an obsolete comment.
1239 If --preserve=context is specified on a system without SELinux
1240 enabled, give a diagnostic and fail.
1241 * src/mv.c: Include <selinux/selinux.h>.
1242 Set x->preserve_security_context if SELinux is enabled.
1243 * src/install.c: Accept new "-Z, --context=C" option.
1244 Accept --preserve-context option (but not -P option).
1245 Accept alternate spelling: --preserve_context, for now.
1246 Include <selinux/selinux.h> and "quotearg.h".
1247 (selinux_enabled, use_default_selinux_context): New globals.
1248 (PRESERVE_CONTEXT_OPTION): Define.
1249 (cp_option_init): Default: do not preserve security context.
1250 (setdefaultfilecon): New function.
1251 (main): Honor new options.
1252 * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD):
1254 * src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.
1256 * tests/misc/selinux [VERBOSE]: Print version info for each
1257 of the tested tools, not just ls.
1259 * src/c99-to-c89.diff: Remove the ls.c patch, now that I've
1260 temporarily removed the offending c99'ism.
1262 * src/chcon.c (usage): Split a string literal that was longer than 509.
1264 * src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.
1265 Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
1267 * src/c99-to-c89.diff: Adjust offsets.
1269 * AUTHORS: Add chcon.
1271 * src/c99-to-c89.diff: Remove trailing blanks.
1273 * src/chcon.c: Don't include "dirname.h". system.h already includes it.
1275 * gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.
1277 * src/c99-to-c89.diff: Handle a new c99'ism in ls.c.
1279 * src/id.c (main): Tweak id -Z diagnostic.
1281 id: Add SELinux support: -Z option.
1282 * src/id.c (main): Apply patches from Fedora, with these changes:
1283 Remove #ifdef WITH_SELINUX.
1284 Use error (EXIT_FAILURE, not fprintf+exit(1).
1285 * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
1287 stat: Add support for SELinux in the form of a %C format directive.
1288 * src/stat.c (follow_links): Make this variable file-global.
1289 (out_file_context): New function.
1290 (print_statfs): Honor %C.
1291 (print_stat): Honor %C.
1292 (do_stat): Remove follow_links parameter.
1293 (usage): Document the two %C directives.
1294 (main): Accept -Z (though it's a no-op).
1295 * src/Makefile.am (stat_LDADD): Define.
1297 ls: Add support for SELinux and a slightly modified -Z option.
1298 I started with the patches from Red Hat.
1299 The entries below tell how the code evolved.
1301 * src/ls.c (print_long_format, print_file_name_and_frills): When
1302 there is no security context (due to getfilecon/lgetfilecon failing
1303 with e.g. ENOTSUP), print it as "?", not "".
1304 * src/ls.c (print_file_name_and_frills): Make -Z work without -l.
1305 (length_of_file_name_and_frills): Likewise.
1307 * src/ls.c: Remove the --lcontext and --scontext options.
1308 Change the way -Z, --context work so that it no longer implies -l.
1309 Thus, -Z -l will work like -lcontext and -Z without -l will work
1312 Adjust tests to reflect new 'ls -l' syntax -- affects only
1313 systems with SELinux when operating on a file with no ACL.
1314 These tests assumed that everything before the first space on
1315 each line is the 10-byte mode string. But there may also be a "+"
1316 in the 11th column, just before the space. However, note that this
1317 is not new. The same thing would have happened even without the
1318 change below, when listing a file with an ACL.
1319 * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm:
1320 * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod:
1321 * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm:
1323 Don't make compilation depend on USE_ACL. An SELinux security
1324 context counts as an "alternate access control method", so ls
1325 must output a "+" for each file with a security context.
1326 * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally.
1327 (FILE_HAS_ACL): Remove macro definition. Use f->have_acl directly.
1328 (gobble_file): Record whether a file has a security context, and
1329 update the condition used to determine whether to print the "+".
1330 (gobble_file): Call getfilecon/lgetfilecon also when
1331 format == long_format, so that we get the "+".
1333 * src/ls.c (gobble_file): Add a comment explaining why (with a
1334 security context option) ls doesn't exit nonzero due to e.g.,
1335 getfilecon failing with errno == ENOTSUP.
1337 * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due
1340 * src/ls.c (gobble_file): Factor out three small blocks using
1341 getfilecon and lgetfilecon.
1342 Don't ignore return value from getfilecon and lgetfilecon.
1344 * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C
1346 (print_scontext_format): Likewise.
1347 (print_scontext): Declare to be "bool", not int. Adjust uses.
1349 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX).
1351 * tests/misc/chcon: New file.
1352 * tests/misc/chcon-fail: New file.
1353 * tests/Makefile.am (check-root): Run new, root-only misc/chcon test.
1354 * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail.
1356 * tests/misc/Makefile.am (TESTS): Add selinux.
1357 * tests/misc/selinux: New file.
1358 * tests/help-version: Skip chcon.
1359 * man/chcon.x: New file.
1360 * man/Makefile.am: Build chcon.1.
1363 * gl/modules/selinux-at: New module. Check for libselinux and set
1364 LIB_SELINUX here, unconditionally, rather than depending on
1365 the configure-time --enable-selinux option.
1366 * gl/modules/selinux-h: New module.
1367 * bootstrap.conf (gnulib_modules): Add selinux-at.
1368 * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files.
1369 * gl/lib/se-selinux_.h: New file.
1370 * gl/lib/se-context_.h: New file.
1371 * gl/m4/selinux-selinux-h.m4: New file.
1372 * gl/m4/selinux-context-h.m4: New file.
1373 * src/Makefile.am (bin_PROGRAMS): Add chcon.
1374 (chcon_LDADD): Define.
1375 * README: Add chcon to the list of programs.
1376 * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
1378 2007-03-29 Jim Meyering <jim@meyering.net>
1380 * .vg-suppressions: Add libc-getpwuid-leak.
1382 2007-03-28 Jim Meyering <jim@meyering.net>
1384 Help translators include translation team's web or email address.
1385 * src/system.h (emit_bug_reporting_address): New function.
1386 * src/base64.c: Use it rather than a literal printf.
1387 * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
1388 * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
1389 * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
1390 * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
1391 * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
1392 * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
1393 * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
1394 * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
1395 * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
1396 * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
1397 * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
1398 * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
1399 * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
1400 * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
1401 * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
1402 * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
1403 * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
1404 * src/who.c, src/whoami.c, src/yes.c: Likewise.
1406 * src/stty.c: Don't include "vasprintf.h", now that its
1407 declarations are guaranteed to be in gnulib's stdio.h.
1408 * src/who.c: Likewise.
1410 2007-03-27 Jim Meyering <jim@meyering.net>
1412 * README: Use "install", not "ginstall" in the list of program names.
1413 * src/Makefile.am (check-README): Substitute s/ginstall/install/.
1415 2007-03-25 Jim Meyering <jim@meyering.net>
1417 * src/c99-to-c89.diff: Regenerate.
1419 2007-03-25 Paul Eggert <eggert@cs.ucla.edu>
1421 Avoid the need for euidaccess and/or lstat on every directory entry
1422 with 'rm -r dir' (without -f), if we are root, or if we are removing
1423 a directory tree that is full of symbolic links.
1424 * bootstrap.conf (gnulib_modules): Add write-any-file.
1425 * src/copy.c: Include write-any-file.h.
1426 (UNWRITABLE): Remove macro, replacing with....
1427 (writable_destination): New function, which uses can_write_any_file
1428 to avoid the need for euidaccess when we are privileged.
1429 (overwrite_prompt, abandon_move): Use it.
1430 * src/remove.c: Include write-any-file.h.
1431 (D_TYPE): New macro.
1432 (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros.
1433 (write_protected_non_symlink): Don't bother to stat if we can write
1435 (prompt): New arg PDIRENT_TYPE. All callers changed.
1436 Use readdir dirent type to avoid the need for 'lstat' on each directory
1437 entry in cases like 'rm -r dir', if we are root, or if the tree is
1438 full of symbolic links.
1439 (DT_IS_KNOWN, DT_MUST_BE): Remove.
1440 (remove_entry): New arg DIRENT_TYPE_ARG. All callers changed.
1442 2007-03-24 Jim Meyering <jim@meyering.net>
1444 If strace malfunctions, skip the test rather than failing it.
1445 * tests/mv/atomic: Required on a mips-unknown-linux-gnu system
1446 running the aging linux-2.4.27-mipscvs-20040814.
1448 2007-03-23 Paul Eggert <eggert@cs.ucla.edu>
1450 * src/pathchk.c: Don't include euidaccess.h, as we don't call
1453 2007-03-23 Jim Meyering <jim@meyering.net>
1455 * README-package-renamed-to-coreutils: Add a URL for the FAQ,
1456 and a couple more archive links.
1458 2007-03-22 Jim Meyering <jim@meyering.net>
1460 Post-release version change.
1461 * NEWS: Add a line for 6.9+.
1462 * configure.ac (AC_INIT): Set new version string.
1465 * NEWS: Record release date and new version number.
1466 * configure.ac (AC_INIT): New version number.
1468 * tests/mv/hard-3: Correct the preceding change: $3 -> $2.
1470 2007-03-22 Paul Eggert <eggert@cs.ucla.edu>
1472 Improve a test script.
1473 * tests/mv/hard-3: Check for 'ls' failure, too.
1474 Generate more-useful debugging output when 'ls' fails.
1476 2007-03-21 Jim Meyering <jim@meyering.net>
1478 Fix a test script not to claim an ext2 file system is of type xfs.
1479 * tests/du/slink: When using df --local and df --type=TYPE,
1480 test only the exit code. Don't bother with stdout.
1481 Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
1483 * gl/lib/savewd.c: Remove this file, since the savewd_save change
1484 is now in gnulib. The other wasn't useful.
1486 2007-03-20 Jim Meyering <jim@meyering.net>
1488 * gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
1490 Skip part of this test when "." is not a local file system.
1491 * tests/install/basic-1: Otherwise, it would fail on some NFS
1493 * tests/mkdir/p-3: Likewise.
1495 2007-03-19 Paul Eggert <eggert@cs.ucla.edu>
1497 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
1498 Add $(LIB_ACL_TRIVIAL).
1500 2007-03-18 Jim Meyering <jim@meyering.net>
1502 Fix a generic NFS-related test failure.
1503 * tests/mkdir/p-3: When setting up an unreadable "." in an
1504 inaccessible parent, make the parent inaccessible *after* making "."
1505 unreadable. Otherwise, running "chmod a-r ." in an already-
1506 inaccessible parent would fail on NFS with "Stale NFS file handle".
1508 Fix a bug in how pr -m -s works.
1509 * NEWS: Describe how the fix affects pr.
1510 * src/pr.c (init_parameters): The --merge (-m) option does
1511 not imply --expand-tabs (-e), so don't set "untabify_input".
1512 Reported by Wis Macomson.
1513 * tests/misc/pr: New file. Test for the above fix.
1514 * tests/misc/Makefile.am (TESTS): Add pr.
1517 2007-03-17 Jim Meyering <jim@meyering.net>
1519 Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
1520 * bootstrap: Put ""s around use of $build_aux, in case
1521 someone uses a name containing shell meta-characters.
1522 Reported by Alfred M. Szmidt.
1523 * tests/misc/tty-eof: Add shuf to the list of tested commands.
1525 Avoid test failure on NFS-mounted Solaris ZFS file system.
1526 * tests/du/basic: Skip a test if "." is on a non-local file system.
1528 Avoid an obscure build failure, prefer waitpid over wait.
1529 * src/install.c (strip): Use waitpid, not wait. It's equivalent,
1530 but feels less obsolescent.
1532 * bootstrap: Don't use \> in grep regexp. For HP-UX.
1534 2007-03-16 Jim Meyering <jim@meyering.net>
1536 Begin adding support for Solaris ZFS (4 entries per trivial ACL)
1537 * gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
1538 (file_has_acl, copy_acl): Use it, rather than enumerating errno values.
1539 (is_trivial_acl): New function. Incomplete, for now.
1540 (file_has_acl, copy_acl): Use the new function, rather than
1541 counting the number of entries in an ACL.
1543 * bootstrap: Update from gnulib.
1545 * .x-sc_prohibit_atoi_atof: Add TODO here, too.
1547 2007-03-16 Paul Eggert <eggert@cs.ucla.edu>
1549 * src/copy.c: Include filemode.h.
1550 (overwrite_prompt): Say "try to overwrite", not "overwrite", to
1551 make it clearer that the attempt may fail. Problem reported by
1553 http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
1554 Output symbolic mode as well as numeric.
1555 * tests/mv/i-2 (fail): Adjust to new prompt format.
1557 2007-03-15 Jim Meyering <jim@meyering.net>
1559 Enforce policy: don't use *scanf functions.
1560 * Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
1561 * .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
1562 * TODO: note that stty.c needs this small clean-up.
1564 2007-03-13 Jim Meyering <jim@meyering.net>
1566 Prepare to work on ACL-related failure when using Solaris ZFS.
1567 * gl/lib/acl.c: New file, copied from gnulib.
1569 Work around a failing test due to an NFS-based race condition.
1570 * tests/cp/sparse: Accept a report that the copy is *smaller*.
1572 2007-03-12 Jim Meyering <jim@meyering.net>
1574 Make bootstrap.conf a tiny bit more generic.
1575 * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
1576 files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
1578 2007-03-10 Jim Meyering <jim@meyering.net>
1580 Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
1581 * gl/lib/savewd.c: Copy this file from gnulib, then change
1582 "errno != EACCES" to (errno != EACCES && errno != ESTALE).
1583 The symptom was this failure in tests/install/basic-1:
1584 ginstall: cannot create directory `rel/a': Stale NFS file handle
1586 The preceding change solved part of the problem. Now ginstall fails.
1587 * tests/install/basic-1: Temporarily, don't redirect ginstall's
1588 stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
1591 * tests/install/basic-1: When setting up an unreadable "." in an
1592 inaccessible parent, make the parent inaccessible *after* making "."
1593 unreadable. Otherwise, running "chmod a-r ." in an already-
1594 inaccessible parent would fail on NFS with "Stale NFS file handle".
1595 Reported by Bob Proulx.
1597 * Makefile.maint (po-check): Exclude c99-to-c89.diff.
1599 2007-03-09 Jim Meyering <jim@meyering.net>
1601 Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
1602 * tests/chgrp/basic: Don't let failure by chgrp to set the
1603 group of a symlink make this test fail. Do give a diagnostic.
1604 In the chgrp-no-change-ctime test, add darwin7.9.0 as another
1605 known-failing system.
1606 When failing on some other system, print $host_triplet, too.
1607 Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
1608 Reported by Peter Fales.
1610 2007-03-08 Jim Meyering <jim@meyering.net>
1612 * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
1614 2007-03-08 Paul Eggert <eggert@cs.ucla.edu>
1616 rm without -f: give a better diagnostic when euidaccess fails.
1617 * src/remove.c (write_protected_non_symlink): Return int, not bool,
1618 so that we can indicate failure too (as a postive error number).
1619 (prompt): If write_protected_non_symlink fails, report that error
1620 number and fail rather than charging ahead and removing the dubious
1621 entry. Redo the logic of printing a diagnostic so that we need to
1622 invoke quote (full_filename (...)) only once. More details at:
1623 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
1625 2007-03-08 Jim Meyering <jim@meyering.net>
1627 Generalize a few more cvs-isms.
1628 * bootstrap (checkout_only_file): Rename from CVS_only_file.
1629 Change comments and diagnostics not to say "CVS".
1631 * bootstrap: Run libtool, if necessary.
1633 Make bootstrap a little more general.
1634 * bootstrap (build_aux): Factor out/use this definition.
1635 Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
1636 (insert_sorted_if_absent): Move function definition "up", to
1637 precede new first use.
1638 If $build_aux/ doesn't exist initially, create it, and
1641 2007-03-03 Andrew Church <achurch@achurch.org> (tiny change)
1642 Paul Eggert <eggert@cs.ucla.edu>
1644 Fix a bug: cp -x would fail to set mount point permissions.
1645 * NEWS: mention cp -x bug fix
1646 * src/copy.c (copy_internal): Don't return immediately after
1647 copying a mount point that we do not intend to recurse under.
1648 Based on a patch by Andrew Church.
1650 2007-03-03 Jim Meyering <jim@meyering.net>
1652 pwd-unreadable-parent: Skip test on ia64/Linux, too.
1653 * tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
1654 Reported by Bob Proulx.
1656 2007-03-02 Jim Meyering <jim@meyering.net>
1658 pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
1659 * tests/misc/pwd-unreadable-parent: Rather than trying to decide
1660 whether this test has a chance of succeeding, run it only when
1661 $(host_os) is linux-gnu. It was failing on powerpc-apple-darwin8.8.0
1662 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
1664 * tests/misc/pwd-long: Also allow "+" in $PWD.
1666 Remove another coreutils-ism. Formatting cleanup.
1667 * Makefile.maint (my-distcheck): Update an outdated comment.
1668 (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
1669 (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
1671 2007-03-01 Jim Meyering <jim@meyering.net>
1673 * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
1674 (my-distcheck): Use the new variable, instead of too-long literal.
1676 Make "make syntax-check" rules less coreutils-specific.
1677 * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
1678 (sc_cast_of_alloca_return_value): Likewise.
1679 (sc_root_tests): Do nothing if there is no check-root target
1680 in tests/Makefile.am.
1682 Run the writable-files check only for release-building targets.
1683 * Makefile.maint (local-checks-available): Remove writable-files.
1684 (alpha beta major): Put it here, instead.
1686 "make syntax-check" now runs only Makefile.cfg-selected tests
1687 * Makefile.maint (syntax-check-rules): Hoist this definition so that
1688 it precedes the indirect use in the definition of $(local-check).
1689 (local-check): Use :=, not just "=".
1690 (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
1692 2007-02-28 Bruno Haible <bruno@clisp.org>
1694 * bootstrap.conf (gnulib_modules): Replace xreadlink with
1695 xreadlink-with-size. Add xreadlink.
1696 * src/copy.c (copy_internal): Update.
1697 * src/ls.c (is_directory): Update.
1698 * src/stat.c (print_stat): Update.
1699 * src/readlink.c (main): Use the one-argument xreadlink function.
1701 2007-02-28 Paul Eggert <eggert@cs.ucla.edu>
1703 * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
1704 Problem reported by Philip Rowlands in
1705 <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
1707 2007-02-28 Jim Meyering <jim@meyering.net>
1709 * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
1710 list of exceptions, for the "make distcheck" sc_file_system rule.
1712 * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
1714 2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
1716 Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
1717 * NEWS: With -P, the default block size and output format is not
1718 affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
1719 * src/df.c (main): Implement this.
1721 2007-02-27 Jim Meyering <jim@meyering.net>
1723 Add a test for the above.
1724 * tests/misc/df-P: New file.
1725 * tests/misc/Makefile.am (TESTS): Add df-P.
1727 2007-02-25 Jim Meyering <jim@meyering.net>
1729 * Makefile.maint (announcement): Adjust so that it works with
1730 announce-gen's --gnulib-snapshot-time-stamp option.
1731 Indent one of the command lines using TAB, not 8 spaces.
1733 Post-release version change.
1734 * NEWS: Add a line for 6.8+.
1735 * configure.ac (AC_INIT): Set new version string.
1737 2007-02-24 Jim Meyering <jim@meyering.net>
1740 * NEWS: Record release date and new version number.
1741 * configure.ac (AC_INIT): New version number.
1743 Don't skip this test on new-enough Linux/GNU systems.
1744 * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
1745 rather than for __GETCWD_PREFIX in config.h (the latter is no
1746 longer defined, ever, due to gnulib changes).
1747 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
1749 Remove the "gnits" option; it prohibits my using "+" as a version
1750 string suffix, and all it does (beyond the default "gnu" option)
1751 is to _require_ the THANKS file.
1752 * configure.ac (AM_INIT_AUTOMAKE): Remove it.
1754 Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
1755 * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
1756 * tests/chown/Makefile.am, tests/cp/Makefile.am:
1757 * tests/du/Makefile.am, tests/expr/Makefile.am:
1758 * tests/factor/Makefile.am, tests/general/Makefile.am:
1759 * tests/install/Makefile.am, tests/ln/Makefile.am:
1760 * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
1761 * tests/mv/Makefile.am, tests/readlink/Makefile.am:
1762 * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
1763 * tests/seq/Makefile.am, tests/stty/Makefile.am:
1764 * tests/tee/Makefile.am, tests/touch/Makefile.am:
1766 * README: Document the OSF/1 4.0d build failure and work-around.
1767 Reported by Bruno Haible.
1769 * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
1771 * configure.ac: Use 6.7+, not 6.7-dirty.
1773 2007-02-24 Paul Eggert <eggert@cs.ucla.edu>
1775 * NEWS: sort no longer compresses temporaries by default.
1776 * bootstrap.conf: Remove findprog.
1777 * doc/coreutils.texi (sort invocation): The default is to not
1778 compress. Don't treat "" specially.
1779 * src/sort.c: Don't include findprog.h.
1780 (create_temp): Compress only if the user specified --compress-program.
1781 * tests/misc/sort-compress: Adjusts tests to match new behavior.
1783 2007-02-24 Jim Meyering <jim@meyering.net>
1785 Avoid a shell syntax error, when building with an inadequate Perl.
1786 * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
1787 it can expand to "/.../missing perl".
1789 * man/Makefile.am (.x.1): Warn when unable to update a man page.
1790 Suggestion from Bruno Haible.
1792 2007-02-23 Bruno Haible <bruno@clisp.org>
1794 Handle better the combination of old Perl and a pre-c99 compiler.
1795 * man/Makefile.am (.x.1): If the autoconf test has determined that
1796 perl is missing or not a sufficient version, do nothing.
1798 * tests/readlink/can-e: Put the closing double-quote at the end of a
1799 backquoted word, not in the middle. Works around a bug in sh on
1801 * tests/readlink/can-f: Likewise.
1802 * tests/readlink/can-m: Likewise.
1804 * tests/du/slink: Skip the test if executing on an nfsv3 file system.
1805 This avoids a test failure at least on OSF/1 4.0d.
1807 2007-02-23 Jim Meyering <jim@meyering.net>
1809 * src/date.c (usage): Split a diagnostic that had grown to be
1810 longer than the C89 maximum of 509 bytes.
1812 2007-02-23 Ed Santiago <ed@edsantiago.com>
1814 * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
1815 for a separator. Include sample RFC 2822 and 3339 output.
1817 2007-02-23 Jim Meyering <jim@meyering.net>
1819 With -Dlint, make shuf free all heap-allocated storage.
1820 * src/shuf.c (main): Move declaration of input_lines to
1821 function scope, and initialize to NULL, so we can free it.
1822 [lint]: Free all malloc'd memory.
1823 * tests/misc/shuf: Also test shuf's -e and -i options.
1825 2007-02-22 Jim Meyering <jim@meyering.net>
1827 Merge in a change from some other incarnation of this file (gzip?)
1828 * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
1830 Adjust preceding change not to perform an unaligned access.
1831 * src/copy.c (copy_reg): Undo previous change. Instead, make
1832 it clearer that we're using a single-byte sentinel, and
1833 [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
1834 Reported by Andreas Schwab.
1836 Placate valgrind, wrt ./cp --sparse=always
1837 * src/copy.c (copy_reg): Place the sentinel by setting a
1838 full word's worth of bits, not just a single byte's worth.
1839 This avoids a harmless (but distracting) case of memory being
1842 2007-02-21 Paul Eggert <eggert@cs.ucla.edu>
1844 Honor dd's noatime flag if possible, even if not supported on build fs
1845 * doc/coreutils.texi (dd invocation): Warn that noatime might not be
1847 * src/dd.c (flags, usage): Look at O_NOATIME, not
1848 HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
1849 flag, so that dd attempts O_NOATIME even if the build file system
1850 does not support it. Problem reported by Jim Meyering today in
1852 * tests/dd/misc: Generate a warning, not a failure, if noatime
1855 2007-02-21 Jim Meyering <jim@meyering.net>
1857 * tests/misc/date: Remove vestigial use of Data::Dumper.
1859 2007-02-20 Paul Eggert <eggert@cs.ucla.edu>
1861 * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
1862 about out-of-range initializer with Sun C 5.8.
1864 2007-02-20 Jim Meyering <jim@meyering.net>
1866 * bootstrap (CVS_only_file): Use README-hacking.
1868 Now that we use GIT, not cvs, rename README-cvs.
1869 * README-hacking: Renamed from...
1870 Update to reflect that we now use git.
1872 * README-cvs: ...this.
1874 * src/env.c (main): When invoked with no arguments (i.e. when printing
1875 the environment), use a local variable to iterate through the global
1876 "environ" array, rather than "environ" itself. This is solely to
1877 avoid changing the environment for an LD_PRELOAD-substituted "puts"
1878 or "exit" function. Tiny patch by Harvey Eneman. See
1879 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
1882 * bootstrap: Move definitions of temporary directory names and the
1883 new bt_regex "up" to precede all uses, so it's clearer what their
1884 scope is. Also, use [.], rather than \\., since the former works
1887 * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
1888 Based on the bison 2007-02-19 change by Joel E. Denny.
1890 2007-02-19 Paul Eggert <eggert@cs.ucla.edu>
1892 * NEWS: sort now uses a --compress-program option rather than
1893 an environment variable.
1894 * doc/coreutils.texi (sort invocation): Document this.
1895 * src/sort.c (usage): Likewise.
1896 (COMPRESS_PROGRAM_OPTION): New const.
1897 (long_options, create_temp, main): Support new option.
1898 * tests/misc/sort-compress: Test it.
1900 2007-02-19 Jim Meyering <jim@meyering.net>
1902 * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
1904 2007-02-18 Jim Meyering <jim@meyering.net>
1906 * src/system.h: Don't include exit.h, now that it's subsumed
1907 by the gnulib-generated stdlib.h.
1909 * tests/rm/fail-eacces: Skip this test when running as root.
1910 Reported by Matthew Woehlke.
1912 * bootstrap: Use "._bootmp" as the temporary directory name,
1913 not ".#bootmp". The latter's "#" caused trouble with the new,
1914 gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
1916 2007-02-14 Paul Eggert <eggert@cs.ucla.edu>
1918 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1919 * src/dircolors.c: Include c-strcase.h.
1920 (dc_parse_stream): Use c_strcasecmp rather than
1921 strcasecmp to avoid unreliable results in locales like Turkish
1922 where strcasecmp is incompatible with the C locale.
1924 2007-02-13 Jim Meyering <jim@meyering.net>
1926 Also check for and print stderr output, in case a program fails.
1927 * tests/misc/tty-eof: Occasionally (not reproducible), this
1928 test would fail, with one or more programs exiting nonzero, e.g.,
1929 tty-eof: sha224sum exited with status 1 (expected 0)
1930 Now, maybe we'll get a clue, the next time that happens.
1932 2007-02-12 Jim Meyering <jim@meyering.net>
1934 * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
1936 * tests/misc/pwd-unreadable-parent: Skip the test if we're
1937 definitely using the replacement.
1938 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
1940 2007-02-10 Jim Meyering <jim@meyering.net>
1942 Remove excess leading spaces that would make help2man misbehave.
1943 * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
1944 * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
1945 * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
1946 * src/date.c (usage): Use two spaces after each optional flag, not one.
1947 Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
1949 * Makefile.maint (longopt_re): Relax the regexp, making square
1950 brackets optional, so it matches the newly reported violations, too.
1952 * src/csplit.c (usage): Use two spaces (not one) to separate
1953 each option string from its description, so help2man formats
1954 the derived man page properly. Reported by Thomas Huriaux in
1955 <http://bugs.debian.org/410407>.
1956 * src/df.c (usage): Likewise.
1957 * src/du.c (usage): Likewise.
1958 * src/install.c (usage): Likewise.
1959 * src/ls.c (usage): Likewise.
1961 2007-02-03 Jim Meyering <jim@meyering.net>
1963 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
1964 * NEWS: Mention the bug fix.
1965 * tests/misc/pwd-unreadable-parent: New file.
1966 * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
1968 2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
1970 * NEWS: Document fix for cp --preserve=mode.
1971 * src/copy.c (copy_internal): Omit the group- or other-writeable
1972 permissions when creating a directory, to avoid a race condition
1973 if the special mode bits aren't right just after the directory is
1975 * src/cp.c (make_dir_parents_private): Likewise.
1976 * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
1979 * NEWS: Document fix for cp --parents.
1980 * src/cp.c (make_dir_parents_private): Report the error sooner with
1981 "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
1982 creating the directory, DEST/DIR.
1983 * tests/cp/cp-parents: Test for the non-race-condition bug fixed
1984 by the above change.
1986 2007-02-02 Jim Meyering <jim@meyering.net>
1988 * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
1990 * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
1991 consistent, so this can be applied with patch -p0.
1992 Reported by Matthew Woehlke.
1994 Arrange for "make check-root" to run the new root-only test.
1995 * tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux.
1998 * Makefile.maint (patch-check): Use patch with its -p2 option,
1999 since that makes this check slightly more strict.
2001 Use a directory on a loopback device mounted with -o context=...
2002 * tests/cp/cp-a-selinux: Since this test now runs mount and umount,
2003 it is a root-only one.
2005 2007-01-29 Jim Meyering <jim@meyering.net>
2008 * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
2009 determine dev/inode or upon detecting a symlink loop.
2011 * src/ls.c: Rename three global variables.
2012 (cwd_file): Rename from 'files'.
2013 (cwd_n_alloc): Rename from 'nfiles'.
2014 (cwd_n_used): Rename from 'files_index'.
2016 Shave 8 bytes off the size of "struct fileinfo".
2017 * src/ls.c (fileinfo): Put all members of type "bool" together.
2019 2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
2021 Modify "ls" to sort its data faster, using the new gnulib mpsort
2022 module rather than qsort. This is particularly a win in
2023 environments where strcoll is slow, since mpsort typically calls
2024 strcoll less often than qsort does.
2025 * bootstrap.conf (gnulib_modules): Add mpsort.
2026 * src/ls.c: Include mpsort.h.
2027 (sorted_file, sorted_file_alloc): New vars, for a new vector of
2028 pointers to the file info, for speed.
2029 (clear_files, extract_dirs_from_files, sort_files, print_current_files):
2030 (print_many_per_line, print_horizontal, print_with_commas):
2031 (calculate_columns): Set and use new vector.
2032 (initialize_ordering_vector): New function.
2034 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
2036 Adjust to today's change to gnulib, which added a module for
2037 string.h to replace the little include files like strcase.h.
2038 * src/dircolors.c: Don't include strcase.h.
2039 * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
2041 2007-01-26 Jim Meyering <jim@meyering.net>
2043 * src/dd.c (advance_input_after_read_error): Change diagnostic to
2044 say "invalid file offset" rather than "screwy file offset".
2046 * .x-sc_cast_of_argument_to_free: Remove this file.
2047 * Makefile.am (EXTRA_DIST): Likewise.
2049 2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
2051 * src/sort.c (create_temp): Remove superfluous access-X_OK
2052 check. find_in_path does this for us.
2054 2007-01-24 Jim Meyering <jim@meyering.net>
2056 Remove usually-skipped test.
2057 * tests/cp/open-perm-race: Remove this file. It is subsumed
2058 by parent-perm-race.
2059 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
2060 * tests/sort/Makefile.am: Regenerate.
2062 Pass "make distcheck" again.
2063 * src/sort.c (usage): Split a diagnostic that had grown to be
2064 longer than the C89 maximum of 509 bytes.
2065 * .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
2066 FIXME: this is just temporary, while we wait to remove the offending
2067 access-calling code.
2068 * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
2069 * Makefile.maint (sc_cast_of_argument_to_free): Use the
2070 canonical, $$($(CVS_LIST_EXCEPT)).
2071 * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
2073 2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
2075 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
2076 like it will be approved. Also add --check=quiet, --check=silent
2077 as long aliases, and --check=diagnose-first as an alias for -c.
2078 * doc/coreutils.texi (sort invocation): Document this.
2079 Also, mention that sort -c can take at most one file.
2080 * src/sort.c: Implement this.
2082 (usage): Document the change.
2083 (CHECK_OPTION): New constant.
2084 (long_options): --check now takes an optional argument, and is now
2085 treated differently from 'c'.
2086 (check_args, check_types): New constant arrays.
2087 (check): New arg CHECKONLY, which suppresses diagnostic if -C.
2088 (main): Parse the new options.
2089 * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
2092 2007-01-24 Jim Meyering <jim@meyering.net>
2095 * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
2096 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
2098 Don't depend on "which".
2099 * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
2100 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
2102 2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
2104 Test sort compression.
2105 * tests/misc/Makefile.am: Add the test.
2106 * tests/misc/sort-compress: New file containing the tests.
2108 2007-01-24 Jim Meyering <jim@meyering.net>
2110 * NEWS: sort temp file compression: tweak wording.
2111 * src/sort.c (struct sortfile) [name]: Declare member to be const.
2113 2007-01-21 Jim Meyering <jim@meyering.net>
2115 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
2116 In pipe_fork callers, use these named constants, not "2" and "8".
2117 (proctab, nprocs): Declare to be "static".
2118 (pipe_fork) [lint]: Initialize local, pid,
2119 to avoid unwarranted may-be-used-uninitialized warning.
2120 (create_temp): Use the active voice. Describe parameters, too.
2122 2007-01-21 James Youngman <jay@gnu.org>
2124 Centralize all the uses of sigprocmask(). Don't restore an invalid
2126 * src/sort.c (enter_cs, leave_cs): New functions for protecting
2127 code sequences against signal delivery.
2128 * (exit_cleanup): Use enter_cs and leave_cs instead of
2129 calling sigprocmask directly.
2130 (create_temp_file, pipe_fork, zaptemp): Likewise
2132 2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
2134 Add compression of temp files to sort.
2135 * NEWS: Mention this.
2136 * bootstrap.conf: Import findprog.
2137 * configure.ac: Add AC_FUNC_FORK.
2138 * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
2140 * src/sort.c (compress_program): New global, holds the name of the
2141 external compression program.
2142 (struct sortfile): New type used by mergepfs and friends instead
2143 of filenames to hold PIDs of compressor processes.
2144 (proctab): New global, holds compressor PIDs on which to wait.
2145 (enum procstate, struct procnode): New types used by proctab.
2146 (proctab_hasher, proctab_comparator): New functions for proctab.
2147 (nprocs): New global, number of forked but unreaped children.
2148 (reap, reap_some): New function, wait for/cleanup forked processes.
2149 (register_proc, update_proc, wait_proc): New functions for adding,
2150 modifying and removing proctab entries.
2151 (create_temp_file): Change parameter type to pointer to file
2152 descriptor, and return type to pointer to struct tempnode.
2153 (dup2_or_die): New function used in create_temp and open_temp.
2154 (pipe_fork): New function, creates a pipe and child process.
2155 (create_temp): Creates a temp file and possibly a compression
2156 program to which we filter output.
2157 (open_temp): Opens a compressed temp file and creates a
2158 decompression process through which to filter the input.
2159 (mergefps): Change FILES parameter type to struct sortfile array
2160 and update access accordingly. Use open_temp and reap_some.
2161 (avoid_trashing_input, merge): Change FILES parameter like
2162 mergefps and call create_temp instead of create_temp_file.
2163 (sort): Call create_temp instead of create_temp_file.
2165 (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
2167 The idea of compressing sorts temporary files was first
2168 suggested/implemented by Jay Soffian in 1998, and again
2169 by Charles Randall in 2001.
2171 2007-01-20 Jim Meyering <jim@meyering.net>
2173 * tests/misc/pwd-long: Work properly even when run from the
2174 wrong one of two or more bind-mounted sibling directories.
2175 Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
2177 2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
2179 Standardize on list of signals when an app catches signals.
2180 * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
2181 SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
2182 * src/ls.c (main): Likewise (except SIGPIPE was already caught).
2183 Note that ls.c is special, as it also catches SIGTSTP.
2184 * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
2185 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
2187 2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
2188 and Paul Eggert <eggert@cs.ucla.edu>
2190 * src/sort.c (cleanup): Clear temphead at the end.
2191 (exit_cleanup): New function.
2192 (main): Don't invoke atexit until we're ready.
2193 Invoke it with exit_cleanup, not with cleanup and close_stdout,
2194 to avoid a race condition with cleanup and signal handling. More
2195 details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
2197 2007-01-18 Jim Meyering <jim@meyering.net>
2199 * src/c99-to-c89.diff: Adjust remove.c offsets.
2201 2007-01-17 Jim Meyering <jim@meyering.net>
2203 Make "rm --interactive=never ..." never prompt.
2204 * NEWS: Mention this.
2205 * src/remove.h (enum rm_interactive): New ternary type.
2206 (struct rm_options) [interactive]: Use it, here -- rather than bool.
2207 * src/remove.c (prompt): Reflect type change.
2208 * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
2209 * src/rm.c (main): Add a FIXME comment for '-d' option.
2210 Adapt to type change of rm_options.interactive.
2212 * tests/rm/i-never: New file. Test for the above fix.
2213 * tests/rm/Makefile.am (TESTS): Add i-never.
2215 2007-01-15 Jim Meyering <jim@meyering.net>
2217 * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
2218 emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
2219 but that's ok, since fts_.h will eventually be renamed.
2221 * src/remove.c (remove_dir): Don't use errno in diagnostic.
2222 Root-only test failure reported by Alex van Hout and Jon Grosshart in
2223 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
2225 * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
2226 s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
2228 2007-01-14 Bruno Haible <bruno@clisp.org>
2230 Enable use of gnulib's new fchdir module.
2231 * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
2232 since we use canonicalize.
2233 (gnulib_modules): Add fchdir.
2234 * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
2236 2007-01-13 Jim Meyering <jim@meyering.net>
2238 * tests/cp/open-perm-race: Remove gdb-based test.
2239 It would run only when compiled with -g, and besides is now
2240 subsumed by file-perm-race.
2241 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
2243 * Transform all Makefile.am files so that when running "make check",
2244 CU_TEST_NAME is set to the name of the test. This is so that when I
2245 run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
2246 on the entire package it is more convenient to map a leak or error
2247 found in a valgrind log file back to the offending test.
2249 (echo tests/Makefile.am.in; find tests -name Makefile.am) \
2250 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
2251 -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
2253 2007-01-11 Jim Meyering <jim@meyering.net>
2255 Avoid a leak in expr's implementation of the ":" (match) operator.
2256 * src/expr.c (docolon): Free the regexp buffer using regfree, rather
2257 than doing it manually, being careful to set fastmap to NULL first.
2258 Free any re_regs.start and .end members, if necessary.
2260 * tests/misc/test-diag: Work also when libc's error function
2261 reports the entire program name ("../../src/test"), rather than
2262 just the final component.
2264 2007-01-10 Jim Meyering <jim@meyering.net>
2266 Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
2267 * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
2268 (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
2269 directory. Non-directory entries lack fts_statp data when using
2270 the FTS_NOSTAT option.
2272 2007-01-07 Jim Meyering <jim@meyering.net>
2274 * tests/sample-test: Update copyright date to 2007.
2275 * Makefile.maint (copyright-check): Also check the copyright date
2276 in tests/sample-test.
2278 2007-01-06 Jim Meyering <jim@meyering.net>
2280 * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
2281 based on examples from G.P. Halkes in
2282 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
2284 2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
2286 * src/fmt.c (copy_rest): Correct prefix handling.
2287 Don't elide a line with the prefix followed by only white space.
2288 (get_line): Move EOF-check to loop-termination condition.
2289 * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
2290 (pfx-2): Remove test; its premise was contrary to the documentation.
2292 2007-01-05 Jim Meyering <jim@meyering.net>
2294 Avoid a used-uninitialized bug for invalid input, i.e., when the size
2295 of the input, not counting newlines, is 1 % 4.
2296 * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
2297 It may be smaller when flushing.
2299 2007-01-05 Mike Frysinger <vapier@gentoo.org>
2301 * src/dircolors.hin: Add a TERM directive for cons25.
2303 2007-01-04 Jim Meyering <jim@meyering.net>
2305 * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
2306 case you don't have convenient access to glibc info documentation.
2308 Use the release year, not the current year.
2309 * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
2310 * src/Makefile.am (RELEASE_YEAR): Define it.
2312 Thanks to a prod from Eric Blake.
2314 Ensure that "group --version" always prints the current year.
2315 * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
2316 * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
2317 Suggestion from Eric Blake.
2319 When decoding, always allow newlines in input, with almost no
2321 * src/base64.c (do_decode): Initialize decode context.
2322 Call base64_decode one more time, after all input is processed.
2323 (usage): When decoding, newlines are always accepted.
2325 * tests/misc/base64: Add a bunch of tests, for the above.
2326 * gl/lib/base64.c: Include <string.h>.
2327 (base64_decode_ctx_init, get_4, decode_4): New functions.
2328 (base64_decode): Efficiently handle interspersed newlines.
2329 (base64_decode_alloc): Update signature.
2330 * gl/lib/base64.h (struct base64_decode_context): Define.
2331 (base64_decode_ctx_init): Add prototype.
2332 (base64_decode, base64_decode_alloc): Update prototypes.
2334 * gl/lib/base64.c: Copied from gnulib.
2335 * gl/lib/base64.h: Likewise.
2337 2007-01-03 Jim Meyering <jim@meyering.net>
2339 * THANKS: Add Evan Hunt.
2341 2007-01-03 Bruno Haible <bruno@clisp.org>
2343 Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
2344 * tests/chown/deref: Apply lang-default.
2345 * tests/misc/split-a: Likewise.
2346 * tests/mv/reply-no: Likewise.
2348 * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
2351 2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
2353 Now, "ls -FRL" always follows symbolic links on Linux.
2354 * NEWS: Mention this bug fix.
2355 * src/ls.c (gobble_file): Fix bug reported by
2356 Nobuyuki Tsuchimura in
2357 http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
2358 where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
2359 * tests/ls/follow-slink: Add a test for this case.
2361 2007-01-01 Jim Meyering <jim@meyering.net>
2363 * tests/rm/fail-eperm: Revert last change. The PATH=... setting
2364 is not honored at least on HP-UX 11.23 systems.
2365 Instead, simply transform the actual output diagnostic.
2366 Test failure reported by Bob Proulx.
2368 2006-12-30 Jim Meyering <jim@meyering.net>
2370 * bootstrap (gnulib_extra_files): Remove announce-gen.
2371 * bootstrap.conf (gnulib_modules): Add it here instead, now that
2374 * tests/misc/base64: Factor a long, repetitive string.
2376 * src/c99-to-c89.diff: Adjust remove.c offsets.
2378 Clean up after the change of 2006-12-28.
2379 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
2380 now that this function never modifies the pointer. Adjust comments
2381 and code accordingly.
2382 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
2383 now that AD_pop_and_chdir no longer does that.
2385 * tests/rm/fail-eperm: Avoid spurious differences (the error function
2386 from latest glibc no longer prints the full program_name): so don't
2387 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
2389 * tests/mv/acl (skip): Skip this test also if the destination
2390 directory, which is on a different file system, lacks ACL support.
2392 * src/copy.c (copy_reg): Rewrite a comment that was rendered
2393 inaccurate by the 2006-10-18 change.
2395 2006-12-28 Jim Meyering <jim@meyering.net>
2397 When moving "up" the hierarchy, be careful to remove a just-emptied
2398 directory before opening ".", to avoid trouble with file system
2399 implementations that cache readdir results at opendir-time.
2400 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
2401 Don't update **DIRP. Don't call fdopendir here.
2402 (remove_dir): Call fdopendir here instead.
2403 Report and patch from Mikulas Patocka:
2404 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
2406 2006-12-27 Jim Meyering <jim@meyering.net>
2408 * src/tail.c (usage): Mention +N for --bytes and --lines.
2409 Suggestion from Evan Hunt.
2411 2006-12-26 Jim Meyering <jim@meyering.net>
2413 * configure.ac: Require autoconf-2.61 and automake-1.10.
2414 Without the former (even with autoconf-2.60), "make distcheck"
2415 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
2416 due to an inttypes.h generated with CFLAGS including -pedantic.
2417 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
2419 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
2420 tag, using the release version number as the message.
2421 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
2423 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
2425 * NEWS: dd bs= operands now silently override later ibs= and obs=,
2427 * src/dd.c (scanargs): Implement it.
2428 * tests/dd/misc (outbytes): Test it.
2429 * doc/coreutils.texi (dd invocation): Specify that bs=N
2430 overrides later ibs and obs, undoing part of the
2431 previous change. (The behavior was wrong.)
2433 2006-12-20 Jim Meyering <jim@meyering.net>
2435 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
2436 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
2437 Don't let a non-directory get by with errno == EPERM, either.
2438 Check the file type directly (using cached stat value), rather
2439 than trying to guess it from errno values.
2440 Karl Berry reported that a cross-partition "mv /etc/issue ~"
2441 failed with the um,... suboptimal diagnostic,
2442 "mv: cannot remove `/etc/issue': Not a directory".
2443 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
2444 * tests/rm/fail-eacces: New file.
2445 * NEWS: Mention that both mv and rm are affected.
2447 "cut -f 2- A B" no longer triggers a double-free bug
2448 * src/cut.c (cut_fields): Set file-scoped global to NULL after
2449 freeing it. This avoids a double-free (and core dump on some systems)
2450 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
2451 James Hunt in <http://bugzilla.redhat.com/220312>.
2452 * NEWS: List this bug fix.
2453 * THANKS: Mention him.
2454 * tests/misc/cut: New file.
2455 * tests/misc/Makefile.am (TESTS): Add cut.
2457 2006-12-15 Jim Meyering <jim@meyering.net>
2459 * tests/cp/open-perm-race: Correct the gdb-existence check.
2460 Don't run either subsequent gdb command in a sub-shell.
2461 Reported by Thomas Schwinge.
2462 * THANKS: bring up to date.
2464 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
2466 Make sure cp -p isn't too generous with file permissions.
2467 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
2468 * tests/cp/file-perm-race: New file.
2470 Ensure cp -pR --parents isn't too generous with parent permissions.
2471 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
2472 * tests/cp/parent-perm-race: New file.
2474 2006-12-14 Jim Meyering <jim@meyering.net>
2476 * tests/chgrp/default-no-deref: Don't assume that files are created
2477 with the primary group by default. That's not true in a directory
2478 with the set-GID bit set.
2480 Don't hang when there's no input tty.
2481 * tests/cp/open-perm-race: Skip this test if there is no
2482 controlling input `terminal'.
2484 Test for a hard-to-detect race fix, using gdb.
2485 * tests/cp/open-perm-race: New file, to test for the
2486 cp --preserve=ownership fix of 2006-12-06.
2488 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
2489 (TESTS): Add open-perm-race.
2491 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
2492 * src/chown.c (main): Likewise.
2493 * src/chown-core.c (change_file_owner): Add to a comment.
2494 * tests/chown/preserve-root: Add tests.
2496 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
2497 * src/chmod.c (process_file): Do honor the --preserve-root option.
2498 * src/chown-core.c (change_file_owner): Likewise, but here, also
2499 handle the case in which a traversal would go "through" a symlink
2500 to root. Reported by Matthew M. Boedicker
2501 * tests/chown/preserve-root: Test for the above.
2502 * tests/chown/Makefile.am (TESTS): Add preserve-root.
2504 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
2505 to gnulib's m4/openat.m4.
2507 2006-12-13 Andreas Schwab <schwab@suse.de>
2509 Don't fail if mv/acl test succeeds.
2510 * tests/mv/acl (skip): Check for acl support in the file system.
2511 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
2512 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
2514 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2516 Remove some arbitrary restrictions on size fields, so that
2517 commands like "sort -k 18446744073709551616" no longer fail merely
2518 because 18446744073709551616 doesn't fit in uintmax_t. The trick
2519 is that these fields can all be treated as effectively infinity;
2520 their exact values don't matter, since no internal buffer can be
2522 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
2523 ULONG_MAX if the code assumes this. Silently truncate too-large
2524 values to SIZE_MAX, as the remaining code will do the right thing
2526 * src/sort.c (parse_field_count): Likewise.
2527 * src/uniq.c (size_opt, main): Likewise.
2528 * tests/join/Test.pm (bigfield): New test.
2529 * tests/sort/Test.pm (bigfield): New test.
2530 * tests/uniq/Test.pm (121): New test.
2532 2006-12-13 Jim Meyering <jim@meyering.net>
2534 * tests/chgrp/default-no-deref: New test.
2535 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
2537 2006-12-12 Jim Meyering <jim@meyering.net>
2539 * src/system.h (SETVBUF): Remove definition, now that the
2540 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
2541 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
2542 * src/od.c (open_next_file): Likewise.
2544 2006-12-09 Jim Meyering <jim@meyering.net>
2546 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
2547 "source". I.e. "GNU coreutils 6.7".
2549 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
2550 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
2551 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
2553 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
2554 whenever uniq is expected to fail. This should catch the other case
2555 [test #112] in which uniq emits "cat: write error: Broken pipe" on
2558 2006-12-08 Jim Meyering <jim@meyering.net>
2560 Include bootstrap tool version info in the announcement form.
2561 * Makefile.maint (gnulib_snapshot_date): Define.
2562 (announcement): Use two new announce-gen options,
2563 --bootstrap-tools and --gnulib-snapshot-date.
2564 * Makefile.cfg (gnulib_dir): Set.
2566 Post-release version change.
2567 * NEWS: Add a line for 6.8-dirty.
2568 * configure.ac (AC_INIT): Set new version string.
2570 2006-12-07 Jim Meyering jim@meyering.net
2573 * NEWS: Record release date. Remove '-pre' suffix.
2574 * configure.ac (AC_INIT): Remove version string suffix.
2576 2006-12-07 Jim Meyering <jim@meyering.net>
2578 Make the output of "make check" more reproducible.
2579 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
2580 evoke diagnostics like this when COLUMNS=0 in the environment:
2581 ls: ignoring invalid width in environment variable COLUMNS: 0
2582 * tests/touch/no-rights: Likewise.
2583 * tests/help-version: Likewise.
2584 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
2585 118, since it emits "cat: write error: Broken pipe" on some systems.
2587 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
2589 * NEWS: Document the cp -p fix for special bits.
2590 * src/copy.c (set_owner): Now returns a three-way result, so
2591 that the caller can clear the special bits. All callers changed.
2592 (copy_reg): Don't set the special bits if chown failed.
2593 (copy_internal): Likewise.
2594 * tests/cp/special-bits: Test this fix.
2596 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
2598 * NEWS: Document the cp --preserve=ownership fix.
2599 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
2600 * src/copy.c (fchmod_or_lchmod): New function.
2601 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
2602 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
2603 When creating a file, use O_EXCL, so we're more likely to detect
2604 funny business by other processes. At the end, if permissions
2605 were omitted, chmod them back in.
2606 (copy_internal): If the ownership might change, omit some permissions
2607 at first, then restore them after chowning the file.
2608 * src/cp.c (make_dir_parents_private): Likewise.
2609 * src/copy.c (cached_umask): New function.
2610 * src/copy.h (cached_umask): New decl.
2612 2006-12-06 Jim Meyering <jim@meyering.net>
2614 Make the output of "make check" more reproducible.
2615 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
2617 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
2619 * src/install.c (install_file_in_file): Preserve time stamps
2620 before changing owner or file mode bits, for consistency with
2621 other coreutils programs.
2623 2006-12-03 Jim Meyering <jim@meyering.net>
2625 * tests/misc/date-sec: Output a fixed string.
2627 * NEWS: du --one-file-system (-x) would skip subdirectories of any
2628 directory listed as second or subsequent command line argument.
2629 * tests/du/one-file-system: New file. Test for today's fts.c fix.
2630 * tests/du/Makefile.am (TESTS): Add one-file-system.
2631 Reported by Mike Frysinger.
2633 2006-12-02 Jim Meyering <jim@meyering.net>
2635 * tests/du/basic: Generate 4KB file simply using printf, rather than
2636 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
2638 2006-11-28 Jim Meyering <jim@meyering.net>
2640 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
2641 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
2642 Reported by Matthew Woehlke.
2644 * tests/mv/dir2dir: Also accept EBUSY.
2645 Reported by Matthew Woehlke.
2647 2006-11-27 Jim Meyering <jim@meyering.net>
2649 * Makefile.maint (patch-check): Rewrite to diagnose failure.
2650 * src/c99-to-c89.diff: Adjust shred.c offsets.
2652 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
2654 Improve the check for departures from C89, and fix the departures
2656 * Makefile.maint (my-distcheck): Also check for C89 compatibility
2657 as best we can with GCC.
2658 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
2659 declaration; C89 doesn't allow this.
2660 * src/dcgen: Don't generate string literals longer than
2661 what C89 requires support for.
2662 * src/cut.c (usage): Don't use string literals longer than
2663 what C89 requires support for.
2664 * src/date.c (usage): Likewise.
2665 * src/dd.c (usage): Likewise.
2666 * src/du.c (usage): Likewise.
2667 * src/ls.c (usage): Likewise.
2668 * src/od.c (usage): Likewise.
2669 * src/readlink.c (usage): Likewise.
2670 * src/seq.c (usage): Likewise.
2671 * src/shred.c (usage): Likewise.
2673 2006-11-26 Mike Frysinger <vapier@gentoo.org>
2675 Recognize new archive, audio and image formats.
2676 Give audio files a separate color.
2677 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
2678 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
2679 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
2680 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
2681 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
2682 audio color to 00;36 to differentiate from image/video color.
2684 2006-11-26 Jim Meyering <jim@meyering.net>
2686 * Makefile.maint (patch-check): Compile patched sources with
2687 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
2688 no violations remain.
2690 * src/c99-to-c89.diff: Remove 3 bogus hunks.
2692 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
2695 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
2697 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
2699 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
2701 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
2702 while trying to retain the readability of C99 as much as possible.
2703 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
2704 Replace each of two uses with literal AT_FDCWD.
2705 (cache_stat_init): Return its argument, for convenience.
2706 Update the caller in remove_dir.
2707 (AD_pop_and_chdir): Return prev_dir rather than storing through
2708 a pointer argument. All uses changed.
2709 (AD_ensure_initialized): New function.
2710 (AD_mark_helper): Use it, to avoid the need for declaration
2712 (rm): Move cycle_check_init call into callee...
2714 Use an else clause in place of a "continue" statement.
2715 (close_preserve_errno): Remove.
2716 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
2718 2006-11-25 Jim Meyering <jim@meyering.net>
2720 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
2722 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
2724 * tests/du/inacc-dest: Skip this test when running as root.
2726 2006-11-23 Jim Meyering <jim@meyering.net>
2728 * announce-gen: Remove file. It's moving to gnulib.
2729 * bootstrap: Pull it from gnulib/build-aux instead.
2730 * Makefile.maint (announcement): Reflect move to ./build-aux.
2732 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
2733 rather than a pipeline that would sometimes evoke a diagnostic
2734 like "seq: write error: Broken pipe".
2736 * tests/help-version: Suppress dd transfer rate output.
2738 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
2740 2006-11-22 Jim Meyering <jim@meyering.net>
2742 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
2743 change "(:?..." to "(?:..." in regexps.
2745 Post-release version change.
2746 * NEWS: Add a line for 6.7-pre.
2747 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
2750 * NEWS: Record release date. Remove "-pre" suffix.
2751 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
2753 * announce-gen: Remove unused --release-archive-directory option.
2754 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
2756 Match version numbers in NEWS using tighter regular expressions.
2757 (main): Require the --gpg-key-id=ID option.
2758 * Makefile.maint (announcement): Don't use now-removed
2759 --release-archive-directory=... option.
2761 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
2763 2006-11-21 Jim Meyering <jim@meyering.net>
2765 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
2766 skip the test rather than failing. Reported by Michael Deutschmann.
2768 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
2769 rather than just "exit N".
2771 Arrange for "make check-root" to run the new root-only test.
2772 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
2775 2006-11-20 Jim Meyering <jim@meyering.net>
2777 Add a root-only test for today's lib/idcache.c fix.
2778 * tests/ls/nameless-uid: New file.
2779 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
2780 (TESTS_ENVIRONMENT): Add PERL to the list.
2782 2006-11-19 Jim Meyering <jim@meyering.net>
2784 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
2785 find the 7-second sleep annoyingly long. Besides, this test is
2786 probably far too specific and timing sensitive ever to trigger again.
2787 * tests/tail-2/assert: Likewise.
2789 Post-release version change.
2790 * NEWS: Add a line for 6.6-pre.
2791 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
2794 * NEWS: Record release date. Remove "-cvs" suffix.
2795 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2797 2006-11-18 Jim Meyering <jim@meyering.net>
2799 "ln --backup f f" produces a misleading diagnostic:
2800 ln: creating hard link `f' => `f': No such file or directory
2801 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
2802 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
2803 * tests/ln/Makefile.am (TESTS): Add hard-backup.
2804 * tests/ln/hard-backup: New test for the above.
2805 * NEWS: Mention this fix.
2807 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
2809 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
2811 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
2812 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
2813 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
2814 Omit unnecessary parenthesization of args.
2815 * src/od.c (EQUAL_BLOCKS): Likewise.
2816 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
2818 2006-11-16 Jim Meyering <jim@meyering.net>
2820 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
2821 automake we're skipping this test), and give a diagnostic to tell
2822 the user the same thing. Reported by Mike Grayson.
2824 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2826 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
2827 with `$(MAN)', computed at configure time; also, list them ...
2828 (optional_mans): ... in this new variable.
2829 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
2831 2006-11-16 Jim Meyering <jim@meyering.net>
2833 Help valgrind see that there is no leak in dd.c.
2834 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
2835 so we need not free them at all. This is easier than freeing
2836 both buffers at each of the early "return"s.
2838 * src/csplit.c (load_buffer): Plug an inconsequential leak.
2840 2006-11-15 Jim Meyering <jim@meyering.net>
2842 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
2843 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
2845 2006-11-14 Jim Meyering <jim@meyering.net>
2847 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
2848 remove the now-unnecessary use of AC_LIBSOURCES.
2850 Adapt to new version of gnulib-tool.
2851 * gl/modules/root-dev-ino: New file.
2852 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
2853 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
2854 * m4/root-dev-ino.m4: Move this file ...
2855 * gl/m4/root-dev-ino.m4: ... to here.
2857 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
2859 2006-11-13 Jim Meyering <jim@meyering.net>
2861 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
2864 Plug another technically-unimportant leak in sort.
2865 * src/sort.c (main): Don't allocate memory for each new key here.
2866 (insertkey): Allocate memory for each key here, instead.
2867 (key_init): Rename from new_key. Don't allocate.
2869 * src/sort.c (main): Plug a tiny memory leak.
2870 Move declaration of local "minus" down to be nearer point of use.
2872 2006-11-12 Jim Meyering <jim@meyering.net>
2874 du would exit early, when encountering an inaccessible directory
2875 Reported by Mike Frysinger, in
2876 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
2877 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
2878 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
2879 diagnostic from the expected output when using native fdopendir.
2880 * tests/chmod/no-x: Likewise.
2881 * tests/du/no-x: Likewise.
2882 * NEWS: Mention this bug fix.
2883 * tests/du/Makefile.am (TESTS): Add inacc-dest.
2885 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
2886 for xalloc.h itself.
2888 Avoid false-positive when testing via valgrind.
2889 * tests/mv/atomic: Grep strace output for a more specific pattern
2890 than just "unlink", since that got a false positive when testing
2891 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
2892 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
2894 2006-10-28 Jim Meyering <jim@meyering.net>
2896 * Makefile.maint (patch-check): Make it easier to regenerate
2897 the src/c99-to-c89.diff file. E.g., I do this:
2898 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
2900 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
2902 2006-10-26 Jim Meyering <jim@meyering.net>
2904 * src/system.h (ftello): Add a compile-time check for the highly
2905 unlikely condition of off_t narrower than long int, rather than
2906 handling it at run time. Based on a patch from Paul Eggert.
2908 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
2910 * tests/chmod/c-option: When double-quoting part of a word, prefer
2911 to double-quote the whole word. This is a bit easier to read (at
2912 least for me), and in some cases it avoids a shell bug with Tru64
2913 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
2914 "$abs_srcdir"/../setgid-check we now write
2915 "$abs_srcdir/../setgid-check".
2916 * tests/cp/cp-parents: Likewise.
2917 * tests/du/inaccessible-cwd: Likewise.
2918 * tests/du/long-from-unreadable: Likewise.
2919 * tests/install/basic-1: Likewise.
2920 * tests/install/trap: Likewise.
2921 * tests/misc/close-stdout: Likewise.
2922 * tests/mkdir/concurrent-1: Likewise.
2923 * tests/mkdir/p-1: Likewise.
2924 * tests/mkdir/p-3: Likewise.
2925 * tests/mkdir/parents: Likewise.
2926 * tests/mkdir/perm: Likewise.
2927 * tests/readlink/can-e: Likewise.
2928 * tests/readlink/can-f: Likewise.
2929 * tests/readlink/can-m: Likewise.
2930 * tests/rm/inaccessible: Likewise.
2931 * tests/rm/unread3: Likewise.
2932 * tests/touch/no-create-missing: Likewise.
2934 * lib/.cvsignore: Add uinttostr.c.
2936 2006-10-25 Jim Meyering <jim@meyering.net>
2938 Portability to Tru64 V4.0.
2939 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
2940 Define inline replacement function.
2941 This (along with a yesterday's fix for autoconf's
2942 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
2943 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
2945 2006-10-25 Bruno Haible <bruno@clisp.org>
2947 * src/cat.c (infile): Add "const" to declaration.
2948 * src/csplit.c (prefix): Likewise.
2949 * src/printf.c (cfcc_msg): Likewise.
2950 * src/tail.c (valid_file_spec): Likewise.
2951 * src/cut.c (cut_file): Likewise, for a parameter.
2952 * src/expr.c (str_value): Likewise.
2953 * src/fold.c (fold_file): Likewise.
2954 * src/pr.c (init_header): Likewise.
2955 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
2956 * src/tr.c (make_printable_str): Likewise.
2957 * src/nl.c (body_type, header_type, footer_type, current_type):
2958 (separator_str, build_type_arg, nl_file): Likewise, for many.
2959 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
2960 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
2962 2006-10-25 Jim Meyering <jim@meyering.net>
2964 * tests/sample-test: Update copyright year list to include only
2965 the current year, since this is what I'll want in any new test.
2967 2006-10-24 Jim Meyering <jim@meyering.net>
2969 * src/c99-to-c89.diff: Update to reflect new offsets.
2971 * NEWS: new feature: rm accepts new option: --one-file-system
2972 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
2973 * src/remove.h (struct rm_options) [one_file_system]: New member.
2974 * src/rm.c (rm_option_init): Initialize it.
2975 (usage): Document the option.
2976 * src/mv.c (rm_option_init): Likewise.
2977 * src/remove.c (remove_dir): With --one-file-system and --recursive,
2978 for each directory command line argument, do not affect a file system
2979 different from that of the starting directory. And give a diagnostic.
2980 * src/rm.c (ONE_FILE_SYSTEM): New enum.
2981 (main): Handle new option.
2982 * tests/rm/one-file-system: Test the above.
2983 * tests/rm/Makefile.am (TESTS): Add one-file-system.
2984 * tests/Makefile.am (check-root): Add the rm/one-file-system
2986 (EXTRA_DIST): Add other-fs-tmpdir.
2988 * tests/mv/setup: Removed. Renamed to...
2989 * tests/other-fs-tmpdir: ...this new file.
2990 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
2991 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
2992 * tests/mv/backup-is-src: Likewise.
2993 * tests/mv/hard-link-1: Likewise.
2994 * tests/mv/leak-fd: Likewise.
2995 * tests/mv/mv-special-1: Likewise.
2996 * tests/mv/part-fail: Likewise.
2997 * tests/mv/part-hardlink: Likewise.
2998 * tests/mv/part-rename: Likewise.
2999 * tests/mv/part-symlink: Likewise.
3000 * tests/mv/partition-perm: Likewise.
3001 * tests/mv/to-symlink: Likewise.
3002 * tests/mv/into-self-2: Likewise.
3004 Don't let a failure in one test stop "make -k" from running the others.
3005 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
3006 (check-root): Depend on them, rather than executing the five
3007 commands in a single rule. Reported by Greg Schafer.
3009 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
3011 * Makefile.maint (alpha beta major): Use a better log message for
3012 the automatic commit of .prev-version.
3014 2006-10-23 Jim Meyering <jim@meyering.net>
3016 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
3017 pwd via a shell. Instead, ensure that the absolute name of the
3018 pwd binary consists solely of reasonable characters.
3019 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
3020 clean-up code isn't run.
3022 * NEWS: Add a line for 6.5-cvs.
3023 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
3025 2006-10-22 Jim Meyering <jim@meyering.net>
3029 * NEWS: Record the 6.4 release date.
3030 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3032 * Makefile.maint: Complete the adaptation to function with a working
3033 directory that is using git (rather than cvs) for version control.
3035 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3037 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
3038 * tests/cp/cp-parents: Likewise.
3039 * tests/mkdir/parents: Likewise.
3040 * tests/mkdir/perm: Likewise.
3042 * tests/sample-test: Quote variables containing absolute build
3043 tree paths. In the cleanup trap, make sure `cd' succeeds before
3044 `chmod'ing and `rm'ing the temporary files.
3045 * tests/chgrp/basic: Likewise.
3046 * tests/chgrp/deref: Likewise.
3047 * tests/chgrp/no-x: Likewise.
3048 * tests/chgrp/posix-H: Likewise.
3049 * tests/chgrp/recurse: Likewise.
3050 * tests/chmod/c-option: Likewise.
3051 * tests/chmod/equal-x: Likewise.
3052 * tests/chmod/equals: Likewise.
3053 * tests/chmod/inaccessible: Likewise.
3054 * tests/chmod/no-x: Likewise.
3055 * tests/chmod/octal: Likewise.
3056 * tests/chmod/setgid: Likewise.
3057 * tests/chmod/umask-x: Likewise.
3058 * tests/chmod/usage: Likewise.
3059 * tests/chown/basic: Likewise.
3060 * tests/chown/deref: Likewise.
3061 * tests/chown/separator: Likewise.
3062 * tests/cp/acl: Likewise.
3063 * tests/cp/backup-1: Likewise.
3064 * tests/cp/backup-dir: Likewise.
3065 * tests/cp/backup-is-src: Likewise.
3066 * tests/cp/cp-HL: Likewise.
3067 * tests/cp/cp-deref: Likewise.
3068 * tests/cp/cp-i: Likewise.
3069 * tests/cp/cp-mv-backup: Likewise.
3070 * tests/cp/cp-parents: Likewise.
3071 * tests/cp/deref-slink: Likewise.
3072 * tests/cp/dir-rm-dest: Likewise.
3073 * tests/cp/dir-slash: Likewise.
3074 * tests/cp/dir-vs-file: Likewise.
3075 * tests/cp/fail-perm: Likewise.
3076 * tests/cp/into-self: Likewise.
3077 * tests/cp/link: Likewise.
3078 * tests/cp/link-no-deref: Likewise.
3079 * tests/cp/link-preserve: Likewise.
3080 * tests/cp/no-deref-link1: Likewise.
3081 * tests/cp/no-deref-link2: Likewise.
3082 * tests/cp/no-deref-link3: Likewise.
3083 * tests/cp/perm: Likewise.
3084 * tests/cp/preserve-2: Likewise.
3085 * tests/cp/r-vs-symlink: Likewise.
3086 * tests/cp/same-file: Likewise.
3087 * tests/cp/slink-2-slink: Likewise.
3088 * tests/cp/sparse: Likewise.
3089 * tests/cp/special-bits: Likewise.
3090 * tests/cp/src-base-dot: Likewise.
3091 * tests/cp/symlink-slash: Likewise.
3092 * tests/dd/not-rewound: Likewise.
3093 * tests/dd/skip-seek2: Likewise.
3094 * tests/dd/unblock-sync: Likewise.
3095 * tests/du/2g: Likewise.
3096 * tests/du/8gb: Likewise.
3097 * tests/du/basic: Likewise.
3098 * tests/du/deref: Likewise.
3099 * tests/du/deref-args: Likewise.
3100 * tests/du/exclude: Likewise.
3101 * tests/du/fd-leak: Likewise.
3102 * tests/du/hard-link: Likewise.
3103 * tests/du/inaccessible-cwd: Likewise.
3104 * tests/du/long-from-unreadable: Likewise.
3105 * tests/du/long-sloop: Likewise.
3106 * tests/du/no-deref: Likewise.
3107 * tests/du/no-x: Likewise.
3108 * tests/du/restore-wd: Likewise.
3109 * tests/du/slash: Likewise.
3110 * tests/du/slink: Likewise.
3111 * tests/du/trailing-slash: Likewise.
3112 * tests/du/two-args: Likewise.
3113 * tests/fmt/long-line: Likewise.
3114 * tests/install/basic-1: Likewise.
3115 * tests/install/create-leading: Likewise.
3116 * tests/install/d-slashdot: Likewise.
3117 * tests/install/trap: Likewise.
3118 * tests/ln/misc: Likewise.
3119 * tests/ln/target-1: Likewise.
3120 * tests/ls/color-dtype-dir: Likewise.
3121 * tests/ls/dangle: Likewise.
3122 * tests/ls/dired: Likewise.
3123 * tests/ls/file-type: Likewise.
3124 * tests/ls/follow-slink: Likewise.
3125 * tests/ls/infloop: Likewise.
3126 * tests/ls/inode: Likewise.
3127 * tests/ls/m-option: Likewise.
3128 * tests/ls/no-arg: Likewise.
3129 * tests/ls/recursive: Likewise.
3130 * tests/ls/rt-1: Likewise.
3131 * tests/ls/stat-dtype: Likewise.
3132 * tests/ls/stat-failed: Likewise.
3133 * tests/ls/stat-vs-dirent: Likewise.
3134 * tests/misc/cat-proc: Likewise.
3135 * tests/misc/close-stdout: Likewise.
3136 * tests/misc/csplit: Likewise.
3137 * tests/misc/date-sec: Likewise.
3138 * tests/misc/false-status: Likewise.
3139 * tests/misc/head-c: Likewise.
3140 * tests/misc/head-pos: Likewise.
3141 * tests/misc/mknod: Likewise.
3142 * tests/misc/nl: Likewise.
3143 * tests/misc/nohup: Likewise.
3144 * tests/misc/pathchk1: Likewise.
3145 * tests/misc/printf: Likewise.
3146 * tests/misc/printf-hex: Likewise.
3147 * tests/misc/pwd-long: Likewise.
3148 * tests/misc/shuf: Likewise.
3149 * tests/misc/sort-rand: Likewise.
3150 * tests/misc/split-a: Likewise.
3151 * tests/misc/split-fail: Likewise.
3152 * tests/misc/split-l: Likewise.
3153 * tests/misc/stat-fmt: Likewise.
3154 * tests/misc/tac-continue: Likewise.
3155 * tests/misc/wc-files0: Likewise.
3156 * tests/mkdir/concurrent-1: Likewise.
3157 * tests/mkdir/p-1: Likewise.
3158 * tests/mkdir/p-2: Likewise.
3159 * tests/mkdir/p-3: Likewise.
3160 * tests/mkdir/p-slashdot: Likewise.
3161 * tests/mkdir/p-thru-slink: Likewise.
3162 * tests/mkdir/p-v: Likewise.
3163 * tests/mkdir/parents: Likewise.
3164 * tests/mkdir/perm: Likewise.
3165 * tests/mkdir/t-slash: Likewise.
3166 * tests/mv/acl: Likewise.
3167 * tests/mv/atomic: Likewise.
3168 * tests/mv/backup-dir: Likewise.
3169 * tests/mv/childproof: Likewise.
3170 * tests/mv/diag: Likewise.
3171 * tests/mv/dir-file: Likewise.
3172 * tests/mv/dir2dir: Likewise.
3173 * tests/mv/dup-source: Likewise.
3174 * tests/mv/hard-2: Likewise.
3175 * tests/mv/hard-3: Likewise.
3176 * tests/mv/hard-4: Likewise.
3177 * tests/mv/hard-link-1: Likewise.
3178 * tests/mv/hard-verbose: Likewise.
3179 * tests/mv/i-2: Likewise.
3180 * tests/mv/i-3: Likewise.
3181 * tests/mv/i-4: Likewise.
3182 * tests/mv/i-5: Likewise.
3183 * tests/mv/i-link-no: Likewise.
3184 * tests/mv/into-self-4: Likewise.
3185 * tests/mv/leak-fd: Likewise.
3186 * tests/mv/mv-special-1: Likewise.
3187 * tests/mv/no-target-dir: Likewise.
3188 * tests/mv/part-fail: Likewise.
3189 * tests/mv/part-hardlink: Likewise.
3190 * tests/mv/part-rename: Likewise.
3191 * tests/mv/part-symlink: Likewise.
3192 * tests/mv/partition-perm: Likewise.
3193 * tests/mv/perm-1: Likewise.
3194 * tests/mv/reply-no: Likewise.
3195 * tests/mv/trailing-slash: Likewise.
3196 * tests/mv/update: Likewise.
3197 * tests/od/od-N: Likewise.
3198 * tests/od/x8: Likewise.
3199 * tests/readlink/can-e: Likewise.
3200 * tests/readlink/can-f: Likewise.
3201 * tests/readlink/can-m: Likewise.
3202 * tests/readlink/rl-1: Likewise.
3203 * tests/rm/cycle: Likewise.
3204 * tests/rm/dangling-symlink: Likewise.
3205 * tests/rm/deep-1: Likewise.
3206 * tests/rm/dir-no-w: Likewise.
3207 * tests/rm/dir-nonrecur: Likewise.
3208 * tests/rm/dot-rel: Likewise.
3209 * tests/rm/empty-inacc: Likewise.
3210 * tests/rm/f-1: Likewise.
3211 * tests/rm/fail-2eperm: Likewise.
3212 * tests/rm/hash: Likewise.
3213 * tests/rm/i-1: Likewise.
3214 * tests/rm/i-no-r: Likewise.
3215 * tests/rm/ignorable: Likewise.
3216 * tests/rm/inaccessible: Likewise.
3217 * tests/rm/interactive-always: Likewise.
3218 * tests/rm/interactive-once: Likewise.
3219 * tests/rm/ir-1: Likewise.
3220 * tests/rm/isatty: Likewise.
3221 * tests/rm/no-give-up: Likewise.
3222 * tests/rm/r-1: Likewise.
3223 * tests/rm/r-2: Likewise.
3224 * tests/rm/r-3: Likewise.
3225 * tests/rm/r-4: Likewise.
3226 * tests/rm/readdir-bug: Likewise.
3227 * tests/rm/rm1: Likewise.
3228 * tests/rm/rm2: Likewise.
3229 * tests/rm/rm3: Likewise.
3230 * tests/rm/rm4: Likewise.
3231 * tests/rm/rm5: Likewise.
3232 * tests/rm/sunos-1: Likewise.
3233 * tests/rm/unread2: Likewise.
3234 * tests/rm/unread3: Likewise.
3235 * tests/rmdir/fail-perm: Likewise.
3236 * tests/rmdir/t-slash: Likewise.
3237 * tests/shred/exact: Likewise.
3238 * tests/shred/remove: Likewise.
3239 * tests/sum/sysv: Likewise.
3240 * tests/tail-2/append-only: Likewise.
3241 * tests/tail-2/assert: Likewise.
3242 * tests/tail-2/assert-2: Likewise.
3243 * tests/tail-2/big-4gb: Likewise.
3244 * tests/tail-2/fflush: Likewise.
3245 * tests/tail-2/infloop-1: Likewise.
3246 * tests/tail-2/proc-ksyms: Likewise.
3247 * tests/tail-2/start-middle: Likewise.
3248 * tests/tail-2/tail-n0f: Likewise.
3249 * tests/tee/basic: Likewise.
3250 * tests/tee/dash: Likewise.
3251 * tests/touch/fail-diag: Likewise.
3252 * tests/touch/no-create-missing: Likewise.
3253 * tests/touch/not-owner: Likewise.
3254 * tests/touch/obsolescent: Likewise.
3255 * tests/touch/read-only: Likewise.
3256 * tests/touch/relative: Likewise.
3258 2006-10-21 Jim Meyering <jim@meyering.net>
3260 * NEWS: (cp --backup fix): Fix a typo.
3262 * .gitignore: Remove some references to files in subdirectories.
3263 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
3264 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
3266 * src/copy.c (copy_internal): Add a comment saying why we prefer
3269 Enable an fts optimization (call lstat only for directories,
3270 on some file system types) also with the --preserve-root option
3272 * src/chown-core.c (change_file_owner): Compare fts_statp-based
3273 dev/ino against root dev/ino only for directories.
3274 (chown_files): Don't let the root_dev_ino setting influence whether
3275 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
3277 2006-10-20 Jim Meyering <jim@meyering.net>
3279 * src/od.c (usage): Change description of default to use "-w16",
3280 not the now-invalid "-w 16" syntax. From Dan Jacobson.
3282 2006-10-19 Jim Meyering <jim@meyering.net>
3284 * bootstrap: Add names to each .gitignore file (if it exists)
3285 as well as to .cvsignore.
3287 * Makefile.maint (po-check): This rule didn't detect the new use
3288 of "gettext" (as opposed to the use of "_" everywhere else) in
3289 lib/xstrtol.h. Adjust the grep regexp so that now it does.
3291 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
3293 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
3294 when opening dst_name.
3295 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
3296 (SYSCALL) to test for failure in a system call.
3298 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
3299 a fifo. This preserves the special mode bits on Solaris 10, which
3300 is compatible with what Solaris 10 cp -R does.
3302 * src/copy.c (copy_internal): Remove redundant and confusing local
3305 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
3306 7777. This matches historical 'cp' behavior and avoids some
3307 (though not all) implementation-defined behavior of mkdir.
3308 * src/cp.c (make_dir_parents_private): Likewise.
3309 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
3310 than 777. This is required by POSIX. It doesn't make any difference
3311 in actual behavior on any host that I know of.
3313 2006-10-17 Jim Meyering <jim@meyering.net>
3315 * src/dd.c (usage): Use two spaces (not one) to separate the
3316 "fdatasync" option string from its description, so help2man formats
3317 the derived man page properly. Reported by Samuel Thibault
3318 in <http://bugs.debian.org/393649>.
3320 2006-10-16 Jim Meyering <jim@meyering.net>
3322 * .x-sc_trailing_blank: Remove names of files that are no longer
3325 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
3327 * src/groups.sh (version): Reword message to match the other programs.
3328 Problem reported by Eric Blake.
3330 2006-10-14 Jim Meyering <jim@meyering.net>
3332 * Makefile.maint (headers_with_interesting_macro_defs): Define.
3333 (.re-defmac, sc_always_defined_macros): New rules.
3335 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
3336 Instead, include "exit.h". This hereby retires the work-around for
3337 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
3339 * src/cksum.c (uint_fast32_t): Don't define.
3340 Instead, include <stdint.h>.
3342 * src/pinky.c (S_IWGRP): Don't define.
3343 It's already defined by "stat-macros.h" (included via system.h).
3345 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
3346 * Makefile.maint: Likewise, remove these targets/rules/variables:
3347 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
3348 (cvs_files, wget-update, automake_repo): Likewise.
3349 Move the comment about cvsu to build-aux/vc-list-files,
3350 where cvsu is actually used.
3352 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
3354 Work also when the working directory (with e.g. coreutils sources)
3355 is version controlled with git, rather than CVS.
3356 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3358 In messages and comments, say e.g., "checked-out sources",
3359 rather than "CVS sources".
3360 (version_controlled_file): New function. Work for git as well as
3361 for CVS. Don't use grep's -q option.
3362 (slurp): Call it here, in place of CVS-specific code.
3364 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
3366 * src/copy.c (copy_internal): Although we do create a backup of each
3367 destination directory when in move mode, don't do that when copying.
3368 Reported by Peter Breitenlohner, in
3369 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
3370 * tests/cp/backup-dir: New file. Test for the above.
3371 * tests/cp/Makefile.am (TESTS): Add backup-dir.
3373 2006-10-13 Jim Meyering <jim@meyering.net>
3375 More chown/chgrp dereferencing-related fixes.
3376 * src/chown-core.c (change_file_owner): Don't use fts_statp if
3377 we're dereferencing symlinks.
3378 Reverse conjuncts, so that we use dereference file_stats
3379 (aka ent->fts_statp) only *after* we've confirmed that
3380 chopt->affect_symlink_referent is true. Otherwise, we might
3381 use ent->fts_statp uninitialized.
3382 Don't turn on FTS_NOSTAT when dereferencing symlinks.
3383 * tests/chown/deref: Update the expected diagnostic, now that
3384 this test case (trying to use "chown --dereference ..." on a
3385 dangling symlink) takes a different code path.
3387 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
3389 Sync from Bison, as follows:
3391 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3393 Fix problems with translating English-language diagnostics.
3394 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3395 respect to bison-runtime pot generation. The YY_ stuff
3396 wasn't being captured.
3398 2006-10-13 Jim Meyering <jim@meyering.net>
3400 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
3401 now that we're using fts_open with FTS_CWDFD.
3402 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
3403 chgrp, to exercise the above fix.
3404 * NEWS: Mention the above.
3406 * src/du-tests: Clean up a little, though it's still not portable.
3408 * .vg-suppressions: Add 3 more for debian unstable.
3410 * tests/ls/Test.pm: Remove long-unused file.
3411 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
3412 Suggestions from Bruno Haible.
3414 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3416 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
3417 (MAINTAINERCLEANFILES): Add .kludge-stamp.
3418 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
3419 instead of $(man_MANS).
3421 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3423 * configure.ac: Avoid compiler warnings about default return
3424 type in function definitions and unused variables in tests.
3425 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
3426 if this is #defined.
3428 2006-10-12 Jim Meyering <jim@meyering.net>
3430 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
3431 Call gl_INIT directly, rather than through the above.
3433 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3435 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3436 variable was sometimes used without being initialized. This
3437 messed up the installation of the INSTALL file in some cases.
3439 2006-10-11 Jim Meyering <jim@meyering.net>
3441 * src/ls.c (usage): Correct description of -s, --size.
3442 It works even without -l. Suggestion from Karl Berry.
3444 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
3446 * src/ls.c (quote_name): Use initializer rather than memset to
3447 initialize an object to zero. This is easier to read and is less
3448 likely to introduce a runtime error due to a mixup. It causes
3449 gcc -W to issue a warning, but you can work around this by
3450 appending -Wno-missing-field-initializers.
3451 * src/pathchk.c (portable_chars_only): Likewise.
3452 * src/shred.c (main): Likewise.
3453 * src/stty.c (main): Likewise.
3454 * src/tr.c (card_of_complement): Likewise.
3455 * src/wc.c (wc): Likewise.
3457 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3459 * src/sort.c (usage): Mention again that sort fields are origin 1.
3461 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
3464 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3465 --copy. Inspired by a suggestion from Bruno Haible.
3467 2006-10-09 Jim Meyering <jim@meyering.net>
3469 Avoid a compiler warning.
3470 * src/pathchk.c (portable_chars_only): Initialize variable of type
3471 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
3473 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
3475 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
3476 wrong file name in some cases. Lars Wendler reported a bug in
3478 * src/install.c (make_ancestor): New arg COMPONENT.
3479 * src/mkdir.c (make_ancestor): Likewise.
3480 * tests/install/basic-1: Check for install -Dv bug.
3481 * tests/mkdir/Makefile.am (TESTS): Add p-v.
3482 * tests/mkdir/p-v: New file, to test this bug.
3484 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3486 * src/chgrp.c: Don't include lchown.h; no longer needed.
3487 * src/chown.c: Likewise.
3489 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
3490 current file system has useful d_type info.
3492 * src/dd.c (flags): noatime and nofollow now depend on
3493 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
3494 (usage): Output info about noatime and nofollow only if
3495 they are known to work.
3496 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
3497 than O_NOFOLLOW, when testing whether it's possible to avoid a
3498 race condition reliably.
3500 2006-10-05 Jim Meyering <jim@meyering.net>
3502 * src/c99-to-c89.diff: Update to reflect new offsets.
3504 * tests/install/basic-1: Skip the latter part of this test if the
3505 just-built dd binary is not readable. Otherwise, this test would fail
3506 when binaries were created as root. Reported by Bauke Jan Douma in
3507 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
3509 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
3511 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
3512 MiB, since XFS hosts can legitimately have large values of
3513 st_blksize. Problem reported by Tony Ernst in
3514 <http://savannah.gnu.org/bugs/?17903>.
3516 2006-10-04 Jim Meyering <jim@meyering.net>
3518 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
3519 Paul Eggert pointed out that the specified file may exist,
3520 in spite of such an errno value.
3521 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
3522 * tests/rm/ignore-name-too-long: Remove file.
3523 * NEWS: Update here, too.
3525 2006-10-03 Jim Meyering <jim@meyering.net>
3527 * tests/rm/fail-eperm: Report failure also if rm is terminated by
3530 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
3531 and one in shred.c -- that were added before coreutils-6.3.
3532 Reported by Michael Deutschmann.
3534 * src/c99-to-c89.diff: Update to reflect new offsets.
3536 * src/remove.c (remove_entry): With -f, exit successfully in spite
3537 of a missing file under some very unusual conditions (with errno
3538 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
3540 With --force (-f), rm no longer fails for ENOTDIR.
3541 * src/remove.c (ignorable_missing): New function.
3542 Use it everywhere, rather than open-coding the test.
3543 Andreas Schwab reported the ENOTDIR problem.
3544 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
3546 * NEWS: Mention the bug fix.
3547 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
3548 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
3549 * tests/rm/Makefile.am (TESTS): Add the new file names.
3551 * bootstrap: Undo last change to this file, since now gnulib-tool
3552 sticks with the automake default in generating dependencies.
3554 * NEWS: Add a line for 6.4-cvs.
3555 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
3557 2006-09-30 Jim Meyering <jim@meyering.net>
3560 * NEWS: Record the 6.3 release date.
3561 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3563 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
3565 * src/c99-to-c89.diff: Update offsets.
3567 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3569 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
3570 as it doesn't work with Solaris /bin/sh.
3572 2006-09-29 Jim Meyering <jim@meyering.net>
3574 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
3577 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
3578 use .1 as the increment. Actual output varies too much.
3579 [eq-wid-3]: New, commented out test.
3581 * src/shuf.c (read_input): Fix an off-by-one error that
3582 would cause an infloop for piped input of 8KB or more.
3583 * NEWS: Mention the fix.
3584 * tests/misc/shuf: Test for the above fix.
3586 Since any system may be affected by the Darwin readdir bug,
3587 perform the extra rewinddir unconditionally. The performance
3588 impact of rewinding a directory is negligible.
3589 * src/remove.c (NEED_REWIND): Define to use
3590 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
3592 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
3593 increment translates to a slightly larger value.
3594 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
3595 The final expected value wasn't being printed.
3597 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
3598 and NFS, whereby rm would not remove all files in a directory.
3599 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
3600 (NEED_REWIND): New macro, so that we incur the cost of the work-around
3601 rewinddir only on afflicted systems.
3602 * NEWS: Clarify and correct.
3603 * tests/rm/readdir-bug: New file. Test for the above fix.
3604 * tests/rm/Makefile.am (TESTS): Add it.
3605 Prompted by testing and analysis from Bruno Haible:
3606 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
3608 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
3610 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
3611 suggested for Debian stable, which uses Perl 5.8.4.
3613 2006-09-28 Jim Meyering <jim@meyering.net>
3615 Automatically generated dependencies are important even
3616 when all of the sources in a directory come from gnulib.
3617 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3618 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3620 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
3621 Ensure that IFS is set properly and unset PATH.
3623 Work properly even when the name of the selected file starts with "-".
3624 Invoke rm via "../../src/rm", and adjust expected output.
3625 Prompted by a patch from Tim Waugh.
3627 * README-cvs: Add Bison to the list of required packages.
3629 2006-09-26 Jim Meyering <jim@meyering.net>
3631 * src/c99-to-c89.diff: Update offsets.
3633 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
3634 it from removing a directory containing 188 or more entries.
3635 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
3636 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
3637 Reported by Matthew Woehlke.
3639 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
3641 * NEWS: "groups user" no longer outputs "user :"; you need at least
3642 two users. "groups" now processes options like --help more compatibly.
3643 * src/groups.sh: Implement the option-processing change.
3644 Handle user and group names with special characters more robustly.
3645 Report write errors instead of exiting silently with status 1.
3647 2006-09-26 Jim Meyering <jim@meyering.net>
3649 * README: Warn not to run autoreconf manually. Use bootstrap instead.
3651 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
3652 Rewrite to avoid using temporary, $status.
3654 * NEWS: Mention the bug fix.
3655 * src/groups.sh: Don't hide a write failure.
3656 Reported by Iain Calder <ic56@rogers.com>.
3658 2006-09-25 Jim Meyering <jim@meyering.net>
3660 * src/chown.c (usage): Clarify --dereference description.
3661 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
3663 2006-09-24 Jim Meyering <jim@meyering.net>
3665 * NEWS: Mention these fixes.
3666 * src/copy.c (copy_reg): With --verbose (-v), print
3667 "removed `file_name'" just after unlinking a file.
3668 (copy_internal): Likewise, in three more places.
3669 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
3670 * tests/mv/hard-verbose: New file. Test for the above fix.
3671 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
3673 * tests/help-version (sync_args): Don't call sync, since it spins up
3674 disks that I've deliberately caused to spin down (but not unmounted).
3676 * NEWS: Mention the improvement to sort.
3678 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
3679 as well as existing.
3681 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
3682 since that predated addition of d_type support.
3684 2006-09-23 Jim Meyering <jim@meyering.net>
3686 * gl/modules/getloadavg.diff: New file. Work around the way the latest
3687 version of the getloadavg module interacts with our bootstrap script.
3688 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3689 * Makefile.am (EXTRA_DIST): Sort file names.
3690 Add bootstrap and gl/modules/getloadavg.diff
3692 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3694 * bootstrap: Add support for --force.
3695 (usage): New function. Describe usage less tersely.
3696 (CVS_only_file): New var.
3698 * NEWS: Document fix for cp -i and mv -i.
3699 * src/copy.c (copy_internal): With -i, prompt even if the source
3700 is a directory and the destination is not. This is required by
3701 POSIX and gives the user a chance to bail out before failing.
3702 * tests/cp/Makefile.am (TESTS): Add cp-i.
3703 * tests/cp/cp-i: New file.
3704 * tests/mv/Makefile.am (TESTS): Add i-5.
3705 * tests/mv/i-5: New file.
3707 2006-09-20 Jim Meyering <jim@meyering.net>
3709 * NEWS: Mention the chmod bug fix.
3711 * tests/chmod/inaccessible: New test, specifically for this bug.
3712 Based on a test case from Paul Eggert.
3713 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
3715 Fix the 2006-09-18 bug differently.
3716 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
3717 tell fts_read to stat the file again, in case it has become
3718 accessible since the initial fts_open call.
3719 * src/chown-core.c (change_file_owner): Likewise.
3721 * src/chmod.c: Revert last change. There is a better way.
3722 * src/chown-core.c: Likewise.
3724 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
3726 * src/ln.c (target_directory_operand): Rewrite to avoid porting
3727 problem on Tandem reported by Matthew Woehlke in
3728 <https://savannah.gnu.org/bugs/?17172>.
3730 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3732 Fix bug where chmod, chown, and chgrp did not process operands
3733 left-to-right in some cases.
3734 * src/chmod.c (wd_errno): New var.
3735 (chmod_file): New function, with most of the contents of the
3736 old prcess_file function.
3737 (process_files): Use it. This gives file names to fts one
3738 at a time, so that they are processed left-to-right as POSIX
3740 * src/chown-core.c (wd_errno, chown_files): Likewise.
3741 (chown_file): New function.
3742 * tests/install/basic-1: Redo test so as to not workaround
3743 the chmod bug, thereby testing for it.
3745 * src/shuf.c (main): Quote the entire range when reporting an
3746 invalid one, rather than just the part that contained the error.
3748 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
3749 sometimes left behind if the test is skipped or interrupted.
3751 * bootstrap (symlink_to_gnulib): New function.
3752 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3753 to copies-of-gnulib.
3754 (cp_mark_as_generated, slurp, gnulib_files):
3755 Avoid making a copy if it's the same as the old version.
3756 (gnulib_files): Add support for this variable (used by Bison).
3758 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
3759 indicating flaw in kernel. Reword to say that the flaw isn't
3760 serious for coreutils, since the flaw does affect ls -i.
3762 * tests/chgrp/basic: Fix bug in test case exposed by building on
3763 Solaris 8 in a setgid directory. The test case incorrectly
3764 assumed that 'symlink' would be in group $g1.
3766 2006-09-18 Jim Meyering <jim@meyering.net>
3768 * NEWS: Add a line for 6.3-cvs.
3769 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
3772 * NEWS: Record the 6.2 release date.
3773 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3775 2006-09-17 Jim Meyering <jim@meyering.net>
3777 * tests/chgrp/basic: On an OpenBSD system, rather than failing
3778 due to a known problem, merely warn about it.
3779 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
3780 Instead, use stat to test file system for desired results, directly.
3781 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
3783 * tests/envvar-check: Add more variable names to the list of those
3784 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
3785 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
3787 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
3789 * NEWS: Document that mkdir -p and install -d now fork on occasion.
3790 * bootstrap.conf (gnulib_modules): Add savewd.
3791 * src/install.c: Include savewd.h.
3792 (process_dir): New function.
3793 (main, install_file_in_file_parents): Use it, along with the new
3794 savewd module, to avoid some race conditions.
3795 * src/mkdir.c: Include savewd.h.
3796 (struct mkdir_options): New members make_ancestor_function, mode,
3798 (make_ancestor): Return 1 if the resulting directory is not readable.
3799 (process_dir): New function.
3800 (main): Use it, along with new savewd module, to avoid some
3801 race conditions. Fill in new slots of struct mkdir_options, so
3802 that callees get the values.
3803 * tests/install/basic-1: Test for coreutils 5.97 bug that was
3804 fixed in coreutils 6.0, and which should still be fixed with
3806 * tests/mkdir/p-3: Likewise.
3808 2006-09-15 Jim Meyering <jim@meyering.net>
3810 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
3811 The 2006-09-08 changes made it so "mv dir new-name/" would
3812 fail on NetBSD 1.6. This makes it work once again.
3814 2006-09-14 Jim Meyering <jim@meyering.net>
3816 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
3817 Instead, since it's a little fragile, assert the condition.
3818 (target_directory_operand): Update comment to reflect latest change.
3820 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3822 * src/who.c (print_user): Rewrite to avoid warning from
3823 GCC 4.1.1 with -Wall.
3825 2006-09-12 Jim Meyering <jim@meyering.net>
3827 * tests/mv/atomic: Check for specific strace output, rather than
3828 simply nonempty. RHEL AS 4 would fail this test due to strace
3829 generating "[ Process PID=14434 runs in 32 bit mode. ]".
3830 Reported by Nelson Beebe.
3832 2006-09-11 Jim Meyering <jim@meyering.net>
3834 * src/remove.c (remove_dir): Move new cache_stat_init call onto
3836 (rm_1): Move declaration of "st" and new cache_stat_init call
3837 "down" to nearer where they're used.
3838 * src/c99-to-c89.diff: Add another set of curly braces.
3840 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
3842 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
3843 substr's last operand is very large. Performance problem reported
3846 2006-09-09 Jim Meyering <jim@meyering.net>
3848 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
3850 (sc_require_config_h): Skip this test if there are no version-
3851 controlled .c files.
3852 (sc_prohibit_assert_without_use): Likewise.
3854 2006-09-08 Jim Meyering <jim@meyering.net>
3856 * bootstrap: Export CVS_RSH separate from its assignment, to work
3857 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
3859 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
3861 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
3862 no file operand is given, and standard input is any FIFO.
3863 This is in response to Open Group XCU ERN 114.
3864 * src/tail.c (main): Likewise.
3866 2006-09-08 Jim Meyering <jim@meyering.net>
3868 mv and "cp -r" no longer fail when invoked with two arguments
3869 where the first one names a directory and the second name ends in
3870 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
3871 now succeeds, once more. This reverts part of the 2004-06-27
3873 * NEWS: Say the above.
3874 * src/mv.c (target_directory_operand): Don't require (here)
3875 that the target operand "look like" a directory. This change
3876 pushes the test down to the rename syscall level, where a
3877 "mv dir existing-non-dir/" will mistakenly succeed on older systems
3878 that ignore trailing slashes in the rename destination argument.
3879 * src/cp.c (target_directory_operand): Likewise, but for cp.
3880 * tests/mv/trailing-slash: Exercise the above fixes.
3881 * tests/cp/trailing-slash: New file.
3882 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
3884 * bootstrap: Use the previously unused variable, $src,
3885 to avoid repeating "$GNULIB_SRCDIR/$file".
3887 * bootstrap (cp_mark_as_generated): Don't use "local", to
3888 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
3889 Rename now-global "$src" and "$dst" to have cp_ prefix.
3890 Safer, and avoids confusion.
3892 * bootstrap (cp_mark_as_generated): New function.
3893 (slurp): Use it to prepend editor hints and a warning that
3894 the file we're copying is generated.
3895 Suggestion from Bruce Korb.
3896 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
3897 Fix last-minute typo.
3899 2006-09-07 Jim Meyering <jim@meyering.net>
3901 * bootstrap: Revert last change. There are less disruptive ways
3902 to mark these generated files as read-only.
3904 * src/c99-to-c89.diff: Update to have proper offsets.
3906 2006-09-06 Jim Meyering <jim@meyering.net>
3908 Ensure that some gnulib-tool-generated files are read-only.
3909 * bootstrap (slurp): Put the body of this function in a sub-shell,
3910 with "umask a-w" so that all new files are read-only. Remove each
3911 file before we write to it, in case it's read-only.
3912 Make po/Makevars and runtime-po/Makevars read-only, too.
3914 2006-09-05 Jim Meyering <jim@meyering.net>
3916 * tests/cp/acl: Skip this test when cp lacks ACL support.
3917 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
3919 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
3920 context from change of 2006-09-02.
3922 2006-09-04 Jim Meyering <jim@meyering.net>
3924 * README-cvs: Fix typo in update command.
3926 2006-09-03 Jim Meyering <jim@meyering.net>
3928 * NEWS: Tweak the wording in the new change description so that
3929 no one can think this change causes e.g., `rm -fr foo../' to fail.
3931 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
3932 Use $CONFIG_HEADER, rather than hard-coding it.
3933 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
3935 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
3937 * NEWS: rm now rejects attempts to remove /, ./, and ../.
3938 * src/basename.c: Don't include dirname.h, since system.h does it now.
3939 * src/chmod.c: Likewise.
3940 * src/copy.c: Likewise.
3941 * src/cp.c: Likewise.
3942 * src/df.c: Likewise.
3943 * src/dircolors.c: Likewise.
3944 * src/dirname.c: Likewise.
3945 * src/du.c: Likewise.
3946 * src/install.c: Likewise.
3947 * src/ln.c: Likewise.
3948 * src/ls.c: Likewise.
3949 * src/mkdir.c: Likewise.
3950 * src/mv.c: Likewise.
3951 * src/remove.c: Likewise.
3952 * src/rm.c: Likewise.
3953 * src/rmdir.c: Likewise.
3954 * src/shred.c: Likewise.
3955 * src/split.c: Likewise.
3956 * src/su.c: Likewise.
3957 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
3959 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
3961 * src/rm.c (usage, main): --preserve-root is now the default.
3962 * src/remove.h: Fix comment.
3963 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
3964 (cache_statted, cache_stat_ok): New functions.
3965 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
3966 which is no longer needed with the new functions. All callers
3968 (prompt, is_dir_lstat, remove_entry, remove_dir):
3969 New struct stat * arg. All callers changed.
3970 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
3971 (remove_cwd_entries, remove_dir, rm_1):
3972 Use and maintain the file status cache.
3973 (prompt, remove_entry): Omit the first "directory" in the diagnostic
3974 "Cannot remove directory `foo': is a directory". This causes "rm"
3975 to pass a test case that it would otherwise fail now that it
3976 "knows" more about its argument. I think the diagnostic is better
3977 without the first "directory" anyway.
3978 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
3979 (rm_1): Reject attempts to remove /, ./, or ../.
3980 * tests/rm/Makefile.am (TESTS): Add r-4.
3981 * tests/rm/r-4: New file.
3983 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
3985 * src/stat.c: Include <stddef.h>
3986 (alignof): New macro.
3987 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
3989 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
3991 (print_statfs): If f_fsid isn't an integer, grab its words one
3992 at a time in little-endian order. This is a bit easier to configure
3993 and should avoid a compilation failure on MacOS reported by Bruno
3996 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
3998 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
3999 work around a Mac OS X porting problem reported by Bruno Haible in
4000 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
4001 (print_statfs): Use them.
4003 * bootstrap.conf (gnulib_modules): Add isapipe.
4004 * src/tail.c: Include isapipe.h.
4005 (IS_PIPE_LIKE_FILE_TYPE): Remove.
4006 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
4007 tailable, since this seems to be portable.
4008 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
4009 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
4011 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
4014 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
4016 * src/copy.c (copy_internal): Don't test whether macros like
4017 S_ISLNK are defined, since they're always defined now.
4018 * src/cp.c (main): Likewise.
4019 * src/ln.c (main): Likewise.
4020 * src/ls.c (get_link_name, make_link_name): Likewise.
4021 * src/mknod.c (main): Likewise.
4022 * src/mkfifo.c (usage): Likewise.
4023 * src/who.c (S_IWGRP): Likewise.
4025 Adjust to recent gnulib changes for the gnulib module.
4026 * bootstrap.conf (gnulib_modules): Add fcntl.
4027 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
4028 is already assuming these macros are defined.
4029 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
4030 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
4031 Remove; the fcntl module now handles these.
4033 Adjust to recent gnulib changes for the inttypes module.
4034 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
4035 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
4037 * src/system.h: Don't bother to include <stdint.h>, since we can
4038 now assume inttypes.h does the equivalent of including stdint.h.
4040 2006-08-27 Jim Meyering <jim@meyering.net>
4042 * src/copy.c (copy_internal): Don't make a backup if the last
4043 component of the source name is "." or "..".
4044 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
4045 * NEWS: Mention this.
4046 * tests/cp/src-base-dot: New file. Test for the above fix.
4047 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
4049 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
4050 (dot_or_dotdot): ...new static inline function.
4051 * src/remove.c (rm_1): Reflect this renaming.
4052 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
4054 * src/copy.c (copy_internal): Add comments.
4056 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
4058 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
4059 since Automake supplies them for us. It always did -I$(srcdir),
4060 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
4061 is now also doing -I../lib.
4063 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
4064 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
4065 since there might not be any .po files.
4066 (WGET_COMMAND): Set to empty if wget doesn't
4067 seem to be available.
4069 2006-08-26 Jim Meyering <jim@meyering.net>
4071 This test was failing in some environments.
4072 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
4073 to set LS_COLORS in the environment.
4074 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
4075 Reported by Bob Proulx.
4077 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
4079 * Makefile.am (EXTRA_DIST): Remove these files here, too:
4080 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
4081 .x-sc_two_space_separator_in_usage.
4083 Fix "mv --verbose --backup" so its output includes the
4084 " (backup: foo.~1~)" suffix also when backing up a directory.
4085 * NEWS: Report this bug fix.
4086 * src/copy.c (emit_verbose): New function, factored out of...
4087 (copy_internal): ...here. Use the new function.
4088 * tests/mv/backup-dir: Test for the above fix.
4089 * tests/mv/Makefile.am (TESTS): Add backup-dir.
4091 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
4093 * .x-sc_no_if_have_config_h: Remove; no longer needed.
4094 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
4095 * .x-sc_two_space_separator_in_usage: Likewise.
4096 * Makefile.maint (sc_no_have_config_h): Renamed from
4097 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
4098 is absent everywhere.
4099 * bootstrap.conf (gnulib_modules): Add config-h.
4100 * src/shred.c: Include <config.h> unconditionally, since
4101 we now assume config.h exists.
4102 * src/dircolors.c: Likewise.
4104 2006-08-26 Jim Meyering <jim@meyering.net>
4106 "ls --color" would highlight other-writable and sticky directories
4107 no differently than regular directories on a file system with
4108 dirent.d_type support.
4109 * NEWS: Say the above.
4110 * src/ls.c (gobble_file): With --color, also stat the file when
4111 we know it is a directory.
4112 Derived from an anonymous one-line fix and bug report:
4113 <http://savannah.gnu.org/bugs/?15043>.
4114 * tests/ls/color-dtype-dir: New file. Test for the above fix.
4115 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
4117 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
4119 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
4121 * bootstrap.conf: Add configmake, verify.
4122 * src/.cvsignore: Remove localedir.h.
4123 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
4124 subsumed by configmake.
4125 * src/system.h: Include configmake.h rather than localedir.h
4126 (LOCALEDIR): New macro.
4128 Rewrite to avoid some unnecessary casts, macros, literals.
4129 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
4131 (SECTOR_SIZE, SECTOR_MASK): New constants.
4132 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
4133 and use the SECTOR_* constants when applicable. Check for size <
4134 0 rather than size == -1, since negative-size files are a sign of
4137 2006-08-25 Bruno Haible <bruno@clisp.org>
4139 * src/shred.c (dopass): Assume a continuable error if EIO even
4140 if the current position is not a multiple of 512.
4142 2006-08-24 Jim Meyering <jim@meyering.net>
4144 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
4146 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
4148 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
4149 macro was being used without being defined.
4150 (SB_F_NAMEMAX): Remove cast.
4151 (f_fsid) [BeOS]: Likewise.
4152 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
4154 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
4156 (xstrcat): Remove. All uses changed to use the above functions.
4157 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
4158 buffer len. All uses changed. Output '?', not '*', for unknown
4159 data or errors. Do not assume signed values can be interchanged
4160 with unsigned when printing.
4161 (print_statfs): For %i, print the fsid as a single int, not as a
4163 (print_it): Quote invalid format better.
4165 * NEWS: printf supports the I flag.
4166 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
4168 2006-08-23 Bruno Haible <bruno@clisp.org>
4170 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
4171 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
4172 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
4174 * src/ls.c (SA_RESTART): Fallback define.
4176 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
4178 * src/system.h (EDQUOT): Define if not already defined.
4179 Problem reported by Bruno Haible for BeOS.
4181 * .cvsignore: Remove config.h, config.hin, as they are now
4183 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
4185 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
4187 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
4188 to accommodate today's gnulib change.
4190 2006-08-23 Jim Meyering <jim@meyering.net>
4192 * NEWS: Mention the sweeping infrastructure changes.
4194 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
4196 * bootstrap.conf (gnulib_modules): Add gnupload.
4197 * Makefile.maint (emit_upload_commands): gnupload is now
4199 * gnupload: Remove from CVS, since it's now a gnulib module.
4201 * bootstrap (bootstrap_conf_cleanup): Remove.
4202 (excluded_files): New var.
4203 * bootstrap.conf: Likewise.
4204 * bootstrap (slurp): Exclude files early if they're in the
4205 excluded_files list. That way, their names don't get put into
4208 * aclocal.m4, config.hin, configure:
4209 Remove from CVS, since ./bootstrap generates them automatically.
4210 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
4211 configure, *.cache, *.lineno, *.log.
4212 Remove more-specific entries. This catches files like configure.lineno.
4213 * man/.cvsignore: Add Makefile.in.
4214 * src/.cvsignore: Add Makefile.in.
4215 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
4218 * tests/chgrp/.cvsignore:
4219 * tests/chmod/.cvsignore:
4220 * tests/chown/.cvsignore:
4221 * tests/cp/.cvsignore:
4222 * tests/cut/.cvsignore:
4223 * tests/dd/.cvsignore:
4224 * tests/dircolors/.cvsignore:
4225 * tests/du/.cvsignore:
4226 * tests/expr/.cvsignore:
4227 * tests/factor/.cvsignore:
4228 * tests/fmt/.cvsignore:
4229 * tests/head/.cvsignore:
4230 * tests/install/.cvsignore:
4231 * tests/join/.cvsignore:
4232 * tests/ln/.cvsignore:
4233 * tests/ls/.cvsignore:
4234 * tests/ls-2/.cvsignore:
4235 * tests/md5sum/.cvsignore:
4236 * tests/misc/.cvsignore:
4237 * tests/mkdir/.cvsignore:
4238 * tests/mv/.cvsignore:
4239 * tests/od/.cvsignore:
4240 * tests/pr/.cvsignore:
4241 * tests/readlink/.cvsignore:
4242 * tests/rm/.cvsignore:
4243 * tests/rmdir/.cvsignore:
4244 * tests/seq/.cvsignore:
4245 * tests/sha1sum/.cvsignore:
4246 * tests/shred/.cvsignore:
4247 * tests/sort/.cvsignore:
4248 * tests/stty/.cvsignore:
4249 * tests/sum/.cvsignore:
4250 * tests/tac/.cvsignore:
4251 * tests/tail/.cvsignore:
4252 * tests/tail-2/.cvsignore:
4253 * tests/tee/.cvsignore:
4254 * tests/test/.cvsignore:
4255 * tests/touch/.cvsignore:
4256 * tests/tr/.cvsignore:
4257 * tests/tsort/.cvsignore:
4258 * tests/unexpand/.cvsignore:
4259 * tests/uniq/.cvsignore:
4260 * tests/wc/.cvsignore:
4261 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
4262 *.X, *.O, *-tests, build-script, mk-script if they're never
4263 created in this directory.
4265 2006-08-22 Bruno Haible <bruno@clisp.org>
4268 * src/uptime.c: Include OS.h if it exists.
4269 (print_uptime): On BeOS, use the get_system_info function (actually a
4270 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
4271 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
4273 2006-08-22 Jim Meyering <jim@meyering.net>
4275 * .cvsignore: Add ABOUT-NLS.
4277 Move the check-AUTHORS rule to be run as part of "make distcheck",
4278 rather than "make check".
4279 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
4280 cause "make check" to fail on systems unable to build all binaries.
4281 * Makefile.maint (check-AUTHORS): New rule.
4282 (local-checks-available): Add it here.
4283 Reported by Bruno Haible. Needed for BeOS.
4285 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
4287 * src/df.c (print_header, show_dev): Use a column width that
4288 depends on the block size of -P is specified and not autoscaling.
4289 Problem reported by Gustavo G. Rondina in:
4290 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
4292 2006-08-21 Jim Meyering <jim@meyering.net>
4294 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
4295 when the shell variable, SHELL, is not set.
4296 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
4297 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
4299 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
4300 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
4301 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
4302 od: invalid type string `u8';
4303 this system doesn't provide a 8-byte integral type
4304 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
4306 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
4308 Add a bootstrap procedure, so that the CVS version contains fewer
4309 files and we bootstrap the rest from gnulib, gettext, etc.
4310 * README-cvs: New file.
4311 * bootstrap: New file.
4312 * bootstrap.conf: New file.
4313 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
4314 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
4316 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
4317 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
4319 (gl_MACROS): Call just after gl_EARLY, just for clarity.
4320 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
4321 * src/kill.c (strtoimax): Remove decl.
4322 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
4323 * src/wc.c: Likewise.
4324 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
4325 declaration, so that we don't need to patch this file.
4326 * src/printf.c (strtoimax, strtoumax): Remove decls.
4327 * src/su.c: Include getpass.h.
4329 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
4330 Include inttypes.h unconditionally.
4331 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
4332 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
4333 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
4334 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
4335 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
4337 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
4338 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
4339 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
4340 * tests/cp/Makefile.in, tests/cut/Makefile.in:
4341 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
4342 * tests/du/Makefile.in, tests/expr/Makefile.in:
4343 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
4344 * tests/general/Makefile.in, tests/head/Makefile.in:
4345 * tests/install/Makefile.in, tests/join/Makefile.in:
4346 * tests/ln/Makefile.in, tests/ls/Makefile.in:
4347 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
4348 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
4349 * tests/mv/Makefile.in, tests/od/Makefile.in:
4350 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
4351 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
4352 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
4353 * tests/shred/Makefile.in, tests/sort/Makefile.in:
4354 * tests/stty/Makefile.in, tests/sum/Makefile.in:
4355 * tests/tac/Makefile.in, tests/tail/Makefile.in:
4356 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
4357 * tests/test/Makefile.in, tests/touch/Makefile.in:
4358 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
4359 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
4360 * tests/wc/Makefile.in:
4361 Remove from CVS, since ./bootstrap generates them automatically.
4363 2006-08-20 Eric Blake <ebb9@byu.net>
4365 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
4366 the patch from 2006-08-18 broke on cygwin.
4368 2006-08-20 Jim Meyering <jim@meyering.net>
4370 * NEWS: Add a line for 6.2-cvs.
4371 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
4373 2006-08-19 Jim Meyering <jim@meyering.net>
4376 * NEWS: Record the 6.1 release date.
4377 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4379 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
4381 Avoid test failure when `make check' is run through debuild.
4382 * tests/help-version: Ensure that $SHELL is set to some value
4383 and exported. Patch from Sven Joachim. For details, see
4384 <http://bugs.debian.org/355368>.
4386 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
4388 * README: Describe potential "pre-C99 build failure", and work-around.
4390 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
4391 backed out due to updates provoked by the copyright changes.
4392 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
4393 it propagates to the derived Makefile.am files.
4394 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
4395 so we don't mistakenly edit them again.
4396 * tests/cut/Makefile.am: Regenerate.
4397 * tests/head/Makefile.am: Likewise.
4398 * tests/join/Makefile.am: Likewise.
4399 * tests/pr/Makefile.am: Likewise.
4400 * tests/sort/Makefile.am: Likewise.
4401 * tests/tac/Makefile.am: Likewise.
4402 * tests/tail/Makefile.am: Likewise.
4403 * tests/test/Makefile.am: Likewise.
4404 * tests/tr/Makefile.am: Likewise.
4405 * tests/uniq/Makefile.am: Likewise.
4406 * tests/wc/Makefile.am: Likewise.
4408 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
4409 when the file's apparent size is not a multiple of its block size.
4410 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
4411 For some file sizes, writing that single byte would unnecessarily
4412 waste a few file blocks. That write may have been necessary in the
4413 early days of Linux, but now, removing it should be safe.
4414 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
4415 * tests/cp/sparse: New test for the above.
4416 * tests/cp/Makefile.am (TESTS): Add sparse.
4418 * tests/sparse-file: New file, essence factored out of...
4419 * tests/du/8gb: ... here. Use the new script.
4421 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4423 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
4424 the CVS gettext manual now suggests 1000000.
4426 2006-08-18 Bruno Haible <bruno@clisp.org>
4428 Add support for NetBSD 3.0.
4429 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
4431 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
4432 has a field f_fstypename.
4433 This undoes the 2006-08-15 to src/stat.c.
4435 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
4437 Copyright notice fixes.
4439 * COPYING: Upgrade to latest version from FSF.
4441 * src/uname.c: Use (C) in copyright notice.
4443 * .vg-suppressions: Add copyright notice.
4444 * ChangeLog: Likewise.
4445 * ChangeLog-2005: Likewise.
4446 * Makefile.am: Likewise.
4449 * README-valgrind: Likewise.
4451 * announce-gen: Likewise.
4452 * man/Makefile.am: Likewise.
4453 * man/chmod.x: Likewise.
4454 * man/chown.x: Likewise.
4455 * man/df.x: Likewise.
4456 * man/du.x: Likewise.
4457 * man/rm.x: Likewise.
4458 * src/dircolors.hin: Likewise.
4459 * src/du-tests: Likewise.
4460 * src/extract-magic: Likewise.
4461 * src/tac-pipe.c: Likewise.
4462 * src/wheel-gen.pl: Likewise.
4463 * tests/Coreutils.pm: Likewise.
4464 * tests/Makefile.am.in: Likewise.
4465 * tests/acl: Likewise.
4466 * tests/envvar-check: Likewise.
4467 * tests/expensive: Likewise.
4468 * tests/group-names: Likewise.
4469 * tests/help-version: Likewise.
4470 * tests/mk-script: Likewise.
4471 * tests/priv-check: Likewise.
4472 * tests/rwx-to-mode: Likewise.
4473 * tests/sample-test: Likewise.
4474 * tests/setgid-check: Likewise.
4475 * tests/chgrp/basic: Likewise.
4476 * tests/chgrp/deref: Likewise.
4477 * tests/chgrp/no-x: Likewise.
4478 * tests/chgrp/posix-H: Likewise.
4479 * tests/chgrp/recurse: Likewise.
4480 * tests/chmod/c-option: Likewise.
4481 * tests/chmod/equal-x: Likewise.
4482 * tests/chmod/equals: Likewise.
4483 * tests/chmod/no-x: Likewise.
4484 * tests/chmod/octal: Likewise.
4485 * tests/chmod/setgid: Likewise.
4486 * tests/chmod/umask-x: Likewise.
4487 * tests/chmod/usage: Likewise.
4488 * tests/chown/basic: Likewise.
4489 * tests/chown/deref: Likewise.
4490 * tests/chown/separator: Likewise.
4491 * tests/cp/Makefile.am: Likewise.
4492 * tests/cp/acl: Likewise.
4493 * tests/cp/backup-1: Likewise.
4494 * tests/cp/backup-is-src: Likewise.
4495 * tests/cp/cp-HL: Likewise.
4496 * tests/cp/cp-deref: Likewise.
4497 * tests/cp/cp-mv-backup: Likewise.
4498 * tests/cp/cp-parents: Likewise.
4499 * tests/cp/deref-slink: Likewise.
4500 * tests/cp/dir-rm-dest: Likewise.
4501 * tests/cp/dir-slash: Likewise.
4502 * tests/cp/dir-vs-file: Likewise.
4503 * tests/cp/fail-perm: Likewise.
4504 * tests/cp/into-self: Likewise.
4505 * tests/cp/link: Likewise.
4506 * tests/cp/link-no-deref: Likewise.
4507 * tests/cp/link-preserve: Likewise.
4508 * tests/cp/no-deref-link1: Likewise.
4509 * tests/cp/no-deref-link2: Likewise.
4510 * tests/cp/no-deref-link3: Likewise.
4511 * tests/cp/perm: Likewise.
4512 * tests/cp/preserve-2: Likewise.
4513 * tests/cp/r-vs-symlink: Likewise.
4514 * tests/cp/same-file: Likewise.
4515 * tests/cp/slink-2-slink: Likewise.
4516 * tests/cp/special-bits: Likewise.
4517 * tests/cp/symlink-slash: Likewise.
4518 * tests/cut/Makefile.am: Likewise.
4519 * tests/cut/Test.pm: Likewise.
4520 * tests/dd/misc: Likewise.
4521 * tests/dd/not-rewound: Likewise.
4522 * tests/dd/skip-seek: Likewise.
4523 * tests/dd/skip-seek2: Likewise.
4524 * tests/dd/unblock-sync: Likewise.
4525 * tests/dircolors/simple: Likewise.
4526 * tests/du/2g: Likewise.
4527 * tests/du/8gb: Likewise.
4528 * tests/du/Makefile.am: Likewise.
4529 * tests/du/basic: Likewise.
4530 * tests/du/deref: Likewise.
4531 * tests/du/deref-args: Likewise.
4532 * tests/du/exclude: Likewise.
4533 * tests/du/fd-leak: Likewise.
4534 * tests/du/files0-from: Likewise.
4535 * tests/du/hard-link: Likewise.
4536 * tests/du/inaccessible-cwd: Likewise.
4537 * tests/du/long-from-unreadable: Likewise.
4538 * tests/du/long-sloop: Likewise.
4539 * tests/du/no-deref: Likewise.
4540 * tests/du/no-x: Likewise.
4541 * tests/du/restore-wd: Likewise.
4542 * tests/du/slash: Likewise.
4543 * tests/du/slink: Likewise.
4544 * tests/du/trailing-slash: Likewise.
4545 * tests/du/two-args: Likewise.
4546 * tests/expr/basic: Likewise.
4547 * tests/factor/basic: Likewise.
4548 * tests/fmt/basic: Likewise.
4549 * tests/fmt/long-line: Likewise.
4550 * tests/general/Makefile.am: Likewise.
4551 * tests/general/atgeneral.m4: Likewise.
4552 * tests/general/dd.at: Likewise.
4553 * tests/head/Makefile.am: Likewise.
4554 * tests/head/Test.pm: Likewise.
4555 * tests/install/basic-1: Likewise.
4556 * tests/install/create-leading: Likewise.
4557 * tests/install/d-slashdot: Likewise.
4558 * tests/install/trap: Likewise.
4559 * tests/join/Makefile.am: Likewise.
4560 * tests/join/Test.pm: Likewise.
4561 * tests/ln/backup-1: Likewise.
4562 * tests/ln/misc: Likewise.
4563 * tests/ln/sf-1: Likewise.
4564 * tests/ln/target-1: Likewise.
4565 * tests/ls/Makefile.am: Likewise.
4566 * tests/ls/Test.pm: Likewise.
4567 * tests/ls/dangle: Likewise.
4568 * tests/ls/dired: Likewise.
4569 * tests/ls/file-type: Likewise.
4570 * tests/ls/follow-slink: Likewise.
4571 * tests/ls/infloop: Likewise.
4572 * tests/ls/inode: Likewise.
4573 * tests/ls/m-option: Likewise.
4574 * tests/ls/no-arg: Likewise.
4575 * tests/ls/recursive: Likewise.
4576 * tests/ls/rt-1: Likewise.
4577 * tests/ls/stat-dtype: Likewise.
4578 * tests/ls/stat-failed: Likewise.
4579 * tests/ls/stat-vs-dirent: Likewise.
4580 * tests/ls/symlink-slash: Likewise.
4581 * tests/ls/time-1: Likewise.
4582 * tests/ls-2/tests: Likewise.
4583 * tests/md5sum/basic-1: Likewise.
4584 * tests/md5sum/newline-1: Likewise.
4585 * tests/misc/Makefile.am: Likewise.
4586 * tests/misc/base64: Likewise.
4587 * tests/misc/basename: Likewise.
4588 * tests/misc/cat-proc: Likewise.
4589 * tests/misc/close-stdout: Likewise.
4590 * tests/misc/csplit: Likewise.
4591 * tests/misc/date: Likewise.
4592 * tests/misc/date-sec: Likewise.
4593 * tests/misc/df: Likewise.
4594 * tests/misc/dirname: Likewise.
4595 * tests/misc/expand: Likewise.
4596 * tests/misc/false-status: Likewise.
4597 * tests/misc/fold: Likewise.
4598 * tests/misc/head-c: Likewise.
4599 * tests/misc/head-elide-tail: Likewise.
4600 * tests/misc/head-pos: Likewise.
4601 * tests/misc/mknod: Likewise.
4602 * tests/misc/nice: Likewise.
4603 * tests/misc/nl: Likewise.
4604 * tests/misc/nohup: Likewise.
4605 * tests/misc/paste-no-nl: Likewise.
4606 * tests/misc/pathchk1: Likewise.
4607 * tests/misc/printf: Likewise.
4608 * tests/misc/printf-hex: Likewise.
4609 * tests/misc/pwd-long: Likewise.
4610 * tests/misc/sha224sum: Likewise.
4611 * tests/misc/sha256sum: Likewise.
4612 * tests/misc/sha384sum: Likewise.
4613 * tests/misc/sha512sum: Likewise.
4614 * tests/misc/shuf: Likewise.
4615 * tests/misc/sort-merge: Likewise.
4616 * tests/misc/sort-rand: Likewise.
4617 * tests/misc/split-a: Likewise.
4618 * tests/misc/split-fail: Likewise.
4619 * tests/misc/split-l: Likewise.
4620 * tests/misc/stat-fmt: Likewise.
4621 * tests/misc/stat-printf: Likewise.
4622 * tests/misc/tac-continue: Likewise.
4623 * tests/misc/test-diag: Likewise.
4624 * tests/misc/tty-eof: Likewise.
4625 * tests/misc/wc-files0: Likewise.
4626 * tests/misc/wc-files0-from: Likewise.
4627 * tests/mkdir/concurrent-1: Likewise.
4628 * tests/mkdir/p-1: Likewise.
4629 * tests/mkdir/p-2: Likewise.
4630 * tests/mkdir/p-3: Likewise.
4631 * tests/mkdir/p-slashdot: Likewise.
4632 * tests/mkdir/p-thru-slink: Likewise.
4633 * tests/mkdir/parents: Likewise.
4634 * tests/mkdir/perm: Likewise.
4635 * tests/mkdir/special-1: Likewise.
4636 * tests/mkdir/t-slash: Likewise.
4637 * tests/mkdir/writable-under-readonly: Likewise.
4638 * tests/mv/Makefile.am: Likewise.
4639 * tests/mv/acl: Likewise.
4640 * tests/mv/atomic: Likewise.
4641 * tests/mv/backup-is-src: Likewise.
4642 * tests/mv/childproof: Likewise.
4643 * tests/mv/diag: Likewise.
4644 * tests/mv/dir-file: Likewise.
4645 * tests/mv/dir2dir: Likewise.
4646 * tests/mv/dup-source: Likewise.
4647 * tests/mv/force: Likewise.
4648 * tests/mv/hard-2: Likewise.
4649 * tests/mv/hard-3: Likewise.
4650 * tests/mv/hard-4: Likewise.
4651 * tests/mv/hard-link-1: Likewise.
4652 * tests/mv/i-1: Likewise.
4653 * tests/mv/i-2: Likewise.
4654 * tests/mv/i-3: Likewise.
4655 * tests/mv/i-4: Likewise.
4656 * tests/mv/i-link-no: Likewise.
4657 * tests/mv/into-self: Likewise.
4658 * tests/mv/into-self-2: Likewise.
4659 * tests/mv/into-self-3: Likewise.
4660 * tests/mv/into-self-4: Likewise.
4661 * tests/mv/leak-fd: Likewise.
4662 * tests/mv/mv-special-1: Likewise.
4663 * tests/mv/no-target-dir: Likewise.
4664 * tests/mv/part-fail: Likewise.
4665 * tests/mv/part-hardlink: Likewise.
4666 * tests/mv/part-rename: Likewise.
4667 * tests/mv/part-symlink: Likewise.
4668 * tests/mv/partition-perm: Likewise.
4669 * tests/mv/perm-1: Likewise.
4670 * tests/mv/reply-no: Likewise.
4671 * tests/mv/setup: Likewise.
4672 * tests/mv/to-symlink: Likewise.
4673 * tests/mv/trailing-slash: Likewise.
4674 * tests/mv/update: Likewise.
4675 * tests/mv/vfat: Likewise.
4676 * tests/od/od-N: Likewise.
4677 * tests/od/x8: Likewise.
4678 * tests/pr/Makefile.am: Likewise.
4679 * tests/pr/Test.pm: Likewise.
4680 * tests/readlink/can-e: Likewise.
4681 * tests/readlink/can-f: Likewise.
4682 * tests/readlink/can-m: Likewise.
4683 * tests/readlink/rl-1: Likewise.
4684 * tests/rm/Makefile.am: Likewise.
4685 * tests/rm/cycle: Likewise.
4686 * tests/rm/dangling-symlink: Likewise.
4687 * tests/rm/deep-1: Likewise.
4688 * tests/rm/dir-no-w: Likewise.
4689 * tests/rm/dir-nonrecur: Likewise.
4690 * tests/rm/dot-rel: Likewise.
4691 * tests/rm/empty-inacc: Likewise.
4692 * tests/rm/empty-name: Likewise.
4693 * tests/rm/f-1: Likewise.
4694 * tests/rm/fail-2eperm: Likewise.
4695 * tests/rm/fail-eperm: Likewise.
4696 * tests/rm/hash: Likewise.
4697 * tests/rm/i-1: Likewise.
4698 * tests/rm/i-no-r: Likewise.
4699 * tests/rm/inaccessible: Likewise.
4700 * tests/rm/interactive-always: Likewise.
4701 * tests/rm/interactive-once: Likewise.
4702 * tests/rm/ir-1: Likewise.
4703 * tests/rm/isatty: Likewise.
4704 * tests/rm/no-give-up: Likewise.
4705 * tests/rm/r-1: Likewise.
4706 * tests/rm/r-2: Likewise.
4707 * tests/rm/r-3: Likewise.
4708 * tests/rm/rm1: Likewise.
4709 * tests/rm/rm2: Likewise.
4710 * tests/rm/rm3: Likewise.
4711 * tests/rm/rm4: Likewise.
4712 * tests/rm/rm5: Likewise.
4713 * tests/rm/sunos-1: Likewise.
4714 * tests/rm/unread2: Likewise.
4715 * tests/rm/unread3: Likewise.
4716 * tests/rm/unreadable: Likewise.
4717 * tests/rmdir/fail-perm: Likewise.
4718 * tests/rmdir/ignore: Likewise.
4719 * tests/rmdir/t-slash: Likewise.
4720 * tests/seq/basic: Likewise.
4721 * tests/sha1sum/basic-1: Likewise.
4722 * tests/sha1sum/sample-vec: Likewise.
4723 * tests/shred/exact: Likewise.
4724 * tests/shred/remove: Likewise.
4725 * tests/sort/Makefile.am: Likewise.
4726 * tests/sort/Test.pm: Likewise.
4727 * tests/sort-time/Makefile: Likewise.
4728 * tests/sort-time/README: Likewise.
4729 * tests/sort-time/rand-gen: Likewise.
4730 * tests/stty/basic-1: Likewise.
4731 * tests/stty/row-col-1: Likewise.
4732 * tests/sum/basic-1: Likewise.
4733 * tests/sum/sysv: Likewise.
4734 * tests/tac/Makefile.am: Likewise.
4735 * tests/tac/Test.pm: Likewise.
4736 * tests/tail/Makefile.am: Likewise.
4737 * tests/tail/Test.pm: Likewise.
4738 * tests/tail-2/Makefile.am: Likewise.
4739 * tests/tail-2/append-only: Likewise.
4740 * tests/tail-2/assert: Likewise.
4741 * tests/tail-2/assert-2: Likewise.
4742 * tests/tail-2/big-4gb: Likewise.
4743 * tests/tail-2/fflush: Likewise.
4744 * tests/tail-2/infloop-1: Likewise.
4745 * tests/tail-2/proc-ksyms: Likewise.
4746 * tests/tail-2/start-middle: Likewise.
4747 * tests/tail-2/tail-n0f: Likewise.
4748 * tests/tee/basic: Likewise.
4749 * tests/tee/dash: Likewise.
4750 * tests/test/Makefile.am: Likewise.
4751 * tests/test/Test.pm: Likewise.
4752 * tests/touch/Makefile.am: Likewise.
4753 * tests/touch/dangling-symlink: Likewise.
4754 * tests/touch/empty-file: Likewise.
4755 * tests/touch/fail-diag: Likewise.
4756 * tests/touch/fifo: Likewise.
4757 * tests/touch/no-create-missing: Likewise.
4758 * tests/touch/no-rights: Likewise.
4759 * tests/touch/not-owner: Likewise.
4760 * tests/touch/obsolescent: Likewise.
4761 * tests/touch/read-only: Likewise.
4762 * tests/touch/relative: Likewise.
4763 * tests/tr/Makefile.am: Likewise.
4764 * tests/tr/Test.pm: Likewise.
4765 * tests/tr/failures: Likewise.
4766 * tests/tsort/basic-1: Likewise.
4767 * tests/unexpand/basic-1: Likewise.
4768 * tests/uniq/Makefile.am: Likewise.
4769 * tests/uniq/Test.pm: Likewise.
4770 * tests/wc/Makefile.am: Likewise.
4771 * tests/wc/Test.pm: Likewise.
4773 2006-08-17 Jim Meyering <jim@meyering.net>
4775 ls -CF would misalign columns in some cases.
4776 * src/ls.c (get_type_indicator): New function. extracted from...
4777 (print_type_indicator): ...here. Use it.
4778 (length_of_file_name_and_frills): Use it here, too, rather than
4779 assuming stat.st_mode is valid.
4780 Reported by Andreas Schwab, here:
4781 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
4782 See the test for this above. FYI, I did ls -CF /proc and visually
4783 inspected the result.
4785 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
4786 to mention the now-removed cp_options.xstat member.
4788 * Makefile.maint (patch-check): Adapt to work now that the patch
4789 modifies more than one file in src/.
4791 With this patch, permit building with Solaris cc on Solaris 7.
4792 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
4793 This integrates patches from Bruno Haible.
4795 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
4797 Fix some problems reported by Bruno Haible.
4798 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
4799 Skip this test if "chmod g+s d" silently does nothing.
4800 * tests/ls-2/tests: Skip this test suite if we can't set up files
4801 properly for the setuid-etc test. This simplifies some of the
4802 hacks we were using to work around porting problems.
4804 2006-08-16 Jim Meyering <jim@meyering.net>
4806 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
4807 * tests/cp/acl: Instead, skip the test if either setfacl
4809 Reported by Michael Stone.
4811 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
4813 * tests/lang-default (LC_ALL): Set to "C", so we get
4814 English-language diagnostics. Unset the other variables; it
4815 should be portable to use 'unset' for this stuff nowadays.
4816 Problem reported by Bruno Haible. Using "C" reverses the
4817 2000-10-22 change to fileutils in this area.
4819 Fix bugs when printing plurals of numbers that are not
4820 unsigned long int values.
4821 * src/system.h (select_plural): New function.
4822 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
4823 * src/uptime.c (print_uptime): Likewise.
4824 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
4825 print a floating point number, as reducing to 0 or 1 doesn't work
4826 for some languages. Instead, just use "s" for seconds since it
4827 doesn't need a plural form.
4829 2006-08-16 Bruno Haible <bruno@clisp.org>
4831 Old versions of gzip would write --help output to stderr, and it
4832 would be annoying to see that in the output of every "make" command.
4833 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
4836 2006-08-16 Andreas Schwab <schwab@suse.de>
4838 * tests/cp/acl: Don't use non-portable == operator for test.
4840 2006-08-16 Jim Meyering <jim@meyering.net>
4842 * tests/ls/stat-dtype: Use stat to test file system type, rather
4843 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
4845 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
4847 * NEWS: Mention that df exits with nonzero status if it generates
4848 no output. This change was in 6.0 but inadvertently unmentioned.
4849 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
4851 (show_dev): Don't set it until we actually output something.
4852 Print the header if this is the first output.
4853 (main): Don't print a header, as that is now show_dev's job.
4854 * tests/misc/Makefile.am (TESTS): Add df.
4855 * tests/misc/df: New file.
4857 2006-08-15 Eric Blake <ebb9@byu.net>
4859 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
4860 statvfs.f_type not present. See
4861 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
4863 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
4865 * src/dd.c (print_stats): Don't substitute "1" for number, as this
4866 causes confusion for the Hungarian translators. Problem reported
4867 by Egmont Koblinger here:
4868 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
4870 2006-08-15 Jim Meyering <jim@meyering.net>
4872 * .x-sc_require_config_h: Add lib/at-func.c.
4874 * NEWS: Add a line for 6.1-cvs.
4875 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
4877 2006-08-15 Jim Meyering <jim@meyering.net>
4880 * NEWS: Record the 6.0 release date.
4881 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4883 * TODO: Add an item (convert to use gnulib-tool), add to the plan
4884 for id-vs-getgrouplist, and remove a few completed items.
4886 * Makefile.maint (alpha beta major): Fix syntax error.
4888 2006-08-13 Jim Meyering <jim@meyering.net>
4890 * src/shred.c (usage): Don't indent the second line of an item.
4891 Otherwise, help2man would misformat the output.
4892 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
4894 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
4896 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
4897 Suggested by Eric Blake to avoid problems like
4898 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
4900 2006-08-11 Jim Meyering <jim@meyering.net>
4902 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
4903 failure that this test checks for (stat/dirent inode mismatch at
4904 a mount point), so continue to give a diagnostic about the failure,
4905 but don't actually count it as a failure.
4907 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
4909 * ABOUT-NLS: Update from gettext 0.15.
4910 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
4912 * src/csplit.c (struct control): Remove fastmap member.
4913 (extract_regexp): Allocate fastmap separately, since otherwise
4914 it might move due to a realloc. This fixes a bug that led
4915 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
4917 2006-08-10 Jim Meyering <jim@meyering.net>
4919 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
4920 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
4921 Redirect both stdout and stderr of df invocations.
4923 * src/dircolors.hin: Add a TERM directive for each of the following:
4924 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
4925 rxvt-cygwin-native, screen.linux, xterm-256color.
4926 Sort the TERM directives.
4927 From Mike Frysinger.
4929 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
4931 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
4932 See Debian bug 373736.
4934 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
4937 * src/.cvsignore: Add shuf.
4939 * Makefile.maint: Remove the po-update procedure; it doesn't
4940 work with the new repository on http://www.iro.umontreal.ca/.
4941 For now I guess we'll have to fix things by hand.
4942 (do-po-update, po-update): Remove. All references removed.
4944 * src/shuf.c (next_line): New function.
4945 (read_input): Use it, to avoid relying on GCC-specific behavior
4946 with void * arithmetic. Problem reported by Bob Proulx.
4947 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
4948 to detect this sort of problem automatically in the future.
4950 2006-08-09 Jim Meyering <jim@meyering.net>
4952 * src/ls.c: Add a compile-time check to ensure that filetype
4953 and filetype_letter have the same number of elements.
4955 * tests/misc/sort-rand: Remove use of --seed=S.
4957 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
4959 Add a command 'shuf', and modify shred and sort to use the new
4960 random number generator library of 'shuf'.
4962 * AUTHORS: Add shuf.
4964 * NEWS: Likewise. Mention new --random-source option for shred
4965 and sort. Move "sort +1 -2" notice to the appropriate section,
4966 and clarify its role with respect to POSIXLY_CORRECT.
4967 * man/.cvsignore: Add shuf.1.
4968 * man/Makefile.am (dist_man_MANS): Add shuf.1.
4969 (shuf.1): New dependency.
4970 * man/shuf.x: New file.
4971 * src/Makefile.am (bin_PROGRAMS): Add shuf.
4972 (EXTRA_DIST): Remove rand-isaac.c.
4973 (shuf_LDADD): New macro.
4974 * src/rand-isaac.c: Remove, moving most of its contents to
4976 * src/shuf.c: New file.
4977 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
4978 Don't include rand-isaac.c; include randint.h and randread.h instead.
4979 (RANDOM_SOURCE_OPTION): New enum.
4980 (long_opts, usage, main): New option --random-source.
4981 * src/sort.c: Likewise.
4982 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
4983 All callers changed to use randint interface.
4984 (fillrand): Remove. All callers changed to use randread interface.
4985 (dopass): Remove dependency on ISAAC buffer size.
4986 (genpattern): Don't wipe the random state here.
4987 (randint_source): New static var.
4988 (clear_random_data): New function.
4989 (main): Allocate random source, and arrange to wipe it on exit.
4990 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
4991 (longopts, usage, main): Remove undocumented --seed option;
4992 it's now replaced by --random-source.
4993 (rand_state, get_hash): Remove.
4994 (randread_source): New static var.
4995 (random_state, cmp_hashes, compare_random): New functions; they guarantee
4996 no collisions in the random hash function.
4997 (keycompare): Use compare_random for -R; don't fall back on comparing
4998 via memcoll, since compare_random does the right thing.
4999 * tests/misc/Makefile.am (TESTS): Add shuf.
5000 * tests/misc/shuf: New file.
5002 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
5004 * src/copy.c (set_author): Preserve the st_author field via the
5005 file descriptor dest_desc.
5007 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
5009 * NEWS: chmod now preserves setuid and setgid bits on directories
5010 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
5012 Fix test case problems if working directory is setgid,
5013 reported by Bob Proulx.
5014 * tests/cp/fail-perm: Use symbolic mode so that we clear
5015 setgid bit more reliably on directories.
5016 * tests/mkdir/special-1 (set_mode_string): Likewise.
5018 2006-07-27 Jim Meyering <jim@meyering.net>
5020 * src/chgrp.c (usage): Use correct grammar in description of the
5022 * src/chown.c (usage): Likewise.
5024 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
5026 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
5027 Correctly access SRC_SB's element ST_AUTHOR.
5029 2006-07-26 Jim Meyering <jim@meyering.net>
5031 * tests/ls/stat-failed: Adapt to match new expected output.
5034 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
5035 than having the code test for all of the other types first.
5036 Hoist the set-uid/gid-testing code "up" into this new block.
5037 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
5038 C_ORPHAN, not as C_FILE.
5040 2006-07-26 Jim Meyering <jim@meyering.net>
5042 Checking in a change from Paul.
5044 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
5046 * src/ls.c (DT_INIT): Remove. All uses removed.
5047 (enum filetype): Use an ordinary enum rather than trying to keep
5048 the values in sync with DT_FIFO etc. That way, we don't have
5049 to make special assumptions about them. All uses changed.
5050 (whiteout): New constant member of enum filetype.
5051 (filetype_letter): New constant, for use with enum filetype.
5052 (FILETYPE_INDICATORS): New initializer list.
5053 (print_dir): Add case for DT_WHT.
5054 (gobble_file): If stat fails, don't discard information from
5055 readdir; instead, preserve it so it can be printed.
5056 (print_long_format): Fall back on readdir result if stat info
5057 is not available. Use "?" to denote each unknown mode char,
5058 instead of an overall "?", since we now know some of the mode
5060 (print_type_indicator): Now that MODE isn't necessarily
5061 useful, guard all uses.
5062 Now that two blocks in the type-checking tree can set "type = C_FILE",
5063 move the suffix-handling code out and down.
5065 2006-07-26 Jim Meyering <jim@meyering.net>
5067 Prepare for the above change.
5068 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
5069 and adjust uses. From a patch by Paul Eggert.
5071 2006-07-26 Jim Meyering <jim@meyering.net>
5073 * src/ls.c: Correct indentation/formatting in a few places.
5075 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
5077 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
5078 Problem report and fix from Bob Proulx.
5079 * NEWS: Clarify the "chmod 0500" news, and correct the vague
5080 statements about compatibility with BSD.
5082 2006-07-25 Jim Meyering <jim@meyering.net>
5084 * src/ls.c (gobble_file): When handling a stat-failed entry,
5085 print the entry name not the absolute_name -- to be consistent
5086 with the usual case.
5087 * tests/ls/stat-failed: Update accordingly.
5089 * src/ls.c: Add parens around the new uses of ?: ternary operator.
5091 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
5094 Get --dired offsets right when handling stat-failed entries.
5095 * src/ls.c (print_long_format): Be careful to increment P by the
5096 appropriate amount, even when inode_number_width and nlink_width
5098 * tests/ls/stat-failed: Test for the above.
5100 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
5101 have_acl member. That would happen for a directory with both a
5102 non-stat'able entry and one with an ACL.
5104 * src/ls.c (gobble_file): Make it so failure to stat a
5105 non-command-line file provokes an exit status of 1, not 0.
5106 Say "cannot access" rather than "cannot stat".
5107 * tests/ls/stat-failed: New file/test, for the above.
5108 * tests/ls/Makefile.am (TESTS): Add stat-failed.
5109 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
5110 of "cannot access " to diagnostic.
5112 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
5114 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
5115 Replace all occurrences of "type == command_line" with the
5116 equivalent, "command_line_arg".
5118 * src/ls.c: Apply the stat-failed parts of Red Hat's
5119 coreutils-selinux.patch. From Ulrich Drepper.
5120 This makes it so files not mentioned on the command line (e.g.,
5121 names read from a directory that *is* mentioned on the command
5122 line) for which stat fails are still listed. With --color,
5123 such files are colored just like ORPHANs (aka dangling symlinks).
5125 * src/df.c (n_valid_args): Declare global to be static.
5127 2006-07-24 Jim Meyering <jim@meyering.net>
5129 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
5130 system lacks d_type support.
5132 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
5134 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
5136 2006-07-21 Jim Meyering <jim@meyering.net>
5138 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
5139 Reported by Tim Waugh.
5140 Also remove the comment duplicating much of --help output.
5142 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
5143 name so the list remains alphabetized.
5145 Fix another bug: ls --indicator-style=file-type would call
5146 stat for a symlink, even though it wasn't always needed.
5147 In some cases, that unnecessary stat would cause ls to fail.
5148 * src/ls.c (gobble_file): Don't treat symlinks specially (in
5149 requiring a stat syscall). Remove the offending exclusion.
5151 * NEWS: Mention the fix.
5153 * tests/ls/stat-dtype: New file/test, for the above fix.
5154 Also exercises the new df feature, below.
5156 * src/df.c (main): Fail and don't print the headers if no
5157 file system is processed. This makes it easy to test whether
5158 a specified directory is on a file system of a given type or types.
5159 Otherwise, applications would have had to parse df's output.
5160 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
5162 Fix a bug: ls --file-type worked like --indicator-style=slash,
5163 rather than like --indicator-style=file-type.
5164 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
5165 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
5167 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
5168 * NEWS: Mention the fix.
5169 * tests/ls-2/tests (file-type): New test, for the above fix.
5171 2006-07-19 Jim Meyering <jim@meyering.net>
5173 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
5175 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
5177 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
5179 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
5180 of directories alone unless you specify them explicitly.
5181 install and mkdir now implement X correctly.
5182 install now creates parent directories with mode 755, without
5183 changing their owner or group.
5184 * src/chmod.c (process_file): Adjust to mode_adjust API change.
5185 * src/install.c: Include mkancesdirs.h.
5186 (announce_mkdir, make_ancestor): New functions.
5187 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
5189 (dir_mode, dir_mode_bits): New vars.
5190 (main): Set dir modes separately from nondir, so that the X
5191 op of -m works correctly.
5192 (main): Remove cwd_errno cruft, since make_dir_parents no longer
5193 affects cwd. Adjust to new make_dir_parents API.
5194 (install_file_in_file_parents): 2nd arg is now char *, not char
5195 const *. Use mkancesdirs instead of rolling our own code.
5196 (change_attributes): Don't worry about AFS, since that kludge
5197 should not be needed any more.
5198 * src/mkdir.c (struct mkdir_options): New struct.
5199 (announce_mkdir, make_ancestor): New functions.
5200 (main): Use them. Adjust to mode_adjust API change. Stick with
5201 umask 0. Use make_dir_parents for all the work.
5202 * src/mkfifo.c (main): Adjust to new mode_adjust API.
5203 * src/mknod.c (main): Likewise.
5204 * tests/chmod/setgid: Do the setgid test instead of bailing.
5205 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
5206 GNU chmod now behaves like other versions of chmod.
5207 * tests/mkdir/perm: Add a test for the X bug.
5209 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
5211 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
5212 This doesn't fix any bugs, since OUT always equals stdout, but it
5213 makes the code easier to understand.
5215 2006-07-14 Jim Meyering <jim@meyering.net>
5217 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
5218 rather than open-coding it. Now supports mercurial, too.
5219 * .hgignore: New file.
5220 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
5221 all generated files, including ones like configure and po/*.po
5222 that are currently version-controlled in cvs.
5224 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
5225 They've been in CVS, just haven't been distributed before this.
5226 Distribute ChangeLog-2005, too.
5227 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
5229 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
5231 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
5234 2006-07-09 Jim Meyering <jim@meyering.net>
5236 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
5237 That happens with Linux/tmpfs.
5238 * tests/mv/Makefile.am (TESTS): Add dir2dir.
5240 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5242 Adjust to recent updates from gnulib.
5243 * src/dd.c (apply_translations): Use toupper rather than
5244 islower followed by toupper; it's simpler and typically
5245 faster now that we assume at least C89 semantics. Similarly
5247 * src/sort.c (inittables): Likewise.
5248 * src/expand.c (expand): Don't assume that isprint etc. return
5249 booleans (needed for pre-C99 hosts).
5250 * src/fmt.c (check_punctuation): Likewise.
5251 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
5252 * src/tr.c (is_char_class_member): Likewise.
5253 * src/unexpand.c (unexpand): Likewise.
5254 * src/join.c (is_blank): Remove; no longer needed. All uses
5255 replaced by isblank (to_uchar (...)).
5256 * src/pinky.c (create_fullname): Don't assume char is unsigned.
5257 * src/printf.c (print_esc): Likewise.
5258 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
5259 (copy_unescaped_string): Likewise.
5260 * src/stat.c (print_it): Likewise.
5261 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
5262 convenience on GNU systems. All uses changed. Don't bother
5263 looking for any dirent.h substitute other than ndir.h.
5264 (D_INO): Remove unnecessary parentheses.
5265 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
5266 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
5267 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
5268 to ctype.h equivalents.
5269 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
5272 2006-07-08 Jim Meyering <jim@meyering.net>
5274 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
5276 * Makefile.maint (sc_the_the): New rule.
5278 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
5279 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
5282 2006-07-07 Jim Meyering <jim@meyering.net>
5284 * NEWS: Mention that mv can now remove an empty destination directory,
5285 and give an example. Prompted by a report from Florent Bayle.
5287 2006-07-05 Jim Meyering <jim@meyering.net>
5289 * src/ls.c (usage): Correct the description of -G: it is useful
5290 only in a long listing. Reported by Martin Pool in
5291 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
5293 * man/chmod.x: Correct the description of the sticky bit. Reported
5294 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
5296 * src/copy.c (copy_internal): Don't work around old NFS clients like
5297 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
5298 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
5299 a banal failure as a recursive move-into-self failure.
5300 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
5302 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
5304 2006-07-03 Jim Meyering <jim@meyering.net>
5306 Plug another unusual leak.
5307 (AD_mark_helper): Free malloc'd filename if hash_insert says
5308 that string is already in the hash table.
5310 The dev/inode of the topmost directory in each hierarchy were not
5312 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
5313 (AD_push): Call it from here instead.
5315 Fix two small leaks.
5316 * src/remove.c (AD_stack_clear): New function.
5318 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
5320 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
5321 Add $VG_PATH_PREFIX as a prefix to $PATH
5323 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
5324 * tests/Makefile.am (evar-check): Remove rule.
5325 (EXTRA_DIST): Remove .env-warn.
5326 * tests/.env-warn: Remove file. No longer used.
5327 Suggestion from Eric Blake.
5329 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
5331 * src/system.h: Include <stdint.h> unconditionally, since we
5332 now assume the stdint module.
5334 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
5336 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
5337 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
5338 * src/tail.c (main): Implement this.
5339 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
5340 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
5342 2006-07-01 Jim Meyering <jim@meyering.net>
5344 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
5346 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
5349 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
5351 * NEWS: seq now uses long double internally rather than double.
5352 It now defaults to a minimal fixed point format if possible.
5353 It lets you use %a, %A, %E, %F, %G.
5354 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
5355 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
5356 (isfinite) [!defined isfinite]: New macro.
5357 (separator, terminator): Now points to const.
5358 (first, step, last): Remove.
5359 (usage): Update to match new behavior.
5360 (struct operand, operand): New type.
5361 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
5363 Compute and return a value of type operand, not double.
5364 (long_double_format): Renamed from valid_format, and now returns a
5365 new format with an "L" added if needed, if the original format was
5366 valid. Allow %a, %A, %E, %F, and %G formats.
5367 (print_numbers): Take numeric values as args rather than from globals.
5368 Print long double, not double.
5369 (get_width_format): Remove.
5370 (get_default_format): New function.
5371 (main): Implement new way of calculating default format.
5372 Don't worry about locale's representation of the decimal point, since
5373 the arguments are always processed in the C locale.
5374 * tests/seq/basic (neg-2): Adjust to new default format.
5375 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
5376 implementation should do the right thing.
5378 2006-06-30 Jim Meyering <jim@meyering.net>
5380 * tests/stty/basic-1: Work around an intermittent test failure
5381 on HP-UX 11.11. Report and analysis from Bob Proulx.
5382 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
5384 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
5386 * NEWS: Support obsolete usages like "sort +1 -2" even when
5387 conforming to POSIX 1003.1-2001, since this is a pure extension to
5388 POSIX. Problem reported by Christian in:
5389 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
5390 * src/sort.c (main): Implement this.
5392 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
5393 Autoconf 2.60 says this stuff was obsolete.
5395 2006-06-28 Jim Meyering <jim@meyering.net>
5397 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
5399 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
5401 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
5402 (set -x when VERBOSE=yes) when stderr is redirected before stdout
5403 causing shell tracing of the stdout redirection to be written to
5404 the stderr file. Avoid problem and test failure on HP-UX by
5405 redirecting stderr last.
5406 * tests/dd/unblock-sync: Order shell file redirections for
5407 stderr and stdout in the common style.
5408 tests/acl: Likewise.
5410 2006-06-27 Jim Meyering <jim@meyering.net>
5412 * tests/misc/cat-proc: Try to avoid any spurious numeric
5413 differences in frequently-changing /proc/cpuinfo.
5414 Reported by Nelson Beebe.
5416 2006-06-26 Jim Meyering <jim@meyering.net>
5418 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
5419 fd_to_subdirp failure, not just when errno == EACCES.
5420 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
5421 rmdir, here, even though rmdir may happen to be adequate.
5423 * NEWS: rm no longer fails to remove an empty, unreadable directory
5424 * src/remove.c (remove_cwd_entries): If we can't open a directory,
5425 and the failure is not being ignored, try to remove the directory
5426 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
5427 Problem report and test case from Paul Eggert in
5428 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
5430 * tests/rm/empty-inacc: New test, for the above.
5432 Avoid a segfault for wc --files0=- < /dev/null.
5433 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
5435 2006-06-25 Jim Meyering <jim@meyering.net>
5437 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
5438 contains a list of NUL-separated file names.
5440 * src/wc.c: Include "readtokens.h".
5441 (usage): Describe the new option, and adjust the `Usage':
5442 with this option, no FILE may be specified on the command line.
5443 (main): Handle the new option.
5444 * tests/misc/wc-files0: New tests, for the above.
5445 * tests/misc/wc-files0-from: Likewise.
5446 * tests/misc/Makefile.am (TESTS): Add wc-files0.
5448 2006-06-24 Jim Meyering <jim@meyering.net>
5450 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
5452 2006-06-22 Jim Meyering <jim@meyering.net>
5454 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
5455 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
5457 2006-06-19 Jim Meyering <jim@meyering.net>
5459 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5460 so this check is not run as part of "make distcheck".
5462 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
5464 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
5466 2006-06-18 Jim Meyering <jim@meyering.net>
5468 * tests/misc/pwd-long: Make error output a little clearer.
5470 2006-06-17 Jim Meyering <jim@meyering.net>
5472 * tests/rm/inaccessible: Skip this test on systems without openat
5473 support. Reported by Bob Proulx.
5475 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
5477 * tests/misc/mknod: Improve permission checks to handle
5478 running mkdir test in set-gid directories.
5480 2006-06-14 Jim Meyering <jim@meyering.net>
5482 * tests/du/basic: Revamp not to hard-code file system block sizes.
5484 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5486 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
5489 2006-06-11 Jim Meyering <jim@meyering.net>
5491 * .gitignore: New file.
5492 * Makefile.am (EXTRA_DIST): Add .gitignore.
5494 Setting TIME_STYLE=long-iso in the environment would make the
5495 cp/same-file test fail.
5496 * tests/envvar-check (vars): Add TIME_STYLE to the list.
5497 * tests/cp/same-file: Revert last change.
5498 Source the envvar-check script, to ensure that TIME_STYLE
5499 settings don't affect these tests.
5501 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
5503 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
5504 uses POSIX time stamp formats. Problem reported by John Nixon in
5505 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
5507 2006-06-10 Jim Meyering <jim@meyering.net>
5509 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
5511 Require a "Version N.M" line at the top of the ChangeLog
5512 file only when making the actual release, not when running
5514 * Makefile.maint (maintainer-distcheck): Don't depend on
5516 (alpha beta major): Depend on it here, instead.
5518 2006-06-08 Jim Meyering <jim@meyering.net>
5520 Ensure that cat works with any of the options, -A -v -e -E -T,
5521 when applied to files in /proc and /sys, even when the FIONREAD
5522 ioctl produces nonsensical results. Before this change, cat would
5523 produce no output (or truncated output), for some linux kernels.
5525 * src/cat.c (write_pending): New function, factored out of cat.
5526 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
5527 that there are bytes to read. Some versions of linux-2.6.16 do that.
5528 Write any pending output before returning.
5529 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
5530 * NEWS: Mention this bug fix.
5531 * tests/misc/cat-proc: New file. Test for the above.
5532 * tests/misc/Makefile.am (TESTS): Add cat-proc.
5534 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
5536 * src/expr.c (eval4): Detect overflow properly when multiplying
5539 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
5541 * NEWS: The 'expr' command now detects and reports integer overflow.
5542 (It would be better to use extended precision instead, but that
5543 would be more work.)
5544 * src/expr.c (integer_overflow): New function.
5545 (eval4, eval3): Check for integer overflow.
5547 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
5549 Fix problems when building with Solaris/SVR4/etc. make, which uses a
5550 different and somewhat bogus implementation of VPATH. In the
5551 directory tests/misc, rename tests whose names might appear in the
5552 Automake-generated rules. For example, we can't use a test named
5553 'test', since Automake generates a rule that contains the text
5554 "if test -f ./$$tst; ...", and this might expand to something like
5555 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
5556 which executes the 'test' script rather than the 'test' command.
5557 * tests/misc/false-status: Renamed from tests/misc/false.
5558 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
5559 * tests/misc/sort-merge: Renamed from tests/misc/sort.
5560 ($prog): Set to 'sort' rather than to $PROG.
5561 * tests/misc/test-diag: Renamed from tests/misc/test.
5562 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
5563 in case Solaris make has prepended the directory.
5564 (TESTS): Adjust to above renamings.
5565 * tests/misc/expand: Don't assign to PROG; no longer needed
5566 now that Makefile.am sets PROG to the basename.
5567 * tests/misc/fold: Likewise.
5569 2006-06-03 Jim Meyering <jim@meyering.net>
5571 Make `cp --link --no-dereference' work also on systems where the
5572 link system call cannot create a hard link to a symbolic link.
5573 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
5574 the link syscall on a symlink when it would do the wrong thing.
5575 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
5576 * tests/cp/link-no-deref: New file/test for the above.
5577 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
5578 * NEWS: Mention the change (doesn't affect Linux).
5580 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
5582 Fix some porting problems in the test cases reported by
5583 Ralf Wildenhues for HP-UX 11.23 in:
5584 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
5585 * tests/help-version: Don't assume that \< \> works in sed.
5586 * tests/misc/close-stdout: Don't assume that >&- works.
5587 Add a /dev/full test.
5588 * tests/touch/no-create-missing: Don't assume that >&- works.
5590 2006-05-30 Jim Meyering <jim@meyering.net>
5592 * src/ls.c (usage): Add `v' to the list of sorting-related options.
5595 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5597 * tests/cp/fail-perm: source lang-default.
5598 * tests/rm/inaccessible: Likewise.
5600 2006-05-28 Jim Meyering <jim@meyering.net>
5602 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
5603 Recognize it, too. Reported by Ralf Wildenhues, in
5604 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
5606 2006-05-27 Jim Meyering <jim@meyering.net>
5608 * src/chgrp.c: Support new options: --preserve-root and
5609 --no-preserve-root. Somehow this program was skipped when those
5610 options were added to chown, chmod, and rm. Reported by
5611 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
5612 * NEWS: Mention this.
5614 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
5616 * NEWS: Remove mention of --seed. We'll replace it with something
5617 better, and don't want to indicate that it is supported.
5618 * src/sort.c (usage): Likewise.
5620 2006-05-20 Jim Meyering <jim@meyering.net>
5622 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
5624 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
5625 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
5626 FTS_COMFOLLOW. Spotted by Justin Pryzby.
5628 * gnupload: Merge changes from automake, retaining the ""--to...
5629 kludge to placate overzealous `make distcheck' check.
5631 2006-05-19 Jim Meyering <jim@meyering.net>
5633 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
5634 FTS_TIGHT_CYCLE_CHECK directory traversal option.
5635 Reported by Justin Pryzby in http://bugs.debian.org/367691
5637 2006-05-15 Jim Meyering <jim@meyering.net>
5639 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
5640 From Tomas Pospisek.
5642 2006-05-13 Jim Meyering <jim@meyering.net>
5644 * tests/mv/no-target-dir: Test two more cases.
5646 2006-05-11 Jim Meyering <jim@meyering.net>
5648 mv -T DIR EMPTY_DIR no longer fails unconditionally
5649 * src/copy.c (copy_internal): Don't manually prohibit a move where
5650 the destination is an existing directory. Sometimes doing that is
5651 valid. Let the rename system call enforce the rules. That is
5652 allowed only when the source is a directory and the destination
5653 directory (to be replaced) is empty. Reported by Eric Blake.
5654 * tests/mv/no-target-dir: New file/test for this.
5655 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
5656 * NEWS: Mention this.
5658 * tests/mv/atomic: New file/test for yesterday's fix.
5659 * tests/mv/Makefile.am (TESTS): Add atomic.
5661 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
5663 2006-05-10 Jim Meyering <jim@meyering.net>
5665 * src/copy.c (copy_internal): Don't explicitly unlink the destination
5666 when moving a symlink into the place of an existing non-directory.
5667 Reported by Joshua Hudson.
5668 * NEWS: mention this.
5670 2006-05-07 Jim Meyering <jim@meyering.net>
5672 * Makefile.maint (patch-check): Fail if patch generates any output,
5673 even merely for changed offsets.
5675 * src/c99-to-c89.diff: Adjust to reflect new offsets.
5677 * NEWS: Mention changes affecting df, pwd, shred.
5679 2006-05-06 Jim Meyering <jim@meyering.net>
5681 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
5682 system condition where dirent.d_ino != stat.st_ino.
5683 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
5685 2006-05-06 Eric Blake <ebb9@byu.net>
5687 * tests/ls/inode: Expand to test inode from readdir case.
5688 * tests/ls/follow-slink: Expand to test broken links encountered
5689 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
5691 2006-05-06 Eric Blake <ebb9@byu.net>
5693 * tests/mv/leak-fd: Work even on case-insensitive file system.
5695 2006-05-04 Jim Meyering <jim@meyering.net>
5697 * NEWS: Mention the 2006-03-19 pwd-related change that makes
5698 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
5700 2006-05-03 Jim Meyering <jim@meyering.net>
5702 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
5703 Use better macro parameter names: s/basename/key_name/,
5704 s/basefunc/key_cmp_func. Fix typo in comment.
5706 2006-04-29 Eric Blake <ebb9@byu.net>
5708 * src/ls.c (main): On systems with d_type, directories_first only
5709 implies format_needs_type, not format_needs_stat.
5711 2006-05-03 Jim Meyering <jim@meyering.net>
5713 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
5714 after comma in arg list, from Eric Blake.
5716 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
5718 * tests/misc/date (relative-3): New test, derived from a bug
5719 report by John Thomas McDole.
5721 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
5723 New option for ls: --group-directories-first.
5724 It makes ls list directories before files.
5725 * NEWS [New features]: Mention it.
5726 * src/ls.c (sort_type): Rearrange to use as an array index when
5727 choosing sort function; added new sort_numtypes member for
5729 (time_type): Add new time_numtypes member for compile-time check.
5730 (directories_first): New global variable.
5731 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
5732 (long_options): Add --directories-first.
5733 (main): Support new option.
5734 (is_directory): New function.
5735 (extract_dirs_from_files): Use it.
5736 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
5737 (LIST_SORTFUNCTION_VARIANTS): New macros.
5738 (sort_functions): New global variable.
5739 (sort_files): Use it.
5740 (usage): Document new option.
5742 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
5744 * src/shred.c (fillrand): The assertion was way too weak, due to
5745 what must be a typo. Strengthen it to its intended value.
5746 (dopass): Don't use alloca; it's not worth the aggravation here,
5747 since it's used only to get a page-aligned buffer, and page
5748 alignment doesn't buy us much here. I'm suspicious that alloca
5749 causes problems on some hosts, due to a recent bug report by Adam
5750 Waltman: http://bugs.gentoo.org/130246.
5752 2006-04-18 Jim Meyering <jim@meyering.net>
5754 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
5755 sha384sum, sha512sum.
5757 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
5759 * src/chmod.c (describe_change): Adjust to filemode changes.
5760 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
5761 (print_long_format): Use (new) filemodestring rather than
5762 (old) mode_string, so that we get more file types right, at least
5763 in theory. Adjust to filemode changes.
5764 * src/stat.c (human_access): Likewise.
5766 2006-04-18 Jim Meyering <jim@meyering.net>
5768 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
5769 ignore file. This has never been enabled. Reported by Eric Blake.
5771 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
5773 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
5774 bug in Interix. Just call symlink or link directly. All uses changed.
5775 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
5776 * src/stat.c (USE_STATVFS): New macro.
5777 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
5778 (NAMEMAX_FORMAT): define a bit more clearly, now that the
5779 statvfs-using code is a bit more regular.
5780 * src/system.h (sync) [!HAVE_SYNC]: New macro.
5782 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
5784 * NEWS: csplit, nl, expr now conform to POSIX better, and are
5785 more-compatible with traditional Unix, with respect to regular
5787 * src/csplit.c (extract_regexp): Set re_syntax_options to a
5788 value that is compatible with what POSIX requires.
5789 * src/nl.c (build_type_arg): Likewise.
5790 * src/expr.c (docolon): Likewise. Also, don't let anchors match
5791 newline; this fixes an incompatibility with tradition and with POSIX.
5792 Don't warn about leading ^. POSIX says it is unspecified whether
5793 ^ is a special character, which means that implementations can
5794 either treat it as special or not, but either way a warning is not
5795 allowed (unless the regexp is otherwise invalid). Instead, anchor
5796 the expression but treat ^ as an anchor; this is the traditional
5797 behavior (e.g., Solaris 10).
5798 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
5799 and the like as invalid expressions (exit status 2), not as
5800 failure of 'expr' (exit status 3). This is more consistent with
5801 how Solaris behaves.
5802 * tests/expr/basic (fail-a): Adjust exit status to match new expr
5803 behavior, for status 2 versus 3.
5805 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
5806 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
5807 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
5808 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
5809 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
5810 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
5811 (bre61, bre62): New tests.
5812 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
5813 conforming to POSIX.
5816 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
5817 "if !". Do not assume that 'sed' can handle long, newline-free input.
5818 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
5820 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
5822 Adjust to new regex.h API (with new fastmap type), and clean
5823 up the regex storage allocation a bit.
5825 * src/csplit.c (struct control): Put re_compiled member at the
5826 end, since it's large. Change regexpr member from char * to bool;
5827 all uses changed. Add new member fastmap.
5828 (extract_regexp): regexp arg is now char const *, not char *.
5829 Don't bother duplicating the regular expression; it's not needed.
5830 Set fastmap from new fastmap member. Don't bother allocating
5831 a buffer, as the regexp code does a better job than we do.
5832 * src/expr.c (docolon): Allocate and use a fastmap.
5833 Don't bother allocating a buffer.
5834 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
5836 (build_type_arg): New fastmap arg. All uses changed.
5837 Don't bother allocating a buffer, but set a fastmap.
5838 * src/ptx.c (context_regex_string, word_regex_string): Remove.
5839 (context_regex, word_regex): New vars, replacing the above.
5841 (struct regex_data): New type.
5842 (compile_regex): Renamed from alloc_and_compile_regex, since
5843 we no longer allocate storage. Arg is now a struct regex_data *,
5844 not a const char *. All uses changed. Don't allocate the fastmap;
5845 instead, take it from the caller. Don't convert size_t to int,
5846 to avoid arithmetic overflow problems. Don't bother freeing
5847 storage afterwards; it's not worth the aggravation.
5848 * src/tac.c (compiled_separator_fastmap): New ver.
5849 (main): Use it. Don't bother allocating a buffer.
5851 2006-03-30 Jim Meyering <jim@meyering.net>
5853 * src/dd.c (iwrite): Remove assignment without effect.
5854 Reported by Felix Rauch Valenti.
5856 2006-03-22 Eric Blake <ebb9@byu.net>
5858 * src/ptx.c (usage): Remove mention of --copyright/-C.
5859 (main): Alias --copyright to --version plus a deprecation warning.
5860 * NEWS: Mention this.
5862 2006-03-27 Jim Meyering <jim@meyering.net>
5864 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
5865 use of strtod. Tiny patch from Nickolai Zeldovich.
5867 2006-03-11 Eric Blake <ebb9@byu.net>
5869 * tests/misc/dirname: New file.
5870 * tests/basename/Makefile.am: Delete.
5871 * tests/basename/basic: Move to...
5872 * tests/misc/basename: ... this new file. Add some tests,
5873 including fixed behavior for //.
5874 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
5875 * tests/Makefile.am (SUBDIRS): Remove basename.
5876 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
5878 Improvements to dirname/basename handling on platforms like
5879 cygwin with distinct // and with drive letters.
5880 * NEWS: Document new behavior.
5881 * src/basename.c (main): Don't strip suffix from file system
5883 * src/cp.c (target_directory_operand): Use new last_component.
5884 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
5885 traversing the string.
5886 * src/dircolors.c (guess_shell_syntax): Use new last_component.
5887 * src/install.c (target_directory_operand, install_file_in_dir):
5889 * src/ln.c (target_directory_operand, main): Likewise.
5890 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
5891 * src/mv.c (target_directory_operand, movefile): Likewise.
5892 * src/remove.c (rm_1): Likewise.
5893 * src/shred.c (wipename): Likewise.
5894 * src/split.c (next_file_name): Likewise.
5895 * src/su.c (log_su, run_shell): Likewise.
5897 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
5899 * NEWS: nohup diagnostics are now more precise, and nohup now
5900 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
5901 * src/nohup.c (main): Implement this.
5902 * tests/misc/nohup: Test the new behavior.
5904 2006-03-12 Jim Meyering <jim@meyering.net>
5906 * src/copy.c (set_author): Rename function, from preserve_author.
5908 * src/remove.c (AD_pop_and_chdir): Use new macro,
5909 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
5911 * src/system.h (SAME_INODE): Remove definition.
5912 Include "same-inode.h", instead.
5914 2006-03-11 Eric Blake <ebb9@byu.net>
5916 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
5918 2006-03-10 Jim Meyering <jim@meyering.net>
5920 Fix a bug whereby a user with write access to a directory being removed
5921 could cause the removal of that directory to fail with an erroneous
5922 diagnostic about a directory cycle. Reported by Vineet Chadha.
5924 * NEWS: Mention this.
5925 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
5926 leave (and try to rmdir) is the one whose dev_ino is being used to
5927 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
5929 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
5931 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
5932 * src/dd.c (set_fd_flags): Handle file-creation flags on file
5933 descriptors, rather than ignoring them.
5934 * tests/dd/misc: Add test cases for append, nofollow, directory,
5935 and nolinks flags. Simplify redirection to /dev/null in some cases.
5937 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
5938 noatime test never tested anything.
5940 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
5942 * src/dd.c (flags, usage): New flags directory, nolinks.
5943 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
5945 * src/ls.c (usage): Mention that -f disables --color.
5946 Problem reported by Niels Möller.
5948 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
5950 * man/*.x: Add references to syscalls from utilities of the same name.
5952 2006-03-05 Jim Meyering <jim@meyering.net>
5954 * tests/help-version: Set SHELL, if not already set, in order to
5955 avoid failure when `make check' is run through debuild; dircolors
5956 would fail due to lack of $SHELL. Reported by Sven Joachim.
5958 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
5959 * src/base64.c (wrap_write, do_encode, main): Change type of
5960 parameters and locals, wrap_column, form size_t to uintmax_t.
5961 (main): Adjust to use xstrtoumax, accordingly.
5963 2006-03-03 Jim Meyering <jim@meyering.net>
5965 Don't fail when run from an environment with SHELL not a Bourne
5966 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
5967 * tests/dircolors/simple: Invoke each non-failing test with -b.
5968 Reported by Michael Stone.
5970 2006-02-27 Jim Meyering <jim@meyering.net>
5972 * tests/misc/base64: Derive --decode-using tests from the
5975 * tests/misc/base64: Factor out a long constant string.
5976 Split lines to stay within 80 columns.
5978 * tests/misc/Makefile.am (TESTS): Add base64.
5979 * tests/misc/base64: Test base64. From Simon Josefsson.
5981 * src/base64.c (do_decode): Use correct type for parameter,
5982 ignore_garbage: s/size_t/bool/.
5984 * src/base64.c: Don't include .h files already included by system.h:
5985 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
5986 Include "system.h" before the other lib/*.h header files.
5987 Include <sys/types.h> before "system.h".
5988 (wrap_write): Remove declaration of unused local, initial_column.
5989 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
5991 * README: Add base64 to the list.
5993 2006-02-17 Simon Josefsson <jas@extundo.com>
5995 New program: base64.
5996 * AUTHORS: Mention base64.
5998 * man/Makefile.am: Build base64.1.
5999 * man/base64.x: New file.
6000 * src/Makefile.am (bin_PROGRAMS): Add base64.
6001 * src/base64.c: New file.
6003 2006-02-25 Eric Blake <ebb9@byu.net>
6005 In ls, avoid calling stat for --inode (-i), when possible.
6006 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
6007 * src/system.h: ... here, for use in ...
6008 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
6010 (gobble_file): Add inode argument.
6011 (print_dir): Pass inode if available.
6012 (usage): Remove inaccuracy.
6014 2006-02-23 Jim Meyering <jim@meyering.net>
6016 * TODO: Update/correct some obsolete entries.
6018 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
6020 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
6021 * src/join.c (usage): Likewise.
6022 Documentation problem reported by Philip Kensche.
6024 2006-02-20 Eric Blake <ebb9@byu.net>
6026 * man/rm.x: Update documentation to match previous patch.
6028 2006-02-18 Eric Blake <ebb9@byu.net>
6030 New option for rm: --interactive=once (-I).
6031 * NEWS: Document it, along with change to rm --interactive.
6032 * TODO: Remove entry for implementing rm -I
6033 * src/rm.c (INTERACTIVE_OPTION): New enum value.
6034 (interactive_type): New enum.
6035 (long_opts): Let interactive take an optional argument.
6036 (interactive_args, interactive_types): New option arguments.
6037 (usage): Document -I, --interactive=WHEN. Use program_name
6038 instead of a basename.
6039 (main): New -I option, new behavior to --interactive.
6040 * tests/rm/interactive-once: New tests.
6041 * tests/rm/interactive-always: Ditto.
6042 * tests/rm/Makefile.am (TESTS): Run them.
6044 2006-02-18 Jim Meyering <jim@meyering.net>
6046 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
6047 expression match more of the target lines, e.g., those that start with
6048 `-S,' (short option followed by a comma) or that include `=[...]'.
6049 Patch by Nicolas François.
6050 Fix the four offenders thus exposed:
6051 * src/join.c (usage): Use two spaces (not one) to separate the
6052 --first-only option string from its description, so help2man formats
6053 the derived man page properly.
6054 * src/pr.c (usage): Likewise.
6055 * src/uniq.c (usage): Likewise.
6056 * src/install.c (usage): Likewise.
6058 2006-02-15 Jim Meyering <jim@meyering.net>
6060 * Makefile.maint (alpha beta major): For `make major', ensure that the
6061 version string is of the form N.N[.N]*, where N is one or more digits.
6063 2006-02-14 Jim Meyering <jim@meyering.net>
6065 * INSTALL: Update from gnulib.
6067 2006-02-13 Jim Meyering <jim@meyering.net>
6069 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
6071 2006-02-12 Jim Meyering <jim@meyering.net>
6073 * Makefile.maint (patch-check): New target.
6074 (local-checks-available): Add to the list.
6076 2006-02-11 Jim Meyering <jim@meyering.net>
6078 * src/c99-to-c89.diff: New file.
6079 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
6081 * .x-po-check: New file, with exclusions so that `make distcheck'
6083 * Makefile.am (EXTRA_DIST): Add .x-po-check.
6085 rm -r must remove an empty directory, even if it is inaccessible.
6086 * src/remove.c (close_preserve_errno): New function.
6087 (fd_to_subdirp): Don't print a diagnostic in this function.
6088 Do it from the callers instead, unless rmdir succeeds.
6089 (remove_cwd_entries, remove_dir): Adjust callers.
6090 * tests/rm/empty-inacc: New test for the above.
6091 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
6092 * NEWS: Mention this bug fix.
6093 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
6094 a tiny bit less precise: cannot remove `a/1': ... instead of
6095 cannot open directory `a/1': ...
6097 * Makefile.maint (syntax-check-rules): Automatically derive this
6098 list of sc_-prefixed rule names.
6100 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
6102 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
6103 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
6104 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
6105 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
6106 go away? was that an accident?)
6107 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6108 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
6109 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
6110 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
6111 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
6112 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
6113 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
6114 (author_mark_check, makefile_path_separator_check):
6115 Output line numbers, to simplify navigation of Emacs *compilation*
6117 (sc_prohibit_atoi_atof, sc_file_system):
6118 Rework slightly so that Makefile.maint doesn't get reported as a
6119 violation of its own syntax rules.
6120 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
6121 it at run-time (which didn't work with Bison). Fix a makefile typo,
6122 caught by Makefile.maint itself: spaces where a tab should be.
6123 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
6124 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
6125 Ignore djgpp and man subdirectories, to avoid false matches with
6126 Bison and coreutils, respectively. Use sort -u to remove the
6127 resulting duplicates.
6128 * gnupload: Rework slightly to avoid bogus warning from
6129 sc_two_space_separator_in_usage.
6131 2006-02-10 Jim Meyering <jim@meyering.net>
6133 Use gzip's --rsyncable option only if it's available.
6134 * Makefile.maint (gzip_rsyncable): New variable.
6137 2006-02-08 Jim Meyering <jim@meyering.net>
6139 * Makefile.maint (local-checks-available): Define in terms of
6140 the expansion, $(syntax-check-rules), rather than the single,
6141 top-level target `syntax-check', so that it's easier to exclude
6142 individual rules (via $(local-checks-to-skip)).
6143 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
6145 2006-02-07 Jim Meyering <jim@meyering.net>
6147 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
6148 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
6150 * tests/help-version (expected_failure_status_vdir):
6151 Redirect an expected disk-full diagnostic to /dev/null.
6153 2006-02-06 Jim Meyering <jim@meyering.net>
6155 * src/unexpand.c (usage): Use two spaces (not one) to separate the
6156 --first-only option string from its description, so help2man formats
6157 the derived man page properly.
6158 * src/rm.c (usage): Likewise for --no-preserve-root.
6159 * src/chown.c (usage): Likewise.
6160 * src/chgrp.c (usage): Likewise.
6162 Add a rule to ensure that the above doesn't happen again.
6163 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
6164 (syntax-check-rules): Add it.
6165 * .x-sc_two_space_separator_in_usage: New empty file.
6166 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
6168 2006-02-06 Jim Meyering <jim@meyering.net>
6170 * src/cp.c (usage): Use two spaces (not one) to separate each
6171 option string from its description, so help2man formats the
6172 derived man page properly.
6173 * src/mv.c (usage): Likewise.
6174 Patch from Nicolas François in http://bugs.debian.org/351601.
6176 2006-02-04 Jim Meyering <jim@meyering.net>
6178 * src/copy.c (copy_internal): cp -RL would fail when encountering
6179 the same directory more than once in the hierarchy beneath a single
6180 command-line argument. That is legitimate, e.g. when there are
6181 two or more symbolic links, each pointing to some directory that
6182 would not otherwise be copied. Reported by Christophe LYON.
6183 * tests/cp/cp-deref: New file. Test for today's fix.
6184 * tests/cp/Makefile.am (TESTS): Add cp-deref.
6185 * NEWS: Document this.
6187 2006-02-03 Jim Meyering <jim@meyering.net>
6189 * configure.ac: Require automake-1.9.6, not 1.8.3.
6191 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
6193 * src/od.c (usage): Mention that -t a ignores high order bit.
6194 Documentation problem reported by Ed Avis.
6196 2006-02-01 Jim Meyering <jim@meyering.net>
6198 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
6200 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
6202 * src/head.c (main): Use a better diagnostic when someone uses a
6203 trailing numeric option in an invalid way. Problem reported by
6205 * src/tail.c (parse_options): Likewise.
6207 2006-01-30 Jim Meyering <jim@meyering.net>
6209 * man/wc.x: Include `count' keyword in man page synopsis,
6210 per suggestion from http://bugs.debian.org/181585.
6212 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
6214 * src/df.c (show_dev): If the file system claims to have
6215 more available than total blocks, report the number of used
6216 blocks as being total - available (a negative number) rather
6217 than as garbage. Problem reported by Toralf Foerster.
6219 2006-01-24 Jim Meyering <jim@meyering.net>
6221 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
6222 to put a regular file in O_NONBLOCK mode fails with EPERM.
6223 That happens on Linux (up to 2.6.15) when using tail -f on a file with
6224 the append-only attribute. Reported by Dean Gaudet. For details,
6225 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
6226 * NEWS: Mention this fix.
6227 * tests/tail-2/append-only: New file. Test for the above.
6228 * tests/tail-2/Makefile.am (TESTS): Add append-only.
6229 * tests/Makefile.am (check-root): Add tail-2/append-only
6231 2006-01-21 Jim Meyering <jim@meyering.net>
6233 * NEWS: Mention fts-related improvements and bug fixes.
6235 2006-01-19 Jim Meyering <jim@meyering.net>
6237 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
6238 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
6240 2006-01-18 Jim Meyering <jim@meyering.net>
6242 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
6244 2006-01-17 Jim Meyering <jim@meyering.net>
6246 Now that fts no longer changes the current working directory, adjust
6247 its clients accordingly -- note that du.c uses fts but doesn't need
6248 any adjustment, since it doesn't operate on the actual files,
6249 but rather just uses the stat buffers provided by fts.
6251 * src/chown-core.c: Include "openat.h".
6252 Don't include "lchown.h".
6253 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
6254 calling openat, lchownat, chownat, rather than open, lchown, chown.
6256 * src/chmod.c: Include "openat.h".
6257 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
6259 * tests/du/long-from-unreadable: New test, to exercise one small
6262 2006-01-13 Jim Meyering <jim@meyering.net>
6264 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
6265 addition of new directories under tests/.
6267 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
6270 2006-01-12 Jim Meyering <jim@meyering.net>
6272 * tests/du/long-sloop: Adjust not to hard-code the expected
6273 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
6274 from that of GNU libc. Reported by Paul Eggert.
6276 * tests/du/long-sloop: Create file at end of symlink chain.
6278 * tests/misc/test: New file, with a test for one of the
6279 bugs fixed by yesterday's test.c changes.
6280 * tests/misc/Makefile.am (TESTS): Add test.
6282 2006-01-11 Jim Meyering <jim@meyering.net>
6284 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
6285 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
6286 a very long sequence of symbolic links (not necessarily a loop).
6287 * tests/du/Makefile.am (TESTS): Add long-sloop.
6289 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
6291 * src/test.c (test_syntax_error): Append a newline. All callers
6292 changed, except for the ones that didn't already append a newline.
6293 Bug reported by Eric Blake.
6295 2006-01-11 Jim Meyering <jim@meyering.net>
6297 * src/system.h (X2NREALLOC): Now that verify_true is no longer
6298 void, cast its result to void, to avoid gcc's warning that
6299 ``left-hand operand of comma expression has no effect''.
6300 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
6302 2006-01-10 Jim Meyering <jim@meyering.net>
6304 * tests/chmod/no-x: Add a test for today's fts.c fix.
6306 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
6308 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
6309 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
6311 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
6313 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
6314 Use verify_true instead of verify_expr, to sync with gnulib.
6316 2006-01-08 Jim Meyering <jim@meyering.net>
6318 * src/date.c (usage): Adjust the formatting of the entries for
6319 %::z and %:::z (separate with two spaces, not one) so that help2man
6320 formats them properly. Reported by Philip Rowlands.
6322 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
6324 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
6326 2006-01-06 Jim Meyering <jim@meyering.net>
6328 * Makefile.maint (copyright-check): Use date +%Y in place of
6331 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
6332 First off, the attribute should have been `volatile' (not static)
6333 to avoid longjmp-related risk of clobber. Secondly, now there is
6334 no longer any risk of a local variable being clobbered, so there's
6335 no need for any attribute at all.
6337 2006-01-05 Jim Meyering <jim@meyering.net>
6339 * src/remove.c: Give a few functions the inline attribute.
6340 (AD_pop_and_chdir): Use gotos to avoid some duplication.
6341 (AD_push): Rewrite an assertion so that the entire computation
6342 goes away when assertions are turned off.
6344 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
6345 It's already defined in "system.h".
6346 * Makefile.maint: Add a FIXME comment.
6348 2006-01-04 Jim Meyering <jim@meyering.net>
6350 * ChangeLog: Remove entries from 2005-10-22 and earlier.
6351 * ChangeLog-2005: New file, for entries up to version 5.92.
6353 2006-01-03 Jim Meyering <jim@meyering.net>
6355 * tests/du/no-x: Also allow a slightly different diagnostic -- the
6356 one you get when using openat-enabled fts.c and du (coming soon).
6357 * tests/chmod/no-x: Likewise.
6358 * tests/chgrp/no-x: Likewise.
6360 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
6362 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
6364 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
6365 (restricted_chown): Return it, if the file cannot be accessed due
6366 to EPERM, or if no uid or gid are required, or if the file is
6367 neither a directory nor a regular file. Rewrite to avoid gotos.
6368 (change_file_owner): Handle RC_do_ordinary_chown case.
6369 Rewrite to avoid gotos.
6370 * tests/chgrp/basic: Make sure we can change the group of
6373 * src/date.c (usage): Explain %g, %G, and %V a bit better.
6375 2006-01-02 Jim Meyering <jim@meyering.net>
6377 * src/copy.c (set_owner): Correct a comment.
6379 * src/tail.c (parse_options): Change warning to say that --retry
6380 is useful `mainly' (not `only') when following by name.
6381 Reported here: http://bugs.debian.org/273781
6383 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
6385 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
6386 * src/copy.c: Include lchmod.h.
6387 (copy_internal): Use lchmod rather than chmod.
6388 * src/cp.c: Include lchmod.h.
6389 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
6390 * src/mkdir.c: Include lchmod.h.
6391 (usage): Clarify -m's operation.
6392 (main): Use lchmod rather than chmod. Don't use lchmod unless the
6393 new mode contains bits outside the 777 range.
6394 * src/mkfifo.c (usage): Clarify -m's operation.
6395 (main): If -m is given, don't invoke chmod; use umask 0 instead.
6396 Report an error if -m asks for bits outside the 777 range.
6397 * src/mknod.c (usage, main): Likewise.
6399 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
6401 2005-12-27 Jim Meyering <jim@meyering.net>
6403 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
6404 (sc_prohibit_assert_without_use): New rule.
6405 (syntax-check-rules): Add it to the list.
6406 * .x-sc_prohibit_assert_without_use: New empty file.
6407 * Makefile.am (EXTRA_DIST): Add it.
6409 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
6411 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
6412 Don't include <assert.h>; it wasn't used.
6414 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
6416 * src/chown-core.c (restricted_chown):
6417 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
6418 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
6419 | O_NOFOLLOW too, for consistency with other dir-openers.
6420 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
6421 (is_empty_dir): Likewise.
6422 * src/shred.c (wipename): Likewise. Don't bother trying to open
6423 dir for writing, since POSIX prohibits it.
6425 2005-12-22 Jim Meyering <jim@meyering.net>
6427 * tests/help-version: Redirect stderr to /dev/full, to suppress
6428 write error diagnostic.
6430 2005-12-19 Jim Meyering <jim@meyering.net>
6432 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
6433 Avoid a minor race condition when `-m MODE' is specified, by using
6434 open, fchown, and close rather than just chown. To do that reliably --
6435 even with an overly restrictive umask -- ensure that each mkdir,
6436 mknod and mkfifo call uses a mode including at least owner-read access.
6437 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
6438 the subsequent chown (or equivalent open,fchown,close) fails.
6439 * tests/misc/mknod: New tests.
6440 * tests/misc/Makefile.am (TESTS): Add mknod.
6442 2005-12-17 Jim Meyering <jim@meyering.net>
6444 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
6445 e.g., on a named pipe.
6446 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
6447 place of all uses, since it is guaranteed (system.h) to be defined.
6449 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
6451 Add POSIX ACL support
6452 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
6453 is no requirement for ACL support; particularly, it does not exist
6454 on systems that have POSIX ACLs.
6455 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
6456 * src/cp.c (umask_kill): With default acls, the umask is not to be
6457 applied. Remove umask_kill, don't change the process umask, and let
6458 the kernel apply the umask where appropriate.
6459 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
6460 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
6462 (copy_reg, copy_internal): Use copy_acl and set_acl
6463 instead of fchown/chown. Fix the logic for POSIX ACLs.
6464 (chown_succeded): Remove; we now always copy acls and
6465 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
6466 did a chown before or not.
6467 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
6468 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
6469 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
6470 to link with it via $(LIB_ACL), for the utilities that need it.
6472 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
6474 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
6475 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
6476 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
6477 value is now signified by whether cwd_errno is null.
6478 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
6479 pointer-to-bool to pointer-to-errno-value. All callers changed.
6480 (rm_1): Don't bother setting a local cwd failure flag and then
6481 ORing it into the caller's. Just set the caller's.
6482 (rm): Use cwd failure errno value to print a slightly-better
6485 2005-12-15 Jim Meyering <jim@meyering.net>
6487 * src/stat.c (print_it): Properly handle a backslash at the
6488 end of a --printf format string. Reported by Paul Eggert.
6489 * tests/misc/stat-printf (end-bs): Add a test for the above.
6491 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
6493 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
6494 Don't assume /etc/passwd contains user names; use 'id' instead.
6496 2005-12-15 Jim Meyering <jim@meyering.net>
6498 stat: revert behavior of --format=FMT (-c)
6499 stat: add new option: --printf=FMT
6500 * NEWS: Mention this.
6501 * src/stat.c (isodigit, octtobin, hextobin): Define.
6502 (PRINTF_OPTION): Define.
6503 (interpret_backslash_escapes, trailing_delim): New globals.
6504 (usage): Document them. Alphabetize on long option names.
6505 (print_esc_char): New function.
6506 (print_it): Rewrite, in order to handle backslash escapes.
6507 (main): Handle new option. Set globals for --format, too.
6509 * tests/misc/stat-printf: Test --printf and --format.
6510 * tests/misc/Makefile.am (TESTS): Add stat-printf.
6512 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
6514 * NEWS: sort now reports incompatible options.
6515 * src/sort.c (incompatible_options, check_ordering_compatibility):
6517 (main): Use them. Don't bother with a usage message for
6518 "sort -c a b", for consistency with other error diagnostics.
6519 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
6522 * src/cat.c (main): Undo previous change. close_stdout already
6523 does the check, so the previous change wasn't necessary.
6525 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
6527 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
6529 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
6531 Install a more-conservative approach for sort -R. It's the
6532 same basic idea as the existing code, except it uses the full ISAAC
6533 approach (called the "more kosher" approach in the existing comments).
6534 This makes "sort -R" quite a bit slower (about a factor of 2 on my
6535 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
6536 better to be conservative here at first, and review any performance
6537 improvements carefully.
6538 * .x-sc_require_config_h: Add src/rand-isaac.c.
6539 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
6540 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
6541 (shred_SOURCES, sort_SOURCES): Remove.
6542 (EXTRA_DIST): Add rand-isaac.c.
6543 * src/rand-isaac.c: Revert to what used to be in shred.c, without
6544 changing it to allow for varying numbers of words in the state.
6545 Alter so that we include rand-isaac.c directly rather than
6546 compiling it and linking to it. Don't include config.h or
6547 system.h; that's the includer's responsibility.
6548 Omit functions that are specific to shred.
6549 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
6550 (isaac_step, struct irand_state):
6551 Resurrect these, with the same defns that used to be in shred.c.
6552 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
6553 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
6555 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
6556 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
6557 (irand_init, irand32, irand_mod):
6558 Number of words is constant again.
6559 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
6560 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
6561 * src/sort.c: Likewise.
6562 * src/shred.c (fillrand, dopass, main): Undo previous change.
6563 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
6565 * src/sort.c: Don't include md5.h; it wasn't needed.
6566 (struct keyfield): Rename random_hash to random, for consistency
6567 with the other member names. All uses changed.
6568 (usage): Tweak wording to mention STRING for --seed option.
6569 (short_options): Rorder for consistency with other programs.
6570 (rand_state): Now a struct, not a pointer to one. All uses changed.
6571 (HASH_WORDS, HASH_SIZE): Remove.
6572 (get_hash): Remove comments around resbuf size, since we can assume C89.
6573 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
6574 (keycompare): Adjust to the new get_hash.
6576 (badfieldspec): Omit recently-introduced comment; it isn't needed.
6577 (main): Don't set need_random simply because gkey has it set; that
6578 doesn't necessarily mean we'll need random numbers.
6579 Redo seeding to match new get_hash approach.
6581 2005-12-10 Jim Meyering <jim@meyering.net>
6583 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
6585 Avoid shred segfault on 64-bit systems.
6586 * src/rand-isaac.c (isaac_refill): Don't try to negate a
6587 local of type uint32_t. Make the local an `int' instead.
6589 * NEWS: Mention sort's new options.
6591 * src/rand-isaac.c (isaac_mix): Declare to be static.
6592 Mark all other functions as `extern' so the tight-scope
6593 part of `make distcheck' passes once again.
6594 * src/rand-isaac.h (isaac_mix): Remove declaration.
6596 * src/sort.c (get_hash): Change position of `*' in parameter
6597 type to conform with convention.
6598 (main): Split a long line so it fits in 80 columns.
6599 (keycompare): Remove stray SPACE before TAB that was
6600 causing `make distcheck' to fail.
6602 * src/shred.c: Don't include gethrxtime.h. No longer needed.
6604 * tests/misc/sort-rand: New file: basic tests for the new options.
6605 * tests/misc/Makefile.am (TESTS): Add sort-rand.
6607 2005-12-10 Frederik Eaton <frederik@ofb.net>
6609 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
6610 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
6611 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
6612 Make state size runtime-configurable.
6613 (isaac_new, isaac_copy): New functions.
6614 * src/rand-isaac.h: New file.
6615 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
6616 (fillrand, main): Adjust to the fact that the state size is now
6617 runtime-configurable.
6618 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
6619 (usage): Add options --random-sort and --seed to implement a random
6621 Include md5.h and rand-isaac.h.
6622 (get_hash): New function.
6623 (rand_state): New var.
6624 (HASH_WORDS, HASH_SIZE): New macros.
6626 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
6628 * tests/dd/misc: Add test for dd iflags=noatime.
6630 2005-12-09 Jim Meyering <jim@meyering.net>
6632 * src/sort.c (usage): Mention white space vs -b and -t options.
6635 2005-12-09 Eric Blake <ebb9@byu.net>
6637 * src/test.c (main): Fix misleading comment.
6639 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
6641 * NEWS: Mention dd's new noatime flag.
6642 * src/system.h (O_NOATIME): Define to 0 if not already defined.
6643 * src/dd.c (flags, usage): Add support for noatime flag.
6645 2005-12-07 Jim Meyering <jim@meyering.net>
6647 Distribute the cvsu script, used only by `make syntax-check'.
6648 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
6649 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
6650 distribute a copy of this script.
6651 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
6653 * tests/mv/acl: exit-77 before the trap, not after, if we fail
6654 to create a temporary directory on another partition.
6655 From Andreas Gruenbacher.
6657 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
6659 * man/basename.x: Cross-reference to dirname and readlink.
6660 * man/dirname.x: Cross-reference to basename and readlink.
6662 2005-12-05 Andreas Gruenbacher
6664 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
6665 (set_owner, preserve_author): New functions, factored out of copy_reg.
6666 (copy_reg): Use them.
6667 (copy_internal): Use them here, too.
6669 2005-12-04 Jim Meyering <jim@meyering.net>
6671 * src/sleep.c (usage): Say what happens with two or more arguments.
6672 Suggested by Justin Pryzby.
6674 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
6677 2005-12-03 Jim Meyering <jim@meyering.net>
6679 * src/rm.c (long_opts): Change the name of each undocumented, for-
6680 testing-only option to start with `-', so that it cannot render
6681 ambiguous any prefix it happens to share with some other option name.
6682 Problem reported by Eric Blake.
6683 * src/head.c (long_options): Likewise.
6684 * src/tail.c (long_options): Likewise.
6686 * tests/misc/head-elide-tail: Update uses of undocumented, for-
6687 testing-only --presume* options to start with `---'.
6688 * tests/rm/dangling-symlink: Likewise.
6689 * tests/rm/dir-no-w: Likewise.
6690 * tests/rm/isatty: Likewise.
6692 2005-11-30 Jim Meyering <jim@meyering.net>
6694 * Makefile.maint: Add a comment about cvsu.
6696 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
6698 * NEWS: df updates for "none", "proc", inaccessible file systems.
6699 * src/df.c (show_point): Ignore inaccessible file systems.
6700 (usage): -a includes dummy file systems, not size-0 file systems.
6702 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
6703 to avoid collision with POSIX name space. All uses changed.
6705 2005-11-24 Jim Meyering <jim@meyering.net>
6707 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
6708 * tests/acl: Add `$0: ' prefix to diagnostics.
6710 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
6712 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
6714 * src/copy.c: Improve performance a bit by optimizing away
6715 unnecessary system calls and going to a block size of at least
6716 8192 (on normal hosts, anyway). This improved performance 5% on my
6717 Debian stable host (2.4.27 kernel, x86, copying from root
6718 ext3 file system to itself).
6719 Include "buffer-lcm.h".
6720 (copy_reg): Omit last argument. All callers changed.
6721 Use xmalloc to allocate rather than trusting alloca
6722 (which is unwise with large block sizes).
6723 Declare locals more locally, if possible.
6724 Use uintptr_t words instead of int words, for a bit more speed
6725 when looking for null blocks on 64-bit hosts.
6726 Optimize away reads of zero bytes on regular files.
6727 In the typical case, insist on 8 KiB buffers, at least.
6728 Avoid unnecessary extra call to fstat when checking for sparse files.
6729 Avoid now-unnecessary cast to off_t, and "0L".
6730 Avoid unnecessary test of *new_dst when checking for same owner
6733 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
6735 * src/remove.c (rm): Don't assume C99 for-loop syntax.
6737 2005-11-22 Jim Meyering <jim@meyering.net>
6739 * src/remove.c (AD_push): Remove debugging cruft.
6741 * tests/rm/unread2 (rm): Change expected diagnostic,
6742 `cannot open directory' to `cannot remove', to align with
6744 * tests/rm/rm2: Ensure that rm now continues removing entries
6745 even after certain types of failure.
6747 * src/remove.c: Rewrite. Now, this module is reentrant on systems
6748 that provide openat (Solaris), and on systems like Linux+procfs
6749 where our openat emulation code is reentrant. This also fixes a
6750 few low-probability leaks and eliminates some code that could,
6751 in very unusual circumstances, cause rm() (via a callee) to exit.
6752 * NEWS: Mention this.
6754 * configure.ac: Put copyright dates all on one line so the
6755 emacs function that updates them works properly.
6757 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
6759 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
6760 Problem reported by Eric Blake.
6761 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
6762 we get a standard-conforming compiler. This relies on the new
6763 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
6764 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
6765 m4/c.m4 can go away with Autoconf 2.60 comes out.
6767 2005-11-17 Jim Meyering <jim@meyering.net>
6769 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
6770 (AD_mark_current_as_unremovable): Likewise, but for a local.
6773 * tests/mv/acl: Let traps handle removing temporary directories.
6775 Expect acl-related tests to fail, until the corresponding
6776 patches are committed.
6777 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
6778 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
6780 ACL tests, from Andreas Gruenbacher.
6781 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
6782 * tests/mv/Makefile.am (TESTS): Add acl.
6783 * tests/cp/Makefile.am (TESTS): Add acl.
6785 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
6787 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
6789 * NEWS: Improve quality of ln's diagnostics.
6790 * src/ln.c (do_link, usage): Likewise.
6791 (do_link): Don't use alloca on a buffer of unbounded size.
6793 2005-11-16 Jim Meyering <jim@meyering.net>
6795 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
6796 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
6797 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
6798 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
6799 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
6801 2005-11-14 Jim Meyering <jim@meyering.net>
6803 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
6805 2005-11-13 Jim Meyering <jim@meyering.net>
6807 * announce-gen: Accept new option, --gpg-key-id=ID and
6808 emit a blurb telling how to use the .sig files.
6809 * Makefile.cfg (gpg_key_ID): Define.
6810 * Makefile.maint (announcement): Use new option and key.
6812 Require that most .c files include <config.h>.
6813 * Makefile.maint (sc_require_config_h): New rule.
6814 (syntax-check-rules): Add it.
6815 * .x-sc_require_config_h: New file listing exceptions to the
6816 above rule. Some are legit, others are simply grandfathered in.
6817 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
6819 2005-11-12 Jim Meyering <jim@meyering.net>
6821 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
6823 2005-11-11 Jim Meyering <jim@meyering.net>
6825 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
6826 Mention new readlink options in 5.3.0's `New features' section.
6827 Spotted by Thomas Hood.
6829 2005-11-08 Jim Meyering <jim@meyering.net>
6831 * NEWS: Merge in changes from b5_9x branch.
6833 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
6835 * NEWS: ls now defaults to --time-style='locale', which in turn acts
6836 like --time-style='posix-long-iso' if the locale settings are messed up.
6837 * src/ls.c (decode_switches): Implement this.
6839 2005-11-08 Jim Meyering <jim@meyering.net>
6841 * tests/du/2g: s/expensive/very expensive/ in a comment.
6844 2005-10-17 Eric Blake <ebb9@byu.net>
6846 * src/ls.c (usage): Fix descriptions of --sort, --time.
6847 Reported by Vitaly A. Ostanin.
6849 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
6851 * src/ln.c: Include filenamecat.c.
6852 (FILE_BASENAME_CONCAT): Remove.
6853 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
6854 (main): Use file_name_concat, base_name, and strip_trailing_slashes
6855 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
6858 2005-11-04 Jim Meyering <jim@meyering.net>
6860 * src/du.c (process_file): Don't overflow for files of size >= 2^31
6861 on systems with stat.st_blocks of a signed 32-bit type.
6862 This bug causes trouble on some AIX 5.1 systems.
6863 Report and trivial patch from Paul Townsend:
6864 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
6865 * NEWS: Mention this.
6867 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
6868 * tests/du/Makefile.am (TESTS): Add it here.
6869 * tests/very-expensive: New file.
6870 * tests/Makefile.am (EXTRA_DIST): Add it here.
6871 * tests/cp/perm: Mark this test as `very-expensive', too.
6873 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
6875 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
6877 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
6879 * src/rm.c (usage): Don't mention rm -d.
6881 2005-11-02 Jim Meyering <jim@meyering.net>
6883 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
6884 From Andreas Schwab.
6886 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
6887 `M+N records in/out' lines don't pollute `make check' output.
6889 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
6890 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
6891 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
6892 to indicate that the input file should be piped into the command
6893 under test (via `cat FILE | $prog ...').
6895 * src/remove.c (remove_entry): Emit a better diagnostic when rm
6896 (without -r) fails to remove a directory on a non-Linux system.
6897 This change affects only newer Solaris systems (with priv_*
6898 functions like priv_allocset). Reported by Keith Thompson.
6900 * tests/rm/dir-nonrecur: New file/test for the above fix.
6901 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
6903 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
6905 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
6906 POSIX 1002.1-2001 requires.
6907 * src/tail.c (parse_obsolete_option): Implement this.
6908 Problem reported by Vincent Lefevre.
6909 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
6910 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
6911 (test_vector): Add special cases for _POSIX2_VERSION, and
6912 regularize the old ones a bit.
6913 * tests/touch/obsolescent: Add y2000 test.
6915 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
6917 * src/dd.c (skip): Fix off-by-one error reported by
6918 Theodoros V. Kalamatianos.
6920 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
6922 * tests/mkdir/p-3: Require that the test be run as non-root.
6923 Problem and trivial fix reported by Theodoros V. Kalamatianos.
6925 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
6927 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
6928 boundary between DEST and SOURCE in the result.
6930 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
6932 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
6933 back to text, to sync with documentation and for backwards
6936 2005-10-25 Jim Meyering <jim@meyering.net>
6938 * tests/dircolors/simple (other-wr): Add an explicit test for
6939 the dircolors bug (NULL-dereference) fixed yesterday.
6941 2005-10-24 Jim Meyering <jim@meyering.net>
6943 * src/tac.c (tac_file): When determining whether a file is seekable,
6944 also test whether it is a tty. Using only the lseek-based test would
6945 give a false positive on Solaris. Reported by Peter Fales.
6947 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
6949 * tests/install/d-slashdot: New test, for "install -d" failure.
6950 * tests/install/Makefile.am (TESTS): Add d-slashdot.
6951 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
6952 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
6954 2005-10-24 Jim Meyering <jim@meyering.net>
6956 * src/dircolors.c (ls_codes): Add missing comma.
6957 Anonymous report and patch from
6958 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
6960 * src/dircolors.c: Add compile-time assertion that the slack_codes
6961 and ls_codes arrays have the same number of elements. This would
6962 have prevented the above-fixed bug.
6964 * src/expand.c (parse_tab_stops): Add a comment to make this function
6965 identical to the one in unexpand.c.
6966 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
6967 identical to the one in expand.c.
6969 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
6971 2005-10-23 Jim Meyering <jim@meyering.net>
6973 * src/md5sum.c (digest_check, main): Use ptr_align rather than
6974 a dangerous pointer-value-to-`unsigned' cast.
6975 * NEWS: mention the new sha* programs.
6976 * AUTHORS: Add new sha* programs.
6978 2005-08-28 David Madore <david.madore@ens.fr>
6980 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
6981 * README: Add their names to the list.
6982 * src/md5sum.c: Provide framework for computing sha-2 hashes.
6983 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
6984 Rules for compiling sha-2 utilities
6985 (noinst_HEADERS): Remove checksum.h.
6986 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
6988 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
6989 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
6990 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
6991 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
6992 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
6993 sha384sum, sha512sum test scripts here rather that each in its
6996 2005-08-28 David Madore <david.madore@ens.fr>
6998 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
6999 of the FIPS test vectors).
7001 2005-10-23 Jim Meyering <jim@meyering.net>
7003 * configure.ac: Use 6.0-cvs as the version string.
7004 * NEWS: Adjust accordingly.
7009 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
7011 Copying and distribution of this file, with or without
7012 modification, are permitted provided the copyright notice
7013 and this notice are preserved.