platform/upstream/coreutils.git
15 years agotail: use inotify if it is available
Giuseppe Scrivano [Tue, 2 Jun 2009 06:28:23 +0000 (08:28 +0200)]
tail: use inotify if it is available

* NEWS: Document the new feature.
* m4/jm-macros.m4: Check if inotify is present.
* src/tail.c (tail_forever_inotify): New function.
(main): Use the inotify-based function, if possible.
* tests/Makefile.am: Add new tests for tail.
* tests/test-lib.sh (require_proc_pid_status_, get_process_status_):
New functions.
* tests/tail-2/pid: New file.
* tests/tail-2/wait: New file.
* tests/tail-2/tail-n0f: Refactor code into the test-lib.sh
require_proc_pid_status_ function.

15 years agodiag: say "failed to...", rather than "cannot..." in a few diagnostics
Jim Meyering [Sat, 13 Jun 2009 14:36:48 +0000 (16:36 +0200)]
diag: say "failed to...", rather than "cannot..." in a few diagnostics

* src/chroot.c (main): ...it's more precise.
* src/nohup.c (main): Likewise.
* src/setuidgid.c (main): Likewise.
* src/timeout.c (main): Likewise.

15 years agosort: Ignore fields where end position is before the start position
Cliff Miller [Thu, 11 Jun 2009 17:30:32 +0000 (18:30 +0100)]
sort: Ignore fields where end position is before the start position

* NEWS: Mention the fix
* THANKS: Add Cliff Miller
* src/sort.c (keycompare): Ensure lima >= texta
* tests/misc/sort: Add 3 corresponding tests

Signed-off-by: Pádraig Brady <P@draigBrady.com>
15 years agotests: ls --color, permissions override hardlink coloring
Pádraig Brady [Thu, 11 Jun 2009 10:34:21 +0000 (11:34 +0100)]
tests: ls --color, permissions override hardlink coloring

* tests/ls/multihardlink: Add a test case to demonstrate
and test this non obvious behavior.

15 years agols --color: do not colorize files with multiple hard links by default
Kamil Dudka [Wed, 10 Jun 2009 17:44:43 +0000 (19:44 +0200)]
ls --color: do not colorize files with multiple hard links by default

* src/ls.c: Rename hl->mh, do not colorize files with multiple
hard links by default.
* src/dircolors.c: Rename HARDLINK -> MULTIHARDLINK, hl -> mh.
* src/dircolors.hin: Do not colorize files with multiple hard links by
default.
* tests/Makefile.am: Rename the test case accordingly.
* tests/ls/multihardlink: Additionally test ls' default behavior
and factor out some duplication.
* NEWS: Mention the change in behavior.

15 years agomaint: Add a syntax-check to ensure all .x-sc_ files are distributed
Pádraig Brady [Mon, 8 Jun 2009 07:42:00 +0000 (08:42 +0100)]
maint: Add a syntax-check to ensure all .x-sc_ files are distributed

* Makefile.am: Add a couple of missing entries to
syntax_check_exceptions for distribution.
* cfg.mk: Add a rule to ensure the syntax_check_exceptions list
stays in sync with the .x-sc_* files in the repository.

15 years agobuild: update from gnulib
Jim Meyering [Sun, 7 Jun 2009 10:54:18 +0000 (12:54 +0200)]
build: update from gnulib

* gnulib: Update submodule to latest.

15 years agosort: die immediately upon heap allocation failure
Jim Meyering [Sun, 7 Jun 2009 11:55:43 +0000 (13:55 +0200)]
sort: die immediately upon heap allocation failure

* src/sort.c (register_proc): Handle hash_insert failure.

15 years agodircolors: add screen-256color-bce to TERM list
Mike Frysinger [Thu, 7 May 2009 19:29:23 +0000 (15:29 -0400)]
dircolors: add screen-256color-bce to TERM list

* src/dircolors.hin: Add screen-256color-bce.

15 years agodoc: HACKING: minor adjustments, additions
Jim Meyering [Wed, 3 Jun 2009 16:28:34 +0000 (18:28 +0200)]
doc: HACKING: minor adjustments, additions

* HACKING (Amending...): Remove spurious "-e" used with commit --amend.
(log message policy): Mention the 72-column limit.
"build:" and "maint:" are common prefixes, these days.

15 years agodoc: adjust wording in README-prereq
Jim Meyering [Tue, 2 Jun 2009 20:31:16 +0000 (22:31 +0200)]
doc: adjust wording in README-prereq

15 years agodircolors: recognize .xz, .txz, .tbz and .tlz suffixes
Jim Meyering [Tue, 2 Jun 2009 19:48:38 +0000 (21:48 +0200)]
dircolors: recognize .xz, .txz, .tbz and .tlz suffixes

* src/dircolors.hin: Add .xz, .txz, .tbz and .tlz.

15 years agodoc: use newer URL for XZ utils
Jim Meyering [Tue, 2 Jun 2009 19:44:11 +0000 (21:44 +0200)]
doc: use newer URL for XZ utils

