summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>2000-09-27 01:41:44 +0000
committerSatoshi Asami <asami@FreeBSD.org>2000-09-27 01:41:44 +0000
commit0d088a094b07daede9a3f93d896a2e57d86d53e8 (patch)
treeebfe1866dabef906e379af446c5ad690c78c9e66 /Tools
parentA configuration file where all options reside. (diff)
Pull in configuration variables from /var/portbuild/portbuild.conf.
/var/portbuild is the new designated home of the portbuild setup, and is expected to be a symlink to wherever you choose to put the stuff. Also, change reportload to use /var/portbuild to store temporary files. Seems there are some bugs in the null mount code that make the files inaccessible if you are using an NFS root.
Notes
Notes: svn path=/head/; revision=33172
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/checkmachines2
-rwxr-xr-xTools/portbuild/scripts/checkmachines.sh2
-rwxr-xr-xTools/portbuild/scripts/cpdistfiles9
-rwxr-xr-xTools/portbuild/scripts/cppackages9
-rwxr-xr-xTools/portbuild/scripts/dologs9
-rwxr-xr-xTools/portbuild/scripts/portbuild20
-rwxr-xr-xTools/portbuild/scripts/reportload18
-rwxr-xr-xTools/portbuild/scripts/reportload.sh6
-rwxr-xr-xTools/portbuild/scripts/upgrademach2
9 files changed, 48 insertions, 29 deletions
diff --git a/Tools/portbuild/scripts/checkmachines b/Tools/portbuild/scripts/checkmachines
index c2efbdbc8b42..861c86bfc797 100755
--- a/Tools/portbuild/scripts/checkmachines
+++ b/Tools/portbuild/scripts/checkmachines
@@ -1,6 +1,6 @@
#!/bin/sh
-buildroot=/a/asami/portbuild
+buildroot=/var/portbuild
mlist=${buildroot}/mlist
stamp=${buildroot}/loads/.stamp
diff --git a/Tools/portbuild/scripts/checkmachines.sh b/Tools/portbuild/scripts/checkmachines.sh
index 2e7f0c5deea6..04a32ebeaa4b 100755
--- a/Tools/portbuild/scripts/checkmachines.sh
+++ b/Tools/portbuild/scripts/checkmachines.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-s=/a/asami/portbuild/scripts/checkmachines
+s=/var/portbuild/scripts/checkmachines
if [ -x $s ]; then
$s &
diff --git a/Tools/portbuild/scripts/cpdistfiles b/Tools/portbuild/scripts/cpdistfiles
index b5d7a785bf79..04c8a9283d7f 100755
--- a/Tools/portbuild/scripts/cpdistfiles
+++ b/Tools/portbuild/scripts/cpdistfiles
@@ -1,16 +1,15 @@
#!/bin/sh
# configurable variables
-rhost=ftp.freebsd.org
-ruser=asami
-rdir=w/ports/distfiles
-pb=/a/asami/portbuild
+pb=/var/portbuild
+
+. ${pb}/portbuild.conf
unset DISPLAY
# copy one distfile to remote host
cpdistfile () {
- tar -C distfiles -cf - $1 | ssh $rhost -l $ruser tar -C $rdir -xvf -
+ tar -C distfiles -cf - $1 | ssh $ftpsite -l $user tar -C $distfiledir -xvf -
}
echo "================================================"
diff --git a/Tools/portbuild/scripts/cppackages b/Tools/portbuild/scripts/cppackages
index 336df6d5828a..7174afe212ed 100755
--- a/Tools/portbuild/scripts/cppackages
+++ b/Tools/portbuild/scripts/cppackages
@@ -1,10 +1,9 @@
#!/bin/sh
# configurable variables
-rhost=ftp.freebsd.org
-ruser=asami
-rdir=w/ports/i386/tmp
-pb=/a/asami/portbuild
+pb=/var/portbuild
+
+. ${pb}/portbuild.conf
lock=${pb}/cppackages.lock
@@ -28,7 +27,7 @@ fi
touch ${lock}
cd $pb
-tar -cf - $1/packages | ssh $rhost -l $ruser tar -C $rdir -xvf - 2>&1 | tail -100
+tar -cf - $1/packages | ssh $ftpsite -l $user tar -C $packagedir -xvf - 2>&1 | tail -100
echo "Ended at $(date)"
diff --git a/Tools/portbuild/scripts/dologs b/Tools/portbuild/scripts/dologs
index f717d914f46c..d8f26cbc5b5d 100755
--- a/Tools/portbuild/scripts/dologs
+++ b/Tools/portbuild/scripts/dologs
@@ -1,6 +1,11 @@
#!/bin/sh
-home=/a/asami/portbuild/errorlogs
-scripts=/a/asami/portbuild/scripts
+
+pb=/var/portbuild
+
+. ${pb}/portbuild.conf
+
+home=${pb}/errorlogs
+scripts=${pb}/scripts
lock=$home/lock
diff --git a/Tools/portbuild/scripts/portbuild b/Tools/portbuild/scripts/portbuild
index 944dd6d322ef..94d410d0f410 100755
--- a/Tools/portbuild/scripts/portbuild
+++ b/Tools/portbuild/scripts/portbuild
@@ -2,7 +2,12 @@
# usage: $0 BRANCH [-noclean] [-norestr] [-noplistcheck] [-nodummy] PKGNAME.tgz DIRNAME [DEPENDENCY.tgz ...]
-master=bento
+# configurable variables
+pb=/var/portbuild
+
+. ${pb}/portbuild.conf
+
+buildroot=${pb}
export BATCH=t
export BATCH=t
@@ -20,6 +25,8 @@ export WRKDIRPREFIX=/tmp
# don't pass -j, -k etc. to sub-makes
unset MAKEFLAGS
unset PORTSDIR
+# wait 1800 seconds before killing build with no output
+export TIMEOUT=1800
# to prevent runaway processes -- 256 meg file size limit, one hour CPU limit
ulimit -f 524288
ulimit -t 3600
@@ -37,8 +44,6 @@ unset DISPLAY
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:.
#export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/pkg/bin:.
-buildroot=/a/asami/portbuild
-
branch=$1
shift
@@ -131,6 +136,10 @@ if [ ${found} != 1 ]; then
touch ${chroot}/used/${pkgname}
tar -C ${chroot} -xf ${bindist}
+ # to be able to run ps and killall inside chroot area
+ cp -p /bin/ps ${chroot}/bin
+ cp -p /usr/bin/killall ${chroot}/usr/bin
+
fi
rm -rf ${chroot}/tmp/*
@@ -187,7 +196,7 @@ while [ $# -gt 0 ]; do
shift
done
-scp -p ${master}:${buildroot}/scripts/buildscript ${chroot}
+scp -p ${master}:${buildroot}/scripts/{buildscript,pnohang} ${chroot}
#mount_procfs procfs ${chroot}/proc
@@ -203,9 +212,12 @@ if [ "${error}" = 0 ]; then
ssh -a $master touch ${buildroot}/distfiles/.pbtmp/${pkgname}/.done
# phase 2, make package
+ ln -sf ${pkgname}.log2 ${chroot}/tmp/make.log
chroot ${chroot} /buildscript ${dirname} 2 > ${chroot}/tmp/${pkgname}.log2 2>&1
+ grep pnohang ${chroot}/tmp/${pkgname}.log2
cat ${chroot}/tmp/${pkgname}.log2 >> ${chroot}/tmp/${pkgname}.log
rm ${chroot}/tmp/${pkgname}.log2
+### chroot ${chroot} /buildscript ${dirname} 2 2>&1 | tee -a ${chroot}/tmp/${pkgname}.log
scp ${chroot}/tmp/${pkgname}.log ${master}:${buildroot}/${branch}/logs/${pkgname}.log
error=$(cat ${chroot}/tmp/status)
diff --git a/Tools/portbuild/scripts/reportload b/Tools/portbuild/scripts/reportload
index 6c16e6ecf93b..25f65bd6d005 100755
--- a/Tools/portbuild/scripts/reportload
+++ b/Tools/portbuild/scripts/reportload
@@ -1,14 +1,18 @@
#!/bin/sh
+# configurable variables
+pb=/var/portbuild
+
+. ${pb}/portbuild.conf
+
me=$(hostname -s)
-master=bento
-buildroot=/a/asami/portbuild
+tmpfile=${pb}/${me}
while true; do
- num=$(echo $(ls -1d ${buildroot}/*/chroot/*/used 2>/dev/null| wc -l))
- echo -n "$num " > /tmp/${me}
- uptime >> /tmp/${me}
- /usr/local/bin/scp -q /tmp/${me} $master:${buildroot}/loads/
- rm -f /tmp/${me}
+ num=$(echo $(ls -1d ${pb}/*/chroot/*/used 2>/dev/null| wc -l))
+ echo -n "$num " > ${tmpfile}
+ uptime >> ${tmpfile}
+ scp -q ${tmpfile} $master:${pb}/loads/
+ rm -f ${tmpfile}
sleep 5
done
diff --git a/Tools/portbuild/scripts/reportload.sh b/Tools/portbuild/scripts/reportload.sh
index b08a85ab31fa..a0e6cd27419f 100755
--- a/Tools/portbuild/scripts/reportload.sh
+++ b/Tools/portbuild/scripts/reportload.sh
@@ -2,11 +2,11 @@
if [ "$1" != "start" ]; then exit; fi
-b=/a/asami/portbuild
-s=$b/scripts/reportload
+pb=/var/portbuild
+s=$pb/scripts/reportload
echo -n ' chroot'
-rm -rf $b/*/chroot/*
+rm -rf $pb/*/chroot/*
if [ -x $s ]; then
$s &
diff --git a/Tools/portbuild/scripts/upgrademach b/Tools/portbuild/scripts/upgrademach
index 078752b7ec15..df89cfb91f7c 100755
--- a/Tools/portbuild/scripts/upgrademach
+++ b/Tools/portbuild/scripts/upgrademach
@@ -8,7 +8,7 @@ if [ $# != 1 ]; then
fi
unset DISPLAY
-script=/a/asami/portbuild/scripts/doupgrademach
+script=/var/portbuild/scripts/doupgrademach
scp -q -p $script $1:$script
ssh -n $1 $script