1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

selinux: run the GNU test too

This commit is contained in:
Sylvestre Ledru 2025-03-14 13:49:18 +01:00
parent e147063e26
commit 72ad89d956
3 changed files with 81 additions and 4 deletions

View file

@ -57,11 +57,16 @@ TOYBOX_ROOT := $(BASEDIR)/tmp
TOYBOX_VER := 0.8.8
TOYBOX_SRC := $(TOYBOX_ROOT)/toybox-$(TOYBOX_VER)
ifeq ($(SELINUX_ENABLED),)
SELINUX_ENABLED := 0
ifdef SELINUX_ENABLED
override SELINUX_ENABLED := 0
# Now check if we should enable it (only on non-Windows)
ifneq ($(OS),Windows_NT)
ifeq ($(shell /sbin/selinuxenabled 2>/dev/null ; echo $$?),0)
SELINUX_ENABLED := 1
ifeq ($(shell if [ -x /sbin/selinuxenabled ] && /sbin/selinuxenabled 2>/dev/null; then echo 0; else echo 1; fi),0)
override SELINUX_ENABLED := 1
$(info /sbin/selinuxenabled successful)
else
$(info SELINUX_ENABLED=1 but /sbin/selinuxenabled failed)
endif
endif
endif