PERFORCE change 26787 for review
Adam Migus
amigus at freebsd.org
Wed Mar 12 21:31:23 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=26787
Change 26787 by amigus at amigus_ludo on 2003/03/12 13:30:44
Make it possible to install an SEBSD system from a system without
the SEBSD utilities required by mergemaster, in /sbin.
Do this by introducing a new variable to mergemaster called
${REALDESTDIR}, which gets the value of ${DESTDIR} if it's
specified with -D. When mergemaster changes DESTDIR, REALDESTDIR
stays around, so Makefiles and shell scripts know where the new
root filesystem is. In this case, it allows me to find
${REALDESTDIR}/sbin/sebsd_checkpolicy, et al.
Affected files ...
.. //depot/projects/trustedbsd/mac/contrib/sebsd/policy/Makefile#7 edit
.. //depot/projects/trustedbsd/mac/usr.sbin/mergemaster/mergemaster.sh#11 edit
Differences ...
==== //depot/projects/trustedbsd/mac/contrib/sebsd/policy/Makefile#7 (text+ko) ====
@@ -1,9 +1,8 @@
-CHECKPOLICY = /sbin/sebsd_checkpolicy
-SETFILES = /sbin/sebsd_setfiles
-M4 = /usr/bin/m4 -Imacros -s
+CHECKPOLICY = $(REALDESTDIR)/sbin/sebsd_checkpolicy
+SETFILES = $(REALDESTDIR)/sbin/sebsd_setfiles
+M4 = $(REALDESTDIR)/usr/bin/m4 -Imacros -s
-INSTALLDIR = /etc/security/sebsd
-#FLASKDIR = $(INSTALLDIR)/flask
+INSTALLDIR = $(DESTDIR)/etc/security/sebsd
FLASKDIR = flask
MULTILABELMOUNTS != /sbin/mount -t ufs -p | \
==== //depot/projects/trustedbsd/mac/usr.sbin/mergemaster/mergemaster.sh#11 (text+ko) ====
@@ -291,6 +291,9 @@
;;
D)
DESTDIR=${OPTARG}
+ # preserve the DESTDIR so Makefiles and scripts can use things only found
+ # in ${DESTDIR}/, such as new /sbin utilities.
+ REALDESTDIR=${DESTDIR}
;;
*)
display_usage
@@ -494,13 +497,13 @@
case "${DESTDIR}" in
'') ;;
*)
- make DESTDIR=${DESTDIR} distrib-dirs
+ make DESTDIR=${DESTDIR} REALDESTDIR=${REALDESTDIR} distrib-dirs
;;
esac
- make DESTDIR=${TEMPROOT} distrib-dirs &&
+ make DESTDIR=${TEMPROOT} REALDESTDIR=${REALDESTDIR} distrib-dirs &&
make MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj obj &&
make MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj DESTDIR=${TEMPROOT} \
- distribution;} ||
+ REALDESTDIR=${REALDESTDIR} distribution;} ||
{ echo '';
echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to";
echo " the temproot environment";
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list