Rules.modular: Create the module store directory.

Semodule never does this, so it has been done by packagers.  Do this
here to avoid an obvious error if compiling by hand.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
This commit is contained in:
Chris PeBenito 2024-03-05 15:18:09 -05:00
parent 70e0b03932
commit 1575c7f87d
1 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,8 @@
# Rules and Targets for building modular policies
#
target_module_store := $(DESTDIR)/var/lib/selinux/refpolicy
SEMODULE += -s $(NAME)
ifneq ($(DESTDIR),)
@ -65,7 +67,7 @@ load: $(instpkg) $(appfiles)
# make sure two directories exist since they are not
# created by semanage
@echo "Loading configured modules."
@$(INSTALL) -d -m 0755 $(policypath) $(dir $(fcpath))
@$(INSTALL) -d -m 0755 $(policypath) $(dir $(fcpath)) $(target_module_store)
$(verbose) $(SEMODULE) -i $(modpkgdir)/$(notdir $(base_pkg)) $(foreach mod,$(mod_pkgs),-i $(modpkgdir)/$(mod))
########################################
@ -76,7 +78,7 @@ pure-load: $(instpkg) $(appfiles)
# make sure two directories exist since they are not
# created by semanage
@echo "Loading configured modules."
@$(INSTALL) -d -m 0755 $(policypath) $(dir $(fcpath))
@$(INSTALL) -d -m 0755 $(policypath) $(dir $(fcpath)) $(target_module_store)
$(verbose) $(SEMODULE) -i $(modpkgdir)/$(notdir $(base_pkg)) $(foreach mod,$(mod_pkgs),-i $(modpkgdir)/$(mod)) $(foreach omod,$(filter-out base $(notdir $(mod_mods:.te=)),$(shell $(SEMODULE) -l)),-r $(omod))
########################################