aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2003-02-23 06:22:12 +0800
committerkris <kris@FreeBSD.org>2003-02-23 06:22:12 +0800
commit8fe1503464ace8516a4f18a07adad9e3e7a5c197 (patch)
treeddb6e1d7c4105aab73e1b004714f3d6eaab37833
parentd4d78754558e20ff95e019938d742d62a96a95a7 (diff)
downloadfreebsd-ports-gnome-8fe1503464ace8516a4f18a07adad9e3e7a5c197.tar.gz
freebsd-ports-gnome-8fe1503464ace8516a4f18a07adad9e3e7a5c197.tar.zst
freebsd-ports-gnome-8fe1503464ace8516a4f18a07adad9e3e7a5c197.zip
If ${buildworld}=1 in mkbindist.conf, then use the makeworld script to
build world and populate the chroot. Otherwise, if ${ftp}=1 then fetch it from the ftp site as before.
-rwxr-xr-xTools/portbuild/scripts/mkbindist92
1 files changed, 44 insertions, 48 deletions
diff --git a/Tools/portbuild/scripts/mkbindist b/Tools/portbuild/scripts/mkbindist
index e2f1ca1b229c..2b4d4e4a9f55 100755
--- a/Tools/portbuild/scripts/mkbindist
+++ b/Tools/portbuild/scripts/mkbindist
@@ -20,61 +20,57 @@ pb=/var/portbuild
here=${pb}/${arch}/${branch}
. ${here}/mkbindist.conf
-if [ ${ftp} = "0" ]; then
+if [ ${buildworld} = "1" ]; then
if ! ${pb}/scripts/makeworld ${arch} ${branch}; then
exit 1
fi
- tmpdir=/var/chroot/
+elif [ ${ftp} = "1" ]; then
+ cd ${here}
+ rm -rf bindist/ftp
+ mkdir -p bindist/ftp
+ cd bindist/ftp
+ for i in ${ftpdists}; do
+ /usr/bin/ftp -a "ftp://${ftpserver}${ftpurl}/${rel}/$i.??"
+ done
+ cd ${here}
+fi
+
+tmpdir=${here}/tmp
+
+# just in case
+umount -f ${tmpdir}/usr/src 2>/dev/null
+
+# Clean up ${tmpdir}
+rm -rf ${tmpdir} 2>/dev/null
+if [ -d ${tmpdir} ]; then
+ chflags -R noschg ${tmpdir}
+ rm -rf ${tmpdir}
+fi
+mkdir -p ${tmpdir}
+
+# Set up the tmpdir directory hierarchy
+cd ${tmpdir}
+mtree -deU -f ${here}/src/etc/mtree/BSD.root.dist -p ${tmpdir}/
+mtree -deU -f ${here}/src/etc/mtree/BSD.var.dist -p ${tmpdir}/var
+mtree -deU -f ${here}/src/etc/mtree/BSD.usr.dist -p ${tmpdir}/usr
+mtree -deU -f ${here}/src/etc/mtree/BSD.local.dist -p ${tmpdir}/usr/local
+
+# Copy the files into the tmpdir. Use an existing built world, or the ftp
+# files.
+if [ "${ftp}" = 0 ]; then
+ (cd ${worlddir}; find -dx . | \
+ grep -v -E '^./usr/(X11R6|local|obj|opt|ports|src)' | \
+ grep -v '^./home' | \
+ grep -v '^./var/db/pkg' | \
+ cpio -dump ${tmpdir})
else
- tmpdir=${here}/tmp
-
- # just in case
- umount -f ${tmpdir}/usr/src 2>/dev/null
-
- # Clean up ${tmpdir}
- rm -rf ${tmpdir} 2>/dev/null
- if [ -d ${tmpdir} ]; then
- chflags -R noschg ${tmpdir}
- rm -rf ${tmpdir}
- fi
- mkdir -p ${tmpdir}
-
- # FTP the snapshot tarball chunks if required
- if [ "${ftp}" != 0 ]; then
- cd ${here}
- rm -rf bindist/ftp
- mkdir -p bindist/ftp
- cd bindist/ftp
- for i in ${ftpdists}; do
- /usr/bin/ftp -a "ftp://${ftpserver}/${ftpurl}/${rel}/$i.??"
- done
- cd ${here}
- fi
-
- # Set up the tmpdir directory hierarchy
- cd ${tmpdir}
- mtree -deU -f ${here}/src/etc/mtree/BSD.root.dist -p ${tmpdir}/
- mtree -deU -f ${here}/src/etc/mtree/BSD.var.dist -p ${tmpdir}/var
- mtree -deU -f ${here}/src/etc/mtree/BSD.usr.dist -p ${tmpdir}/usr
- mtree -deU -f ${here}/src/etc/mtree/BSD.local.dist -p ${tmpdir}/usr/local
-
- # Copy the files into the tmpdir. Use an existing built world, or the ftp
- # files.
- if [ "${useworld}" = 1 ]; then
- (cd ${worlddir}; find -dx . | \
- grep -v -E '^./usr/(X11R6|local|obj|opt|ports|src)' | \
- grep -v '^./home' | \
- grep -v '^./var/db/pkg' | \
- cpio -dump ${tmpdir})
- else
- for i in ${ftpdists}; do
- cat ${here}/bindist/ftp/$(basename $i).?? | tar --unlink -xzpf -
- done
- fi
+ for i in ${ftpdists}; do
+ cat ${here}/bindist/ftp/$(basename $i).?? | tar --unlink -xzpf -
+ done
fi
cd ${tmpdir}
-
+
# Customize the tmpdir
rm -rf $(cat ${here}/bindist/delete)
mkdir -p $(cat ${here}/bindist/dirlist)