diff mbox series

[14/15] package/refpolicy: fix the configure, build and install steps

Message ID 20200731101040.1723047-15-antoine.tenart@bootlin.com
State New
Headers show
Series Improve SELinux support | expand

Commit Message

Antoine Tenart July 31, 2020, 10:10 a.m. UTC
The refpolicy configure and build step were not correctly defined. The
configuration was split between the configure and build step, while both
the compilation and the installation were done in the install step. Fix
this by moving all the configuration within the configuration step and
by adding a call to make in the build step to compile the policy.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
---
 package/refpolicy/refpolicy.mk | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/package/refpolicy/refpolicy.mk b/package/refpolicy/refpolicy.mk
index 51ac71075fb8..5c100168401c 100644
--- a/package/refpolicy/refpolicy.mk
+++ b/package/refpolicy/refpolicy.mk
@@ -95,7 +95,7 @@  define REFPOLICY_CONFIGURE_SYSTEMD
 endef
 endif
 
-define REFPOLICY_CONFIGURE_CMDS
+define REFPOLICY_CONFIGURE_BUILD
 	$(SED) "/OUTPUT_POLICY/c\OUTPUT_POLICY = $(REFPOLICY_POLICY_VERSION)" \
 		$(@D)/build.conf
 	$(SED) "/MONOLITHIC/c\MONOLITHIC = y" $(@D)/build.conf
@@ -103,13 +103,18 @@  define REFPOLICY_CONFIGURE_CMDS
 	$(REFPOLICY_CONFIGURE_SYSTEMD)
 endef
 
-define REFPOLICY_BUILD_CMDS
+define REFPOLICY_CONFIGURE_CMDS
+	$(REFPOLICY_CONFIGURE_BUILD)
 	$(if $(call qstrip,$(REFPOLICY_EXTRA_MODULES)),\
 		$(REFPOLICY_COPY_MODULES))
-	$(REFPOLICY_MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) bare conf
+	$(REFPOLICY_MAKE) -C $(@D) bare conf
 	$(REFPOLICY_CONFIGURE_MODULES)
 endef
 
+define REFPOLICY_BUILD_CMDS
+	$(REFPOLICY_MAKE) -C $(@D) policy
+endef
+
 define REFPOLICY_INSTALL_STAGING_CMDS
 	$(REFPOLICY_MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) \
 		install-src install-headers