summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-11-06build: move do-release-commit-and-tag to gnulibJim Meyering
* bootstrap.conf (gnulib_modules): Add do-release-commit-and-tag. * build-aux/do-release-commit-and-tag: Remove file. Now it's in gnulib. * gnulib: Update submodule to the latest, to get the just-moved script.
2009-11-05mktemp: use more robust means to avoid double-close of stdoutEric Blake
Reverts earlier patch - fflush() can succeed but fclose() fail for some cases of write failures, and we want to catch those. * src/mktemp.c (stdout_closed): New variable. (maybe_close_stdout): New function, borrowed from dd.c. (main): Track whether stdout has been closed.
2009-11-05mktemp: enhance test to catch just-fixed typo behaviorEric Blake
Penance for botching the conflict resolution while rebasing my series. * tests/misc/mktemp (check_tmp): Test for the bug when wrong parameter is used.
2009-11-05mktemp: don't try to close stdout twiceJim Meyering
* src/mktemp.c (main): Rather than calling close_stream (which would make atexit-called close_stdout try to close it a second time), check for write failure via ferror and fflush.
2009-11-05mktemp: don't use suff_len in place of #-of-`X's variableJim Meyering
* src/mktemp.c (mkstemp_len, mkdtemp_len): Pass x_len as final argument, and not suff_len.
2009-11-05mktemp: add suffix handlingEric Blake
Now that mkstemps is supported, we might as well use it. * src/mktemp.c (TMPDIR_OPTION): New enum value. (longopts): Add new option. (usage): Document it. (count_trailing_X_s): Rename... (count_consecutive_X_s): ...to this, and add parameter. (mkstemp_len, mkdtemp_len): Add parameter. (main): Implement new option. (AUTHORS): Add myself. * AUTHORS (mktemp): Likewise. * tests/misc/mktemp: Test new option. * doc/coreutils.texi (mktemp invocation): Document it. * NEWS: Likewise. Fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548316.
2009-11-05build: reflect gnulib changes to tempnameEric Blake
In glibc 2.11 and gnulib, gen_tempname added a parameter suffixlen (unfortunately, it is typed as int rather than size_t, for historical compatibility to a poor choice by BSD). * gnulib: Import latest changes. * gl/lib/tempname.h.diff: Accommodate new suffixlen parameter. * gl/lib/tempname.c.diff (check_x_suffix): Allow for X in suffix beyond x_suffix_len. (gen_tempname_len): Add suffixlen parameter. (__gen_tempname): Update caller. * src/mktemp.c (mkstemp_len, mkdtemp_len): Update callers.
2009-11-05build: override gnulib tempname via diffEric Blake
Diffs are more robust than wholesale replacement, because bootstrap will inform us of any incompatible changes made in upstream gnulib. * gl/lib/tempname.h: Change... * gl/lib/tempname.h.diff: ...to diff. * gl/lib/tempname.c: Change... * gl/lib/tempname.c.diff: ...to diff.
2009-11-05mktemp: rearrange --help outputEric Blake
* src/mktemp.c (usage): Align indentation and sort by long options. Describe valid templates. Suggested by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548316.
2009-11-05tests: enhance mktemp testEric Blake
* tests/misc/mktemp: Add more coverage.
2009-11-05doc: document mktempEric Blake
* doc/coreutils.texi (mktemp invocation): New node. * TODO: Delete completed task.
2009-11-05mktemp: don't leave file behind on write failureEric Blake
* src/mktemp.c (main): Remove just-created file if stdout had problems. * bootstrap.conf (gnulib_modules): Add remove. * tests/misc/close-stdout: Test it. * NEWS: Document it.
2009-11-05du: cleanup: remove dead-code vestige of already-removed optionJim Meyering
* src/du.c (MEGABYTES_LONG_OPTION, main): Remove vestiges of already-removed long option, --megabytes.
2009-11-05du now diagnoses cycles, rather than ignoring themJim Meyering
* src/du.c (symlink_deref_bits): New global, decl moved from ... (main): ...here. (process_file): When fts detects a directory cycle that can't be due to symlinks, report it and arrange to exit nonzero. * NEWS (Bug fixes): Mention it.
2009-11-05maint: factor out cycle warning, now that du will use it, tooJim Meyering
* src/system.h (emit_cycle_warning): Define. Factored out of... * src/remove.c (rm_fts): ...here. Use the new macro.
2009-11-03tests: rm: add test for today's change in behaviorJim Meyering
* tests/Makefile.am (root_tests): Add rm/read-only to the list. * tests/rm/read-only: New file.
2009-11-03rm -f: ignore EROFS when it's really ENOENTJim Meyering
rm -f must not print a diagnostic for a nonexistent file. However, most linux-based kernel unlinkat functions set errno to EROFS when the named file (regardless of whether it exists) would lie on a read-only file system. remove.c now performs an extra fstatat call in that case, to determine whether the file exists. * src/remove.c (excise): Map EROFS to ENOENT, if a file is nonexistent. Reported by Steven Drake in <http://savannah.gnu.org/bugs/?27923>. * NEWS (Changes in behavior): Mention it.
2009-11-03tests: inotify-race: don't let malfunctioning gdb hang the testJim Meyering
* tests/tail-2/inotify-race: Apply timeout to each gdb invocation.
2009-11-02build: avoid some warningsEric Blake
* gl/lib/mbsalign.c (mbsalign): Mark unused parameter. * bootstrap.conf (gnulib_modules): Remove obsolete rename-dest-slash. * gnulib-tests/Makefile.am (AM_CFLAGS): Reduce set of warnings for gnulib tests. * gl/modules/rename-tests.diff (Makefile.am): New file, to add LIBINTL to LDADD, since we avoid canonicalize-lgpl module. * gl/lib/regcomp.c.diff (regerror, calc_next) (build_collating_symbol, parse_bracket_element, build_equiv_class) (free_tree): Mark unused parameters. * gl/lib/regex_internal.h.diff (re_string_elem_size_at): New file, to mark unused parameters. * gl/lib/printf-args.c.diff (PRINTF_FETCHARGS): New file, to avoid type mismatch. * gl/lib/vasnprintf.c (VASNPRINTF): New file, to avoid shadowing local variable name. * .gitignore: Ignore temporary build artifacts.
2009-11-02build: update gnulib submodule to latest, for fewer compiler warningsEric Blake
2009-10-31admin: automate one more part of the release processJim Meyering
This script automates the process of updating NEWS, performs the resulting final commit (thus with a consistent log message), and applies a signed tag (v$VERSION) to the result. * build-aux/do-release-commit-and-tag: New script. * README-release: Document it.
2009-10-31admin: fix typo in release procedureJim Meyering
* README-release: s/gzip/coreutils/
2009-10-30tests: prohibit fail=0 initializationJim Meyering
* cfg.mk (sc_prohibit_fail_0): New rule. * .x-sc_prohibit_fail_0: New file. * Makefile.am (syntax_check_exceptions): Distribute the new file.
2009-10-30tests: factor 350 fail=0 initializations into test-lib.shJim Meyering
Run this command to remove the factored-out "fail=0" lines. perl -ni -e '/^fail=0$/ or print' $(g grep -l '^fail=0$') * tests/test-lib.sh: Initialize fail=0 here, not in 300+ scripts. * tests/...: nearly all bourne shell scripts Suggested by Eric Blake.
2009-10-30tests: remove the less-regular fail=0 assignments manuallyJim Meyering
* tests/tail-2/assert-2: * tests/tail-2/assert: * tests/cp/file-perm-race: * tests/misc/df: * tests/misc/truncate-dir-fail:
2009-10-29tests: don't let a fail=1 env. setting induce unwarranted test failureJim Meyering
* cfg.mk (sc_fail_is_initialized): New rule. Fix the offenders: * tests/cp/acl: Set fail=0 * tests/cp/backup-is-src: Likewise. * tests/cp/file-perm-race: Likewise. * tests/cp/reflink-auto: Likewise. * tests/cp/same-file: Likewise. * tests/ln/backup-1: Likewise. * tests/misc/su-fail: Likewise. * tests/misc/truncate-owned-by-other: Likewise. * tests/mkdir/p-3: Likewise. * tests/mkdir/selinux: Likewise. * tests/mkdir/special-1: Likewise. * tests/mv/acl: Likewise. * tests/mv/backup-is-src: Likewise. * tests/mv/diag: Likewise. * tests/mv/force: Likewise. * tests/mv/hard-link-1: Likewise. * tests/mv/into-self-3: Likewise. * tests/mv/sticky-to-xpart: Likewise. * tests/touch/now-owned-by-other: Likewise.
2009-10-29remove stray closing comment delimiter, "*/", in previous changeJim Meyering
* gl/lib/regexec.c.diff: Fix a typo.
2009-10-29maint: avoid exiting with magic numberEric Blake
Cope with gnulib's new sc_prohibit_magic_number_exit rule. * .x-sc_prohibit_magic_number_exit: New file, to add exemptions. * Makefile.am (syntax_check_exceptions): Distribute it. * lib/euidaccess-stat.c (main): Fix culprits. * src/chcon.c (main): Likewise. * src/runcon.c (main): Likewise. * src/setuidgid.c (main): Likewise.
2009-10-29build (--enable-gcc-warnings): enable gcc's -Werror also in lib/Jim Meyering
* configure.ac (GNULIB_WARN_CFLAGS): Define. * lib/Makefile.am (AM_CFLAGS): Use $(GNULIB_WARN_CFLAGS) rather than $(WARN_CFLAGS) and add $(WERROR_CFLAGS). * gl/lib/regcomp.c.diff: New file. * gl/lib/regex_internal.c.diff: New file. * gl/lib/regexec.c.diff: New file.
2009-10-29build: update gnulib submodule to latestJim Meyering
2009-10-29build: allow whitespace violations in gl/lib/*.diff filesJim Meyering
* .gitattributes: Exempt gl/lib/*.diff. * .x-sc_prohibit_tab_based_indentation: Likewise. * .x-sc_space_tab:Likewise.
2009-10-28nice, nohup, su: detect write failure to stderrEric Blake
These programs can print non-fatal diagnostics to stderr prior to exec'ing a subsidiary program. However, if we thought the situation warranted a diagnostic, we insist that the diagnostic be printed without error, rather than blindly exec, as it may be a security risk. For an example, try 'nice -n -1 nice 2>/dev/full'. Failure to raise priority (by lowering niceness) is not fatal, but failure to inform the user about failure to change priority is dangerous. * src/nice.c (main): Declare failure if writing advisory message to stderr fails. * src/nohup.c (main): Likewise. * src/su.c (main): Likewise. * tests/misc/nice: Test this. * tests/misc/nohup: Likewise. * NEWS: Document this.
2009-10-28doc: tell --enable-gcc-warnings users where to report problemsJim Meyering
* README-hacking: Add a caveat for --enable-gcc-warnings.
2009-10-28build: make doc checks more user-friendlyJim Meyering
* doc/Makefile.am (check-texinfo): Begin moving each individual test into its own rules. (sc-avoid-builtin, sc-avoid-path): New rules. Extracted from check-texinfo. (syntax_checks): Add them.
2009-10-28doc: avoid failing "make check"Jim Meyering
* doc/coreutils.texi (env invocation): s/builtin/built-in/
2009-10-28doc: improve the echo and printf help on escapesPádraig Brady
* src/printf.c (usage): Merge strings with echo.c to aid translators. Move the description for \NNN beside the other numeric escape codes. Don't mention "character" as that suggests character conversion. * src/echo.c (usage): Likewise. Also mention the \xHH escape sequence.
2009-10-28echo, printf: interpret \e as the Escape characterPádraig Brady
Match gcc, perl, bash, ksh, tcsh, ... in supporting \e. * src/printf.c (print_escape_char): Output \x1B when \e encountered. * src/echo.c (main): Likewise. * src/stat.c (print_escape_char): Likewise. * doc/coreutils.texi (echo invocation): Add \e to the list. * tests/misc/printf: Verify that \e outputs \x1B. * NEWS: Mention the change in behaviour.
2009-10-28printenv: ignore bogus variable namesEric Blake
Exposed by env a=b=c printenv a=b. * src/printenv.c (main): Silently reject = in names. * tests/misc/printenv: Test for it. * NEWS: Document this.
2009-10-28maint: avoid "make syntax-check" failurePádraig Brady
* src/printenv.c: Remove unused "long-options.h"
2009-10-27doc: turn env comments into documentationEric Blake
* src/env.c: Convert introductory comments... * doc/coreutils.texi (env invocation): ...into documentation. Suggested by Jim Meyering.
2009-10-27env, printenv: add -0/--null optionEric Blake
Allows for unambiguous processing when environment values (or even non-portable names!) contain newline. * src/env.c (longopts): Add new option. (usage): Document it. (main): Implement it. * src/printenv.c (longopts): New variable. (usage): Document new option. (main): Implement it. * doc/coreutils.texi (Common options): New macro optNull. (du invocation, env invocation, printenv invocation): Use it. * NEWS: Mention this. * tests/misc/env-null: New test. * tests/Makefile.am (TESTS): Run it.
2009-10-27tests: add printenv coverageEric Blake
* tests/misc/printenv: New test. * tests/Makefile.am (TESTS): Run it. * .gitignore: Ignore more cruft.
2009-10-27tests: fix PATH problems on cygwinEric Blake
* tests/misc/sort-compress: Remove non-portable over-restriction of PATH; besides, commit 3ea177e changed sort to no longer default to gzip. * tests/rm/fail-eperm: Untaint, rather than clear, PATH. * tests/misc/pwd-long: Likewise. Also skip test if long path cannot be created. (normalize_to_cwd_relative): Use eq rather than ==, since cygwin perl doesn't properly handle 64-bit ino_t numerically.
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 ".".