1 2007-07-05 Jim Meyering <jim@meyering.net>
3 * bootstrap: Merge in changes from gnulib.
5 * src/id.c: Include "getugroups.h" rather than declaring manually.
7 2007-07-04 Paul Eggert <eggert@cs.ucla.edu>
9 * NEWS: pr -F no longer suppresses the footer or the first two blank
11 * doc/coreutils.texi (pr invocation): Likewise. Also, a too-short
12 page length implies -t, not -T.
13 * src/pr.c (lines_per_header, lines_per_footer): Now constants.
14 (init_parameters): Don't try to change them.
15 (print_header): Use the same header and footer format regardless of
16 wither form feeds are being used.
17 (usage): Adjust to above change when describing too-short page length.
18 Too-short page length impliesy -t, not -T.
19 * tests/pr/2-S_f-t_notab: Adjust to the fact that -F now affects
20 only formfeed handling; it does not change the header.
21 * tests/pr/2-Sf-t_notab: Likewise.
22 * tests/pr/2f-t_notab: Likewise.
23 * tests/pr/2s_f-t_notab: Likewise.
24 * tests/pr/2s_w60f-t_nota: Likewise.
25 * tests/pr/2sf-t_notab: Likewise.
26 * tests/pr/2sw60f-t_notab: Likewise.
27 * tests/pr/2w60f-t_notab: Likewise.
28 * tests/pr/3a3f-0F: Likewise.
29 * tests/pr/3b3f-0F: Likewise.
30 * tests/pr/3b3f-0FF: Likewise.
31 * tests/pr/3b3f-FF: Likewise.
32 * tests/pr/3f-0F: Likewise.
33 * tests/pr/3f-FF: Likewise.
34 * tests/pr/Test.pm: Likewise.
35 * tests/pr/a3f-0F: Likewise.
36 * tests/pr/a3f-0FF: Likewise.
37 * tests/pr/a3f-FF: Likewise.
38 * tests/pr/b3f-0F: Likewise.
39 * tests/pr/b3f-0FF: Likewise.
40 * tests/pr/b3f-FF: Likewise.
41 * tests/pr/3-5l17f-t: Remove, since it's been renamed to another
42 file whose name has a line count 7 larger,
43 reflecting the new line count needed for this behavior.
44 * tests/pr/3a3l8f-t: Likewise.
45 * tests/pr/3b3l8f-t: Likewise.
46 * tests/pr/3l17f-t: Likewise.
47 * tests/pr/3ml17f-t: Likewise.
48 * tests/pr/Ja3l17f-lm: Likewise.
49 * tests/pr/Jb3l17f-lm: Likewise.
50 * tests/pr/Jml17f-lm-lo: Likewise.
51 * tests/pr/W-72l17f-ll: Likewise.
52 * tests/pr/W20l17f-ll: Likewise.
53 * tests/pr/W26l17f-ll: Likewise.
54 * tests/pr/W27l17f-ll: Likewise.
55 * tests/pr/W28l17f-ll: Likewise.
56 * tests/pr/W35Ja3l17f-lm: Likewise.
57 * tests/pr/W35Jb3l17f-lm: Likewise.
58 * tests/pr/W35Jml17f-lmlo: Likewise.
59 * tests/pr/W35a3l17f-lm: Likewise.
60 * tests/pr/W35b3l17f-lm: Likewise.
61 * tests/pr/W35ml17f-lm-lo: Likewise.
62 * tests/pr/W72Jl17f-ll: Likewise.
63 * tests/pr/a3l17f-lm: Likewise.
64 * tests/pr/a3l8f-t: Likewise.
65 * tests/pr/b3l17f-lm: Likewise.
66 * tests/pr/b3l8f-t: Likewise.
67 * tests/pr/l17f-t: Likewise.
68 * tests/pr/ml17f-0F: Likewise.
69 * tests/pr/ml17f-lm-lo: Likewise.
70 * tests/pr/ml17f-t: Likewise.
71 * tests/pr/ml17f-t-0F: Likewise.
72 * tests/pr/n+2-5l17f-0FF: Likewise.
73 * tests/pr/n+2l17f-0FF: Likewise.
74 * tests/pr/n+2l17f-bl: Likewise.
75 * tests/pr/n+3l17f-0FF: Likewise.
76 * tests/pr/n+3l17f-bl: Likewise.
77 * tests/pr/n+3ml13f-bl-FF: Likewise.
78 * tests/pr/n+3ml17f-bl-tn: Likewise.
79 * tests/pr/n+3ml17f-tn-bl: Likewise.
80 * tests/pr/n+4b2l10f-0FF: Likewise.
81 * tests/pr/n+5-8b3l10f-FF: Likewise.
82 * tests/pr/n+5a3l6f-0FF: Likewise.
83 * tests/pr/n+6b3l6f-FF: Likewise.
84 * tests/pr/nJml17f-lmlmlo: Likewise.
85 * tests/pr/nJml17f-lmlolm: Likewise.
86 * tests/pr/nN1+3l17f-bl: Likewise.
87 * tests/pr/nN15l17f-bl: Likewise.
88 * tests/pr/nSml13-bl-FF: Likewise.
89 * tests/pr/nSml13-t-t-FF: Likewise.
90 * tests/pr/nSml13-t-tFFFF: Likewise.
91 * tests/pr/nSml17-bl-FF: Likewise.
92 * tests/pr/nSml17-t-t-FF: Likewise.
93 * tests/pr/nSml17-t-tFFFF: Likewise.
94 * tests/pr/nl17f-bl: Likewise.
95 * tests/pr/o3Jml17f-lm-lo: Likewise.
96 * tests/pr/o3a3Sl17f-tn: Likewise.
97 * tests/pr/o3a3Snl17f-tn: Likewise.
98 * tests/pr/o3a3l17f-tn: Likewise.
99 * tests/pr/o3b3Sl17f-tn: Likewise.
100 * tests/pr/o3b3Snl17f-tn: Likewise.
101 * tests/pr/o3b3l17f-tn: Likewise.
102 * tests/pr/o3mSl17f-bl-tn: Likewise.
103 * tests/pr/o3mSnl17fbltn: Likewise.
104 * tests/pr/o3ml17f-bl-tn: Likewise.
105 * tests/pr/w72l17f-ll: Likewise.
106 * tests/pr/3-5l24f-t: New file, containing the contents of the
107 file with the same name but with the line count smaller by 7,
108 reflecting the new behavior with -F.
109 * tests/pr/3a3l15f-t: Likewise.
110 * tests/pr/3b3l15f-t: Likewise.
111 * tests/pr/3l24f-t: Likewise.
112 * tests/pr/3ml24f-t: Likewise.
113 * tests/pr/Ja3l24f-lm: Likewise.
114 * tests/pr/Jb3l24f-lm: Likewise.
115 * tests/pr/Jml24f-lm-lo: Likewise.
116 * tests/pr/W-72l24f-ll: Likewise.
117 * tests/pr/W20l24f-ll: Likewise.
118 * tests/pr/W26l24f-ll: Likewise.
119 * tests/pr/W27l24f-ll: Likewise.
120 * tests/pr/W28l24f-ll: Likewise.
121 * tests/pr/W35Ja3l24f-lm: Likewise.
122 * tests/pr/W35Jb3l24f-lm: Likewise.
123 * tests/pr/W35Jml24f-lmlo: Likewise.
124 * tests/pr/W35a3l24f-lm: Likewise.
125 * tests/pr/W35b3l24f-lm: Likewise.
126 * tests/pr/W35ml24f-lm-lo: Likewise.
127 * tests/pr/W72Jl24f-ll: Likewise.
128 * tests/pr/a3l15f-t: Likewise.
129 * tests/pr/a3l24f-lm: Likewise.
130 * tests/pr/b3l15f-t: Likewise.
131 * tests/pr/b3l24f-lm: Likewise.
132 * tests/pr/l24f-t: Likewise.
133 * tests/pr/ml24f-0F: Likewise.
134 * tests/pr/ml24f-lm-lo: Likewise.
135 * tests/pr/ml24f-t: Likewise.
136 * tests/pr/ml24f-t-0F: Likewise.
137 * tests/pr/n+2-5l24f-0FF: Likewise.
138 * tests/pr/n+2l24f-0FF: Likewise.
139 * tests/pr/n+2l24f-bl: Likewise.
140 * tests/pr/n+3l24f-0FF: Likewise.
141 * tests/pr/n+3l24f-bl: Likewise.
142 * tests/pr/n+3ml20f-bl-FF: Likewise.
143 * tests/pr/n+3ml24f-bl-tn: Likewise.
144 * tests/pr/n+3ml24f-tn-bl: Likewise.
145 * tests/pr/n+4b2l17f-0FF: Likewise.
146 * tests/pr/n+5-8b3l17f-FF: Likewise.
147 * tests/pr/n+5a3l13f-0FF: Likewise.
148 * tests/pr/n+6b3l13f-FF: Likewise.
149 * tests/pr/nJml24f-lmlmlo: Likewise.
150 * tests/pr/nJml24f-lmlolm: Likewise.
151 * tests/pr/nN1+3l24f-bl: Likewise.
152 * tests/pr/nN15l24f-bl: Likewise.
153 * tests/pr/nSml20-bl-FF: Likewise.
154 * tests/pr/nSml20-t-t-FF: Likewise.
155 * tests/pr/nSml20-t-tFFFF: Likewise.
156 * tests/pr/nSml24-bl-FF: Likewise.
157 * tests/pr/nSml24-t-t-FF: Likewise.
158 * tests/pr/nSml24-t-tFFFF: Likewise.
159 * tests/pr/nl24f-bl: Likewise.
160 * tests/pr/o3Jml24f-lm-lo: Likewise.
161 * tests/pr/o3a3Sl24f-tn: Likewise.
162 * tests/pr/o3a3Snl24f-tn: Likewise.
163 * tests/pr/o3a3l24f-tn: Likewise.
164 * tests/pr/o3b3Sl24f-tn: Likewise.
165 * tests/pr/o3b3Snl24f-tn: Likewise.
166 * tests/pr/o3b3l24f-tn: Likewise.
167 * tests/pr/o3mSl24f-bl-tn: Likewise.
168 * tests/pr/o3mSnl24fbltn: Likewise.
169 * tests/pr/o3ml24f-bl-tn: Likewise.
170 * tests/pr/w72l24f-ll: Likewise.
172 2007-06-23 Jim Meyering <jim@meyering.net>
174 Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0.
175 * src/base64.c (main): Likewise.
176 * src/install.c (setdefaultfilecon): Likewise.
177 * src/sort.c (main): Likewise.
178 * Makefile.maint (sc_prohibit_strcmp): New rule.
179 * .x-sc_prohibit_strcmp: New file, to list the few exceptions.
180 * Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp.
182 2007-06-22 Paul Eggert <eggert@cs.ucla.edu>
184 * NEWS: seq no longer mishandles obvious cases like
185 "seq 0 0.000001 0.000003" by omitting the last output number.
186 * doc/coreutils.texi (seq invocation): Remove advice about workaround
187 for seq off-by-one problem, since the bug is fixed now. Replace
188 it with more-generic advice about rounding errors.
189 * src/seq.c (long_double_format, print_numbers):
190 New arg NUMERIC_FORMAT. All uses changed.
192 2007-06-22 Pádraig Brady <P@draigBrady.com> (trivial change)
194 * tests/seq/basic: Add test cases for seq off-by-one problem.
196 2007-06-22 Jim Meyering <jim@meyering.net>
198 * src/stat.c (long_options): Add a FIXME comment to help ensure
199 that the deprecated and undocumented "--filesystem" option is
202 2007-06-18 Paul Eggert <eggert@cs.ucla.edu>
204 A few more symlink-related fixes. Fix a bug triggered by cp
205 --parents and symlinks. Close some race conditions possible when
206 the destination replaces a newly-created file with a symlink.
207 * NEWS: Document that 'cp --parents' no longer mishandles
208 symlinks in file name components of source.
209 * src/copy.c (HAVE_LCHOWN): Default to false.
210 (lchown) [!defined HAVE_LCHOWN]: Define to chown, for convenience.
211 * src/cp.c (lchown) [!HAVE_LCHOWN]: Likewise.
212 * src/install.c (lchown [!HAVE_LCHOWN]: Likewise.
213 * src/copy.c (set_owner): Use lchown instead of chown, for safety
214 in case the file got replaced by a symlink in the meantime.
215 * src/cp.c (re_protect): Likewise.
216 * src/install.c (change_attributes): Likewise.
217 * src/copy.c (copy_internal): Use ordinary C rather than an #if.
218 * src/cp.c (lchown) [!HAVE_LCHOWN]: Define to chown, for convenience.
219 (struct dir_attr): Cache the entire struct stat of the directory,
220 rather than just its mode, so that we needn't stat the directory
221 twice (which can lead to races).
222 (re_protect): Don't use XSTAT as that's not appropriate in
223 this context (symlinks should be followed here). Instead, use
224 the cached stat value.
225 (make_dir_parents_private): Save dir's entire struct stat, not
227 * tests/cp/cp-parents: Add test to check against bug with
228 cp --parents and symlinks.
230 2007-06-18 Jim Meyering <jim@meyering.net>
232 Use mreadlink_with_size (doesn't exit), not xreadlink_with_size.
233 * bootstrap.conf (gnulib_modules): Add readlink-with-size.
234 Remove xreadlink and xreadlink-with-size.
235 * src/copy.c (copy_internal): Use mreadlink_with_size,
236 not xreadlink_with_size.
237 * src/ls.c (get_link_name): Likewise.
238 * src/readlink.c (main): Likewise.
239 * src/stat.c (print_stat): Likewise.
241 * README-hacking: Don't mention Gzip 1.2.4, now that 1.3.12 is out.
243 2007-06-16 Jim Meyering <jim@meyering.net>
245 Make chgrp and chown diagnostics consistent.
246 * src/chown.c (main): Emit the diagnostic before the file name,
247 not after it, to be consistent with chgrp's diagnostic.
248 * src/chgrp.c (parse_group): Emit a ":" between the diagnostic
250 Reported by Egmont Koblinger.
251 * THANKS: Add Egmont Koblinger.
253 2007-06-15 Paul Eggert <eggert@cs.ucla.edu>
255 Correct cp's handling of destination symlinks in some cases.
256 * NEWS: "cp" no longer considers a destination symlink to be the
257 same as the referenced file when copying links or making backups.
258 * src/copy.c (copy_reg): When following a symlink, use the
259 followed name in later chown etc. requests, so that the created
260 file is affected, rather than the symlink. Use O_NOFOLLOW on
261 source when not dereferencing symlinks; this avoids a race.
262 Preserve errno correctly when doing multiple open attempts on the
264 (copy_internal): Follow destination symlinks only when copying a
265 regular file and only when we don't intend to remove or rename the
266 destination first, regardless of whether following source
267 symlinks; this is because since POSIX and tradition (e.g.,
268 FreeBSD) say we should ordinarily follow destination symlinks if
269 the system calls would ordinarily do so.
270 * src/copy.h (struct cp_options): Add comment that 'dereference'
271 is only for source files.
272 * src/cp.c (usage): Note that --derereference etc. are only for
274 (make_dir_parents_private): Follow symlinks, regardless of whether
275 --dereference is specified, because these are destination symlinks.
276 * tests/cp/same-file: Adjust tests to match revised behavior.
277 Filter out perror output since it might vary from host to host.
278 Use sed alone instead of also using echo.
280 * doc/coreutils.texi (cp invocation): Document the behavior better when
281 the destination is a symlink. Clarify source versus destination
282 symlinks. Describe the new behavior for destination symlinks.
284 2007-06-15 Jim Meyering <jim@meyering.net>
286 * src/copy.c: Include "canonicalize.h".
287 (copy_reg): Use canonicalize_filename_mode to follow the symlink,
288 so that we can always open with O_EXCL and avoid a race.
290 2007-06-15 Jim Meyering <jim@meyering.net>
292 Don't include "quote.h" when it is not used.
293 * src/md5sum.c: Remove unnecessary inclusion of "quote.h".
294 * src/expr.c: Likewise.
295 * src/shred.c: Likewise.
296 * Makefile.maint (sc_prohibit_quote_without_use): New rule.
297 * src/c99-to-c89.diff: Adjust offsets.
299 2007-06-14 Paul Eggert <eggert@cs.ucla.edu>
301 Clarify what "cat" documentation means by "blank" lines.
302 * doc/coreutils.texi (cat invocation): "Blank" lines actually mean
304 * src/cat.c (usage): Say that "nonblank" means nonempty. Clarify
307 2007-06-13 Jim Meyering <jim@meyering.net>
309 rmdir: give better diagnostics
310 * src/rmdir.c (remove_parents): Give a more descriptive/consistent
311 diagnostic upon failure.
313 Suggestion from Joey Hess.
314 * THANKS: Add Joey Hess.
316 Don't include "quotearg.h" when it is not used.
317 * Makefile.maint (sc_prohibit_quotearg_without_use): New rule.
318 * src/cp.c: Don't include "quotearg.h". It wasn't used.
320 * README-hacking: List Gperf as a build-requirement, too.
321 Reported by Steve Ward.
323 2007-06-11 Jim Meyering <jim@meyering.net>
325 * README: Mention README-hacking, for whose who start from
326 cloned/checked-out sources rather than from a distribution tarball.
327 Reported by Steve Ward.
328 * THANKS: Add Steve Ward.
330 2007-06-10 Jim Meyering <jim@meyering.net>
332 bug-fix: cp would fail to write through a dangling symlink
333 * NEWS: Mention the bug fix.
334 * src/copy.c (copy_reg): When open fails with EEXIST, the destination
335 is lstat'able, and a symlink, call open again, but now without O_EXCL.
336 * tests/cp/thru-dangling: New file, to test for the above fix.
337 * tests/cp/Makefile.am (TESTS): Add thru-dangling.
338 * THANKS: Add Michael McLagan.
339 Bug report from Michael McLagan in <http://bugzilla.redhat.com/243588>.
341 2007-06-04 Paul Eggert <eggert@cs.ucla.edu>
343 * doc/coreutils.texi (Common options): Mention that -h and
344 --human-readable are equivalent to --block-size=human-readable.
345 Documentation problem reported by Steve Ward in
346 <http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00007.html>.
347 (du invocation): Use optSi rather than duplicating the macro's
348 contents (incorrectly, since we claimed a "B" was output).
350 2007-05-31 Jim Meyering <jim@meyering.net>
352 Pull printf-related code from gnulib, rather than using forked copy.
353 * bootstrap.conf (gnulib_modules): Don't avoid size_max and xsize
354 modules. While I dislike xsize-style overflow avoidance, maintaining
355 a forked version of e.g., vasnprintf.c was too much work.
357 2007-05-29 Jim Meyering <jim@meyering.net>
359 * src/dircolors.hin: Add screen-256color.
360 Suggested by sdl.web@gmail.com in <http://bugzilla.redhat.com/239266>.
362 2007-05-26 Jim Meyering <jim@meyering.net>
364 * TODO: Add an entry for comm --output-delimiter=STR
366 2007-05-25 James Youngman <jay@gnu.org>
368 wc: ignore multibyte-character decoding errors
369 * src/wc.c (wc): Don't issue an error message when mbrtowc
370 indicates that we have seen an invalid byte sequence. This
371 makes "wc /bin/sh" bearable (though the word and line counts
372 are likely not to be useful).
373 * NEWS: Mention the change.
375 2007-05-22 Jim Meyering <jim@meyering.net>
377 Check for an up-to-date copyright year in coreutils.texi.
378 * Makefile.maint (copyright-check): Also check for an up-to-date
379 copyright year in doc/$().texi, if that file exists.
380 * doc/coreutils.texi: Add 2007 to list of Copyright years.
381 Reported by Karl Berry.
383 cut: diagnose a range starting with 0 (-f 0-2) as invalid, and
384 give a better diagnostic for a field-number/offset of 0.
385 * NEWS: Mention the fix.
386 * src/cut.c (ADD_RANGE_PAIR): Add an explicit check.
387 Based on a patch from James Youngman.
388 * tests/misc/cut: Add tests for the above.
390 "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
391 Also, diagnose the '-' in "cut -f -" as an invalid range, rather
392 than interpreting it as the unlimited range, "1-".
393 * NEWS: Mention these changes.
394 * src/cut.c (set_fields): Don't interpret an accumulator "value"
395 of 0 as an unspecified range endpoint.
396 Give better diagnostics.
397 Adjust a comment so that it is true also for 64-bit size_t.
399 * tests/cut/Test.pm: Add tests for the above.
401 stty: fix a harmless syntax nit
402 * src/stty.c (visible): Use ";" as the statement terminator
403 between two assignments, not ",".
404 (integer_arg): Join an unnecessarily wrapped line.
406 2007-05-20 Jim Meyering <jim@meyering.net>
408 stty: diagnose an invalid hex value in 35-colon commmand-line argument
409 * NEWS: Mention this.
410 * src/stty.c (strtoul_tcflag_t, strtoul_cc_t): New functions.
411 (recover_mode): Use those functions (not sscanf), to parse the
413 * tests/stty/invalid: New file. Test for the above.
414 * tests/stty/Makefile.am (TESTS): Add invalid.
415 * .x-sc_prohibit_atoi_atof: Don't exempt stty.c from this check.
416 Add tests/stty/invalid so we don't have to obfuscate the comment
417 about sscanf therein.
418 * Makefile.maint (sc_prohibit_atoi_atof): Mention sscanf in the
421 * TODO: Remove some now-completed or no longer relevant items.
423 2007-05-19 Jim Meyering <jim@meyering.net>
425 Rename uses of futimens -> gl_futimens; glibc now declares the former.
426 * src/copy.c (copy_reg): Reflect renaming: futimens -> gl_futimens.
427 * src/touch.c (touch): Likewise.
429 2007-05-18 Jim Meyering <jim@meyering.net>
431 * Makefile.maint (my-distcheck): Remove -pedantic from $(CFLAGS)
432 for now, to avoid c89-check failure due to use of #include_next.
434 2007-05-15 Jim Meyering <jim@meyering.net>
436 Generate a dozen test-related Makefile.am files at bootstrap-time.
437 * README-hacking: Build-from-checkout now require Perl, too.
438 * bootstrap: Now that these generated Makefile.am files are no longer
439 under version control, they must be created at bootstrap time.
441 2007-05-14 Paul Eggert <eggert@cs.ucla.edu>
443 * man/chmod.x: Document chmod's behavior with setuid and setgid bits.
444 Remove misleading implication about leading zero. Problem
445 reported by Jan Engelhardt in
446 <http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00134.html>.
448 2007-05-13 Jim Meyering <jim@meyering.net>
450 Remove the generated tests/*/Makefile.am files from version control.
451 * tests/cut/Makefile.am: git-remove this generated file.
452 * tests/head/Makefile.am: Likewise.
453 * tests/join/Makefile.am: Likewise.
454 * tests/pr/Makefile.am: Likewise.
455 * tests/sort/Makefile.am: Likewise.
456 * tests/tac/Makefile.am: Likewise.
457 * tests/tail/Makefile.am: Likewise.
458 * tests/test/Makefile.am: Likewise.
459 * tests/tr/Makefile.am: Likewise.
460 * tests/uniq/Makefile.am: Likewise.
461 * tests/wc/Makefile.am: Likewise.
462 * .cvsignore, .gitignore: Ignore these generated files.
464 * src/.cvsignore, src/.gitignore: Add chcon here, ...
465 * .cvsignore, .gitignore: ... not here.
467 Test uniq's new --zero-terminated (-z) option.
468 * tests/uniq/Test.pm: When possible, create a "-z"-testing variant
469 of each existing test.
470 (2z, 3z, 4z, 5z, 20z, 122, 123): New tests from James Youngman.
472 2007-05-12 James Youngman <jay@gnu.org>
474 Add -z option to uniq. Originally proposed by Egmont Koblinger.
475 * NEWS: Mention uniq's new option: --zero-terminated (-z).
476 * src/uniq.c: Add new option, --zero-terminated (-z), to make
477 uniq use the NUL byte as separator/delimiter rather than newline.
478 (check_file): Add a parameter: delimiter. Update caller.
479 Use readlinebuffer_delim in place of readlinebuffer everywhere.
480 (main): Handle the new option.
481 (usage): Describe new option the same way sort does.
482 * doc/coreutils.texi (uniq invocation): Describe the new option.
484 2007-05-07 Jim Meyering <jim@meyering.net>
486 * NEWS: Mention that last week's tr bug dates back to 1992.
488 2007-05-04 Jim Meyering <jim@meyering.net>
490 Avoid test failure when run with an unusual umask.
491 * tests/ls/color-dtype-dir: Set umask to 022.
492 Suggestion from AIDA Shinra.
494 Avoid failure of root-only test when run with a restrictive umask.
495 * tests/rm/no-give-up: Ensure that non-root can access "d/" through
496 root-owned ".". Reported by AIDA Shinra.
498 tr -c: don't abort when translating with S2 larger than complement of S1
499 * src/tr.c (main): Remove invalid assertion triggered by e.g.,
500 tr -c a '[b*256]'. There's nothing wrong with having Set2 larger
501 than Set1. Reported by Guntram Blohm.
502 * tests/tr/Test.pm (no-abort-1): Test for the above.
503 * NEWS: Mention this bug fix.
504 * THANKS: Add Guntram Blohm.
506 2007-05-03 Jim Meyering <jim@meyering.net>
508 Avoid test failure when run with a permissive umask.
509 * tests/rm/no-give-up: Set permissions of test directory properly,
510 i.e., not depending on umask prohibiting go=w.
511 Reported by AIDA Shinra.
513 2007-05-02 Paul Eggert <eggert@cs.ucla.edu>
515 The following commands and options now support the standard size
516 suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y:
517 head -c, head -n, od -j, od -N, od -S, split -b, split -C,
519 * doc/coreutils.texi (od invocation, head invocation, tail invocation):
520 Document support for new size suffixes.
521 (head invocation, tail invocation):
522 Document that -n uses the same suffixes as -c.
523 (tail invocation): More-clearly document what leading "+" does.
524 * src/head.c (usage, string_to_integer): Support new suffixes.
525 * src/od.c (usage, main): Likewise.
526 * src/split.c (usage, main): Likewise.
527 * src/tail.c (usage, parse_options): Likewise.
528 Prompted by a patch from Evan Hunt.
530 2007-05-02 Jim Meyering <jim@meyering.net>
532 * src/du.c (usage): Tweak description of --dereference-args (-D) again.
533 Prompted by another request for clarification from Justin Pryzby.
535 Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.
536 * tests/rm/fail-2eperm: Patch from AIDA Shinra.
537 Reported by Peter Dyballa.
538 * THANKS: Add AIDA Shinra and Peter Dyballa.
540 2007-04-28 Paul Eggert <eggert@cs.ucla.edu>
542 * src/nohup.c (usage): Describe how standard input and output
545 2007-04-25 Jim Meyering <jim@meyering.net>
547 * src/du.c (usage): Clarify description of --dereference-args (-D).
548 Prompted by a report from Justin Pryzby.
550 * bootstrap.conf (gnulib_modules): Add fseeko and ftello.
551 (gnulib_modules): Add autobuild.
553 2007-04-24 Jim Meyering <jim@meyering.net>
555 * THANKS: Add Andreas Frische.
556 * NEWS: Mention today's ls --color fix.
557 * tests/ls-2/tests (sl-dangle): Add a test for today's fix.
559 2007-04-24 Eric Blake <ebb9@byu.net>
561 ls --color once again colors dangling symlinks correctly
562 * src/ls.c (gobble_file): Much like the 2007-04-07 fix,
563 add a term to the expression that decides whether we need
564 stat and/or lstat calls. Reported by Andreas Frische.
566 2007-04-16 Jim Meyering <jim@meyering.net>
568 * src/cut.c (usage): Adjust synopsis to show that an OPTION is required.
569 Reported by Rudolf Kastl.
570 * THANKS: Add Rudolf Kastl.
572 2007-04-11 Paul Eggert <eggert@cs.ucla.edu>
574 split --line-bytes=N (-C N): don't create an empty file.
575 * src/split.c (line_bytes_split): Don't create an empty line
576 afterwards if the last buffer happens to be exactly full.
577 * tests/misc/split-fail: Add a test case for this.
578 * NEWS: mention this.
580 2007-04-10 Jim Meyering <jim@meyering.net>
582 ls: don't form or compute the length of strings that won't be used.
583 * src/ls.c (gobble_file): Form and compute length of strings for
584 block size, owner, group, author, major+minor numbers and file size
585 only if they'll actually be used. I.e., don't form most of them
586 when not producing long format output.
588 2007-04-07 Jim Meyering <jim@meyering.net>
590 Add a test for, and document, today's fix.
591 * NEWS: Mention today's ls --color fix.
592 * tests/ls-2/tests (sl-target): Add a test for today's fix.
593 * THANKS: Add Kirk Kelsey.
595 2007-04-07 Eric Blake <ebb9@byu.net>
597 Fix a bug in how the LS_COLORS ln=target attribute is handled.
598 * src/ls.c (gobble_file): Use "stat" (not lstat) also when the
599 ln=target attribute applies. Reported by Kirk Kelsey.
601 2007-04-02 Jim Meyering <jim@meyering.net>
603 * src/copy.c (copy_reg): Initialize local "con", before calling
604 getfscreatecon, in case that function (or its inline stub) does
607 2007-04-01 Paul Eggert <eggert@cs.ucla.edu>
609 * src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
610 ls -x DIR would sometimes output the wrong string in place of the
612 * NEWS: Mention the bug fix.
613 * tests/ls/x-option: New file.
614 * tests/ls/Makefile.am (TESTS): Add x-option.
616 gnulib moved md5 and sha1 modules into a new crypt/ directory; adapt
617 * bootstrap.conf (gnulib_modules): Adjust to gnulib's renaming of
618 md5 to crypt/md5 and sha1 to crypt/sha1.
620 2007-03-30 Jim Meyering <jim@meyering.net>
622 * NEWS: Mention these SELinux changes.
624 * ChangeLog-selinux: Remove file.
625 Move its contents into this file, removing old dates.
627 * src/runcon.c (main): Don't reorder arguments. Reported by
628 Ulrich Drepper in <http://bugzilla.redhat.com/232652>.
629 * tests/misc/runcon-no-reorder: New file. Test for the above.
630 * tests/misc/Makefile.am (TESTS): Add runcon-no-reorder.
632 * src/runcon.c (main): Remove "." at end of a diagnostic.
634 * src/runcon.c: New program.
635 * src/Makefile.am (bin_PROGRAMS): Add runcon.
636 (runcon_LDADD): Define.
637 * README: Add runcon to the list of programs.
638 * AUTHORS: Add this: runcon: Russell Coker
639 * tests/help-version: Add runcon as an exception.
640 * man/Makefile.am (dist_man_MANS): Add runcon.1.
641 (runcon.1): New dependency.
643 mkfifo, mknod: Accept new "-Z, --context=C" option.
644 * src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>.
646 * src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
648 mkdir: Accept new "-Z, --context=C" option.
649 * src/mkdir.c: Include <selinux/selinux.h>.
651 * src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
653 * tests/cp/cp-a-selinux: New file. Test for the bug reported in
654 <http://bugzilla.redhat.com/219900>.
655 * tests/cp/Makefile.am (TESTS): Add cp-a-selinux.
657 * tests/selinux: New file.
658 * tests/Makefile.am (EXTRA_DIST): Add selinux.
659 * tests/misc/selinux: Source the new script, rather than open coding it.
661 Change how "cp -a" and "cp --preserve=context" work with SELinux.
662 Now, cp -a attempts to preserve context, but failure to do so does
663 not change cp's exit status. However "cp --preserve=context" is
664 similar, but failure *does* cause cp to exit with nonzero status.
665 * src/copy.h (struct cp_options) [require_preserve_context]: New member.
666 * src/copy.c (copy_reg, copy_internal): Implement the above.
667 * src/mv.c (cp_option_init): Initialize the new member.
668 * src/install.c (cp_option_init): Likewise.
669 * src/cp.c (cp_option_init): Likewise.
670 (decode_preserve_arg): Set it or reset it.
672 cp, mv, install: add SELinux support, but unlike with the Red Hat
673 patch, mv and cp do not provide the "-Z context" option.
674 * src/copy.c: Include <selinux/selinux.h>.
675 (restore_default_fscreatecon): New function.
676 (copy_reg): Make cp --preserve=context work for existing destination.
677 (copy_internal): Likewise for new destinations.
678 * src/copy.h (cp_options) [preserve_security_context]: New member.
679 * src/cp.c: Include <selinux/selinux.h>.
680 (selinux_enabled): New global.
681 (usage): Mention new --preserve=context option.
682 (PRESERVE_CONTEXT): Define/use.
683 (decode_preserve_arg): Handle PRESERVE_CONTEXT.
684 (main): Remove an obsolete comment.
685 If --preserve=context is specified on a system without SELinux
686 enabled, give a diagnostic and fail.
687 * src/mv.c: Include <selinux/selinux.h>.
688 Set x->preserve_security_context if SELinux is enabled.
689 * src/install.c: Accept new "-Z, --context=C" option.
690 Accept --preserve-context option (but not -P option).
691 Accept alternate spelling: --preserve_context, for now.
692 Include <selinux/selinux.h> and "quotearg.h".
693 (selinux_enabled, use_default_selinux_context): New globals.
694 (PRESERVE_CONTEXT_OPTION): Define.
695 (cp_option_init): Default: do not preserve security context.
696 (setdefaultfilecon): New function.
697 (main): Honor new options.
698 * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD):
700 * src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.
702 * tests/misc/selinux [VERBOSE]: Print version info for each
703 of the tested tools, not just ls.
705 * src/c99-to-c89.diff: Remove the ls.c patch, now that I've
706 temporarily removed the offending c99'ism.
708 * src/chcon.c (usage): Split a string literal that was longer than 509.
710 * src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.
711 Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
713 * src/c99-to-c89.diff: Adjust offsets.
715 * AUTHORS: Add chcon.
717 * src/c99-to-c89.diff: Remove trailing blanks.
719 * src/chcon.c: Don't include "dirname.h". system.h already includes it.
721 * gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.
723 * src/c99-to-c89.diff: Handle a new c99'ism in ls.c.
725 * src/id.c (main): Tweak id -Z diagnostic.
727 id: Add SELinux support: -Z option.
728 * src/id.c (main): Apply patches from Fedora, with these changes:
729 Remove #ifdef WITH_SELINUX.
730 Use error (EXIT_FAILURE, not fprintf+exit(1).
731 * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
733 stat: Add support for SELinux in the form of a %C format directive.
734 * src/stat.c (follow_links): Make this variable file-global.
735 (out_file_context): New function.
736 (print_statfs): Honor %C.
737 (print_stat): Honor %C.
738 (do_stat): Remove follow_links parameter.
739 (usage): Document the two %C directives.
740 (main): Accept -Z (though it's a no-op).
741 * src/Makefile.am (stat_LDADD): Define.
743 ls: Add support for SELinux and a slightly modified -Z option.
744 I started with the patches from Red Hat.
745 The entries below tell how the code evolved.
747 * src/ls.c (print_long_format, print_file_name_and_frills): When
748 there is no security context (due to getfilecon/lgetfilecon failing
749 with e.g. ENOTSUP), print it as "?", not "".
750 * src/ls.c (print_file_name_and_frills): Make -Z work without -l.
751 (length_of_file_name_and_frills): Likewise.
753 * src/ls.c: Remove the --lcontext and --scontext options.
754 Change the way -Z, --context work so that it no longer implies -l.
755 Thus, -Z -l will work like -lcontext and -Z without -l will work
758 Adjust tests to reflect new 'ls -l' syntax -- affects only
759 systems with SELinux when operating on a file with no ACL.
760 These tests assumed that everything before the first space on
761 each line is the 10-byte mode string. But there may also be a "+"
762 in the 11th column, just before the space. However, note that this
763 is not new. The same thing would have happened even without the
764 change below, when listing a file with an ACL.
765 * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm:
766 * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod:
767 * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm:
769 Don't make compilation depend on USE_ACL. An SELinux security
770 context counts as an "alternate access control method", so ls
771 must output a "+" for each file with a security context.
772 * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally.
773 (FILE_HAS_ACL): Remove macro definition. Use f->have_acl directly.
774 (gobble_file): Record whether a file has a security context, and
775 update the condition used to determine whether to print the "+".
776 (gobble_file): Call getfilecon/lgetfilecon also when
777 format == long_format, so that we get the "+".
779 * src/ls.c (gobble_file): Add a comment explaining why (with a
780 security context option) ls doesn't exit nonzero due to e.g.,
781 getfilecon failing with errno == ENOTSUP.
783 * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due
786 * src/ls.c (gobble_file): Factor out three small blocks using
787 getfilecon and lgetfilecon.
788 Don't ignore return value from getfilecon and lgetfilecon.
790 * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C
792 (print_scontext_format): Likewise.
793 (print_scontext): Declare to be "bool", not int. Adjust uses.
795 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX).
797 * tests/misc/chcon: New file.
798 * tests/misc/chcon-fail: New file.
799 * tests/Makefile.am (check-root): Run new, root-only misc/chcon test.
800 * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail.
802 * tests/misc/Makefile.am (TESTS): Add selinux.
803 * tests/misc/selinux: New file.
804 * tests/help-version: Skip chcon.
805 * man/chcon.x: New file.
806 * man/Makefile.am: Build chcon.1.
809 * gl/modules/selinux-at: New module. Check for libselinux and set
810 LIB_SELINUX here, unconditionally, rather than depending on
811 the configure-time --enable-selinux option.
812 * gl/modules/selinux-h: New module.
813 * bootstrap.conf (gnulib_modules): Add selinux-at.
814 * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files.
815 * gl/lib/se-selinux_.h: New file.
816 * gl/lib/se-context_.h: New file.
817 * gl/m4/selinux-selinux-h.m4: New file.
818 * gl/m4/selinux-context-h.m4: New file.
819 * src/Makefile.am (bin_PROGRAMS): Add chcon.
820 (chcon_LDADD): Define.
821 * README: Add chcon to the list of programs.
822 * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
824 2007-03-29 Jim Meyering <jim@meyering.net>
826 * .vg-suppressions: Add libc-getpwuid-leak.
828 2007-03-28 Jim Meyering <jim@meyering.net>
830 Help translators include translation team's web or email address.
831 * src/system.h (emit_bug_reporting_address): New function.
832 * src/base64.c: Use it rather than a literal printf.
833 * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
834 * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
835 * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
836 * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
837 * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
838 * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
839 * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
840 * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
841 * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
842 * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
843 * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
844 * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
845 * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
846 * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
847 * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
848 * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
849 * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
850 * src/who.c, src/whoami.c, src/yes.c: Likewise.
852 * src/stty.c: Don't include "vasprintf.h", now that its
853 declarations are guaranteed to be in gnulib's stdio.h.
854 * src/who.c: Likewise.
856 2007-03-27 Jim Meyering <jim@meyering.net>
858 * README: Use "install", not "ginstall" in the list of program names.
859 * src/Makefile.am (check-README): Substitute s/ginstall/install/.
861 2007-03-25 Jim Meyering <jim@meyering.net>
863 * src/c99-to-c89.diff: Regenerate.
865 2007-03-25 Paul Eggert <eggert@cs.ucla.edu>
867 Avoid the need for euidaccess and/or lstat on every directory entry
868 with 'rm -r dir' (without -f), if we are root, or if we are removing
869 a directory tree that is full of symbolic links.
870 * bootstrap.conf (gnulib_modules): Add write-any-file.
871 * src/copy.c: Include write-any-file.h.
872 (UNWRITABLE): Remove macro, replacing with....
873 (writable_destination): New function, which uses can_write_any_file
874 to avoid the need for euidaccess when we are privileged.
875 (overwrite_prompt, abandon_move): Use it.
876 * src/remove.c: Include write-any-file.h.
878 (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros.
879 (write_protected_non_symlink): Don't bother to stat if we can write
881 (prompt): New arg PDIRENT_TYPE. All callers changed.
882 Use readdir dirent type to avoid the need for 'lstat' on each directory
883 entry in cases like 'rm -r dir', if we are root, or if the tree is
884 full of symbolic links.
885 (DT_IS_KNOWN, DT_MUST_BE): Remove.
886 (remove_entry): New arg DIRENT_TYPE_ARG. All callers changed.
888 2007-03-24 Jim Meyering <jim@meyering.net>
890 If strace malfunctions, skip the test rather than failing it.
891 * tests/mv/atomic: Required on a mips-unknown-linux-gnu system
892 running the aging linux-2.4.27-mipscvs-20040814.
894 2007-03-23 Paul Eggert <eggert@cs.ucla.edu>
896 * src/pathchk.c: Don't include euidaccess.h, as we don't call
899 2007-03-23 Jim Meyering <jim@meyering.net>
901 * README-package-renamed-to-coreutils: Add a URL for the FAQ,
902 and a couple more archive links.
904 2007-03-22 Jim Meyering <jim@meyering.net>
906 Post-release version change.
907 * NEWS: Add a line for 6.9+.
908 * configure.ac (AC_INIT): Set new version string.
911 * NEWS: Record release date and new version number.
912 * configure.ac (AC_INIT): New version number.
914 * tests/mv/hard-3: Correct the preceding change: $3 -> $2.
916 2007-03-22 Paul Eggert <eggert@cs.ucla.edu>
918 Improve a test script.
919 * tests/mv/hard-3: Check for 'ls' failure, too.
920 Generate more-useful debugging output when 'ls' fails.
922 2007-03-21 Jim Meyering <jim@meyering.net>
924 Fix a test script not to claim an ext2 file system is of type xfs.
925 * tests/du/slink: When using df --local and df --type=TYPE,
926 test only the exit code. Don't bother with stdout.
927 Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
929 * gl/lib/savewd.c: Remove this file, since the savewd_save change
930 is now in gnulib. The other wasn't useful.
932 2007-03-20 Jim Meyering <jim@meyering.net>
934 * gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
936 Skip part of this test when "." is not a local file system.
937 * tests/install/basic-1: Otherwise, it would fail on some NFS
939 * tests/mkdir/p-3: Likewise.
941 2007-03-19 Paul Eggert <eggert@cs.ucla.edu>
943 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
944 Add $(LIB_ACL_TRIVIAL).
946 2007-03-18 Jim Meyering <jim@meyering.net>
948 Fix a generic NFS-related test failure.
949 * tests/mkdir/p-3: When setting up an unreadable "." in an
950 inaccessible parent, make the parent inaccessible *after* making "."
951 unreadable. Otherwise, running "chmod a-r ." in an already-
952 inaccessible parent would fail on NFS with "Stale NFS file handle".
954 Fix a bug in how pr -m -s works.
955 * NEWS: Describe how the fix affects pr.
956 * src/pr.c (init_parameters): The --merge (-m) option does
957 not imply --expand-tabs (-e), so don't set "untabify_input".
958 Reported by Wis Macomson.
959 * tests/misc/pr: New file. Test for the above fix.
960 * tests/misc/Makefile.am (TESTS): Add pr.
963 2007-03-17 Jim Meyering <jim@meyering.net>
965 Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
966 * bootstrap: Put ""s around use of $build_aux, in case
967 someone uses a name containing shell meta-characters.
968 Reported by Alfred M. Szmidt.
969 * tests/misc/tty-eof: Add shuf to the list of tested commands.
971 Avoid test failure on NFS-mounted Solaris ZFS file system.
972 * tests/du/basic: Skip a test if "." is on a non-local file system.
974 Avoid an obscure build failure, prefer waitpid over wait.
975 * src/install.c (strip): Use waitpid, not wait. It's equivalent,
976 but feels less obsolescent.
978 * bootstrap: Don't use \> in grep regexp. For HP-UX.
980 2007-03-16 Jim Meyering <jim@meyering.net>
982 Begin adding support for Solaris ZFS (4 entries per trivial ACL)
983 * gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
984 (file_has_acl, copy_acl): Use it, rather than enumerating errno values.
985 (is_trivial_acl): New function. Incomplete, for now.
986 (file_has_acl, copy_acl): Use the new function, rather than
987 counting the number of entries in an ACL.
989 * bootstrap: Update from gnulib.
991 * .x-sc_prohibit_atoi_atof: Add TODO here, too.
993 2007-03-16 Paul Eggert <eggert@cs.ucla.edu>
995 * src/copy.c: Include filemode.h.
996 (overwrite_prompt): Say "try to overwrite", not "overwrite", to
997 make it clearer that the attempt may fail. Problem reported by
999 http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
1000 Output symbolic mode as well as numeric.
1001 * tests/mv/i-2 (fail): Adjust to new prompt format.
1003 2007-03-15 Jim Meyering <jim@meyering.net>
1005 Enforce policy: don't use *scanf functions.
1006 * Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
1007 * .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
1008 * TODO: note that stty.c needs this small clean-up.
1010 2007-03-13 Jim Meyering <jim@meyering.net>
1012 Prepare to work on ACL-related failure when using Solaris ZFS.
1013 * gl/lib/acl.c: New file, copied from gnulib.
1015 Work around a failing test due to an NFS-based race condition.
1016 * tests/cp/sparse: Accept a report that the copy is *smaller*.
1018 2007-03-12 Jim Meyering <jim@meyering.net>
1020 Make bootstrap.conf a tiny bit more generic.
1021 * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
1022 files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
1024 2007-03-10 Jim Meyering <jim@meyering.net>
1026 Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
1027 * gl/lib/savewd.c: Copy this file from gnulib, then change
1028 "errno != EACCES" to (errno != EACCES && errno != ESTALE).
1029 The symptom was this failure in tests/install/basic-1:
1030 ginstall: cannot create directory `rel/a': Stale NFS file handle
1032 The preceding change solved part of the problem. Now ginstall fails.
1033 * tests/install/basic-1: Temporarily, don't redirect ginstall's
1034 stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
1037 * tests/install/basic-1: When setting up an unreadable "." in an
1038 inaccessible parent, make the parent inaccessible *after* making "."
1039 unreadable. Otherwise, running "chmod a-r ." in an already-
1040 inaccessible parent would fail on NFS with "Stale NFS file handle".
1041 Reported by Bob Proulx.
1043 * Makefile.maint (po-check): Exclude c99-to-c89.diff.
1045 2007-03-09 Jim Meyering <jim@meyering.net>
1047 Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
1048 * tests/chgrp/basic: Don't let failure by chgrp to set the
1049 group of a symlink make this test fail. Do give a diagnostic.
1050 In the chgrp-no-change-ctime test, add darwin7.9.0 as another
1051 known-failing system.
1052 When failing on some other system, print $host_triplet, too.
1053 Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
1054 Reported by Peter Fales.
1056 2007-03-08 Jim Meyering <jim@meyering.net>
1058 * src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
1060 2007-03-08 Paul Eggert <eggert@cs.ucla.edu>
1062 rm without -f: give a better diagnostic when euidaccess fails.
1063 * src/remove.c (write_protected_non_symlink): Return int, not bool,
1064 so that we can indicate failure too (as a postive error number).
1065 (prompt): If write_protected_non_symlink fails, report that error
1066 number and fail rather than charging ahead and removing the dubious
1067 entry. Redo the logic of printing a diagnostic so that we need to
1068 invoke quote (full_filename (...)) only once. More details at:
1069 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
1071 2007-03-08 Jim Meyering <jim@meyering.net>
1073 Generalize a few more cvs-isms.
1074 * bootstrap (checkout_only_file): Rename from CVS_only_file.
1075 Change comments and diagnostics not to say "CVS".
1077 * bootstrap: Run libtool, if necessary.
1079 Make bootstrap a little more general.
1080 * bootstrap (build_aux): Factor out/use this definition.
1081 Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
1082 (insert_sorted_if_absent): Move function definition "up", to
1083 precede new first use.
1084 If $build_aux/ doesn't exist initially, create it, and
1087 2007-03-03 Andrew Church <achurch@achurch.org> (tiny change)
1088 Paul Eggert <eggert@cs.ucla.edu>
1090 Fix a bug: cp -x would fail to set mount point permissions.
1091 * NEWS: mention cp -x bug fix
1092 * src/copy.c (copy_internal): Don't return immediately after
1093 copying a mount point that we do not intend to recurse under.
1094 Based on a patch by Andrew Church.
1096 2007-03-03 Jim Meyering <jim@meyering.net>
1098 pwd-unreadable-parent: Skip test on ia64/Linux, too.
1099 * tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
1100 Reported by Bob Proulx.
1102 2007-03-02 Jim Meyering <jim@meyering.net>
1104 pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
1105 * tests/misc/pwd-unreadable-parent: Rather than trying to decide
1106 whether this test has a chance of succeeding, run it only when
1107 $(host_os) is linux-gnu. It was failing on powerpc-apple-darwin8.8.0
1108 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
1110 * tests/misc/pwd-long: Also allow "+" in $PWD.
1112 Remove another coreutils-ism. Formatting cleanup.
1113 * Makefile.maint (my-distcheck): Update an outdated comment.
1114 (emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
1115 (my-distcheck): Skip the c99/c89 check if there's no such .diff file.
1117 2007-03-01 Jim Meyering <jim@meyering.net>
1119 * Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
1120 (my-distcheck): Use the new variable, instead of too-long literal.
1122 Make "make syntax-check" rules less coreutils-specific.
1123 * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
1124 (sc_cast_of_alloca_return_value): Likewise.
1125 (sc_root_tests): Do nothing if there is no check-root target
1126 in tests/Makefile.am.
1128 Run the writable-files check only for release-building targets.
1129 * Makefile.maint (local-checks-available): Remove writable-files.
1130 (alpha beta major): Put it here, instead.
1132 "make syntax-check" now runs only Makefile.cfg-selected tests
1133 * Makefile.maint (syntax-check-rules): Hoist this definition so that
1134 it precedes the indirect use in the definition of $(local-check).
1135 (local-check): Use :=, not just "=".
1136 (syntax-check): Depend on $(local-check), not $(syntax-check-rules).
1138 2007-02-28 Bruno Haible <bruno@clisp.org>
1140 * bootstrap.conf (gnulib_modules): Replace xreadlink with
1141 xreadlink-with-size. Add xreadlink.
1142 * src/copy.c (copy_internal): Update.
1143 * src/ls.c (is_directory): Update.
1144 * src/stat.c (print_stat): Update.
1145 * src/readlink.c (main): Use the one-argument xreadlink function.
1147 2007-02-28 Paul Eggert <eggert@cs.ucla.edu>
1149 * doc/coreutils.texi (Common options): --si outputs "M", not "MB".
1150 Problem reported by Philip Rowlands in
1151 <http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
1153 2007-02-28 Jim Meyering <jim@meyering.net>
1155 * .x-sc_file_system: Add the new test, tests/misc/df-P, to this
1156 list of exceptions, for the "make distcheck" sc_file_system rule.
1158 * Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
1160 2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
1162 Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
1163 * NEWS: With -P, the default block size and output format is not
1164 affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
1165 * src/df.c (main): Implement this.
1167 2007-02-27 Jim Meyering <jim@meyering.net>
1169 Add a test for the above.
1170 * tests/misc/df-P: New file.
1171 * tests/misc/Makefile.am (TESTS): Add df-P.
1173 2007-02-25 Jim Meyering <jim@meyering.net>
1175 * Makefile.maint (announcement): Adjust so that it works with
1176 announce-gen's --gnulib-snapshot-time-stamp option.
1177 Indent one of the command lines using TAB, not 8 spaces.
1179 Post-release version change.
1180 * NEWS: Add a line for 6.8+.
1181 * configure.ac (AC_INIT): Set new version string.
1183 2007-02-24 Jim Meyering <jim@meyering.net>
1186 * NEWS: Record release date and new version number.
1187 * configure.ac (AC_INIT): New version number.
1189 Don't skip this test on new-enough Linux/GNU systems.
1190 * tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
1191 rather than for __GETCWD_PREFIX in config.h (the latter is no
1192 longer defined, ever, due to gnulib changes).
1193 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
1195 Remove the "gnits" option; it prohibits my using "+" as a version
1196 string suffix, and all it does (beyond the default "gnu" option)
1197 is to _require_ the THANKS file.
1198 * configure.ac (AM_INIT_AUTOMAKE): Remove it.
1200 Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
1201 * tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
1202 * tests/chown/Makefile.am, tests/cp/Makefile.am:
1203 * tests/du/Makefile.am, tests/expr/Makefile.am:
1204 * tests/factor/Makefile.am, tests/general/Makefile.am:
1205 * tests/install/Makefile.am, tests/ln/Makefile.am:
1206 * tests/ls/Makefile.am, tests/mkdir/Makefile.am:
1207 * tests/mv/Makefile.am, tests/readlink/Makefile.am:
1208 * tests/rm/Makefile.am, tests/rmdir/Makefile.am:
1209 * tests/seq/Makefile.am, tests/stty/Makefile.am:
1210 * tests/tee/Makefile.am, tests/touch/Makefile.am:
1212 * README: Document the OSF/1 4.0d build failure and work-around.
1213 Reported by Bruno Haible.
1215 * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
1217 * configure.ac: Use 6.7+, not 6.7-dirty.
1219 2007-02-24 Paul Eggert <eggert@cs.ucla.edu>
1221 * NEWS: sort no longer compresses temporaries by default.
1222 * bootstrap.conf: Remove findprog.
1223 * doc/coreutils.texi (sort invocation): The default is to not
1224 compress. Don't treat "" specially.
1225 * src/sort.c: Don't include findprog.h.
1226 (create_temp): Compress only if the user specified --compress-program.
1227 * tests/misc/sort-compress: Adjusts tests to match new behavior.
1229 2007-02-24 Jim Meyering <jim@meyering.net>
1231 Avoid a shell syntax error, when building with an inadequate Perl.
1232 * man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
1233 it can expand to "/.../missing perl".
1235 * man/Makefile.am (.x.1): Warn when unable to update a man page.
1236 Suggestion from Bruno Haible.
1238 2007-02-23 Bruno Haible <bruno@clisp.org>
1240 Handle better the combination of old Perl and a pre-c99 compiler.
1241 * man/Makefile.am (.x.1): If the autoconf test has determined that
1242 perl is missing or not a sufficient version, do nothing.
1244 * tests/readlink/can-e: Put the closing double-quote at the end of a
1245 backquoted word, not in the middle. Works around a bug in sh on
1247 * tests/readlink/can-f: Likewise.
1248 * tests/readlink/can-m: Likewise.
1250 * tests/du/slink: Skip the test if executing on an nfsv3 file system.
1251 This avoids a test failure at least on OSF/1 4.0d.
1253 2007-02-23 Jim Meyering <jim@meyering.net>
1255 * src/date.c (usage): Split a diagnostic that had grown to be
1256 longer than the C89 maximum of 509 bytes.
1258 2007-02-23 Ed Santiago <ed@edsantiago.com>
1260 * src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
1261 for a separator. Include sample RFC 2822 and 3339 output.
1263 2007-02-23 Jim Meyering <jim@meyering.net>
1265 With -Dlint, make shuf free all heap-allocated storage.
1266 * src/shuf.c (main): Move declaration of input_lines to
1267 function scope, and initialize to NULL, so we can free it.
1268 [lint]: Free all malloc'd memory.
1269 * tests/misc/shuf: Also test shuf's -e and -i options.
1271 2007-02-22 Jim Meyering <jim@meyering.net>
1273 Merge in a change from some other incarnation of this file (gzip?)
1274 * bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
1276 Adjust preceding change not to perform an unaligned access.
1277 * src/copy.c (copy_reg): Undo previous change. Instead, make
1278 it clearer that we're using a single-byte sentinel, and
1279 [lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
1280 Reported by Andreas Schwab.
1282 Placate valgrind, wrt ./cp --sparse=always
1283 * src/copy.c (copy_reg): Place the sentinel by setting a
1284 full word's worth of bits, not just a single byte's worth.
1285 This avoids a harmless (but distracting) case of memory being
1288 2007-02-21 Paul Eggert <eggert@cs.ucla.edu>
1290 Honor dd's noatime flag if possible, even if not supported on build fs
1291 * doc/coreutils.texi (dd invocation): Warn that noatime might not be
1293 * src/dd.c (flags, usage): Look at O_NOATIME, not
1294 HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
1295 flag, so that dd attempts O_NOATIME even if the build file system
1296 does not support it. Problem reported by Jim Meyering today in
1298 * tests/dd/misc: Generate a warning, not a failure, if noatime
1301 2007-02-21 Jim Meyering <jim@meyering.net>
1303 * tests/misc/date: Remove vestigial use of Data::Dumper.
1305 2007-02-20 Paul Eggert <eggert@cs.ucla.edu>
1307 * src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
1308 about out-of-range initializer with Sun C 5.8.
1310 2007-02-20 Jim Meyering <jim@meyering.net>
1312 * bootstrap (CVS_only_file): Use README-hacking.
1314 Now that we use GIT, not cvs, rename README-cvs.
1315 * README-hacking: Renamed from...
1316 Update to reflect that we now use git.
1318 * README-cvs: ...this.
1320 * src/env.c (main): When invoked with no arguments (i.e. when printing
1321 the environment), use a local variable to iterate through the global
1322 "environ" array, rather than "environ" itself. This is solely to
1323 avoid changing the environment for an LD_PRELOAD-substituted "puts"
1324 or "exit" function. Tiny patch by Harvey Eneman. See
1325 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
1328 * bootstrap: Move definitions of temporary directory names and the
1329 new bt_regex "up" to precede all uses, so it's clearer what their
1330 scope is. Also, use [.], rather than \\., since the former works
1333 * bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
1334 Based on the bison 2007-02-19 change by Joel E. Denny.
1336 2007-02-19 Paul Eggert <eggert@cs.ucla.edu>
1338 * NEWS: sort now uses a --compress-program option rather than
1339 an environment variable.
1340 * doc/coreutils.texi (sort invocation): Document this.
1341 * src/sort.c (usage): Likewise.
1342 (COMPRESS_PROGRAM_OPTION): New const.
1343 (long_options, create_temp, main): Support new option.
1344 * tests/misc/sort-compress: Test it.
1346 2007-02-19 Jim Meyering <jim@meyering.net>
1348 * bootstrap: Fix typo s/dowloading/downloading/ in --help output.
1350 2007-02-18 Jim Meyering <jim@meyering.net>
1352 * src/system.h: Don't include exit.h, now that it's subsumed
1353 by the gnulib-generated stdlib.h.
1355 * tests/rm/fail-eacces: Skip this test when running as root.
1356 Reported by Matthew Woehlke.
1358 * bootstrap: Use "._bootmp" as the temporary directory name,
1359 not ".#bootmp". The latter's "#" caused trouble with the new,
1360 gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
1362 2007-02-14 Paul Eggert <eggert@cs.ucla.edu>
1364 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1365 * src/dircolors.c: Include c-strcase.h.
1366 (dc_parse_stream): Use c_strcasecmp rather than
1367 strcasecmp to avoid unreliable results in locales like Turkish
1368 where strcasecmp is incompatible with the C locale.
1370 2007-02-13 Jim Meyering <jim@meyering.net>
1372 Also check for and print stderr output, in case a program fails.
1373 * tests/misc/tty-eof: Occasionally (not reproducible), this
1374 test would fail, with one or more programs exiting nonzero, e.g.,
1375 tty-eof: sha224sum exited with status 1 (expected 0)
1376 Now, maybe we'll get a clue, the next time that happens.
1378 2007-02-12 Jim Meyering <jim@meyering.net>
1380 * .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
1382 * tests/misc/pwd-unreadable-parent: Skip the test if we're
1383 definitely using the replacement.
1384 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
1386 2007-02-10 Jim Meyering <jim@meyering.net>
1388 Remove excess leading spaces that would make help2man misbehave.
1389 * src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
1390 * src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
1391 * src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
1392 * src/date.c (usage): Use two spaces after each optional flag, not one.
1393 Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
1395 * Makefile.maint (longopt_re): Relax the regexp, making square
1396 brackets optional, so it matches the newly reported violations, too.
1398 * src/csplit.c (usage): Use two spaces (not one) to separate
1399 each option string from its description, so help2man formats
1400 the derived man page properly. Reported by Thomas Huriaux in
1401 <http://bugs.debian.org/410407>.
1402 * src/df.c (usage): Likewise.
1403 * src/du.c (usage): Likewise.
1404 * src/install.c (usage): Likewise.
1405 * src/ls.c (usage): Likewise.
1407 2007-02-03 Jim Meyering <jim@meyering.net>
1409 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
1410 * NEWS: Mention the bug fix.
1411 * tests/misc/pwd-unreadable-parent: New file.
1412 * tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
1414 2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
1416 * NEWS: Document fix for cp --preserve=mode.
1417 * src/copy.c (copy_internal): Omit the group- or other-writeable
1418 permissions when creating a directory, to avoid a race condition
1419 if the special mode bits aren't right just after the directory is
1421 * src/cp.c (make_dir_parents_private): Likewise.
1422 * tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
1425 * NEWS: Document fix for cp --parents.
1426 * src/cp.c (make_dir_parents_private): Report the error sooner with
1427 "cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
1428 creating the directory, DEST/DIR.
1429 * tests/cp/cp-parents: Test for the non-race-condition bug fixed
1430 by the above change.
1432 2007-02-02 Jim Meyering <jim@meyering.net>
1434 * src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
1436 * src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
1437 consistent, so this can be applied with patch -p0.
1438 Reported by Matthew Woehlke.
1440 Arrange for "make check-root" to run the new root-only test.
1441 * tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux.
1444 * Makefile.maint (patch-check): Use patch with its -p2 option,
1445 since that makes this check slightly more strict.
1447 Use a directory on a loopback device mounted with -o context=...
1448 * tests/cp/cp-a-selinux: Since this test now runs mount and umount,
1449 it is a root-only one.
1451 2007-01-29 Jim Meyering <jim@meyering.net>
1454 * src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
1455 determine dev/inode or upon detecting a symlink loop.
1457 * src/ls.c: Rename three global variables.
1458 (cwd_file): Rename from 'files'.
1459 (cwd_n_alloc): Rename from 'nfiles'.
1460 (cwd_n_used): Rename from 'files_index'.
1462 Shave 8 bytes off the size of "struct fileinfo".
1463 * src/ls.c (fileinfo): Put all members of type "bool" together.
1465 2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
1467 Modify "ls" to sort its data faster, using the new gnulib mpsort
1468 module rather than qsort. This is particularly a win in
1469 environments where strcoll is slow, since mpsort typically calls
1470 strcoll less often than qsort does.
1471 * bootstrap.conf (gnulib_modules): Add mpsort.
1472 * src/ls.c: Include mpsort.h.
1473 (sorted_file, sorted_file_alloc): New vars, for a new vector of
1474 pointers to the file info, for speed.
1475 (clear_files, extract_dirs_from_files, sort_files, print_current_files):
1476 (print_many_per_line, print_horizontal, print_with_commas):
1477 (calculate_columns): Set and use new vector.
1478 (initialize_ordering_vector): New function.
1480 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1482 Adjust to today's change to gnulib, which added a module for
1483 string.h to replace the little include files like strcase.h.
1484 * src/dircolors.c: Don't include strcase.h.
1485 * src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
1487 2007-01-26 Jim Meyering <jim@meyering.net>
1489 * src/dd.c (advance_input_after_read_error): Change diagnostic to
1490 say "invalid file offset" rather than "screwy file offset".
1492 * .x-sc_cast_of_argument_to_free: Remove this file.
1493 * Makefile.am (EXTRA_DIST): Likewise.
1495 2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
1497 * src/sort.c (create_temp): Remove superfluous access-X_OK
1498 check. find_in_path does this for us.
1500 2007-01-24 Jim Meyering <jim@meyering.net>
1502 Remove usually-skipped test.
1503 * tests/cp/open-perm-race: Remove this file. It is subsumed
1504 by parent-perm-race.
1505 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
1506 * tests/sort/Makefile.am: Regenerate.
1508 Pass "make distcheck" again.
1509 * src/sort.c (usage): Split a diagnostic that had grown to be
1510 longer than the C89 maximum of 509 bytes.
1511 * .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
1512 FIXME: this is just temporary, while we wait to remove the offending
1513 access-calling code.
1514 * Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
1515 * Makefile.maint (sc_cast_of_argument_to_free): Use the
1516 canonical, $$($(CVS_LIST_EXCEPT)).
1517 * m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
1519 2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
1521 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
1522 like it will be approved. Also add --check=quiet, --check=silent
1523 as long aliases, and --check=diagnose-first as an alias for -c.
1524 * doc/coreutils.texi (sort invocation): Document this.
1525 Also, mention that sort -c can take at most one file.
1526 * src/sort.c: Implement this.
1528 (usage): Document the change.
1529 (CHECK_OPTION): New constant.
1530 (long_options): --check now takes an optional argument, and is now
1531 treated differently from 'c'.
1532 (check_args, check_types): New constant arrays.
1533 (check): New arg CHECKONLY, which suppresses diagnostic if -C.
1534 (main): Parse the new options.
1535 * tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
1538 2007-01-24 Jim Meyering <jim@meyering.net>
1541 * tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
1542 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
1544 Don't depend on "which".
1545 * tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
1546 * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
1548 2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
1550 Test sort compression.
1551 * tests/misc/Makefile.am: Add the test.
1552 * tests/misc/sort-compress: New file containing the tests.
1554 2007-01-24 Jim Meyering <jim@meyering.net>
1556 * NEWS: sort temp file compression: tweak wording.
1557 * src/sort.c (struct sortfile) [name]: Declare member to be const.
1559 2007-01-21 Jim Meyering <jim@meyering.net>
1561 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
1562 In pipe_fork callers, use these named constants, not "2" and "8".
1563 (proctab, nprocs): Declare to be "static".
1564 (pipe_fork) [lint]: Initialize local, pid,
1565 to avoid unwarranted may-be-used-uninitialized warning.
1566 (create_temp): Use the active voice. Describe parameters, too.
1568 2007-01-21 James Youngman <jay@gnu.org>
1570 Centralize all the uses of sigprocmask(). Don't restore an invalid
1572 * src/sort.c (enter_cs, leave_cs): New functions for protecting
1573 code sequences against signal delivery.
1574 * (exit_cleanup): Use enter_cs and leave_cs instead of
1575 calling sigprocmask directly.
1576 (create_temp_file, pipe_fork, zaptemp): Likewise
1578 2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
1580 Add compression of temp files to sort.
1581 * NEWS: Mention this.
1582 * bootstrap.conf: Import findprog.
1583 * configure.ac: Add AC_FUNC_FORK.
1584 * doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
1586 * src/sort.c (compress_program): New global, holds the name of the
1587 external compression program.
1588 (struct sortfile): New type used by mergepfs and friends instead
1589 of filenames to hold PIDs of compressor processes.
1590 (proctab): New global, holds compressor PIDs on which to wait.
1591 (enum procstate, struct procnode): New types used by proctab.
1592 (proctab_hasher, proctab_comparator): New functions for proctab.
1593 (nprocs): New global, number of forked but unreaped children.
1594 (reap, reap_some): New function, wait for/cleanup forked processes.
1595 (register_proc, update_proc, wait_proc): New functions for adding,
1596 modifying and removing proctab entries.
1597 (create_temp_file): Change parameter type to pointer to file
1598 descriptor, and return type to pointer to struct tempnode.
1599 (dup2_or_die): New function used in create_temp and open_temp.
1600 (pipe_fork): New function, creates a pipe and child process.
1601 (create_temp): Creates a temp file and possibly a compression
1602 program to which we filter output.
1603 (open_temp): Opens a compressed temp file and creates a
1604 decompression process through which to filter the input.
1605 (mergefps): Change FILES parameter type to struct sortfile array
1606 and update access accordingly. Use open_temp and reap_some.
1607 (avoid_trashing_input, merge): Change FILES parameter like
1608 mergefps and call create_temp instead of create_temp_file.
1609 (sort): Call create_temp instead of create_temp_file.
1611 (avoid_trashing_input, merge, sort, main): Adapt to mergefps.
1613 The idea of compressing sorts temporary files was first
1614 suggested/implemented by Jay Soffian in 1998, and again
1615 by Charles Randall in 2001.
1617 2007-01-20 Jim Meyering <jim@meyering.net>
1619 * tests/misc/pwd-long: Work properly even when run from the
1620 wrong one of two or more bind-mounted sibling directories.
1621 Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
1623 2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
1625 Standardize on list of signals when an app catches signals.
1626 * src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
1627 SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
1628 * src/ls.c (main): Likewise (except SIGPIPE was already caught).
1629 Note that ls.c is special, as it also catches SIGTSTP.
1630 * src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
1631 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
1633 2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
1634 and Paul Eggert <eggert@cs.ucla.edu>
1636 * src/sort.c (cleanup): Clear temphead at the end.
1637 (exit_cleanup): New function.
1638 (main): Don't invoke atexit until we're ready.
1639 Invoke it with exit_cleanup, not with cleanup and close_stdout,
1640 to avoid a race condition with cleanup and signal handling. More
1641 details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
1643 2007-01-18 Jim Meyering <jim@meyering.net>
1645 * src/c99-to-c89.diff: Adjust remove.c offsets.
1647 2007-01-17 Jim Meyering <jim@meyering.net>
1649 Make "rm --interactive=never ..." never prompt.
1650 * NEWS: Mention this.
1651 * src/remove.h (enum rm_interactive): New ternary type.
1652 (struct rm_options) [interactive]: Use it, here -- rather than bool.
1653 * src/remove.c (prompt): Reflect type change.
1654 * src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
1655 * src/rm.c (main): Add a FIXME comment for '-d' option.
1656 Adapt to type change of rm_options.interactive.
1658 * tests/rm/i-never: New file. Test for the above fix.
1659 * tests/rm/Makefile.am (TESTS): Add i-never.
1661 2007-01-15 Jim Meyering <jim@meyering.net>
1663 * bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
1664 emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
1665 but that's ok, since fts_.h will eventually be renamed.
1667 * src/remove.c (remove_dir): Don't use errno in diagnostic.
1668 Root-only test failure reported by Alex van Hout and Jon Grosshart in
1669 <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
1671 * bootstrap.conf (avoided_gnulib_modules): Fix my typo:
1672 s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
1674 2007-01-14 Bruno Haible <bruno@clisp.org>
1676 Enable use of gnulib's new fchdir module.
1677 * bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
1678 since we use canonicalize.
1679 (gnulib_modules): Add fchdir.
1680 * m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
1682 2007-01-13 Jim Meyering <jim@meyering.net>
1684 * tests/cp/open-perm-race: Remove gdb-based test.
1685 It would run only when compiled with -g, and besides is now
1686 subsumed by file-perm-race.
1687 * tests/cp/Makefile.am (TESTS): Remove open-perm-race.
1689 * Transform all Makefile.am files so that when running "make check",
1690 CU_TEST_NAME is set to the name of the test. This is so that when I
1691 run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
1692 on the entire package it is more convenient to map a leak or error
1693 found in a valgrind log file back to the offending test.
1695 (echo tests/Makefile.am.in; find tests -name Makefile.am) \
1696 |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
1697 -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
1699 2007-01-11 Jim Meyering <jim@meyering.net>
1701 Avoid a leak in expr's implementation of the ":" (match) operator.
1702 * src/expr.c (docolon): Free the regexp buffer using regfree, rather
1703 than doing it manually, being careful to set fastmap to NULL first.
1704 Free any re_regs.start and .end members, if necessary.
1706 * tests/misc/test-diag: Work also when libc's error function
1707 reports the entire program name ("../../src/test"), rather than
1708 just the final component.
1710 2007-01-10 Jim Meyering <jim@meyering.net>
1712 Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
1713 * src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
1714 (change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
1715 directory. Non-directory entries lack fts_statp data when using
1716 the FTS_NOSTAT option.
1718 2007-01-07 Jim Meyering <jim@meyering.net>
1720 * tests/sample-test: Update copyright date to 2007.
1721 * Makefile.maint (copyright-check): Also check the copyright date
1722 in tests/sample-test.
1724 2007-01-06 Jim Meyering <jim@meyering.net>
1726 * tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
1727 based on examples from G.P. Halkes in
1728 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
1730 2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
1732 * src/fmt.c (copy_rest): Correct prefix handling.
1733 Don't elide a line with the prefix followed by only white space.
1734 (get_line): Move EOF-check to loop-termination condition.
1735 * tests/fmt/basic (pfx-1): Adjust test to expect desired result.
1736 (pfx-2): Remove test; its premise was contrary to the documentation.
1738 2007-01-05 Jim Meyering <jim@meyering.net>
1740 Avoid a used-uninitialized bug for invalid input, i.e., when the size
1741 of the input, not counting newlines, is 1 % 4.
1742 * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
1743 It may be smaller when flushing.
1745 2007-01-05 Mike Frysinger <vapier@gentoo.org>
1747 * src/dircolors.hin: Add a TERM directive for cons25.
1749 2007-01-04 Jim Meyering <jim@meyering.net>
1751 * Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
1752 case you don't have convenient access to glibc info documentation.
1754 Use the release year, not the current year.
1755 * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
1756 * src/Makefile.am (RELEASE_YEAR): Define it.
1758 Thanks to a prod from Eric Blake.
1760 Ensure that "group --version" always prints the current year.
1761 * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
1762 * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
1763 Suggestion from Eric Blake.
1765 When decoding, always allow newlines in input, with almost no
1767 * src/base64.c (do_decode): Initialize decode context.
1768 Call base64_decode one more time, after all input is processed.
1769 (usage): When decoding, newlines are always accepted.
1771 * tests/misc/base64: Add a bunch of tests, for the above.
1772 * gl/lib/base64.c: Include <string.h>.
1773 (base64_decode_ctx_init, get_4, decode_4): New functions.
1774 (base64_decode): Efficiently handle interspersed newlines.
1775 (base64_decode_alloc): Update signature.
1776 * gl/lib/base64.h (struct base64_decode_context): Define.
1777 (base64_decode_ctx_init): Add prototype.
1778 (base64_decode, base64_decode_alloc): Update prototypes.
1780 * gl/lib/base64.c: Copied from gnulib.
1781 * gl/lib/base64.h: Likewise.
1783 2007-01-03 Jim Meyering <jim@meyering.net>
1785 * THANKS: Add Evan Hunt.
1787 2007-01-03 Bruno Haible <bruno@clisp.org>
1789 Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
1790 * tests/chown/deref: Apply lang-default.
1791 * tests/misc/split-a: Likewise.
1792 * tests/mv/reply-no: Likewise.
1794 * src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
1797 2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
1799 Now, "ls -FRL" always follows symbolic links on Linux.
1800 * NEWS: Mention this bug fix.
1801 * src/ls.c (gobble_file): Fix bug reported by
1802 Nobuyuki Tsuchimura in
1803 http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
1804 where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
1805 * tests/ls/follow-slink: Add a test for this case.
1807 2007-01-01 Jim Meyering <jim@meyering.net>
1809 * tests/rm/fail-eperm: Revert last change. The PATH=... setting
1810 is not honored at least on HP-UX 11.23 systems.
1811 Instead, simply transform the actual output diagnostic.
1812 Test failure reported by Bob Proulx.
1814 2006-12-30 Jim Meyering <jim@meyering.net>
1816 * bootstrap (gnulib_extra_files): Remove announce-gen.
1817 * bootstrap.conf (gnulib_modules): Add it here instead, now that
1820 * tests/misc/base64: Factor a long, repetitive string.
1822 * src/c99-to-c89.diff: Adjust remove.c offsets.
1824 Clean up after the change of 2006-12-28.
1825 * src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
1826 now that this function never modifies the pointer. Adjust comments
1827 and code accordingly.
1828 (remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
1829 now that AD_pop_and_chdir no longer does that.
1831 * tests/rm/fail-eperm: Avoid spurious differences (the error function
1832 from latest glibc no longer prints the full program_name): so don't
1833 invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
1835 * tests/mv/acl (skip): Skip this test also if the destination
1836 directory, which is on a different file system, lacks ACL support.
1838 * src/copy.c (copy_reg): Rewrite a comment that was rendered
1839 inaccurate by the 2006-10-18 change.
1841 2006-12-28 Jim Meyering <jim@meyering.net>
1843 When moving "up" the hierarchy, be careful to remove a just-emptied
1844 directory before opening ".", to avoid trouble with file system
1845 implementations that cache readdir results at opendir-time.
1846 * src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
1847 Don't update **DIRP. Don't call fdopendir here.
1848 (remove_dir): Call fdopendir here instead.
1849 Report and patch from Mikulas Patocka:
1850 <http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
1852 2006-12-27 Jim Meyering <jim@meyering.net>
1854 * src/tail.c (usage): Mention +N for --bytes and --lines.
1855 Suggestion from Evan Hunt.
1857 2006-12-26 Jim Meyering <jim@meyering.net>
1859 * configure.ac: Require autoconf-2.61 and automake-1.10.
1860 Without the former (even with autoconf-2.60), "make distcheck"
1861 would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
1862 due to an inttypes.h generated with CFLAGS including -pedantic.
1863 With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
1865 * Makefile.maint (VC-tag): Define, so as to gpg-sign each release
1866 tag, using the release version number as the message.
1867 (vc-dist): Use $(VC-tag), rather than "$(VC) tag".
1869 2006-12-21 Paul Eggert <eggert@cs.ucla.edu>
1871 * NEWS: dd bs= operands now silently override later ibs= and obs=,
1873 * src/dd.c (scanargs): Implement it.
1874 * tests/dd/misc (outbytes): Test it.
1875 * doc/coreutils.texi (dd invocation): Specify that bs=N
1876 overrides later ibs and obs, undoing part of the
1877 previous change. (The behavior was wrong.)
1879 2006-12-20 Jim Meyering <jim@meyering.net>
1881 "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
1882 * src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
1883 Don't let a non-directory get by with errno == EPERM, either.
1884 Check the file type directly (using cached stat value), rather
1885 than trying to guess it from errno values.
1886 Karl Berry reported that a cross-partition "mv /etc/issue ~"
1887 failed with the um,... suboptimal diagnostic,
1888 "mv: cannot remove `/etc/issue': Not a directory".
1889 * tests/rm/Makefile.am (TESTS): Add fail-eacces.
1890 * tests/rm/fail-eacces: New file.
1891 * NEWS: Mention that both mv and rm are affected.
1893 "cut -f 2- A B" no longer triggers a double-free bug
1894 * src/cut.c (cut_fields): Set file-scoped global to NULL after
1895 freeing it. This avoids a double-free (and core dump on some systems)
1896 for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
1897 James Hunt in <http://bugzilla.redhat.com/220312>.
1898 * NEWS: List this bug fix.
1899 * THANKS: Mention him.
1900 * tests/misc/cut: New file.
1901 * tests/misc/Makefile.am (TESTS): Add cut.
1903 2006-12-15 Jim Meyering <jim@meyering.net>
1905 * tests/cp/open-perm-race: Correct the gdb-existence check.
1906 Don't run either subsequent gdb command in a sub-shell.
1907 Reported by Thomas Schwinge.
1908 * THANKS: bring up to date.
1910 2006-12-14 Paul Eggert <eggert@cs.ucla.edu>
1912 Make sure cp -p isn't too generous with file permissions.
1913 * tests/cp/Makefile.am (TESTS): Add file-perm-race.
1914 * tests/cp/file-perm-race: New file.
1916 Ensure cp -pR --parents isn't too generous with parent permissions.
1917 * tests/cp/Makefile.am (TESTS): Add parent-perm-race.
1918 * tests/cp/parent-perm-race: New file.
1920 2006-12-14 Jim Meyering <jim@meyering.net>
1922 * tests/chgrp/default-no-deref: Don't assume that files are created
1923 with the primary group by default. That's not true in a directory
1924 with the set-GID bit set.
1926 Don't hang when there's no input tty.
1927 * tests/cp/open-perm-race: Skip this test if there is no
1928 controlling input `terminal'.
1930 Test for a hard-to-detect race fix, using gdb.
1931 * tests/cp/open-perm-race: New file, to test for the
1932 cp --preserve=ownership fix of 2006-12-06.
1934 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
1935 (TESTS): Add open-perm-race.
1937 * src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
1938 * src/chown.c (main): Likewise.
1939 * src/chown-core.c (change_file_owner): Add to a comment.
1940 * tests/chown/preserve-root: Add tests.
1942 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
1943 * src/chmod.c (process_file): Do honor the --preserve-root option.
1944 * src/chown-core.c (change_file_owner): Likewise, but here, also
1945 handle the case in which a traversal would go "through" a symlink
1946 to root. Reported by Matthew M. Boedicker
1947 * tests/chown/preserve-root: Test for the above.
1948 * tests/chown/Makefile.am (TESTS): Add preserve-root.
1950 * NEWS: Mention the chmod fix induced by the 2006-12-11 change
1951 to gnulib's m4/openat.m4.
1953 2006-12-13 Andreas Schwab <schwab@suse.de>
1955 Don't fail if mv/acl test succeeds.
1956 * tests/mv/acl (skip): Check for acl support in the file system.
1957 * tests/mv/Makefile.am (XFAIL_TESTS): Remove.
1958 (TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
1960 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
1962 Remove some arbitrary restrictions on size fields, so that
1963 commands like "sort -k 18446744073709551616" no longer fail merely
1964 because 18446744073709551616 doesn't fit in uintmax_t. The trick
1965 is that these fields can all be treated as effectively infinity;
1966 their exact values don't matter, since no internal buffer can be
1968 * src/join.c (string_to_join_field): Verify that SIZE_MAX <=
1969 ULONG_MAX if the code assumes this. Silently truncate too-large
1970 values to SIZE_MAX, as the remaining code will do the right thing
1972 * src/sort.c (parse_field_count): Likewise.
1973 * src/uniq.c (size_opt, main): Likewise.
1974 * tests/join/Test.pm (bigfield): New test.
1975 * tests/sort/Test.pm (bigfield): New test.
1976 * tests/uniq/Test.pm (121): New test.
1978 2006-12-13 Jim Meyering <jim@meyering.net>
1980 * tests/chgrp/default-no-deref: New test.
1981 * tests/chgrp/Makefile.am (TESTS): Add default-no-deref.
1983 2006-12-12 Jim Meyering <jim@meyering.net>
1985 * src/system.h (SETVBUF): Remove definition, now that the
1986 autoconf macro, AC_FUNC_SETVBUF_REVERSED, does nothing.
1987 * src/tee.c (tee_files): s/SETVBUF/setvbuf/.
1988 * src/od.c (open_next_file): Likewise.
1990 2006-12-09 Jim Meyering <jim@meyering.net>
1992 * man/Makefile.am (.x.1): Make help2man use $(PACKAGE_STRING) as the
1993 "source". I.e. "GNU coreutils 6.7".
1995 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
1996 from NEXT_VER-pre to CUR_VER-dirty. So, this is 6.7-dirty.
1997 * configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
1999 * tests/uniq/Test.pm (test_vector): Skip the pipe-reading test
2000 whenever uniq is expected to fail. This should catch the other case
2001 [test #112] in which uniq emits "cat: write error: Broken pipe" on
2004 2006-12-08 Jim Meyering <jim@meyering.net>
2006 Include bootstrap tool version info in the announcement form.
2007 * Makefile.maint (gnulib_snapshot_date): Define.
2008 (announcement): Use two new announce-gen options,
2009 --bootstrap-tools and --gnulib-snapshot-date.
2010 * Makefile.cfg (gnulib_dir): Set.
2012 Post-release version change.
2013 * NEWS: Add a line for 6.8-dirty.
2014 * configure.ac (AC_INIT): Set new version string.
2016 2006-12-07 Jim Meyering jim@meyering.net
2019 * NEWS: Record release date. Remove '-pre' suffix.
2020 * configure.ac (AC_INIT): Remove version string suffix.
2022 2006-12-07 Jim Meyering <jim@meyering.net>
2024 Make the output of "make check" more reproducible.
2025 * tests/touch/empty-file: Use envvar-check, so "make check" doesn't
2026 evoke diagnostics like this when COLUMNS=0 in the environment:
2027 ls: ignoring invalid width in environment variable COLUMNS: 0
2028 * tests/touch/no-rights: Likewise.
2029 * tests/help-version: Likewise.
2030 * tests/uniq/Test.pm: Don't perform the pipe-reading version of test
2031 118, since it emits "cat: write error: Broken pipe" on some systems.
2033 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
2035 * NEWS: Document the cp -p fix for special bits.
2036 * src/copy.c (set_owner): Now returns a three-way result, so
2037 that the caller can clear the special bits. All callers changed.
2038 (copy_reg): Don't set the special bits if chown failed.
2039 (copy_internal): Likewise.
2040 * tests/cp/special-bits: Test this fix.
2042 2006-12-06 Paul Eggert <eggert@cs.ucla.edu>
2044 * NEWS: Document the cp --preserve=ownership fix.
2045 * m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
2046 * src/copy.c (fchmod_or_lchmod): New function.
2047 (copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
2048 Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
2049 When creating a file, use O_EXCL, so we're more likely to detect
2050 funny business by other processes. At the end, if permissions
2051 were omitted, chmod them back in.
2052 (copy_internal): If the ownership might change, omit some permissions
2053 at first, then restore them after chowning the file.
2054 * src/cp.c (make_dir_parents_private): Likewise.
2055 * src/copy.c (cached_umask): New function.
2056 * src/copy.h (cached_umask): New decl.
2058 2006-12-06 Jim Meyering <jim@meyering.net>
2060 Make the output of "make check" more reproducible.
2061 * tests/misc/date-sec: Don't emit any diagnostic about sleeping.
2063 2006-12-03 Paul Eggert <eggert@cs.ucla.edu>
2065 * src/install.c (install_file_in_file): Preserve time stamps
2066 before changing owner or file mode bits, for consistency with
2067 other coreutils programs.
2069 2006-12-03 Jim Meyering <jim@meyering.net>
2071 * tests/misc/date-sec: Output a fixed string.
2073 * NEWS: du --one-file-system (-x) would skip subdirectories of any
2074 directory listed as second or subsequent command line argument.
2075 * tests/du/one-file-system: New file. Test for today's fts.c fix.
2076 * tests/du/Makefile.am (TESTS): Add one-file-system.
2077 Reported by Mike Frysinger.
2079 2006-12-02 Jim Meyering <jim@meyering.net>
2081 * tests/du/basic: Generate 4KB file simply using printf, rather than
2082 seq+head. This avoids a spurious "Broken pipe" diagnostic from seq.
2084 2006-11-28 Jim Meyering <jim@meyering.net>
2086 * tests/mv/no-target-dir: Detect a buggy rename syscall. If found,
2087 skip this test. This happens at least on ia64 linux-2.4.19 w/ext3.
2088 Reported by Matthew Woehlke.
2090 * tests/mv/dir2dir: Also accept EBUSY.
2091 Reported by Matthew Woehlke.
2093 2006-11-27 Jim Meyering <jim@meyering.net>
2095 * Makefile.maint (patch-check): Rewrite to diagnose failure.
2096 * src/c99-to-c89.diff: Adjust shred.c offsets.
2098 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
2100 Improve the check for departures from C89, and fix the departures
2102 * Makefile.maint (my-distcheck): Also check for C89 compatibility
2103 as best we can with GCC.
2104 * src/stat.c (PRINTF_OPTION): Omit comma before } in enum
2105 declaration; C89 doesn't allow this.
2106 * src/dcgen: Don't generate string literals longer than
2107 what C89 requires support for.
2108 * src/cut.c (usage): Don't use string literals longer than
2109 what C89 requires support for.
2110 * src/date.c (usage): Likewise.
2111 * src/dd.c (usage): Likewise.
2112 * src/du.c (usage): Likewise.
2113 * src/ls.c (usage): Likewise.
2114 * src/od.c (usage): Likewise.
2115 * src/readlink.c (usage): Likewise.
2116 * src/seq.c (usage): Likewise.
2117 * src/shred.c (usage): Likewise.
2119 2006-11-26 Mike Frysinger <vapier@gentoo.org>
2121 Recognize new archive, audio and image formats.
2122 Give audio files a separate color.
2123 * src/dircolors.hin: Add comments for common .sh and .csh scripts.
2124 Add .bz2, .tbz2, .tz, .rar, .ace, .zoo, .cpio, .7z, .rz as archive
2125 suffixes. Add .mng, .pcx, .m2v, .mkv, .ogm, .mp4, .m4v, .mp4v, .vob,
2126 .qt, .nuv, .wmv, .asf, .rm, .rmvb, .flc, .yuv as image formats.
2127 Add .aac, .au, .mid, .midi, .mka, .ra as audio suffixes. Change
2128 audio color to 00;36 to differentiate from image/video color.
2130 2006-11-26 Jim Meyering <jim@meyering.net>
2132 * Makefile.maint (patch-check): Compile patched sources with
2133 CFLAGS='-Wdeclaration-after-statement -Werror', to ensure that
2134 no violations remain.
2136 * src/c99-to-c89.diff: Remove 3 bogus hunks.
2138 * src/remove.c (fd_to_subdirp): Remove unused parameter, ds.
2141 * src/c99-to-c89.diff: Adjust for changes in rm.c and in remove.c.
2143 * src/rm.c (main): Remove unnecessary (assuming C99) braces.
2145 2006-11-26 Paul Eggert <eggert@cs.ucla.edu>
2147 Port parts of the code to C89 to minimize the need for c99-to-c89.diff,
2148 while trying to retain the readability of C99 as much as possible.
2149 * src/remove.c (rm_1): Remove decl of local, fd_cwd.
2150 Replace each of two uses with literal AT_FDCWD.
2151 (cache_stat_init): Return its argument, for convenience.
2152 Update the caller in remove_dir.
2153 (AD_pop_and_chdir): Return prev_dir rather than storing through
2154 a pointer argument. All uses changed.
2155 (AD_ensure_initialized): New function.
2156 (AD_mark_helper): Use it, to avoid the need for declaration
2158 (rm): Move cycle_check_init call into callee...
2160 Use an else clause in place of a "continue" statement.
2161 (close_preserve_errno): Remove.
2162 (fd_to_subdirp): Rewrite to avoid the need for decl after statement.
2164 2006-11-25 Jim Meyering <jim@meyering.net>
2166 * Makefile.am (EXTRA_DIST): Remove announce-gen from here, too.
2168 2006-11-24 Theodoros V. Kalamatianos <thkala@softlab.ece.ntua.gr> (tiny change)
2170 * tests/du/inacc-dest: Skip this test when running as root.
2172 2006-11-23 Jim Meyering <jim@meyering.net>
2174 * announce-gen: Remove file. It's moving to gnulib.
2175 * bootstrap: Pull it from gnulib/build-aux instead.
2176 * Makefile.maint (announcement): Reflect move to ./build-aux.
2178 * tests/du/deref-args: Use "printf %65536s x" to create a 64KB file,
2179 rather than a pipeline that would sometimes evoke a diagnostic
2180 like "seq: write error: Broken pipe".
2182 * tests/help-version: Suppress dd transfer rate output.
2184 * configure.ac (AC_INIT): Bump to 6.7-pre, not 6.6-pre.
2186 2006-11-22 Jim Meyering <jim@meyering.net>
2188 * announce-gen (print_news_deltas): Fix silly, but harmless typo:
2189 change "(:?..." to "(?:..." in regexps.
2191 Post-release version change.
2192 * NEWS: Add a line for 6.7-pre.
2193 * configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
2196 * NEWS: Record release date. Remove "-pre" suffix.
2197 * configure.ac (AC_INIT): Remove "-pre" suffix from version string.
2199 * announce-gen: Remove unused --release-archive-directory option.
2200 (print_news_deltas): Accept new adjective, "Noteworthy", in addition
2202 Match version numbers in NEWS using tighter regular expressions.
2203 (main): Require the --gpg-key-id=ID option.
2204 * Makefile.maint (announcement): Don't use now-removed
2205 --release-archive-directory=... option.
2207 * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
2209 2006-11-21 Jim Meyering <jim@meyering.net>
2211 * tests/rm/one-file-system: Upon setup failure (e.g., mount failure),
2212 skip the test rather than failing. Reported by Michael Deutschmann.
2214 * tests/rm/fail-eperm: Use the "(exit N); exit N" idiom,
2215 rather than just "exit N".
2217 Arrange for "make check-root" to run the new root-only test.
2218 * tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid.
2221 2006-11-20 Jim Meyering <jim@meyering.net>
2223 Add a root-only test for today's lib/idcache.c fix.
2224 * tests/ls/nameless-uid: New file.
2225 * tests/ls/Makefile.am (TESTS): Add nameless-uid.
2226 (TESTS_ENVIRONMENT): Add PERL to the list.
2228 2006-11-19 Jim Meyering <jim@meyering.net>
2230 * tests/tail-2/assert-2: Mark as a very-expensive test, because I
2231 find the 7-second sleep annoyingly long. Besides, this test is
2232 probably far too specific and timing sensitive ever to trigger again.
2233 * tests/tail-2/assert: Likewise.
2235 Post-release version change.
2236 * NEWS: Add a line for 6.6-pre.
2237 * configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
2240 * NEWS: Record release date. Remove "-cvs" suffix.
2241 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2243 2006-11-18 Jim Meyering <jim@meyering.net>
2245 "ln --backup f f" produces a misleading diagnostic:
2246 ln: creating hard link `f' => `f': No such file or directory
2247 * src/ln.c (do_link): Give a better diagnostic in this unusual case.
2248 (do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
2249 * tests/ln/Makefile.am (TESTS): Add hard-backup.
2250 * tests/ln/hard-backup: New test for the above.
2251 * NEWS: Mention this fix.
2253 2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
2255 * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
2257 * lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
2258 * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
2259 * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
2260 Omit unnecessary parenthesization of args.
2261 * src/od.c (EQUAL_BLOCKS): Likewise.
2262 * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
2264 2006-11-16 Jim Meyering <jim@meyering.net>
2266 * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
2267 automake we're skipping this test), and give a diagnostic to tell
2268 the user the same thing. Reported by Mike Grayson.
2270 2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2272 * man/Makefile.am (dist_man_MANS): Replace all optional manpages
2273 with `$(MAN)', computed at configure time; also, list them ...
2274 (optional_mans): ... in this new variable.
2275 (max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
2277 2006-11-16 Jim Meyering <jim@meyering.net>
2279 Help valgrind see that there is no leak in dd.c.
2280 * src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
2281 so we need not free them at all. This is easier than freeing
2282 both buffers at each of the early "return"s.
2284 * src/csplit.c (load_buffer): Plug an inconsequential leak.
2286 2006-11-15 Jim Meyering <jim@meyering.net>
2288 * .x-po-check: Exclude gl/ files. Otherwise, po-check would
2289 complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
2291 2006-11-14 Jim Meyering <jim@meyering.net>
2293 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
2294 remove the now-unnecessary use of AC_LIBSOURCES.
2296 Adapt to new version of gnulib-tool.
2297 * gl/modules/root-dev-ino: New file.
2298 * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
2299 * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
2300 * m4/root-dev-ino.m4: Move this file ...
2301 * gl/m4/root-dev-ino.m4: ... to here.
2303 * bootstrap.conf (gnulib_modules): Add root-dev-ino.
2305 2006-11-13 Jim Meyering <jim@meyering.net>
2307 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
2310 Plug another technically-unimportant leak in sort.
2311 * src/sort.c (main): Don't allocate memory for each new key here.
2312 (insertkey): Allocate memory for each key here, instead.
2313 (key_init): Rename from new_key. Don't allocate.
2315 * src/sort.c (main): Plug a tiny memory leak.
2316 Move declaration of local "minus" down to be nearer point of use.
2318 2006-11-12 Jim Meyering <jim@meyering.net>
2320 du would exit early, when encountering an inaccessible directory
2321 Reported by Mike Frysinger, in
2322 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
2323 * tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
2324 * tests/chgrp/no-x: Remove the "fts_read failed: ..."
2325 diagnostic from the expected output when using native fdopendir.
2326 * tests/chmod/no-x: Likewise.
2327 * tests/du/no-x: Likewise.
2328 * NEWS: Mention this bug fix.
2329 * tests/du/Makefile.am (TESTS): Add inacc-dest.
2331 * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
2332 for xalloc.h itself.
2334 Avoid false-positive when testing via valgrind.
2335 * tests/mv/atomic: Grep strace output for a more specific pattern
2336 than just "unlink", since that got a false positive when testing
2337 under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
2338 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
2340 2006-10-28 Jim Meyering <jim@meyering.net>
2342 * Makefile.maint (patch-check): Make it easier to regenerate
2343 the src/c99-to-c89.diff file. E.g., I do this:
2344 make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
2346 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
2348 2006-10-26 Jim Meyering <jim@meyering.net>
2350 * src/system.h (ftello): Add a compile-time check for the highly
2351 unlikely condition of off_t narrower than long int, rather than
2352 handling it at run time. Based on a patch from Paul Eggert.
2354 2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
2356 * tests/chmod/c-option: When double-quoting part of a word, prefer
2357 to double-quote the whole word. This is a bit easier to read (at
2358 least for me), and in some cases it avoids a shell bug with Tru64
2359 4.0 sh reported by Nelson H. F. Beebe. For example, instead of
2360 "$abs_srcdir"/../setgid-check we now write
2361 "$abs_srcdir/../setgid-check".
2362 * tests/cp/cp-parents: Likewise.
2363 * tests/du/inaccessible-cwd: Likewise.
2364 * tests/du/long-from-unreadable: Likewise.
2365 * tests/install/basic-1: Likewise.
2366 * tests/install/trap: Likewise.
2367 * tests/misc/close-stdout: Likewise.
2368 * tests/mkdir/concurrent-1: Likewise.
2369 * tests/mkdir/p-1: Likewise.
2370 * tests/mkdir/p-3: Likewise.
2371 * tests/mkdir/parents: Likewise.
2372 * tests/mkdir/perm: Likewise.
2373 * tests/readlink/can-e: Likewise.
2374 * tests/readlink/can-f: Likewise.
2375 * tests/readlink/can-m: Likewise.
2376 * tests/rm/inaccessible: Likewise.
2377 * tests/rm/unread3: Likewise.
2378 * tests/touch/no-create-missing: Likewise.
2380 * lib/.cvsignore: Add uinttostr.c.
2382 2006-10-25 Jim Meyering <jim@meyering.net>
2384 Portability to Tru64 V4.0.
2385 * src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
2386 Define inline replacement function.
2387 This (along with a yesterday's fix for autoconf's
2388 _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
2389 now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
2391 2006-10-25 Bruno Haible <bruno@clisp.org>
2393 * src/cat.c (infile): Add "const" to declaration.
2394 * src/csplit.c (prefix): Likewise.
2395 * src/printf.c (cfcc_msg): Likewise.
2396 * src/tail.c (valid_file_spec): Likewise.
2397 * src/cut.c (cut_file): Likewise, for a parameter.
2398 * src/expr.c (str_value): Likewise.
2399 * src/fold.c (fold_file): Likewise.
2400 * src/pr.c (init_header): Likewise.
2401 * src/dircolors.c (dc_parse_stream): Likewise, for a local.
2402 * src/tr.c (make_printable_str): Likewise.
2403 * src/nl.c (body_type, header_type, footer_type, current_type):
2404 (separator_str, build_type_arg, nl_file): Likewise, for many.
2405 * src/paste.c (main): Don't assign a read-only string to 'optarg'.
2406 * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
2408 2006-10-25 Jim Meyering <jim@meyering.net>
2410 * tests/sample-test: Update copyright year list to include only
2411 the current year, since this is what I'll want in any new test.
2413 2006-10-24 Jim Meyering <jim@meyering.net>
2415 * src/c99-to-c89.diff: Update to reflect new offsets.
2417 * NEWS: new feature: rm accepts new option: --one-file-system
2418 Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
2419 * src/remove.h (struct rm_options) [one_file_system]: New member.
2420 * src/rm.c (rm_option_init): Initialize it.
2421 (usage): Document the option.
2422 * src/mv.c (rm_option_init): Likewise.
2423 * src/remove.c (remove_dir): With --one-file-system and --recursive,
2424 for each directory command line argument, do not affect a file system
2425 different from that of the starting directory. And give a diagnostic.
2426 * src/rm.c (ONE_FILE_SYSTEM): New enum.
2427 (main): Handle new option.
2428 * tests/rm/one-file-system: Test the above.
2429 * tests/rm/Makefile.am (TESTS): Add one-file-system.
2430 * tests/Makefile.am (check-root): Add the rm/one-file-system
2432 (EXTRA_DIST): Add other-fs-tmpdir.
2434 * tests/mv/setup: Removed. Renamed to...
2435 * tests/other-fs-tmpdir: ...this new file.
2436 * tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
2437 * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
2438 * tests/mv/backup-is-src: Likewise.
2439 * tests/mv/hard-link-1: Likewise.
2440 * tests/mv/leak-fd: Likewise.
2441 * tests/mv/mv-special-1: Likewise.
2442 * tests/mv/part-fail: Likewise.
2443 * tests/mv/part-hardlink: Likewise.
2444 * tests/mv/part-rename: Likewise.
2445 * tests/mv/part-symlink: Likewise.
2446 * tests/mv/partition-perm: Likewise.
2447 * tests/mv/to-symlink: Likewise.
2448 * tests/mv/into-self-2: Likewise.
2450 Don't let a failure in one test stop "make -k" from running the others.
2451 * tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
2452 (check-root): Depend on them, rather than executing the five
2453 commands in a single rule. Reported by Greg Schafer.
2455 2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
2457 * Makefile.maint (alpha beta major): Use a better log message for
2458 the automatic commit of .prev-version.
2460 2006-10-23 Jim Meyering <jim@meyering.net>
2462 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
2463 pwd via a shell. Instead, ensure that the absolute name of the
2464 pwd binary consists solely of reasonable characters.
2465 Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
2466 clean-up code isn't run.
2468 * NEWS: Add a line for 6.5-cvs.
2469 * configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
2471 2006-10-22 Jim Meyering <jim@meyering.net>
2475 * NEWS: Record the 6.4 release date.
2476 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2478 * Makefile.maint: Complete the adaptation to function with a working
2479 directory that is using git (rather than cvs) for version control.
2481 2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2483 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
2484 * tests/cp/cp-parents: Likewise.
2485 * tests/mkdir/parents: Likewise.
2486 * tests/mkdir/perm: Likewise.
2488 * tests/sample-test: Quote variables containing absolute build
2489 tree paths. In the cleanup trap, make sure `cd' succeeds before
2490 `chmod'ing and `rm'ing the temporary files.
2491 * tests/chgrp/basic: Likewise.
2492 * tests/chgrp/deref: Likewise.
2493 * tests/chgrp/no-x: Likewise.
2494 * tests/chgrp/posix-H: Likewise.
2495 * tests/chgrp/recurse: Likewise.
2496 * tests/chmod/c-option: Likewise.
2497 * tests/chmod/equal-x: Likewise.
2498 * tests/chmod/equals: Likewise.
2499 * tests/chmod/inaccessible: Likewise.
2500 * tests/chmod/no-x: Likewise.
2501 * tests/chmod/octal: Likewise.
2502 * tests/chmod/setgid: Likewise.
2503 * tests/chmod/umask-x: Likewise.
2504 * tests/chmod/usage: Likewise.
2505 * tests/chown/basic: Likewise.
2506 * tests/chown/deref: Likewise.
2507 * tests/chown/separator: Likewise.
2508 * tests/cp/acl: Likewise.
2509 * tests/cp/backup-1: Likewise.
2510 * tests/cp/backup-dir: Likewise.
2511 * tests/cp/backup-is-src: Likewise.
2512 * tests/cp/cp-HL: Likewise.
2513 * tests/cp/cp-deref: Likewise.
2514 * tests/cp/cp-i: Likewise.
2515 * tests/cp/cp-mv-backup: Likewise.
2516 * tests/cp/cp-parents: Likewise.
2517 * tests/cp/deref-slink: Likewise.
2518 * tests/cp/dir-rm-dest: Likewise.
2519 * tests/cp/dir-slash: Likewise.
2520 * tests/cp/dir-vs-file: Likewise.
2521 * tests/cp/fail-perm: Likewise.
2522 * tests/cp/into-self: Likewise.
2523 * tests/cp/link: Likewise.
2524 * tests/cp/link-no-deref: Likewise.
2525 * tests/cp/link-preserve: Likewise.
2526 * tests/cp/no-deref-link1: Likewise.
2527 * tests/cp/no-deref-link2: Likewise.
2528 * tests/cp/no-deref-link3: Likewise.
2529 * tests/cp/perm: Likewise.
2530 * tests/cp/preserve-2: Likewise.
2531 * tests/cp/r-vs-symlink: Likewise.
2532 * tests/cp/same-file: Likewise.
2533 * tests/cp/slink-2-slink: Likewise.
2534 * tests/cp/sparse: Likewise.
2535 * tests/cp/special-bits: Likewise.
2536 * tests/cp/src-base-dot: Likewise.
2537 * tests/cp/symlink-slash: Likewise.
2538 * tests/dd/not-rewound: Likewise.
2539 * tests/dd/skip-seek2: Likewise.
2540 * tests/dd/unblock-sync: Likewise.
2541 * tests/du/2g: Likewise.
2542 * tests/du/8gb: Likewise.
2543 * tests/du/basic: Likewise.
2544 * tests/du/deref: Likewise.
2545 * tests/du/deref-args: Likewise.
2546 * tests/du/exclude: Likewise.
2547 * tests/du/fd-leak: Likewise.
2548 * tests/du/hard-link: Likewise.
2549 * tests/du/inaccessible-cwd: Likewise.
2550 * tests/du/long-from-unreadable: Likewise.
2551 * tests/du/long-sloop: Likewise.
2552 * tests/du/no-deref: Likewise.
2553 * tests/du/no-x: Likewise.
2554 * tests/du/restore-wd: Likewise.
2555 * tests/du/slash: Likewise.
2556 * tests/du/slink: Likewise.
2557 * tests/du/trailing-slash: Likewise.
2558 * tests/du/two-args: Likewise.
2559 * tests/fmt/long-line: Likewise.
2560 * tests/install/basic-1: Likewise.
2561 * tests/install/create-leading: Likewise.
2562 * tests/install/d-slashdot: Likewise.
2563 * tests/install/trap: Likewise.
2564 * tests/ln/misc: Likewise.
2565 * tests/ln/target-1: Likewise.
2566 * tests/ls/color-dtype-dir: Likewise.
2567 * tests/ls/dangle: Likewise.
2568 * tests/ls/dired: Likewise.
2569 * tests/ls/file-type: Likewise.
2570 * tests/ls/follow-slink: Likewise.
2571 * tests/ls/infloop: Likewise.
2572 * tests/ls/inode: Likewise.
2573 * tests/ls/m-option: Likewise.
2574 * tests/ls/no-arg: Likewise.
2575 * tests/ls/recursive: Likewise.
2576 * tests/ls/rt-1: Likewise.
2577 * tests/ls/stat-dtype: Likewise.
2578 * tests/ls/stat-failed: Likewise.
2579 * tests/ls/stat-vs-dirent: Likewise.
2580 * tests/misc/cat-proc: Likewise.
2581 * tests/misc/close-stdout: Likewise.
2582 * tests/misc/csplit: Likewise.
2583 * tests/misc/date-sec: Likewise.
2584 * tests/misc/false-status: Likewise.
2585 * tests/misc/head-c: Likewise.
2586 * tests/misc/head-pos: Likewise.
2587 * tests/misc/mknod: Likewise.
2588 * tests/misc/nl: Likewise.
2589 * tests/misc/nohup: Likewise.
2590 * tests/misc/pathchk1: Likewise.
2591 * tests/misc/printf: Likewise.
2592 * tests/misc/printf-hex: Likewise.
2593 * tests/misc/pwd-long: Likewise.
2594 * tests/misc/shuf: Likewise.
2595 * tests/misc/sort-rand: Likewise.
2596 * tests/misc/split-a: Likewise.
2597 * tests/misc/split-fail: Likewise.
2598 * tests/misc/split-l: Likewise.
2599 * tests/misc/stat-fmt: Likewise.
2600 * tests/misc/tac-continue: Likewise.
2601 * tests/misc/wc-files0: Likewise.
2602 * tests/mkdir/concurrent-1: Likewise.
2603 * tests/mkdir/p-1: Likewise.
2604 * tests/mkdir/p-2: Likewise.
2605 * tests/mkdir/p-3: Likewise.
2606 * tests/mkdir/p-slashdot: Likewise.
2607 * tests/mkdir/p-thru-slink: Likewise.
2608 * tests/mkdir/p-v: Likewise.
2609 * tests/mkdir/parents: Likewise.
2610 * tests/mkdir/perm: Likewise.
2611 * tests/mkdir/t-slash: Likewise.
2612 * tests/mv/acl: Likewise.
2613 * tests/mv/atomic: Likewise.
2614 * tests/mv/backup-dir: Likewise.
2615 * tests/mv/childproof: Likewise.
2616 * tests/mv/diag: Likewise.
2617 * tests/mv/dir-file: Likewise.
2618 * tests/mv/dir2dir: Likewise.
2619 * tests/mv/dup-source: Likewise.
2620 * tests/mv/hard-2: Likewise.
2621 * tests/mv/hard-3: Likewise.
2622 * tests/mv/hard-4: Likewise.
2623 * tests/mv/hard-link-1: Likewise.
2624 * tests/mv/hard-verbose: Likewise.
2625 * tests/mv/i-2: Likewise.
2626 * tests/mv/i-3: Likewise.
2627 * tests/mv/i-4: Likewise.
2628 * tests/mv/i-5: Likewise.
2629 * tests/mv/i-link-no: Likewise.
2630 * tests/mv/into-self-4: Likewise.
2631 * tests/mv/leak-fd: Likewise.
2632 * tests/mv/mv-special-1: Likewise.
2633 * tests/mv/no-target-dir: Likewise.
2634 * tests/mv/part-fail: Likewise.
2635 * tests/mv/part-hardlink: Likewise.
2636 * tests/mv/part-rename: Likewise.
2637 * tests/mv/part-symlink: Likewise.
2638 * tests/mv/partition-perm: Likewise.
2639 * tests/mv/perm-1: Likewise.
2640 * tests/mv/reply-no: Likewise.
2641 * tests/mv/trailing-slash: Likewise.
2642 * tests/mv/update: Likewise.
2643 * tests/od/od-N: Likewise.
2644 * tests/od/x8: Likewise.
2645 * tests/readlink/can-e: Likewise.
2646 * tests/readlink/can-f: Likewise.
2647 * tests/readlink/can-m: Likewise.
2648 * tests/readlink/rl-1: Likewise.
2649 * tests/rm/cycle: Likewise.
2650 * tests/rm/dangling-symlink: Likewise.
2651 * tests/rm/deep-1: Likewise.
2652 * tests/rm/dir-no-w: Likewise.
2653 * tests/rm/dir-nonrecur: Likewise.
2654 * tests/rm/dot-rel: Likewise.
2655 * tests/rm/empty-inacc: Likewise.
2656 * tests/rm/f-1: Likewise.
2657 * tests/rm/fail-2eperm: Likewise.
2658 * tests/rm/hash: Likewise.
2659 * tests/rm/i-1: Likewise.
2660 * tests/rm/i-no-r: Likewise.
2661 * tests/rm/ignorable: Likewise.
2662 * tests/rm/inaccessible: Likewise.
2663 * tests/rm/interactive-always: Likewise.
2664 * tests/rm/interactive-once: Likewise.
2665 * tests/rm/ir-1: Likewise.
2666 * tests/rm/isatty: Likewise.
2667 * tests/rm/no-give-up: Likewise.
2668 * tests/rm/r-1: Likewise.
2669 * tests/rm/r-2: Likewise.
2670 * tests/rm/r-3: Likewise.
2671 * tests/rm/r-4: Likewise.
2672 * tests/rm/readdir-bug: Likewise.
2673 * tests/rm/rm1: Likewise.
2674 * tests/rm/rm2: Likewise.
2675 * tests/rm/rm3: Likewise.
2676 * tests/rm/rm4: Likewise.
2677 * tests/rm/rm5: Likewise.
2678 * tests/rm/sunos-1: Likewise.
2679 * tests/rm/unread2: Likewise.
2680 * tests/rm/unread3: Likewise.
2681 * tests/rmdir/fail-perm: Likewise.
2682 * tests/rmdir/t-slash: Likewise.
2683 * tests/shred/exact: Likewise.
2684 * tests/shred/remove: Likewise.
2685 * tests/sum/sysv: Likewise.
2686 * tests/tail-2/append-only: Likewise.
2687 * tests/tail-2/assert: Likewise.
2688 * tests/tail-2/assert-2: Likewise.
2689 * tests/tail-2/big-4gb: Likewise.
2690 * tests/tail-2/fflush: Likewise.
2691 * tests/tail-2/infloop-1: Likewise.
2692 * tests/tail-2/proc-ksyms: Likewise.
2693 * tests/tail-2/start-middle: Likewise.
2694 * tests/tail-2/tail-n0f: Likewise.
2695 * tests/tee/basic: Likewise.
2696 * tests/tee/dash: Likewise.
2697 * tests/touch/fail-diag: Likewise.
2698 * tests/touch/no-create-missing: Likewise.
2699 * tests/touch/not-owner: Likewise.
2700 * tests/touch/obsolescent: Likewise.
2701 * tests/touch/read-only: Likewise.
2702 * tests/touch/relative: Likewise.
2704 2006-10-21 Jim Meyering <jim@meyering.net>
2706 * NEWS: (cp --backup fix): Fix a typo.
2708 * .gitignore: Remove some references to files in subdirectories.
2709 * build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
2710 * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
2712 * src/copy.c (copy_internal): Add a comment saying why we prefer
2715 Enable an fts optimization (call lstat only for directories,
2716 on some file system types) also with the --preserve-root option
2718 * src/chown-core.c (change_file_owner): Compare fts_statp-based
2719 dev/ino against root dev/ino only for directories.
2720 (chown_files): Don't let the root_dev_ino setting influence whether
2721 we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
2723 2006-10-20 Jim Meyering <jim@meyering.net>
2725 * src/od.c (usage): Change description of default to use "-w16",
2726 not the now-invalid "-w 16" syntax. From Dan Jacobson.
2728 2006-10-19 Jim Meyering <jim@meyering.net>
2730 * bootstrap: Add names to each .gitignore file (if it exists)
2731 as well as to .cvsignore.
2733 * Makefile.maint (po-check): This rule didn't detect the new use
2734 of "gettext" (as opposed to the use of "_" everywhere else) in
2735 lib/xstrtol.h. Adjust the grep regexp so that now it does.
2737 2006-10-18 Paul Eggert <eggert@cs.ucla.edu>
2739 * src/copy.c (copy_reg): Rewrite slightly to avoid duplicate code
2740 when opening dst_name.
2741 (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
2742 (SYSCALL) to test for failure in a system call.
2744 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
2745 a fifo. This preserves the special mode bits on Solaris 10, which
2746 is compatible with what Solaris 10 cp -R does.
2748 * src/copy.c (copy_internal): Remove redundant and confusing local
2751 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
2752 7777. This matches historical 'cp' behavior and avoids some
2753 (though not all) implementation-defined behavior of mkdir.
2754 * src/cp.c (make_dir_parents_private): Likewise.
2755 * src/copy.c (copy_internal): Don't pass 'open' a mode greater
2756 than 777. This is required by POSIX. It doesn't make any difference
2757 in actual behavior on any host that I know of.
2759 2006-10-17 Jim Meyering <jim@meyering.net>
2761 * src/dd.c (usage): Use two spaces (not one) to separate the
2762 "fdatasync" option string from its description, so help2man formats
2763 the derived man page properly. Reported by Samuel Thibault
2764 in <http://bugs.debian.org/393649>.
2766 2006-10-16 Jim Meyering <jim@meyering.net>
2768 * .x-sc_trailing_blank: Remove names of files that are no longer
2771 2006-10-16 Paul Eggert <eggert@cs.ucla.edu>
2773 * src/groups.sh (version): Reword message to match the other programs.
2774 Problem reported by Eric Blake.
2776 2006-10-14 Jim Meyering <jim@meyering.net>
2778 * Makefile.maint (headers_with_interesting_macro_defs): Define.
2779 (.re-defmac, sc_always_defined_macros): New rules.
2781 * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
2782 Instead, include "exit.h". This hereby retires the work-around for
2783 "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
2785 * src/cksum.c (uint_fast32_t): Don't define.
2786 Instead, include <stdint.h>.
2788 * src/pinky.c (S_IWGRP): Don't define.
2789 It's already defined by "stat-macros.h" (included via system.h).
2791 * Makefile.cfg: Remove cruft that's now handled via bootstrap.
2792 * Makefile.maint: Likewise, remove these targets/rules/variables:
2793 (local_updates, update, cvs-update, wget_files, get-targets): Remove.
2794 (cvs_files, wget-update, automake_repo): Likewise.
2795 Move the comment about cvsu to build-aux/vc-list-files,
2796 where cvsu is actually used.
2798 * Makefile.maint (cvs-update): Use $(CVS), not "cvs".
2800 Work also when the working directory (with e.g. coreutils sources)
2801 is version controlled with git, rather than CVS.
2802 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
2804 In messages and comments, say e.g., "checked-out sources",
2805 rather than "CVS sources".
2806 (version_controlled_file): New function. Work for git as well as
2807 for CVS. Don't use grep's -q option.
2808 (slurp): Call it here, in place of CVS-specific code.
2810 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
2812 * src/copy.c (copy_internal): Although we do create a backup of each
2813 destination directory when in move mode, don't do that when copying.
2814 Reported by Peter Breitenlohner, in
2815 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
2816 * tests/cp/backup-dir: New file. Test for the above.
2817 * tests/cp/Makefile.am (TESTS): Add backup-dir.
2819 2006-10-13 Jim Meyering <jim@meyering.net>
2821 More chown/chgrp dereferencing-related fixes.
2822 * src/chown-core.c (change_file_owner): Don't use fts_statp if
2823 we're dereferencing symlinks.
2824 Reverse conjuncts, so that we use dereference file_stats
2825 (aka ent->fts_statp) only *after* we've confirmed that
2826 chopt->affect_symlink_referent is true. Otherwise, we might
2827 use ent->fts_statp uninitialized.
2828 Don't turn on FTS_NOSTAT when dereferencing symlinks.
2829 * tests/chown/deref: Update the expected diagnostic, now that
2830 this test case (trying to use "chown --dereference ..." on a
2831 dangling symlink) takes a different code path.
2833 2006-10-13 Paul Eggert <eggert@cs.ucla.edu>
2835 Sync from Bison, as follows:
2837 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
2839 Fix problems with translating English-language diagnostics.
2840 * bootstrap: Fix bug introduced in recent bootstrap changes, with
2841 respect to bison-runtime pot generation. The YY_ stuff
2842 wasn't being captured.
2844 2006-10-13 Jim Meyering <jim@meyering.net>
2846 * src/chown-core.c (change_file_owner): Use fstatat, not stat,
2847 now that we're using fts_open with FTS_CWDFD.
2848 * tests/chgrp/posix-H: Add --preserve-root to an invocation of
2849 chgrp, to exercise the above fix.
2850 * NEWS: Mention the above.
2852 * src/du-tests: Clean up a little, though it's still not portable.
2854 * .vg-suppressions: Add 3 more for debian unstable.
2856 * tests/ls/Test.pm: Remove long-unused file.
2857 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
2858 Suggestions from Bruno Haible.
2860 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2862 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
2863 (MAINTAINERCLEANFILES): Add .kludge-stamp.
2864 * man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
2865 instead of $(man_MANS).
2867 2006-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2869 * configure.ac: Avoid compiler warnings about default return
2870 type in function definitions and unused variables in tests.
2871 * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
2872 if this is #defined.
2874 2006-10-12 Jim Meyering <jim@meyering.net>
2876 * configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
2877 Call gl_INIT directly, rather than through the above.
2879 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2881 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
2882 variable was sometimes used without being initialized. This
2883 messed up the installation of the INSTALL file in some cases.
2885 2006-10-11 Jim Meyering <jim@meyering.net>
2887 * src/ls.c (usage): Correct description of -s, --size.
2888 It works even without -l. Suggestion from Karl Berry.
2890 2006-10-10 Paul Eggert <eggert@cs.ucla.edu>
2892 * src/ls.c (quote_name): Use initializer rather than memset to
2893 initialize an object to zero. This is easier to read and is less
2894 likely to introduce a runtime error due to a mixup. It causes
2895 gcc -W to issue a warning, but you can work around this by
2896 appending -Wno-missing-field-initializers.
2897 * src/pathchk.c (portable_chars_only): Likewise.
2898 * src/shred.c (main): Likewise.
2899 * src/stty.c (main): Likewise.
2900 * src/tr.c (card_of_complement): Likewise.
2901 * src/wc.c (wc): Likewise.
2903 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2905 * src/sort.c (usage): Mention again that sort fields are origin 1.
2907 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
2910 * bootstrap (usage, main program, symlink_to_gnulib): Add option
2911 --copy. Inspired by a suggestion from Bruno Haible.
2913 2006-10-09 Jim Meyering <jim@meyering.net>
2915 Avoid a compiler warning.
2916 * src/pathchk.c (portable_chars_only): Initialize variable of type
2917 mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
2919 2006-10-06 Paul Eggert <eggert@cs.ucla.edu>
2921 Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
2922 wrong file name in some cases. Lars Wendler reported a bug in
2924 * src/install.c (make_ancestor): New arg COMPONENT.
2925 * src/mkdir.c (make_ancestor): Likewise.
2926 * tests/install/basic-1: Check for install -Dv bug.
2927 * tests/mkdir/Makefile.am (TESTS): Add p-v.
2928 * tests/mkdir/p-v: New file, to test this bug.
2930 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
2932 * src/chgrp.c: Don't include lchown.h; no longer needed.
2933 * src/chown.c: Likewise.
2935 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
2936 current file system has useful d_type info.
2938 * src/dd.c (flags): noatime and nofollow now depend on
2939 HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
2940 (usage): Output info about noatime and nofollow only if
2941 they are known to work.
2942 * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
2943 than O_NOFOLLOW, when testing whether it's possible to avoid a
2944 race condition reliably.
2946 2006-10-05 Jim Meyering <jim@meyering.net>
2948 * src/c99-to-c89.diff: Update to reflect new offsets.
2950 * tests/install/basic-1: Skip the latter part of this test if the
2951 just-built dd binary is not readable. Otherwise, this test would fail
2952 when binaries were created as root. Reported by Bauke Jan Douma in
2953 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
2955 2006-10-03 Paul Eggert <eggert@cs.ucla.edu>
2957 * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
2958 MiB, since XFS hosts can legitimately have large values of
2959 st_blksize. Problem reported by Tony Ernst in
2960 <http://savannah.gnu.org/bugs/?17903>.
2962 2006-10-04 Jim Meyering <jim@meyering.net>
2964 * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
2965 Paul Eggert pointed out that the specified file may exist,
2966 in spite of such an errno value.
2967 * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
2968 * tests/rm/ignore-name-too-long: Remove file.
2969 * NEWS: Update here, too.
2971 2006-10-03 Jim Meyering <jim@meyering.net>
2973 * tests/rm/fail-eperm: Report failure also if rm is terminated by
2976 * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
2977 and one in shred.c -- that were added before coreutils-6.3.
2978 Reported by Michael Deutschmann.
2980 * src/c99-to-c89.diff: Update to reflect new offsets.
2982 * src/remove.c (remove_entry): With -f, exit successfully in spite
2983 of a missing file under some very unusual conditions (with errno
2984 being any of ENOENT, ENOTDIR, ENAMETOOLONG).
2986 With --force (-f), rm no longer fails for ENOTDIR.
2987 * src/remove.c (ignorable_missing): New function.
2988 Use it everywhere, rather than open-coding the test.
2989 Andreas Schwab reported the ENOTDIR problem.
2990 (ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
2992 * NEWS: Mention the bug fix.
2993 * tests/rm/ignorable: New file. Test for the ENOTDIR case.
2994 * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
2995 * tests/rm/Makefile.am (TESTS): Add the new file names.
2997 * bootstrap: Undo last change to this file, since now gnulib-tool
2998 sticks with the automake default in generating dependencies.
3000 * NEWS: Add a line for 6.4-cvs.
3001 * configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
3003 2006-09-30 Jim Meyering <jim@meyering.net>
3006 * NEWS: Record the 6.3 release date.
3007 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3009 * NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
3011 * src/c99-to-c89.diff: Update offsets.
3013 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3015 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
3016 as it doesn't work with Solaris /bin/sh.
3018 2006-09-29 Jim Meyering <jim@meyering.net>
3020 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
3023 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
3024 use .1 as the increment. Actual output varies too much.
3025 [eq-wid-3]: New, commented out test.
3027 * src/shuf.c (read_input): Fix an off-by-one error that
3028 would cause an infloop for piped input of 8KB or more.
3029 * NEWS: Mention the fix.
3030 * tests/misc/shuf: Test for the above fix.
3032 Since any system may be affected by the Darwin readdir bug,
3033 perform the extra rewinddir unconditionally. The performance
3034 impact of rewinding a directory is negligible.
3035 * src/remove.c (NEED_REWIND): Define to use
3036 CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
3038 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
3039 increment translates to a slightly larger value.
3040 This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
3041 The final expected value wasn't being printed.
3043 Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
3044 and NFS, whereby rm would not remove all files in a directory.
3045 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
3046 (NEED_REWIND): New macro, so that we incur the cost of the work-around
3047 rewinddir only on afflicted systems.
3048 * NEWS: Clarify and correct.
3049 * tests/rm/readdir-bug: New file. Test for the above fix.
3050 * tests/rm/Makefile.am (TESTS): Add it.
3051 Prompted by testing and analysis from Bruno Haible:
3052 http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
3054 2006-09-28 Paul Eggert <eggert@cs.ucla.edu>
3056 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
3057 suggested for Debian stable, which uses Perl 5.8.4.
3059 2006-09-28 Jim Meyering <jim@meyering.net>
3061 Automatically generated dependencies are important even
3062 when all of the sources in a directory come from gnulib.
3063 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3064 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3066 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
3067 Ensure that IFS is set properly and unset PATH.
3069 Work properly even when the name of the selected file starts with "-".
3070 Invoke rm via "../../src/rm", and adjust expected output.
3071 Prompted by a patch from Tim Waugh.
3073 * README-cvs: Add Bison to the list of required packages.
3075 2006-09-26 Jim Meyering <jim@meyering.net>
3077 * src/c99-to-c89.diff: Update offsets.
3079 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
3080 it from removing a directory containing 188 or more entries.
3081 * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
3082 20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
3083 Reported by Matthew Woehlke.
3085 2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
3087 * NEWS: "groups user" no longer outputs "user :"; you need at least
3088 two users. "groups" now processes options like --help more compatibly.
3089 * src/groups.sh: Implement the option-processing change.
3090 Handle user and group names with special characters more robustly.
3091 Report write errors instead of exiting silently with status 1.
3093 2006-09-26 Jim Meyering <jim@meyering.net>
3095 * README: Warn not to run autoreconf manually. Use bootstrap instead.
3097 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
3098 Rewrite to avoid using temporary, $status.
3100 * NEWS: Mention the bug fix.
3101 * src/groups.sh: Don't hide a write failure.
3102 Reported by Iain Calder <ic56@rogers.com>.
3104 2006-09-25 Jim Meyering <jim@meyering.net>
3106 * src/chown.c (usage): Clarify --dereference description.
3107 * src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
3109 2006-09-24 Jim Meyering <jim@meyering.net>
3111 * NEWS: Mention these fixes.
3112 * src/copy.c (copy_reg): With --verbose (-v), print
3113 "removed `file_name'" just after unlinking a file.
3114 (copy_internal): Likewise, in three more places.
3115 Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
3116 * tests/mv/hard-verbose: New file. Test for the above fix.
3117 * tests/mv/Makefile.am (TESTS): Add hard-verbose.
3119 * tests/help-version (sync_args): Don't call sync, since it spins up
3120 disks that I've deliberately caused to spin down (but not unmounted).
3122 * NEWS: Mention the improvement to sort.
3124 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
3125 as well as existing.
3127 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
3128 since that predated addition of d_type support.
3130 2006-09-23 Jim Meyering <jim@meyering.net>
3132 * gl/modules/getloadavg.diff: New file. Work around the way the latest
3133 version of the getloadavg module interacts with our bootstrap script.
3134 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3135 * Makefile.am (EXTRA_DIST): Sort file names.
3136 Add bootstrap and gl/modules/getloadavg.diff
3138 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3140 * bootstrap: Add support for --force.
3141 (usage): New function. Describe usage less tersely.
3142 (CVS_only_file): New var.
3144 * NEWS: Document fix for cp -i and mv -i.
3145 * src/copy.c (copy_internal): With -i, prompt even if the source
3146 is a directory and the destination is not. This is required by
3147 POSIX and gives the user a chance to bail out before failing.
3148 * tests/cp/Makefile.am (TESTS): Add cp-i.
3149 * tests/cp/cp-i: New file.
3150 * tests/mv/Makefile.am (TESTS): Add i-5.
3151 * tests/mv/i-5: New file.
3153 2006-09-20 Jim Meyering <jim@meyering.net>
3155 * NEWS: Mention the chmod bug fix.
3157 * tests/chmod/inaccessible: New test, specifically for this bug.
3158 Based on a test case from Paul Eggert.
3159 * tests/chmod/Makefile.am (TESTS): Add inaccessible.
3161 Fix the 2006-09-18 bug differently.
3162 * src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
3163 tell fts_read to stat the file again, in case it has become
3164 accessible since the initial fts_open call.
3165 * src/chown-core.c (change_file_owner): Likewise.
3167 * src/chmod.c: Revert last change. There is a better way.
3168 * src/chown-core.c: Likewise.
3170 2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
3172 * src/ln.c (target_directory_operand): Rewrite to avoid porting
3173 problem on Tandem reported by Matthew Woehlke in
3174 <https://savannah.gnu.org/bugs/?17172>.
3176 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3178 Fix bug where chmod, chown, and chgrp did not process operands
3179 left-to-right in some cases.
3180 * src/chmod.c (wd_errno): New var.
3181 (chmod_file): New function, with most of the contents of the
3182 old prcess_file function.
3183 (process_files): Use it. This gives file names to fts one
3184 at a time, so that they are processed left-to-right as POSIX
3186 * src/chown-core.c (wd_errno, chown_files): Likewise.
3187 (chown_file): New function.
3188 * tests/install/basic-1: Redo test so as to not workaround
3189 the chmod bug, thereby testing for it.
3191 * src/shuf.c (main): Quote the entire range when reporting an
3192 invalid one, rather than just the part that contained the error.
3194 * tests/stty/row-col-1: Rewrite to avoid temporary file that is
3195 sometimes left behind if the test is skipped or interrupted.
3197 * bootstrap (symlink_to_gnulib): New function.
3198 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3199 to copies-of-gnulib.
3200 (cp_mark_as_generated, slurp, gnulib_files):
3201 Avoid making a copy if it's the same as the old version.
3202 (gnulib_files): Add support for this variable (used by Bison).
3204 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
3205 indicating flaw in kernel. Reword to say that the flaw isn't
3206 serious for coreutils, since the flaw does affect ls -i.
3208 * tests/chgrp/basic: Fix bug in test case exposed by building on
3209 Solaris 8 in a setgid directory. The test case incorrectly
3210 assumed that 'symlink' would be in group $g1.
3212 2006-09-18 Jim Meyering <jim@meyering.net>
3214 * NEWS: Add a line for 6.3-cvs.
3215 * configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
3218 * NEWS: Record the 6.2 release date.
3219 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3221 2006-09-17 Jim Meyering <jim@meyering.net>
3223 * tests/chgrp/basic: On an OpenBSD system, rather than failing
3224 due to a known problem, merely warn about it.
3225 Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
3226 Instead, use stat to test file system for desired results, directly.
3227 * tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
3229 * tests/envvar-check: Add more variable names to the list of those
3230 that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
3231 QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
3233 2006-09-16 Paul Eggert <eggert@cs.ucla.edu>
3235 * NEWS: Document that mkdir -p and install -d now fork on occasion.
3236 * bootstrap.conf (gnulib_modules): Add savewd.
3237 * src/install.c: Include savewd.h.
3238 (process_dir): New function.
3239 (main, install_file_in_file_parents): Use it, along with the new
3240 savewd module, to avoid some race conditions.
3241 * src/mkdir.c: Include savewd.h.
3242 (struct mkdir_options): New members make_ancestor_function, mode,
3244 (make_ancestor): Return 1 if the resulting directory is not readable.
3245 (process_dir): New function.
3246 (main): Use it, along with new savewd module, to avoid some
3247 race conditions. Fill in new slots of struct mkdir_options, so
3248 that callees get the values.
3249 * tests/install/basic-1: Test for coreutils 5.97 bug that was
3250 fixed in coreutils 6.0, and which should still be fixed with
3252 * tests/mkdir/p-3: Likewise.
3254 2006-09-15 Jim Meyering <jim@meyering.net>
3256 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
3257 The 2006-09-08 changes made it so "mv dir new-name/" would
3258 fail on NetBSD 1.6. This makes it work once again.
3260 2006-09-14 Jim Meyering <jim@meyering.net>
3262 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
3263 Instead, since it's a little fragile, assert the condition.
3264 (target_directory_operand): Update comment to reflect latest change.
3266 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3268 * src/who.c (print_user): Rewrite to avoid warning from
3269 GCC 4.1.1 with -Wall.
3271 2006-09-12 Jim Meyering <jim@meyering.net>
3273 * tests/mv/atomic: Check for specific strace output, rather than
3274 simply nonempty. RHEL AS 4 would fail this test due to strace
3275 generating "[ Process PID=14434 runs in 32 bit mode. ]".
3276 Reported by Nelson Beebe.
3278 2006-09-11 Jim Meyering <jim@meyering.net>
3280 * src/remove.c (remove_dir): Move new cache_stat_init call onto
3282 (rm_1): Move declaration of "st" and new cache_stat_init call
3283 "down" to nearer where they're used.
3284 * src/c99-to-c89.diff: Add another set of curly braces.
3286 2006-09-10 Paul Eggert <eggert@cs.ucla.edu>
3288 * src/expr.c (eval6): Fix buffer overrun, or bad performance, if
3289 substr's last operand is very large. Performance problem reported
3292 2006-09-09 Jim Meyering <jim@meyering.net>
3294 * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
3296 (sc_require_config_h): Skip this test if there are no version-
3297 controlled .c files.
3298 (sc_prohibit_assert_without_use): Likewise.
3300 2006-09-08 Jim Meyering <jim@meyering.net>
3302 * bootstrap: Export CVS_RSH separate from its assignment, to work
3303 even with Solaris 10's /bin/sh. Suggestion from Mark D. Baushke.
3305 2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
3307 * NEWS: tail now ignores the -f option if POSIXLY_CORRECT is set,
3308 no file operand is given, and standard input is any FIFO.
3309 This is in response to Open Group XCU ERN 114.
3310 * src/tail.c (main): Likewise.
3312 2006-09-08 Jim Meyering <jim@meyering.net>
3314 mv and "cp -r" no longer fail when invoked with two arguments
3315 where the first one names a directory and the second name ends in
3316 a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
3317 now succeeds, once more. This reverts part of the 2004-06-27
3319 * NEWS: Say the above.
3320 * src/mv.c (target_directory_operand): Don't require (here)
3321 that the target operand "look like" a directory. This change
3322 pushes the test down to the rename syscall level, where a
3323 "mv dir existing-non-dir/" will mistakenly succeed on older systems
3324 that ignore trailing slashes in the rename destination argument.
3325 * src/cp.c (target_directory_operand): Likewise, but for cp.
3326 * tests/mv/trailing-slash: Exercise the above fixes.
3327 * tests/cp/trailing-slash: New file.
3328 * tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
3330 * bootstrap: Use the previously unused variable, $src,
3331 to avoid repeating "$GNULIB_SRCDIR/$file".
3333 * bootstrap (cp_mark_as_generated): Don't use "local", to
3334 accommodate ancient "/bin/sh". Suggested by Ralf Wildenhues.
3335 Rename now-global "$src" and "$dst" to have cp_ prefix.
3336 Safer, and avoids confusion.
3338 * bootstrap (cp_mark_as_generated): New function.
3339 (slurp): Use it to prepend editor hints and a warning that
3340 the file we're copying is generated.
3341 Suggestion from Bruce Korb.
3342 (cp_mark_as_generated): Don't add C-style comments for .l or .y files.
3343 Fix last-minute typo.
3345 2006-09-07 Jim Meyering <jim@meyering.net>
3347 * bootstrap: Revert last change. There are less disruptive ways
3348 to mark these generated files as read-only.
3350 * src/c99-to-c89.diff: Update to have proper offsets.
3352 2006-09-06 Jim Meyering <jim@meyering.net>
3354 Ensure that some gnulib-tool-generated files are read-only.
3355 * bootstrap (slurp): Put the body of this function in a sub-shell,
3356 with "umask a-w" so that all new files are read-only. Remove each
3357 file before we write to it, in case it's read-only.
3358 Make po/Makevars and runtime-po/Makevars read-only, too.
3360 2006-09-05 Jim Meyering <jim@meyering.net>
3362 * tests/cp/acl: Skip this test when cp lacks ACL support.
3363 * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
3365 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
3366 context from change of 2006-09-02.
3368 2006-09-04 Jim Meyering <jim@meyering.net>
3370 * README-cvs: Fix typo in update command.
3372 2006-09-03 Jim Meyering <jim@meyering.net>
3374 * NEWS: Tweak the wording in the new change description so that
3375 no one can think this change causes e.g., `rm -fr foo../' to fail.
3377 * tests/rm/inaccessible: Adjust for movement of config.h to lib/.
3378 Use $CONFIG_HEADER, rather than hard-coding it.
3379 * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
3381 2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
3383 * NEWS: rm now rejects attempts to remove /, ./, and ../.
3384 * src/basename.c: Don't include dirname.h, since system.h does it now.
3385 * src/chmod.c: Likewise.
3386 * src/copy.c: Likewise.
3387 * src/cp.c: Likewise.
3388 * src/df.c: Likewise.
3389 * src/dircolors.c: Likewise.
3390 * src/dirname.c: Likewise.
3391 * src/du.c: Likewise.
3392 * src/install.c: Likewise.
3393 * src/ln.c: Likewise.
3394 * src/ls.c: Likewise.
3395 * src/mkdir.c: Likewise.
3396 * src/mv.c: Likewise.
3397 * src/remove.c: Likewise.
3398 * src/rm.c: Likewise.
3399 * src/rmdir.c: Likewise.
3400 * src/shred.c: Likewise.
3401 * src/split.c: Likewise.
3402 * src/su.c: Likewise.
3403 * src/system.h: Include "dirname.h", since dot_or_dotdot needs it
3405 (dot_or_dotdot): Succeed even if "." or ".." is followed by a
3407 * src/rm.c (usage, main): --preserve-root is now the default.
3408 * src/remove.h: Fix comment.
3409 * src/remove.c (cache_fstatat, cache_stat_init): New functions.
3410 (cache_statted, cache_stat_ok): New functions.
3411 (write_protected_non_symlink): Remove struct stat ** buf_p arg,
3412 which is no longer needed with the new functions. All callers
3414 (prompt, is_dir_lstat, remove_entry, remove_dir):
3415 New struct stat * arg. All callers changed.
3416 (write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
3417 (remove_cwd_entries, remove_dir, rm_1):
3418 Use and maintain the file status cache.
3419 (prompt, remove_entry): Omit the first "directory" in the diagnostic
3420 "Cannot remove directory `foo': is a directory". This causes "rm"
3421 to pass a test case that it would otherwise fail now that it
3422 "knows" more about its argument. I think the diagnostic is better
3423 without the first "directory" anyway.
3424 (prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
3425 (rm_1): Reject attempts to remove /, ./, or ../.
3426 * tests/rm/Makefile.am (TESTS): Add r-4.
3427 * tests/rm/r-4: New file.
3429 2006-09-01 Paul Eggert <eggert@cs.ucla.edu>
3431 * src/stat.c: Include <stddef.h>
3432 (alignof): New macro.
3433 (HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
3435 (STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
3437 (print_statfs): If f_fsid isn't an integer, grab its words one
3438 at a time in little-endian order. This is a bit easier to configure
3439 and should avoid a compilation failure on MacOS reported by Bruno
3442 2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
3444 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
3445 work around a Mac OS X porting problem reported by Bruno Haible in
3446 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
3447 (print_statfs): Use them.
3449 * bootstrap.conf (gnulib_modules): Add isapipe.
3450 * src/tail.c: Include isapipe.h.
3451 (IS_PIPE_LIKE_FILE_TYPE): Remove.
3452 (IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
3453 tailable, since this seems to be portable.
3454 (main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
3455 <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
3457 * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
3460 2006-08-28 Paul Eggert <eggert@cs.ucla.edu>
3462 * src/copy.c (copy_internal): Don't test whether macros like
3463 S_ISLNK are defined, since they're always defined now.
3464 * src/cp.c (main): Likewise.
3465 * src/ln.c (main): Likewise.
3466 * src/ls.c (get_link_name, make_link_name): Likewise.
3467 * src/mknod.c (main): Likewise.
3468 * src/mkfifo.c (usage): Likewise.
3469 * src/who.c (S_IWGRP): Likewise.
3471 Adjust to recent gnulib changes for the gnulib module.
3472 * bootstrap.conf (gnulib_modules): Add fcntl.
3473 * src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
3474 is already assuming these macros are defined.
3475 (O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
3476 (O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
3477 Remove; the fcntl module now handles these.
3479 Adjust to recent gnulib changes for the inttypes module.
3480 * bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
3481 (excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
3483 * src/system.h: Don't bother to include <stdint.h>, since we can
3484 now assume inttypes.h does the equivalent of including stdint.h.
3486 2006-08-27 Jim Meyering <jim@meyering.net>
3488 * src/copy.c (copy_internal): Don't make a backup if the last
3489 component of the source name is "." or "..".
3490 Reported by Andreas Schwab in http://savannah.gnu.org/bugs/?17540.
3491 * NEWS: Mention this.
3492 * tests/cp/src-base-dot: New file. Test for the above fix.
3493 * tests/cp/Makefile.am (TESTS): Add src-base-dot.
3495 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
3496 (dot_or_dotdot): ...new static inline function.
3497 * src/remove.c (rm_1): Reflect this renaming.
3498 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
3500 * src/copy.c (copy_internal): Add comments.
3502 2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
3504 * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
3505 since Automake supplies them for us. It always did -I$(srcdir),
3506 and with the recent change to AC_CONFIG_HEADERS in configure.ac it
3507 is now also doing -I../lib.
3509 * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
3510 Fail if the first "echo" fails. Suppress diagnostics from "ls po/*.po"
3511 since there might not be any .po files.
3512 (WGET_COMMAND): Set to empty if wget doesn't
3513 seem to be available.
3515 2006-08-26 Jim Meyering <jim@meyering.net>
3517 This test was failing in some environments.
3518 * tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
3519 to set LS_COLORS in the environment.
3520 * tests/envvar-check: Instead, ensure that LS_COLORS is not set.
3521 Reported by Bob Proulx.
3523 * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed.
3525 * Makefile.am (EXTRA_DIST): Remove these files here, too:
3526 .x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
3527 .x-sc_two_space_separator_in_usage.
3529 Fix "mv --verbose --backup" so its output includes the
3530 " (backup: foo.~1~)" suffix also when backing up a directory.
3531 * NEWS: Report this bug fix.
3532 * src/copy.c (emit_verbose): New function, factored out of...
3533 (copy_internal): ...here. Use the new function.
3534 * tests/mv/backup-dir: Test for the above fix.
3535 * tests/mv/Makefile.am (TESTS): Add backup-dir.
3537 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
3539 * .x-sc_no_if_have_config_h: Remove; no longer needed.
3540 * .x-sc_prohibit_assert_without_use: Remove; it was empty.
3541 * .x-sc_two_space_separator_in_usage: Likewise.
3542 * Makefile.maint (sc_no_have_config_h): Renamed from
3543 sc_no_if_have_config_h, since it now checks that HAVE_CONFIG_H
3544 is absent everywhere.
3545 * bootstrap.conf (gnulib_modules): Add config-h.
3546 * src/shred.c: Include <config.h> unconditionally, since
3547 we now assume config.h exists.
3548 * src/dircolors.c: Likewise.
3550 2006-08-26 Jim Meyering <jim@meyering.net>
3552 "ls --color" would highlight other-writable and sticky directories
3553 no differently than regular directories on a file system with
3554 dirent.d_type support.
3555 * NEWS: Say the above.
3556 * src/ls.c (gobble_file): With --color, also stat the file when
3557 we know it is a directory.
3558 Derived from an anonymous one-line fix and bug report:
3559 <http://savannah.gnu.org/bugs/?15043>.
3560 * tests/ls/color-dtype-dir: New file. Test for the above fix.
3561 * tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
3563 2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
3565 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
3567 * bootstrap.conf: Add configmake, verify.
3568 * src/.cvsignore: Remove localedir.h.
3569 * src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
3570 subsumed by configmake.
3571 * src/system.h: Include configmake.h rather than localedir.h
3572 (LOCALEDIR): New macro.
3574 Rewrite to avoid some unnecessary casts, macros, literals.
3575 * src/shred.c (DEFAULT_PASSES, VERBOSE_UPDATE): Now constants,
3577 (SECTOR_SIZE, SECTOR_MASK): New constants.
3578 (fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
3579 and use the SECTOR_* constants when applicable. Check for size <
3580 0 rather than size == -1, since negative-size files are a sign of
3583 2006-08-25 Bruno Haible <bruno@clisp.org>
3585 * src/shred.c (dopass): Assume a continuable error if EIO even
3586 if the current position is not a multiple of 512.
3588 2006-08-24 Jim Meyering <jim@meyering.net>
3590 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof".
3592 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
3594 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
3595 macro was being used without being defined.
3596 (SB_F_NAMEMAX): Remove cast.
3597 (f_fsid) [BeOS]: Likewise.
3598 (OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
3600 (out_string, out_int, out_uint, out_uint_o, out_uint_x): New
3602 (xstrcat): Remove. All uses changed to use the above functions.
3603 (print_statfs, print_stat): 2nd arg is now the prefix len, not the
3604 buffer len. All uses changed. Output '?', not '*', for unknown
3605 data or errors. Do not assume signed values can be interchanged
3606 with unsigned when printing.
3607 (print_statfs): For %i, print the fsid as a single int, not as a
3609 (print_it): Quote invalid format better.
3611 * NEWS: printf supports the I flag.
3612 * src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
3614 2006-08-23 Bruno Haible <bruno@clisp.org>
3616 * src/stat.c (STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
3617 (f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
3618 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
3620 * src/ls.c (SA_RESTART): Fallback define.
3622 2006-08-23 Paul Eggert <eggert@cs.ucla.edu>
3624 * src/system.h (EDQUOT): Define if not already defined.
3625 Problem reported by Bruno Haible for BeOS.
3627 * .cvsignore: Remove config.h, config.hin, as they are now
3629 * configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
3631 * src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
3633 * bootstrap (slurp): Define gl_LOCK_EARLY instead of gl_LOCK,
3634 to accommodate today's gnulib change.
3636 2006-08-23 Jim Meyering <jim@meyering.net>
3638 * NEWS: Mention the sweeping infrastructure changes.
3640 2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
3642 * bootstrap.conf (gnulib_modules): Add gnupload.
3643 * Makefile.maint (emit_upload_commands): gnupload is now
3645 * gnupload: Remove from CVS, since it's now a gnulib module.
3647 * bootstrap (bootstrap_conf_cleanup): Remove.
3648 (excluded_files): New var.
3649 * bootstrap.conf: Likewise.
3650 * bootstrap (slurp): Exclude files early if they're in the
3651 excluded_files list. That way, their names don't get put into
3654 * aclocal.m4, config.hin, configure:
3655 Remove from CVS, since ./bootstrap generates them automatically.
3656 * .cvsignore: Add INSTALL, Makefile.in, aclocal.m4, config.hin,
3657 configure, *.cache, *.lineno, *.log.
3658 Remove more-specific entries. This catches files like configure.lineno.
3659 * man/.cvsignore: Add Makefile.in.
3660 * src/.cvsignore: Add Makefile.in.
3661 Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.
3664 * tests/chgrp/.cvsignore:
3665 * tests/chmod/.cvsignore:
3666 * tests/chown/.cvsignore:
3667 * tests/cp/.cvsignore:
3668 * tests/cut/.cvsignore:
3669 * tests/dd/.cvsignore:
3670 * tests/dircolors/.cvsignore:
3671 * tests/du/.cvsignore:
3672 * tests/expr/.cvsignore:
3673 * tests/factor/.cvsignore:
3674 * tests/fmt/.cvsignore:
3675 * tests/head/.cvsignore:
3676 * tests/install/.cvsignore:
3677 * tests/join/.cvsignore:
3678 * tests/ln/.cvsignore:
3679 * tests/ls/.cvsignore:
3680 * tests/ls-2/.cvsignore:
3681 * tests/md5sum/.cvsignore:
3682 * tests/misc/.cvsignore:
3683 * tests/mkdir/.cvsignore:
3684 * tests/mv/.cvsignore:
3685 * tests/od/.cvsignore:
3686 * tests/pr/.cvsignore:
3687 * tests/readlink/.cvsignore:
3688 * tests/rm/.cvsignore:
3689 * tests/rmdir/.cvsignore:
3690 * tests/seq/.cvsignore:
3691 * tests/sha1sum/.cvsignore:
3692 * tests/shred/.cvsignore:
3693 * tests/sort/.cvsignore:
3694 * tests/stty/.cvsignore:
3695 * tests/sum/.cvsignore:
3696 * tests/tac/.cvsignore:
3697 * tests/tail/.cvsignore:
3698 * tests/tail-2/.cvsignore:
3699 * tests/tee/.cvsignore:
3700 * tests/test/.cvsignore:
3701 * tests/touch/.cvsignore:
3702 * tests/tr/.cvsignore:
3703 * tests/tsort/.cvsignore:
3704 * tests/unexpand/.cvsignore:
3705 * tests/uniq/.cvsignore:
3706 * tests/wc/.cvsignore:
3707 Add Makefile.in. Sort entries if necessary. Remove *.I, *.E,
3708 *.X, *.O, *-tests, build-script, mk-script if they're never
3709 created in this directory.
3711 2006-08-22 Bruno Haible <bruno@clisp.org>
3714 * src/uptime.c: Include OS.h if it exists.
3715 (print_uptime): On BeOS, use the get_system_info function (actually a
3716 macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
3717 (uptime): Call read_utmp only if utmp.h or utmpx.h exists.
3719 2006-08-22 Jim Meyering <jim@meyering.net>
3721 * .cvsignore: Add ABOUT-NLS.
3723 Move the check-AUTHORS rule to be run as part of "make distcheck",
3724 rather than "make check".
3725 * src/Makefile.am (check): Don't depend on check-AUTHORS; it would
3726 cause "make check" to fail on systems unable to build all binaries.
3727 * Makefile.maint (check-AUTHORS): New rule.
3728 (local-checks-available): Add it here.
3729 Reported by Bruno Haible. Needed for BeOS.
3731 2006-08-21 Paul Eggert <eggert@cs.ucla.edu>
3733 * src/df.c (print_header, show_dev): Use a column width that
3734 depends on the block size of -P is specified and not autoscaling.
3735 Problem reported by Gustavo G. Rondina in:
3736 http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00164.html
3738 2006-08-21 Jim Meyering <jim@meyering.net>
3740 * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
3741 when the shell variable, SHELL, is not set.
3742 Trigger the failure with "(unset SHELL; make check TESTS=simple)".
3743 Reported by Sven Joachim in <http://bugs.debian.org/355368>.
3745 * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
3746 in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
3747 Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
3748 od: invalid type string `u8';
3749 this system doesn't provide a 8-byte integral type
3750 FIXME: add a test for this, but skip it when sizeof uintmax < 8.
3752 2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
3754 Add a bootstrap procedure, so that the CVS version contains fewer
3755 files and we bootstrap the rest from gnulib, gettext, etc.
3756 * README-cvs: New file.
3757 * bootstrap: New file.
3758 * bootstrap.conf: New file.
3759 * .x-sc_trailing_blank: Remove config-log, .gdb-history. Add .po.
3760 * configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
3762 (gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
3763 (gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
3765 (gl_MACROS): Call just after gl_EARLY, just for clarity.
3766 * src/c99-to-c89.diff: Remove patch to ls.c; no longer needed.
3767 * src/kill.c (strtoimax): Remove decl.
3768 * src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
3769 * src/wc.c: Likewise.
3770 * src/ls.c (sort_files): Rewrite to avoid need for C99-style
3771 declaration, so that we don't need to patch this file.
3772 * src/printf.c (strtoimax, strtoumax): Remove decls.
3773 * src/su.c: Include getpass.h.
3775 * src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
3776 Include inttypes.h unconditionally.
3777 (LONGEST_MODIFIER, PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Remove.
3778 (stpcpy, strndup, strstr, strtoul, mempcpy, CHAR_MIN, CHAR_MAX):
3779 (SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, INT_MAX):
3780 (INT_MIN, INTMAX_MAX, INTMAX_MIN, UINT_MAX, LONG_MAX, ULONG_MAX):
3781 (SIZE_MAX, SSIZE_MAX, UINTMAX_MAX): Remove.
3783 * ABOUT-NLS, INSTALL, Makefile.in, man/Makefile.in:
3784 * src/Makefile.in, tests/Makefile.in, tests/chgrp/Makefile.in:
3785 * tests/chmod/Makefile.in, tests/chown/Makefile.in:
3786 * tests/cp/Makefile.in, tests/cut/Makefile.in:
3787 * tests/dd/Makefile.in, tests/dircolors/Makefile.in:
3788 * tests/du/Makefile.in, tests/expr/Makefile.in:
3789 * tests/factor/Makefile.in, tests/fmt/Makefile.in:
3790 * tests/general/Makefile.in, tests/head/Makefile.in:
3791 * tests/install/Makefile.in, tests/join/Makefile.in:
3792 * tests/ln/Makefile.in, tests/ls/Makefile.in:
3793 * tests/ls-2/Makefile.in, tests/md5sum/Makefile.in:
3794 * tests/misc/Makefile.in, tests/mkdir/Makefile.in:
3795 * tests/mv/Makefile.in, tests/od/Makefile.in:
3796 * tests/pr/Makefile.in, tests/readlink/Makefile.in:
3797 * tests/rm/Makefile.in, tests/rmdir/Makefile.in:
3798 * tests/seq/Makefile.in, tests/sha1sum/Makefile.in:
3799 * tests/shred/Makefile.in, tests/sort/Makefile.in:
3800 * tests/stty/Makefile.in, tests/sum/Makefile.in:
3801 * tests/tac/Makefile.in, tests/tail/Makefile.in:
3802 * tests/tail-2/Makefile.in, tests/tee/Makefile.in:
3803 * tests/test/Makefile.in, tests/touch/Makefile.in:
3804 * tests/tr/Makefile.in, tests/tsort/Makefile.in:
3805 * tests/unexpand/Makefile.in, tests/uniq/Makefile.in:
3806 * tests/wc/Makefile.in:
3807 Remove from CVS, since ./bootstrap generates them automatically.
3809 2006-08-20 Eric Blake <ebb9@byu.net>
3811 * src/stat.c (USE_STATVFS): Reinstate the patch from 2006-08-15;
3812 the patch from 2006-08-18 broke on cygwin.
3814 2006-08-20 Jim Meyering <jim@meyering.net>
3816 * NEWS: Add a line for 6.2-cvs.
3817 * configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
3819 2006-08-19 Jim Meyering <jim@meyering.net>
3822 * NEWS: Record the 6.1 release date.
3823 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
3825 * tests/Makefile.am (EXTRA_DIST): Add sparse-file.
3827 Avoid test failure when `make check' is run through debuild.
3828 * tests/help-version: Ensure that $SHELL is set to some value
3829 and exported. Patch from Sven Joachim. For details, see
3830 <http://bugs.debian.org/355368>.
3832 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix.
3834 * README: Describe potential "pre-C99 build failure", and work-around.
3836 Some of my 2006-07-03 changes to tests/*/Makefile.am were being
3837 backed out due to updates provoked by the copyright changes.
3838 * tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
3839 it propagates to the derived Makefile.am files.
3840 ($(srcdir)/Makefile.am): Mark generated .am files as read-only,
3841 so we don't mistakenly edit them again.
3842 * tests/cut/Makefile.am: Regenerate.
3843 * tests/head/Makefile.am: Likewise.
3844 * tests/join/Makefile.am: Likewise.
3845 * tests/pr/Makefile.am: Likewise.
3846 * tests/sort/Makefile.am: Likewise.
3847 * tests/tac/Makefile.am: Likewise.
3848 * tests/tail/Makefile.am: Likewise.
3849 * tests/test/Makefile.am: Likewise.
3850 * tests/tr/Makefile.am: Likewise.
3851 * tests/uniq/Makefile.am: Likewise.
3852 * tests/wc/Makefile.am: Likewise.
3854 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
3855 when the file's apparent size is not a multiple of its block size.
3856 * src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
3857 For some file sizes, writing that single byte would unnecessarily
3858 waste a few file blocks. That write may have been necessary in the
3859 early days of Linux, but now, removing it should be safe.
3860 Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
3861 * tests/cp/sparse: New test for the above.
3862 * tests/cp/Makefile.am (TESTS): Add sparse.
3864 * tests/sparse-file: New file, essence factored out of...
3865 * tests/du/8gb: ... here. Use the new script.
3867 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3869 * src/system.h (select_plural): Reduce by 1000000, not 1000, since
3870 the CVS gettext manual now suggests 1000000.
3872 2006-08-18 Bruno Haible <bruno@clisp.org>
3874 Add support for NetBSD 3.0.
3875 * src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
3877 (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
3878 has a field f_fstypename.
3879 This undoes the 2006-08-15 to src/stat.c.
3881 2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
3883 Copyright notice fixes.
3885 * COPYING: Upgrade to latest version from FSF.
3887 * src/uname.c: Use (C) in copyright notice.
3889 * .vg-suppressions: Add copyright notice.
3890 * ChangeLog: Likewise.
3891 * ChangeLog-2005: Likewise.
3892 * Makefile.am: Likewise.
3895 * README-valgrind: Likewise.
3897 * announce-gen: Likewise.
3898 * man/Makefile.am: Likewise.
3899 * man/chmod.x: Likewise.
3900 * man/chown.x: Likewise.
3901 * man/df.x: Likewise.
3902 * man/du.x: Likewise.
3903 * man/rm.x: Likewise.
3904 * src/dircolors.hin: Likewise.
3905 * src/du-tests: Likewise.
3906 * src/extract-magic: Likewise.
3907 * src/tac-pipe.c: Likewise.
3908 * src/wheel-gen.pl: Likewise.
3909 * tests/Coreutils.pm: Likewise.
3910 * tests/Makefile.am.in: Likewise.
3911 * tests/acl: Likewise.
3912 * tests/envvar-check: Likewise.
3913 * tests/expensive: Likewise.
3914 * tests/group-names: Likewise.
3915 * tests/help-version: Likewise.
3916 * tests/mk-script: Likewise.
3917 * tests/priv-check: Likewise.
3918 * tests/rwx-to-mode: Likewise.
3919 * tests/sample-test: Likewise.
3920 * tests/setgid-check: Likewise.
3921 * tests/chgrp/basic: Likewise.
3922 * tests/chgrp/deref: Likewise.
3923 * tests/chgrp/no-x: Likewise.
3924 * tests/chgrp/posix-H: Likewise.
3925 * tests/chgrp/recurse: Likewise.
3926 * tests/chmod/c-option: Likewise.
3927 * tests/chmod/equal-x: Likewise.
3928 * tests/chmod/equals: Likewise.
3929 * tests/chmod/no-x: Likewise.
3930 * tests/chmod/octal: Likewise.
3931 * tests/chmod/setgid: Likewise.
3932 * tests/chmod/umask-x: Likewise.
3933 * tests/chmod/usage: Likewise.
3934 * tests/chown/basic: Likewise.
3935 * tests/chown/deref: Likewise.
3936 * tests/chown/separator: Likewise.
3937 * tests/cp/Makefile.am: Likewise.
3938 * tests/cp/acl: Likewise.
3939 * tests/cp/backup-1: Likewise.
3940 * tests/cp/backup-is-src: Likewise.
3941 * tests/cp/cp-HL: Likewise.
3942 * tests/cp/cp-deref: Likewise.
3943 * tests/cp/cp-mv-backup: Likewise.
3944 * tests/cp/cp-parents: Likewise.
3945 * tests/cp/deref-slink: Likewise.
3946 * tests/cp/dir-rm-dest: Likewise.
3947 * tests/cp/dir-slash: Likewise.
3948 * tests/cp/dir-vs-file: Likewise.
3949 * tests/cp/fail-perm: Likewise.
3950 * tests/cp/into-self: Likewise.
3951 * tests/cp/link: Likewise.
3952 * tests/cp/link-no-deref: Likewise.
3953 * tests/cp/link-preserve: Likewise.
3954 * tests/cp/no-deref-link1: Likewise.
3955 * tests/cp/no-deref-link2: Likewise.
3956 * tests/cp/no-deref-link3: Likewise.
3957 * tests/cp/perm: Likewise.
3958 * tests/cp/preserve-2: Likewise.
3959 * tests/cp/r-vs-symlink: Likewise.
3960 * tests/cp/same-file: Likewise.
3961 * tests/cp/slink-2-slink: Likewise.
3962 * tests/cp/special-bits: Likewise.
3963 * tests/cp/symlink-slash: Likewise.
3964 * tests/cut/Makefile.am: Likewise.
3965 * tests/cut/Test.pm: Likewise.
3966 * tests/dd/misc: Likewise.
3967 * tests/dd/not-rewound: Likewise.
3968 * tests/dd/skip-seek: Likewise.
3969 * tests/dd/skip-seek2: Likewise.
3970 * tests/dd/unblock-sync: Likewise.
3971 * tests/dircolors/simple: Likewise.
3972 * tests/du/2g: Likewise.
3973 * tests/du/8gb: Likewise.
3974 * tests/du/Makefile.am: Likewise.
3975 * tests/du/basic: Likewise.
3976 * tests/du/deref: Likewise.
3977 * tests/du/deref-args: Likewise.
3978 * tests/du/exclude: Likewise.
3979 * tests/du/fd-leak: Likewise.
3980 * tests/du/files0-from: Likewise.
3981 * tests/du/hard-link: Likewise.
3982 * tests/du/inaccessible-cwd: Likewise.
3983 * tests/du/long-from-unreadable: Likewise.
3984 * tests/du/long-sloop: Likewise.
3985 * tests/du/no-deref: Likewise.
3986 * tests/du/no-x: Likewise.
3987 * tests/du/restore-wd: Likewise.
3988 * tests/du/slash: Likewise.
3989 * tests/du/slink: Likewise.
3990 * tests/du/trailing-slash: Likewise.
3991 * tests/du/two-args: Likewise.
3992 * tests/expr/basic: Likewise.
3993 * tests/factor/basic: Likewise.
3994 * tests/fmt/basic: Likewise.
3995 * tests/fmt/long-line: Likewise.
3996 * tests/general/Makefile.am: Likewise.
3997 * tests/general/atgeneral.m4: Likewise.
3998 * tests/general/dd.at: Likewise.
3999 * tests/head/Makefile.am: Likewise.
4000 * tests/head/Test.pm: Likewise.
4001 * tests/install/basic-1: Likewise.
4002 * tests/install/create-leading: Likewise.
4003 * tests/install/d-slashdot: Likewise.
4004 * tests/install/trap: Likewise.
4005 * tests/join/Makefile.am: Likewise.
4006 * tests/join/Test.pm: Likewise.
4007 * tests/ln/backup-1: Likewise.
4008 * tests/ln/misc: Likewise.
4009 * tests/ln/sf-1: Likewise.
4010 * tests/ln/target-1: Likewise.
4011 * tests/ls/Makefile.am: Likewise.
4012 * tests/ls/Test.pm: Likewise.
4013 * tests/ls/dangle: Likewise.
4014 * tests/ls/dired: Likewise.
4015 * tests/ls/file-type: Likewise.
4016 * tests/ls/follow-slink: Likewise.
4017 * tests/ls/infloop: Likewise.
4018 * tests/ls/inode: Likewise.
4019 * tests/ls/m-option: Likewise.
4020 * tests/ls/no-arg: Likewise.
4021 * tests/ls/recursive: Likewise.
4022 * tests/ls/rt-1: Likewise.
4023 * tests/ls/stat-dtype: Likewise.
4024 * tests/ls/stat-failed: Likewise.
4025 * tests/ls/stat-vs-dirent: Likewise.
4026 * tests/ls/symlink-slash: Likewise.
4027 * tests/ls/time-1: Likewise.
4028 * tests/ls-2/tests: Likewise.
4029 * tests/md5sum/basic-1: Likewise.
4030 * tests/md5sum/newline-1: Likewise.
4031 * tests/misc/Makefile.am: Likewise.
4032 * tests/misc/base64: Likewise.
4033 * tests/misc/basename: Likewise.
4034 * tests/misc/cat-proc: Likewise.
4035 * tests/misc/close-stdout: Likewise.
4036 * tests/misc/csplit: Likewise.
4037 * tests/misc/date: Likewise.
4038 * tests/misc/date-sec: Likewise.
4039 * tests/misc/df: Likewise.
4040 * tests/misc/dirname: Likewise.
4041 * tests/misc/expand: Likewise.
4042 * tests/misc/false-status: Likewise.
4043 * tests/misc/fold: Likewise.
4044 * tests/misc/head-c: Likewise.
4045 * tests/misc/head-elide-tail: Likewise.
4046 * tests/misc/head-pos: Likewise.
4047 * tests/misc/mknod: Likewise.
4048 * tests/misc/nice: Likewise.
4049 * tests/misc/nl: Likewise.
4050 * tests/misc/nohup: Likewise.
4051 * tests/misc/paste-no-nl: Likewise.
4052 * tests/misc/pathchk1: Likewise.
4053 * tests/misc/printf: Likewise.
4054 * tests/misc/printf-hex: Likewise.
4055 * tests/misc/pwd-long: Likewise.
4056 * tests/misc/sha224sum: Likewise.
4057 * tests/misc/sha256sum: Likewise.
4058 * tests/misc/sha384sum: Likewise.
4059 * tests/misc/sha512sum: Likewise.
4060 * tests/misc/shuf: Likewise.
4061 * tests/misc/sort-merge: Likewise.
4062 * tests/misc/sort-rand: Likewise.
4063 * tests/misc/split-a: Likewise.
4064 * tests/misc/split-fail: Likewise.
4065 * tests/misc/split-l: Likewise.
4066 * tests/misc/stat-fmt: Likewise.
4067 * tests/misc/stat-printf: Likewise.
4068 * tests/misc/tac-continue: Likewise.
4069 * tests/misc/test-diag: Likewise.
4070 * tests/misc/tty-eof: Likewise.
4071 * tests/misc/wc-files0: Likewise.
4072 * tests/misc/wc-files0-from: Likewise.
4073 * tests/mkdir/concurrent-1: Likewise.
4074 * tests/mkdir/p-1: Likewise.
4075 * tests/mkdir/p-2: Likewise.
4076 * tests/mkdir/p-3: Likewise.
4077 * tests/mkdir/p-slashdot: Likewise.
4078 * tests/mkdir/p-thru-slink: Likewise.
4079 * tests/mkdir/parents: Likewise.
4080 * tests/mkdir/perm: Likewise.
4081 * tests/mkdir/special-1: Likewise.
4082 * tests/mkdir/t-slash: Likewise.
4083 * tests/mkdir/writable-under-readonly: Likewise.
4084 * tests/mv/Makefile.am: Likewise.
4085 * tests/mv/acl: Likewise.
4086 * tests/mv/atomic: Likewise.
4087 * tests/mv/backup-is-src: Likewise.
4088 * tests/mv/childproof: Likewise.
4089 * tests/mv/diag: Likewise.
4090 * tests/mv/dir-file: Likewise.
4091 * tests/mv/dir2dir: Likewise.
4092 * tests/mv/dup-source: Likewise.
4093 * tests/mv/force: Likewise.
4094 * tests/mv/hard-2: Likewise.
4095 * tests/mv/hard-3: Likewise.
4096 * tests/mv/hard-4: Likewise.
4097 * tests/mv/hard-link-1: Likewise.
4098 * tests/mv/i-1: Likewise.
4099 * tests/mv/i-2: Likewise.
4100 * tests/mv/i-3: Likewise.
4101 * tests/mv/i-4: Likewise.
4102 * tests/mv/i-link-no: Likewise.
4103 * tests/mv/into-self: Likewise.
4104 * tests/mv/into-self-2: Likewise.
4105 * tests/mv/into-self-3: Likewise.
4106 * tests/mv/into-self-4: Likewise.
4107 * tests/mv/leak-fd: Likewise.
4108 * tests/mv/mv-special-1: Likewise.
4109 * tests/mv/no-target-dir: Likewise.
4110 * tests/mv/part-fail: Likewise.
4111 * tests/mv/part-hardlink: Likewise.
4112 * tests/mv/part-rename: Likewise.
4113 * tests/mv/part-symlink: Likewise.
4114 * tests/mv/partition-perm: Likewise.
4115 * tests/mv/perm-1: Likewise.
4116 * tests/mv/reply-no: Likewise.
4117 * tests/mv/setup: Likewise.
4118 * tests/mv/to-symlink: Likewise.
4119 * tests/mv/trailing-slash: Likewise.
4120 * tests/mv/update: Likewise.
4121 * tests/mv/vfat: Likewise.
4122 * tests/od/od-N: Likewise.
4123 * tests/od/x8: Likewise.
4124 * tests/pr/Makefile.am: Likewise.
4125 * tests/pr/Test.pm: Likewise.
4126 * tests/readlink/can-e: Likewise.
4127 * tests/readlink/can-f: Likewise.
4128 * tests/readlink/can-m: Likewise.
4129 * tests/readlink/rl-1: Likewise.
4130 * tests/rm/Makefile.am: Likewise.
4131 * tests/rm/cycle: Likewise.
4132 * tests/rm/dangling-symlink: Likewise.
4133 * tests/rm/deep-1: Likewise.
4134 * tests/rm/dir-no-w: Likewise.
4135 * tests/rm/dir-nonrecur: Likewise.
4136 * tests/rm/dot-rel: Likewise.
4137 * tests/rm/empty-inacc: Likewise.
4138 * tests/rm/empty-name: Likewise.
4139 * tests/rm/f-1: Likewise.
4140 * tests/rm/fail-2eperm: Likewise.
4141 * tests/rm/fail-eperm: Likewise.
4142 * tests/rm/hash: Likewise.
4143 * tests/rm/i-1: Likewise.
4144 * tests/rm/i-no-r: Likewise.
4145 * tests/rm/inaccessible: Likewise.
4146 * tests/rm/interactive-always: Likewise.
4147 * tests/rm/interactive-once: Likewise.
4148 * tests/rm/ir-1: Likewise.
4149 * tests/rm/isatty: Likewise.
4150 * tests/rm/no-give-up: Likewise.
4151 * tests/rm/r-1: Likewise.
4152 * tests/rm/r-2: Likewise.
4153 * tests/rm/r-3: Likewise.
4154 * tests/rm/rm1: Likewise.
4155 * tests/rm/rm2: Likewise.
4156 * tests/rm/rm3: Likewise.
4157 * tests/rm/rm4: Likewise.
4158 * tests/rm/rm5: Likewise.
4159 * tests/rm/sunos-1: Likewise.
4160 * tests/rm/unread2: Likewise.
4161 * tests/rm/unread3: Likewise.
4162 * tests/rm/unreadable: Likewise.
4163 * tests/rmdir/fail-perm: Likewise.
4164 * tests/rmdir/ignore: Likewise.
4165 * tests/rmdir/t-slash: Likewise.
4166 * tests/seq/basic: Likewise.
4167 * tests/sha1sum/basic-1: Likewise.
4168 * tests/sha1sum/sample-vec: Likewise.
4169 * tests/shred/exact: Likewise.
4170 * tests/shred/remove: Likewise.
4171 * tests/sort/Makefile.am: Likewise.
4172 * tests/sort/Test.pm: Likewise.
4173 * tests/sort-time/Makefile: Likewise.
4174 * tests/sort-time/README: Likewise.
4175 * tests/sort-time/rand-gen: Likewise.
4176 * tests/stty/basic-1: Likewise.
4177 * tests/stty/row-col-1: Likewise.
4178 * tests/sum/basic-1: Likewise.
4179 * tests/sum/sysv: Likewise.
4180 * tests/tac/Makefile.am: Likewise.
4181 * tests/tac/Test.pm: Likewise.
4182 * tests/tail/Makefile.am: Likewise.
4183 * tests/tail/Test.pm: Likewise.
4184 * tests/tail-2/Makefile.am: Likewise.
4185 * tests/tail-2/append-only: Likewise.
4186 * tests/tail-2/assert: Likewise.
4187 * tests/tail-2/assert-2: Likewise.
4188 * tests/tail-2/big-4gb: Likewise.
4189 * tests/tail-2/fflush: Likewise.
4190 * tests/tail-2/infloop-1: Likewise.
4191 * tests/tail-2/proc-ksyms: Likewise.
4192 * tests/tail-2/start-middle: Likewise.
4193 * tests/tail-2/tail-n0f: Likewise.
4194 * tests/tee/basic: Likewise.
4195 * tests/tee/dash: Likewise.
4196 * tests/test/Makefile.am: Likewise.
4197 * tests/test/Test.pm: Likewise.
4198 * tests/touch/Makefile.am: Likewise.
4199 * tests/touch/dangling-symlink: Likewise.
4200 * tests/touch/empty-file: Likewise.
4201 * tests/touch/fail-diag: Likewise.
4202 * tests/touch/fifo: Likewise.
4203 * tests/touch/no-create-missing: Likewise.
4204 * tests/touch/no-rights: Likewise.
4205 * tests/touch/not-owner: Likewise.
4206 * tests/touch/obsolescent: Likewise.
4207 * tests/touch/read-only: Likewise.
4208 * tests/touch/relative: Likewise.
4209 * tests/tr/Makefile.am: Likewise.
4210 * tests/tr/Test.pm: Likewise.
4211 * tests/tr/failures: Likewise.
4212 * tests/tsort/basic-1: Likewise.
4213 * tests/unexpand/basic-1: Likewise.
4214 * tests/uniq/Makefile.am: Likewise.
4215 * tests/uniq/Test.pm: Likewise.
4216 * tests/wc/Makefile.am: Likewise.
4217 * tests/wc/Test.pm: Likewise.
4219 2006-08-17 Jim Meyering <jim@meyering.net>
4221 ls -CF would misalign columns in some cases.
4222 * src/ls.c (get_type_indicator): New function. extracted from...
4223 (print_type_indicator): ...here. Use it.
4224 (length_of_file_name_and_frills): Use it here, too, rather than
4225 assuming stat.st_mode is valid.
4226 Reported by Andreas Schwab, here:
4227 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
4228 See the test for this above. FYI, I did ls -CF /proc and visually
4229 inspected the result.
4231 * src/copy.c (copy_internal, same_file_ok): Adjust comments not
4232 to mention the now-removed cp_options.xstat member.
4234 * Makefile.maint (patch-check): Adapt to work now that the patch
4235 modifies more than one file in src/.
4237 With this patch, permit building with Solaris cc on Solaris 7.
4238 * src/c99-to-c89.diff: Add diffs to convert more c99-isms.
4239 This integrates patches from Bruno Haible.
4241 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
4243 Fix some problems reported by Bruno Haible.
4244 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
4245 Skip this test if "chmod g+s d" silently does nothing.
4246 * tests/ls-2/tests: Skip this test suite if we can't set up files
4247 properly for the setuid-etc test. This simplifies some of the
4248 hacks we were using to work around porting problems.
4250 2006-08-16 Jim Meyering <jim@meyering.net>
4252 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
4253 * tests/cp/acl: Instead, skip the test if either setfacl
4255 Reported by Michael Stone.
4257 2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
4259 * tests/lang-default (LC_ALL): Set to "C", so we get
4260 English-language diagnostics. Unset the other variables; it
4261 should be portable to use 'unset' for this stuff nowadays.
4262 Problem reported by Bruno Haible. Using "C" reverses the
4263 2000-10-22 change to fileutils in this area.
4265 Fix bugs when printing plurals of numbers that are not
4266 unsigned long int values.
4267 * src/system.h (select_plural): New function.
4268 * src/md5sum.c (digest_check): Use select_plural to avoid bug.
4269 * src/uptime.c (print_uptime): Likewise.
4270 * src/dd.c (print_stats): Likewise. Also, don't use ngettext to
4271 print a floating point number, as reducing to 0 or 1 doesn't work
4272 for some languages. Instead, just use "s" for seconds since it
4273 doesn't need a plural form.
4275 2006-08-16 Bruno Haible <bruno@clisp.org>
4277 Old versions of gzip would write --help output to stderr, and it
4278 would be annoying to see that in the output of every "make" command.
4279 * Makefile.maint (gzip_rsyncable): Throw away stderr output of
4282 2006-08-16 Andreas Schwab <schwab@suse.de>
4284 * tests/cp/acl: Don't use non-portable == operator for test.
4286 2006-08-16 Jim Meyering <jim@meyering.net>
4288 * tests/ls/stat-dtype: Use stat to test file system type, rather
4289 than df -T, in case /etc/mtab lies. Reported by Michael Stone.
4291 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
4293 * NEWS: Mention that df exits with nonzero status if it generates
4294 no output. This change was in 6.0 but inadvertently unmentioned.
4295 * src/df.c (file_systems_processed): Renamed from n_valid_args, and now
4297 (show_dev): Don't set it until we actually output something.
4298 Print the header if this is the first output.
4299 (main): Don't print a header, as that is now show_dev's job.
4300 * tests/misc/Makefile.am (TESTS): Add df.
4301 * tests/misc/df: New file.
4303 2006-08-15 Eric Blake <ebb9@byu.net>
4305 * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
4306 statvfs.f_type not present. See
4307 <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16325>.
4309 2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
4311 * src/dd.c (print_stats): Don't substitute "1" for number, as this
4312 causes confusion for the Hungarian translators. Problem reported
4313 by Egmont Koblinger here:
4314 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7726
4316 2006-08-15 Jim Meyering <jim@meyering.net>
4318 * .x-sc_require_config_h: Add lib/at-func.c.
4320 * NEWS: Add a line for 6.1-cvs.
4321 * configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
4323 2006-08-15 Jim Meyering <jim@meyering.net>
4326 * NEWS: Record the 6.0 release date.
4327 * configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
4329 * TODO: Add an item (convert to use gnulib-tool), add to the plan
4330 for id-vs-getgrouplist, and remove a few completed items.
4332 * Makefile.maint (alpha beta major): Fix syntax error.
4334 2006-08-13 Jim Meyering <jim@meyering.net>
4336 * src/shred.c (usage): Don't indent the second line of an item.
4337 Otherwise, help2man would misformat the output.
4338 Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
4340 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
4342 * configure.ac (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros.
4343 Suggested by Eric Blake to avoid problems like
4344 <http://lists.gnu.org/archive/html/bug-coreutils/2006-07/msg00087.html>.
4346 2006-08-11 Jim Meyering <jim@meyering.net>
4348 * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
4349 failure that this test checks for (stat/dirent inode mismatch at
4350 a mount point), so continue to give a diagnostic about the failure,
4351 but don't actually count it as a failure.
4353 2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
4355 * ABOUT-NLS: Update from gettext 0.15.
4356 * configure.ac (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15.
4358 * src/csplit.c (struct control): Remove fastmap member.
4359 (extract_regexp): Allocate fastmap separately, since otherwise
4360 it might move due to a realloc. This fixes a bug that led
4361 to a core dump on 64-bit sparc Solaris 10 (Sun Studio 10).
4363 2006-08-10 Jim Meyering <jim@meyering.net>
4365 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
4366 reports "Linux". This avoids a failure on Solaris 10's tmpfs.
4367 Redirect both stdout and stderr of df invocations.
4369 * src/dircolors.hin: Add a TERM directive for each of the following:
4370 ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
4371 rxvt-cygwin-native, screen.linux, xterm-256color.
4372 Sort the TERM directives.
4373 From Mike Frysinger.
4375 2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
4377 * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
4378 See Debian bug 373736.
4380 * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
4383 * src/.cvsignore: Add shuf.
4385 * Makefile.maint: Remove the po-update procedure; it doesn't
4386 work with the new repository on http://www.iro.umontreal.ca/.
4387 For now I guess we'll have to fix things by hand.
4388 (do-po-update, po-update): Remove. All references removed.
4390 * src/shuf.c (next_line): New function.
4391 (read_input): Use it, to avoid relying on GCC-specific behavior
4392 with void * arithmetic. Problem reported by Bob Proulx.
4393 * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
4394 to detect this sort of problem automatically in the future.
4396 2006-08-09 Jim Meyering <jim@meyering.net>
4398 * src/ls.c: Add a compile-time check to ensure that filetype
4399 and filetype_letter have the same number of elements.
4401 * tests/misc/sort-rand: Remove use of --seed=S.
4403 2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
4405 Add a command 'shuf', and modify shred and sort to use the new
4406 random number generator library of 'shuf'.
4408 * AUTHORS: Add shuf.
4410 * NEWS: Likewise. Mention new --random-source option for shred
4411 and sort. Move "sort +1 -2" notice to the appropriate section,
4412 and clarify its role with respect to POSIXLY_CORRECT.
4413 * man/.cvsignore: Add shuf.1.
4414 * man/Makefile.am (dist_man_MANS): Add shuf.1.
4415 (shuf.1): New dependency.
4416 * man/shuf.x: New file.
4417 * src/Makefile.am (bin_PROGRAMS): Add shuf.
4418 (EXTRA_DIST): Remove rand-isaac.c.
4419 (shuf_LDADD): New macro.
4420 * src/rand-isaac.c: Remove, moving most of its contents to
4422 * src/shuf.c: New file.
4423 * src/shred.c: Use new random-number interface rather than rand-isaac.c.
4424 Don't include rand-isaac.c; include randint.h and randread.h instead.
4425 (RANDOM_SOURCE_OPTION): New enum.
4426 (long_opts, usage, main): New option --random-source.
4427 * src/sort.c: Likewise.
4428 * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
4429 All callers changed to use randint interface.
4430 (fillrand): Remove. All callers changed to use randread interface.
4431 (dopass): Remove dependency on ISAAC buffer size.
4432 (genpattern): Don't wipe the random state here.
4433 (randint_source): New static var.
4434 (clear_random_data): New function.
4435 (main): Allocate random source, and arrange to wipe it on exit.
4436 * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
4437 (longopts, usage, main): Remove undocumented --seed option;
4438 it's now replaced by --random-source.
4439 (rand_state, get_hash): Remove.
4440 (randread_source): New static var.
4441 (random_state, cmp_hashes, compare_random): New functions; they guarantee
4442 no collisions in the random hash function.
4443 (keycompare): Use compare_random for -R; don't fall back on comparing
4444 via memcoll, since compare_random does the right thing.
4445 * tests/misc/Makefile.am (TESTS): Add shuf.
4446 * tests/misc/shuf: New file.
4448 2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
4450 * src/copy.c (set_author): Preserve the st_author field via the
4451 file descriptor dest_desc.
4453 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
4455 * NEWS: chmod now preserves setuid and setgid bits on directories
4456 if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
4458 Fix test case problems if working directory is setgid,
4459 reported by Bob Proulx.
4460 * tests/cp/fail-perm: Use symbolic mode so that we clear
4461 setgid bit more reliably on directories.
4462 * tests/mkdir/special-1 (set_mode_string): Likewise.
4464 2006-07-27 Jim Meyering <jim@meyering.net>
4466 * src/chgrp.c (usage): Use correct grammar in description of the
4468 * src/chown.c (usage): Likewise.
4470 2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
4472 * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
4473 Correctly access SRC_SB's element ST_AUTHOR.
4475 2006-07-26 Jim Meyering <jim@meyering.net>
4477 * tests/ls/stat-failed: Adapt to match new expected output.
4480 * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
4481 than having the code test for all of the other types first.
4482 Hoist the set-uid/gid-testing code "up" into this new block.
4483 Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
4484 C_ORPHAN, not as C_FILE.
4486 2006-07-26 Jim Meyering <jim@meyering.net>
4488 Checking in a change from Paul.
4490 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
4492 * src/ls.c (DT_INIT): Remove. All uses removed.
4493 (enum filetype): Use an ordinary enum rather than trying to keep
4494 the values in sync with DT_FIFO etc. That way, we don't have
4495 to make special assumptions about them. All uses changed.
4496 (whiteout): New constant member of enum filetype.
4497 (filetype_letter): New constant, for use with enum filetype.
4498 (FILETYPE_INDICATORS): New initializer list.
4499 (print_dir): Add case for DT_WHT.
4500 (gobble_file): If stat fails, don't discard information from
4501 readdir; instead, preserve it so it can be printed.
4502 (print_long_format): Fall back on readdir result if stat info
4503 is not available. Use "?" to denote each unknown mode char,
4504 instead of an overall "?", since we now know some of the mode
4506 (print_type_indicator): Now that MODE isn't necessarily
4507 useful, guard all uses.
4508 Now that two blocks in the type-checking tree can set "type = C_FILE",
4509 move the suffix-handling code out and down.
4511 2006-07-26 Jim Meyering <jim@meyering.net>
4513 Prepare for the above change.
4514 * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
4515 and adjust uses. From a patch by Paul Eggert.
4517 2006-07-26 Jim Meyering <jim@meyering.net>
4519 * src/ls.c: Correct indentation/formatting in a few places.
4521 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
4523 * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
4524 Problem report and fix from Bob Proulx.
4525 * NEWS: Clarify the "chmod 0500" news, and correct the vague
4526 statements about compatibility with BSD.
4528 2006-07-25 Jim Meyering <jim@meyering.net>
4530 * src/ls.c (gobble_file): When handling a stat-failed entry,
4531 print the entry name not the absolute_name -- to be consistent
4532 with the usual case.
4533 * tests/ls/stat-failed: Update accordingly.
4535 * src/ls.c: Add parens around the new uses of ?: ternary operator.
4537 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
4540 Get --dired offsets right when handling stat-failed entries.
4541 * src/ls.c (print_long_format): Be careful to increment P by the
4542 appropriate amount, even when inode_number_width and nlink_width
4544 * tests/ls/stat-failed: Test for the above.
4546 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
4547 have_acl member. That would happen for a directory with both a
4548 non-stat'able entry and one with an ACL.
4550 * src/ls.c (gobble_file): Make it so failure to stat a
4551 non-command-line file provokes an exit status of 1, not 0.
4552 Say "cannot access" rather than "cannot stat".
4553 * tests/ls/stat-failed: New file/test, for the above.
4554 * tests/ls/Makefile.am (TESTS): Add stat-failed.
4555 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
4556 of "cannot access " to diagnostic.
4558 * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
4560 * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
4561 Replace all occurrences of "type == command_line" with the
4562 equivalent, "command_line_arg".
4564 * src/ls.c: Apply the stat-failed parts of Red Hat's
4565 coreutils-selinux.patch. From Ulrich Drepper.
4566 This makes it so files not mentioned on the command line (e.g.,
4567 names read from a directory that *is* mentioned on the command
4568 line) for which stat fails are still listed. With --color,
4569 such files are colored just like ORPHANs (aka dangling symlinks).
4571 * src/df.c (n_valid_args): Declare global to be static.
4573 2006-07-24 Jim Meyering <jim@meyering.net>
4575 * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
4576 system lacks d_type support.
4578 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
4580 * man/chmod.x: Update to reflect recent changes to coreutils.texi.
4582 2006-07-21 Jim Meyering <jim@meyering.net>
4584 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
4585 Reported by Tim Waugh.
4586 Also remove the comment duplicating much of --help output.
4588 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
4589 name so the list remains alphabetized.
4591 Fix another bug: ls --indicator-style=file-type would call
4592 stat for a symlink, even though it wasn't always needed.
4593 In some cases, that unnecessary stat would cause ls to fail.
4594 * src/ls.c (gobble_file): Don't treat symlinks specially (in
4595 requiring a stat syscall). Remove the offending exclusion.
4597 * NEWS: Mention the fix.
4599 * tests/ls/stat-dtype: New file/test, for the above fix.
4600 Also exercises the new df feature, below.
4602 * src/df.c (main): Fail and don't print the headers if no
4603 file system is processed. This makes it easy to test whether
4604 a specified directory is on a file system of a given type or types.
4605 Otherwise, applications would have had to parse df's output.
4606 E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
4608 Fix a bug: ls --file-type worked like --indicator-style=slash,
4609 rather than like --indicator-style=file-type.
4610 * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
4611 (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
4613 (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
4614 * NEWS: Mention the fix.
4615 * tests/ls-2/tests (file-type): New test, for the above fix.
4617 2006-07-19 Jim Meyering <jim@meyering.net>
4619 * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
4621 * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
4623 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
4625 * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
4626 of directories alone unless you specify them explicitly.
4627 install and mkdir now implement X correctly.
4628 install now creates parent directories with mode 755, without
4629 changing their owner or group.
4630 * src/chmod.c (process_file): Adjust to mode_adjust API change.
4631 * src/install.c: Include mkancesdirs.h.
4632 (announce_mkdir, make_ancestor): New functions.
4633 (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
4635 (dir_mode, dir_mode_bits): New vars.
4636 (main): Set dir modes separately from nondir, so that the X
4637 op of -m works correctly.
4638 (main): Remove cwd_errno cruft, since make_dir_parents no longer
4639 affects cwd. Adjust to new make_dir_parents API.
4640 (install_file_in_file_parents): 2nd arg is now char *, not char
4641 const *. Use mkancesdirs instead of rolling our own code.
4642 (change_attributes): Don't worry about AFS, since that kludge
4643 should not be needed any more.
4644 * src/mkdir.c (struct mkdir_options): New struct.
4645 (announce_mkdir, make_ancestor): New functions.
4646 (main): Use them. Adjust to mode_adjust API change. Stick with
4647 umask 0. Use make_dir_parents for all the work.
4648 * src/mkfifo.c (main): Adjust to new mode_adjust API.
4649 * src/mknod.c (main): Likewise.
4650 * tests/chmod/setgid: Do the setgid test instead of bailing.
4651 * tests/mkdir/p-3: Remove re_protect case that no longer applies.
4652 GNU chmod now behaves like other versions of chmod.
4653 * tests/mkdir/perm: Add a test for the X bug.
4655 2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
4657 * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
4658 This doesn't fix any bugs, since OUT always equals stdout, but it
4659 makes the code easier to understand.
4661 2006-07-14 Jim Meyering <jim@meyering.net>
4663 * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
4664 rather than open-coding it. Now supports mercurial, too.
4665 * .hgignore: New file.
4666 * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
4667 all generated files, including ones like configure and po/*.po
4668 that are currently version-controlled in cvs.
4670 * Makefile.am (EXTRA_DIST): Add a few more .??* files.
4671 They've been in CVS, just haven't been distributed before this.
4672 Distribute ChangeLog-2005, too.
4673 (MAINTAINERCLEANFILES): Add THANKS-to-translators.
4675 2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
4677 * src/system.h: Assume <dirent.h> exists, since gnulib assumes
4680 2006-07-09 Jim Meyering <jim@meyering.net>
4682 * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
4683 That happens with Linux/tmpfs.
4684 * tests/mv/Makefile.am (TESTS): Add dir2dir.
4686 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4688 Adjust to recent updates from gnulib.
4689 * src/dd.c (apply_translations): Use toupper rather than
4690 islower followed by toupper; it's simpler and typically
4691 faster now that we assume at least C89 semantics. Similarly
4693 * src/sort.c (inittables): Likewise.
4694 * src/expand.c (expand): Don't assume that isprint etc. return
4695 booleans (needed for pre-C99 hosts).
4696 * src/fmt.c (check_punctuation): Likewise.
4697 * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
4698 * src/tr.c (is_char_class_member): Likewise.
4699 * src/unexpand.c (unexpand): Likewise.
4700 * src/join.c (is_blank): Remove; no longer needed. All uses
4701 replaced by isblank (to_uchar (...)).
4702 * src/pinky.c (create_fullname): Don't assume char is unsigned.
4703 * src/printf.c (print_esc): Likewise.
4704 * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
4705 (copy_unescaped_string): Likewise.
4706 * src/stat.c (print_it): Likewise.
4707 * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
4708 convenience on GNU systems. All uses changed. Don't bother
4709 looking for any dirent.h substitute other than ndir.h.
4710 (D_INO): Remove unnecessary parentheses.
4711 (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
4712 (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
4713 (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
4714 to ctype.h equivalents.
4715 (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
4718 2006-07-08 Jim Meyering <jim@meyering.net>
4720 * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
4722 * Makefile.maint (sc_the_the): New rule.
4724 * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
4725 * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
4728 2006-07-07 Jim Meyering <jim@meyering.net>
4730 * NEWS: Mention that mv can now remove an empty destination directory,
4731 and give an example. Prompted by a report from Florent Bayle.
4733 2006-07-05 Jim Meyering <jim@meyering.net>
4735 * src/ls.c (usage): Correct the description of -G: it is useful
4736 only in a long listing. Reported by Martin Pool in
4737 <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
4739 * man/chmod.x: Correct the description of the sticky bit. Reported
4740 by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
4742 * src/copy.c (copy_internal): Don't work around old NFS clients like
4743 SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
4744 ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
4745 a banal failure as a recursive move-into-self failure.
4746 Reported by Florent Bayle in <http://bugs.debian.org/376749>.
4748 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
4750 2006-07-03 Jim Meyering <jim@meyering.net>
4752 Plug another unusual leak.
4753 (AD_mark_helper): Free malloc'd filename if hash_insert says
4754 that string is already in the hash table.
4756 The dev/inode of the topmost directory in each hierarchy were not
4758 * src/remove.c (remove_cwd_entries): Don't call cycle_check here.
4759 (AD_push): Call it from here instead.
4761 Fix two small leaks.
4762 * src/remove.c (AD_stack_clear): New function.
4764 (AD_pop_and_chdir): Free *prev_dir just before longjmp.
4766 * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
4767 Add $VG_PATH_PREFIX as a prefix to $PATH
4769 * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
4770 * tests/Makefile.am (evar-check): Remove rule.
4771 (EXTRA_DIST): Remove .env-warn.
4772 * tests/.env-warn: Remove file. No longer used.
4773 Suggestion from Eric Blake.
4775 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
4777 * src/system.h: Include <stdint.h> unconditionally, since we
4778 now assume the stdint module.
4780 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
4782 * NEWS: With no operand, 'tail -f' now silently ignores the '-f'
4783 only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
4784 * src/tail.c (main): Implement this.
4785 * tests/tail/Test.pm (f-pipe-1): Renamed from f-1.
4786 (test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
4788 2006-07-01 Jim Meyering <jim@meyering.net>
4790 * src/ln.c (do_link): Use new, shorter URL, for ag-review link.
4792 * .x-sc_require_config_h: Add ^lib/xstrtold\.c$, so make distcheck
4795 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
4797 * NEWS: seq now uses long double internally rather than double.
4798 It now defaults to a minimal fixed point format if possible.
4799 It lets you use %a, %A, %E, %F, %G.
4800 * src/Makefile.am (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB).
4801 * src/seq.c: Don't include <math.h> or <xstrtol.h>; no longer needed.
4802 (isfinite) [!defined isfinite]: New macro.
4803 (separator, terminator): Now points to const.
4804 (first, step, last): Remove.
4805 (usage): Update to match new behavior.
4806 (struct operand, operand): New type.
4807 (scan_arg): Renamed from scan_double_arg, since we no longer use double.
4809 Compute and return a value of type operand, not double.
4810 (long_double_format): Renamed from valid_format, and now returns a
4811 new format with an "L" added if needed, if the original format was
4812 valid. Allow %a, %A, %E, %F, and %G formats.
4813 (print_numbers): Take numeric values as args rather than from globals.
4814 Print long double, not double.
4815 (get_width_format): Remove.
4816 (get_default_format): New function.
4817 (main): Implement new way of calculating default format.
4818 Don't worry about locale's representation of the decimal point, since
4819 the arguments are always processed in the C locale.
4820 * tests/seq/basic (neg-2): Adjust to new default format.
4821 (eq-wid-1, eq-wid-2): Resurrect these tests, since the new
4822 implementation should do the right thing.
4824 2006-06-30 Jim Meyering <jim@meyering.net>
4826 * tests/stty/basic-1: Work around an intermittent test failure
4827 on HP-UX 11.11. Report and analysis from Bob Proulx.
4828 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
4830 2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
4832 * NEWS: Support obsolete usages like "sort +1 -2" even when
4833 conforming to POSIX 1003.1-2001, since this is a pure extension to
4834 POSIX. Problem reported by Christian in:
4835 http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00220.html
4836 * src/sort.c (main): Implement this.
4838 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir.
4839 Autoconf 2.60 says this stuff was obsolete.
4841 2006-06-28 Jim Meyering <jim@meyering.net>
4843 * src/c99-to-c89.diff: Regenerate, to remove fuzz.
4845 2006-06-28 Bob Proulx <bob@proulx.com> (tiny change)
4847 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
4848 (set -x when VERBOSE=yes) when stderr is redirected before stdout
4849 causing shell tracing of the stdout redirection to be written to
4850 the stderr file. Avoid problem and test failure on HP-UX by
4851 redirecting stderr last.
4852 * tests/dd/unblock-sync: Order shell file redirections for
4853 stderr and stdout in the common style.
4854 tests/acl: Likewise.
4856 2006-06-27 Jim Meyering <jim@meyering.net>
4858 * tests/misc/cat-proc: Try to avoid any spurious numeric
4859 differences in frequently-changing /proc/cpuinfo.
4860 Reported by Nelson Beebe.
4862 2006-06-26 Jim Meyering <jim@meyering.net>
4864 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
4865 fd_to_subdirp failure, not just when errno == EACCES.
4866 * src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
4867 rmdir, here, even though rmdir may happen to be adequate.
4869 * NEWS: rm no longer fails to remove an empty, unreadable directory
4870 * src/remove.c (remove_cwd_entries): If we can't open a directory,
4871 and the failure is not being ignored, try to remove the directory
4872 with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
4873 Problem report and test case from Paul Eggert in
4874 <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
4876 * tests/rm/empty-inacc: New test, for the above.
4878 Avoid a segfault for wc --files0=- < /dev/null.
4879 * src/wc.c (compute_number_width): Return right away if nfiles == 0.
4881 2006-06-25 Jim Meyering <jim@meyering.net>
4883 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
4884 contains a list of NUL-separated file names.
4886 * src/wc.c: Include "readtokens.h".
4887 (usage): Describe the new option, and adjust the `Usage':
4888 with this option, no FILE may be specified on the command line.
4889 (main): Handle the new option.
4890 * tests/misc/wc-files0: New tests, for the above.
4891 * tests/misc/wc-files0-from: Likewise.
4892 * tests/misc/Makefile.am (TESTS): Add wc-files0.
4894 2006-06-24 Jim Meyering <jim@meyering.net>
4896 * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions.
4898 2006-06-22 Jim Meyering <jim@meyering.net>
4900 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
4901 the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
4903 2006-06-19 Jim Meyering <jim@meyering.net>
4905 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
4906 so this check is not run as part of "make distcheck".
4908 2006-06-18 Bob Proulx <bob@proulx.com> (tiny change)
4910 * tests/misc/pwd-long: Fix typo (s/neq/ne/) in previous change.
4912 2006-06-18 Jim Meyering <jim@meyering.net>
4914 * tests/misc/pwd-long: Make error output a little clearer.
4916 2006-06-17 Jim Meyering <jim@meyering.net>
4918 * tests/rm/inaccessible: Skip this test on systems without openat
4919 support. Reported by Bob Proulx.
4921 2006-06-15 Bob Proulx <bob@proulx.com> (tiny change)
4923 * tests/misc/mknod: Improve permission checks to handle
4924 running mkdir test in set-gid directories.
4926 2006-06-14 Jim Meyering <jim@meyering.net>
4928 * tests/du/basic: Revamp not to hard-code file system block sizes.
4930 2006-06-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4932 * tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for
4935 2006-06-11 Jim Meyering <jim@meyering.net>
4937 * .gitignore: New file.
4938 * Makefile.am (EXTRA_DIST): Add .gitignore.
4940 Setting TIME_STYLE=long-iso in the environment would make the
4941 cp/same-file test fail.
4942 * tests/envvar-check (vars): Add TIME_STYLE to the list.
4943 * tests/cp/same-file: Revert last change.
4944 Source the envvar-check script, to ensure that TIME_STYLE
4945 settings don't affect these tests.
4947 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4949 * tests/cp/same-file: Execute 'ls' in the C locale, so that it
4950 uses POSIX time stamp formats. Problem reported by John Nixon in
4951 <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
4953 2006-06-10 Jim Meyering <jim@meyering.net>
4955 * NEWS: Mention the AIX-strndup-bug vs. dircolors workaround.
4957 Require a "Version N.M" line at the top of the ChangeLog
4958 file only when making the actual release, not when running
4960 * Makefile.maint (maintainer-distcheck): Don't depend on
4962 (alpha beta major): Depend on it here, instead.
4964 2006-06-08 Jim Meyering <jim@meyering.net>
4966 Ensure that cat works with any of the options, -A -v -e -E -T,
4967 when applied to files in /proc and /sys, even when the FIONREAD
4968 ioctl produces nonsensical results. Before this change, cat would
4969 produce no output (or truncated output), for some linux kernels.
4971 * src/cat.c (write_pending): New function, factored out of cat.
4972 (cat): Also interpret a negative ioctl/FIONREAD count as indicating
4973 that there are bytes to read. Some versions of linux-2.6.16 do that.
4974 Write any pending output before returning.
4975 Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
4976 * NEWS: Mention this bug fix.
4977 * tests/misc/cat-proc: New file. Test for the above.
4978 * tests/misc/Makefile.am (TESTS): Add cat-proc.
4980 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4982 * src/expr.c (eval4): Detect overflow properly when multiplying
4985 2006-06-06 Paul Eggert <eggert@cs.ucla.edu>
4987 * NEWS: The 'expr' command now detects and reports integer overflow.
4988 (It would be better to use extended precision instead, but that
4989 would be more work.)
4990 * src/expr.c (integer_overflow): New function.
4991 (eval4, eval3): Check for integer overflow.
4993 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4995 Fix problems when building with Solaris/SVR4/etc. make, which uses a
4996 different and somewhat bogus implementation of VPATH. In the
4997 directory tests/misc, rename tests whose names might appear in the
4998 Automake-generated rules. For example, we can't use a test named
4999 'test', since Automake generates a rule that contains the text
5000 "if test -f ./$$tst; ...", and this might expand to something like
5001 "if ../../../coreutils-6.0/tests/misc/test -f ./$$test; ...",
5002 which executes the 'test' script rather than the 'test' command.
5003 * tests/misc/false-status: Renamed from tests/misc/false.
5004 * tests/misc/pwd-long: Renamed from tests/misc/pwd.
5005 * tests/misc/sort-merge: Renamed from tests/misc/sort.
5006 ($prog): Set to 'sort' rather than to $PROG.
5007 * tests/misc/test-diag: Renamed from tests/misc/test.
5008 * tests/misc/Makefile.am (PROG): Take the basename of $$tst,
5009 in case Solaris make has prepended the directory.
5010 (TESTS): Adjust to above renamings.
5011 * tests/misc/expand: Don't assign to PROG; no longer needed
5012 now that Makefile.am sets PROG to the basename.
5013 * tests/misc/fold: Likewise.
5015 2006-06-03 Jim Meyering <jim@meyering.net>
5017 Make `cp --link --no-dereference' work also on systems where the
5018 link system call cannot create a hard link to a symbolic link.
5019 * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
5020 the link syscall on a symlink when it would do the wrong thing.
5021 Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
5022 * tests/cp/link-no-deref: New file/test for the above.
5023 * tests/cp/Makefile.am (TESTS): Add link-no-deref.
5024 * NEWS: Mention the change (doesn't affect Linux).
5026 2006-06-01 Paul Eggert <eggert@cs.ucla.edu>
5028 Fix some porting problems in the test cases reported by
5029 Ralf Wildenhues for HP-UX 11.23 in:
5030 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
5031 * tests/help-version: Don't assume that \< \> works in sed.
5032 * tests/misc/close-stdout: Don't assume that >&- works.
5033 Add a /dev/full test.
5034 * tests/touch/no-create-missing: Don't assume that >&- works.
5036 2006-05-30 Jim Meyering <jim@meyering.net>
5038 * src/ls.c (usage): Add `v' to the list of sorting-related options.
5041 2006-05-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5043 * tests/cp/fail-perm: source lang-default.
5044 * tests/rm/inaccessible: Likewise.
5046 2006-05-28 Jim Meyering <jim@meyering.net>
5048 * tests/rm/inaccessible: AIX 4.3.3 gives a different diagnostic.
5049 Recognize it, too. Reported by Ralf Wildenhues, in
5050 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
5052 2006-05-27 Jim Meyering <jim@meyering.net>
5054 * src/chgrp.c: Support new options: --preserve-root and
5055 --no-preserve-root. Somehow this program was skipped when those
5056 options were added to chown, chmod, and rm. Reported by
5057 vaqflabuopac@spammotel.com in <http://bugs.debian.org/365656>.
5058 * NEWS: Mention this.
5060 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
5062 * NEWS: Remove mention of --seed. We'll replace it with something
5063 better, and don't want to indicate that it is supported.
5064 * src/sort.c (usage): Likewise.
5066 2006-05-20 Jim Meyering <jim@meyering.net>
5068 * src/chmod.c (main): Use FTS_PHYSICAL here, too.
5070 * src/du.c (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
5071 and arrange for -D to set fts' FTS_PHYSICAL bit as well as
5072 FTS_COMFOLLOW. Spotted by Justin Pryzby.
5074 * gnupload: Merge changes from automake, retaining the ""--to...
5075 kludge to placate overzealous `make distcheck' check.
5077 2006-05-19 Jim Meyering <jim@meyering.net>
5079 * src/du.c (main): Don't let -D, -L, or -P turn off the internal
5080 FTS_TIGHT_CYCLE_CHECK directory traversal option.
5081 Reported by Justin Pryzby in http://bugs.debian.org/367691
5083 2006-05-15 Jim Meyering <jim@meyering.net>
5085 * src/cp.c (usage): Correct description of -a: s/-dpR/-dpPR/.
5086 From Tomas Pospisek.
5088 2006-05-13 Jim Meyering <jim@meyering.net>
5090 * tests/mv/no-target-dir: Test two more cases.
5092 2006-05-11 Jim Meyering <jim@meyering.net>
5094 mv -T DIR EMPTY_DIR no longer fails unconditionally
5095 * src/copy.c (copy_internal): Don't manually prohibit a move where
5096 the destination is an existing directory. Sometimes doing that is
5097 valid. Let the rename system call enforce the rules. That is
5098 allowed only when the source is a directory and the destination
5099 directory (to be replaced) is empty. Reported by Eric Blake.
5100 * tests/mv/no-target-dir: New file/test for this.
5101 * tests/mv/Makefile.am (TESTS): Add no-target-dir.
5102 * NEWS: Mention this.
5104 * tests/mv/atomic: New file/test for yesterday's fix.
5105 * tests/mv/Makefile.am (TESTS): Add atomic.
5107 * tests/du/long-sloop: Avoid harmless `ambiguous redirect' diagnostic.
5109 2006-05-10 Jim Meyering <jim@meyering.net>
5111 * src/copy.c (copy_internal): Don't explicitly unlink the destination
5112 when moving a symlink into the place of an existing non-directory.
5113 Reported by Joshua Hudson.
5114 * NEWS: mention this.
5116 2006-05-07 Jim Meyering <jim@meyering.net>
5118 * Makefile.maint (patch-check): Fail if patch generates any output,
5119 even merely for changed offsets.
5121 * src/c99-to-c89.diff: Adjust to reflect new offsets.
5123 * NEWS: Mention changes affecting df, pwd, shred.
5125 2006-05-06 Jim Meyering <jim@meyering.net>
5127 * tests/ls/stat-vs-dirent: New test, to detect the bogus file
5128 system condition where dirent.d_ino != stat.st_ino.
5129 * tests/ls/Makefile.am (TESTS): Add stat-vs-dirent.
5131 2006-05-06 Eric Blake <ebb9@byu.net>
5133 * tests/ls/inode: Expand to test inode from readdir case.
5134 * tests/ls/follow-slink: Expand to test broken links encountered
5135 implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
5137 2006-05-06 Eric Blake <ebb9@byu.net>
5139 * tests/mv/leak-fd: Work even on case-insensitive file system.
5141 2006-05-04 Jim Meyering <jim@meyering.net>
5143 * NEWS: Mention the 2006-03-19 pwd-related change that makes
5144 lib/getcwd.c work around inconsistent file system dirent.d_ino data.
5146 2006-05-03 Jim Meyering <jim@meyering.net>
5148 * src/ls.c (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
5149 Use better macro parameter names: s/basename/key_name/,
5150 s/basefunc/key_cmp_func. Fix typo in comment.
5152 2006-04-29 Eric Blake <ebb9@byu.net>
5154 * src/ls.c (main): On systems with d_type, directories_first only
5155 implies format_needs_type, not format_needs_stat.
5157 2006-05-03 Jim Meyering <jim@meyering.net>
5159 * src/ls.c (xstrcoll_df_version, rev_xstrcoll_df_version): Add space
5160 after comma in arg list, from Eric Blake.
5162 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
5164 * tests/misc/date (relative-3): New test, derived from a bug
5165 report by John Thomas McDole.
5167 2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
5169 New option for ls: --group-directories-first.
5170 It makes ls list directories before files.
5171 * NEWS [New features]: Mention it.
5172 * src/ls.c (sort_type): Rearrange to use as an array index when
5173 choosing sort function; added new sort_numtypes member for
5175 (time_type): Add new time_numtypes member for compile-time check.
5176 (directories_first): New global variable.
5177 (GROUP_DIRECTORIES_FIRST_OPTION): New enum.
5178 (long_options): Add --directories-first.
5179 (main): Support new option.
5180 (is_directory): New function.
5181 (extract_dirs_from_files): Use it.
5182 (DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
5183 (LIST_SORTFUNCTION_VARIANTS): New macros.
5184 (sort_functions): New global variable.
5185 (sort_files): Use it.
5186 (usage): Document new option.
5188 2006-04-18 Paul Eggert <eggert@cs.ucla.edu>
5190 * src/shred.c (fillrand): The assertion was way too weak, due to
5191 what must be a typo. Strengthen it to its intended value.
5192 (dopass): Don't use alloca; it's not worth the aggravation here,
5193 since it's used only to get a page-aligned buffer, and page
5194 alignment doesn't buy us much here. I'm suspicious that alloca
5195 causes problems on some hosts, due to a recent bug report by Adam
5196 Waltman: http://bugs.gentoo.org/130246.
5198 2006-04-18 Jim Meyering <jim@meyering.net>
5200 * tests/misc/tty-eof: Add new programs, base64, sha224sum, sha256sum,
5201 sha384sum, sha512sum.
5203 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
5205 * src/chmod.c (describe_change): Adjust to filemode changes.
5206 * src/ls.c (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
5207 (print_long_format): Use (new) filemodestring rather than
5208 (old) mode_string, so that we get more file types right, at least
5209 in theory. Adjust to filemode changes.
5210 * src/stat.c (human_access): Likewise.
5212 2006-04-18 Jim Meyering <jim@meyering.net>
5214 * src/ptx.c (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
5215 ignore file. This has never been enabled. Reported by Eric Blake.
5217 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
5219 * src/ln.c (linkfunc): Remove. This method ran into a compiler/linker
5220 bug in Interix. Just call symlink or link directly. All uses changed.
5221 * src/setuidgid.c (main) [! HAVE_SETGROUPS]: Don't call setgroups.
5222 * src/stat.c (USE_STATVFS): New macro.
5223 Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
5224 (NAMEMAX_FORMAT): define a bit more clearly, now that the
5225 statvfs-using code is a bit more regular.
5226 * src/system.h (sync) [!HAVE_SYNC]: New macro.
5228 2006-04-11 Paul Eggert <eggert@cs.ucla.edu>
5230 * NEWS: csplit, nl, expr now conform to POSIX better, and are
5231 more-compatible with traditional Unix, with respect to regular
5233 * src/csplit.c (extract_regexp): Set re_syntax_options to a
5234 value that is compatible with what POSIX requires.
5235 * src/nl.c (build_type_arg): Likewise.
5236 * src/expr.c (docolon): Likewise. Also, don't let anchors match
5237 newline; this fixes an incompatibility with tradition and with POSIX.
5238 Don't warn about leading ^. POSIX says it is unspecified whether
5239 ^ is a special character, which means that implementations can
5240 either treat it as special or not, but either way a warning is not
5241 allowed (unless the regexp is otherwise invalid). Instead, anchor
5242 the expression but treat ^ as an anchor; this is the traditional
5243 behavior (e.g., Solaris 10).
5244 (eval4, eval3, eval2): Treat non-numeric args, division by zero,
5245 and the like as invalid expressions (exit status 2), not as
5246 failure of 'expr' (exit status 3). This is more consistent with
5247 how Solaris behaves.
5248 * tests/expr/basic (fail-a): Adjust exit status to match new expr
5249 behavior, for status 2 versus 3.
5251 (bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
5252 (bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
5253 (bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
5254 (bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
5255 (bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
5256 (bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
5257 (bre61, bre62): New tests.
5258 * tests/misc/csplit: Use \{...\} in test RE, to test that we're
5259 conforming to POSIX.
5262 * tests/du/long-from-unreachable: Solaris 8 sh doesn't understand
5263 "if !". Do not assume that 'sed' can handle long, newline-free input.
5264 * tests/du/long-sloop: Likewise. Evaluate expr once, not $n times.
5266 2006-04-10 Paul Eggert <eggert@cs.ucla.edu>
5268 Adjust to new regex.h API (with new fastmap type), and clean
5269 up the regex storage allocation a bit.
5271 * src/csplit.c (struct control): Put re_compiled member at the
5272 end, since it's large. Change regexpr member from char * to bool;
5273 all uses changed. Add new member fastmap.
5274 (extract_regexp): regexp arg is now char const *, not char *.
5275 Don't bother duplicating the regular expression; it's not needed.
5276 Set fastmap from new fastmap member. Don't bother allocating
5277 a buffer, as the regexp code does a better job than we do.
5278 * src/expr.c (docolon): Allocate and use a fastmap.
5279 Don't bother allocating a buffer.
5280 * src/nl.c (body_fastmap, header_fastmap, footer_fastmap):
5282 (build_type_arg): New fastmap arg. All uses changed.
5283 Don't bother allocating a buffer, but set a fastmap.
5284 * src/ptx.c (context_regex_string, word_regex_string): Remove.
5285 (context_regex, word_regex): New vars, replacing the above.
5287 (struct regex_data): New type.
5288 (compile_regex): Renamed from alloc_and_compile_regex, since
5289 we no longer allocate storage. Arg is now a struct regex_data *,
5290 not a const char *. All uses changed. Don't allocate the fastmap;
5291 instead, take it from the caller. Don't convert size_t to int,
5292 to avoid arithmetic overflow problems. Don't bother freeing
5293 storage afterwards; it's not worth the aggravation.
5294 * src/tac.c (compiled_separator_fastmap): New ver.
5295 (main): Use it. Don't bother allocating a buffer.
5297 2006-03-30 Jim Meyering <jim@meyering.net>
5299 * src/dd.c (iwrite): Remove assignment without effect.
5300 Reported by Felix Rauch Valenti.
5302 2006-03-22 Eric Blake <ebb9@byu.net>
5304 * src/ptx.c (usage): Remove mention of --copyright/-C.
5305 (main): Alias --copyright to --version plus a deprecation warning.
5306 * NEWS: Mention this.
5308 2006-03-27 Jim Meyering <jim@meyering.net>
5310 * src/Makefile.am (uptime_LDADD): Add $(POW_LIB), for uptime's
5311 use of strtod. Tiny patch from Nickolai Zeldovich.
5313 2006-03-11 Eric Blake <ebb9@byu.net>
5315 * tests/misc/dirname: New file.
5316 * tests/basename/Makefile.am: Delete.
5317 * tests/basename/basic: Move to...
5318 * tests/misc/basename: ... this new file. Add some tests,
5319 including fixed behavior for //.
5320 * tests/misc/Makefile.am (TESTS): Sort. Add basename, dirname.
5321 * tests/Makefile.am (SUBDIRS): Remove basename.
5322 * configure.ac (AC_CONFIG_FILES): Remove tests/basename.
5324 Improvements to dirname/basename handling on platforms like
5325 cygwin with distinct // and with drive letters.
5326 * NEWS: Document new behavior.
5327 * src/basename.c (main): Don't strip suffix from file system
5329 * src/cp.c (target_directory_operand): Use new last_component.
5330 (ASSIGN_BASENAME_STRDUPA): Likewise. Reduce time spent
5331 traversing the string.
5332 * src/dircolors.c (guess_shell_syntax): Use new last_component.
5333 * src/install.c (target_directory_operand, install_file_in_dir):
5335 * src/ln.c (target_directory_operand, main): Likewise.
5336 * src/ls.c (basename_is_dot_or_dotdot): Likewise.
5337 * src/mv.c (target_directory_operand, movefile): Likewise.
5338 * src/remove.c (rm_1): Likewise.
5339 * src/shred.c (wipename): Likewise.
5340 * src/split.c (next_file_name): Likewise.
5341 * src/su.c (log_su, run_shell): Likewise.
5343 2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
5345 * NEWS: nohup diagnostics are now more precise, and nohup now
5346 redirects stderr to nohup.out if stdout is closed and stderr is a tty.
5347 * src/nohup.c (main): Implement this.
5348 * tests/misc/nohup: Test the new behavior.
5350 2006-03-12 Jim Meyering <jim@meyering.net>
5352 * src/copy.c (set_author): Rename function, from preserve_author.
5354 * src/remove.c (AD_pop_and_chdir): Use new macro,
5355 CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
5357 * src/system.h (SAME_INODE): Remove definition.
5358 Include "same-inode.h", instead.
5360 2006-03-11 Eric Blake <ebb9@byu.net>
5362 * src/pwd.c (robust_getcwd): Prepend only one slash, not two.
5364 2006-03-10 Jim Meyering <jim@meyering.net>
5366 Fix a bug whereby a user with write access to a directory being removed
5367 could cause the removal of that directory to fail with an erroneous
5368 diagnostic about a directory cycle. Reported by Vineet Chadha.
5370 * NEWS: Mention this.
5371 * src/remove.c (AD_pop_and_chdir): If the directory we're about to
5372 leave (and try to rmdir) is the one whose dev_ino is being used to
5373 detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
5375 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
5377 * NEWS: Document dd's new 'directory' and 'nolinks' flags.
5378 * src/dd.c (set_fd_flags): Handle file-creation flags on file
5379 descriptors, rather than ignoring them.
5380 * tests/dd/misc: Add test cases for append, nofollow, directory,
5381 and nolinks flags. Simplify redirection to /dev/null in some cases.
5383 * tests/dd/misc: iflags->iflag. This fixes a typo that meant the
5384 noatime test never tested anything.
5386 2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
5388 * src/dd.c (flags, usage): New flags directory, nolinks.
5389 * src/system.h (O_NOLINKS): Define to 0 if not already defined.
5391 * src/ls.c (usage): Mention that -f disables --color.
5392 Problem reported by Niels Möller.
5394 2006-03-03 Justin Pryzby <pryzbyj@justinpryzby.com>
5396 * man/*.x: Add references to syscalls from utilities of the same name.
5398 2006-03-05 Jim Meyering <jim@meyering.net>
5400 * tests/help-version: Set SHELL, if not already set, in order to
5401 avoid failure when `make check' is run through debuild; dircolors
5402 would fail due to lack of $SHELL. Reported by Sven Joachim.
5404 Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
5405 * src/base64.c (wrap_write, do_encode, main): Change type of
5406 parameters and locals, wrap_column, form size_t to uintmax_t.
5407 (main): Adjust to use xstrtoumax, accordingly.
5409 2006-03-03 Jim Meyering <jim@meyering.net>
5411 Don't fail when run from an environment with SHELL not a Bourne
5412 shell, e.g. `env SHELL=/bin/csh make check' would fail this test.
5413 * tests/dircolors/simple: Invoke each non-failing test with -b.
5414 Reported by Michael Stone.
5416 2006-02-27 Jim Meyering <jim@meyering.net>
5418 * tests/misc/base64: Derive --decode-using tests from the
5421 * tests/misc/base64: Factor out a long constant string.
5422 Split lines to stay within 80 columns.
5424 * tests/misc/Makefile.am (TESTS): Add base64.
5425 * tests/misc/base64: Test base64. From Simon Josefsson.
5427 * src/base64.c (do_decode): Use correct type for parameter,
5428 ignore_garbage: s/size_t/bool/.
5430 * src/base64.c: Don't include .h files already included by system.h:
5431 <string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
5432 Include "system.h" before the other lib/*.h header files.
5433 Include <sys/types.h> before "system.h".
5434 (wrap_write): Remove declaration of unused local, initial_column.
5435 (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/.
5437 * README: Add base64 to the list.
5439 2006-02-17 Simon Josefsson <jas@extundo.com>
5441 New program: base64.
5442 * AUTHORS: Mention base64.
5444 * man/Makefile.am: Build base64.1.
5445 * man/base64.x: New file.
5446 * src/Makefile.am (bin_PROGRAMS): Add base64.
5447 * src/base64.c: New file.
5449 2006-02-25 Eric Blake <ebb9@byu.net>
5451 In ls, avoid calling stat for --inode (-i), when possible.
5452 * src/pwd.c (NOT_AN_INODE_NUMBER, D_INO): Move to ...
5453 * src/system.h: ... here, for use in ...
5454 * src/ls.c (main): ... here. Prefer dirent.d_ino to stat when
5456 (gobble_file): Add inode argument.
5457 (print_dir): Pass inode if available.
5458 (usage): Remove inaccuracy.
5460 2006-02-23 Jim Meyering <jim@meyering.net>
5462 * TODO: Update/correct some obsolete entries.
5464 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
5466 * doc/coreutils.texi (join invocation): Mention `sort -k 1b,1'.
5467 * src/join.c (usage): Likewise.
5468 Documentation problem reported by Philip Kensche.
5470 2006-02-20 Eric Blake <ebb9@byu.net>
5472 * man/rm.x: Update documentation to match previous patch.
5474 2006-02-18 Eric Blake <ebb9@byu.net>
5476 New option for rm: --interactive=once (-I).
5477 * NEWS: Document it, along with change to rm --interactive.
5478 * TODO: Remove entry for implementing rm -I
5479 * src/rm.c (INTERACTIVE_OPTION): New enum value.
5480 (interactive_type): New enum.
5481 (long_opts): Let interactive take an optional argument.
5482 (interactive_args, interactive_types): New option arguments.
5483 (usage): Document -I, --interactive=WHEN. Use program_name
5484 instead of a basename.
5485 (main): New -I option, new behavior to --interactive.
5486 * tests/rm/interactive-once: New tests.
5487 * tests/rm/interactive-always: Ditto.
5488 * tests/rm/Makefile.am (TESTS): Run them.
5490 2006-02-18 Jim Meyering <jim@meyering.net>
5492 * Makefile.maint (sc_two_space_separator_in_usage): Make the regular
5493 expression match more of the target lines, e.g., those that start with
5494 `-S,' (short option followed by a comma) or that include `=[...]'.
5495 Patch by Nicolas François.
5496 Fix the four offenders thus exposed:
5497 * src/join.c (usage): Use two spaces (not one) to separate the
5498 --first-only option string from its description, so help2man formats
5499 the derived man page properly.
5500 * src/pr.c (usage): Likewise.
5501 * src/uniq.c (usage): Likewise.
5502 * src/install.c (usage): Likewise.
5504 2006-02-15 Jim Meyering <jim@meyering.net>
5506 * Makefile.maint (alpha beta major): For `make major', ensure that the
5507 version string is of the form N.N[.N]*, where N is one or more digits.
5509 2006-02-14 Jim Meyering <jim@meyering.net>
5511 * INSTALL: Update from gnulib.
5513 2006-02-13 Jim Meyering <jim@meyering.net>
5515 * GNUmakefile (all): Emit diagnostics to stderr, not stdout.
5517 2006-02-12 Jim Meyering <jim@meyering.net>
5519 * Makefile.maint (patch-check): New target.
5520 (local-checks-available): Add to the list.
5522 2006-02-11 Jim Meyering <jim@meyering.net>
5524 * src/c99-to-c89.diff: New file.
5525 * src/Makefile.am (EXTRA_DIST): Add c99-to-c89.diff.
5527 * .x-po-check: New file, with exclusions so that `make distcheck'
5529 * Makefile.am (EXTRA_DIST): Add .x-po-check.
5531 rm -r must remove an empty directory, even if it is inaccessible.
5532 * src/remove.c (close_preserve_errno): New function.
5533 (fd_to_subdirp): Don't print a diagnostic in this function.
5534 Do it from the callers instead, unless rmdir succeeds.
5535 (remove_cwd_entries, remove_dir): Adjust callers.
5536 * tests/rm/empty-inacc: New test for the above.
5537 * tests/rm/Makefile.am (TESTS): Add empty-inacc.
5538 * NEWS: Mention this bug fix.
5539 * tests/rm/rm2: Adjust two expected diagnostics, now that they're
5540 a tiny bit less precise: cannot remove `a/1': ... instead of
5541 cannot open directory `a/1': ...
5543 * Makefile.maint (syntax-check-rules): Automatically derive this
5544 list of sc_-prefixed rule names.
5546 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
5548 * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
5549 (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
5550 Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
5551 (syntax-check-rules): Bring back sc_changelong. (Hmm, why did it
5552 go away? was that an accident?)
5553 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
5554 (sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
5555 (sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
5556 (sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
5557 (sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
5558 (sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
5559 (sc_useless_cpp_parens, makefile-check, m4-check, po-check):
5560 (author_mark_check, makefile_path_separator_check):
5561 Output line numbers, to simplify navigation of Emacs *compilation*
5563 (sc_prohibit_atoi_atof, sc_file_system):
5564 Rework slightly so that Makefile.maint doesn't get reported as a
5565 violation of its own syntax rules.
5566 (sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
5567 it at run-time (which didn't work with Bison). Fix a makefile typo,
5568 caught by Makefile.maint itself: spaces where a tab should be.
5569 (po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
5570 which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
5571 Ignore djgpp and man subdirectories, to avoid false matches with
5572 Bison and coreutils, respectively. Use sort -u to remove the
5573 resulting duplicates.
5574 * gnupload: Rework slightly to avoid bogus warning from
5575 sc_two_space_separator_in_usage.
5577 2006-02-10 Jim Meyering <jim@meyering.net>
5579 Use gzip's --rsyncable option only if it's available.
5580 * Makefile.maint (gzip_rsyncable): New variable.
5583 2006-02-08 Jim Meyering <jim@meyering.net>
5585 * Makefile.maint (local-checks-available): Define in terms of
5586 the expansion, $(syntax-check-rules), rather than the single,
5587 top-level target `syntax-check', so that it's easier to exclude
5588 individual rules (via $(local-checks-to-skip)).
5589 (tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
5591 2006-02-07 Jim Meyering <jim@meyering.net>
5593 * src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
5594 is on Tru64), define O_DIRECT to that. Patch From James Lemley.
5596 * tests/help-version (expected_failure_status_vdir):
5597 Redirect an expected disk-full diagnostic to /dev/null.
5599 2006-02-06 Jim Meyering <jim@meyering.net>
5601 * src/unexpand.c (usage): Use two spaces (not one) to separate the
5602 --first-only option string from its description, so help2man formats
5603 the derived man page properly.
5604 * src/rm.c (usage): Likewise for --no-preserve-root.
5605 * src/chown.c (usage): Likewise.
5606 * src/chgrp.c (usage): Likewise.
5608 Add a rule to ensure that the above doesn't happen again.
5609 * Makefile.maint (sc_two_space_separator_in_usage): New rule.
5610 (syntax-check-rules): Add it.
5611 * .x-sc_two_space_separator_in_usage: New empty file.
5612 * Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
5614 2006-02-06 Jim Meyering <jim@meyering.net>
5616 * src/cp.c (usage): Use two spaces (not one) to separate each
5617 option string from its description, so help2man formats the
5618 derived man page properly.
5619 * src/mv.c (usage): Likewise.
5620 Patch from Nicolas François in http://bugs.debian.org/351601.
5622 2006-02-04 Jim Meyering <jim@meyering.net>
5624 * src/copy.c (copy_internal): cp -RL would fail when encountering
5625 the same directory more than once in the hierarchy beneath a single
5626 command-line argument. That is legitimate, e.g. when there are
5627 two or more symbolic links, each pointing to some directory that
5628 would not otherwise be copied. Reported by Christophe LYON.
5629 * tests/cp/cp-deref: New file. Test for today's fix.
5630 * tests/cp/Makefile.am (TESTS): Add cp-deref.
5631 * NEWS: Document this.
5633 2006-02-03 Jim Meyering <jim@meyering.net>
5635 * configure.ac: Require automake-1.9.6, not 1.8.3.
5637 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
5639 * src/od.c (usage): Mention that -t a ignores high order bit.
5640 Documentation problem reported by Ed Avis.
5642 2006-02-01 Jim Meyering <jim@meyering.net>
5644 * src/pwd.c (find_dir_entry): Remove unused local, `ent_sb_valid'.
5646 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5648 * src/head.c (main): Use a better diagnostic when someone uses a
5649 trailing numeric option in an invalid way. Problem reported by
5651 * src/tail.c (parse_options): Likewise.
5653 2006-01-30 Jim Meyering <jim@meyering.net>
5655 * man/wc.x: Include `count' keyword in man page synopsis,
5656 per suggestion from http://bugs.debian.org/181585.
5658 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
5660 * src/df.c (show_dev): If the file system claims to have
5661 more available than total blocks, report the number of used
5662 blocks as being total - available (a negative number) rather
5663 than as garbage. Problem reported by Toralf Foerster.
5665 2006-01-24 Jim Meyering <jim@meyering.net>
5667 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
5668 to put a regular file in O_NONBLOCK mode fails with EPERM.
5669 That happens on Linux (up to 2.6.15) when using tail -f on a file with
5670 the append-only attribute. Reported by Dean Gaudet. For details,
5671 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
5672 * NEWS: Mention this fix.
5673 * tests/tail-2/append-only: New file. Test for the above.
5674 * tests/tail-2/Makefile.am (TESTS): Add append-only.
5675 * tests/Makefile.am (check-root): Add tail-2/append-only
5677 2006-01-21 Jim Meyering <jim@meyering.net>
5679 * NEWS: Mention fts-related improvements and bug fixes.
5681 2006-01-19 Jim Meyering <jim@meyering.net>
5683 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
5684 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
5686 2006-01-18 Jim Meyering <jim@meyering.net>
5688 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
5690 2006-01-17 Jim Meyering <jim@meyering.net>
5692 Now that fts no longer changes the current working directory, adjust
5693 its clients accordingly -- note that du.c uses fts but doesn't need
5694 any adjustment, since it doesn't operate on the actual files,
5695 but rather just uses the stat buffers provided by fts.
5697 * src/chown-core.c: Include "openat.h".
5698 Don't include "lchown.h".
5699 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
5700 calling openat, lchownat, chownat, rather than open, lchown, chown.
5702 * src/chmod.c: Include "openat.h".
5703 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
5705 * tests/du/long-from-unreadable: New test, to exercise one small
5708 2006-01-13 Jim Meyering <jim@meyering.net>
5710 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
5711 addition of new directories under tests/.
5713 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
5716 2006-01-12 Jim Meyering <jim@meyering.net>
5718 * tests/du/long-sloop: Adjust not to hard-code the expected
5719 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
5720 from that of GNU libc. Reported by Paul Eggert.
5722 * tests/du/long-sloop: Create file at end of symlink chain.
5724 * tests/misc/test: New file, with a test for one of the
5725 bugs fixed by yesterday's test.c changes.
5726 * tests/misc/Makefile.am (TESTS): Add test.
5728 2006-01-11 Jim Meyering <jim@meyering.net>
5730 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
5731 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
5732 a very long sequence of symbolic links (not necessarily a loop).
5733 * tests/du/Makefile.am (TESTS): Add long-sloop.
5735 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
5737 * src/test.c (test_syntax_error): Append a newline. All callers
5738 changed, except for the ones that didn't already append a newline.
5739 Bug reported by Eric Blake.
5741 2006-01-11 Jim Meyering <jim@meyering.net>
5743 * src/system.h (X2NREALLOC): Now that verify_true is no longer
5744 void, cast its result to void, to avoid gcc's warning that
5745 ``left-hand operand of comma expression has no effect''.
5746 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
5748 2006-01-10 Jim Meyering <jim@meyering.net>
5750 * tests/chmod/no-x: Add a test for today's fts.c fix.
5752 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
5754 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
5755 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
5757 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
5759 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
5760 Use verify_true instead of verify_expr, to sync with gnulib.
5762 2006-01-08 Jim Meyering <jim@meyering.net>
5764 * src/date.c (usage): Adjust the formatting of the entries for
5765 %::z and %:::z (separate with two spaces, not one) so that help2man
5766 formats them properly. Reported by Philip Rowlands.
5768 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
5770 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
5772 2006-01-06 Jim Meyering <jim@meyering.net>
5774 * Makefile.maint (copyright-check): Use date +%Y in place of
5777 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
5778 First off, the attribute should have been `volatile' (not static)
5779 to avoid longjmp-related risk of clobber. Secondly, now there is
5780 no longer any risk of a local variable being clobbered, so there's
5781 no need for any attribute at all.
5783 2006-01-05 Jim Meyering <jim@meyering.net>
5785 * src/remove.c: Give a few functions the inline attribute.
5786 (AD_pop_and_chdir): Use gotos to avoid some duplication.
5787 (AD_push): Rewrite an assertion so that the entire computation
5788 goes away when assertions are turned off.
5790 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
5791 It's already defined in "system.h".
5792 * Makefile.maint: Add a FIXME comment.
5794 2006-01-04 Jim Meyering <jim@meyering.net>
5796 * ChangeLog: Remove entries from 2005-10-22 and earlier.
5797 * ChangeLog-2005: New file, for entries up to version 5.92.
5799 2006-01-03 Jim Meyering <jim@meyering.net>
5801 * tests/du/no-x: Also allow a slightly different diagnostic -- the
5802 one you get when using openat-enabled fts.c and du (coming soon).
5803 * tests/chmod/no-x: Likewise.
5804 * tests/chgrp/no-x: Likewise.
5806 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
5808 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
5810 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
5811 (restricted_chown): Return it, if the file cannot be accessed due
5812 to EPERM, or if no uid or gid are required, or if the file is
5813 neither a directory nor a regular file. Rewrite to avoid gotos.
5814 (change_file_owner): Handle RC_do_ordinary_chown case.
5815 Rewrite to avoid gotos.
5816 * tests/chgrp/basic: Make sure we can change the group of
5819 * src/date.c (usage): Explain %g, %G, and %V a bit better.
5821 2006-01-02 Jim Meyering <jim@meyering.net>
5823 * src/copy.c (set_owner): Correct a comment.
5825 * src/tail.c (parse_options): Change warning to say that --retry
5826 is useful `mainly' (not `only') when following by name.
5827 Reported here: http://bugs.debian.org/273781
5829 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
5831 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
5832 * src/copy.c: Include lchmod.h.
5833 (copy_internal): Use lchmod rather than chmod.
5834 * src/cp.c: Include lchmod.h.
5835 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
5836 * src/mkdir.c: Include lchmod.h.
5837 (usage): Clarify -m's operation.
5838 (main): Use lchmod rather than chmod. Don't use lchmod unless the
5839 new mode contains bits outside the 777 range.
5840 * src/mkfifo.c (usage): Clarify -m's operation.
5841 (main): If -m is given, don't invoke chmod; use umask 0 instead.
5842 Report an error if -m asks for bits outside the 777 range.
5843 * src/mknod.c (usage, main): Likewise.
5845 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
5847 2005-12-27 Jim Meyering <jim@meyering.net>
5849 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
5850 (sc_prohibit_assert_without_use): New rule.
5851 (syntax-check-rules): Add it to the list.
5852 * .x-sc_prohibit_assert_without_use: New empty file.
5853 * Makefile.am (EXTRA_DIST): Add it.
5855 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
5857 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
5858 Don't include <assert.h>; it wasn't used.
5860 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
5862 * src/chown-core.c (restricted_chown):
5863 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
5864 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
5865 | O_NOFOLLOW too, for consistency with other dir-openers.
5866 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
5867 (is_empty_dir): Likewise.
5868 * src/shred.c (wipename): Likewise. Don't bother trying to open
5869 dir for writing, since POSIX prohibits it.
5871 2005-12-22 Jim Meyering <jim@meyering.net>
5873 * tests/help-version: Redirect stderr to /dev/full, to suppress
5874 write error diagnostic.
5876 2005-12-19 Jim Meyering <jim@meyering.net>
5878 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
5879 Avoid a minor race condition when `-m MODE' is specified, by using
5880 open, fchown, and close rather than just chown. To do that reliably --
5881 even with an overly restrictive umask -- ensure that each mkdir,
5882 mknod and mkfifo call uses a mode including at least owner-read access.
5883 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
5884 the subsequent chown (or equivalent open,fchown,close) fails.
5885 * tests/misc/mknod: New tests.
5886 * tests/misc/Makefile.am (TESTS): Add mknod.
5888 2005-12-17 Jim Meyering <jim@meyering.net>
5890 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
5891 e.g., on a named pipe.
5892 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
5893 place of all uses, since it is guaranteed (system.h) to be defined.
5895 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
5897 Add POSIX ACL support
5898 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
5899 is no requirement for ACL support; particularly, it does not exist
5900 on systems that have POSIX ACLs.
5901 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
5902 * src/cp.c (umask_kill): With default acls, the umask is not to be
5903 applied. Remove umask_kill, don't change the process umask, and let
5904 the kernel apply the umask where appropriate.
5905 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
5906 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
5908 (copy_reg, copy_internal): Use copy_acl and set_acl
5909 instead of fchown/chown. Fix the logic for POSIX ACLs.
5910 (chown_succeded): Remove; we now always copy acls and
5911 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
5912 did a chown before or not.
5913 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
5914 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
5915 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
5916 to link with it via $(LIB_ACL), for the utilities that need it.
5918 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
5920 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
5921 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
5922 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
5923 value is now signified by whether cwd_errno is null.
5924 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
5925 pointer-to-bool to pointer-to-errno-value. All callers changed.
5926 (rm_1): Don't bother setting a local cwd failure flag and then
5927 ORing it into the caller's. Just set the caller's.
5928 (rm): Use cwd failure errno value to print a slightly-better
5931 2005-12-15 Jim Meyering <jim@meyering.net>
5933 * src/stat.c (print_it): Properly handle a backslash at the
5934 end of a --printf format string. Reported by Paul Eggert.
5935 * tests/misc/stat-printf (end-bs): Add a test for the above.
5937 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
5939 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
5940 Don't assume /etc/passwd contains user names; use 'id' instead.
5942 2005-12-15 Jim Meyering <jim@meyering.net>
5944 stat: revert behavior of --format=FMT (-c)
5945 stat: add new option: --printf=FMT
5946 * NEWS: Mention this.
5947 * src/stat.c (isodigit, octtobin, hextobin): Define.
5948 (PRINTF_OPTION): Define.
5949 (interpret_backslash_escapes, trailing_delim): New globals.
5950 (usage): Document them. Alphabetize on long option names.
5951 (print_esc_char): New function.
5952 (print_it): Rewrite, in order to handle backslash escapes.
5953 (main): Handle new option. Set globals for --format, too.
5955 * tests/misc/stat-printf: Test --printf and --format.
5956 * tests/misc/Makefile.am (TESTS): Add stat-printf.
5958 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
5960 * NEWS: sort now reports incompatible options.
5961 * src/sort.c (incompatible_options, check_ordering_compatibility):
5963 (main): Use them. Don't bother with a usage message for
5964 "sort -c a b", for consistency with other error diagnostics.
5965 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
5968 * src/cat.c (main): Undo previous change. close_stdout already
5969 does the check, so the previous change wasn't necessary.
5971 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
5973 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
5975 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5977 Install a more-conservative approach for sort -R. It's the
5978 same basic idea as the existing code, except it uses the full ISAAC
5979 approach (called the "more kosher" approach in the existing comments).
5980 This makes "sort -R" quite a bit slower (about a factor of 2 on my
5981 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
5982 better to be conservative here at first, and review any performance
5983 improvements carefully.
5984 * .x-sc_require_config_h: Add src/rand-isaac.c.
5985 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
5986 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
5987 (shred_SOURCES, sort_SOURCES): Remove.
5988 (EXTRA_DIST): Add rand-isaac.c.
5989 * src/rand-isaac.c: Revert to what used to be in shred.c, without
5990 changing it to allow for varying numbers of words in the state.
5991 Alter so that we include rand-isaac.c directly rather than
5992 compiling it and linking to it. Don't include config.h or
5993 system.h; that's the includer's responsibility.
5994 Omit functions that are specific to shred.
5995 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
5996 (isaac_step, struct irand_state):
5997 Resurrect these, with the same defns that used to be in shred.c.
5998 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
5999 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
6001 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
6002 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
6003 (irand_init, irand32, irand_mod):
6004 Number of words is constant again.
6005 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
6006 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
6007 * src/sort.c: Likewise.
6008 * src/shred.c (fillrand, dopass, main): Undo previous change.
6009 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
6011 * src/sort.c: Don't include md5.h; it wasn't needed.
6012 (struct keyfield): Rename random_hash to random, for consistency
6013 with the other member names. All uses changed.
6014 (usage): Tweak wording to mention STRING for --seed option.
6015 (short_options): Rorder for consistency with other programs.
6016 (rand_state): Now a struct, not a pointer to one. All uses changed.
6017 (HASH_WORDS, HASH_SIZE): Remove.
6018 (get_hash): Remove comments around resbuf size, since we can assume C89.
6019 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
6020 (keycompare): Adjust to the new get_hash.
6022 (badfieldspec): Omit recently-introduced comment; it isn't needed.
6023 (main): Don't set need_random simply because gkey has it set; that
6024 doesn't necessarily mean we'll need random numbers.
6025 Redo seeding to match new get_hash approach.
6027 2005-12-10 Jim Meyering <jim@meyering.net>
6029 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
6031 Avoid shred segfault on 64-bit systems.
6032 * src/rand-isaac.c (isaac_refill): Don't try to negate a
6033 local of type uint32_t. Make the local an `int' instead.
6035 * NEWS: Mention sort's new options.
6037 * src/rand-isaac.c (isaac_mix): Declare to be static.
6038 Mark all other functions as `extern' so the tight-scope
6039 part of `make distcheck' passes once again.
6040 * src/rand-isaac.h (isaac_mix): Remove declaration.
6042 * src/sort.c (get_hash): Change position of `*' in parameter
6043 type to conform with convention.
6044 (main): Split a long line so it fits in 80 columns.
6045 (keycompare): Remove stray SPACE before TAB that was
6046 causing `make distcheck' to fail.
6048 * src/shred.c: Don't include gethrxtime.h. No longer needed.
6050 * tests/misc/sort-rand: New file: basic tests for the new options.
6051 * tests/misc/Makefile.am (TESTS): Add sort-rand.
6053 2005-12-10 Frederik Eaton <frederik@ofb.net>
6055 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
6056 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
6057 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
6058 Make state size runtime-configurable.
6059 (isaac_new, isaac_copy): New functions.
6060 * src/rand-isaac.h: New file.
6061 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
6062 (fillrand, main): Adjust to the fact that the state size is now
6063 runtime-configurable.
6064 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
6065 (usage): Add options --random-sort and --seed to implement a random
6067 Include md5.h and rand-isaac.h.
6068 (get_hash): New function.
6069 (rand_state): New var.
6070 (HASH_WORDS, HASH_SIZE): New macros.
6072 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
6074 * tests/dd/misc: Add test for dd iflags=noatime.
6076 2005-12-09 Jim Meyering <jim@meyering.net>
6078 * src/sort.c (usage): Mention white space vs -b and -t options.
6081 2005-12-09 Eric Blake <ebb9@byu.net>
6083 * src/test.c (main): Fix misleading comment.
6085 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
6087 * NEWS: Mention dd's new noatime flag.
6088 * src/system.h (O_NOATIME): Define to 0 if not already defined.
6089 * src/dd.c (flags, usage): Add support for noatime flag.
6091 2005-12-07 Jim Meyering <jim@meyering.net>
6093 Distribute the cvsu script, used only by `make syntax-check'.
6094 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
6095 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
6096 distribute a copy of this script.
6097 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
6099 * tests/mv/acl: exit-77 before the trap, not after, if we fail
6100 to create a temporary directory on another partition.
6101 From Andreas Gruenbacher.
6103 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
6105 * man/basename.x: Cross-reference to dirname and readlink.
6106 * man/dirname.x: Cross-reference to basename and readlink.
6108 2005-12-05 Andreas Gruenbacher
6110 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
6111 (set_owner, preserve_author): New functions, factored out of copy_reg.
6112 (copy_reg): Use them.
6113 (copy_internal): Use them here, too.
6115 2005-12-04 Jim Meyering <jim@meyering.net>
6117 * src/sleep.c (usage): Say what happens with two or more arguments.
6118 Suggested by Justin Pryzby.
6120 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
6123 2005-12-03 Jim Meyering <jim@meyering.net>
6125 * src/rm.c (long_opts): Change the name of each undocumented, for-
6126 testing-only option to start with `-', so that it cannot render
6127 ambiguous any prefix it happens to share with some other option name.
6128 Problem reported by Eric Blake.
6129 * src/head.c (long_options): Likewise.
6130 * src/tail.c (long_options): Likewise.
6132 * tests/misc/head-elide-tail: Update uses of undocumented, for-
6133 testing-only --presume* options to start with `---'.
6134 * tests/rm/dangling-symlink: Likewise.
6135 * tests/rm/dir-no-w: Likewise.
6136 * tests/rm/isatty: Likewise.
6138 2005-11-30 Jim Meyering <jim@meyering.net>
6140 * Makefile.maint: Add a comment about cvsu.
6142 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
6144 * NEWS: df updates for "none", "proc", inaccessible file systems.
6145 * src/df.c (show_point): Ignore inaccessible file systems.
6146 (usage): -a includes dummy file systems, not size-0 file systems.
6148 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
6149 to avoid collision with POSIX name space. All uses changed.
6151 2005-11-24 Jim Meyering <jim@meyering.net>
6153 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
6154 * tests/acl: Add `$0: ' prefix to diagnostics.
6156 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
6158 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
6160 * src/copy.c: Improve performance a bit by optimizing away
6161 unnecessary system calls and going to a block size of at least
6162 8192 (on normal hosts, anyway). This improved performance 5% on my
6163 Debian stable host (2.4.27 kernel, x86, copying from root
6164 ext3 file system to itself).
6165 Include "buffer-lcm.h".
6166 (copy_reg): Omit last argument. All callers changed.
6167 Use xmalloc to allocate rather than trusting alloca
6168 (which is unwise with large block sizes).
6169 Declare locals more locally, if possible.
6170 Use uintptr_t words instead of int words, for a bit more speed
6171 when looking for null blocks on 64-bit hosts.
6172 Optimize away reads of zero bytes on regular files.
6173 In the typical case, insist on 8 KiB buffers, at least.
6174 Avoid unnecessary extra call to fstat when checking for sparse files.
6175 Avoid now-unnecessary cast to off_t, and "0L".
6176 Avoid unnecessary test of *new_dst when checking for same owner
6179 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
6181 * src/remove.c (rm): Don't assume C99 for-loop syntax.
6183 2005-11-22 Jim Meyering <jim@meyering.net>
6185 * src/remove.c (AD_push): Remove debugging cruft.
6187 * tests/rm/unread2 (rm): Change expected diagnostic,
6188 `cannot open directory' to `cannot remove', to align with
6190 * tests/rm/rm2: Ensure that rm now continues removing entries
6191 even after certain types of failure.
6193 * src/remove.c: Rewrite. Now, this module is reentrant on systems
6194 that provide openat (Solaris), and on systems like Linux+procfs
6195 where our openat emulation code is reentrant. This also fixes a
6196 few low-probability leaks and eliminates some code that could,
6197 in very unusual circumstances, cause rm() (via a callee) to exit.
6198 * NEWS: Mention this.
6200 * configure.ac: Put copyright dates all on one line so the
6201 emacs function that updates them works properly.
6203 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
6205 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
6206 Problem reported by Eric Blake.
6207 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
6208 we get a standard-conforming compiler. This relies on the new
6209 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
6210 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
6211 m4/c.m4 can go away with Autoconf 2.60 comes out.
6213 2005-11-17 Jim Meyering <jim@meyering.net>
6215 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
6216 (AD_mark_current_as_unremovable): Likewise, but for a local.
6219 * tests/mv/acl: Let traps handle removing temporary directories.
6221 Expect acl-related tests to fail, until the corresponding
6222 patches are committed.
6223 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
6224 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
6226 ACL tests, from Andreas Gruenbacher.
6227 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
6228 * tests/mv/Makefile.am (TESTS): Add acl.
6229 * tests/cp/Makefile.am (TESTS): Add acl.
6231 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
6233 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
6235 * NEWS: Improve quality of ln's diagnostics.
6236 * src/ln.c (do_link, usage): Likewise.
6237 (do_link): Don't use alloca on a buffer of unbounded size.
6239 2005-11-16 Jim Meyering <jim@meyering.net>
6241 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
6242 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
6243 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
6244 This also affects AIX 4.3.3, according to Ralf Wildenhues, in
6245 http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
6247 2005-11-14 Jim Meyering <jim@meyering.net>
6249 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
6251 2005-11-13 Jim Meyering <jim@meyering.net>
6253 * announce-gen: Accept new option, --gpg-key-id=ID and
6254 emit a blurb telling how to use the .sig files.
6255 * Makefile.cfg (gpg_key_ID): Define.
6256 * Makefile.maint (announcement): Use new option and key.
6258 Require that most .c files include <config.h>.
6259 * Makefile.maint (sc_require_config_h): New rule.
6260 (syntax-check-rules): Add it.
6261 * .x-sc_require_config_h: New file listing exceptions to the
6262 above rule. Some are legit, others are simply grandfathered in.
6263 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
6265 2005-11-12 Jim Meyering <jim@meyering.net>
6267 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
6269 2005-11-11 Jim Meyering <jim@meyering.net>
6271 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
6272 Mention new readlink options in 5.3.0's `New features' section.
6273 Spotted by Thomas Hood.
6275 2005-11-08 Jim Meyering <jim@meyering.net>
6277 * NEWS: Merge in changes from b5_9x branch.
6279 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
6281 * NEWS: ls now defaults to --time-style='locale', which in turn acts
6282 like --time-style='posix-long-iso' if the locale settings are messed up.
6283 * src/ls.c (decode_switches): Implement this.
6285 2005-11-08 Jim Meyering <jim@meyering.net>
6287 * tests/du/2g: s/expensive/very expensive/ in a comment.
6290 2005-10-17 Eric Blake <ebb9@byu.net>
6292 * src/ls.c (usage): Fix descriptions of --sort, --time.
6293 Reported by Vitaly A. Ostanin.
6295 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
6297 * src/ln.c: Include filenamecat.c.
6298 (FILE_BASENAME_CONCAT): Remove.
6299 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
6300 (main): Use file_name_concat, base_name, and strip_trailing_slashes
6301 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
6304 2005-11-04 Jim Meyering <jim@meyering.net>
6306 * src/du.c (process_file): Don't overflow for files of size >= 2^31
6307 on systems with stat.st_blocks of a signed 32-bit type.
6308 This bug causes trouble on some AIX 5.1 systems.
6309 Report and trivial patch from Paul Townsend:
6310 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
6311 * NEWS: Mention this.
6313 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
6314 * tests/du/Makefile.am (TESTS): Add it here.
6315 * tests/very-expensive: New file.
6316 * tests/Makefile.am (EXTRA_DIST): Add it here.
6317 * tests/cp/perm: Mark this test as `very-expensive', too.
6319 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
6321 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
6323 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
6325 * src/rm.c (usage): Don't mention rm -d.
6327 2005-11-02 Jim Meyering <jim@meyering.net>
6329 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
6330 From Andreas Schwab.
6332 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
6333 `M+N records in/out' lines don't pollute `make check' output.
6335 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
6336 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
6337 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
6338 to indicate that the input file should be piped into the command
6339 under test (via `cat FILE | $prog ...').
6341 * src/remove.c (remove_entry): Emit a better diagnostic when rm
6342 (without -r) fails to remove a directory on a non-Linux system.
6343 This change affects only newer Solaris systems (with priv_*
6344 functions like priv_allocset). Reported by Keith Thompson.
6346 * tests/rm/dir-nonrecur: New file/test for the above fix.
6347 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
6349 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
6351 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
6352 POSIX 1002.1-2001 requires.
6353 * src/tail.c (parse_obsolete_option): Implement this.
6354 Problem reported by Vincent Lefevre.
6355 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
6356 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
6357 (test_vector): Add special cases for _POSIX2_VERSION, and
6358 regularize the old ones a bit.
6359 * tests/touch/obsolescent: Add y2000 test.
6361 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
6363 * src/dd.c (skip): Fix off-by-one error reported by
6364 Theodoros V. Kalamatianos.
6366 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
6368 * tests/mkdir/p-3: Require that the test be run as non-root.
6369 Problem and trivial fix reported by Theodoros V. Kalamatianos.
6371 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
6373 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
6374 boundary between DEST and SOURCE in the result.
6376 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
6378 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
6379 back to text, to sync with documentation and for backwards
6382 2005-10-25 Jim Meyering <jim@meyering.net>
6384 * tests/dircolors/simple (other-wr): Add an explicit test for
6385 the dircolors bug (NULL-dereference) fixed yesterday.
6387 2005-10-24 Jim Meyering <jim@meyering.net>
6389 * src/tac.c (tac_file): When determining whether a file is seekable,
6390 also test whether it is a tty. Using only the lseek-based test would
6391 give a false positive on Solaris. Reported by Peter Fales.
6393 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
6395 * tests/install/d-slashdot: New test, for "install -d" failure.
6396 * tests/install/Makefile.am (TESTS): Add d-slashdot.
6397 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
6398 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
6400 2005-10-24 Jim Meyering <jim@meyering.net>
6402 * src/dircolors.c (ls_codes): Add missing comma.
6403 Anonymous report and patch from
6404 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
6406 * src/dircolors.c: Add compile-time assertion that the slack_codes
6407 and ls_codes arrays have the same number of elements. This would
6408 have prevented the above-fixed bug.
6410 * src/expand.c (parse_tab_stops): Add a comment to make this function
6411 identical to the one in unexpand.c.
6412 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
6413 identical to the one in expand.c.
6415 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
6417 2005-10-23 Jim Meyering <jim@meyering.net>
6419 * src/md5sum.c (digest_check, main): Use ptr_align rather than
6420 a dangerous pointer-value-to-`unsigned' cast.
6421 * NEWS: mention the new sha* programs.
6422 * AUTHORS: Add new sha* programs.
6424 2005-08-28 David Madore <david.madore@ens.fr>
6426 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
6427 * README: Add their names to the list.
6428 * src/md5sum.c: Provide framework for computing sha-2 hashes.
6429 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
6430 Rules for compiling sha-2 utilities
6431 (noinst_HEADERS): Remove checksum.h.
6432 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
6434 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
6435 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
6436 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
6437 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
6438 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
6439 sha384sum, sha512sum test scripts here rather that each in its
6442 2005-08-28 David Madore <david.madore@ens.fr>
6444 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
6445 of the FIPS test vectors).
6447 2005-10-23 Jim Meyering <jim@meyering.net>
6449 * configure.ac: Use 6.0-cvs as the version string.
6450 * NEWS: Adjust accordingly.
6455 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
6457 Copying and distribution of this file, with or without
6458 modification, are permitted provided the copyright notice
6459 and this notice are preserved.