summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-02-21id: use getgrouplist when possibleJames Youngman
* gl/m4/mgetgroups.m4: Check for getgrouplist. * gl/lib/mgetgroups.c (mgetgroups): Use getgrouplist, if available. * TODO: Remove the item about switching to getgrouplist. * NEWS: mention this
2008-02-21du vs. hard links and argument order: improve documentationPaul Eggert
* doc/coreutils.texi (du invocation): Document default behavior on hard links, and why argument order matters.
2008-02-20join: avoid new leaksJames Youngman
* src/join.c (prevline): Make prevline module-level static, so that the allocated items can be freed at exit. (free_prevline): new atexit function; frees items in prevline[]. Use ARRAY_CARDINALITY, so include "argmatch.h" to get that. (main): Arrange for free_prevline to be called during exit. (get_line): Free prevline[which - 1] also, as that will have been allocated by dup_line.
2008-02-20Remove xdelta support, clean up distcheck process.Jim Meyering
* Makefile.maint (writable-files): Don't create $(release_archive_dir). (my-distcheck): Don't depend on prev-tgz. Remove xdelta-related variables and uses. (alpha beta major): Skip steps if $(release_archive_dir) doesn't exist.
2008-02-20* bootstrap: Remove dangling symlinks before invoking aclocal.Jim Meyering
2008-02-20sort: add --sort=... option.Andreas Schwab
* src/sort.c (SORT_OPTION): New enum. (sort_args, sort_types): Define. (usage, long_options, main): New option --sort. * tests/sort/Test.pm: Test it. * doc/coreutils.texi (sort invocation): Document --sort option. * NEWS: Mention this.
2008-02-192008-02-19 Jim Meyering <meyering@redhat.com>Jim Meyering
* TODO: Remove final seq-related item.
2008-02-19* src/c99-to-c89.diff: Adjust seq.c offsets. Accommodate a new C99-ism.Jim Meyering
2008-02-19seq: give better diagnostics for invalid formats.Steven Schubiger
* src/seq.c: (validate_format): New function. (main): Use it. * tests/misc/seq (fmt-d, fmt-e): Test for expected diagnostics with invalid formats. * NEWS: Mention this change. * TODO: Remove this item. [jm: src/seq.c: make diagnostics more consistent tests/misc/seq (fmt-eos1): adjust the expected diagnostic ]
2008-02-19join: new options: --check-order and --nocheck-order.James Youngman
* src/join.c: Support --check-order and --nocheck-order. New variables check_input_order, seen_unpairable and issued_disorder_warning[]. For --check-order, verify that the input files are in sorted order. For the default case, check the order only if there are unpairable lines. (join): Perform ordering checks after reaching EOF on either input. (usage): Mention --check-order and --nocheck-order. (dupline): Save a copy of the previously-read input line so that we can detect disorder on the input. (get_line): Temporarily save a copy of the previous line (by calling dupline) and check relative ordering (by calling checkorder) before returning the newly-read line. (getseq, join): Tell get_line which file we are reading from. (advance_seq): New function, factoring out some of the code commonly surrounding calls to getseq. (checkorder): New function. Verifies that a pair of consecutive input lines are in sorted order. * doc/coreutils.texi (join invocation): Document the new options --check-order and --nocheck-order. * tests/join/Test.pm (tv): Added tests for --check-order and --nocheck-order. * NEWS: Mention this new feature.
2008-02-19Fix non-srcdir "make distcheck" failure.James Youngman
* Makefile.am (check-ls-dircolors): Look for sources under $(srcdir), not under ".".
2008-02-18seq: give a proper diagnostic for an invalid --format=% optionJim Meyering
* src/seq.c (long_double_format): Handle '%' at end of string. * tests/misc/seq [fmt-eos1, fmt-eos2]: New tests for the bug. * NEWS: Mention this. Reported by Pádraig Brady.
2008-02-17.gitignore, src/.gitignore: ignore moreJim Meyering
2008-02-17Clean up Makefile.maint.Jim Meyering
* Makefile.maint: Remove obsolete comments. (local-checks-available): Remove changelog-check.
2008-02-17Clean up ls.c.Jim Meyering
* src/ls.c (put_indicator): Use fwrite, not a loop.
2008-02-17Ensure that dircolors.c and ls.c remain in sync.Jim Meyering
* Makefile.am (check-ls-dircolors): New rule. (distcheck-hook): Depend on it.
2008-02-17Expand "ls --color" tests to also use the dircolors defaults.Jim Meyering
* tests/misc/ls-misc: Adjust this test so each is run twice. First, as usual, and the second time with LS_COLORS set using the default settings produced by running dircolors. * tests/Coreutils.pm: See below. This required some changes: - save and restore $ENV{LS_COLORS} for each individual test that requires a specific value. - Since this is the first test to call the run_tests command more than once, it has exposed that that function erroneously modifies the \@Tests array. Fix that in tests/Coreutils.pm.
2008-02-17Adjust dircolors to match ls.c.Jim Meyering
* src/dircolors.hin: comment out NORMAL and FILE, define RESET. * src/dircolors.c (slack_codes) Add "RESET". (ls_codes): Add "rs".
2008-02-17ls --color no longer outputs unnecessary escape sequencesEd Avis
In --color mode, plain files do not get any color, not even white. When no highlighting is required, ls outputs no escape sequence at all. * src/ls.c (print_with_color): (used_color): New global. (indicator_no) [C_RESET]: New enum value. (indicator_name) ["rs"]: Corresponding new string. (color_indicator): Make the 'normal' and 'file' markers be NULL. Use "rs" (C_RESET) to reset to ordinary colors. (process_signals): Restore default colors only if necessary. (main): Don't call prep_non_filename_text here. (print_name_with_quoting): Call it here, instead. (prep_non_filename_text): Use C_RESET, not C_NORM. (print_color_indicator): Return bool, not void. Print nothing, when possible. (put_indicator): Call prep_non_filename_text the first time. * tests/misc/ls-misc: Test for above. * tests/ls/color-dtype-dir: Adapt: no escapes around regular file name. * TODO: Remove item. * NEWS: Mention this.
2008-02-17ls: Improve description of --group-directories-first.Dan Jacobson
* src/ls.c (usage) [--group-directories-first]: Improve description. * doc/coreutils.texi (Which files are listed): Likewise.
2008-02-16Avoid tests/cp/acl test failure.Jim Meyering
* tests/check.mk (TESTS_ENVIRONMENT) [CONFIG_HEADER]: Define to an absolute name, so it can be used from any point in the test hierarchy. Reported by James Youngman.
2008-02-16Use the gettime module in ls.c.James Youngman
Implement TODO list item to make ls.c use the gettime module. * TODO (ls): Now that we use gettime, remove the TODO entry. * src/ls.c: Use timespec.h and the gettime module. (current_time): Change type from time_t to struct timespec. (current_time_ns): Removed. (get_current_time): Removed. (print_long_format): Remove when and when_ns, since we have when_timespec anyway. Change type of variable six_months_ago from time_t to struct timespec.
2008-02-14groups: don't test printf and putchar calls for failureJim Meyering
They are unnecessary, since we use gnulib's closeout module. * src/group-list.c (print_group): Remove explicit error tests. * src/groups.c (main): Likewise. (write_error): Remove function.
2008-02-13Replace groups.sh with groups.c.James Youngman
* src/groups.c (main): New file, replacing groups.sh. * src/group-list.c, src/group-list.h: New files, factored out of id.c, implementing the functionality that "id" and "groups" have in common. * src/id.c (print_full_info): Avoid a segfault when trying to print an error message if getgroups fails. (print_group_list): Move to group-list.c. (print_group): Likewise. * man/Makefile.am: When building groups.1, obtain the help text from src/groups.c, not src/groups.sh. (noinst_HEADERS): Add group-list.h. (group): Remove rule. (dist_man_MANS): Remove groups.1. * doc/coreutils.texi (groups: Print group names a user is in): Explain why "groups" and "groups $(id -un)" give different results in existing login sessions after you change the group database. (id: Print user identity): Likewise for "id". * po/POTFILES.in: Add src/group-list.c and src/groups.c. * NEWS: mention this. * AUTHORS: Update.
2008-02-12Move more test_skip_-using code to follow ". test-lib.sh".Jim Meyering
* tests/mv/acl: Likewise. * tests/cp/acl: Likewise. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-02-12tests/touch/not-owner: Source test-lib.sh before using skip_test_.Peter Fales
Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-02-12* tests/Makefile.am (EXTRA_DIST): Remove strace.Jim Meyering
2008-02-11tests: Migrate sourced strace file into a function, require_strace_.Jim Meyering
* tests/strace: Remove file. * tests/test-lib.sh (require_strace_): New function. * tests/mv/atomic: Use require_strace_, rather than ". strace". * tests/ls/stat-free-symlinks: Likewise. Peter Fales reported that stat-free-symlinks failed without strace.
2008-02-11* tests/rm/inaccessible: Source test-lib.sh *before* using skip_test_.Jim Meyering
Reported by Peter Fales. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-02-10Ensure there are no removable (useless) if-before-free tests.Jim Meyering
* bootstrap.conf (gnulib_modules): Add useless-if-before-free. * Makefile.maint (sc_avoid_if_before_free): New rule.
2008-02-10Use a better dirname emulation.Jim Meyering
* build-aux/check.mk (_dirname): Define. (am__check_pre): Use it.
2008-02-10Avoid test failure when run with risky PATH ("." before /usr/bin).Jim Meyering
* build-aux/check.mk (approx_dirname_filter): Define. (am__check_pre): Emulate dirname using sed. Report and suggested fix from Bruno Haible in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12587/focus=12590
2008-02-10* build-aux/.gitignore: Remove file from version control. It's generated.Jim Meyering
Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-02-10Generate ChangeLog from git log.Jim Meyering
* bootstrap.conf (gnulib_modules): Add gitlog-to-changelog. Ensure that ChangeLog exists, for automake. * Makefile.am (gen-ChangeLog): New rule. (dist-hook): Depend on it. (EXTRA_DIST): Add ChangeLog-2006, ChangeLog-2007, ChangeLog-2008. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-02-10Remove ChangeLog, dividing its content into ChangeLog-200?Jim Meyering
* ChangeLog: Remove file. * ChangeLog-2005: Prepend the 2005 entries. * ChangeLog-2006: New file. * ChangeLog-2007: New file. * ChangeLog-2008: New file. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-02-10* ChangeLog: Manually update copyright notice at *bottom*.Jim Meyering
Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-02-09tests: rm/fail-eperm: require-non-root in perl, not shJim Meyering
Since it creates no temporaries and since it requires non-root, do the require-non-root bit in perl, rather than using test-lib.sh.
2008-02-09tests: Remove priv-check. Use new require_root_ function instead.Jim Meyering
* tests/priv-check: Remove file. * tests/Makefile.am (EXTRA_DIST): Remove priv-check. * tests/test-lib.sh (require_root_): New function. Use this function rather than sourcing the priv-check file. * tests/sample-test: Use require_root_ rather than priv-check. * tests/chown/basic: Likewise. * tests/cp/cp-a-selinux: Likewise. * tests/cp/preserve-gid: Likewise. * tests/cp/special-bits: Likewise. * tests/ls/nameless-uid: Likewise. * tests/misc/chcon: Likewise. * tests/mkdir/writable-under-readonly: Likewise. * tests/mv/sticky-to-xpart: Likewise. * tests/rm/fail-2eperm: Likewise. * tests/rm/no-give-up: Likewise. * tests/rm/one-file-system: Likewise. * tests/tail-2/append-only: Likewise. * tests/touch/now-owned-by-other: Likewise. * tests/rm/fail-eperm: Use skip_if_root_ rather than priv-check. * Makefile.maint (sc_root_tests): Reflect this change: search for the new function name.
2008-02-09tests: factor out the perl-requiring code in many test scriptsJim Meyering
* tests/require-perl: New file. * tests/Makefile.am (EXTRA_DIST): Add require-perl. * tests/dd/skip-seek: Use it, and remove manual tests. * tests/du/files0-from: Likewise. * tests/ls/nameless-uid: Likewise. * tests/misc/base64: Likewise. * tests/misc/basename: Likewise. * tests/misc/cut: Likewise. * tests/misc/date: Likewise. * tests/misc/dircolors: Likewise. * tests/misc/dirname: Likewise. * tests/misc/expand: Likewise. * tests/misc/expr: Likewise. * tests/misc/factor: Likewise. * tests/misc/fmt: Likewise. * tests/misc/fold: Likewise. * tests/misc/head-elide-tail: Likewise. * tests/misc/ls-misc: Likewise. * tests/misc/md5sum: Likewise. * tests/misc/md5sum-newline: Likewise. * tests/misc/mktemp: Likewise. * tests/misc/od: Likewise. * tests/misc/paste-no-nl: Likewise. * tests/misc/pr: Likewise. * tests/misc/pwd-long: Likewise. * tests/misc/seq: Likewise. * tests/misc/sha1sum: Likewise. * tests/misc/sha1sum-vec: Likewise. * tests/misc/sha224sum: Likewise. * tests/misc/sha256sum: Likewise. * tests/misc/sha384sum: Likewise. * tests/misc/sha512sum: Likewise. * tests/misc/sort-merge: Likewise. * tests/misc/stat-printf: Likewise. * tests/misc/sum: Likewise. * tests/misc/sum-sysv: Likewise. * tests/misc/test-diag: Likewise. * tests/misc/tsort: Likewise. * tests/misc/tty-eof: Likewise. * tests/misc/unexpand: Likewise. * tests/misc/wc-files0-from: Likewise. * tests/misc/xstrtol: Likewise. * tests/mv/i-1: Likewise. * tests/rm/empty-name: Likewise. * tests/rm/fail-eperm: Likewise. * tests/rm/unreadable: Likewise. (EXTRA_DIST): *do* require require-perl as a stand-alone, 'source'able script.
2008-02-09tests: call skip_test_ in place of echo+exit 77Jim Meyering
* tests/mv/no-target-dir: Likewise. * tests/other-fs-tmpdir: Likewise. * tests/rm/empty-name: Likewise. * tests/rm/fail-eperm: Likewise. * tests/rm/inaccessible: Likewise. * tests/rm/isatty: Likewise. * tests/rm/unreadable: Likewise. * tests/setgid-check: Likewise. * tests/sparse-file: Likewise. * tests/strace: Likewise. * tests/tail-2/append-only: Likewise. * tests/tail-2/big-4gb: Likewise. * tests/tail-2/tail-n0f: Likewise. * tests/touch/dangling-symlink: Likewise. * tests/touch/fifo: Likewise. * tests/touch/not-owner: Likewise. * tests/mv/i-3: Likewise. * tests/umask-check: Likewise. * tests/mv/acl: Likewise. * tests/cp/acl: Likewise. * tests/chgrp/deref: Likewise. * tests/chmod/setgid: Likewise. * tests/cp/existing-perm-race: Likewise. * tests/cp/file-perm-race: Likewise. * tests/cp/parent-perm-race: Likewise. * tests/du/2g: Likewise. * tests/du/8gb: Likewise. * tests/du/long-from-unreadable: Likewise. * tests/du/long-sloop: Likewise. * tests/du/slink: Likewise. * tests/ls/nameless-uid: Likewise. * tests/ls/stat-dtype: Likewise. * tests/misc/cat-proc: Likewise. * tests/misc/md5sum-newline: Likewise. * tests/misc/nice: Likewise. * tests/misc/od-x8: Likewise. * tests/misc/pwd-unreadable-parent: Likewise. * tests/misc/selinux: Likewise. * tests/misc/stty-row-col: Likewise. * tests/misc/tac-continue: Likewise. * tests/misc/arch: Likewise, and source $srcdir/../test-lib.sh *before* the use of skip_test_.
2008-02-09tests: move the very-expensive file into test-lib.shJim Meyering
* tests/very-expensive: Remove file. * tests/test-lib.sh (very_expensive_): New function. * tests/Makefile.am (EXTRA_DIST): Remove very-expensive. * tests/cp/perm: Call the new function, rather than sourcing the file. * tests/tail-2/assert: Likewise. * tests/tail-2/assert-2: Likewise. * tests/du/2g: Likewise.
2008-02-09tests: start migrating sourced-file function-like tests into test-lib.sh.Jim Meyering
* tests/acl: Remove file. * tests/test-lib.sh (require_acl_): New function. * tests/cp/acl: Use require_acl_ instead. * tests/mv/acl: Likewise. * tests/Makefile.am (EXTRA_DIST): Remove acl.
2008-02-09tests: mv/acl: Don't mention "yes" as a partition name in diagnostic.Jim Meyering
2008-02-07We *do* need two different version files.Jim Meyering
One for tarball-only, the other to be updated any time we get a new value of $(VERSION). * Makefile.am (dist-hook): Create .tarball-version in dist tarball. * GNUmakefile (_curr-ver): Make git-version-gen use it. * .gitignore: Ignore it.
2008-02-07Fix a typo in description of size suffixes: s/GB/G/.Jim Meyering
* doc/coreutils.texi (od invocation, head invocation, tail invocation): Spotted by Bert Wesarg.
2008-02-07NEWS [6.9.90]: head, od, split and tail accept the standard size suffixesJim Meyering
2008-02-07mkdir, split: write --verbose output to stdout, not stderr.Steven Schubiger
* src/mkdir.c (verbose_output): New function. (announce_mkdir): Use it. * src/split.c (usage): Update. * src/split.c (cwrite): Write to stdout, not stderr. * doc/coreutils.texi (split invocation): Remove the mention of --verbose output being printed to stderr. * tests/mkdir/p-v: Redirect stdout, not stderr. * tests/misc/split-a: Likewise. * NEWS: Mention this change. * TODO: Remove this item.
2008-02-04Makefile.maint (announcement): Remove stale comment.Jim Meyering
2008-02-02Clarify a comment.Jim Meyering
* tests/sort/Test.pm: Replace a vague ChangeLog reference with a URL.
2008-01-31Improve wording of date and time man page.Bob Proulx
* man/date.x: Improve compact description of the --date=STRING. * man/touch.x: Likewise. Suggested by A. Costa.