Commit Graph

583 Commits

Author SHA1 Message Date
Jim Meyering
c3abd70c67 Post-release version change.
* NEWS: Add a line for 6.9+.
* configure.ac (AC_INIT): Set new version string.
2007-03-23 08:22:35 +01:00
Jim Meyering
804bdc3001 Version 6.9.
* NEWS: Record release date and new version number.
* configure.ac (AC_INIT): New version number.
2007-03-22 22:20:02 +01:00
Jim Meyering
553d347d3e Fix a bug in how pr -m -s works.
* NEWS: Describe how the fix affects pr.
* src/pr.c (init_parameters): The --merge (-m) option does
not imply --expand-tabs (-e), so don't set "untabify_input".
Reported by Wis Macomson.
* tests/misc/pr: New file.  Test for the above fix.
* tests/misc/Makefile.am (TESTS): Add pr.
* THANKS: Update.
2007-03-18 16:21:26 +01:00
Andrew Church
2871ad3b45 Fix a bug: cp -x would fail to set mount point permissions.
* NEWS: mention cp -x bug fix
* src/copy.c (copy_internal): Don't return immediately after
copying a mount point that we do not intend to recurse under.
Based on a patch by Andrew Church.
2007-03-03 23:00:18 +01:00
Paul Eggert
817d0261eb Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
* NEWS: With -P, the default block size and output format is not
affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
* src/df.c (main): Implement this.
* doc/coreutils.texi (df invocation): With -P, the default block size
and output format is not affected by DF_BLOCK_SIZE, BLOCK_SIZE, or
BLOCKSIZE.
2007-02-27 19:33:03 +01:00
Jim Meyering
9317cccb8f Post-release version change.
* NEWS: Add a line for 6.8+.
* configure.ac (AC_INIT): Set new version string.
2007-02-25 01:10:07 +01:00
Jim Meyering
cc2d4f6c46 Version 6.8.
* NEWS: Record release date and new version number.
* configure.ac (AC_INIT): New version number.
2007-02-24 21:16:52 +01:00
Jim Meyering
f92a08e171 * NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
Nicer connotations.
* configure.ac: Use 6.7+, not 6.7-dirty.
2007-02-24 13:13:45 +01:00
Paul Eggert
3ea177e3fa * NEWS: sort no longer compresses temporaries by default.
* bootstrap.conf: Remove findprog.
* doc/coreutils.texi (sort invocation): The default is to not
compress.  Don't treat "" specially.
* src/sort.c: Don't include findprog.h.
(create_temp): Compress only if the user specified --compress-program.
* tests/misc/sort-compress: Adjusts tests to match new behavior.
2007-02-24 12:24:27 +01:00
Paul Eggert
c363fcb9f0 * NEWS: sort now uses a --compress-program option rather than
an environment variable.
* doc/coreutils.texi (sort invocation): Document this.
* src/sort.c (usage): Likewise.
(COMPRESS_PROGRAM_OPTION): New const.
(long_options, create_temp, main): Support new option.
* tests/misc/sort-compress: Test it.
2007-02-19 22:11:18 +01:00
Jim Meyering
d282370566 Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
* NEWS: Mention the bug fix.
* tests/misc/pwd-unreadable-parent: New file.
* tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
2007-02-03 20:02:48 +01:00
Paul Eggert
b28a8851ed * NEWS: Document fix for cp --preserve=mode.
* src/copy.c (copy_internal): Omit the group- or other-writeable
permissions when creating a directory, to avoid a race condition
if the special mode bits aren't right just after the directory is
created.
* src/cp.c (make_dir_parents_private): Likewise.
* tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
race fix in copy.c.
2007-02-03 18:45:46 +01:00
Paul Eggert
1c73876f5f * NEWS: Document fix for cp --parents.
* src/cp.c (make_dir_parents_private): Report the error sooner with
"cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
creating the directory, DEST/DIR.
* tests/cp/cp-parents: Test for the non-race-condition bug fixed
by the above change.
2007-02-03 18:12:11 +01:00
Paul Eggert
a0b2bc8de7 * NEWS: New option sort -C, proposed by XCU ERN 127, which looks
like it will be approved.  Also add --check=quiet, --check=silent
as long aliases, and --check=diagnose-first as an alias for -c.
* doc/coreutils.texi (sort invocation): Document this.
Also, mention that sort -c can take at most one file.
* src/sort.c: Implement this.
Include argmatch.h.
(usage): Document the change.
(CHECK_OPTION): New constant.
(long_options): --check now takes an optional argument, and is now
treated differently from 'c'.
(check_args, check_types): New constant arrays.
(check): New arg CHECKONLY, which suppresses diagnostic if -C.
(main): Parse the new options.
* tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
New tests for -C.
2007-01-24 09:06:57 +01:00
Jim Meyering
1f7d56fda5 * NEWS: sort temp file compression: tweak wording.
* src/sort.c (struct sortfile) [name]: Declare member to be const.
2007-01-24 00:22:45 +01:00
Dan Hipschman
f33168da95 * src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
In pipe_fork callers, use these named constants, not "2" and "8".
(proctab, nprocs): Declare to be "static".
(pipe_fork) [lint]: Initialize local, pid,
to avoid unwarranted may-be-used-uninitialized warning.
(create_temp): Use the active voice.  Describe parameters, too.

