[selinux-policy: 208/3172] a few touchups

Daniel J Walsh dwalsh at fedoraproject.org
Thu Oct 7 19:22:56 UTC 2010


commit 88c72f4408a5e40f57cef11fe047dc57077feb1a
Author: Chris PeBenito <cpebenito at tresys.com>
Date:   Tue May 24 17:31:39 2005 +0000

    a few touchups

 refpolicy/Makefile |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/refpolicy/Makefile b/refpolicy/Makefile
index 1615abc..8e8cd0e 100644
--- a/refpolicy/Makefile
+++ b/refpolicy/Makefile
@@ -99,12 +99,13 @@ install: $(LOADPATH)
 # Build a binary policy locally
 #
 $(POLVER): policy.conf
+	@echo "Compiling $(POLVER)"
 ifneq ($(PV),$(KV))
 	@echo
 	@echo "WARNING: Policy version mismatch!  Is your POLICYCOMPAT set correctly?"
 	@echo
 endif
-	$(QUIET) $(CHECKPOLICY) $(POLICYCOMPAT) $^ -o $(POLVER)
+	$(QUIET) $(CHECKPOLICY) $(POLICYCOMPAT) $^ -o $@
 
 ########################################
 #
@@ -112,18 +113,20 @@ endif
 #
 $(LOADPATH): policy.conf
 	@mkdir -p $(POLICYPATH)
+	@echo "Compiling and installing $(LOADPATH)"
 ifneq ($(PV),$(KV))
 	@echo
 	@echo "WARNING: Policy version mismatch!  Is your POLICYCOMPAT set correctly?"
 	@echo
 endif
-	$(QUIET) $(CHECKPOLICY) $(POLICYCOMPAT) $^ -o $(LOADPATH)
+	$(QUIET) $(CHECKPOLICY) $(POLICYCOMPAT) $^ -o $@
 
 ########################################
 #
 # Load the binary policy
 #
 reload tmp/load: $(LOADPATH) $(FCPATH)
+	@echo "Loading $(LOADPATH)"
 	$(QUIET) $(LOADPOLICY) -q $(LOADPATH)
 	@touch tmp/load
 
@@ -134,11 +137,11 @@ load: tmp/load
 # Construct a monolithic policy.conf
 #
 policy.conf: $(POLICY_SECTIONS)
-	$(QUIET) # checkpolicy can use the #line directives provided by m4 -s
-	$(QUIET) # for error reporting:
+	@echo "Creating policy.conf"
+# checkpolicy can use the #line directives provided by -s for error reporting:
 	$(QUIET) m4 $(M4PARAM) -s $^ > tmp/$@.tmp
 	$(QUIET) sed -e /^portcon/d -e /^nodecon/d -e /^netifcon/d < tmp/$@.tmp > $@
-	$(QUIET) # the ordering of these ocontexts matters:
+# the ordering of these ocontexts matters:
 	$(QUIET) grep ^portcon tmp/$@.tmp >> $@ || true
 	$(QUIET) grep ^netifcon tmp/$@.tmp >> $@ || true
 	$(QUIET) grep ^nodecon tmp/$@.tmp >> $@ || true
@@ -161,6 +164,8 @@ tmp/generated_definitions.conf: $(ALL_MODULES) $(ALL_TE_FILES) $(BASE_MODULE)/co
 	$(QUIET) grep -E "^network_(interface|node|port)\(.*\)" $(BASE_MODULE)/corenetwork.te \
 		| m4 $(M4PARAM) -D interface_pass $(BASE_MODULE)/global.if $(BASE_MODULE)/corenetwork.if - \
 		| sed -e 's/dollarsone/\$$1/g' -e 's/dollarszero/\$$0/g' >> $@
+# this is so the xml works:
+	$(QUIET) echo "## </module>" >> $@
 
 tmp/all_interfaces.conf: $(ALL_INTERFACES)
 	@test -d tmp || mkdir -p tmp
@@ -237,9 +242,10 @@ relabel:  $(FC) $(SETFILES)
 xml: policy.xml
 
 policy.xml: $(ALL_INTERFACES) tmp/generated_definitions.conf
-	echo "<policy>" > $@
-	grep -h -E "^##[[:space:]]" $^ | sed -e 's/^##[[:space:]]//g' >> $@
-	echo "</policy>" >> $@
+	@echo "Creating $@"
+	$(QUIET) echo "<policy>" > $@
+	$(QUIET) grep -h -E "^##[[:space:]]" $^ | sed -e 's/^##[[:space:]]//g' >> $@
+	$(QUIET) echo "</policy>" >> $@
 
 clean:
 	rm -fR tmp
@@ -248,4 +254,4 @@ clean:
 	rm -f policy.$(PV)
 	rm -f $(FC)
 
-.PHONY: default clean policy install
+.PHONY: default policy install reload enableaudit checklabels restorelabels relabel xml clean


More information about the scm-commits mailing list