avoid test-suite failure if SELinux is disabled

This commit is contained in:
Kamil Dudka 2018-01-02 15:26:42 +01:00
parent 7effe141a5
commit d51b521e30
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,26 @@
From 6880c3dc9098b3337612850d1500b474aeb944ca Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
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

View File

@ -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