Commit Graph

917 Commits

Author SHA1 Message Date
Jim Meyering
1888629627 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2011-09-08 17:23:21 +02:00
Jim Meyering
c7fca77515 version 8.13
* NEWS: Record release date.
2011-09-08 17:04:42 +02:00
Jim Meyering
ac5739d317 cp: update gnulib to get support for NFSv4 ACLs
* NEWS (Improvements): Mention the cp-vs-NFSv4-ACL improvement we
have inherited via gnulib.  For details, see
http://article.gmane.org/gmane.comp.lib.gnulib.bugs/28100
and the following messages in that thread.
* gnulib: Update to latest, for numerous ACL-related improvements.
2011-09-07 17:59:46 +02:00
Jim Meyering
df9cd0a426 date: support parsing of ISO-8601-with-"T" dates
Thanks to an improvement in gnulib's parse-datetime module,
commands like this now succeed (output manually indented):
    $ ./date -u -d 2004-02-29T16:21:42.33+07:00 +%FT%T.%N%z
		   2004-02-29T09:21:42.330000000+0000
* tests/misc/date: Add a test to exercise the new-in-gnulib
parsing of ISO8601-with-"T" dates.
* NEWS (New features): Mention it.
* gnulib: Update, to pull in this parse-datetime improvement.
2011-08-31 20:00:19 +02:00
Pádraig Brady
1f93c96339 pr: fix so that LAST_PAGE is honored with -T
Ever since the LAST_PAGE functionality was added
in commit ed0923a1, 1996-12-05,
"Apply big patch (patch-20) from Roland Huebner"
it was ignored when -t or -T were specified or
when -l <= 10.

* src/pr.c (print_page): Increment the current page here.
(print_header): Don't increment the current page here.
* tests/pr/pr-tests: Add a test case.
* NEWS: Mention the fix

