run ./bootstrap in a chroot so it configures the correct paths in the
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 22 Dec 2005 23:23:34 +0000 (23:23 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 22 Dec 2005 23:23:34 +0000 (23:23 +0000)
pkgsrc binaries (there does not appear to be a way to specify a target
install location different from the one used to locate pkgsrc binaries).

Set the default working directory to /usr/obj/pkgsrc rather then creating
working directories inside /usr/pkgsrc.  This will save annoyances for
people who mount /usr/pkgsrc via NFS.

Install a default /etc/mk.conf as part of the root skeleton.

nrelease/Makefile
nrelease/mk.conf.pkgsrc
nrelease/root/etc/mk.conf [copied from nrelease/mk.conf.pkgsrc with 61% similarity]

index c9175c1..4e2f5c9 100644 (file)
@@ -1,4 +1,4 @@
-# $DragonFly: src/nrelease/Makefile,v 1.47 2005/12/22 06:32:10 dillon Exp $
+# $DragonFly: src/nrelease/Makefile,v 1.48 2005/12/22 23:23:32 dillon Exp $
 #
 
 # compat target
@@ -124,12 +124,12 @@ buildiso:
 
 customizeiso:
        (cd ${PKGSRC_PKG_PATH}; tar xzpf ${PKGSRC_BOOTSTRAP_KIT}.tgz)
-       cd ${PKGSRC_PKG_PATH}/${PKGSRC_BOOTSTRAP_KIT}/bootstrap && \
-               ./bootstrap --workdir=${NRLOBJDIR}/nrelease/bootstrap-workdir \
-               --prefix=${ISOROOT}/usr/pkg
 .for ROOTSKEL in ${ROOTSKELS}
        cpdup -X cpignore -o ${ROOTSKEL} ${ISOROOT}
 .endfor
+       cpdup ${PKGSRC_PKG_PATH}/${PKGSRC_BOOTSTRAP_KIT}/bootstrap ${ISOROOT}/tmp/bootstrap
+       chroot ${ISOROOT} csh -c "cd /tmp/bootstrap; ./bootstrap"
+       rm -rf ${ISOROOT}/tmp/bootstrap ${ISOROOT}/usr/obj/pkgsrc
        rm -rf `find ${ISOROOT} -type d -name CVS -print`
        rm -rf ${ISOROOT}/usr/local/share/pristine
        pwd_mkdb -p -d ${ISOROOT}/etc ${ISOROOT}/etc/master.passwd
index 83492cb..0f53f55 100644 (file)
@@ -1,6 +1,6 @@
 # Generated from nrelease
 #
-# $DragonFly: src/nrelease/Attic/mk.conf.pkgsrc,v 1.1 2005/12/22 06:32:10 dillon Exp $
+# $DragonFly: src/nrelease/Attic/mk.conf.pkgsrc,v 1.2 2005/12/22 23:23:32 dillon Exp $
 .ifdef BSD_PKG_MK
 
 PKG_DBDIR=/var/db/pkg
@@ -9,5 +9,6 @@ VARBASE=/var
 FETCH_CMD=/usr/pkg/bin/ftp
 PAX=/usr/pkg/bin/pax
 X11_TYPE=xorg
+WRKOBJDIR=/usr/obj/pkgsrc
 
 .endif
similarity index 61%
copy from nrelease/mk.conf.pkgsrc
copy to nrelease/root/etc/mk.conf
index 83492cb..6e2665c 100644 (file)
@@ -1,6 +1,6 @@
 # Generated from nrelease
 #
-# $DragonFly: src/nrelease/Attic/mk.conf.pkgsrc,v 1.1 2005/12/22 06:32:10 dillon Exp $
+# $DragonFly: src/nrelease/root/etc/mk.conf,v 1.1 2005/12/22 23:23:34 dillon Exp $
 .ifdef BSD_PKG_MK
 
 PKG_DBDIR=/var/db/pkg
@@ -9,5 +9,6 @@ VARBASE=/var
 FETCH_CMD=/usr/pkg/bin/ftp
 PAX=/usr/pkg/bin/pax
 X11_TYPE=xorg
+WRKOBJDIR=/usr/obj/pkgsrc
 
 .endif