summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-04-17doc: use @xref{... only at start of a sentenceJim Meyering
* doc/coreutils.texi: Correct many misuses of @xref.
2012-04-16maint: replace a use of strcpy in chmod.c with memcpyJim Meyering
* src/chmod.c (main): Use memcpy rather than strcpy, since we already have the length handy.
2012-04-14doc: remove a little direntry redundancyKarl Berry
* doc/coreutils.texi (Basics direntry): Remove 3rd "Common options."
2012-04-12fmt: accept new --goal=WIDTH (-g) optionBruce Korb
Accept -g for BSD/Plan9 compatibility. * NEWS (New features): Mention it. * tests/fmt/goal-option: New test. * tests/fmt/long-line: Rename from tests/fmt-long-line. * tests/fmt/base: Rename from tests/misc/fmt. * doc/coreutils.texi: Document it. * src/fmt.c (main): Accept the new option (check_for_goals): new function to implement the operands Based on BSD's and Plan-9's fmt programs.
2012-04-12cp: change --attributes-only to not truncate existing filesPádraig Brady
* src/copy.c (copy_reg): Don't truncate an existing file, to support copying attributes between existing files. The original use case only considered creating new files, and it would be a very unusual use case to be relying on the truncating behavior. * doc/coreutils.texi (cp invocation): Mention the non truncating behavior. * tests/cp/attr-existing: A new test to ensure O_TRUNC skipped. * tests/Makefile.am: Reference the new test. * NEWS: Mention the change in behavior.
2012-04-04tests: avoid unnecessary subshells in misc/sttyAndreas Schwab
* tests/misc/stty: Don't waste a subshell to perform this: eval rev=\$REV_$opt. Fix rev1,rev2 assignments similarly.
2012-04-04build: update gnulib submodule to latestJim Meyering
2012-04-04tests: correct reversed args to "compare"Jim Meyering
* tests/misc/sort-discrim: Correct reversed args to "compare". This nit was masked by a bug in maint.mk that effectively disabled many of the syntax-check rules.
2012-04-04tests: new syntax-check rule to prohibit use of `...` in tests/Jim Meyering
* cfg.mk (sc_prohibit_test_backticks): New rule. Exempt 3 files.
2012-04-04tests: remove nearly all remaining backticksJim Meyering
* tests/rm/isatty: Remove now-unneeded "# `" line. * tests/misc/ls-time: Likewise. * tests/misc/date-sec: Remove stray "`" in comment. * tests/du/long-sloop: Likewise. * tests/mv/part-symlink: Replace multi-line `...` by $(...). * tests/mv/sticky-to-xpart: Likewise. * tests/rm/fail-2eperm: Likewise. * tests/ls/nameless-uid: Likewise. * tests/cp/perm: Likewise. * tests/cp/preserve-gid: Likewise. * tests/cp/same-file: Likewise.
2012-04-04tests: use perl's qx!...! rather than `...`Jim Meyering
* tests/misc/expr: As above. * tests/misc/ls-misc: Likewise. * tests/misc/pwd-long: Likewise. * tests/misc/uniq: Likewise.
2012-04-04tests: convert nearly all `...` expressions to $(...)Jim Meyering
Exempt init.sh because it runs before we're assured to have a shell that groks $(...). Exempt *.mk because "$" would have to be doubled, and besides, any `...` expression in a .mk file is almost certainly evaluated before init.sh is run. Finally, also exempt the perl-based tests, because perl's `...` cannot be converted to $(...). Do that by running this command: git grep -l '`.*`' tests \ | grep -Ev 'init\.sh|\.mk$' | xargs grep -Lw perl \ | xargs perl -pi -e 's/`(.*?)`/\$($1)/g' One minor fix-up change was required after that, due to how quoting differs: diff --git a/tests/chmod/equals b/tests/chmod/equals - expected_perms=$(eval 'echo \$expected_'$dest) + expected_perms=$(eval 'echo $expected_'$dest) Another was to make these required quoting adjustments: diff --git a/tests/misc/stty b/tests/misc/stty ... - rev=$(eval echo "\\\$REV_$opt") + rev=$(eval echo "\$REV_$opt") ... - rev1=$(eval echo "\\\$REV_$opt1") - rev2=$(eval echo "\\\$REV_$opt2") + rev1=$(eval echo "\$REV_$opt1") + rev2=$(eval echo "\$REV_$opt2") Also, transform two files that were needlessly excluded above: (both use perl, but are mostly bourne shell) perl -pi -e 's/`(.*?)`/\$($1)/g' \ tests/du/long-from-unreadable tests/init.cfg
2012-04-03tests: convert one `...` expression manuallyJim Meyering
* tests/ls/stat-vs-dirent: Manually convert `(...)` to $(...), to avoid automatically producing an invalid result.
2012-04-03tests: fix quoting bug in misc/nohupJim Meyering
* tests/misc/nohup: Fix invalid quoting.
2012-04-03doc: identify/refer to source of each fixed bug in log and in NEWSJim Meyering
* HACKING (Commit log requirements): Describe our policy: when you fix a bug, put the "git describe" string of the bug-introducing commit in your commit log and put the "fixed-in-release version number" in the NEWS blurb.
2012-04-03tests: avoid spurious misc/expr failure on AIX 6.1Jim Meyering
* tests/misc/expr: Avoid spurious failure on AIX 6.1 due to differing regexp diagnostic. Reported by Michael Felt.
2012-03-28chmod: undo previous changePaul Eggert
It's not portable; see <http://bugs.gnu.org/11108#17>. * src/chmod.c, NEWS: Undo previous change.
2012-03-28chmod: fix symlink race conditionPaul Eggert
* NEWS: Document this. * src/chmod.c (process_file): Don't follow symlink if we think the file is not a symlink.
2012-03-26tests: remove temporary skip for sort-stale-thread-mem failureJim Meyering
* tests/misc/sort-stale-thread-mem: Invoke framework_failure_, now, hoping that valgrind is fixed (or we add exclusions) before the next release.
2012-03-26maint: post-release administriviaJim Meyering
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2012-03-26version 8.16Jim Meyering
* NEWS: Record release date.
2012-03-26tests: work around F17-valgrind sort-stale-thread-mem failureJim Meyering
* tests/misc/sort-stale-thread-mem: Skip upon known failure.
2012-03-26doc: use $(...), not `...` in documentation and commentsJim Meyering
* doc/coreutils.texi (dircolors invocation, Examples of expr): (shred invocation, seq invocation): Use $(...), not `...`. * src/mv.c (do_move): Likewise, in a comment.
2012-03-23tests: skip ls/stat-free-color on XFS, rather than always failingJim Meyering
* tests/init.cfg (require_dirent_d_type_): Manually skip when "." is an xfs file system.
2012-03-23tests: skip part of dd/sparse on some file systemsJim Meyering
* tests/dd/sparse: The last two parts of this test would fail due to the underlying file system at least on Solaris 10 with NFS. That file system would report that a 3MiB file was occupying <= 1KiB of space for nearly 50 seconds after creation. Improved-by: Bernhard Voelker
2012-03-22maint: avoid a doc syntax check failurePádraig Brady
Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/2315847 * doc/coreutils.texi (ln invocation): s/path/file name/
2012-03-22ln: add the --relative optionHarald Hoyer
With the "--relative --symbolic" options, ln computes the relative symbolic link for the user. So, ln works just as cp, but creates relative symbolic links instead of copying the file. I miss this feature since the beginning of using ln. $ tree ./ / `-- usr |-- bin `-- lib `-- foo `-- foo 4 directories, 1 file $ ln -s -v --relative usr/lib/foo/foo usr/bin/foo ‘usr/bin/foo’ -> ‘../lib/foo/foo’ $ tree ./ / `-- usr |-- bin | `-- foo -> ../lib/foo/foo `-- lib `-- foo `-- foo 4 directories, 2 files $ ln -s -v --relative usr/bin/foo usr/lib/foo/link-to-foo ‘usr/lib/foo/link-to-foo’ -> ‘foo’ $ tree ./ / `-- usr |-- bin | `-- foo -> ../lib/foo/foo `-- lib `-- foo |-- link-to-foo -> foo `-- foo 4 directories, 3 files * src/Makefile.am: Reference the relpath module. * src/ln.c (usage): Mention the new option. (do_link): Call the relative conversion if specified. (convert_abs_rel): Perform the relative conversion using the relpath module. * tests/ln/relative: Add a new test. * tests/Makefile.am: Reference the new test. * doc/coreutils.texi: Document the new feature. * NEWS: Mention the new feature.
2012-03-22maint: refactor relpath() from `realpath` for use by `ln`Pádraig Brady
* src/relpath.c: Refactored from realpath.c and adjusted to support returning the relative path rather than just printing to stdout. * src/relpath.h: Export the relpath function. * src/Makefile.am: Reference the refactored relpath module. * po/POTFILES.in: Likewise. * src/realpath.c: Adjust to the refactored relpath module.
2012-03-22maint: ensure PATH_MAX is set correctlyPádraig Brady
This reverts part of commit v8.12-103-g54cbe6e. * src/system.h: Include gnulib's pathmax.h to honor system specific limits, and then we set PATH_MAX only if needed. Note pathmax.h no longer uses pathconf ("/", _PC_PATH_MAX). Note I didn't reinstate the comments about limits.h inclusion order, because pathmax.h includes limits.h anyway.
2012-03-21build: add numerous gnulib modules, mostly for improved portabilityJim Meyering
* bootstrap.conf (gnulib_modules): Add numerous modules for improved portability. Reported by Eric Blake in http://thread.gmane.org/gmane.comp.gnu.coreutils.general/2426/focus=2489 * po/POTFILES.in: Add new files.
2012-03-21build: update gnulib submodule to latestJim Meyering
2012-03-21maint: use more modern fseeko, rather than fseekJim Meyering
* src/tac.c (temp_stream): Use fseeko, not fseek, on principle: use the more modern interface. In general it is better to avoid fseek due to its ABI-imposed 4GiB limit on the "offset", here its use was fine because the offset was always 0. Using fseeko also has the advantage of not triggering a GNULIB_POSIXCHECK warning. Reported by Eric Blake in http://thread.gmane.org/gmane.comp.gnu.coreutils.general/2426/focus=2489
2012-03-20build: speed up configure for releasesEric Blake
Since most users won't be building with GNULIB_POSIXCHECK defined in CFLAGS, and since we can make ./configure 10% (several seconds!) faster by omitting the framework for a posix check, this patch makes it so that the framework is omitted by default, while still giving instructions for maintainers to re-enable it. It's been a while since we've used GNULIB_POSIXCHECK; see this email: https://lists.gnu.org/archive/html/coreutils/2012-03/msg00126.html Some of those failures are because we are intentionally avoiding specific gnulib modules (that is, we have chosen not to use things like fprintf-posix), but until we work with gnulib to avoid particular warnings, wiring up an automatic GNULIB_POSIXCHECK to happen during 'make my-distcheck' is not feasible. * configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Conditionally define, according to whether $GNULIB_POSIXCHECK is in environment.
2012-03-20tests: avoid spurious misc/factor failure on OpenBSD 5.1Jim Meyering
* tests/misc/factor: Map OpenBSD 5.1's "unknown option" to our expected "invalid option". Reported by Bruno Haible.
2012-03-20maint: remove now-superfluous coreutils-path-check ruleJim Meyering
* dist-check.mk (coreutils-path-check): Now that we set PATH in TESTS_ENVIRONMENT, it seems like overkill to make "distcheck" rerun all tests just to check this. (my-distcheck): Remove sole use.
2012-03-20doc: clarify current realpath --relative-base behaviorEric Blake
For compatibility with MacOS relpath(1), as seen here: http://opensource.apple.com/source/bootstrap_cmds/\ bootstrap_cmds-79/relpath.tproj/relpath.c we implemented 'realpath --relative-base=dir1 --relative-to=dir2 file' in the same way as 'relpath -d dir1 dir2 file'. This can result in --relative-base rendering --relative-to as a no-op if dir1 is a child of dir2. Document this. * doc/coreutils.texi (realpath invocation): Mention restriction.
2012-03-20tests: avoid spurious dd/sparse failurePádraig Brady
* tests/dd/sparse: Allow for greater variation in sparse-block counts. Reported by Nelson H. F. Beebe and Bruno Haible.
2012-03-17tests: fix sort-discrim to work without GMPPádraig Brady
* tests/misc/sort-discrim: The expr limit is intmax_t without GMP.
2012-03-16tests: avoid an ls-time false positive on Solaris 10Pádraig Brady
* tests/misc/ls-time: Force a ctime update as updating the atime doesn't update ctime on tmpfs on Solaris 10.
2012-03-15realpath: optimize --relative-base usageEric Blake
There is no need to recompute for every path being visited whether the base is a prefix of the relative location. * src/realpath.c (relpath): Hoist base check... (main): ...here. Based on a suggestion by Pádraig Brady.
2012-03-15realpath: let --relative-to default to --relative-baseEric Blake
Most of the time, if someone wants to filter which paths are relative while leaving all others absolute, they also want to to the filtering based on the same --relative-to directory. Make this easier to specify. * src/realpath.c (main): Convert error to default. * doc/coreutils.texi (realpath invocation): Document this. * tests/misc/realpath: Adjust test to match. * NEWS: Document it.
2012-03-15tests: cover more realpath scenariosEric Blake
'realpath --relative-base --relative-to' is identical to --relative-base=--relative-to, so the test wasn't covering what it claimed. Expose recent fixes for handling of // on systems where // is distinct, and for --relative-base=/. Add test that exposes our design decision that --relative-base that is not a prefix of --relative-to is a no-op (if we later change behavior, we will also have to change that part of the test). * tests/misc/realpath: Fix typo. Add some tests.
2012-03-15realpath: fix problems with root handlingEric Blake
When --relative-base is /, all other paths should be treated as relative (except for // where it matters). Also, on platforms like Cygwin where / and // are distinct, realpath was incorrectly collapsing // into /. http://debbugs.gnu.org/10472. * src/realpath.c (path_prefix, path_common_prefix): Treat / and // as having no common match. (relpath): Allow for no match even without --relative-base. * NEWS: Document this.
2012-03-14test: expose recent gnulib canonicalize bugEric Blake
https://lists.gnu.org/archive/html/bug-gnulib/2012-02/msg00038.html detailed a couple of bugs in gnulib's canonicalize that were visible through coreutils' readlink, but only on systems where // is distinct from /. This particular test assumes the POSIX fix which requires canonicalization of a symlink containing just slashes to behave as if slashes separating the symlink from the rest of the name are elided (see http://austingroupbugs.net/view.php?id=541), as that is the only useful (and current) behavior on Cygwin. That is, ln -s / root ls root/dev must list the contents of /dev, not //dev. * tests/misc/readlink-root: New test. * tests/Makefile.am (TESTS): Run it.
2012-03-13tests: new discriminator-based test for sort -n and -hPaul Eggert
* tests/Makefile.am (TESTS): Add misc/sort-discrim. * tests/misc/sort-discrim: New file, which tests a discriminator-based implementation of 'sort'. Coreutils doesn't use this implementation yet, but the test is useful anyway. Co-authored-by: Drew Kutilek <dkutilek@ucla.edu> Co-authored-by: James Wendt <jwendt@cs.ucla.edu>
2012-03-10dirname: support more than one argumentJérémy Compostella
* src/dirname.c (main): Handle new -z option and manage more than one argument. * doc/coreutils.texi (dirname invocation): Mention it. * NEWS (New features): Mention it. * tests/misc/dirname: Add a two arguments test.
2012-03-10split: support an arbitrary number of split files by defaultJérémy Compostella
* src/split.c (next_file_name): If `suffix_auto' is true and the first suffix character is 'z', generate a new file file name adding `z' to the prefix and increasing the suffix length by one. (set_suffix_length): Disable auto suffix width in various cases. * tests/split/suffix-auto-length: Test it. * doc/coreutils.texi (split invocation): Mention it. * NEWS (Improvements): Likewise.
2012-03-09doc: add missing documentation for basename -zJérémy Compostella
doc/coreutils.texi (basename invocation): Add -z option documentation.
2012-03-09maint: fix a version number typo in NEWSBernhard Voelker
* NEWS: s/8.14/8.15/
2012-03-08chmod: add notations +40, 00440, etc.Paul Eggert
* NEWS: Document this. * doc/perm.texi (Operator Numeric Modes): New section. (Numeric Modes, Directory Setuid and Setgid): Document new behavior. * src/chmod.c (usage): Document new behavior. (main): Support new options -0, -1, etc. * tests/chmod/setgid: Test these new features.