Reported at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9347
2011-08-24 00:21:17 +01:00
Erik Auerswald
423b079f53 doc: correct typo in yesterday's NEWS entry: 30GB -> 30MB
* NEWS: s/30GB/30MB/
2011-08-20 08:12:31 +02:00
Jim Meyering
0ba576979a rm, du, chmod, chown, chgrp: use much less memory for large directories
For details, see the gnulib commit,
http://git.sv.gnu.org/cgit/gnulib.git/commit/?id=47cb657e
* tests/rm/4-million-entry-dir: New test.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
* gnulib: Update to latest to get the required fts fixes.
2011-08-19 18:21:06 +02:00
Jim Meyering
7055579067 join: with --check-order print offending file name, line number and data
* src/join (g_names): New global (was main's "names").
(main): Update all uses of "names".
(line_no[2]): New globals.
(get_line): Increment after reading each line.
(check_order): Print the standard "file name:line_no: " prefix
as well as the offending line when reporting disorder.
Here is a sample old/new comparison:
  -join: file 1 is not in sorted order
  +join: in:4: is not sorted: contents-of-line-4
* tests/misc/join: Change the two affected tests to expect
the new diagnostic.
Add new tests for more coverage: mismatch in file 2,
two diagnostics, zero-length out-of-order line.
* NEWS (Improvements): Mention it.
Suggested by David Gast in http://debbugs.gnu.org/9236
2011-08-08 10:12:38 +02:00
Pádraig Brady
7eaff0fea3 doc: mention the new mirroring behavior of cp -au
* NEWS: Mention the change in behavior.
* doc/coreutils.texi (cp invocation): Likewise.
2011-07-31 13:08:47 +01:00
Paul Eggert
c88f6f22c7 * NEWS: Say that 6.12 preserved ns-resolution timestamps. 2011-07-31 00:27:38 -07:00
Jim Meyering
b2bb19b4b3 doc: mention cp's dir-permissions fix
* NEWS (Bug fixes): Mention yesterday's dir-permissions fix.
2011-07-26 09:24:31 +02:00
Jim Meyering
f28a09810b cp -up: preserve all hard links
* src/copy.c (copy_internal): With --update (-u), this function would
return early once it found that the destination is not older than the
source, *without* recording the source-dev/ino--to--dest_name mapping.
That mapping is required in order to preserve src hard links in the
destination tree, so when using cp with --update and --preserve=links
(perhaps via -p or -a), cp could fail to preserve one hard link
per inode when at least one of the hard-linked names already exists
in the destination tree.
Reported by Odd Harry Mannsverk in http://debbugs.gnu.org/8419.
* tests/cp/preserve-link: New file.  Exercise the flaw/fix.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
2011-07-25 14:15:44 +02:00
Pádraig Brady
aeb5222a6d timeout: support sub-second timeouts
* src/timeout.c (settimeout): A new function to convert
from a floating point duration and call alarm() or
timer_settime() if that's available.
(parse_duration): Return a double rather than unsigned int.
(usage): Mention floating point is supported.
(main): Pass the double to settimeout() rather than
calling alarm() directly with the parsed int.
(cleanup): Likewise.
* doc/coreutils.texi (timeout invocation): Say floating point timeouts
now supported, and mention the caveat with resolution.
* bootstrap.conf: Include the timer-time gnulib module.
* tests/misc/timeout-parameters: Add a test with nanoseconds.
* NEWS: Mention the improvement.
2011-07-25 12:00:26 +01:00
Jim Meyering
c29cb31b7f df: support partitions larger than 4 TiB on MacOS >= 10.5 & AIX >=5.2
This change derives from improvements to gnulib's fsusage module.
* NEWS (Improvements): df now supports disk partitions larger than
4 TiB on MacOS X 10.5 or newer and on AIX 5.2 or newer.
Alphabetize entries.
* gnulib: Update to latest.
2011-07-24 22:58:36 +02:00
Pádraig Brady
65a0483fb5 unexpand: fix misalignment when spaces span a tabstop
The following dropped the space from the first field
  printf "1234567  \t1\n" | unexpand -a
Note POSIX says that spaces should not precede tabs.
Also a single trailing space should not be converted
if the next field starts with non blank characters.
So we enforce those rules too, with this change.

* src/unexpand.c (unexpand): Implement as per POSIX rules.
* tests/misc/unexpand: Add tests, and adjust existing
tests as per POSIX rules.
* NEWS: Mention the fix.
Reported by Hallvard B Furuseth
2011-07-20 10:38:46 +01:00
Paul Eggert
dc7284ef72 * NEWS: Mention fix for Bug#9098. 2011-07-17 12:52:55 -07:00
Pádraig Brady
af1ffdff17 doc: list all new file system types recognized by stat -f
NEWS (Improvements): Mention the MQUEUE and PSTOREFS
file systems, recognized as of commit 171e1b98.
2011-07-08 16:01:27 +01:00
Pádraig Brady
4d90d29899 timeout: support cascaded timeouts
* src/timeout.c (cleanup): Send signals directly to the child
in case it has started its own process group (like a cascaded
timeout command would for example).
* test/misc/timeout-group: Add a test case.
* NEWS: Mention the fix.
2011-07-08 13:54:08 +01:00
Pádraig Brady
4496c94091 timeout: add --foreground to support interactive commands
Or more accurately, commands not started from the shell prompt,
that are interactive, or need to receive Ctrl-C etc. from the terminal.

* doc/coreutils.texi (timeout invocation): Document --foreground.
* src/timeout.c (main): Set the foreground flag and don't create
a separate group.
(cleanup): Only send a signal directly to the monitored command
when the foreground flag is set.
(usage): Describe --foreground.
* tests/misc/timeout-group: Add a new test.
* tests/Makefile.am: Reference new test.
NEWS: Mention the new option.

Reported by Shay Shimony
Analysis by Alan Curry
Fix suggested by Paul Eggert
2011-07-08 11:23:08 +01:00
Patrick Schoenfeld
33171d049a md5sum, sha1sum, etc: accept new option: --strict
Use this new option with --check when the input is expected to
consist solely of checksum lines.  With only --check, an invalid
line evokes a warning, but the program can still exit successfully.
With --strict, any invalid line makes the program exit non-zero.

* src/md5sum.c (strict, STRICT_OPTION): Declare/define.
(long_options): Add "strict".
(usage): Describe --strict.
(digest_check): Count improperly_formatted lines, too, and use
that number and the global "strict" to determine the return value.
(main): Handle STRICT_OPTION.
Reject --strict without --check.
* doc/coreutils.texi: Describe it.
* NEWS (New features): Mention it.
2011-07-07 16:42:47 +02:00
Jim Meyering
473b4fc1e8 stat: recognize GPFS as a file system type
* src/stat.c (human_fstype) [S_MAGIC_GPFS]: Add a case,
to handle GPFS_SUPER_MAGIC/0x47504653.  Prompted by this discussion:
http://thread.gmane.org/gmane.comp.sysutils.autoconf.general/14007
* NEWS (Improvements): Mention it.
2011-07-07 13:58:22 +02:00
Jim Meyering
18839ad9c1 doc: clarify an improvement from coreutils-7.0
* NEWS (7.0 Improvements): Mention the command: "ls -1U".
* cfg.mk (old_NEWS_hash): Update.
2011-06-25 07:59:13 +02:00
Jim Meyering
2f5c2a25ed doc: add NEWS items for recent gnulib fixes
* NEWS (Improvements): Mention the new HP-UX 11.11 ACL support.
(Build-related): Mention the cc/HP-UX 11.11 build fix.
2011-06-13 12:39:23 +02:00
Pádraig Brady
54a49f22ae chown,chgrp: output the original ownership in -v messages
* src/chown-core.c (describe_change): Output the
original owner if possible.
(user_group_str): Handle the case when neither
owner or group are passed.
* NEWS: Mention the change in behavior.
2011-05-27 23:21:46 +01:00
Pádraig Brady
6b282e7510 chown,chgrp: output the correct ownership in -v messages
* src/chown_core.c (describe_change): Accept the ownership of
the original file and output that when not changing.
This is significant when --from is specified as then
the original and specified ownership may be different.
(user_group_str): A new helper function refactored from
describe_change().
(change_file_owner): Pass the original user and group
strings to describe_change().
* test/chown/basic: Add a test case.
* NEWS: Mention the fix.
2011-05-27 22:37:46 +01:00
Bernhard Voelker
e89c998a9e chmod: output the original mode in verbose mode
* src/chmod.c (describe_change): Pass in the original mode,
and output this in the messages.
* tests/chmod/c-option: Adjust as per the new message.
* THANKS.in: Remove the now auto-generated name.
* NEWS: Mention the change in behavior.

Signed-off-by: Pádraig Brady <P@draigBrady.com>
2011-05-25 23:04:12 +01:00
Pádraig Brady
7d44751f0e split: fix cases where -n l/... creates extraneous files
* src/split.c (lines_chunk_split): Ensure that data is only
written to stdout when k specified.  Also ensure that
extra files are not created when there is more data available
than reported in the file size.
* tests/misc/split-lchunk: Verify that split -n l/k/n doesn't
generate any files, and that -n l/n always generates n files.
* NEWS: Mention the fix.
2011-05-24 16:29:48 +01:00
Jim Meyering
cb4a0e31e2 maint: correct typos involving misuse of "a" and "an"
* NEWS: "an misleading"
* src/expr.c: "a integer
* src/ptx.c (find_occurs_in_text): "a end"
* src/shred.c (do_wipefd): "a infinite"
* src/sort.c (SUBTHREAD_LINES_HEURISTIC): "an dual-core"
(compare_random): "an checksum"
* cfg.mk (old_NEWS_hash): Update, since the typo was in old news.
2011-05-19 21:36:33 +02:00
Pádraig Brady
beaa949313 printf: fix an out-of-bounds memory access
* src/printf.c (STRTOX): Don't access memory after a
string containing a single quote character.
* tests/misc/printf: Add tests for various combinations
of single quote characters combined with a numeric format.
* THANKS.in: Add bug reporter.
* NEWS: Mention the fix.

Reported-by: Paul Marinescu <paul.marinescu@imperial.ac.uk>
2011-05-18 07:33:04 +01:00
Pádraig Brady
27873f1deb shuf: use memory more efficiently when returning a subset
* gl/lib/randperm.c (randperm_new): When the number of items
to return H, is much smaller than the total number of items N,
use a hash to represent the sparse permutations of the set N.
This is currently enabled for N > 128K and N/H > 32.
* tests/misc/shuf: Ensure shuf can quickly return 2 numbers
from a large range.
* gl/modules/randperm: Depend on hash.
* NEWS: Mention the change.
2011-05-14 10:30:12 +01:00
Jim Meyering
09baf2287e doc: document split's new --filter=CMD option
* doc/coreutils.texi (split invocation): Describe --filter=CMD.
* NEWS (New feature): Mention it.
2011-05-06 22:54:51 +02:00
Jim Meyering
e3f814a773 post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2011-04-26 16:18:02 +02:00
Jim Meyering
8c6a1d1281 version 8.12
* NEWS: Record release date.
2011-04-26 16:00:50 +02:00
Jim Meyering
740516cd12 dd: work around compilation failure on AIX 5.1 and 5.2
* src/dd.c (O_NOCACHE): Undefine.  This symbol is defined
via AIX's <fcntl.h>, yet used as an enum name in dd.c.
Reported by Gary V. Vaughan in http://debbugs.gnu.org/8555
* NEWS (Portability): Mention this.
2011-04-26 09:27:44 +02:00
Jim Meyering
61de57cd23 tail --follow=name no longer implies --retry
* src/tail.c (tail_forever_inotify): Just as without inotify,
tail --follow=name now terminates when the last tailed-by-name file
is unlinked or moved aside.  This bug was introduced on 2009-06-15
via commit ae494d4b, "tail: use inotify if it is available".
Reported by Tim Underwood in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22286
* NEWS (Bug fixes): Mention this.
* tests/tail-2/follow-name: Test for this.
* tests/Makefile.am (TESTS): Add it.
2011-04-25 10:59:15 +02:00
Jim Meyering
18a474d755 copy: use FIEMAP (extent_copy) only for apparently-sparse files,
to avoid the expense of extent_copy's unconditional use of
FIEMAP_FLAG_SYNC.
* src/copy.c (copy_reg): Do not attempt extent_copy on a file
that appears to have no holes.
* NEWS (Changes in behavior): Document this.  At first I labeled this
as a bug fix, but that would be inaccurate, considering there is no
documentation of FIEMAP semantics, nor even consensus among kernel
FS developers.  Here's hoping SEEK_HOLE/SEEK_DATA support will soon
make it into the linux kernel.
2011-04-20 18:48:48 +02:00
Jim Meyering
5995ed0b38 post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2011-04-13 21:32:49 +02:00
Jim Meyering
8dc5394183 version 8.11
* NEWS: Record release date.
2011-04-13 21:13:50 +02:00
Pádraig Brady
ace9ef2a94 maint: mention dd's new partial read warning in NEWS
* NEWS: Mention the new feature, from commits e1788d9e and 194c1e89
2011-04-13 15:38:36 +01:00
Jim Meyering
4db3c6b5ea doc: tweak NEWS
* NEWS: Slightly obfuscate a line to avoid a false-positive
doubled-word ("is-is") match.
Fix a grammar error in news for 8.2.
* cfg.mk (old_NEWS_hash): Resync.
2011-04-11 14:32:56 +02:00
Jim Meyering
b80e2c7c25 maint: install: remove support for --preserve_context ("_", not "-")
* src/install.c: Its use has elicited a warning for two years.
Use --preserve-context instead.
* NEWS (changes in behavior): Mention this.
2011-04-11 14:32:56 +02:00
Pádraig Brady
80be785c95 maint: misc typo fixes
* src/fiemap.h: s/can not/cannot/
* NEWS: s/in/is/
* doc/coreutils.texi: Remove spurious "and".
s/effect/affect/
Use matched ``...'' quotes.
2011-04-11 11:13:14 +02:00
Pádraig Brady
324571ea4a maint: correct kernel version in NEWS
* NEWS: Adjust to match commit 1c3654cb, 2011-04-02,
"copy: require fiemap sync also for 2.6.38 kernels"
2011-04-07 00:23:00 +01:00
Pádraig Brady
bfdb6b585b copy: process empty extents more efficiently
* src/copy.c (extent_copy): Treat an allocated but empty extent
much like a hole.  I.E. don't read data we know is going to be NUL.
Also we convert the empty extent to a hole only when SPARSE_ALWAYS
so that the source and dest have the same allocation.  This will
be improved soon, when we use fallocate() to do the allocation.
* tests/cp/fiemap-empty: A new test for efficiency and correctness
of copying empty extents.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the change in behavior.
2011-04-01 15:04:18 +01:00
Pádraig Brady
b56b53bd70 copy: protect against overlapping extents
* src/extent-scan.c (extent_scan_read): Add a more stringent check
for OFF_T overflow, to ensure subsequent code is immune.
Detect overlapping extents and adjust, so as files always copied.
Detection using a single scan with fallback to a standard copy
was thought too expensive in memory or time.
* NEWS: Mention the fix
2011-04-01 14:42:46 +01:00
Pádraig Brady
594292a1d8 copy: link rather than copy symlinks, when --link used
This bug was introduced in commit ca9e212c, 2009-09-24,
"cp, mv: use linkat to guarantee semantics", which
inadvertently disabled the creation of hardlinks to symlinks.
However rather than implementing the intention of that commit
and relying on gnulib linkat emulation, we'll revert to the
previous emulation as that maintains ownership and timestamps.

* src/copy.c (copy_internal): Use our existing hardlink to
symlink emulation when link() might dereference the symlink.
Also ensure that we copy the timestamps of the original symlink
when we use the emulation.
* tests/cp/link-symlink: Add a test to ensure timestamps copied.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the fix.
Reported by Ruediger Meier
2011-04-01 14:17:27 +01:00
Pádraig Brady
f69876e558 copy: with fiemap copy, only sync when needed
* src/extent-scan.h (struct extent_scan): Add the fm_flags member to
pass to the fiemap scan.
* src/extent-scan.c (extent_need_sync): A new function used to
detect Linux kernels before 2.6.38.
(extent_scan_init): Add FIEMAP_FLAG_SYNC when needed.
* tests/cp/sparse-fiemap: Adjust comment.
* NEWS: Mention the change in behavior.
Indirectly suggested by Mike Frysinger
2011-03-31 16:46:42 +01:00
Pádraig Brady
99679fff62 df: fix alignment of columns
* src/df.c (alloc_table_row): A new function to allocate storage
for a row of strings.
(print_table): A new function to interate over all stored strings in
the table, and apply alignment honoring the max width of each column.
(get_header): Renamed from print_header, and adjusted accordingly.
(get_dev): Renamed from show_dev.  Also we no longer wrap longer
device names over two lines, which can be an unexpected issue for
scripts parsing the output from df.
(get_disk): s/show_/get_/
(get_point): Likewise.
(get_entry): Likewise.
(get_all_entries): Likewise.
* NEWS: Mention the change.
2011-03-23 16:44:49 +00:00
Jim Meyering
b3f6b33e4b tests: exercise tests new "==" operator
* tests/misc/test: Exercise the new operator.
* NEWS (Changes in behavior): Mention it.
2011-03-22 07:13:59 +01:00
Jim Meyering
56e8714e2b touch: update to latest gnulib to fix Solaris 10 touch segfault
* gnulib: Update to latest, to address http://debbugs.gnu.org/8230.
When built on Solaris 9 and run on Solaris 10, touch would segfault.
Reported by Ben Walton.
* bootstrap: Update from gnulib.
* tests/init.sh: Likewise.
* NEWS (Bug fixes): Mention this.
2011-03-13 18:41:44 +01:00