2007-01-21  James Youngman  <jay@gnu.org>

Centralize all the uses of sigprocmask().  Don't restore an invalid
saved mask.
* src/sort.c (enter_cs, leave_cs): New functions for protecting
code sequences against signal delivery.
* (exit_cleanup): Use enter_cs and leave_cs instead of
calling sigprocmask directly.
(create_temp_file, pipe_fork, zaptemp): Likewise

2007-01-21  Dan Hipschman  <dsh@linux.ucla.edu>

Add compression of temp files to sort.
* NEWS: Mention this.
* bootstrap.conf: Import findprog.
* configure.ac: Add AC_FUNC_FORK.
* doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
variable.
* src/sort.c (compress_program): New global, holds the name of the
external compression program.
(struct sortfile): New type used by mergepfs and friends instead
of filenames to hold PIDs of compressor processes.
(proctab): New global, holds compressor PIDs on which to wait.
(enum procstate, struct procnode): New types used by proctab.
(proctab_hasher, proctab_comparator): New functions for proctab.
(nprocs): New global, number of forked but unreaped children.
(reap, reap_some): New function, wait for/cleanup forked processes.
(register_proc, update_proc, wait_proc): New functions for adding,
modifying and removing proctab entries.
(create_temp_file): Change parameter type to pointer to file
descriptor, and return type to pointer to struct tempnode.
(dup2_or_die): New function used in create_temp and open_temp.
(pipe_fork): New function, creates a pipe and child process.
(create_temp): Creates a temp file and possibly a compression
program to which we filter output.
(open_temp): Opens a compressed temp file and creates a
decompression process through which to filter the input.
(mergefps): Change FILES parameter type to struct sortfile array
and update access accordingly.  Use open_temp and reap_some.
(avoid_trashing_input, merge): Change FILES parameter like
mergefps and call create_temp instead of create_temp_file.
(sort): Call create_temp instead of create_temp_file.
Use reap_some.
(avoid_trashing_input, merge, sort, main): Adapt to mergefps.
2007-01-24 00:00:21 +01:00
Jim Meyering
0928c2414a Make "rm --interactive=never ..." never prompt.
* NEWS: Mention this.
* src/remove.h (enum rm_interactive): New ternary type.
(struct rm_options) [interactive]: Use it, here -- rather than bool.
* src/remove.c (prompt): Reflect type change.
* src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
* src/rm.c (main): Add a FIXME comment for '-d' option.
Adapt to type change of rm_options.interactive.

* tests/rm/i-never: New file.  Test for the above fix.
* tests/rm/Makefile.am (TESTS): Add i-never.
2007-01-17 17:15:20 +01:00
Paul Eggert
f0b5e513d9 Now, "ls -FRL" always follows symbolic links on Linux.
* NEWS: Mention this bug fix.
* src/ls.c (gobble_file): Fix bug reported by
Nobuyuki Tsuchimura in
http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
* tests/ls/follow-slink: Add a test for this case.

