From 3ed3ccaad228b2af6ff5ec2c3106461dc57f5c4d Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 9 Jan 2009 18:29:28 +0000 Subject: [PATCH] Revert back to installing packages from a chroot. Also, remove the -I option which prevented the package install scripts from being run. This is important for the LiveDVD to properly build. --- nrelease/Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/nrelease/Makefile b/nrelease/Makefile index cc644351c8..f17b3537c5 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -291,16 +291,19 @@ customizeiso: periodic/monthly/Makefile cp -R ${.CURDIR}/../etc/${UPGRADE_ITEM} ${ISOROOT}/etc/${UPGRADE_ITEM} .endfor + # There seems to be no reliable way to install a package to a target + # directory prefix so we mount_null our package directory into the + # ISO root and do the install chrooted. + # + mkdir ${ISOROOT}/tmp/packages + mount_null -o ro ${PKGSRC_PKG_PATH} ${ISOROOT}/tmp/packages .for PKG in ${PKGSRC_PACKAGES} - ${ENVCMD} PKG_PATH=${PKGSRC_PKG_PATH} ${PKGBIN_PKG_ADD} -I -K ${ISOROOT}${PKGSRC_DB} -p ${ISOROOT}${PKGSRC_PREFIX} ${PKG} + ${ENVCMD} PKG_PATH=/tmp/packages chroot ${ISOROOT} ${PKGBIN_PKG_ADD} ${PKG} .endfor + umount ${ISOROOT}/tmp/packages + rmdir ${ISOROOT}/tmp/packages find ${ISOROOT}${PKGSRC_DB} -name +CONTENTS -type f -exec sed -i '' -e 's,${ISOROOT},,' -- {} \; - ${PKGBIN_PKG_ADMIN} -K ${ISOROOT}${PKGSRC_DB} rebuild -.if defined(WITH_GUI) -.for FONT in 75dpi 100dpi misc Type1 TTF - chroot ${ISOROOT} /usr/pkg/bin/mkfontdir /usr/pkg/lib/X11/fonts/${FONT} -.endfor -.endif + chroot ${ISOROOT} ${PKGBIN_PKG_ADMIN} rebuild makewhatis ${ISOROOT}/usr/local/man makewhatis ${ISOROOT}/usr/pkg/man @@ -351,6 +354,7 @@ mkimg: .endif clean: + -umount ${ISOROOT}/tmp/packages if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}/*; fi if [ -d ${NRLOBJDIR}/nrelease ]; then rm -rf ${NRLOBJDIR}/nrelease; fi -- 2.41.0