]> git.ipfire.org Git - thirdparty/coreutils.git/log
thirdparty/coreutils.git
11 years agols: don't output colors with unknown TERM env variable
Guilherme de Almeida Suckevicz [Wed, 16 Apr 2014 15:38:49 +0000 (16:38 +0100)] 
ls: don't output colors with unknown TERM env variable

--colors controls whether to output colors depending on
whether we're connected to a terminal or not, while this
change gives control over which terminals we output colors to.

* NEWS: Mention the change in behavior.
* src/ls.c (known_term_type): A new function to search the static
list from dircolors.h
(parse_ls_colors): Honor the TERM when both LS_COLORS and COLORTERM
are non empty.
* tests/ls/color-term.sh: A new test.
* tests/local.mk: Reference the new test.
Fixes http://bugs.gnu.org/15992

11 years agodoc: improve remove prompt translator comment
Benno Schulenberg [Wed, 16 Apr 2014 19:26:54 +0000 (21:26 +0200)] 
doc: improve remove prompt translator comment

* src/remove.c (prompt): Explain where the difficulty with translating
these two strings resides, and suggest an alternative: the one that
Paul Eggert first proposed back in 2002, which seems fully resistant.

11 years agomaint: df: avoid sizeof(char**) static analysis warning
Bernhard Voelker [Wed, 16 Apr 2014 08:43:09 +0000 (10:43 +0200)] 
maint: df: avoid sizeof(char**) static analysis warning

* src/df.c (alloc_table_row): Use the size of char** to enlarge
the table.  Spotted by Coverity.

11 years agotests: fix false dd conv=sparse failure on newer XFS
Pádraig Brady [Fri, 11 Apr 2014 22:44:13 +0000 (23:44 +0100)] 
tests: fix false dd conv=sparse failure on newer XFS

* tests/dd/sparse.sh: When testing that a hole is created,
use an existing sparse destination file, so that we're
not write extending the file size, and thus avoiding
speculative preallocation which can result in smaller
holes than requested.
Workaround suggested by Brian Foster

11 years agomaint: avoid static analysis warnings in ln.c
Pádraig Brady [Thu, 10 Apr 2014 16:09:57 +0000 (17:09 +0100)] 
maint: avoid static analysis warnings in ln.c

* src/ln.c (do_link): It's not obvious that record_file() is a noop
in the symlink case (in that case dest_set is NULL and so ignored).
So to make it obvious, and to avoid false positives seen in coverity,
add the explicit condition here.

11 years agomaint: document timeout --preserve-status in v8.21 NEWS
Pádraig Brady [Wed, 9 Apr 2014 21:04:21 +0000 (22:04 +0100)] 
maint: document timeout --preserve-status in v8.21 NEWS

* NEWS: Add the omitted new feature.
* cfk.mk (old_NEWS_hash): Adjust accordingly.

11 years agodoc: clarify in --help that -Z doesn't take an argument
Pádraig Brady [Wed, 9 Apr 2014 12:37:42 +0000 (13:37 +0100)] 
doc: clarify in --help that -Z doesn't take an argument

* NEWS: Fix a confusing old entry.
* cfg.mk (old_NEWS_hash): Adjust accordingly.
* src/cp.c (usage): Separate the -Z and --context descriptions.
* src/install.c: Likewise.
* src/mkdir.c: Likewise.
* src/mkfifo.c: Likewise.
* src/mknod.c: Likewise.
Fixes http://bugs.gnu.org/17220

11 years agomaint: various cleanups
Pádraig Brady [Fri, 7 Mar 2014 23:56:20 +0000 (23:56 +0000)] 
maint: various cleanups

* tests/misc/numfmt.pl: Fix comment misspelling.
* src/cut.c: Likewise.
* src/tsort.c (detect_loop): Replace an fprintf() with error().

11 years agoshred: overwrite inode storage used by some file systems
Pádraig Brady [Fri, 4 Apr 2014 12:35:56 +0000 (13:35 +0100)] 
shred: overwrite inode storage used by some file systems

* doc/coreutils.texi (shred invocation): Mention some reasons
why clearing slack space might be useful.
* src/shred.c (do_wipefd): Add initial writes for each pass
for small regular files in case the storage for those is
in the inode, and thus a larger write up to a block size would
bypass that.  Move the direct I/O control to...
(dopass): ... here so we can avoid enabling it for these small
initial writes.  It's better to retry direct I/O for each pass
anyway to handle the case where direct I/O is disabled for only
the last portion of a file when the size is not a multiple of
the block size.  Note we don't avoid the sync for the initial
write as it will be small but more importantly could be on a
different part of the disk and so worth doing independently
to ensure the write is not discarded.
* tests/misc/shred-exact.sh: Check some more direct I/O cases.
* NEWS: Mention the improvements.
The inode storage issue was mentioned by Paul Eggert.

11 years agoshred: avoid a data pass on empty files
Pádraig Brady [Thu, 3 Apr 2014 12:47:48 +0000 (13:47 +0100)] 
shred: avoid a data pass on empty files

* src/shred.c (do_wipefd): Don't increase the size written
for an empty file up to a full block.  Also increase the size
to OFF_T_MAX in the edge case where we do overflow.
* NEWS: Mention the shred improvements from recent changes.
* tests/misc/shred-passes.sh: Adjust as we no longer
write a BLKSIZE of data for empty files.

11 years agocp: don't reserve a device number
Paul Eggert [Thu, 3 Apr 2014 16:48:22 +0000 (09:48 -0700)] 
cp: don't reserve a device number

* src/copy.c (copy_internal): Replace dev_t arg DEVICE with struct
stat pointer arg PARENT.  All callers changed.  This removes an
unwarranted assumption that dev_t values of 0 cannot occur in file
systems.  See: http://bugs.gnu.org/17179

11 years agoshred: shred one block even for empty files
Paul Eggert [Thu, 3 Apr 2014 16:42:53 +0000 (09:42 -0700)] 
shred: shred one block even for empty files

* src/shred.c (do_wipefd): Shred one block of empty regular files.
This reverts an unintended part of the previous change.

11 years agoshred: port to GNU/Linux behavior with tape drives
Paul Eggert [Thu, 3 Apr 2014 06:28:20 +0000 (23:28 -0700)] 
shred: port to GNU/Linux behavior with tape drives

See: http://bugs.gnu.org/17149
* src/shred.c [__linux__]: Include <sys/mtio.h>.
(dorewind): New function, which works around the lseek problem with
tape drives on GNU/Linux, the same way that dd does.
(dopass): Use it.  New arg ST, needed for dorewind.  All uses changed.
(do_wipefd): Don't rely on undefined behavior on integer overflow
of file sizes.  Use INT_ADD_OVERFLOW instead.

11 years agohead: port to Darwin and use simpler seeks
Paul Eggert [Mon, 31 Mar 2014 19:16:44 +0000 (12:16 -0700)] 
head: port to Darwin and use simpler seeks

This removes an unportable assumption that if lseek succeeds, the
file is capable of seeking.  See: http://bugs.gnu.org/17145
* src/head.c (elseek): New function, for consistency in reporting
lseek failures.
(elide_tail_bytes_file, elide_tail_lines_seekable)
(elide_tail_lines_file, head_lines, head): Use it.
(elide_tail_bytes_file, elide_tail_lines_file):
New args CURRENT_POS and SIZE.  All uses changed.  Don't bother
invoking lseek, since we know the file's pos and size now.
(elide_tail_bytes_file): Change a local from uintmax_t to off_t,
since it fits.
(head): Use lseek only on regular files, since its behavior on
unseekable devices is implementation-defined.
* NEWS: Document this.

11 years agohead: fix bug with head -c-N when stdin is not at start
Paul Eggert [Mon, 31 Mar 2014 17:21:58 +0000 (10:21 -0700)] 
head: fix bug with head -c-N when stdin is not at start

* src/head.c (elide_tail_bytes_file): Fix typo in lseek invocation.
* tests/misc/head-c.sh: Add test for this bug.
* NEWS: Document this.

11 years agomv: fix issues with previous prompt adjustments
Pádraig Brady [Wed, 26 Mar 2014 13:36:16 +0000 (13:36 +0000)] 
mv: fix issues with previous prompt adjustments

* src/copy.c (overwrite_ok): Fix the gettext calls so
that the second string is tagged for translation.
Display the correct "replace ..." prompt when in move_mode.
* tests/mv/i-3.sh: Display the output on failure to ease debugging.

11 years agoptx: avoid --format long option falling through into --help
Bernhard Voelker [Wed, 26 Mar 2014 08:02:42 +0000 (09:02 +0100)] 
ptx: avoid --format long option falling through into --help

* src/ptx.c (main): Add a 'break' after the --format handling case.
Otherwise it would fall through into the usage case.
* tests/misc/ptx.pl: Add test cases for --format=tex and --format=roff.
* NEWS (Bug fixes): Mention the fix.
Bug introduced in 1999-04-04 commit, SH-UTILS-1_16f-269-gd815c15.
Spotted by coverity (MISSING_BREAK).

11 years agobasename: mention that the -s option implies -a in usage
Bernhard Voelker [Tue, 25 Mar 2014 22:41:45 +0000 (23:41 +0100)] 
basename: mention that the -s option implies -a in usage

* src/basename.c (usage): Mention that -s implies -a.
(main): Add "fall through" comment to case 's'.

Spotted by coverity: MISSING_BREAK.

11 years agocp: simplify overwrite logic
Paul Eggert [Tue, 25 Mar 2014 06:17:02 +0000 (23:17 -0700)] 
cp: simplify overwrite logic

* src/copy.c (overwrite_ok): Rename from overwrite_prompt.  Invoke
yesno instead of having the caller do it; that's cleaner.  Return
bool, not void.  All callers changed.

11 years agocp: improve quality of overwrite prompt
Paul Eggert [Tue, 25 Mar 2014 06:14:43 +0000 (23:14 -0700)] 
cp: improve quality of overwrite prompt

