summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-11-06stat: use e.g. %.3X instead of %X.%3:X for sub-second precisionPaul Eggert
* NEWS: Document this. * doc/coreutils.texi (stat invocation): Likewise. * gl/lib/fstimeprec.c, gl/lib/fstimeprec.h, gl/modules/fstimeprec: * gl/modules/fstimeprec-tests, gl/tests/test-fstimeprec.c: New files. * bootstrap.conf (gnulib_modules): Add fstimeprec. * src/stat.c: Include fstimeprec.h. Don't include xstrtol.h. (decimal_point, decimal_point_len): New static vars. (main): Initialize them. (epoch_sec, out_ns): Remove. (out_int, out_uint): Now returns whatever printf returned. (out_minus_zero, out_epoch_secs): New functions. (print_stat): Use out_epoch_sec instead of out_ns and epoch_sec. (print_stat, print_it, usage): Remove the %:X-style formats. * tests/misc/stat-nanoseconds: Set TZ=UTC0 to avoid problems with weird time zones. Use a time stamp near the Epoch so that we don't have to worry about leap seconds. Redo test cases to match new behavior. * tests/touch/60-seconds: Change %Y.%:Y to %.9Y, to adjust to new behavior.
2010-11-04cp: NEWS entry for previous fixEric Blake
Resolves bug#7324 * NEWS: Document the extent of the Solaris crash.
2010-11-04cp, mv, touch: fix file time manipulation on Solaris 10Eric Blake
* gnulib: Update to latest, for futimens fix. * .gitignore: Ignore another recent gnulib-generated file.
2010-11-03build: update gnulib to latestJim Meyering
2010-11-03stat: revert %X-%Y-%Z change; use e.g., %:X to print fractional secondsJim Meyering
This reverts part of the recent commit 9069af45, "stat: print timestamps to full resolution", which made %X, %Y, %Z print floating point numbers. We prefer to retain portability of %X, %Y and %Z uses, while still providing access to full-resolution time stamps via modified format strings. Also make the new %W consistent. * src/stat.c: Include "xstrtol.h". (print_it): Accept a new %...:[XYZ] format directive, e.g., %:X, to print the nanoseconds portion of the corresponding time. For example, %3.3:Y prints the zero-padded, truncated, milliseconds part of the time of last modification. (print_it): Update print_func signature to match. (neg_to_zero): New helper function. (epoch_time): Remove function; replace with... (epoch_sec): New function; use timetostr. (out_ns): New function. Use "09" only when no other modifier is specified. (print_statfs): Change type of "m" to unsigned int, now that it must accommodate values larger than 255. (print_stat): Likewise. Map :X to a code of 'X' + 256. Likewise for Y, Z and W. (usage): Update. * tests/touch/60-seconds: Use %Y.%:Y in place of %Y. * tests/misc/stat-nanoseconds: New file. * tests/Makefile.am (TESTS): Add it. * NEWS (Changes in behavior): Mention this. With improvements by Pádraig Brady. Thanks to Andreas Schwab for raising the issue.
2010-11-01tests: fix a false positive for 32 bit on 64 bit hostsNix
* tests/ls/stat-free-symlinks: strace currently outputs an informational message about arch difference to stdout. Therefore we need to strip that before comparison.
2010-10-28maint: remove an unnecessary FIXME commentPatrick W. Plusnick II
* src/seq.c (terminator): This does not need to be specifiable via an option. Remove the FIXME comment.
2010-10-27cp: make --attributes-only override --reflink completelyPádraig Brady
* doc/coreutils.texi (cp invocation): Change the description slightly so as users might not immediately discount using this option. Mention that --reflink is overridden by the other linking options and --attributes-only, and give an example where this might be useful. * src/copy.c (copy_internal): Bypass the reflink if --attributes-only is specifed. * tests/cp/reflink-perm: Ensure both --reflink modes are overridden by --attributes-only. * NEWS: Mention the change in behavior. Reported by Jim Meyering.
2010-10-26tests: mention that btrfs also causes failure of misc/ls-timeJim Meyering
* tests/misc/ls-time: Mention that this test also fails on btrfs, at least until http://bugzilla.redhat.com/591068 is addressed.
2010-10-25maint: update THANKSEric Blake
* THANKS: Update.
2010-10-25date: correct typos in date --helpTobias Quathamer
* src/date.c (usage): Use "e.g." correctly.
2010-10-25tail: support rechecking currently missing remote dirsPádraig Brady
src/tail.c (main): As an optimization, don't bother checking for stdin or remote files, when ---disable-inotify is specified. To improve the fix in commit 61b77891, set the disable_inotify flag when we fall back to polling, so that we recheck remote files. NEWS: Mention the fix
2010-10-23du: don't print junk when diagnosing out-of-range time stampsPaul Eggert
* src/du.c (show_date): Fix call to fputs with a buffer that contains some uninitialized data. * tests/Makefile.am (TESTS): Add du/big-timestamp. * tests/du/bigtime: New file, which checks for the bug.
2010-10-20doc: add a cross reference from cat's man page to "tac"Rodrigo Campos
* man/cat.x: See also "tac".
2010-10-19tests: trigger and test for md5sum's new diagnosticsJim Meyering
* tests/misc/md5sum: Test for new diagnostics.
2010-10-19md5sum: print a summary warning for improperly formatted linesBenno Schulenberg
And remove the now-superfluous totals from the other two warnings, so the plurals will also work in other languages than English. * src/md5sum.c (digest_check): Change as above. * tests/misc/md5sum (check-quiet2): Adjust accordingly.
2010-10-18build: enable -Werror for gnulib-tests, tooJim Meyering
* gnulib: Update to latest for warning-free tests. * gnulib-tests/Makefile.am (AM_CFLAGS): Uncomment $(WERROR_CFLAGS), now that these tests are warning-free.
2010-10-17maint: update bootstrap from gnulibJim Meyering
* bootstrap: Update from gnulib.
2010-10-17.gitignore: anchor patternsJim Meyering
* .gitignore: Anchor most patterns. Remove .tarball-version. * doc/.gitignore: Anchor all patterns. Remove getdate.texi and get_date.texi.
2010-10-17tests: sort-float: avoid spurious test failure on ppc/ppc64Jim Meyering
* tests/misc/sort-float: On systems with DBL_MIN < LDBL_MIN, this test would fail because the expected output was not sorted. Detect that case, and if needed, reverse those two values.
2010-10-16fold: fix fadvise hintAndreas Schwab
* src/fold.c (fold_file): Apply fadvise to istream, not stdin. This bug would have inhibited the fadvise optimization when not reading from standard input.
2010-10-15post-release administriviaJim Meyering
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2010-10-15version 8.6Jim Meyering
* NEWS: Record release date.
2010-10-15build: update gnulib for vasnprintf fixJim Meyering
2010-10-14bug#7213: [PATCH] sort: fix buffer overrun on 32-bit hosts when warning re ↵Paul Eggert
obsolete keys * src/sort.c (key_warnings): Local buffer should be of size INT_BUFSIZE_BOUND (uintmax_t), not INT_BUFSIZE_BOUND (sword). This bug was discovered by running 'make check' on a 32-bit Solaris 8 sparc host, using Sun cc. I saw several other instances of invoking umaxtostr on a buffer declared to be of size INT_BUFSIZE_BOUND (VAR), and these instances should at some point be replaced by INT_BUFSIZE_BOUND (uintmax_t) too, as that's a less error-prone style.
2010-10-14tests: work around portability and clock-skew problemsPaul Eggert
* tests/misc/ls-misc (push_ls_colors): Don't assume LS_COLORS is set. This part of the fix is by Jim Meyering. (sl-dangle2, sl-dangle3, sl-dangle4, sl-dangle5): Don't assume that newly-created files will have time stamps in the past. They might not, due to clock skew, if the file systems are remote. http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/21322/focus=21346
2010-10-13install: avoid warning with Solaris 10 ccPaul Eggert
* src/install.c (extra_mode): Don't assign ~S_IRWXUGO & ~S_IFMT to a mode_t variable, as the number might be too big to fit. Solaris 10 cc warns about this, and the C standard says it has undefined behavior.
2010-10-13mbsalign: avoid warning with Solaris 10 ccPaul Eggert
* gl/lib/mbsalign.c: Include <stdint.h> for SIZE_MAX. Use SIZE_MAX rather than (size_t) -1, to avoid warning for "size_t x = -1" on Solaris 10 cc. * gl/modules/mbsalign (Depends-on): Add stdint.
2010-10-13sort: fix unportable cast of unsigned char * -> char *Paul Eggert
* src/sort.c (fold_toupper): Change this back from char to unsigned char, fixing a portability issue introduced in commit 59e2e55d0f154a388adc9bac37d2b45f2ba971f8 dated February 26, as the C Standard doesn't let you convert from unsigned char * to char * without a cast, and the (in theory more portable) style here is to convert char values, not pointer values. (getmonth): Convert char to unsigned char when needed for comparison.
2010-10-13build: prepare to enable -Werror also for gnulib-tests/Jim Meyering
* configure.ac (GNULIB_WARN_CFLAGS): Define new variable, for use in gnulib-tests. * gnulib-tests/Makefile.am: Disable specific -W___ options, but only for a few specific offending tests: (test_xvasprintf_CFLAGS): Define. (test_lock_CFLAGS, test_tls_CFLAGS): Define.
2010-10-13tests: fix rand-isaac testPaul Eggert
* gl/tests/test-rand-isaac.c (main): Fix swapped arguments to strtol.
2010-10-12tail: fix checking of currently unavailable directoriesPádraig Brady
* src/tail.c (tail_forever_inotify): Handle the case where tail --follow=name with inotify, is not able to add a watch on a specified directory. This may happen due to inotify resource limits or if the directory is currently missing or inaccessible. In all these cases, revert to polling which will try to reopen the file later. Note inotify returns ENOSPC when it runs out of resources, and instead we report a particular error message, lest users think one of their file systems is full. (main): Document another caveat with using inotify, where we currently don't recheck directories recreated after the initial watch is setup. * tests/tail-2/F-vs-rename: Fix the endless loop triggered by the above issue. * tests/tail-2/inotify-hash-abuse: Likewise. * tests/tail-2/wait: Don't fail in the resource exhaustion case. * tests/tail-2/F-vs-missing: A new test for this failure mode which was until now just triggered on older buggy linux kernels which returned ENOSPC constantly from inotify_add_watch(). * NEWS: Mention the fix.
2010-10-11build: update gnulib to latest; to fix failing Solaris 5.11 testJim Meyering
2010-10-11maint: add new file: .mailmapJim Meyering
* .mailmap: Map git author names and email addresses to canonical/preferred form. This file is used e.g., by "git shortlog".
2010-10-08build: update gnulib, to fix OpenBSD test failuresJim Meyering
2010-10-08build: update gnulib to latest; for parse-datetime.y fixJim Meyering
2010-10-08build: update gnulib to latest, to avoid FreeBSD compilation failure:Jim Meyering
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/23501
2010-10-07split: fix reporting of read errorsPádraig Brady
The bug was introduced with commit 23f6d41f, 19-02-2003. * src/split.c (bytes_split, lines_split, line_bytes_split): Correctly check the return from full_read(). * tests/misc/split-fail: Ensure split fails when it can't read its input. * NEWS: Mention the fix.
2010-10-06build: update gnulib to latest, for memmem/strstr fixJim Meyering
2010-10-06maint: describe coreutils' policy on copyright year number rangesJim Meyering
* README: Mention coreutils' long-standing policy on use of M-N ranges in copyright year lists. Requested by Richard Stallman.
2010-10-05build: complete the rename of get_dateEric Blake
* gnulib: Update to latest. * src/date.c (includes, batch_convert, main): Track rename. * src/touch.c (includes, get_reldate): Likewise. * doc/coreutils.texi (Top, Date input formats): Likewise. * bootstrap.conf (gnulib_modules): Likewise. * doc/Makefile.am (EXTRA_DIST): Likewise. * doc/.gitignore: Likewise. * bootstrap: Synchronize from upstream.
2010-10-05stat: drop %C support when printing file system detailsEric Blake
* src/stat.c (print_statfs, usage): Drop %C, since it applies to files, not file systems. (out_file_context): Match style of other out_* functions. (print_stat): Update caller. * doc/coreutils.texi (stat invocation): Document %C. * NEWS: Document the change.
2010-10-05build: fix build on Solaris 10Eric Blake
* gnulib: Update to latest, for reduced -lgen scope. * bootstrap: Synchronize from upstream. Reported by Clemens Brogi, as bug #7142.
2010-10-05stat: adjust the printing of SELinux contextPádraig Brady
* src/stat.c (default_format): Don't print SELinux context when in file system (-f) mode, as the context is associated with the file, not the file system. Fix logic inversion, so that in terse mode, %C is included only when is_selinux_enabled and not vice versa.
2010-10-04tests: refactor the stat-birthtime test to use retry_delay_Pádraig Brady
* tests/misc/stat-birthtime: This recently added test fits the pattern of requiring a delay to pass, so get it to use retry_delay_()
2010-10-03maint: add a release prerequisite: check the NixOS/Hydra autobuilderJim Meyering
* README-release: Add a note to check the autobuilder.
2010-10-03build: update gnulib submodule to latestJim Meyering
2010-10-03maint: suppress a bogus used-uninitialized warning in tr.cJim Meyering
* src/tr.c (string2_extend): Insert an abort call to tell gcc that char_to_repeat is not used uninitialized.
2010-10-01tests: output --version of program under testEric Blake
This touches all new tests added since commit b062bbd9, when init.cfg was added. Older tests still exist that could use conversion, but we can address those later. * tests/sample-test: Restore hint for --version output. * tests/misc/stat-birthtime: Include --version if verbose. * tests/misc/tr-case-class: Likewise. * tests/misc/stat-mount: Likewise. * tests/misc/sort-unique: Likewise. * tests/misc/sort-benchmark-random: Likewise. Suggested by Jim Meyering.
2010-10-01stat: print SELinux context when availableEric Blake
* src/stat.c (default_format): Include context when present. * NEWS: Update blurb explaining the replacement for -Z.