Paul Eggert [Thu, 15 Feb 2007 07:16:30 +0000 (08:16 +0100)]
* bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
* src/dircolors.c: Include c-strcase.h.
(dc_parse_stream): Use c_strcasecmp rather than
strcasecmp to avoid unreliable results in locales like Turkish
where strcasecmp is incompatible with the C locale.
Jim Meyering [Tue, 13 Feb 2007 21:27:27 +0000 (22:27 +0100)]
Also check for and print stderr output, in case a program fails.
* tests/misc/tty-eof: Occasionally (not reproducible), this
test would fail, with one or more programs exiting nonzero, e.g.,
tty-eof: sha224sum exited with status 1 (expected 0)
Now, maybe we'll get a clue, the next time that happens.
Jim Meyering [Mon, 12 Feb 2007 19:09:12 +0000 (20:09 +0100)]
* .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
Jim Meyering [Mon, 12 Feb 2007 00:20:20 +0000 (01:20 +0100)]
* tests/misc/pwd-unreadable-parent: Skip the test if we're
definitely using the replacement.
* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
Jim Meyering [Sat, 10 Feb 2007 21:30:18 +0000 (22:30 +0100)]
Remove excess leading spaces that would make help2man misbehave.
* src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
* src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
* src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
* src/date.c (usage): Use two spaces after each optional flag, not one.
Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
Jim Meyering [Sat, 10 Feb 2007 15:17:41 +0000 (16:17 +0100)]
* Makefile.maint (longopt_re): Relax the regexp, making square
brackets optional, so it matches the newly reported violations, too.
Jim Meyering [Sat, 10 Feb 2007 15:15:34 +0000 (16:15 +0100)]
* src/csplit.c (usage): Use two spaces (not one) to separate
each option string from its description, so help2man formats
the derived man page properly. Reported by Thomas Huriaux in
<http://bugs.debian.org/410407>.
* src/df.c (usage): Likewise.
* src/du.c (usage): Likewise.
* src/install.c (usage): Likewise.
* src/ls.c (usage): Likewise.
Jim Meyering [Sat, 3 Feb 2007 19:02:48 +0000 (20:02 +0100)]
Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
* NEWS: Mention the bug fix.
* tests/misc/pwd-unreadable-parent: New file.
* tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
Paul Eggert [Sat, 3 Feb 2007 17:45:46 +0000 (18:45 +0100)]
* NEWS: Document fix for cp --preserve=mode.
* src/copy.c (copy_internal): Omit the group- or other-writeable
permissions when creating a directory, to avoid a race condition
if the special mode bits aren't right just after the directory is
created.
* src/cp.c (make_dir_parents_private): Likewise.
* tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
race fix in copy.c.
Paul Eggert [Sat, 3 Feb 2007 17:12:11 +0000 (18:12 +0100)]
* NEWS: Document fix for cp --parents.
* src/cp.c (make_dir_parents_private): Report the error sooner with
"cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
creating the directory, DEST/DIR.
* tests/cp/cp-parents: Test for the non-race-condition bug fixed
by the above change.
Jim Meyering [Fri, 2 Feb 2007 07:57:47 +0000 (08:57 +0100)]
* src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
Jim Meyering [Fri, 2 Feb 2007 00:22:58 +0000 (01:22 +0100)]
* src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
consistent, so this can be applied with patch -p0.
Reported by Matthew Woehlke.
* Makefile.maint (patch-check): Use patch with its -p2 option,
since that makes this check slightly more strict.
Jim Meyering [Tue, 30 Jan 2007 22:07:38 +0000 (23:07 +0100)]
* vc-list-files: Select column 2, not 3 (hg-0.9.3's manifest format
now has only two columns).
Paul Eggert [Tue, 30 Jan 2007 21:56:48 +0000 (22:56 +0100)]
* coreutils.texi: @item -> @itemx to fix some typos.
Paul Eggert [Tue, 30 Jan 2007 21:54:34 +0000 (22:54 +0100)]
* coreutils.texi (mkdir invocation): Say how to set the file
permission bits of a parent directory with mkdir -p.
Jim Meyering [Mon, 29 Jan 2007 17:09:57 +0000 (18:09 +0100)]
Document new syntax: "chown +0:+287 file", "chgrp +99 file"
* coreutils.texi (Disambiguating names and IDs): New section.
(chown invocation, chgrp invocation): Mention the new syntax
with an xref to the new section.
Jim Meyering [Mon, 29 Jan 2007 14:38:50 +0000 (15:38 +0100)]
Regenerate .cvsignore and .gitignore files.
Jim Meyering [Mon, 29 Jan 2007 13:18:28 +0000 (14:18 +0100)]
Plug a leak in ls.
* src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
determine dev/inode or upon detecting a symlink loop.
Jim Meyering [Mon, 29 Jan 2007 13:06:45 +0000 (14:06 +0100)]
* src/ls.c: Rename three global variables.
(cwd_file): Rename from 'files'.
(cwd_n_alloc): Rename from 'nfiles'.
(cwd_n_used): Rename from 'files_index'.
Jim Meyering [Mon, 29 Jan 2007 11:25:01 +0000 (12:25 +0100)]
Shave 8 bytes off the size of "struct fileinfo".
* src/ls.c (fileinfo): Put all members of type "bool" together.
Paul Eggert [Mon, 29 Jan 2007 11:08:52 +0000 (12:08 +0100)]
Modify "ls" to sort its data faster, using the new gnulib mpsort
module rather than qsort. This is particularly a win in
environments where strcoll is slow, since mpsort typically calls
strcoll less often than qsort does.
* bootstrap.conf (gnulib_modules): Add mpsort.
* src/ls.c: Include mpsort.h.
(sorted_file, sorted_file_alloc): New vars, for a new vector of
pointers to the file info, for speed.
(clear_files, extract_dirs_from_files, sort_files, print_current_files):
(print_many_per_line, print_horizontal, print_with_commas):
(calculate_columns): Set and use new vector.
(initialize_ordering_vector): New function.
Jim Meyering [Fri, 26 Jan 2007 23:08:36 +0000 (00:08 +0100)]
Regenerate .cvsignore and .gitignore files, and reflect recent removal
of string.h-related lib/*.h files
Paul Eggert [Fri, 26 Jan 2007 22:58:37 +0000 (23:58 +0100)]
Adjust to today's change to gnulib, which added a module for
string.h to replace the little include files like strcase.h.
* src/dircolors.c: Don't include strcase.h.
* src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
Jim Meyering [Fri, 26 Jan 2007 15:37:37 +0000 (16:37 +0100)]
* src/dd.c (advance_input_after_read_error): Change diagnostic to
say "invalid file offset" rather than "screwy file offset".
Jim Meyering [Fri, 26 Jan 2007 10:11:15 +0000 (11:11 +0100)]
* .x-sc_cast_of_argument_to_free: Remove this file.
* Makefile.am (EXTRA_DIST): Likewise.
Dan Hipschman [Thu, 25 Jan 2007 20:56:32 +0000 (21:56 +0100)]
* src/sort.c (create_temp): Remove superfluous access-X_OK
check. find_in_path does this for us.
Jim Meyering [Wed, 24 Jan 2007 09:34:45 +0000 (10:34 +0100)]
Remove usually-skipped test.
* tests/cp/open-perm-race: Remove this file. It is subsumed
by parent-perm-race.
* tests/cp/Makefile.am (TESTS): Remove open-perm-race.
* tests/sort/Makefile.am: Regenerate.
Jim Meyering [Wed, 24 Jan 2007 08:32:56 +0000 (09:32 +0100)]
Pass "make distcheck" again.
* src/sort.c (usage): Split a diagnostic that had grown to be
longer than the C89 maximum of 509 bytes.
* .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
FIXME: this is just temporary, while we wait to remove the offending
access-calling code.
* Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
* Makefile.maint (sc_cast_of_argument_to_free): Use the
canonical, $$($(CVS_LIST_EXCEPT)).
* m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
Paul Eggert [Wed, 24 Jan 2007 08:06:57 +0000 (09:06 +0100)]
* NEWS: New option sort -C, proposed by XCU ERN 127, which looks
like it will be approved. Also add --check=quiet, --check=silent
as long aliases, and --check=diagnose-first as an alias for -c.
* doc/coreutils.texi (sort invocation): Document this.
Also, mention that sort -c can take at most one file.
* src/sort.c: Implement this.
Include argmatch.h.
(usage): Document the change.
(CHECK_OPTION): New constant.
(long_options): --check now takes an optional argument, and is now
treated differently from 'c'.
(check_args, check_types): New constant arrays.
(check): New arg CHECKONLY, which suppresses diagnostic if -C.
(main): Parse the new options.
* tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
New tests for -C.
Jim Meyering [Wed, 24 Jan 2007 07:54:51 +0000 (08:54 +0100)]
Fix a typo.
* tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
Jim Meyering [Tue, 23 Jan 2007 23:34:54 +0000 (00:34 +0100)]
Don't depend on "which".
* tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
Dan Hipschman [Tue, 23 Jan 2007 23:27:01 +0000 (00:27 +0100)]
Test sort compression.
* tests/misc/Makefile.am: Add the test.
* tests/misc/sort-compress: New file containing the tests.
Jim Meyering [Tue, 23 Jan 2007 23:22:45 +0000 (00:22 +0100)]
* NEWS: sort temp file compression: tweak wording.
* src/sort.c (struct sortfile) [name]: Declare member to be const.
Dan Hipschman [Tue, 23 Jan 2007 23:00:21 +0000 (00:00 +0100)]
* src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
In pipe_fork callers, use these named constants, not "2" and "8".
(proctab, nprocs): Declare to be "static".
(pipe_fork) [lint]: Initialize local, pid,
to avoid unwarranted may-be-used-uninitialized warning.
(create_temp): Use the active voice. Describe parameters, too.
2007-01-21 James Youngman <jay@gnu.org>
Centralize all the uses of sigprocmask(). Don't restore an invalid
saved mask.
* src/sort.c (enter_cs, leave_cs): New functions for protecting
code sequences against signal delivery.
* (exit_cleanup): Use enter_cs and leave_cs instead of
calling sigprocmask directly.
(create_temp_file, pipe_fork, zaptemp): Likewise
2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
Add compression of temp files to sort.
* NEWS: Mention this.
* bootstrap.conf: Import findprog.
* configure.ac: Add AC_FUNC_FORK.
* doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
variable.
* src/sort.c (compress_program): New global, holds the name of the
external compression program.
(struct sortfile): New type used by mergepfs and friends instead
of filenames to hold PIDs of compressor processes.
(proctab): New global, holds compressor PIDs on which to wait.
(enum procstate, struct procnode): New types used by proctab.
(proctab_hasher, proctab_comparator): New functions for proctab.
(nprocs): New global, number of forked but unreaped children.
(reap, reap_some): New function, wait for/cleanup forked processes.
(register_proc, update_proc, wait_proc): New functions for adding,
modifying and removing proctab entries.
(create_temp_file): Change parameter type to pointer to file
descriptor, and return type to pointer to struct tempnode.
(dup2_or_die): New function used in create_temp and open_temp.
(pipe_fork): New function, creates a pipe and child process.
(create_temp): Creates a temp file and possibly a compression
program to which we filter output.
(open_temp): Opens a compressed temp file and creates a
decompression process through which to filter the input.
(mergefps): Change FILES parameter type to struct sortfile array
and update access accordingly. Use open_temp and reap_some.
(avoid_trashing_input, merge): Change FILES parameter like
mergefps and call create_temp instead of create_temp_file.
(sort): Call create_temp instead of create_temp_file.
Use reap_some.
(avoid_trashing_input, merge, sort, main): Adapt to mergefps.
Jim Meyering [Sat, 20 Jan 2007 20:58:31 +0000 (21:58 +0100)]
* tests/misc/pwd-long: Work properly even when run from the
wrong one of two or more bind-mounted sibling directories.
Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
Paul Eggert [Sat, 20 Jan 2007 08:54:20 +0000 (09:54 +0100)]
Standardize on list of signals when an app catches signals.
* src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
* src/ls.c (main): Likewise (except SIGPIPE was already caught).
Note that ls.c is special, as it also catches SIGTSTP.
* src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
Jim Meyering [Fri, 19 Jan 2007 22:28:03 +0000 (23:28 +0100)]
[lib/ChangeLog]
* .cvsignore, .gitignore: Add sys, as well as more
bootstrap-inserted file names.
[m4/ChangeLog]
* .cvsignore, .gitignore: Add more bootstrap-inserted file names.
Dan Hipschman [Fri, 19 Jan 2007 22:03:18 +0000 (23:03 +0100)]
* src/sort.c (cleanup): Clear temphead at the end.
(exit_cleanup): New function.
(main): Don't invoke atexit until we're ready.
Invoke it with exit_cleanup, not with cleanup and close_stdout,
to avoid a race condition with cleanup and signal handling. More
details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
Jim Meyering [Fri, 19 Jan 2007 11:10:04 +0000 (12:10 +0100)]
* coreutils.texi (ls: General output formatting): Mention the
workarounds to accommodate the Apple Terminal bug.
Jim Meyering [Thu, 18 Jan 2007 09:18:02 +0000 (10:18 +0100)]
* src/c99-to-c89.diff: Adjust remove.c offsets.
Jim Meyering [Wed, 17 Jan 2007 16:02:40 +0000 (17:02 +0100)]
Make "rm --interactive=never ..." never prompt.
* NEWS: Mention this.
* src/remove.h (enum rm_interactive): New ternary type.
(struct rm_options) [interactive]: Use it, here -- rather than bool.
* src/remove.c (prompt): Reflect type change.
* src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
* src/rm.c (main): Add a FIXME comment for '-d' option.
Adapt to type change of rm_options.interactive.
* tests/rm/i-never: New file. Test for the above fix.
* tests/rm/Makefile.am (TESTS): Add i-never.
Jim Meyering [Mon, 15 Jan 2007 10:31:51 +0000 (11:31 +0100)]
* bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
but that's ok, since fts_.h will eventually be renamed.
Jim Meyering [Mon, 15 Jan 2007 09:39:32 +0000 (10:39 +0100)]
* src/remove.c (remove_dir): Don't use errno in diagnostic.
Root-only test failure reported by Alex van Hout and Jon Grosshart in
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
Jim Meyering [Mon, 15 Jan 2007 09:32:09 +0000 (10:32 +0100)]
* bootstrap.conf (avoided_gnulib_modules): Fix my typo:
s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
Jim Meyering [Sun, 14 Jan 2007 16:18:51 +0000 (17:18 +0100)]
* fchdir-stub.c: Remove file. No longer needed.
Bruno Haible [Sun, 14 Jan 2007 16:15:49 +0000 (17:15 +0100)]
Enable use of gnulib's new fchdir module.
* bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
since we use canonicalize.
(gnulib_modules): Add fchdir.
* m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
Jim Meyering [Sat, 13 Jan 2007 10:32:19 +0000 (11:32 +0100)]
Put CU_TEST_NAME in the environment for each test run by "make check".
* Transform all Makefile.am files so that when running "make check",
CU_TEST_NAME is set to the name of the test. This is so that when I
run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
on the entire package it is more convenient to map a leak or error
found in a valgrind log file back to the offending test.
Use this command:
(echo tests/Makefile.am.in; find tests -name Makefile.am) \
|xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
-e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
Jim Meyering [Sat, 13 Jan 2007 10:22:01 +0000 (11:22 +0100)]
Regenerate .cvsignore and .gitignore files.
Jim Meyering [Thu, 11 Jan 2007 18:31:27 +0000 (19:31 +0100)]
Avoid a leak in expr's implementation of the ":" (match) operator.
* src/expr.c (docolon): Free the regexp buffer using regfree, rather
than doing it manually, being careful to set fastmap to NULL first.
Free any re_regs.start and .end members, if necessary.
Jim Meyering [Thu, 11 Jan 2007 17:59:24 +0000 (18:59 +0100)]
* tests/misc/test-diag: Work also when libc's error function
reports the entire program name ("../../src/test"), rather than
just the final component.
Jim Meyering [Thu, 11 Jan 2007 13:50:09 +0000 (14:50 +0100)]
Merge branch 'master' of /cu
Jim Meyering [Thu, 11 Jan 2007 13:49:19 +0000 (14:49 +0100)]
trivial merge
Jim Meyering [Wed, 10 Jan 2007 21:00:44 +0000 (22:00 +0100)]
Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
* src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
(change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
directory. Non-directory entries lack fts_statp data when using
the FTS_NOSTAT option.
Jim Meyering [Sun, 7 Jan 2007 17:38:56 +0000 (18:38 +0100)]
* tests/sample-test: Update copyright date to 2007.
* Makefile.maint (copyright-check): Also check the copyright date
in tests/sample-test.
Jim Meyering [Sat, 6 Jan 2007 09:42:17 +0000 (10:42 +0100)]
* tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
based on examples from G.P. Halkes in
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
G.P. Halkes [Sat, 6 Jan 2007 08:49:47 +0000 (09:49 +0100)]
* src/fmt.c (copy_rest): Correct prefix handling.
Don't elide a line with the prefix followed by only white space.
(get_line): Move EOF-check to loop-termination condition.
* tests/fmt/basic (pfx-1): Adjust test to expect desired result.
(pfx-2): Remove test; its premise was contrary to the documentation.
Jim Meyering [Fri, 5 Jan 2007 11:30:51 +0000 (12:30 +0100)]
Avoid a used-uninitialized bug for invalid input, i.e., when the size
of the input, not counting newlines, is 1 % 4.
* gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
It may be smaller when flushing.
Mike Frysinger [Fri, 5 Jan 2007 08:52:10 +0000 (09:52 +0100)]
* src/dircolors.hin: Add a TERM directive for cons25.
Jim Meyering [Thu, 4 Jan 2007 14:34:29 +0000 (15:34 +0100)]
Use the release year, not the current year.
* src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
* src/Makefile.am (RELEASE_YEAR): Define it.
(.sh): Use it.
Thanks to a prod from Eric Blake.
Jim Meyering [Thu, 4 Jan 2007 13:55:42 +0000 (14:55 +0100)]
Ensure that "group --version" always prints the current year.
* src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
* src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
Suggestion from Eric Blake.
Jim Meyering [Thu, 4 Jan 2007 11:08:36 +0000 (12:08 +0100)]
* Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
case you don't have convenient access to glibc info documentation.
Jim Meyering [Thu, 4 Jan 2007 11:01:48 +0000 (12:01 +0100)]
.cvsignore, .gitignore: Add fchownat.c and wctype-related files.
Jim Meyering [Thu, 4 Jan 2007 10:52:52 +0000 (11:52 +0100)]
[ChangeLog]
When decoding, always allow newlines in input, with almost no
performance impact.
* src/base64.c (do_decode): Initialize decode context.
Call base64_decode one more time, after all input is processed.
(usage): When decoding, newlines are always accepted.
* tests/misc/base64: Add a bunch of tests, for the above.
* gl/lib/base64.c: Include <string.h>.
(base64_decode_ctx_init, get_4, decode_4): New functions.
(base64_decode): Efficiently handle interspersed newlines.
(base64_decode_alloc): Update signature.
* gl/lib/base64.h (struct base64_decode_context): Define.
(base64_decode_ctx_init): Add prototype.
(base64_decode, base64_decode_alloc): Update prototypes.
[doc/ChangeLog]
* coreutils.texi (base64 invocation): When decoding, newlines
are always accepted.
Jim Meyering [Thu, 4 Jan 2007 10:36:54 +0000 (11:36 +0100)]
* gl/lib/base64.c: Copied from gnulib.
* gl/lib/base64.h: Likewise.
Evan Hunt [Wed, 3 Jan 2007 11:24:35 +0000 (12:24 +0100)]
[oops] Document what the ".0" in e.g., "-k 2,3.0" means, and...
* coreutils.texi (sort invocation): ... that it can be applied to the
field-end spec, but not the field-start one. Patch from Evan Hunt.
Signed-off-by: Jim Meyering <jim@meyering.net>
Evan Hunt [Wed, 3 Jan 2007 11:04:24 +0000 (12:04 +0100)]
Document what the ".0" in e.g., "-k 2,3.0" means, and...
* coreutils.texi (sort invocation): ... that it can be applied to the
field-end spec, but not the field-start one. Patch from Evan Hunt.
Signed-off-by: Jim Meyering <jim@meyering.net>
Bruno Haible [Wed, 3 Jan 2007 09:51:37 +0000 (10:51 +0100)]
Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
* tests/chown/deref: Apply lang-default.
* tests/misc/split-a: Likewise.
* tests/mv/reply-no: Likewise.
Signed-off-by: Jim Meyering <jim@meyering.net>
Bruno Haible [Wed, 3 Jan 2007 09:46:25 +0000 (10:46 +0100)]
* src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
Needed on MacOS X.
Signed-off-by: Jim Meyering <jim@meyering.net>
Paul Eggert [Tue, 2 Jan 2007 06:27:22 +0000 (07:27 +0100)]
Now, "ls -FRL" always follows symbolic links on Linux.
* NEWS: Mention this bug fix.
* src/ls.c (gobble_file): Fix bug reported by
Nobuyuki Tsuchimura in
http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
* tests/ls/follow-slink: Add a test for this case.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Mon, 1 Jan 2007 09:56:01 +0000 (10:56 +0100)]
* tests/rm/fail-eperm: Instead, simply transform the actual output diagnostic.
Test failure reported by Bob Proulx.
Jim Meyering [Mon, 1 Jan 2007 08:51:43 +0000 (09:51 +0100)]
* tests/rm/fail-eperm: Revert last change. The PATH=... setting
is not honored at least on HP-UX 11.23 systems.
Jim Meyering [Sat, 30 Dec 2006 21:16:35 +0000 (22:16 +0100)]
* bootstrap (gnulib_extra_files): Remove announce-gen.
* bootstrap.conf (gnulib_modules): Add it here instead, now that
it's a module.
Jim Meyering [Sat, 30 Dec 2006 16:46:09 +0000 (17:46 +0100)]
* tests/misc/base64: Factor a long, repetitive string.
Jim Meyering [Sat, 30 Dec 2006 15:19:26 +0000 (16:19 +0100)]
* src/c99-to-c89.diff: Adjust remove.c offsets.
Jim Meyering [Sat, 30 Dec 2006 15:12:23 +0000 (16:12 +0100)]
Clean up after the change of 2006-12-28.
* src/remove.c (AD_pop_and_chdir): Change **DIRP parameter to *DIRP,
now that this function never modifies the pointer. Adjust comments
and code accordingly.
(remove_dir): Set "dirp" to NULL right after AD_pop_and_chdir call,
now that AD_pop_and_chdir no longer does that.
Jim Meyering [Sat, 30 Dec 2006 11:50:43 +0000 (12:50 +0100)]
* tests/rm/fail-eperm: Avoid spurious differences (the error function
from latest glibc no longer prints the full program_name): so don't
invoke rm via ../../src/rm. Instead, invoke it via "PATH=../../src rm".
Jim Meyering [Sat, 30 Dec 2006 10:49:04 +0000 (11:49 +0100)]
* tests/mv/acl (skip): Skip this test also if the destination
directory, which is on a different file system, lacks ACL support.
Jim Meyering [Sat, 30 Dec 2006 08:34:31 +0000 (09:34 +0100)]
* src/copy.c (copy_reg): Rewrite a comment that was rendered
inaccurate by the 2006-10-18 change.
Jim Meyering [Thu, 28 Dec 2006 18:37:07 +0000 (19:37 +0100)]
When moving "up" the hierarchy, be careful to remove a just-emptied
directory before opening ".", to avoid trouble with file system
implementations that cache readdir results at opendir-time.
* src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
Don't update **DIRP. Don't call fdopendir here.
(remove_dir): Call fdopendir here instead.
Report and patch from Mikulas Patocka:
<http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
Jim Meyering [Thu, 28 Dec 2006 08:25:26 +0000 (09:25 +0100)]
Remove 2006-12-24 entry (the corresponding change was never committed).
The underlying problem was fixed on 2006-12-26, by requiring a new-enough
version of autoconf.
Jim Meyering [Wed, 27 Dec 2006 15:00:15 +0000 (16:00 +0100)]
* src/tail.c (usage): Mention +N for --bytes and --lines.
Suggestion from Evan Hunt.
Jim Meyering [Wed, 27 Dec 2006 10:27:54 +0000 (11:27 +0100)]
* configure.ac: Require autoconf-2.61 and automake-1.10.
Without the former (even with autoconf-2.60), "make distcheck"
would fail (without the 2006-09-26 autoconf AC_CHECK_DECL fix),
due to an inttypes.h generated with CFLAGS including -pedantic.
With the old decl check, @HAVE_DECL_STRTOUMAX@ would be 0.
Jim Meyering [Tue, 26 Dec 2006 15:42:33 +0000 (16:42 +0100)]
* Makefile.maint (VC-tag): Define, so as to gpg-sign each release
tag, using the release version number as the message.
(vc-dist): Use $(VC-tag), rather than "$(VC) tag".
2006-12-24 Jim Meyering <jim@meyering.net>
* Makefile.maint (my-distcheck): Don't *configure* with
restrictive CFLAGS ('-Werror -ansi -pedantic -Wno-long-long'),
since it ends up provoking errors in generation of inttypes.h
on an Ubuntu edgy-based system. That leads to compilation
failure due to e.g., imaxabs redefinition.
Instead, configure with default CFLAGS, and compile the
package with restrictive CFLAGS.
Paul Eggert [Fri, 22 Dec 2006 09:09:37 +0000 (10:09 +0100)]
* NEWS: dd bs= operands now silently override later ibs= and obs=,
as POSIX requires.
* src/dd.c (scanargs): Implement it.
* tests/dd/misc (outbytes): Test it.
* doc/coreutils.texi (dd invocation): Specify that bs=N
overrides later ibs and obs, undoing part of the
previous change. (The behavior was wrong.)
Jim Meyering [Thu, 21 Dec 2006 10:13:48 +0000 (11:13 +0100)]
* coreutils.texi (dd invocation): Specify that bs=N overrides only any
_preceding_ ibs and obs settings. Spotted by Andreas Schwab.
Jim Meyering [Thu, 21 Dec 2006 10:05:16 +0000 (11:05 +0100)]
* Makefile.maint (patch-check): Fix shell quoting.
Jim Meyering [Thu, 21 Dec 2006 09:24:51 +0000 (10:24 +0100)]
* coreutils.texi (dd invocation): Add to the description of cbs.
Jim Meyering [Thu, 21 Dec 2006 09:18:58 +0000 (10:18 +0100)]
* coreutils.texi (dd invocation): Improve the documentation
for bs, ibs, obs, and cbs. Suggestion from Dan Jacobson.
Patch by Olivier Delhomme.
Jim Meyering [Wed, 20 Dec 2006 18:56:20 +0000 (19:56 +0100)]
"rm -rf /etc/motd" (run by non-root) now prints a diagnostic.
* src/remove.c (remove_entry): Handle EACCES for a non-directory, too.
Karl Berry reported that a cross-partition "mv /etc/issue ~"
failed with the um,... suboptimal diagnostic,
"mv: cannot remove `/etc/issue': Not a directory".
* tests/rm/Makefile.am (TESTS): Add fail-eacces.
* tests/rm/fail-eacces: New file.
* NEWS: Mention that both mv and rm are affected.
Jim Meyering [Wed, 20 Dec 2006 13:25:55 +0000 (14:25 +0100)]
"cut -f 2- A B" no longer triggers a double-free bug
* src/cut.c (cut_fields): Set file-scoped global to NULL after
freeing it. This avoids a double-free (and core dump on some systems)
for this usage: "echo 1>a; echo 2>b; cut -f2- a b". Reported by
James Hunt in <http://bugzilla.redhat.com/220312>.
* NEWS: List this bug fix.
* THANKS: Mention him.
* tests/misc/cut: New file.
* tests/misc/Makefile.am (TESTS): Add cut.
Jim Meyering [Fri, 15 Dec 2006 09:43:20 +0000 (10:43 +0100)]
* tests/cp/open-perm-race: Correct the gdb-existence check.
Don't run either subsequent gdb command in a sub-shell.
Reported by Thomas Schwinge.
* THANKS: bring up to date.
Paul Eggert [Fri, 15 Dec 2006 08:50:40 +0000 (09:50 +0100)]
Make sure cp -p isn't too generous with file permissions.
* tests/cp/Makefile.am (TESTS): Add file-perm-race.
* tests/cp/file-perm-race: New file.
Signed-off-by: Jim Meyering <jim@meyering.net>
Paul Eggert [Fri, 15 Dec 2006 08:44:58 +0000 (09:44 +0100)]
Ensure cp -pR --parents isn't too generous with parent permissions.
* tests/cp/Makefile.am (TESTS): Add parent-perm-race.
* tests/cp/parent-perm-race: New file.
Signed-off-by: Jim Meyering <jim@meyering.net>
Jim Meyering [Thu, 14 Dec 2006 20:07:49 +0000 (21:07 +0100)]
* tests/chgrp/default-no-deref: Don't assume that files are created
with the primary group by default. That's not true in a directory
with the set-GID bit set.
Jim Meyering [Thu, 14 Dec 2006 18:32:10 +0000 (19:32 +0100)]
Don't hang when there's no input tty.
* tests/cp/open-perm-race: Skip this test if there is no
controlling input `terminal'.
Jim Meyering [Thu, 14 Dec 2006 16:17:31 +0000 (17:17 +0100)]
Test for a hard-to-detect race fix, using gdb.
* tests/cp/open-perm-race: New file, to test for the
cp --preserve=ownership fix of 2006-12-06.
* tests/cp/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir.
(TESTS): Add open-perm-race.
Jim Meyering [Thu, 14 Dec 2006 14:41:05 +0000 (15:41 +0100)]
chgrp, chown: Don't prohibit -RLh, aka -RL with --no-dereference.
* src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference.
* src/chown.c (main): Likewise.
* src/chown-core.c (change_file_owner): Add to a comment.
* tests/chown/preserve-root: Add tests.
* doc/coreutils.texi (Treating / specially): With --preserve-root,
chgrp and chown will not modify "/", even through a symlink.
Jim Meyering [Thu, 14 Dec 2006 10:09:44 +0000 (11:09 +0100)]
* NEWS: --preserve-root now works with chgrp, chmod, and chown.
* src/chmod.c (process_file): Do honor the --preserve-root option.
* src/chown-core.c (change_file_owner): Likewise, but here, also
handle the case in which a traversal would go "through" a symlink
to root. Reported by Matthew M. Boedicker
* tests/chown/preserve-root: Test for the above.
* tests/chown/Makefile.am (TESTS): Add preserve-root.
Jim Meyering [Thu, 14 Dec 2006 08:15:51 +0000 (09:15 +0100)]
* coreutils.texi: Remove two doubled words.
Jim Meyering [Wed, 13 Dec 2006 23:22:50 +0000 (00:22 +0100)]
* NEWS: Mention the chmod fix induced by the recent change to gnulib's openat.m4.