PERFORCE change 99162 for review

pleblanc pleblanc at FreeBSD.org
Tue Jun 13 20:27:07 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=99162

Change 99162 by pleblanc at pleblanc_p4 on 2006/06/13 20:24:38

	- Re-automate the installation of the sebsd policy sources.
	- Make actual installation paths agree with the installation doc.

Affected files ...

.. //depot/projects/trustedbsd/sebsd/Makefile#18 edit
.. //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/Makefile#25 edit

Differences ...

==== //depot/projects/trustedbsd/sebsd/Makefile#18 (text+ko) ====

@@ -310,9 +310,19 @@
 sebsd_bootstrap:
 .if exists(${.CURDIR}/contrib/sebsd)
 	@echo "Installing SEBSD policy"
+
+.if !exists(${DESTDIR}/etc/security/sebsd/targeted/policy)
+	(cd ${.CURDIR}/contrib/sebsd/refpolicy; gmake install-src)
+.else
+	@echo "Existing SEBSD targeted policy sources found."
+	@echo "Will not reinstall them.  To reinstall them by hand"
+	@echo "do \"cd contrib/sebsd/refpolicy && gmake install-src\"."
+.endif
+
 .if exists(${DESTDIR}/usr/bin/checkpolicy)
 
 .if !exists(${DESTDIR}/etc/security/sebsd/targeted/policy/policy.20)
+	mkdir -p ${DESTDIR}/etc/security/sebsd/targeted/policy
 	(${DESTDIR}/usr/bin/checkpolicy -o ${DESTDIR}/etc/security/sebsd/targeted/policy/policy.20 ${.CURDIR}/contrib/sebsd/support/policy.conf)
 .else
 	@echo "Binary policy file found. Not overwriting."

==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/Makefile#25 (text+ko) ====

@@ -33,7 +33,7 @@
 .endif
 POLICYVER := policy.$(POLICYVERTMP)
 POLICYBIN = policy.bin
-INSTALLDIR = $(DESTDIR)/etc/security/sebsd
+INSTALLDIR = $(DESTDIR)/etc/security/sebsd/targeted
 POLICYPATH = $(INSTALLDIR)/policy
 SRCPATH = $(INSTALLDIR)/src
 CONTEXTPATH = $(INSTALLDIR)/contexts
@@ -138,10 +138,10 @@
 	m4 $(M4PARAM) -Imacros -s $(POLICYFILES) > $@.tmp
 	mv $@.tmp $@
 
-install-src: /etc/security/sebsd
-	rm -rf $(INSTALLDIR)/policy.old
-	-mv $(INSTALLDIR)/policy $(INSTALLDIR)/policy.old
-	cd ..; tar cf - policy | (cd $(INSTALLDIR); tar xf -)
+install-src: $(SRCPATH)
+	rm -rf $(SRCPATH)/policy.old
+	-mv $(SRCPATH)/policy $(SRCPATH)/policy.old
+	cd ..; tar cf - policy | (cd $(SRCPATH); tar xf -)
 
 tmp/program_used_flags.te: $(wildcard domains/program/*.te) domains/program
 	mkdir -p tmp


More information about the p4-projects mailing list