1 2006-01-24 Paul Eggert <eggert@cs.ucla.edu>
5 * src/df.c (show_dev): If the file system claims to have
6 more available than total blocks, report the number of used
7 blocks as being total - available (a negative number) rather
8 than as garbage. Problem reported by Toralf Foerster.
10 2006-01-24 Jim Meyering <jim@meyering.net>
12 * src/tail.c (tail_forever): Don't exit-nonzero when an attempt
13 to put a regular file in O_NONBLOCK mode fails with EPERM.
14 That happens on Linux when using tail -f on a file with the
15 append-only attribute. Reported by Dean Gaudet. For details,
16 see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
17 * NEWS: Mention this fix.
18 * tests/tail-2/append-only: New file. Test for the above.
19 * tests/tail-2/Makefile.am (TESTS): Add append-only.
20 * tests/Makefile.am (check-root): Add tail-2/append-only
22 2006-01-21 Jim Meyering <jim@meyering.net>
24 * NEWS: Mention fts-related improvements and bug fixes.
26 2006-01-19 Jim Meyering <jim@meyering.net>
28 * tests/fmt/basic (pfx-1, pfx-2): New tests, to demonstrate the bug
29 reported as http://bugs.debian.org/147577. Forwarded by Thomas Hood.
31 2006-01-18 Jim Meyering <jim@meyering.net>
33 * tests/du/Makefile.am (TESTS): Add long-from-unreadable.
35 2006-01-17 Jim Meyering <jim@meyering.net>
37 Now that fts no longer changes the current working directory, adjust
38 its clients accordingly -- note that du.c uses fts but doesn't need
39 any adjustment, since it doesn't operate on the actual files,
40 but rather just uses the stat buffers provided by fts.
42 * src/chown-core.c: Include "openat.h".
43 Don't include "lchown.h".
44 (restricted_chown): Accept a new parameter, CWD_FD, and use it in
45 calling openat, lchownat, chownat, rather than open, lchown, chown.
47 * src/chmod.c: Include "openat.h".
48 (process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
50 * tests/du/long-from-unreadable: New test, to exercise one small
53 2006-01-13 Jim Meyering <jim@meyering.net>
55 * tests/Makefile.am (SUBDIRS): Add comments discouraging the
56 addition of new directories under tests/.
58 * tests/acl: Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's
61 2006-01-12 Jim Meyering <jim@meyering.net>
63 * tests/du/long-sloop: Adjust not to hard-code the expected
64 diagnostic corresponding to ELOOP. Solaris' diagnostic differs
65 from that of GNU libc. Reported by Paul Eggert.
67 * tests/du/long-sloop: Create file at end of symlink chain.
69 * tests/misc/test: New file, with a test for one of the
70 bugs fixed by yesterday's test.c changes.
71 * tests/misc/Makefile.am (TESTS): Add test.
73 2006-01-11 Jim Meyering <jim@meyering.net>
75 * tests/du/long-sloop: New file. Test for today's fts.c bug fix.
76 That bug could make du -L, chgrp -L, or chown -L fail to diagnose
77 a very long sequence of symbolic links (not necessarily a loop).
78 * tests/du/Makefile.am (TESTS): Add long-sloop.
80 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
82 * src/test.c (test_syntax_error): Append a newline. All callers
83 changed, except for the ones that didn't already append a newline.
84 Bug reported by Eric Blake.
86 2006-01-11 Jim Meyering <jim@meyering.net>
88 * src/system.h (X2NREALLOC): Now that verify_true is no longer
89 void, cast its result to void, to avoid gcc's warning that
90 ``left-hand operand of comma expression has no effect''.
91 (DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
93 2006-01-10 Jim Meyering <jim@meyering.net>
95 * tests/chmod/no-x: Add a test for today's fts.c fix.
97 2006-01-10 Jim Meyering <jim@meyering.net> (tiny change)
99 * src/ls.c (gobble_file): Use DTTOIF only if it's defined.
100 This is necessary for Dragonfly. Patch by Joerg Sonnenberger.
102 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
104 * src/system.h (X2NREALLOC, X2REALLOC, DECIMAL_DIGIT_ACCUMULATE):
105 Use verify_true instead of verify_expr, to sync with gnulib.
107 2006-01-08 Jim Meyering <jim@meyering.net>
109 * src/date.c (usage): Adjust the formatting of the entries for
110 %::z and %:::z (separate with two spaces, not one) so that help2man
111 formats them properly. Reported by Philip Rowlands.
113 2006-01-06 Paul Eggert <eggert@cs.ucla.edu>
115 * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add.
117 2006-01-06 Jim Meyering <jim@meyering.net>
119 * Makefile.maint (copyright-check): Use date +%Y in place of
122 * src/remove.c (rm_1): Remove `static' attribute on local `status'.
123 First off, the attribute should have been `volatile' (not static)
124 to avoid longjmp-related risk of clobber. Secondly, now there is
125 no longer any risk of a local variable being clobbered, so there's
126 no need for any attribute at all.
128 2006-01-05 Jim Meyering <jim@meyering.net>
130 * src/remove.c: Give a few functions the inline attribute.
131 (AD_pop_and_chdir): Use gotos to avoid some duplication.
132 (AD_push): Rewrite an assertion so that the entire computation
133 goes away when assertions are turned off.
135 * src/tail.c (ENOSYS) [!defined ENOSYS]: Don't define here.
136 It's already defined in "system.h".
137 * Makefile.maint: Add a FIXME comment.
139 2006-01-04 Jim Meyering <jim@meyering.net>
141 * ChangeLog: Remove entries from 2005-10-22 and earlier.
142 * ChangeLog-2005: New file, for entries up to version 5.92.
144 2006-01-03 Jim Meyering <jim@meyering.net>
146 * tests/du/no-x: Also allow a slightly different diagnostic -- the
147 one you get when using openat-enabled fts.c and du (coming soon).
148 * tests/chmod/no-x: Likewise.
149 * tests/chgrp/no-x: Likewise.
151 * src/system.h (O_DIRECTORY) [!defined O_DIRECTORY]: Define.
153 2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
155 * src/chown-core.c (RC_do_ordinary_chown): New enum value.
156 (restricted_chown): Return it, if the file cannot be accessed due
157 to EPERM, or if no uid or gid are required, or if the file is
158 neither a directory nor a regular file. Rewrite to avoid gotos.
159 (change_file_owner): Handle RC_do_ordinary_chown case.
160 Rewrite to avoid gotos.
161 * tests/chgrp/basic: Make sure we can change the group of
164 * src/date.c (usage): Explain %g, %G, and %V a bit better.
166 2006-01-02 Jim Meyering <jim@meyering.net>
168 * src/copy.c (set_owner): Correct a comment.
170 * src/tail.c (parse_options): Change warning to say that --retry
171 is useful `mainly' (not `only') when following by name.
172 Reported here: http://bugs.debian.org/273781
174 2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
176 * NEWS: Document that mkfifo and mknod -m no longer set special bits.
177 * src/copy.c: Include lchmod.h.
178 (copy_internal): Use lchmod rather than chmod.
179 * src/cp.c: Include lchmod.h.
180 (re_protect, make_dir_parents_private): Use lchmod rather than chmod.
181 * src/mkdir.c: Include lchmod.h.
182 (usage): Clarify -m's operation.
183 (main): Use lchmod rather than chmod. Don't use lchmod unless the
184 new mode contains bits outside the 777 range.
185 * src/mkfifo.c (usage): Clarify -m's operation.
186 (main): If -m is given, don't invoke chmod; use umask 0 instead.
187 Report an error if -m asks for bits outside the 777 range.
188 * src/mknod.c (usage, main): Likewise.
190 * src/mkdir.c, src/mkfifo.c, src/mknod.c: Undo 2005-12-19 changes.
192 2005-12-27 Jim Meyering <jim@meyering.net>
194 * Makefile.maint (sc_obsolete_symbols): Prohibit use of O_NDELAY.
195 (sc_prohibit_assert_without_use): New rule.
196 (syntax-check-rules): Add it to the list.
197 * .x-sc_prohibit_assert_without_use: New empty file.
198 * Makefile.am (EXTRA_DIST): Add it.
200 * Makefile.maint (CVS_LIST): Define in terms of $(srcdir).
202 * cp.c, df.c, link.c, mknod.c, nice.c, sleep.c, unlink.c:
203 Don't include <assert.h>; it wasn't used.
205 2005-12-26 Paul Eggert <eggert@cs.ucla.edu>
207 * src/chown-core.c (restricted_chown):
208 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
209 * src/remove.c (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
210 | O_NOFOLLOW too, for consistency with other dir-openers.
211 Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
212 (is_empty_dir): Likewise.
213 * src/shred.c (wipename): Likewise. Don't bother trying to open
214 dir for writing, since POSIX prohibits it.
216 2005-12-22 Jim Meyering <jim@meyering.net>
218 * tests/help-version: Redirect stderr to /dev/full, to suppress
219 write error diagnostic.
221 2005-12-19 Jim Meyering <jim@meyering.net>
223 * src/mkdir.c, src/mknod.c, src/mkfifo.c (main)
224 Avoid a minor race condition when `-m MODE' is specified, by using
225 open, fchown, and close rather than just chown. To do that reliably --
226 even with an overly restrictive umask -- ensure that each mkdir,
227 mknod and mkfifo call uses a mode including at least owner-read access.
228 * src/mknod.c (main): When `-m MODE' is specified, exit nonzero if
229 the subsequent chown (or equivalent open,fchown,close) fails.
230 * tests/misc/mknod: New tests.
231 * tests/misc/Makefile.am (TESTS): Add mknod.
233 2005-12-17 Jim Meyering <jim@meyering.net>
235 * src/remove.c (is_empty_dir): Open with O_NDELAY, so we don't hang,
236 e.g., on a named pipe.
237 (OPEN_NO_FOLLOW_SYMLINK): Remove definition. Use O_NOFOLLOW in
238 place of all uses, since it is guaranteed (system.h) to be defined.
240 2005-12-05 Andreas Gruenbacher <agruen@suse.de>
242 Add POSIX ACL support
243 * src/ls.c: Switch back from HAVE_ACL to USE_ACL: The acl() syscall
244 is no requirement for ACL support; particularly, it does not exist
245 on systems that have POSIX ACLs.
246 * src/copy.h (cp_option_init) [umask_kill]: Remove member.
247 * src/cp.c (umask_kill): With default acls, the umask is not to be
248 applied. Remove umask_kill, don't change the process umask, and let
249 the kernel apply the umask where appropriate.
250 * src/cp.c (make_dir_parents_private): Fix logic for POSIX ACLs.
251 * src/copy.c (get_dest_mode): Remove; it is obsolete after removing
253 (copy_reg, copy_internal): Use copy_acl and set_acl
254 instead of fchown/chown. Fix the logic for POSIX ACLs.
255 (chown_succeded): Remove; we now always copy acls and
256 preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
257 did a chown before or not.
258 * src/mv.c, src/install.c (cp_option_init): Don't set umask_kill member.
259 * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD,
260 mv_LDADD, ginstall_LDADD): On systems with an ACL library, arrange
261 to link with it via $(LIB_ACL), for the utilities that need it.
263 2005-12-16 Paul Eggert <eggert@cs.ucla.edu>
265 * src/remove.c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
266 (OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
267 (fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
268 value is now signified by whether cwd_errno is null.
269 (fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
270 pointer-to-bool to pointer-to-errno-value. All callers changed.
271 (rm_1): Don't bother setting a local cwd failure flag and then
272 ORing it into the caller's. Just set the caller's.
273 (rm): Use cwd failure errno value to print a slightly-better
276 2005-12-15 Jim Meyering <jim@meyering.net>
278 * src/stat.c (print_it): Properly handle a backslash at the
279 end of a --printf format string. Reported by Paul Eggert.
280 * tests/misc/stat-printf (end-bs): Add a test for the above.
282 2005-12-15 Paul Eggert <eggert@cs.ucla.edu>
284 * tests/acl: Port to pre-POSIX shells like Solaris 8 /bin/sh.
285 Don't assume /etc/passwd contains user names; use 'id' instead.
287 2005-12-15 Jim Meyering <jim@meyering.net>
289 stat: revert behavior of --format=FMT (-c)
290 stat: add new option: --printf=FMT
291 * NEWS: Mention this.
292 * src/stat.c (isodigit, octtobin, hextobin): Define.
293 (PRINTF_OPTION): Define.
294 (interpret_backslash_escapes, trailing_delim): New globals.
295 (usage): Document them. Alphabetize on long option names.
296 (print_esc_char): New function.
297 (print_it): Rewrite, in order to handle backslash escapes.
298 (main): Handle new option. Set globals for --format, too.
300 * tests/misc/stat-printf: Test --printf and --format.
301 * tests/misc/Makefile.am (TESTS): Add stat-printf.
303 2005-12-14 Paul Eggert <eggert@cs.ucla.edu>
305 * NEWS: sort now reports incompatible options.
306 * src/sort.c (incompatible_options, check_ordering_compatibility):
308 (main): Use them. Don't bother with a usage message for
309 "sort -c a b", for consistency with other error diagnostics.
310 * tests/sort/Test.pm (incompat1, incompat2, incompat3, incompat4):
313 * src/cat.c (main): Undo previous change. close_stdout already
314 does the check, so the previous change wasn't necessary.
316 2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
318 * src/cat.c (main): Check for close (STDOUT_FILENO) failure.
320 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
322 Install a more-conservative approach for sort -R. It's the
323 same basic idea as the existing code, except it uses the full ISAAC
324 approach (called the "more kosher" approach in the existing comments).
325 This makes "sort -R" quite a bit slower (about a factor of 2 on my
326 little tests involving 10000 lines on a 2.4 GHz P4), but I think it's
327 better to be conservative here at first, and review any performance
328 improvements carefully.
329 * .x-sc_require_config_h: Add src/rand-isaac.c.
330 * src/rand-isaac.h: Remove. All uses now simply include rand-isaac.c.
331 * src/Makefile.am (noinst_HEADERS): Remove rand-isaac.h.
332 (shred_SOURCES, sort_SOURCES): Remove.
333 (EXTRA_DIST): Add rand-isaac.c.
334 * src/rand-isaac.c: Revert to what used to be in shred.c, without
335 changing it to allow for varying numbers of words in the state.
336 Alter so that we include rand-isaac.c directly rather than
337 compiling it and linking to it. Don't include config.h or
338 system.h; that's the includer's responsibility.
339 Omit functions that are specific to shred.
340 (ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
341 (isaac_step, struct irand_state):
342 Resurrect these, with the same defns that used to be in shred.c.
343 (ISAAC_SIZE, isaac_new, isaac_copy): Remove.
344 (isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
346 (struct isaac_state, isaac_refill, isaac_mix, isaac_init):
347 (isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
348 (irand_init, irand32, irand_mod):
349 Number of words is constant again.
350 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c.
351 * src/shred.c: Include rand-isaac.c rather than rand-isaac.h.
352 * src/sort.c: Likewise.
353 * src/shred.c (fillrand, dopass, main): Undo previous change.
354 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
356 * src/sort.c: Don't include md5.h; it wasn't needed.
357 (struct keyfield): Rename random_hash to random, for consistency
358 with the other member names. All uses changed.
359 (usage): Tweak wording to mention STRING for --seed option.
360 (short_options): Rorder for consistency with other programs.
361 (rand_state): Now a struct, not a pointer to one. All uses changed.
362 (HASH_WORDS, HASH_SIZE): Remove.
363 (get_hash): Remove comments around resbuf size, since we can assume C89.
364 Use a "more-kosher" (but slower) approach of invoking isaac_refill.
365 (keycompare): Adjust to the new get_hash.
367 (badfieldspec): Omit recently-introduced comment; it isn't needed.
368 (main): Don't set need_random simply because gkey has it set; that
369 doesn't necessarily mean we'll need random numbers.
370 Redo seeding to match new get_hash approach.
372 2005-12-10 Jim Meyering <jim@meyering.net>
374 * src/Makefile.am (noinst_HEADERS): Add rand-isaac.h.
376 Avoid shred segfault on 64-bit systems.
377 * src/rand-isaac.c (isaac_refill): Don't try to negate a
378 local of type uint32_t. Make the local an `int' instead.
380 * NEWS: Mention sort's new options.
382 * src/rand-isaac.c (isaac_mix): Declare to be static.
383 Mark all other functions as `extern' so the tight-scope
384 part of `make distcheck' passes once again.
385 * src/rand-isaac.h (isaac_mix): Remove declaration.
387 * src/sort.c (get_hash): Change position of `*' in parameter
388 type to conform with convention.
389 (main): Split a long line so it fits in 80 columns.
390 (keycompare): Remove stray SPACE before TAB that was
391 causing `make distcheck' to fail.
393 * src/shred.c: Don't include gethrxtime.h. No longer needed.
395 * tests/misc/sort-rand: New file: basic tests for the new options.
396 * tests/misc/Makefile.am (TESTS): Add sort-rand.
398 2005-12-10 Frederik Eaton <frederik@ofb.net>
400 * src/Makefile.am (sort_LDADD): Add $(LIB_GETHRXTIME).
401 (shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
402 * src/rand-isaac.c: New file, containing ISAAC code that was in shred.c.
403 Make state size runtime-configurable.
404 (isaac_new, isaac_copy): New functions.
405 * src/rand-isaac.h: New file.
406 * src/shred.c: Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
407 (fillrand, main): Adjust to the fact that the state size is now
408 runtime-configurable.
409 * src/sort.c (short_options, long_options, WORDS, keycompare, main):
410 (usage): Add options --random-sort and --seed to implement a random
412 Include md5.h and rand-isaac.h.
413 (get_hash): New function.
414 (rand_state): New var.
415 (HASH_WORDS, HASH_SIZE): New macros.
417 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
419 * tests/dd/misc: Add test for dd iflags=noatime.
421 2005-12-09 Jim Meyering <jim@meyering.net>
423 * src/sort.c (usage): Mention white space vs -b and -t options.
426 2005-12-09 Eric Blake <ebb9@byu.net>
428 * src/test.c (main): Fix misleading comment.
430 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
432 * NEWS: Mention dd's new noatime flag.
433 * src/system.h (O_NOATIME): Define to 0 if not already defined.
434 * src/dd.c (flags, usage): Add support for noatime flag.
436 2005-12-07 Jim Meyering <jim@meyering.net>
438 Distribute the cvsu script, used only by `make syntax-check'.
439 * Makefile.am (EXTRA_DIST): Add build-aux/cvsu.
440 * Makefile.maint (CVS_LIST): Use build-aux/cvsu, now that we
441 distribute a copy of this script.
442 * .x-sc_unmarked_diagnostics: Add build-aux/cvsu.
444 * tests/mv/acl: exit-77 before the trap, not after, if we fail
445 to create a temporary directory on another partition.
446 From Andreas Gruenbacher.
448 2005-12-06 Tomas Pospisek <tpo@sourcepole.ch> (tiny change)
450 * man/basename.x: Cross-reference to dirname and readlink.
451 * man/dirname.x: Cross-reference to basename and readlink.
453 2005-12-05 Andreas Gruenbacher
455 * src/copy.c [!HAVE_FCHOWN]: Define fchown(...) to -1.
456 (set_owner, preserve_author): New functions, factored out of copy_reg.
457 (copy_reg): Use them.
458 (copy_internal): Use them here, too.
460 2005-12-04 Jim Meyering <jim@meyering.net>
462 * src/sleep.c (usage): Say what happens with two or more arguments.
463 Suggested by Justin Pryzby.
465 * src/uptime.c (print_uptime): Move decl of `upsecs' into scope
468 2005-12-03 Jim Meyering <jim@meyering.net>
470 * src/rm.c (long_opts): Change the name of each undocumented, for-
471 testing-only option to start with `-', so that it cannot render
472 ambiguous any prefix it happens to share with some other option name.
473 Problem reported by Eric Blake.
474 * src/head.c (long_options): Likewise.
475 * src/tail.c (long_options): Likewise.
477 * tests/misc/head-elide-tail: Update uses of undocumented, for-
478 testing-only --presume* options to start with `---'.
479 * tests/rm/dangling-symlink: Likewise.
480 * tests/rm/dir-no-w: Likewise.
481 * tests/rm/isatty: Likewise.
483 2005-11-30 Jim Meyering <jim@meyering.net>
485 * Makefile.maint: Add a comment about cvsu.
487 2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
489 * NEWS: df updates for "none", "proc", inaccessible file systems.
490 * src/df.c (show_point): Ignore inaccessible file systems.
491 (usage): -a includes dummy file systems, not size-0 file systems.
493 * src/od.c (unsigned_long_long_int): Renamed from ulonglong_t,
494 to avoid collision with POSIX name space. All uses changed.
496 2005-11-24 Jim Meyering <jim@meyering.net>
498 * tests/Makefile.am (EXTRA_DIST): Add acl to the list.
499 * tests/acl: Add `$0: ' prefix to diagnostics.
501 * .x-sc_require_config_h: Add lib/buffer-lcm.c to the list.
503 2005-11-23 Paul Eggert <eggert@cs.ucla.edu>
505 * src/copy.c: Improve performance a bit by optimizing away
506 unnecessary system calls and going to a block size of at least
507 8192 (on normal hosts, anyway). This improved performance 5% on my
508 Debian stable host (2.4.27 kernel, x86, copying from root
509 ext3 file system to itself).
510 Include "buffer-lcm.h".
511 (copy_reg): Omit last argument. All callers changed.
512 Use xmalloc to allocate rather than trusting alloca
513 (which is unwise with large block sizes).
514 Declare locals more locally, if possible.
515 Use uintptr_t words instead of int words, for a bit more speed
516 when looking for null blocks on 64-bit hosts.
517 Optimize away reads of zero bytes on regular files.
518 In the typical case, insist on 8 KiB buffers, at least.
519 Avoid unnecessary extra call to fstat when checking for sparse files.
520 Avoid now-unnecessary cast to off_t, and "0L".
521 Avoid unnecessary test of *new_dst when checking for same owner
524 2005-11-22 Paul Eggert <eggert@cs.ucla.edu>
526 * src/remove.c (rm): Don't assume C99 for-loop syntax.
528 2005-11-22 Jim Meyering <jim@meyering.net>
530 * src/remove.c (AD_push): Remove debugging cruft.
532 * tests/rm/unread2 (rm): Change expected diagnostic,
533 `cannot open directory' to `cannot remove', to align with
535 * tests/rm/rm2: Ensure that rm now continues removing entries
536 even after certain types of failure.
538 * src/remove.c: Rewrite. Now, this module is reentrant on systems
539 that provide openat (Solaris), and on systems like Linux+procfs
540 where our openat emulation code is reentrant. This also fixes a
541 few low-probability leaks and eliminates some code that could,
542 in very unusual circumstances, cause rm() (via a callee) to exit.
543 * NEWS: Mention this.
545 * configure.ac: Put copyright dates all on one line so the
546 emacs function that updates them works properly.
548 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
550 * configure.ac (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
551 Problem reported by Eric Blake.
552 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
553 we get a standard-conforming compiler. This relies on the new
554 m4/c.m4 file. Note that it's a bit tricky, since c.m4 doesn't
555 define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
556 m4/c.m4 can go away with Autoconf 2.60 comes out.
558 2005-11-17 Jim Meyering <jim@meyering.net>
560 * src/remove.c (AD_mark_helper): Make a `char *' parameter `const'.
561 (AD_mark_current_as_unremovable): Likewise, but for a local.
564 * tests/mv/acl: Let traps handle removing temporary directories.
566 Expect acl-related tests to fail, until the corresponding
567 patches are committed.
568 * tests/mv/Makefile.am (XFAIL_TESTS): Add acl.
569 * tests/cp/Makefile.am (XFAIL_TESTS): Likewise.
571 ACL tests, from Andreas Gruenbacher.
572 * tests/acl, tests/mv/acl, tests/cp/acl: New files.
573 * tests/mv/Makefile.am (TESTS): Add acl.
574 * tests/cp/Makefile.am (TESTS): Add acl.
576 * src/ls.c (basename_is_dot_or_dotdot): Correct wording in comment.
578 2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
580 * NEWS: Improve quality of ln's diagnostics.
581 * src/ln.c (do_link, usage): Likewise.
582 (do_link): Don't use alloca on a buffer of unbounded size.
584 2005-11-16 Jim Meyering <jim@meyering.net>
586 * tests/cp/fail-perm: Accommodate HPUX. It appears to fail
587 with EACCES rather than EPERM. Reported by Peter O'Gorman here:
588 http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
590 2005-11-14 Jim Meyering <jim@meyering.net>
592 * NEWS (sort): Mention consequences of today's mkstemp-safer.c fix.
594 2005-11-13 Jim Meyering <jim@meyering.net>
596 * announce-gen: Accept new option, --gpg-key-id=ID and
597 emit a blurb telling how to use the .sig files.
598 * Makefile.cfg (gpg_key_ID): Define.
599 * Makefile.maint (announcement): Use new option and key.
601 Require that most .c files include <config.h>.
602 * Makefile.maint (sc_require_config_h): New rule.
603 (syntax-check-rules): Add it.
604 * .x-sc_require_config_h: New file listing exceptions to the
605 above rule. Some are legit, others are simply grandfathered in.
606 * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h here, too.
608 2005-11-12 Jim Meyering <jim@meyering.net>
610 * src/checksum.h, src/md5.c, src/sha1sum.c: Remove now-unused files.
612 2005-11-11 Jim Meyering <jim@meyering.net>
614 * NEWS: Mention `readlink -f' bug fix in 5.3.0 news.
615 Mention new readlink options in 5.3.0's `New features' section.
616 Spotted by Thomas Hood.
618 2005-11-08 Jim Meyering <jim@meyering.net>
620 * NEWS: Merge in changes from b5_9x branch.
622 2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
624 * NEWS: ls now defaults to --time-style='locale', which in turn acts
625 like --time-style='posix-long-iso' if the locale settings are messed up.
626 * src/ls.c (decode_switches): Implement this.
628 2005-11-08 Jim Meyering <jim@meyering.net>
630 * tests/du/2g: s/expensive/very expensive/ in a comment.
633 2005-10-17 Eric Blake <ebb9@byu.net>
635 * src/ls.c (usage): Fix descriptions of --sort, --time.
636 Reported by Vitaly A. Ostanin.
638 2005-11-04 Paul Eggert <eggert@cs.ucla.edu>
640 * src/ln.c: Include filenamecat.c.
641 (FILE_BASENAME_CONCAT): Remove.
642 (do_link): Remove last arg DEST_IS_DIR. All callers changed.
643 (main): Use file_name_concat, base_name, and strip_trailing_slashes
644 instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
647 2005-11-04 Jim Meyering <jim@meyering.net>
649 * src/du.c (process_file): Don't overflow for files of size >= 2^31
650 on systems with stat.st_blocks of a signed 32-bit type.
651 This bug causes trouble on some AIX 5.1 systems.
652 Report and trivial patch from Paul Townsend:
653 <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
654 * NEWS: Mention this.
656 * tests/du/2g: New (very-expensive) test for the above-fixed bug.
657 * tests/du/Makefile.am (TESTS): Add it here.
658 * tests/very-expensive: New file.
659 * tests/Makefile.am (EXTRA_DIST): Add it here.
660 * tests/cp/perm: Mark this test as `very-expensive', too.
662 2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
664 * NEWS: Mention that rm -d and maybe ln -d are scheduled for
666 * src/remove.h (struct rm_options): Remove unlink_dirs. All uses
668 * src/rm.c (usage): Don't mention rm -d.
670 2005-11-02 Jim Meyering <jim@meyering.net>
672 * tests/dd/skip-seek: Fix typo in comment: s/fileutils/coreutils.
675 * tests/dd/unblock-sync: Redirect stderr to /dev/null so the
676 `M+N records in/out' lines don't pollute `make check' output.
678 * tests/dd/skip-seek (sk-seek4): New test, to exercise the bug
679 fixed on 2005-10-31. This test uses the new, IN_PIPE specifier.
680 * tests/Coreutils.pm: Accept a new type of input specifier: IN_PIPE,
681 to indicate that the input file should be piped into the command
682 under test (via `cat FILE | $prog ...').
684 * src/remove.c (remove_entry): Emit a better diagnostic when rm
685 (without -r) fails to remove a directory on a non-Linux system.
686 This change affects only newer Solaris systems (with priv_*
687 functions like priv_allocset). Reported by Keith Thompson.
689 * tests/rm/dir-nonrecur: New file/test for the above fix.
690 * tests/rm/Makefile.am (TESTS): Add dir-nonrecur.
692 2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
694 * NEWS: "tail -c 2 FILE" and "touch 0101000000" now operate as
695 POSIX 1002.1-2001 requires.
696 * src/tail.c (parse_obsolete_option): Implement this.
697 Problem reported by Vincent Lefevre.
698 * src/touch.c (main): Pass PDS_PRE_2000 to posixtime.
699 * tests/tail/Test.pm (c-2, c-2-minus, c2, c2-minus): New tests.
700 (test_vector): Add special cases for _POSIX2_VERSION, and
701 regularize the old ones a bit.
702 * tests/touch/obsolescent: Add y2000 test.
704 2005-10-31 Paul Eggert <eggert@cs.ucla.edu>
706 * src/dd.c (skip): Fix off-by-one error reported by
707 Theodoros V. Kalamatianos.
709 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
711 * tests/mkdir/p-3: Require that the test be run as non-root.
712 Problem and trivial fix reported by Theodoros V. Kalamatianos.
714 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
716 * src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
717 boundary between DEST and SOURCE in the result.
719 2005-10-26 Dmitry V. Levin <ldv@altlinux.org>
721 * src/md5sum.c (main) [!O_BINARY]: Changed default read mode
722 back to text, to sync with documentation and for backwards
725 2005-10-25 Jim Meyering <jim@meyering.net>
727 * tests/dircolors/simple (other-wr): Add an explicit test for
728 the dircolors bug (NULL-dereference) fixed yesterday.
730 2005-10-24 Jim Meyering <jim@meyering.net>
732 * src/tac.c (tac_file): When determining whether a file is seekable,
733 also test whether it is a tty. Using only the lseek-based test would
734 give a false positive on Solaris. Reported by Peter Fales.
736 2005-10-24 Dmitry V. Levin <ldv@altlinux.org>
738 * tests/install/d-slashdot: New test, for "install -d" failure.
739 * tests/install/Makefile.am (TESTS): Add d-slashdot.
740 * tests/mkdir/p-slashdot: New test, for "mkdir -p" failure.
741 * tests/mkdir/Makefile.am (TESTS): Add p-slashdot.
743 2005-10-24 Jim Meyering <jim@meyering.net>
745 * src/dircolors.c (ls_codes): Add missing comma.
746 Anonymous report and patch from
747 http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
749 * src/dircolors.c: Add compile-time assertion that the slack_codes
750 and ls_codes arrays have the same number of elements. This would
751 have prevented the above-fixed bug.
753 * src/expand.c (parse_tab_stops): Add a comment to make this function
754 identical to the one in unexpand.c.
755 * src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
756 identical to the one in expand.c.
758 * src/expand.c (next_file): Don't assume fopen cannot return stdin.
760 2005-10-23 Jim Meyering <jim@meyering.net>
762 * src/md5sum.c (digest_check, main): Use ptr_align rather than
763 a dangerous pointer-value-to-`unsigned' cast.
764 * NEWS: mention the new sha* programs.
765 * AUTHORS: Add new sha* programs.
767 2005-08-28 David Madore <david.madore@ens.fr>
769 Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
770 * README: Add their names to the list.
771 * src/md5sum.c: Provide framework for computing sha-2 hashes.
772 * src/Makefile.am (sha224sum, sha256sum, sha384sum, sha512sum):
773 Rules for compiling sha-2 utilities
774 (noinst_HEADERS): Remove checksum.h.
775 * man/sha512sum.x, man/sha384sum.x, man/sha256sum.x, man/sha224sum.x:
777 * man/Makefile.am (dist_man_MANS): Add the corresponding .1 names.
778 (sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
779 * tests/misc/sha224sum, tests/misc/sha256sum: New files.
780 * tests/misc/sha384sum, tests/misc/sha512sum: New files.
781 * tests/misc/Makefile.am (TESTS): Add new sha224sum, sha256sum,
782 sha384sum, sha512sum test scripts here rather that each in its
785 2005-08-28 David Madore <david.madore@ens.fr>
787 * tests/sha1sum/basic-1 (million-a): Add the "million a's" test (one
788 of the FIPS test vectors).
790 2005-10-23 Jim Meyering <jim@meyering.net>
792 * configure.ac: Use 6.0-cvs as the version string.
793 * NEWS: Adjust accordingly.