forked from pool/coreutils
Accepting request 243414 from Base:System
1 OBS-URL: https://build.opensuse.org/request/show/243414 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=103
This commit is contained in:
commit
393292e643
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:5b3e94998152c017e6c75d56b9b994188eb71bf46d4038a642cb9141f6ff1212
|
|
||||||
size 5335124
|
|
3
coreutils-8.23.tar.xz
Normal file
3
coreutils-8.23.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d
|
||||||
|
size 5375612
|
@ -27,7 +27,7 @@ Index: src/local.mk
|
|||||||
|
|
||||||
# The list of all programs (separated in different variables to express
|
# The list of all programs (separated in different variables to express
|
||||||
# the how and when they should be installed) is defined in this makefile
|
# the how and when they should be installed) is defined in this makefile
|
||||||
@@ -271,6 +271,9 @@ src_factor_LDADD += $(LIB_GMP)
|
@@ -276,6 +276,9 @@ src_factor_LDADD += $(LIB_GMP)
|
||||||
# for getloadavg
|
# for getloadavg
|
||||||
src_uptime_LDADD += $(GETLOADAVG_LIBS)
|
src_uptime_LDADD += $(GETLOADAVG_LIBS)
|
||||||
|
|
||||||
|
455
coreutils-chroot-perform-chdir-unless-skip-chdir.patch
Normal file
455
coreutils-chroot-perform-chdir-unless-skip-chdir.patch
Normal file
@ -0,0 +1,455 @@
|
|||||||
|
# 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
|
||||||
|
@@ -172,6 +172,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
|
||||||
|
@@ -16068,7 +16068,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
|
||||||
|
@@ -16078,10 +16081,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}).
|
||||||
|
|
||||||
|
@@ -16090,6 +16094,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
|
||||||
|
@@ -16100,13 +16112,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
|
@ -1,90 +0,0 @@
|
|||||||
Upstream patch on top of 8.22:
|
|
||||||
http://lists.gnu.org/archive/html/coreutils/2014-01/msg00012.html
|
|
||||||
|
|
||||||
Stripped down to the relevant part: NEWS and THANKS.in chunks removed.
|
|
||||||
Original NEWS entry:
|
|
||||||
|
|
||||||
cp -a again sets the correct SELinux context for existing directories in
|
|
||||||
the destination. Previously it set the context of an existing directory
|
|
||||||
to that of its last copied descendent.
|
|
||||||
[bug introduced in coreutils-8.22]
|
|
||||||
|
|
||||||
Originally reported for Fedora by Michal Trunecka in rh#1045122:
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1045122
|
|
||||||
|
|
||||||
______________________________________________________________________
|
|
||||||
From f2f8b688b87b94ed3551f47f9a6422c873acf5d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
|
||||||
Date: Sun, 5 Jan 2014 15:00:55 +0000
|
|
||||||
Subject: [PATCH] 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.
|
|
||||||
---
|
|
||||||
src/copy.c | 13 ++++++++++++-
|
|
||||||
tests/cp/cp-a-selinux.sh | 15 +++++++++++++++
|
|
||||||
2 files changed, 27 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
Index: src/copy.c
|
|
||||||
===================================================================
|
|
||||||
--- src/copy.c.orig
|
|
||||||
+++ src/copy.c
|
|
||||||
@@ -2408,6 +2408,17 @@ copy_internal (char const *src_name, cha
|
|
||||||
else
|
|
||||||
{
|
|
||||||
omitted_permissions = 0;
|
|
||||||
+
|
|
||||||
+ /* For directories, the process global context could be reset for
|
|
||||||
+ descendents, so use it to set the context for existing dirs here.
|
|
||||||
+ This will also give earlier indication of failure to set ctx. */
|
|
||||||
+ if (x->set_security_context || x->preserve_security_context)
|
|
||||||
+ if (! set_file_security_ctx (dst_name, x->preserve_security_context,
|
|
||||||
+ false, x))
|
|
||||||
+ {
|
|
||||||
+ if (x->require_preserve_context)
|
|
||||||
+ goto un_backup;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Decide whether to copy the contents of the directory. */
|
|
||||||
@@ -2598,7 +2609,7 @@ copy_internal (char const *src_name, cha
|
|
||||||
|
|
||||||
/* With -Z or --preserve=context, set the context for existing files.
|
|
||||||
Note this is done already for copy_reg() for reasons described therein. */
|
|
||||||
- if (!new_dst && !x->copy_as_regular
|
|
||||||
+ if (!new_dst && !x->copy_as_regular && !S_ISDIR (src_mode)
|
|
||||||
&& (x->set_security_context || x->preserve_security_context))
|
|
||||||
{
|
|
||||||
if (! set_file_security_ctx (dst_name, x->preserve_security_context,
|
|
||||||
Index: tests/cp/cp-a-selinux.sh
|
|
||||||
===================================================================
|
|
||||||
--- tests/cp/cp-a-selinux.sh.orig
|
|
||||||
+++ tests/cp/cp-a-selinux.sh
|
|
||||||
@@ -41,6 +41,21 @@ test -s err && fail=1 #there must be n
|
|
||||||
ls -Z e | grep $ctx || fail=1
|
|
||||||
ls -Z f | grep $ctx || fail=1
|
|
||||||
|
|
||||||
+# Check handling of existing dirs which requires specific handling
|
|
||||||
+# due to recursion, and was handled incorrectly in coreutils-8.22
|
|
||||||
+mkdir -p backup/existing_dir/ || framework_failure_
|
|
||||||
+ls -Zd backup/existing_dir | grep $ctx && framework_failure_
|
|
||||||
+touch backup/existing_dir/file || framework_failure_
|
|
||||||
+chcon $ctx backup/existing_dir/file || framework_failure_
|
|
||||||
+# Set the dir context to ensure it is reset
|
|
||||||
+mkdir -p --context="$ctx" restore/existing_dir || framework_failure_
|
|
||||||
+# Set the permissions of the source to show they're reset too
|
|
||||||
+chmod o+rw restore/existing_dir
|
|
||||||
+# Copy and ensure existing directories updated
|
|
||||||
+cp -a backup/. restore/
|
|
||||||
+ls -Zd restore/existing_dir | grep $ctx &&
|
|
||||||
+ { ls -lZd restore/existing_dir; fail=1; }
|
|
||||||
+
|
|
||||||
# Check restorecon (-Z) functionality for file and directory
|
|
||||||
get_selinux_type() { ls -Zd "$1" | sed -n 's/.*:\(.*_t\):.*/\1/p'; }
|
|
||||||
# Also make a dir with our known context
|
|
@ -1,154 +0,0 @@
|
|||||||
Port upstream fix for date(1), to be removed with v8.23:
|
|
||||||
|
|
||||||
date could crash or go into an infinite loop when parsing a malformed TZ="".
|
|
||||||
[bug introduced with the --date='TZ="" ..' parsing feature in coreutils-5.3.0]
|
|
||||||
|
|
||||||
This patch consists of 2 upstream commits:
|
|
||||||
|
|
||||||
http://git.sv.gnu.org/cgit/gnulib.git/commit/?id=a10acfb1d2
|
|
||||||
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=a4faa6a0a3
|
|
||||||
|
|
||||||
While the former commit in gnulib actually fixes the issue (and adds a test
|
|
||||||
there), the latter commit in upstream coreutils pulls in that change from
|
|
||||||
gnulib and adds a test for the previously crashing date(1) command.
|
|
||||||
|
|
||||||
-----------------------------------------------
|
|
||||||
commit a10acfb1d2118f9a180181d3fed5399dbbe1df3c
|
|
||||||
Author: Pádraig Brady <P@draigBrady.com>
|
|
||||||
Date: Tue Feb 25 10:58:48 2014 +0000
|
|
||||||
|
|
||||||
parse-datetime: fix crash or infloop in TZ="" parsing
|
|
||||||
|
|
||||||
This was reported in http://bugs.gnu.org/16872
|
|
||||||
from the coreutils command: date -d 'TZ="""'
|
|
||||||
|
|
||||||
The infinite loop for this case was present since the
|
|
||||||
initial TZ="" parsing support in commit de95bdc2 29-10-2004.
|
|
||||||
This was changed to a crash or heap corruption depending
|
|
||||||
on the platform with commit 2e3e4195 18-01-2010.
|
|
||||||
|
|
||||||
* lib/parse-datetime.y (parse_datetime): Break out of the
|
|
||||||
TZ="" parsing loop once the second significant " is found.
|
|
||||||
Also skip over any subsequent whitespace to be consistent
|
|
||||||
with the non TZ= case.
|
|
||||||
* tests/test-parse-datetime.c: Add test cases for TZ="" parsing.
|
|
||||||
|
|
||||||
Omit the NEWS entry from the original patch.
|
|
||||||
|
|
||||||
-----------------------------------------------
|
|
||||||
commit a4faa6a0a3ae93c01d036d830ae7a21b74913baf
|
|
||||||
Author: Pádraig Brady <P@draigBrady.com>
|
|
||||||
Date: Thu Feb 27 23:43:34 2014 +0000
|
|
||||||
|
|
||||||
date: fix crash or infinite loop when parsing a malformed TZ=""
|
|
||||||
|
|
||||||
* 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
|
|
||||||
|
|
||||||
Omit the NEWS entry from the original patch.
|
|
||||||
---
|
|
||||||
gnulib-tests/test-parse-datetime.c | 16 ++++++++++++++++
|
|
||||||
lib/parse-datetime.c | 7 +++++--
|
|
||||||
lib/parse-datetime.y | 7 +++++--
|
|
||||||
tests/misc/date.pl | 7 +++++++
|
|
||||||
4 files changed, 33 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
Index: lib/parse-datetime.y
|
|
||||||
===================================================================
|
|
||||||
--- lib/parse-datetime.y.orig
|
|
||||||
+++ lib/parse-datetime.y
|
|
||||||
@@ -1303,8 +1303,6 @@ parse_datetime (struct timespec *result,
|
|
||||||
char tz1buf[TZBUFSIZE];
|
|
||||||
bool large_tz = TZBUFSIZE < tzsize;
|
|
||||||
bool setenv_ok;
|
|
||||||
- /* Free tz0, in case this is the 2nd or subsequent time through. */
|
|
||||||
- free (tz0);
|
|
||||||
tz0 = get_tz (tz0buf);
|
|
||||||
z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf;
|
|
||||||
for (s = tzbase; *s != '"'; s++)
|
|
||||||
@@ -1316,7 +1314,12 @@ parse_datetime (struct timespec *result,
|
|
||||||
if (!setenv_ok)
|
|
||||||
goto fail;
|
|
||||||
tz_was_altered = true;
|
|
||||||
+
|
|
||||||
p = s + 1;
|
|
||||||
+ while (c = *p, c_isspace (c))
|
|
||||||
+ p++;
|
|
||||||
+
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: lib/parse-datetime.c
|
|
||||||
===================================================================
|
|
||||||
--- lib/parse-datetime.c.orig
|
|
||||||
+++ lib/parse-datetime.c
|
|
||||||
@@ -3207,8 +3207,6 @@ parse_datetime (struct timespec *result,
|
|
||||||
char tz1buf[TZBUFSIZE];
|
|
||||||
bool large_tz = TZBUFSIZE < tzsize;
|
|
||||||
bool setenv_ok;
|
|
||||||
- /* Free tz0, in case this is the 2nd or subsequent time through. */
|
|
||||||
- free (tz0);
|
|
||||||
tz0 = get_tz (tz0buf);
|
|
||||||
z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf;
|
|
||||||
for (s = tzbase; *s != '"'; s++)
|
|
||||||
@@ -3220,7 +3218,12 @@ parse_datetime (struct timespec *result,
|
|
||||||
if (!setenv_ok)
|
|
||||||
goto fail;
|
|
||||||
tz_was_altered = true;
|
|
||||||
+
|
|
||||||
p = s + 1;
|
|
||||||
+ while (c = *p, c_isspace (c))
|
|
||||||
+ p++;
|
|
||||||
+
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: tests/misc/date.pl
|
|
||||||
===================================================================
|
|
||||||
--- tests/misc/date.pl.orig
|
|
||||||
+++ tests/misc/date.pl
|
|
||||||
@@ -287,6 +287,13 @@ my @Tests =
|
|
||||||
{ERR => "date: invalid date '\\260'\n"},
|
|
||||||
{EXIT => 1},
|
|
||||||
],
|
|
||||||
+
|
|
||||||
+ # From coreutils-5.3.0 to 8.22 inclusive
|
|
||||||
+ # this would either infinite loop or crash
|
|
||||||
+ ['invalid-TZ-crash', "-d 'TZ=\"\"\"'",
|
|
||||||
+ {ERR => "date: invalid date 'TZ=\"\"\"'\n"},
|
|
||||||
+ {EXIT => 1},
|
|
||||||
+ ],
|
|
||||||
);
|
|
||||||
|
|
||||||
# Repeat the cross-dst test, using Jan 1, 2005 and every interval from 1..364.
|
|
||||||
Index: gnulib-tests/test-parse-datetime.c
|
|
||||||
===================================================================
|
|
||||||
--- gnulib-tests/test-parse-datetime.c.orig
|
|
||||||
+++ gnulib-tests/test-parse-datetime.c
|
|
||||||
@@ -419,5 +419,21 @@ main (int argc _GL_UNUSED, char **argv)
|
|
||||||
starting with a high-bit-set byte would be treated like "0". */
|
|
||||||
ASSERT ( ! parse_datetime (&result, "\xb0", &now));
|
|
||||||
|
|
||||||
+ /* Exercise TZ="" parsing code. */
|
|
||||||
+ /* These two would infloop or segfault before Feb 2014. */
|
|
||||||
+ ASSERT ( ! parse_datetime (&result, "TZ=\"\"\"", &now));
|
|
||||||
+ ASSERT ( ! parse_datetime (&result, "TZ=\"\" \"", &now));
|
|
||||||
+ /* Exercise invalid patterns. */
|
|
||||||
+ ASSERT ( ! parse_datetime (&result, "TZ=\"", &now));
|
|
||||||
+ ASSERT ( ! parse_datetime (&result, "TZ=\"\\\"", &now));
|
|
||||||
+ ASSERT ( ! parse_datetime (&result, "TZ=\"\\n", &now));
|
|
||||||
+ ASSERT ( ! parse_datetime (&result, "TZ=\"\\n\"", &now));
|
|
||||||
+ /* Exercise valid patterns. */
|
|
||||||
+ ASSERT ( parse_datetime (&result, "TZ=\"\"", &now));
|
|
||||||
+ ASSERT ( parse_datetime (&result, "TZ=\"\" ", &now));
|
|
||||||
+ ASSERT ( parse_datetime (&result, " TZ=\"\"", &now));
|
|
||||||
+ ASSERT ( parse_datetime (&result, "TZ=\"\\\\\"", &now));
|
|
||||||
+ ASSERT ( parse_datetime (&result, "TZ=\"\\\"\"", &now));
|
|
||||||
+
|
|
||||||
return 0;
|
|
||||||
}
|
|
17
coreutils-fix-man-deps.patch
Normal file
17
coreutils-fix-man-deps.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
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
|
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
Index: gnulib-tests/test-getaddrinfo.c
|
Index: gnulib-tests/test-getaddrinfo.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gnulib-tests/test-getaddrinfo.c.orig 2013-12-04 15:53:33.000000000 +0100
|
--- gnulib-tests/test-getaddrinfo.c.orig
|
||||||
+++ gnulib-tests/test-getaddrinfo.c 2014-02-20 17:59:57.474430854 +0100
|
+++ gnulib-tests/test-getaddrinfo.c
|
||||||
@@ -86,11 +86,7 @@ simple (char const *host, char const *se
|
@@ -86,11 +86,7 @@ simple (char const *host, char const *se
|
||||||
the test merely because someone is down the country on their
|
the test merely because someone is down the country on their
|
||||||
in-law's farm. */
|
in-law's farm. */
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
---
|
|
||||||
gnulib-tests/test-isnanl.h | 9 +++++++++
|
|
||||||
gnulib-tests/test-signbit.c | 10 ++++++++++
|
|
||||||
2 files changed, 19 insertions(+)
|
|
||||||
|
|
||||||
Index: gnulib-tests/test-isnanl.h
|
|
||||||
===================================================================
|
|
||||||
--- gnulib-tests/test-isnanl.h.orig
|
|
||||||
+++ gnulib-tests/test-isnanl.h
|
|
||||||
@@ -51,6 +51,15 @@ main ()
|
|
||||||
/* A bit pattern that is different from a Quiet NaN. With a bit of luck,
|
|
||||||
it's a Signalling NaN. */
|
|
||||||
{
|
|
||||||
+#if defined __powerpc__ && LDBL_MANT_DIG == 106
|
|
||||||
+ /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are
|
|
||||||
+ represented as the corresponding 64-bit IEEE values in the first double;
|
|
||||||
+ the second is ignored. Manipulate only the first double. */
|
|
||||||
+ #undef NWORDS
|
|
||||||
+ #define NWORDS \
|
|
||||||
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
memory_long_double m;
|
|
||||||
m.value = NaNl ();
|
|
||||||
# if LDBL_EXPBIT0_BIT > 0
|
|
||||||
Index: gnulib-tests/test-signbit.c
|
|
||||||
===================================================================
|
|
||||||
--- gnulib-tests/test-signbit.c.orig
|
|
||||||
+++ gnulib-tests/test-signbit.c
|
|
||||||
@@ -151,6 +151,16 @@ test_signbitl ()
|
|
||||||
#define NWORDS \
|
|
||||||
((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
|
|
||||||
typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double;
|
|
||||||
+
|
|
||||||
+#if defined __powerpc__ && LDBL_MANT_DIG == 106
|
|
||||||
+ /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are
|
|
||||||
+ represented as the corresponding 64-bit IEEE values in the first double;
|
|
||||||
+ the second is ignored. Manipulate only the first double. */
|
|
||||||
+ #undef NWORDS
|
|
||||||
+ #define NWORDS \
|
|
||||||
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
memory_long_double m;
|
|
||||||
m.value = zerol / zerol;
|
|
||||||
# if LDBL_EXPBIT0_BIT > 0
|
|
@ -154,7 +154,7 @@ Index: src/cut.c
|
|||||||
+ /* Output characters that are at the given positions. */
|
+ /* Output characters that are at the given positions. */
|
||||||
+ character_mode,
|
+ character_mode,
|
||||||
+
|
+
|
||||||
/* Output the given delimeter-separated fields. */
|
/* Output the given delimiter-separated fields. */
|
||||||
field_mode
|
field_mode
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -167,12 +167,12 @@ Index: src/cut.c
|
|||||||
+ if this program runs on multibyte locale. */
|
+ if this program runs on multibyte locale. */
|
||||||
+static int force_singlebyte_mode;
|
+static int force_singlebyte_mode;
|
||||||
+
|
+
|
||||||
/* If true do not output lines containing no delimeter characters.
|
/* If true do not output lines containing no delimiter characters.
|
||||||
Otherwise, all such lines are printed. This option is valid only
|
Otherwise, all such lines are printed. This option is valid only
|
||||||
with field mode. */
|
with field mode. */
|
||||||
@@ -126,6 +201,9 @@ static bool complement;
|
@@ -126,6 +201,9 @@ static bool complement;
|
||||||
|
|
||||||
/* The delimeter character for field mode. */
|
/* The delimiter character for field mode. */
|
||||||
static unsigned char delim;
|
static unsigned char delim;
|
||||||
+#if HAVE_WCHAR_H
|
+#if HAVE_WCHAR_H
|
||||||
+static wchar_t wcdelim;
|
+static wchar_t wcdelim;
|
||||||
@ -282,7 +282,7 @@ Index: src/cut.c
|
|||||||
/* Read from stream STREAM, printing to standard output any selected fields. */
|
/* Read from stream STREAM, printing to standard output any selected fields. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -629,13 +786,201 @@ cut_fields (FILE *stream)
|
@@ -649,13 +806,201 @@ cut_fields (FILE *stream)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,7 +487,7 @@ Index: src/cut.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Process file FILE to standard output.
|
/* Process file FILE to standard output.
|
||||||
@@ -687,6 +1032,7 @@ main (int argc, char **argv)
|
@@ -707,6 +1052,7 @@ main (int argc, char **argv)
|
||||||
bool ok;
|
bool ok;
|
||||||
bool delim_specified = false;
|
bool delim_specified = false;
|
||||||
char *spec_list_string IF_LINT ( = NULL);
|
char *spec_list_string IF_LINT ( = NULL);
|
||||||
@ -495,7 +495,7 @@ Index: src/cut.c
|
|||||||
|
|
||||||
initialize_main (&argc, &argv);
|
initialize_main (&argc, &argv);
|
||||||
set_program_name (argv[0]);
|
set_program_name (argv[0]);
|
||||||
@@ -709,7 +1055,6 @@ main (int argc, char **argv)
|
@@ -729,7 +1075,6 @@ main (int argc, char **argv)
|
||||||
switch (optc)
|
switch (optc)
|
||||||
{
|
{
|
||||||
case 'b':
|
case 'b':
|
||||||
@ -503,7 +503,7 @@ Index: src/cut.c
|
|||||||
/* Build the byte list. */
|
/* Build the byte list. */
|
||||||
if (operating_mode != undefined_mode)
|
if (operating_mode != undefined_mode)
|
||||||
FATAL_ERROR (_("only one type of list may be specified"));
|
FATAL_ERROR (_("only one type of list may be specified"));
|
||||||
@@ -717,6 +1062,14 @@ main (int argc, char **argv)
|
@@ -737,6 +1082,14 @@ main (int argc, char **argv)
|
||||||
spec_list_string = optarg;
|
spec_list_string = optarg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -518,7 +518,7 @@ Index: src/cut.c
|
|||||||
case 'f':
|
case 'f':
|
||||||
/* Build the field list. */
|
/* Build the field list. */
|
||||||
if (operating_mode != undefined_mode)
|
if (operating_mode != undefined_mode)
|
||||||
@@ -728,10 +1081,38 @@ main (int argc, char **argv)
|
@@ -748,10 +1101,38 @@ main (int argc, char **argv)
|
||||||
case 'd':
|
case 'd':
|
||||||
/* New delimiter. */
|
/* New delimiter. */
|
||||||
/* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
|
/* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
|
||||||
@ -561,7 +561,7 @@ Index: src/cut.c
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OUTPUT_DELIMITER_OPTION:
|
case OUTPUT_DELIMITER_OPTION:
|
||||||
@@ -744,6 +1125,7 @@ main (int argc, char **argv)
|
@@ -764,6 +1145,7 @@ main (int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'n':
|
case 'n':
|
||||||
@ -569,7 +569,7 @@ Index: src/cut.c
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
@@ -783,15 +1165,34 @@ main (int argc, char **argv)
|
@@ -803,15 +1185,34 @@ main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!delim_specified)
|
if (!delim_specified)
|
||||||
@ -3352,7 +3352,7 @@ Index: src/sort.c
|
|||||||
{
|
{
|
||||||
/* Note xmemcoll0 is a performance enhancement as
|
/* Note xmemcoll0 is a performance enhancement as
|
||||||
it will not unconditionally write '\0' after the
|
it will not unconditionally write '\0' after the
|
||||||
@@ -4113,6 +4738,7 @@ set_ordering (char const *s, struct keyf
|
@@ -4121,6 +4746,7 @@ set_ordering (char const *s, struct keyf
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
key->translate = fold_toupper;
|
key->translate = fold_toupper;
|
||||||
@ -3360,7 +3360,7 @@ Index: src/sort.c
|
|||||||
break;
|
break;
|
||||||
case 'g':
|
case 'g':
|
||||||
key->general_numeric = true;
|
key->general_numeric = true;
|
||||||
@@ -4190,7 +4816,7 @@ main (int argc, char **argv)
|
@@ -4198,7 +4824,7 @@ main (int argc, char **argv)
|
||||||
initialize_exit_failure (SORT_FAILURE);
|
initialize_exit_failure (SORT_FAILURE);
|
||||||
|
|
||||||
hard_LC_COLLATE = hard_locale (LC_COLLATE);
|
hard_LC_COLLATE = hard_locale (LC_COLLATE);
|
||||||
@ -3369,7 +3369,7 @@ Index: src/sort.c
|
|||||||
hard_LC_TIME = hard_locale (LC_TIME);
|
hard_LC_TIME = hard_locale (LC_TIME);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -4211,6 +4837,29 @@ main (int argc, char **argv)
|
@@ -4219,6 +4845,29 @@ main (int argc, char **argv)
|
||||||
thousands_sep = -1;
|
thousands_sep = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3399,7 +3399,7 @@ Index: src/sort.c
|
|||||||
have_read_stdin = false;
|
have_read_stdin = false;
|
||||||
inittables ();
|
inittables ();
|
||||||
|
|
||||||
@@ -4485,13 +5134,34 @@ main (int argc, char **argv)
|
@@ -4493,13 +5142,34 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
{
|
{
|
||||||
@ -3438,7 +3438,7 @@ Index: src/sort.c
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Provoke with 'sort -txx'. Complain about
|
/* Provoke with 'sort -txx'. Complain about
|
||||||
@@ -4502,9 +5172,12 @@ main (int argc, char **argv)
|
@@ -4510,9 +5180,12 @@ main (int argc, char **argv)
|
||||||
quote (optarg));
|
quote (optarg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3766,7 +3766,7 @@ Index: src/uniq.c
|
|||||||
static struct option const longopts[] =
|
static struct option const longopts[] =
|
||||||
{
|
{
|
||||||
{"count", no_argument, NULL, 'c'},
|
{"count", no_argument, NULL, 'c'},
|
||||||
@@ -249,7 +276,7 @@ size_opt (char const *opt, char const *m
|
@@ -251,7 +278,7 @@ size_opt (char const *opt, char const *m
|
||||||
return a pointer to the beginning of the line's field to be compared. */
|
return a pointer to the beginning of the line's field to be compared. */
|
||||||
|
|
||||||
static char * _GL_ATTRIBUTE_PURE
|
static char * _GL_ATTRIBUTE_PURE
|
||||||
@ -3775,7 +3775,7 @@ Index: src/uniq.c
|
|||||||
{
|
{
|
||||||
size_t count;
|
size_t count;
|
||||||
char const *lp = line->buffer;
|
char const *lp = line->buffer;
|
||||||
@@ -269,6 +296,83 @@ find_field (struct linebuffer const *lin
|
@@ -271,6 +298,83 @@ find_field (struct linebuffer const *lin
|
||||||
return line->buffer + i;
|
return line->buffer + i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3859,7 +3859,7 @@ Index: src/uniq.c
|
|||||||
/* Return false if two strings OLD and NEW match, true if not.
|
/* Return false if two strings OLD and NEW match, true if not.
|
||||||
OLD and NEW point not to the beginnings of the lines
|
OLD and NEW point not to the beginnings of the lines
|
||||||
but rather to the beginnings of the fields to compare.
|
but rather to the beginnings of the fields to compare.
|
||||||
@@ -277,6 +381,8 @@ find_field (struct linebuffer const *lin
|
@@ -279,6 +383,8 @@ find_field (struct linebuffer const *lin
|
||||||
static bool
|
static bool
|
||||||
different (char *old, char *new, size_t oldlen, size_t newlen)
|
different (char *old, char *new, size_t oldlen, size_t newlen)
|
||||||
{
|
{
|
||||||
@ -3868,7 +3868,7 @@ Index: src/uniq.c
|
|||||||
if (check_chars < oldlen)
|
if (check_chars < oldlen)
|
||||||
oldlen = check_chars;
|
oldlen = check_chars;
|
||||||
if (check_chars < newlen)
|
if (check_chars < newlen)
|
||||||
@@ -284,15 +390,104 @@ different (char *old, char *new, size_t
|
@@ -286,15 +392,104 @@ different (char *old, char *new, size_t
|
||||||
|
|
||||||
if (ignore_case)
|
if (ignore_case)
|
||||||
{
|
{
|
||||||
@ -3978,7 +3978,7 @@ Index: src/uniq.c
|
|||||||
/* Output the line in linebuffer LINE to standard output
|
/* Output the line in linebuffer LINE to standard output
|
||||||
provided that the switches say it should be output.
|
provided that the switches say it should be output.
|
||||||
MATCH is true if the line matches the previous line.
|
MATCH is true if the line matches the previous line.
|
||||||
@@ -356,19 +551,38 @@ check_file (const char *infile, const ch
|
@@ -358,19 +553,38 @@ check_file (const char *infile, const ch
|
||||||
char *prevfield IF_LINT ( = NULL);
|
char *prevfield IF_LINT ( = NULL);
|
||||||
size_t prevlen IF_LINT ( = 0);
|
size_t prevlen IF_LINT ( = 0);
|
||||||
bool first_group_printed = false;
|
bool first_group_printed = false;
|
||||||
@ -4017,7 +4017,7 @@ Index: src/uniq.c
|
|||||||
new_group = (prevline->length == 0
|
new_group = (prevline->length == 0
|
||||||
|| different (thisfield, prevfield, thislen, prevlen));
|
|| different (thisfield, prevfield, thislen, prevlen));
|
||||||
|
|
||||||
@@ -386,6 +600,10 @@ check_file (const char *infile, const ch
|
@@ -388,6 +602,10 @@ check_file (const char *infile, const ch
|
||||||
SWAP_LINES (prevline, thisline);
|
SWAP_LINES (prevline, thisline);
|
||||||
prevfield = thisfield;
|
prevfield = thisfield;
|
||||||
prevlen = thislen;
|
prevlen = thislen;
|
||||||
@ -4028,7 +4028,7 @@ Index: src/uniq.c
|
|||||||
first_group_printed = true;
|
first_group_printed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -398,17 +616,26 @@ check_file (const char *infile, const ch
|
@@ -400,17 +618,26 @@ check_file (const char *infile, const ch
|
||||||
size_t prevlen;
|
size_t prevlen;
|
||||||
uintmax_t match_count = 0;
|
uintmax_t match_count = 0;
|
||||||
bool first_delimiter = true;
|
bool first_delimiter = true;
|
||||||
@ -4055,7 +4055,7 @@ Index: src/uniq.c
|
|||||||
if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
|
if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
|
||||||
{
|
{
|
||||||
if (ferror (stdin))
|
if (ferror (stdin))
|
||||||
@@ -417,6 +644,14 @@ check_file (const char *infile, const ch
|
@@ -419,6 +646,14 @@ check_file (const char *infile, const ch
|
||||||
}
|
}
|
||||||
thisfield = find_field (thisline);
|
thisfield = find_field (thisline);
|
||||||
thislen = thisline->length - 1 - (thisfield - thisline->buffer);
|
thislen = thisline->length - 1 - (thisfield - thisline->buffer);
|
||||||
@ -4070,7 +4070,7 @@ Index: src/uniq.c
|
|||||||
match = !different (thisfield, prevfield, thislen, prevlen);
|
match = !different (thisfield, prevfield, thislen, prevlen);
|
||||||
match_count += match;
|
match_count += match;
|
||||||
|
|
||||||
@@ -449,6 +684,9 @@ check_file (const char *infile, const ch
|
@@ -451,6 +686,9 @@ check_file (const char *infile, const ch
|
||||||
SWAP_LINES (prevline, thisline);
|
SWAP_LINES (prevline, thisline);
|
||||||
prevfield = thisfield;
|
prevfield = thisfield;
|
||||||
prevlen = thislen;
|
prevlen = thislen;
|
||||||
@ -4080,7 +4080,7 @@ Index: src/uniq.c
|
|||||||
if (!match)
|
if (!match)
|
||||||
match_count = 0;
|
match_count = 0;
|
||||||
}
|
}
|
||||||
@@ -495,6 +733,19 @@ main (int argc, char **argv)
|
@@ -497,6 +735,19 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
atexit (close_stdout);
|
atexit (close_stdout);
|
||||||
|
|
||||||
@ -4104,7 +4104,7 @@ Index: tests/local.mk
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- tests/local.mk.orig
|
--- tests/local.mk.orig
|
||||||
+++ tests/local.mk
|
+++ tests/local.mk
|
||||||
@@ -324,6 +324,7 @@ all_tests = \
|
@@ -331,6 +331,7 @@ all_tests = \
|
||||||
tests/misc/sort-discrim.sh \
|
tests/misc/sort-discrim.sh \
|
||||||
tests/misc/sort-files0-from.pl \
|
tests/misc/sort-files0-from.pl \
|
||||||
tests/misc/sort-float.sh \
|
tests/misc/sort-float.sh \
|
||||||
@ -4130,7 +4130,7 @@ Index: tests/misc/cut.pl
|
|||||||
|
|
||||||
my $prog = 'cut';
|
my $prog = 'cut';
|
||||||
my $try = "Try '$prog --help' for more information.\n";
|
my $try = "Try '$prog --help' for more information.\n";
|
||||||
@@ -225,6 +227,7 @@ if ($mb_locale ne 'C')
|
@@ -227,6 +229,7 @@ if ($mb_locale ne 'C')
|
||||||
my @new_t = @$t;
|
my @new_t = @$t;
|
||||||
my $test_name = shift @new_t;
|
my $test_name = shift @new_t;
|
||||||
|
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
Port upstream commit, to be removed with v8.23:
|
|
||||||
|
|
||||||
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=0093ac8d57
|
|
||||||
|
|
||||||
ln: with -sr, don't segfault for a TARGET of ''
|
|
||||||
|
|
||||||
ln -sr '' F no longer segfaults. Now works as expected.
|
|
||||||
[bug introduced with the --relative feature in coreutils-8.16]
|
|
||||||
|
|
||||||
The changes in NEWS and THANKS.in in the original patch have been omitted.
|
|
||||||
|
|
||||||
-----------------------------------------------
|
|
||||||
commit 0093ac8d57a0f1a16fd09d98f6a524dddb6053e7
|
|
||||||
Author: Jim Meyering <meyering@fb.com>
|
|
||||||
Date: Thu Mar 13 17:05:04 2014 -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.
|
|
||||||
Reported by Erik Bernstein in 739752@bugs.debian.org.
|
|
||||||
Fixes http://bugs.gnu.org/17010.
|
|
||||||
|
|
||||||
---
|
|
||||||
src/ln.c | 16 ++++++++++------
|
|
||||||
tests/ln/relative.sh | 5 +++++
|
|
||||||
2 files changed, 15 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
Index: src/ln.c
|
|
||||||
===================================================================
|
|
||||||
--- src/ln.c.orig
|
|
||||||
+++ src/ln.c
|
|
||||||
@@ -139,13 +139,17 @@ convert_abs_rel (const char *from, const
|
|
||||||
char *realdest = canonicalize_filename_mode (targetdir, CAN_MISSING);
|
|
||||||
char *realfrom = canonicalize_filename_mode (from, CAN_MISSING);
|
|
||||||
|
|
||||||
- /* Write to a PATH_MAX buffer. */
|
|
||||||
- char *relative_from = xmalloc (PATH_MAX);
|
|
||||||
-
|
|
||||||
- if (!relpath (realfrom, realdest, relative_from, PATH_MAX))
|
|
||||||
+ char *relative_from = NULL;
|
|
||||||
+ if (realdest && realfrom)
|
|
||||||
{
|
|
||||||
- free (relative_from);
|
|
||||||
- relative_from = NULL;
|
|
||||||
+ /* Write to a PATH_MAX buffer. */
|
|
||||||
+ relative_from = xmalloc (PATH_MAX);
|
|
||||||
+
|
|
||||||
+ if (!relpath (realfrom, realdest, relative_from, PATH_MAX))
|
|
||||||
+ {
|
|
||||||
+ free (relative_from);
|
|
||||||
+ relative_from = NULL;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
free (targetdir);
|
|
||||||
Index: tests/ln/relative.sh
|
|
||||||
===================================================================
|
|
||||||
--- tests/ln/relative.sh.orig
|
|
||||||
+++ tests/ln/relative.sh
|
|
||||||
@@ -45,4 +45,9 @@ mkdir web
|
|
||||||
ln -sr latest web/latest
|
|
||||||
test $(readlink web/latest) = '../release2' || fail=1
|
|
||||||
|
|
||||||
+# Expect this to fail with exit status 1, or to succeed quietly (freebsd).
|
|
||||||
+# Prior to coreutils-8.23, it would segfault.
|
|
||||||
+ln -sr '' F
|
|
||||||
+case $? in [01]) ;; *) fail=1;; esac
|
|
||||||
+
|
|
||||||
Exit $fail
|
|
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
Index: gnulib-tests/test-isnanl.h
|
Index: gnulib-tests/test-isnanl.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gnulib-tests/test-isnanl.h.orig 2013-12-04 15:53:33.000000000 +0100
|
--- gnulib-tests/test-isnanl.h.orig
|
||||||
+++ gnulib-tests/test-isnanl.h 2014-02-20 18:05:09.900982392 +0100
|
+++ gnulib-tests/test-isnanl.h
|
||||||
@@ -47,7 +47,7 @@ main ()
|
@@ -47,7 +47,7 @@ main ()
|
||||||
/* Quiet NaN. */
|
/* Quiet NaN. */
|
||||||
ASSERT (isnanl (NaNl ()));
|
ASSERT (isnanl (NaNl ()));
|
||||||
@ -17,7 +17,7 @@ Index: gnulib-tests/test-isnanl.h
|
|||||||
/* A bit pattern that is different from a Quiet NaN. With a bit of luck,
|
/* A bit pattern that is different from a Quiet NaN. With a bit of luck,
|
||||||
it's a Signalling NaN. */
|
it's a Signalling NaN. */
|
||||||
{
|
{
|
||||||
@@ -89,6 +89,7 @@ main ()
|
@@ -98,6 +98,7 @@ main ()
|
||||||
{ LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
|
{ LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
|
||||||
ASSERT (isnanl (x.value));
|
ASSERT (isnanl (x.value));
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ Index: gnulib-tests/test-isnanl.h
|
|||||||
/* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
|
/* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
|
||||||
Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
|
Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
|
||||||
Intel IA-64 Architecture Software Developer's Manual, Volume 1:
|
Intel IA-64 Architecture Software Developer's Manual, Volume 1:
|
||||||
@@ -122,6 +123,7 @@ main ()
|
@@ -131,6 +132,7 @@ main ()
|
||||||
ASSERT (isnanl (x.value));
|
ASSERT (isnanl (x.value));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -35,20 +35,20 @@ Index: gnulib-tests/test-isnanl.h
|
|||||||
}
|
}
|
||||||
Index: tests/misc/help-version.sh
|
Index: tests/misc/help-version.sh
|
||||||
===================================================================
|
===================================================================
|
||||||
--- tests/misc/help-version.sh.orig 2013-12-04 15:48:30.000000000 +0100
|
--- tests/misc/help-version.sh.orig
|
||||||
+++ tests/misc/help-version.sh 2014-02-20 18:05:09.901982368 +0100
|
+++ tests/misc/help-version.sh
|
||||||
@@ -245,6 +245,7 @@ parted_setup () { args="-s $tmp_in mklab
|
@@ -240,6 +240,7 @@ parted_setup () { args="-s $tmp_in mklab
|
||||||
for i in $built_programs; do
|
for i in $built_programs; do
|
||||||
# Skip these.
|
# Skip these.
|
||||||
case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac
|
case $i in chroot|stty|tty|false|chcon|runcon|coreutils) continue;; esac
|
||||||
+ case $i in df) continue;; esac
|
+ case $i in df) continue;; esac
|
||||||
|
|
||||||
rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out $bigZ_in $zin $zin2
|
rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out $bigZ_in $zin $zin2
|
||||||
echo z |gzip > $zin
|
echo z |gzip > $zin
|
||||||
Index: tests/other-fs-tmpdir
|
Index: tests/other-fs-tmpdir
|
||||||
===================================================================
|
===================================================================
|
||||||
--- tests/other-fs-tmpdir.orig 2014-02-20 18:05:09.901982368 +0100
|
--- tests/other-fs-tmpdir.orig
|
||||||
+++ tests/other-fs-tmpdir 2014-02-20 18:06:52.108548168 +0100
|
+++ tests/other-fs-tmpdir
|
||||||
@@ -43,6 +43,9 @@ for d in $CANDIDATE_TMP_DIRS; do
|
@@ -43,6 +43,9 @@ for d in $CANDIDATE_TMP_DIRS; do
|
||||||
|
|
||||||
done
|
done
|
||||||
|
@ -16,9 +16,9 @@ Signed-off-by: Jie Liu <jeff....@oracle.com>
|
|||||||
|
|
||||||
Index: src/copy.c
|
Index: src/copy.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- src/copy.c.orig 2014-02-20 17:50:19.791236017 +0100
|
--- src/copy.c.orig
|
||||||
+++ src/copy.c 2014-02-20 17:54:06.068824055 +0100
|
+++ src/copy.c
|
||||||
@@ -221,6 +221,46 @@ sparse_copy (int src_fd, int dest_fd, ch
|
@@ -229,6 +229,46 @@ sparse_copy (int src_fd, int dest_fd, ch
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ Index: src/copy.c
|
|||||||
/* Perform the O(1) btrfs clone operation, if possible.
|
/* Perform the O(1) btrfs clone operation, if possible.
|
||||||
Upon success, return 0. Otherwise, return -1 and set errno. */
|
Upon success, return 0. Otherwise, return -1 and set errno. */
|
||||||
static inline int
|
static inline int
|
||||||
@@ -930,6 +970,45 @@ copy_reg (char const *src_name, char con
|
@@ -938,6 +978,45 @@ copy_reg (char const *src_name, char con
|
||||||
goto close_src_desc;
|
goto close_src_desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ Index: src/copy.c
|
|||||||
/* The semantics of the following open calls are mandated
|
/* The semantics of the following open calls are mandated
|
||||||
by the specs for both cp and mv. */
|
by the specs for both cp and mv. */
|
||||||
if (! *new_dst)
|
if (! *new_dst)
|
||||||
@@ -1075,17 +1154,20 @@ copy_reg (char const *src_name, char con
|
@@ -1083,17 +1162,20 @@ copy_reg (char const *src_name, char con
|
||||||
/* --attributes-only overrides --reflink. */
|
/* --attributes-only overrides --reflink. */
|
||||||
if (data_copy_required && x->reflink_mode)
|
if (data_copy_required && x->reflink_mode)
|
||||||
{
|
{
|
||||||
|
@ -6,15 +6,15 @@ Index: doc/coreutils.texi
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- doc/coreutils.texi.orig
|
--- doc/coreutils.texi.orig
|
||||||
+++ doc/coreutils.texi
|
+++ doc/coreutils.texi
|
||||||
@@ -66,7 +66,6 @@
|
@@ -69,7 +69,6 @@
|
||||||
* groups: (coreutils)groups invocation. Print group names a user is in.
|
* groups: (coreutils)groups invocation. Print group names a user is in.
|
||||||
* head: (coreutils)head invocation. Output the first part of files.
|
* head: (coreutils)head invocation. Output the first part of files.
|
||||||
* hostid: (coreutils)hostid invocation. Print numeric host identifier.
|
* hostid: (coreutils)hostid invocation. Print numeric host identifier.
|
||||||
-* hostname: (coreutils)hostname invocation. Print or set system name.
|
-* hostname: (coreutils)hostname invocation. Print or set system name.
|
||||||
* id: (coreutils)id invocation. Print user identity.
|
* id: (coreutils)id invocation. Print user identity.
|
||||||
* install: (coreutils)install invocation. Copy and change attributes.
|
* install: (coreutils)install invocation. Copy files and set attributes.
|
||||||
* join: (coreutils)join invocation. Join lines on a common field.
|
* join: (coreutils)join invocation. Join lines on a common field.
|
||||||
@@ -198,7 +197,7 @@ Free Documentation License''.
|
@@ -201,7 +200,7 @@ Free Documentation License''.
|
||||||
* File name manipulation:: dirname basename pathchk mktemp realpath
|
* File name manipulation:: dirname basename pathchk mktemp realpath
|
||||||
* Working context:: pwd stty printenv tty
|
* Working context:: pwd stty printenv tty
|
||||||
* User information:: id logname whoami groups users who
|
* User information:: id logname whoami groups users who
|
||||||
@ -23,7 +23,7 @@ Index: doc/coreutils.texi
|
|||||||
* SELinux context:: chcon runcon
|
* SELinux context:: chcon runcon
|
||||||
* Modified command invocation:: chroot env nice nohup stdbuf timeout
|
* Modified command invocation:: chroot env nice nohup stdbuf timeout
|
||||||
* Process control:: kill
|
* Process control:: kill
|
||||||
@@ -417,7 +416,6 @@ System context
|
@@ -421,7 +420,6 @@ System context
|
||||||
* date invocation:: Print or set system date and time
|
* date invocation:: Print or set system date and time
|
||||||
* nproc invocation:: Print the number of processors
|
* nproc invocation:: Print the number of processors
|
||||||
* uname invocation:: Print system information
|
* uname invocation:: Print system information
|
||||||
@ -31,7 +31,7 @@ Index: doc/coreutils.texi
|
|||||||
* hostid invocation:: Print numeric host identifier
|
* hostid invocation:: Print numeric host identifier
|
||||||
* uptime invocation:: Print system uptime and load
|
* uptime invocation:: Print system uptime and load
|
||||||
|
|
||||||
@@ -14852,7 +14850,6 @@ information.
|
@@ -14922,7 +14920,6 @@ information.
|
||||||
* arch invocation:: Print machine hardware name.
|
* arch invocation:: Print machine hardware name.
|
||||||
* nproc invocation:: Print the number of processors.
|
* nproc invocation:: Print the number of processors.
|
||||||
* uname invocation:: Print system information.
|
* uname invocation:: Print system information.
|
||||||
@ -39,7 +39,7 @@ Index: doc/coreutils.texi
|
|||||||
* hostid invocation:: Print numeric host identifier.
|
* hostid invocation:: Print numeric host identifier.
|
||||||
* uptime invocation:: Print system uptime and load.
|
* uptime invocation:: Print system uptime and load.
|
||||||
@end menu
|
@end menu
|
||||||
@@ -15674,15 +15671,6 @@ easily available, as is the case with Li
|
@@ -15744,15 +15741,6 @@ easily available, as is the case with Li
|
||||||
Print the machine hardware name (sometimes called the hardware class
|
Print the machine hardware name (sometimes called the hardware class
|
||||||
or hardware type).
|
or hardware type).
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ Index: doc/coreutils.texi
|
|||||||
@item -p
|
@item -p
|
||||||
@itemx --processor
|
@itemx --processor
|
||||||
@opindex -p
|
@opindex -p
|
||||||
@@ -15736,30 +15724,6 @@ Print the kernel version.
|
@@ -15806,30 +15794,6 @@ Print the kernel version.
|
||||||
|
|
||||||
@exitstatus
|
@exitstatus
|
||||||
|
|
||||||
|
@ -6,15 +6,15 @@ Index: doc/coreutils.texi
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- doc/coreutils.texi.orig
|
--- doc/coreutils.texi.orig
|
||||||
+++ doc/coreutils.texi
|
+++ doc/coreutils.texi
|
||||||
@@ -69,7 +69,6 @@
|
@@ -72,7 +72,6 @@
|
||||||
* id: (coreutils)id invocation. Print user identity.
|
* id: (coreutils)id invocation. Print user identity.
|
||||||
* install: (coreutils)install invocation. Copy and change attributes.
|
* install: (coreutils)install invocation. Copy files and set attributes.
|
||||||
* join: (coreutils)join invocation. Join lines on a common field.
|
* join: (coreutils)join invocation. Join lines on a common field.
|
||||||
-* kill: (coreutils)kill invocation. Send a signal to processes.
|
-* kill: (coreutils)kill invocation. Send a signal to processes.
|
||||||
* link: (coreutils)link invocation. Make hard links between files.
|
* link: (coreutils)link invocation. Make hard links between files.
|
||||||
* ln: (coreutils)ln invocation. Make links between files.
|
* ln: (coreutils)ln invocation. Make links between files.
|
||||||
* logname: (coreutils)logname invocation. Print current login name.
|
* logname: (coreutils)logname invocation. Print current login name.
|
||||||
@@ -200,7 +199,6 @@ Free Documentation License''.
|
@@ -203,7 +202,6 @@ Free Documentation License''.
|
||||||
* System context:: date arch nproc uname hostid uptime
|
* System context:: date arch nproc uname hostid uptime
|
||||||
* SELinux context:: chcon runcon
|
* SELinux context:: chcon runcon
|
||||||
* Modified command invocation:: chroot env nice nohup stdbuf timeout
|
* Modified command invocation:: chroot env nice nohup stdbuf timeout
|
||||||
@ -22,7 +22,7 @@ Index: doc/coreutils.texi
|
|||||||
* Delaying:: sleep
|
* Delaying:: sleep
|
||||||
* Numeric operations:: factor seq
|
* Numeric operations:: factor seq
|
||||||
* File permissions:: Access modes
|
* File permissions:: Access modes
|
||||||
@@ -444,10 +442,6 @@ Modified command invocation
|
@@ -448,10 +446,6 @@ Modified command invocation
|
||||||
* stdbuf invocation:: Run a command with modified I/O buffering
|
* stdbuf invocation:: Run a command with modified I/O buffering
|
||||||
* timeout invocation:: Run a command with a time limit
|
* timeout invocation:: Run a command with a time limit
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ Index: doc/coreutils.texi
|
|||||||
Delaying
|
Delaying
|
||||||
|
|
||||||
* sleep invocation:: Delay for a specified time
|
* sleep invocation:: Delay for a specified time
|
||||||
@@ -16606,90 +16600,6 @@ the exit status of @var{command} otherwi
|
@@ -16688,90 +16682,6 @@ the exit status of @var{command} otherwi
|
||||||
@end display
|
@end display
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,85 +0,0 @@
|
|||||||
Port upstream fix for shuf, to be removed with v8.23:
|
|
||||||
|
|
||||||
shuf --repeat no longer dumps core if the input is empty.
|
|
||||||
[bug introduced with the --repeat feature in coreutils-8.22]
|
|
||||||
|
|
||||||
This patch squashes these 2 upstream commits:
|
|
||||||
|
|
||||||
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=9f60f37a28
|
|
||||||
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=5475e6083f
|
|
||||||
|
|
||||||
While the former implements the actual fix for the problem,
|
|
||||||
the latter only changes the new error diagnostic. The change in the
|
|
||||||
NEWS entry in the latter patch is not visible in the following patch
|
|
||||||
because that hunk is omitted; however, that corrected NEWS entry is
|
|
||||||
above.
|
|
||||||
|
|
||||||
-----------------------------------------------
|
|
||||||
commit 9f60f37a28c37acb66aa38003ccaa07f13abbd9d
|
|
||||||
Author: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Sun Feb 23 15:34:48 2014 -0800
|
|
||||||
|
|
||||||
shuf: with -r, don't dump core if the input is empty
|
|
||||||
|
|
||||||
Problem reported by valiant xiao in <http://bugs.gnu.org/16855>.
|
|
||||||
* src/shuf.c (main): With -r, report an error if the input is empty.
|
|
||||||
* tests/misc/shuf.sh: Test for the bug.
|
|
||||||
|
|
||||||
-----------------------------------------------
|
|
||||||
commit 5475e6083f46a2f9f7ccf4173f391bf518421523
|
|
||||||
Author: Bernhard Voelker <mail@bernhard-voelker.de>
|
|
||||||
Date: Wed Feb 26 08:36:50 2014 +0100
|
|
||||||
|
|
||||||
shuf: convert error diagnostic to lowercase
|
|
||||||
|
|
||||||
* src/shuf.c (main): s/No/no/, introduced by commit v8.22-25-g9f60f37.
|
|
||||||
|
|
||||||
Prompted by the syntax-check rule sc_error_message_uppercase
|
|
||||||
|
|
||||||
---
|
|
||||||
src/shuf.c | 15 +++++++++++----
|
|
||||||
tests/misc/shuf.sh | 4 ++++
|
|
||||||
2 files changed, 15 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
Index: src/shuf.c
|
|
||||||
===================================================================
|
|
||||||
--- src/shuf.c.orig
|
|
||||||
+++ src/shuf.c
|
|
||||||
@@ -576,11 +576,18 @@ main (int argc, char **argv)
|
|
||||||
/* Generate output according to requested method */
|
|
||||||
if (repeat)
|
|
||||||
{
|
|
||||||
- if (input_range)
|
|
||||||
- i = write_random_numbers (randint_source, head_lines,
|
|
||||||
- lo_input, hi_input, eolbyte);
|
|
||||||
+ if (head_lines == 0)
|
|
||||||
+ i = 0;
|
|
||||||
else
|
|
||||||
- i = write_random_lines (randint_source, head_lines, line, n_lines);
|
|
||||||
+ {
|
|
||||||
+ if (n_lines == 0)
|
|
||||||
+ error (EXIT_FAILURE, 0, _("no lines to repeat"));
|
|
||||||
+ if (input_range)
|
|
||||||
+ i = write_random_numbers (randint_source, head_lines,
|
|
||||||
+ lo_input, hi_input, eolbyte);
|
|
||||||
+ else
|
|
||||||
+ i = write_random_lines (randint_source, head_lines, line, n_lines);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Index: tests/misc/shuf.sh
|
|
||||||
===================================================================
|
|
||||||
--- tests/misc/shuf.sh.orig
|
|
||||||
+++ tests/misc/shuf.sh
|
|
||||||
@@ -43,6 +43,10 @@ compare in out1 || { fail=1; echo "not a
|
|
||||||
t=$(shuf -e a b c d e | sort | fmt)
|
|
||||||
test "$t" = 'a b c d e' || { fail=1; echo "not a permutation" 1>&2; }
|
|
||||||
|
|
||||||
+# coreutils-8.22 dumps core.
|
|
||||||
+shuf -er
|
|
||||||
+test $? -eq 1 || fail=1
|
|
||||||
+
|
|
||||||
# Before coreutils-6.3, this would infloop.
|
|
||||||
# "seq 1860" produces 8193 (8K + 1) bytes of output.
|
|
||||||
seq 1860 | shuf > /dev/null || fail=1
|
|
@ -21,7 +21,7 @@ Index: gnulib-tests/gnulib.mk
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- gnulib-tests/gnulib.mk.orig
|
--- gnulib-tests/gnulib.mk.orig
|
||||||
+++ gnulib-tests/gnulib.mk
|
+++ gnulib-tests/gnulib.mk
|
||||||
@@ -2303,9 +2303,10 @@ EXTRA_DIST += test-time.c
|
@@ -2206,9 +2206,10 @@ EXTRA_DIST += test-time.c
|
||||||
|
|
||||||
## begin gnulib module tls-tests
|
## begin gnulib module tls-tests
|
||||||
|
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
tests: avoid test framework failure if the file system lacks ACL support
|
|
||||||
|
|
||||||
Prompted by a test framework failure of tests/mkdir/p-acl.sh on VMs
|
|
||||||
where filesystem are mounted without ACL support.
|
|
||||||
I pushed the following patch upstream which will go into 8.23 some day.
|
|
||||||
_______________________________________________
|
|
||||||
|
|
||||||
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=5d7591d0
|
|
||||||
|
|
||||||
commit 5d7591d0edf0dd31c2daa195ee766c1383b89f4c
|
|
||||||
Author: Bernhard Voelker <mail@bernhard-voelker.de>
|
|
||||||
Date: Fri Jan 10 16:48:25 2014 +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.
|
|
||||||
---
|
|
||||||
init.cfg | 32 ++++++++++++++++++++++++++++++--
|
|
||||||
1 file changed, 30 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
Index: init.cfg
|
|
||||||
===================================================================
|
|
||||||
--- init.cfg.orig 2014-02-24 15:19:12.185467061 +0100
|
|
||||||
+++ init.cfg 2014-02-24 15:20:46.802273660 +0100
|
|
||||||
@@ -192,10 +192,38 @@ require_valgrind_()
|
|
||||||
skip_ "requires a working valgrind"
|
|
||||||
}
|
|
||||||
|
|
||||||
+# Skip the current test if setfacl doesn't work on the current file system,
|
|
||||||
+# which could happen if not installed, or if ACLs are not supported by the
|
|
||||||
+# kernel or the file system, or are turned off via mount options.
|
|
||||||
+#
|
|
||||||
+# Work around the following two issues:
|
|
||||||
+#
|
|
||||||
+# 1) setfacl maps ACLs into file permission bits if on "noacl" file systems.
|
|
||||||
+#
|
|
||||||
+# On file systems which do not support ACLs (e.g. ext4 mounted with -o noacl),
|
|
||||||
+# setfacl operates on the regular file permission bits, and only fails if the
|
|
||||||
+# given ACL spec does not fit into there. Thus, to test if ACLs really work
|
|
||||||
+# on the current file system, pass an ACL spec which can't be mapped that way.
|
|
||||||
+# "Default" ACLs (-d) seem to fulfill this requirement.
|
|
||||||
+#
|
|
||||||
+# 2) setfacl only invokes the underlying system call if the ACL would change.
|
|
||||||
+#
|
|
||||||
+# If the given ACL spec would not change the ACLs on the file, then setfacl
|
|
||||||
+# does not invoke the underlying system call - setxattr(). Therefore, to test
|
|
||||||
+# if setting ACLs really works on the current file system, call setfacl twice
|
|
||||||
+# with conflictive ACL specs.
|
|
||||||
require_setfacl_()
|
|
||||||
{
|
|
||||||
- setfacl -m user::rwx . \
|
|
||||||
- || skip_ "setfacl does not work on the current file system"
|
|
||||||
+ local d='acltestdir_'
|
|
||||||
+ mkdir $d || framework_failure_
|
|
||||||
+ local f=0
|
|
||||||
+
|
|
||||||
+ setfacl -d -m user::r-x $d \
|
|
||||||
+ && setfacl -d -m user::rwx $d \
|
|
||||||
+ || f=1
|
|
||||||
+ rm -rf $d || framework_failure_
|
|
||||||
+ test $f = 0 \
|
|
||||||
+ || skip_ "The current file system does not support ACLs"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Require a controlling input 'terminal'.
|
|
@ -1,36 +0,0 @@
|
|||||||
From 84e67a5bd239179e2faded424861dce5718fa12c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bernhard Voelker <mail@bernhard-voelker.de>
|
|
||||||
Date: Tue, 7 Jan 2014 19:18:25 +0100
|
|
||||||
Subject: [PATCH] tests: avoid FP failure when cp fails for /proc/cpuinfo
|
|
||||||
|
|
||||||
On aarch64, cp fails to copy /proc/cpuinfo because the inode number
|
|
||||||
seems to change 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.
|
|
||||||
---
|
|
||||||
tests/cp/proc-zero-len.sh | 7 ++++++-
|
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
Index: tests/cp/proc-zero-len.sh
|
|
||||||
===================================================================
|
|
||||||
--- tests/cp/proc-zero-len.sh.orig
|
|
||||||
+++ tests/cp/proc-zero-len.sh
|
|
||||||
@@ -27,7 +27,12 @@ test -r $f || f=empty
|
|
||||||
cat $f > out || fail=1
|
|
||||||
|
|
||||||
# With coreutils-6.9, this would create a zero-length "exp" file.
|
|
||||||
-cp $f exp || fail=1
|
|
||||||
+# Skip this test on architectures like aarch64 where the inode
|
|
||||||
+# number of the file changed during the cp run.
|
|
||||||
+cp $f exp 2>err \
|
|
||||||
+ || { fail=1;
|
|
||||||
+ grep 'replaced while being copied' \
|
|
||||||
+ && skip_ "File $f is being replaced while being copied"; }
|
|
||||||
|
|
||||||
# Don't simply compare contents; they might differ,
|
|
||||||
# e.g., if CPU freq changes between cat and cp invocations.
|
|
@ -16,7 +16,7 @@ Index: tests/local.mk
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- tests/local.mk.orig
|
--- tests/local.mk.orig
|
||||||
+++ tests/local.mk
|
+++ tests/local.mk
|
||||||
@@ -649,14 +649,9 @@ all_tests = \
|
@@ -661,14 +661,9 @@ all_tests = \
|
||||||
# See tests/factor/create-test.sh.
|
# See tests/factor/create-test.sh.
|
||||||
tf = tests/factor
|
tf = tests/factor
|
||||||
factor_tests = \
|
factor_tests = \
|
||||||
|
@ -1,3 +1,235 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 1 15:54:41 UTC 2014 - mail@bernhard-voelker.de
|
||||||
|
|
||||||
|
- Add patches for upstream glitches:
|
||||||
|
- coreutils-fix-man-deps.patch
|
||||||
|
- coreutils-chroot-perform-chdir-unless-skip-chdir.patch
|
||||||
|
|
||||||
|
- Refresh patches:
|
||||||
|
- coreutils-build-timeout-as-pie.patch
|
||||||
|
- coreutils-getaddrinfo.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
|
||||||
|
|
||||||
|
- Remove now-upstream patches:
|
||||||
|
- coreutils-copy-fix-selinux-existing-dirs.patch
|
||||||
|
- coreutils-gnulib-tests-ppc64le.patch
|
||||||
|
- coreutils-tests-avoid-FP-cp-cpuinfo.patch
|
||||||
|
- coreutils-test-avoid-FP-when-no-ACL-support.patch
|
||||||
|
- coreutils-ln-avoid-segfault-for-empty-target.patch
|
||||||
|
- coreutils-date-avoid-crash-in-TZ-parsing.patch
|
||||||
|
- coreutils-shuf-repeat-avoid-crash-when-input-empty.patch
|
||||||
|
- coreutils-improve_df_--human_and_--si,_help_and_man_page.patch
|
||||||
|
- coreutils-avoid_sizeof_charPP__static_analysis_warning.patch
|
||||||
|
- coreutils-also_deduplicate_virtual_file_systems.patch
|
||||||
|
- coreutils-fix_handling_of_symlinks_in_mount_list.patch
|
||||||
|
- coreutils-ignore_non_file_system_entries_in_proc_mounts.patch
|
||||||
|
- coreutils-avoid_clang_-Wtautological-constant-out-of-range-compare_warning.patch
|
||||||
|
- coreutils-use_the_last_device_name_provided_by_the_system.patch
|
||||||
|
- coreutils-avoid_compiler_warnings_with_some_assert_implementations.patch
|
||||||
|
- coreutils-use_all_of_the_last_device_details_provided.patch
|
||||||
|
- coreutils-output_placeholder_values_for_inaccessible_mount_points.patch
|
||||||
|
- coreutils-look_for_accessible_mount_points_for_specified_devices.patch
|
||||||
|
- coreutils-report_correct_device_in_presence_of_eclipsed_mounts.patch
|
||||||
|
- coreutils-avoid_an_inconsequential_mem_leak.patch
|
||||||
|
|
||||||
|
- Update to 8.23 (2014-07-18) [stable]
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
chmod -Rc no longer issues erroneous warnings for files with special bits set.
|
||||||
|
[bug introduced in coreutils-6.0]
|
||||||
|
|
||||||
|
cp -a, mv, and install --preserve-context, once again set the correct SELinux
|
||||||
|
context for existing directories in the destination. Previously they set
|
||||||
|
the context of an existing directory to that of its last copied descendent.
|
||||||
|
[bug introduced in coreutils-8.22]
|
||||||
|
|
||||||
|
cp -a, mv, and install --preserve-context, no longer seg fault when running
|
||||||
|
with SELinux enabled, when copying from file systems that return an error
|
||||||
|
when reading the SELinux context for a file.
|
||||||
|
[bug introduced in coreutils-8.22]
|
||||||
|
|
||||||
|
cp -a and mv now preserve xattrs of symlinks copied across file systems.
|
||||||
|
[bug introduced with extended attribute preservation feature in coreutils-7.1]
|
||||||
|
|
||||||
|
date could crash or go into an infinite loop when parsing a malformed TZ="".
|
||||||
|
[bug introduced with the --date='TZ="" ..' parsing feature in coreutils-5.3.0]
|
||||||
|
|
||||||
|
dd's ASCII and EBCDIC conversions were incompatible with common practice and
|
||||||
|
with POSIX, and have been corrected as follows. First, conv=ascii now
|
||||||
|
implies conv=unblock, and conv=ebcdic and conv=ibm now imply conv=block.
|
||||||
|
Second, the translation tables for dd conv=ascii and conv=ebcdic have been
|
||||||
|
corrected as shown in the following table, where A is the ASCII value, W is
|
||||||
|
the old, wrong EBCDIC value, and E is the new, corrected EBCDIC value; all
|
||||||
|
values are in octal.
|
||||||
|
|
||||||
|
A W E
|
||||||
|
041 117 132
|
||||||
|
133 112 255
|
||||||
|
135 132 275
|
||||||
|
136 137 232
|
||||||
|
174 152 117
|
||||||
|
176 241 137
|
||||||
|
313 232 152
|
||||||
|
325 255 112
|
||||||
|
345 275 241
|
||||||
|
|
||||||
|
[These dd bugs were present in "the beginning".]
|
||||||
|
|
||||||
|
df has more fixes related to the newer dynamic representation of file systems:
|
||||||
|
Duplicates are elided for virtual file systems like tmpfs.
|
||||||
|
Details for the correct device are output for points mounted multiple times.
|
||||||
|
Placeholder values are output for inaccessible file systems, rather than
|
||||||
|
than error messages or values for the wrong file system.
|
||||||
|
[These bugs were present in "the beginning".]
|
||||||
|
|
||||||
|
df now outputs all appropriate entries in the presence of bind mounts.
|
||||||
|
On some systems, entries would have been incorrectly elided due to
|
||||||
|
them being considered "dummy" mounts.
|
||||||
|
[bug introduced in coreutils-8.22]
|
||||||
|
|
||||||
|
du now silently ignores directory cycles introduced with bind mounts.
|
||||||
|
Previously it would issue a warning and exit with a failure status.
|
||||||
|
[bug introduced in coreutils-8.1]
|
||||||
|
|
||||||
|
head --bytes=-N and --lines=-N now handles devices more
|
||||||
|
consistently, not ignoring data from virtual devices like /dev/zero,
|
||||||
|
or on BSD systems data from tty devices.
|
||||||
|
[bug introduced in coreutils-5.0.1]
|
||||||
|
|
||||||
|
head --bytes=-N - no longer fails with a bogus diagnostic when stdin's
|
||||||
|
seek pointer is not at the beginning.
|
||||||
|
[bug introduced with the --bytes=-N feature in coreutils-5.0.1]
|
||||||
|
|
||||||
|
head --lines=-0, when the input does not contain a trailing '\n',
|
||||||
|
now copies all input to stdout. Previously nothing was output in this case.
|
||||||
|
[bug introduced with the --lines=-N feature in coreutils-5.0.1]
|
||||||
|
|
||||||
|
id, when invoked with no user name argument, now prints the correct group ID.
|
||||||
|
Previously, in the default output format, it would print the default group ID
|
||||||
|
in the password database, which may be neither real nor effective. For e.g.,
|
||||||
|
when run set-GID, or when the database changes outside the current session.
|
||||||
|
[bug introduced in coreutils-8.1]
|
||||||
|
|
||||||
|
ln -sf now replaces symbolic links whose targets can't exist. Previously
|
||||||
|
it would display an error, requiring --no-dereference to avoid the issue.
|
||||||
|
[bug introduced in coreutils-5.3.0]
|
||||||
|
|
||||||
|
ln -sr '' F no longer segfaults. Now works as expected.
|
||||||
|
[bug introduced with the --relative feature in coreutils-8.16]
|
||||||
|
|
||||||
|
numfmt now handles blanks correctly in all unibyte locales. Previously
|
||||||
|
in locales where character 0xA0 is a blank, numfmt would mishandle it.
|
||||||
|
[bug introduced when numfmt was added in coreutils-8.21]
|
||||||
|
|
||||||
|
ptx --format long option parsing no longer falls through into the --help case.
|
||||||
|
[bug introduced in TEXTUTILS-1_22i]
|
||||||
|
|
||||||
|
ptx now consistently trims whitespace when processing multiple files.
|
||||||
|
[This bug was present in "the beginning".]
|
||||||
|
|
||||||
|
seq again generates correct output with start or end values = -0.
|
||||||
|
[bug introduced in coreutils-8.20.]
|
||||||
|
|
||||||
|
shuf --repeat no longer dumps core if the input is empty.
|
||||||
|
[bug introduced with the --repeat feature in coreutils-8.22]
|
||||||
|
|
||||||
|
sort when using multiple threads now avoids undefined behavior with mutex
|
||||||
|
destruction, which could cause deadlocks on some implementations.
|
||||||
|
[bug introduced in coreutils-8.6]
|
||||||
|
|
||||||
|
tail -f now uses polling mode for VXFS to cater for its clustered mode.
|
||||||
|
[bug introduced with inotify support added in coreutils-7.5]
|
||||||
|
|
||||||
|
** New features
|
||||||
|
|
||||||
|
od accepts a new option: --endian=TYPE to handle inputs with different byte
|
||||||
|
orders, or to provide consistent output on systems with disparate endianness.
|
||||||
|
|
||||||
|
configure accepts the new option --enable-single-binary to build all the
|
||||||
|
selected programs in a single binary called "coreutils". The selected
|
||||||
|
programs can still be called directly using symlinks to "coreutils" or
|
||||||
|
shebangs with the option --coreutils-prog= passed to this program. The
|
||||||
|
install behavior is determined by the option --enable-single-binary=symlinks
|
||||||
|
or --enable-single-binary=shebangs (the default). With the symlinks option,
|
||||||
|
you can't make a second symlink to any program because that will change the
|
||||||
|
name of the called program, which is used by coreutils to determine the
|
||||||
|
desired program. The shebangs option doesn't suffer from this problem, but
|
||||||
|
the /proc/$pid/cmdline file might not be updated on all the platforms. The
|
||||||
|
functionality of each program is not affected but this single binary will
|
||||||
|
depend on all the required dynamic libraries even to run simple programs.
|
||||||
|
If you desire to build some tools outside the single binary file, you can
|
||||||
|
pass the option --enable-single-binary-exceptions=PROG_LIST with the comma
|
||||||
|
separated list of programs you want to build separately. This flag
|
||||||
|
considerably reduces the overall size of the installed binaries which makes
|
||||||
|
it suitable for embedded system.
|
||||||
|
|
||||||
|
** Changes in behavior
|
||||||
|
|
||||||
|
chroot with an argument of "/" no longer implicitly changes the current
|
||||||
|
directory to "/", allowing changing only user credentials for a command.
|
||||||
|
|
||||||
|
chroot --userspec will now unset supplemental groups associated with root,
|
||||||
|
and instead use the supplemental groups of the specified user.
|
||||||
|
|
||||||
|
cut -d$'\n' again outputs lines identified in the --fields list, having
|
||||||
|
not done so in v8.21 and v8.22. Note using this non portable functionality
|
||||||
|
will result in the delayed output of lines.
|
||||||
|
|
||||||
|
ls with none of LS_COLORS or COLORTERM environment variables set,
|
||||||
|
will now honor an empty or unknown TERM environment variable,
|
||||||
|
and not output colors even with --colors=always.
|
||||||
|
|
||||||
|
** Improvements
|
||||||
|
|
||||||
|
chroot has better --userspec and --group look-ups, with numeric IDs never
|
||||||
|
causing name look-up errors. Also look-ups are first done outside the chroot,
|
||||||
|
in case the look-up within the chroot fails due to library conflicts etc.
|
||||||
|
|
||||||
|
install now allows the combination of the -D and -t options.
|
||||||
|
|
||||||
|
numfmt supports zero padding of numbers using the standard printf
|
||||||
|
syntax of a leading zero, for example --format="%010f".
|
||||||
|
Also throughput was improved by up to 800% by avoiding redundant processing.
|
||||||
|
|
||||||
|
shred now supports multiple passes on GNU/Linux tape devices by rewinding
|
||||||
|
the tape before each pass, avoids redundant writes to empty files,
|
||||||
|
uses direct I/O for all passes where possible, and attempts to clear
|
||||||
|
inode storage used for small files on some file systems.
|
||||||
|
|
||||||
|
split avoids unnecessary input buffering, immediately writing input to output
|
||||||
|
which is significant with --filter or when writing to fifos or stdout etc.
|
||||||
|
|
||||||
|
stat and tail work better with HFS+, HFSX, LogFS and ConfigFS. stat -f
|
||||||
|
--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.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 25 23:48:47 CEST 2014 - pth@suse.de
|
||||||
|
|
||||||
|
- Incorporate 9 bugfixes, one documentation update and two maintenance
|
||||||
|
patches that won't harm (bnc#888215), See NEWS for specifics:
|
||||||
|
|
||||||
|
coreutils-improve_df_--human_and_--si,_help_and_man_page.patch
|
||||||
|
coreutils-avoid_sizeof_charPP__static_analysis_warning.patch
|
||||||
|
coreutils-also_deduplicate_virtual_file_systems.patch
|
||||||
|
coreutils-fix_handling_of_symlinks_in_mount_list.patch
|
||||||
|
coreutils-ignore_non_file_system_entries_in_proc_mounts.patch
|
||||||
|
coreutils-avoid_clang_-Wtautological-constant-out-of-range-compare_warning.patch
|
||||||
|
coreutils-use_the_last_device_name_provided_by_the_system.patch
|
||||||
|
coreutils-avoid_compiler_warnings_with_some_assert_implementations.patch
|
||||||
|
coreutils-use_all_of_the_last_device_details_provided.patch
|
||||||
|
coreutils-output_placeholder_values_for_inaccessible_mount_points.patch
|
||||||
|
coreutils-look_for_accessible_mount_points_for_specified_devices.patch
|
||||||
|
coreutils-report_correct_device_in_presence_of_eclipsed_mounts.patch
|
||||||
|
coreutils-avoid_an_inconsequential_mem_leak.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Mar 16 20:38:48 UTC 2014 - mail@bernhard-voelker.de
|
Sun Mar 16 20:38:48 UTC 2014 - mail@bernhard-voelker.de
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ Summary: GNU Core Utilities
|
|||||||
License: GPL-3.0+
|
License: GPL-3.0+
|
||||||
Group: System/Base
|
Group: System/Base
|
||||||
Url: http://www.gnu.org/software/coreutils/
|
Url: http://www.gnu.org/software/coreutils/
|
||||||
Version: 8.22
|
Version: 8.23
|
||||||
Release: 0
|
Release: 0
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
@ -97,10 +97,6 @@ Patch16: coreutils-invalid-ids.patch
|
|||||||
# OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option.
|
# OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option.
|
||||||
Patch100: coreutils-build-timeout-as-pie.patch
|
Patch100: coreutils-build-timeout-as-pie.patch
|
||||||
|
|
||||||
# Upstream patch to 8.22: cp -a: set the correct SELinux context
|
|
||||||
# on already existing destination directories.
|
|
||||||
Patch110: coreutils-copy-fix-selinux-existing-dirs.patch
|
|
||||||
|
|
||||||
# At least a bit of reflink support
|
# At least a bit of reflink support
|
||||||
Patch111: coreutils-ocfs2_reflinks.patch
|
Patch111: coreutils-ocfs2_reflinks.patch
|
||||||
|
|
||||||
@ -110,9 +106,6 @@ Patch112: coreutils-getaddrinfo.patch
|
|||||||
# Assorted fixes
|
# Assorted fixes
|
||||||
Patch113: coreutils-misc.patch
|
Patch113: coreutils-misc.patch
|
||||||
|
|
||||||
# Fix imported gnulib long double math tests for little-endian PowerPC
|
|
||||||
Patch202: coreutils-gnulib-tests-ppc64le.patch
|
|
||||||
|
|
||||||
# Skip 2 valgrind'ed sort tests on ppc/ppc64 which would fail due to
|
# Skip 2 valgrind'ed sort tests on ppc/ppc64 which would fail due to
|
||||||
# a glibc issue in mkstemp.
|
# a glibc issue in mkstemp.
|
||||||
Patch300: coreutils-skip-some-sort-tests-on-ppc.patch
|
Patch300: coreutils-skip-some-sort-tests-on-ppc.patch
|
||||||
@ -121,26 +114,16 @@ Patch300: coreutils-skip-some-sort-tests-on-ppc.patch
|
|||||||
Patch301: coreutils-skip-gnulib-test-tls.patch
|
Patch301: coreutils-skip-gnulib-test-tls.patch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# tests: avoid FP failure when cp fails for /proc/cpuinfo
|
|
||||||
# which happens e.g. on aarch64.
|
|
||||||
Patch302: coreutils-tests-avoid-FP-cp-cpuinfo.patch
|
|
||||||
|
|
||||||
# tests: shorten extreme-expensive factor tests
|
# tests: shorten extreme-expensive factor tests
|
||||||
Patch303: coreutils-tests-shorten-extreme-factor-tests.patch
|
Patch303: coreutils-tests-shorten-extreme-factor-tests.patch
|
||||||
|
|
||||||
# tests: avoid test framework failure if the file system lacks ACL support
|
# Upstream patch on top of v8.23 (to be removed in v8.24).
|
||||||
Patch304: coreutils-test-avoid-FP-when-no-ACL-support.patch
|
# Fix the dependencies to generate man pages after linking.
|
||||||
|
Patch400: coreutils-fix-man-deps.patch
|
||||||
|
|
||||||
# Port upstream patch, to be removed with v8.23:
|
# Upstream patch on top of v8.23 (to be removed in v8.24).
|
||||||
# ln: with -sr, don't segfault for a TARGET of ''
|
# Fixes a regression in chroot which did not chdir("/") in all cases.
|
||||||
Patch305: coreutils-ln-avoid-segfault-for-empty-target.patch
|
Patch401: coreutils-chroot-perform-chdir-unless-skip-chdir.patch
|
||||||
|
|
||||||
# Upstream patch for date(1), to be removed with v8.23:
|
|
||||||
Patch306: coreutils-date-avoid-crash-in-TZ-parsing.patch
|
|
||||||
|
|
||||||
# Upstream patch for shuf(1), to be removed with v8.23:
|
|
||||||
# shuf --repeat no longer dumps core if the input is empty.
|
|
||||||
Patch307: coreutils-shuf-repeat-avoid-crash-when-input-empty.patch
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
%description
|
%description
|
||||||
@ -168,11 +151,9 @@ the GNU fileutils, sh-utils, and textutils packages.
|
|||||||
%patch16
|
%patch16
|
||||||
#
|
#
|
||||||
%patch100
|
%patch100
|
||||||
%patch110
|
|
||||||
%patch111
|
%patch111
|
||||||
%patch112
|
%patch112
|
||||||
%patch113
|
%patch113
|
||||||
%patch202
|
|
||||||
|
|
||||||
%patch300
|
%patch300
|
||||||
|
|
||||||
@ -180,12 +161,9 @@ the GNU fileutils, sh-utils, and textutils packages.
|
|||||||
%patch301
|
%patch301
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%patch302
|
|
||||||
%patch303
|
%patch303
|
||||||
%patch304
|
%patch400
|
||||||
%patch305
|
%patch401
|
||||||
%patch306
|
|
||||||
%patch307
|
|
||||||
|
|
||||||
#???## We need to statically link to gmp, otherwise we have a build loop
|
#???## We need to statically link to gmp, otherwise we have a build loop
|
||||||
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in
|
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in
|
||||||
|
@ -1,3 +1,235 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 1 15:54:41 UTC 2014 - mail@bernhard-voelker.de
|
||||||
|
|
||||||
|
- Add patches for upstream glitches:
|
||||||
|
- coreutils-fix-man-deps.patch
|
||||||
|
- coreutils-chroot-perform-chdir-unless-skip-chdir.patch
|
||||||
|
|
||||||
|
- Refresh patches:
|
||||||
|
- coreutils-build-timeout-as-pie.patch
|
||||||
|
- coreutils-getaddrinfo.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
|
||||||
|
|
||||||
|
- Remove now-upstream patches:
|
||||||
|
- coreutils-copy-fix-selinux-existing-dirs.patch
|
||||||
|
- coreutils-gnulib-tests-ppc64le.patch
|
||||||
|
- coreutils-tests-avoid-FP-cp-cpuinfo.patch
|
||||||
|
- coreutils-test-avoid-FP-when-no-ACL-support.patch
|
||||||
|
- coreutils-ln-avoid-segfault-for-empty-target.patch
|
||||||
|
- coreutils-date-avoid-crash-in-TZ-parsing.patch
|
||||||
|
- coreutils-shuf-repeat-avoid-crash-when-input-empty.patch
|
||||||
|
- coreutils-improve_df_--human_and_--si,_help_and_man_page.patch
|
||||||
|
- coreutils-avoid_sizeof_charPP__static_analysis_warning.patch
|
||||||
|
- coreutils-also_deduplicate_virtual_file_systems.patch
|
||||||
|
- coreutils-fix_handling_of_symlinks_in_mount_list.patch
|
||||||
|
- coreutils-ignore_non_file_system_entries_in_proc_mounts.patch
|
||||||
|
- coreutils-avoid_clang_-Wtautological-constant-out-of-range-compare_warning.patch
|
||||||
|
- coreutils-use_the_last_device_name_provided_by_the_system.patch
|
||||||
|
- coreutils-avoid_compiler_warnings_with_some_assert_implementations.patch
|
||||||
|
- coreutils-use_all_of_the_last_device_details_provided.patch
|
||||||
|
- coreutils-output_placeholder_values_for_inaccessible_mount_points.patch
|
||||||
|
- coreutils-look_for_accessible_mount_points_for_specified_devices.patch
|
||||||
|
- coreutils-report_correct_device_in_presence_of_eclipsed_mounts.patch
|
||||||
|
- coreutils-avoid_an_inconsequential_mem_leak.patch
|
||||||
|
|
||||||
|
- Update to 8.23 (2014-07-18) [stable]
|
||||||
|
|
||||||
|
** Bug fixes
|
||||||
|
|
||||||
|
chmod -Rc no longer issues erroneous warnings for files with special bits set.
|
||||||
|
[bug introduced in coreutils-6.0]
|
||||||
|
|
||||||
|
cp -a, mv, and install --preserve-context, once again set the correct SELinux
|
||||||
|
context for existing directories in the destination. Previously they set
|
||||||
|
the context of an existing directory to that of its last copied descendent.
|
||||||
|
[bug introduced in coreutils-8.22]
|
||||||
|
|
||||||
|
cp -a, mv, and install --preserve-context, no longer seg fault when running
|
||||||
|
with SELinux enabled, when copying from file systems that return an error
|
||||||
|
when reading the SELinux context for a file.
|
||||||
|
[bug introduced in coreutils-8.22]
|
||||||
|
|
||||||
|
cp -a and mv now preserve xattrs of symlinks copied across file systems.
|
||||||
|
[bug introduced with extended attribute preservation feature in coreutils-7.1]
|
||||||
|
|
||||||
|
date could crash or go into an infinite loop when parsing a malformed TZ="".
|
||||||
|
[bug introduced with the --date='TZ="" ..' parsing feature in coreutils-5.3.0]
|
||||||
|
|
||||||
|
dd's ASCII and EBCDIC conversions were incompatible with common practice and
|
||||||
|
with POSIX, and have been corrected as follows. First, conv=ascii now
|
||||||
|
implies conv=unblock, and conv=ebcdic and conv=ibm now imply conv=block.
|
||||||
|
Second, the translation tables for dd conv=ascii and conv=ebcdic have been
|
||||||
|
corrected as shown in the following table, where A is the ASCII value, W is
|
||||||
|
the old, wrong EBCDIC value, and E is the new, corrected EBCDIC value; all
|
||||||
|
values are in octal.
|
||||||
|
|
||||||
|
A W E
|
||||||
|
041 117 132
|
||||||
|
133 112 255
|
||||||
|
135 132 275
|
||||||
|
136 137 232
|
||||||
|
174 152 117
|
||||||
|
176 241 137
|
||||||
|
313 232 152
|
||||||
|
325 255 112
|
||||||
|
345 275 241
|
||||||
|
|
||||||
|
[These dd bugs were present in "the beginning".]
|
||||||
|
|
||||||
|
df has more fixes related to the newer dynamic representation of file systems:
|
||||||
|
Duplicates are elided for virtual file systems like tmpfs.
|
||||||
|
Details for the correct device are output for points mounted multiple times.
|
||||||
|
Placeholder values are output for inaccessible file systems, rather than
|
||||||
|
than error messages or values for the wrong file system.
|
||||||
|
[These bugs were present in "the beginning".]
|
||||||
|
|
||||||
|
df now outputs all appropriate entries in the presence of bind mounts.
|
||||||
|
On some systems, entries would have been incorrectly elided due to
|
||||||
|
them being considered "dummy" mounts.
|
||||||
|
[bug introduced in coreutils-8.22]
|
||||||
|
|
||||||
|
du now silently ignores directory cycles introduced with bind mounts.
|
||||||
|
Previously it would issue a warning and exit with a failure status.
|
||||||
|
[bug introduced in coreutils-8.1]
|
||||||
|
|
||||||
|
head --bytes=-N and --lines=-N now handles devices more
|
||||||
|
consistently, not ignoring data from virtual devices like /dev/zero,
|
||||||
|
or on BSD systems data from tty devices.
|
||||||
|
[bug introduced in coreutils-5.0.1]
|
||||||
|
|
||||||
|
head --bytes=-N - no longer fails with a bogus diagnostic when stdin's
|
||||||
|
seek pointer is not at the beginning.
|
||||||
|
[bug introduced with the --bytes=-N feature in coreutils-5.0.1]
|
||||||
|
|
||||||
|
head --lines=-0, when the input does not contain a trailing '\n',
|
||||||
|
now copies all input to stdout. Previously nothing was output in this case.
|
||||||
|
[bug introduced with the --lines=-N feature in coreutils-5.0.1]
|
||||||
|
|
||||||
|
id, when invoked with no user name argument, now prints the correct group ID.
|
||||||
|
Previously, in the default output format, it would print the default group ID
|
||||||
|
in the password database, which may be neither real nor effective. For e.g.,
|
||||||
|
when run set-GID, or when the database changes outside the current session.
|
||||||
|
[bug introduced in coreutils-8.1]
|
||||||
|
|
||||||
|
ln -sf now replaces symbolic links whose targets can't exist. Previously
|
||||||
|
it would display an error, requiring --no-dereference to avoid the issue.
|
||||||
|
[bug introduced in coreutils-5.3.0]
|
||||||
|
|
||||||
|
ln -sr '' F no longer segfaults. Now works as expected.
|
||||||
|
[bug introduced with the --relative feature in coreutils-8.16]
|
||||||
|
|
||||||
|
numfmt now handles blanks correctly in all unibyte locales. Previously
|
||||||
|
in locales where character 0xA0 is a blank, numfmt would mishandle it.
|
||||||
|
[bug introduced when numfmt was added in coreutils-8.21]
|
||||||
|
|
||||||
|
ptx --format long option parsing no longer falls through into the --help case.
|
||||||
|
[bug introduced in TEXTUTILS-1_22i]
|
||||||
|
|
||||||
|
ptx now consistently trims whitespace when processing multiple files.
|
||||||
|
[This bug was present in "the beginning".]
|
||||||
|
|
||||||
|
seq again generates correct output with start or end values = -0.
|
||||||
|
[bug introduced in coreutils-8.20.]
|
||||||
|
|
||||||
|
shuf --repeat no longer dumps core if the input is empty.
|
||||||
|
[bug introduced with the --repeat feature in coreutils-8.22]
|
||||||
|
|
||||||
|
sort when using multiple threads now avoids undefined behavior with mutex
|
||||||
|
destruction, which could cause deadlocks on some implementations.
|
||||||
|
[bug introduced in coreutils-8.6]
|
||||||
|
|
||||||
|
tail -f now uses polling mode for VXFS to cater for its clustered mode.
|
||||||
|
[bug introduced with inotify support added in coreutils-7.5]
|
||||||
|
|
||||||
|
** New features
|
||||||
|
|
||||||
|
od accepts a new option: --endian=TYPE to handle inputs with different byte
|
||||||
|
orders, or to provide consistent output on systems with disparate endianness.
|
||||||
|
|
||||||
|
configure accepts the new option --enable-single-binary to build all the
|
||||||
|
selected programs in a single binary called "coreutils". The selected
|
||||||
|
programs can still be called directly using symlinks to "coreutils" or
|
||||||
|
shebangs with the option --coreutils-prog= passed to this program. The
|
||||||
|
install behavior is determined by the option --enable-single-binary=symlinks
|
||||||
|
or --enable-single-binary=shebangs (the default). With the symlinks option,
|
||||||
|
you can't make a second symlink to any program because that will change the
|
||||||
|
name of the called program, which is used by coreutils to determine the
|
||||||
|
desired program. The shebangs option doesn't suffer from this problem, but
|
||||||
|
the /proc/$pid/cmdline file might not be updated on all the platforms. The
|
||||||
|
functionality of each program is not affected but this single binary will
|
||||||
|
depend on all the required dynamic libraries even to run simple programs.
|
||||||
|
If you desire to build some tools outside the single binary file, you can
|
||||||
|
pass the option --enable-single-binary-exceptions=PROG_LIST with the comma
|
||||||
|
separated list of programs you want to build separately. This flag
|
||||||
|
considerably reduces the overall size of the installed binaries which makes
|
||||||
|
it suitable for embedded system.
|
||||||
|
|
||||||
|
** Changes in behavior
|
||||||
|
|
||||||
|
chroot with an argument of "/" no longer implicitly changes the current
|
||||||
|
directory to "/", allowing changing only user credentials for a command.
|
||||||
|
|
||||||
|
chroot --userspec will now unset supplemental groups associated with root,
|
||||||
|
and instead use the supplemental groups of the specified user.
|
||||||
|
|
||||||
|
cut -d$'\n' again outputs lines identified in the --fields list, having
|
||||||
|
not done so in v8.21 and v8.22. Note using this non portable functionality
|
||||||
|
will result in the delayed output of lines.
|
||||||
|
|
||||||
|
ls with none of LS_COLORS or COLORTERM environment variables set,
|
||||||
|
will now honor an empty or unknown TERM environment variable,
|
||||||
|
and not output colors even with --colors=always.
|
||||||
|
|
||||||
|
** Improvements
|
||||||
|
|
||||||
|
chroot has better --userspec and --group look-ups, with numeric IDs never
|
||||||
|
causing name look-up errors. Also look-ups are first done outside the chroot,
|
||||||
|
in case the look-up within the chroot fails due to library conflicts etc.
|
||||||
|
|
||||||
|
install now allows the combination of the -D and -t options.
|
||||||
|
|
||||||
|
numfmt supports zero padding of numbers using the standard printf
|
||||||
|
syntax of a leading zero, for example --format="%010f".
|
||||||
|
Also throughput was improved by up to 800% by avoiding redundant processing.
|
||||||
|
|
||||||
|
shred now supports multiple passes on GNU/Linux tape devices by rewinding
|
||||||
|
the tape before each pass, avoids redundant writes to empty files,
|
||||||
|
uses direct I/O for all passes where possible, and attempts to clear
|
||||||
|
inode storage used for small files on some file systems.
|
||||||
|
|
||||||
|
split avoids unnecessary input buffering, immediately writing input to output
|
||||||
|
which is significant with --filter or when writing to fifos or stdout etc.
|
||||||
|
|
||||||
|
stat and tail work better with HFS+, HFSX, LogFS and ConfigFS. stat -f
|
||||||
|
--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.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 25 23:48:47 CEST 2014 - pth@suse.de
|
||||||
|
|
||||||
|
- Incorporate 9 bugfixes, one documentation update and two maintenance
|
||||||
|
patches that won't harm (bnc#888215), See NEWS for specifics:
|
||||||
|
|
||||||
|
coreutils-improve_df_--human_and_--si,_help_and_man_page.patch
|
||||||
|
coreutils-avoid_sizeof_charPP__static_analysis_warning.patch
|
||||||
|
coreutils-also_deduplicate_virtual_file_systems.patch
|
||||||
|
coreutils-fix_handling_of_symlinks_in_mount_list.patch
|
||||||
|
coreutils-ignore_non_file_system_entries_in_proc_mounts.patch
|
||||||
|
coreutils-avoid_clang_-Wtautological-constant-out-of-range-compare_warning.patch
|
||||||
|
coreutils-use_the_last_device_name_provided_by_the_system.patch
|
||||||
|
coreutils-avoid_compiler_warnings_with_some_assert_implementations.patch
|
||||||
|
coreutils-use_all_of_the_last_device_details_provided.patch
|
||||||
|
coreutils-output_placeholder_values_for_inaccessible_mount_points.patch
|
||||||
|
coreutils-look_for_accessible_mount_points_for_specified_devices.patch
|
||||||
|
coreutils-report_correct_device_in_presence_of_eclipsed_mounts.patch
|
||||||
|
coreutils-avoid_an_inconsequential_mem_leak.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Mar 16 20:38:48 UTC 2014 - mail@bernhard-voelker.de
|
Sun Mar 16 20:38:48 UTC 2014 - mail@bernhard-voelker.de
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ Summary: GNU Core Utilities
|
|||||||
License: GPL-3.0+
|
License: GPL-3.0+
|
||||||
Group: System/Base
|
Group: System/Base
|
||||||
Url: http://www.gnu.org/software/coreutils/
|
Url: http://www.gnu.org/software/coreutils/
|
||||||
Version: 8.22
|
Version: 8.23
|
||||||
Release: 0
|
Release: 0
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
@ -97,10 +97,6 @@ Patch16: coreutils-invalid-ids.patch
|
|||||||
# OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option.
|
# OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option.
|
||||||
Patch100: coreutils-build-timeout-as-pie.patch
|
Patch100: coreutils-build-timeout-as-pie.patch
|
||||||
|
|
||||||
# Upstream patch to 8.22: cp -a: set the correct SELinux context
|
|
||||||
# on already existing destination directories.
|
|
||||||
Patch110: coreutils-copy-fix-selinux-existing-dirs.patch
|
|
||||||
|
|
||||||
# At least a bit of reflink support
|
# At least a bit of reflink support
|
||||||
Patch111: coreutils-ocfs2_reflinks.patch
|
Patch111: coreutils-ocfs2_reflinks.patch
|
||||||
|
|
||||||
@ -110,9 +106,6 @@ Patch112: coreutils-getaddrinfo.patch
|
|||||||
# Assorted fixes
|
# Assorted fixes
|
||||||
Patch113: coreutils-misc.patch
|
Patch113: coreutils-misc.patch
|
||||||
|
|
||||||
# Fix imported gnulib long double math tests for little-endian PowerPC
|
|
||||||
Patch202: coreutils-gnulib-tests-ppc64le.patch
|
|
||||||
|
|
||||||
# Skip 2 valgrind'ed sort tests on ppc/ppc64 which would fail due to
|
# Skip 2 valgrind'ed sort tests on ppc/ppc64 which would fail due to
|
||||||
# a glibc issue in mkstemp.
|
# a glibc issue in mkstemp.
|
||||||
Patch300: coreutils-skip-some-sort-tests-on-ppc.patch
|
Patch300: coreutils-skip-some-sort-tests-on-ppc.patch
|
||||||
@ -121,26 +114,16 @@ Patch300: coreutils-skip-some-sort-tests-on-ppc.patch
|
|||||||
Patch301: coreutils-skip-gnulib-test-tls.patch
|
Patch301: coreutils-skip-gnulib-test-tls.patch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# tests: avoid FP failure when cp fails for /proc/cpuinfo
|
|
||||||
# which happens e.g. on aarch64.
|
|
||||||
Patch302: coreutils-tests-avoid-FP-cp-cpuinfo.patch
|
|
||||||
|
|
||||||
# tests: shorten extreme-expensive factor tests
|
# tests: shorten extreme-expensive factor tests
|
||||||
Patch303: coreutils-tests-shorten-extreme-factor-tests.patch
|
Patch303: coreutils-tests-shorten-extreme-factor-tests.patch
|
||||||
|
|
||||||
# tests: avoid test framework failure if the file system lacks ACL support
|
# Upstream patch on top of v8.23 (to be removed in v8.24).
|
||||||
Patch304: coreutils-test-avoid-FP-when-no-ACL-support.patch
|
# Fix the dependencies to generate man pages after linking.
|
||||||
|
Patch400: coreutils-fix-man-deps.patch
|
||||||
|
|
||||||
# Port upstream patch, to be removed with v8.23:
|
# Upstream patch on top of v8.23 (to be removed in v8.24).
|
||||||
# ln: with -sr, don't segfault for a TARGET of ''
|
# Fixes a regression in chroot which did not chdir("/") in all cases.
|
||||||
Patch305: coreutils-ln-avoid-segfault-for-empty-target.patch
|
Patch401: coreutils-chroot-perform-chdir-unless-skip-chdir.patch
|
||||||
|
|
||||||
# Upstream patch for date(1), to be removed with v8.23:
|
|
||||||
Patch306: coreutils-date-avoid-crash-in-TZ-parsing.patch
|
|
||||||
|
|
||||||
# Upstream patch for shuf(1), to be removed with v8.23:
|
|
||||||
# shuf --repeat no longer dumps core if the input is empty.
|
|
||||||
Patch307: coreutils-shuf-repeat-avoid-crash-when-input-empty.patch
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
%description
|
%description
|
||||||
@ -168,11 +151,9 @@ the GNU fileutils, sh-utils, and textutils packages.
|
|||||||
%patch16
|
%patch16
|
||||||
#
|
#
|
||||||
%patch100
|
%patch100
|
||||||
%patch110
|
|
||||||
%patch111
|
%patch111
|
||||||
%patch112
|
%patch112
|
||||||
%patch113
|
%patch113
|
||||||
%patch202
|
|
||||||
|
|
||||||
%patch300
|
%patch300
|
||||||
|
|
||||||
@ -180,12 +161,9 @@ the GNU fileutils, sh-utils, and textutils packages.
|
|||||||
%patch301
|
%patch301
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%patch302
|
|
||||||
%patch303
|
%patch303
|
||||||
%patch304
|
%patch400
|
||||||
%patch305
|
%patch401
|
||||||
%patch306
|
|
||||||
%patch307
|
|
||||||
|
|
||||||
#???## We need to statically link to gmp, otherwise we have a build loop
|
#???## We need to statically link to gmp, otherwise we have a build loop
|
||||||
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in
|
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in
|
||||||
|
Loading…
Reference in New Issue
Block a user