Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2003 13:31:23 -0800 (PST)
From:      Adam Migus <amigus@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 26787 for review
Message-ID:  <200303122131.h2CLVNva037225@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=26787

Change 26787 by amigus@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@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303122131.h2CLVNva037225>