diff --git a/SOURCES/coreutils-6.10-manpages.patch b/SOURCES/coreutils-6.10-manpages.patch deleted file mode 100644 index 5aacff7..0000000 --- a/SOURCES/coreutils-6.10-manpages.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/md5sum.c b/src/md5sum.c -index 8e21609..a857d62 100644 ---- a/src/md5sum.c -+++ b/src/md5sum.c -@@ -265,6 +265,9 @@ Print or check %s (%d-bit) checksums.\n\ - else - fputs (_("\ - -t, --text read in text mode (default)\n\ -+"), stdout); -+ fputs (_("\ -+ Note: There is no difference between binary and text mode option on GNU system.\n\ - "), stdout); - fputs (_("\ - -z, --zero end each output line with NUL, not newline,\n\ diff --git a/SOURCES/coreutils-8.30-chcon-invalid-context.patch b/SOURCES/coreutils-8.30-chcon-invalid-context.patch new file mode 100644 index 0000000..96a38f6 --- /dev/null +++ b/SOURCES/coreutils-8.30-chcon-invalid-context.patch @@ -0,0 +1,42 @@ +From 5d6c2c9b3869938592025ce169659f0c7e9970fc Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Mon, 2 Dec 2019 14:02:02 +0100 +Subject: [PATCH] chcon: do not validate security context if SELinux is + disabled + +* src/chcon.c (main): Skip call of security_check_context() +in case SELinux is disabled to avoid unnecessary failure. + +Bug: https://bugzilla.redhat.com/1777831 + +Upstream-commit: 5118a2e392c8cffb3c26eaffbb75e2b1ef7607f9 +Signed-off-by: Kamil Dudka +--- + src/chcon.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/chcon.c b/src/chcon.c +index 6414406..eea4235 100644 +--- a/src/chcon.c ++++ b/src/chcon.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include "system.h" + #include "dev-ino.h" +@@ -557,7 +558,8 @@ main (int argc, char **argv) + else + { + specified_context = argv[optind++]; +- if (security_check_context (se_const (specified_context)) < 0) ++ if (0 < is_selinux_enabled () ++ && security_check_context (se_const (specified_context)) < 0) + die (EXIT_FAILURE, errno, _("invalid context: %s"), + quote (specified_context)); + } +-- +2.21.1 + diff --git a/SOURCES/coreutils-8.30-df-local-fs.patch b/SOURCES/coreutils-8.30-df-local-fs.patch new file mode 100644 index 0000000..fdf4d88 --- /dev/null +++ b/SOURCES/coreutils-8.30-df-local-fs.patch @@ -0,0 +1,74 @@ +From b60a61d7e5f6504518095d9ee8c7c8b185bedb23 Mon Sep 17 00:00:00 2001 +From: Marc Dionne +Date: Wed, 5 Feb 2020 13:35:12 -0800 +Subject: [PATCH 1/2] mountlist: Consider AFS filesystems as remote + +df --local relies on the ME_REMOTE macro to determine if a given +mount entry should be considered "local". There is special logic +for nfs and smb/cifs mounts, but /afs as mounted by OpenAFS, the +kernel's kafs module or AuriStorFS is treated as a local mount. +* lib/mountlist.c (ME_REMOTE): Treat mounts of type 'afs' +(OpenAFS, kernel kafs) and 'auristorfs' (AuriStorFS) as remote. + +Copyright-paperwork-exempt: yes + +Upstream-commit: 7a15069b68a376f26c5dca34ae2689c5bf8adc99 +Signed-off-by: Kamil Dudka +--- + lib/mountlist.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/lib/mountlist.c b/lib/mountlist.c +index b691f38..1b1e5e4 100644 +--- a/lib/mountlist.c ++++ b/lib/mountlist.c +@@ -224,6 +224,7 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED) + #ifndef ME_REMOTE + /* A file system is "remote" if its Fs_name contains a ':' + or if (it is of type (smbfs or cifs) and its Fs_name starts with '//') ++ or if it is of type (afs or auristorfs) + or Fs_name is equal to "-hosts" (used by autofs to mount remote fs). */ + # define ME_REMOTE(Fs_name, Fs_type) \ + (strchr (Fs_name, ':') != NULL \ +@@ -231,6 +232,8 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED) + && (Fs_name)[1] == '/' \ + && (strcmp (Fs_type, "smbfs") == 0 \ + || strcmp (Fs_type, "cifs") == 0)) \ ++ || strcmp (Fs_type, "afs") == 0 \ ++ || strcmp (Fs_type, "auristorfs") == 0 \ + || (strcmp("-hosts", Fs_name) == 0)) + #endif + +-- +2.21.1 + + +From 41010dfb0cc100f41fb16d93f9fa36dc07e63ac6 Mon Sep 17 00:00:00 2001 +From: Kenneth D'souza +Date: Sat, 8 Feb 2020 13:54:35 +0000 +Subject: [PATCH 2/2] mountlist: consider smb3 file systems as remote + +* lib/mountlist.c (ME_REMOTE): Recognize file systems of type +"smb3" as remote. + +Upstream-commit: 4d4a22ab1f719b7c6c3fe3dbf45d11baafd3c563 +Signed-off-by: Kamil Dudka +--- + lib/mountlist.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/mountlist.c b/lib/mountlist.c +index 1b1e5e4..8ad74a2 100644 +--- a/lib/mountlist.c ++++ b/lib/mountlist.c +@@ -231,6 +231,7 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED) + || ((Fs_name)[0] == '/' \ + && (Fs_name)[1] == '/' \ + && (strcmp (Fs_type, "smbfs") == 0 \ ++ || strcmp (Fs_type, "smb3") == 0 \ + || strcmp (Fs_type, "cifs") == 0)) \ + || strcmp (Fs_type, "afs") == 0 \ + || strcmp (Fs_type, "auristorfs") == 0 \ +-- +2.21.1 + diff --git a/SOURCES/coreutils-8.31-sums-man-pages.patch b/SOURCES/coreutils-8.31-sums-man-pages.patch new file mode 100644 index 0000000..094aaaa --- /dev/null +++ b/SOURCES/coreutils-8.31-sums-man-pages.patch @@ -0,0 +1,36 @@ +From ef6be60dcaf424bdb21392aff42331bd4dc272e0 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Thu, 14 Mar 2019 13:48:01 +0100 +Subject: [PATCH] md5sum,b2sum,sha*sum: --help: add note about binary/text mode + +* src/md5sum.c (usage): Make it clear that there is no difference +between binary mode and text mode on GNU systems. + +Bug: https://bugzilla.redhat.com/406981 +Bug: https://bugzilla.redhat.com/1688740 + +Upstream-commit: ae61b1066351bb784b54fbfd7b52caf129ec286c +Signed-off-by: Kamil Dudka +--- + src/md5sum.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/md5sum.c b/src/md5sum.c +index 3532f7b7a..f75b6de02 100644 +--- a/src/md5sum.c ++++ b/src/md5sum.c +@@ -287,7 +287,10 @@ The following five options are useful only when verifying checksums:\n\ + The sums are computed as described in %s. When checking, the input\n\ + should be a former output of this program. The default mode is to print a\n\ + line with checksum, a space, a character indicating input mode ('*' for binary,\ +-\n' ' for text or where binary is insignificant), and name for each FILE.\n"), ++\n' ' for text or where binary is insignificant), and name for each FILE.\n\ ++\n\ ++Note: There is no difference between binary mode and text mode on GNU systems.\ ++\n"), + DIGEST_REFERENCE); + emit_ancillary_info (PROGRAM_NAME); + } +-- +2.17.2 + diff --git a/SPECS/coreutils.spec b/SPECS/coreutils.spec index 8bcdecf..7402268 100644 --- a/SPECS/coreutils.spec +++ b/SPECS/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.30 -Release: 6%{?dist} +Release: 8%{?dist} License: GPLv3+ Group: System Environment/Base Url: https://www.gnu.org/software/coreutils/ @@ -26,14 +26,21 @@ Patch3: coreutils-8.30-fsync-fallback.patch # cp --preserve=xattr: preserve NFSv4 ACL extended attributes (#1646985) Patch4: coreutils-8.30-cp-preserve-xattr-NFSv4-ACL.patch +# chcon: do not validate security context if SELinux is disabled (#1777831) +Patch5: coreutils-8.30-chcon-invalid-context.patch + +# md5sum,b2sum,sha*sum: --help: add note about binary/text mode +Patch6: coreutils-8.31-sums-man-pages.patch + +# df --local: recognize afs, auristorfs, and smb3 as remote fs (#1798030) +Patch7: coreutils-8.30-df-local-fs.patch + # disable the test-lock gnulib test prone to deadlock Patch100: coreutils-8.26-test-lock.patch # require_selinux_(): use selinuxenabled(8) if available Patch105: coreutils-8.26-selinuxenable.patch -#add note about no difference between binary/text mode on Linux - md5sum manpage -Patch101: coreutils-6.10-manpages.patch # downstream changes to default DIR_COLORS Patch102: coreutils-8.25-DIR_COLORS.patch #do display processor type for uname -p/-i based on uname(2) syscall @@ -261,6 +268,13 @@ fi %license COPYING %changelog +* Tue Apr 14 2020 Kamil Dudka - 8.30-8 +- df --local: recognize afs, auristorfs, and smb3 as remote fs (#1798030) +- fix formatting of sha512sum(1) man page (#1688744) + +* Wed Jan 29 2020 Kamil Dudka - 8.30-7 +- chcon: do not validate security context if SELinux is disabled (#1777831) + * Fri Jan 11 2019 Kamil Dudka - 8.30-6 - cp --preserve=xattr: preserve NFSv4 ACL extended attributes (#1646985)