Signed-off-by: Jim Meyering <jim@meyering.net>
2007-01-02 07:27:22 +01:00
Paul Eggert
f24ff8f42b * NEWS: dd bs= operands now silently override later ibs= and obs=,
as POSIX requires.
* src/dd.c (scanargs): Implement it.
* tests/dd/misc (outbytes): Test it.
* doc/coreutils.texi (dd invocation): Specify that bs=N
overrides later ibs and obs, undoing part of the
previous change.  (The behavior was wrong.)
2006-12-22 10:09:37 +01:00
Jim Meyering
c8ef95eaed "rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
* src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
Karl Berry reported that a cross-partition "mv /etc/issue ~"
failed with the um,... suboptimal diagnostic,
"mv: cannot remove `/etc/issue': Not a directory".
* tests/rm/Makefile.am (TESTS): Add fail-eacces.
* tests/rm/fail-eacces: New file.
* NEWS: Mention that both mv and rm are affected.
2006-12-21 08:58:11 +01:00
Jim Meyering
d69fc66d81 "cut -f 2- A B" no longer triggers a double-free bug
* src/cut.c (cut_fields): Set file-scoped global to NULL after
freeing it.  This avoids a double-free (and core dump on some systems)
for this usage: "echo 1>a; echo 2>b; cut -f2- a b".  Reported by
James Hunt in <http://bugzilla.redhat.com/220312>.
* NEWS: List this bug fix.
* THANKS: Mention him.
* tests/misc/cut: New file.
* tests/misc/Makefile.am (TESTS): Add cut.
2006-12-20 14:25:55 +01:00
Jim Meyering
24852bf5b5 * NEWS: --preserve-root now works with chgrp, chmod, and chown.
* src/chmod.c (process_file): Do honor the --preserve-root option.
* src/chown-core.c (change_file_owner): Likewise, but here, also
handle the case in which a traversal would go "through" a symlink
to root.  Reported by Matthew M. Boedicker
* tests/chown/preserve-root: Test for the above.
* tests/chown/Makefile.am (TESTS): Add preserve-root.
2006-12-14 11:14:25 +01:00
Jim Meyering
629214eaf8 * NEWS: Mention the chmod fix induced by the recent change to gnulib's openat.m4. 2006-12-14 00:22:50 +01:00
Jim Meyering
0473e718e6 * NEWS: With the change from "-pre" to "-dirty" suffix, also change
from NEXT_VER-pre to CUR_VER-dirty.  So, this is 6.7-dirty.
* configure.ac (AC_INIT): s/6.8-dirty/6.7-dirty/.
2006-12-09 15:57:06 +01:00
Jim Meyering
07af816554 Post-release version change.
* NEWS: Add a line for 6.8-dirty.
* configure.ac (AC_INIT): Set new version string.
2006-12-08 08:28:04 +01:00
Jim Meyering
f044d2d51c Version 6.7.
* NEWS: Record release date.  Remove '-pre' suffix.
* configure.ac (AC_INIT): Remove version string suffix.
2006-12-08 00:03:00 +01:00
Paul Eggert
fc92148eac cp -p now clears special bits if it fails to preserve owner or group
* NEWS: Document the cp -p fix for special bits.
* src/copy.c (set_owner): Now returns a three-way result, so
that the caller can clear the special bits.  All callers changed.
(copy_reg): Don't set the special bits if chown failed.
(copy_internal): Likewise.
* tests/cp/special-bits: Test this fix.
Signed-off-by: Jim Meyering <jim@meyering.net>
2006-12-07 08:10:35 +01:00
Paul Eggert
a4f7b723f0 * NEWS: Document the cp --preserve=ownership fix.
* m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
* src/copy.c (fchmod_or_lchmod): New function.
(copy_reg): New arg OMITTED_PERMISSIONS.  All uses changed.
Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
When creating a file, use O_EXCL, so we're more likely to detect
funny business by other processes.  At the end, if permissions
were omitted, chmod them back in.
(copy_internal): If the ownership might change, omit some permissions
at first, then restore them after chowning the file.
* src/cp.c (make_dir_parents_private): Likewise.
* src/copy.c (cached_umask): New function.
* src/copy.h (cached_umask): New decl.
2006-12-06 20:44:08 +01:00
Jim Meyering
545df07893 NEWS: the du bug affects coreutils-6.4, 6.5 and 6.6. 2006-12-06 13:18:43 +01:00
Jim Meyering
ba45154d8e * NEWS: du --one-file-system (-x) would skip subdirectories of any
directory listed as second or subsequent command line argument.
* tests/du/one-file-system: New file.  Test for today's fts.c fix.
* tests/du/Makefile.am (TESTS): Add one-file-system.
2006-12-03 11:17:35 +01:00
Jim Meyering
e750c5cac8 Post-release version change.
* NEWS: Add a line for 6.7-pre.
* configure.ac (AC_INIT): Bump to 6.7 and add "-pre" suffix.
2006-11-22 16:15:02 +01:00
Jim Meyering
46710dd82a Version 6.6.
* NEWS: Record release date.  Remove "-pre" suffix.
* configure.ac (AC_INIT): Remove "-pre" suffix from version string.
2006-11-22 12:40:57 +01:00
Jim Meyering
b076de8551 * NEWS: Mention the three noteworthy changes, all fixed via gnulib. 2006-11-22 10:14:15 +01:00
Jim Meyering
318fb0502d Post-release version change.
* NEWS: Add a line for 6.6-pre.
* configure.ac (AC_INIT): Bump to 6.6 and add "-pre" suffix.
2006-11-19 19:44:23 +01:00
Jim Meyering
497a5cf465 Version 6.5.
* NEWS: Record release date.  Remove "-cvs" suffix.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-11-19 10:58:55 +01:00
Jim Meyering
1efc5bda6c "ln --backup f f" now produces a sensible diagnostic 2006-11-18 20:19:16 +01:00
Jim Meyering
597bfeb851 * NEWS: Mention this bug fix. 2006-11-12 19:13:32 +01:00
Jim Meyering
5e42576c01 new feature: rm accepts new option: --one-file-system
Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
* src/remove.h (struct rm_options) [one_file_system]: New member.
* src/rm.c (rm_option_init): Initialize it.
(usage): Document the option.
* src/mv.c (rm_option_init): Likewise.
* src/remove.c (remove_dir): With --one-file-system and --recursive,
for each directory command line argument, do not affect a file system
different from that of the starting directory.  And give a diagnostic.
* src/rm.c (ONE_FILE_SYSTEM): New enum.
(main): Handle new option.
* tests/rm/one-file-system: Test the above.
* tests/rm/Makefile.am (TESTS): Add one-file-system.
* tests/Makefile.am (check-root): Add the rm/one-file-system
test to the list.
(EXTRA_DIST): Add other-fs-tmpdir.

