logrotate: enable selinux support
authorAdam Duskett <Aduskett@gmail.com>
Tue, 7 Feb 2017 14:04:11 +0000 (09:04 -0500)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 7 Feb 2017 16:40:15 +0000 (17:40 +0100)
Selinux is currently disabled staticly in logrotate. This patch fixes
this by checking for libselinux and adding it as a dependecy if it has
been selected.

Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/logrotate/logrotate.mk

index 78288701a883ebe4f1a40f457b829d22dd222a85..5fd779e6448b6e218b02652eb7a9d8009f6c69b9 100644 (file)
@@ -12,7 +12,13 @@ LOGROTATE_DEPENDENCIES = popt host-pkgconf
 # tarball does not have a generated configure script
 LOGROTATE_AUTORECONF = YES
 LOGROTATE_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs popt`"
-LOGROTATE_CONF_OPTS = --without-selinux
+
+ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
+LOGROTATE_CONF_OPTS += --with-selinux
+LOGROTATE_DEPENDENCIES += libselinux
+else
+LOGROTATE_CONF_OPTS += --without-selinux
+endif
 
 ifeq ($(BR2_PACKAGE_ACL),y)
 LOGROTATE_DEPENDENCIES += acl