From df9326a3400f03b7e05f174def323daf91f05ac2 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Thu, 8 Feb 2007 16:18:48 +0000 Subject: [PATCH] Use temporary binary directory as bootstrap --- tools/chrootmake.sh | 4 +--- tools/release.sh | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tools/chrootmake.sh b/tools/chrootmake.sh index 16d56897d..f2486854d 100755 --- a/tools/chrootmake.sh +++ b/tools/chrootmake.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin +export PATH="$1" export SHELL=/bin/sh cd /usr/src make etcfiles @@ -21,5 +21,3 @@ su bin -c 'makewhatis /usr/man' su bin -c 'makewhatis /usr/gnu/man' su bin -c 'makewhatis /usr/local/man' binsizes normal -exit 0 - diff --git a/tools/release.sh b/tools/release.sh index e8cb53cf8..a370cb498 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -2,6 +2,8 @@ set -e +XBIN=usr/xbin + PACKAGEDIR=/usr/bigports/Packages PACKAGESOURCEDIR=/usr/bigports/Sources secs=`expr 32 '*' 64` @@ -74,7 +76,6 @@ usr=/dev/c0d7p0s2 ' > $RELEASEDIR/etc/fstab } -COPYITEMS="usr/bin bin usr/lib" RELEASEDIR=/usr/r RELEASEPACKAGE=${RELEASEDIR}/usr/install/packages RELEASEPACKAGESOURCES=${RELEASEDIR}/usr/install/package-sources @@ -241,11 +242,16 @@ echo " * Mounting $TMPDISK as $RELEASEDIR/usr" mount $TMPDISK $RELEASEDIR/usr || exit mkdir -p $RELEASEDIR/tmp mkdir -p $RELEASEDIR/usr/tmp +mkdir -p $RELEASEDIR/$XBIN +mkdir -p $RELEASEDIR/usr +mkdir -p $RELEASEDIR/bin mkdir -p $RELEASEPACKAGE mkdir -p $RELEASEPACKAGESOURCES -echo " * Transfering $COPYITEMS to $RELEASEDIR" -( cd / && tar cf - $COPYITEMS ) | ( cd $RELEASEDIR && tar xf - ) || exit 1 +echo " * Transfering bootstrap dirs to $RELEASEDIR" +cp -p /bin/* /usr/bin/* $RELEASEDIR/$XBIN +cp -rp /usr/lib $RELEASEDIR/usr +cp -rp /bin/sh $RELEASEDIR/bin if [ -d $PACKAGEDIR -a -d $PACKAGESOURCEDIR -a $PACKAGES -ne 0 ] then echo " * Indexing packages" @@ -306,8 +312,10 @@ if [ "$USB" -eq 0 ] then date >$RELEASEDIR/CD fi echo " * Chroot build" -chroot $RELEASEDIR "/bin/sh -x /usr/src/tools/chrootmake.sh" || exit 1 +chroot $RELEASEDIR "/$XBIN/sh -x /usr/src/tools/chrootmake.sh $XBIN" || exit 1 echo " * Chroot build done" +echo " * Removing bootstrap files" +rm -rf $RELEASEDIR/$XBIN # The build process leaves some file in src as root. chown -R bin $RELEASEDIR/usr/src* cp issue.install $RELEASEDIR/etc/issue -- 2.44.0