* README-hacking: Use <http://tukaani.org/xz/>
* README-prereq: Mention xz, not lzma.

15 years agodoc: adjust README-prereq instructions
Matěj Cepl [Wed, 3 Jun 2009 00:02:01 +0000 (01:02 +0100)]
doc: adjust README-prereq instructions

* README-prereq: Mention new requirement on automake-1.11,
with its new location and updated dependency on autoconf-2.62.
Remove the reference to coreutils-7.0 so that this file
implicitly refers to the latest or release version of coreutils.
Fix and clarify the instructions for updating the $PATH.

Signed-off-by: Pádraig Brady <P@draigBrady.com>
15 years agodoc: HACKING: mention the GNU Coding Standards
Jim Meyering [Tue, 2 Jun 2009 05:52:02 +0000 (07:52 +0200)]
doc: HACKING: mention the GNU Coding Standards

* HACKING (Add documentation): Add a link to the GCS.

15 years agobuild: no longer list gnulib's "memchr" module as obsolete
Jim Meyering [Sun, 31 May 2009 13:18:16 +0000 (15:18 +0200)]
build: no longer list gnulib's "memchr" module as obsolete

* bootstrap.conf (obsolete_gnulib_modules): Remove memchr from
the list, now that it fixes a problem in some modern C libraries.
(gnulib_modules): Add it here.

