summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-10-26tests: clean up tests of env -- handlingEric Blake
The comment in env.c about -- handling has not matched the behavior in the code since the initial commit back in 1992. * src/env.c: Fix bogus comment. * tests/misc/env: Further tweaks, avoiding PATH problems inherent in testing -i, and testing program name containing =. * doc/coreutils.texi (env invocation): Mention that intermediate program is needed to invoke program with name containing =.
2009-10-26doc: document PATH interactions with envEric Blake
* doc/coreutils.texi (env invocation): Mention that PATH is modified prior to exec. * tests/misc/env: Test this.
2009-10-26env: reject bogus -u argumentsEric Blake
* src/env.c (main): Use unsetenv rather than putenv to remove items from environ, and check for failure. * bootstrap.conf (gnulib_modules): Add unsetenv. * tests/misc/env: Test this. * NEWS: Document it.
2009-10-26maint: let gnulib provide environEric Blake
* bootstrap.conf (gnulib_modules): Add environ. * src/env.c (environ): Delete declaration. * src/printenv.c (environ): Likewise. * src/stdbuf.c (environ): Likewise. * src/su.c (environ): Likewise.
2009-10-26tests: avoid file name not portable to cygwinEric Blake
* tests/misc/chroot-fail: Use 'no_such', not '...', since cygwin 1.5 silently strips trailing dots. * tests/misc/nice-fail: Likewise. * tests/misc/stdbuf: Likewise. * tests/misc/timeout-parameters: Likewise.
2009-10-26tests: rm/one-file-system: work around umount failureJim Meyering
* tests/rm/one-file-system (cleanup_): Unmount a/b, rather than "$other_partition_tmpdir", to accommodate those who link /etc/mtab to /proc/mounts. Reported by Gilles Espinasse in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/18508
2009-10-26tests: adjust new env test not to failJim Meyering
* tests/misc/env: Create ./-i as a link to our "echo" binary, rather than as a bourne shell script, so that env can exec it. Set PATH to ".".
2009-10-26tests: nice: adjust new tests to work more portablyJim Meyering
* tests/misc/nice (tests): Accommodate a nice program for which "nice -n -1 nice" prints nothing. It should print -1 or (usually) 0. Otherwise, we'd get syntax errors.
2009-10-26nice: execute program even when setpriority fails due to EACCESJim Meyering
* src/nice.c (perm_related_errno): New function. (main): Use it, rather than testing only errno == EPERM. * NEWS (Bug fixes): Mention it.
2009-10-25timeout: don't orphan monitored programs if they ignore specified signalsPádraig Brady
* src/timeout.c (install_signal_handlers): Handle any user specified signal, so that if it does not cause the child to exit then we don't exit and orphan the child. Previously this for example, would leave an orphan dd process running: timeout -sUSR1 1s dd if=/dev/zero of=/dev/null * NEWS: Mention the fix.
2009-10-23tests: test recent status changesEric Blake
* tests/misc/nice: Enhance test. * tests/misc/chroot-fail: New test. * tests/misc/env: Likewise. * tests/misc/nice-fail: Likewise. * tests/misc/su-fail: Likewise. * tests/Makefile.am (TESTS): Run new tests.
2009-10-23maint: move chroot testEric Blake
* tests/chroot/credentials: Move... * tests/misc/chroot-credentials: ...here, to reduce number of directories. * tests/Makefile.am (root_tests): Reflect rename.
2009-10-23tests: enhance stdbuf and timeout testsEric Blake
* tests/misc/timeout-parameters: Validate exact exit status. * tests/misc/stdbuf: Likewise. * tests/misc/timeout: Likewise. Use require_built_. * tests/misc/arch: Likewise.
2009-10-23nohup: use EXIT_CANCELED if not POSIXLY_CORRECTEric Blake
* src/nohup.c (NOHUP_FAILURE): Rename... (POSIX_NOHUP_FAILURE): ...to this. (main): Pay attention to POSIXLY_CORRECT, to determine whether to use status 125 or 127. * doc/coreutils.texi (nohup invocation): Document this. * NEWS: Likewise. * tests/misc/invalid-opt (exit_status): Adjust expected results. * tests/misc/help-version (expected_failure_status): Likewise. * tests/misc/nohup: Likewise.
2009-10-23chroot, env, nice, su: use EXIT_CANCELED for internal failureEric Blake
* src/chroot.c (main): Use EXIT_CANCELED, not EXIT_FAILURE. * src/env.c (main): Likewise. * src/nice.c (main): Likewise. * src/su.c (change_identity, main): Likewise. * doc/coreutils.texi (chroot invocation, env invocation) (nice invocation, su invocation): Document this. * NEWS: Likewise. * tests/misc/invalid-opt (exit_status): Adjust expected results. * tests/misc/help-version (expected_failure_status): Likewise.
2009-10-23tests: accommodate BSD getoptEric Blake
* tests/misc/invalid-opt (err_subst): Support alternate spelling.
2009-10-23build: prohibit improper use of stat and lstatEric Blake
* cfg.mk (sc_prohibit_stat_macro_address): New rule. * src/ln.c (do_link): Adjust comment to avoid false positive. * src/stat.c (do_stat): Likewise. * src/touch.c (main): Likewise.
2009-10-22build: update gnulib submodule to latest, for test cleanupsEric Blake
2009-10-22maint: turn on compiler warnings for gnulib testsEric Blake
* gnulib-tests/Makefile.am (AM_CFLAGS): Add WARN_CFLAGS. * configure.ac (enable-gcc-warnings): Also use -funit-at-a-time, to silence gcc 4.3.4 -Wdisabled-optimization. * .gitignore: Ignore some more files.
2009-10-22build: prohibit direct use of readlink or readlinkatJim Meyering
* cfg.mk (sc_prohibit_readlink): New rule. Suggested by Eric Blake.
2009-10-22tests: add a test for the `tail -f' race condition bugGiuseppe Scrivano
If new data becomes available between the initial read and when tail registers the inotify watch descriptors, ensure that it is read before a new event happens on the file. * tests/Makefile.am (TESTS): Add tail-2/inotify-race. * tests/tail-2/inotify-race: New file.
2009-10-22tail -f: avoid a race conditionGiuseppe Scrivano
* NEWS (Bug fixes): Mention it. * src/tail.c (check_fspec): New function. (tail_forever_inotify): Ensure there is no new data before entering the inotify events wait loop.
2009-10-21build: update gnulib submodule to latest, for utimens enhancementsEric Blake
2009-10-21tests: ensure touch honors trailing slashEric Blake
* tests/touch/trailing-slash: New test. * tests/Makefile.am (TESTS): Run it.
2009-10-21md5sum, sha*sum, sum: line-buffer the printed checksumsPádraig Brady
* src/md5sum.c (main): Set stdout to line buffered mode to ensure parallel running instances don't intersperse their output. This adds 5% to the run time in the worst case of many zero length files, or 2% with standard file sizes. * src/sum.c (main): Likewise. * tests/misc/md5sum-parallel: New test for atomic output. * tests/Makefile.am: Reference it. * NEWS: Mention the fix
2009-10-20maint: issue warnings for more missing optional librariesPádraig Brady
* README-hacking: Suggest to use ./configure --quiet so that any warnings are easily noticed. * m4/gmp.m4 (cu_GMP): Warn if libgmp is not available. * m4/jm-macros.m4 (coreutils_MACROS): Normalize the libcap warning. * m4/xattr.m4 (gl_FUNC_XATTR): Warn if libattr is not available.
2009-10-19build: use gnulib's isblank moduleJim Meyering
* bootstrap.conf (gnulib_modules): Add isblank. * src/system.h (isblank): Don't define. * m4/check-decl.m4: Don't check for isblank declaration. * gnulib: Update submodule to latest.
2009-10-18maint: factor out duplication in currently unused rulesJim Meyering
* src/Makefile.am (fs_normalize_perl_subst): Define. (fs-magic, fs-kernel-magic): Use it.
2009-10-17touch: add -h to change symlink timestamps, where supportedEric Blake
* src/touch.c (no_dereference): New flag variable. (longopts): Add -h/--no-dereference. (touch): Add symlink handling. (usage): Document new option. (main): Accept new option. * NEWS: Document it. * doc/coreutils.texi (touch invocation): Likewise. Also mention birthtime. * tests/touch/no-dereference: New test. * tests/Makefile.am (TESTS): Run it.
2009-10-17tests: abmon-align: avoid test failureJim Meyering
* tests/ls/abmon-align: Don't remove (1d;) the first line of output. That was making the test consider only 11 of 12 month names. Rewrite not to use \(.*\), as that provoked a malfunction in GNU sed on powerpc Mac OS X (though we don't know yet whether this is due to a sed bug, or to miscompilation). Nelson Beebe reported the test failure.
2009-10-17build: update gnulib submodule to latestJim Meyering
2009-10-15build: don't let environment settings perturb buildJim Meyering
Setting the envvars, LIB_FDATASYNC, LIB_XATTR or LIB_CRYPT could cause a configure-time and/or build-time malfunction. Typically, a configure-time function-in-library test is performed via code like this: LIB_VAR= AC_SUBST([LIB_VAR]) prefix_saved_LIBS=$LIBS AC_SEARCH_LIBS([FUNC], [LIB_NAME], [test "$ac_cv_search_FUNC" = "none required" || LIB_VAR=$ac_cv_search_FUNC]) LIBS=$prefix_saved_LIBS However, in each of the files affected by this change, the LIB_VAR= initialization was omitted. Thus, when set in the environment, its value would propagate into generated Makefiles when FUNC is not found in LIB_NAME. * m4/jm-macros.m4 (coreutils_MACROS): Initialize AC_SUBST'd var * m4/lib-check.m4 (cu_LIB_CHECK): Likewise. * m4/xattr.m4 (gl_FUNC_XATTR): Likewise.
2009-10-13tail: add add missing backslash at the end of a line in usageC de-Avillez
* src/tail.c (usage): Add missing backslash at the end of a line.
2009-10-12tail: tweak usage for more clarityEric Blake
* src/tail.c (usage): Spell out -n +K. * THANKS: Update. Reported by Jan-Pawel Wrozstinski.
2009-10-10touch: optimize use of utimensEric Blake
* src/touch.c (main): Use UTIME_NOW rather than calling gettime. (touch): Use UTIME_OMIT rather than stat.
2009-10-10copy: allow symlink timestamp preservation on more systemsEric Blake
* src/copy.c (utimens_symlink): Simplify by using lutimens. * m4/jm-macros.m4 (coreutils_MACROS): Drop utimensat; gnulib does this for us. * tests/cp/preserve-slink-time: Recognize lutimes support.
2009-10-10build: update gnulib submodule to latest, for utimens improvementsEric Blake
2009-10-10tests: adjust tail-2/pid to work around FreeBSD 6.1 failureJim Meyering
* tests/tail-2/pid: Run tail -f --pid=... on an actual file, not on /dev/null, to avoid this failure on FreeBSD 6.1: tail: /dev/null: cannot change nonblocking mode: Inappropriate ioctl for device
2009-10-10maint: touch up previous LDADD patchEric Blake
* src/Makefile.am (dir_LDADD): Delete; the ls_LDADD line covers this.
2009-10-10build: build uname(1) unconditionallyJim Meyering
Before, on a system without the uname function, the build system would detect that and not build/install a uname program. Now that gnulib guarantees a uname function, ... * configure.ac: Don't check for the uname function. * src/Makefile.am (build_if_possible__progs): Move uname... (EXTRA_PROGRAMS): ...to this list.
2009-10-10maint: list program names one per lineJim Meyering
* src/Makefile.am (EXTRA_PROGRAMS): List them one per line. (build_if_possible__progs): Likewise.
2009-10-10build: ls: fix link failure due to missing -laclJim Meyering
* src/Makefile.am (ls_LDADD): Re-add $(LIB_ACL). Inadvertently-removed by commit 78c93601.
2009-10-09maint: touch up previous LDADD patchEric Blake
* src/Makefile.am (stdbuf_LDADD): Add missing primer. (hostname_LDADD, uname_LDADD): Add GETHOSTNAME_LIB. * bootstrap.conf (gnulib_modules): Add uname.
2009-10-09maint: improve additional library trackingEric Blake
* src/Makefile.am (LDADD): Refactor, to make per-library additions to individual programs easier to maintain.
2009-10-09chcon: don't disable just because SELinux is disabledJim Meyering
* src/chcon.c (main): Now that gnulib provides getfilecon wrappers, we can revert most of the 2009-10-05 commit 3a97d664, "chcon: exit immediately if SELinux is disabled", since chcon is still useful as long as the file system provides handlers for the security.* name space. gnulib's getfilecon wrappers ensure that an offending context now evokes a return value of -1. Prompted by comments from Stephen Smalley in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/18378/focus=18394 * NEWS (Bug fixes): Mention it.
2009-10-09ls: remove explicit getfilecon work-aroundJim Meyering
* src/ls.c (gobble_file): Remove l?getfilecon work-around, now that the gnulib wrappers handle it for us.
2009-10-09build: update gnulib submodule to latest, for getfilecon wrappersJim Meyering
2009-10-08maint: use X2NREALLOC in more placesEric Blake
* src/chroot.c (set_additional_groups): Use X2NREALLOC rather than x2nrealloc. * src/factor.c (emit_factor): Likewise. * src/setuidgid.c (main): Likewise.
2009-10-08maint: remove unused macros and declarationsEric Blake
* src/system.h (EDQUOT, EISDIR, ENOSYS, EOVERFLOW, F_OK, X_OK) (W_OK, R_OK): Delete; macros provided by gnulib. (includes): Gnulib guarantees both <time.h> and <sys/time.h>, in either order. (free, malloc, memchr, realloc, getenv, lseek): Delete, gnulib guarantees these declarations. * m4/check-decl.m4 (gl_CHECK_DECLS): Delete checks now done by gnulib.
2009-10-08maint: move timeout exit statusesEric Blake
* src/timeout.c (EXIT_TIMEDOUT, EXIT_CANCELED): Remove as macros... * src/system.h (EXIT_TIMEDOUT, EXIT_CANCELED): ...and provide as enum values instead. * src/stdbuf.c (EXIT_CANCELED): Delete.