summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-05-08maint: fix common spelling errorsKevin Lyda
These were identified using: https://github.com/lyda/misspell-check executed like: git ls-files | misspellings -f - * src/cat.c: Correct a spelling error. * src/comm.c: Likewise. * src/expr.c: Likewise. * src/pr.c: Likewise. * src/tac.c: Likewise. * src/test.c: Likewise. * src/ChangeLog-2005: Likewise. * src/ChangeLog-2007: Likewise. * src/NEWS: Likewise. * src/doc/coreutils.texi: Likewise. * src/lib/ChangeLog-2007: Likewise. * src/man/help2man: Likewise. * src/old/fileutils/ChangeLog-1997: Likewise. * src/old/fileutils/NEWS: Likewise. * src/old/sh-utils/ChangeLog.0: Likewise. * src/old/textutils/ChangeLog: Likewise. * src/tests/misc/comm: Likewise. * src/tests/misc/uniq: Likewise. * src/tests/mv/dir2dir: Likewise. * src/cfg.mk (old_NEWS_hash): update with `make update-NEWS-hash`
2012-05-07tests: avoid LD_PRELOAD lookup error for dlsymJim Meyering
* tests/cp/nfs-removal-race: Link with -ldl.
2012-05-07cp: handle a race condition more sensiblyJim Meyering
* src/copy.c (copy_reg): In a narrow race (stat sees dest, yet open-without-O_CREAT fails with ENOENT), retry the open with O_CREAT. * tests/cp/nfs-removal-race: New file. * tests/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it. Reported by Philipp Thomas and Neil F. Brown in http://bugs.gnu.org/11100
2012-05-07doc: NEWS: note when the id/groups bug was introducedJim Meyering
* NEWS (Bug fixes): Note the first affected release. The id bug was introduced by commit v8.0-112-g719a95a.
2012-05-04build: update gnulib submodule to latestJim Meyering
2012-05-04maint: rely on gnulib's new sys_resource moduleJim Meyering
* bootstrap.conf (gnulib_modules): Add sys_resource. * src/sort.c: Remove #if HAVE_SYS_RESOURCE_H guard around inclusion of <sys/resource.h> and move the inclusion "up" into the alphabetized list of its peers. This also avoids a failure of the sc_prohibit_always_true_header_tests syntax-check rule. * m4/jm-macros.m4 (gl_CHECK_ALL_HEADERS): Remove sys/resource.h.
2012-05-02cp,mv,install: provide POSIX_FADV_SEQUENTIAL hint to inputPádraig Brady
This was inadvertently omitted from v8.5-104-g47076e3, and gives the same 5% speedup when copying from an SSD. * src/copy.c (copy_internal): Apply the FADVISE_SEQUENTIAL hint.
2012-05-02maint: prohibit an operator at end of lineJim Meyering
Many coding standards, including GNU's, advocate that when splitting a line near a binary operator, one should put the operator at the beginning of the continued line, rather than at the end of the preceding one. This is for readability: such operators are relatively important to readability, and they are more apparent at the beginning of a line than at the varying-column end of line, * cfg.mk (sc_prohibit_operator_at_end_of_line): New rule. Exempt test.c and head.c.
2012-05-02maint: adjust comments to avoid FP match on binary-operator-at-EOLJim Meyering
* src/ls.c (print_long_format): Reformat comment to avoid "==" at end of line. Also, "sortkey" is not a word: s/sortkey/sort key/. * src/ioblksize.h: Likewise, for "|" from a shell snippet. * src/runcon.c: Likewise, for "|" in grammar-like usage.
2012-05-02maint: with split lines, don't leave an operator at end of lineJim Meyering
* src/copy.c (copy_reg): Split an expression before a binary operator, not after it. * src/cut.c (set_fields): Likewise. * src/id.c (main): Likewise. * src/install.c (setdefaultfilecon): Likewise. * src/join.c (ignore_case): Likewise. * src/pr.c (cols_ready_to_print, init_parameters, print_page): Likewise. * src/stty.c (set_window_size): Likewise. * src/wc.c (SUPPORT_OLD_MBRTOWC): Likewise. * src/who.c (scan_entries): Likewise. * src/test.c (binary_operator): Join a split line. * src/extent-scan.c (extent_scan_read): Move an ">" from end of line to beginning of the following. Likewise for two other expressions.
2012-04-30cat,cp,mv,install,split: Set the minimum IO block size used to 64KiBPádraig Brady
* NEWS: Mention the change in behavior. * src/ioblksize.h: Add updated test results and increase value from 32KiB to 64KiB.
2012-04-27id: -Zn/-Zr: avoid an invalid diagnosticJim Meyering
* src/id.c (main): Using -Z with -r or -n would fail with "id: cannot print only names or real IDs in default format", in spite of that "-Z", which specifies a non-default format. Now, it succeeds and ignores the -n or -r option. The error was that the test for default_format was not updated when I added the new --context (-Z) option in commit v6.9-33-g5320d0f.
2012-04-27id: don't call getcon unnecessarilyJim Meyering
* src/id.c (main): Invocations like "id" and "id -G" would call getcon to determine the current security context even though that result would not be used. Similarly, when POSIXLY_CORRECT is set. Rearrange conditionals and hoist the POSIXLY_CORRECT test so that we call getcon only when necessary.
2012-04-27maint: id: minor factorizationJim Meyering
* src/id.c (main): Factor out uses of "argc - optind". Move option-consistency checks to precede the potential getcon call.
2012-04-27id,groups: with no user name, print only real and/or effective IDs,Jim Meyering
... i.e., don't use the getpw* functions. Before this change, running groups or id with no user name argument would include a group name or ID from /etc/passwd. Thus, under unusual circumstances (default group is changed, but has not taken effect for a given session), those programs could print a name or ID that is neither real nor effective. To demonstrate, run this: echo 'for i in 1 2; do id -G; sleep 1.5; done' \ |su -s /bin/sh ftp - & sleep 1; perl -pi -e 's/^(ftp:x:\d+):(\d+)/$1:9876/' /etc/passwd Those id -G commands printed the following: 50 50 9876 With this change, they print this: 50 50 Similarly, running those programs set-GID could make them print one ID too many. * src/group-list.c (print_group_list): When username is NULL, pass egid, not getpwuid(ruid)->pw_gid), to xgetgroups, per the API requirements of xgetgroups callee, mgetgroups. When not using the password database, don't call getpwuid. * NEWS (Bug fixes): Mention it. * tests/misc/id-setgid: New file. * tests/Makefile.am (TESTS): Add it. (root_tests): It's a root-only test, so add it here, too. Originally reported by Brynnen Owen as http://bugs.gnu.org/7320. Raised again by Marc Mengel in http://bugzilla.redhat.com/816708.
2012-04-22maint: sync up required autoconf version in bootstrap.confStefano Lattarini
* bootstrap.conf ($buildreq): Require autoconf 2.64, not 2.62. This is consistent with what is required by AC_PREREQ in configure.ac.
2012-04-19doc: fix a grammar nitJim Meyering
* doc/coreutils.texi (split invocation): s/are/is/ in "P or Q are".
2012-04-19tests: factor out expensive "pairs" code of misc/sttyBernhard Voelker
* tests/Makefile.am (TESTS): Add misc/stty-pairs. * tests/init.cfg (stty_reversible_init_): New function. (stty_reversible_query_): New function. * tests/misc/stty: Factor out expensive "pairs" code into new test. Use new stty_reversible_* functions instead of evaluating static REV_* variables. * tests/misc/stty-pairs: Add new test. Code added from misc/stty. Mark this as an expensive test. Skip 'parenb' and 'cread' options, as these tests are known to fail. Like in misc/stty, also use the new stty_reversible_* functions.
2012-04-19tests: add iutf8 option to misc/sttyBernhard Voelker
* tests/misc/stty: Add iutf8 to the list of REV_* options. That option has been implemented in commit v5.2.1-193-g733e79e.
2012-04-19maint: tac: use memcpy, not strcpyJim Meyering
* src/tac.c (main): Use memcpy, not strcpy, since we know the length.
2012-04-19maint: ls: use stpncpy/stpcpy, not strncpy/strcpyJim Meyering
* src/ls.c (gobble_file): Move a decl "down". (make_link_name): Do not hard-code '/'. Use IS_ABSOLUTE_FILE_NAME and dir_len instead. Use stpcpy/stpncpy in place of strncpy/strcpy.
2012-04-19maint: modernize/clean-up a small function in ls.cJim Meyering
* src/ls.c (make_link_name): Adjust comment style to refer to VARIABLE names, not 'variable'. Move each of two declarations "down" to first use. Compare pointer to NULL, not to 0. Don't reuse local, "linkbuf" for a different purpose.
2012-04-19doc: tweak README-hackingJim Meyering
* README-hacking: Don't say "...on your hard drive". That is unnecessary, and now, borderline anachronistic.
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.