aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1999-09-11 00:18:38 +0000
committerSatoshi Asami <asami@FreeBSD.org>1999-09-11 00:18:38 +0000
commit20f70843a30de8b1546072bdf083ddf22f2ca695 (patch)
treee2810298591dfdc23504481a7f53eac96aa1ec64
parent0a15669df6c9cd2b11f02652cf90aa8025722536 (diff)
downloadports-20f70843a30de8b1546072bdf083ddf22f2ca695.tar.gz
ports-20f70843a30de8b1546072bdf083ddf22f2ca695.zip
(1) Remove FORCE_PKG_REGISTER, it is not necessary anymore. Remove
everything under /var/db/pkg/* before installing dependencies and during final cleanup. (2) Change OSREL, OSVERSION and PORTOBJFORMAT (if necessary). Comment out those for 3-stable. Reported by: paul, tg (3) Move mtree until after we actually mount /usr/src. ;) Reported by: taoka (4) Run ldconfig with and without -aout in all sorts of directories to pick up everything that could be in compat dirs etc. Run ldconfig -aout -R after cleanup too.
Notes
Notes: svn path=/head/; revision=21638
-rwxr-xr-xTools/portbuild/scripts/portbuild35
1 files changed, 23 insertions, 12 deletions
diff --git a/Tools/portbuild/scripts/portbuild b/Tools/portbuild/scripts/portbuild
index a0182384e700..8f8702ee92f4 100755
--- a/Tools/portbuild/scripts/portbuild
+++ b/Tools/portbuild/scripts/portbuild
@@ -8,7 +8,7 @@ export BATCH=t
export NO_RESTRICTED=t
#export FOR_CDROM=t
export USA_RESIDENT=YES
-export FORCE_PKG_REGISTER=t
+#export FORCE_PKG_REGISTER=t
#export FORCE_PACKAGE=t
export PARALLEL_PACKAGE_BUILD=t
export PACKAGE_BUILDING=t
@@ -46,13 +46,13 @@ fi
case ${branch} in
4*)
export OSREL=4.0
- export OSVERSION=400003
+ export OSVERSION=400009
export PORTOBJFORMAT=elf
;;
3*)
- export OSREL=3.2
- export OSVERSION=320000
- export PORTOBJFORMAT=elf
+# export OSREL=3.3
+# export OSVERSION=330000
+# export PORTOBJFORMAT=elf
;;
*)
export OSREL=2.2.8
@@ -111,22 +111,24 @@ echo "building ${pkgname} on $(hostname -s)" | tee ${chroot}/tmp/${pkgname}.log
echo "in directory ${chroot}" | tee -a ${chroot}/tmp/${pkgname}.log
echo "with arguments: ${args}" | tee -a ${chroot}/tmp/${pkgname}.log
-mtree -deU -f ${chroot}/usr/src/etc/mtree/BSD.root.dist -p ${chroot} \
- >/dev/null 2>&1
-mtree -deU -f ${chroot}/usr/src/etc/mtree/BSD.var.dist -p ${chroot}/var \
- >/dev/null 2>&1
-mtree -deU -f ${chroot}/usr/src/etc/mtree/BSD.usr.dist -p ${chroot}/usr \
- >/dev/null 2>&1
-
# intentionally set up ${PORTSDIR} with symlink to catch broken ports
mkdir -p ${chroot}/a/ports
rm -rf ${chroot}/usr/ports
mount -o -2 -r ${master}:${buildroot}/usr/ports ${chroot}/a/ports
ln -sf ../a/ports ${chroot}/usr/ports
+mkdir -p ${chroot}/usr/src ${chroot}/usr/opt/doc
+
mount -o -2 -r ${master}:${buildroot}/${branch}/src ${chroot}/usr/src
mount -o -2 -r ${master}:${buildroot}/usr/opt/doc ${chroot}/usr/opt/doc
+mtree -deU -f ${chroot}/usr/src/etc/mtree/BSD.root.dist -p ${chroot} \
+ >/dev/null 2>&1
+mtree -deU -f ${chroot}/usr/src/etc/mtree/BSD.var.dist -p ${chroot}/var \
+ >/dev/null 2>&1
+mtree -deU -f ${chroot}/usr/src/etc/mtree/BSD.usr.dist -p ${chroot}/usr \
+ >/dev/null 2>&1
+
# just in case...
for dir in ${cleandirs}; do
if ! rm -rf ${chroot}${dir} >/dev/null 2>&1; then
@@ -135,6 +137,13 @@ for dir in ${cleandirs}; do
fi
done
+rm -rf /var/db/pkg/*
+
+chroot ${chroot} /sbin/ldconfig -R
+chroot ${chroot} /sbin/ldconfig -aout -m /usr/lib/aout
+chroot ${chroot} /sbin/ldconfig -aout -m /usr/lib/compat/aout
+chroot ${chroot} /sbin/ldconfig -aout -R
+
while [ $# -gt 0 ]; do
if ssh -a ${master} [ -f ${packages}/All/$1 ]; then
if [ ! -f ${chroot}/tmp/depends/$1 ]; then
@@ -182,6 +191,8 @@ if [ $noclean = 0 -o $error = 0 ]; then
fi
done
chroot ${chroot} /sbin/ldconfig -R
+ chroot ${chroot} /sbin/ldconfig -aout -R
+ rm -rf /var/db/pkg/*
rm ${chroot}/used/${pkgname}
rmdir ${chroot}/used
fi