* tests/mv/setup: Removed.  Renamed to...
* tests/other-fs-tmpdir: ...this new file.
* tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
* tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
* tests/mv/backup-is-src: Likewise.
* tests/mv/hard-link-1: Likewise.
* tests/mv/leak-fd: Likewise.
* tests/mv/mv-special-1: Likewise.
* tests/mv/part-fail: Likewise.
* tests/mv/part-hardlink: Likewise.
* tests/mv/part-rename: Likewise.
* tests/mv/part-symlink: Likewise.
* tests/mv/partition-perm: Likewise.
* tests/mv/to-symlink: Likewise.
* tests/mv/into-self-2: Likewise.

[doc/ChangeLog]
* coreutils.texi (rm invocation): Describe --one-file-system.
2006-10-25 00:01:33 +02:00
Jim Meyering
0fdbf2e8c7 * NEWS: Add a line for 6.5-cvs.
* configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
2006-10-23 07:59:04 +02:00
Jim Meyering
7054512f14 Remove -cvs suffix here, too. 2006-10-22 23:41:05 +02:00
Jim Meyering
0c0121ed20 Version 6.4.
* NEWS: Record the 6.4 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-10-22 22:21:26 +02:00
Jim Meyering
b1289b8716 * NEWS: (cp --backup fix): Fix a typo. 2006-10-22 18:59:58 +02:00
Jim Meyering
0dc7f78986 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
to dir1/dir2~.
* src/copy.c (copy_internal): Although we do create a backup of each
destination directory when in move mode, don't do that when copying.
Reported by Peter Breitenlohner, in
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
* tests/cp/backup-dir: New file.  Test for the above.
2006-10-14 05:20:27 +00:00
Jim Meyering
f2c088fa10 * NEWS: Mention the above. 2006-10-13 19:05:07 +00:00
Paul Eggert
2983bf7c85 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
Bob Proulx.
2006-10-09 20:38:56 +00:00
Jim Meyering
1d4ac49f9d * NEWS: Update here, too. 2006-10-03 22:07:36 +00:00
Jim Meyering
da9541f18e With --force (-f), rm no longer fails for ENOTDIR.
* src/remove.c (ignorable_missing): New function.
Use it everywhere, rather than open-coding the test.
Andreas Schwab reported the ENOTDIR problem.
(ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
* NEWS: Mention the bug fix.
* tests/rm/ignorable: New file.  Test for the ENOTDIR case.
* tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
* tests/rm/Makefile.am (TESTS): Add the new file names.
2006-10-03 13:13:09 +00:00
Jim Meyering
d2e7358a9b * NEWS: Add a line for 6.4-cvs.
* configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
2006-10-02 11:47:48 +00:00
Jim Meyering
10688306fa Version 6.3.
* NEWS: Record the 6.3 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.

* NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
2006-09-30 07:43:21 +00:00
Jim Meyering
e245139e46 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
the pinky segfault.
2006-09-29 21:37:18 +00:00
Jim Meyering
a38becce97 * src/shuf.c (read_input): Fix an off-by-one error that
would cause an infloop for piped input of 8KB or more.
* NEWS: Mention the fix.
* tests/misc/shuf: Test for the above fix.
2006-09-29 16:52:48 +00:00
Jim Meyering
a4d470409f Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
and NFS, whereby rm would not remove all files in a directory.
* src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
(NEED_REWIND): New macro, so that we incur the cost of the work-around
rewinddir only on afflicted systems.
* NEWS: Clarify and correct.
* tests/rm/readdir-bug: New file.  Test for the above fix.
* tests/rm/Makefile.am (TESTS): Add it.
Prompted by testing and analysis from Bruno Haible:
http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
2006-09-29 09:54:24 +00:00
Jim Meyering
a86a56f7d1 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
it from removing a directory containing 188 or more entries.
* src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
Reported by Matthew Woehlke.
2006-09-26 20:42:43 +00:00
Paul Eggert
b7c315cdda [ChangeLog]
* NEWS: "groups user" no longer outputs "user :"; you need at least
two users.  "groups" now processes options like --help more compatibly.
* src/groups.sh: Implement the option-processing change.
Handle user and group names with special characters more robustly.
Report write errors instead of exiting silently with status 1.
[doc/ChangeLog]
* coreutils.texi (groups invocation): "groups" no longer prefixes
the output with "user :" unless more than one user is specified.
2006-09-26 19:11:25 +00:00
Jim Meyering
5f65d05616 * NEWS: Mention the bug fix.
* src/groups.sh: Don't hide a write failure.
Reported by Iain Calder <ic56@rogers.com>.
2006-09-26 09:28:17 +00:00
Jim Meyering
e05de760c2 * NEWS: Mention these fixes.
* src/copy.c (copy_reg): With --verbose (-v), print
"removed `file_name'" just after unlinking a file.
(copy_internal): Likewise, in three more places.
Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
2006-09-24 19:28:25 +00:00
Jim Meyering
200aa48e15 * NEWS: Mention the improvement to sort. 2006-09-24 11:44:16 +00:00
Paul Eggert
2a01141018 * NEWS: Document fix for cp -i and mv -i.
* src/copy.c (copy_internal): With -i, prompt even if the source
is a directory and the destination is not.  This is required by
POSIX and gives the user a chance to bail out before failing.
* tests/cp/Makefile.am (TESTS): Add cp-i.
* tests/cp/cp-i: New file.
* tests/mv/Makefile.am (TESTS): Add i-5.
* tests/mv/i-5: New file.
2006-09-20 17:32:14 +00:00
Jim Meyering
fae30e1af9 * NEWS: Mention the chmod bug fix. 2006-09-20 13:30:55 +00:00
Jim Meyering
c9c0dc7bc6 * NEWS: Add a line for 6.3-cvs.
* configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
2006-09-18 13:01:09 +00:00
Jim Meyering
8cd9d29cfe duh 2006-09-18 07:51:48 +00:00
Jim Meyering
97f9240eaa *** empty log message *** 2006-09-18 07:51:33 +00:00
Jim Meyering
500fdd0af9 *** empty log message *** 2006-09-18 07:51:07 +00:00
Jim Meyering
7da3ac75c2 Version 6.2.
* NEWS: Record the 6.2 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-09-18 05:58:55 +00:00
Paul Eggert
b67faf329c * NEWS: Document that mkdir -p and install -d now fork on occasion.
* bootstrap.conf (gnulib_modules): Add savewd.
* src/install.c: Include savewd.h.
(process_dir): New function.
(main, install_file_in_file_parents): Use it, along with the new
savewd module, to avoid some race conditions.
* src/mkdir.c: Include savewd.h.
(struct mkdir_options): New members make_ancestor_function, mode,
mode_bits.
(make_ancestor): Return 1 if the resulting directory is not readable.
(process_dir): New function.
(main): Use it, along with new savewd module, to avoid some
race conditions.  Fill in new slots of struct mkdir_options, so
that callees get the values.
* tests/install/basic-1: Test for coreutils 5.97 bug that was
fixed in coreutils 6.0, and which should still be fixed with
this change.
* tests/mkdir/p-3: Likewise.
2006-09-16 20:03:56 +00:00
Paul Eggert
5c81574ed5 tail now ignores the -f option if POSIXLY_CORRECT is set,
no file operand is given, and standard input is any FIFO.
2006-09-08 17:19:51 +00:00
Jim Meyering
d7619b5fe8 mv and "cp -r" no longer fail when invoked with two arguments
where the first one names a directory and the second name ends in
a slash and doesn't exist.  E.g., "mv dir B/", for nonexistent B,
now succeeds, once more. This reverts part of the 2004-06-27
change for 5.3.0.
* NEWS: Say the above.
* src/mv.c (target_directory_operand): Don't require (here)
that the target operand "look like" a directory.  This change
pushes the test down to the rename syscall level, where a
"mv dir existing-non-dir/" will mistakenly succeed on older systems
that ignore trailing slashes in the rename destination argument.
* src/cp.c (target_directory_operand): Likewise, but for cp.
* tests/mv/trailing-slash: Exercise the above fixes.
* tests/cp/trailing-slash: New file.
* tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
2006-09-08 17:08:53 +00:00
Jim Meyering
2809bfb8f7 (Infrastructure changes): make wording more accurate 2006-09-04 07:50:16 +00:00
Jim Meyering
5e451b260f * NEWS: Tweak the wording in the new change description so that
no one can think this change causes e.g., `rm -fr foo../' to fail.
2006-09-03 20:16:38 +00:00
Paul Eggert
b539762854 rm now rejects attempts to remove /, ./, and ../. 2006-09-03 02:50:41 +00:00
Jim Meyering
e7573e15d9 * NEWS: Mention this. 2006-08-27 19:46:26 +00:00
Jim Meyering
146af5fb13 Fix "mv --verbose --backup" so its output includes the
" (backup: foo.~1~)" suffix also when backing up a directory.
* NEWS: Report this bug fix.
* src/copy.c (emit_verbose): New function, factored out of...
(copy_internal): ...here.  Use the new function.
* tests/mv/backup-dir: Test for the above fix.
2006-08-26 15:53:24 +00:00
Jim Meyering
967e0c11ea "ls --color" would highlight other-writable and sticky directories
no differently than regular directories on a file system with
dirent.d_type support.
* NEWS: Say the above.
* src/ls.c (gobble_file): With --color, also stat the file when
we know it is a directory.
Derived from an anonymous one-line fix and bug report:
<https://savannah.gnu.org/bugs/?15043>.
* tests/ls/color-dtype-dir: New file.  Test for the above fix.
* tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
2006-08-26 06:46:17 +00:00
Paul Eggert
882c0d8d35 * NEWS: printf supports the I flag.
* src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
2006-08-23 23:38:27 +00:00
Jim Meyering
2594cd456d * NEWS: Mention the sweeping infrastructure changes. 2006-08-23 09:17:14 +00:00
Jim Meyering
11fd62b008 add -cvs suffix 2006-08-20 15:53:11 +00:00
Jim Meyering
1227e8c08b * NEWS: Add a line for 6.2-cvs.
* configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
2006-08-20 14:23:38 +00:00
Jim Meyering
929910e100 remove -cvs suffix, too 2006-08-19 19:35:28 +00:00
Jim Meyering
7b88d1ba67 * Version 6.1.
* NEWS: Record the 6.1 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-08-19 18:33:50 +00:00
Jim Meyering
6a15128cef *** empty log message *** 2006-08-19 17:37:28 +00:00
Jim Meyering
b35bd50ce6 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
when the file's apparent size is not a multiple of its block size.
* src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
For some file sizes, writing that single byte would unnecessarily
waste a few file blocks.  That write may have been necessary in the
early days of Linux, but now, removing it should be safe.
Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
* tests/cp/sparse: New test for the above.
* tests/cp/Makefile.am (TESTS): Add sparse.

* tests/sparse-file: New file, essence factored out of...
* tests/du/8gb: ... here.  Use the new script.
2006-08-19 14:01:29 +00:00
Paul Eggert
218fa5c61b Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
Jim Meyering
734afd5f62 *** empty log message *** 2006-08-16 09:55:48 +00:00
Paul Eggert
9e2b97bf35 * NEWS: Mention that df exits with nonzero status if it generates
no output.  This change was in 6.0 but inadvertently unmentioned.
* doc/coreutils.texi (df invocation): df exits nonzero if it outpus
nothing.
* src/df.c (file_systems_processed): Renamed from n_valid_args, and now
a boolean.
(show_dev): Don't set it until we actually output something.
Print the header if this is the first output.
(main): Don't print a header, as that is now show_dev's job.
* tests/misc/Makefile.am (TESTS): Add df.
* tests/misc/df: New file.
2006-08-15 23:41:24 +00:00
Jim Meyering
d8139747b1 * NEWS: Add a line for 6.1-cvs.
* configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
2006-08-15 17:00:00 +00:00
Jim Meyering
3a246cc314 * Version 6.0 [unstable].
* NEWS: Record the 6.0 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-08-15 11:12:07 +00:00
Paul Eggert
6767712f7e Add shuf. Mention new --random-source option for shred and sort.
Move "sort +1 -2" notice to the appropriate section, and clarify its
role with respect to POSIXLY_CORRECT.
2006-08-08 22:10:39 +00:00
Paul Eggert
6eb119a91e chmod now preserves setuid and setgid bits on directories
if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
2006-07-28 07:27:56 +00:00
Paul Eggert
b7f9a7ed05 Clarify the "chmod 0500" news, and correct the vague
statements about compatibility with BSD.
2006-07-25 18:38:58 +00:00
Jim Meyering
2c5f6e6e2c mention yesterday's other ls bugfix 2006-07-21 08:58:00 +00:00
Jim Meyering
9e0a095be6 Fix another bug: ls --indicator-style=file-type would call
stat for a symlink, even though it wasn't always needed.
In some cases, that unnecessary stat would cause ls to fail.
* src/ls.c (gobble_file): Don't treat symlinks specially (in
requiring a stat syscall).  Remove the offending exclusion.
* NEWS: Mention the fix.
* tests/ls/stat-dtype: New file/test, for the above fix.
Also exercises the new df feature, below.
2006-07-21 08:49:24 +00:00
Paul Eggert
999eeed90f chmod, install, and mkdir now leave setgid and setuid bits
of directories alone unless you specify them explicitly.
install and mkdir now implement X correctly.
install now creates parent directories with mode 755, without
changing their owner or group.
2006-07-17 03:02:45 +00:00
Jim Meyering
1ac491f062 * NEWS: Mention that mv can now remove an empty destination directory,
and give an example.  Prompted by a report from Florent Bayle.
2006-07-07 06:38:36 +00:00
Paul Eggert
31acf81fa0 With no operand, 'tail -f' now silently ignores the '-f'
only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
2006-07-01 23:53:05 +00:00
Paul Eggert
69f1a97138 seq defaults to a minimal fixed point format that does not lose
information if seq's operands are all fixed point decimal numbers.
You no longer need the `-f%.f' in `seq -f%.f 1048575 1024 1050623',
for example, since the default format now has the same effect.

seq now lets you use %a, %A, %E, %F, and %G formats.

seq now uses long double internally rather than double.
2006-07-01 00:11:23 +00:00
Paul Eggert
3869e29196 Support obsolete usages like "sort +1 -2" even when conforming to
POSIX 1003.1-2001.
2006-06-28 23:49:58 +00:00
Jim Meyering
78b166d1b1 * NEWS: rm no longer fails to remove an empty, unreadable directory
* src/remove.c (remove_cwd_entries): If we can't open a directory,
and the failure is not being ignored, try to remove the directory
with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
Problem report and test case from Paul Eggert in
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
* tests/rm/empty-inacc: New test, for the above.
2006-06-26 13:02:01 +00:00
Jim Meyering
cc70571401 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
contains a list of NUL-separated file names.

* src/wc.c: Include "readtokens.h".
(usage): Describe the new option, and adjust the `Usage':
with this option, no FILE may be specified on the command line.
(main): Handle the new option.
* tests/misc/wc-files0: New tests, for the above.
* tests/misc/wc-files0-from: Likewise.
* tests/misc/Makefile.am (TESTS): Add wc-files0.
2006-06-25 18:26:09 +00:00
Jim Meyering
d9f0cce0f4 Mention the AIX-strndup-bug vs. dircolors workaround. 2006-06-10 09:41:39 +00:00
Jim Meyering
790892db65 Ensure that cat works with any of the options, -A -v -e -E -T,
when applied to files in /proc and /sys, even when the FIONREAD
ioctl produces nonsensical results.  Before this change, cat would
produce no output (or truncated output), for some linux kernels.

* src/cat.c (write_pending): New function, factored out of cat.
(cat): Also interpret a negative ioctl/FIONREAD count as indicating
that there are bytes to read.  Some versions of linux-2.6.16 do that.
Write any pending output before returning.
Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
* NEWS: Mention this bug fix.
* tests/misc/cat-proc: New file.  Test for the above.
* tests/misc/Makefile.am (TESTS): Add cat-proc.
2006-06-08 20:13:37 +00:00
Paul Eggert
0038f24b9a The 'expr' command now detects and reports integer overflow. 2006-06-07 05:52:07 +00:00
Jim Meyering
6293c4ae50 `cp --link --no-dereference' now works also on systems where the
link system call cannot create a hard link to a symbolic link.
2006-06-03 09:04:05 +00:00
Jim Meyering
17fc4cd8ab *** empty log message *** 2006-05-27 15:13:35 +00:00
Jim Meyering
df91a82135 chgrp now supports --preserve-root, --no-preserve-root 2006-05-27 15:01:36 +00:00
Paul Eggert
32cea0d8ae Remove mention of --seed. 2006-05-25 16:48:05 +00:00
Jim Meyering
d523a83be5 *** empty log message *** 2006-05-21 22:04:34 +00:00
Jim Meyering
197f7d766e mention cp -p vs. no-/proc fix 2006-05-16 17:27:04 +00:00
Jim Meyering
ccafe4292f Mention that:
mv -T DIR EMPTY_DIR no longer fails unconditionally
2006-05-11 08:57:45 +00:00
Jim Meyering
f79fbe2212 *** empty log message *** 2006-05-11 07:33:10 +00:00
Jim Meyering
f7e3e90916 mention the df fix of 2006-01-24 2006-05-07 15:53:25 +00:00
Jim Meyering
afbf453a82 *** empty log message *** 2006-05-06 21:09:35 +00:00
Jim Meyering
e0beb8aab5 mention the shred-segfault fix 2006-05-06 16:03:20 +00:00
Jim Meyering
23e6a454b4 remove stray stat-related line 2006-05-06 16:01:39 +00:00
Jim Meyering
aac1ddf240 mention pwd fix 2006-05-04 10:00:40 +00:00
Jim Meyering
db6a912f8c [New features]: Mention ls's new option, --group-directories-first 2006-04-23 21:38:32 +00:00
Paul Eggert
dfe1ede00d csplit, nl, expr now conform to POSIX better, and are
more-compatible with traditional Unix, with respect to regular
expressions.
2006-04-12 07:49:34 +00:00
Jim Meyering
5378e090da deprecate ptx's --copyright (-C) option 2006-03-28 09:46:38 +00:00
Jim Meyering
ba3419a626 Improvements to dirname/basename handling on platforms like
cygwin with distinct // and with drive letters.
2006-03-26 11:59:31 +00:00
Paul Eggert
9f6b2d2548 nohup diagnostics are now more precise, and nohup now
redirects stderr to nohup.out if stdout is closed and stderr is a tty.
2006-03-23 23:34:22 +00:00
Jim Meyering
6754d7a74f *** empty log message *** 2006-03-10 21:44:30 +00:00
Jim Meyering
b72303e7e6 mention today's rm -r fix. 2006-03-10 21:31:53 +00:00
Paul Eggert
e190228997 Document dd's new 'directory' and 'nolinks' flags. 2006-03-08 18:57:21 +00:00
Jim Meyering
f3465b0ec6 mention new program: base64 2006-02-27 10:47:56 +00:00
Jim Meyering
f97b02c197 New option for rm: --interactive=once (-I).
Document it, along with change to rm --interactive.
2006-02-20 12:50:38 +00:00
Jim Meyering
8bb7d21a7c Bug fix:
rm -r must remove an empty directory, even if it is inaccessible.
2006-02-11 19:25:26 +00:00
Jim Meyering
82959f79fe Mention the `cp -RL' bug fix. 2006-02-06 12:42:13 +00:00
Jim Meyering
d99e1c3342 tail -f once again works on a file with the append-only
attribute (affects at least Linux ext2, ext3, xfs file systems)
2006-01-24 10:36:28 +00:00
Jim Meyering
af1885b91f Mention fts-related improvements and bug fixes. 2006-01-21 11:16:43 +00:00
Paul Eggert
70efb5ac20 Document that mkfifo and mknod -m no longer set special bits. 2006-01-02 07:28:08 +00:00
Jim Meyering
5124a296ab stat: revert behavior of --format=FMT (-c)
stat: add new option: --printf=FMT
2005-12-15 12:24:54 +00:00
Jim Meyering
2a390dea1f *** empty log message *** 2005-12-15 08:37:14 +00:00
Paul Eggert
1dbd70442d sort now reports incompatible options. 2005-12-14 22:46:17 +00:00
Jim Meyering
2f33661051 Mention sort's new options. 2005-12-10 21:10:21 +00:00
Paul Eggert
d17f5073fc Mention dd's new noatime flag. 2005-12-07 21:10:33 +00:00
Paul Eggert
bb14284481 df updates for "none", "proc", inaccessible file systems. 2005-11-26 07:51:27 +00:00
Jim Meyering
5db92fc43c *** empty log message *** 2005-11-22 16:23:21 +00:00
Jim Meyering
b5373161d0 Rewrite. Now, this module is reentrant on systems
that provide openat (Solaris), and on systems like Linux+procfs
where our openat emulation code is reentrant.  This also fixes a
few low-probability leaks and eliminates some code that could,
in very unusual circumstances, cause rm() (via a callee) to exit.
2005-11-22 15:33:26 +00:00
Paul Eggert
114492b826 Improve quality of ln's diagnostics. 2005-11-16 22:31:44 +00:00
Jim Meyering
12fc258f9f *** empty log message *** 2005-11-15 18:03:26 +00:00
Jim Meyering
087fd33c32 *** empty log message *** 2005-11-15 17:21:12 +00:00
Jim Meyering
53d4c7bf09 *** empty log message *** 2005-11-15 07:24:45 +00:00
Jim Meyering
8d9ddc0c12 *** empty log message *** 2005-11-14 11:07:18 +00:00
Jim Meyering
f0afe32b84 (sort): Mention consequences of today's mkstemp-safer.c fix. 2005-11-14 10:54:07 +00:00
Jim Meyering
f1126d2639 Mention `readlink -f' bug fix in 5.3.0 news.
Mention new readlink options in `New features' section.
2005-11-11 17:15:06 +00:00
Jim Meyering
8b5df58140 Merge in changes from b5_9x branch. 2005-11-08 21:10:52 +00:00
Paul Eggert
de4224e5df ls now defaults to --time-style='locale'. 2005-11-08 20:58:57 +00:00
Jim Meyering
e239238882 mention the du bug fix 2005-11-04 10:10:54 +00:00
Paul Eggert
162a2d69bc Mention that rm -d and maybe ln -d are scheduled for
removal in 2006.
2005-11-02 21:51:16 +00:00
Jim Meyering
f626cd65cc *** empty log message *** 2005-11-02 09:58:43 +00:00
Paul Eggert
fd449d30a8 "touch 0101000000" now operates as POSIX 1003.1-2001 requires. 2005-11-01 23:41:13 +00:00