summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-12-04od,test: address warnings from gcc's -Wjump-misses-initJim Meyering
* src/test.c (unary_operator): gcc reported that initializations in two case statements were skipped. Enclose in braces. * src/od.c (decode_one_format): Likewise.
2011-12-04maint: remove redundant usage declarations (-Wredundant-decls)Jim Meyering
* src/csplit.c (usage): Remove declaration. * src/ls.c (usage): Likewise. * src/pr.c (usage): Likewise.
2011-12-03maint: add missing ":" after "License" in local gnulib module filesJim Meyering
This avoids spurious diagnostics when running our "bootstrap" script. * gl/modules/heap: Append colon after "License". * gl/modules/randint: Likewise. * gl/modules/randperm: Likewise. * gl/modules/randread: Likewise. Reported by Stefano Lattarini. Diagnosed by Bruno Haible.
2011-12-01doc: fix list of GNU extension date formatsEric Blake
I didn't check how long these were documented as GNU extensions, nor when they were added by POSIX; but since they are all part of POSIX 2008, we no longer need call them out as extensions. The next version of POSIX will standardize %s: http://austingroupbugs.net/view.php?id=169 but as that is not out yet, I didn't change %s. * doc/coreutils.texi (Time conversion specifiers): %R and %z are now POSIX. (Date conversion specifiers): Likewise for %F, %g, %G.
2011-12-01tests: adjust PATH to generally include /sbin and /usr/sbinBernhard Voelker
Commit 5eeaca94 added /sbin to the PATH for tests using mkfs. For other tests, e.g. tests/cp-fiemap-perf using filefrag, we need /usr/sbin also. Add both directories generally for the tests, "since many of us always augment our PATH with all of the sbin paths all of the time anyway" (Bob in http://lists.gnu.org/archive/html/coreutils/2011-11/msg00107.html). The previous commit is hereby obsolete. * tests/init.cfg (sanitize_path_): Add /sbin and /usr/sbin to PATH unless already included. Needed for tests using admin tools like mkfs and filefrag on systems where the user's environment does not have these directories in the PATH. * tests/init.cfg (require_mkfs_PATH_): Remove obsolete function. * tests/cp/cp-a-selinux: Remove require_mkfs_PATH_ call. * tests/cp/cp-mv-enotsup-xattr: Likewise. * tests/cp/sparse-fiemap: Likewise. * tests/mkdir/writable-under-readonly: Likewise. * tests/rm/read-only: Likewise.
2011-11-29build: simplify warnings based on last gnulib updateEric Blake
We no longer need to exclude this warning. * configure.ac (WARN_CFLAGS): Gnulib dropped -Wunsuffixed-float-constants, as non-portable.
2011-11-29build: update gnulib for syntax-check improvementEric Blake
Commit 5b3e538 proved useful enough to migrate to gnulib after enhancing it to be more generic, which in turn pointed out that commit a2c811db missed an offender. * gnulib: Update to latest. * cfg.mk (sc_prohibit_reversed_compare_failure): Delete, now that gnulib provides it. * tests/ls/dangle: Fix last offender.
2011-11-29build: update gnulib to fix build failure with --enable-gcc-warningsJim Meyering
2011-11-28build: enable -Wsuggest-attribute=pure|const in lib/,...Jim Meyering
but not in gnulib-tests/. * configure.ac (GNULIB_WARN_CFLAGS): Do not exclude -Wsuggest-attribute=pure|const, thus enabling these two warning options in lib/, since gnulib now toes the line. Continue to disable them in gnulib-tests/, since some programs there trigger these suggestions and are not worth fixing.
2011-11-28build: update gnulib for const+pure attributesJim Meyering
2011-11-27tests: add a syntax check for last week's global changeJim Meyering
Last week I made a global change, commit a2c811db, `tests: use "compare exp out", not "compare out exp"', but forgot to add a corresponding syntax check rule. Without that, it is far too easy to add a new test or to merge in an old one that would be non-conforming. Obviously this is only a heuristic, since it relies on the expected-output file to have a name that starts with "exp". * cfg.mk (sc_prohibit_reversed_compare_failure): Prohibit use of compare with reversed arguments.
2011-11-27maint: update comment gcc-4.6.2 still botches -Wsuggest-attribute=pureJim Meyering
* configure.ac: Update the comment on which gcc versions still must not use -Wsuggest-attribute=pure option: still required on post- Fedora 16 rawhide's 4.6.2 20111027.
2011-11-24maint: bootstrap: run autopoint and libtoolize *before* gnulib-toolJim Meyering
* bootstrap (AUTOPOINT, AUTORECONF): Factor out definitions. Run autopoint and libtoolize *before* gnulib-tool. After it, run an abbreviated autoreconf, rather than a loop around all tools. * bootstrap.conf (gnulib_tool_option_extras): Add both --symlink and --makefile-name=gnulib.mk. Remove stray use of $bt. * lib/Makefile.am: Initialize all of the following so that generated code in gnulib.mk may use += to append to those variables: AM_CFLAGS, AM_CPPFLAGS, BUILT_SOURCES, CLEANFILES, EXTRA_DIST, MAINTAINERCLEANFILES, MOSTLYCLEANDIRS, MOSTLYCLEANFILES, SUFFIXES, noinst_LIBRARIES.
2011-11-24maint: bootstrap: remove some now-unneeded codeJim Meyering
This bootstrap script arose back when gnulib-tool was young. Since then, it has seen improvements that render much of this script unnecessary. In particular, it can now make symlinks to the files it uses. Also, I no longer see as much value in marking files as read-only via comments. * bootstrap (slirp, bt_mark_as_generated): Remove.
2011-11-24maint: use gnulib's gettext-h, not the gettext moduleJim Meyering
* bootstrap.conf (gnulib_modules): Use gnulib's gettext-h, not the gettext module. Not only is gettext-h far smaller (it has far fewer dependencies than the gnulib module), but it does not suffer from the problem with the gettext module whereby it adds a -I.../intl option to compilation flags. That can provoke warnings, since we don't have such a directory. We used to work around that via a hack in bootstrap, but that was ugly and inefficient.
2011-11-24maint: append many lib/ and m4/ names to .gitignoreJim Meyering
2011-11-24build: update gnulib submodule to latest for fixed stdalign testJim Meyering
2011-11-23scripts: commit-msg: tweak 72-column test to avoid a false-positiveJim Meyering
* scripts/git-hooks/commit-msg: Don't warn about a line that is longer than 72 if it is a comment. Git-generated comments would occasionally trigger this.
2011-11-23build: update gnulib and tests/init.shJim Meyering
* gnulib: Update. * tests/init.sh: Update from gnulib.
2011-11-23build: --enable-gcc-warnings: disable some new warningsJim Meyering
* configure.ac: Disable some new warning options pulled in via an update to gnulib's manywarnings module: -Wformat-nonliteral, -Wunsuffixed-float-constants, -Wdouble-promotion.
2011-11-22tests: use "compare exp out", not "compare out exp"Jim Meyering
Likewise, when an empty file is expected, use "compare /dev/null out", not "compare out /dev/null". I.e., specify the expected/desired contents via the first file name. Prompted by a suggestion from Bruno Haible in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154 Run these commands: git grep -l -E 'compare [^ ]+ exp' \ |xargs perl -pi -e 's/(compare) (\S+) (exp\S*)/$1 $3 $2/' git grep -l -E 'compare [^ ]+ /dev/null' \ |xargs perl -pi -e 's/(compare) (\S+) (\/dev\/null)/$1 $3 $2/' * tests/chgrp/no-x: As above. * tests/chmod/no-x: Likewise. * tests/chmod/silent: Likewise. * tests/chmod/thru-dangling: Likewise. * tests/chown/basic: Likewise. * tests/chown/deref: Likewise. * tests/chown/preserve-root: Likewise. * tests/cp/abuse: Likewise. * tests/cp/backup-is-src: Likewise. * tests/cp/cp-a-selinux: Likewise. * tests/cp/cp-mv-enotsup-xattr: Likewise. * tests/cp/fail-perm: Likewise. * tests/cp/into-self: Likewise. * tests/cp/proc-zero-len: Likewise. * tests/cp/src-base-dot: Likewise. * tests/cp/thru-dangling: Likewise. * tests/dd/reblock: Likewise. * tests/dd/unblock-sync: Likewise. * tests/du/2g: Likewise. * tests/du/8gb: Likewise. * tests/du/basic: Likewise. * tests/du/bigtime: Likewise. * tests/du/deref-args: Likewise. * tests/du/exclude: Likewise. * tests/du/files0-from-dir: Likewise. * tests/du/hard-link: Likewise. * tests/du/inacc-dest: Likewise. * tests/du/inacc-dir: Likewise. * tests/du/long-sloop: Likewise. * tests/du/max-depth: Likewise. * tests/du/move-dir-while-traversing: Likewise. * tests/du/no-deref: Likewise. * tests/du/no-x: Likewise. * tests/du/one-file-system: Likewise. * tests/du/slash: Likewise. * tests/du/trailing-slash: Likewise. * tests/install/strip-program: Likewise. * tests/ln/hard-backup: Likewise. * tests/ls/block-size: Likewise. * tests/ls/color-clear-to-eol: Likewise. * tests/ls/color-dtype-dir: Likewise. * tests/ls/color-norm: Likewise. * tests/ls/dangle: Likewise. * tests/ls/dired: Likewise. * tests/ls/file-type: Likewise. * tests/ls/follow-slink: Likewise. * tests/ls/infloop: Likewise. * tests/ls/m-option: Likewise. * tests/ls/no-arg: Likewise. * tests/ls/recursive: Likewise. * tests/ls/rt-1: Likewise. * tests/ls/stat-dtype: Likewise. * tests/ls/stat-failed: Likewise. * tests/ls/stat-free-symlinks: Likewise. * tests/ls/x-option: Likewise. * tests/misc/arch: Likewise. * tests/misc/cat-buf: Likewise. * tests/misc/cat-proc: Likewise. * tests/misc/chcon: Likewise. * tests/misc/csplit: Likewise. * tests/misc/df-P: Likewise. * tests/misc/fmt-long-line: Likewise. * tests/misc/groups-dash: Likewise. * tests/misc/groups-version: Likewise. * tests/misc/head-pos: Likewise. * tests/misc/nl: Likewise. * tests/misc/od-N: Likewise. * tests/misc/od-multiple-t: Likewise. * tests/misc/od-x8: Likewise. * tests/misc/printf: Likewise. * tests/misc/printf-hex: Likewise. * tests/misc/pwd-option: Likewise. * tests/misc/readlink-fp-loop: Likewise. * tests/misc/runcon-no-reorder: Likewise. * tests/misc/seq-long-double: Likewise. * tests/misc/sort-NaN-infloop: Likewise. * tests/misc/sort-benchmark-random: Likewise. * tests/misc/sort-debug-keys: Likewise. * tests/misc/sort-float: Likewise. * tests/misc/sort-merge-fdlimit: Likewise. * tests/misc/sort-unique-segv: Likewise. * tests/misc/stat-hyphen: Likewise. * tests/misc/stat-slash: Likewise. * tests/misc/stdbuf: Likewise. * tests/misc/sum-sysv: Likewise. * tests/misc/tac-2-nonseekable: Likewise. * tests/misc/tac-continue: Likewise. * tests/misc/tr-case-class: Likewise. * tests/misc/truncate-fail-diag: Likewise. * tests/misc/wc-files0: Likewise. * tests/mkdir/selinux: Likewise. * tests/mv/backup-dir: Likewise. * tests/mv/backup-is-src: Likewise. * tests/mv/diag: Likewise. * tests/mv/dir2dir: Likewise. * tests/mv/dup-source: Likewise. * tests/mv/force: Likewise. * tests/mv/hard-verbose: Likewise. * tests/mv/i-link-no: Likewise. * tests/mv/into-self: Likewise. * tests/mv/into-self-2: Likewise. * tests/mv/into-self-3: Likewise. * tests/mv/mv-special-1: Likewise. * tests/mv/part-fail: Likewise. * tests/mv/perm-1: Likewise. * tests/mv/sticky-to-xpart: Likewise. * tests/mv/trailing-slash: Likewise. * tests/rm/rm1: Likewise. * tests/rm/rm2: Likewise. * tests/rm/cycle: Likewise. * tests/rm/dir-no-w: Likewise. * tests/rm/dir-nonrecur: Likewise. * tests/rm/fail-2eperm: Likewise. * tests/rm/fail-eacces: Likewise. * tests/rm/i-never: Likewise. * tests/rm/inaccessible: Likewise. * tests/rm/interactive-always: Likewise. * tests/rm/interactive-once: Likewise. * tests/rm/isatty: Likewise. * tests/rm/one-file-system: Likewise. * tests/rm/rm3: Likewise. * tests/rm/rm5: Likewise. * tests/rm/unread2: Likewise. * tests/rm/v-slash: Likewise. * tests/sample-test: Likewise. * tests/split/b-chunk: Likewise. * tests/split/fail: Likewise. * tests/split/l-chunk: Likewise. * tests/split/lines: Likewise. * tests/split/r-chunk: Likewise. * tests/split/suffix-length: Likewise. * tests/tail-2/big-4gb: Likewise. * tests/tail-2/follow-name: Likewise. * tests/tail-2/follow-stdin: Likewise. * tests/tail-2/pipe-f: Likewise. * tests/tail-2/pipe-f2: Likewise. * tests/tail-2/start-middle: Likewise. * tests/touch/60-seconds: Likewise. * tests/touch/fail-diag: Likewise. * tests/touch/not-owner: Likewise. * tests/touch/relative: Likewise.
2011-11-22tests: use compare, not "diff", in a few stray testsJim Meyering
* tests/install/basic-1: Use compare, not diff. * tests/mkdir/p-v: Likewise. * tests/mv/part-fail: Likewise. * tests/rm/rm1: Likewise. * tests/rm/rm2: Likewise. * tests/touch/not-owner: Likewise.
2011-11-20maint: revert "build: update gnulib submodule to latest"Jim Meyering
Don't update to latest from gnulib just yet. This reverts commit 173f4d9bd628fb771eaeca3d2fef97dcd71fedb8. In particular, manywarnings is too aggressive.
2011-11-20build: update gnulib submodule to latestJim Meyering
2011-11-20maint: make generated THANKS file read-onlyJim Meyering
* Makefile.am (THANKS): Make generated file read-only.
2011-11-20doc: clarify ln's --help outputJim Meyering
* src/ln.c (usage): Use TARGET, not "source" in description. Reported by Michael J Daniel in http://bugs.gnu.org/9896.
2011-11-20port to GNU hosts, where getuid and friends can failPaul Eggert
* src/groups.c (main): * src/install.c (need_copy): * src/su.c (log_su): * src/test.c (unary_operator): * src/whoami.c (main): Don't assume that getuid and friends always succeed. This fixes the same problem that we recently fixed with 'id'.
2011-11-20maint: avoid gitlog-to-changelog diagnostic about unused entriesJim Meyering
* build-aux/git-log-fix: Comment out two unused entries. Each of those two entries does indicate an error in a commit log, but precedes the cut-off date, so has an actual VC'd ChangeLog entry. I.e., gitlog-to-changelog generates ChangeLog entries since 2008-02, and these two predate that. * ChangeLog-2008: Make the indicated correction.
2011-11-20ln: fix position of --backup values descriptionErik Auerswald
* src/ln.c (usage): A paragraph describing interactions of -s with -L and -P somehow snuck in between the description of the --backup option and the values used to control it. Fix this by moving the value description up.
2011-11-18scripts: rewrite git commit-msg hook in PerlJim Meyering
* scripts/git-hooks/commit-msg: Rewrite in perl. This is still a work in progress in that it hard-codes coreutils- specific program names and policies that should be easy to selectively enable or disable without modifying the script.
2011-11-16sort: clarify wording on -k syntaxEric Blake
* src/sort.c (usage): Use KEYDEF instead of POS, and call out the specific OPTS that can occur in KEYDEF. Based on a report by Lars Noodén, http://bugs.gnu.org/10019
2011-11-15id: fix bug when euid != ruidPaul Eggert
* src/id.c (main): Report an error if no args are given and getuid fails, because print_full_info needs ruid. Redo code so that getuid and friends are invoked only when needed; this makes the code easier to follow, and is how I found the above bug.
2011-11-15ls: another reword of generic size noteRuediger Meier
* src/system.h (emit_size_note): Use "unit" rather than "suffix", and move multiplication to example instead of in suffix list. See additional discussion in Bug#9939.
2011-11-15id: tweak commentEric Blake
* src/id.c (main): Replace confusing use of "etc.".
2011-11-15id: handle (uid_t) -1 more portablyPaul Eggert
* src/id.c (GETID_MAY_FAIL): Remove. (main): Check for nonzero errno, rather than having a compile-time GETID_MAY_FAIL guess. Suggested by Roland McGrath in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10021#47>. Also, the old code was incorrect if uid_t was narrower than int. (print_full_info): Remove unnecessary cast to -1.
2011-11-15id: undo previous commit, which was done by mistakePaul Eggert
* src/id.c (GETID_MAY_FAIL, main, print_full_info): Undo previous change.
2011-11-15doc: update for ISO/IEC 80000-13Paul Eggert
* doc/coreutils.texi (Block size): IEC 60027-2 has been superseded by ISO/IEC 80000-13, so prefer the newer standard but also mention the old. The new standard specifies Zi and Yi, so they are no longer GNU extensions. Fix stale URL to BIPM. 2011-11-14 Paul Eggert <eggert@cs.ucla.edu> id: handle (uid_t) -1 more portably * src/id.c (GETID_MAY_FAIL): Remove. (main): Check for negative return values, not for -1. The old code was incorrect if uid_t was narrower than int, regardless of whether we were on a GNU or a POSIX platform. The new code is simpler and doesn't need GETID_MAY_FAIL. (print_full_info): Remove unnecessary cast to -1.
2011-11-14id: fail when getuid, getgid, etc. fail, e.g., on GNU/HurdLudovic Courtès
POSIX-conforming getuid, geteuid, etc. functions cannot fail, but on GNU/Hurd systems and some others, they may. * src/id.c (main) [__GNU__]: Detect and diagnose any such failure. * tests/id/gnu-zero-uids: New file. * tests/Makefile.am (TESTS): Add it to the list. * tests/init.cfg (require_gnu_): New function.
2011-11-13tests: avoid rare fp failure in du/move-dir-while-traversingNix
* tests/du/move-dir-while-traversing: Boost the mkdir iteration count yet again.
2011-11-13maint: adjust git hook to allow "copy: ..." on line 1 of commit messageJim Meyering
* scripts/git-hooks/commit-msg: Add "copy" to the list of valid command-name-like summary line prefixes.
2011-11-13maint: id, groups: use conforming diagnosticsJim Meyering
* src/groups.c (main): Don't capitalize the first word of diagnostic. * src/id.c (main): Likewise. Reported by Ludovic Courtès.
2011-11-13maint: avoid new syntax-check failure due to indentation with TABsJim Meyering
* cfg.mk (tbi_2): Exempt pre-applypatch, since it too is from git.
2011-11-12maint: install customized git hooks to keep commit logs consistentJim Meyering
* bootstrap.conf (buildreq): Copy (with backup) coreutils-supplied git hooks into .git/hooks, to help keep commit logs normalized.
2011-11-12maint: add rule to ensure that our commit hook copies are up to dateJim Meyering
* Makefile.am (check-git-hook-script-sync): New rule -- not used anywhere, because it depends on having very recent git. * scripts/git-hooks/pre-applypatch: New file.
2011-11-12maint: sync pre-commit script with git'sJim Meyering
* scripts/git-hooks/pre-commit (allownonascii): Remove double quotes around $(...) construct, to make this file identical to git's sample hook script.
2011-11-12build: update gnulib for fstatat cross-compile improvementJim Meyering
2011-11-12maint: adjust the URL that will appear in the generated announcementJim Meyering
* cfg.mk (url_dir_list): Use this http://ftp.gnu.org/gnu/$(PACKAGE) for the first link listed in the generated announcement. announce-gen now provides the faster mirror link automatically.
2011-11-12ls: plug a per-argument leakJim Meyering
Using ls -l on an SELinux-enabled system would leak one SELinux context string per non-empty-directory command-line argument. * src/ls.c (free_ent): New function, factored out of... (clear_files): ...here. Use it. (extract_dirs_from_files): Call free_ent (f), rather than simply free (f->name). The latter failed to free the possibly-malloc'd linkname and scontext members, and thus could leak one of those strings per command-line argument. * THANKS.in: Update. * NEWS (Bug fixes): Mention it. Reported by Juraj Marko in http://bugzilla.redhat.com/751974.
2011-11-12* tests/misc/sort-continue: Port to Fedora 15.Paul Eggert
Redirect with the shell command, not in a separate 'exec'. Without this patch, Fedora 15 x86-64 /bin/sh (i.e., Bash 4.2.10) complained about running out of file descriptors in the shell.
2011-11-12* tests/ls/block-size: Make it executable.Paul Eggert