1 2007-08-14 Jim Meyering <jim@meyering.net>
3 od: fix a bug that arises when skipping exact length of file
4 * NEWS: Document the bug fix.
5 * src/od.c (skip): Call fseek even when n_skip is exactly the
6 same as the length of the current file. Otherwise, the next
7 iteration would use unadjusted input stream pointer, thus ignoring
8 the desired "skip". Report and patch by Paul GHALEB.
10 * tests/misc/od: New file, test for the above.
11 * tests/misc/Makefile.am (TESTS): Add od.
13 2007-08-10 Paul Eggert <eggert@cs.ucla.edu>
15 Accommodate more xstrtol changes.
16 * src/df.c (long_options): Don't bother prepending "--" to long
17 options that OPT_STR might decode, as that hack is no longer needed.
18 (main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR.
19 * src/du.c (long_options, main): Likewise.
20 * src/ls.c (decode_switches): Likewise.
21 * src/od.c (long_options, main): Likewise.
22 * src/pr.c (first_last_page, main): Likewise.
23 * src/sort.c (long_options, specify_sort_size): Likewise.
24 * src/pr.c (first_last_page): Accept option index and option char
25 instead of an assembled option string. All callers changed.
26 * src/sort.c (specify_sort_size): Likewise.
27 * src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT):
30 2007-08-05 Jim Meyering <jim@meyering.net>
32 Encapsulate a static variable.
33 * src/system.h (opt_str_storage): Move static var into...
34 (short_opt_str): ... new static inline function.
35 (OPT_STR): Use the new function.
37 2007-08-04 Jim Meyering <jim@meyering.net>
39 Exercise xstrtol's diagnostics via pr's --pages option.
40 * tests/misc/xstrtol: New file.
41 * tests/misc/Makefile.am (TESTS): Add xstrtol.
43 2007-08-04 Paul Eggert <eggert@cs.ucla.edu>
45 Adapt to new human and xstrtol API.
46 * src/df.c (long_options): Prepend "--" to long options that
48 * src/du.c (long_options): Likewise.
49 * src/od.c (long_options): Likewise.
50 * src/sort.c (long_options): Likewise.
51 * src/df.c (main): Adjust to new human and xstrtol API.
52 * src/du.c (main): Likewise.
53 * src/ls.c (decode_switches): Likewise.
54 * src/od.c (main): Likewise.
55 * src/pr.c (first_last_page): Likewise. New argument OPTION.
57 * src/sort.c (specify_sort_size): New arg OPTION. All callers
58 changed. Adjust to new xstrtol API.
59 * src/system.h (opt_str_storage): New static var.
60 (OPT_STR, LONG_OPT_STR, OPT_STR_INIT): New macros.
62 2007-08-02 Jim Meyering <jim@meyering.net>
64 Adjust one more test to accommodate the recent fts change.
65 This matters only on systems with insufficient openat support.
66 * tests/du/inacc-dest: Adjust expected diagnostic.
68 Adjust the other two "no-x" tests and unify all three.
69 * tests/du/no-x: Factor out du-specific bits.
70 * tests/chmod/no-x: Use the same code.
71 * tests/chgrp/no-x: Use the same code.
73 Adapt du's no-x test not to fail on older Linux systems.
74 * tests/du/no-x: Accept a third variant of the diagnostic.
76 2007-07-31 Jim Meyering <jim@meyering.net>
78 du: print size (probably incomplete) of each inaccessible directory
79 * src/du.c (process_file): Print what we know of the size of a
80 directory even when it is inaccessible. What we print is just the
81 size of the directory itself, not counting any of its contents.
82 * tests/du/inacc-dir: Test for this.
83 * NEWS: Mention this change.
85 Add a test for du not counting size of inaccessible directories.
86 * tests/du/inacc-dir: New file. Test for fts.c bug fixed yesterday.
87 * tests/du/Makefile.am (TESTS): Add inacc-dir.
88 * NEWS: Mention the bug fix.
90 2007-07-28 Jim Meyering <jim@meyering.net>
92 Attempt to copy a regular file, even if stat says it is empty.
93 * NEWS: Document this bug fix.
94 * src/copy.c (copy_reg): Read from a regular file, even if it
95 appears (stat.st_size == 0) to be empty. This reverts an
96 optimization introduced on 2005-11-23 for coreutils-6.0.
97 Otherwise, "cp /proc/cpuinfo /tmp" creates an empty file,
98 on e.g., linux-2.6.20.
99 * tests/cp/proc-zero-len: New file. Test for the above.
100 * tests/cp/Makefile.am (TESTS): Add proc-zero-len.
101 Reported by Dan Berrangé.
103 2007-07-26 Bob Proulx <bob@proulx.com>
105 sort: Improve sort --random-sort test.
106 * tests/misc/sort-rand: If "locale" is available pick a random
107 non-C locale and check "sort --random-sort" behavior using it.
109 2007-07-24 Jim Meyering <jim@meyering.net>
111 sort: add a test to exercise the affected code.
112 * tests/sort/Test.pm (realloc-buf): Exercise the code that changed
113 yesterday. No other test in all of "make check" does this.
114 * NEWS: Mention the fix.
116 2007-07-23 Paul Eggert <eggert@cs.ucla.edu>
118 sort: avoid unaligned access.
119 * src/sort.c (fillbuf): When enlarging the line buffer, ensure that
120 the new size is a multiple of "sizeof (struct line)". This avoids
121 alignment problems when indexing from the end of the buffer.
122 Problem reported by Andreas Schwab in
123 <http://lists.gnu.org/archive/html/bug-coreutils/2007-07/msg00158.html>.
125 2007-07-23 Jim Meyering <jim@meyering.net>
127 Update all copyright notices to use the newer form (e.g., remove
128 the postal address, and add the 'licenses' URL).
130 * COPYING: Update to Version 3.
132 Update c99/c89 patch for new, copyright-change-induced offsets.
133 * Makefile.maint (patch-check): Filter out '^Only in...' lines.
134 * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
136 2007-07-22 Jim Meyering <jim@meyering.net>
138 * configure.ac: Arrange to rerun configure whenever src/Makefile.am
139 changes. That file contains the list of program names that must be
140 substituted into files like man/Makefile.
141 Add quotes around AC_SUBST arguments.
143 2007-07-21 Paul Eggert <eggert@cs.ucla.edu>
145 * bootstrap (slurp): Work even in environments where "ls" defaults
146 to "ls -A". Put in a FIXME, though, since the current code does
147 not slurp files whose names start with ".", and this looks like
148 it might be a troublesome area.
150 2007-07-20 Jim Meyering <jim@meyering.net>
152 Document and add a test for today's sort bug fix.
153 * NEWS: Describe the bug fix.
154 * tests/sort/Test.pm (obs-inval): Add a test for today's fix.
156 2007-07-20 Andreas Schwab <schwab@suse.de>
158 * src/sort.c (main): Don't free a pointer to non-malloc'd memory.
160 2007-07-19 Jim Meyering <jim@meyering.net>
162 Fix a portability bug in the new ls-color test.
163 * tests/ls/stat-free-symlinks: Don't rely on the ability of
164 a built-in printf to interpolate '\e'. Use '\033' instead.
166 2007-07-18 Jim Meyering <jim@meyering.net>
168 "cp -i --update older newer" no longer prompts; same for mv
169 * src/copy.c (copy_internal): Perform "update" check before the
170 possible interactive prompt. Reported by zeno_AT_biyg_DOT_org
171 in <http://bugzilla.redhat.com/248591>
172 * tests/mv/update: Add tests for the above.
173 * NEWS: Mention the bug fix.
175 2007-07-15 Jim Meyering <jim@meyering.net>
177 ls --color: Don't stat symlinks when neither ORPHAN nor MISSING
178 attribute has a color.
179 * src/ls.c (main): Don't set check_symlink_color when C_EXEC is
180 colored, unless ln=target (aka color_symlink_as_referent) is set.
181 (gobble_file): Set f->linkok = true also when !check_symlink_color.
182 http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10608/focus=10927
183 Reported by Jeremy Maitin-Shepard.
184 * tests/strace: New file, contents extracted from...
185 * tests/mv/atomic: ...here. Source strace.
186 * tests/ls/stat-free-symlinks: New file. Test for the above.
187 Use strace to ensure that in this corner case, ls does not call stat.
188 * tests/ls/Makefile.am (TESTS): Add stat-free-symlinks.
189 * tests/Makefile.am (EXTRA_DIST): Add strace.
191 2007-07-14 Jim Meyering <jim@meyering.net>
193 Remove long-deprecated options.
194 * NEWS: Mention this.
195 * src/df.c, src/ls.c: Remove --kilobytes option.
196 * src/du.c: Remove --kilobytes and --megabytes options.
197 * src/who.c: Remove -i and --idle options.
198 * src/ptx.c: Remove --copyright option.
200 Change interface: make 2nd param _space_-separated, not comma-separated
201 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Remove now-
202 unnecessary use of tr.
204 * configure.ac: Adjust caller, as well as the code that ensures the
205 2nd parameter stays in sync with the list in src/Makefile.am.
207 2007-07-14 Karel Zak <kzak@redhat.com>
209 * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix typo: s/$2/$1/.
210 (gl_INCLUDE_EXCLUDE_PROG): Quote first use of $2 parameter.
211 Don't mix comma- and space-separated lists.
212 Patch from Karel Zak.
214 2007-07-13 Jim Meyering <jim@meyering.net>
216 Warn about non-portable use of unescaped backslash at end of string,
217 and treat it as if it were escaped.
218 * src/tr.c (unquote): Considering that such usage would make GNU tr
219 from coreutils-5.2.1 and earlier *fail*, the least we can do now is
220 to warn about it. Solaris' tr ignores it.
221 * NEWS: Mention this.
223 Use proper backslash-quoting inside backticks.
224 * configure.ac: Otherwise we run afoul of strict GNU tr:
225 a string ending in a lone backslash would provoke a failure.
227 2007-07-12 Jim Meyering <jim@meyering.net>
229 Expand default-no-install prog list in ./configure --help output,
230 and fix some []-quoting bugs in sed expressions.
231 * configure.ac: Hard-code the list, "arch,su" here as well
232 as in src/Makefile.am, and ensure the two stay in sync.
233 * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Use $2,
234 rather than the nearly-equivalent shell variable.
235 Karel Zak reported that ./configure --help's output included
236 the literal string, $gl_no_install_progs_default.
238 Clean up include-exclude-prog.m4.
239 * m4/include-exclude-prog.m4 (gl_ADD_PROG): Don't modify MAN.
240 (gl_REMOVE_PROG): Likewise.
241 Add omitted "\>" in sed regexp.
242 Remove any leading or trailing spaces.
243 (gl_ADD_PROG): Remove any leading space.
244 * configure.ac: Instead, derive $MAN from $optional_bin_progs.
245 Append $(EXEEXT) to *all* names, not just the first one.
247 2007-07-11 Jim Meyering <jim@meyering.net>
249 If there's a GPL vN copyright comment, require that N == 3.
250 * Makefile.maint (sc_GPL_version): New rule.
251 * tests/misc/arch: Fix the sole violation.
253 2007-07-10 Jim Meyering <jim@meyering.net>
255 Skip "arch" test if it's not built.
256 * tests/misc/Makefile.am (built_programs): Define.
257 (TESTS_ENVIRONMENT): Add $(built_programs), for...
258 * tests/misc/arch: ...this: skip the test if arch is not built.
259 * src/Makefile.am (built_programs.list): New rule.
260 * tests/Makefile.am (built_programs): Rename from all_programs.
261 (TESTS_ENVIRONMENT): Use built_programs, not all_programs.
262 * tests/help-version: Likewise.
263 * NEWS: Mention that using --enable-no-install-program=X may
264 cause "make check" to fail.
266 Add support for enabling/disabling installation of specified programs.
267 * NEWS: Mention new configure-time options.
268 Mention that neither arch nor su is built/installed, by default.
269 * m4/include-exclude-prog.m4: New file.
270 * configure.ac: Use new macro, gl_ADD_PROG, rather than
271 manually appending to OPTIONAL_BIN_PROGS and MAN.
272 Move the code that adds "df" to the list of programs to build from
273 m4/jm-macros into this file.
274 Use gl_INCLUDE_EXCLUDE_PROG, then handle special cases: ginstall, [.
275 (NO_INSTALL_PROGS_DEFAULT): AC_SUBST it. Used by man/Makefile.am.
276 * man/Makefile.am (dist_man_MANS): Remove from this list all man pages
277 corresponding to "bin" programs. Add $(MAN) instead.
278 (optional_mans): Remove all uses.
279 (check-x-vs-1): Adapt to work even though arch and su are typically
280 no longer built (and neither are their .1 files).
281 * src/Makefile.am (install_su): Rename from INSTALL_SU, now that
282 INSTALL_SU has a different meaning. Use the new $(INSTALL_SU) value.
284 2007-07-10 Karel Zak <kzak@redhat.com>
287 * NEWS: Mention arch.
288 * README: Add arch to the list of programs.
290 * src/uname.c: Include "uname.h".
291 (PROGRAM_NAME): Handle arch, too.
292 (ARCH_AUTHORS): Define.
293 (uname_long_options, arch_long_options): Renamed and new globals.
294 (usage): Handle arch-mode as well as uname-mode.
295 (decode_switches): New function, extracted from main,
296 to handle arch-mode as well as uname-mode.
297 (main): Handle both modes.
298 * src/uname-arch.c: New program, alias for "uname -m".
299 * src/uname-uname.c: New file, default uname mode.
300 * src/uname.h: New file, uname modes.
301 * src/Makefile.am (EXTRA_PROGRAMS): Add arch.
302 (uname_SOURCES, arch_SOURCES): Define.
303 * man/arch.x: New file.
304 * man/Makefile.am (dist_man_MANS): Add arch.1.
305 (arch.1): New dependency.
306 * tests/misc/arch: New test, compare "arch" with "uname -m"
307 * configure.ac (OPTIONAL_BIN_PROGS): Add arch.
309 * .x-sc_require_config_h: Exempt uname-arch.c and uname-uname.c
310 from the always-include-<config.h> rule.
312 2007-07-10 Jim Meyering <jim@meyering.net>
314 Change "version 2" to "version 3" in all copyright notices.
316 2007-07-09 Jim Meyering <jim@meyering.net>
318 Compensate for new c99'isms in seq.c.
319 * Makefile.maint (patch-check): Use -p1, not -p2, so a patch
320 generated via "make patch-check REGEN=1" actually works.
321 * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
323 2007-07-09 Pádraig Brady <P@draigBrady.com>
325 Fix the automatic number width formatting in seq.
326 * src/seq.c: Fix the -w logic. Ignore spaces and '+'
327 characters of input numbers when determining width.
328 Set format correctly for input numbers in scientific notation.
329 * tests/seq/basic: Add various number width tests.
330 Details: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10903>
332 2007-07-08 Jim Meyering <jim@meyering.net>
334 Run the coreutils-specific code only if tests/Makefile.am.in exists.
335 * bootstrap (mam_template): Move definition out of loop.
337 Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
338 * bootstrap (symlink_to_dir): Rename function from symlink_to_gnulib.
339 Add a directory parameter. Update all callers.
340 (cp_mark_as_generated): Also check for -- and link to -- files in gl/.
342 * THANKS: Add Pádraig Brady.
344 2007-07-08 Jim Meyering <jim@meyering.net>
346 Adapt to deeper hierarchy in gnulib.
347 * bootstrap (symlink_to_dir): If the destination directory doesn't
348 exist, create it. This is required at least for "lib/uniwidth/cjk.h".
350 Use <wchar.h>, not "wcwidth.h".
351 * src/wc.c: Now that gnulib provides the POSIX-specified <wchar.h>,
352 include it and <wctype.h>, rather than "wcwidth.h".
353 * src/ls.c: Include <wchar.h>, rather than "wcwidth.h".
355 2007-07-05 Jim Meyering <jim@meyering.net>
357 setuidgid: set all groups, not just the primary one.
358 I wanted to use the xgetgroups function from id.c, so factored
359 it out and made it into a non-exiting function (hence the "m"
360 prefix rather than "x").
361 * src/setuidgid.c (main): Use mgetgroups.
362 Include "mgetgroups.h".
364 * src/id.c (xgetgroups): Remove function.
365 Include "mgetgroups.h".
366 (print_group_list): Use mgetgroups, not xgetgroups.
368 * gl/modules/mgetgroups: New module.
369 * gl/lib/mgetgroups.c: New file. mgetgroups is derived from
370 id.c's xgetgroups function.
371 * bootstrap.conf (gnulib_modules): Add mgetgroups.
372 * gl/m4/mgetgroups.m4: New file.
373 * gl/lib/mgetgroups.h: New file.
375 * bootstrap: Merge in changes from gnulib.
377 * src/id.c: Include "getugroups.h" rather than declaring manually.
379 2007-07-04 Paul Eggert <eggert@cs.ucla.edu>
381 * NEWS: pr -F no longer suppresses the footer or the first two blank
383 * doc/coreutils.texi (pr invocation): Likewise. Also, a too-short
384 page length implies -t, not -T.
385 * src/pr.c (lines_per_header, lines_per_footer): Now constants.
386 (init_parameters): Don't try to change them.
387 (print_header): Use the same header and footer format regardless of
388 wither form feeds are being used.
389 (usage): Adjust to above change when describing too-short page length.
390 Too-short page length impliesy -t, not -T.
391 * tests/pr/2-S_f-t_notab: Adjust to the fact that -F now affects
392 only formfeed handling; it does not change the header.
393 * tests/pr/2-Sf-t_notab: Likewise.
394 * tests/pr/2f-t_notab: Likewise.
395 * tests/pr/2s_f-t_notab: Likewise.
396 * tests/pr/2s_w60f-t_nota: Likewise.
397 * tests/pr/2sf-t_notab: Likewise.
398 * tests/pr/2sw60f-t_notab: Likewise.
399 * tests/pr/2w60f-t_notab: Likewise.
400 * tests/pr/3a3f-0F: Likewise.
401 * tests/pr/3b3f-0F: Likewise.
402 * tests/pr/3b3f-0FF: Likewise.
403 * tests/pr/3b3f-FF: Likewise.
404 * tests/pr/3f-0F: Likewise.
405 * tests/pr/3f-FF: Likewise.
406 * tests/pr/Test.pm: Likewise.
407 * tests/pr/a3f-0F: Likewise.
408 * tests/pr/a3f-0FF: Likewise.
409 * tests/pr/a3f-FF: Likewise.
410 * tests/pr/b3f-0F: Likewise.
411 * tests/pr/b3f-0FF: Likewise.
412 * tests/pr/b3f-FF: Likewise.
413 * tests/pr/3-5l17f-t: Remove, since it's been renamed to another
414 file whose name has a line count 7 larger,
415 reflecting the new line count needed for this behavior.
416 * tests/pr/3a3l8f-t: Likewise.
417 * tests/pr/3b3l8f-t: Likewise.
418 * tests/pr/3l17f-t: Likewise.
419 * tests/pr/3ml17f-t: Likewise.
420 * tests/pr/Ja3l17f-lm: Likewise.
421 * tests/pr/Jb3l17f-lm: Likewise.
422 * tests/pr/Jml17f-lm-lo: Likewise.
423 * tests/pr/W-72l17f-ll: Likewise.
424 * tests/pr/W20l17f-ll: Likewise.
425 * tests/pr/W26l17f-ll: Likewise.
426 * tests/pr/W27l17f-ll: Likewise.
427 * tests/pr/W28l17f-ll: Likewise.
428 * tests/pr/W35Ja3l17f-lm: Likewise.
429 * tests/pr/W35Jb3l17f-lm: Likewise.
430 * tests/pr/W35Jml17f-lmlo: Likewise.
431 * tests/pr/W35a3l17f-lm: Likewise.
432 * tests/pr/W35b3l17f-lm: Likewise.
433 * tests/pr/W35ml17f-lm-lo: Likewise.
434 * tests/pr/W72Jl17f-ll: Likewise.
435 * tests/pr/a3l17f-lm: Likewise.
436 * tests/pr/a3l8f-t: Likewise.
437 * tests/pr/b3l17f-lm: Likewise.
438 * tests/pr/b3l8f-t: Likewise.
439 * tests/pr/l17f-t: Likewise.
440 * tests/pr/ml17f-0F: Likewise.
441 * tests/pr/ml17f-lm-lo: Likewise.
442 * tests/pr/ml17f-t: Likewise.
443 * tests/pr/ml17f-t-0F: Likewise.
444 * tests/pr/n+2-5l17f-0FF: Likewise.
445 * tests/pr/n+2l17f-0FF: Likewise.
446 * tests/pr/n+2l17f-bl: Likewise.
447 * tests/pr/n+3l17f-0FF: Likewise.
448 * tests/pr/n+3l17f-bl: Likewise.
449 * tests/pr/n+3ml13f-bl-FF: Likewise.
450 * tests/pr/n+3ml17f-bl-tn: Likewise.
451 * tests/pr/n+3ml17f-tn-bl: Likewise.
452 * tests/pr/n+4b2l10f-0FF: Likewise.
453 * tests/pr/n+5-8b3l10f-FF: Likewise.
454 * tests/pr/n+5a3l6f-0FF: Likewise.
455 * tests/pr/n+6b3l6f-FF: Likewise.
456 * tests/pr/nJml17f-lmlmlo: Likewise.
457 * tests/pr/nJml17f-lmlolm: Likewise.
458 * tests/pr/nN1+3l17f-bl: Likewise.
459 * tests/pr/nN15l17f-bl: Likewise.
460 * tests/pr/nSml13-bl-FF: Likewise.
461 * tests/pr/nSml13-t-t-FF: Likewise.
462 * tests/pr/nSml13-t-tFFFF: Likewise.
463 * tests/pr/nSml17-bl-FF: Likewise.
464 * tests/pr/nSml17-t-t-FF: Likewise.
465 * tests/pr/nSml17-t-tFFFF: Likewise.
466 * tests/pr/nl17f-bl: Likewise.
467 * tests/pr/o3Jml17f-lm-lo: Likewise.
468 * tests/pr/o3a3Sl17f-tn: Likewise.
469 * tests/pr/o3a3Snl17f-tn: Likewise.
470 * tests/pr/o3a3l17f-tn: Likewise.
471 * tests/pr/o3b3Sl17f-tn: Likewise.
472 * tests/pr/o3b3Snl17f-tn: Likewise.
473 * tests/pr/o3b3l17f-tn: Likewise.
474 * tests/pr/o3mSl17f-bl-tn: Likewise.
475 * tests/pr/o3mSnl17fbltn: Likewise.
476 * tests/pr/o3ml17f-bl-tn: Likewise.
477 * tests/pr/w72l17f-ll: Likewise.
478 * tests/pr/3-5l24f-t: New file, containing the contents of the
479 file with the same name but with the line count smaller by 7,
480 reflecting the new behavior with -F.
481 * tests/pr/3a3l15f-t: Likewise.
482 * tests/pr/3b3l15f-t: Likewise.
483 * tests/pr/3l24f-t: Likewise.
484 * tests/pr/3ml24f-t: Likewise.
485 * tests/pr/Ja3l24f-lm: Likewise.
486 * tests/pr/Jb3l24f-lm: Likewise.
487 * tests/pr/Jml24f-lm-lo: Likewise.
488 * tests/pr/W-72l24f-ll: Likewise.
489 * tests/pr/W20l24f-ll: Likewise.
490 * tests/pr/W26l24f-ll: Likewise.
491 * tests/pr/W27l24f-ll: Likewise.
492 * tests/pr/W28l24f-ll: Likewise.
493 * tests/pr/W35Ja3l24f-lm: Likewise.
494 * tests/pr/W35Jb3l24f-lm: Likewise.
495 * tests/pr/W35Jml24f-lmlo: Likewise.
496 * tests/pr/W35a3l24f-lm: Likewise.
497 * tests/pr/W35b3l24f-lm: Likewise.
498 * tests/pr/W35ml24f-lm-lo: Likewise.
499 * tests/pr/W72Jl24f-ll: Likewise.
500 * tests/pr/a3l15f-t: Likewise.
501 * tests/pr/a3l24f-lm: Likewise.
502 * tests/pr/b3l15f-t: Likewise.
503 * tests/pr/b3l24f-lm: Likewise.
504 * tests/pr/l24f-t: Likewise.
505 * tests/pr/ml24f-0F: Likewise.
506 * tests/pr/ml24f-lm-lo: Likewise.
507 * tests/pr/ml24f-t: Likewise.
508 * tests/pr/ml24f-t-0F: Likewise.
509 * tests/pr/n+2-5l24f-0FF: Likewise.
510 * tests/pr/n+2l24f-0FF: Likewise.
511 * tests/pr/n+2l24f-bl: Likewise.
512 * tests/pr/n+3l24f-0FF: Likewise.
513 * tests/pr/n+3l24f-bl: Likewise.
514 * tests/pr/n+3ml20f-bl-FF: Likewise.
515 * tests/pr/n+3ml24f-bl-tn: Likewise.
516 * tests/pr/n+3ml24f-tn-bl: Likewise.
517 * tests/pr/n+4b2l17f-0FF: Likewise.
518 * tests/pr/n+5-8b3l17f-FF: Likewise.
519 * tests/pr/n+5a3l13f-0FF: Likewise.
520 * tests/pr/n+6b3l13f-FF: Likewise.
521 * tests/pr/nJml24f-lmlmlo: Likewise.
522 * tests/pr/nJml24f-lmlolm: Likewise.
523 * tests/pr/nN1+3l24f-bl: Likewise.
524 * tests/pr/nN15l24f-bl: Likewise.
525 * tests/pr/nSml20-bl-FF: Likewise.
526 * tests/pr/nSml20-t-t-FF: Likewise.
527 * tests/pr/nSml20-t-tFFFF: Likewise.
528 * tests/pr/nSml24-bl-FF: Likewise.
529 * tests/pr/nSml24-t-t-FF: Likewise.
530 * tests/pr/nSml24-t-tFFFF: Likewise.
531 * tests/pr/nl24f-bl: Likewise.
532 * tests/pr/o3Jml24f-lm-lo: Likewise.
533 * tests/pr/o3a3Sl24f-tn: Likewise.
534 * tests/pr/o3a3Snl24f-tn: Likewise.
535 * tests/pr/o3a3l24f-tn: Likewise.
536 * tests/pr/o3b3Sl24f-tn: Likewise.
537 * tests/pr/o3b3Snl24f-tn: Likewise.
538 * tests/pr/o3b3l24f-tn: Likewise.
539 * tests/pr/o3mSl24f-bl-tn: Likewise.
540 * tests/pr/o3mSnl24fbltn: Likewise.
541 * tests/pr/o3ml24f-bl-tn: Likewise.
542 * tests/pr/w72l24f-ll: Likewise.
544 2007-06-23 Jim Meyering <jim@meyering.net>
546 Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0.
547 * src/base64.c (main): Likewise.
548 * src/install.c (setdefaultfilecon): Likewise.
549 * src/sort.c (main): Likewise.
550 * Makefile.maint (sc_prohibit_strcmp): New rule.
551 * .x-sc_prohibit_strcmp: New file, to list the few exceptions.
552 * Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp.
554 2007-06-22 Paul Eggert <eggert@cs.ucla.edu>
556 * NEWS: seq no longer mishandles obvious cases like
557 "seq 0 0.000001 0.000003" by omitting the last output number.
558 * doc/coreutils.texi (seq invocation): Remove advice about workaround
559 for seq off-by-one problem, since the bug is fixed now. Replace
560 it with more-generic advice about rounding errors.
561 * src/seq.c (long_double_format, print_numbers):
562 New arg NUMERIC_FORMAT. All uses changed.
564 2007-06-22 Pádraig Brady <P@draigBrady.com> (trivial change)
566 * tests/seq/basic: Add test cases for seq off-by-one problem.
568 2007-06-22 Jim Meyering <jim@meyering.net>
570 * src/stat.c (long_options): Add a FIXME comment to help ensure
571 that the deprecated and undocumented "--filesystem" option is
574 2007-06-18 Paul Eggert <eggert@cs.ucla.edu>
576 A few more symlink-related fixes. Fix a bug triggered by cp
577 --parents and symlinks. Close some race conditions possible when
578 the destination replaces a newly-created file with a symlink.
579 * NEWS: Document that 'cp --parents' no longer mishandles
580 symlinks in file name components of source.
581 * src/copy.c (HAVE_LCHOWN): Default to false.
582 (lchown) [!defined HAVE_LCHOWN]: Define to chown, for convenience.
583 * src/cp.c (lchown) [!HAVE_LCHOWN]: Likewise.
584 * src/install.c (lchown [!HAVE_LCHOWN]: Likewise.
585 * src/copy.c (set_owner): Use lchown instead of chown, for safety
586 in case the file got replaced by a symlink in the meantime.
587 * src/cp.c (re_protect): Likewise.
588 * src/install.c (change_attributes): Likewise.
589 * src/copy.c (copy_internal): Use ordinary C rather than an #if.
590 * src/cp.c (lchown) [!HAVE_LCHOWN]: Define to chown, for convenience.
591 (struct dir_attr): Cache the entire struct stat of the directory,
592 rather than just its mode, so that we needn't stat the directory
593 twice (which can lead to races).
594 (re_protect): Don't use XSTAT as that's not appropriate in
595 this context (symlinks should be followed here). Instead, use
596 the cached stat value.
597 (make_dir_parents_private): Save dir's entire struct stat, not
599 * tests/cp/cp-parents: Add test to check against bug with
600 cp --parents and symlinks.
602 2007-06-18 Jim Meyering <jim@meyering.net>
604 Use mreadlink_with_size (doesn't exit), not xreadlink_with_size.
605 * bootstrap.conf (gnulib_modules): Add readlink-with-size.
606 Remove xreadlink and xreadlink-with-size.
607 * src/copy.c (copy_internal): Use mreadlink_with_size,
608 not xreadlink_with_size.
609 * src/ls.c (get_link_name): Likewise.
610 * src/readlink.c (main): Likewise.
611 * src/stat.c (print_stat): Likewise.
613 * README-hacking: Don't mention Gzip 1.2.4, now that 1.3.12 is out.
615 2007-06-16 Jim Meyering <jim@meyering.net>
617 Make chgrp and chown diagnostics consistent.
618 * src/chown.c (main): Emit the diagnostic before the file name,
619 not after it, to be consistent with chgrp's diagnostic.
620 * src/chgrp.c (parse_group): Emit a ":" between the diagnostic
622 Reported by Egmont Koblinger.
623 * THANKS: Add Egmont Koblinger.
625 2007-06-15 Paul Eggert <eggert@cs.ucla.edu>
627 Correct cp's handling of destination symlinks in some cases.
628 * NEWS: "cp" no longer considers a destination symlink to be the
629 same as the referenced file when copying links or making backups.
630 * src/copy.c (copy_reg): When following a symlink, use the
631 followed name in later chown etc. requests, so that the created
632 file is affected, rather than the symlink. Use O_NOFOLLOW on
633 source when not dereferencing symlinks; this avoids a race.
634 Preserve errno correctly when doing multiple open attempts on the
636 (copy_internal): Follow destination symlinks only when copying a
637 regular file and only when we don't intend to remove or rename the
638 destination first, regardless of whether following source
639 symlinks; this is because since POSIX and tradition (e.g.,
640 FreeBSD) say we should ordinarily follow destination symlinks if
641 the system calls would ordinarily do so.
642 * src/copy.h (struct cp_options): Add comment that 'dereference'
643 is only for source files.
644 * src/cp.c (usage): Note that --derereference etc. are only for
646 (make_dir_parents_private): Follow symlinks, regardless of whether
647 --dereference is specified, because these are destination symlinks.
648 * tests/cp/same-file: Adjust tests to match revised behavior.
649 Filter out perror output since it might vary from host to host.
650 Use sed alone instead of also using echo.
652 * doc/coreutils.texi (cp invocation): Document the behavior better when
653 the destination is a symlink. Clarify source versus destination
654 symlinks. Describe the new behavior for destination symlinks.
656 2007-06-15 Jim Meyering <jim@meyering.net>
658 * src/copy.c: Include "canonicalize.h".
659 (copy_reg): Use canonicalize_filename_mode to follow the symlink,
660 so that we can always open with O_EXCL and avoid a race.
662 2007-06-15 Jim Meyering <jim@meyering.net>
664 Don't include "quote.h" when it is not used.
665 * src/md5sum.c: Remove unnecessary inclusion of "quote.h".
666 * src/expr.c: Likewise.
667 * src/shred.c: Likewise.
668 * Makefile.maint (sc_prohibit_quote_without_use): New rule.
669 * src/c99-to-c89.diff: Adjust offsets.
671 2007-06-14 Paul Eggert <eggert@cs.ucla.edu>
673 Clarify what "cat" documentation means by "blank" lines.
674 * doc/coreutils.texi (cat invocation): "Blank" lines actually mean
676 * src/cat.c (usage): Say that "nonblank" means nonempty. Clarify
679 2007-06-13 Jim Meyering <jim@meyering.net>
681 rmdir: give better diagnostics
682 * src/rmdir.c (remove_parents): Give a more descriptive/consistent
683 diagnostic upon failure.
685 Suggestion from Joey Hess.
686 * THANKS: Add Joey Hess.
688 Don't include "quotearg.h" when it is not used.
689 * Makefile.maint (sc_prohibit_quotearg_without_use): New rule.
690 * src/cp.c: Don't include "quotearg.h". It wasn't used.
692 * README-hacking: List Gperf as a build-requirement, too.
693 Reported by Steve Ward.
695 2007-06-11 Jim Meyering <jim@meyering.net>
697 * README: Mention README-hacking, for whose who start from
698 cloned/checked-out sources rather than from a distribution tarball.
699 Reported by Steve Ward.
700 * THANKS: Add Steve Ward.
702 2007-06-10 Jim Meyering <jim@meyering.net>
704 bug-fix: cp would fail to write through a dangling symlink
705 * NEWS: Mention the bug fix.
706 * src/copy.c (copy_reg): When open fails with EEXIST, the destination
707 is lstat'able, and a symlink, call open again, but now without O_EXCL.
708 * tests/cp/thru-dangling: New file, to test for the above fix.
709 * tests/cp/Makefile.am (TESTS): Add thru-dangling.
710 * THANKS: Add Michael McLagan.
711 Bug report from Michael McLagan in <http://bugzilla.redhat.com/243588>.
713 2007-06-04 Paul Eggert <eggert@cs.ucla.edu>
715 * doc/coreutils.texi (Common options): Mention that -h and
716 --human-readable are equivalent to --block-size=human-readable.
717 Documentation problem reported by Steve Ward in
718 <http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00007.html>.
719 (du invocation): Use optSi rather than duplicating the macro's
720 contents (incorrectly, since we claimed a "B" was output).
722 2007-05-31 Jim Meyering <jim@meyering.net>
724 Pull printf-related code from gnulib, rather than using forked copy.
725 * bootstrap.conf (gnulib_modules): Don't avoid size_max and xsize
726 modules. While I dislike xsize-style overflow avoidance, maintaining
727 a forked version of e.g., vasnprintf.c was too much work.
729 2007-05-29 Jim Meyering <jim@meyering.net>
731 * src/dircolors.hin: Add screen-256color.
732 Suggested by sdl.web@gmail.com in <http://bugzilla.redhat.com/239266>.
734 2007-05-26 Jim Meyering <jim@meyering.net>
736 * TODO: Add an entry for comm --output-delimiter=STR
738 2007-05-25 James Youngman <jay@gnu.org>
740 wc: ignore multibyte-character decoding errors
741 * src/wc.c (wc): Don't issue an error message when mbrtowc
742 indicates that we have seen an invalid byte sequence. This
743 makes "wc /bin/sh" bearable (though the word and line counts
744 are likely not to be useful).
745 * NEWS: Mention the change.
747 2007-05-22 Jim Meyering <jim@meyering.net>
749 Check for an up-to-date copyright year in coreutils.texi.
750 * Makefile.maint (copyright-check): Also check for an up-to-date
751 copyright year in doc/$().texi, if that file exists.
752 * doc/coreutils.texi: Add 2007 to list of Copyright years.
753 Reported by Karl Berry.
755 cut: diagnose a range starting with 0 (-f 0-2) as invalid, and
756 give a better diagnostic for a field-number/offset of 0.
757 * NEWS: Mention the fix.
758 * src/cut.c (ADD_RANGE_PAIR): Add an explicit check.
759 Based on a patch from James Youngman.
760 * tests/misc/cut: Add tests for the above.
762 "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
763 Also, diagnose the '-' in "cut -f -" as an invalid range, rather
764 than interpreting it as the unlimited range, "1-".
765 * NEWS: Mention these changes.
766 * src/cut.c (set_fields): Don't interpret an accumulator "value"
767 of 0 as an unspecified range endpoint.
768 Give better diagnostics.
769 Adjust a comment so that it is true also for 64-bit size_t.
771 * tests/cut/Test.pm: Add tests for the above.
773 stty: fix a harmless syntax nit
774 * src/stty.c (visible): Use ";" as the statement terminator
775 between two assignments, not ",".
776 (integer_arg): Join an unnecessarily wrapped line.
778 2007-05-20 Jim Meyering <jim@meyering.net>
780 stty: diagnose an invalid hex value in 35-colon commmand-line argument
781 * NEWS: Mention this.
782 * src/stty.c (strtoul_tcflag_t, strtoul_cc_t): New functions.
783 (recover_mode): Use those functions (not sscanf), to parse the
785 * tests/stty/invalid: New file. Test for the above.
786 * tests/stty/Makefile.am (TESTS): Add invalid.
787 * .x-sc_prohibit_atoi_atof: Don't exempt stty.c from this check.
788 Add tests/stty/invalid so we don't have to obfuscate the comment
789 about sscanf therein.
790 * Makefile.maint (sc_prohibit_atoi_atof): Mention sscanf in the
793 * TODO: Remove some now-completed or no longer relevant items.
795 2007-05-19 Jim Meyering <jim@meyering.net>
797 Rename uses of futimens -> gl_futimens; glibc now declares the former.
798 * src/copy.c (copy_reg): Reflect renaming: futimens -> gl_futimens.
799 * src/touch.c (touch): Likewise.
801 2007-05-18 Jim Meyering <jim@meyering.net>
803 * Makefile.maint (my-distcheck): Remove -pedantic from $(CFLAGS)
804 for now, to avoid c89-check failure due to use of #include_next.
806 2007-05-15 Jim Meyering <jim@meyering.net>
808 Generate a dozen test-related Makefile.am files at bootstrap-time.
809 * README-hacking: Build-from-checkout now require Perl, too.
810 * bootstrap: Now that these generated Makefile.am files are no longer
811 under version control, they must be created at bootstrap time.
813 2007-05-14 Paul Eggert <eggert@cs.ucla.edu>
815 * man/chmod.x: Document chmod's behavior with setuid and setgid bits.
816 Remove misleading implication about leading zero. Problem
817 reported by Jan Engelhardt in
818 <http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00134.html>.
820 2007-05-13 Jim Meyering <jim@meyering.net>
822 Remove the generated tests/*/Makefile.am files from version control.
823 * tests/cut/Makefile.am: git-remove this generated file.
824 * tests/head/Makefile.am: Likewise.
825 * tests/join/Makefile.am: Likewise.
826 * tests/pr/Makefile.am: Likewise.
827 * tests/sort/Makefile.am: Likewise.
828 * tests/tac/Makefile.am: Likewise.
829 * tests/tail/Makefile.am: Likewise.
830 * tests/test/Makefile.am: Likewise.
831 * tests/tr/Makefile.am: Likewise.
832 * tests/uniq/Makefile.am: Likewise.
833 * tests/wc/Makefile.am: Likewise.
834 * .cvsignore, .gitignore: Ignore these generated files.
836 * src/.cvsignore, src/.gitignore: Add chcon here, ...
837 * .cvsignore, .gitignore: ... not here.
839 Test uniq's new --zero-terminated (-z) option.
840 * tests/uniq/Test.pm: When possible, create a "-z"-testing variant
841 of each existing test.
842 (2z, 3z, 4z, 5z, 20z, 122, 123): New tests from James Youngman.
844 2007-05-12 James Youngman <jay@gnu.org>
846 Add -z option to uniq. Originally proposed by Egmont Koblinger.
847 * NEWS: Mention uniq's new option: --zero-terminated (-z).
848 * src/uniq.c: Add new option, --zero-terminated (-z), to make
849 uniq use the NUL byte as separator/delimiter rather than newline.
850 (check_file): Add a parameter: delimiter. Update caller.
851 Use readlinebuffer_delim in place of readlinebuffer everywhere.
852 (main): Handle the new option.
853 (usage): Describe new option the same way sort does.
854 * doc/coreutils.texi (uniq invocation): Describe the new option.
856 2007-05-07 Jim Meyering <jim@meyering.net>
858 * NEWS: Mention that last week's tr bug dates back to 1992.
860 2007-05-04 Jim Meyering <jim@meyering.net>
862 Avoid test failure when run with an unusual umask.
863 * tests/ls/color-dtype-dir: Set umask to 022.
864 Suggestion from AIDA Shinra.
866 Avoid failure of root-only test when run with a restrictive umask.
867 * tests/rm/no-give-up: Ensure that non-root can access "d/" through
868 root-owned ".". Reported by AIDA Shinra.
870 tr -c: don't abort when translating with S2 larger than complement of S1
871 * src/tr.c (main): Remove invalid assertion triggered by e.g.,
872 tr -c a '[b*256]'. There's nothing wrong with having Set2 larger
873 than Set1. Reported by Guntram Blohm.
874 * tests/tr/Test.pm (no-abort-1): Test for the above.
875 * NEWS: Mention this bug fix.
876 * THANKS: Add Guntram Blohm.
878 2007-05-03 Jim Meyering <jim@meyering.net>
880 Avoid test failure when run with a permissive umask.
881 * tests/rm/no-give-up: Set permissions of test directory properly,
882 i.e., not depending on umask prohibiting go=w.
883 Reported by AIDA Shinra.
885 2007-05-02 Paul Eggert <eggert@cs.ucla.edu>
887 The following commands and options now support the standard size
888 suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y:
889 head -c, head -n, od -j, od -N, od -S, split -b, split -C,
891 * doc/coreutils.texi (od invocation, head invocation, tail invocation):
892 Document support for new size suffixes.
893 (head invocation, tail invocation):
894 Document that -n uses the same suffixes as -c.
895 (tail invocation): More-clearly document what leading "+" does.
896 * src/head.c (usage, string_to_integer): Support new suffixes.
897 * src/od.c (usage, main): Likewise.
898 * src/split.c (usage, main): Likewise.
899 * src/tail.c (usage, parse_options): Likewise.
900 Prompted by a patch from Evan Hunt.
902 2007-05-02 Jim Meyering <jim@meyering.net>
904 * src/du.c (usage): Tweak description of --dereference-args (-D) again.
905 Prompted by another request for clarification from Justin Pryzby.
907 Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.
908 * tests/rm/fail-2eperm: Patch from AIDA Shinra.
909 Reported by Peter Dyballa.
910 * THANKS: Add AIDA Shinra and Peter Dyballa.
912 2007-04-28 Paul Eggert <eggert@cs.ucla.edu>
914 * src/nohup.c (usage): Describe how standard input and output
917 2007-04-25 Jim Meyering <jim@meyering.net>
919 * src/du.c (usage): Clarify description of --dereference-args (-D).
920 Prompted by a report from Justin Pryzby.
922 * bootstrap.conf (gnulib_modules): Add fseeko and ftello.
923 (gnulib_modules): Add autobuild.
925 2007-04-24 Jim Meyering <jim@meyering.net>
927 * THANKS: Add Andreas Frische.
928 * NEWS: Mention today's ls --color fix.
929 * tests/ls-2/tests (sl-dangle): Add a test for today's fix.
931 2007-04-24 Eric Blake <ebb9@byu.net>
933 ls --color once again colors dangling symlinks correctly
934 * src/ls.c (gobble_file): Much like the 2007-04-07 fix,
935 add a term to the expression that decides whether we need
936 stat and/or lstat calls. Reported by Andreas Frische.
938 2007-04-16 Jim Meyering <jim@meyering.net>
940 * src/cut.c (usage): Adjust synopsis to show that an OPTION is required.
941 Reported by Rudolf Kastl.
942 * THANKS: Add Rudolf Kastl.
944 2007-04-11 Paul Eggert <eggert@cs.ucla.edu>
946 split --line-bytes=N (-C N): don't create an empty file.
947 * src/split.c (line_bytes_split): Don't create an empty line
948 afterwards if the last buffer happens to be exactly full.
949 * tests/misc/split-fail: Add a test case for this.
950 * NEWS: mention this.
952 2007-04-10 Jim Meyering <jim@meyering.net>
954 ls: don't form or compute the length of strings that won't be used.
955 * src/ls.c (gobble_file): Form and compute length of strings for
956 block size, owner, group, author, major+minor numbers and file size
957 only if they'll actually be used. I.e., don't form most of them
958 when not producing long format output.
960 2007-04-07 Jim Meyering <jim@meyering.net>
962 Add a test for, and document, today's fix.
963 * NEWS: Mention today's ls --color fix.
964 * tests/ls-2/tests (sl-target): Add a test for today's fix.
965 * THANKS: Add Kirk Kelsey.
967 2007-04-07 Eric Blake <ebb9@byu.net>
969 Fix a bug in how the LS_COLORS ln=target attribute is handled.
970 * src/ls.c (gobble_file): Use "stat" (not lstat) also when the
971 ln=target attribute applies. Reported by Kirk Kelsey.
973 2007-04-02 Jim Meyering <jim@meyering.net>
975 * src/copy.c (copy_reg): Initialize local "con", before calling
976 getfscreatecon, in case that function (or its inline stub) does
979 2007-04-01 Paul Eggert <eggert@cs.ucla.edu>
981 * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
982 ls -x DIR would sometimes output the wrong string in place of the
984 * NEWS: Mention the bug fix.
985 * tests/ls/x-option: New file.
986 * tests/ls/Makefile.am (TESTS): Add x-option.
988 gnulib moved md5 and sha1 modules into a new crypt/ directory; adapt
989 * bootstrap.conf (gnulib_modules): Adjust to gnulib's renaming of
990 md5 to crypt/md5 and sha1 to crypt/sha1.
992 2007-03-30 Jim Meyering <jim@meyering.net>
994 * NEWS: Mention these SELinux changes.
996 * ChangeLog-selinux: Remove file.
997 Move its contents into this file, removing old dates.
999 * src/runcon.c (main): Don't reorder arguments. Reported by
1000 Ulrich Drepper in <http://bugzilla.redhat.com/232652>.
1001 * tests/misc/runcon-no-reorder: New file. Test for the above.
1002 * tests/misc/Makefile.am (TESTS): Add runcon-no-reorder.
1004 * src/runcon.c (main): Remove "." at end of a diagnostic.
1006 * src/runcon.c: New program.
1007 * src/Makefile.am (bin_PROGRAMS): Add runcon.
1008 (runcon_LDADD): Define.
1009 * README: Add runcon to the list of programs.
1010 * AUTHORS: Add this: runcon: Russell Coker
1011 * tests/help-version: Add runcon as an exception.
1012 * man/Makefile.am (dist_man_MANS): Add runcon.1.
1013 (runcon.1): New dependency.
1015 mkfifo, mknod: Accept new "-Z, --context=C" option.
1016 * src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>.
1018 * src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
1020 mkdir: Accept new "-Z, --context=C" option.
1021 * src/mkdir.c: Include <selinux/selinux.h>.
1023 * src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
1025 * tests/cp/cp-a-selinux: New file. Test for the bug reported in
1026 <http://bugzilla.redhat.com/219900>.
1027 * tests/cp/Makefile.am (TESTS): Add cp-a-selinux.
1029 * tests/selinux: New file.
1030 * tests/Makefile.am (EXTRA_DIST): Add selinux.
1031 * tests/misc/selinux: Source the new script, rather than open coding it.
1033 Change how "cp -a" and "cp --preserve=context" work with SELinux.
1034 Now, cp -a attempts to preserve context, but failure to do so does
1035 not change cp's exit status. However "cp --preserve=context" is
1036 similar, but failure *does* cause cp to exit with nonzero status.
1037 * src/copy.h (struct cp_options) [require_preserve_context]: New member.
1038 * src/copy.c (copy_reg, copy_internal): Implement the above.
1039 * src/mv.c (cp_option_init): Initialize the new member.
1040 * src/install.c (cp_option_init): Likewise.
1041 * src/cp.c (cp_option_init): Likewise.
1042 (decode_preserve_arg): Set it or reset it.
1044 cp, mv, install: add SELinux support, but unlike with the Red Hat
1045 patch, mv and cp do not provide the "-Z context" option.
1046 * src/copy.c: Include <selinux/selinux.h>.
1047 (restore_default_fscreatecon): New function.
1048 (copy_reg): Make cp --preserve=context work for existing destination.
1049 (copy_internal): Likewise for new destinations.
1050 * src/copy.h (cp_options) [preserve_security_context]: New member.
1051 * src/cp.c: Include <selinux/selinux.h>.
1052 (selinux_enabled): New global.
1053 (usage): Mention new --preserve=context option.
1054 (PRESERVE_CONTEXT): Define/use.
1055 (decode_preserve_arg): Handle PRESERVE_CONTEXT.
1056 (main): Remove an obsolete comment.
1057 If --preserve=context is specified on a system without SELinux
1058 enabled, give a diagnostic and fail.
1059 * src/mv.c: Include <selinux/selinux.h>.
1060 Set x->preserve_security_context if SELinux is enabled.
1061 * src/install.c: Accept new "-Z, --context=C" option.
1062 Accept --preserve-context option (but not -P option).
1063 Accept alternate spelling: --preserve_context, for now.
1064 Include <selinux/selinux.h> and "quotearg.h".
1065 (selinux_enabled, use_default_selinux_context): New globals.
1066 (PRESERVE_CONTEXT_OPTION): Define.
1067 (cp_option_init): Default: do not preserve security context.
1068 (setdefaultfilecon): New function.
1069 (main): Honor new options.
1070 * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD):
1072 * src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.
1074 * tests/misc/selinux [VERBOSE]: Print version info for each
1075 of the tested tools, not just ls.
1077 * src/c99-to-c89.diff: Remove the ls.c patch, now that I've
1078 temporarily removed the offending c99'ism.
1080 * src/chcon.c (usage): Split a string literal that was longer than 509.
1082 * src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.
1083 Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
1085 * src/c99-to-c89.diff: Adjust offsets.
1087 * AUTHORS: Add chcon.
1089 * src/c99-to-c89.diff: Remove trailing blanks.
1091 * src/chcon.c: Don't include "dirname.h". system.h already includes it.
1093 * gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.
1095 * src/c99-to-c89.diff: Handle a new c99'ism in ls.c.
1097 * src/id.c (main): Tweak id -Z diagnostic.
1099 id: Add SELinux support: -Z option.
1100 * src/id.c (main): Apply patches from Fedora, with these changes:
1101 Remove #ifdef WITH_SELINUX.
1102 Use error (EXIT_FAILURE, not fprintf+exit(1).
1103 * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
1105 stat: Add support for SELinux in the form of a %C format directive.
1106 * src/stat.c (follow_links): Make this variable file-global.
1107 (out_file_context): New function.
1108 (print_statfs): Honor %C.
1109 (print_stat): Honor %C.
1110 (do_stat): Remove follow_links parameter.
1111 (usage): Document the two %C directives.
1112 (main): Accept -Z (though it's a no-op).
1113 * src/Makefile.am (stat_LDADD): Define.
1115 ls: Add support for SELinux and a slightly modified -Z option.
1116 I started with the patches from Red Hat.
1117 The entries below tell how the code evolved.
1119 * src/ls.c (print_long_format, print_file_name_and_frills): When
1120 there is no security context (due to getfilecon/lgetfilecon failing
1121 with e.g. ENOTSUP), print it as "?", not "".
1122 * src/ls.c (print_file_name_and_frills): Make -Z work without -l.
1123 (length_of_file_name_and_frills): Likewise.
1125 * src/ls.c: Remove the --lcontext and --scontext options.
1126 Change the way -Z, --context work so that it no longer implies -l.
1127 Thus, -Z -l will work like -lcontext and -Z without -l will work
1130 Adjust tests to reflect new 'ls -l' syntax -- affects only
1131 systems with SELinux when operating on a file with no ACL.
1132 These tests assumed that everything before the first space on
1133 each line is the 10-byte mode string. But there may also be a "+"
1134 in the 11th column, just before the space. However, note that this
1135 is not new. The same thing would have happened even without the
1136 change below, when listing a file with an ACL.
1137 * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm:
1138 * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod:
1139 * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm:
1141 Don't make compilation depend on USE_ACL. An SELinux security
1142 context counts as an "alternate access control method", so ls
1143 must output a "+" for each file with a security context.
1144 * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally.
1145 (FILE_HAS_ACL): Remove macro definition. Use f->have_acl directly.
1146 (gobble_file): Record whether a file has a security context, and
1147 update the condition used to determine whether to print the "+".
1148 (gobble_file): Call getfilecon/lgetfilecon also when
1149 format == long_format, so that we get the "+".
1151 * src/ls.c (gobble_file): Add a comment explaining why (with a
1152 security context option) ls doesn't exit nonzero due to e.g.,
1153 getfilecon failing with errno == ENOTSUP.
1155 * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due
1158 * src/ls.c (gobble_file): Factor out three small blocks using
1159 getfilecon and lgetfilecon.
1160 Don't ignore return value from getfilecon and lgetfilecon.
1162 * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C
1164 (print_scontext_format): Likewise.
1165 (print_scontext): Declare to be "bool", not int. Adjust uses.
1167 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX).
1169 * tests/misc/chcon: New file.
1170 * tests/misc/chcon-fail: New file.
1171 * tests/Makefile.am (check-root): Run new, root-only misc/chcon test.
1172 * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail.
1174 * tests/misc/Makefile.am (TESTS): Add selinux.
1175 * tests/misc/selinux: New file.
1176 * tests/help-version: Skip chcon.
1177 * man/chcon.x: New file.
1178 * man/Makefile.am: Build chcon.1.
1181 * gl/modules/selinux-at: New module. Check for libselinux and set
1182 LIB_SELINUX here, unconditionally, rather than depending on
1183 the configure-time --enable-selinux option.
1184 * gl/modules/selinux-h: New module.
1185 * bootstrap.conf (gnulib_modules): Add selinux-at.
1186 * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files.
1187 * gl/lib/se-selinux_.h: New file.
1188 * gl/lib/se-context_.h: New file.
1189 * gl/m4/selinux-selinux-h.m4: New file.
1190 * gl/m4/selinux-context-h.m4: New file.
1191 * src/Makefile.am (bin_PROGRAMS): Add chcon.
1192 (chcon_LDADD): Define.
1193 * README: Add chcon to the list of programs.
1194 * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
1196 2007-03-29 Jim Meyering <jim@meyering.net>
1198 * .vg-suppressions: Add libc-getpwuid-leak.
1200 2007-03-28 Jim Meyering <jim@meyering.net>
1202 Help translators include translation team's web or email address.
1203 * src/system.h (emit_bug_reporting_address): New function.
1204 * src/base64.c: Use it rather than a literal printf.
1205 * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
1206 * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
1207 * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
1208 * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
1209 * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
1210 * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
1211 * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
1212 * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
1213 * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
1214 * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
1215 * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
1216 * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
1217 * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
1218 * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
1219 * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
1220 * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
1221 * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
1222 * src/who.c, src/whoami.c, src/yes.c: Likewise.
1224 * src/stty.c: Don't include "vasprintf.h", now that its
1225 declarations are guaranteed to be in gnulib's stdio.h.
1226 * src/who.c: Likewise.
1228 2007-03-27 Jim Meyering <jim@meyering.net>
1230 * README: Use "install", not "ginstall" in the list of program names.
1231 * src/Makefile.am (check-README): Substitute s/ginstall/install/.
1233 2007-03-25 Jim Meyering <jim@meyering.net>
1235 * src/c99-to-c89.diff: Regenerate.
1237 2007-03-25 Paul Eggert <eggert@cs.ucla.edu>
1239 Avoid the need for euidaccess and/or lstat on every directory entry
1240 with 'rm -r dir' (without -f), if we are root, or if we are removing
1241 a directory tree that is full of symbolic links.
1242 * bootstrap.conf (gnulib_modules): Add write-any-file.
1243 * src/copy.c: Include write-any-file.h.
1244 (UNWRITABLE): Remove macro, replacing with....
1245 (writable_destination): New function, which uses can_write_any_file
1246 to avoid the need for euidaccess when we are privileged.
1247 (overwrite_prompt, abandon_move): Use it.
1248 * src/remove.c: Include write-any-file.h.
1249 (D_TYPE): New macro.
1250 (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros.
1251 (write_protected_non_symlink): Don't bother to stat if we can write
1253 (prompt): New arg PDIRENT_TYPE. All callers changed.
1254 Use readdir dirent type to avoid the need for 'lstat' on each directory
1255 entry in cases like 'rm -r dir', if we are root, or if the tree is
1256 full of symbolic links.
1257 (DT_IS_KNOWN, DT_MUST_BE): Remove.
1258 (remove_entry): New arg DIRENT_TYPE_ARG. All callers changed.
1260 2007-03-24 Jim Meyering <jim@meyering.net>
1262 If strace malfunctions, skip the test rather than failing it.
1263 * tests/mv/atomic: Required on a mips-unknown-linux-gnu system
1264 running the aging linux-2.4.27-mipscvs-20040814.
1266 2007-03-23 Paul Eggert <eggert@cs.ucla.edu>
1268 * src/pathchk.c: Don't include euidaccess.h, as we don't call
1271 2007-03-23 Jim Meyering <jim@meyering.net>
1273 * README-package-renamed-to-coreutils: Add a URL for the FAQ,
1274 and a couple more archive links.
1276 2007-03-22 Jim Meyering <jim@meyering.net>
1278 Post-release version change.
1279 * NEWS: Add a line for 6.9+.
1280 * configure.ac (AC_INIT): Set new version string.
1283 * NEWS: Record release date and new version number.
1284 * configure.ac (AC_INIT): New version number.
1286 * tests/mv/hard-3: Correct the preceding change: $3 -> $2.
1288 2007-03-22 Paul Eggert <eggert@cs.ucla.edu>
1290 Improve a test script.
1291 * tests/mv/hard-3: Check for 'ls' failure, too.
1292 Generate more-useful debugging output when 'ls' fails.
1294 2007-03-21 Jim Meyering <jim@meyering.net>
1296 Fix a test script not to claim an ext2 file system is of type xfs.
1297 * tests/du/slink: When using df --local and df --type=TYPE,
1298 test only the exit code. Don't bother with stdout.
1299 Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
1301 * gl/lib/savewd.c: Remove this file, since the savewd_save change
1302 is now in gnulib. The other wasn't useful.
1304 2007-03-20 Jim Meyering <jim@meyering.net>
1306 * gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
1308 Skip part of this test when "." is not a local file system.
1309 * tests/install/basic-1: Otherwise, it would fail on some NFS
1311 * tests/mkdir/p-3: Likewise.
1313 2007-03-19 Paul Eggert <eggert@cs.ucla.edu>
1315 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
1316 Add $(LIB_ACL_TRIVIAL).
1318 2007-03-18 Jim Meyering <jim@meyering.net>
1320 Fix a generic NFS-related test failure.
1321 * tests/mkdir/p-3: When setting up an unreadable "." in an
1322 inaccessible parent, make the parent inaccessible *after* making "."
1323 unreadable. Otherwise, running "chmod a-r ." in an already-
1324 inaccessible parent would fail on NFS with "Stale NFS file handle".
1326 Fix a bug in how pr -m -s works.
1327 * NEWS: Describe how the fix affects pr.
1328 * src/pr.c (init_parameters): The --merge (-m) option does
1329 not imply --expand-tabs (-e), so don't set "untabify_input".
1330 Reported by Wis Macomson.
1331 * tests/misc/pr: New file. Test for the above fix.
1332 * tests/misc/Makefile.am (TESTS): Add pr.
1335 2007-03-17 Jim Meyering <jim@meyering.net>
1337 Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
1338 * bootstrap: Put ""s around use of $build_aux, in case
1339 someone uses a name containing shell meta-characters.
1340 Reported by Alfred M. Szmidt.
1341 * tests/misc/tty-eof: Add shuf to the list of tested commands.
1343 Avoid test failure on NFS-mounted Solaris ZFS file system.
1344 * tests/du/basic: Skip a test if "." is on a non-local file system.
1346 Avoid an obscure build failure, prefer waitpid over wait.
1347 * src/install.c (strip): Use waitpid, not wait. It's equivalent,
1348 but feels less obsolescent.
1350 * bootstrap: Don't use \> in grep regexp. For HP-UX.
1352 2007-03-16 Jim Meyering <jim@meyering.net>
1354 Begin adding support for Solaris ZFS (4 entries per trivial ACL)
1355 * gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
1356 (file_has_acl, copy_acl): Use it, rather than enumerating errno values.
1357 (is_trivial_acl): New function. Incomplete, for now.
1358 (file_has_acl, copy_acl): Use the new function, rather than
1359 counting the number of entries in an ACL.
1361 * bootstrap: Update from gnulib.
1363 * .x-sc_prohibit_atoi_atof: Add TODO here, too.
1365 2007-03-16 Paul Eggert <eggert@cs.ucla.edu>
1367 * src/copy.c: Include filemode.h.
1368 (overwrite_prompt): Say "try to overwrite", not "overwrite", to
1369 make it clearer that the attempt may fail. Problem reported by
1371 http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
1372 Output symbolic mode as well as numeric.
1373 * tests/mv/i-2 (fail): Adjust to new prompt format.
1375 2007-03-15 Jim Meyering <jim@meyering.net>
1377 Enforce policy: don't use *scanf functions.
1378 * Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
1379 * .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
1380 * TODO: note that stty.c needs this small clean-up.
1382 2007-03-13 Jim Meyering <jim@meyering.net>
1384 Prepare to work on ACL-related failure when using Solaris ZFS.
1385 * gl/lib/acl.c: New file, copied from gnulib.
1387 Work around a failing test due to an NFS-based race condition.
1388 * tests/cp/sparse: Accept a report that the copy is *smaller*.
1390 2007-03-12 Jim Meyering <jim@meyering.net>
1392 Make bootstrap.conf a tiny bit more generic.
1393 * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
1394 files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
1396 2007-03-10 Jim Meyering <jim@meyering.net>
1398 Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
1399 * gl/lib/savewd.c: Copy this file from gnulib, then change
1400 "errno != EACCES" to (errno != EACCES && errno != ESTALE).
1401 The symptom was this failure in tests/install/basic-1:
1402 ginstall: cannot create directory `rel/a': Stale NFS file handle
1404 The preceding change solved part of the problem. Now ginstall fails.
1405 * tests/install/basic-1: Temporarily, don't redirect ginstall's
1406 stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
1409 * tests/install/basic-1: When setting up an unreadable "." in an
1410 inaccessible parent, make the parent inaccessible *after* making "."
1411 unreadable. Otherwise, running "chmod a-r ." in an already-
1412 inaccessible parent would fail on NFS with "Stale NFS file handle".
1413 Reported by Bob Proulx.
1415 * Makefile.maint (po-check): Exclude c99-to-c89.diff.
1417 2007-03-09 Jim Meyering <jim@meyering.net>
1419 Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
1420 * tests/chgrp/basic: Don't let failure by chgrp to set the
1421 group of a symlink make this test fail. Do give a diagnostic.
1422 In the chgrp-no-change-ctime test, add darwin7.9.0 as another
1423 known-failing system.
1424 When failing on some other system, print $host_triplet, too.
1425 Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
1426 Reported by Peter Fales.
1428 2007-03-08 Jim Meyering <jim@meyering.net>
1430 * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
1432 2007-03-08 Paul Eggert <eggert@cs.ucla.edu>
1434 rm without -f: give a better diagnostic when euidaccess fails.
1435 * src/remove.c (write_protected_non_symlink): Return int, not bool,
1436 so that we can indicate failure too (as a postive error number).
1437 (prompt): If write_protected_non_symlink fails, report that error
1438 number and fail rather than charging ahead and removing the dubious
1439 entry. Redo the logic of printing a diagnostic so that we need to
1440 invoke quote (full_filename (...)) only once. More details at:
1441 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
1443 2007-03-08 Jim Meyering <jim@meyering.net>
1445 Generalize a few more cvs-isms.
1446 * bootstrap (checkout_only_file): Rename from CVS_only_file.
1447 Change comments and diagnostics not to say "CVS".
1449 * bootstrap: Run libtool, if necessary.
1451 Make bootstrap a little more general.
1452 * bootstrap (build_aux): Factor out/use this definition.
1453 Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
1454 (insert_sorted_if_absent): Move function definition "up", to
1455 precede new first use.
1456 If $build_aux/ doesn't exist initially, create it, and
1459 2007-03-03 Andrew Church <achurch@achurch.org> (tiny change)
1460 Paul Eggert <eggert@cs.ucla.edu>
1462 Fix a bug: cp -x would fail to set mount point permissions.
1463 * NEWS: mention cp -x bug fix
1464 * src/copy.c (copy_internal): Don't return immediately after
1465 copying a mount point that we do not intend to recurse under.
1466 Based on a patch by Andrew Church.
1468 2007-03-03 Jim Meyering <jim@meyering.net>
1470 pwd-unreadable-parent: Skip test on ia64/Linux, too.
1471 * tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
1472 Reported by Bob Proulx.
1474 2007-03-02 Jim Meyering <jim@meyering.net>
1476 pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
1477 * tests/misc/pwd-unreadable-parent: Rather than trying to decide
1478 whether this test has a chance of succeeding, run it only when
1479 $(host_os) is linux-gnu. It was failing on powerpc-apple-darwin8.8.0
1480 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
1482 * tests/misc/pwd-long: Also allow "+" in $PWD.
1484 Remove another coreutils-ism. Formatting cleanup.
1485 * Makefile.maint (my-distcheck): Update an outdated comment.
1486 (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
1487 (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
1489 2007-03-01 Jim Meyering <jim@meyering.net>
1491 * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
1492 (my-distcheck): Use the new variable, instead of too-long literal.
1494 Make "make syntax-check" rules less coreutils-specific.
1495 * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
1496 (sc_cast_of_alloca_return_value): Likewise.
1497 (sc_root_tests): Do nothing if there is no check-root target
1498 in tests/Makefile.am.
1500 Run the writable-files check only for release-building targets.
1501 * Makefile.maint (local-checks-available): Remove writable-files.
1502 (alpha beta major): Put it here, instead.
1504 "make syntax-check" now runs only Makefile.cfg-selected tests
1505 * Makefile.maint (syntax-check-rules): Hoist this definition so that
1506 it precedes the indirect use in the definition of $(local-check).
1507 (local-check): Use :=, not just "=".
1508 (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
1510 2007-02-28 Bruno Haible <bruno@clisp.org>
1512 * bootstrap.conf (gnulib_modules): Replace xreadlink with
1513 xreadlink-with-size. Add xreadlink.
1514 * src/copy.c (copy_internal): Update.
1515 * src/ls.c (is_directory): Update.
1516 * src/stat.c (print_stat): Update.
1517 * src/readlink.c (main): Use the one-argument xreadlink function.
1519 2007-02-28 Paul Eggert <eggert@cs.ucla.edu>
1521 * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
1522 Problem reported by Philip Rowlands in
1523 <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
1525 2007-02-28 Jim Meyering <jim@meyering.net>
1527 * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
1528 list of exceptions, for the "make distcheck" sc_file_system rule.
1530 * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
1532 2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
1534 Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
1535 * NEWS: With -P, the default block size and output format is not
1536 affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
1537 * src/df.c (main): Implement this.
1539 2007-02-27 Jim Meyering <jim@meyering.net>
1541 Add a test for the above.
1542 * tests/misc/df-P: New file.
1543 * tests/misc/Makefile.am (TESTS): Add df-P.
1545 2007-02-25 Jim Meyering <jim@meyering.net>
1547 * Makefile.maint (announcement): Adjust so that it works with
1548 announce-gen's --gnulib-snapshot-time-stamp option.
1549 Indent one of the command lines using TAB, not 8 spaces.
1551 Post-release version change.
1552 * NEWS: Add a line for 6.8+.
1553 * configure.ac (AC_INIT): Set new version string.
1555 2007-02-24 Jim Meyering <jim@meyering.net>
1558 * NEWS: Record release date and new version number.
1559 * configure.ac (AC_INIT): New version number.
1561 Don't skip this test on new-enough Linux/GNU systems.
1562 * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
1563 rather than for __GETCWD_PREFIX in config.h (the latter is no
1564 longer defined, ever, due to gnulib changes).
1565 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
1567 Remove the "gnits" option; it prohibits my using "+" as a version
1568 string suffix, and all it does (beyond the default "gnu" option)
1569 is to _require_ the THANKS file.
1570 * configure.ac (AM_INIT_AUTOMAKE): Remove it.
1572 Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
1573 * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
1574 * tests/chown/Makefile.am, tests/cp/Makefile.am:
1575 * tests/du/Makefile.am, tests/expr/Makefile.am:
1576 * tests/factor/Makefile.am, tests/general/Makefile.am:
1577 * tests/install/Makefile.am, tests/ln/Makefile.am:
1578 * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
1579 * tests/mv/Makefile.am, tests/readlink/Makefile.am:
1580 * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
1581 * tests/seq/Makefile.am, tests/stty/Makefile.am:
1582 * tests/tee/Makefile.am, tests/touch/Makefile.am:
1584 * README: Document the OSF/1 4.0d build failure and work-around.
1585 Reported by Bruno Haible.
1587 * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
1589 * configure.ac: Use 6.7+, not 6.7-dirty.
1591 2007-02-24 Paul Eggert <eggert@cs.ucla.edu>
1593 * NEWS: sort no longer compresses temporaries by default.
1594 * bootstrap.conf: Remove findprog.
1595 * doc/coreutils.texi (sort invocation): The default is to not
1596 compress. Don't treat "" specially.
1597 * src/sort.c: Don't include findprog.h.
1598 (create_temp): Compress only if the user specified --compress-program.
1599 * tests/misc/sort-compress: Adjusts tests to match new behavior.
1601 2007-02-24 Jim Meyering <jim@meyering.net>
1603 Avoid a shell syntax error, when building with an inadequate Perl.
1604 * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
1605 it can expand to "/.../missing perl".
1607 * man/Makefile.am (.x.1): Warn when unable to update a man page.
1608 Suggestion from Bruno Haible.
1610 2007-02-23 Bruno Haible <bruno@clisp.org>
1612 Handle better the combination of old Perl and a pre-c99 compiler.
1613 * man/Makefile.am (.x.1): If the autoconf test has determined that
1614 perl is missing or not a sufficient version, do nothing.
1616 * tests/readlink/can-e: Put the closing double-quote at the end of a
1617 backquoted word, not in the middle. Works around a bug in sh on
1619 * tests/readlink/can-f: Likewise.
1620 * tests/readlink/can-m: Likewise.
1622 * tests/du/slink: Skip the test if executing on an nfsv3 file system.
1623 This avoids a test failure at least on OSF/1 4.0d.
1625 2007-02-23 Jim Meyering <jim@meyering.net>
1627 * src/date.c (usage): Split a diagnostic that had grown to be
1628 longer than the C89 maximum of 509 bytes.
1630 2007-02-23 Ed Santiago <ed@edsantiago.com>
1632 * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
1633 for a separator. Include sample RFC 2822 and 3339 output.
1635 2007-02-23 Jim Meyering <jim@meyering.net>
1637 With -Dlint, make shuf free all heap-allocated storage.
1638 * src/shuf.c (main): Move declaration of input_lines to
1639 function scope, and initialize to NULL, so we can free it.
1640 [lint]: Free all malloc'd memory.
1641 * tests/misc/shuf: Also test shuf's -e and -i options.
1643 2007-02-22 Jim Meyering <jim@meyering.net>
1645 Merge in a change from some other incarnation of this file (gzip?)
1646 * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
1648 Adjust preceding change not to perform an unaligned access.
1649 * src/copy.c (copy_reg): Undo previous change. Instead, make
1650 it clearer that we're using a single-byte sentinel, and
1651 [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
1652 Reported by Andreas Schwab.
1654 Placate valgrind, wrt ./cp --sparse=always
1655 * src/copy.c (copy_reg): Place the sentinel by setting a
1656 full word's worth of bits, not just a single byte's worth.
1657 This avoids a harmless (but distracting) case of memory being
1660 2007-02-21 Paul Eggert <eggert@cs.ucla.edu>
1662 Honor dd's noatime flag if possible, even if not supported on build fs
1663 * doc/coreutils.texi (dd invocation): Warn that noatime might not be
1665 * src/dd.c (flags, usage): Look at O_NOATIME, not
1666 HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
1667 flag, so that dd attempts O_NOATIME even if the build file system
1668 does not support it. Problem reported by Jim Meyering today in
1670 * tests/dd/misc: Generate a warning, not a failure, if noatime
1673 2007-02-21 Jim Meyering <jim@meyering.net>
1675 * tests/misc/date: Remove vestigial use of Data::Dumper.
1677 2007-02-20 Paul Eggert <eggert@cs.ucla.edu>
1679 * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
1680 about out-of-range initializer with Sun C 5.8.
1682 2007-02-20 Jim Meyering <jim@meyering.net>
1684 * bootstrap (CVS_only_file): Use README-hacking.
1686 Now that we use GIT, not cvs, rename README-cvs.
1687 * README-hacking: Renamed from...
1688 Update to reflect that we now use git.
1690 * README-cvs: ...this.
1692 * src/env.c (main): When invoked with no arguments (i.e. when printing
1693 the environment), use a local variable to iterate through the global
1694 "environ" array, rather than "environ" itself. This is solely to
1695 avoid changing the environment for an LD_PRELOAD-substituted "puts"
1696 or "exit" function. Tiny patch by Harvey Eneman. See
1697 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
1700 * bootstrap: Move definitions of temporary directory names and the
1701 new bt_regex "up" to precede all uses, so it's clearer what their
1702 scope is. Also, use [.], rather than \\., since the former works
1705 * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
1706 Based on the bison 2007-02-19 change by Joel E. Denny.
1708 2007-02-19 Paul Eggert <eggert@cs.ucla.edu>
1710 * NEWS: sort now uses a --compress-program option rather than
1711 an environment variable.
1712 * doc/coreutils.texi (sort invocation): Document this.
1713 * src/sort.c (usage): Likewise.
1714 (COMPRESS_PROGRAM_OPTION): New const.
1715 (long_options, create_temp, main): Support new option.
1716 * tests/misc/sort-compress: Test it.
1718 2007-02-19 Jim Meyering <jim@meyering.net>
1720 * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
1722 2007-02-18 Jim Meyering <jim@meyering.net>
1724 * src/system.h: Don't include exit.h, now that it's subsumed
1725 by the gnulib-generated stdlib.h.
1727 * tests/rm/fail-eacces: Skip this test when running as root.
1728 Reported by Matthew Woehlke.
1730 * bootstrap: Use "._bootmp" as the temporary directory name,
1731 not ".#bootmp". The latter's "#" caused trouble with the new,
1732 gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
1734 2007-02-14 Paul Eggert <eggert@cs.ucla.edu>
1736 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1737 * src/dircolors.c: Include c-strcase.h.
1738 (dc_parse_stream): Use c_strcasecmp rather than
1739 strcasecmp to avoid unreliable results in locales like Turkish
1740 where strcasecmp is incompatible with the C locale.
1742 2007-02-13 Jim Meyering <jim@meyering.net>
1744 Also check for and print stderr output, in case a program fails.
1745 * tests/misc/tty-eof: Occasionally (not reproducible), this
1746 test would fail, with one or more programs exiting nonzero, e.g.,
1747 tty-eof: sha224sum exited with status 1 (expected 0)
1748 Now, maybe we'll get a clue, the next time that happens.
1750 2007-02-12 Jim Meyering <jim@meyering.net>
1752 * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
1754 * tests/misc/pwd-unreadable-parent: Skip the test if we're
1755 definitely using the replacement.
1756 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
1758 2007-02-10 Jim Meyering <jim@meyering.net>
1760 Remove excess leading spaces that would make help2man misbehave.
1761 * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
1762 * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
1763 * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
1764 * src/date.c (usage): Use two spaces after each optional flag, not one.
1765 Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
1767 * Makefile.maint (longopt_re): Relax the regexp, making square
1768 brackets optional, so it matches the newly reported violations, too.
1770 * src/csplit.c (usage): Use two spaces (not one) to separate
1771 each option string from its description, so help2man formats
1772 the derived man page properly. Reported by Thomas Huriaux in
1773 <http://bugs.debian.org/410407>.
1774 * src/df.c (usage): Likewise.
1775 * src/du.c (usage): Likewise.
1776 * src/install.c (usage): Likewise.
1777 * src/ls.c (usage): Likewise.
1779 2007-02-03 Jim Meyering <jim@meyering.net>
1781 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
1782 * NEWS: Mention the bug fix.
1783 * tests/misc/pwd-unreadable-parent: New file.
1784 * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
1786 2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
1788 * NEWS: Document fix for cp --preserve=mode.
1789 * src/copy.c (copy_internal): Omit the group- or other-writeable
1790 permissions when creating a directory, to avoid a race condition
1791 if the special mode bits aren't right just after the directory is
1793 * src/cp.c (make_dir_parents_private): Likewise.
1794 * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
1797 * NEWS: Document fix for cp --parents.
1798 * src/cp.c (make_dir_parents_private): Report the error sooner with
1799 "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
1800 creating the directory, DEST/DIR.
1801 * tests/cp/cp-parents: Test for the non-race-condition bug fixed
1802 by the above change.
1804 2007-02-02 Jim Meyering <jim@meyering.net>
1806 * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
1808 * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
1809 consistent, so this can be applied with patch -p0.
1810 Reported by Matthew Woehlke.
1812 Arrange for "make check-root" to run the new root-only test.
1813 * tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux.
1816 * Makefile.maint (patch-check): Use patch with its -p2 option,
1817 since that makes this check slightly more strict.
1819 Use a directory on a loopback device mounted with -o context=...
1820 * tests/cp/cp-a-selinux: Since this test now runs mount and umount,
1821 it is a root-only one.
1823 2007-01-29 Jim Meyering <jim@meyering.net>
1826 * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
1827 determine dev/inode or upon detecting a symlink loop.
1829 * src/ls.c: Rename three global variables.
1830 (cwd_file): Rename from 'files'.
1831 (cwd_n_alloc): Rename from 'nfiles'.
1832 (cwd_n_used): Rename from 'files_index'.
1834 Shave 8 bytes off the size of "struct fileinfo".
1835 * src/ls.c (fileinfo): Put all members of type "bool" together.
1837 2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
1839 Modify "ls" to sort its data faster, using the new gnulib mpsort
1840 module rather than qsort. This is particularly a win in
1841 environments where strcoll is slow, since mpsort typically calls
1842 strcoll less often than qsort does.
1843 * bootstrap.conf (gnulib_modules): Add mpsort.
1844 * src/ls.c: Include mpsort.h.
1845 (sorted_file, sorted_file_alloc): New vars, for a new vector of
1846 pointers to the file info, for speed.
1847 (clear_files, extract_dirs_from_files, sort_files, print_current_files):
1848 (print_many_per_line, print_horizontal, print_with_commas):
1849 (calculate_columns): Set and use new vector.
1850 (initialize_ordering_vector): New function.
1852 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1854 Adjust to today's change to gnulib, which added a module for
1855 string.h to replace the little include files like strcase.h.
1856 * src/dircolors.c: Don't include strcase.h.
1857 * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
1859 2007-01-26 Jim Meyering <jim@meyering.net>
1861 * src/dd.c (advance_input_after_read_error): Change diagnostic to
1862 say "invalid file offset" rather than "screwy file offset".
1864 * .x-sc_cast_of_argument_to_free: Remove this file.
1865 * Makefile.am (EXTRA_DIST): Likewise.
1867 2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
1869 * src/sort.c (create_temp): Remove superfluous access-X_OK
1870 check. find_in_path does this for us.
1872 2007-01-24 Jim Meyering <jim@meyering.net>
1874 Remove usually-skipped test.
1875 * tests/cp/open-perm-race: Remove this file. It is subsumed
1876 by parent-perm-race.
1877 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
1878 * tests/sort/Makefile.am: Regenerate.
1880 Pass "make distcheck" again.
1881 * src/sort.c (usage): Split a diagnostic that had grown to be
1882 longer than the C89 maximum of 509 bytes.
1883 * .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
1884 FIXME: this is just temporary, while we wait to remove the offending
1885 access-calling code.
1886 * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
1887 * Makefile.maint (sc_cast_of_argument_to_free): Use the
1888 canonical, $$($(CVS_LIST_EXCEPT)).
1889 * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
1891 2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
1893 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
1894 like it will be approved. Also add --check=quiet, --check=silent
1895 as long aliases, and --check=diagnose-first as an alias for -c.
1896 * doc/coreutils.texi (sort invocation): Document this.
1897 Also, mention that sort -c can take at most one file.
1898 * src/sort.c: Implement this.
1900 (usage): Document the change.
1901 (CHECK_OPTION): New constant.
1902 (long_options): --check now takes an optional argument, and is now
1903 treated differently from 'c'.
1904 (check_args, check_types): New constant arrays.
1905 (check): New arg CHECKONLY, which suppresses diagnostic if -C.
1906 (main): Parse the new options.
1907 * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
1910 2007-01-24 Jim Meyering <jim@meyering.net>
1913 * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
1914 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
1916 Don't depend on "which".
1917 * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
1918 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
1920 2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
1922 Test sort compression.
1923 * tests/misc/Makefile.am: Add the test.
1924 * tests/misc/sort-compress: New file containing the tests.
1926 2007-01-24 Jim Meyering <jim@meyering.net>
1928 * NEWS: sort temp file compression: tweak wording.
1929 * src/sort.c (struct sortfile) [name]: Declare member to be const.
1931 2007-01-21 Jim Meyering <jim@meyering.net>
1933 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
1934 In pipe_fork callers, use these named constants, not "2" and "8".
1935 (proctab, nprocs): Declare to be "static".
1936 (pipe_fork) [lint]: Initialize local, pid,
1937 to avoid unwarranted may-be-used-uninitialized warning.
1938 (create_temp): Use the active voice. Describe parameters, too.
1940 2007-01-21 James Youngman <jay@gnu.org>
1942 Centralize all the uses of sigprocmask(). Don't restore an invalid
1944 * src/sort.c (enter_cs, leave_cs): New functions for protecting
1945 code sequences against signal delivery.
1946 * (exit_cleanup): Use enter_cs and leave_cs instead of
1947 calling sigprocmask directly.
1948 (create_temp_file, pipe_fork, zaptemp): Likewise
1950 2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
1952 Add compression of temp files to sort.
1953 * NEWS: Mention this.
1954 * bootstrap.conf: Import findprog.
1955 * configure.ac: Add AC_FUNC_FORK.
1956 * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
1958 * src/sort.c (compress_program): New global, holds the name of the
1959 external compression program.
1960 (struct sortfile): New type used by mergepfs and friends instead
1961 of filenames to hold PIDs of compressor processes.
1962 (proctab): New global, holds compressor PIDs on which to wait.
1963 (enum procstate, struct procnode): New types used by proctab.
1964 (proctab_hasher, proctab_comparator): New functions for proctab.
1965 (nprocs): New global, number of forked but unreaped children.
1966 (reap, reap_some): New function, wait for/cleanup forked processes.
1967 (register_proc, update_proc, wait_proc): New functions for adding,
1968 modifying and removing proctab entries.
1969 (create_temp_file): Change parameter type to pointer to file
1970 descriptor, and return type to pointer to struct tempnode.
1971 (dup2_or_die): New function used in create_temp and open_temp.
1972 (pipe_fork): New function, creates a pipe and child process.
1973 (create_temp): Creates a temp file and possibly a compression
1974 program to which we filter output.
1975 (open_temp): Opens a compressed temp file and creates a
1976 decompression process through which to filter the input.
1977 (mergefps): Change FILES parameter type to struct sortfile array
1978 and update access accordingly. Use open_temp and reap_some.
1979 (avoid_trashing_input, merge): Change FILES parameter like
1980 mergefps and call create_temp instead of create_temp_file.
1981 (sort): Call create_temp instead of create_temp_file.
1983 (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
1985 The idea of compressing sorts temporary files was first
1986 suggested/implemented by Jay Soffian in 1998, and again
1987 by Charles Randall in 2001.
1989 2007-01-20 Jim Meyering <jim@meyering.net>
1991 * tests/misc/pwd-long: Work properly even when run from the
1992 wrong one of two or more bind-mounted sibling directories.
1993 Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
1995 2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
1997 Standardize on list of signals when an app catches signals.
1998 * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
1999 SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
2000 * src/ls.c (main): Likewise (except SIGPIPE was already caught).
2001 Note that ls.c is special, as it also catches SIGTSTP.
2002 * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
2003 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
2005 2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
2006 and Paul Eggert <eggert@cs.ucla.edu>
2008 * src/sort.c (cleanup): Clear temphead at the end.
2009 (exit_cleanup): New function.
2010 (main): Don't invoke atexit until we're ready.
2011 Invoke it with exit_cleanup, not with cleanup and close_stdout,
2012 to avoid a race condition with cleanup and signal handling. More
2013 details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
2015 2007-01-18 Jim Meyering <jim@meyering.net>
2017 * src/c99-to-c89.diff: Adjust remove.c offsets.
2019 2007-01-17 Jim Meyering <jim@meyering.net>
2021 Make "rm --interactive=never ..." never prompt.
2022 * NEWS: Mention this.
2023 * src/remove.h (enum rm_interactive): New ternary type.
2024 (struct rm_options) [interactive]: Use it, here -- rather than bool.
2025 * src/remove.c (prompt): Reflect type change.
2026 * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
2027 * src/rm.c (main): Add a FIXME comment for '-d' option.
2028 Adapt to type change of rm_options.interactive.
2030 * tests/rm/i-never: New file. Test for the above fix.
2031 * tests/rm/Makefile.am (TESTS): Add i-never.
2033 2007-01-15 Jim Meyering <jim@meyering.net>
2035 * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
2036 emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
2037 but that's ok, since fts_.h will eventually be renamed.
2039 * src/remove.c (remove_dir): Don't use errno in diagnostic.
2040 Root-only test failure reported by Alex van Hout and Jon Grosshart in
2041 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
2043 * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
2044 s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
2046 2007-01-14 Bruno Haible <bruno@clisp.org>
2048 Enable use of gnulib's new fchdir module.
2049 * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
2050 since we use canonicalize.
2051 (gnulib_modules): Add fchdir.
2052 * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
2054 2007-01-13 Jim Meyering <jim@meyering.net>
2056 * tests/cp/open-perm-race: Remove gdb-based test.
2057 It would run only when compiled with -g, and besides is now
2058 subsumed by file-perm-race.
2059 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
2061 * Transform all Makefile.am files so that when running "make check",
2062 CU_TEST_NAME is set to the name of the test. This is so that when I
2063 run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
2064 on the entire package it is more convenient to map a leak or error
2065 found in a valgrind log file back to the offending test.
2067 (echo tests/Makefile.am.in; find tests -name Makefile.am) \
2068 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
2069 -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
2071 2007-01-11 Jim Meyering <jim@meyering.net>
2073 Avoid a leak in expr's implementation of the ":" (match) operator.
2074 * src/expr.c (docolon): Free the regexp buffer using regfree, rather
2075 than doing it manually, being careful to set fastmap to NULL first.
2076 Free any re_regs.start and .end members, if necessary.
2078 * tests/misc/test-diag: Work also when libc's error function
2079 reports the entire program name ("../../src/test"), rather than
2080 just the final component.
2082 2007-01-10 Jim Meyering <jim@meyering.net>
2084 Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
2085 * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
2086 (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
2087 directory. Non-directory entries lack fts_statp data when using
2088 the FTS_NOSTAT option.
2090 2007-01-07 Jim Meyering <jim@meyering.net>
2092 * tests/sample-test: Update copyright date to 2007.
2093 * Makefile.maint (copyright-check): Also check the copyright date
2094 in tests/sample-test.
2096 2007-01-06 Jim Meyering <jim@meyering.net>
2098 * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
2099 based on examples from G.P. Halkes in
2100 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
2102 2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
2104 * src/fmt.c (copy_rest): Correct prefix handling.
2105 Don't elide a line with the prefix followed by only white space.
2106 (get_line): Move EOF-check to loop-termination condition.
2107 * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
2108 (pfx-2): Remove test; its premise was contrary to the documentation.
2110 2007-01-05 Jim Meyering <jim@meyering.net>
2112 Avoid a used-uninitialized bug for invalid input, i.e., when the size
2113 of the input, not counting newlines, is 1 % 4.
2114 * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
2115 It may be smaller when flushing.
2117 2007-01-05 Mike Frysinger <vapier@gentoo.org>
2119 * src/dircolors.hin: Add a TERM directive for cons25.
2121 2007-01-04 Jim Meyering <jim@meyering.net>
2123 * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
2124 case you don't have convenient access to glibc info documentation.
2126 Use the release year, not the current year.
2127 * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
2128 * src/Makefile.am (RELEASE_YEAR): Define it.
2130 Thanks to a prod from Eric Blake.
2132 Ensure that "group --version" always prints the current year.
2133 * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
2134 * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
2135 Suggestion from Eric Blake.
2137 When decoding, always allow newlines in input, with almost no
2139 * src/base64.c (do_decode): Initialize decode context.
2140 Call base64_decode one more time, after all input is processed.
2141 (usage): When decoding, newlines are always accepted.
2143 * tests/misc/base64: Add a bunch of tests, for the above.
2144 * gl/lib/base64.c: Include <string.h>.
2145 (base64_decode_ctx_init, get_4, decode_4): New functions.
2146 (base64_decode): Efficiently handle interspersed newlines.
2147 (base64_decode_alloc): Update signature.
2148 * gl/lib/base64.h (struct base64_decode_context): Define.
2149 (base64_decode_ctx_init): Add prototype.
2150 (base64_decode, base64_decode_alloc): Update prototypes.
2152 * gl/lib/base64.c: Copied from gnulib.
2153 * gl/lib/base64.h: Likewise.
2155 2007-01-03 Jim Meyering <jim@meyering.net>
2157 * THANKS: Add Evan Hunt.
2159 2007-01-03 Bruno Haible <bruno@clisp.org>
2161 Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
2162 * tests/chown/deref: Apply lang-default.
2163 * tests/misc/split-a: Likewise.
2164 * tests/mv/reply-no: Likewise.
2166 * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
2169 2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
2171 Now, "ls -FRL" always follows symbolic links on Linux.
2172 * NEWS: Mention this bug fix.
2173 * src/ls.c (gobble_file): Fix bug reported by
2174 Nobuyuki Tsuchimura in
2175 http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
2176 where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
2177 * tests/ls/follow-slink: Add a test for this case.
2179 2007-01-01 Jim Meyering <jim@meyering.net>
2181 * tests/rm/fail-eperm: Revert last change. The PATH=... setting
2182 is not honored at least on HP-UX 11.23 systems.
2183 Instead, simply transform the actual output diagnostic.
2184 Test failure reported by Bob Proulx.
2186 2006-12-30 Jim Meyering <jim@meyering.net>
2188 * bootstrap (gnulib_extra_files): Remove announce-gen.
2189 * bootstrap.conf (gnulib_modules): Add it here instead, now that
2192 * tests/misc/base64: Factor a long, repetitive string.
2194 * src/c99-to-c89.diff: Adjust remove.c offsets.
2196 Clean up after the change of 2006-12-28.
2197 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
2198 now that this function never modifies the pointer. Adjust comments
2199 and code accordingly.
2200 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
2201 now that AD_pop_and_chdir no longer does that.
2203 * tests/rm/fail-eperm: Avoid spurious differences (the error function
2204 from latest glibc no longer prints the full program_name): so don't
2205 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
2207 * tests/mv/acl (skip): Skip this test also if the destination
2208 directory, which is on a different file system, lacks ACL support.
2210 * src/copy.c (copy_reg): Rewrite a comment that was rendered
2211 inaccurate by the 2006-10-18 change.
2213 2006-12-28 Jim Meyering <jim@meyering.net>
2215 When moving "up" the hierarchy, be careful to remove a just-emptied
2216 directory before opening ".", to avoid trouble with file system
2217 implementations that cache readdir results at opendir-time.
2218 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
2219 Don't update **DIRP. Don't call fdopendir here.
2220 (remove_dir): Call fdopendir here instead.
2221 Report and patch from Mikulas Patocka:
2222 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
2224 2006-12-27 Jim Meyering <jim@meyering.net>
2226 * src/tail.c (usage): Mention +N for --bytes and --lines.
2227 Suggestion from Evan Hunt.
2229 2006-12-26 Jim Meyering <jim@meyering.net>
2231 * configure.ac: Require autoconf-2.61 and automake-1.10.
2232 Without the former (even with autoconf-2.60), "make distcheck"
2233 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
2234 due to an inttypes.h generated with CFLAGS including -pedantic.
2235 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
2237 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
2238 tag, using the release version number as the message.
2239 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
2241 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
2243 * NEWS: dd bs= operands now silently override later ibs= and obs=,
2245 * src/dd.c (scanargs): Implement it.
2246 * tests/dd/misc (outbytes): Test it.
2247 * doc/coreutils.texi (dd invocation): Specify that bs=N
2248 overrides later ibs and obs, undoing part of the
2249 previous change. (The behavior was wrong.)
2251 2006-12-20 Jim Meyering <jim@meyering.net>
2253 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
2254 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
2255 Don't let a non-directory get by with errno == EPERM, either.
2256 Check the file type directly (using cached stat value), rather
2257 than trying to guess it from errno values.
2258 Karl Berry reported that a cross-partition "mv /etc/issue ~"
2259 failed with the um,... suboptimal diagnostic,
2260 "mv: cannot remove `/etc/issue': Not a directory".
2261 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
2262 * tests/rm/fail-eacces: New file.
2263 * NEWS: Mention that both mv and rm are affected.
2265 "cut -f 2- A B" no longer triggers a double-free bug
2266 * src/cut.c (cut_fields): Set file-scoped global to NULL after
2267 freeing it. This avoids a double-free (and core dump on some systems)
2268 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
2269 James Hunt in <http://bugzilla.redhat.com/220312>.
2270 * NEWS: List this bug fix.
2271 * THANKS: Mention him.
2272 * tests/misc/cut: New file.
2273 * tests/misc/Makefile.am (TESTS): Add cut.
2275 2006-12-15 Jim Meyering <jim@meyering.net>
2277 * tests/cp/open-perm-race: Correct the gdb-existence check.
2278 Don't run either subsequent gdb command in a sub-shell.
2279 Reported by Thomas Schwinge.
2280 * THANKS: bring up to date.
2282 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
2284 Make sure cp -p isn't too generous with file permissions.
2285 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
2286 * tests/cp/file-perm-race: New file.
2288 Ensure cp -pR --parents isn't too generous with parent permissions.
2289 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
2290 * tests/cp/parent-perm-race: New file.
2292 2006-12-14 Jim Meyering <jim@meyering.net>
2294 * tests/chgrp/default-no-deref: Don't assume that files are created
2295 with the primary group by default. That's not true in a directory
2296 with the set-GID bit set.
2298 Don't hang when there's no input tty.
2299 * tests/cp/open-perm-race: Skip this test if there is no
2300 controlling input `terminal'.
2302 Test for a hard-to-detect race fix, using gdb.
2303 * tests/cp/open-perm-race: New file, to test for the
2304 cp --preserve=ownership fix of 2006-12-06.
2306 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
2307 (TESTS): Add open-perm-race.
2309 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
2310 * src/chown.c (main): Likewise.
2311 * src/chown-core.c (change_file_owner): Add to a comment.
2312 * tests/chown/preserve-root: Add tests.
2314 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
2315 * src/chmod.c (process_file): Do honor the --preserve-root option.
2316 * src/chown-core.c (change_file_owner): Likewise, but here, also
2317 handle the case in which a traversal would go "through" a symlink
2318 to root. Reported by Matthew M. Boedicker
2319 * tests/chown/preserve-root: Test for the above.
2320 * tests/chown/Makefile.am (TESTS): Add preserve-root.
2322 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
2323 to gnulib's m4/openat.m4.
2325 2006-12-13 Andreas Schwab <schwab@suse.de>
2327 Don't fail if mv/acl test succeeds.
2328 * tests/mv/acl (skip): Check for acl support in the file system.
2329 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
2330 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
2332 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2334 Remove some arbitrary restrictions on size fields, so that
2335 commands like "sort -k 18446744073709551616" no longer fail merely
2336 because 18446744073709551616 doesn't fit in uintmax_t. The trick
2337 is that these fields can all be treated as effectively infinity;
2338 their exact values don't matter, since no internal buffer can be
2340 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
2341 ULONG_MAX if the code assumes this. Silently truncate too-large
2342 values to SIZE_MAX, as the remaining code will do the right thing
2344 * src/sort.c (parse_field_count): Likewise.
2345 * src/uniq.c (size_opt, main): Likewise.
2346 * tests/join/Test.pm (bigfield): New test.
2347 * tests/sort/Test.pm (bigfield): New test.
2348 * tests/uniq/Test.pm (121): New test.
2350 2006-12-13 Jim Meyering <jim@meyering.net>
2352 * tests/chgrp/default-no-deref: New test.
2353 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
2355 2006-12-12 Jim Meyering <jim@meyering.net>
2357 * src/system.h (SETVBUF): Remove definition, now that the
2358 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
2359 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
2360 * src/od.c (open_next_file): Likewise.
2362 2006-12-09 Jim Meyering <jim@meyering.net>
2364 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
2365 "source". I.e. "GNU coreutils 6.7".
2367 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
2368 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
2369 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
2371 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
2372 whenever uniq is expected to fail. This should catch the other case
2373 [test #112] in which uniq emits "cat: write error: Broken pipe" on
2376 2006-12-08 Jim Meyering <jim@meyering.net>
2378 Include bootstrap tool version info in the announcement form.
2379 * Makefile.maint (gnulib_snapshot_date): Define.
2380 (announcement): Use two new announce-gen options,
2381 --bootstrap-tools and --gnulib-snapshot-date.
2382 * Makefile.cfg (gnulib_dir): Set.
2384 Post-release version change.
2385 * NEWS: Add a line for 6.8-dirty.
2386 * configure.ac (AC_INIT): Set new version string.
2388 2006-12-07 Jim Meyering jim@meyering.net
2391 * NEWS: Record release date. Remove '-pre' suffix.
2392 * configure.ac (AC_INIT): Remove version string suffix.
2394 2006-12-07 Jim Meyering <jim@meyering.net>
2396 Make the output of "make check" more reproducible.
2397 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
2398 evoke diagnostics like this when COLUMNS=0 in the environment:
2399 ls: ignoring invalid width in environment variable COLUMNS: 0
2400 * tests/touch/no-rights: Likewise.
2401 * tests/help-version: Likewise.
2402 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
2403 118, since it emits "cat: write error: Broken pipe" on some systems.
2405 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
2407 * NEWS: Document the cp -p fix for special bits.
2408 * src/copy.c (set_owner): Now returns a three-way result, so
2409 that the caller can clear the special bits. All callers changed.
2410 (copy_reg): Don't set the special bits if chown failed.
2411 (copy_internal): Likewise.
2412 * tests/cp/special-bits: Test this fix.
2414 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
2416 * NEWS: Document the cp --preserve=ownership fix.
2417 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
2418 * src/copy.c (fchmod_or_lchmod): New function.
2419 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
2420 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
2421 When creating a file, use O_EXCL, so we're more likely to detect
2422 funny business by other processes. At the end, if permissions
2423 were omitted, chmod them back in.
2424 (copy_internal): If the ownership might change, omit some permissions
2425 at first, then restore them after chowning the file.
2426 * src/cp.c (make_dir_parents_private): Likewise.
2427 * src/copy.c (cached_umask): New function.
2428 * src/copy.h (cached_umask): New decl.
2430 2006-12-06 Jim Meyering <jim@meyering.net>
2432 Make the output of "make check" more reproducible.
2433 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
2435 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
2437 * src/install.c (install_file_in_file): Preserve time stamps
2438 before changing owner or file mode bits, for consistency with
2439 other coreutils programs.
2441 2006-12-03 Jim Meyering <jim@meyering.net>
2443 * tests/misc/date-sec: Output a fixed string.
2445 * NEWS: du --one-file-system (-x) would skip subdirectories of any
2446 directory listed as second or subsequent command line argument.
2447 * tests/du/one-file-system: New file. Test for today's fts.c fix.
2448 * tests/du/Makefile.am (TESTS): Add one-file-system.
2449 Reported by Mike Frysinger.
2451 2006-12-02 Jim Meyering <jim@meyering.net>
2453 * tests/du/basic: Generate 4KB file simply using printf, rather than
2454 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
2456 2006-11-28 Jim Meyering <jim@meyering.net>
2458 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
2459 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
2460 Reported by Matthew Woehlke.
2462 * tests/mv/dir2dir: Also accept EBUSY.
2463 Reported by Matthew Woehlke.
2465 2006-11-27 Jim Meyering <jim@meyering.net>
2467 * Makefile.maint (patch-check): Rewrite to diagnose failure.
2468 * src/c99-to-c89.diff: Adjust shred.c offsets.
2470 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
2472 Improve the check for departures from C89, and fix the departures
2474 * Makefile.maint (my-distcheck): Also check for C89 compatibility
2475 as best we can with GCC.
2476 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
2477 declaration; C89 doesn't allow this.
2478 * src/dcgen: Don't generate string literals longer than
2479 what C89 requires support for.
2480 * src/cut.c (usage): Don't use string literals longer than
2481 what C89 requires support for.
2482 * src/date.c (usage): Likewise.
2483 * src/dd.c (usage): Likewise.
2484 * src/du.c (usage): Likewise.
2485 * src/ls.c (usage): Likewise.
2486 * src/od.c (usage): Likewise.
2487 * src/readlink.c (usage): Likewise.
2488 * src/seq.c (usage): Likewise.
2489 * src/shred.c (usage): Likewise.
2491 2006-11-26 Mike Frysinger <vapier@gentoo.org>
2493 Recognize new archive, audio and image formats.
2494 Give audio files a separate color.
2495 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
2496 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
2497 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
2498 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
2499 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
2500 audio color to 00;36 to differentiate from image/video color.
2502 2006-11-26 Jim Meyering <jim@meyering.net>
2504 * Makefile.maint (patch-check): Compile patched sources with
2505 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
2506 no violations remain.
2508 * src/c99-to-c89.diff: Remove 3 bogus hunks.
2510 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
2513 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
2515 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
2517 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
2519 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
2520 while trying to retain the readability of C99 as much as possible.
2521 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
2522 Replace each of two uses with literal AT_FDCWD.
2523 (cache_stat_init): Return its argument, for convenience.
2524 Update the caller in remove_dir.
2525 (AD_pop_and_chdir): Return prev_dir rather than storing through
2526 a pointer argument. All uses changed.
2527 (AD_ensure_initialized): New function.
2528 (AD_mark_helper): Use it, to avoid the need for declaration
2530 (rm): Move cycle_check_init call into callee...
2532 Use an else clause in place of a "continue" statement.
2533 (close_preserve_errno): Remove.
2534 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
2536 2006-11-25 Jim Meyering <jim@meyering.net>
2538 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
2540 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
2542 * tests/du/inacc-dest: Skip this test when running as root.
2544 2006-11-23 Jim Meyering <jim@meyering.net>
2546 * announce-gen: Remove file. It's moving to gnulib.
2547 * bootstrap: Pull it from gnulib/build-aux instead.
2548 * Makefile.maint (announcement): Reflect move to ./build-aux.
2550 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
2551 rather than a pipeline that would sometimes evoke a diagnostic
2552 like "seq: write error: Broken pipe".
2554 * tests/help-version: Suppress dd transfer rate output.
2556 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
2558 2006-11-22 Jim Meyering <jim@meyering.net>
2560 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
2561 change "(:?..." to "(?:..." in regexps.
2563 Post-release version change.
2564 * NEWS: Add a line for 6.7-pre.
2565 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
2568 * NEWS: Record release date. Remove "-pre" suffix.
2569 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
2571 * announce-gen: Remove unused --release-archive-directory option.
2572 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
2574 Match version numbers in NEWS using tighter regular expressions.
2575 (main): Require the --gpg-key-id=ID option.
2576 * Makefile.maint (announcement): Don't use now-removed
2577 --release-archive-directory=... option.
2579 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
2581 2006-11-21 Jim Meyering <jim@meyering.net>
2583 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
2584 skip the test rather than failing. Reported by Michael Deutschmann.
2586 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
2587 rather than just "exit N".
2589 Arrange for "make check-root" to run the new root-only test.
2590 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
2593 2006-11-20 Jim Meyering <jim@meyering.net>
2595 Add a root-only test for today's lib/idcache.c fix.
2596 * tests/ls/nameless-uid: New file.
2597 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
2598 (TESTS_ENVIRONMENT): Add PERL to the list.
2600 2006-11-19 Jim Meyering <jim@meyering.net>
2602 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
2603 find the 7-second sleep annoyingly long. Besides, this test is
2604 probably far too specific and timing sensitive ever to trigger again.
2605 * tests/tail-2/assert: Likewise.
2607 Post-release version change.
2608 * NEWS: Add a line for 6.6-pre.
2609 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
2612 * NEWS: Record release date. Remove "-cvs" suffix.
2613 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2615 2006-11-18 Jim Meyering <jim@meyering.net>
2617 "ln --backup f f" produces a misleading diagnostic:
2618 ln: creating hard link `f' => `f': No such file or directory
2619 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
2620 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
2621 * tests/ln/Makefile.am (TESTS): Add hard-backup.
2622 * tests/ln/hard-backup: New test for the above.
2623 * NEWS: Mention this fix.
2625 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
2627 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
2629 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
2630 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
2631 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
2632 Omit unnecessary parenthesization of args.
2633 * src/od.c (EQUAL_BLOCKS): Likewise.
2634 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
2636 2006-11-16 Jim Meyering <jim@meyering.net>
2638 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
2639 automake we're skipping this test), and give a diagnostic to tell
2640 the user the same thing. Reported by Mike Grayson.
2642 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2644 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
2645 with `$(MAN)', computed at configure time; also, list them ...
2646 (optional_mans): ... in this new variable.
2647 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
2649 2006-11-16 Jim Meyering <jim@meyering.net>
2651 Help valgrind see that there is no leak in dd.c.
2652 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
2653 so we need not free them at all. This is easier than freeing
2654 both buffers at each of the early "return"s.
2656 * src/csplit.c (load_buffer): Plug an inconsequential leak.
2658 2006-11-15 Jim Meyering <jim@meyering.net>
2660 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
2661 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
2663 2006-11-14 Jim Meyering <jim@meyering.net>
2665 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
2666 remove the now-unnecessary use of AC_LIBSOURCES.
2668 Adapt to new version of gnulib-tool.
2669 * gl/modules/root-dev-ino: New file.
2670 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
2671 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
2672 * m4/root-dev-ino.m4: Move this file ...
2673 * gl/m4/root-dev-ino.m4: ... to here.
2675 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
2677 2006-11-13 Jim Meyering <jim@meyering.net>
2679 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
2682 Plug another technically-unimportant leak in sort.
2683 * src/sort.c (main): Don't allocate memory for each new key here.
2684 (insertkey): Allocate memory for each key here, instead.
2685 (key_init): Rename from new_key. Don't allocate.
2687 * src/sort.c (main): Plug a tiny memory leak.
2688 Move declaration of local "minus" down to be nearer point of use.
2690 2006-11-12 Jim Meyering <jim@meyering.net>
2692 du would exit early, when encountering an inaccessible directory
2693 Reported by Mike Frysinger, in
2694 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
2695 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
2696 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
2697 diagnostic from the expected output when using native fdopendir.
2698 * tests/chmod/no-x: Likewise.
2699 * tests/du/no-x: Likewise.
2700 * NEWS: Mention this bug fix.
2701 * tests/du/Makefile.am (TESTS): Add inacc-dest.
2703 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
2704 for xalloc.h itself.
2706 Avoid false-positive when testing via valgrind.
2707 * tests/mv/atomic: Grep strace output for a more specific pattern
2708 than just "unlink", since that got a false positive when testing
2709 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
2710 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
2712 2006-10-28 Jim Meyering <jim@meyering.net>
2714 * Makefile.maint (patch-check): Make it easier to regenerate
2715 the src/c99-to-c89.diff file. E.g., I do this:
2716 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
2718 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
2720 2006-10-26 Jim Meyering <jim@meyering.net>
2722 * src/system.h (ftello): Add a compile-time check for the highly
2723 unlikely condition of off_t narrower than long int, rather than
2724 handling it at run time. Based on a patch from Paul Eggert.
2726 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
2728 * tests/chmod/c-option: When double-quoting part of a word, prefer
2729 to double-quote the whole word. This is a bit easier to read (at
2730 least for me), and in some cases it avoids a shell bug with Tru64
2731 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
2732 "$abs_srcdir"/../setgid-check we now write
2733 "$abs_srcdir/../setgid-check".
2734 * tests/cp/cp-parents: Likewise.
2735 * tests/du/inaccessible-cwd: Likewise.
2736 * tests/du/long-from-unreadable: Likewise.
2737 * tests/install/basic-1: Likewise.
2738 * tests/install/trap: Likewise.
2739 * tests/misc/close-stdout: Likewise.
2740 * tests/mkdir/concurrent-1: Likewise.
2741 * tests/mkdir/p-1: Likewise.
2742 * tests/mkdir/p-3: Likewise.
2743 * tests/mkdir/parents: Likewise.
2744 * tests/mkdir/perm: Likewise.
2745 * tests/readlink/can-e: Likewise.
2746 * tests/readlink/can-f: Likewise.
2747 * tests/readlink/can-m: Likewise.
2748 * tests/rm/inaccessible: Likewise.
2749 * tests/rm/unread3: Likewise.
2750 * tests/touch/no-create-missing: Likewise.
2752 * lib/.cvsignore: Add uinttostr.c.
2754 2006-10-25 Jim Meyering <jim@meyering.net>
2756 Portability to Tru64 V4.0.
2757 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
2758 Define inline replacement function.
2759 This (along with a yesterday's fix for autoconf's
2760 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
2761 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
2763 2006-10-25 Bruno Haible <bruno@clisp.org>
2765 * src/cat.c (infile): Add "const" to declaration.
2766 * src/csplit.c (prefix): Likewise.
2767 * src/printf.c (cfcc_msg): Likewise.
2768 * src/tail.c (valid_file_spec): Likewise.
2769 * src/cut.c (cut_file): Likewise, for a parameter.
2770 * src/expr.c (str_value): Likewise.
2771 * src/fold.c (fold_file): Likewise.
2772 * src/pr.c (init_header): Likewise.
2773 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
2774 * src/tr.c (make_printable_str): Likewise.
2775 * src/nl.c (body_type, header_type, footer_type, current_type):
2776 (separator_str, build_type_arg, nl_file): Likewise, for many.
2777 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
2778 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
2780 2006-10-25 Jim Meyering <jim@meyering.net>
2782 * tests/sample-test: Update copyright year list to include only
2783 the current year, since this is what I'll want in any new test.
2785 2006-10-24 Jim Meyering <jim@meyering.net>
2787 * src/c99-to-c89.diff: Update to reflect new offsets.
2789 * NEWS: new feature: rm accepts new option: --one-file-system
2790 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
2791 * src/remove.h (struct rm_options) [one_file_system]: New member.
2792 * src/rm.c (rm_option_init): Initialize it.
2793 (usage): Document the option.
2794 * src/mv.c (rm_option_init): Likewise.
2795 * src/remove.c (remove_dir): With --one-file-system and --recursive,
2796 for each directory command line argument, do not affect a file system
2797 different from that of the starting directory. And give a diagnostic.
2798 * src/rm.c (ONE_FILE_SYSTEM): New enum.
2799 (main): Handle new option.
2800 * tests/rm/one-file-system: Test the above.
2801 * tests/rm/Makefile.am (TESTS): Add one-file-system.
2802 * tests/Makefile.am (check-root): Add the rm/one-file-system
2804 (EXTRA_DIST): Add other-fs-tmpdir.
2806 * tests/mv/setup: Removed. Renamed to...
2807 * tests/other-fs-tmpdir: ...this new file.
2808 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
2809 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
2810 * tests/mv/backup-is-src: Likewise.
2811 * tests/mv/hard-link-1: Likewise.
2812 * tests/mv/leak-fd: Likewise.
2813 * tests/mv/mv-special-1: Likewise.
2814 * tests/mv/part-fail: Likewise.
2815 * tests/mv/part-hardlink: Likewise.
2816 * tests/mv/part-rename: Likewise.
2817 * tests/mv/part-symlink: Likewise.
2818 * tests/mv/partition-perm: Likewise.
2819 * tests/mv/to-symlink: Likewise.
2820 * tests/mv/into-self-2: Likewise.
2822 Don't let a failure in one test stop "make -k" from running the others.
2823 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
2824 (check-root): Depend on them, rather than executing the five
2825 commands in a single rule. Reported by Greg Schafer.
2827 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
2829 * Makefile.maint (alpha beta major): Use a better log message for
2830 the automatic commit of .prev-version.
2832 2006-10-23 Jim Meyering <jim@meyering.net>
2834 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
2835 pwd via a shell. Instead, ensure that the absolute name of the
2836 pwd binary consists solely of reasonable characters.
2837 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
2838 clean-up code isn't run.
2840 * NEWS: Add a line for 6.5-cvs.
2841 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
2843 2006-10-22 Jim Meyering <jim@meyering.net>
2847 * NEWS: Record the 6.4 release date.
2848 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2850 * Makefile.maint: Complete the adaptation to function with a working
2851 directory that is using git (rather than cvs) for version control.
2853 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2855 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
2856 * tests/cp/cp-parents: Likewise.
2857 * tests/mkdir/parents: Likewise.
2858 * tests/mkdir/perm: Likewise.
2860 * tests/sample-test: Quote variables containing absolute build
2861 tree paths. In the cleanup trap, make sure `cd' succeeds before
2862 `chmod'ing and `rm'ing the temporary files.
2863 * tests/chgrp/basic: Likewise.
2864 * tests/chgrp/deref: Likewise.
2865 * tests/chgrp/no-x: Likewise.
2866 * tests/chgrp/posix-H: Likewise.
2867 * tests/chgrp/recurse: Likewise.
2868 * tests/chmod/c-option: Likewise.
2869 * tests/chmod/equal-x: Likewise.
2870 * tests/chmod/equals: Likewise.
2871 * tests/chmod/inaccessible: Likewise.
2872 * tests/chmod/no-x: Likewise.
2873 * tests/chmod/octal: Likewise.
2874 * tests/chmod/setgid: Likewise.
2875 * tests/chmod/umask-x: Likewise.
2876 * tests/chmod/usage: Likewise.
2877 * tests/chown/basic: Likewise.
2878 * tests/chown/deref: Likewise.
2879 * tests/chown/separator: Likewise.
2880 * tests/cp/acl: Likewise.
2881 * tests/cp/backup-1: Likewise.
2882 * tests/cp/backup-dir: Likewise.
2883 * tests/cp/backup-is-src: Likewise.
2884 * tests/cp/cp-HL: Likewise.
2885 * tests/cp/cp-deref: Likewise.
2886 * tests/cp/cp-i: Likewise.
2887 * tests/cp/cp-mv-backup: Likewise.
2888 * tests/cp/cp-parents: Likewise.
2889 * tests/cp/deref-slink: Likewise.
2890 * tests/cp/dir-rm-dest: Likewise.
2891 * tests/cp/dir-slash: Likewise.
2892 * tests/cp/dir-vs-file: Likewise.
2893 * tests/cp/fail-perm: Likewise.
2894 * tests/cp/into-self: Likewise.
2895 * tests/cp/link: Likewise.
2896 * tests/cp/link-no-deref: Likewise.
2897 * tests/cp/link-preserve: Likewise.
2898 * tests/cp/no-deref-link1: Likewise.
2899 * tests/cp/no-deref-link2: Likewise.
2900 * tests/cp/no-deref-link3: Likewise.
2901 * tests/cp/perm: Likewise.
2902 * tests/cp/preserve-2: Likewise.
2903 * tests/cp/r-vs-symlink: Likewise.
2904 * tests/cp/same-file: Likewise.
2905 * tests/cp/slink-2-slink: Likewise.
2906 * tests/cp/sparse: Likewise.
2907 * tests/cp/special-bits: Likewise.
2908 * tests/cp/src-base-dot: Likewise.
2909 * tests/cp/symlink-slash: Likewise.
2910 * tests/dd/not-rewound: Likewise.
2911 * tests/dd/skip-seek2: Likewise.
2912 * tests/dd/unblock-sync: Likewise.
2913 * tests/du/2g: Likewise.
2914 * tests/du/8gb: Likewise.
2915 * tests/du/basic: Likewise.
2916 * tests/du/deref: Likewise.
2917 * tests/du/deref-args: Likewise.
2918 * tests/du/exclude: Likewise.
2919 * tests/du/fd-leak: Likewise.
2920 * tests/du/hard-link: Likewise.
2921 * tests/du/inaccessible-cwd: Likewise.
2922 * tests/du/long-from-unreadable: Likewise.
2923 * tests/du/long-sloop: Likewise.
2924 * tests/du/no-deref: Likewise.
2925 * tests/du/no-x: Likewise.
2926 * tests/du/restore-wd: Likewise.
2927 * tests/du/slash: Likewise.
2928 * tests/du/slink: Likewise.
2929 * tests/du/trailing-slash: Likewise.
2930 * tests/du/two-args: Likewise.
2931 * tests/fmt/long-line: Likewise.
2932 * tests/install/basic-1: Likewise.
2933 * tests/install/create-leading: Likewise.
2934 * tests/install/d-slashdot: Likewise.
2935 * tests/install/trap: Likewise.
2936 * tests/ln/misc: Likewise.
2937 * tests/ln/target-1: Likewise.
2938 * tests/ls/color-dtype-dir: Likewise.
2939 * tests/ls/dangle: Likewise.
2940 * tests/ls/dired: Likewise.
2941 * tests/ls/file-type: Likewise.
2942 * tests/ls/follow-slink: Likewise.
2943 * tests/ls/infloop: Likewise.
2944 * tests/ls/inode: Likewise.
2945 * tests/ls/m-option: Likewise.
2946 * tests/ls/no-arg: Likewise.
2947 * tests/ls/recursive: Likewise.
2948 * tests/ls/rt-1: Likewise.
2949 * tests/ls/stat-dtype: Likewise.
2950 * tests/ls/stat-failed: Likewise.
2951 * tests/ls/stat-vs-dirent: Likewise.
2952 * tests/misc/cat-proc: Likewise.
2953 * tests/misc/close-stdout: Likewise.
2954 * tests/misc/csplit: Likewise.
2955 * tests/misc/date-sec: Likewise.
2956 * tests/misc/false-status: Likewise.
2957 * tests/misc/head-c: Likewise.
2958 * tests/misc/head-pos: Likewise.
2959 * tests/misc/mknod: Likewise.
2960 * tests/misc/nl: Likewise.
2961 * tests/misc/nohup: Likewise.
2962 * tests/misc/pathchk1: Likewise.
2963 * tests/misc/printf: Likewise.
2964 * tests/misc/printf-hex: Likewise.
2965 * tests/misc/pwd-long: Likewise.
2966 * tests/misc/shuf: Likewise.
2967 * tests/misc/sort-rand: Likewise.
2968 * tests/misc/split-a: Likewise.
2969 * tests/misc/split-fail: Likewise.
2970 * tests/misc/split-l: Likewise.
2971 * tests/misc/stat-fmt: Likewise.
2972 * tests/misc/tac-continue: Likewise.
2973 * tests/misc/wc-files0: Likewise.
2974 * tests/mkdir/concurrent-1: Likewise.
2975 * tests/mkdir/p-1: Likewise.
2976 * tests/mkdir/p-2: Likewise.
2977 * tests/mkdir/p-3: Likewise.
2978 * tests/mkdir/p-slashdot: Likewise.
2979 * tests/mkdir/p-thru-slink: Likewise.
2980 * tests/mkdir/p-v: Likewise.
2981 * tests/mkdir/parents: Likewise.
2982 * tests/mkdir/perm: Likewise.
2983 * tests/mkdir/t-slash: Likewise.
2984 * tests/mv/acl: Likewise.
2985 * tests/mv/atomic: Likewise.
2986 * tests/mv/backup-dir: Likewise.
2987 * tests/mv/childproof: Likewise.
2988 * tests/mv/diag: Likewise.
2989 * tests/mv/dir-file: Likewise.
2990 * tests/mv/dir2dir: Likewise.
2991 * tests/mv/dup-source: Likewise.
2992 * tests/mv/hard-2: Likewise.
2993 * tests/mv/hard-3: Likewise.
2994 * tests/mv/hard-4: Likewise.
2995 * tests/mv/hard-link-1: Likewise.
2996 * tests/mv/hard-verbose: Likewise.
2997 * tests/mv/i-2: Likewise.
2998 * tests/mv/i-3: Likewise.
2999 * tests/mv/i-4: Likewise.
3000 * tests/mv/i-5: Likewise.
3001 * tests/mv/i-link-no: Likewise.
3002 * tests/mv/into-self-4: Likewise.
3003 * tests/mv/leak-fd: Likewise.
3004 * tests/mv/mv-special-1: Likewise.
3005 * tests/mv/no-target-dir: Likewise.
3006 * tests/mv/part-fail: Likewise.
3007 * tests/mv/part-hardlink: Likewise.
3008 * tests/mv/part-rename: Likewise.
3009 * tests/mv/part-symlink: Likewise.
3010 * tests/mv/partition-perm: Likewise.
3011 * tests/mv/perm-1: Likewise.
3012 * tests/mv/reply-no: Likewise.
3013 * tests/mv/trailing-slash: Likewise.
3014 * tests/mv/update: Likewise.
3015 * tests/od/od-N: Likewise.
3016 * tests/od/x8: Likewise.
3017 * tests/readlink/can-e: Likewise.
3018 * tests/readlink/can-f: Likewise.
3019 * tests/readlink/can-m: Likewise.
3020 * tests/readlink/rl-1: Likewise.
3021 * tests/rm/cycle: Likewise.
3022 * tests/rm/dangling-symlink: Likewise.
3023 * tests/rm/deep-1: Likewise.
3024 * tests/rm/dir-no-w: Likewise.
3025 * tests/rm/dir-nonrecur: Likewise.
3026 * tests/rm/dot-rel: Likewise.
3027 * tests/rm/empty-inacc: Likewise.
3028 * tests/rm/f-1: Likewise.
3029 * tests/rm/fail-2eperm: Likewise.
3030 * tests/rm/hash: Likewise.
3031 * tests/rm/i-1: Likewise.
3032 * tests/rm/i-no-r: Likewise.
3033 * tests/rm/ignorable: Likewise.
3034 * tests/rm/inaccessible: Likewise.
3035 * tests/rm/interactive-always: Likewise.
3036 * tests/rm/interactive-once: Likewise.
3037 * tests/rm/ir-1: Likewise.
3038 * tests/rm/isatty: Likewise.
3039 * tests/rm/no-give-up: Likewise.
3040 * tests/rm/r-1: Likewise.
3041 * tests/rm/r-2: Likewise.
3042 * tests/rm/r-3: Likewise.
3043 * tests/rm/r-4: Likewise.
3044 * tests/rm/readdir-bug: Likewise.
3045 * tests/rm/rm1: Likewise.
3046 * tests/rm/rm2: Likewise.
3047 * tests/rm/rm3: Likewise.
3048 * tests/rm/rm4: Likewise.
3049 * tests/rm/rm5: Likewise.
3050 * tests/rm/sunos-1: Likewise.
3051 * tests/rm/unread2: Likewise.
3052 * tests/rm/unread3: Likewise.
3053 * tests/rmdir/fail-perm: Likewise.
3054 * tests/rmdir/t-slash: Likewise.
3055 * tests/shred/exact: Likewise.
3056 * tests/shred/remove: Likewise.
3057 * tests/sum/sysv: Likewise.
3058 * tests/tail-2/append-only: Likewise.
3059 * tests/tail-2/assert: Likewise.
3060 * tests/tail-2/assert-2: Likewise.
3061 * tests/tail-2/big-4gb: Likewise.
3062 * tests/tail-2/fflush: Likewise.
3063 * tests/tail-2/infloop-1: Likewise.
3064 * tests/tail-2/proc-ksyms: Likewise.
3065 * tests/tail-2/start-middle: Likewise.
3066 * tests/tail-2/tail-n0f: Likewise.
3067 * tests/tee/basic: Likewise.
3068 * tests/tee/dash: Likewise.
3069 * tests/touch/fail-diag: Likewise.
3070 * tests/touch/no-create-missing: Likewise.
3071 * tests/touch/not-owner: Likewise.
3072 * tests/touch/obsolescent: Likewise.
3073 * tests/touch/read-only: Likewise.
3074 * tests/touch/relative: Likewise.
3076 2006-10-21 Jim Meyering <jim@meyering.net>
3078 * NEWS: (cp --backup fix): Fix a typo.
3080 * .gitignore: Remove some references to files in subdirectories.
3081 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
3082 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
3084 * src/copy.c (copy_internal): Add a comment saying why we prefer
3087 Enable an fts optimization (call lstat only for directories,
3088 on some file system types) also with the --preserve-root option
3090 * src/chown-core.c (change_file_owner): Compare fts_statp-based
3091 dev/ino against root dev/ino only for directories.
3092 (chown_files): Don't let the root_dev_ino setting influence whether
3093 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
3095 2006-10-20 Jim Meyering <jim@meyering.net>
3097 * src/od.c (usage): Change description of default to use "-w16",
3098 not the now-invalid "-w 16" syntax. From Dan Jacobson.
3100 2006-10-19 Jim Meyering <jim@meyering.net>
3102 * bootstrap: Add names to each .gitignore file (if it exists)
3103 as well as to .cvsignore.
3105 * Makefile.maint (po-check): This rule didn't detect the new use
3106 of "gettext" (as opposed to the use of "_" everywhere else) in
3107 lib/xstrtol.h. Adjust the grep regexp so that now it does.
3109 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
3111 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
3112 when opening dst_name.
3113 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
3114 (SYSCALL) to test for failure in a system call.
3116 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
3117 a fifo. This preserves the special mode bits on Solaris 10, which
3118 is compatible with what Solaris 10 cp -R does.
3120 * src/copy.c (copy_internal): Remove redundant and confusing local
3123 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
3124 7777. This matches historical 'cp' behavior and avoids some
3125 (though not all) implementation-defined behavior of mkdir.
3126 * src/cp.c (make_dir_parents_private): Likewise.
3127 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
3128 than 777. This is required by POSIX. It doesn't make any difference
3129 in actual behavior on any host that I know of.
3131 2006-10-17 Jim Meyering <jim@meyering.net>
3133 * src/dd.c (usage): Use two spaces (not one) to separate the
3134 "fdatasync" option string from its description, so help2man formats
3135 the derived man page properly. Reported by Samuel Thibault
3136 in <http://bugs.debian.org/393649>.
3138 2006-10-16 Jim Meyering <jim@meyering.net>
3140 * .x-sc_trailing_blank: Remove names of files that are no longer
3143 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
3145 * src/groups.sh (version): Reword message to match the other programs.
3146 Problem reported by Eric Blake.
3148 2006-10-14 Jim Meyering <jim@meyering.net>
3150 * Makefile.maint (headers_with_interesting_macro_defs): Define.
3151 (.re-defmac, sc_always_defined_macros): New rules.
3153 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
3154 Instead, include "exit.h". This hereby retires the work-around for
3155 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
3157 * src/cksum.c (uint_fast32_t): Don't define.
3158 Instead, include <stdint.h>.
3160 * src/pinky.c (S_IWGRP): Don't define.
3161 It's already defined by "stat-macros.h" (included via system.h).
3163 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
3164 * Makefile.maint: Likewise, remove these targets/rules/variables:
3165 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
3166 (cvs_files, wget-update, automake_repo): Likewise.
3167 Move the comment about cvsu to build-aux/vc-list-files,
3168 where cvsu is actually used.
3170 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
3172 Work also when the working directory (with e.g. coreutils sources)
3173 is version controlled with git, rather than CVS.
3174 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3176 In messages and comments, say e.g., "checked-out sources",
3177 rather than "CVS sources".
3178 (version_controlled_file): New function. Work for git as well as
3179 for CVS. Don't use grep's -q option.
3180 (slurp): Call it here, in place of CVS-specific code.
3182 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
3184 * src/copy.c (copy_internal): Although we do create a backup of each
3185 destination directory when in move mode, don't do that when copying.
3186 Reported by Peter Breitenlohner, in
3187 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
3188 * tests/cp/backup-dir: New file. Test for the above.
3189 * tests/cp/Makefile.am (TESTS): Add backup-dir.
3191 2006-10-13 Jim Meyering <jim@meyering.net>
3193 More chown/chgrp dereferencing-related fixes.
3194 * src/chown-core.c (change_file_owner): Don't use fts_statp if
3195 we're dereferencing symlinks.
3196 Reverse conjuncts, so that we use dereference file_stats
3197 (aka ent->fts_statp) only *after* we've confirmed that
3198 chopt->affect_symlink_referent is true. Otherwise, we might
3199 use ent->fts_statp uninitialized.
3200 Don't turn on FTS_NOSTAT when dereferencing symlinks.
3201 * tests/chown/deref: Update the expected diagnostic, now that
3202 this test case (trying to use "chown --dereference ..." on a
3203 dangling symlink) takes a different code path.
3205 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
3207 Sync from Bison, as follows:
3209 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3211 Fix problems with translating English-language diagnostics.
3212 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3213 respect to bison-runtime pot generation. The YY_ stuff
3214 wasn't being captured.
3216 2006-10-13 Jim Meyering <jim@meyering.net>
3218 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
3219 now that we're using fts_open with FTS_CWDFD.
3220 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
3221 chgrp, to exercise the above fix.
3222 * NEWS: Mention the above.
3224 * src/du-tests: Clean up a little, though it's still not portable.
3226 * .vg-suppressions: Add 3 more for debian unstable.
3228 * tests/ls/Test.pm: Remove long-unused file.
3229 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
3230 Suggestions from Bruno Haible.
3232 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3234 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
3235 (MAINTAINERCLEANFILES): Add .kludge-stamp.
3236 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
3237 instead of $(man_MANS).
3239 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3241 * configure.ac: Avoid compiler warnings about default return
3242 type in function definitions and unused variables in tests.
3243 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
3244 if this is #defined.
3246 2006-10-12 Jim Meyering <jim@meyering.net>
3248 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
3249 Call gl_INIT directly, rather than through the above.
3251 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3253 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3254 variable was sometimes used without being initialized. This
3255 messed up the installation of the INSTALL file in some cases.
3257 2006-10-11 Jim Meyering <jim@meyering.net>
3259 * src/ls.c (usage): Correct description of -s, --size.
3260 It works even without -l. Suggestion from Karl Berry.
3262 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
3264 * src/ls.c (quote_name): Use initializer rather than memset to
3265 initialize an object to zero. This is easier to read and is less
3266 likely to introduce a runtime error due to a mixup. It causes
3267 gcc -W to issue a warning, but you can work around this by
3268 appending -Wno-missing-field-initializers.
3269 * src/pathchk.c (portable_chars_only): Likewise.
3270 * src/shred.c (main): Likewise.
3271 * src/stty.c (main): Likewise.
3272 * src/tr.c (card_of_complement): Likewise.
3273 * src/wc.c (wc): Likewise.
3275 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3277 * src/sort.c (usage): Mention again that sort fields are origin 1.
3279 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
3282 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3283 --copy. Inspired by a suggestion from Bruno Haible.
3285 2006-10-09 Jim Meyering <jim@meyering.net>
3287 Avoid a compiler warning.
3288 * src/pathchk.c (portable_chars_only): Initialize variable of type
3289 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
3291 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
3293 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
3294 wrong file name in some cases. Lars Wendler reported a bug in
3296 * src/install.c (make_ancestor): New arg COMPONENT.
3297 * src/mkdir.c (make_ancestor): Likewise.
3298 * tests/install/basic-1: Check for install -Dv bug.
3299 * tests/mkdir/Makefile.am (TESTS): Add p-v.
3300 * tests/mkdir/p-v: New file, to test this bug.
3302 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3304 * src/chgrp.c: Don't include lchown.h; no longer needed.
3305 * src/chown.c: Likewise.
3307 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
3308 current file system has useful d_type info.
3310 * src/dd.c (flags): noatime and nofollow now depend on
3311 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
3312 (usage): Output info about noatime and nofollow only if
3313 they are known to work.
3314 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
3315 than O_NOFOLLOW, when testing whether it's possible to avoid a
3316 race condition reliably.
3318 2006-10-05 Jim Meyering <jim@meyering.net>
3320 * src/c99-to-c89.diff: Update to reflect new offsets.
3322 * tests/install/basic-1: Skip the latter part of this test if the
3323 just-built dd binary is not readable. Otherwise, this test would fail
3324 when binaries were created as root. Reported by Bauke Jan Douma in
3325 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
3327 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
3329 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
3330 MiB, since XFS hosts can legitimately have large values of
3331 st_blksize. Problem reported by Tony Ernst in
3332 <http://savannah.gnu.org/bugs/?17903>.
3334 2006-10-04 Jim Meyering <jim@meyering.net>
3336 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
3337 Paul Eggert pointed out that the specified file may exist,
3338 in spite of such an errno value.
3339 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
3340 * tests/rm/ignore-name-too-long: Remove file.
3341 * NEWS: Update here, too.
3343 2006-10-03 Jim Meyering <jim@meyering.net>
3345 * tests/rm/fail-eperm: Report failure also if rm is terminated by
3348 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
3349 and one in shred.c -- that were added before coreutils-6.3.
3350 Reported by Michael Deutschmann.
3352 * src/c99-to-c89.diff: Update to reflect new offsets.
3354 * src/remove.c (remove_entry): With -f, exit successfully in spite
3355 of a missing file under some very unusual conditions (with errno
3356 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
3358 With --force (-f), rm no longer fails for ENOTDIR.
3359 * src/remove.c (ignorable_missing): New function.
3360 Use it everywhere, rather than open-coding the test.
3361 Andreas Schwab reported the ENOTDIR problem.
3362 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
3364 * NEWS: Mention the bug fix.
3365 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
3366 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
3367 * tests/rm/Makefile.am (TESTS): Add the new file names.
3369 * bootstrap: Undo last change to this file, since now gnulib-tool
3370 sticks with the automake default in generating dependencies.
3372 * NEWS: Add a line for 6.4-cvs.
3373 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
3375 2006-09-30 Jim Meyering <jim@meyering.net>
3378 * NEWS: Record the 6.3 release date.
3379 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3381 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
3383 * src/c99-to-c89.diff: Update offsets.
3385 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3387 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
3388 as it doesn't work with Solaris /bin/sh.
3390 2006-09-29 Jim Meyering <jim@meyering.net>
3392 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
3395 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
3396 use .1 as the increment. Actual output varies too much.
3397 [eq-wid-3]: New, commented out test.
3399 * src/shuf.c (read_input): Fix an off-by-one error that
3400 would cause an infloop for piped input of 8KB or more.
3401 * NEWS: Mention the fix.
3402 * tests/misc/shuf: Test for the above fix.
3404 Since any system may be affected by the Darwin readdir bug,
3405 perform the extra rewinddir unconditionally. The performance
3406 impact of rewinding a directory is negligible.
3407 * src/remove.c (NEED_REWIND): Define to use
3408 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
3410 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
3411 increment translates to a slightly larger value.
3412 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
3413 The final expected value wasn't being printed.
3415 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
3416 and NFS, whereby rm would not remove all files in a directory.
3417 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
3418 (NEED_REWIND): New macro, so that we incur the cost of the work-around
3419 rewinddir only on afflicted systems.
3420 * NEWS: Clarify and correct.
3421 * tests/rm/readdir-bug: New file. Test for the above fix.
3422 * tests/rm/Makefile.am (TESTS): Add it.
3423 Prompted by testing and analysis from Bruno Haible:
3424 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
3426 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
3428 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
3429 suggested for Debian stable, which uses Perl 5.8.4.
3431 2006-09-28 Jim Meyering <jim@meyering.net>
3433 Automatically generated dependencies are important even
3434 when all of the sources in a directory come from gnulib.
3435 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3436 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3438 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
3439 Ensure that IFS is set properly and unset PATH.
3441 Work properly even when the name of the selected file starts with "-".
3442 Invoke rm via "../../src/rm", and adjust expected output.
3443 Prompted by a patch from Tim Waugh.
3445 * README-cvs: Add Bison to the list of required packages.
3447 2006-09-26 Jim Meyering <jim@meyering.net>
3449 * src/c99-to-c89.diff: Update offsets.
3451 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
3452 it from removing a directory containing 188 or more entries.
3453 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
3454 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
3455 Reported by Matthew Woehlke.
3457 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
3459 * NEWS: "groups user" no longer outputs "user :"; you need at least
3460 two users. "groups" now processes options like --help more compatibly.
3461 * src/groups.sh: Implement the option-processing change.
3462 Handle user and group names with special characters more robustly.
3463 Report write errors instead of exiting silently with status 1.
3465 2006-09-26 Jim Meyering <jim@meyering.net>
3467 * README: Warn not to run autoreconf manually. Use bootstrap instead.
3469 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
3470 Rewrite to avoid using temporary, $status.
3472 * NEWS: Mention the bug fix.
3473 * src/groups.sh: Don't hide a write failure.
3474 Reported by Iain Calder <ic56@rogers.com>.
3476 2006-09-25 Jim Meyering <jim@meyering.net>
3478 * src/chown.c (usage): Clarify --dereference description.
3479 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
3481 2006-09-24 Jim Meyering <jim@meyering.net>
3483 * NEWS: Mention these fixes.
3484 * src/copy.c (copy_reg): With --verbose (-v), print
3485 "removed `file_name'" just after unlinking a file.
3486 (copy_internal): Likewise, in three more places.
3487 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
3488 * tests/mv/hard-verbose: New file. Test for the above fix.
3489 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
3491 * tests/help-version (sync_args): Don't call sync, since it spins up
3492 disks that I've deliberately caused to spin down (but not unmounted).
3494 * NEWS: Mention the improvement to sort.
3496 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
3497 as well as existing.
3499 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
3500 since that predated addition of d_type support.
3502 2006-09-23 Jim Meyering <jim@meyering.net>
3504 * gl/modules/getloadavg.diff: New file. Work around the way the latest
3505 version of the getloadavg module interacts with our bootstrap script.
3506 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3507 * Makefile.am (EXTRA_DIST): Sort file names.
3508 Add bootstrap and gl/modules/getloadavg.diff
3510 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3512 * bootstrap: Add support for --force.
3513 (usage): New function. Describe usage less tersely.
3514 (CVS_only_file): New var.
3516 * NEWS: Document fix for cp -i and mv -i.
3517 * src/copy.c (copy_internal): With -i, prompt even if the source
3518 is a directory and the destination is not. This is required by
3519 POSIX and gives the user a chance to bail out before failing.
3520 * tests/cp/Makefile.am (TESTS): Add cp-i.
3521 * tests/cp/cp-i: New file.
3522 * tests/mv/Makefile.am (TESTS): Add i-5.
3523 * tests/mv/i-5: New file.
3525 2006-09-20 Jim Meyering <jim@meyering.net>
3527 * NEWS: Mention the chmod bug fix.
3529 * tests/chmod/inaccessible: New test, specifically for this bug.
3530 Based on a test case from Paul Eggert.
3531 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
3533 Fix the 2006-09-18 bug differently.
3534 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
3535 tell fts_read to stat the file again, in case it has become
3536 accessible since the initial fts_open call.
3537 * src/chown-core.c (change_file_owner): Likewise.
3539 * src/chmod.c: Revert last change. There is a better way.
3540 * src/chown-core.c: Likewise.
3542 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
3544 * src/ln.c (target_directory_operand): Rewrite to avoid porting
3545 problem on Tandem reported by Matthew Woehlke in
3546 <https://savannah.gnu.org/bugs/?17172>.
3548 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3550 Fix bug where chmod, chown, and chgrp did not process operands
3551 left-to-right in some cases.
3552 * src/chmod.c (wd_errno): New var.
3553 (chmod_file): New function, with most of the contents of the
3554 old prcess_file function.
3555 (process_files): Use it. This gives file names to fts one
3556 at a time, so that they are processed left-to-right as POSIX
3558 * src/chown-core.c (wd_errno, chown_files): Likewise.
3559 (chown_file): New function.
3560 * tests/install/basic-1: Redo test so as to not workaround
3561 the chmod bug, thereby testing for it.
3563 * src/shuf.c (main): Quote the entire range when reporting an
3564 invalid one, rather than just the part that contained the error.
3566 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
3567 sometimes left behind if the test is skipped or interrupted.
3569 * bootstrap (symlink_to_gnulib): New function.
3570 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3571 to copies-of-gnulib.
3572 (cp_mark_as_generated, slurp, gnulib_files):
3573 Avoid making a copy if it's the same as the old version.
3574 (gnulib_files): Add support for this variable (used by Bison).
3576 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
3577 indicating flaw in kernel. Reword to say that the flaw isn't
3578 serious for coreutils, since the flaw does affect ls -i.
3580 * tests/chgrp/basic: Fix bug in test case exposed by building on
3581 Solaris 8 in a setgid directory. The test case incorrectly
3582 assumed that 'symlink' would be in group $g1.
3584 2006-09-18 Jim Meyering <jim@meyering.net>
3586 * NEWS: Add a line for 6.3-cvs.
3587 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
3590 * NEWS: Record the 6.2 release date.
3591 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3593 2006-09-17 Jim Meyering <jim@meyering.net>
3595 * tests/chgrp/basic: On an OpenBSD system, rather than failing
3596 due to a known problem, merely warn about it.
3597 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
3598 Instead, use stat to test file system for desired results, directly.
3599 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
3601 * tests/envvar-check: Add more variable names to the list of those
3602 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
3603 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
3605 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
3607 * NEWS: Document that mkdir -p and install -d now fork on occasion.
3608 * bootstrap.conf (gnulib_modules): Add savewd.
3609 * src/install.c: Include savewd.h.
3610 (process_dir): New function.
3611 (main, install_file_in_file_parents): Use it, along with the new
3612 savewd module, to avoid some race conditions.
3613 * src/mkdir.c: Include savewd.h.
3614 (struct mkdir_options): New members make_ancestor_function, mode,
3616 (make_ancestor): Return 1 if the resulting directory is not readable.
3617 (process_dir): New function.
3618 (main): Use it, along with new savewd module, to avoid some
3619 race conditions. Fill in new slots of struct mkdir_options, so
3620 that callees get the values.
3621 * tests/install/basic-1: Test for coreutils 5.97 bug that was
3622 fixed in coreutils 6.0, and which should still be fixed with
3624 * tests/mkdir/p-3: Likewise.
3626 2006-09-15 Jim Meyering <jim@meyering.net>
3628 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
3629 The 2006-09-08 changes made it so "mv dir new-name/" would
3630 fail on NetBSD 1.6. This makes it work once again.
3632 2006-09-14 Jim Meyering <jim@meyering.net>
3634 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
3635 Instead, since it's a little fragile, assert the condition.
3636 (target_directory_operand): Update comment to reflect latest change.
3638 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3640 * src/who.c (print_user): Rewrite to avoid warning from
3641 GCC 4.1.1 with -Wall.
3643 2006-09-12 Jim Meyering <jim@meyering.net>
3645 * tests/mv/atomic: Check for specific strace output, rather than
3646 simply nonempty. RHEL AS 4 would fail this test due to strace
3647 generating "[ Process PID=14434 runs in 32 bit mode. ]".
3648 Reported by Nelson Beebe.
3650 2006-09-11 Jim Meyering <jim@meyering.net>
3652 * src/remove.c (remove_dir): Move new cache_stat_init call onto
3654 (rm_1): Move declaration of "st" and new cache_stat_init call
3655 "down" to nearer where they're used.
3656 * src/c99-to-c89.diff: Add another set of curly braces.
3658 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
3660 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
3661 substr's last operand is very large. Performance problem reported
3664 2006-09-09 Jim Meyering <jim@meyering.net>
3666 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
3668 (sc_require_config_h): Skip this test if there are no version-
3669 controlled .c files.
3670 (sc_prohibit_assert_without_use): Likewise.
3672 2006-09-08 Jim Meyering <jim@meyering.net>
3674 * bootstrap: Export CVS_RSH separate from its assignment, to work
3675 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
3677 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
3679 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
3680 no file operand is given, and standard input is any FIFO.
3681 This is in response to Open Group XCU ERN 114.
3682 * src/tail.c (main): Likewise.
3684 2006-09-08 Jim Meyering <jim@meyering.net>
3686 mv and "cp -r" no longer fail when invoked with two arguments
3687 where the first one names a directory and the second name ends in
3688 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
3689 now succeeds, once more. This reverts part of the 2004-06-27
3691 * NEWS: Say the above.
3692 * src/mv.c (target_directory_operand): Don't require (here)
3693 that the target operand "look like" a directory. This change
3694 pushes the test down to the rename syscall level, where a
3695 "mv dir existing-non-dir/" will mistakenly succeed on older systems
3696 that ignore trailing slashes in the rename destination argument.
3697 * src/cp.c (target_directory_operand): Likewise, but for cp.
3698 * tests/mv/trailing-slash: Exercise the above fixes.
3699 * tests/cp/trailing-slash: New file.
3700 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
3702 * bootstrap: Use the previously unused variable, $src,
3703 to avoid repeating "$GNULIB_SRCDIR/$file".
3705 * bootstrap (cp_mark_as_generated): Don't use "local", to
3706 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
3707 Rename now-global "$src" and "$dst" to have cp_ prefix.
3708 Safer, and avoids confusion.
3710 * bootstrap (cp_mark_as_generated): New function.
3711 (slurp): Use it to prepend editor hints and a warning that
3712 the file we're copying is generated.
3713 Suggestion from Bruce Korb.
3714 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
3715 Fix last-minute typo.
3717 2006-09-07 Jim Meyering <jim@meyering.net>
3719 * bootstrap: Revert last change. There are less disruptive ways
3720 to mark these generated files as read-only.
3722 * src/c99-to-c89.diff: Update to have proper offsets.
3724 2006-09-06 Jim Meyering <jim@meyering.net>
3726 Ensure that some gnulib-tool-generated files are read-only.
3727 * bootstrap (slurp): Put the body of this function in a sub-shell,
3728 with "umask a-w" so that all new files are read-only. Remove each
3729 file before we write to it, in case it's read-only.
3730 Make po/Makevars and runtime-po/Makevars read-only, too.
3732 2006-09-05 Jim Meyering <jim@meyering.net>
3734 * tests/cp/acl: Skip this test when cp lacks ACL support.
3735 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
3737 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
3738 context from change of 2006-09-02.
3740 2006-09-04 Jim Meyering <jim@meyering.net>
3742 * README-cvs: Fix typo in update command.
3744 2006-09-03 Jim Meyering <jim@meyering.net>
3746 * NEWS: Tweak the wording in the new change description so that
3747 no one can think this change causes e.g., `rm -fr foo../' to fail.
3749 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
3750 Use $CONFIG_HEADER, rather than hard-coding it.
3751 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
3753 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
3755 * NEWS: rm now rejects attempts to remove /, ./, and ../.
3756 * src/basename.c: Don't include dirname.h, since system.h does it now.
3757 * src/chmod.c: Likewise.
3758 * src/copy.c: Likewise.
3759 * src/cp.c: Likewise.
3760 * src/df.c: Likewise.
3761 * src/dircolors.c: Likewise.
3762 * src/dirname.c: Likewise.
3763 * src/du.c: Likewise.
3764 * src/install.c: Likewise.
3765 * src/ln.c: Likewise.
3766 * src/ls.c: Likewise.
3767 * src/mkdir.c: Likewise.
3768 * src/mv.c: Likewise.
3769 * src/remove.c: Likewise.
3770 * src/rm.c: Likewise.
3771 * src/rmdir.c: Likewise.
3772 * src/shred.c: Likewise.
3773 * src/split.c: Likewise.
3774 * src/su.c: Likewise.
3775 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
3777 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
3779 * src/rm.c (usage, main): --preserve-root is now the default.
3780 * src/remove.h: Fix comment.
3781 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
3782 (cache_statted, cache_stat_ok): New functions.
3783 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
3784 which is no longer needed with the new functions. All callers
3786 (prompt, is_dir_lstat, remove_entry, remove_dir):
3787 New struct stat * arg. All callers changed.
3788 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
3789 (remove_cwd_entries, remove_dir, rm_1):
3790 Use and maintain the file status cache.
3791 (prompt, remove_entry): Omit the first "directory" in the diagnostic
3792 "Cannot remove directory `foo': is a directory". This causes "rm"
3793 to pass a test case that it would otherwise fail now that it
3794 "knows" more about its argument. I think the diagnostic is better
3795 without the first "directory" anyway.
3796 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
3797 (rm_1): Reject attempts to remove /, ./, or ../.
3798 * tests/rm/Makefile.am (TESTS): Add r-4.
3799 * tests/rm/r-4: New file.
3801 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
3803 * src/stat.c: Include <stddef.h>
3804 (alignof): New macro.
3805 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
3807 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
3809 (print_statfs): If f_fsid isn't an integer, grab its words one
3810 at a time in little-endian order. This is a bit easier to configure
3811 and should avoid a compilation failure on MacOS reported by Bruno
3814 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
3816 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
3817 work around a Mac OS X porting problem reported by Bruno Haible in
3818 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
3819 (print_statfs): Use them.
3821 * bootstrap.conf (gnulib_modules): Add isapipe.
3822 * src/tail.c: Include isapipe.h.
3823 (IS_PIPE_LIKE_FILE_TYPE): Remove.
3824 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
3825 tailable, since this seems to be portable.
3826 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
3827 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
3829 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
3832 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
3834 * src/copy.c (copy_internal): Don't test whether macros like
3835 S_ISLNK are defined, since they're always defined now.
3836 * src/cp.c (main): Likewise.
3837 * src/ln.c (main): Likewise.
3838 * src/ls.c (get_link_name, make_link_name): Likewise.
3839 * src/mknod.c (main): Likewise.
3840 * src/mkfifo.c (usage): Likewise.
3841 * src/who.c (S_IWGRP): Likewise.
3843 Adjust to recent gnulib changes for the gnulib module.
3844 * bootstrap.conf (gnulib_modules): Add fcntl.
3845 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
3846 is already assuming these macros are defined.
3847 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
3848 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
3849 Remove; the fcntl module now handles these.
3851 Adjust to recent gnulib changes for the inttypes module.
3852 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
3853 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
3855 * src/system.h: Don't bother to include <stdint.h>, since we can
3856 now assume inttypes.h does the equivalent of including stdint.h.
3858 2006-08-27 Jim Meyering <jim@meyering.net>
3860 * src/copy.c (copy_internal): Don't make a backup if the last
3861 component of the source name is "." or "..".
3862 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
3863 * NEWS: Mention this.
3864 * tests/cp/src-base-dot: New file. Test for the above fix.
3865 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
3867 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
3868 (dot_or_dotdot): ...new static inline function.
3869 * src/remove.c (rm_1): Reflect this renaming.
3870 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
3872 * src/copy.c (copy_internal): Add comments.
3874 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
3876 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
3877 since Automake supplies them for us. It always did -I$(srcdir),
3878 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
3879 is now also doing -I../lib.
3881 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
3882 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
3883 since there might not be any .po files.
3884 (WGET_COMMAND): Set to empty if wget doesn't
3885 seem to be available.
3887 2006-08-26 Jim Meyering <jim@meyering.net>
3889 This test was failing in some environments.
3890 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
3891 to set LS_COLORS in the environment.
3892 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
3893 Reported by Bob Proulx.
3895 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
3897 * Makefile.am (EXTRA_DIST): Remove these files here, too:
3898 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
3899 .x-sc_two_space_separator_in_usage.
3901 Fix "mv --verbose --backup" so its output includes the
3902 " (backup: foo.~1~)" suffix also when backing up a directory.
3903 * NEWS: Report this bug fix.
3904 * src/copy.c (emit_verbose): New function, factored out of...
3905 (copy_internal): ...here. Use the new function.
3906 * tests/mv/backup-dir: Test for the above fix.
3907 * tests/mv/Makefile.am (TESTS): Add backup-dir.
3909 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
3911 * .x-sc_no_if_have_config_h: Remove; no longer needed.
3912 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
3913 * .x-sc_two_space_separator_in_usage: Likewise.
3914 * Makefile.maint (sc_no_have_config_h): Renamed from
3915 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
3916 is absent everywhere.
3917 * bootstrap.conf (gnulib_modules): Add config-h.
3918 * src/shred.c: Include <config.h> unconditionally, since
3919 we now assume config.h exists.
3920 * src/dircolors.c: Likewise.
3922 2006-08-26 Jim Meyering <jim@meyering.net>
3924 "ls --color" would highlight other-writable and sticky directories
3925 no differently than regular directories on a file system with
3926 dirent.d_type support.
3927 * NEWS: Say the above.
3928 * src/ls.c (gobble_file): With --color, also stat the file when
3929 we know it is a directory.
3930 Derived from an anonymous one-line fix and bug report:
3931 <http://savannah.gnu.org/bugs/?15043>.
3932 * tests/ls/color-dtype-dir: New file. Test for the above fix.
3933 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
3935 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
3937 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
3939 * bootstrap.conf: Add configmake, verify.
3940 * src/.cvsignore: Remove localedir.h.
3941 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
3942 subsumed by configmake.
3943 * src/system.h: Include configmake.h rather than localedir.h
3944 (LOCALEDIR): New macro.
3946 Rewrite to avoid some unnecessary casts, macros, literals.
3947 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
3949 (SECTOR_SIZE, SECTOR_MASK): New constants.
3950 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
3951 and use the SECTOR_* constants when applicable. Check for size <
3952 0 rather than size == -1, since negative-size files are a sign of
3955 2006-08-25 Bruno Haible <bruno@clisp.org>
3957 * src/shred.c (dopass): Assume a continuable error if EIO even
3958 if the current position is not a multiple of 512.
3960 2006-08-24 Jim Meyering <jim@meyering.net>
3962 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
3964 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
3966 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
3967 macro was being used without being defined.
3968 (SB_F_NAMEMAX): Remove cast.
3969 (f_fsid) [BeOS]: Likewise.
3970 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
3972 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
3974 (xstrcat): Remove. All uses changed to use the above functions.
3975 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
3976 buffer len. All uses changed. Output '?', not '*', for unknown
3977 data or errors. Do not assume signed values can be interchanged
3978 with unsigned when printing.
3979 (print_statfs): For %i, print the fsid as a single int, not as a
3981 (print_it): Quote invalid format better.
3983 * NEWS: printf supports the I flag.
3984 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
3986 2006-08-23 Bruno Haible <bruno@clisp.org>
3988 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
3989 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
3990 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
3992 * src/ls.c (SA_RESTART): Fallback define.
3994 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
3996 * src/system.h (EDQUOT): Define if not already defined.
3997 Problem reported by Bruno Haible for BeOS.
3999 * .cvsignore: Remove config.h, config.hin, as they are now
4001 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
4003 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
4005 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
4006 to accommodate today's gnulib change.
4008 2006-08-23 Jim Meyering <jim@meyering.net>
4010 * NEWS: Mention the sweeping infrastructure changes.
4012 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
4014 * bootstrap.conf (gnulib_modules): Add gnupload.
4015 * Makefile.maint (emit_upload_commands): gnupload is now
4017 * gnupload: Remove from CVS, since it's now a gnulib module.
4019 * bootstrap (bootstrap_conf_cleanup): Remove.
4020 (excluded_files): New var.
4021 * bootstrap.conf: Likewise.
4022 * bootstrap (slurp): Exclude files early if they're in the
4023 excluded_files list. That way, their names don't get put into
4026 * aclocal.m4, config.hin, configure:
4027 Remove from CVS, since ./bootstrap generates them automatically.
4028 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
4029 configure, *.cache, *.lineno, *.log.
4030 Remove more-specific entries. This catches files like configure.lineno.
4031 * man/.cvsignore: Add Makefile.in.
4032 * src/.cvsignore: Add Makefile.in.
4033 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
4036 * tests/chgrp/.cvsignore:
4037 * tests/chmod/.cvsignore:
4038 * tests/chown/.cvsignore:
4039 * tests/cp/.cvsignore:
4040 * tests/cut/.cvsignore:
4041 * tests/dd/.cvsignore:
4042 * tests/dircolors/.cvsignore:
4043 * tests/du/.cvsignore:
4044 * tests/expr/.cvsignore:
4045 * tests/factor/.cvsignore:
4046 * tests/fmt/.cvsignore:
4047 * tests/head/.cvsignore:
4048 * tests/install/.cvsignore:
4049 * tests/join/.cvsignore:
4050 * tests/ln/.cvsignore:
4051 * tests/ls/.cvsignore:
4052 * tests/ls-2/.cvsignore:
4053 * tests/md5sum/.cvsignore:
4054 * tests/misc/.cvsignore:
4055 * tests/mkdir/.cvsignore:
4056 * tests/mv/.cvsignore:
4057 * tests/od/.cvsignore:
4058 * tests/pr/.cvsignore:
4059 * tests/readlink/.cvsignore:
4060 * tests/rm/.cvsignore:
4061 * tests/rmdir/.cvsignore:
4062 * tests/seq/.cvsignore:
4063 * tests/sha1sum/.cvsignore:
4064 * tests/shred/.cvsignore:
4065 * tests/sort/.cvsignore:
4066 * tests/stty/.cvsignore:
4067 * tests/sum/.cvsignore:
4068 * tests/tac/.cvsignore:
4069 * tests/tail/.cvsignore:
4070 * tests/tail-2/.cvsignore:
4071 * tests/tee/.cvsignore:
4072 * tests/test/.cvsignore:
4073 * tests/touch/.cvsignore:
4074 * tests/tr/.cvsignore:
4075 * tests/tsort/.cvsignore:
4076 * tests/unexpand/.cvsignore:
4077 * tests/uniq/.cvsignore:
4078 * tests/wc/.cvsignore:
4079 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
4080 *.X, *.O, *-tests, build-script, mk-script if they're never
4081 created in this directory.
4083 2006-08-22 Bruno Haible <bruno@clisp.org>
4086 * src/uptime.c: Include OS.h if it exists.
4087 (print_uptime): On BeOS, use the get_system_info function (actually a
4088 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
4089 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
4091 2006-08-22 Jim Meyering <jim@meyering.net>
4093 * .cvsignore: Add ABOUT-NLS.
4095 Move the check-AUTHORS rule to be run as part of "make distcheck",
4096 rather than "make check".
4097 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
4098 cause "make check" to fail on systems unable to build all binaries.
4099 * Makefile.maint (check-AUTHORS): New rule.
4100 (local-checks-available): Add it here.
4101 Reported by Bruno Haible. Needed for BeOS.
4103 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
4105 * src/df.c (print_header, show_dev): Use a column width that
4106 depends on the block size of -P is specified and not autoscaling.
4107 Problem reported by Gustavo G. Rondina in:
4108 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
4110 2006-08-21 Jim Meyering <jim@meyering.net>
4112 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
4113 when the shell variable, SHELL, is not set.
4114 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
4115 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
4117 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
4118 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
4119 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
4120 od: invalid type string `u8';
4121 this system doesn't provide a 8-byte integral type
4122 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
4124 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
4126 Add a bootstrap procedure, so that the CVS version contains fewer
4127 files and we bootstrap the rest from gnulib, gettext, etc.
4128 * README-cvs: New file.
4129 * bootstrap: New file.
4130 * bootstrap.conf: New file.
4131 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
4132 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
4134 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
4135 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
4137 (gl_MACROS): Call just after gl_EARLY, just for clarity.
4138 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
4139 * src/kill.c (strtoimax): Remove decl.
4140 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
4141 * src/wc.c: Likewise.
4142 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
4143 declaration, so that we don't need to patch this file.
4144 * src/printf.c (strtoimax, strtoumax): Remove decls.
4145 * src/su.c: Include getpass.h.
4147 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
4148 Include inttypes.h unconditionally.
4149 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
4150 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
4151 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
4152 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
4153 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
4155 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
4156 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
4157 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
4158 * tests/cp/Makefile.in, tests/cut/Makefile.in:
4159 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
4160 * tests/du/Makefile.in, tests/expr/Makefile.in:
4161 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
4162 * tests/general/Makefile.in, tests/head/Makefile.in:
4163 * tests/install/Makefile.in, tests/join/Makefile.in:
4164 * tests/ln/Makefile.in, tests/ls/Makefile.in:
4165 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
4166 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
4167 * tests/mv/Makefile.in, tests/od/Makefile.in:
4168 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
4169 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
4170 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
4171 * tests/shred/Makefile.in, tests/sort/Makefile.in:
4172 * tests/stty/Makefile.in, tests/sum/Makefile.in:
4173 * tests/tac/Makefile.in, tests/tail/Makefile.in:
4174 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
4175 * tests/test/Makefile.in, tests/touch/Makefile.in:
4176 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
4177 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
4178 * tests/wc/Makefile.in:
4179 Remove from CVS, since ./bootstrap generates them automatically.
4181 2006-08-20 Eric Blake <ebb9@byu.net>
4183 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
4184 the patch from 2006-08-18 broke on cygwin.
4186 2006-08-20 Jim Meyering <jim@meyering.net>
4188 * NEWS: Add a line for 6.2-cvs.
4189 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
4191 2006-08-19 Jim Meyering <jim@meyering.net>
4194 * NEWS: Record the 6.1 release date.
4195 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4197 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
4199 Avoid test failure when `make check' is run through debuild.
4200 * tests/help-version: Ensure that $SHELL is set to some value
4201 and exported. Patch from Sven Joachim. For details, see
4202 <http://bugs.debian.org/355368>.
4204 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
4206 * README: Describe potential "pre-C99 build failure", and work-around.
4208 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
4209 backed out due to updates provoked by the copyright changes.
4210 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
4211 it propagates to the derived Makefile.am files.
4212 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
4213 so we don't mistakenly edit them again.
4214 * tests/cut/Makefile.am: Regenerate.
4215 * tests/head/Makefile.am: Likewise.
4216 * tests/join/Makefile.am: Likewise.
4217 * tests/pr/Makefile.am: Likewise.
4218 * tests/sort/Makefile.am: Likewise.
4219 * tests/tac/Makefile.am: Likewise.
4220 * tests/tail/Makefile.am: Likewise.
4221 * tests/test/Makefile.am: Likewise.
4222 * tests/tr/Makefile.am: Likewise.
4223 * tests/uniq/Makefile.am: Likewise.
4224 * tests/wc/Makefile.am: Likewise.
4226 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
4227 when the file's apparent size is not a multiple of its block size.
4228 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
4229 For some file sizes, writing that single byte would unnecessarily
4230 waste a few file blocks. That write may have been necessary in the
4231 early days of Linux, but now, removing it should be safe.
4232 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
4233 * tests/cp/sparse: New test for the above.
4234 * tests/cp/Makefile.am (TESTS): Add sparse.
4236 * tests/sparse-file: New file, essence factored out of...
4237 * tests/du/8gb: ... here. Use the new script.
4239 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4241 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
4242 the CVS gettext manual now suggests 1000000.
4244 2006-08-18 Bruno Haible <bruno@clisp.org>
4246 Add support for NetBSD 3.0.
4247 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
4249 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
4250 has a field f_fstypename.
4251 This undoes the 2006-08-15 to src/stat.c.
4253 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
4255 Copyright notice fixes.
4257 * COPYING: Upgrade to latest version from FSF.
4259 * src/uname.c: Use (C) in copyright notice.
4261 * .vg-suppressions: Add copyright notice.
4262 * ChangeLog: Likewise.
4263 * ChangeLog-2005: Likewise.
4264 * Makefile.am: Likewise.
4267 * README-valgrind: Likewise.
4269 * announce-gen: Likewise.
4270 * man/Makefile.am: Likewise.
4271 * man/chmod.x: Likewise.
4272 * man/chown.x: Likewise.
4273 * man/df.x: Likewise.
4274 * man/du.x: Likewise.
4275 * man/rm.x: Likewise.
4276 * src/dircolors.hin: Likewise.
4277 * src/du-tests: Likewise.
4278 * src/extract-magic: Likewise.
4279 * src/tac-pipe.c: Likewise.
4280 * src/wheel-gen.pl: Likewise.
4281 * tests/Coreutils.pm: Likewise.
4282 * tests/Makefile.am.in: Likewise.
4283 * tests/acl: Likewise.
4284 * tests/envvar-check: Likewise.
4285 * tests/expensive: Likewise.
4286 * tests/group-names: Likewise.
4287 * tests/help-version: Likewise.
4288 * tests/mk-script: Likewise.
4289 * tests/priv-check: Likewise.
4290 * tests/rwx-to-mode: Likewise.
4291 * tests/sample-test: Likewise.
4292 * tests/setgid-check: Likewise.
4293 * tests/chgrp/basic: Likewise.
4294 * tests/chgrp/deref: Likewise.
4295 * tests/chgrp/no-x: Likewise.
4296 * tests/chgrp/posix-H: Likewise.
4297 * tests/chgrp/recurse: Likewise.
4298 * tests/chmod/c-option: Likewise.
4299 * tests/chmod/equal-x: Likewise.
4300 * tests/chmod/equals: Likewise.
4301 * tests/chmod/no-x: Likewise.
4302 * tests/chmod/octal: Likewise.
4303 * tests/chmod/setgid: Likewise.
4304 * tests/chmod/umask-x: Likewise.
4305 * tests/chmod/usage: Likewise.
4306 * tests/chown/basic: Likewise.
4307 * tests/chown/deref: Likewise.
4308 * tests/chown/separator: Likewise.
4309 * tests/cp/Makefile.am: Likewise.
4310 * tests/cp/acl: Likewise.
4311 * tests/cp/backup-1: Likewise.
4312 * tests/cp/backup-is-src: Likewise.
4313 * tests/cp/cp-HL: Likewise.
4314 * tests/cp/cp-deref: Likewise.
4315 * tests/cp/cp-mv-backup: Likewise.
4316 * tests/cp/cp-parents: Likewise.
4317 * tests/cp/deref-slink: Likewise.
4318 * tests/cp/dir-rm-dest: Likewise.
4319 * tests/cp/dir-slash: Likewise.
4320 * tests/cp/dir-vs-file: Likewise.
4321 * tests/cp/fail-perm: Likewise.
4322 * tests/cp/into-self: Likewise.
4323 * tests/cp/link: Likewise.
4324 * tests/cp/link-no-deref: Likewise.
4325 * tests/cp/link-preserve: Likewise.
4326 * tests/cp/no-deref-link1: Likewise.
4327 * tests/cp/no-deref-link2: Likewise.
4328 * tests/cp/no-deref-link3: Likewise.
4329 * tests/cp/perm: Likewise.
4330 * tests/cp/preserve-2: Likewise.
4331 * tests/cp/r-vs-symlink: Likewise.
4332 * tests/cp/same-file: Likewise.
4333 * tests/cp/slink-2-slink: Likewise.
4334 * tests/cp/special-bits: Likewise.
4335 * tests/cp/symlink-slash: Likewise.
4336 * tests/cut/Makefile.am: Likewise.
4337 * tests/cut/Test.pm: Likewise.
4338 * tests/dd/misc: Likewise.
4339 * tests/dd/not-rewound: Likewise.
4340 * tests/dd/skip-seek: Likewise.
4341 * tests/dd/skip-seek2: Likewise.
4342 * tests/dd/unblock-sync: Likewise.
4343 * tests/dircolors/simple: Likewise.
4344 * tests/du/2g: Likewise.
4345 * tests/du/8gb: Likewise.
4346 * tests/du/Makefile.am: Likewise.
4347 * tests/du/basic: Likewise.
4348 * tests/du/deref: Likewise.
4349 * tests/du/deref-args: Likewise.
4350 * tests/du/exclude: Likewise.
4351 * tests/du/fd-leak: Likewise.
4352 * tests/du/files0-from: Likewise.
4353 * tests/du/hard-link: Likewise.
4354 * tests/du/inaccessible-cwd: Likewise.
4355 * tests/du/long-from-unreadable: Likewise.
4356 * tests/du/long-sloop: Likewise.
4357 * tests/du/no-deref: Likewise.
4358 * tests/du/no-x: Likewise.
4359 * tests/du/restore-wd: Likewise.
4360 * tests/du/slash: Likewise.
4361 * tests/du/slink: Likewise.
4362 * tests/du/trailing-slash: Likewise.
4363 * tests/du/two-args: Likewise.
4364 * tests/expr/basic: Likewise.
4365 * tests/factor/basic: Likewise.
4366 * tests/fmt/basic: Likewise.
4367 * tests/fmt/long-line: Likewise.
4368 * tests/general/Makefile.am: Likewise.
4369 * tests/general/atgeneral.m4: Likewise.
4370 * tests/general/dd.at: Likewise.
4371 * tests/head/Makefile.am: Likewise.
4372 * tests/head/Test.pm: Likewise.
4373 * tests/install/basic-1: Likewise.
4374 * tests/install/create-leading: Likewise.
4375 * tests/install/d-slashdot: Likewise.
4376 * tests/install/trap: Likewise.
4377 * tests/join/Makefile.am: Likewise.
4378 * tests/join/Test.pm: Likewise.
4379 * tests/ln/backup-1: Likewise.
4380 * tests/ln/misc: Likewise.
4381 * tests/ln/sf-1: Likewise.
4382 * tests/ln/target-1: Likewise.
4383 * tests/ls/Makefile.am: Likewise.
4384 * tests/ls/Test.pm: Likewise.
4385 * tests/ls/dangle: Likewise.
4386 * tests/ls/dired: Likewise.
4387 * tests/ls/file-type: Likewise.
4388 * tests/ls/follow-slink: Likewise.
4389 * tests/ls/infloop: Likewise.
4390 * tests/ls/inode: Likewise.
4391 * tests/ls/m-option: Likewise.
4392 * tests/ls/no-arg: Likewise.
4393 * tests/ls/recursive: Likewise.
4394 * tests/ls/rt-1: Likewise.
4395 * tests/ls/stat-dtype: Likewise.
4396 * tests/ls/stat-failed: Likewise.
4397 * tests/ls/stat-vs-dirent: Likewise.
4398 * tests/ls/symlink-slash: Likewise.
4399 * tests/ls/time-1: Likewise.
4400 * tests/ls-2/tests: Likewise.
4401 * tests/md5sum/basic-1: Likewise.
4402 * tests/md5sum/newline-1: Likewise.
4403 * tests/misc/Makefile.am: Likewise.
4404 * tests/misc/base64: Likewise.
4405 * tests/misc/basename: Likewise.
4406 * tests/misc/cat-proc: Likewise.
4407 * tests/misc/close-stdout: Likewise.
4408 * tests/misc/csplit: Likewise.
4409 * tests/misc/date: Likewise.
4410 * tests/misc/date-sec: Likewise.
4411 * tests/misc/df: Likewise.
4412 * tests/misc/dirname: Likewise.
4413 * tests/misc/expand: Likewise.
4414 * tests/misc/false-status: Likewise.
4415 * tests/misc/fold: Likewise.
4416 * tests/misc/head-c: Likewise.
4417 * tests/misc/head-elide-tail: Likewise.
4418 * tests/misc/head-pos: Likewise.
4419 * tests/misc/mknod: Likewise.
4420 * tests/misc/nice: Likewise.
4421 * tests/misc/nl: Likewise.
4422 * tests/misc/nohup: Likewise.
4423 * tests/misc/paste-no-nl: Likewise.
4424 * tests/misc/pathchk1: Likewise.
4425 * tests/misc/printf: Likewise.
4426 * tests/misc/printf-hex: Likewise.
4427 * tests/misc/pwd-long: Likewise.
4428 * tests/misc/sha224sum: Likewise.
4429 * tests/misc/sha256sum: Likewise.
4430 * tests/misc/sha384sum: Likewise.
4431 * tests/misc/sha512sum: Likewise.
4432 * tests/misc/shuf: Likewise.
4433 * tests/misc/sort-merge: Likewise.
4434 * tests/misc/sort-rand: Likewise.
4435 * tests/misc/split-a: Likewise.
4436 * tests/misc/split-fail: Likewise.
4437 * tests/misc/split-l: Likewise.
4438 * tests/misc/stat-fmt: Likewise.
4439 * tests/misc/stat-printf: Likewise.
4440 * tests/misc/tac-continue: Likewise.
4441 * tests/misc/test-diag: Likewise.
4442 * tests/misc/tty-eof: Likewise.
4443 * tests/misc/wc-files0: Likewise.
4444 * tests/misc/wc-files0-from: Likewise.
4445 * tests/mkdir/concurrent-1: Likewise.
4446 * tests/mkdir/p-1: Likewise.
4447 * tests/mkdir/p-2: Likewise.
4448 * tests/mkdir/p-3: Likewise.
4449 * tests/mkdir/p-slashdot: Likewise.
4450 * tests/mkdir/p-thru-slink: Likewise.
4451 * tests/mkdir/parents: Likewise.
4452 * tests/mkdir/perm: Likewise.
4453 * tests/mkdir/special-1: Likewise.
4454 * tests/mkdir/t-slash: Likewise.
4455 * tests/mkdir/writable-under-readonly: Likewise.
4456 * tests/mv/Makefile.am: Likewise.
4457 * tests/mv/acl: Likewise.
4458 * tests/mv/atomic: Likewise.
4459 * tests/mv/backup-is-src: Likewise.
4460 * tests/mv/childproof: Likewise.
4461 * tests/mv/diag: Likewise.
4462 * tests/mv/dir-file: Likewise.
4463 * tests/mv/dir2dir: Likewise.
4464 * tests/mv/dup-source: Likewise.
4465 * tests/mv/force: Likewise.
4466 * tests/mv/hard-2: Likewise.
4467 * tests/mv/hard-3: Likewise.
4468 * tests/mv/hard-4: Likewise.
4469 * tests/mv/hard-link-1: Likewise.
4470 * tests/mv/i-1: Likewise.
4471 * tests/mv/i-2: Likewise.
4472 * tests/mv/i-3: Likewise.
4473 * tests/mv/i-4: Likewise.
4474 * tests/mv/i-link-no: Likewise.
4475 * tests/mv/into-self: Likewise.
4476 * tests/mv/into-self-2: Likewise.
4477 * tests/mv/into-self-3: Likewise.
4478 * tests/mv/into-self-4: Likewise.
4479 * tests/mv/leak-fd: Likewise.
4480 * tests/mv/mv-special-1: Likewise.
4481 * tests/mv/no-target-dir: Likewise.
4482 * tests/mv/part-fail: Likewise.
4483 * tests/mv/part-hardlink: Likewise.
4484 * tests/mv/part-rename: Likewise.
4485 * tests/mv/part-symlink: Likewise.
4486 * tests/mv/partition-perm: Likewise.
4487 * tests/mv/perm-1: Likewise.
4488 * tests/mv/reply-no: Likewise.
4489 * tests/mv/setup: Likewise.
4490 * tests/mv/to-symlink: Likewise.
4491 * tests/mv/trailing-slash: Likewise.
4492 * tests/mv/update: Likewise.
4493 * tests/mv/vfat: Likewise.
4494 * tests/od/od-N: Likewise.
4495 * tests/od/x8: Likewise.
4496 * tests/pr/Makefile.am: Likewise.
4497 * tests/pr/Test.pm: Likewise.
4498 * tests/readlink/can-e: Likewise.
4499 * tests/readlink/can-f: Likewise.
4500 * tests/readlink/can-m: Likewise.
4501 * tests/readlink/rl-1: Likewise.
4502 * tests/rm/Makefile.am: Likewise.
4503 * tests/rm/cycle: Likewise.
4504 * tests/rm/dangling-symlink: Likewise.
4505 * tests/rm/deep-1: Likewise.
4506 * tests/rm/dir-no-w: Likewise.
4507 * tests/rm/dir-nonrecur: Likewise.
4508 * tests/rm/dot-rel: Likewise.
4509 * tests/rm/empty-inacc: Likewise.
4510 * tests/rm/empty-name: Likewise.
4511 * tests/rm/f-1: Likewise.
4512 * tests/rm/fail-2eperm: Likewise.
4513 * tests/rm/fail-eperm: Likewise.
4514 * tests/rm/hash: Likewise.
4515 * tests/rm/i-1: Likewise.
4516 * tests/rm/i-no-r: Likewise.
4517 * tests/rm/inaccessible: Likewise.
4518 * tests/rm/interactive-always: Likewise.
4519 * tests/rm/interactive-once: Likewise.
4520 * tests/rm/ir-1: Likewise.
4521 * tests/rm/isatty: Likewise.
4522 * tests/rm/no-give-up: Likewise.
4523 * tests/rm/r-1: Likewise.
4524 * tests/rm/r-2: Likewise.
4525 * tests/rm/r-3: Likewise.
4526 * tests/rm/rm1: Likewise.
4527 * tests/rm/rm2: Likewise.
4528 * tests/rm/rm3: Likewise.
4529 * tests/rm/rm4: Likewise.
4530 * tests/rm/rm5: Likewise.
4531 * tests/rm/sunos-1: Likewise.
4532 * tests/rm/unread2: Likewise.
4533 * tests/rm/unread3: Likewise.
4534 * tests/rm/unreadable: Likewise.
4535 * tests/rmdir/fail-perm: Likewise.
4536 * tests/rmdir/ignore: Likewise.
4537 * tests/rmdir/t-slash: Likewise.
4538 * tests/seq/basic: Likewise.
4539 * tests/sha1sum/basic-1: Likewise.
4540 * tests/sha1sum/sample-vec: Likewise.
4541 * tests/shred/exact: Likewise.
4542 * tests/shred/remove: Likewise.
4543 * tests/sort/Makefile.am: Likewise.
4544 * tests/sort/Test.pm: Likewise.
4545 * tests/sort-time/Makefile: Likewise.
4546 * tests/sort-time/README: Likewise.
4547 * tests/sort-time/rand-gen: Likewise.
4548 * tests/stty/basic-1: Likewise.
4549 * tests/stty/row-col-1: Likewise.
4550 * tests/sum/basic-1: Likewise.
4551 * tests/sum/sysv: Likewise.
4552 * tests/tac/Makefile.am: Likewise.
4553 * tests/tac/Test.pm: Likewise.
4554 * tests/tail/Makefile.am: Likewise.
4555 * tests/tail/Test.pm: Likewise.
4556 * tests/tail-2/Makefile.am: Likewise.
4557 * tests/tail-2/append-only: Likewise.
4558 * tests/tail-2/assert: Likewise.
4559 * tests/tail-2/assert-2: Likewise.
4560 * tests/tail-2/big-4gb: Likewise.
4561 * tests/tail-2/fflush: Likewise.
4562 * tests/tail-2/infloop-1: Likewise.
4563 * tests/tail-2/proc-ksyms: Likewise.
4564 * tests/tail-2/start-middle: Likewise.
4565 * tests/tail-2/tail-n0f: Likewise.
4566 * tests/tee/basic: Likewise.
4567 * tests/tee/dash: Likewise.
4568 * tests/test/Makefile.am: Likewise.
4569 * tests/test/Test.pm: Likewise.
4570 * tests/touch/Makefile.am: Likewise.
4571 * tests/touch/dangling-symlink: Likewise.
4572 * tests/touch/empty-file: Likewise.
4573 * tests/touch/fail-diag: Likewise.
4574 * tests/touch/fifo: Likewise.
4575 * tests/touch/no-create-missing: Likewise.
4576 * tests/touch/no-rights: Likewise.
4577 * tests/touch/not-owner: Likewise.
4578 * tests/touch/obsolescent: Likewise.
4579 * tests/touch/read-only: Likewise.
4580 * tests/touch/relative: Likewise.
4581 * tests/tr/Makefile.am: Likewise.
4582 * tests/tr/Test.pm: Likewise.
4583 * tests/tr/failures: Likewise.
4584 * tests/tsort/basic-1: Likewise.
4585 * tests/unexpand/basic-1: Likewise.
4586 * tests/uniq/Makefile.am: Likewise.
4587 * tests/uniq/Test.pm: Likewise.
4588 * tests/wc/Makefile.am: Likewise.
4589 * tests/wc/Test.pm: Likewise.
4591 2006-08-17 Jim Meyering <jim@meyering.net>
4593 ls -CF would misalign columns in some cases.
4594 * src/ls.c (get_type_indicator): New function. extracted from...
4595 (print_type_indicator): ...here. Use it.
4596 (length_of_file_name_and_frills): Use it here, too, rather than
4597 assuming stat.st_mode is valid.
4598 Reported by Andreas Schwab, here:
4599 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
4600 See the test for this above. FYI, I did ls -CF /proc and visually
4601 inspected the result.
4603 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
4604 to mention the now-removed cp_options.xstat member.
4606 * Makefile.maint (patch-check): Adapt to work now that the patch
4607 modifies more than one file in src/.
4609 With this patch, permit building with Solaris cc on Solaris 7.
4610 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
4611 This integrates patches from Bruno Haible.
4613 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
4615 Fix some problems reported by Bruno Haible.
4616 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
4617 Skip this test if "chmod g+s d" silently does nothing.
4618 * tests/ls-2/tests: Skip this test suite if we can't set up files
4619 properly for the setuid-etc test. This simplifies some of the
4620 hacks we were using to work around porting problems.
4622 2006-08-16 Jim Meyering <jim@meyering.net>
4624 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
4625 * tests/cp/acl: Instead, skip the test if either setfacl
4627 Reported by Michael Stone.
4629 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
4631 * tests/lang-default (LC_ALL): Set to "C", so we get
4632 English-language diagnostics. Unset the other variables; it
4633 should be portable to use 'unset' for this stuff nowadays.
4634 Problem reported by Bruno Haible. Using "C" reverses the
4635 2000-10-22 change to fileutils in this area.
4637 Fix bugs when printing plurals of numbers that are not
4638 unsigned long int values.
4639 * src/system.h (select_plural): New function.
4640 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
4641 * src/uptime.c (print_uptime): Likewise.
4642 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
4643 print a floating point number, as reducing to 0 or 1 doesn't work
4644 for some languages. Instead, just use "s" for seconds since it
4645 doesn't need a plural form.
4647 2006-08-16 Bruno Haible <bruno@clisp.org>
4649 Old versions of gzip would write --help output to stderr, and it
4650 would be annoying to see that in the output of every "make" command.
4651 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
4654 2006-08-16 Andreas Schwab <schwab@suse.de>
4656 * tests/cp/acl: Don't use non-portable == operator for test.
4658 2006-08-16 Jim Meyering <jim@meyering.net>
4660 * tests/ls/stat-dtype: Use stat to test file system type, rather
4661 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
4663 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
4665 * NEWS: Mention that df exits with nonzero status if it generates
4666 no output. This change was in 6.0 but inadvertently unmentioned.
4667 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
4669 (show_dev): Don't set it until we actually output something.
4670 Print the header if this is the first output.
4671 (main): Don't print a header, as that is now show_dev's job.
4672 * tests/misc/Makefile.am (TESTS): Add df.
4673 * tests/misc/df: New file.
4675 2006-08-15 Eric Blake <ebb9@byu.net>
4677 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
4678 statvfs.f_type not present. See
4679 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
4681 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
4683 * src/dd.c (print_stats): Don't substitute "1" for number, as this
4684 causes confusion for the Hungarian translators. Problem reported
4685 by Egmont Koblinger here:
4686 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
4688 2006-08-15 Jim Meyering <jim@meyering.net>
4690 * .x-sc_require_config_h: Add lib/at-func.c.
4692 * NEWS: Add a line for 6.1-cvs.
4693 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
4695 2006-08-15 Jim Meyering <jim@meyering.net>
4698 * NEWS: Record the 6.0 release date.
4699 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4701 * TODO: Add an item (convert to use gnulib-tool), add to the plan
4702 for id-vs-getgrouplist, and remove a few completed items.
4704 * Makefile.maint (alpha beta major): Fix syntax error.
4706 2006-08-13 Jim Meyering <jim@meyering.net>
4708 * src/shred.c (usage): Don't indent the second line of an item.
4709 Otherwise, help2man would misformat the output.
4710 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
4712 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
4714 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
4715 Suggested by Eric Blake to avoid problems like
4716 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
4718 2006-08-11 Jim Meyering <jim@meyering.net>
4720 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
4721 failure that this test checks for (stat/dirent inode mismatch at
4722 a mount point), so continue to give a diagnostic about the failure,
4723 but don't actually count it as a failure.
4725 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
4727 * ABOUT-NLS: Update from gettext 0.15.
4728 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
4730 * src/csplit.c (struct control): Remove fastmap member.
4731 (extract_regexp): Allocate fastmap separately, since otherwise
4732 it might move due to a realloc. This fixes a bug that led
4733 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
4735 2006-08-10 Jim Meyering <jim@meyering.net>
4737 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
4738 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
4739 Redirect both stdout and stderr of df invocations.
4741 * src/dircolors.hin: Add a TERM directive for each of the following:
4742 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
4743 rxvt-cygwin-native, screen.linux, xterm-256color.
4744 Sort the TERM directives.
4745 From Mike Frysinger.
4747 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
4749 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
4750 See Debian bug 373736.
4752 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
4755 * src/.cvsignore: Add shuf.
4757 * Makefile.maint: Remove the po-update procedure; it doesn't
4758 work with the new repository on http://www.iro.umontreal.ca/.
4759 For now I guess we'll have to fix things by hand.
4760 (do-po-update, po-update): Remove. All references removed.
4762 * src/shuf.c (next_line): New function.
4763 (read_input): Use it, to avoid relying on GCC-specific behavior
4764 with void * arithmetic. Problem reported by Bob Proulx.
4765 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
4766 to detect this sort of problem automatically in the future.
4768 2006-08-09 Jim Meyering <jim@meyering.net>
4770 * src/ls.c: Add a compile-time check to ensure that filetype
4771 and filetype_letter have the same number of elements.
4773 * tests/misc/sort-rand: Remove use of --seed=S.
4775 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
4777 Add a command 'shuf', and modify shred and sort to use the new
4778 random number generator library of 'shuf'.
4780 * AUTHORS: Add shuf.
4782 * NEWS: Likewise. Mention new --random-source option for shred
4783 and sort. Move "sort +1 -2" notice to the appropriate section,
4784 and clarify its role with respect to POSIXLY_CORRECT.
4785 * man/.cvsignore: Add shuf.1.
4786 * man/Makefile.am (dist_man_MANS): Add shuf.1.
4787 (shuf.1): New dependency.
4788 * man/shuf.x: New file.
4789 * src/Makefile.am (bin_PROGRAMS): Add shuf.
4790 (EXTRA_DIST): Remove rand-isaac.c.
4791 (shuf_LDADD): New macro.
4792 * src/rand-isaac.c: Remove, moving most of its contents to
4794 * src/shuf.c: New file.
4795 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
4796 Don't include rand-isaac.c; include randint.h and randread.h instead.
4797 (RANDOM_SOURCE_OPTION): New enum.
4798 (long_opts, usage, main): New option --random-source.
4799 * src/sort.c: Likewise.
4800 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
4801 All callers changed to use randint interface.
4802 (fillrand): Remove. All callers changed to use randread interface.
4803 (dopass): Remove dependency on ISAAC buffer size.
4804 (genpattern): Don't wipe the random state here.
4805 (randint_source): New static var.
4806 (clear_random_data): New function.
4807 (main): Allocate random source, and arrange to wipe it on exit.
4808 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
4809 (longopts, usage, main): Remove undocumented --seed option;
4810 it's now replaced by --random-source.
4811 (rand_state, get_hash): Remove.
4812 (randread_source): New static var.
4813 (random_state, cmp_hashes, compare_random): New functions; they guarantee
4814 no collisions in the random hash function.
4815 (keycompare): Use compare_random for -R; don't fall back on comparing
4816 via memcoll, since compare_random does the right thing.
4817 * tests/misc/Makefile.am (TESTS): Add shuf.
4818 * tests/misc/shuf: New file.
4820 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
4822 * src/copy.c (set_author): Preserve the st_author field via the
4823 file descriptor dest_desc.
4825 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
4827 * NEWS: chmod now preserves setuid and setgid bits on directories
4828 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
4830 Fix test case problems if working directory is setgid,
4831 reported by Bob Proulx.
4832 * tests/cp/fail-perm: Use symbolic mode so that we clear
4833 setgid bit more reliably on directories.
4834 * tests/mkdir/special-1 (set_mode_string): Likewise.
4836 2006-07-27 Jim Meyering <jim@meyering.net>
4838 * src/chgrp.c (usage): Use correct grammar in description of the
4840 * src/chown.c (usage): Likewise.
4842 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
4844 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
4845 Correctly access SRC_SB's element ST_AUTHOR.
4847 2006-07-26 Jim Meyering <jim@meyering.net>
4849 * tests/ls/stat-failed: Adapt to match new expected output.
4852 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
4853 than having the code test for all of the other types first.
4854 Hoist the set-uid/gid-testing code "up" into this new block.
4855 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
4856 C_ORPHAN, not as C_FILE.
4858 2006-07-26 Jim Meyering <jim@meyering.net>
4860 Checking in a change from Paul.
4862 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
4864 * src/ls.c (DT_INIT): Remove. All uses removed.
4865 (enum filetype): Use an ordinary enum rather than trying to keep
4866 the values in sync with DT_FIFO etc. That way, we don't have
4867 to make special assumptions about them. All uses changed.
4868 (whiteout): New constant member of enum filetype.
4869 (filetype_letter): New constant, for use with enum filetype.
4870 (FILETYPE_INDICATORS): New initializer list.
4871 (print_dir): Add case for DT_WHT.
4872 (gobble_file): If stat fails, don't discard information from
4873 readdir; instead, preserve it so it can be printed.
4874 (print_long_format): Fall back on readdir result if stat info
4875 is not available. Use "?" to denote each unknown mode char,
4876 instead of an overall "?", since we now know some of the mode
4878 (print_type_indicator): Now that MODE isn't necessarily
4879 useful, guard all uses.
4880 Now that two blocks in the type-checking tree can set "type = C_FILE",
4881 move the suffix-handling code out and down.
4883 2006-07-26 Jim Meyering <jim@meyering.net>
4885 Prepare for the above change.
4886 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
4887 and adjust uses. From a patch by Paul Eggert.
4889 2006-07-26 Jim Meyering <jim@meyering.net>
4891 * src/ls.c: Correct indentation/formatting in a few places.
4893 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
4895 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
4896 Problem report and fix from Bob Proulx.
4897 * NEWS: Clarify the "chmod 0500" news, and correct the vague
4898 statements about compatibility with BSD.
4900 2006-07-25 Jim Meyering <jim@meyering.net>
4902 * src/ls.c (gobble_file): When handling a stat-failed entry,
4903 print the entry name not the absolute_name -- to be consistent
4904 with the usual case.
4905 * tests/ls/stat-failed: Update accordingly.
4907 * src/ls.c: Add parens around the new uses of ?: ternary operator.
4909 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
4912 Get --dired offsets right when handling stat-failed entries.
4913 * src/ls.c (print_long_format): Be careful to increment P by the
4914 appropriate amount, even when inode_number_width and nlink_width
4916 * tests/ls/stat-failed: Test for the above.
4918 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
4919 have_acl member. That would happen for a directory with both a
4920 non-stat'able entry and one with an ACL.
4922 * src/ls.c (gobble_file): Make it so failure to stat a
4923 non-command-line file provokes an exit status of 1, not 0.
4924 Say "cannot access" rather than "cannot stat".
4925 * tests/ls/stat-failed: New file/test, for the above.
4926 * tests/ls/Makefile.am (TESTS): Add stat-failed.
4927 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
4928 of "cannot access " to diagnostic.
4930 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
4932 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
4933 Replace all occurrences of "type == command_line" with the
4934 equivalent, "command_line_arg".
4936 * src/ls.c: Apply the stat-failed parts of Red Hat's
4937 coreutils-selinux.patch. From Ulrich Drepper.
4938 This makes it so files not mentioned on the command line (e.g.,
4939 names read from a directory that *is* mentioned on the command
4940 line) for which stat fails are still listed. With --color,
4941 such files are colored just like ORPHANs (aka dangling symlinks).
4943 * src/df.c (n_valid_args): Declare global to be static.
4945 2006-07-24 Jim Meyering <jim@meyering.net>
4947 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
4948 system lacks d_type support.
4950 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
4952 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
4954 2006-07-21 Jim Meyering <jim@meyering.net>
4956 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
4957 Reported by Tim Waugh.
4958 Also remove the comment duplicating much of --help output.
4960 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
4961 name so the list remains alphabetized.
4963 Fix another bug: ls --indicator-style=file-type would call
4964 stat for a symlink, even though it wasn't always needed.
4965 In some cases, that unnecessary stat would cause ls to fail.
4966 * src/ls.c (gobble_file): Don't treat symlinks specially (in
4967 requiring a stat syscall). Remove the offending exclusion.
4969 * NEWS: Mention the fix.
4971 * tests/ls/stat-dtype: New file/test, for the above fix.
4972 Also exercises the new df feature, below.
4974 * src/df.c (main): Fail and don't print the headers if no
4975 file system is processed. This makes it easy to test whether
4976 a specified directory is on a file system of a given type or types.
4977 Otherwise, applications would have had to parse df's output.
4978 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
4980 Fix a bug: ls --file-type worked like --indicator-style=slash,
4981 rather than like --indicator-style=file-type.
4982 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
4983 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
4985 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
4986 * NEWS: Mention the fix.
4987 * tests/ls-2/tests (file-type): New test, for the above fix.
4989 2006-07-19 Jim Meyering <jim@meyering.net>
4991 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
4993 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
4995 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
4997 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
4998 of directories alone unless you specify them explicitly.
4999 install and mkdir now implement X correctly.
5000 install now creates parent directories with mode 755, without
5001 changing their owner or group.
5002 * src/chmod.c (process_file): Adjust to mode_adjust API change.
5003 * src/install.c: Include mkancesdirs.h.
5004 (announce_mkdir, make_ancestor): New functions.
5005 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
5007 (dir_mode, dir_mode_bits): New vars.
5008 (main): Set dir modes separately from nondir, so that the X
5009 op of -m works correctly.
5010 (main): Remove cwd_errno cruft, since make_dir_parents no longer
5011 affects cwd. Adjust to new make_dir_parents API.
5012 (install_file_in_file_parents): 2nd arg is now char *, not char
5013 const *. Use mkancesdirs instead of rolling our own code.
5014 (change_attributes): Don't worry about AFS, since that kludge
5015 should not be needed any more.
5016 * src/mkdir.c (struct mkdir_options): New struct.
5017 (announce_mkdir, make_ancestor): New functions.
5018 (main): Use them. Adjust to mode_adjust API change. Stick with
5019 umask 0. Use make_dir_parents for all the work.
5020 * src/mkfifo.c (main): Adjust to new mode_adjust API.
5021 * src/mknod.c (main): Likewise.
5022 * tests/chmod/setgid: Do the setgid test instead of bailing.
5023 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
5024 GNU chmod now behaves like other versions of chmod.
5025 * tests/mkdir/perm: Add a test for the X bug.
5027 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
5029 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
5030 This doesn't fix any bugs, since OUT always equals stdout, but it
5031 makes the code easier to understand.
5033 2006-07-14 Jim Meyering <jim@meyering.net>
5035 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
5036 rather than open-coding it. Now supports mercurial, too.
5037 * .hgignore: New file.
5038 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
5039 all generated files, including ones like configure and po/*.po
5040 that are currently version-controlled in cvs.
5042 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
5043 They've been in CVS, just haven't been distributed before this.
5044 Distribute ChangeLog-2005, too.
5045 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
5047 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
5049 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
5052 2006-07-09 Jim Meyering <jim@meyering.net>
5054 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
5055 That happens with Linux/tmpfs.
5056 * tests/mv/Makefile.am (TESTS): Add dir2dir.
5058 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5060 Adjust to recent updates from gnulib.
5061 * src/dd.c (apply_translations): Use toupper rather than
5062 islower followed by toupper; it's simpler and typically
5063 faster now that we assume at least C89 semantics. Similarly
5065 * src/sort.c (inittables): Likewise.
5066 * src/expand.c (expand): Don't assume that isprint etc. return
5067 booleans (needed for pre-C99 hosts).
5068 * src/fmt.c (check_punctuation): Likewise.
5069 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
5070 * src/tr.c (is_char_class_member): Likewise.
5071 * src/unexpand.c (unexpand): Likewise.
5072 * src/join.c (is_blank): Remove; no longer needed. All uses
5073 replaced by isblank (to_uchar (...)).
5074 * src/pinky.c (create_fullname): Don't assume char is unsigned.
5075 * src/printf.c (print_esc): Likewise.
5076 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
5077 (copy_unescaped_string): Likewise.
5078 * src/stat.c (print_it): Likewise.
5079 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
5080 convenience on GNU systems. All uses changed. Don't bother
5081 looking for any dirent.h substitute other than ndir.h.
5082 (D_INO): Remove unnecessary parentheses.
5083 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
5084 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
5085 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
5086 to ctype.h equivalents.
5087 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
5090 2006-07-08 Jim Meyering <jim@meyering.net>
5092 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
5094 * Makefile.maint (sc_the_the): New rule.
5096 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
5097 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
5100 2006-07-07 Jim Meyering <jim@meyering.net>
5102 * NEWS: Mention that mv can now remove an empty destination directory,
5103 and give an example. Prompted by a report from Florent Bayle.
5105 2006-07-05 Jim Meyering <jim@meyering.net>
5107 * src/ls.c (usage): Correct the description of -G: it is useful
5108 only in a long listing. Reported by Martin Pool in
5109 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
5111 * man/chmod.x: Correct the description of the sticky bit. Reported
5112 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
5114 * src/copy.c (copy_internal): Don't work around old NFS clients like
5115 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
5116 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
5117 a banal failure as a recursive move-into-self failure.
5118 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
5120 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
5122 2006-07-03 Jim Meyering <jim@meyering.net>
5124 Plug another unusual leak.
5125 (AD_mark_helper): Free malloc'd filename if hash_insert says
5126 that string is already in the hash table.
5128 The dev/inode of the topmost directory in each hierarchy were not
5130 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
5131 (AD_push): Call it from here instead.
5133 Fix two small leaks.
5134 * src/remove.c (AD_stack_clear): New function.
5136 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
5138 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
5139 Add $VG_PATH_PREFIX as a prefix to $PATH
5141 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
5142 * tests/Makefile.am (evar-check): Remove rule.
5143 (EXTRA_DIST): Remove .env-warn.
5144 * tests/.env-warn: Remove file. No longer used.
5145 Suggestion from Eric Blake.
5147 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
5149 * src/system.h: Include <stdint.h> unconditionally, since we
5150 now assume the stdint module.
5152 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
5154 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
5155 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
5156 * src/tail.c (main): Implement this.
5157 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
5158 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
5160 2006-07-01 Jim Meyering <jim@meyering.net>
5162 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
5164 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
5167 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
5169 * NEWS: seq now uses long double internally rather than double.
5170 It now defaults to a minimal fixed point format if possible.
5171 It lets you use %a, %A, %E, %F, %G.
5172 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
5173 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
5174 (isfinite) [!defined isfinite]: New macro.
5175 (separator, terminator): Now points to const.
5176 (first, step, last): Remove.
5177 (usage): Update to match new behavior.
5178 (struct operand, operand): New type.
5179 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
5181 Compute and return a value of type operand, not double.
5182 (long_double_format): Renamed from valid_format, and now returns a
5183 new format with an "L" added if needed, if the original format was
5184 valid. Allow %a, %A, %E, %F, and %G formats.
5185 (print_numbers): Take numeric values as args rather than from globals.
5186 Print long double, not double.
5187 (get_width_format): Remove.
5188 (get_default_format): New function.
5189 (main): Implement new way of calculating default format.
5190 Don't worry about locale's representation of the decimal point, since
5191 the arguments are always processed in the C locale.
5192 * tests/seq/basic (neg-2): Adjust to new default format.
5193 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
5194 implementation should do the right thing.
5196 2006-06-30 Jim Meyering <jim@meyering.net>
5198 * tests/stty/basic-1: Work around an intermittent test failure
5199 on HP-UX 11.11. Report and analysis from Bob Proulx.
5200 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
5202 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
5204 * NEWS: Support obsolete usages like "sort +1 -2" even when
5205 conforming to POSIX 1003.1-2001, since this is a pure extension to
5206 POSIX. Problem reported by Christian in:
5207 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
5208 * src/sort.c (main): Implement this.
5210 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
5211 Autoconf 2.60 says this stuff was obsolete.
5213 2006-06-28 Jim Meyering <jim@meyering.net>
5215 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
5217 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
5219 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
5220 (set -x when VERBOSE=yes) when stderr is redirected before stdout
5221 causing shell tracing of the stdout redirection to be written to
5222 the stderr file. Avoid problem and test failure on HP-UX by
5223 redirecting stderr last.
5224 * tests/dd/unblock-sync: Order shell file redirections for
5225 stderr and stdout in the common style.
5226 tests/acl: Likewise.
5228 2006-06-27 Jim Meyering <jim@meyering.net>
5230 * tests/misc/cat-proc: Try to avoid any spurious numeric
5231 differences in frequently-changing /proc/cpuinfo.
5232 Reported by Nelson Beebe.
5234 2006-06-26 Jim Meyering <jim@meyering.net>
5236 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
5237 fd_to_subdirp failure, not just when errno == EACCES.
5238 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
5239 rmdir, here, even though rmdir may happen to be adequate.
5241 * NEWS: rm no longer fails to remove an empty, unreadable directory
5242 * src/remove.c (remove_cwd_entries): If we can't open a directory,
5243 and the failure is not being ignored, try to remove the directory
5244 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
5245 Problem report and test case from Paul Eggert in
5246 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
5248 * tests/rm/empty-inacc: New test, for the above.
5250 Avoid a segfault for wc --files0=- < /dev/null.
5251 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
5253 2006-06-25 Jim Meyering <jim@meyering.net>
5255 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
5256 contains a list of NUL-separated file names.
5258 * src/wc.c: Include "readtokens.h".
5259 (usage): Describe the new option, and adjust the `Usage':
5260 with this option, no FILE may be specified on the command line.
5261 (main): Handle the new option.
5262 * tests/misc/wc-files0: New tests, for the above.
5263 * tests/misc/wc-files0-from: Likewise.
5264 * tests/misc/Makefile.am (TESTS): Add wc-files0.
5266 2006-06-24 Jim Meyering <jim@meyering.net>
5268 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
5270 2006-06-22 Jim Meyering <jim@meyering.net>
5272 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
5273 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
5275 2006-06-19 Jim Meyering <jim@meyering.net>
5277 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5278 so this check is not run as part of "make distcheck".
5280 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
5282 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
5284 2006-06-18 Jim Meyering <jim@meyering.net>
5286 * tests/misc/pwd-long: Make error output a little clearer.
5288 2006-06-17 Jim Meyering <jim@meyering.net>
5290 * tests/rm/inaccessible: Skip this test on systems without openat
5291 support. Reported by Bob Proulx.
5293 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
5295 * tests/misc/mknod: Improve permission checks to handle
5296 running mkdir test in set-gid directories.
5298 2006-06-14 Jim Meyering <jim@meyering.net>
5300 * tests/du/basic: Revamp not to hard-code file system block sizes.
5302 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5304 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
5307 2006-06-11 Jim Meyering <jim@meyering.net>
5309 * .gitignore: New file.
5310 * Makefile.am (EXTRA_DIST): Add .gitignore.
5312 Setting TIME_STYLE=long-iso in the environment would make the
5313 cp/same-file test fail.
5314 * tests/envvar-check (vars): Add TIME_STYLE to the list.
5315 * tests/cp/same-file: Revert last change.
5316 Source the envvar-check script, to ensure that TIME_STYLE
5317 settings don't affect these tests.
5319 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
5321 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
5322 uses POSIX time stamp formats. Problem reported by John Nixon in
5323 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
5325 2006-06-10 Jim Meyering <jim@meyering.net>
5327 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
5329 Require a "Version N.M" line at the top of the ChangeLog
5330 file only when making the actual release, not when running
5332 * Makefile.maint (maintainer-distcheck): Don't depend on
5334 (alpha beta major): Depend on it here, instead.
5336 2006-06-08 Jim Meyering <jim@meyering.net>
5338 Ensure that cat works with any of the options, -A -v -e -E -T,
5339 when applied to files in /proc and /sys, even when the FIONREAD
5340 ioctl produces nonsensical results. Before this change, cat would
5341 produce no output (or truncated output), for some linux kernels.
5343 * src/cat.c (write_pending): New function, factored out of cat.
5344 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
5345 that there are bytes to read. Some versions of linux-2.6.16 do that.
5346 Write any pending output before returning.
5347 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
5348 * NEWS: Mention this bug fix.
5349 * tests/misc/cat-proc: New file. Test for the above.
5350 * tests/misc/Makefile.am (TESTS): Add cat-proc.
5352 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
5354 * src/expr.c (eval4): Detect overflow properly when multiplying
5357 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
5359 * NEWS: The 'expr' command now detects and reports integer overflow.
5360 (It would be better to use extended precision instead, but that
5361 would be more work.)
5362 * src/expr.c (integer_overflow): New function.
5363 (eval4, eval3): Check for integer overflow.
5365 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
5367 Fix problems when building with Solaris/SVR4/etc. make, which uses a
5368 different and somewhat bogus implementation of VPATH. In the
5369 directory tests/misc, rename tests whose names might appear in the
5370 Automake-generated rules. For example, we can't use a test named
5371 'test', since Automake generates a rule that contains the text
5372 "if test -f ./$$tst; ...", and this might expand to something like
5373 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
5374 which executes the 'test' script rather than the 'test' command.
5375 * tests/misc/false-status: Renamed from tests/misc/false.
5376 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
5377 * tests/misc/sort-merge: Renamed from tests/misc/sort.
5378 ($prog): Set to 'sort' rather than to $PROG.
5379 * tests/misc/test-diag: Renamed from tests/misc/test.
5380 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
5381 in case Solaris make has prepended the directory.
5382 (TESTS): Adjust to above renamings.
5383 * tests/misc/expand: Don't assign to PROG; no longer needed
5384 now that Makefile.am sets PROG to the basename.
5385 * tests/misc/fold: Likewise.
5387 2006-06-03 Jim Meyering <jim@meyering.net>
5389 Make `cp --link --no-dereference' work also on systems where the
5390 link system call cannot create a hard link to a symbolic link.
5391 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
5392 the link syscall on a symlink when it would do the wrong thing.
5393 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
5394 * tests/cp/link-no-deref: New file/test for the above.
5395 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
5396 * NEWS: Mention the change (doesn't affect Linux).
5398 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
5400 Fix some porting problems in the test cases reported by
5401 Ralf Wildenhues for HP-UX 11.23 in:
5402 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
5403 * tests/help-version: Don't assume that \< \> works in sed.
5404 * tests/misc/close-stdout: Don't assume that >&- works.
5405 Add a /dev/full test.
5406 * tests/touch/no-create-missing: Don't assume that >&- works.
5408 2006-05-30 Jim Meyering <jim@meyering.net>
5410 * src/ls.c (usage): Add `v' to the list of sorting-related options.
5413 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5415 * tests/cp/fail-perm: source lang-default.
5416 * tests/rm/inaccessible: Likewise.
5418 2006-05-28 Jim Meyering <jim@meyering.net>
5420 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
5421 Recognize it, too. Reported by Ralf Wildenhues, in
5422 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
5424 2006-05-27 Jim Meyering <jim@meyering.net>
5426 * src/chgrp.c: Support new options: --preserve-root and
5427 --no-preserve-root. Somehow this program was skipped when those
5428 options were added to chown, chmod, and rm. Reported by
5429 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
5430 * NEWS: Mention this.
5432 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
5434 * NEWS: Remove mention of --seed. We'll replace it with something
5435 better, and don't want to indicate that it is supported.
5436 * src/sort.c (usage): Likewise.
5438 2006-05-20 Jim Meyering <jim@meyering.net>
5440 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
5442 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
5443 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
5444 FTS_COMFOLLOW. Spotted by Justin Pryzby.
5446 * gnupload: Merge changes from automake, retaining the ""--to...
5447 kludge to placate overzealous `make distcheck' check.
5449 2006-05-19 Jim Meyering <jim@meyering.net>
5451 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
5452 FTS_TIGHT_CYCLE_CHECK directory traversal option.
5453 Reported by Justin Pryzby in http://bugs.debian.org/367691
5455 2006-05-15 Jim Meyering <jim@meyering.net>
5457 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
5458 From Tomas Pospisek.
5460 2006-05-13 Jim Meyering <jim@meyering.net>
5462 * tests/mv/no-target-dir: Test two more cases.
5464 2006-05-11 Jim Meyering <jim@meyering.net>
5466 mv -T DIR EMPTY_DIR no longer fails unconditionally
5467 * src/copy.c (copy_internal): Don't manually prohibit a move where
5468 the destination is an existing directory. Sometimes doing that is
5469 valid. Let the rename system call enforce the rules. That is
5470 allowed only when the source is a directory and the destination
5471 directory (to be replaced) is empty. Reported by Eric Blake.
5472 * tests/mv/no-target-dir: New file/test for this.
5473 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
5474 * NEWS: Mention this.
5476 * tests/mv/atomic: New file/test for yesterday's fix.
5477 * tests/mv/Makefile.am (TESTS): Add atomic.
5479 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
5481 2006-05-10 Jim Meyering <jim@meyering.net>
5483 * src/copy.c (copy_internal): Don't explicitly unlink the destination
5484 when moving a symlink into the place of an existing non-directory.
5485 Reported by Joshua Hudson.
5486 * NEWS: mention this.
5488 2006-05-07 Jim Meyering <jim@meyering.net>
5490 * Makefile.maint (patch-check): Fail if patch generates any output,
5491 even merely for changed offsets.
5493 * src/c99-to-c89.diff: Adjust to reflect new offsets.
5495 * NEWS: Mention changes affecting df, pwd, shred.
5497 2006-05-06 Jim Meyering <jim@meyering.net>
5499 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
5500 system condition where dirent.d_ino != stat.st_ino.
5501 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
5503 2006-05-06 Eric Blake <ebb9@byu.net>
5505 * tests/ls/inode: Expand to test inode from readdir case.
5506 * tests/ls/follow-slink: Expand to test broken links encountered
5507 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
5509 2006-05-06 Eric Blake <ebb9@byu.net>
5511 * tests/mv/leak-fd: Work even on case-insensitive file system.
5513 2006-05-04 Jim Meyering <jim@meyering.net>
5515 * NEWS: Mention the 2006-03-19 pwd-related change that makes
5516 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
5518 2006-05-03 Jim Meyering <jim@meyering.net>
5520 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
5521 Use better macro parameter names: s/basename/key_name/,
5522 s/basefunc/key_cmp_func. Fix typo in comment.
5524 2006-04-29 Eric Blake <ebb9@byu.net>
5526 * src/ls.c (main): On systems with d_type, directories_first only
5527 implies format_needs_type, not format_needs_stat.
5529 2006-05-03 Jim Meyering <jim@meyering.net>
5531 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
5532 after comma in arg list, from Eric Blake.
5534 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
5536 * tests/misc/date (relative-3): New test, derived from a bug
5537 report by John Thomas McDole.
5539 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
5541 New option for ls: --group-directories-first.
5542 It makes ls list directories before files.
5543 * NEWS [New features]: Mention it.
5544 * src/ls.c (sort_type): Rearrange to use as an array index when
5545 choosing sort function; added new sort_numtypes member for
5547 (time_type): Add new time_numtypes member for compile-time check.
5548 (directories_first): New global variable.
5549 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
5550 (long_options): Add --directories-first.
5551 (main): Support new option.
5552 (is_directory): New function.
5553 (extract_dirs_from_files): Use it.
5554 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
5555 (LIST_SORTFUNCTION_VARIANTS): New macros.
5556 (sort_functions): New global variable.
5557 (sort_files): Use it.
5558 (usage): Document new option.
5560 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
5562 * src/shred.c (fillrand): The assertion was way too weak, due to
5563 what must be a typo. Strengthen it to its intended value.
5564 (dopass): Don't use alloca; it's not worth the aggravation here,
5565 since it's used only to get a page-aligned buffer, and page
5566 alignment doesn't buy us much here. I'm suspicious that alloca
5567 causes problems on some hosts, due to a recent bug report by Adam
5568 Waltman: http://bugs.gentoo.org/130246.
5570 2006-04-18 Jim Meyering <jim@meyering.net>
5572 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
5573 sha384sum, sha512sum.
5575 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
5577 * src/chmod.c (describe_change): Adjust to filemode changes.
5578 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
5579 (print_long_format): Use (new) filemodestring rather than
5580 (old) mode_string, so that we get more file types right, at least
5581 in theory. Adjust to filemode changes.
5582 * src/stat.c (human_access): Likewise.
5584 2006-04-18 Jim Meyering <jim@meyering.net>
5586 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
5587 ignore file. This has never been enabled. Reported by Eric Blake.
5589 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
5591 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
5592 bug in Interix. Just call symlink or link directly. All uses changed.
5593 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
5594 * src/stat.c (USE_STATVFS): New macro.
5595 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
5596 (NAMEMAX_FORMAT): define a bit more clearly, now that the
5597 statvfs-using code is a bit more regular.
5598 * src/system.h (sync) [!HAVE_SYNC]: New macro.
5600 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
5602 * NEWS: csplit, nl, expr now conform to POSIX better, and are
5603 more-compatible with traditional Unix, with respect to regular
5605 * src/csplit.c (extract_regexp): Set re_syntax_options to a
5606 value that is compatible with what POSIX requires.
5607 * src/nl.c (build_type_arg): Likewise.
5608 * src/expr.c (docolon): Likewise. Also, don't let anchors match
5609 newline; this fixes an incompatibility with tradition and with POSIX.
5610 Don't warn about leading ^. POSIX says it is unspecified whether
5611 ^ is a special character, which means that implementations can
5612 either treat it as special or not, but either way a warning is not
5613 allowed (unless the regexp is otherwise invalid). Instead, anchor
5614 the expression but treat ^ as an anchor; this is the traditional
5615 behavior (e.g., Solaris 10).
5616 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
5617 and the like as invalid expressions (exit status 2), not as
5618 failure of 'expr' (exit status 3). This is more consistent with
5619 how Solaris behaves.
5620 * tests/expr/basic (fail-a): Adjust exit status to match new expr
5621 behavior, for status 2 versus 3.
5623 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
5624 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
5625 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
5626 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
5627 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
5628 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
5629 (bre61, bre62): New tests.
5630 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
5631 conforming to POSIX.
5634 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
5635 "if !". Do not assume that 'sed' can handle long, newline-free input.
5636 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
5638 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
5640 Adjust to new regex.h API (with new fastmap type), and clean
5641 up the regex storage allocation a bit.
5643 * src/csplit.c (struct control): Put re_compiled member at the
5644 end, since it's large. Change regexpr member from char * to bool;
5645 all uses changed. Add new member fastmap.
5646 (extract_regexp): regexp arg is now char const *, not char *.
5647 Don't bother duplicating the regular expression; it's not needed.
5648 Set fastmap from new fastmap member. Don't bother allocating
5649 a buffer, as the regexp code does a better job than we do.
5650 * src/expr.c (docolon): Allocate and use a fastmap.
5651 Don't bother allocating a buffer.
5652 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
5654 (build_type_arg): New fastmap arg. All uses changed.
5655 Don't bother allocating a buffer, but set a fastmap.
5656 * src/ptx.c (context_regex_string, word_regex_string): Remove.
5657 (context_regex, word_regex): New vars, replacing the above.
5659 (struct regex_data): New type.
5660 (compile_regex): Renamed from alloc_and_compile_regex, since
5661 we no longer allocate storage. Arg is now a struct regex_data *,
5662 not a const char *. All uses changed. Don't allocate the fastmap;
5663 instead, take it from the caller. Don't convert size_t to int,
5664 to avoid arithmetic overflow problems. Don't bother freeing
5665 storage afterwards; it's not worth the aggravation.
5666 * src/tac.c (compiled_separator_fastmap): New ver.
5667 (main): Use it. Don't bother allocating a buffer.
5669 2006-03-30 Jim Meyering <jim@meyering.net>
5671 * src/dd.c (iwrite): Remove assignment without effect.
5672 Reported by Felix Rauch Valenti.
5674 2006-03-22 Eric Blake <ebb9@byu.net>
5676 * src/ptx.c (usage): Remove mention of --copyright/-C.
5677 (main): Alias --copyright to --version plus a deprecation warning.
5678 * NEWS: Mention this.
5680 2006-03-27 Jim Meyering <jim@meyering.net>
5682 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
5683 use of strtod. Tiny patch from Nickolai Zeldovich.
5685 2006-03-11 Eric Blake <ebb9@byu.net>
5687 * tests/misc/dirname: New file.
5688 * tests/basename/Makefile.am: Delete.
5689 * tests/basename/basic: Move to...
5690 * tests/misc/basename: ... this new file. Add some tests,
5691 including fixed behavior for //.
5692 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
5693 * tests/Makefile.am (SUBDIRS): Remove basename.
5694 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
5696 Improvements to dirname/basename handling on platforms like
5697 cygwin with distinct // and with drive letters.
5698 * NEWS: Document new behavior.
5699 * src/basename.c (main): Don't strip suffix from file system
5701 * src/cp.c (target_directory_operand): Use new last_component.
5702 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
5703 traversing the string.
5704 * src/dircolors.c (guess_shell_syntax): Use new last_component.
5705 * src/install.c (target_directory_operand, install_file_in_dir):
5707 * src/ln.c (target_directory_operand, main): Likewise.
5708 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
5709 * src/mv.c (target_directory_operand, movefile): Likewise.
5710 * src/remove.c (rm_1): Likewise.
5711 * src/shred.c (wipename): Likewise.
5712 * src/split.c (next_file_name): Likewise.
5713 * src/su.c (log_su, run_shell): Likewise.
5715 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
5717 * NEWS: nohup diagnostics are now more precise, and nohup now
5718 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
5719 * src/nohup.c (main): Implement this.
5720 * tests/misc/nohup: Test the new behavior.
5722 2006-03-12 Jim Meyering <jim@meyering.net>
5724 * src/copy.c (set_author): Rename function, from preserve_author.
5726 * src/remove.c (AD_pop_and_chdir): Use new macro,
5727 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
5729 * src/system.h (SAME_INODE): Remove definition.
5730 Include "same-inode.h", instead.
5732 2006-03-11 Eric Blake <ebb9@byu.net>
5734 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
5736 2006-03-10 Jim Meyering <jim@meyering.net>
5738 Fix a bug whereby a user with write access to a directory being removed
5739 could cause the removal of that directory to fail with an erroneous
5740 diagnostic about a directory cycle. Reported by Vineet Chadha.
5742 * NEWS: Mention this.
5743 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
5744 leave (and try to rmdir) is the one whose dev_ino is being used to
5745 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
5747 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
5749 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
5750 * src/dd.c (set_fd_flags): Handle file-creation flags on file
5751 descriptors, rather than ignoring them.
5752 * tests/dd/misc: Add test cases for append, nofollow, directory,
5753 and nolinks flags. Simplify redirection to /dev/null in some cases.
5755 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
5756 noatime test never tested anything.
5758 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
5760 * src/dd.c (flags, usage): New flags directory, nolinks.
5761 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
5763 * src/ls.c (usage): Mention that -f disables --color.
5764 Problem reported by Niels Möller.
5766 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
5768 * man/*.x: Add references to syscalls from utilities of the same name.
5770 2006-03-05 Jim Meyering <jim@meyering.net>
5772 * tests/help-version: Set SHELL, if not already set, in order to
5773 avoid failure when `make check' is run through debuild; dircolors
5774 would fail due to lack of $SHELL. Reported by Sven Joachim.
5776 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
5777 * src/base64.c (wrap_write, do_encode, main): Change type of
5778 parameters and locals, wrap_column, form size_t to uintmax_t.
5779 (main): Adjust to use xstrtoumax, accordingly.
5781 2006-03-03 Jim Meyering <jim@meyering.net>
5783 Don't fail when run from an environment with SHELL not a Bourne
5784 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
5785 * tests/dircolors/simple: Invoke each non-failing test with -b.
5786 Reported by Michael Stone.
5788 2006-02-27 Jim Meyering <jim@meyering.net>
5790 * tests/misc/base64: Derive --decode-using tests from the
5793 * tests/misc/base64: Factor out a long constant string.
5794 Split lines to stay within 80 columns.
5796 * tests/misc/Makefile.am (TESTS): Add base64.
5797 * tests/misc/base64: Test base64. From Simon Josefsson.
5799 * src/base64.c (do_decode): Use correct type for parameter,
5800 ignore_garbage: s/size_t/bool/.
5802 * src/base64.c: Don't include .h files already included by system.h:
5803 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
5804 Include "system.h" before the other lib/*.h header files.
5805 Include <sys/types.h> before "system.h".
5806 (wrap_write): Remove declaration of unused local, initial_column.
5807 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
5809 * README: Add base64 to the list.
5811 2006-02-17 Simon Josefsson <jas@extundo.com>
5813 New program: base64.
5814 * AUTHORS: Mention base64.
5816 * man/Makefile.am: Build base64.1.
5817 * man/base64.x: New file.
5818 * src/Makefile.am (bin_PROGRAMS): Add base64.
5819 * src/base64.c: New file.
5821 2006-02-25 Eric Blake <ebb9@byu.net>
5823 In ls, avoid calling stat for --inode (-i), when possible.
5824 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
5825 * src/system.h: ... here, for use in ...
5826 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
5828 (gobble_file): Add inode argument.
5829 (print_dir): Pass inode if available.
5830 (usage): Remove inaccuracy.
5832 2006-02-23 Jim Meyering <jim@meyering.net>
5834 * TODO: Update/correct some obsolete entries.
5836 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
5838 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
5839 * src/join.c (usage): Likewise.
5840 Documentation problem reported by Philip Kensche.
5842 2006-02-20 Eric Blake <ebb9@byu.net>
5844 * man/rm.x: Update documentation to match previous patch.
5846 2006-02-18 Eric Blake <ebb9@byu.net>
5848 New option for rm: --interactive=once (-I).
5849 * NEWS: Document it, along with change to rm --interactive.
5850 * TODO: Remove entry for implementing rm -I
5851 * src/rm.c (INTERACTIVE_OPTION): New enum value.
5852 (interactive_type): New enum.
5853 (long_opts): Let interactive take an optional argument.
5854 (interactive_args, interactive_types): New option arguments.
5855 (usage): Document -I, --interactive=WHEN. Use program_name
5856 instead of a basename.
5857 (main): New -I option, new behavior to --interactive.
5858 * tests/rm/interactive-once: New tests.
5859 * tests/rm/interactive-always: Ditto.
5860 * tests/rm/Makefile.am (TESTS): Run them.
5862 2006-02-18 Jim Meyering <jim@meyering.net>
5864 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
5865 expression match more of the target lines, e.g., those that start with
5866 `-S,' (short option followed by a comma) or that include `=[...]'.
5867 Patch by Nicolas François.
5868 Fix the four offenders thus exposed:
5869 * src/join.c (usage): Use two spaces (not one) to separate the
5870 --first-only option string from its description, so help2man formats
5871 the derived man page properly.
5872 * src/pr.c (usage): Likewise.
5873 * src/uniq.c (usage): Likewise.
5874 * src/install.c (usage): Likewise.
5876 2006-02-15 Jim Meyering <jim@meyering.net>
5878 * Makefile.maint (alpha beta major): For `make major', ensure that the
5879 version string is of the form N.N[.N]*, where N is one or more digits.
5881 2006-02-14 Jim Meyering <jim@meyering.net>
5883 * INSTALL: Update from gnulib.
5885 2006-02-13 Jim Meyering <jim@meyering.net>
5887 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
5889 2006-02-12 Jim Meyering <jim@meyering.net>
5891 * Makefile.maint (patch-check): New target.
5892 (local-checks-available): Add to the list.
5894 2006-02-11 Jim Meyering <jim@meyering.net>
5896 * src/c99-to-c89.diff: New file.
5897 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
5899 * .x-po-check: New file, with exclusions so that `make distcheck'
5901 * Makefile.am (EXTRA_DIST): Add .x-po-check.
5903 rm -r must remove an empty directory, even if it is inaccessible.
5904 * src/remove.c (close_preserve_errno): New function.
5905 (fd_to_subdirp): Don't print a diagnostic in this function.
5906 Do it from the callers instead, unless rmdir succeeds.
5907 (remove_cwd_entries, remove_dir): Adjust callers.
5908 * tests/rm/empty-inacc: New test for the above.
5909 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
5910 * NEWS: Mention this bug fix.
5911 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
5912 a tiny bit less precise: cannot remove `a/1': ... instead of
5913 cannot open directory `a/1': ...
5915 * Makefile.maint (syntax-check-rules): Automatically derive this
5916 list of sc_-prefixed rule names.
5918 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
5920 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
5921 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
5922 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
5923 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
5924 go away? was that an accident?)
5925 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
5926 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
5927 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
5928 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
5929 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
5930 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
5931 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
5932 (author_mark_check, makefile_path_separator_check):
5933 Output line numbers, to simplify navigation of Emacs *compilation*
5935 (sc_prohibit_atoi_atof, sc_file_system):
5936 Rework slightly so that Makefile.maint doesn't get reported as a
5937 violation of its own syntax rules.
5938 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
5939 it at run-time (which didn't work with Bison). Fix a makefile typo,
5940 caught by Makefile.maint itself: spaces where a tab should be.
5941 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
5942 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
5943 Ignore djgpp and man subdirectories, to avoid false matches with
5944 Bison and coreutils, respectively. Use sort -u to remove the
5945 resulting duplicates.
5946 * gnupload: Rework slightly to avoid bogus warning from
5947 sc_two_space_separator_in_usage.
5949 2006-02-10 Jim Meyering <jim@meyering.net>
5951 Use gzip's --rsyncable option only if it's available.
5952 * Makefile.maint (gzip_rsyncable): New variable.
5955 2006-02-08 Jim Meyering <jim@meyering.net>
5957 * Makefile.maint (local-checks-available): Define in terms of
5958 the expansion, $(syntax-check-rules), rather than the single,
5959 top-level target `syntax-check', so that it's easier to exclude
5960 individual rules (via $(local-checks-to-skip)).
5961 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
5963 2006-02-07 Jim Meyering <jim@meyering.net>
5965 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
5966 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
5968 * tests/help-version (expected_failure_status_vdir):
5969 Redirect an expected disk-full diagnostic to /dev/null.
5971 2006-02-06 Jim Meyering <jim@meyering.net>
5973 * src/unexpand.c (usage): Use two spaces (not one) to separate the
5974 --first-only option string from its description, so help2man formats
5975 the derived man page properly.
5976 * src/rm.c (usage): Likewise for --no-preserve-root.
5977 * src/chown.c (usage): Likewise.
5978 * src/chgrp.c (usage): Likewise.
5980 Add a rule to ensure that the above doesn't happen again.
5981 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
5982 (syntax-check-rules): Add it.
5983 * .x-sc_two_space_separator_in_usage: New empty file.
5984 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
5986 2006-02-06 Jim Meyering <jim@meyering.net>
5988 * src/cp.c (usage): Use two spaces (not one) to separate each
5989 option string from its description, so help2man formats the
5990 derived man page properly.
5991 * src/mv.c (usage): Likewise.
5992 Patch from Nicolas François in http://bugs.debian.org/351601.
5994 2006-02-04 Jim Meyering <jim@meyering.net>
5996 * src/copy.c (copy_internal): cp -RL would fail when encountering
5997 the same directory more than once in the hierarchy beneath a single
5998 command-line argument. That is legitimate, e.g. when there are
5999 two or more symbolic links, each pointing to some directory that
6000 would not otherwise be copied. Reported by Christophe LYON.
6001 * tests/cp/cp-deref: New file. Test for today's fix.
6002 * tests/cp/Makefile.am (TESTS): Add cp-deref.
6003 * NEWS: Document this.
6005 2006-02-03 Jim Meyering <jim@meyering.net>
6007 * configure.ac: Require automake-1.9.6, not 1.8.3.
6009 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
6011 * src/od.c (usage): Mention that -t a ignores high order bit.
6012 Documentation problem reported by Ed Avis.
6014 2006-02-01 Jim Meyering <jim@meyering.net>
6016 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
6018 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
6020 * src/head.c (main): Use a better diagnostic when someone uses a
6021 trailing numeric option in an invalid way. Problem reported by
6023 * src/tail.c (parse_options): Likewise.
6025 2006-01-30 Jim Meyering <jim@meyering.net>
6027 * man/wc.x: Include `count' keyword in man page synopsis,
6028 per suggestion from http://bugs.debian.org/181585.
6030 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
6032 * src/df.c (show_dev): If the file system claims to have
6033 more available than total blocks, report the number of used
6034 blocks as being total - available (a negative number) rather
6035 than as garbage. Problem reported by Toralf Foerster.
6037 2006-01-24 Jim Meyering <jim@meyering.net>
6039 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
6040 to put a regular file in O_NONBLOCK mode fails with EPERM.
6041 That happens on Linux (up to 2.6.15) when using tail -f on a file with
6042 the append-only attribute. Reported by Dean Gaudet. For details,
6043 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
6044 * NEWS: Mention this fix.
6045 * tests/tail-2/append-only: New file. Test for the above.
6046 * tests/tail-2/Makefile.am (TESTS): Add append-only.
6047 * tests/Makefile.am (check-root): Add tail-2/append-only
6049 2006-01-21 Jim Meyering <jim@meyering.net>
6051 * NEWS: Mention fts-related improvements and bug fixes.
6053 2006-01-19 Jim Meyering <jim@meyering.net>
6055 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
6056 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
6058 2006-01-18 Jim Meyering <jim@meyering.net>
6060 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
6062 2006-01-17 Jim Meyering <jim@meyering.net>
6064 Now that fts no longer changes the current working directory, adjust
6065 its clients accordingly -- note that du.c uses fts but doesn't need
6066 any adjustment, since it doesn't operate on the actual files,
6067 but rather just uses the stat buffers provided by fts.
6069 * src/chown-core.c: Include "openat.h".
6070 Don't include "lchown.h".
6071 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
6072 calling openat, lchownat, chownat, rather than open, lchown, chown.
6074 * src/chmod.c: Include "openat.h".
6075 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
6077 * tests/du/long-from-unreadable: New test, to exercise one small
6080 2006-01-13 Jim Meyering <jim@meyering.net>
6082 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
6083 addition of new directories under tests/.
6085 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
6088 2006-01-12 Jim Meyering <jim@meyering.net>
6090 * tests/du/long-sloop: Adjust not to hard-code the expected
6091 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
6092 from that of GNU libc. Reported by Paul Eggert.
6094 * tests/du/long-sloop: Create file at end of symlink chain.
6096 * tests/misc/test: New file, with a test for one of the
6097 bugs fixed by yesterday's test.c changes.
6098 * tests/misc/Makefile.am (TESTS): Add test.
6100 2006-01-11 Jim Meyering <jim@meyering.net>
6102 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
6103 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
6104 a very long sequence of symbolic links (not necessarily a loop).
6105 * tests/du/Makefile.am (TESTS): Add long-sloop.
6107 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
6109 * src/test.c (test_syntax_error): Append a newline. All callers
6110 changed, except for the ones that didn't already append a newline.
6111 Bug reported by Eric Blake.
6113 2006-01-11 Jim Meyering <jim@meyering.net>
6115 * src/system.h (X2NREALLOC): Now that verify_true is no longer
6116 void, cast its result to void, to avoid gcc's warning that
6117 ``left-hand operand of comma expression has no effect''.
6118 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
6120 2006-01-10 Jim Meyering <jim@meyering.net>
6122 * tests/chmod/no-x: Add a test for today's fts.c fix.
6124 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
6126 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
6127 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
6129 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
6131 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
6132 Use verify_true instead of verify_expr, to sync with gnulib.
6134 2006-01-08 Jim Meyering <jim@meyering.net>
6136 * src/date.c (usage): Adjust the formatting of the entries for
6137 %::z and %:::z (separate with two spaces, not one) so that help2man
6138 formats them properly. Reported by Philip Rowlands.
6140 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
6142 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
6144 2006-01-06 Jim Meyering <jim@meyering.net>
6146 * Makefile.maint (copyright-check): Use date +%Y in place of
6149 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
6150 First off, the attribute should have been `volatile' (not static)
6151 to avoid longjmp-related risk of clobber. Secondly, now there is
6152 no longer any risk of a local variable being clobbered, so there's
6153 no need for any attribute at all.
6155 2006-01-05 Jim Meyering <jim@meyering.net>
6157 * src/remove.c: Give a few functions the inline attribute.
6158 (AD_pop_and_chdir): Use gotos to avoid some duplication.
6159 (AD_push): Rewrite an assertion so that the entire computation
6160 goes away when assertions are turned off.
6162 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
6163 It's already defined in "system.h".
6164 * Makefile.maint: Add a FIXME comment.
6166 2006-01-04 Jim Meyering <jim@meyering.net>
6168 * ChangeLog: Remove entries from 2005-10-22 and earlier.
6169 * ChangeLog-2005: New file, for entries up to version 5.92.
6171 2006-01-03 Jim Meyering <jim@meyering.net>
6173 * tests/du/no-x: Also allow a slightly different diagnostic -- the
6174 one you get when using openat-enabled fts.c and du (coming soon).
6175 * tests/chmod/no-x: Likewise.
6176 * tests/chgrp/no-x: Likewise.
6178 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
6180 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
6182 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
6183 (restricted_chown): Return it, if the file cannot be accessed due
6184 to EPERM, or if no uid or gid are required, or if the file is
6185 neither a directory nor a regular file. Rewrite to avoid gotos.
6186 (change_file_owner): Handle RC_do_ordinary_chown case.
6187 Rewrite to avoid gotos.
6188 * tests/chgrp/basic: Make sure we can change the group of
6191 * src/date.c (usage): Explain %g, %G, and %V a bit better.
6193 2006-01-02 Jim Meyering <jim@meyering.net>
6195 * src/copy.c (set_owner): Correct a comment.
6197 * src/tail.c (parse_options): Change warning to say that --retry
6198 is useful `mainly' (not `only') when following by name.
6199 Reported here: http://bugs.debian.org/273781
6201 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
6203 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
6204 * src/copy.c: Include lchmod.h.
6205 (copy_internal): Use lchmod rather than chmod.
6206 * src/cp.c: Include lchmod.h.
6207 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
6208 * src/mkdir.c: Include lchmod.h.
6209 (usage): Clarify -m's operation.
6210 (main): Use lchmod rather than chmod. Don't use lchmod unless the
6211 new mode contains bits outside the 777 range.
6212 * src/mkfifo.c (usage): Clarify -m's operation.
6213 (main): If -m is given, don't invoke chmod; use umask 0 instead.
6214 Report an error if -m asks for bits outside the 777 range.
6215 * src/mknod.c (usage, main): Likewise.
6217 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
6219 2005-12-27 Jim Meyering <jim@meyering.net>
6221 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
6222 (sc_prohibit_assert_without_use): New rule.
6223 (syntax-check-rules): Add it to the list.
6224 * .x-sc_prohibit_assert_without_use: New empty file.
6225 * Makefile.am (EXTRA_DIST): Add it.
6227 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
6229 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
6230 Don't include <assert.h>; it wasn't used.
6232 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
6234 * src/chown-core.c (restricted_chown):
6235 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
6236 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
6237 | O_NOFOLLOW too, for consistency with other dir-openers.
6238 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
6239 (is_empty_dir): Likewise.
6240 * src/shred.c (wipename): Likewise. Don't bother trying to open
6241 dir for writing, since POSIX prohibits it.
6243 2005-12-22 Jim Meyering <jim@meyering.net>
6245 * tests/help-version: Redirect stderr to /dev/full, to suppress
6246 write error diagnostic.
6248 2005-12-19 Jim Meyering <jim@meyering.net>
6250 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
6251 Avoid a minor race condition when `-m MODE' is specified, by using
6252 open, fchown, and close rather than just chown. To do that reliably --
6253 even with an overly restrictive umask -- ensure that each mkdir,
6254 mknod and mkfifo call uses a mode including at least owner-read access.
6255 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
6256 the subsequent chown (or equivalent open,fchown,close) fails.
6257 * tests/misc/mknod: New tests.
6258 * tests/misc/Makefile.am (TESTS): Add mknod.
6260 2005-12-17 Jim Meyering <jim@meyering.net>
6262 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
6263 e.g., on a named pipe.
6264 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
6265 place of all uses, since it is guaranteed (system.h) to be defined.
6267 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
6269 Add POSIX ACL support
6270 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
6271 is no requirement for ACL support; particularly, it does not exist
6272 on systems that have POSIX ACLs.
6273 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
6274 * src/cp.c (umask_kill): With default acls, the umask is not to be
6275 applied. Remove umask_kill, don't change the process umask, and let
6276 the kernel apply the umask where appropriate.
6277 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
6278 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
6280 (copy_reg, copy_internal): Use copy_acl and set_acl
6281 instead of fchown/chown. Fix the logic for POSIX ACLs.
6282 (chown_succeded): Remove; we now always copy acls and
6283 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
6284 did a chown before or not.
6285 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
6286 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
6287 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
6288 to link with it via $(LIB_ACL), for the utilities that need it.
6290 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
6292 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
6293 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
6294 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
6295 value is now signified by whether cwd_errno is null.
6296 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
6297 pointer-to-bool to pointer-to-errno-value. All callers changed.
6298 (rm_1): Don't bother setting a local cwd failure flag and then
6299 ORing it into the caller's. Just set the caller's.
6300 (rm): Use cwd failure errno value to print a slightly-better
6303 2005-12-15 Jim Meyering <jim@meyering.net>
6305 * src/stat.c (print_it): Properly handle a backslash at the
6306 end of a --printf format string. Reported by Paul Eggert.
6307 * tests/misc/stat-printf (end-bs): Add a test for the above.
6309 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
6311 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
6312 Don't assume /etc/passwd contains user names; use 'id' instead.
6314 2005-12-15 Jim Meyering <jim@meyering.net>
6316 stat: revert behavior of --format=FMT (-c)
6317 stat: add new option: --printf=FMT
6318 * NEWS: Mention this.
6319 * src/stat.c (isodigit, octtobin, hextobin): Define.
6320 (PRINTF_OPTION): Define.
6321 (interpret_backslash_escapes, trailing_delim): New globals.
6322 (usage): Document them. Alphabetize on long option names.
6323 (print_esc_char): New function.
6324 (print_it): Rewrite, in order to handle backslash escapes.
6325 (main): Handle new option. Set globals for --format, too.
6327 * tests/misc/stat-printf: Test --printf and --format.
6328 * tests/misc/Makefile.am (TESTS): Add stat-printf.
6330 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
6332 * NEWS: sort now reports incompatible options.
6333 * src/sort.c (incompatible_options, check_ordering_compatibility):
6335 (main): Use them. Don't bother with a usage message for
6336 "sort -c a b", for consistency with other error diagnostics.
6337 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
6340 * src/cat.c (main): Undo previous change. close_stdout already
6341 does the check, so the previous change wasn't necessary.
6343 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
6345 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
6347 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
6349 Install a more-conservative approach for sort -R. It's the
6350 same basic idea as the existing code, except it uses the full ISAAC
6351 approach (called the "more kosher" approach in the existing comments).
6352 This makes "sort -R" quite a bit slower (about a factor of 2 on my
6353 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
6354 better to be conservative here at first, and review any performance
6355 improvements carefully.
6356 * .x-sc_require_config_h: Add src/rand-isaac.c.
6357 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
6358 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
6359 (shred_SOURCES, sort_SOURCES): Remove.
6360 (EXTRA_DIST): Add rand-isaac.c.
6361 * src/rand-isaac.c: Revert to what used to be in shred.c, without
6362 changing it to allow for varying numbers of words in the state.
6363 Alter so that we include rand-isaac.c directly rather than
6364 compiling it and linking to it. Don't include config.h or
6365 system.h; that's the includer's responsibility.
6366 Omit functions that are specific to shred.
6367 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
6368 (isaac_step, struct irand_state):
6369 Resurrect these, with the same defns that used to be in shred.c.
6370 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
6371 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
6373 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
6374 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
6375 (irand_init, irand32, irand_mod):
6376 Number of words is constant again.
6377 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
6378 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
6379 * src/sort.c: Likewise.
6380 * src/shred.c (fillrand, dopass, main): Undo previous change.
6381 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
6383 * src/sort.c: Don't include md5.h; it wasn't needed.
6384 (struct keyfield): Rename random_hash to random, for consistency
6385 with the other member names. All uses changed.
6386 (usage): Tweak wording to mention STRING for --seed option.
6387 (short_options): Rorder for consistency with other programs.
6388 (rand_state): Now a struct, not a pointer to one. All uses changed.
6389 (HASH_WORDS, HASH_SIZE): Remove.
6390 (get_hash): Remove comments around resbuf size, since we can assume C89.
6391 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
6392 (keycompare): Adjust to the new get_hash.
6394 (badfieldspec): Omit recently-introduced comment; it isn't needed.
6395 (main): Don't set need_random simply because gkey has it set; that
6396 doesn't necessarily mean we'll need random numbers.
6397 Redo seeding to match new get_hash approach.
6399 2005-12-10 Jim Meyering <jim@meyering.net>
6401 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
6403 Avoid shred segfault on 64-bit systems.
6404 * src/rand-isaac.c (isaac_refill): Don't try to negate a
6405 local of type uint32_t. Make the local an `int' instead.
6407 * NEWS: Mention sort's new options.
6409 * src/rand-isaac.c (isaac_mix): Declare to be static.
6410 Mark all other functions as `extern' so the tight-scope
6411 part of `make distcheck' passes once again.
6412 * src/rand-isaac.h (isaac_mix): Remove declaration.
6414 * src/sort.c (get_hash): Change position of `*' in parameter
6415 type to conform with convention.
6416 (main): Split a long line so it fits in 80 columns.
6417 (keycompare): Remove stray SPACE before TAB that was
6418 causing `make distcheck' to fail.
6420 * src/shred.c: Don't include gethrxtime.h. No longer needed.
6422 * tests/misc/sort-rand: New file: basic tests for the new options.
6423 * tests/misc/Makefile.am (TESTS): Add sort-rand.
6425 2005-12-10 Frederik Eaton <frederik@ofb.net>
6427 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
6428 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
6429 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
6430 Make state size runtime-configurable.
6431 (isaac_new, isaac_copy): New functions.
6432 * src/rand-isaac.h: New file.
6433 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
6434 (fillrand, main): Adjust to the fact that the state size is now
6435 runtime-configurable.
6436 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
6437 (usage): Add options --random-sort and --seed to implement a random
6439 Include md5.h and rand-isaac.h.
6440 (get_hash): New function.
6441 (rand_state): New var.
6442 (HASH_WORDS, HASH_SIZE): New macros.
6444 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
6446 * tests/dd/misc: Add test for dd iflags=noatime.
6448 2005-12-09 Jim Meyering <jim@meyering.net>
6450 * src/sort.c (usage): Mention white space vs -b and -t options.
6453 2005-12-09 Eric Blake <ebb9@byu.net>
6455 * src/test.c (main): Fix misleading comment.
6457 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
6459 * NEWS: Mention dd's new noatime flag.
6460 * src/system.h (O_NOATIME): Define to 0 if not already defined.
6461 * src/dd.c (flags, usage): Add support for noatime flag.
6463 2005-12-07 Jim Meyering <jim@meyering.net>
6465 Distribute the cvsu script, used only by `make syntax-check'.
6466 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
6467 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
6468 distribute a copy of this script.
6469 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
6471 * tests/mv/acl: exit-77 before the trap, not after, if we fail
6472 to create a temporary directory on another partition.
6473 From Andreas Gruenbacher.
6475 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
6477 * man/basename.x: Cross-reference to dirname and readlink.
6478 * man/dirname.x: Cross-reference to basename and readlink.
6480 2005-12-05 Andreas Gruenbacher
6482 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
6483 (set_owner, preserve_author): New functions, factored out of copy_reg.
6484 (copy_reg): Use them.
6485 (copy_internal): Use them here, too.
6487 2005-12-04 Jim Meyering <jim@meyering.net>
6489 * src/sleep.c (usage): Say what happens with two or more arguments.
6490 Suggested by Justin Pryzby.
6492 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
6495 2005-12-03 Jim Meyering <jim@meyering.net>
6497 * src/rm.c (long_opts): Change the name of each undocumented, for-
6498 testing-only option to start with `-', so that it cannot render
6499 ambiguous any prefix it happens to share with some other option name.
6500 Problem reported by Eric Blake.
6501 * src/head.c (long_options): Likewise.
6502 * src/tail.c (long_options): Likewise.
6504 * tests/misc/head-elide-tail: Update uses of undocumented, for-
6505 testing-only --presume* options to start with `---'.
6506 * tests/rm/dangling-symlink: Likewise.
6507 * tests/rm/dir-no-w: Likewise.
6508 * tests/rm/isatty: Likewise.
6510 2005-11-30 Jim Meyering <jim@meyering.net>
6512 * Makefile.maint: Add a comment about cvsu.
6514 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
6516 * NEWS: df updates for "none", "proc", inaccessible file systems.
6517 * src/df.c (show_point): Ignore inaccessible file systems.
6518 (usage): -a includes dummy file systems, not size-0 file systems.
6520 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
6521 to avoid collision with POSIX name space. All uses changed.
6523 2005-11-24 Jim Meyering <jim@meyering.net>
6525 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
6526 * tests/acl: Add `$0: ' prefix to diagnostics.
6528 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
6530 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
6532 * src/copy.c: Improve performance a bit by optimizing away
6533 unnecessary system calls and going to a block size of at least
6534 8192 (on normal hosts, anyway). This improved performance 5% on my
6535 Debian stable host (2.4.27 kernel, x86, copying from root
6536 ext3 file system to itself).
6537 Include "buffer-lcm.h".
6538 (copy_reg): Omit last argument. All callers changed.
6539 Use xmalloc to allocate rather than trusting alloca
6540 (which is unwise with large block sizes).
6541 Declare locals more locally, if possible.
6542 Use uintptr_t words instead of int words, for a bit more speed
6543 when looking for null blocks on 64-bit hosts.
6544 Optimize away reads of zero bytes on regular files.
6545 In the typical case, insist on 8 KiB buffers, at least.
6546 Avoid unnecessary extra call to fstat when checking for sparse files.
6547 Avoid now-unnecessary cast to off_t, and "0L".
6548 Avoid unnecessary test of *new_dst when checking for same owner
6551 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
6553 * src/remove.c (rm): Don't assume C99 for-loop syntax.
6555 2005-11-22 Jim Meyering <jim@meyering.net>
6557 * src/remove.c (AD_push): Remove debugging cruft.
6559 * tests/rm/unread2 (rm): Change expected diagnostic,
6560 `cannot open directory' to `cannot remove', to align with
6562 * tests/rm/rm2: Ensure that rm now continues removing entries
6563 even after certain types of failure.
6565 * src/remove.c: Rewrite. Now, this module is reentrant on systems
6566 that provide openat (Solaris), and on systems like Linux+procfs
6567 where our openat emulation code is reentrant. This also fixes a
6568 few low-probability leaks and eliminates some code that could,
6569 in very unusual circumstances, cause rm() (via a callee) to exit.
6570 * NEWS: Mention this.
6572 * configure.ac: Put copyright dates all on one line so the
6573 emacs function that updates them works properly.
6575 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
6577 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
6578 Problem reported by Eric Blake.
6579 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
6580 we get a standard-conforming compiler. This relies on the new
6581 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
6582 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
6583 m4/c.m4 can go away with Autoconf 2.60 comes out.
6585 2005-11-17 Jim Meyering <jim@meyering.net>
6587 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
6588 (AD_mark_current_as_unremovable): Likewise, but for a local.
6591 * tests/mv/acl: Let traps handle removing temporary directories.
6593 Expect acl-related tests to fail, until the corresponding
6594 patches are committed.
6595 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
6596 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
6598 ACL tests, from Andreas Gruenbacher.
6599 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
6600 * tests/mv/Makefile.am (TESTS): Add acl.
6601 * tests/cp/Makefile.am (TESTS): Add acl.
6603 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
6605 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
6607 * NEWS: Improve quality of ln's diagnostics.
6608 * src/ln.c (do_link, usage): Likewise.
6609 (do_link): Don't use alloca on a buffer of unbounded size.
6611 2005-11-16 Jim Meyering <jim@meyering.net>
6613 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
6614 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
6615 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
6616 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
6617 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
6619 2005-11-14 Jim Meyering <jim@meyering.net>
6621 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
6623 2005-11-13 Jim Meyering <jim@meyering.net>
6625 * announce-gen: Accept new option, --gpg-key-id=ID and
6626 emit a blurb telling how to use the .sig files.
6627 * Makefile.cfg (gpg_key_ID): Define.
6628 * Makefile.maint (announcement): Use new option and key.
6630 Require that most .c files include <config.h>.
6631 * Makefile.maint (sc_require_config_h): New rule.
6632 (syntax-check-rules): Add it.
6633 * .x-sc_require_config_h: New file listing exceptions to the
6634 above rule. Some are legit, others are simply grandfathered in.
6635 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
6637 2005-11-12 Jim Meyering <jim@meyering.net>
6639 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
6641 2005-11-11 Jim Meyering <jim@meyering.net>
6643 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
6644 Mention new readlink options in 5.3.0's `New features' section.
6645 Spotted by Thomas Hood.
6647 2005-11-08 Jim Meyering <jim@meyering.net>
6649 * NEWS: Merge in changes from b5_9x branch.
6651 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
6653 * NEWS: ls now defaults to --time-style='locale', which in turn acts
6654 like --time-style='posix-long-iso' if the locale settings are messed up.
6655 * src/ls.c (decode_switches): Implement this.
6657 2005-11-08 Jim Meyering <jim@meyering.net>
6659 * tests/du/2g: s/expensive/very expensive/ in a comment.
6662 2005-10-17 Eric Blake <ebb9@byu.net>
6664 * src/ls.c (usage): Fix descriptions of --sort, --time.
6665 Reported by Vitaly A. Ostanin.
6667 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
6669 * src/ln.c: Include filenamecat.c.
6670 (FILE_BASENAME_CONCAT): Remove.
6671 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
6672 (main): Use file_name_concat, base_name, and strip_trailing_slashes
6673 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
6676 2005-11-04 Jim Meyering <jim@meyering.net>
6678 * src/du.c (process_file): Don't overflow for files of size >= 2^31
6679 on systems with stat.st_blocks of a signed 32-bit type.
6680 This bug causes trouble on some AIX 5.1 systems.
6681 Report and trivial patch from Paul Townsend:
6682 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
6683 * NEWS: Mention this.
6685 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
6686 * tests/du/Makefile.am (TESTS): Add it here.
6687 * tests/very-expensive: New file.
6688 * tests/Makefile.am (EXTRA_DIST): Add it here.
6689 * tests/cp/perm: Mark this test as `very-expensive', too.
6691 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
6693 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
6695 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
6697 * src/rm.c (usage): Don't mention rm -d.
6699 2005-11-02 Jim Meyering <jim@meyering.net>
6701 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
6702 From Andreas Schwab.
6704 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
6705 `M+N records in/out' lines don't pollute `make check' output.
6707 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
6708 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
6709 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
6710 to indicate that the input file should be piped into the command
6711 under test (via `cat FILE | $prog ...').
6713 * src/remove.c (remove_entry): Emit a better diagnostic when rm
6714 (without -r) fails to remove a directory on a non-Linux system.
6715 This change affects only newer Solaris systems (with priv_*
6716 functions like priv_allocset). Reported by Keith Thompson.
6718 * tests/rm/dir-nonrecur: New file/test for the above fix.
6719 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
6721 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
6723 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
6724 POSIX 1002.1-2001 requires.
6725 * src/tail.c (parse_obsolete_option): Implement this.
6726 Problem reported by Vincent Lefevre.
6727 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
6728 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
6729 (test_vector): Add special cases for _POSIX2_VERSION, and
6730 regularize the old ones a bit.
6731 * tests/touch/obsolescent: Add y2000 test.
6733 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
6735 * src/dd.c (skip): Fix off-by-one error reported by
6736 Theodoros V. Kalamatianos.
6738 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
6740 * tests/mkdir/p-3: Require that the test be run as non-root.
6741 Problem and trivial fix reported by Theodoros V. Kalamatianos.
6743 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
6745 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
6746 boundary between DEST and SOURCE in the result.
6748 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
6750 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
6751 back to text, to sync with documentation and for backwards
6754 2005-10-25 Jim Meyering <jim@meyering.net>
6756 * tests/dircolors/simple (other-wr): Add an explicit test for
6757 the dircolors bug (NULL-dereference) fixed yesterday.
6759 2005-10-24 Jim Meyering <jim@meyering.net>
6761 * src/tac.c (tac_file): When determining whether a file is seekable,
6762 also test whether it is a tty. Using only the lseek-based test would
6763 give a false positive on Solaris. Reported by Peter Fales.
6765 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
6767 * tests/install/d-slashdot: New test, for "install -d" failure.
6768 * tests/install/Makefile.am (TESTS): Add d-slashdot.
6769 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
6770 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
6772 2005-10-24 Jim Meyering <jim@meyering.net>
6774 * src/dircolors.c (ls_codes): Add missing comma.
6775 Anonymous report and patch from
6776 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
6778 * src/dircolors.c: Add compile-time assertion that the slack_codes
6779 and ls_codes arrays have the same number of elements. This would
6780 have prevented the above-fixed bug.
6782 * src/expand.c (parse_tab_stops): Add a comment to make this function
6783 identical to the one in unexpand.c.
6784 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
6785 identical to the one in expand.c.
6787 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
6789 2005-10-23 Jim Meyering <jim@meyering.net>
6791 * src/md5sum.c (digest_check, main): Use ptr_align rather than
6792 a dangerous pointer-value-to-`unsigned' cast.
6793 * NEWS: mention the new sha* programs.
6794 * AUTHORS: Add new sha* programs.
6796 2005-08-28 David Madore <david.madore@ens.fr>
6798 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
6799 * README: Add their names to the list.
6800 * src/md5sum.c: Provide framework for computing sha-2 hashes.
6801 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
6802 Rules for compiling sha-2 utilities
6803 (noinst_HEADERS): Remove checksum.h.
6804 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
6806 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
6807 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
6808 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
6809 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
6810 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
6811 sha384sum, sha512sum test scripts here rather that each in its
6814 2005-08-28 David Madore <david.madore@ens.fr>
6816 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
6817 of the FIPS test vectors).
6819 2005-10-23 Jim Meyering <jim@meyering.net>
6821 * configure.ac: Use 6.0-cvs as the version string.
6822 * NEWS: Adjust accordingly.
6827 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
6829 Copying and distribution of this file, with or without
6830 modification, are permitted provided the copyright notice
6831 and this notice are preserved.