From 6a1456ccc2e4c3ad97fbc3828e295d50b2fcf2f5 Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Wed, 25 Dec 2013 18:25:58 +0000 Subject: [PATCH] Put the release objdir inside the chroot. When building the system from outside the chroot as part of the release process, ensure the objdir is within the chroot so that the whole output of the release.sh script is self-contained in a single directory. Use CHROOTDIR/tmp/obj instead of CHROOTDIR/usr/obj to minimize possible interferences with the output of the build itself. Reviewed by: gjb Approved by: rpaulo (mentor) --- release/release.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/release/release.sh b/release/release.sh index 4176520377c..48a891abc32 100755 --- a/release/release.sh +++ b/release/release.sh @@ -126,6 +126,7 @@ if [ "x${TARGET}" != "x" ] && [ "x${TARGET_ARCH}" != "x" ]; then else ARCH_FLAGS= fi +CHROOT_MAKEENV="MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}" CHROOT_IMAKEFLAGS="${CONF_FILES}" CHROOT_DMAKEFLAGS="${CONF_FILES}" @@ -163,9 +164,11 @@ if [ "x${NOPORTS}" = "x" ]; then fi cd ${CHROOTDIR}/usr/src -make ${CHROOT_WMAKEFLAGS} buildworld -make ${CHROOT_IMAKEFLAGS} installworld DESTDIR=${CHROOTDIR} -make ${CHROOT_DMAKEFLAGS} distribution DESTDIR=${CHROOTDIR} +env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld +env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \ + DESTDIR=${CHROOTDIR} +env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \ + DESTDIR=${CHROOTDIR} mount -t devfs devfs ${CHROOTDIR}/dev cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit