- Update to 8.24:

** Bug fixes
  * dd supports more robust SIGINFO/SIGUSR1 handling for outputting statistics.
    Previously those signals may have inadvertently terminated the process.
  * df --local no longer hangs with inaccessible remote mounts.
    [bug introduced in coreutils-8.21]
  * du now silently ignores all directory cycles due to bind mounts.
    Previously it would issue a warning and exit with a failure status.
    [bug introduced in coreutils-8.1 and partially fixed in coreutils-8.23]
  * chroot again calls chroot(DIR) and chdir("/"), even if DIR is "/".
    This handles separate bind mounted "/" trees, and environments
    depending on the implicit chdir("/").
    [bugs introduced in coreutils-8.23]
  * cp no longer issues an incorrect warning about directory hardlinks when a
    source directory is specified multiple times.  Now, consistent with other
    file types, a warning is issued for source directories with duplicate names,
    or with -H the directory is copied again using the symlink name.
  * factor avoids writing partial lines, thus supporting parallel operation.
    [the bug dates back to the initial implementation]
  * head, od, split, tac, tail, and wc no longer mishandle input from files in
    /proc and /sys file systems that report somewhat-incorrect file sizes.
  * mkdir --parents -Z now correctly sets the context for the last component,
    even if the parent directory exists and has a different default context.
    [bug introduced with the -Z restorecon functionality in coreutils-8.22]
  * numfmt no longer outputs incorrect overflowed values seen with certain
    large numbers, or with numbers with increased precision.
    [bug introduced when numfmt was added in coreutils-8.21]
  * numfmt now handles leading zeros correctly, not counting them when
    settings processing limits, and making them optional with floating point.
    [bug introduced when numfmt was added in coreutils-8.21]
  * paste no longer truncates output for large input files.  This would happen
    for example with files larger than 4GiB on 32 bit systems with a '\n'
    character at the 4GiB position.
    [the bug dates back to the initial implementation]
  * rm indicates the correct number of arguments in its confirmation prompt,
    on all platforms.  [bug introduced in coreutils-8.22]
  * shuf -i with a single redundant operand, would crash instead of issuing
    a diagnostic.  [bug introduced in coreutils-8.22]
  * tail releases inotify resources when unused.  Previously it could exhaust
    resources with many files, or with -F if files were replaced many times.
    [bug introduced in coreutils-7.5]
  * tail -f again follows changes to a file after it's renamed.
    [bug introduced in coreutils-7.5]
  * tail --follow no longer misses changes to files if those files were
    replaced before inotify watches were created.
    [bug introduced in coreutils-7.5]
  * tail --follow consistently outputs all data for a truncated file.
    [bug introduced in the beginning]
  * tail --follow=name correctly outputs headers for multiple files
    when those files are being created or renamed.
    [bug introduced in coreutils-7.5]
  ** New features
  * chroot accepts the new --skip-chdir option to not change the working directory
    to "/" after changing into the chroot(2) jail, thus retaining the current wor-
    king directory.  The new option is only permitted if the new root directory is
    the old "/", and therefore is useful with the --group and --userspec options.
  * dd accepts a new status=progress level to print data transfer statistics
    on stderr approximately every second.
  * numfmt can now process multiple fields with field range specifications similar
    to cut, and supports setting the output precision with the --format option.
  * split accepts a new --separator option to select a record separator character
    other than the default newline character.
  * stty allows setting the "extproc" option where supported, which is
    a useful setting with high latency links.
  * sync no longer ignores arguments, and syncs each specified file, or with the
    --file-system option, the file systems associated with each specified file.
  * tee accepts a new --output-error option to control operation with pipes
    and output errors in general.
  ** Changes in behavior
  * df no longer suppresses separate exports of the same remote device, as
    these are generally explicitly mounted.  The --total option does still
    suppress duplicate remote file systems.
    [suppression was introduced in coreutils-8.21]
  * mv no longer supports moving a file to a hardlink, instead issuing an error.
    The implementation was susceptible to races in the presence of multiple mv
    instances, which could result in both hardlinks being deleted.  Also on case
    insensitive file systems like HFS, mv would just remove a hardlinked 'file'
    if called like `mv file File`.  The feature was added in coreutils-5.0.1.
  * numfmt --from-unit and --to-unit options now interpret suffixes as SI units,
    and IEC (power of 2) units are now specified by appending 'i'.
  * tee will exit early if there are no more writable outputs.
  * tee does not treat the file operand '-' as meaning standard output any longer,
    for better conformance to POSIX.  This feature was added in coreutils-5.3.0.
  * timeout --foreground no longer sends SIGCONT to the monitored process,
    which was seen to cause intermittent issues with GDB for example.
  ** Improvements
  * cp,install,mv will convert smaller runs of NULs in the input to holes,
    and cp --sparse=always avoids speculative preallocation on XFS for example.
  * cp will read sparse files more efficiently when the destination is a
    non regular file.  For example when copying a disk image to a device node.
  * mv will try a reflink before falling back to a standard copy, which is
    more efficient when moving files across BTRFS subvolume boundaries.
  * stat and tail now know about IBRIX.  stat -f --format=%T now reports the file
    system type, and tail -f uses polling for files on IBRIX file systems.
  * wc -l processes short lines much more efficiently.
  * References from --help and the man pages of utilities have been corrected
    in various cases, and more direct links to the corresponding online
    documentation are provided.
- Patches adapted because of changed sources:
  coreutils-disable_tests.patch
  coreutils-i18n.patch
  coreutils-misc.patch
  coreutils-ocfs2_reflinks.patch
  coreutils-remove_hostname_documentation.patch
  coreutils-remove_kill_documentation.patch
  coreutils-skip-gnulib-test-tls.patch
  coreutils-tests-shorten-extreme-factor-tests.patch
  sort-keycompare-mb.patch
- Patches removed because they're included in 8.24:  
  coreutils-chroot-perform-chdir-unless-skip-chdir.patch
  coreutils-df-doc-df-a-includes-duplicate-file-systems.patch
  coreutils-df-improve-mount-point-selection.patch
  coreutils-df-show-all-remote-file-systems.patch
  coreutils-df-total-suppress-separate-remotes.patch
  coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch
  coreutils-fix_false_du_failure_on_newer_xfs.patch
  coreutils-fix-man-deps.patch
  coreutils-tests-aarch64-env.patch
  coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch
  coreutils-tests-rm-ext3-perf-increase-timeout.patch

OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=262
This commit is contained in:
Philipp Thomas 2015-07-09 15:40:19 +00:00 committed by Git OBS Bridge
parent 188d3e2e8b
commit 0954d8e70f
29 changed files with 628 additions and 1709 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d
size 5375612

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
iQIcBAABAgAGBQJTyaijAAoJEN9v2XEwYDfZlPMP/jFS+l7u59zNRnPQfUrrcNmN
/mWwAEcxzGwZlyPQ9Fr6HrSryOKiPwmkmOnhsHbXjQZdi7MTd8A8TfQTLyZvLRvO
DJJ0HHqtGojLYFij01ZCtKHOIgry5VqhVHkauIp14+OW5+Bsd/bpfhwAMpNVqFPq
Txu5BvPBh6z/ouTdynuwthRv+iCbWRYvWDIaF1jdfhE1jLcIeZmdZ9xNxE7IDvsU
uSxQoLQrRybfEoqFNrOXc77n5O+JJnIbqpJAJk0QYugA3q2bgE6sdoEr/SUzZy+k
BkEdIfTdZrMMe2S91uh8WSLQrgS9bqD3YLdt75QTYV+d0fPOyfdSwLenMrqS62nV
SSJZNXY8zWTye79WWz0tyWoeosE+OE/xE3JNzjxPLy6q9BaoP3eKAMo//I0MH9uT
Ry+8gOu4BXkT7BMsTVRr3/mr2IIhlHEhjhDL6/ISTEB28fAwLge4a6okD6S1dTSD
YWKz9pzml72pFDo/XAntKsTmbMnHcw3z3IV62zlIErawO2LHSiEUyk11wUJs0dk8
QVmFC6GP/zQ5qy9rHa3xogxdAU2K4ihtC3ZvaaZdU8TOxt/zJDb6rHsoRGuP+g3D
cB1HSepPVzt3rbb3tmA9AnXjIqmXN+Xp8ha5xTdqhHjVGQBzIs8kQIQnPV40mY43
JS25ZfB2PCICITMbWyq7
=fAoz
-----END PGP SIGNATURE-----

3
coreutils-8.24.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a2d75286a4b9ef3a13039c2da3868a61be4ee9f17d8ae380a35a97e506972170
size 5649896

17
coreutils-8.24.tar.xz.sig Normal file
View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJVlwFSAAoJEN9v2XEwYDfZ3IwP/3KOp/R3kHQMn4XKlecernhK
1iR0sh13gVhf4gVm/TbzLYmjSnWZzxQTs2WfyEZvbsm7pjKW0ulT7hqM81tKBkNH
7VpOUWVhvQUjwLGbV3lQsPrcshFejkWq3noHRIoTR6TsbwSyNqJ67wR/Ix+aDDBR
vfrCnG544+Dpl2RWF6bvib2+moWy+ztMghkiIONcqDg2KNhTB6V45CZ64Vw2S/1Z
88kSfd48D88wk06yKtoHck4A7DNqNLE+QHKbNy2BtTkvfT4x00XYRESPv/P1wKMk
n7mmJHx6idB3cvpm1vk0xiA8Xa3h1ot8w6a47NY48B8/UuwE6AROReWAwXAVOAvW
lInr4YP9YTYLAoUsH7RhrtFVUwIBZme6rbYeKvaU59LuVgQBL6eG5zHq5a45sCHg
8Bezfx5eXak4PClS36TguN350l5wbfBqiCxfqy05g+r0xYgTaFWKujmlP8c+8AN3
nOaNle4LUioC6RIvoZu/h/nhwYl6/HIRt/dlZ5/TRvs+YKo58Y8lXAKcWixHfk7s
Rx/NZWOMwhdyKqjRDADflauzpI/YboGkafozzHkIZg+uBd3zgTAAfUCvEHSGpKvw
pVlXIH4VN2gOfNroDMUAJN2UiIxp4Weukfk/gkMFAIlxmjZAcZ7wLKjABf4Vqeq+
Iubv9MiiqMa1t/MsDDb5
=Zz9/
-----END PGP SIGNATURE-----

View File

@ -1,455 +0,0 @@
# Upstream patch on top of v8.23 (to be removed in v8.24):
# https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=0cf7b1d9
# Fixes a regression in chroot which did not chdir("/") in all cases.
From 0c7abd9e8e1d1725ae600daa3ac9bbf8333f93c9 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Fri, 1 Aug 2014 02:07:33 +0200
Subject: [PATCH] chroot: perform chdir("/") again unless new --skip-chdir is
specified
Since commit v8.22-94-g99960ee, chroot(1) skips the chroot(2) syscall
for "/" arguments (and synonyms). The problem is that it also skips
the following chdir("/") call in that case. The latter breaks existing
scripts which expect "/" to be the working directory inside the chroot.
While the first part of the change - i.e., skipping chroot("/") - is
okay for consistency with systems where it might succeed for a non-root
user, the second part might be malicious, e.g.
cd /home/user && chroot '/' bin/foo
In the "best" case, chroot(1) could not execute 'bin/foo' with ENOENT,
but in the worst case, chroot(1) would execute '/home/user/bin/foo' in
the case that exists - instead of '/bin/foo'.
Revert that second part of the patch, i.e., perform the chdir("/)
in the common case again - unless the new --skip-chdir option is
specified. Restrict this new option to the case of "/" arguments.
* src/chroot.c (SKIP_CHDIR): Add enum.
(long_opts): Add entry for the new --skip-chdir option.
(usage): Add --skip-chdir option, and while at it, move the other
to options into alphabetical order.
(main): Accept the above new option, allowing it only in the case
when NEWROOT is the old "/".
Move down the chdir() call after the if-clause to ensure it is
run in any case - unless --skip-chdir is specified.
Add a 'newroot' variable for the new root directory as it is used
in a couple of places now.
* tests/misc/chroot-fail.sh: Invert the last tests which check the
working directory of the execvp()ed program when a "/"-like
argument was passed: now expect it to be "/" - unless --skip-chdir
is given.
* doc/coreutils.texi (chroot invocation): Document the new option.
Document that chroot(1) usually calls chdir("/") unless the new
--skip-chdir option is specified. Sort options.
* NEWS (Changes in behavior): Mention the fix.
(New features): Mention the new option.
* init.cfg (nonroot_has_perm_): Add chroot's new --skip-chdir option.
* tests/cp/preserve-gid.sh (t1): Likewise.
* tests/cp/special-bits.sh: Likewise.
* tests/id/setgid.sh: Likewise.
* tests/misc/truncate-owned-by-other.sh: Likewise.
* tests/mv/sticky-to-xpart.sh: Likewise.
* tests/rm/fail-2eperm.sh: Likewise.
* tests/rm/no-give-up.sh: Likewise.
* tests/touch/now-owned-by-other.sh: Likewise.
Reported by Andreas Schwab in http://bugs.gnu.org/18062
---
NEWS | 13 +++++++++++
doc/coreutils.texi | 36 +++++++++++++++++++++-----------
init.cfg | 3 +-
src/chroot.c | 38 ++++++++++++++++++++++++++--------
tests/cp/preserve-gid.sh | 3 +-
tests/cp/special-bits.sh | 3 +-
tests/id/setgid.sh | 8 +++----
tests/misc/chroot-fail.sh | 23 +++++++++++++++++---
tests/misc/truncate-owned-by-other.sh | 2 -
tests/mv/sticky-to-xpart.sh | 5 ++--
tests/rm/fail-2eperm.sh | 6 +++--
tests/rm/no-give-up.sh | 2 -
tests/touch/now-owned-by-other.sh | 2 -
13 files changed, 106 insertions(+), 38 deletions(-)
Index: NEWS
===================================================================
--- NEWS.orig
+++ NEWS
@@ -180,6 +180,19 @@ GNU coreutils NEWS
--format=%T now reports the file system type, and tail -f now uses inotify,
rather than the default of issuing a warning and reverting to polling.
+** New features
+
+ chroot accepts the new --skip-chdir option to not change the working directory
+ to "/" after changing into the chroot(2) jail, thus retaining the current wor-
+ king directory. The new option is only permitted if the new root directory is
+ the old "/", and therefore is useful with the --group and --userspec options.
+
+** Changes in behavior
+
+ chroot changes the current directory to "/" in again - unless the above new
+ --skip-chdir option is specified.
+ [bug introduced in coreutils-8.23]
+
* Noteworthy changes in release 8.22 (2013-12-13) [stable]
Index: doc/coreutils.texi
===================================================================
--- doc/coreutils.texi.orig
+++ doc/coreutils.texi
@@ -16074,7 +16074,10 @@ On many systems, only the super-user can
some systems (e.g., FreeBSD) can be configured to allow certain regular
users to use the @code{chroot} system call, and hence to run this program.
Also, on Cygwin, anyone can run the @command{chroot} command, because the
-underlying function is non-privileged due to lack of support in MS-Windows.}
+underlying function is non-privileged due to lack of support in MS-Windows.
+Furthermore, the @command{chroot} command avoids the @code{chroot} system call
+when @var{newroot} is identical to the old @file{/} directory for consistency
+with systems where this is allowed for non-privileged users.}.
Synopses:
@example
@@ -16084,10 +16087,11 @@ chroot @var{option}
Ordinarily, file names are looked up starting at the root of the
directory structure, i.e., @file{/}. @command{chroot} changes the root to
-the directory @var{newroot} (which must exist) and then runs
-@var{command} with optional @var{args}. If @var{command} is not
-specified, the default is the value of the @env{SHELL} environment
-variable or @command{/bin/sh} if not set, invoked with the @option{-i} option.
+the directory @var{newroot} (which must exist), then changes the working
+directory to @file{/}, and finally runs @var{command} with optional @var{args}.
+If @var{command} is not specified, the default is the value of the @env{SHELL}
+environment variable or @command{/bin/sh} if not set, invoked with the
+@option{-i} option.
@var{command} must not be a special built-in utility
(@pxref{Special built-in utilities}).
@@ -16096,6 +16100,14 @@ Options must precede operands.
@table @samp
+@item --groups=@var{groups}
+@opindex --groups
+Use this option to override the supplementary @var{groups} to be
+used by the new process.
+The items in the list (names or numeric IDs) must be separated by commas.
+Use @samp{--groups=''} to disable the supplementary group look-up
+implicit in the @option{--userspec} option.
+
@item --userspec=@var{user}[:@var{group}]
@opindex --userspec
By default, @var{command} is run with the same credentials
@@ -16106,13 +16118,13 @@ If a @var{user} is specified then the su
are set according to the system defined list for that user,
unless overridden with the @option{--groups} option.
-@item --groups=@var{groups}
-@opindex --groups
-Use this option to override the supplementary @var{groups} to be
-used by the new process.
-The items in the list (names or numeric IDs) must be separated by commas.
-Use @samp{--groups=''} to disable the supplementary group look-up
-implicit in the @option{--userspec} option.
+@item --skip-chdir
+@opindex --skip-chdir
+Use this option to not change the working directory to @file{/} after changing
+the root directory to @var{newroot}, i.e., inside the chroot.
+This option is only permitted when @var{newroot} is the old @file{/} directory,
+and therefore is mostly useful together with the @option{--groups} and
+@option{--userspec} options to retain the previous working directory.
@end table
Index: init.cfg
===================================================================
--- init.cfg.orig
+++ init.cfg
@@ -400,7 +400,8 @@ nonroot_has_perm_()
require_built_ chroot
local rm_version=$(
- chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" rm --version |
+ chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
+ rm --version |
sed -n '1s/.* //p'
)
case ":$rm_version:" in
Index: src/chroot.c
===================================================================
--- src/chroot.c.orig
+++ src/chroot.c
@@ -49,13 +49,15 @@ static inline bool gid_unset (gid_t gid)
enum
{
GROUPS = UCHAR_MAX + 1,
- USERSPEC
+ USERSPEC,
+ SKIP_CHDIR
};
static struct option const long_opts[] =
{
{"groups", required_argument, NULL, GROUPS},
{"userspec", required_argument, NULL, USERSPEC},
+ {"skip-chdir", no_argument, NULL, SKIP_CHDIR},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
@@ -194,9 +196,14 @@ Run COMMAND with root directory set to N
"), stdout);
fputs (_("\
- --userspec=USER:GROUP specify user and group (ID or name) to use\n\
--groups=G_LIST specify supplementary groups as g1,g2,..,gN\n\
"), stdout);
+ fputs (_("\
+ --userspec=USER:GROUP specify user and group (ID or name) to use\n\
+"), stdout);
+ printf (_("\
+ --skip-chdir do not change working directory to %s\n\
+"), quote ("/"));
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -218,6 +225,7 @@ main (int argc, char **argv)
char *userspec = NULL;
char const *username = NULL;
char const *groups = NULL;
+ bool skip_chdir = false;
/* Parsed user and group IDs. */
uid_t uid = -1;
@@ -254,6 +262,10 @@ main (int argc, char **argv)
groups = optarg;
break;
+ case SKIP_CHDIR:
+ skip_chdir = true;
+ break;
+
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
@@ -269,9 +281,19 @@ main (int argc, char **argv)
usage (EXIT_CANCELED);
}
+ char const *newroot = argv[optind];
+ bool is_oldroot = is_root (newroot);
+
+ if (! is_oldroot && skip_chdir)
+ {
+ error (0, 0, _("option --skip-chdir only permitted if NEWROOT is old %s"),
+ quote ("/"));
+ usage (EXIT_CANCELED);
+ }
+
/* Only do chroot specific actions if actually changing root.
The main difference here is that we don't change working dir. */
- if (! is_root (argv[optind]))
+ if (! is_oldroot)
{
/* We have to look up users and groups twice.
- First, outside the chroot to load potentially necessary passwd/group
@@ -307,14 +329,14 @@ main (int argc, char **argv)
}
#endif
- if (chroot (argv[optind]) != 0)
+ if (chroot (newroot) != 0)
error (EXIT_CANCELED, errno, _("cannot change root directory to %s"),
- argv[optind]);
-
- if (chdir ("/"))
- error (EXIT_CANCELED, errno, _("cannot chdir to root directory"));
+ newroot);
}
+ if (! skip_chdir && chdir ("/"))
+ error (EXIT_CANCELED, errno, _("cannot chdir to root directory"));
+
if (argc == optind + 1)
{
/* No command. Run an interactive shell. */
Index: tests/cp/preserve-gid.sh
===================================================================
--- tests/cp/preserve-gid.sh.orig
+++ tests/cp/preserve-gid.sh
@@ -117,7 +117,8 @@ t1() {
u=$1; shift
g=$1; shift
t0 "$f" "$u" "$g" \
- chroot --user=+$nameless_uid:+$nameless_gid1 \
+ chroot --skip-chdir \
+ --user=+$nameless_uid:+$nameless_gid1 \
--groups="+$nameless_gid1,+$nameless_gid2" \
/ env PATH="$tmp_path" "$@"
}
Index: tests/cp/special-bits.sh
===================================================================
--- tests/cp/special-bits.sh.orig
+++ tests/cp/special-bits.sh
@@ -42,7 +42,8 @@ set _ $(ls -l b); shift; p1=$1
set _ $(ls -l b2); shift; p2=$1
test $p1 = $p2 || fail=1
-chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" cp -p c c2 || fail=1
+chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" cp -p c c2 \
+ || fail=1
set _ $(ls -l c); shift; p1=$1
set _ $(ls -l c2); shift; p2=$1
test $p1 = $p2 && fail=1
Index: tests/id/setgid.sh
===================================================================
--- tests/id/setgid.sh.orig
+++ tests/id/setgid.sh
@@ -27,14 +27,14 @@ echo $gp1 > exp || framework_failure_
# With coreutils-8.16 and earlier, id -G would print both:
# $gp1 $NON_ROOT_GID
-chroot --user=$NON_ROOT_USERNAME:+$gp1 --groups='' / env PATH="$PATH" \
- id -G > out || fail=1
+chroot --skip-chdir --user=$NON_ROOT_USERNAME:+$gp1 --groups='' / \
+ env PATH="$PATH" id -G > out || fail=1
compare exp out || fail=1
# With coreutils-8.22 and earlier, id would erroneously print
# groups=$NON_ROOT_GID
-chroot --user=$NON_ROOT_USERNAME:+$gp1 --groups='' / env PATH="$PATH" \
- id > out || fail=1
+chroot --skip-chdir --user=$NON_ROOT_USERNAME:+$gp1 --groups='' / \
+ env PATH="$PATH" id > out || fail=1
grep -F "groups=$gp1" out || { cat out; fail=1; }
Exit $fail
Index: tests/misc/chroot-fail.sh
===================================================================
--- tests/misc/chroot-fail.sh.orig
+++ tests/misc/chroot-fail.sh
@@ -30,7 +30,7 @@ chroot --- / true # unknown option
test $? = 125 || fail=1
# Note chroot("/") succeeds for non-root users on some systems, but not all,
-# however we avoid the chroot() with "/" to have common behvavior.
+# however we avoid the chroot() with "/" to have common behavior.
chroot / sh -c 'exit 2' # exit status propagation
test $? = 2 || fail=1
chroot / . # invalid command
@@ -38,10 +38,25 @@ test $? = 126 || fail=1
chroot / no_such # no such command
test $? = 127 || fail=1
-# Ensure we don't chdir("/") when not changing root
-# to allow only changing user ids for a command.
-for dir in '/' '/.' '/../'; do
+# Ensure that --skip-chdir fails with a non-"/" argument.
+cat <<\EOF > exp || framework_failure_
+chroot: option --skip-chdir only permitted if NEWROOT is old '/'
+Try 'chroot --help' for more information.
+EOF
+chroot --skip-chdir . env pwd >out 2>err && fail=1
+compare /dev/null out || fail=1
+compare exp err || fail=1
+
+# Ensure we don't chroot("/") when NEWROOT is old "/".
+ln -s / isroot || framework_failure_
+for dir in '/' '/.' '/../' isroot; do
+ # Verify that chroot(1) succeeds and performs chdir("/")
+ # (chroot(1) of coreutils-8.23 failed to run the latter).
curdir=$(chroot "$dir" env pwd) || fail=1
+ test "$curdir" = '/' || fail=1
+
+ # Test the "--skip-chdir" option.
+ curdir=$(chroot --skip-chdir "$dir" env pwd) || fail=1
test "$curdir" = '/' && fail=1
done
Index: tests/misc/truncate-owned-by-other.sh
===================================================================
--- tests/misc/truncate-owned-by-other.sh.orig
+++ tests/misc/truncate-owned-by-other.sh
@@ -29,7 +29,7 @@ chmod g+w root-owned
# Ensure that the current directory is searchable by $NON_ROOT_USERNAME.
chmod g+x .
-chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
+chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
truncate -s0 root-owned || fail=1
Exit $fail
Index: tests/mv/sticky-to-xpart.sh
===================================================================
--- tests/mv/sticky-to-xpart.sh.orig
+++ tests/mv/sticky-to-xpart.sh
@@ -42,7 +42,8 @@ chmod go+x . || framework_failure_
# Ensure that $NON_ROOT_USERNAME can access the required version of mv.
version=$(
- chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" mv --version |
+ chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
+ mv --version |
sed -n '1s/.* //p'
)
case $version in
@@ -50,7 +51,7 @@ case $version in
*) skip_ "cannot access just-built mv as user $NON_ROOT_USERNAME";;
esac
-chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
+chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
mv t/root-owned "$other_partition_tmpdir" 2> out-t && fail=1
# On some systems, we get 'Not owner'. Convert it.
Index: tests/rm/fail-2eperm.sh
===================================================================
--- tests/rm/fail-2eperm.sh.orig
+++ tests/rm/fail-2eperm.sh
@@ -32,14 +32,16 @@ touch a/b || framework_failure_
# Try to ensure that $NON_ROOT_USERNAME can access
# the required version of rm.
rm_version=$(
- chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" rm --version |
+ chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
+ rm --version |
sed -n '1s/.* //p'
)
case $rm_version in
$PACKAGE_VERSION) ;;
*) skip_ "cannot access just-built rm as user $NON_ROOT_USERNAME";;
esac
-chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" rm -rf a 2> out-t && fail=1
+chroot --skip-chdir --user=$NON_ROOT_USERNAME / \
+ env PATH="$PATH" rm -rf a 2> out-t && fail=1
# On some systems, we get 'Not owner'. Convert it.
# On other systems (HPUX), we get 'Permission denied'. Convert it, too.
Index: tests/rm/no-give-up.sh
===================================================================
--- tests/rm/no-give-up.sh.orig
+++ tests/rm/no-give-up.sh
@@ -30,7 +30,7 @@ chmod go=x . || framework_failure_
# This must fail, since '.' is not writable by $NON_ROOT_USERNAME.
-chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
+chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
rm -rf d 2>/dev/null && fail=1
# d must remain.
Index: tests/touch/now-owned-by-other.sh
===================================================================
--- tests/touch/now-owned-by-other.sh.orig
+++ tests/touch/now-owned-by-other.sh
@@ -28,7 +28,7 @@ chmod g+w root-owned
# Ensure that the current directory is searchable by $NON_ROOT_USERNAME.
chmod g+x .
-chroot --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
+chroot --skip-chdir --user=$NON_ROOT_USERNAME / env PATH="$PATH" \
touch -d now root-owned || fail=1
Exit $fail

