summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-08-30build: use 'check-local' to extend the 'check' targetStefano Lattarini
* doc/Makefile.am (check-local): Here, by making this depend on 'check-texinfo' ... (check): ... rather than this. While the old usage worked, it did so for an implementation detail rather than a documented behaviour, so relying on that was riskier a "unclean".
2012-08-30build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in doc MakefileStefano Lattarini
This is just a preparatory refactoring that will become useful in a future change (in which the doc/Makefile.am makefile will be merged with the top-level one). * doc/Makefile.am (doc_srcdir): New, define to '$(top_srcdir)/doc'. Use it throughout instead of "bare" '$(srcdir)'.
2012-08-30build: add extra *.texi files to coreutils_TEXINFOS, not EXTRA_DISTStefano Lattarini
* doc/Makefile.am (coreutils_TEXINFO): List them here, instead of ... (EXTRA_DIST): ... listing them here. This ensures the rebuild rules will be more faithful. ($(DVIS), $(INFO_DEPS)): No need to depend on $(EXTRA_DIST) now.
2012-08-30maint: slightly improve .gitignoreStefano Lattarini
* .gitignore: Ignore '.deps' only when it's a directory. Ignore '*.trs' only if they are in a subdirectory of the 'tests/' directory.
2012-08-30build: don't abuse Automake internals (with its 'check-am' rule)Stefano Lattarini
* tests/check.mk (check-am): Remove; obtain the same effect by moving its dependency '.built-programs' ... (check_DATA): ... to this variable.
2012-08-30scripts: git commit message hook: prohibit use of "Signed-off-by:"Jim Meyering
* scripts/git-hooks/commit-msg: Reject a commit log message that contains "Signed-off-by:".
2012-08-30tests: remove useless defn of REPLACE_GETCWD from TESTS_ENVIRONMENTStefano Lattarini
It's last use had been removed in commit v8.12-3-g3ed91fc of 2011-04-28, "tests: remove useless test: misc/pwd-unreadable-parent". * tests/check.mk (TESTS_ENVIRONMENT): Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2012-08-30tests: fix misc/sort-exit-early to skip if rootNick Alcock
* tests/misc/sort-exit-early: skip_if_root_ as this test requires an unwritable input and an unreadable output.
2012-08-29tail,stat: improve support for ZFSJim Meyering
This change enables tail -f to use inotify and lets stat -f --format=%T report the file system type name, "zfs". * src/stat.c (human_fstype): Add a case: zfs, 0x2fc12fc1. * NEWS (Improvements): Mention it. * THANKS.in: Update. Reported by Raimonds Miltins in http://bugs.gnu.org/12301.
2012-08-26build: update gnulib submodule to latestJim Meyering
2012-08-26maint: stop using @acronym{...} in texinfo sourcesJim Meyering
* doc/coreutils.texi: Remove all uses of @acronym{...}, per recommendation by Karl Berry. * doc/perm.texi: Likewise. * cfg.mk (local-checks-to-skip): Remove exemption, enabling the @acronym{-prohibiting syntax-check rule.
2012-08-26tests: don't require @acronym{...} around POSIXJim Meyering
* doc/Makefile.am (check-texinfo): Remove POSIX-checking part.
2012-08-26df: allow translators to reorder "1K-blocks" headerNguyễn Thái Ngọc Duy
* src/df.c (get_header): Mark two "%s-%s" strings for translation and give translators a hint what each is for.
2012-08-24md5sum, sha*sum: add --tag to output a format indicating the algorithmOndrej Oprala
The format used is the BSD traditional format which looks like: MD5 (/dev/null) = d41d8cd98f00b204e9800998ecf8427e * NEWS: Add new feature info. * doc/coreutils.texi (md5sum invocation): Add detailed information about the new --tag option. * src/md5sum.c: Add the new --tag option for BSD-style output. (bsd_split_3): Add ESCAPED_FILENAME parameter. (print_filename): New function refactored from main(). (filename_unescape): New function refactored from split_3(). * tests/misc/md5sum-bsd: Add tests for the new feature.
2012-08-23rm: fix the new --dir (-d) option to work with -iRob Day
* src/remove.c (prompt): Hoist the computation of is_empty, since we'll need it slightly earlier. Before, this function would arrange to fail with EISDIR when processing a directory without --recursive (-r). Adjust the condition to exempt an empty directory when --dir has been specified. Improve comments. * tests/rm/d-3: New file, to ensure that rm -d -i dir works. * tests/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it. * THANKS.in: Update. Reported by Michael Price in http://bugs.gnu.org/12260
2012-08-22tests: correct print_ver_ arguments and add a rule to enforce thisBernhard Voelker
We use print_ver_ to run "PROG --version" for each program under test. Some tests have been derived from others, while the argument(s) to print_ver_ have not been adapted. Add a new cfg.mk rule to prohibit this. * cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument): New rule, to prohibit a test script from calling print_env_ for a program not actually used by that test. * tests/chown/basic: s/\(print_ver_\) chgrp/\1 chown/ * tests/cp/acl: s/\(print_ver_\) mv/\1 cp/ * tests/cp/capability: s/\(print_ver_\) ls/\1 cp/ * tests/cp/cp-parents: s/(print_ver_\) mv/\1 cp/ * tests/du/bind-mount-dir-cycle: s/(print_ver_\) rm/\1 du/ * tests/misc/wc-parallel: s/(print_ver_\) md5sum/\1 wc/
2012-08-21du: handle bind-mounted directory cycles gracefullyOndrej Oprala
Before this change, a directory cycle induced by a bind mount would be treated as a fatal error, i.e., probable disk corruption. However, such cycles are relatively common, and can be detected efficiently, so now du emits a descriptive warning and arranges to exit nonzero. * NEWS (Bug fixes): Mention it. * src/du.c: Include "mountlist.h". (di_mnt): New global set. (di_files): Rename global from di_set, now that there are two. (fill_mount_table): New function. (hash_ins): Add DI_SET parameter. (process_file): Look up each dir dev/ino pair in the new set. (main): Allocate, initialize, and free the new set. * tests/du/bind-mount-dir-cycle: Add a test for the fix. * tests/Makefile.am (TESTS): Add it. * THANKS.in: Update. This implements the proposal in http://bugs.gnu.org/11844. Originally reported in http://bugs.debian.org/563254 by Alan Jenkins and more recently as http://bugzilla.redhat.com/836557 Improved by: Jim Meyering
2012-08-20maint: post-release administriviaJim Meyering
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2012-08-20version 8.19Jim Meyering
* NEWS: Record release date.
2012-08-19tests: port df/no-mtab-status to SolarisPaul Eggert
* tests/df/no-mtab-status: Include <mntent.h> in test program, so that the getmntent hack compilation fails on Solaris, as it should, since it's not compatible with Solaris. Reported by Stefano Lattarini in <http://bugs.gnu.org/12225>.
2012-08-19tests: avoid split/filter test failure on very low-mem systemJim Meyering
* tests/split/filter: Use xz -1 when compressing, to minimize memory usage. Otherwise, xz could fail due to insufficient virtual memory on a system with very little free memory.
2012-08-18tests: trigger the sort -u free-memory-read bugJim Meyering
* tests/misc/sort-u-FMR: New file. * tests/Makefile.am (TESTS): Add it. * tests/misc/sort: Add the test here, too. * NEWS (Bug fixes): Mention it.
2012-08-18tests: wrap the valgrind-requiring assertion in a functionJim Meyering
* tests/init.cfg (require_valgrind_): New function... * tests/misc/sort-stale-thread-mem: ...extracted from here.
2012-08-18sort: simpler fix for sort -u data-loss bug, and for a FMR bugPaul Eggert
This also fixes a free-memory-read (FMR) bug: when fillbuf's realloc of buf->buf frees the buffer into which saved_line.text points, the processing of that just-read longer line includes comparison against the saved line in freed memory. * src/sort.c (overlap): Remove. (fillbuf): Do not try to copy saved lines, as that is too risky in the presence of parallelism, reallocated buffers, etc. (sort): Invalidate any saved line before sorting a new batch.
2012-08-17sort: sort --unique (-u) could cause data lossJim Meyering
sort -u could omit one or more lines of expected output. This bug arose because sort recorded the most recently printed line via reference, and if you were unlucky, the storage for that line would be reused (overwritten) as additional input was read into memory. If you were doubly unlucky, the new value of the "saved" line would not only match the very next line, but if that next line were also the first in a series of identical, not-yet-printed lines, then the corrupted "saved" line value would result in the omission of all matching lines. * src/sort.c (saved_line): New static/global, renamed and moved from... (write_unique): ...here. Old name was "saved", which was too generic for its new role as file-scoped global. (fillbuf): With --unique, when we're about to read into a buffer that overlaps the saved "preceding" line (saved_line), copy the line's .text member to a realloc'd-as-needed temporary buffer and adjust the line's key-defining members if they're set. (overlap): New function. * tests/misc/sort: New tests. * NEWS (Bug fixes): Mention it. * THANKS.in: Update. Bug introduced via commit v8.5-89-g9face83. Reported by Rasmus Borup Hansen in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/23173/focus=24647
2012-08-16tests: reverse args in Coreutils.pm-invoked diff, for consistencyJim Meyering
* tests/Coreutils.pm (_compare_files): Reverse diff arguments so that we invoke diff -c $expected $actual, which is consistent with how init.sh-using tests invoke "compare exp out".
2012-08-16maint: correct a stale comment in sort.cJim Meyering
* src/sort.c (fillbuf): Fix comment typo. x2nrealloc no longer doubles the size of its input buffer.
2012-08-16maint: fix comment grammar to placate make syntax-checkJim Meyering
* src/remove.c (rm_fts): s/can not/cannot/
2012-08-14rm: new option --dir (-d) to remove empty directoriesKrzysztof Goj
Add new option to rm (-d/--dir), which allows removal of empty directories, while still safely disallowing removal of non-empty ones. This improves compatibility with Mac OS X and BSD systems, which honor the -d option. * src/remove.c (rm_fts): Remove empty directories when requested. * src/remove.h (rm_options) [remove_empty_directories]: New member. * src/rm.c (long_opts, usage, main): Update usage and option parsing. (rm_option_init): Initialize the new member. * src/mv.c (rm_option_init): Initialize the new member. * tests/rm/d-1: New test case - successfully delete empty dir. * tests/rm/d-2: New test case - refuse to delete nonempty dir. * tests/Makefile.am (TESTS): Add them.
2012-08-14df: fail when the mount list is required but cannot be readBernhard Voelker
* src/df.c (main): Add conditions to fail when the mount list cannot be read: this includes the cases when a file name argument is given and any of -a, -l, -t or -x is used. * doc/coreutils.texi: Document the additional error conditions. * tests/df/no-mtab-status: Add a new test. * tests/Makefile.am: Reference the new test. * NEWS: Mention the fix.
2012-08-12maint: post-release administriviaJim Meyering
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2012-08-12version 8.18Jim Meyering
* NEWS: Record release date.
2012-08-08tests: fix validation of local file systemsPádraig Brady
* tests/init.cfg (require_mount_list_): A new function to ensure we can read the list of file systems. (require_local_dir_): Call the above function, as otherwise the check is invalid. * tests/df/total-unprocessed: Ensure df can read the list of mounted file systems so that --local can be honored.
2012-08-06build: update gnulib submodule to latestJim Meyering
2012-08-06tests: printf-surprise: avoid unwarranted failure on FreeBSD 9.0Jim Meyering
* tests/misc/printf-surprise: A VM size of 10,000KiB was too little in which to run "env printf ..." on FreeBSD 9.0-p3. Increase it to 15,000.
2012-08-05build: avoid sort link failure on Solaris 10Jim Meyering
* src/Makefile.am (sort_LDADD): Sort uses euidaccess, which may require whatever library configure deemed necessary to resolve the eaccess function, but no one told sort to link with that library. (sort_LDADD): Add $(LIB_EACCESS).
2012-08-04df: fix exit code and error messages with --totalBernhard Voelker
When the combination of the file system options with given files or devices does not lead to output, "df --total" would exit successfully although it should not. Examples: $ df --total --type=xfs / # when / is not an XFS file system $ df --total --local -t nfs DIR # nfs is remote per se ... $ df --total -t qwerty /dev/sdb5 # typo in file system type Furthermore, "df --total" would not print the error message "no file systems processed" when the file argument does not exist or is otherwise not accessible. Example: $ df --total __not_exist__ These 2 bugs are present since --total was added by commit v6.12-166-gea2887b. * src/df.c (get_dev): Do not set file_systems_processed to true when force_fsu is true, i.e. when the row for the "total" line is processed. (main): Don't print totals unless we've processed a file system. Also only print the "no FS processed" message if there was no preceding diagnostic. * tests/df/total-unprocessed: Add a new test. * tests/Makefile.am: Reference the new test. * NEWS: Mention the fix. Improved-by: Jim Meyering
2012-08-04truncate: don't leak a file descriptor with --ref=PIPEJim Meyering
* src/truncate.c (main): For a user who makes the mistake of using a non-seekable file as a reference for the desired length, truncate would open that file, attempt to seek to its end, but upon seek failure would neglect to close the file descriptor. Close the file descriptor even when lseek fails. In addition, ignore failure to close that reference FD, since as long as the lseek succeeds, a close failure doesn't matter. Coverity spotted the potential FD leak. Improved-by: Pádraig Brady.
2012-08-04tests: avoid FP ulimit failure with valgrind-wrapped toolsJim Meyering
* tests/init.cfg (require_ulimit_): Raise VM limit from 10MiB to 20MiB, to accommodate overhead of a valgrind-wrapped date program. Also declare this function's local variables "local".
2012-08-04split: plug nominal leaksJim Meyering
* src/split.c (lines_rr) [IF_LINT]: Plug a harmless leak. (main) [IF_LINT]: Free a usually-small (~70KB) buffer just before exit, mainly to take this off the radar of leak-detecting tools. Improved-by: Pádraig Brady.
2012-08-03tail: avoid rare error-path FD leakJim Meyering
* src/tail.c (tail_forever): Close FD to avoid leak after a failed fstat.
2012-07-27maint: refresh stale local gnulib patch filesJim Meyering
We carry local adjustments for a few gnulib modules via the patches in gl/. Nearly all of those patches had become stale due to evolution of the originals in gnulib. To refresh them, first make sure you have no local changes in gl/ or in the gnulib submodule, then run "make refresh-gnulib-patches".
2012-07-25tail: avoid misleading diagnostic upon fstat failureJim Meyering
* src/tail.c (check_fspec): Save fstat-induced errno *before* calling close_fd, not after. Otherwise, the close could well clobber the global errno, making tail print an invalid diagnostic. This could happen only with tail -f, and even then, only when a valid file descriptor were to provoke fstat failure.
2012-07-23tests: add a test for a previously fixed output format bug in joinPádraig Brady
Add a test and NEWS entry for a bug inadvertently fixed in a refactoring in commit v8.9-32-gd4db0cb * tests/misc/join (v2-format): Add a new test. * THANKS.in: Add the reporter. * NEWS: Mention the old bug. * cfg.mk (old_NEWS_hash): Update. Reported-by: Jean-Pierre Tosoni
2012-07-22doc: mention gethostid(3) in hostid(1)Pádraig Brady
* man/hostid.x: Add gethostid(3) to SEE ALSO section. Addresses http://bugs.gnu.org/12023
2012-07-22doc: mention uniq(1) in sort(1) man-page and vice versaErik Auerswald
* man/sort.x: Add SEE ALSO section with entry uniq(1). * man/uniq.x: Add sort(1) to SEE ALSO section.
2012-07-21maint: stzncpy: restrict pointer parametersJim Meyering
* src/system.h (stzncpy): Add "restrict" attribute to each pointer parameter and note in the comment that the buffers must not overlap.
2012-07-20maint: rm: remove two more unused static inline functionsJoachim Schmitz
* src/remove.c (cache_stat_ok, is_nondir_lstat): Remove unused functions.
2012-07-20maint: adjust exemption to track renamed test scriptJim Meyering
* cfg.mk (exclude_file_name_regexp--sc_file_system): Sync this exemption regexp to match renamed tests/df/df-P. This avoids a "make syntax-check" failure.
2012-07-20maint: rm: remove unused static-inlined functionsJoachim Schmitz
* src/remove.c (cache_statted, is_dir_lstat): Remove unused static-inlined functions. * THANKS.in: Remove my name from this list, now that (with this commit) it is included automatically. Copyright-paperwork-exempt: Yes