diff --git a/coreutils-8.26-selinuxenable.patch b/coreutils-8.26-selinuxenable.patch new file mode 100644 index 0000000..d9b625a --- /dev/null +++ b/coreutils-8.26-selinuxenable.patch @@ -0,0 +1,26 @@ +From 6880c3dc9098b3337612850d1500b474aeb944ca Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Tue, 29 Aug 2017 17:33:51 +0200 +Subject: [PATCH] require_selinux_(): use selinuxenabled(8) if available + +--- + init.cfg | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/init.cfg b/init.cfg +index af6b581..f887b3a 100644 +--- a/init.cfg ++++ b/init.cfg +@@ -114,6 +114,9 @@ require_selinux_() + grep 'selinuxfs$' /proc/filesystems > /dev/null \ + || skip_ "this system lacks SELinux support" + ++ # use the 'selinuxenabled' utility if available ++ selinuxenabled; [ $? = 1 ] && skip_ "SELinux is disabled" ++ + # Independent of whether SELinux is enabled system-wide, + # the current file system may lack SELinux support. + # Also the current build may have SELinux support disabled. +-- +2.9.5 + diff --git a/coreutils.spec b/coreutils.spec index 82fb469..444600e 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -16,6 +16,9 @@ Source106: coreutils-colorls.csh # 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 @@ -102,6 +105,7 @@ BuildRequires: libacl-devel BuildRequires: libattr-devel BuildRequires: libcap-devel BuildRequires: libselinux-devel +BuildRequires: libselinux-utils BuildRequires: openssl-devel BuildRequires: strace BuildRequires: texinfo