OpenRC suports SELinux, so there is no reason to forcibly disable it.
Notice this only allows OpenRC to perform the initial policy load and
set the enforcing mode. In order really use SELinux it's also
necessary to select refpolicy, which provides a policy, and
policycoreutils, which provides restorecon and other SELinux
utilities.
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Carlos Santos <unixmania@gmail.com>
Tested-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
LIBNAME=lib \
LIBEXECDIR=/usr/libexec/rc \
MKPKGCONFIG=no \
- MKSELINUX=no \
MKSYSVINIT=yes \
BRANDING="Buildroot $(BR2_VERSION_FULL)" \
CC=$(TARGET_CC)
OPENRC_MAKE_OPTS += MKSTATICLIBS=yes
endif
+ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
+OPENRC_MAKE_OPTS += MKSELINUX=yes
+OPENRC_DEPENDENCIES += libselinux
+else
+OPENRC_MAKE_OPTS += MKSELINUX=no
+endif
+
define OPENRC_BUILD_CMDS
$(MAKE) $(OPENRC_MAKE_OPTS) -C $(@D)
endef