View File

@ -1,65 +0,0 @@
Upstream patch for df(1) on top of v8.23, to be removed with v8.24.
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=097897bd2c9d
From 097897bd2c9de5723af24b3848d6d922a862064b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Mon, 27 Oct 2014 11:41:09 +0000
Subject: [PATCH] doc: mention that df -a includes duplicate file systems
* src/df.c (usage): Mention that duplicate file systems are shown
with this option, not just dummy file systems.
* doc/coreutils.texi (df invocation): For the --all option, expand
on the class of normally suppressed mount entries that it includes.
Reported in http://bugs.debian.org/737399
---
doc/coreutils.texi | 12 ++++++++----
src/df.c | 4 ++--
2 files changed, 10 insertions(+), 6 deletions(-)
Index: doc/coreutils.texi
===================================================================
--- doc/coreutils.texi.orig
+++ doc/coreutils.texi
@@ -11184,11 +11184,15 @@ The program accepts the following option
@itemx --all
@opindex -a
@opindex --all
-@cindex automounter file systems
@cindex ignore file systems
-Include in the listing dummy file systems, which
-are omitted by default. Such file systems are typically special-purpose
-pseudo-file-systems, such as automounter entries.
+Include in the listing dummy, duplicate, or inaccessible file systems, which
+are omitted by default. Dummy file systems are typically special purpose
+pseudo file systems such as @samp{/proc}, with no associated storage.
+Duplicate file systems are local or remote file systems that are mounted
+at separate locations in the local file hierarchy, or bind mounted locations.
+Inaccessible file systems are those which are mounted but subsequently
+over-mounted by another file system at that point, or otherwise inaccessible
+due to permissions of the mount point etc.
@item -B @var{size}
@itemx --block-size=@var{size}
Index: src/df.c
===================================================================
--- src/df.c.orig
+++ src/df.c
@@ -648,7 +648,7 @@ filter_mount_list (bool devices_only)
> strlen (me->me_mountdir))
/* let an entry overmounted on a different device win... */
|| (! STREQ (devlist->me->me_devname, me->me_devname)
- /* ... but only when matching an exsiting mount point, to
+ /* ... but only when matching an existing mount point, to
avoid problematic replacement when given inaccurate mount
lists, seen with some chroot environments for example. */
&& STREQ (me->me_mountdir, devlist->me->me_mountdir)))
@@ -1396,7 +1396,7 @@ or all file systems by default.\n\
/* TRANSLATORS: The thousands and decimal separators are best
adjusted to an appropriate default for your locale. */
fputs (_("\
- -a, --all include dummy file systems\n\
+ -a, --all include pseudo, duplicate, inaccessible file systems\n\
-B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,\n\
'-BM' prints sizes in units of 1,048,576 bytes;\n\
see SIZE format below\n\

View File

@ -1,67 +0,0 @@
Upstream patch for df(1) on top of v8.23, to be removed with v8.24.
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=ed1a495b3ccb
From ed1a495b3ccb2665a13229ca866f2115bd768d17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Mon, 18 Aug 2014 17:59:26 +0100
Subject: [PATCH] df: improve mount point selection with inaccurate mount list
v8.23 has a test failure on Fedora rawhide build servers
in tests/df/skip-duplicate.sh. This was due to no '/'
entry being output by df. That was due to an inaccurate
/proc/mounts on the build environment as stat(/mnt/point)
identified all these /proc/mounts entries as having the
same device id:
/ rootfs
/ /dev/md1
/dev devtmpfs
/run tmpfs
/boot /dev/md0
/proc/filesystems /dev/md1
Since the device name on the right changes for a given id,
that causes the entries to be continually replaced, thus
resulting in no '/' entry. I'm guessing this is due to
the mock environment bind mounting unneeded or sensitive
items to a dummy file on the host / (/dev/md1) though
have not looked into those details.
So rather than relying on an accurate /proc/mounts,
the attached patch takes a more conservative replacement
approach and only swaps a new device entry when the
mount point matches. That should handle all practical
cases while also avoiding this situation.
* src/df.c (filter_mount_list): Only replace entries with
different device names when the mount point also matches.
---
src/df.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Index: src/df.c
===================================================================
--- src/df.c.orig
+++ src/df.c
@@ -640,13 +640,18 @@ filter_mount_list (bool devices_only)
if (devlist)
{
- /* ...let the shorter mountdir win. */
+ /* let "real" devices with '/' in the name win. */
if ((strchr (me->me_devname, '/')
&& ! strchr (devlist->me->me_devname, '/'))
+ /* let a shorter mountdir win. */
|| (strlen (devlist->me->me_mountdir)
> strlen (me->me_mountdir))
- /* or one overmounted on a different device. */
- || ! STREQ (devlist->me->me_devname, me->me_devname))
+ /* let an entry overmounted on a different device win... */
+ || (! STREQ (devlist->me->me_devname, me->me_devname)
+ /* ... but only when matching an exsiting mount point, to
+ avoid problematic replacement when given inaccurate mount
+ lists, seen with some chroot environments for example. */
+ && STREQ (me->me_mountdir, devlist->me->me_mountdir)))
{
/* Discard mount entry for existing device. */
discard_me = devlist->me;

View File

@ -1,70 +0,0 @@
Upstream patch for df(1) on top of v8.23, to be removed with v8.24.
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=3ab3c7bb24b8
From 3ab3c7bb24b86ef2d2fede9fe26e3ee585db5411 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Mon, 27 Oct 2014 23:37:08 +0000
Subject: [PATCH] df: ensure -a shows all remote file system entries
commit v8.22-125-g9d736f8 printed placeholder "-" values
for device names that didn't match the preferred device name
for a particular mount point. However that was seen to erroneously
suppress values for aliased host names or exports, common with
remote file systems.
* src/df.c (me_for_dev): Rename from devname_for_dev() so that
we can determine the remoteness as well as the name for the
preferred mount entry.
(get_dev): Don't output place holder values when both
current and preferred mount entries are remote.
Reported in http://bugs.debian.org/737399
---
src/df.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
Index: src/df.c
===================================================================
--- src/df.c.orig
+++ src/df.c
@@ -703,17 +703,17 @@ filter_mount_list (bool devices_only)
}
/* Search a mount entry list for device id DEV.
- Return the corresponding device name if found or NULL if not. */
+ Return the corresponding mount entry if found or NULL if not. */
-static char const * _GL_ATTRIBUTE_PURE
-devname_for_dev (dev_t dev)
+static struct mount_entry const * _GL_ATTRIBUTE_PURE
+me_for_dev (dev_t dev)
{
struct devlist *dl = device_list;
while (dl)
{
if (dl->dev_num == dev)
- return dl->me->me_devname;
+ return dl->me;
dl = dl->next;
}
@@ -928,12 +928,15 @@ get_dev (char const *disk, char const *m
else if (process_all && show_all_fs)
{
/* Ensure we don't output incorrect stats for over-mounted directories.
- Discard stats when the device name doesn't match. */
+ Discard stats when the device name doesn't match. Though don't
+ discard when used and current mount entries are both remote due
+ to the possibility of aliased host names or exports. */
struct stat sb;
if (stat (stat_file, &sb) == 0)
{
- char const * devname = devname_for_dev (sb.st_dev);
- if (devname && ! STREQ (devname, disk))
+ struct mount_entry const * dev_me = me_for_dev (sb.st_dev);
+ if (dev_me && ! STREQ (dev_me->me_devname, disk)
+ && (! dev_me->me_remote || ! me_remote))
{
fstype = "-";
fsu.fsu_blocksize = fsu.fsu_blocks = fsu.fsu_bfree =

View File

@ -1,250 +0,0 @@
Upstream patch for df(1) on top of v8.23, to be removed with v8.24.
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=2e81e6224340
From 2e81e62243409c5c574b899f52b08c000e4d99fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Wed, 29 Oct 2014 02:49:17 +0000
Subject: [PATCH] df: only suppress remote mounts of separate exports with
--total
* src/df.c (filter_mount_list): Separate remote locations are
generally explicitly mounted, so list each even if they share
the same remote device and thus storage. However with --total
keep the suppression to give a more accurate value for the
total storage available.
(usage): Expand on the new implications of --total and move
it in the options list according to alphabetic order.
doc/coreutils.texi (df invocation): Mention that --total impacts
on deduplication of remote file systems and also move location
according to alphabetic order.
* tests/df/skip-duplicates.sh: Add remote test cases.
* NEWS: Mention the change in behavior.
Reported in http://bugs.debian.org/737399
Reported in http://bugzilla.redhat.com/920806
Reported in http://bugzilla.opensuse.org/866010
Reported in http://bugzilla.opensuse.org/901905
---
NEWS | 8 ++++++++
doc/coreutils.texi | 28 +++++++++++++++-------------
src/df.c | 41 ++++++++++++++++++++++++++++-------------
tests/df/skip-duplicates.sh | 31 ++++++++++++++++++++++++++++---
4 files changed, 79 insertions(+), 29 deletions(-)
Index: NEWS
===================================================================
--- NEWS.orig
+++ NEWS
@@ -1,5 +1,13 @@
GNU coreutils NEWS -*- outline -*-
+** Changes in behavior
+
+ df no longer suppresses separate exports of the same remote device, as
+ these are generally explicitly mounted. The --total option does still
+ suppress duplicate remote file systems.
+ [suppression was introduced in coreutils-8.21]
+
+
* Noteworthy changes in release 8.23 (2014-07-18) [stable]
** Bug fixes
Index: doc/coreutils.texi
===================================================================
--- doc/coreutils.texi.orig
+++ doc/coreutils.texi
@@ -11202,19 +11202,6 @@ due to permissions of the mount point et
Scale sizes by @var{size} before printing them (@pxref{Block size}).
For example, @option{-BG} prints sizes in units of 1,073,741,824 bytes.
-@item --total
-@opindex --total
-@cindex grand total of disk size, usage and available space
-Print a grand total of all arguments after all arguments have
-been processed. This can be used to find out the total disk size, usage
-and available space of all listed devices.
-
-For the grand total line, @command{df} prints @samp{"total"} into the
-@var{source} column, and @samp{"-"} into the @var{target} column.
-If there is no @var{source} column (see @option{--output}), then
-@command{df} prints @samp{"total"} into the @var{target} column,
-if present.
-
@optHumanReadable
@item -H
@@ -11355,6 +11342,21 @@ some systems (notably SunOS), doing this
but in general this option makes @command{df} much slower, especially when
there are many or very busy file systems.
+@item --total
+@opindex --total
+@cindex grand total of disk size, usage and available space
+Print a grand total of all arguments after all arguments have
+been processed. This can be used to find out the total disk size, usage
+and available space of all listed devices. If no arguments are specified
+df will try harder to elide file systems insignificant to the total
+available space, by suppressing duplicate remote file systems.
+
+For the grand total line, @command{df} prints @samp{"total"} into the
+@var{source} column, and @samp{"-"} into the @var{target} column.
+If there is no @var{source} column (see @option{--output}), then
+@command{df} prints @samp{"total"} into the @var{target} column,
+if present.
+
@item -t @var{fstype}
@itemx --type=@var{fstype}
@opindex -t
Index: src/df.c
===================================================================
--- src/df.c.orig
+++ src/df.c
@@ -640,18 +640,28 @@ filter_mount_list (bool devices_only)
if (devlist)
{
- /* let "real" devices with '/' in the name win. */
- if ((strchr (me->me_devname, '/')
- && ! strchr (devlist->me->me_devname, '/'))
- /* let a shorter mountdir win. */
- || (strlen (devlist->me->me_mountdir)
- > strlen (me->me_mountdir))
- /* let an entry overmounted on a different device win... */
- || (! STREQ (devlist->me->me_devname, me->me_devname)
- /* ... but only when matching an existing mount point, to
- avoid problematic replacement when given inaccurate mount
- lists, seen with some chroot environments for example. */
- && STREQ (me->me_mountdir, devlist->me->me_mountdir)))
+ if (! print_grand_total && me->me_remote && devlist->me->me_remote
+ && ! STREQ (devlist->me->me_devname, me->me_devname))
+ {
+ /* Don't discard remote entries with different locations,
+ as these are more likely to be explicitly mounted.
+ However avoid this when producing a total to give
+ a more accurate value in that case. */
+ }
+ else if ((strchr (me->me_devname, '/')
+ /* let "real" devices with '/' in the name win. */
+ && ! strchr (devlist->me->me_devname, '/'))
+ /* let a shorter mountdir win. */
+ || (strlen (devlist->me->me_mountdir)
+ > strlen (me->me_mountdir))
+ /* let an entry overmounted on a new device win... */
+ || (! STREQ (devlist->me->me_devname, me->me_devname)
+ /* ... but only when matching an existing mnt point,
+ to avoid problematic replacement when given
+ inaccurate mount lists, seen with some chroot
+ environments for example. */
+ && STREQ (me->me_mountdir,
+ devlist->me->me_mountdir)))
{
/* Discard mount entry for existing device. */
discard_me = devlist->me;
@@ -1403,7 +1413,6 @@ or all file systems by default.\n\
-B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,\n\
'-BM' prints sizes in units of 1,048,576 bytes;\n\
see SIZE format below\n\
- --total produce a grand total\n\
-h, --human-readable print sizes in powers of 1024 (e.g., 1023M)\n\
-H, --si print sizes in powers of 1000 (e.g., 1.1G)\n\
"), stdout);
@@ -1419,6 +1428,12 @@ or all file systems by default.\n\
or print all fields if FIELD_LIST is omitted.\n\
-P, --portability use the POSIX output format\n\
--sync invoke sync before getting usage info\n\
+"), stdout);
+ fputs (_("\
+ --total elide all entries insignificant to available space,\n\
+ and produce a grand total\n\
+"), stdout);
+ fputs (_("\
-t, --type=TYPE limit listing to file systems of type TYPE\n\
-T, --print-type print file system type\n\
-x, --exclude-type=TYPE limit listing to file systems not of type TYPE\n\
Index: tests/df/skip-duplicates.sh
===================================================================
--- tests/df/skip-duplicates.sh.orig
+++ tests/df/skip-duplicates.sh
@@ -26,7 +26,12 @@ require_gcc_shared_
df --local || skip_ "df fails"
export CU_NONROOT_FS=$(df --local --output=target 2>&1 | grep /. | head -n1)
-test -z "$CU_NONROOT_FS" && unique_entries=1 || unique_entries=2
+export CU_REMOTE_FS=$(df --local --output=target 2>&1 | grep /. |
+ tail -n+2 | head -n1)
+
+unique_entries=1
+test -z "$CU_NONROOT_FS" || unique_entries=$(expr $unique_entries + 1)
+test -z "$CU_REMOTE_FS" || unique_entries=$(expr $unique_entries + 2)
grep '^#define HAVE_MNTENT_H 1' $CONFIG_HEADER > /dev/null \
|| skip_ "no mntent.h available to confirm the interface"
@@ -46,6 +51,7 @@ cat > k.c <<'EOF' || framework_failure_
struct mntent *getmntent (FILE *fp)
{
static char *nonroot_fs;
+ static char *remote_fs;
static int done;
/* Prove that LD_PRELOAD works. */
@@ -63,6 +69,9 @@ struct mntent *getmntent (FILE *fp)
{.mnt_fsname="virtfs", .mnt_dir="/NONROOT", .mnt_type="fstype1"},
{.mnt_fsname="virtfs2", .mnt_dir="/NONROOT", .mnt_type="fstype2"},
{.mnt_fsname="netns", .mnt_dir="net:[1234567]"},
+ {.mnt_fsname="rem:ote1",.mnt_dir="/REMOTE"},
+ {.mnt_fsname="rem:ote1",.mnt_dir="/REMOTE"},
+ {.mnt_fsname="rem:ote2",.mnt_dir="/REMOTE"},
};
if (done == 1)
@@ -70,17 +79,26 @@ struct mntent *getmntent (FILE *fp)
nonroot_fs = getenv ("CU_NONROOT_FS");
if (!nonroot_fs || !*nonroot_fs)
nonroot_fs = "/"; /* merge into / entries. */
+
+ remote_fs = getenv ("CU_REMOTE_FS");
}
if (done == 1 && !getenv ("CU_TEST_DUPE_INVALID"))
done++; /* skip the first entry. */
- while (done++ <= 7)
+ while (done++ <= 10)
{
if (!mntents[done-2].mnt_type)
mntents[done-2].mnt_type = "-";
if (STREQ (mntents[done-2].mnt_dir, "/NONROOT"))
mntents[done-2].mnt_dir = nonroot_fs;
+ if (STREQ (mntents[done-2].mnt_dir, "/REMOTE"))
+ {
+ if (!remote_fs || !*remote_fs)
+ continue;
+ else
+ mntents[done-2].mnt_dir = remote_fs;
+ }
return &mntents[done-2];
}
@@ -102,6 +120,12 @@ test -f x || skip_ "internal test failur
LD_PRELOAD=./k.so df -T >out || fail=1
test $(wc -l <out) -eq $(expr 1 + $unique_entries) || { fail=1; cat out; }
+# With --total we should suppress the duplicate but separate remote file system
+LD_PRELOAD=./k.so df --total >out || fail=1
+test "$CU_REMOTE_FS" && elide_remote=1 || elide_remote=0
+test $(wc -l <out) -eq $(expr 2 + $unique_entries - $elide_remote) ||
+ { fail=1; cat out; }
+
# Ensure we don't fail when unable to stat (currently) unavailable entries
LD_PRELOAD=./k.so CU_TEST_DUPE_INVALID=1 df -T >out || fail=1
test $(wc -l <out) -eq $(expr 1 + $unique_entries) || { fail=1; cat out; }
@@ -118,7 +142,8 @@ test $(grep -c 'virtfs2.*fstype2' <out)
# Ensure that filtering duplicates does not affect -a processing.
LD_PRELOAD=./k.so df -a >out || fail=1
-test $(wc -l <out) -eq 6 || { fail=1; cat out; }
+total_fs=6; test "$CU_REMOTE_FS" && total_fs=$(expr $total_fs + 3)
+test $(wc -l <out) -eq $total_fs || { fail=1; cat out; }
# Ensure placeholder "-" values used for the eclipsed "virtfs"
test $(grep -c 'virtfs *-' <out) -eq 1 || { fail=1; cat out; }

View File

@ -4,9 +4,9 @@
Index: gnulib-tests/gnulib.mk
===================================================================
--- gnulib-tests/gnulib.mk.orig
+++ gnulib-tests/gnulib.mk
@@ -883,11 +883,11 @@ EXTRA_DIST += test-getloadavg.c signatur
--- gnulib-tests/gnulib.mk.orig 2015-07-09 15:10:56.833805476 +0200
+++ gnulib-tests/gnulib.mk 2015-07-09 15:10:56.851805050 +0200
@@ -907,11 +907,11 @@ EXTRA_DIST += test-getloadavg.c signatur
## end gnulib module getloadavg-tests
## begin gnulib module getlogin-tests

View File

@ -1,66 +0,0 @@
Upstream patch on top of v8.23, i.e. to be removed with v8.24:
Fixes https://bugzilla.opensuse.org/show_bug.cgi?id=933396
Upstream patch:
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=e4627416b4be
From e4627416b4be078a184372b9b0582517612a3c39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Tue, 9 Sep 2014 02:05:45 +0100
Subject: [PATCH] doc: adjust reference to info nodes in man pages
old form: coreutils '$cmd invocation'
new form: '(coreutils) $cmd invocation'
The old form erroneously referenced the node for the 'coreutils'
multi-call program. Now that problematic node name was renamed
in commit v8.23-18-g72e470b, but the newer less ambiguous form
also has the advantage of working with the pinfo viewer for example.
Full discussion at http://bugs.gnu.org/18428
* man/local.mk: Adjust man page references to texinfo nodes.
* src/system.h: Adjust --help references to texinfo nodes.
---
man/dummy-man | 2 +-
man/local.mk | 2 +-
src/system.h | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
Index: man/dummy-man
===================================================================
--- man/dummy-man.orig
+++ man/dummy-man
@@ -69,5 +69,5 @@ The full documentation for
is maintained as a Texinfo manual, which should be accessible
on your system via the command
.IP
-.B info coreutils $bs(aq$progname invocation$bs(aq
+.B info $bs(aq(coreutils) $progname invocation$bs(aq
END
Index: man/local.mk
===================================================================
--- man/local.mk.orig
+++ man/local.mk
@@ -102,7 +102,7 @@ man/dynamic-deps.mk: Makefile
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/man/$$name.x \
--output=$$t/$$name.1 $$t/$$argv \
- --info-page='coreutils \(aq'$$name' invocation\(aq' \
+ --info-page='\(aq(coreutils) '$$name' invocation\(aq' \
&& sed \
-e 's|$*\.td/||g' \
-e '/For complete documentation/d' \
Index: src/system.h
===================================================================
--- src/system.h.orig
+++ src/system.h
@@ -582,7 +582,8 @@ emit_ancillary_info (void)
last_component (program_name));
}
printf (_("For complete documentation, run: "
- "info coreutils '%s invocation'\n"), last_component (program_name));
+ "info '(coreutils) %s invocation'\n"),
+ last_component (program_name));
}
static inline void

View File

@ -1,17 +0,0 @@
---
man/local.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: man/local.mk
===================================================================
--- man/local.mk.orig
+++ man/local.mk
@@ -41,7 +41,7 @@ distclean-local:
test x$(srcdir) = x$(builddir) || rm -f $(ALL_MANS)
# Dependencies common to all man pages. Updated below.
-mandeps =
+mandeps = $(PROGRAMS)
# Depend on this to get version number changes.
mandeps += .version

View File

@ -1,124 +0,0 @@
From coreutils-bounces+pth=suse.de@gnu.org Tue Sep 16 00:19:14 2014
Return-Path: <coreutils-bounces+pth=suse.de@gnu.org>
X-Original-To: pth@wotan.suse.de
Received: from relay1.suse.de (relay1.suse.de [149.44.160.133])
by wotan.suse.de (Postfix) with ESMTP id 9E7716283
for <pth@wotan.suse.de>; Tue, 16 Sep 2014 00:19:14 +0200 (CEST)
Received: by relay1.suse.de (Postfix)
id 9723D28DD; Tue, 16 Sep 2014 00:19:14 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by relay1.suse.de (Postfix) with ESMTP id 91A4228D9
for <pth@suse.de>; Tue, 16 Sep 2014 00:19:14 +0200 (CEST)
X-Virus-Scanned: by amavisd-new at localhost
X-Spam-Flag: NO
X-Spam-Score: -5.868
X-Spam-Level:
X-Spam-Status: No, score=-5.868 tagged_above=-9999 required=5
tests=[BAYES_50=0.8, IS_MAILMAN_LIST=-1, RCVD_IN_DNSWL_HI=-5,
RP_MATCHES_RCVD=-0.668] autolearn=disabled
Received: from relay1.suse.de ([127.0.0.1])
by localhost (localhost [127.0.0.1]) (amavisd-new, port 10026)
with ESMTP id ChE53gAm38xF for <pth@suse.de>;
Tue, 16 Sep 2014 00:19:14 +0200 (CEST)
Received: from mx1.suse.de (cantor1.suse.de [195.135.220.2])
(using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits))
(No client certificate requested)
by relay1.suse.de (Postfix) with ESMTPS id 3DFCE2030
for <pth@suse.de>; Tue, 16 Sep 2014 00:19:14 +0200 (CEST)
Received: from lists.gnu.org (lists.gnu.org [208.118.235.17])
(using TLSv1 with cipher AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.suse.de (Postfix) with ESMTPS id 14E56AAC5
for <pth@suse.de>; Tue, 16 Sep 2014 00:19:14 +0200 (CEST)
Received: from localhost ([::1]:34619 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from <coreutils-bounces+pth=suse.de@gnu.org>)
id 1XTec5-00066K-6z
for pth@suse.de; Mon, 15 Sep 2014 18:19:13 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44002)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from <mail@bernhard-voelker.de>) id 1XTebt-0005zb-Ea
for coreutils@gnu.org; Mon, 15 Sep 2014 18:19:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from <mail@bernhard-voelker.de>) id 1XTebh-0006mb-A2
for coreutils@gnu.org; Mon, 15 Sep 2014 18:19:01 -0400
Received: from mout.kundenserver.de ([212.227.126.130]:61454)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from <mail@bernhard-voelker.de>) id 1XTebh-0006m4-1Y
for coreutils@gnu.org; Mon, 15 Sep 2014 18:18:49 -0400
Received: from blackice.site (pD957CBB4.dip0.t-ipconnect.de [217.87.203.180])
by mrelayeu.kundenserver.de (node=mreue007) with ESMTP (Nemesis)
id 0MY0P5-1Xnddz1jeR-00WkzE; Tue, 16 Sep 2014 00:18:44 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
To: coreutils@gnu.org
Subject: [PATCH] tests: fix false du failure on newer XFS
Date: Tue, 16 Sep 2014 00:17:43 +0200
Message-Id: <1410819463-5423-1-git-send-email-mail@bernhard-voelker.de>
X-Mailer: git-send-email 1.8.4.5
X-Provags-ID: V02:K0:qhDLt5+dLDL9ZojGDjR2JCZUT99RsLhoiyP2U0vHUVe
6sFe6AEQdVdEBTcxwG3rxuMC20RiygA6M3jqShv8YrHI8aMVAd
eE8xJ/hJz3vHhN5RsbqbiGh6bGodZh6z/8pEPo4nIZfvFj5/Oy
IXHy4YysR6g0Ci11Fcpx0MH2q50tuGRgVct132icfAEbWFZM7o
//TkmA8XFocuHSW4d1dv6YXnnf1OA1QDsTHrc7TrX3NwqGqTzl
qIUlhT4OBcqPtunpPR5ty3yLNFY61T33c0Y4tB0LRpDgS7bbE7
Gk8SkMUBH447xJjIFByTt+DQk+mgpo1h1Eo2vUlIFXzNzZrdaV
BcRVj5v4GBKK1/e2y3rVH4VUBgbCZiJhb9TsicXKVwkF+Xejjb
mCtjMo7wyvEjtHeCr0aBNLE18yA2j8FEEI=
X-UI-Out-Filterresults: notjunk:1;
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic]
X-Received-From: 212.227.126.130
Cc: Bernhard Voelker <mail@bernhard-voelker.de>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
<mailto:coreutils-request@gnu.org?subject=subscribe>
Errors-To: coreutils-bounces+pth=suse.de@gnu.org
Sender: coreutils-bounces+pth=suse.de@gnu.org
Status: RO
Content-Length: 1239
Lines: 40
* tests/du/2g.sh: Similar to the fix for a dd test (see commit
v8.22-65-g7c03fe2), avoid speculative preallocation by creating
the 'big' file in one go instead of appending to it in the loop.
Remove debugging statements as the output with 'set -x' is
sufficient nowadays.
---
tests/du/2g.sh | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
Index: tests/du/2g.sh
===================================================================
--- tests/du/2g.sh.orig
+++ tests/du/2g.sh
@@ -43,15 +43,14 @@ test $min_kb -lt $free_kb ||
big=big
rm -f $big
-test -t 1 || printf 'creating a 2GB file...\n'
-for i in $(seq 100); do
- # Note: 2147483648 == 2^31. Print floor(2^31/100) per iteration.
- printf %21474836s x >> $big || fail=1
- # On the final iteration, append the remaining 48 bytes.
- test $i = 100 && { printf %48s x >> $big || fail=1; }
- test -t 1 && printf 'creating a 2GB file: %d%% complete\r' $i
-done
-echo
+{
+ for i in $(seq 100); do
+ # Note: 2147483648 == 2^31. Print floor(2^31/100) per iteration.
+ printf %21474836s x || fail=1
+ done
+ # After the final iteration, append the remaining 48 bytes.
+ printf %48s x || fail=1
+} > $big || fail=1
du -k $big > out1 || fail=1
rm -f $big

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,13 @@
---
gnulib-tests/test-isnanl.h | 4 +++-
gnulib-tests/test-isnanl.h | 5 +++--
tests/misc/help-version.sh | 1 +
tests/other-fs-tmpdir | 3 +++
3 files changed, 7 insertions(+), 1 deletion(-)
3 files changed, 7 insertions(+), 2 deletions(-)
Index: gnulib-tests/test-isnanl.h
===================================================================
--- gnulib-tests/test-isnanl.h.orig
+++ gnulib-tests/test-isnanl.h
--- gnulib-tests/test-isnanl.h.orig 2015-07-09 14:59:20.897259261 +0200
+++ gnulib-tests/test-isnanl.h 2015-07-09 15:04:01.173639553 +0200
@@ -47,7 +47,7 @@ main ()
/* Quiet NaN. */
ASSERT (isnanl (NaNl ()));
@ -22,22 +22,22 @@ Index: gnulib-tests/test-isnanl.h
ASSERT (isnanl (x.value));
}
+#if 0
/* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
Intel IA-64 Architecture Software Developer's Manual, Volume 1:
@@ -131,6 +132,7 @@ main ()
ASSERT (isnanl (x.value));
/* isnanl should return something for noncanonical values. */
{ /* Pseudo-NaN. */
static memory_long_double x =
@@ -125,6 +126,6 @@ main ()
ASSERT (isnanl (x.value) || !isnanl (x.value));
}
#endif
-
+#endif
return 0;
}
Index: tests/misc/help-version.sh
===================================================================
--- tests/misc/help-version.sh.orig
+++ tests/misc/help-version.sh
@@ -240,6 +240,7 @@ parted_setup () { args="-s $tmp_in mklab
--- tests/misc/help-version.sh.orig 2015-07-09 14:59:20.897259261 +0200
+++ tests/misc/help-version.sh 2015-07-09 14:59:27.227110899 +0200
@@ -237,6 +237,7 @@ parted_setup () { args="-s $tmp_in mklab
for i in $built_programs; do
# Skip these.
case $i in chroot|stty|tty|false|chcon|runcon|coreutils) continue;; esac
@ -47,8 +47,8 @@ Index: tests/misc/help-version.sh
echo z |gzip > $zin
Index: tests/other-fs-tmpdir
===================================================================
--- tests/other-fs-tmpdir.orig
+++ tests/other-fs-tmpdir
--- tests/other-fs-tmpdir.orig 2015-07-09 14:59:20.898259238 +0200
+++ tests/other-fs-tmpdir 2015-07-09 14:59:27.227110899 +0200
@@ -43,6 +43,9 @@ for d in $CANDIDATE_TMP_DIRS; do
done

View File

@ -11,15 +11,15 @@ Subject: [PATCH 1/1] copy: add OCFS2 reflink support
Signed-off-by: Jie Liu <jeff....@oracle.com>
---
src/copy.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 90 insertions(+), 8 deletions(-)
src/copy.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 91 insertions(+), 8 deletions(-)
Index: src/copy.c
===================================================================
--- src/copy.c.orig
+++ src/copy.c
@@ -229,6 +229,46 @@ sparse_copy (int src_fd, int dest_fd, ch
return true;
--- src/copy.c.orig 2015-06-26 19:05:22.000000000 +0200
+++ src/copy.c 2015-07-09 14:58:48.105027875 +0200
@@ -324,6 +324,47 @@ sparse_copy (int src_fd, int dest_fd, ch
return true;
}
+/* Perform the OCFS2 CoW reflink ioctl(2) operation if possible.
@ -61,11 +61,12 @@ Index: src/copy.c
+ return -1;
+#endif
+}
+
+
/* Perform the O(1) btrfs clone operation, if possible.
Upon success, return 0. Otherwise, return -1 and set errno. */
static inline int
@@ -938,6 +978,45 @@ copy_reg (char const *src_name, char con
@@ -1040,6 +1081,45 @@ copy_reg (char const *src_name, char con
goto close_src_desc;
}
@ -111,7 +112,7 @@ Index: src/copy.c
/* The semantics of the following open calls are mandated
by the specs for both cp and mv. */
if (! *new_dst)
@@ -1083,17 +1162,20 @@ copy_reg (char const *src_name, char con
@@ -1185,17 +1265,20 @@ copy_reg (char const *src_name, char con
/* --attributes-only overrides --reflink. */
if (data_copy_required && x->reflink_mode)
{

View File

@ -1,11 +1,11 @@
---
doc/coreutils.texi | 38 +-------------------------------------
1 file changed, 1 insertion(+), 37 deletions(-)
doc/coreutils.texi | 42 +-----------------------------------------
1 file changed, 1 insertion(+), 41 deletions(-)
Index: doc/coreutils.texi
===================================================================
--- doc/coreutils.texi.orig
+++ doc/coreutils.texi
--- doc/coreutils.texi.orig 2015-06-26 19:05:22.000000000 +0200
+++ doc/coreutils.texi 2015-07-09 14:53:28.486520508 +0200
@@ -69,7 +69,6 @@
* groups: (coreutils)groups invocation. Print group names a user is in.
* head: (coreutils)head invocation. Output the first part of files.
@ -23,7 +23,7 @@ Index: doc/coreutils.texi
* SELinux context:: chcon runcon
* Modified command invocation:: chroot env nice nohup stdbuf timeout
* Process control:: kill
@@ -421,7 +420,6 @@ System context
@@ -420,7 +419,6 @@ System context
* date invocation:: Print or set system date and time
* nproc invocation:: Print the number of processors
* uname invocation:: Print system information
@ -31,7 +31,7 @@ Index: doc/coreutils.texi
* hostid invocation:: Print numeric host identifier
* uptime invocation:: Print system uptime and load
@@ -14922,7 +14920,6 @@ information.
@@ -14793,7 +14791,6 @@ information.
* arch invocation:: Print machine hardware name.
* nproc invocation:: Print the number of processors.
* uname invocation:: Print system information.
@ -39,7 +39,7 @@ Index: doc/coreutils.texi
* hostid invocation:: Print numeric host identifier.
* uptime invocation:: Print system uptime and load.
@end menu
@@ -15744,15 +15741,6 @@ easily available, as is the case with Li
@@ -15618,15 +15615,6 @@ easily available, as is the case with Li
Print the machine hardware name (sometimes called the hardware class
or hardware type).
@ -55,7 +55,7 @@ Index: doc/coreutils.texi
@item -p
@itemx --processor
@opindex -p
@@ -15806,30 +15794,6 @@ Print the kernel version.
@@ -15680,34 +15668,6 @@ Print the kernel version.
@exitstatus
@ -81,6 +81,10 @@ Index: doc/coreutils.texi
-The only options are @option{--help} and @option{--version}. @xref{Common
-options}.
-
-@command{hostname} is not installed by default, and other packages
-also supply a @command{hostname} command, so portable scripts should
-not rely on its existence or on the exact behavior documented above.
-
-@exitstatus
-

View File

@ -4,8 +4,8 @@
Index: doc/coreutils.texi
===================================================================
--- doc/coreutils.texi.orig
+++ doc/coreutils.texi
--- doc/coreutils.texi.orig 2015-07-09 14:53:50.295009198 +0200
+++ doc/coreutils.texi 2015-07-09 14:54:48.805637437 +0200
@@ -72,7 +72,6 @@
* id: (coreutils)id invocation. Print user identity.
* install: (coreutils)install invocation. Copy files and set attributes.
@ -20,9 +20,9 @@ Index: doc/coreutils.texi
* Modified command invocation:: chroot env nice nohup stdbuf timeout
-* Process control:: kill
* Delaying:: sleep
* Numeric operations:: factor seq
* Numeric operations:: factor numfmt seq
* File permissions:: Access modes
@@ -448,10 +446,6 @@ Modified command invocation
@@ -447,10 +445,6 @@ Modified command invocation
* stdbuf invocation:: Run a command with modified I/O buffering
* timeout invocation:: Run a command with a time limit
@ -33,7 +33,7 @@ Index: doc/coreutils.texi
Delaying
* sleep invocation:: Delay for a specified time
@@ -16688,90 +16682,6 @@ the exit status of @var{command} otherwi
@@ -16602,90 +16596,6 @@ the exit status of @var{command} otherwi
@end display

View File

@ -19,9 +19,9 @@ with a diagnostic like:
Index: gnulib-tests/gnulib.mk
===================================================================
--- gnulib-tests/gnulib.mk.orig
+++ gnulib-tests/gnulib.mk
@@ -2206,9 +2206,10 @@ EXTRA_DIST += test-time.c
--- gnulib-tests/gnulib.mk.orig 2015-06-19 13:24:05.000000000 +0200
+++ gnulib-tests/gnulib.mk 2015-07-09 15:11:24.099160681 +0200
@@ -2238,9 +2238,10 @@ EXTRA_DIST += test-time.c
## begin gnulib module tls-tests

View File

@ -4,8 +4,8 @@
Index: tests/misc/shuf-reservoir.sh
===================================================================
--- tests/misc/shuf-reservoir.sh.orig
+++ tests/misc/shuf-reservoir.sh
--- tests/misc/shuf-reservoir.sh.orig 2015-07-09 16:52:02.577880662 +0200
+++ tests/misc/shuf-reservoir.sh 2015-07-09 16:59:38.928158153 +0200
@@ -37,8 +37,7 @@ run_shuf_n()
# Critical memory-related bugs will cause a segfault here

View File

@ -1,45 +0,0 @@
Upstream patch on top of v8.23; to be removed in v8.24.
Avoid a false positive failure of the coreutils-testsuite.
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=bfb4f5c8b7
Related execve() bug report:
https://bugzilla.novell.com/show_bug.cgi?id=915889
From bfb4f5c8b791fdcc3cdba87a5182fc684fa8cd24 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Tue, 3 Feb 2015 01:52:04 +0100
Subject: [PATCH] tests: avoid a FP on aarch64 when comparing env/printenv
output
The following test fails on aarch64 on openSUSE's OpenBuildService
due to glibc's execvp reversing the pointers of 'environ', i.e.,
the output of "env|tac" equals "env env" on that platform.
* tests/misc/printenv.sh: Use 'env env' to work around the behavior
on that platform.
While at it, fix the grep pattern which suppressed all environment
variables starting with an underscore "_" instead of "$_" (and
"$LD_PRELOAD") only.
---
tests/misc/printenv.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: tests/misc/printenv.sh
===================================================================
--- tests/misc/printenv.sh.orig
+++ tests/misc/printenv.sh
@@ -23,8 +23,12 @@ print_ver_ printenv
# printenv as a builtin, so we must invoke it via "env".
# But beware of $_, set by many shells to the last command run.
# Also, filter out LD_PRELOAD, which is set when running under valgrind.
-env | grep -Ev '^(_|LD_PRELOAD=)' > exp || framework_failure_
-env -- printenv | grep -Ev '^(_|LD_PRELOAD=)' > out || fail=1
+# Note the apparently redundant "env env": this is to ensure to get
+# env's output the same way as that of printenv and works around a bug
+# on aarch64 at least where libc's execvp reverses the order of the
+# output.
+env -- env | grep -Ev '^(_|LD_PRELOAD)=' > exp || framework_failure_
+env -- printenv | grep -Ev '^(_|LD_PRELOAD)=' > out || fail=1
compare exp out || fail=1
# POSIX is clear that environ may, but need not be, sorted.

View File

@ -1,100 +0,0 @@
Upstream patch on top of v8.23 (to be removed with v8.24).
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=111a2b91da
From 111a2b91da142bf6fb9edb7836c1979ba698cf6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Wed, 29 Oct 2014 14:08:05 +0000
Subject: [PATCH] tests: make inotify-rotate more robust and efficient
* tests/tail-2/inotify-rotate.sh: Use retry_delay_
to employ an exponential backoff with a total delay of
up to 25.5s. The 15s delay was seen to trigger a false
failure in http://hydra.nixos.org/build/16546517
Also remove the .1s sleep in each of the 50 iterations
to reduce the running time of the test and thus the
expensive_ tag on this test was removed.
Also ensure that we use the standard exit procedure
upon failure to avoid any erroneous diagnostics due
to persistent files on NFS.
---
tests/tail-2/inotify-rotate.sh | 45 ++++++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 20 deletions(-)
Index: tests/tail-2/inotify-rotate.sh
===================================================================
--- tests/tail-2/inotify-rotate.sh.orig
+++ tests/tail-2/inotify-rotate.sh
@@ -22,48 +22,53 @@ if test "$VERBOSE" = yes; then
fi
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
-expensive_
-# Wait several seconds for grep REGEXP FILE to succeed.
-# Usage: grep_timeout REGEXP FILE
-grep_timeout()
+check_tail_output()
{
- local j
- for j in $(seq 150); do
- grep $1 $2 > /dev/null && return 0
- sleep 0.1
- done
- return 1
+ local delay="$1"
+ grep "$tail_re" out > /dev/null ||
+ { sleep $delay; return 1; }
}
+# Wait up to 25.5 seconds for grep REGEXP 'out' to succeed.
+grep_timeout() { tail_re="$1" retry_delay_ check_tail_output .1 8; }
+
# For details, see
# http://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00213.html
+cleanup_fail()
+{
+ cat out
+ warn_ $1
+ kill $pid
+}
+
# Perform at least this many iterations, because on multi-core systems
# the offending sequence of events can be surprisingly uncommon.
for i in $(seq 50); do
echo $i
- rm -rf k x out
+ rm -f k x out
+
# Normally less than a second is required here, but with heavy load
# and a lot of disk activity, even 20 seconds is insufficient, which
# leads to this timeout killing tail before the "ok" is written below.
>k && >x || framework_failure_ failed to initialize files
- timeout 40 tail -F k > out 2>&1 &
+ timeout 60 tail -F k > out 2>&1 &
pid=$!
- sleep .1
+
echo b > k;
# wait for b to appear in out
- grep_timeout b out || fail_ failed to find b in out
- while :; do grep b out > /dev/null && break; done
+ grep_timeout 'b' || { cleanup_fail 'failed to find b in out'; break; }
+
mv x k
# wait for tail to detect the rename
- grep_timeout tail: out || { cat out; fail_ failed to detect rename; }
+ grep_timeout 'tail:' || { cleanup_fail 'failed to detect rename'; break; }
+
echo ok >> k
- found=0
- # wait up to 10 seconds for "ok" to appear in out
- grep_timeout ok out && found=1
+ # wait for "ok" to appear in 'out'
+ grep_timeout 'ok' || { cleanup_fail 'failed to detect echoed ok'; break; }
+
kill $pid
- test $found = 0 && { cat out; fail_ failed to detect echoed '"ok"'; }
done
wait

View File

@ -1,20 +0,0 @@
Avoid spurious false positives on OBS due to high load.
Increase threshold, as most failures in the last 2 years
have been seen with around 60-63 seconds.
---
tests/rm/ext3-perf.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: tests/rm/ext3-perf.sh
===================================================================
--- tests/rm/ext3-perf.sh.orig
+++ tests/rm/ext3-perf.sh
@@ -24,7 +24,7 @@ very_expensive_
# Using rm -rf to remove a 400k-entry directory takes:
# - 9 seconds with the patch, on a 2-yr-old system
# - 350 seconds without the patch, on a high-end system (disk 20-30% faster)
-threshold_seconds=60
+threshold_seconds=90 # increased on OBS, was: 60
# The number of entries in our test directory.
n=400000

View File

@ -14,9 +14,9 @@ or arm6l. Strip the tests down from 37 to 3.
Index: tests/local.mk
===================================================================
--- tests/local.mk.orig
+++ tests/local.mk
@@ -662,14 +662,9 @@ all_tests = \
--- tests/local.mk.orig 2015-07-09 15:10:56.769806990 +0200
+++ tests/local.mk 2015-07-09 15:10:56.839805334 +0200
@@ -678,14 +678,9 @@ all_tests = \
# See tests/factor/create-test.sh.
tf = tests/factor
factor_tests = \

View File

@ -1,3 +1,169 @@
-------------------------------------------------------------------
Thu Jul 9 15:12:10 CEST 2015 - pth@suse.de
- Update to 8.24:
** Bug fixes
* dd supports more robust SIGINFO/SIGUSR1 handling for outputting statistics.
Previously those signals may have inadvertently terminated the process.
* df --local no longer hangs with inaccessible remote mounts.
[bug introduced in coreutils-8.21]
* du now silently ignores all directory cycles due to bind mounts.
Previously it would issue a warning and exit with a failure status.
[bug introduced in coreutils-8.1 and partially fixed in coreutils-8.23]
* chroot again calls chroot(DIR) and chdir("/"), even if DIR is "/".
This handles separate bind mounted "/" trees, and environments
depending on the implicit chdir("/").
[bugs introduced in coreutils-8.23]
* cp no longer issues an incorrect warning about directory hardlinks when a
source directory is specified multiple times. Now, consistent with other
file types, a warning is issued for source directories with duplicate names,
or with -H the directory is copied again using the symlink name.
* factor avoids writing partial lines, thus supporting parallel operation.
[the bug dates back to the initial implementation]
* head, od, split, tac, tail, and wc no longer mishandle input from files in
/proc and /sys file systems that report somewhat-incorrect file sizes.
* mkdir --parents -Z now correctly sets the context for the last component,
even if the parent directory exists and has a different default context.
[bug introduced with the -Z restorecon functionality in coreutils-8.22]
* numfmt no longer outputs incorrect overflowed values seen with certain
large numbers, or with numbers with increased precision.
[bug introduced when numfmt was added in coreutils-8.21]
* numfmt now handles leading zeros correctly, not counting them when
settings processing limits, and making them optional with floating point.
[bug introduced when numfmt was added in coreutils-8.21]
* paste no longer truncates output for large input files. This would happen
for example with files larger than 4GiB on 32 bit systems with a '\n'
character at the 4GiB position.
[the bug dates back to the initial implementation]
* rm indicates the correct number of arguments in its confirmation prompt,
on all platforms. [bug introduced in coreutils-8.22]
* shuf -i with a single redundant operand, would crash instead of issuing
a diagnostic. [bug introduced in coreutils-8.22]
* tail releases inotify resources when unused. Previously it could exhaust
resources with many files, or with -F if files were replaced many times.
[bug introduced in coreutils-7.5]
* tail -f again follows changes to a file after it's renamed.
[bug introduced in coreutils-7.5]
* tail --follow no longer misses changes to files if those files were
replaced before inotify watches were created.
[bug introduced in coreutils-7.5]
* tail --follow consistently outputs all data for a truncated file.
[bug introduced in the beginning]
* tail --follow=name correctly outputs headers for multiple files
when those files are being created or renamed.
[bug introduced in coreutils-7.5]
** New features
* chroot accepts the new --skip-chdir option to not change the working directory
to "/" after changing into the chroot(2) jail, thus retaining the current wor-
king directory. The new option is only permitted if the new root directory is
the old "/", and therefore is useful with the --group and --userspec options.
* dd accepts a new status=progress level to print data transfer statistics
on stderr approximately every second.
* numfmt can now process multiple fields with field range specifications similar
to cut, and supports setting the output precision with the --format option.
* split accepts a new --separator option to select a record separator character
other than the default newline character.
* stty allows setting the "extproc" option where supported, which is
a useful setting with high latency links.
* sync no longer ignores arguments, and syncs each specified file, or with the
--file-system option, the file systems associated with each specified file.
* tee accepts a new --output-error option to control operation with pipes
and output errors in general.
** Changes in behavior
* df no longer suppresses separate exports of the same remote device, as
these are generally explicitly mounted. The --total option does still
suppress duplicate remote file systems.
[suppression was introduced in coreutils-8.21]
* mv no longer supports moving a file to a hardlink, instead issuing an error.
The implementation was susceptible to races in the presence of multiple mv
instances, which could result in both hardlinks being deleted. Also on case
insensitive file systems like HFS, mv would just remove a hardlinked 'file'
if called like `mv file File`. The feature was added in coreutils-5.0.1.
* numfmt --from-unit and --to-unit options now interpret suffixes as SI units,
and IEC (power of 2) units are now specified by appending 'i'.
* tee will exit early if there are no more writable outputs.
* tee does not treat the file operand '-' as meaning standard output any longer,
for better conformance to POSIX. This feature was added in coreutils-5.3.0.
* timeout --foreground no longer sends SIGCONT to the monitored process,
which was seen to cause intermittent issues with GDB for example.
** Improvements
* cp,install,mv will convert smaller runs of NULs in the input to holes,
and cp --sparse=always avoids speculative preallocation on XFS for example.
* cp will read sparse files more efficiently when the destination is a
non regular file. For example when copying a disk image to a device node.
* mv will try a reflink before falling back to a standard copy, which is
more efficient when moving files across BTRFS subvolume boundaries.
* stat and tail now know about IBRIX. stat -f --format=%T now reports the file
system type, and tail -f uses polling for files on IBRIX file systems.
* wc -l processes short lines much more efficiently.
* References from --help and the man pages of utilities have been corrected
in various cases, and more direct links to the corresponding online
documentation are provided.
- Patches adapted because of changed sources:
coreutils-disable_tests.patch
coreutils-i18n.patch
coreutils-misc.patch
coreutils-ocfs2_reflinks.patch
coreutils-remove_hostname_documentation.patch
coreutils-remove_kill_documentation.patch
coreutils-skip-gnulib-test-tls.patch
coreutils-tests-shorten-extreme-factor-tests.patch
sort-keycompare-mb.patch
- Patches removed because they're included in 8.24:
coreutils-chroot-perform-chdir-unless-skip-chdir.patch
coreutils-df-doc-df-a-includes-duplicate-file-systems.patch
coreutils-df-improve-mount-point-selection.patch
coreutils-df-show-all-remote-file-systems.patch
coreutils-df-total-suppress-separate-remotes.patch
coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch
coreutils-fix_false_du_failure_on_newer_xfs.patch
coreutils-fix-man-deps.patch
coreutils-tests-aarch64-env.patch
coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch
coreutils-tests-rm-ext3-perf-increase-timeout.patch
-------------------------------------------------------------------
Wed Jun 3 10:56:39 UTC 2015 - mail@bernhard-voelker.de

View File

@ -21,7 +21,7 @@ Summary: GNU Core Utilities
License: GPL-3.0+
Group: System/Base
Url: http://www.gnu.org/software/coreutils/
Version: 8.23
Version: 8.24
Release: 0
#################################################################
@ -115,12 +115,6 @@ Patch112: coreutils-getaddrinfo.patch
# Assorted fixes
Patch113: coreutils-misc.patch
# Upstream patches for df(1) on top of v8.23, thus aligning with SLES12.
Patch201: coreutils-df-improve-mount-point-selection.patch
Patch202: coreutils-df-doc-df-a-includes-duplicate-file-systems.patch
Patch203: coreutils-df-show-all-remote-file-systems.patch
Patch204: coreutils-df-total-suppress-separate-remotes.patch
# Skip 2 valgrind'ed sort tests on ppc/ppc64 which would fail due to
# a glibc issue in mkstemp.
Patch300: coreutils-skip-some-sort-tests-on-ppc.patch
@ -132,34 +126,9 @@ Patch301: coreutils-skip-gnulib-test-tls.patch
# tests: shorten extreme-expensive factor tests
Patch303: coreutils-tests-shorten-extreme-factor-tests.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Fix the dependencies to generate man pages after linking.
Patch400: coreutils-fix-man-deps.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Fixes a regression in chroot which did not chdir("/") in all cases.
Patch401: coreutils-chroot-perform-chdir-unless-skip-chdir.patch
Patch416: coreutils-fix_false_du_failure_on_newer_xfs.patch
Patch500: coreutils-disable_tests.patch
Patch501: coreutils-test_without_valgrind.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Avoids a spurious false positive failure due to high load.
Patch502: coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch
# Avoid false positives on OBS due to high load; increase timeout.
Patch503: coreutils-tests-rm-ext3-perf-increase-timeout.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Work around false positives of the testsuite on OBS/aarch64.
Patch504: coreutils-tests-aarch64-env.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Fix reference to info pages in man pages (boo#933396).
Patch505: coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch
# ================================================
%description
These are the GNU core utilities. This package is the union of
@ -193,11 +162,6 @@ the GNU fileutils, sh-utils, and textutils packages.
%patch112
%patch113
%patch201
%patch202
%patch203
%patch204
%patch300
%ifarch %ix86 x86_64 ppc ppc64
@ -205,16 +169,8 @@ the GNU fileutils, sh-utils, and textutils packages.
%endif
%patch303
%patch400
%patch401
%patch416
%patch500
%patch501
%patch502
%patch503
%patch504
%patch505
#???## We need to statically link to gmp, otherwise we have a build loop
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in

View File

@ -1,3 +1,169 @@
-------------------------------------------------------------------
Thu Jul 9 15:12:10 CEST 2015 - pth@suse.de
- Update to 8.24:
** Bug fixes
* dd supports more robust SIGINFO/SIGUSR1 handling for outputting statistics.
Previously those signals may have inadvertently terminated the process.
* df --local no longer hangs with inaccessible remote mounts.
[bug introduced in coreutils-8.21]
* du now silently ignores all directory cycles due to bind mounts.
Previously it would issue a warning and exit with a failure status.
[bug introduced in coreutils-8.1 and partially fixed in coreutils-8.23]
* chroot again calls chroot(DIR) and chdir("/"), even if DIR is "/".
This handles separate bind mounted "/" trees, and environments
depending on the implicit chdir("/").
[bugs introduced in coreutils-8.23]
* cp no longer issues an incorrect warning about directory hardlinks when a
source directory is specified multiple times. Now, consistent with other
file types, a warning is issued for source directories with duplicate names,
or with -H the directory is copied again using the symlink name.
* factor avoids writing partial lines, thus supporting parallel operation.
[the bug dates back to the initial implementation]
* head, od, split, tac, tail, and wc no longer mishandle input from files in
/proc and /sys file systems that report somewhat-incorrect file sizes.
* mkdir --parents -Z now correctly sets the context for the last component,
even if the parent directory exists and has a different default context.
[bug introduced with the -Z restorecon functionality in coreutils-8.22]
* numfmt no longer outputs incorrect overflowed values seen with certain
large numbers, or with numbers with increased precision.
[bug introduced when numfmt was added in coreutils-8.21]
* numfmt now handles leading zeros correctly, not counting them when
settings processing limits, and making them optional with floating point.
[bug introduced when numfmt was added in coreutils-8.21]
* paste no longer truncates output for large input files. This would happen
for example with files larger than 4GiB on 32 bit systems with a '\n'
character at the 4GiB position.
[the bug dates back to the initial implementation]
* rm indicates the correct number of arguments in its confirmation prompt,
on all platforms. [bug introduced in coreutils-8.22]
* shuf -i with a single redundant operand, would crash instead of issuing
a diagnostic. [bug introduced in coreutils-8.22]
* tail releases inotify resources when unused. Previously it could exhaust
resources with many files, or with -F if files were replaced many times.
[bug introduced in coreutils-7.5]
* tail -f again follows changes to a file after it's renamed.
[bug introduced in coreutils-7.5]
* tail --follow no longer misses changes to files if those files were
replaced before inotify watches were created.
[bug introduced in coreutils-7.5]
* tail --follow consistently outputs all data for a truncated file.
[bug introduced in the beginning]
* tail --follow=name correctly outputs headers for multiple files
when those files are being created or renamed.
[bug introduced in coreutils-7.5]
** New features
* chroot accepts the new --skip-chdir option to not change the working directory
to "/" after changing into the chroot(2) jail, thus retaining the current wor-
king directory. The new option is only permitted if the new root directory is
the old "/", and therefore is useful with the --group and --userspec options.
* dd accepts a new status=progress level to print data transfer statistics
on stderr approximately every second.
* numfmt can now process multiple fields with field range specifications similar
to cut, and supports setting the output precision with the --format option.
* split accepts a new --separator option to select a record separator character
other than the default newline character.
* stty allows setting the "extproc" option where supported, which is
a useful setting with high latency links.
* sync no longer ignores arguments, and syncs each specified file, or with the
--file-system option, the file systems associated with each specified file.
* tee accepts a new --output-error option to control operation with pipes
and output errors in general.
** Changes in behavior
* df no longer suppresses separate exports of the same remote device, as
these are generally explicitly mounted. The --total option does still
suppress duplicate remote file systems.
[suppression was introduced in coreutils-8.21]
* mv no longer supports moving a file to a hardlink, instead issuing an error.
The implementation was susceptible to races in the presence of multiple mv
instances, which could result in both hardlinks being deleted. Also on case
insensitive file systems like HFS, mv would just remove a hardlinked 'file'
if called like `mv file File`. The feature was added in coreutils-5.0.1.
* numfmt --from-unit and --to-unit options now interpret suffixes as SI units,
and IEC (power of 2) units are now specified by appending 'i'.
* tee will exit early if there are no more writable outputs.
* tee does not treat the file operand '-' as meaning standard output any longer,
for better conformance to POSIX. This feature was added in coreutils-5.3.0.
* timeout --foreground no longer sends SIGCONT to the monitored process,
which was seen to cause intermittent issues with GDB for example.
** Improvements
* cp,install,mv will convert smaller runs of NULs in the input to holes,
and cp --sparse=always avoids speculative preallocation on XFS for example.
* cp will read sparse files more efficiently when the destination is a
non regular file. For example when copying a disk image to a device node.
* mv will try a reflink before falling back to a standard copy, which is
more efficient when moving files across BTRFS subvolume boundaries.
* stat and tail now know about IBRIX. stat -f --format=%T now reports the file
system type, and tail -f uses polling for files on IBRIX file systems.
* wc -l processes short lines much more efficiently.
* References from --help and the man pages of utilities have been corrected
in various cases, and more direct links to the corresponding online
documentation are provided.
- Patches adapted because of changed sources:
coreutils-disable_tests.patch
coreutils-i18n.patch
coreutils-misc.patch
coreutils-ocfs2_reflinks.patch
coreutils-remove_hostname_documentation.patch
coreutils-remove_kill_documentation.patch
coreutils-skip-gnulib-test-tls.patch
coreutils-tests-shorten-extreme-factor-tests.patch
sort-keycompare-mb.patch
- Patches removed because they're included in 8.24:
coreutils-chroot-perform-chdir-unless-skip-chdir.patch
coreutils-df-doc-df-a-includes-duplicate-file-systems.patch
coreutils-df-improve-mount-point-selection.patch
coreutils-df-show-all-remote-file-systems.patch
coreutils-df-total-suppress-separate-remotes.patch
coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch
coreutils-fix_false_du_failure_on_newer_xfs.patch
coreutils-fix-man-deps.patch
coreutils-tests-aarch64-env.patch
coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch
coreutils-tests-rm-ext3-perf-increase-timeout.patch
-------------------------------------------------------------------
Wed Jun 3 10:56:39 UTC 2015 - mail@bernhard-voelker.de

View File

@ -21,7 +21,7 @@ Summary: GNU Core Utilities
License: GPL-3.0+
Group: System/Base
Url: http://www.gnu.org/software/coreutils/
Version: 8.23
Version: 8.24
Release: 0
#################################################################
@ -115,12 +115,6 @@ Patch112: coreutils-getaddrinfo.patch
# Assorted fixes
Patch113: coreutils-misc.patch
# Upstream patches for df(1) on top of v8.23, thus aligning with SLES12.
Patch201: coreutils-df-improve-mount-point-selection.patch
Patch202: coreutils-df-doc-df-a-includes-duplicate-file-systems.patch
Patch203: coreutils-df-show-all-remote-file-systems.patch
Patch204: coreutils-df-total-suppress-separate-remotes.patch
# Skip 2 valgrind'ed sort tests on ppc/ppc64 which would fail due to
# a glibc issue in mkstemp.
Patch300: coreutils-skip-some-sort-tests-on-ppc.patch
@ -132,34 +126,9 @@ Patch301: coreutils-skip-gnulib-test-tls.patch
# tests: shorten extreme-expensive factor tests
Patch303: coreutils-tests-shorten-extreme-factor-tests.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Fix the dependencies to generate man pages after linking.
Patch400: coreutils-fix-man-deps.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Fixes a regression in chroot which did not chdir("/") in all cases.
Patch401: coreutils-chroot-perform-chdir-unless-skip-chdir.patch
Patch416: coreutils-fix_false_du_failure_on_newer_xfs.patch
Patch500: coreutils-disable_tests.patch
Patch501: coreutils-test_without_valgrind.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Avoids a spurious false positive failure due to high load.
Patch502: coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch
# Avoid false positives on OBS due to high load; increase timeout.
Patch503: coreutils-tests-rm-ext3-perf-increase-timeout.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Work around false positives of the testsuite on OBS/aarch64.
Patch504: coreutils-tests-aarch64-env.patch
# Upstream patch on top of v8.23 (to be removed in v8.24).
# Fix reference to info pages in man pages (boo#933396).
Patch505: coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch
# ================================================
%description
These are the GNU core utilities. This package is the union of
@ -193,11 +162,6 @@ the GNU fileutils, sh-utils, and textutils packages.
%patch112
%patch113
%patch201
%patch202
%patch203
%patch204
%patch300
%ifarch %ix86 x86_64 ppc ppc64
@ -205,16 +169,8 @@ the GNU fileutils, sh-utils, and textutils packages.
%endif
%patch303
%patch400
%patch401
%patch416
%patch500
%patch501
%patch502
%patch503
%patch504
%patch505
#???## We need to statically link to gmp, otherwise we have a build loop
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in

View File

@ -15,14 +15,14 @@ between the trailing blank and tabs leads to a different result there.
---
src/sort.c | 22 ++++++++++++++++++++--
tests/misc/sort.pl | 5 +++++
2 files changed, 25 insertions(+), 2 deletions(-)
tests/misc/sort.pl | 1 +
2 files changed, 21 insertions(+), 2 deletions(-)
Index: src/sort.c
===================================================================
--- src/sort.c.orig
+++ src/sort.c
@@ -3236,6 +3236,9 @@ keycompare_mb (const struct line *a, con
--- src/sort.c.orig 2015-07-09 14:50:08.426211492 +0200
+++ src/sort.c 2015-07-09 14:50:08.439211187 +0200
@@ -3235,6 +3235,9 @@ keycompare_mb (const struct line *a, con
size_t lena = lima <= texta ? 0 : lima - texta;
size_t lenb = limb <= textb ? 0 : limb - textb;
@ -32,7 +32,7 @@ Index: src/sort.c
char const *translate = key->translate;
bool const *ignore = key->ignore;
@@ -3255,6 +3258,12 @@ keycompare_mb (const struct line *a, con
@@ -3254,6 +3257,12 @@ keycompare_mb (const struct line *a, con
texta = copy_a; textb = copy_b;
lena = new_len_a; lenb = new_len_b;
}
@ -45,7 +45,7 @@ Index: src/sort.c
if (key->random)
diff = compare_random (texta, lena, textb, lenb);
@@ -3278,13 +3287,22 @@ keycompare_mb (const struct line *a, con
@@ -3277,13 +3286,22 @@ keycompare_mb (const struct line *a, con
diff = 1;
else if (hard_LC_COLLATE && !folding)
{
@ -72,20 +72,9 @@ Index: src/sort.c
goto not_equal;
Index: tests/misc/sort.pl
===================================================================
--- tests/misc/sort.pl.orig
+++ tests/misc/sort.pl
@@ -322,6 +322,10 @@ my @Tests =
["22a", '-k 2,2fd -k 1,1r', {IN=>"3 b\n4 B\n"}, {OUT=>"4 B\n3 b\n"}],
["22b", '-k 2,2d -k 1,1r', {IN=>"3 b\n4 b\n"}, {OUT=>"4 b\n3 b\n"}],
+# This fails in Fedora 20, per Göran Uddeborg in: http://bugs.gnu.org/18540
+["23", '-s -k1,1 -t/', {IN=>"a b/x\na-b-c/x\n"}, {OUT=>"a b/x\na-b-c/x\n"},
+ {ENV => "LC_ALL=$mb_locale"}],
+
["no-file1", 'no-file', {EXIT=>2}, {ERR=>$no_file}],
# This test failed until 1.22f. Sort didn't give an error.
# From Will Edgington.
@@ -446,6 +450,7 @@ if ($mb_locale ne 'C')
--- tests/misc/sort.pl.orig 2015-07-09 14:50:08.429211422 +0200
+++ tests/misc/sort.pl 2015-07-09 14:50:08.440211164 +0200
@@ -450,6 +450,7 @@ if ($mb_locale ne 'C')
#disable several failing tests until investigation, disable all tests with envvars set
next if (grep {ref $_ eq 'HASH' && exists $_->{ENV}} (@new_t));
next if ($test_name =~ "18g" or $test_name =~ "sort-numeric" or $test_name =~ "08[ab]" or $test_name =~ "03[def]" or $test_name =~ "h4" or $test_name =~ "n1" or $test_name =~ "2[01]a");