new upstream release 8.26

This commit is contained in:
Kamil Dudka 2016-12-01 14:26:30 +01:00
parent 3ed22ec3e8
commit 8d9eac4093
26 changed files with 1093 additions and 2527 deletions

20
.gitignore vendored
View File

@ -1,19 +1 @@
/coreutils-8.10.tar.xz
/coreutils-8.11.tar.xz
/coreutils-8.12.tar.xz
/coreutils-8.13.tar.xz
/coreutils-8.14.tar.xz
/coreutils-8.15.tar.xz
/coreutils-8.16.tar.xz
/coreutils-8.17.tar.xz
/coreutils-8.18.tar.xz
/coreutils-8.19.tar.xz
/coreutils-8.20.tar.xz
/coreutils-8.21.tar.xz
/coreutils-8.22.tar.xz
/coreutils-8.23.tar.xz
/coreutils-8.23.tar.xz.sig
/coreutils-8.24.tar.xz
/coreutils-8.24.tar.xz.sig
/coreutils-8.25.tar.xz
/coreutils-8.25.tar.xz.sig
/coreutils-[0-9.]*.tar.xz

View File

@ -1,6 +1,8 @@
--- coreutils-5.92/src/date.c.langinfo 2005-09-16 09:06:57.000000000 +0100
+++ coreutils-5.92/src/date.c 2005-10-24 18:09:16.000000000 +0100
@@ -474,14 +474,7 @@ main (int argc, char **argv)
diff --git a/src/date.c b/src/date.c
index ddb011e..619a72b 100644
--- a/src/date.c
+++ b/src/date.c
@@ -490,14 +490,7 @@ main (int argc, char **argv)
format = DATE_FMT_LANGINFO ();
if (! *format)
{

View File

@ -1,6 +1,22 @@
diff -urNp coreutils-8.21-orig/gnulib-tests/gnulib.mk coreutils-8.21/gnulib-tests/gnulib.mk
--- coreutils-8.21-orig/gnulib-tests/gnulib.mk 2013-02-07 17:58:44.000000000 +0100
+++ coreutils-8.21/gnulib-tests/gnulib.mk 2013-02-15 10:12:28.110593165 +0100
From 54ef056964da3d0987afd9f1e96b9419db0d653a Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Thu, 1 Dec 2016 14:32:46 +0100
Subject: [PATCH] coreutils-6.10-configuration.patch
TODO: check whether still necessary
---
gnulib-tests/gnulib.mk | 60 +++++++++++++++++++++----------------------
man/local.mk | 2 +-
tests/df/skip-duplicates.sh | 3 +++
tests/local.mk | 2 +-
tests/misc/nohup.sh | 2 ++
tests/touch/no-dereference.sh | 2 ++
6 files changed, 39 insertions(+), 32 deletions(-)
diff --git a/gnulib-tests/gnulib.mk b/gnulib-tests/gnulib.mk
index fee978f..8f32431 100644
--- a/gnulib-tests/gnulib.mk
+++ b/gnulib-tests/gnulib.mk
@@ -279,9 +279,9 @@ EXTRA_DIST += nap.h test-chown.h test-chown.c signature.h macros.h
## begin gnulib module cloexec-tests
@ -55,7 +71,7 @@ diff -urNp coreutils-8.21-orig/gnulib-tests/gnulib.mk coreutils-8.21/gnulib-test
## end gnulib module getlogin-tests
@@ -1147,10 +1147,10 @@ EXTRA_DIST += test-link.h test-link.c signature.h macros.h
@@ -1148,10 +1148,10 @@ EXTRA_DIST += test-link.h test-link.c signature.h macros.h
## begin gnulib module linkat-tests
@ -70,7 +86,7 @@ diff -urNp coreutils-8.21-orig/gnulib-tests/gnulib.mk coreutils-8.21/gnulib-test
## end gnulib module linkat-tests
@@ -1359,9 +1359,9 @@ EXTRA_DIST += test-memcoll.c macros.h
@@ -1360,9 +1360,9 @@ EXTRA_DIST += test-memcoll.c macros.h
## begin gnulib module memrchr-tests
@ -83,7 +99,7 @@ diff -urNp coreutils-8.21-orig/gnulib-tests/gnulib.mk coreutils-8.21/gnulib-test
## end gnulib module memrchr-tests
@@ -1912,9 +1912,9 @@ EXTRA_DIST += test-statat.c
@@ -1913,9 +1913,9 @@ EXTRA_DIST += test-statat.c
## begin gnulib module stdalign-tests
@ -96,7 +112,7 @@ diff -urNp coreutils-8.21-orig/gnulib-tests/gnulib.mk coreutils-8.21/gnulib-test
## end gnulib module stdalign-tests
@@ -2269,9 +2269,9 @@ EXTRA_DIST += test-uname.c signature.h macros.h
@@ -2270,9 +2270,9 @@ EXTRA_DIST += test-uname.c signature.h macros.h
## begin gnulib module unistd-safer-tests
@ -109,7 +125,7 @@ diff -urNp coreutils-8.21-orig/gnulib-tests/gnulib.mk coreutils-8.21/gnulib-test
## end gnulib module unistd-safer-tests
@@ -2367,10 +2367,10 @@ EXTRA_DIST += test-userspec.c
@@ -2368,10 +2368,10 @@ EXTRA_DIST += test-userspec.c
## begin gnulib module utimens-tests
@ -124,9 +140,37 @@ diff -urNp coreutils-8.21-orig/gnulib-tests/gnulib.mk coreutils-8.21/gnulib-test
## end gnulib module utimens-tests
diff -urNp coreutils-8.21-orig/tests/local.mk coreutils-8.21/tests/local.mk
--- coreutils-8.21-orig/tests/local.mk 2013-02-11 11:30:12.000000000 +0100
+++ coreutils-8.21/tests/local.mk 2013-02-15 10:10:55.890532258 +0100
diff --git a/man/local.mk b/man/local.mk
index a39bb65..535690c 100644
--- a/man/local.mk
+++ b/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
diff --git a/tests/df/skip-duplicates.sh b/tests/df/skip-duplicates.sh
index f349263..9854f8d 100755
--- a/tests/df/skip-duplicates.sh
+++ b/tests/df/skip-duplicates.sh
@@ -26,6 +26,9 @@ require_gcc_shared_
df --local --output=target >LOCAL_FS || skip_ 'df fails'
grep '^/$' LOCAL_FS || skip_ 'no root file system found'
+# mark it expensive, to temporarily skip the test in koji
+expensive_
+
# Get real targets to substitute for /NONROOT and /REMOTE below.
export CU_NONROOT_FS=$(grep /. LOCAL_FS | head -n1)
export CU_REMOTE_FS=$(grep /. LOCAL_FS | tail -n+2 | head -n1)
diff --git a/tests/local.mk b/tests/local.mk
index 3335002..568944e 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -134,6 +134,7 @@ all_root_tests = \
tests/rm/no-give-up.sh \
tests/rm/one-file-system.sh \
@ -143,21 +187,10 @@ diff -urNp coreutils-8.21-orig/tests/local.mk coreutils-8.21/tests/local.mk
tests/tail-2/inotify-hash-abuse2.sh \
tests/tail-2/F-vs-missing.sh \
tests/tail-2/F-vs-rename.sh \
diff -urNp coreutils-8.21-orig/tests/touch/no-dereference.sh coreutils-8.21/tests/touch/no-dereference.sh
--- coreutils-8.21-orig/tests/touch/no-dereference.sh 2013-01-31 01:46:25.000000000 +0100
+++ coreutils-8.21/tests/touch/no-dereference.sh 2013-02-15 10:10:55.889593383 +0100
@@ -42,6 +42,8 @@ test -f nowhere && fail=1
grep '^#define HAVE_UTIMENSAT 1' "$CONFIG_HEADER" > /dev/null ||
grep '^#define HAVE_LUTIMES 1' "$CONFIG_HEADER" > /dev/null ||
skip_ 'this system lacks the utimensat function'
+grep '^#define HAVE_WORKINGKOJI 1' "$CONFIG_HEADER" > /dev/null ||
+ skip_ 'rest of the test disabled due to koji lack of utimensat function'
# Changing time of dangling symlink is okay.
# Skip the test if this fails, but the error text corresponds to
diff -urNp coreutils-8.22-orig/tests/misc/nohup.sh coreutils-8.22/tests/misc/nohup.sh
--- coreutils-8.22-orig/tests/misc/nohup.sh 2013-12-04 15:48:30.000000000 +0100
+++ coreutils-8.22/tests/misc/nohup.sh 2014-03-02 21:51:01.972887749 +0100
diff --git a/tests/misc/nohup.sh b/tests/misc/nohup.sh
index 1b43b60..3fd29e7 100755
--- a/tests/misc/nohup.sh
+++ b/tests/misc/nohup.sh
@@ -19,6 +19,8 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ nohup
@ -167,29 +200,19 @@ diff -urNp coreutils-8.22-orig/tests/misc/nohup.sh coreutils-8.22/tests/misc/noh
nohup sh -c 'echo stdout; echo stderr 1>&2' 2>err || fail=1
diff -urNp coreutils-8.23-orig/tests/df/skip-duplicates.sh coreutils-8.23/tests/df/skip-duplicates.sh
--- coreutils-8.23-orig/tests/df/skip-duplicates.sh 2014-07-14 00:09:52.000000000 +0200
+++ coreutils-8.23/tests/df/skip-duplicates.sh 2014-07-24 15:53:33.473031545 +0200
@@ -25,6 +25,10 @@ require_gcc_shared_
# potentially very many remote mounts.
df --local || skip_ 'df fails'
diff --git a/tests/touch/no-dereference.sh b/tests/touch/no-dereference.sh
index 7994638..72b2222 100755
--- a/tests/touch/no-dereference.sh
+++ b/tests/touch/no-dereference.sh
@@ -42,6 +42,8 @@ test -f nowhere && fail=1
grep '^#define HAVE_UTIMENSAT 1' "$CONFIG_HEADER" > /dev/null ||
grep '^#define HAVE_LUTIMES 1' "$CONFIG_HEADER" > /dev/null ||
skip_ 'this system lacks the utimensat function'
+grep '^#define HAVE_WORKINGKOJI 1' "$CONFIG_HEADER" > /dev/null ||
+ skip_ 'rest of the test disabled due to koji lack of utimensat function'
+#mark it expensive, to temporarily skip the test in koji
+expensive_
+
+
export CU_NONROOT_FS=$(df --local --output=target 2>&1 | grep /. | head -n1)
export CU_REMOTE_FS=$(df --local --output=target 2>&1 | grep /. |
tail -n+2 | head -n1)
diff -urNp coreutils-8.23-orig/man/local.mk coreutils-8.23/man/local.mk
--- coreutils-8.23-orig/man/local.mk 2014-07-18 03:40:57.000000000 +0200
+++ coreutils-8.23/man/local.mk 2014-08-05 12:18:20.477524009 +0200
@@ -41,7 +41,7 @@ distclean-local:
test x$(srcdir) = x$(builddir) || rm -f $(ALL_MANS)
# Changing time of dangling symlink is okay.
# Skip the test if this fails, but the error text corresponds to
--
2.7.4
# Dependencies common to all man pages. Updated below.
-mandeps =
+mandeps = $(PROGRAMS)
# Depend on this to get version number changes.
mandeps += .version

View File

@ -1,7 +1,8 @@
diff -urNp coreutils-6.12-orig/src/md5sum.c coreutils-6.12/src/md5sum.c
--- coreutils-6.12-orig/src/md5sum.c 2008-05-26 08:40:33.000000000 +0200
+++ coreutils-6.12/src/md5sum.c 2008-10-21 16:07:28.000000000 +0200
@@ -200,6 +200,9 @@ Print or check %s (%d-bit) checksums.\n\
diff --git a/src/md5sum.c b/src/md5sum.c
index 8e21609..a857d62 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -266,6 +266,9 @@ Print or check %s (%d-bit) checksums.\n\
fputs (_("\
-t, --text read in text mode (default)\n\
"), stdout);

View File

@ -1,7 +1,8 @@
diff -urNp coreutils-8.2-orig/src/uname.c coreutils-8.2/src/uname.c
--- coreutils-8.2-orig/src/uname.c 2009-09-23 10:25:44.000000000 +0200
+++ coreutils-8.2/src/uname.c 2009-12-19 09:09:11.663607110 +0100
@@ -299,13 +299,19 @@ main (int argc, char **argv)
diff --git a/src/uname.c b/src/uname.c
index 6371ca2..1ad8fd7 100644
--- a/src/uname.c
+++ b/src/uname.c
@@ -300,13 +300,19 @@ main (int argc, char **argv)
if (toprint & PRINT_PROCESSOR)
{
@ -22,7 +23,7 @@ diff -urNp coreutils-8.2-orig/src/uname.c coreutils-8.2/src/uname.c
#endif
#ifdef UNAME_PROCESSOR
if (element == unknown)
@@ -343,7 +349,7 @@ main (int argc, char **argv)
@@ -344,7 +350,7 @@ main (int argc, char **argv)
if (toprint & PRINT_HARDWARE_PLATFORM)
{
@ -31,7 +32,7 @@ diff -urNp coreutils-8.2-orig/src/uname.c coreutils-8.2/src/uname.c
#if HAVE_SYSINFO && defined SI_PLATFORM
{
static char hardware_platform[257];
@@ -351,6 +357,14 @@ main (int argc, char **argv)
@@ -352,6 +358,14 @@ main (int argc, char **argv)
hardware_platform, sizeof hardware_platform))
element = hardware_platform;
}

View File

@ -4,10 +4,10 @@ Date: Fri, 17 Jun 2016 16:58:18 +0200
Subject: [PATCH] downstream changes to default DIR_COLORS
---
DIR_COLORS | 44 +++----
DIR_COLORS.256color | 296 +++++++++++++++++++++++-------------------------
DIR_COLORS.lightbgcolor | 203 +++++++++++++++++----------------
3 files changed, 271 insertions(+), 272 deletions(-)
DIR_COLORS | 44 ++++----
DIR_COLORS.256color | 294 +++++++++++++++++++++++-------------------------
DIR_COLORS.lightbgcolor | 207 +++++++++++++++++-----------------
3 files changed, 271 insertions(+), 274 deletions(-)
diff --git a/DIR_COLORS b/DIR_COLORS
index d2ea453..27af9d7 100644
@ -34,7 +34,7 @@ index d2ea453..27af9d7 100644
# Below are TERM entries, which can be a glob patterns, to match
# against the TERM environment variable to determine if it is colorizable.
@@ -62,7 +68,7 @@ DOOR 01;35 # door
@@ -56,7 +62,7 @@ DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
@ -43,7 +43,7 @@ index d2ea453..27af9d7 100644
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
@@ -183,21 +189,21 @@ EXEC 01;32
@@ -181,21 +187,21 @@ EXEC 01;32
.ogx 01;35
# audio formats
@ -85,7 +85,7 @@ diff --git a/DIR_COLORS.256color b/DIR_COLORS.256color
index d2ea453..74c34ba 100644
--- a/DIR_COLORS.256color
+++ b/DIR_COLORS.256color
@@ -1,45 +1,22 @@
@@ -1,39 +1,22 @@
-# Configuration file for dircolors, a utility to help you set the
-# LS_COLORS environment variable used by GNU ls with the --color option.
+# Configuration file for the 256color ls utility
@ -109,30 +109,24 @@ index d2ea453..74c34ba 100644
# against the TERM environment variable to determine if it is colorizable.
-TERM Eterm
-TERM ansi
-TERM color-xterm
-TERM *color*
-TERM con[0-9]*x[0-9]*
-TERM cons25
-TERM console
-TERM cygwin
-TERM dtterm
-TERM eterm-color
-TERM gnome
-TERM gnome-256color
-TERM hurd
-TERM jfbterm
-TERM konsole
-TERM kterm
-TERM linux
-TERM linux-c
-TERM mach-color
-TERM mach-gnu-color
-TERM mlterm
-TERM putty
-TERM putty-256color
-TERM rxvt*
-TERM screen*
-TERM st
-TERM st-256color
-TERM terminator
-TERM tmux*
-TERM vt100
@ -142,7 +136,7 @@ index d2ea453..74c34ba 100644
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
@@ -49,29 +26,40 @@ TERM xterm*
@@ -43,29 +26,40 @@ TERM xterm*
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
@ -199,7 +193,7 @@ index d2ea453..74c34ba 100644
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
@@ -89,115 +77,115 @@ EXEC 01;32
@@ -83,119 +77,115 @@ EXEC 01;32
#.csh 01;32
# archives or compressed (bright red)
@ -225,6 +219,8 @@ index d2ea453..74c34ba 100644
-.lz 01;31
-.lzo 01;31
-.xz 01;31
-.zst 01;31
-.tzst 01;31
-.bz2 01;31
-.bz 01;31
-.tbz 01;31
@ -289,6 +285,8 @@ index d2ea453..74c34ba 100644
# image formats
-.jpg 01;35
-.jpeg 01;35
-.mjpg 01;35
-.mjpeg 01;35
-.gif 01;35
-.bmp 01;35
-.pbm 01;35
@ -445,7 +443,7 @@ index d2ea453..95d6879 100644
# Below are TERM entries, which can be a glob patterns, to match
# against the TERM environment variable to determine if it is colorizable.
@@ -52,17 +57,17 @@ TERM xterm*
@@ -46,17 +51,17 @@ TERM xterm*
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
@ -468,7 +466,7 @@ index d2ea453..95d6879 100644
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
@@ -71,7 +76,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
@@ -65,7 +70,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
@ -477,7 +475,7 @@ index d2ea453..95d6879 100644
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
@@ -88,99 +93,99 @@ EXEC 01;32
@@ -82,103 +87,99 @@ EXEC 01;32
#.sh 01;32
#.csh 01;32
@ -504,6 +502,8 @@ index d2ea453..95d6879 100644
-.lz 01;31
-.lzo 01;31
-.xz 01;31
-.zst 01;31
-.tzst 01;31
-.bz2 01;31
-.bz 01;31
-.tbz 01;31
@ -569,6 +569,8 @@ index d2ea453..95d6879 100644
# image formats
-.jpg 01;35
-.jpeg 01;35
-.mjpg 01;35
-.mjpeg 01;35
-.gif 01;35
-.bmp 01;35
-.pbm 01;35

View File

@ -1,188 +0,0 @@
From c424bbcb532c5b9924349e3522b3b431eaa7c178 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Fri, 8 Jul 2016 18:59:35 +0200
Subject: [PATCH] install: with -Z, set default SELinux context for created
directories
* doc/coreutils.texi (install invocation): Update -Z documentation.
* src/install.c (make_ancestor): Set default security context before
calling mkdir() if the -Z option is given.
(process_dir): Call restorecon() on the destination directory if the
-Z option is given.
(usage): Update -Z documentation.
* tests/install/install-Z-selinux.sh: A new test for 'install -Z -D'
and 'install -Z -d' based on tests/mkdir/restorecon.sh.
* tests/local.mk: Reference the test.
* NEWS: Mention the improvement.
Reported at https://bugzilla.redhat.com/1339135
Fixes http://bugs.gnu.org/23868
Upstream-commit: 502518b44039138d148e2e15157d125c82d02af0
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
doc/coreutils.texi | 2 +-
src/install.c | 33 ++++++++++++++++++----
tests/install/install-Z-selinux.sh | 58 ++++++++++++++++++++++++++++++++++++++
tests/local.mk | 1 +
4 files changed, 88 insertions(+), 6 deletions(-)
create mode 100644 tests/install/install-Z-selinux.sh
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 092192c..1543f27 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -9208,7 +9208,7 @@ Print the name of each file before moving it.
@cindex security context
This option functions similarly to the @command{restorecon} command,
by adjusting the SELinux security context according
-to the system default type for destination files.
+to the system default type for destination files and each created directory.
@end table
diff --git a/src/install.c b/src/install.c
index 089f298..1b7a209 100644
--- a/src/install.c
+++ b/src/install.c
@@ -39,6 +39,7 @@
#include "prog-fprintf.h"
#include "quote.h"
#include "savewd.h"
+#include "selinux.h"
#include "stat-time.h"
#include "utimens.h"
#include "xstrtol.h"
@@ -423,6 +424,12 @@ announce_mkdir (char const *dir, void *options)
static int
make_ancestor (char const *dir, char const *component, void *options)
{
+ struct cp_options const *x = options;
+ if (x->set_security_context && defaultcon (dir, S_IFDIR) < 0
+ && ! ignorable_ctx_err (errno))
+ error (0, errno, _("failed to set default creation context for %s"),
+ quoteaf (dir));
+
int r = mkdir (component, DEFAULT_MODE);
if (r == 0)
announce_mkdir (dir, options);
@@ -433,12 +440,28 @@ make_ancestor (char const *dir, char const *component, void *options)
static int
process_dir (char *dir, struct savewd *wd, void *options)
{
- return (make_dir_parents (dir, wd,
- make_ancestor, options,
- dir_mode, announce_mkdir,
- dir_mode_bits, owner_id, group_id, false)
+ struct cp_options const *x = options;
+
+ int ret = (make_dir_parents (dir, wd, make_ancestor, options,
+ dir_mode, announce_mkdir,
+ dir_mode_bits, owner_id, group_id, false)
? EXIT_SUCCESS
: EXIT_FAILURE);
+
+ /* FIXME: Due to the current structure of make_dir_parents()
+ we don't have the facility to call defaultcon() before the
+ final component of DIR is created. So for now, create the
+ final component with the context from previous component
+ and here we set the context for the final component. */
+ if (ret == EXIT_SUCCESS && x->set_security_context)
+ {
+ if (! restorecon (last_component (dir), false, false)
+ && ! ignorable_ctx_err (errno))
+ error (0, errno, _("failed to restore context for %s"),
+ quoteaf (dir));
+ }
+
+ return ret;
}
/* Copy file FROM onto file TO, creating TO if necessary.
@@ -651,7 +674,7 @@ In the 4th form, create all components of the given DIRECTORY(ies).\n\
fputs (_("\
-P, --preserve-context preserve SELinux security context (-P deprecated)\n\
-Z set SELinux security context of destination\n\
- file to default type\n\
+ file and each created directory to default type\n\
--context[=CTX] like -Z, or if CTX is specified then set the\n\
SELinux or SMACK security context to CTX\n\
"), stdout);
diff --git a/tests/install/install-Z-selinux.sh b/tests/install/install-Z-selinux.sh
new file mode 100644
index 0000000..9c3b642
--- /dev/null
+++ b/tests/install/install-Z-selinux.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+# test 'install -Z -D' and 'install -Z -d'
+# based on tests/mkdir/restorecon.sh
+
+# Copyright (C) 2013-2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
+print_ver_ ginstall
+require_selinux_
+
+
+get_selinux_type() { ls -Zd "$1" | sed -n 's/.*:\(.*_t\):.*/\1/p'; }
+
+mkdir subdir || framework_failure_
+chcon 'root:object_r:tmp_t:s0' subdir || framework_failure_
+cd subdir
+
+# Since in a tmp_t dir, dirs can be created as user_tmp_t ...
+touch standard || framework_failure_
+mkdir restored || framework_failure_
+if restorecon restored 2>/dev/null; then
+ # ... but when restored can be set to user_home_t
+ # So ensure the type for these mkdir -Z cases matches
+ # the directory type as set by restorecon.
+ ginstall -Z standard single || fail=1
+ ginstall -Z -d single_d || fail=1
+ # Run these as separate processes in case global context
+ # set for an arg, impacts on another arg
+ # TODO: Have the defaultcon() vary over these directories
+ for dst in single_d/existing/file multi/ple/file; do
+ ginstall -Z -D standard "$dst" || fail=1
+ done
+ restored_type=$(get_selinux_type 'restored')
+ test "$(get_selinux_type 'single')" = "$restored_type" || fail=1
+ test "$(get_selinux_type 'single_d')" = "$restored_type" || fail=1
+ test "$(get_selinux_type 'single_d/existing')" = "$restored_type" || fail=1
+ test "$(get_selinux_type 'multi')" = "$restored_type" || fail=1
+ test "$(get_selinux_type 'multi/ple')" = "$restored_type" || fail=1
+fi
+if test "$fail" = '1'; then
+ ls -UZd standard restored
+ ls -UZd single single_d single_d/existing multi multi/ple
+fi
+
+Exit $fail
diff --git a/tests/local.mk b/tests/local.mk
index ec23448..42d39f2 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -548,6 +548,7 @@ all_tests = \
tests/install/d-slashdot.sh \
tests/install/install-C.sh \
tests/install/install-C-selinux.sh \
+ tests/install/install-Z-selinux.sh \
tests/install/strip-program.sh \
tests/install/trap.sh \
tests/ln/backup-1.sh \
--
2.5.5

View File

@ -1,236 +0,0 @@
From 9338b244572e07bbff314b3570228e8cf43f1300 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 6 Sep 2016 17:38:26 +0200
Subject: [PATCH] ls: allow interruption when reading slow directories
Postpone installation of signal handlers until they're needed.
That is right before the first escape sequence is printed.
* src/ls.c (signal_setup): A new function refactored from main()
to set and restore signal handlers.
(main): Move signal handler setup to put_indicator()
so that the default signal handling is untouched as long as possible.
Adjusted condition for restoring signal handlers to reflect the change.
(put_indicator): Install signal handlers if called for the very first
time. It uses the same code that was in main() prior to this commit.
* NEWS: Mention the improvement.
See https://bugzilla.redhat.com/1365933
Fixes http://bugs.gnu.org/24232
Upstream-commit: 5445f7811ff945ea13aa2a0fd797eb4c0a0e4db0
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
src/ls.c | 161 ++++++++++++++++++++++++++++++++++++---------------------------
1 file changed, 93 insertions(+), 68 deletions(-)
diff --git a/src/ls.c b/src/ls.c
index d976036..66df307 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1244,13 +1244,12 @@ process_signals (void)
}
}
-int
-main (int argc, char **argv)
-{
- int i;
- struct pending *thispend;
- int n_files;
+/* Setup signal handlers if INIT is true,
+ otherwise restore to the default. */
+static void
+signal_setup (bool init)
+{
/* The signals that are trapped, and the number of such signals. */
static int const sig[] =
{
@@ -1278,8 +1277,77 @@ main (int argc, char **argv)
enum { nsigs = ARRAY_CARDINALITY (sig) };
#if ! SA_NOCLDSTOP
- bool caught_sig[nsigs];
+ static bool caught_sig[nsigs];
+#endif
+
+ int j;
+
+ if (init)
+ {
+#if SA_NOCLDSTOP
+ struct sigaction act;
+
+ sigemptyset (&caught_signals);
+ for (j = 0; j < nsigs; j++)
+ {
+ sigaction (sig[j], NULL, &act);
+ if (act.sa_handler != SIG_IGN)
+ sigaddset (&caught_signals, sig[j]);
+ }
+
+ act.sa_mask = caught_signals;
+ act.sa_flags = SA_RESTART;
+
+ for (j = 0; j < nsigs; j++)
+ if (sigismember (&caught_signals, sig[j]))
+ {
+ act.sa_handler = sig[j] == SIGTSTP ? stophandler : sighandler;
+ sigaction (sig[j], &act, NULL);
+ }
+#else
+ for (j = 0; j < nsigs; j++)
+ {
+ caught_sig[j] = (signal (sig[j], SIG_IGN) != SIG_IGN);
+ if (caught_sig[j])
+ {
+ signal (sig[j], sig[j] == SIGTSTP ? stophandler : sighandler);
+ siginterrupt (sig[j], 0);
+ }
+ }
#endif
+ }
+ else /* restore. */
+ {
+#if SA_NOCLDSTOP
+ for (j = 0; j < nsigs; j++)
+ if (sigismember (&caught_signals, sig[j]))
+ signal (sig[j], SIG_DFL);
+#else
+ for (j = 0; j < nsigs; j++)
+ if (caught_sig[j])
+ signal (sig[j], SIG_DFL);
+#endif
+ }
+}
+
+static inline void
+signal_init (void)
+{
+ signal_setup (true);
+}
+
+static inline void
+signal_restore (void)
+{
+ signal_setup (false);
+}
+
+int
+main (int argc, char **argv)
+{
+ int i;
+ struct pending *thispend;
+ int n_files;
initialize_main (&argc, &argv);
set_program_name (argv[0]);
@@ -1314,46 +1382,6 @@ main (int argc, char **argv)
|| (is_colored (C_EXEC) && color_symlink_as_referent)
|| (is_colored (C_MISSING) && format == long_format))
check_symlink_color = true;
-
- /* If the standard output is a controlling terminal, watch out
- for signals, so that the colors can be restored to the
- default state if "ls" is suspended or interrupted. */
-
- if (0 <= tcgetpgrp (STDOUT_FILENO))
- {
- int j;
-#if SA_NOCLDSTOP
- struct sigaction act;
-
- sigemptyset (&caught_signals);
- for (j = 0; j < nsigs; j++)
- {
- sigaction (sig[j], NULL, &act);
- if (act.sa_handler != SIG_IGN)
- sigaddset (&caught_signals, sig[j]);
- }
-
- act.sa_mask = caught_signals;
- act.sa_flags = SA_RESTART;
-
- for (j = 0; j < nsigs; j++)
- if (sigismember (&caught_signals, sig[j]))
- {
- act.sa_handler = sig[j] == SIGTSTP ? stophandler : sighandler;
- sigaction (sig[j], &act, NULL);
- }
-#else
- for (j = 0; j < nsigs; j++)
- {
- caught_sig[j] = (signal (sig[j], SIG_IGN) != SIG_IGN);
- if (caught_sig[j])
- {
- signal (sig[j], sig[j] == SIGTSTP ? stophandler : sighandler);
- siginterrupt (sig[j], 0);
- }
- }
-#endif
- }
}
if (dereference == DEREF_UNDEFINED)
@@ -1466,32 +1494,21 @@ main (int argc, char **argv)
print_dir_name = true;
}
- if (print_with_color)
+ if (print_with_color && used_color)
{
int j;
- if (used_color)
- {
- /* Skip the restore when it would be a no-op, i.e.,
- when left is "\033[" and right is "m". */
- if (!(color_indicator[C_LEFT].len == 2
- && memcmp (color_indicator[C_LEFT].string, "\033[", 2) == 0
- && color_indicator[C_RIGHT].len == 1
- && color_indicator[C_RIGHT].string[0] == 'm'))
- restore_default_color ();
- }
+ /* Skip the restore when it would be a no-op, i.e.,
+ when left is "\033[" and right is "m". */
+ if (!(color_indicator[C_LEFT].len == 2
+ && memcmp (color_indicator[C_LEFT].string, "\033[", 2) == 0
+ && color_indicator[C_RIGHT].len == 1
+ && color_indicator[C_RIGHT].string[0] == 'm'))
+ restore_default_color ();
+
fflush (stdout);
- /* Restore the default signal handling. */
-#if SA_NOCLDSTOP
- for (j = 0; j < nsigs; j++)
- if (sigismember (&caught_signals, sig[j]))
- signal (sig[j], SIG_DFL);
-#else
- for (j = 0; j < nsigs; j++)
- if (caught_sig[j])
- signal (sig[j], SIG_DFL);
-#endif
+ signal_restore ();
/* Act on any signals that arrived before the default was restored.
This can process signals out of order, but there doesn't seem to
@@ -4482,6 +4499,14 @@ put_indicator (const struct bin_str *ind)
if (! used_color)
{
used_color = true;
+
+ /* If the standard output is a controlling terminal, watch out
+ for signals, so that the colors can be restored to the
+ default state if "ls" is suspended or interrupted. */
+
+ if (0 <= tcgetpgrp (STDOUT_FILENO))
+ signal_init ();
+
prep_non_filename_text ();
}
--
2.7.4

View File

@ -1,332 +0,0 @@
From c479153d77b419a6cae4551b63d2b73096c1130e Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 18 Jul 2016 19:04:43 +0200
Subject: [PATCH 1/3] maint: sort.c: deduplicate code for traversing numbers
* src/sort.c (traverse_raw_number): New function for traversing numbers.
(find_unit_order): Use traverse_raw_number() instead of open-coding it.
(debug_key): Likewise.
---
src/sort.c | 63 ++++++++++++++++++++++++++++++++++----------------------------
1 file changed, 35 insertions(+), 28 deletions(-)
diff --git a/src/sort.c b/src/sort.c
index 5b02343..e28bb6c 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -2231,18 +2231,16 @@ static char const unit_order[UCHAR_LIM] =
#endif
};
-/* Return an integer that represents the order of magnitude of the
- unit following the number. The number may contain thousands
- separators and a decimal point, but it may not contain leading blanks.
- Negative numbers get negative orders; zero numbers have a zero order. */
-
-static int _GL_ATTRIBUTE_PURE
-find_unit_order (char const *number)
+/* Traverse number given as *number consisting of digits, thousands_sep, and
+ decimal_point chars only. Returns the highest digit found in the number,
+ or '\0' if no digit has been found. Upon return *number points at the
+ character that immediately follows after the given number. */
+static unsigned char
+traverse_raw_number (char const **number)
{
- bool minus_sign = (*number == '-');
- char const *p = number + minus_sign;
- int nonzero = 0;
+ char const *p = *number;
unsigned char ch;
+ unsigned char max_digit = '\0';
/* Scan to end of number.
Decimals or separators not followed by digits stop the scan.
@@ -2253,16 +2251,34 @@ find_unit_order (char const *number)
do
{
while (ISDIGIT (ch = *p++))
- nonzero |= ch - '0';
+ if (max_digit < ch)
+ max_digit = ch;
}
while (ch == thousands_sep);
if (ch == decimal_point)
while (ISDIGIT (ch = *p++))
- nonzero |= ch - '0';
+ if (max_digit < ch)
+ max_digit = ch;
+
+ *number = p - 1;
+ return max_digit;
+}
+
+/* Return an integer that represents the order of magnitude of the
+ unit following the number. The number may contain thousands
+ separators and a decimal point, but it may not contain leading blanks.
+ Negative numbers get negative orders; zero numbers have a zero order. */
- if (nonzero)
+static int _GL_ATTRIBUTE_PURE
+find_unit_order (char const *number)
+{
+ bool minus_sign = (*number == '-');
+ char const *p = number + minus_sign;
+ unsigned char max_digit = traverse_raw_number (&p);
+ if ('0' < max_digit)
{
+ unsigned char ch = *p;
int order = unit_order[ch];
return (minus_sign ? -order : order);
}
@@ -2655,23 +2671,14 @@ debug_key (struct line const *line, struct keyfield const *key)
ignore_value (strtold (beg, &tighter_lim));
else if (key->numeric || key->human_numeric)
{
- char *p = beg + (beg < lim && *beg == '-');
- bool found_digit = false;
- unsigned char ch;
-
- do
+ char const *p = beg + (beg < lim && *beg == '-');
+ unsigned char max_digit = traverse_raw_number (&p);
+ if ('0' <= max_digit)
{
- while (ISDIGIT (ch = *p++))
- found_digit = true;
+ unsigned char ch = *p;
+ tighter_lim = (char *) p
+ + (key->human_numeric && unit_order[ch]);
}
- while (ch == thousands_sep);
-
- if (ch == decimal_point)
- while (ISDIGIT (ch = *p++))
- found_digit = true;
-
- if (found_digit)
- tighter_lim = p - ! (key->human_numeric && unit_order[ch]);
}
else
tighter_lim = lim;
--
2.5.5
From 8c39465a5b0343ff7a21286dd69ed5430685d2f7 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 18 Jul 2016 19:04:44 +0200
Subject: [PATCH 2/3] sort: make -h work with -k and blank used as thousands
separator
* src/sort.c (traverse_raw_number): Allow to skip only one occurrence
of thousands_sep to avoid finding the unit in the next column in case
thousands_sep matches as blank and is used as column delimiter.
* tests/misc/sort-h-thousands-sep.sh: Add regression test for this bug.
* tests/local.mk: Reference the test.
* NEWS: Mention the bug fix.
Reported at https://bugzilla.redhat.com/1355780
Fixes http://bugs.gnu.org/24015
---
src/sort.c | 14 ++++++++----
tests/local.mk | 1 +
tests/misc/sort-h-thousands-sep.sh | 47 ++++++++++++++++++++++++++++++++++++++
3 files changed, 57 insertions(+), 5 deletions(-)
create mode 100755 tests/misc/sort-h-thousands-sep.sh
diff --git a/src/sort.c b/src/sort.c
index e28bb6c..dd3ba58 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -2248,13 +2248,17 @@ traverse_raw_number (char const **number)
to be lacking in units.
FIXME: add support for multibyte thousands_sep and decimal_point. */
- do
+ while (ISDIGIT (ch = *p++))
{
- while (ISDIGIT (ch = *p++))
- if (max_digit < ch)
- max_digit = ch;
+ if (max_digit < ch)
+ max_digit = ch;
+
+ /* Allow to skip only one occurrence of thousands_sep to avoid finding
+ the unit in the next column in case thousands_sep matches as blank
+ and is used as column delimiter. */
+ if (*p == thousands_sep)
+ ++p;
}
- while (ch == thousands_sep);
if (ch == decimal_point)
while (ISDIGIT (ch = *p++))
diff --git a/tests/local.mk b/tests/local.mk
index 42d39f2..dccff8d 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -344,6 +344,7 @@ all_tests = \
tests/misc/sort-discrim.sh \
tests/misc/sort-files0-from.pl \
tests/misc/sort-float.sh \
+ tests/misc/sort-h-thousands-sep.sh \
tests/misc/sort-mb-tests.sh \
tests/i18n/sort.sh \
tests/misc/sort-merge.pl \
diff --git a/tests/misc/sort-h-thousands-sep.sh b/tests/misc/sort-h-thousands-sep.sh
new file mode 100755
index 0000000..17f1b6c
--- /dev/null
+++ b/tests/misc/sort-h-thousands-sep.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+# exercise 'sort -h' in locales where thousands separator is blank
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
+print_ver_ sort
+test "$(LC_ALL=sv_SE locale thousands_sep)" = ' ' \
+ || skip_ 'The Swedish locale with blank thousands separator is unavailable.'
+
+tee exp1 > in << _EOF_
+1 1k 4 003 1M
+2k 2M 4 002 2
+3M 3 4 001 3k
+_EOF_
+
+cat > exp2 << _EOF_
+3M 3 4 001 3k
+1 1k 4 003 1M
+2k 2M 4 002 2
+_EOF_
+
+cat > exp3 << _EOF_
+3M 3 4 001 3k
+2k 2M 4 002 2
+1 1k 4 003 1M
+_EOF_
+
+for i in 1 2 3; do
+ LC_ALL="sv_SE.utf8" sort -h -k $i "in" > "out${i}" || fail=1
+ compare "exp${i}" "out${i}" || fail=1
+done
+
+Exit $fail
--
2.5.5
From 46ef53f558e7bc1c0bc0abd62a86b40b4141e058 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 18 Jul 2016 19:04:45 +0200
Subject: [PATCH 3/3] sort: with -h, disallow thousands separator between
number and unit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* src/sort.c (traverse_raw_number): Accept thousands separator only
if it is immediately followed by a digit.
* tests/misc/sort-h-thousands-sep.sh: Cover the fix for this bug.
Suggested by Pádraig Brady in http://bugs.gnu.org/24015
---
src/sort.c | 11 ++++++++++-
tests/misc/sort-h-thousands-sep.sh | 25 +++++++++++++------------
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/src/sort.c b/src/sort.c
index dd3ba58..69ef75f 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -2241,6 +2241,7 @@ traverse_raw_number (char const **number)
char const *p = *number;
unsigned char ch;
unsigned char max_digit = '\0';
+ bool ends_with_thousands_sep = false;
/* Scan to end of number.
Decimals or separators not followed by digits stop the scan.
@@ -2256,10 +2257,18 @@ traverse_raw_number (char const **number)
/* Allow to skip only one occurrence of thousands_sep to avoid finding
the unit in the next column in case thousands_sep matches as blank
and is used as column delimiter. */
- if (*p == thousands_sep)
+ ends_with_thousands_sep = (*p == thousands_sep);
+ if (ends_with_thousands_sep)
++p;
}
+ if (ends_with_thousands_sep)
+ {
+ /* thousands_sep not followed by digit is not allowed. */
+ *number = p - 2;
+ return max_digit;
+ }
+
if (ch == decimal_point)
while (ISDIGIT (ch = *p++))
if (max_digit < ch)
diff --git a/tests/misc/sort-h-thousands-sep.sh b/tests/misc/sort-h-thousands-sep.sh
index 17f1b6c..3ffa89e 100755
--- a/tests/misc/sort-h-thousands-sep.sh
+++ b/tests/misc/sort-h-thousands-sep.sh
@@ -18,28 +18,29 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ sort
+
test "$(LC_ALL=sv_SE locale thousands_sep)" = ' ' \
|| skip_ 'The Swedish locale with blank thousands separator is unavailable.'
-tee exp1 > in << _EOF_
-1 1k 4 003 1M
-2k 2M 4 002 2
-3M 3 4 001 3k
+tee exp1 exp3 > in << _EOF_
+1 1k 1 M 4 003 1M
+2k 2M 2 k 4 002 2
+3M 3 3 G 4 001 3k
_EOF_
cat > exp2 << _EOF_
-3M 3 4 001 3k
-1 1k 4 003 1M
-2k 2M 4 002 2
+3M 3 3 G 4 001 3k
+1 1k 1 M 4 003 1M
+2k 2M 2 k 4 002 2
_EOF_
-cat > exp3 << _EOF_
-3M 3 4 001 3k
-2k 2M 4 002 2
-1 1k 4 003 1M
+cat > exp5 << _EOF_
+3M 3 3 G 4 001 3k
+2k 2M 2 k 4 002 2
+1 1k 1 M 4 003 1M
_EOF_
-for i in 1 2 3; do
+for i in 1 2 3 5; do
LC_ALL="sv_SE.utf8" sort -h -k $i "in" > "out${i}" || fail=1
compare "exp${i}" "out${i}" || fail=1
done
--
2.5.5

View File

@ -1,115 +0,0 @@
From 1e1a69da31b39e4d672ccb8a3ca0e5400d4720ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Wed, 26 Oct 2016 15:45:01 +0100
Subject: [PATCH] md5sum,sha*sum: fix --ignore-missing with checksums starting
with 00
* NEWS: Mention the fix.
* src/md5sum.c (digest_file): Add a new MISSING parameter to
return whether the file was missing, separately from the digest.
* tests/misc/md5sum.pl: Add a test case.
Fixes http://bugs.gnu.org/24795
Upstream-commit: d0ddfadfb27def2861f35b1a45190a4c1780b257
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
src/md5sum.c | 20 ++++++++++++--------
tests/misc/md5sum.pl | 7 +++++++
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/md5sum.c b/src/md5sum.c
index 933ec99..fee28c7 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -465,15 +465,19 @@ print_filename (char const *file, bool escape)
text because it was a terminal.
Put the checksum in *BIN_RESULT, which must be properly aligned.
+ Put true in *MISSING if the file can't be opened due to ENOENT.
Return true if successful. */
static bool
-digest_file (const char *filename, int *binary, unsigned char *bin_result)
+digest_file (const char *filename, int *binary, unsigned char *bin_result,
+ bool *missing)
{
FILE *fp;
int err;
bool is_stdin = STREQ (filename, "-");
+ *missing = false;
+
if (is_stdin)
{
have_read_stdin = true;
@@ -493,7 +497,7 @@ digest_file (const char *filename, int *binary, unsigned char *bin_result)
{
if (ignore_missing && errno == ENOENT)
{
- *bin_result = '\0';
+ *missing = true;
return true;
}
error (0, errno, "%s", quotef (filename));
@@ -606,14 +610,14 @@ digest_check (const char *checkfile_name)
'8', '9', 'a', 'b',
'c', 'd', 'e', 'f' };
bool ok;
+ bool missing;
/* Only escape in the edge case producing multiple lines,
to ease automatic processing of status output. */
bool needs_escape = ! status_only && strchr (filename, '\n');
properly_formatted_lines = true;
- *bin_buffer = '\1'; /* flag set to 0 for ignored missing files. */
- ok = digest_file (filename, &binary, bin_buffer);
+ ok = digest_file (filename, &binary, bin_buffer, &missing);
if (!ok)
{
@@ -626,10 +630,9 @@ digest_check (const char *checkfile_name)
printf (": %s\n", _("FAILED open or read"));
}
}
- else if (ignore_missing && ! *bin_buffer)
+ else if (ignore_missing && missing)
{
- /* Treat an empty buffer as meaning a missing file,
- which is ignored with --ignore-missing. */
+ /* Ignore missing files with --ignore-missing. */
;
}
else
@@ -879,8 +882,9 @@ main (int argc, char **argv)
else
{
int file_is_binary = binary;
+ bool missing;
- if (! digest_file (file, &file_is_binary, bin_buffer))
+ if (! digest_file (file, &file_is_binary, bin_buffer, &missing))
ok = false;
else
{
diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl
index 2eb6369..6ea7457 100755
--- a/tests/misc/md5sum.pl
+++ b/tests/misc/md5sum.pl
@@ -149,6 +149,13 @@ my @Tests =
{ERR=>
"md5sum: f.md5: no file was verified\n"},
{EXIT=> 1}],
+ # coreutils-8.25 with --ignore-missing treated checksums starting with 00
+ # as if the file was not present
+ ['check-ignore-missing-6', '--check', '--ignore-missing',
+ {AUX=> {f=> '9t'}},
+ {IN=> {'f.md5' =>
+ "006999e6df389641adf1fa3a74801d9d f\n"}},
+ {OUT=>"f: OK\n"}],
['bsd-segv', '--check', {IN=> {'z' => "MD5 ("}}, {EXIT=> 1},
{ERR=> "$prog: z: no properly formatted MD5 checksum lines found\n"}],
--
2.7.4

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

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJYPyRpAAoJEN9v2XEwYDfZ0I4P/3oaPYXMPEOKuDDpEcLumn26
gYIMQc1jIMbBNQe120gQmNPkRr5dTKt5Bap9qYkCj0pI/6VxVIWDo0xrOLYZi7AN
Xgr0kX2qLDFEH+EHkC1BpsAdpsgwfvLmVWPHS62CNKgVDgGiP1cRJZe8oVmlBCiR
3ES7pUsBfDn3hbdKNTTmMDtro1rQMOxfHkVCZLAva+JjdzpE+KTvzZzKkVuZZfJ/
Mi/ZySrXZXFvPBS7GXgop4x8EodyzQMeKO+nvpIUEBY1yLQgCvni5/CBI8w/EViD
DSjj0zWsCQkEjx6HCohi8sBHUYZ+M3lB4rkFk7aevdioPZUGfLkW31LT/cUJC/VV
MIQKWzQtZO/WCJuyEbWP2m25c4MtnnhTm5yoi29yT/CoTRlUWkIQpXm4oD1cJXHy
PpHveu8qM0qRaAtVdXE3pmapIMYUV4g7vxSuCjZRrgiDLhp/K7Lzt5xBhl++kPU2
U9uc202eah4Towo0pbHsuEJT0vk0GGLq8/17dCa/ss8wV+86ZLxl0kZYy4CNEnIW
vsCN6CJ5AoAEVrMN1F7ZJYnH4hoJedvIczThnAkNTqYYE3wnN9stOe28Oy/a0/tg
bt5/Mn0JbmQei890uU8zcEdUjidHqGV4hKk1E2UC4UCyHG/VcHv9gfr8OaD/xPDr
SoauDCHpBU7J7FT/DX+k
=vkKy
-----END PGP SIGNATURE-----

View File

@ -1,7 +1,8 @@
diff -urNp coreutils-8.4-orig/doc/coreutils.texi coreutils-8.4/doc/coreutils.texi
--- coreutils-8.4-orig/doc/coreutils.texi 2011-01-07 15:01:18.575654333 +0100
+++ coreutils-8.4/doc/coreutils.texi 2011-01-07 15:05:38.791655243 +0100
@@ -9993,6 +9993,8 @@ incorrect. @xref{Directory Setuid and Setgid}, for how the
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 400e135..47e4480 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -10074,6 +10074,8 @@ incorrect. @xref{Directory Setuid and Setgid}, for how the
set-user-ID and set-group-ID bits of directories are inherited unless
overridden in this way.

View File

@ -1,7 +1,8 @@
diff -urNp coreutils-8.21-orig/doc/coreutils.texi coreutils-8.21/doc/coreutils.texi
--- coreutils-8.21-orig/doc/coreutils.texi 2013-02-11 10:37:28.000000000 +0100
+++ coreutils-8.21/doc/coreutils.texi 2013-02-15 10:15:26.497593689 +0100
@@ -11221,6 +11221,13 @@ some systems (notably SunOS), doing this yields more up to date results,
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index a507280..400e135 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -11303,6 +11303,13 @@ some systems (notably SunOS), doing this yields more up to date results,
but in general this option makes @command{df} much slower, especially when
there are many or very busy file systems.
@ -15,10 +16,11 @@ diff -urNp coreutils-8.21-orig/doc/coreutils.texi coreutils-8.21/doc/coreutils.t
@item --total
@opindex --total
@cindex grand total of disk size, usage and available space
diff -urNp coreutils-8.21-orig/src/df.c coreutils-8.21/src/df.c
--- coreutils-8.21-orig/src/df.c 2013-02-05 00:40:31.000000000 +0100
+++ coreutils-8.21/src/df.c 2013-02-15 10:26:41.158651782 +0100
@@ -116,6 +116,9 @@ static bool print_type;
diff --git a/src/df.c b/src/df.c
index 8f760db..a7385fd 100644
--- a/src/df.c
+++ b/src/df.c
@@ -120,6 +120,9 @@ static bool print_type;
/* If true, print a grand total at the end. */
static bool print_grand_total;
@ -28,7 +30,7 @@ diff -urNp coreutils-8.21-orig/src/df.c coreutils-8.21/src/df.c
/* Grand total data. */
static struct fs_usage grand_fsu;
@@ -243,13 +246,15 @@ enum
@@ -247,13 +250,15 @@ enum
NO_SYNC_OPTION = CHAR_MAX + 1,
SYNC_OPTION,
TOTAL_OPTION,
@ -45,7 +47,7 @@ diff -urNp coreutils-8.21-orig/src/df.c coreutils-8.21/src/df.c
{"inodes", no_argument, NULL, 'i'},
{"human-readable", no_argument, NULL, 'h'},
{"si", no_argument, NULL, 'H'},
@@ -505,7 +510,10 @@ get_header (void)
@@ -509,7 +514,10 @@ get_header (void)
for (col = 0; col < ncolumns; col++)
{
char *cell = NULL;
@ -57,7 +59,7 @@ diff -urNp coreutils-8.21-orig/src/df.c coreutils-8.21/src/df.c
if (columns[col]->field == SIZE_FIELD
&& (header_mode == DEFAULT_MODE
@@ -1352,6 +1360,19 @@ get_point (const char *point, const struct stat *statp)
@@ -1397,6 +1405,19 @@ get_point (const char *point, const struct stat *statp)
static void
get_entry (char const *name, struct stat const *statp)
{
@ -77,7 +79,7 @@ diff -urNp coreutils-8.21-orig/src/df.c coreutils-8.21/src/df.c
if ((S_ISBLK (statp->st_mode) || S_ISCHR (statp->st_mode))
&& get_disk (name))
return;
@@ -1422,6 +1443,7 @@ or all file systems by default.\n\
@@ -1467,6 +1488,7 @@ or all file systems by default.\n\
-B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,\n\
'-BM' prints sizes in units of 1,048,576 bytes;\n\
see SIZE format below\n\
@ -85,7 +87,7 @@ diff -urNp coreutils-8.21-orig/src/df.c coreutils-8.21/src/df.c
-h, --human-readable print sizes in powers of 1024 (e.g., 1023M)\n\
-H, --si print sizes in powers of 1000 (e.g., 1.1G)\n\
"), stdout);
@@ -1512,6 +1534,9 @@ main (int argc, char **argv)
@@ -1557,6 +1579,9 @@ main (int argc, char **argv)
xstrtol_fatal (e, oi, c, long_options, optarg);
}
break;
@ -95,7 +97,7 @@ diff -urNp coreutils-8.21-orig/src/df.c coreutils-8.21/src/df.c
case 'i':
if (header_mode == OUTPUT_MODE)
{
@@ -1608,6 +1633,13 @@ main (int argc, char **argv)
@@ -1653,6 +1678,13 @@ main (int argc, char **argv)
}
}
@ -109,9 +111,11 @@ diff -urNp coreutils-8.21-orig/src/df.c coreutils-8.21/src/df.c
if (human_output_opts == -1)
{
if (posix_format)
diff -urNp coreutils-8.21-orig/tests/df/direct.sh coreutils-8.21/tests/df/direct.sh
--- coreutils-8.21-orig/tests/df/direct.sh 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.21/tests/df/direct.sh 2013-02-15 10:15:26.503644446 +0100
diff --git a/tests/df/direct.sh b/tests/df/direct.sh
new file mode 100644
index 0000000..8e4cfb8
--- /dev/null
+++ b/tests/df/direct.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+# Ensure "df --direct" works as documented

View File

@ -1,6 +1,7 @@
diff -urNp coreutils-8.25-orig/src/cut.c coreutils-8.25/src/cut.c
--- coreutils-8.25-orig/src/cut.c 2015-06-26 19:05:22.000000000 +0200
+++ coreutils-8.25/src/cut.c 2015-07-05 09:04:33.028546950 +0200
diff --git a/src/cut.c b/src/cut.c
index 7ab6be4..022d0ad 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -28,6 +28,11 @@
#include <assert.h>
#include <getopt.h>

File diff suppressed because it is too large Load Diff

View File

@ -1,38 +1,7 @@
From lkundrak@v3.sk Thu Jan 28 20:57:48 2016
Return-Path: lkundrak@v3.sk
Received: from zimbra.v3.sk (LHLO zimbra.v3.sk) (10.13.37.31) by
zimbra.v3.sk with LMTP; Thu, 28 Jan 2016 20:57:48 +0100 (CET)
Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix)
with ESMTP id D4DD260F92 for <lkundrak@v3.sk>; Thu, 28 Jan 2016 20:57:47
+0100 (CET)
X-Spam-Flag: NO
X-Spam-Score: -2.9
X-Spam-Level:
X-Spam-Status: No, score=-2.9 tagged_above=-10 required=3
tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk
[127.0.0.1]) (amavisd-new, port 10032) with ESMTP id HB5H5ynfOcyL; Thu, 28
Jan 2016 20:57:45 +0100 (CET)
Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix)
with ESMTP id 3FEF160F90; Thu, 28 Jan 2016 20:57:45 +0100 (CET)
X-Virus-Scanned: amavisd-new at zimbra.v3.sk
Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk
[127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TUF9p5l6r9SN; Thu, 28
Jan 2016 20:57:44 +0100 (CET)
Received: from odvarok.localdomain (s559633cb.adsl.online.nl
[85.150.51.203]) by zimbra.v3.sk (Postfix) with ESMTPSA id 6763560F8F; Thu,
28 Jan 2016 20:57:44 +0100 (CET)
From 02424bfcd719bbaa695f4e1c3ef17ad91b0d23c0 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
To: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <ovasik@redhat.com>, Ondrej
Oprala <ooprala@redhat.com>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Subject: [PATCH] unexpand: fix blank line handling
Date: Thu, 28 Jan 2016 20:57:22 +0100
Message-Id: <1454011042-30492-1-git-send-email-lkundrak@v3.sk>
X-Mailer: git-send-email 2.5.0
X-Evolution-Source: 1409576065.5421.4@dhcp-24-163.brq.redhat.com
Content-Transfer-Encoding: 8bit
Mime-Version: 1.0
Subject: [PATCH] unexpand: fix blank line handling
echo '' |./src/unexpand -a
@ -42,10 +11,10 @@ Really?
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/unexpand.c b/src/unexpand.c
index d6ff662..762c56b 100644
index 569a7ee..3bbbd66 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -304,7 +304,7 @@ unexpand (void)
@@ -233,7 +233,7 @@ unexpand (void)
next_tab_column = column;
tab_index -= !!tab_index;
}
@ -55,6 +24,5 @@ index d6ff662..762c56b 100644
column += mb_width (c);
if (!column)
--
2.5.0
2.7.4

View File

@ -1,7 +1,8 @@
diff -up ./src/expand.c.orig ./src/expand.c
--- ./src/expand.c.orig 2016-06-01 12:42:49.330373488 +0200
+++ ./src/expand.c 2016-06-07 14:35:16.011142041 +0200
@@ -173,15 +173,19 @@ expand (void)
diff --git a/src/expand.c b/src/expand.c
index 380e020..310b349 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -129,15 +129,19 @@ expand (void)
do
{
@ -25,10 +26,11 @@ diff -up ./src/expand.c.orig ./src/expand.c
if (convert)
{
diff -up ./src/unexpand.c.orig ./src/unexpand.c
--- ./src/unexpand.c.orig 2016-06-07 14:26:57.380746446 +0200
+++ ./src/unexpand.c 2016-06-07 14:34:54.059256698 +0200
@@ -220,15 +220,19 @@ unexpand (void)
diff --git a/src/unexpand.c b/src/unexpand.c
index 3bbbd66..863a90a 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -164,15 +164,19 @@ unexpand (void)
do
{
@ -52,9 +54,10 @@ diff -up ./src/unexpand.c.orig ./src/unexpand.c
if (convert)
{
diff -up ./tests/expand/mb.sh.orig ./tests/expand/mb.sh
--- ./tests/expand/mb.sh.orig 2016-05-11 14:13:53.095289000 +0200
+++ ./tests/expand/mb.sh 2016-06-07 14:38:48.259033445 +0200
diff --git a/tests/expand/mb.sh b/tests/expand/mb.sh
index 7971e18..031be7a 100755
--- a/tests/expand/mb.sh
+++ b/tests/expand/mb.sh
@@ -44,6 +44,20 @@ EOF
expand < in > out || fail=1
compare exp out > /dev/null 2>&1 || fail=1
@ -76,9 +79,10 @@ diff -up ./tests/expand/mb.sh.orig ./tests/expand/mb.sh
#test characters with display widths != 1
env printf '12345678
e\t|ascii(1)
diff -up ./tests/unexpand/mb.sh.orig ./tests/unexpand/mb.sh
--- ./tests/unexpand/mb.sh.orig 2016-06-07 14:41:44.210106466 +0200
+++ ./tests/unexpand/mb.sh 2016-06-07 14:52:28.848639772 +0200
diff --git a/tests/unexpand/mb.sh b/tests/unexpand/mb.sh
index 60d4c1a..8d75652 100755
--- a/tests/unexpand/mb.sh
+++ b/tests/unexpand/mb.sh
@@ -44,6 +44,22 @@ EOF
unexpand -a < in > out || fail=1
compare exp out > /dev/null 2>&1 || fail=1

View File

@ -14,7 +14,7 @@ diff --git a/src/sort.c b/src/sort.c
index 9e07ad8..e47b039 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -2274,12 +2274,10 @@ find_unit_order (char const *number)
@@ -2304,12 +2304,10 @@ find_unit_order (char const *number)
<none/unknown> < K/k < M < G < T < P < E < Z < Y */
static int

View File

@ -1,19 +1,20 @@
diff -up ./src/expand-core.c.orig ./src/expand-core.c
--- ./src/expand-core.c.orig 2016-06-28 14:44:18.281619000 +0200
+++ ./src/expand-core.c 2016-06-30 11:46:50.025109755 +0200
diff --git a/src/expand-common.c b/src/expand-common.c
index 4657e46..97cbb09 100644
--- a/src/expand-common.c
+++ b/src/expand-common.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <sys/types.h>
+#include <mbfile.h>
#include "system.h"
#include "die.h"
#include "error.h"
@@ -27,6 +28,119 @@
@@ -85,6 +86,119 @@ add_tab_stop (uintmax_t tabval)
}
}
#include "expand-core.h"
+extern inline int
+extern int
+set_utf_locale (void)
+{
+ /*try using some predefined locale */
@ -118,7 +119,7 @@ diff -up ./src/expand-core.c.orig ./src/expand-core.c
+ return false;
+}
+
+extern inline void
+extern void
+print_bom(void)
+{
+ putc (0xEF, stdout);
@ -128,42 +129,35 @@ diff -up ./src/expand-core.c.orig ./src/expand-core.c
+
/* Add the comma or blank separated list of tab stops STOPS
to the list of tab stops. */
extern void
diff --git a/src/expand-common.h b/src/expand-common.h
index 8cb2079..763bfda 100644
--- a/src/expand-common.h
+++ b/src/expand-common.h
@@ -34,6 +34,18 @@ extern size_t max_column_width;
/* The desired exit status. */
extern int exit_status;
diff -up ./src/expand-core.h.orig ./src/expand-core.h
--- ./src/expand-core.h.orig 2016-06-28 14:44:18.281619000 +0200
+++ ./src/expand-core.h 2016-06-30 11:47:18.929437205 +0200
@@ -15,7 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef EXPAND_CORE_H_
-# define EXPAND_CORE_H_
+#define EXPAND_CORE_H_
extern size_t first_free_tab;
@@ -29,6 +29,18 @@ extern char **file_list;
extern bool have_read_stdin;
+inline int
+extern int
+set_utf_locale (void);
+
+bool
+extern bool
+check_utf_locale(void);
+
+bool
+extern bool
+check_bom(FILE* fp, mb_file_t *mbf);
+
+inline void
+extern void
+print_bom(void);
+
void
parse_tab_stops (char const *stops, void (*add_tab_stop)(uintmax_t));
diff -up ./src/expand.c.orig ./src/expand.c
--- ./src/expand.c.orig 2016-06-28 14:44:18.286619000 +0200
+++ ./src/expand.c 2016-06-30 11:50:15.077312947 +0200
@@ -149,11 +149,33 @@ expand (void)
/* Add tab stop TABVAL to the end of 'tab_list'. */
extern void
add_tab_stop (uintmax_t tabval);
diff --git a/src/expand.c b/src/expand.c
index 310b349..4136824 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -105,11 +105,33 @@ expand (void)
FILE *fp = next_file (NULL);
mb_file_t mbf;
mbf_char_t c;
@ -199,7 +193,7 @@ diff -up ./src/expand.c.orig ./src/expand.c
while (true)
{
@@ -178,6 +200,27 @@ expand (void)
@@ -134,6 +156,27 @@ expand (void)
if ((mb_iseof (c)) && (fp = next_file (fp)))
{
mbf_init (mbf, fp);
@ -227,10 +221,11 @@ diff -up ./src/expand.c.orig ./src/expand.c
continue;
}
else
diff -up ./src/unexpand.c.orig ./src/unexpand.c
--- ./src/unexpand.c.orig 2016-06-28 17:39:22.894259000 +0200
+++ ./src/unexpand.c 2016-07-07 09:48:07.659924755 +0200
@@ -172,16 +172,36 @@ unexpand (void)
diff --git a/src/unexpand.c b/src/unexpand.c
index 863a90a..5681b58 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -116,16 +116,36 @@ unexpand (void)
include characters other than spaces, so the blanks must be
stored, not merely counted. */
mbf_char_t *pending_blank;
@ -268,7 +263,7 @@ diff -up ./src/unexpand.c.orig ./src/unexpand.c
while (true)
{
@@ -225,6 +245,27 @@ unexpand (void)
@@ -169,6 +189,27 @@ unexpand (void)
if ((mb_iseof (c)) && (fp = next_file (fp)))
{
mbf_init (mbf, fp);
@ -296,10 +291,11 @@ diff -up ./src/unexpand.c.orig ./src/unexpand.c
continue;
}
else
diff -up ./tests/expand/mb.sh.orig ./tests/expand/mb.sh
--- ./tests/expand/mb.sh.orig 2016-06-28 14:44:18.287619000 +0200
+++ ./tests/expand/mb.sh 2016-06-30 11:57:10.038407216 +0200
@@ -109,4 +109,75 @@ äbcdef\xFF |
diff --git a/tests/expand/mb.sh b/tests/expand/mb.sh
index 031be7a..1621c84 100755
--- a/tests/expand/mb.sh
+++ b/tests/expand/mb.sh
@@ -109,4 +109,75 @@ env printf '12345678
expand < in > out || fail=1
compare exp out > /dev/null 2>&1 || fail=1
@ -375,10 +371,11 @@ diff -up ./tests/expand/mb.sh.orig ./tests/expand/mb.sh
+compare exp out > /dev/null 2>&1 || fail=1
+
exit $fail
diff -up ./tests/unexpand/mb.sh.orig ./tests/unexpand/mb.sh
--- ./tests/unexpand/mb.sh.orig 2016-06-28 17:39:22.895259000 +0200
+++ ./tests/unexpand/mb.sh 2016-07-07 09:55:00.098281917 +0200
@@ -111,3 +111,62 @@ äbcdef\xFF\t|
diff --git a/tests/unexpand/mb.sh b/tests/unexpand/mb.sh
index 8d75652..9d4ee3e 100755
--- a/tests/unexpand/mb.sh
+++ b/tests/unexpand/mb.sh
@@ -111,3 +111,62 @@ env printf '12345678
unexpand -a < in > out || fail=1
compare exp out > /dev/null 2>&1 || fail=1

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,8 @@
--- coreutils-5.2.1/src/who.c.overflow 2005-05-25 09:59:06.000000000 +0100
+++ coreutils-5.2.1/src/who.c 2005-05-25 10:00:31.000000000 +0100
@@ -79,7 +79,7 @@
diff --git a/src/who.c b/src/who.c
index 55733b4..3ad4774 100644
--- a/src/who.c
+++ b/src/who.c
@@ -81,7 +81,7 @@
# define UT_TYPE_NEW_TIME(U) false
#endif

View File

@ -1,15 +1,17 @@
diff -urNp coreutils-8.21-orig/man/chcon.x coreutils-8.21/man/chcon.x
--- coreutils-8.21-orig/man/chcon.x 2011-08-23 15:44:01.000000000 +0200
+++ coreutils-8.21/man/chcon.x 2013-02-15 14:31:58.937482694 +0100
diff --git a/man/chcon.x b/man/chcon.x
index 8c1ff6f..c84fb96 100644
--- a/man/chcon.x
+++ b/man/chcon.x
@@ -1,4 +1,4 @@
[NAME]
-chcon \- change file security context
+chcon \- change file SELinux security context
[DESCRIPTION]
.\" Add any additional description here
diff -urNp coreutils-8.21-orig/man/runcon.x coreutils-8.21/man/runcon.x
--- coreutils-8.21-orig/man/runcon.x 2011-08-23 15:44:01.000000000 +0200
+++ coreutils-8.21/man/runcon.x 2013-02-15 14:31:58.938486496 +0100
diff --git a/man/runcon.x b/man/runcon.x
index d2df13e..5c5f5d8 100644
--- a/man/runcon.x
+++ b/man/runcon.x
@@ -1,5 +1,5 @@
[NAME]
-runcon \- run command with specified security context
@ -17,10 +19,11 @@ diff -urNp coreutils-8.21-orig/man/runcon.x coreutils-8.21/man/runcon.x
[DESCRIPTION]
Run COMMAND with completely-specified CONTEXT, or with current or
transitioned security context modified by one or more of LEVEL,
diff -urNp coreutils-8.21-orig/src/cp.c coreutils-8.21/src/cp.c
--- coreutils-8.21-orig/src/cp.c 2013-02-07 10:37:05.000000000 +0100
+++ coreutils-8.21/src/cp.c 2013-02-15 14:31:58.945468929 +0100
@@ -202,6 +202,9 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
diff --git a/src/cp.c b/src/cp.c
index 1b528c6..25dbb88 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -203,6 +203,9 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
all\n\
"), stdout);
fputs (_("\
@ -30,16 +33,16 @@ diff -urNp coreutils-8.21-orig/src/cp.c coreutils-8.21/src/cp.c
--no-preserve=ATTR_LIST don't preserve the specified attributes\n\
--parents use full source file name under DIRECTORY\n\
"), stdout);
@@ -943,7 +946,7 @@ main (int argc, char **argv)
we'll actually use backup_suffix_string. */
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
@@ -929,7 +932,7 @@ main (int argc, char **argv)
selinux_enabled = (0 < is_selinux_enabled ());
cp_option_init (&x);
- while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:TZ",
+ while ((c = getopt_long (argc, argv, "abcdfHilLnprst:uvxPRS:TZ",
long_opts, NULL))
!= -1)
{
@@ -991,6 +994,17 @@ main (int argc, char **argv)
@@ -977,6 +980,17 @@ main (int argc, char **argv)
copy_contents = true;
break;
@ -57,10 +60,11 @@ diff -urNp coreutils-8.21-orig/src/cp.c coreutils-8.21/src/cp.c
case 'd':
x.preserve_links = true;
x.dereference = DEREF_NEVER;
diff -urNp coreutils-8.21-orig/src/id.c coreutils-8.21/src/id.c
--- coreutils-8.21-orig/src/id.c 2013-01-31 01:46:24.000000000 +0100
+++ coreutils-8.21/src/id.c 2013-02-15 14:31:58.946469154 +0100
@@ -113,7 +113,7 @@ int
diff --git a/src/id.c b/src/id.c
index 05d98a5..d6eb002 100644
--- a/src/id.c
+++ b/src/id.c
@@ -114,7 +114,7 @@ int
main (int argc, char **argv)
{
int optc;
@ -69,28 +73,29 @@ diff -urNp coreutils-8.21-orig/src/id.c coreutils-8.21/src/id.c
bool smack_enabled = is_smack_enabled ();
bool opt_zero = false;
char *pw_name = NULL;
diff -urNp coreutils-8.21-orig/src/install.c coreutils-8.21/src/install.c
--- coreutils-8.21-orig/src/install.c 2013-02-07 10:37:05.000000000 +0100
+++ coreutils-8.21/src/install.c 2013-02-15 14:31:58.948469440 +0100
@@ -649,7 +649,7 @@ In the 4th form, create all components of the given DIRECTORY(ies).\n\
diff --git a/src/install.c b/src/install.c
index d79d597..437889a 100644
--- a/src/install.c
+++ b/src/install.c
@@ -673,7 +673,7 @@ In the 4th form, create all components of the given DIRECTORY(ies).\n\
-v, --verbose print the name of each directory as it is created\n\
"), stdout);
fputs (_("\
- --preserve-context preserve SELinux security context\n\
+ -P, --preserve-context preserve SELinux security context (-P deprecated)\n\
-Z set SELinux security context of destination\n\
file to default type\n\
file and each created directory to default type\n\
--context[=CTX] like -Z, or if CTX is specified then set the\n\
@@ -817,7 +817,7 @@ main (int argc, char **argv)
we'll actually use backup_suffix_string. */
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
@@ -824,7 +824,7 @@ main (int argc, char **argv)
dir_arg = false;
umask (0);
- while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z", long_options,
+ while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pPt:TvS:Z", long_options,
NULL)) != -1)
{
switch (optc)
@@ -878,6 +878,8 @@ main (int argc, char **argv)
@@ -885,6 +885,8 @@ main (int argc, char **argv)
no_target_directory = true;
break;
@ -99,7 +104,7 @@ diff -urNp coreutils-8.21-orig/src/install.c coreutils-8.21/src/install.c
case PRESERVE_CONTEXT_OPTION:
if (! selinux_enabled)
{
@@ -885,6 +887,10 @@ main (int argc, char **argv)
@@ -892,6 +894,10 @@ main (int argc, char **argv)
"this kernel is not SELinux-enabled"));
break;
}

View File

@ -1,7 +1,8 @@
diff -urNp coreutils-6.10-orig/doc/coreutils.texi coreutils-6.10/doc/coreutils.texi
--- coreutils-6.10-orig/doc/coreutils.texi 2008-04-07 17:52:11.000000000 +0200
+++ coreutils-6.10/doc/coreutils.texi 2008-04-07 18:01:43.000000000 +0200
@@ -8002,6 +8002,11 @@ done
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 47e4480..cff2ead 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -8083,6 +8083,11 @@ done
exit $fail
@end example

View File

@ -1,12 +1,11 @@
Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils
Version: 8.25
Release: 17%{?dist}
Version: 8.26
Release: 1%{?dist}
License: GPLv3+
Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/
Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
Source2: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
Source50: supported_utils
Source105: coreutils-colorls.sh
Source106: coreutils-colorls.csh
@ -17,15 +16,6 @@ Source10: coreutils-find-requires.sh
%global __find_provides %{_rpmconfigdir}/find-provides
%global __find_requires %{SOURCE10} %{_rpmconfigdir}/find-requires
# From upstream
Patch952: coreutils-8.25-intall-Z-selinux.patch
# fix 'sort -h -k' in locales that use blank as thousands separator (#1355780)
Patch953: coreutils-8.25-sort-thousands-sep.patch
# ls: allow interruption when reading slow directories (#1365933)
Patch954: coreutils-8.25-ls-signal.patch
# md5sum,sha*sum: fix --ignore-missing with checksums starting with 00
Patch955: coreutils-8.25-sum-ignore-missing.patch
# Our patches
#general patch to workaround koji build system issues
Patch100: coreutils-6.10-configuration.patch
@ -213,12 +203,6 @@ tee DIR_COLORS{,.256color,.lightbgcolor} <src/dircolors.hin >/dev/null
#SELinux
%patch950 -p1 -b .selinux
%patch951 -p1 -b .selinuxman
%patch952 -p1
# upstream patches
%patch953 -p1
%patch954 -p1
%patch955 -p1
chmod a+x \
tests/df/direct.sh \
@ -348,6 +332,9 @@ fi
%license COPYING
%changelog
* Thu Dec 01 2016 Kamil Dudka <kdudka@redhat.com> - 8.26-1
- new upstream release 8.26
* Mon Oct 31 2016 Kamil Dudka <kdudka@redhat.com> - 8.25-17
- md5sum,sha*sum: fix --ignore-missing with checksums starting with 00

View File

@ -1,2 +1 @@
070e43ba7f618d747414ef56ab248a48 coreutils-8.25.tar.xz
eb5694f81fd88ccf16b68ed80935b10f coreutils-8.25.tar.xz.sig
d5aa2072f662d4118b9f4c63b94601a6 coreutils-8.26.tar.xz

View File

@ -1,4 +1,5 @@
%{_bindir}/arch
%{_bindir}/b2sum
%{_bindir}/basename
%{_bindir}/cat
%{_bindir}/chgrp