summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-03-28tests: Factor out code that's going to be reused.Pádraig Brady
* tests/test-lib.sh (mkfifo_or_skip_): New function, factored out of... * tests/touch/fifo: ...here.
2008-03-28Require that "(exit $fail); exit $fail" be last line of each test.Jim Meyering
* maint.mk (sc_require_test_exit_idiom): New rule to enforce policy. * tests/cp/acl: Adhere to the new policy. * tests/cp/preserve-gid: Likewise. * tests/dd/misc: * tests/install/create-leading: * tests/ln/sf-1: * tests/ls/symlink-slash: * tests/misc/help-version: * tests/misc/ls-time: * tests/misc/nice: * tests/misc/shred-remove: * tests/misc/stty: * tests/misc/stty-row-col: * tests/mkdir/p-1: * tests/mkdir/p-2: * tests/mkdir/p-3: * tests/mkdir/p-v: * tests/mkdir/special-1: * tests/mkdir/writable-under-readonly: * tests/mv/acl: * tests/mv/backup-is-src: * tests/mv/diag: * tests/mv/dir-file: * tests/mv/force: * tests/mv/hard-link-1: * tests/mv/i-2: * tests/mv/i-4: * tests/mv/into-self: * tests/mv/into-self-2: * tests/mv/into-self-3: * tests/mv/partition-perm: * tests/mv/to-symlink: * tests/rmdir/ignore: * tests/tail-2/assert: * tests/tail-2/assert-2: * tests/touch/dangling-symlink: * tests/touch/dir-1: * tests/touch/empty-file: * tests/touch/fifo: * tests/touch/no-rights: Likewise. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-03-28Perform explicit exit-nonzero if the embedded Perl script fails.Jim Meyering
* tests/misc/pwd-long: Add canonical '(exit $fail); exit $fail'. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-03-27paste -d\\: avoid heap overrun for backslash at end of delim listJim Meyering
* src/paste.c: Include "quotearg.h". (collapse_escapes): Handle backslash-escaped backslash explicitly. Handle unescaped backslash at end of string by returning nonzero, rather than by overrunning memory. (main): Diagnose an invalid delimiter list -- carefully. Reported by Cristian Cadar, Daniel Dunbar and Dawson Engler. * tests/misc/paste-no-nl (delim-bs): Add a test to demonstrate the heap-smashing capability. (delim-bs2): Prior to coreutils-5.1.2, this bug was a little harder to demonstrate: it would corrupt a first-argument containing e.g., \b * NEWS: Mention the bug fix. * tests/misc/Makefile.am (TESTS): Reflect renaming. * tests/misc/paste: Rename from paste-no-nl. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-03-26* src/join.c (keycmp): Document new parameters.Jim Meyering
2008-03-26Test for mkdir bug fix.Jim Meyering
* tests/mkdir/selinux: New file: test for today's fix. * tests/mkdir/Makefile.am (TESTS): Add selinux.
2008-03-26mkdir -Z x d: don't segfault when diagnosing invalid context "x" (tiny change)Daniel Dunbar
* src/mkdir.c (main): Use "scontext", not NULL optarg in diagnostic. Reported by Cristian Cadar, Daniel Dunbar and Dawson Engler. * NEWS: Mention the bug fix.
2008-03-25id bug fix: don't point to potentially clobbered static storagePeter Fales
On at least Mac OS, when calling getpwuid twice with the same UID, the static storage containing results from the first call is invalidated by the second call. * src/id.c (main): Point to a copy of the user name string.
2008-03-25Use new gnulib gnumakefile module.Eric Blake
* bootstrap.conf (gnulib_modules): Pull in new module. * GNUmakefile: Remove from version control. * .gitignore: Update. * configure.ac (AC_CONFIG_LINKS): Delete; rely on gnulib to do this now. * Makefile.am (EXTRA_DIST, distclean-local): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
2008-03-25join bug fix: adapt keycmp to work with new order-checking featureJim Meyering
* src/join.c (keycmp): Add two join-field parameters. (check_order, join): Update callers. Reported by Dmitry V. Levin in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12731/focus=13017 * tests/join/Test.pm (chkodr-7): New test for this fix.
2008-03-23join.c: syntax/style tweaksJim Meyering
* src/join.c (check_order): Rename from checkorder. Move definition to precede first use and remove prototype. Use EXIT_FAILURE, rather than "1". (key_cmp): Move definition to precede first use.
2008-03-22portability: work around a "busybox sed" limitationJim Meyering
* configure.ac: While every other sed tested supports usage like '/\(re\)/{s//\1/;...<NEWLINE>}', and POSIX appears to requires this, busybox's sed does not support it. So duplicate the regexp: '/\(re\)/{s/\(re\)/\1/;...<NEWLINE>}'. Reported by Vincent Lefevre: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13013>.
2008-03-21* src/c99-to-c89.diff: Adjust seq.c offsets.Jim Meyering
2008-03-21ptx: avoid heap overrun for backslash at end of optarg stringJim Meyering
* src/ptx.c (copy_unescaped_string): Ignore a lone backslash at end of string. Reported by Cristian Cadar, Daniel Dunbar and Dawson Engler. Details here: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13005>. * tests/misc/Makefile.am (TESTS): Add ptx-overrun. * tests/misc/ptx-overrun: New file. Test for the above fix. * NEWS: Mention the fix. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-03-21ptx.c readabilityJim Meyering
* src/ptx.c (copy_unescaped_string): Add braces around 80+-line single-stmt while-loop body. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-03-21Write NEWS and update c99-to-c89 patch for today's rm improvement.Jim Meyering
* NEWS: call this a "portability improvement" ;-) * src/c99-to-c89.diff: Adjust remove.c offsets.
2008-03-21remove.c: Accommodate systems with negative errno values.Ingo Weinhold
* src/remove.c (cache_fstatat): Store errno value directly in the st_ino field, rather than trying to shoehorn it into st_size. This is required at least on BeOS and Haiku.
2008-03-21* src/seq.c (long_double_format): Add a comment.Jim Meyering
2008-03-21* GNUmakefile: Update from gnulib.Jim Meyering
2008-03-20Remove today's automake kludge, altogether. Fix properly.Jim Meyering
* man/Makefile.am: Use dist_man1_MANS instead of dist_man_MANS. Suggestion from Ralf Wildenhues.
2008-03-20Add a check to detect this problem, in case it reappears.Jim Meyering
* maint.mk (my-distcheck): Run "make install", and then ensure that ls.1 is installed.
2008-03-20Kludge to make automake generate install-man rulesJim Meyering
* man/Makefile.am (dist_man_MANS): Add a literal, rm.1. Without this, "make install" would not install man pages. However, with this kludge, the rm.1 man page is installed even when you configure with --enable-no-install-program=rm.
2008-03-20Revert recent man/Makefile.am change.Jim Meyering
Revert 4b544e447eb78fd1f031a026a499f6aed177808a. * man/Makefile.am: That change was only a band-aid. It solved the stated problem, but not a deeper one: that "make install" would no longer man pages. Reported by Dmitry V. Levin. The latter problem arose in 167b8025aca487de001da2448c1aebc2747bc1d3 with the removal of the sole literal from the definition of dist_man_MANS. When automake perceives dist_man_MANS as empty, it no longer emits the install-man* rules.
2008-03-20Sync GNUmakefile with gnulib.Eric Blake
* GNUmakefile (Makefile.cfg): Rename... (cfg.mk): ...to this, and make optional. (GNUmakefile.cfg): Delete, redundant with cfg.mk. (Makefile.maint): Rename... (maint.mk): ...to this. (all) [!_have-Makefile]: Rename... (abort-due-to-no-makefile): ...to this, and invoke via .DEFAULT_GOAL to pick up all targets. * Makefile.cfg: Rename... * cfg.mk: ...to this. * Makefile.maint: Rename... * maint.mk ...to this. (ME): Reflect rename. (makefile-check, m4-check, author_mark_check, msg): Use $(ME) rather than hard-coded name. * Makefile.am (EXTRA_DIST): Distribute renamed files. * .x-sc_file_system: Remove Makefile.maint along with others. No longer needed. * .x-sc_obsolete_symbols: Likewise. * .x-sc_prohibit_atoi_atof: Reflect renaming and remove no-longer-VC'd names. * TODO: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
2008-03-19make check: Remove /tmp/ls-creating debug code.Bob Proulx
* tests/misc/ls-misc: Remove debug code creating /tmp/ls.
2008-03-19bootstrap: restore kludge removed on 2008-03-12: it's still necessary.Jim Meyering
* bootstrap: Make the gnulib-tests/test-*.sh scripts executable. This restores code removed by dec8bb25bb6da2fe9fe6dd63c0fbbd593a0e94cb. Reported by Bob Proulx. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-03-19Check for -- and remove -- some unnecessarily included header files.Jim Meyering
* Makefile.maint: Add checks for a handful of additional header files. * src/mktemp.c: Don't include "long-options.h". Not used. * src/pr.c: Don't include "inttostr.h". Not used. * src/printenv.c: Don't include "error.h". Not used. * src/test.c: Don't include "error.h". Not used. * src/touch.c: Don't include "safe-read.h". Not used.
2008-03-19Remove more vestiges of CVS.Jim Meyering
* Makefile.maint (VC_LIST): Rename from CVS_LIST. (VC_LIST_EXCEPT): Rename from CVS_LIST_EXCEPT.
2008-03-19mv: never unlink a destination file before calling renameJim Meyering
While cp --preserve=links must unlink certain destination files, mv must never do that. * src/copy.c (copy_internal): Pull the '! x->move_mode' test "up", so it affects the entire condition, and not just DEREF_NEVER mode. Reported by James Ralston in <http://bugzilla.redhat.com/438076>. * tests/mv/atomic2: New file. Test for the above fix. * tests/mv/Makefile.am (TESTS): Add atomic2. * NEWS: Mention the bug-fix. [Bug introduced in 367719ba5f1dbd5e2f7fa2466c441f23f66a7c9e]
2008-03-19"make" would not always update man/*.1 files (but "make dist" would)Jim Meyering
* man/Makefile.am (BUILT_SOURCES): Define, so that "make" always updates man/*.1 files. Reported by Bob Proulx.
2008-03-18syntax-check: Make the space-before-open-paren optional.Jim Meyering
* Makefile.maint (sc_prohibit_assert_without_use): Match also when there is no space before the opening parenthesis. (sc_prohibit_getopt_without_use): Likewise. (sc_prohibit_quotearg_without_use): Likewise. (sc_prohibit_quote_without_use): Likewise.
2008-03-18* Makefile.maint (sc_no_have_config_h): Use a more precise regexp.Jim Meyering
2008-03-18* Makefile.maint (CVS): Remove now-unused definition.Jim Meyering
2008-03-18Factor out duplication in sc_prohibit_*_without_use rules.Jim Meyering
* Makefile.maint (_header_without_use): New "command", factored out of four sc_prohibit_HEADER_without_use rules. (sc_prohibit_assert_without_use): Rewrite using $(_header_without_use). (sc_prohibit_getopt_without_use): Likewise. (sc_prohibit_quotearg_without_use): Likewise. (sc_prohibit_quote_without_use): Likewise.
2008-03-18Correct typo in "make syntax-check" diagnostic.Dmitry V. Levin
* Makefile.maint (sc_prohibit_getopt_without_use): s/assert.h/getopt.h/
2008-03-16Prohibit inclusion of getopt.h without use.Jim Meyering
* Makefile.maint (sc_prohibit_getopt_without_use): New rule.
2008-03-16Include <getopt.h> only if used.Jim Meyering
* src/group-list.c: Don't include <getopt.h>. * src/printf.c: Likewise.
2008-03-16sha512_process_bytes: fix a bug in processing a buffer where length&64 != 0J. Scott Edwards
* gl/lib/sha512.c (sha512_process_bytes): s/63/127/.
2008-03-12Generalize GNUmakefile, ...Jim Meyering
...so that it can be used unmodified by autoconf. * GNUmakefile: Include optional file, GNUmakefile.cfg. Autoconf will use this to override _autoreconf and to export PATH. (_autoreconf): Define. (_dummy): cd to $(srcdir) before removing autom4te.cache.
2008-03-12* bootstrap: Sync from gnulib and remove part of a local kludge.Jim Meyering
2008-03-10install, rmdir: write --verbose output to stdout, not to stderr.Ondřej Vašík
* src/install.c (announce_mkdir): Write verbose output to stdout, not to stderr. * src/mkdir.c (announce mkdir): Use prog_fprintf for verbose output. * src/prog-fprintf.c (prog_fprintf): New function and file. * src/prog-fprintf.h: New file. * src/rmdir.c (main): Write verbose output to stdout, not to stderr. Quote directory name in a diagnostic. * src/rmdir.c (remove_parents): Write verbose output to stdout, not to stderr. * doc/coreutils.texi: Mention that shred verbose output is to stderr. * NEWS: Mention the changes. Signed-off-by: Ondřej Vašík <ovasik@redhat.com>
2008-03-10make syntax-check: also check src/*.h files for extern functions,Jim Meyering
* src/Makefile.am (sc_tight_scope): ... now that there is one.
2008-03-07dd: avoid unnecessary, but harmless close_stdout call.Jim Meyering
* src/dd.c (close_stdout_required): New global. (maybe_close_stdout): New function. (main): Set the global. Reported by Ulrich Drepper in http://bugzilla.redhat.com/436368
2008-03-06Now that ChangeLog is no longer under version control, ...Jim Meyering
* Makefile.maint (alpha beta major): Don't make changelog-check. (changelog-version-check): Rename from changelog-check.
2008-03-05* src/c99-to-c89.diff: Accommodate a C99-ism in id.c.Jim Meyering
2008-03-05Work around AFS bug: id and groups would print invalid group number.ribalba
* src/id.c (main): Call print_group_list with a user name, if possible. * src/groups.c (main): Likewise. * NEWS: Mention this. For details, see http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12852 http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12875 Signed-off-by: ribalba <geerd.dietger.hoffmann@gmail.com>
2008-03-05Now that Makefile.maint is used in VPATH builds, too...Jim Meyering
* Makefile.maint (prev_version_file): Prefix with $(srcdir)/. (syntax-check-rules): Prefix $(ME) with $(srcdir)/. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-03-05Avoid new "make distcheck" failure, now that VPATH has GNUmakefile.Jim Meyering
* GNUmakefile: Remove commands to create ".version". They were unnecessary, and caused creation of a newer .version file in a VPATH build, which in turn caused creation of updated man/*.1 files reflecting the newer time stamp on .version. Those *.1 files were not removed (since they're distributed), and the fact that they remained after "distclean" triggered the failure. Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-03-04Reinstate GNUmakefile patch, but with workaround for automake.Eric Blake
* configure.ac (AC_CONFIG_LINKS): Use shell variable to bypass automake distclean rules. * Makefile.am (distclean-local): Clean GNUmakefile in VPATH builds, since we are bypassing automake. * GNUmakefile (_is-dist-target): 'distclean' is not a dist target.
2008-03-04Clarify comment and attribute preceding change: Reported by Ralf Wildenhues.Jim Meyering