[selinux-policy: 1616/3172] mkdir policy and file contexts dirs in make load of modular policy.

Daniel J Walsh dwalsh at fedoraproject.org
Thu Oct 7 21:24:50 UTC 2010


commit 212832373ed83a75b1bb0d0fa94fcccfe4d27418
Author: Chris PeBenito <cpebenito at tresys.com>
Date:   Tue Oct 10 15:09:59 2006 +0000

    mkdir policy and file contexts dirs in make load of modular policy.

 Makefile         |    2 ++
 Rules.modular    |    3 +++
 Rules.monolithic |    2 --
 3 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/Makefile b/Makefile
index 423612f..2f89157 100644
--- a/Makefile
+++ b/Makefile
@@ -148,7 +148,9 @@ topdir = $(DESTDIR)/etc/selinux
 installdir = $(topdir)/$(strip $(NAME))
 srcpath = $(installdir)/src
 userpath = $(installdir)/users
+policypath = $(installdir)/policy
 contextpath = $(installdir)/contexts
+homedirpath = $(contextpath)/files/homedir_template
 fcpath = $(contextpath)/files/file_contexts
 ncpath = $(contextpath)/netfilter_contexts
 sharedir = $(prefix)/share/selinux
diff --git a/Rules.modular b/Rules.modular
index e2d6686..9a1a995 100644
--- a/Rules.modular
+++ b/Rules.modular
@@ -52,6 +52,9 @@ install: $(instpkg) $(appfiles)
 # Load all configured modules
 #
 load: $(instpkg) $(appfiles)
+# make sure two directories exist since they are not
+# created by semanage
+	@mkdir -p $(policypath) $(dir $(fcpath))
 	@echo "Loading configured modules."
 	$(verbose) $(SEMODULE) -s $(NAME) -b $(modpkgdir)/$(notdir $(base_pkg)) $(foreach mod,$(mod_pkgs),-i $(modpkgdir)/$(mod))
 
diff --git a/Rules.monolithic b/Rules.monolithic
index 1209145..6f8f5c8 100644
--- a/Rules.monolithic
+++ b/Rules.monolithic
@@ -21,9 +21,7 @@ homedir_template = $(builddir)homedir_template
 M4PARAM += -D self_contained_policy
 
 # install paths
-policypath = $(installdir)/policy
 loadpath = $(policypath)/$(notdir $(polver))
-homedirpath = $(contextpath)/files/homedir_template
 
 appfiles += $(installdir)/booleans $(userpath)/local.users
 


More information about the scm-commits mailing list