15 years agobuild: make generated man/*.1 files read-only
Jim Meyering [Sun, 31 May 2009 07:52:51 +0000 (09:52 +0200)]
build: make generated man/*.1 files read-only

This should help people notice that they are generated.
Note: each file already has a comment to that effect from help2man.
* man/Makefile.am (.x.1): Make generated files read-only.
Also, don't redirect directly to the target, $@.

15 years agobuild (man/): use automake's new $(AM_V_GEN) variable
Jim Meyering [Fri, 24 Apr 2009 20:23:50 +0000 (22:23 +0200)]
build (man/): use automake's new $(AM_V_GEN) variable

* man/Makefile.am (.x.1, check-x-vs-1, check-programs-vs-x):
Mark with $(AM_V_GEN), so that automake-1.11 prints
"GEN $@" by default (stick with "GEN" in spite of the latter two
rules not officially generating anything -- they're just tests).

15 years agochroot: make --groups= work without --userspec=; be more robust
Jim Meyering [Fri, 29 May 2009 06:44:56 +0000 (08:44 +0200)]
chroot: make --groups= work without --userspec=;  be more robust

* src/chroot.c (set_additional_groups): Add comments.
Given an empty or all-comma group list, diagnose it and return nonzero.
When more than one group is invalid, diagnose all of them,
not just the first.
(main): Honor --groups= also when --userspec= is not specified.
Now that set_additional_groups consistently diagnoses its failures,
don't diagnose it separately here.
* tests/chroot/credentials: Do not invoke with an empty group list.

15 years agochroot: don't set bogus user-ID or group-ID for --u=U: or --u=:G
Jim Meyering [Wed, 27 May 2009 21:06:15 +0000 (23:06 +0200)]
chroot: don't set bogus user-ID or group-ID for --u=U: or --u=:G

* src/chroot.c (main): Initialize both "uid" and "gid".  To -1.
This also allows one to set the user-ID or primary group-ID to 0,
in case it's not that already.
* tests/chroot/credentials: Test for the above.

15 years agochroot: set-*-ID failure must provoke nonzero exit before execvp
Jim Meyering [Wed, 27 May 2009 20:06:04 +0000 (22:06 +0200)]
chroot: set-*-ID failure must provoke nonzero exit before execvp

* src/chroot.c (main): Exit upon set-group-ID or set-user-ID failure.

15 years agotests: use "nobody" as the default group name in chroot test
Jim Meyering [Thu, 28 May 2009 20:36:05 +0000 (22:36 +0200)]
tests: use "nobody" as the default group name in chroot test

* tests/test-lib.sh (NON_ROOT_GROUP): Use "nobody", not "nogroup".

15 years agobuild: make distcheck rules use --enable-gcc-warnings
Jim Meyering [Tue, 2 Jun 2009 14:33:49 +0000 (16:33 +0200)]
build: make distcheck rules use --enable-gcc-warnings

* dist-check.mk (warn_cflags): Remove definition, now that it's
been subsumed by --enable-gcc-warnings.
(my-distcheck): Use configure with --enable-gcc-warnings and remove
use of $(warn_cflags).

15 years agohead, tail: make --help less ambiguous
Eric Blake [Wed, 20 May 2009 12:32:10 +0000 (06:32 -0600)]
head, tail: make --help less ambiguous

* src/head.c (usage): Use -n K, not -n N, to avoid confusion.
* src/tail.c (usage): Likewise.
* doc/coreutils.texi (head invocation, tail invocation):
Likewise.
Reported by Christophe Lyon.

15 years agosort: new --human-numeric-sort option to sort KiB MB etc.
Michael Speer [Mon, 27 Apr 2009 13:51:29 +0000 (14:51 +0100)]
sort: new --human-numeric-sort option to sort KiB MB etc.

* NEWS: Document the new option
* doc/coreutils.texi (sort invocation): ditto
* src/sort.c (main): handle the new --human-numeric-sort option (-h).
(human_numcompare): A new function to compare SI and IEC suffixes
before falling back to the standard --numeric comparison.
(find_unit_order): A new helper function to find the order
of magnitude of a number string as determined by its suffix.
(check_mixed_SI_IEC): A new helper function to exit with error
if both SI and IEC suffixes are presented.
* tests/misc/sort: Add 8 tests to test the new functionality.
* THANKS: Update

15 years agochroot: accept new options --userspec=U:G and --groups=G1,G2,G3
Giuseppe Scrivano [Fri, 1 May 2009 21:50:11 +0000 (23:50 +0200)]
chroot: accept new options --userspec=U:G and --groups=G1,G2,G3

* NEWS: Note chroot's new options.
* doc/coreutils.texi: Document them.
* src/chroot.c (main): Add support for --userspec and --groups.
* tests/Makefile.am (root-tests): Add chroot/credentials.
* tests/chroot/credentials: New file.
* tests/test-lib.sh: Define NON_ROOT_GROUP to a default value.

15 years agodoc: clarify the operation of the comm -123 parameters
Pádraig Brady [Fri, 15 May 2009 16:28:51 +0000 (17:28 +0100)]
doc: clarify the operation of the comm -123 parameters

* src/comm.c (usage): give more information on the -123 parameters,
with examples to show that they can be combined.
Addresses <http://savannah.gnu.org/bugs/?24974>.
* doc/coreutils.texi (comm invocation): Mention that the
column separators are suppressed along with the column.
Suggestion from Dan Jacobson.
* man/comm.x: Reference other commands that match adjacent lines.
* man/join.x: ditto.
* man/uniq.x: ditto.

15 years agobuild: require automake-1.11
Jim Meyering [Mon, 18 May 2009 05:06:34 +0000 (07:06 +0200)]
build: require automake-1.11

* bootstrap.conf (buildreq): Require automake-1.11, not 1.10b,
for our use of AM_SILENT_RULES.
* configure.ac (AM_INIT_AUTOMAKE): Likewise.

15 years agomaint: HACKING: mention a few more useful git commands
Jim Meyering [Sun, 17 May 2009 15:49:24 +0000 (17:49 +0200)]
maint: HACKING: mention a few more useful git commands

* HACKING (Miscellaneous useful git commands): Add a few.

15 years agobuild: avoid new "make distcheck" failure with gcc 4.5.0 20090517
Jim Meyering [Sun, 17 May 2009 13:22:11 +0000 (15:22 +0200)]
build: avoid new "make distcheck" failure with gcc 4.5.0 20090517

* dist-check.mk (warn_cflags): Add -Wno-enum-compare.

15 years agobuild: avoid new warnings from gcc 4.5.0 20090517
Jim Meyering [Sun, 17 May 2009 11:47:39 +0000 (13:47 +0200)]
build: avoid new warnings from gcc 4.5.0 20090517

* configure.ac: Add an explicit -Wno-logical-op,
now that not listing -Wlogical-op is insufficient.

15 years agomaint: use ARRAY_CARDINALITY more
Jim Meyering [Sun, 17 May 2009 11:02:25 +0000 (13:02 +0200)]
maint: use ARRAY_CARDINALITY more

* src/sort.c (main): Use ARRAY_CARDINALITY, rather than open-coding it.
* src/factor.c (WHEEL_END): Likewise.
* src/csplit.c (main): Likewise.
* src/od.c: Likewise,
* src/ls.c (main): Likewise.
(N_ENTRIES): Remove definition.  Use ARRAY_CARDINALITY instead.
* src/dircolors.c: Likewise.
(array_len): Remove definition.

15 years agobuild: tr: avoid a warning due to newer gcc's -Wenum-compare
Jim Meyering [Sun, 17 May 2009 10:47:24 +0000 (12:47 +0200)]
build: tr: avoid a warning due to newer gcc's -Wenum-compare

* src/tr.c (N_CHAR_CLASSES): Remove anonymous enum definition.
(look_up_char_class): Use ARRAY_CARDINALITY, rather than N_CHAR_CLASSES.

15 years agomaint: define ARRAY_CARDINALITY in system.h
Jim Meyering [Sun, 17 May 2009 11:01:37 +0000 (13:01 +0200)]
maint: define ARRAY_CARDINALITY in system.h

* src/system.h (ARRAY_CARDINALITY): Define if not already defined.

15 years agobuild: turn off -Wlong-long
Jim Meyering [Sun, 17 May 2009 09:43:21 +0000 (11:43 +0200)]
build: turn off -Wlong-long

* configure.ac: With --enable-gcc-warnings, -Wlong-long would
cause compilation failure due to inclusion of lib/gethrxtime.h.
Initialize "nw".

15 years agomaint: cfg.mk: remove now-unnecessary gnulib_dir definition
Jim Meyering [Fri, 15 May 2009 13:04:52 +0000 (15:04 +0200)]
maint: cfg.mk: remove now-unnecessary gnulib_dir definition

* cfg.mk (gnulib_dir): Remove definition, now that gnulib's
maint.mk provides the default we want.
* gnulib: Update submodule to latest.

15 years agotests: fix date-next-dow failure on older systems
Pádraig Brady [Fri, 15 May 2009 06:50:35 +0000 (07:50 +0100)]
tests: fix date-next-dow failure on older systems

* tests/misc/date-next-dow: In the strftime call use %Y-%m-%d
rather than the newer %F equivalent which is not available
on Solaris 8 for example.

15 years agobuild: update from gnulib, for rename.m4 fix, improved tests, etc.
Jim Meyering [Thu, 14 May 2009 07:55:44 +0000 (09:55 +0200)]
build: update from gnulib, for rename.m4 fix, improved tests, etc.

* gnulib: Update submodule to latest.

15 years agomaint: README-release: minor improvements
Jim Meyering [Thu, 14 May 2009 07:54:22 +0000 (09:54 +0200)]
maint: README-release: minor improvements

* README-release: Mention gnu_ftp_host-{alpha,...} settings in cfg.mk.
Now that XZ_OPT is set via maint.mk, don't mention it here.

15 years agotruncate: fix bug in use of isspace
Eric Blake [Thu, 7 May 2009 20:27:37 +0000 (14:27 -0600)]
truncate: fix bug in use of isspace

* src/truncate.c (main): Pass unsigned characters to isspace.
* NEWS: Mention this.

15 years agopost-release administrivia
Jim Meyering [Thu, 7 May 2009 13:52:50 +0000 (15:52 +0200)]
post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

15 years agoversion 7.4 v7.4
Jim Meyering [Thu, 7 May 2009 13:35:19 +0000 (15:35 +0200)]
version 7.4

* NEWS (Build-related): Mention make check fixes.

15 years agoadmin: update NEWS
Jim Meyering [Thu, 7 May 2009 13:17:53 +0000 (15:17 +0200)]
admin: update NEWS

* NEWS (Bug fixes): Mention the date-related fixes.
(Portability): Mention the ACL-related fixes on *BSD.

15 years agodoc: note the use of LC_COLLATE in comm, join and uniq
Pádraig Brady [Tue, 5 May 2009 11:00:15 +0000 (12:00 +0100)]
doc: note the use of LC_COLLATE in comm, join and uniq

* doc/coreutils.texi (uniq invocation): Simplify the
text to remove the inconsequential mentioning of order,
while implying that LC_COLLATE can alter equality comparisons.
* src/comm.c (usage): Mention LC_COLLATE is significant.
* src/join.c (usage): Ditto.
* src/uniq.c (usage): Ditto. Also improve the summary.
Suggestion from Andries Brouwer

15 years agotests: rm/one-file-system: umount more reliably
Jim Meyering [Tue, 5 May 2009 05:54:47 +0000 (07:54 +0200)]
tests: rm/one-file-system: umount more reliably

* tests/rm/one-file-system: Run umount via trap, so it runs
also upon irregular termination.

15 years agotests: fix typo in check-AUTHORS rule
Andreas Schwab [Tue, 5 May 2009 05:13:46 +0000 (07:13 +0200)]
tests: fix typo in check-AUTHORS rule

* src/Makefile.am (check-AUTHORS): Set locale.

15 years agobuild: use a gnulib SHA1 that is not private
Jim Meyering [Mon, 4 May 2009 05:47:56 +0000 (07:47 +0200)]
build: use a gnulib SHA1 that is not private

* gnulib: Update submodule to latest *public*.

15 years agobuild: update from gnulib, for ACL-related fixes
Jim Meyering [Mon, 4 May 2009 05:10:12 +0000 (07:10 +0200)]
build: update from gnulib, for ACL-related fixes

* gnulib: Update submodule to latest.

15 years agomv, rm: adapt to new and improved gnulib interfaces
David Bartley [Wed, 29 Apr 2009 07:48:15 +0000 (03:48 -0400)]
mv, rm: adapt to new and improved gnulib interfaces

Use gnulib's new priv-set module and updated write-any-file.
With them, the remove-called can_write_any_file function no
longer tries to drop the unlink-directory privilege, so now
each caller of remove must do that separately, calling
priv_set_remove_linkdir.
* bootstrap.conf (gnulib_modules): Add priv-set.
* src/rm.c: Include "priv-set.h".
(main): Call priv_set_remove_linkdir.
* src/mv.c (main): Likewise.
* gnulib: Update submodule to latest.

15 years agotests: correct the "make check"-run check-AUTHORS test
Jim Meyering [Sat, 2 May 2009 19:56:25 +0000 (21:56 +0200)]
tests: correct the "make check"-run check-AUTHORS test

* src/Makefile.am (check-AUTHORS): Revert back to using
en_US.UTF-8, to ease parsing (English-only) text around the
list of names, even when .po files are not installed.
Reported by Andreas Schwab.
Along the way, use $(AM_V_GEN), not "@".
(sc_tight_scope): Use $(AM_V_GEN) here, too.
* gnulib: Update submodule to latest, for the proper_name_utf8 fix
that makes --version output print the UTF-8 rendering of author names
in more cases.

15 years agotests: add tests of e.g., date -d 'next monday'
Jim Meyering [Sun, 3 May 2009 04:21:48 +0000 (06:21 +0200)]
tests: add tests of e.g., date -d 'next monday'

* tests/misc/date-next-dow: New file.
* tests/Makefile.am (TESTS): Add misc/date-next-dow.
* gnulib: Update submodule to latest, for getdate.y that
handles "next Monday" properly when run on a Monday.

15 years agopost-release administrivia
Jim Meyering [Fri, 1 May 2009 16:19:19 +0000 (18:19 +0200)]
post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

15 years agoversion 7.3 v7.3
Jim Meyering [Fri, 1 May 2009 16:03:50 +0000 (18:03 +0200)]
version 7.3

* NEWS: Record release date.

15 years agomaint: tweak release-building notes
Jim Meyering [Fri, 1 May 2009 15:55:11 +0000 (17:55 +0200)]
maint: tweak release-building notes

* README-release: Specify -j1 on the command to run all tests.
Otherwise, running some in parallel would cause failures, e.g.,
for rm/ext3-perf and tail-2/assert-2.

15 years agostdopen: remove unused code
Eric Blake [Thu, 30 Apr 2009 19:18:49 +0000 (13:18 -0600)]
stdopen: remove unused code

* m4/stdopen.m4: Delete now-unused file.
* lib/stdopen.h: Likewise.
* lib/stdopen.c: Likewise.

15 years agobuild: update from gnulib, for fixed lib/signbitl.c
Jim Meyering [Thu, 30 Apr 2009 15:23:49 +0000 (17:23 +0200)]
build: update from gnulib, for fixed lib/signbitl.c

* gnulib: Update submodule to latest.

15 years agobuild: "make check" now fails in a friendlier manner for missing Perl
Jim Meyering [Thu, 30 Apr 2009 11:50:40 +0000 (13:50 +0200)]
build: "make check" now fails in a friendlier manner for missing Perl

* doc/Makefile.am (sc-lower-case-var): Don't redirect stderr of
$(PERL) (which is sometimes build-aux/missing) to /dev/null,
so that a failing "make check" explains that Perl is not installed.
Reported by James Youngman.

15 years agobuild: doc: emit something for each "make check"-run rule
Jim Meyering [Thu, 30 Apr 2009 11:44:48 +0000 (13:44 +0200)]
build: doc: emit something for each "make check"-run rule

* doc/Makefile.am: Use $(AM_V_GEN) in place of each leading "@".
(check-texinfo): Align line-continuation backslashes.

15 years agobuild: update from gnulib, for the lib/*-state.c compilation fixes
Jim Meyering [Wed, 29 Apr 2009 05:35:43 +0000 (07:35 +0200)]
build: update from gnulib, for the lib/*-state.c compilation fixes

* gnulib: Update submodule to latest.

15 years agomisc: correct NEWS entry about id -G portability
Pádraig Brady [Tue, 28 Apr 2009 14:49:04 +0000 (15:49 +0100)]
misc: correct NEWS entry about id -G portability

* NEWS (Portability): getgrouplist has the portability issues,
not getgroups.

15 years agodf: adjust comment to match recent code change
Jim Meyering [Tue, 28 Apr 2009 12:45:43 +0000 (14:45 +0200)]
df: adjust comment to match recent code change

* src/df.c (main): Update comment to match.

15 years agomisc: mention the df vs. automount change
Jim Meyering [Tue, 28 Apr 2009 12:18:54 +0000 (14:18 +0200)]
misc: mention the df vs. automount change

* NEWS (Portability): Mention that df now accommodates the new
behavior of some automounters.

15 years agomisc: alphabetize NEWS entries
Jim Meyering [Tue, 28 Apr 2009 12:09:11 +0000 (14:09 +0200)]
misc: alphabetize NEWS entries

15 years agodf: use open(2), not stat, to trigger automounting
Tomas Smetana [Tue, 28 Apr 2009 09:21:49 +0000 (11:21 +0200)]
df: use open(2), not stat, to trigger automounting

* src/df.c (main): When iterating over command-line arguments,
attempting to ensure each backing file system is mounted, use
open, not stat.  stat is no longer sufficient to trigger
automounting, in some cases.  Based on a suggestion from Ian Kent.
More details in http://bugzilla.redhat.com/497830

15 years agotests: ensure that cp's -a doesn't silence --preserve=context
Ondřej Vašík [Mon, 27 Apr 2009 15:29:53 +0000 (17:29 +0200)]
tests: ensure that cp's -a doesn't silence --preserve=context

* tests/cp/cp-a-selinux: Ensure that the -a option does not silence
error diagnostics from --preserve=context, when preserving context
is required.

15 years agotests: add test for xattr diagnostics on dest. FS lacking xattr support
Ondřej Vašík [Mon, 27 Apr 2009 15:20:23 +0000 (17:20 +0200)]
tests: add test for xattr diagnostics on dest. FS lacking xattr support

* tests/cp/cp-mv-enotsup-xattr: Ensure that xattr diagnostics are
displayed correctly when destination filesystem lacks xattr support.
* tests/Makefile.am (root_tests): Add new root-only test.

15 years agocopy.c: factor out test for errno value indicating "unsupported"
Jim Meyering [Mon, 27 Apr 2009 09:35:50 +0000 (11:35 +0200)]
copy.c: factor out test for errno value indicating "unsupported"

* src/copy.c (errno_unsupported): New function.
(copy_attr_error, copy_internal): Use it.

15 years agocp -a: diagnose failure when preserving xattr/context required
Ondřej Vašík [Fri, 24 Apr 2009 12:29:45 +0000 (14:29 +0200)]
cp -a: diagnose failure when preserving xattr/context required

* src/copy.c (copy_attr_by_fs): Always print diagnostics when preserving
xattrs is required.
(copy_attr_by_name): Likewise.
(copy_reg): Always print diagnostics when preserving SELinux
context is required.
(copy_internal): Likewise.  Also, do not ignore ENOTSUP and ENODATA
errors when preserving SELinux context is required.
* NEWS (Bug fixes): Mention it.

15 years agomv: ignore xattr-preservation failure when not supported by filesystem
Ondřej Vašík [Fri, 17 Apr 2009 09:00:35 +0000 (11:00 +0200)]
mv: ignore xattr-preservation failure when not supported by filesystem

*src/copy.c: Do not warn about xattr-preservation failure when xattrs
are not supported and preservation of xattrs is not explicitly required.
Reported by Eric Sandeen in http://bugzilla.redhat.com/496142

15 years agobuild: update from gnulib, for the vc-list-files fix
Jim Meyering [Sat, 25 Apr 2009 08:28:53 +0000 (10:28 +0200)]
build: update from gnulib, for the vc-list-files fix

* gnulib: Update submodule to latest.

15 years agobuild: adjust use of automake's new $(AM_V_GEN) variable
Jim Meyering [Sat, 25 Apr 2009 07:23:48 +0000 (09:23 +0200)]
build: adjust use of automake's new $(AM_V_GEN) variable

* src/Makefile.am (dircolors.h, wheel-size.h, wheel.h, fs.h):
(version.c, version.h): Use $(AM_V_GEN) only as a prefix of an existing
command.  Otherwise, it provokes warnings from some "make" programs.
Suggestion from Ralf Wildenhues.

15 years agotests: fix check-AUTHORS skip logic
Ralf Wildenhues [Sat, 25 Apr 2009 05:52:31 +0000 (07:52 +0200)]
tests: fix check-AUTHORS skip logic

* src/Makefile.am (check-AUTHORS): When this test is skipped, be
sure to avoid all commands in the recipe, not just those passed
to the first shell.

15 years agocfg.mk: update to latest gnulib change
Eric Blake [Sat, 25 Apr 2009 02:16:27 +0000 (20:16 -0600)]
cfg.mk: update to latest gnulib change

* cfg.mk (bootstrap-tools): Override maint.mk default to include
bison.
* gnulib: Update to latest gnulib.

15 years agobuild: move coreutils-specific rules from maint.mk to new file
Jim Meyering [Fri, 24 Apr 2009 19:36:22 +0000 (21:36 +0200)]
build: move coreutils-specific rules from maint.mk to new file

* dist-check.mk: New file: coreutils-specific rules extracted
from maint.mk, now that maint.mk has migrated to gnulib.
* Makefile.am (EXTRA_DIST): Add dist-check.mk.
* coreutils/cfg.mk: Include $(srcdir)/dist-check.mk.
* gnulib: Update submodule to latest.

15 years agotests: avoid unusual (~1-in-20) failure of a new test
Jim Meyering [Fri, 24 Apr 2009 19:34:59 +0000 (21:34 +0200)]
tests: avoid unusual (~1-in-20) failure of a new test

* tests/misc/sort: Remove one of the generated tests.
363 remain in this file alone.

15 years agobuild: use automake's new $(AM_V_GEN) and $(AM_V_at) variables
Jim Meyering [Fri, 24 Apr 2009 13:16:46 +0000 (15:16 +0200)]
build: use automake's new $(AM_V_GEN) and $(AM_V_at) variables

* src/Makefile.am (dircolors.h, wheel-size.h, wheel.h, fs.h):
(version.c, version.h): Mark with $(AM_V_GEN) and $(AM_V_at),
so that the latest automake prints "GEN $@" by default.

15 years agobuild: use maint.mk from gnulib
Simon Josefsson [Thu, 23 Apr 2009 23:07:43 +0000 (01:07 +0200)]
build: use maint.mk from gnulib

* maint.mk: Remove file.  Now it's generated.
* .gitignore: Ignore it.
* bootstrap.conf (gnulib_modules): Add maintainer-makefile.
* gnulib: Update submodule to latest.

15 years agobuild: make --enable-silent-rules the default
Jim Meyering [Sun, 19 Apr 2009 11:41:52 +0000 (13:41 +0200)]
build: make --enable-silent-rules the default

* configure.ac (AM_INIT_AUTOMAKE): Remove silent-rules.  Instead,...
(AM_SILENT_RULES): Use this, with it's undocumented [yes] argument.
Those who want verbose build output may configure with
--disable-silent-rules or use "make V=1".

15 years ago* gnulib: Update submodule to latest.
Jim Meyering [Thu, 23 Apr 2009 19:04:51 +0000 (21:04 +0200)]
* gnulib: Update submodule to latest.

15 years agosort -m: don't segfault when output file is also an input file
Jim Meyering [Wed, 22 Apr 2009 06:45:27 +0000 (08:45 +0200)]
sort -m: don't segfault when output file is also an input file

* src/sort.c (avoid_trashing_input): Fix an off-by-one error and
guard the use of memmove.
* NEWS (Bug fixes): Mention it.
* tests/misc/sort: Add tests to exercise the offending code.
* THANKS: Update.
Reported by Otavio Salvador in http://bugs.debian.org/525048.

15 years agotests: make the check-AUTHORS test more portable, now that it's...
Jim Meyering [Thu, 23 Apr 2009 06:45:51 +0000 (08:45 +0200)]
tests: make the check-AUTHORS test more portable, now that it's...

run as part of "make check".
* src/Makefile.am (check-AUTHORS): Don't depend on en_US.UTF-8.
Instead, use the French UTF8 locale, if configure found one.
If not found, just skip the test.

15 years agoavoid parallel "make distcheck" failure due to two run-in-src/ rules
Jim Meyering [Thu, 23 Apr 2009 06:21:38 +0000 (08:21 +0200)]
avoid parallel "make distcheck" failure due to two run-in-src/ rules

Move the check-AUTHORS rule from "syntax-check" to "check".
* maint.mk (local-checks-available): Remove check-AUTHORS.
(check-AUTHORS): Remove rule.
* src/Makefile.am (CLEANFILES): Add $(no_install__progs),
since they too are built sometimes.
(check-AUTHORS): Split a longer-than-80 sed command.
(../AUTHORS): Remove obsolete rule.

15 years agocp: work around linux kernel bug: short-read != EOF on /proc
Jim Meyering [Fri, 17 Apr 2009 16:44:18 +0000 (18:44 +0200)]
cp: work around linux kernel bug: short-read != EOF on /proc

Remove the optimization that avoided up to 50% of cp's read syscalls.
Do not assume that a short read on a regular file indicates EOF.
When reading from a file in /proc on linux [at least 2.6.9 - 2.6.29]
into a 4k-byte buffer or larger, a short read does not
always indicate EOF.  For example, "cp /proc/slabinfo /tmp"
copies only 4068 of the total 7493 bytes.  This optimization
(25719a33154f0c62ea9881f0c79ae312dd4cec7a, Improve performance a bit
by optimizing away; 2005-11-24) appears to have been worth less than
a 2% speed-up (and usually much less), so the impact of removing it
is negligible.

* src/copy.c (copy_reg): Don't exit the loop early.
* tests/cp/proc-short-read: New test, lightly based on a suggestion
from Mike Frysinger, to exercise this fix.
* tests/Makefile.am (TESTS): Add cp/proc-short-read.
* NEWS (Improve robustness): Mention this change.

15 years agotests: avoid new "make distcheck" failure due to newer File::Temp
Jim Meyering [Wed, 22 Apr 2009 19:41:10 +0000 (21:41 +0200)]
tests: avoid new "make distcheck" failure due to newer File::Temp

With newer perl (e.g., Fedora 10's 4:5.10.0-68.fc10), tests/CuTmpdir.pm
stopped removing its temporary directories, with diagnostics like this:
  cannot remove path when cwd is /c/coreutils/tests/misc/seq.tmp-e2up \
  for /c/coreutils/tests/misc/seq.tmp-e2up: at \
  /usr/lib/perl5/5.10.0/File/Temp.pm line 902
Chdir out of the target directory before that code runs:
* tests/CuTmpdir.pm (END): chdir '..'.
(chmod_tree): Remove explicit "chdir $dir".

15 years agodoc: update README
Jim Meyering [Sat, 18 Apr 2009 07:17:04 +0000 (09:17 +0200)]
doc: update README

* README: (Reporting bugs): List the bug-reporting address here, too,
not just in the following more test-oriented paragraph.
Reported by Tim Mooney.
All changes are no longer listed in version-controlled ChangeLog
files, so note that contributions are attributed in the commit logs.
Mention bootstrap.conf, now that it's the authoritative source of
minimal prerequisite program/version# pairs.

15 years agotests: avoid failure of install-C test on FreeBSD UFS file system
Aurelien Jarno [Fri, 17 Apr 2009 16:10:04 +0000 (18:10 +0200)]
tests: avoid failure of install-C test on FreeBSD UFS file system

* tests/install/install-C: Use 2755 (set-gid), not 1755 (sticky),
to test install -C with non-permission mode bits set.  At least on
FreeBSD with a UFS file system, a non-root user may not set the
sticky bit on a non-directory.

15 years agocomment touch up: insert a space between "#" and text of comment
Jim Meyering [Sun, 19 Apr 2009 19:49:14 +0000 (21:49 +0200)]
comment touch up: insert a space between "#" and text of comment

* bootstrap: It's easier to read that way.

15 years agofix comment typos
Ralf Wildenhues [Sat, 18 Apr 2009 17:37:29 +0000 (19:37 +0200)]
fix comment typos

* bootstrap: Fix comment typos.
* src/pr.c: Likewise.

15 years agomaint: bootstrap: sync a tiny change from gnulib
Jim Meyering [Fri, 17 Apr 2009 07:10:57 +0000 (09:10 +0200)]
maint: bootstrap: sync a tiny change from gnulib

* bootstrap: rename variable to sync with gnulib: s/\$depth/$shallow/

15 years ago* gnulib: Update submodule to latest.
Jim Meyering [Thu, 16 Apr 2009 05:42:20 +0000 (07:42 +0200)]
* gnulib: Update submodule to latest.

15 years agobuild: use '.'-relative name, gnulib_dir
Jim Meyering [Thu, 16 Apr 2009 05:03:59 +0000 (07:03 +0200)]
build: use '.'-relative name, gnulib_dir

* cfg.mk (gnulib_dir): Use "gnulib", not "/gnulib", now that
the former is a git submodule, and guaranteed to exist.

15 years agomaint: clean up skipped syntax-check rules
Jim Meyering [Wed, 15 Apr 2009 18:18:24 +0000 (20:18 +0200)]
maint: clean up skipped syntax-check rules

* cfg.mk (local-checks-to-skip): Remove patch-check and changelog-check.
* maint.mk (patch-check): Remove rule.
(local-checks-available): Remove patch-check.
(changelog-check): Remove rule.

15 years agobuild: avoid parallel distcheck failure
Ralf Wildenhues [Sat, 11 Apr 2009 12:48:49 +0000 (14:48 +0200)]
build: avoid parallel distcheck failure

* Makefile.am (ALL_RECURSIVE_TARGETS): Initialize here, too,
to please automake.  Add install-root, check-root, distcheck-hook.
* cfg.mk (ALL_RECURSIVE_TARGETS): Add sc_tight_scope.
* maint.mk (ALL_RECURSIVE_TARGETS): Add patch-check,
check-AUTHORS, maintainer-distcheck, vc-dist, taint-distcheck,
my-distcheck, alpha, beta, major.

15 years agodoc: fix a typo: s/is a is a/is a/
Jim Meyering [Fri, 10 Apr 2009 10:50:14 +0000 (12:50 +0200)]
doc: fix a typo: s/is a is a/is a/

* doc/coreutils.texi (Putting the tools together): Fix typo.

15 years agobuild: tight-scope test: don't build excluded programs
Jim Meyering [Fri, 10 Apr 2009 09:35:10 +0000 (11:35 +0200)]
build: tight-scope test: don't build excluded programs

* src/Makefile.am (sc_tight_scope): Depend on $(bin_PROGRAMS),
not $(all_programs)

15 years agognulib: update to latest: fix ls -v & sort -V
Jim Meyering [Fri, 10 Apr 2009 08:12:10 +0000 (10:12 +0200)]
gnulib: update to latest: fix ls -v & sort -V

* NEWS (Bug fixes): Mention it.

15 years agomaint: remove obsolete utime module
Jim Meyering [Fri, 10 Apr 2009 06:42:10 +0000 (08:42 +0200)]
maint: remove obsolete utime module

* bootstrap.conf (obsolete_gnulib_modules): Remove utime.

15 years agomaint: put each module name on its own line; sort
Jim Meyering [Fri, 10 Apr 2009 06:20:13 +0000 (08:20 +0200)]
maint: put each module name on its own line; sort

* bootstrap.conf (gnulib_modules): List them one per line.

15 years agotests: misc/ls-misc: avoid shadowing local decl of $e
Jim Meyering [Thu, 9 Apr 2009 13:29:59 +0000 (15:29 +0200)]
tests: misc/ls-misc: avoid shadowing local decl of $e

* tests/misc/ls-misc (make_j_d): Rename latter $e to $env

15 years agoid: fix infinite loop on some systems
Pádraig Brady [Wed, 8 Apr 2009 09:43:15 +0000 (10:43 +0100)]
id: fix infinite loop on some systems

Steven Parkes reported that `id -G $USER` went into an infinite loop
on Darwin systems for users in more than 10 groups:
http://bugs.gentoo.org/show_bug.cgi?id=264007
* gl/lib/mgetgroups.c (mgetgroups): Work around buggy getgrouplist
implementations that don't update the required size correctly,
by doubling the result buffer and retrying. Also return the
parameter updated by getgrouplist rather than its return value,
as the documentation doesn't actually state the number of groups
stored is returned by getgrouplist.
* tests/misc/id-groups: Add test to exercise this logic
* tests/Makefile.am: Reference new test
* NEWS: Mention the fix
* THANKS: Update