summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-08-30maint: update gitignore entriesStefano Lattarini
* doc/.gitinore: Here, adding the '.dirstamp' file generated by the Texinfo rules.
2012-08-30build: factor out a little more re list of *.texi filesJim Meyering
We may well want to switch from checking all *.texi to checking only version-controlled .texi files, so encapsulate this concept in one place. * doc/local.mk (doc_srcdir): Delete. Use this instead: (texi_files): Define. All usages adjusted.
2012-08-30maint: adjust syntax check 'sc_option_desc_uppercase'Stefano Lattarini
* cfg.mk (sc_option_desc_uppercase): Here, by grafting the 'man/' prefix to the manpages obtained from $(NO_INSTALL_PROGS_DEFAULT) and listed as prerequisites for this rule.
2012-08-30maint: adjust syntax check 'check-x-vs-1'Stefano Lattarini
* cfg.mk (check-x-vs-1): Here, by stripping 'man/' prefix from $(dist_man1_MANS) entries before comparing them with the list of expected programs.
2012-08-30maint: move man-related syntax checks in cfg.mkStefano Lattarini
This is more natural, now that the top-level Makefile has access to all the variables and rules once defined only in 'man/Makefile.am' * man/local.mk (all_programs, sc_option_desc_uppercase, sc_man_file_correlation check-x-vs-1, check-programs-vs-x): Move from here ... * cfg.mk: ... to here. Adjust some comments in the process.
2012-08-30build: don't use recursive make to build the 'man' subdirectoryStefano Lattarini
* Makefile.am: Include 'man/local.mk'. (SUBDIRS): Remove 'man'. * configure.ac ($MAN): Adjust so that each of its entries has a leading 'man/' component. (AC_CONFIG_FILES): Remove 'man/Makefile'. * man/Makefile.am: Rename ... * man/local.mk: ... like this. With further adjustments: each 'foo.1' target renamed like 'man/foo.1', each '../src/foo.c' dependency as 'src/foo.c', and each '$(srcdir)' usage as '$(srcdir)/man'. Also ... (mandep): Adjust, removing the leading '../' component. Several whitespace adjustments while at it. (ASSORT): Remove, it's already defined in the top-level Makefile.am. * cfg.mk (sc_option_desc_uppercase, sc_man_file_correlation): Remove the associated recipes, they are now directly available from the included 'man/local.mk'. Actually, the other changes in this commit have made these recipes instable and not completely correct, but that will be fixed in later changes.
2012-08-30build: rework some recipes in man/Makefile.am, for future changesStefano Lattarini
This change is merely required to make future changes easier. In particular, since we are going to merge the contents of 'man/Makefile.am' into the top-level Makefile, we need to avoid conflicts with the rules and variables in 'dist-check.mk', and to prepare for changes in the value of the '$*' variable as used in the recipe of the '.x -> .1' suffix rule. * man/Makefile.am (t, mapped_name): Delete, inlining their use ... (.1.x): ... in the recipe of this suffix rule. Other adjustments to prepare to changes in the value of the '$*' automatic variable. While at it, made more resilient about unlikely but possible failure. Adjust and reorder few comments.
2012-08-30build: provide convenience target 'all_programs' also at top-levelStefano Lattarini
This will be mostly useful in future changes. * Makefile.am (all_programs): New, simply work by delegating to the same-named target in the 'src/' subdirectory. * cfg.mk (sc_option_desc_uppercase): Take advantage of it. (sc_man_file_correlation): Likewise.
2012-08-30build: make a rule less dependent on exact source tree layoutStefano Lattarini
This is mostly a preparatory change in view of future ones. * man/Makefile.am (.x.1): Use '$(abs_top_builddir)/src' to access the 'src' directory.
2012-08-30build: rely on VPATH capabilities in man/MakefileStefano Lattarini
* man/Makefile.am: In all the 'foo.1' targets, no need to depend explicitly on '$(srcdir)/foo.x': the '.x.1' suffix rule takes care of that automatically.
2012-08-30maint: typofix: s/it's/its/Stefano Lattarini
* man/Makefile.am: Here.
2012-08-30build: rename common_dep -> mandep in man/MakefileStefano Lattarini
This is mostly a preparatory refactoring in view of future changes. * man/Makefile.am (common_dep): Rename ... (mandep): ... like this. All usages adjusted.
2012-08-30build: fix a stray usage of uninitialized $(ME)Stefano Lattarini
* man/Makefile.am (sc_option_desc_uppercase): Here.
2012-08-30build: add an explanatory commentStefano Lattarini
* man/Makefile.am (EXTRA_DIST): Describe portability issues of the idiom we now use. Reformat the definition a little while at it.
2012-08-30maint: simplify definition of $MAN in configure.acStefano Lattarini
* configure.ac: Here, by making less use of 'sed' and 'tr' munging, and relying on a smarter and simpler shell loop instead.
2012-08-30build: don't define $(SUFFIXES) explicitlyStefano Lattarini
* man/Makefile.am (SUFFIXES): Remove definition: Automake is smart enough to extract the list of suffixes from the '.x.1' suffix rule automatically.
2012-08-30build: don't use recursive make to build the 'doc' subdirectoryStefano Lattarini
* doc/Makefile.am: Rename ... * doc/local.mk: ... like this. With further adjustments ... (info_TEXINFOS): Prepend 'doc/' to all '*.texi' files listed in here. (coreutils_TEXINFOS): Likewise, and rename ... (doc_coreutils_TEXINFOS): ... like this. (constants.texi): Rename ... (doc/constants.texi): ... like this. Adjust the recipe to avoid spurious errors. (MAINTAINERCLEANFILES): Adjust, and extend with '+=' rather than setting it with '='. (ME): Delete. (find_upper_case_var): Use '$@', not '$(ME)', in error messages. * Makefile.am: Include 'doc/local.mk'. (SUBDIRS): Remove 'doc'. * configure.ac (AC_CONFIG_FILES): Remove 'doc/Makefile'.
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.