summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-12-17readlink: support multiple command line argumentsPádraig Brady
This allows efficient processing of multiple files, while also increasing compatibility with BSD's readlink(1). We also add the -z, --zero option to delimit output items with the NUL character which disambiguates output in the presence of '\n' characters. * src/readlink.c (usage): Add the --zero description, and also adjust the description of --no-newline accordingly. (main): Handle the -z option and iterate over multiple arguments. Also as in commit v8.15-24-g9d46b25 we use fputs() and putchar() rather than printf() for performance reasons. * doc/coreutils.texi (readlink invocation): Document the new --zero option, adjust the --no-newline description, and tweak the general info to indicate multiple files are supported. * tests/readlink/multi.sh: A new test for the new functionality. * tests/local.mk: Reference the new test. * man/readlink.x: Adjust the summary and also reference realpath. * NEWS: Mention the improvement. * THANKS.in: Suggested by Aaron Davies.
2012-12-15maint: update gitignore entriesAssaf Gordon
* .gitignore: ignore GCC coverage data files.
2012-12-15doc: mention "git stash" in HACKINGAssaf Gordon
* HACKING: In the paragraph about switching branches, mention "git stash" as a way to continue while preserving uncommitted changes.
2012-12-15tail,stat: improve support for the ceph file systemBernhard Voelker
Teach tail -f that it must use polling on ceph file systems, and let stat -f --format=%T report the file system type name, "ceph". Website: http://ceph.com/ * src/stat.c (human_fstype): Add a case: ceph, 0x00C36400, remote. * NEWS (Improvements): Mention it. * THANKS.in: Update. Reported by Konrad Wróblewski in http://bugs.gnu.org/13172.
2012-12-14maint: fix typos found by misspellingsBernhard Voelker
* doc/coreutils.texi (df invocation): s/occurence/occurrence/. * tests/df/skip-rootfs.sh: s/supressed/suppressed/
2012-12-09tests: add test case and note that last week's cut change is a bug fixJim Meyering
* tests/misc/cut-huge-to-eol-range.sh: New test, showing that the change in v8.20-51-g7d03466 is a bug fix after all. * tests/local.mk (all_tests): Add it. * NEWS (Bug fixes): Mention it.
2012-12-08cp: fix --no-preserve=mode to not exit 1Bernhard Voelker
cp --no-preserve=mode exited 1 unconditionally. Furthermore, the tests which would have detected this error - namely link-preserve.sh and reserve-mode.sh - failed to test cp's exit code. * src/copy.c (copy_reg): In the case x->explicit_no_preserve_mode, do only set return_val to false iff the previous set_acl () failed. * tests/cp/link-preserve.sh: Check cp's exit code. * tests/cp/link-symlink.sh: Likewise. * tests/cp/preserve-mode.sh: Likewise. * NEWS: Mention the fix. Bug introduced in commit v8.19-145-g24ebca6. Reported by Florian Pritz in http://bugs.gnu.org/13119.
2012-12-07df: do not print duplicate entries and rootfs by defaultOndrej Oprala
* src/df.c (struct devlist): Add new struct for storing already- examined device numbers. (devlist_head): Add new store of the above type. (show_rootfs): Add new global boolean to not skip rootfs. (dev_examined): Add new function to check if the device has already been traversed. (get_dev): Filter out rootfs unless "-t rootfs" or the -a option is specified. Filter out duplicate entries by calling the above new dev_examined unless the -a option is specified. (main): Set the show_rootfs variable appropriately when the -t option is specified for rootfs. Free device list (guarded by IF_LINT). * tests/df/skip-duplicates.sh: Add test to exercise the skipping of duplicate entries. * tests/df/skip-rootfs.sh: Add test to exercise the skipping of the rootfs pseudo file system. * tests/local.mk: Add the above new tests. * NEWS (Changes in behavior): Mention the changes. * doc/coreutils.texi (df invocation): Document df's behavior about skipping rootfs and duplicate entries. Co-authored-by: Bernhard Voelker.
2012-12-06cut: avoid a redundant heap allocationCojocaru Alexandru
* src/cut.c (set_fields): Don't allocate memory for `printable_field' if there are no finite ranges. This is achieved by keeping max_range_endpoint as 0 when there are no finite ranges. max_range_endpoint is then used throughout the code to guard against allocation of, and access to the bit array. The extra allocation was introduced via commit v8.10-3-g2e636af.
2012-12-06maint: fix a referenced coreutils version in a test commentPádraig Brady
* tests/misc/cut.pl: This particular bug existed up to v8.10.
2012-12-06tests: fix regex to match "-" in ipcent field in df/total-verify.shBernhard Voelker
The regular expression failed to match for file systems that do not provide inode statistics, e.g. VFAT or CIFS (depending on the underlying peer file system). * tests/df/total-verify.sh: Fix the regular expression to match a dash in the ipcent field again. Reported by Assaf Gordon in http://bugs.gnu.org/13099. Bug introduced in commit v8.20-18-gdae8d22.
2012-12-06maint: adjust HACKING instructions to run a single testAssaf Gordon
* HACKING: Adjust as per the recent changes introduced when switching to non recursive make.
2012-12-06tests: cut.pl: adjust for changed diagnosticPádraig Brady
* tests/misc/cut.pl: Since we now output the more complete error message irrespective of running in a multi-byte locale or not, adjust the test accordingly.
2012-12-06cut: improve error reportingCojocaru Alexandru
* src/cut.c (main): Treat a NUL delimiter (-d '') consistently with non NUL delimiters, and disallow such a delimiter option, unless a field is also specified. (set_fields): Provide a more accurate error message when a given list is invalid. * tests/misc/cut.pl: Add a test case.
2012-12-06maint: adjust instructions to run a single testPádraig Brady
* README: Adjust as per the recent changes introduced when switching to non recursive make.
2012-12-05maint: remove now auto-added entry from THANKS.inBernhard Voelker
The syntax-check sc_THANKS_in_duplicates complained about that excess entry. * THANKS.in (Colin Watson): Remove entry, now that it will be automatically included in the generated THANKS file.
2012-12-04maint: remove a redundant odd sized alloc from factor.cPádraig Brady
* src/factor.c (mp_factor_init): Init the pointers with NULL, which xrealloc (or realloc) handles fine.
2012-12-04factor: fix infinite loop on 32 bit powerpcColin Watson
Both Debian and Ubuntu builds of coreutils 8.20 hang while running the test suite on powerpc, which is reproducible using 'factor 122'. This turns out to be somewhat related to http://bugs.gnu.org/12754, but not quite the same. uintmax_t is 64 bits, but the cntlzw instruction takes 32-bit operands, and the cntlzd option is only available on 64-bit hardware. * src/longlong.h: Add an _LP64 check around the PPC64 code, so that this falls back to the C implementations. * NEWS: Mention the fix.
2012-11-24cut: do not print extraneous delimiters in some unusual casesJim Meyering
When printing output delimiters, and when a to-EOL range subsumes at least one other range, cut would mistakenly print delimiters for the subsumed range. This bug was probably introduced via commit v5.2.1-639-g847e066. * src/cut.c (set_fields): Ignore any range that is subsumed by a to-EOL range. Also, move two declarations down. * tests/misc/cut.pl: Add tests to exercise this. * NEWS (Bug fixes): Mention it. Reported by Marcel Böhme in http://bugs.gnu.org/12966
2012-11-24cut: treat -b2-,3- like -b2-, not like -b3-Jim Meyering
* src/cut.c (set_fields): When two right-open-ended ranges are specified, don't blindly let the latter one take precedence over the former. Instead, use the union of the ranges. * tests/misc/cut.pl: Add tests to exercise this. * NEWS (Bug fixes): Mention it. Reported by Marcel Böhme in http://bugs.gnu.org/12966 Thanks to Berhard Voelker for catching log and NEWS typos.
2012-11-24doc: cp: clarify behavior of the --preserve=xattr optionBernhard Voelker
* doc/coreutils.texi (cp invocation): Enhance documentation of the --preserve=xattr option regarding the preservation of ACLs, SELinux contexts and capabilities: the user may notice this only when not specifying --preserve=mode and --preserve=context, too, i.e., otherwise, these attributes are preserved anyway.
2012-11-24doc: update info cross reference to bashPádraig Brady
* doc/coreutils.texi (tee invocation): Reference the bash manual rather than bashref, as the latter is more likely to work on newer systems.
2012-11-24tests: use sub-second timeouts to speed up a timeout testPádraig Brady
* tests/misc/timeout.sh: Take advantage of recent support for sub-second timeouts to decrease runtime from about 6s to 2s.
2012-11-24doc: clarify that renice is needed to adjust nicenessPádraig Brady
* doc/coreutils.texi (nice invocation): Ensure there is no ambiguity in the summary in relation to nice being able to adjust the niceness of an existing process. Reference the renice command. * man/nice.x: Reference renice (1)
2012-11-24tests: accept EEXIST from rm -dPádraig Brady
* tests/rm/d-2.sh: EEXIST is a valid error on some systems. Reported by Michael Felt on AIX 6.1
2012-11-24tests: don't rely on sed -i being availablePádraig Brady
* tests/df/df-output.sh: sed --in-place is not generally available. Also add a couple of simplifications from Bernhard Voelker. Removing all spaces, rather than just leading spaces, suffices. Searching for ' --output' in unadjusted df --help, suffices.
2012-11-24seq: ensure correct output width for scientific notation inputPádraig Brady
* src/seq.c (scan_arg): Calculate the width more accurately for numbers specified using scientific notation. * tests/misc/seq.pl: Add tests for cases that were mishandled. * NEWS: Mention the fix. * THANKS.in: Reported by Marcel Böhme. Fixes http://bugs.gnu.org/12959
2012-11-22df: reorder default field list of --output optionBernhard Voelker
As the inodes information is usually not so much of interest, and some file systems including btrfs do not even provide it, reading of the full df --output is easier when the block statistic fields come just left of the last field, the mount point. * src/df.c (all_args_string): Move the inodes fields before the block fields. (usage): Likewise. * tests/df/df-output.sh: Likewise. * doc/coreutils.texi (df invocation): Likewise. Additionally, explicitly mention the default order of the --output option.
2012-11-20install: fix security racePaul Eggert
* NEWS: Document this.
2012-11-20install: fix security racePaul Eggert
* src/copy.c (copy_internal): Use DST_MODE_BITS, not SRC_MODE. See Bernhard R. Link in <http://bugs.gnu.org/12947> and in <http://bugs.debian.org/598018>.
2012-11-20nl: remove deprecated --page-increment optionBernhard Voelker
The above option has been deprecated since coreutils-7.5 by commit v7.4-129-g718b279. * src/nl.c (PAGE_INCREMENT_OPTION_DEPRECATED): Remove enum. (longopts): Remove "page-increment" entry. (main): Remove PAGE_INCREMENT_OPTION_DEPRECATED case. * NEWS (Changes in behavior): Mention the change. Reported by Marcel Böhme in <http://bugs.gnu.org/12940>.
2012-11-19doc: remove already implemented items from TODOBernhard Voelker
* TODO (renice): The renice program is part of util-linux for years now. Remove entry. (dd): The option status=none has been implemented in commit v8.19-143-g7331ab5. Remove entry.
2012-11-19cut: do not accept the invalid range 0-Bernhard Voelker
The command "echo 12345 | cut -b 0-" prints an empty line while it should fail with "fields and positions are numbered from 1". * src/cut.c (set_fields): Add a diagnostic for the invalid open range which starts with Zero, i.e., the range 0-. * tests/misc/cut.pl: Add tests to ensure the range 0- fails for fields (-f) and for positions (-b, -c). * NEWS: Mention the fix. Reported by Marcel Böhme in <http://bugs.gnu.org/12903>.
2012-11-18build: fix compilation failure on x32Daniel Schepler
* src/factor.c [HAVE_ATTRIBUTE_MODE]: Fix typo in #if test: s/HAVE_LONG_LONG/HAVE_LONG_LONG_INT/. Otherwise, factor.c would elicit assembler errors on x32: it was incorrectly defining DItype to long instead of long long. Patch and report in http://bugs.debian.org/693337; Mike Stone notified upstream.
2012-11-18maint: reenable accidentally-disabled cppi-check syntax-check ruleJim Meyering
* cfg.mk (exclude_file_name_regexp--sc_preprocessor_indentation): Fix typo that disabled the sc_preprocessor_indentation syntax-check rule by exempting all files. s/__ll/_ll/ The typo was introduced in commit v8.19-157-g759ebcb.
2012-11-18maint: correct indentation of W_TYPE_SIZE-defining cpp directivesJim Meyering
* src/factor.c: Indent cpp directives to reflect their nesting.
2012-11-18maint: avoid i686-specific syntax-check failureJim Meyering
* cfg.mk (_gl_TS_unmarked_extern_vars): Define.
2012-11-17doc: explain why dd is called "dd"Paul Eggert
* doc/coreutils.texi (dd invocation): Mention JCL.
2012-11-16factor: tidy up primes.h againPaul Eggert
See Stefano Lattarini in <http://bugs.gnu.org/12899>. * src/local.mk (BUILT_SOURCES): Put $(top_srcdir)/src/primes.h here (MAINTAINERCLEANFILES): ... instead of here.
2012-11-13factor: cleanup for primes.hPaul Eggert
* .gitignore: Add src/primes.h back, since it's no longer in the repository.
2012-11-13maint: avoid unnecessary #include to fix syntax-check failureJim Meyering
* src/factor.c: Remove unneeded #inclusion of"verify.h". It's already included via system.h.
2012-11-12factor: improve primes.h changePaul Eggert
This follows suggestions by Jim Meyering in <http://bugs.gnu.org/12841#34>. * src/make-prime-list.c (print_wide_uint): Change "nested" argument to "nesting", and use it to avoid outputting lines that are too long. * src/primes.h: Remove from git. This can be generated by a maintainer. It's nicer to do so on a host with at least 128-bit arithmetic.
2012-11-12factor: maintainer builds primes.h, not builderPaul Eggert
With this change, the maintainer builds primes.h and it is part of the tarball. primes.h's contents are not architecture-specific. * .gitignore: Remove /src/primes.h. * src/factor.c: Include verify.h. (W): New constant. Verify that uintmax_t lacks holes and that W is no wider than the integers used to generate primes.h. * src/local.mk (EXTRA_DIST): Add src/primes.h. (BUILT_SOURCES, CLEANFILES): Remove src/primes.h. ($(top_srcdir)/src/primes.h): Rename from src/primes.h. Do not depend on src/make-prime-list. Instead, use sub-make to build, so that we build primes.h only if it does not exist. * src/make-prime-list.c: Include <limits.h>, for ULONG_MAX. (wide_uint): Define to uintmax_t or unsigned __int128 if not #defined. (struct prime, binvert, process_prime): Use it instead of uintmax_t. (print_wide_uint): New function. This generates the proper pinv value regardless of the width of uintmax_t on the target, so long as the width doesn't exceed that of the width of wide_uint on the maintainer host that generated src/primes.h. (output_primes): Use it. Output WIDE_UINT_BITS, too. Let the target compute its own lim, since its uintmax_t may be narrower than ours. (SZ): Remove. * src/primes.h: New file, generated with 128-bit integers and usable on any host where uintmax_t's width is no greater than 128 bits.
2012-11-12factor: port to systems with rpl_mallocPaul Eggert
* src/make-prime-list.c (malloc): Undef. This fixes a problem on AIX 8.20 reported by Michael Felt in <http://bugs.gnu.org/12841>.
2012-11-09tests: fix factor's tests to use coreutil's own sha1sumBernhard Voelker
The test used the shasum utility which seems to belong to the perl package. On SLES-10.4, perl doesn't include this yet: + seq 0 10000000 + factor + shasum -c --status exp ./tests/factor/t00.sh: line 30: shasum: command not found + Exit 1 It is better to use our own stuff anyway. * tests/factor/run.sh: s/shasum/sha1sum/. Additionally, add sha1sum to the print_ver_ call.
2012-11-09doc: chcon: add descriptions for three undocumented optionsBenno Schulenberg
These were missed in this related change v8.14-104-g44e20cd * src/chcon.c (usage): Mention the two --preserve-root options. * doc/coreutils.texi (chcon invocation): Plus the --dereferece option.
2012-11-09doc: with cp -n, option -f is not redundant but ignoredBenno Schulenberg
* src/cp.c (usage): Replace "redundant" with "ignored". * doc/coreutils.texi (cp invocation): Likewise.
2012-11-09df: port the new df test to POSIX sed, larger file systemsPaul Eggert
* tests/df/df-output.sh: For the test "df -B1K --output=size", do not assume that the file system size fits in 9 bytes; it might be larger than that, so omit leading space. Also, use portable 'sed' commands: POSIX says sed commands inside { } should all end in newline.
2012-11-08df: add a test for the --output optionBernhard Voelker
* tests/df/df-output.sh: Add a test case. * tests/local.mk (all_tests): Mention the test. * cfg.mk (sc_file_system): Exempt the test from this syntax-check.
2012-11-08df: document the new --output optionBernhard Voelker
* src/df.c (usage): Add a short description of --output and its available field names for use in the optional argument. * doc/coreutils.texi (df invocation): Add the new option with more details and a few examples. * NEWS (New features): Mention the new option. (Changes in behvaior): Mention the new placeholder for fields in the "total" line.