* src/copy.c (overwrite_prompt): New arg X.  All callers changed.
Use X to improve the quality of the prompt (Bug#17087).
* tests/mv/i-2.sh, tests/mv/i-3.sh: Change test to match new prompt.

11 years agosplit: avoid unnecessary input buffering
Pádraig Brady [Thu, 20 Mar 2014 10:00:13 +0000 (10:00 +0000)] 
split: avoid unnecessary input buffering

Input buffering is best avoided because it introduces
delayed processing of output for intermittent input,
especially when the output size is less than that of
the input buffer.  This is significant when output
is being further processed which could happen if split
is writing to precreated fifos, or through --filter.

If input is arriving quickly from a pipe then this will
already be buffered before we read it, so fast arriving
input shouldn't be a performance issue.

* src/split.c (lines_split, lines_bytes_split, bytes_split,
lines_chunk_split, bytes_chunk_extract): s/full_read/safe_read/.
* THANKS.in: Mention the reporter.
* NEWS: Mention the improvement.

11 years agodoc: clarify the operation of uniq -uD
Pádraig Brady [Wed, 19 Mar 2014 17:01:28 +0000 (17:01 +0000)] 
doc: clarify the operation of uniq -uD

The description of -u was inaccurate when combined with -D:

  $ printf '%s\n' '1 a' '2 a' | uniq -uD -f1
  1 a

* doc/coreutils.texi (uniq invocation): Clarify that it's
the last repeated line that is suppressed from the output.

Fixes http://bugs.gnu.org/17022

11 years agodoc: avoid regex ambiguity in chmod mode description
Edward Welbourne [Wed, 19 Mar 2014 16:19:08 +0000 (16:19 +0000)] 
doc: avoid regex ambiguity in chmod mode description

* man/chmod.x: s/[+-=]/[-+=]/
* doc/perm.texi (Symbolic Modes): Likewise.
* THANKS.in: Remove patch owner.
Fixes http://bugs.gnu.org/17041

11 years agochroot: always diagnose failure to set supplemental groups
Pádraig Brady [Thu, 13 Mar 2014 01:32:46 +0000 (01:32 +0000)] 
chroot: always diagnose failure to set supplemental groups

* src/chroot.c (setgroups): Change this replacement to
fail when called so that platforms like Interix without support for
supplemental groups don't silently ignore a --groups option.

11 years agochmod: fix erroneous warnings with -R --changes
Dylan Simon [Tue, 18 Mar 2014 15:50:29 +0000 (11:50 -0400)] 
chmod: fix erroneous warnings with -R --changes

For files with "special" bits set, we would stat the relative
file name in the wrong directory, giving an erroneous ENOENT diagnostic.
This issue was introduced with commit v5.92-653-gc1994c1
which changed fts to not change directory on traversal.

* src/chmod.c (mode_changed): Use fts->fts_cwd_fd with fstatat rather
than stat.  All callers changed.
* tests/chmod/c-option.sh: Add a test case.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/17035

11 years agomaint: fix typo in comment in fadvise.c
Bernhard Voelker [Tue, 18 Mar 2014 22:48:14 +0000 (23:48 +0100)] 
maint: fix typo in comment in fadvise.c

* gl/lib/fadvise.c: s/the the/the/, indroduced in commit
v8.22-40-g4f21182.  Promted by sc_prohibit_doubled_word.
While at it, also s/be candidate/be a candidate/.

11 years agostat: port birthtime to Solaris 11
Paul Eggert [Tue, 18 Mar 2014 23:12:26 +0000 (16:12 -0700)] 
stat: port birthtime to Solaris 11

Problem reported by Rich Burridge.
* src/stat.c [HAVE_GETATTRAT]: Include <attr.h>, <sys/nvpair.h>.
(print_statfs, print_stat, print_it):
Pass fd, too, for the benefit of get_birthtime.
All uses changed.
(get_birthtime): New function, for porting to Solaris 11.
(print_stat): Use it.

* configure.ac (getattrat, LIB_NVPAIR): New checks.
* src/local.mk (src_stat_LDADD): Add $(LIB_NVPAIR).

11 years agoln: with -sr, don't segfault for a TARGET of ''
Jim Meyering [Fri, 14 Mar 2014 00:05:04 +0000 (17:05 -0700)] 
ln: with -sr, don't segfault for a TARGET of ''

Prior to this change, "ln -sr '' F" would segfault, attempting
to read path2[1] in relpath.c's path_common_prefix function.
This problem arises whenever canonicalize_filename_mode returns
NULL.
* src/ln.c (convert_abs_rel): Call relpath only when
both canonicalize_filename_mode calls return non-NULL.
* tests/ln/relative.sh: Add a test to trigger this failure.
* THANKS.in: List reporter's name/address.
* NEWS (Bug fixes): Mention it.
Reported by Erik Bernstein in 739752@bugs.debian.org.
Fixes http://bugs.gnu.org/17010.

11 years agomaint: avoid "attribute-const"-suggesting warning from gcc
Jim Meyering [Mon, 18 Nov 2013 18:13:06 +0000 (10:13 -0800)] 
maint: avoid "attribute-const"-suggesting warning from gcc

* gl/lib/fadvise.c: Use a pragma to turn off this warning option:
-Wsuggest-attribute=const.  Without this change, building with
--enable-gcc-warnings would evoke this error:

    lib/fadvise.c:25:1: error: function might be candidate for\
    attribute 'const' [-Werror=suggest-attribute=const]

11 years agoscripts: autotools-install: update
Jim Meyering [Mon, 5 Aug 2013 14:28:34 +0000 (07:28 -0700)] 
scripts: autotools-install: update

* scripts/autotools-install: Update version numbers of latest
automake and gettext packages.

11 years agochroot: improve --userspec and --groups look-up
Pádraig Brady [Mon, 3 Mar 2014 01:54:36 +0000 (01:54 +0000)] 
chroot: improve --userspec and --groups look-up

- Support arbitrary numbers in --groups, consistent with
  what is already done for --userspec
- Avoid look-ups entirely for --groups items with a leading '+'
- Support names that are actually numbers in --groups
- Ignore an empty --groups="" option for consistency with --userspec
- Look up both inside and outside the chroot with inside taking
  precedence.  The look-up outside may load required libraries
  to complete the look-up inside the chroot.  This can happen for
  example with a 32 bit chroot on a 64 bit system, where the
  32 bit NSS plugins within the chroot fail to load.

* src/chroot.c (parse_additional_groups): A new function refactored
from set_addition_groups(), to just do the parsing.  The actual
setgroups() call is separated out for calling from the chroot later.
(main): Call parse_user_spec() and parse_additional_groups()
both outside and inside the chroot for the reasons outlined above.
* tests/misc/chroot-credentials.sh: Ensure arbitrary numeric IDs
can be specified without causing look-up errors.
* NEWS: Mention the improvements.
* THANKS.in: Add Norihiro Kamae who initially reported the issue
with a proposed patch.
Also thanks to Dmitry V. Levin for his diagnosis and sample patch.

11 years agodoc: fix typo in texinfo docs
Aleksej Serdjukov [Sun, 9 Mar 2014 17:49:55 +0000 (17:49 +0000)] 
doc: fix typo in texinfo docs

* doc/coreutils.texi (Operating on characters): s/This/These/.
Fixes http://bug.gnu.org/16973

11 years agodoc: fix readpath typo in texinfo contents
Pádraig Brady [Fri, 7 Mar 2014 17:02:48 +0000 (17:02 +0000)] 
doc: fix readpath typo in texinfo contents

* docs/coreutils.texi: s/readpath/realpath/
Fixes http://bugs.gnu.org/16964

11 years agotests: avoid the :> construct which can hide errors
Pádraig Brady [Wed, 5 Mar 2014 18:41:16 +0000 (18:41 +0000)] 
tests: avoid the :> construct which can hide errors

On most shells `:>file || framework_failure_` will not evaluate
the framework_failure_ even if there was an error writing the file.
shells which do evaluate the failure are ksh 93u+ and bash 4.2,
while shells wich don't include bash 4.3, solaris, freebsd, dash.

Furthermore this construct is problematic on Solaris 10 sh,
which will try to optimize away a `:' command in a loop
after the first iteration, even if it is redirected.

* tests/cp/link-deref.sh: Remove the leading colon on redirections.
* tests/cp/reflink-perm.sh: Likewise.
* tests/id/zero.sh: Likewise.
* tests/install/install-C.sh: Likewise.
* tests/misc/env.sh: Likewise.
* tests/misc/md5sum-bsd.sh: Likewise.
* tests/misc/runcon-no-reorder.sh: Likewise.
* tests/mv/partition-perm.sh: Likewise.
* tests/rm/r-root.sh: Likewise.
* tests/split/l-chunk.sh: Likewise.
* tests/split/line-bytes.sh: Likewise.
* tests/tail-2/inotify-rotate.sh: Likewise.
* tests/tail-2/retry.sh: Likewise.
* tests/tail-2/symlink.sh: Likewise.
* tests/tail-2/wait.sh: Likewise.
* tests/touch/read-only.sh: Likewise.
+ cfg.mk (sc_prohibit_colon_redirection): A new syntax check
to avoid further instances of this creeping in.

11 years agotests: fix false failure in nohup.sh in non tty builds
Pádraig Brady [Wed, 5 Mar 2014 15:14:07 +0000 (15:14 +0000)] 
tests: fix false failure in nohup.sh in non tty builds

* tests/misc/nohup.sh: When running tests without a controlling tty,
an exec failure is triggered in a subshell, which causes POSIX
shells to immediately exit the subshell.  This was brought
to notice by the newly conforming bash 4.3.
Fixes http:/bugs.gnu.org/16940

11 years agodoc: improve df --human and --si, help and man page
Pádraig Brady [Mon, 3 Mar 2014 02:49:25 +0000 (02:49 +0000)] 
doc: improve df --human and --si, help and man page

* src/df.c (usage): Adjust the --human and --si descriptions
to not depend on each other.  Also include an example that is
illustrative of the rounding, suffix, width, and localized fractions.
* src/system.h (emit_size_note). Adjust so that it's obvious the
description is pertaining to the input SIZE argument, and not
to any sizes that might be output by df for example.
Fixes http://bugs.gnu.org/16922

11 years agodate: fix crash or infinite loop when parsing a malformed TZ=""
Pádraig Brady [Thu, 27 Feb 2014 23:43:34 +0000 (23:43 +0000)] 
date: fix crash or infinite loop when parsing a malformed TZ=""

* NEWS: Mention the fix.
* gnulib: Update to incorporate the fix.
This is the only change in this gnulib update.
* tests/misc/date.pl: Add a test for this case.

Fixes http://bugs.gnu.org/16872

11 years agocp: copy files by inode only if that facility is available
Paul Eggert [Thu, 27 Feb 2014 08:07:14 +0000 (00:07 -0800)] 
cp: copy files by inode only if that facility is available

* src/copy.c (copy_dir): Use the new SAVEDIR_SORT_FASTREAD, not
SAVEDIR_SORT_INODE.  Problem reported by Bernhard Voelker in:
http://lists.gnu.org/archive/html/coreutils/2014-02/msg00037.html

11 years agobuild: update gnulib submodule to latest
Paul Eggert [Thu, 27 Feb 2014 08:05:44 +0000 (00:05 -0800)] 
build: update gnulib submodule to latest

11 years agocp: copy files by inode
Paul Eggert [Wed, 26 Feb 2014 19:30:53 +0000 (11:30 -0800)] 
cp: copy files by inode

Problem reported by Bernhard Voelker in:
http://lists.gnu.org/archive/html/coreutils/2014-02/msg00034.html
* src/copy.c (copy_dir): Adjust to recent gnulib change.

11 years agobuild: update gnulib submodule to latest
Paul Eggert [Wed, 26 Feb 2014 19:22:16 +0000 (11:22 -0800)] 
build: update gnulib submodule to latest

11 years agoshuf: convert error diagnostic to lowercase
Bernhard Voelker [Wed, 26 Feb 2014 07:36:50 +0000 (08:36 +0100)] 
shuf: convert error diagnostic to lowercase

* src/shuf.c (main): s/No/no/, introduced by commit v8.22-25-g9f60f37.
* NEWS: Also adjust the NEWS for that recent commit to make it
clear this was new bug rather than a regression.

Prompted by the syntax-check rule sc_error_message_uppercase

11 years agodoc: add dd example for failing disks
Bernhard Voelker [Wed, 26 Feb 2014 06:55:04 +0000 (07:55 +0100)] 
doc: add dd example for failing disks

* doc/coreutils.texi (dd invocation): Add an example for how to call
dd to save data from a failing disk.  Mention GNU 'ddrescue' as one
of the more specialized tools in such a case.

11 years agoshuf: with -r, don't dump core if the input is empty
Paul Eggert [Sun, 23 Feb 2014 23:34:48 +0000 (15:34 -0800)] 
shuf: with -r, don't dump core if the input is empty

Problem reported by valiant xiao in <http://bugs.gnu.org/16855>.
* NEWS: Document this.
* src/shuf.c (main): With -r, report an error if the input is empty.
* tests/misc/shuf.sh: Test for the bug.

11 years agodoc: fix problems with @w and @kbd (Bug#16802)
Paul Eggert [Fri, 21 Feb 2014 02:24:03 +0000 (18:24 -0800)] 
doc: fix problems with @w and @kbd (Bug#16802)

* doc/coreutils.texi: Prefer '@allowcodebreaks false' to '@w'.
Also, don't use @kbd except for keyboard input.

11 years agocp: with --link always use linkat() if available
Pádraig Brady [Thu, 12 Dec 2013 18:31:48 +0000 (18:31 +0000)] 
cp: with --link always use linkat() if available

* src/copy.c (copy_reg): If linkat() is available it doesn't
matter about the gnulib emulation provided, and thus the
LINK_FOLLOWS_SYMLINKS should not have significance here.
This was noticed on FreeBSD and the consequence is that
cp --link will create hardlinks to symlinks there, rather
than emulating with symlinks to symlinks.
* tests/cp/link-deref.sh: Adjust the checks to cater
for all cases where hardlinks to symlinks are supported.

11 years agohead,tail: consistently diagnose write errors
Pádraig Brady [Wed, 29 Jan 2014 04:42:56 +0000 (04:42 +0000)] 
head,tail: consistently diagnose write errors

If we can't output more data, we should immediately
diagnose the issue and exit rather than consuming all
of input (in some cases).

* src/tail.c (xwrite_stdout): Also diagnose the case where
only some data is written.  Also clearerr() to avoid the
redundant less specific error from atexit (close_stdout);
* src/head.c (xwrite_stdout): Copy this new function from tail,
and use it to write all output.
* tests/misc/head-write-error.sh: A new test to ensure we
exit immediately on write error.
* tests/local.mk: Reference the new test.

11 years agohead: fix --lines=-0 outputting nothing if no newline at EOF
Алексей Шилин [Wed, 29 Jan 2014 01:23:46 +0000 (01:23 +0000)] 
head: fix --lines=-0 outputting nothing if no newline at EOF

* src/head.c (elide_tail_lines_pipe): Just output all input in
this case to avoid the issue and also avoid redundant '\n' processing.
(elide_tail_lines_seekable): Likewise.
* tests/misc/head-elide-tail.pl: Add tests for no '\n' at EOF.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/16329

11 years agodircolors: add a new entry to colorize 'm4a' files
John [Sun, 9 Feb 2014 20:02:35 +0000 (20:02 +0000)] 
dircolors: add a new entry to colorize 'm4a' files

* src/dircolors.hin: Add entry for mpeg4 audio files.
Fixes http://bugs.gnu.org/16700

11 years agood: add an --endian option to control byte swapping
Niels Möller [Fri, 31 Jan 2014 16:39:52 +0000 (17:39 +0100)] 
od: add an --endian option to control byte swapping

* src/od.c (main): Handle the new --endian option,
taking "little" and "big" as parameters.
(usage): Describe the new option.
(PRINT_FIELDS): Adjust to swap bytes if required.
* tests/misc/od-endian.sh: A new test to verify
the byte swapping operations for hex (ints) and floats
for all sizes between 1 and 16 inclusive.
* test/local.mk: Reference the new test.
* doc/coreutils.texi (od invocation): Describe the new option.
* NEWS: Mention the new feature.

11 years agostat,tail: improve support for HFS+ and HFSX
Pádraig Brady [Wed, 29 Jan 2014 01:17:53 +0000 (01:17 +0000)] 
stat,tail: improve support for HFS+ and HFSX

* src/stat.c (human_fstype): Add new file system ID definitions.
* NEWS: Mention the improvement.
Fixes http://bugs.gnu.org/16336

11 years agotests: skip chown/separator with conflicting group IDs
Assaf Gordon [Fri, 24 Jan 2014 01:34:52 +0000 (20:34 -0500)] 
tests: skip chown/separator with conflicting group IDs

* tests/chown/separator.sh: skip test if the user's group has
multiple entries.
Fixes http://bugs.gnu.org/16532

11 years agobuild: suppress an erroneous warning --with-selinux=no
Pádraig Brady [Tue, 21 Jan 2014 10:13:32 +0000 (10:13 +0000)] 
build: suppress an erroneous warning --with-selinux=no

* m4/jm-macros.m4: Don't check the SELinux cached variables
--without-selinux.
Reported-by: Bernhard Voelker
11 years agobuild: remove no longer used spawn-pipe files from POTFILES.in
Pádraig Brady [Fri, 17 Jan 2014 17:30:33 +0000 (17:30 +0000)] 
build: remove no longer used spawn-pipe files from POTFILES.in

This should have been part of the previous commit v8.22-14-gf18999b

* po/POTFILES.in: Remove gnulib files no longer used.
Prompted by the continuous integration build failure at:
http://hydra.nixos.org/build/8288209/

11 years agobuild: avoid unneeded spawn-pipe gnulib module
Pádraig Brady [Tue, 14 Jan 2014 18:23:44 +0000 (18:23 +0000)] 
build: avoid unneeded spawn-pipe gnulib module

* bootstrap.conf: Reference the used pipe-posix module
rather than the uneeded and larger spawn-pipe module,
which the pipe module is the deprecated equivalent of.

11 years agodoc: clarify SMACK related --help and documentation
Chengwei Yang [Fri, 17 Jan 2014 15:46:43 +0000 (15:46 +0000)] 
doc: clarify SMACK related --help and documentation

* src/ls.c: Remove all mention of SELinux since ls
should treat all security context labels equally.
* doc/coreutils.texi (ls invocation): Likewise.
(id invocation): Clarify that -Z outputs the context
inherited by the process, rather than one specific to a user.
Note for SMACK this can be set instead by the SMACK64EXEC label,
in the unusual case where this is set on the id executable.
* src/id.c (usage): Likewise.
* src/mkdir.c (usage): Clarify that -Z is specific to SELinux,
while --context=CTX is also supported for SMACK.
* src/mkfifo.c (usage): Likewise.
* src/mknod.c (usage): Likewise.

11 years agoln: fix replacing symbolic links whose targets can't exist
Pádraig Brady [Fri, 17 Jan 2014 03:54:29 +0000 (03:54 +0000)] 
ln: fix replacing symbolic links whose targets can't exist

* src/ln.c (errno_nonexisting): A new function to determine if
the errno implies that a file doesn't or can't (currently) exist.
(target_directory_operand): Use the new function to expand the
set of errors we handle.
* tests/ln/sf-1.sh: Add test cases for the newly handled errors.
* THANKS.in: Mention the reporter.
* NEWS: Mention the bug fix.

11 years agotests: restrict a recent SELinux test to SELinux systems
Pádraig Brady [Tue, 14 Jan 2014 11:30:51 +0000 (11:30 +0000)] 
tests: restrict a recent SELinux test to SELinux systems

* tests/cp/no-ctx.sh: Since the test diagnoses whether the
intercepted lgetfilecon() calls are actually called or not,
restrict the test to systems where that occurs.
The test cases are minimal on non SELinux systems and should
be well covered by other tests.
Reported-by: Bernhard Voelker
11 years agocopy: fix a segfault in SELinux context copying code
Nicolas Iooss [Sat, 4 Jan 2014 03:03:51 +0000 (03:03 +0000)] 
copy: fix a segfault in SELinux context copying code

* src/selinux.c (restorecon_private): On ArchLinux the
`fakeroot cp -a file1 file2` command segfaulted due
to getfscreatecon() returning a NULL context.
So map this to the sometimes ignored ENODATA error,
rather than crashing.
* tests/cp/no-ctx.sh: Add a new test case.
* tests/local.mk: Reference the new test.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/16335

11 years agomaint: tests: refactor gcc commands for building shared lib
Pádraig Brady [Mon, 13 Jan 2014 19:39:52 +0000 (19:39 +0000)] 
maint: tests: refactor gcc commands for building shared lib

* init.cfg (gcc_shared_): A new function refactored from tests.
(require_gcc_shared_): Adjust to call gcc_shared_() to build the
test library, and remove that library before the function returns.
* tests/cp/nfs-removal-race.sh: Call the new gcc_shared_().
* tests/df/no-mtab-status.sh: Likewise.
* tests/df/skip-duplicates.sh: Likewise.
* tests/ls/getxattr-speedup.sh: Likewise.
* tests/rm/r-root.sh: Likewise.

11 years agocopy: fix SELinux context preservation for existing directories
Pádraig Brady [Thu, 2 Jan 2014 16:40:58 +0000 (16:40 +0000)] 
copy: fix SELinux context preservation for existing directories

* src/copy.c (copy_internal): Use the global process context
to set the context of existing directories before they're populated.
This is more consistent with the new directory case, and fixes
a bug for existing directories where we erroneously set the
context to the last copied descendent, rather than to that of
the source directory itself.
* tests/cp/cp-a-selinux.sh: Add a test for this case.
* NEWS: Mention the fix.
* THANKS.in: Add reporter Michal Trunecka.

11 years agotests: improve test for a working setfacl
Bernhard Voelker [Fri, 10 Jan 2014 15:48:25 +0000 (16:48 +0100)] 
tests: improve test for a working setfacl

Prompted by a test framework failure of tests/mkdir/p-acl.sh on armv7l:
The previous test for a working setfacl was not sufficient in some
circumstances.

* init.cfg (require_setfacl_): Call setfacl twice with conflictive
ACL specs, and use ACL specs which can't be mapped into regular file
permission bits.  Document the reasons.

11 years agotests: avoid FP failure when cp fails for /proc/cpuinfo
Bernhard Voelker [Thu, 9 Jan 2014 01:14:17 +0000 (02:14 +0100)] 
tests: avoid FP failure when cp fails for /proc/cpuinfo

On emulated aarch64 systems like in the qemu-based OpenBuildService
of openSUSE, cp fails to copy /proc/cpuinfo because the inode number
changes between the initial stat() call and copying the file:

  $ cp /proc/cpuinfo exp
  cp: skipping file '/proc/cpuinfo', as it was \
  replaced while being copied

* tests/cp/proc-zero-len.sh: When cp fails, check on the above
error message to skip the test.

11 years agomaint: fix copyright holder and year in selinux sources
Bernhard Voelker [Thu, 2 Jan 2014 18:20:50 +0000 (19:20 +0100)] 
maint: fix copyright holder and year in selinux sources

* src/selinux.c: As the copyright is assigned to the FSF for all
of coreutils, replace the copyright holder from "Red Hat, Inc."
to "Free Software Foundation, Inc.".  Prompted by a warning of
'make update-copyright'.  Also update the copyright year.

11 years agomaint: update all copyright year number ranges
Bernhard Voelker [Thu, 2 Jan 2014 19:52:55 +0000 (20:52 +0100)] 
maint: update all copyright year number ranges

Run "make update-copyright", but then also run this,
  perl -pi -e 's/2\d\d\d-//' tests/sample-test
to make that one script use the single most recent year number.

11 years agomaint: prevent update-copyright from updating files from gnulib
Bernhard Voelker [Thu, 2 Jan 2014 21:17:03 +0000 (22:17 +0100)] 
maint: prevent update-copyright from updating files from gnulib

The files 'bootstrap' and 'tests/init.sh' are taken from the
gnulib submodule.  Therefore, 'make update-copyright' there should
already have updated the copyright year in these 2 files.

* .x-update-copyright: Add entries for the above mentioned files.

11 years agobuild: update gnulib submodule, bootstrap and tests/init.sh to latest
Bernhard Voelker [Thu, 2 Jan 2014 19:31:07 +0000 (20:31 +0100)] 
build: update gnulib submodule, bootstrap and tests/init.sh to latest

* gnulib: Update to latest.
* bootstrap: Update from gnulib.
* tests/init.sh: Likewise.

11 years agomaint: post-release administrivia
Pádraig Brady [Fri, 13 Dec 2013 15:20:31 +0000 (15:20 +0000)] 
maint: post-release administrivia

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

11 years agoversion 8.22 v8.22
Pádraig Brady [Fri, 13 Dec 2013 15:03:45 +0000 (15:03 +0000)] 
version 8.22

* NEWS: Record release date.

11 years agostat,tail: improve support for hostfs and smackfs
Pádraig Brady [Fri, 13 Dec 2013 14:05:53 +0000 (14:05 +0000)] 
stat,tail: improve support for hostfs and smackfs

hostfs is provided by the Linux UML subsystem.
smackfs is provided by the Linux Smack security module.

* src/stat.c (human_fstype): Add new file system ID definitions.
* NEWS: Mention the improvement, and adjust for the fact that
SNFS is a remote file system.

11 years agotests: avoid unlikely deadlock in dd/no-allocate on some shells
Pádraig Brady [Wed, 11 Dec 2013 04:36:08 +0000 (04:36 +0000)] 
tests: avoid unlikely deadlock in dd/no-allocate on some shells

* test/dd/no-allocate.sh: Use 'wait' to ensure we don't have
multiple writers to the fifo, which was seen to trigger
a very hard to reproduce deadlock with make -j20 on solaris.
Also avoid writing to the fifo with the shell; instead using dd.
(check_dd_seek_alloc): A new function refactored from the various
cases, which are now constructed from function parameters.

11 years agotests: restrict cp --link inode comparisons to compatible systems
Pádraig Brady [Thu, 12 Dec 2013 22:43:05 +0000 (22:43 +0000)] 
tests: restrict cp --link inode comparisons to compatible systems

* tests/cp/link-deref.sh: On systems were cp can't determine if
gnulib linkat() emulation might create a symlink instead of a hardlink
to a symlink, copy.c will create a symlink to the symlink so that
it has more control over its metadata.  Also even if the system
supports this operation, the particular file system under test may not.
So avoid the hardlinked symlink verification in these cases.
This fixes a false failure on aix, solaris and freebsd.

11 years agobuild: default to avoiding openssl system libraries
Pádraig Brady [Thu, 12 Dec 2013 15:22:10 +0000 (15:22 +0000)] 
build: default to avoiding openssl system libraries

* configure.ac: Don't change the gnulib default of 'no' for
whether to link with openssl system libraries if available.
Distributions can explicitly enable this as their policy allows.
* NEWS: Adjust accordingly.

11 years agodoc: fix typo in numfmt invocation
Tiger Lee [Thu, 12 Dec 2013 16:58:37 +0000 (16:58 +0000)] 
doc: fix typo in numfmt invocation

* doc/coreutils.texi (numfmt invocation): s/nun/num/.
Fixes http://bugs.gnu.org/16122

11 years agotests: df/total-unprocessed: fix false failure with lofs
Pádraig Brady [Tue, 10 Dec 2013 16:29:11 +0000 (16:29 +0000)] 
tests: df/total-unprocessed: fix false failure with lofs

* tests/df/total-unprocessed.sh: Skip the test when we can't
determine the file system type as the exclusion filter is not
applied in that case.  "lofs" being ignored is effectively
an unknown file system type.

11 years agotests: avoid warnings due to new filefrag -v format
Pádraig Brady [Wed, 11 Dec 2013 04:42:59 +0000 (04:42 +0000)] 
tests: avoid warnings due to new filefrag -v format

* tests/cp/sparse-fiemap.sh: Newer versions of filefrag output
more fields, in different orders, so handle that to avoid warnings.

11 years agobuild: update gnulib to fix a tests build failure
Pádraig Brady [Mon, 9 Dec 2013 14:28:03 +0000 (14:28 +0000)] 
build: update gnulib to fix a tests build failure

* gnulib: Update to incorporate a fix for building tests
with -Werror=old-style-declaration

11 years agotests: fix false failure due to xargs usage
Pádraig Brady [Mon, 9 Dec 2013 13:34:03 +0000 (13:34 +0000)] 
tests: fix false failure due to xargs usage

* tests/readlink/multi.sh: Ensure there is a trailing delimeter
or xargs may (on AIX 7 at least) suppress the last argument.

11 years agotests: fix false failure on systems without /dev/stdin
Pádraig Brady [Mon, 9 Dec 2013 13:10:40 +0000 (13:10 +0000)] 
tests: fix false failure on systems without /dev/stdin

* tests/rm/interactive-once.sh: Ensure the expected output
matches with the output on systems without /dev/stdin (like AIX 7).
Also change some fail=1 to a more appropriate framework_failure_.

11 years agobuild: update gnulib and improve --with-openssl configure help
Pádraig Brady [Mon, 9 Dec 2013 12:07:05 +0000 (12:07 +0000)] 
build: update gnulib and improve --with-openssl configure help

* configure.ac: Use gl_SET_CRYPTO_CHECK_DEFAULT() to set the
coreutils default for --with-openssl early, so that the
help text can be provided in a standard and complete form.
* gnulib: Update to incorporate a build fix on platforms
with only some of md5 and sha* implemented by libcrypto.

11 years agotests: fix false failure due to gdb inline function handling
Pádraig Brady [Sun, 8 Dec 2013 21:43:49 +0000 (21:43 +0000)] 
tests: fix false failure due to gdb inline function handling

Inline functions are awkward to breakpoint as mentioned at:
https://sourceware.org/bugzilla/show_bug.cgi?id=10738
The normal case here was for the breakpoint on the inline function
to fail, resulting in a 10s delay before skipping the test.
However on GCC 4.7.2 on ppc64 at least it was seen that
the test failed erroneously due to the breakpoint being successfully
set on an "out of line" function, but an inline function was
actually being called.

* tests/tail-2/inotify-race.sh: Switch to a line based breakpoint,
rather than a symbol base one, which avoids issues with breakpoints
on inline functions.  Also skip_ on the initial breakpoint check
in case the breakpoint is not traversed which would be the case
on remote file systems for example.

11 years agotail: use consistent diagnostics with and without inotify
Pádraig Brady [Mon, 9 Dec 2013 01:58:25 +0000 (01:58 +0000)] 
tail: use consistent diagnostics with and without inotify

* src/tail.c: With inotify, when a file is initially absent,
we fstat(-1) for that file spec, thus recording an errnum of EBADF,
which caused the "has become accessible" diagnostic to be issued,
when the file first appears.  Instead we avoid the fstat(-1) and
thus emit the more natural and consistent "has appeared" diagnostic.
* tests/tail-2/retry.sh: Use the new diagnostic which also causes
this test to pass on systems without inotify.

11 years agotests: avoid false df failure with nfs and lofs
Bernhard Voelker [Mon, 9 Dec 2013 01:03:56 +0000 (01:03 +0000)] 
tests: avoid false df failure with nfs and lofs

* tests/df/total-unprocessed.sh: -t nfs and --local are
_not_ mutually exclusive on solaris, with lofs mounts.

11 years agotests: avoid problematic $(< file) shell construct
Pádraig Brady [Sat, 7 Dec 2013 15:36:33 +0000 (15:36 +0000)] 
tests: avoid problematic $(< file) shell construct

* tests/cp/link-deref.sh: This was seen to cause an issue
with dash v0.5.6 at least, so change to a simpler expression.

11 years agotests: fix false failure on platforms using newfstatat
Pádraig Brady [Sat, 7 Dec 2013 15:00:06 +0000 (15:00 +0000)] 
tests: fix false failure on platforms using newfstatat

* tests/ls/stat-free-color.sh: Add newfstatat to the list
of syscalls to trace.  Also add all "stat" syscalls to the
list of syscalls that we verify that strace supports.
Also only create a single dangling symlink to check, since
we already only check for a single "stat" call.
Fixes http://bugs.gnu.org/16075 seen on AArch64

11 years agotests: avoid a false memory leak test failure
Pádraig Brady [Sat, 7 Dec 2013 16:14:40 +0000 (16:14 +0000)] 
tests: avoid a false memory leak test failure

* tests/misc/shuf-reservoir.sh: Restrict the valgrind
"exit on leak" behavior to developer environments where
specific "lint" code is enabled to avoid inconsequential leaks.

11 years agotests: fix shuf test verifying that -i and -e can not be combined
Bernhard Voelker [Fri, 6 Dec 2013 19:24:38 +0000 (20:24 +0100)] 
tests: fix shuf test verifying that -i and -e can not be combined

Previously, the test triggered another error diagnostic:
  shuf: invalid input range ‘-e’
and therefore eclipsed the expected one:
  shuf: cannot combine -e and -i options

While at it, reindent a line with more than 80 characters, present
since the previous commit to silence sc_long_lines.

* tests/misc/shuf.sh: Pass a valid range to the -i option.

11 years agoshuf: --repeat, not --repetitions; default --head-count is infinity
Paul Eggert [Fri, 6 Dec 2013 17:55:17 +0000 (09:55 -0800)] 
shuf: --repeat, not --repetitions; default --head-count is infinity

Original problem reported by Philipp Thomas in
<http://bugs.gnu.org/16061>.
* NEWS: shuf --repeat, not shuf --repetitions.
* doc/coreutils.texi (shuf invocation):
* src/shuf.c (usage, long_opts, main):
* tests/misc/shuf.sh:
Likewise.  Also, the default head-count is infinity.

11 years agodoc: clarify that df now generally processes special files correctly
Bernhard Voelker [Thu, 5 Dec 2013 23:59:36 +0000 (00:59 +0100)] 
doc: clarify that df now generally processes special files correctly

Since v8.21-172-g33660b4, df not only treats symbolic link arguments
differently, as stated there, but now generally processes special file
arguments in a non-canonicalized form correctly:

  $ cd /dev && df-old sdb
  Filesystem     1K-blocks  Used Available Use% Mounted on
  devtmpfs         1014572    48   1014524   1% /dev

  $ cd /dev && df-new sdb
  Filesystem     1K-blocks    Used Available Use% Mounted on
  /dev/sdb        10190136 6039532   3609932  63% /home

Document df's new behavior.

* doc/coreutils.texi (df invocation): In the paragraph describing
df's behavior regarding special file arguments, relax the condition
for such special files from "... is an absolute name of ..." to
"... resolves to ...".
* NEWS (Bug fixes): Mention the new behavior also here.

11 years agotests: fix false failure with disabled SELinux support
Pádraig Brady [Thu, 5 Dec 2013 00:02:41 +0000 (00:02 +0000)] 
tests: fix false failure with disabled SELinux support

This could trigger on SELinux systems where we build --qithout-selinux
or where the SELinux development libraries are not installed.

* init.cfg (require_selinux_enforcing_): Call require_selinux_()
to determine if the current build supports SELinux.  This avoids
a false failure in tests/mkdir/selinux.sh where only mkdir would
determine that SELinux was disabled and thus ignore invalid contexts.
(require_selinux_): Refactor a little to distinguish whether it's
the build or the (file) system that doesn't support SELinux.

11 years agoselinux: fix --context=CTX for cp and diagnose defaultcon() errors
Pádraig Brady [Wed, 4 Dec 2013 19:10:37 +0000 (19:10 +0000)] 
selinux: fix --context=CTX for cp and diagnose defaultcon() errors

* src/selinux.h (ignorable_ctx_err): A new function used
to determine if a warning should be given after a call
to defaultcon() or restorecon().
* src/cp.c (main): Fix the setfscreatecon() call to use
the argument passed by the user.
* src/mkdir.c (make_ancestor): Show all but "ignoreable" errors
from defaultcon() and restorecon().
* tests/misc/selinux.sh: Add a test run as root in selinux enforcing
mode, to ensure cp --context=invalid is honored and fails immediately.

11 years agomd5sum, sha*sum: use libcrypto where available
Pádraig Brady [Tue, 3 Dec 2013 03:51:52 +0000 (03:51 +0000)] 
md5sum, sha*sum: use libcrypto where available

libcrypto is generally available and has well optimized
crypto hash routines particular to various systems.
For example, testing sha1sum with openssl-1.0.0j
on an i3-2310M, gives a performance boost of about 40%:

$ time sha1sum.old --tag ~/test.iso
SHA1 (/home/padraig/test.iso) = 3c27f7ed01965fd2b89e22128fd62dc51a3bef30
real    0m4.692s
user    0m4.499s
sys     0m0.162s

$ time sha1sum.new --tag ~/test.iso
SHA1 (/home/padraig/test.iso) = 3c27f7ed01965fd2b89e22128fd62dc51a3bef30
real    0m2.685s
user    0m2.512s
sys     0m0.170s

* configure.ac: By default, enable use of libcrypto if available.
* src/local.mk: Link with libcrypto.
* NEWS: Mention the md5sum and sha*sum improvements.

11 years agodf: handle bind mounts when processing device nodes
Pádraig Brady [Wed, 4 Dec 2013 00:50:10 +0000 (00:50 +0000)] 
df: handle bind mounts when processing device nodes

* src/df.c (get_disk): Use the same heuristic used in
get_point() to select the shortest file system mount point,
in an attempt to show the base mounted file system.
* NEWS: Mention the bug fix.

11 years agodf: dereference symlinks to disk device nodes
Pádraig Brady [Tue, 3 Dec 2013 23:36:02 +0000 (23:36 +0000)] 
df: dereference symlinks to disk device nodes

This is so the matching for the device is done on the canonical name
of the disk node, rather than on the path of the symlink.
In any case the user will generally want to use the symlink target.

* src/df.c (get_disk): Canonicalize the passed file,
before matching against the list of mounted file system devices.
Note we pass the original symlink name to the "file" output field,
as the symlink target is usually available through the "source" field.
* tests/df/df-symlink.sh: Test the dereferencing operation.
* tests/local.mk: Mention the new test.
* NEWS: Mention the fix.
Reported by Ondrej Oprala

11 years agobuild: update gnulib submodule to latest
Pádraig Brady [Wed, 4 Dec 2013 13:06:45 +0000 (13:06 +0000)] 
build: update gnulib submodule to latest

Note tests/init.sh and bootstrap are still in sync with gnulib.

* gnulib: Sync two configure check fixes.
- Avoid generating core dumps from regex configure check
- Fix compile error in getcwd configure check

11 years agobuild: update gnulib submodule to latest
Pádraig Brady [Wed, 4 Dec 2013 02:00:55 +0000 (02:00 +0000)] 
build: update gnulib submodule to latest

Note tests/init.sh and bootstrap are still in sync with gnulib.

* gnulib: Sync many fixes/changes, including the base64
encoding speedup mentioned in commit v8.21-145-g9120845
Also included is support for enabling use of libcrypto hash routines
which are generally well optimized for particular systems.

11 years agomaint: avoid '%s' quoting notation in diagnostic messages
Bernhard Voelker [Tue, 3 Dec 2013 07:02:57 +0000 (08:02 +0100)] 
maint: avoid '%s' quoting notation in diagnostic messages

Add a new rule to ensure the use of quote() instead of '%s' or `%s'
in format strings of diagnostics messages.

* cfg.mk (sc_prohibit_quotes_notation): Add rule.
* TODO: Remove the entry regarding the '%s' notation.
* src/mkfifo.c (main): Remove the offending and in this case even
duplicate quoting in the format string of the error diagnostic.
* src/mknod.c (main): Likewise.
* src/df.c (decode_output_arg): Change two invocations of error()
according to the above new rule.
* src/numfmt.c: Fix numerous wrong quote notations to fit the above
new rule, mostly in internal debugging diagnostic messages.

11 years agodoc: remove obsolete info on terminal alignment bugs
Pádraig Brady [Sun, 1 Dec 2013 12:15:34 +0000 (12:15 +0000)] 
doc: remove obsolete info on terminal alignment bugs

* doc/coreutils.texi (ls invocation): Remove the note about
OSX terminals not aligning properly as this is no longer the case.
Tested by: Philipp Thomas

11 years agobuild: fix potential factor build failure on arm and powerpc
Pádraig Brady [Fri, 29 Nov 2013 04:13:11 +0000 (04:13 +0000)] 
build: fix potential factor build failure on arm and powerpc

* src/longlong.h: Sync with the latest longlong.h from libgmp to:
- avoid arm asm when being compiled for the thumb instruction [sub]set
- avoid old powerpc assembly that is incompatible with newer GCC
- add arm64 optimized count_trailing_zeros()
- add sparc64 optimized add_ssaaaa() and umul_ppmm()

11 years agotests: add a test for rm -r "/"
Bernhard Voelker [Fri, 29 Nov 2013 08:20:22 +0000 (09:20 +0100)] 
tests: add a test for rm -r "/"

* tests/rm/r-root.sh: Add a non-root test.
* tests/local.mk (all_tests): Mention the test.