From 4928f195ad18eb3014226e62d063e0bbc6ea5747 Mon Sep 17 00:00:00 2001 From: Satoshi Asami Date: Tue, 7 Nov 2000 23:39:16 +0000 Subject: (1) New flag, -ftp, indicates packages are to be copied over to the ftp site (specified in portbuild.conf). (It used to be implied by -norestr.) (2) Remove x11-toolkits/Motif-dummy from list of dummy ports, since open-motif is now the default. Also gone is the MOTIF_OPEN variable. (3) Run the tar -czf of the ports tree and generation of CHECKSUM.MD5 in the background. (4) Print the amount of time it took for the entire process, as well as phase 1 and phase 2 of the compilations. (It is done by date -r, so it will only work modulo 24 hours. Hopefully the build will never go over 24 hours again.) (5) Make symlink of the form [ae].${branch}.YYYYMMDD -> [ae].${branch}.YYYYMMDDHH so we can have the simple "date" form as well as the new "date+hour" directories for logs. (6) Remove temporary make status files from /tmp that are over 60 minutes since the last modification. It was filling up the root filesystem. (7) Print out an "ls -lrt" of packages/All into logs/ls-lrt. This is going to be used to evaluate make's job dispatch policies. --- Tools/portbuild/scripts/dopackages | 69 ++++++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 17 deletions(-) diff --git a/Tools/portbuild/scripts/dopackages b/Tools/portbuild/scripts/dopackages index 24f3ab8bc618..9a0eee711150 100755 --- a/Tools/portbuild/scripts/dopackages +++ b/Tools/portbuild/scripts/dopackages @@ -6,10 +6,10 @@ pb=/var/portbuild . ${pb}/portbuild.conf # packages for dependencies only -dummyports="x11/XFree86 x11-toolkits/Motif-dummy" +dummyports="x11/XFree86" # packages with very long dependency lists -- try to start building these first -quickports="x11/kde11 x11/kde11-i18n x11/gnome" +quickports="x11/kde2 x11/gnome" status=${pb}/status @@ -19,7 +19,7 @@ errorexit () { } usage () { - echo "usage: [-nobuild] [-noindex] [-noduds] [-nocvsup] [-nocvs] [-norestr] [-noplistcheck] [-nodummy] branch date" + echo "usage: [-nobuild] [-noindex] [-noduds] [-nocvsup] [-nocvs] [-norestr] [-noplistcheck] [-nodummy] [-ftp] branch date" errorexit 1 } @@ -137,6 +137,28 @@ cdromlist () { echo $(grep -c '^#' ${pb}/${branch}/cdrom.sh) "ports in ${pb}/${branch}/cdrom.sh" } +# usage: archiveports pb branch +archiveports () { + pb=$1 + branch=$2 + + echo "started archive of /usr/ports at $(date)" + cd ${pb}/usr + tar --exclude CVS -czf ${pb}/${branch}/tarballs/ports.tar.gz ports + echo "ended archive of /usr/ports at $(date)" +} + +# usage: generatemd5 pb branch +generatemd5 () { + pb=$1 + branch=$2 + + echo "started generating CHECKSUM.MD5 at $(date)" + cd ${pb}/${branch}/packages/All + find . -name '*.tgz' | sort | sed -e 's/^..//' | xargs md5 > CHECKSUM.MD5 + echo "ended generating CHECKSUM.MD5 at $(date)" +} + scripts=${pb}/scripts umask 002 @@ -149,6 +171,8 @@ echo echo "Called with arguments: "${1+"$@"} echo "Started at $(date)" +starttime=$(date +%s) + PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin if [ $# = 0 ]; then @@ -163,6 +187,7 @@ nocvs=0 norestr=0 noplistcheck=0 nodummy=0 +ftp=0 # optional arguments while [ $# -gt 2 ]; do @@ -191,6 +216,9 @@ while [ $# -gt 2 ]; do x-nodummy) nodummy=1 ;; + x-ftp) + ftp=1 + ;; *) usage ;; @@ -215,7 +243,6 @@ fi if [ "$nodummy" = 1 ]; then export NODUMMY=t - export MOTIF_OPEN=t export XFREE86_VERSION=4 fi @@ -320,15 +347,18 @@ if [ "$nobuild" = 0 ]; then # cp /dev/null $i # done # fi + shortdate=$(echo ${date} | sed -e 's/..$//') cd ${pb}/${branch} mkdir -p packages/All mkdir -p ${pb}/archive/errorlogs - rm -rf ${pb}/archive/errorlogs/e.${branch}.${date} + rm -rf ${pb}/archive/errorlogs/e.${branch}.${date} ${pb}/archive/errorlogs/e.${branch}.${shortdate} mkdir -p ${pb}/archive/errorlogs/e.${branch}.${date} ln -sf ${pb}/archive/errorlogs/e.${branch}.${date} ${pb}/${branch}/errors - rm -rf ${pb}/archive/errorlogs/a.${branch}.${date} + ln -sf e.${branch}.${date} ${pb}/archive/errorlogs/e.${branch}.${shortdate} + rm -rf ${pb}/archive/errorlogs/a.${branch}.${date} ${pb}/archive/errorlogs/a.${branch}.${shortdate} mkdir -p ${pb}/archive/errorlogs/a.${branch}.${date} ln -sf ${pb}/archive/errorlogs/a.${branch}.${date} ${pb}/${branch}/logs + ln -sf a.${branch}.${date} ${pb}/archive/errorlogs/a.${branch}.${shortdate} cp -p ${pb}/cvsdone ${pb}/archive/errorlogs/e.${branch}.${date}/cvsdone cp -p ${pb}/cvsdone ${pb}/archive/errorlogs/a.${branch}.${date}/cvsdone cp -p ${pb}/usr/ports/INDEX-${branch} ${pb}/archive/errorlogs/e.${branch}.${date}/INDEX @@ -341,6 +371,8 @@ if [ "$nobuild" = 0 ]; then done fi + find /tmp -name 'make*' -mmin +60 | xargs rm -f + count=$(awk '{sum+=$2}END{print sum+NR/2}' ${pb}/mlist | sed -e 's/\..*$//') cd ${pb}/${branch}/packages/All ln -sf ../../Makefile . @@ -348,8 +380,11 @@ if [ "$nobuild" = 0 ]; then echo "building packages (phase 1)" echo "================================================" echo "started at $(date)" + phase1start=$(date +%s) make -k -j$count ${quickpkgs} all > ../../make.0 2>&1 ../../make.1 2>&1 CHECKSUM.MD5 cd ${pb}/${branch} if grep -qE '(ptimeout|pnohang): killing' make.1; then echo "The following port(s) timed out:" @@ -431,6 +467,8 @@ if [ "$nobuild" = 0 ]; then if [ "x$new" != "x" ]; then echo "The following port(s) didn't build the first time around: $new" fi + archiveports ${pb} ${branch} & + generatemd5 ${pb} ${branch} & echo "================================================" echo "new failures" echo "================================================" @@ -473,13 +511,9 @@ if [ "$nobuild" = 0 ]; then fi done echo - echo "================================================" - echo "archiving /usr/ports" - echo "================================================" - echo "started at $(date)" - cd ${pb}/usr - tar --exclude CVS -czf ${pb}/${branch}/tarballs/ports.tar.gz ports - echo "ended at $(date)" + wait + ls -asFlrt ${pb}/${branch}/packages/All > ${pb}/${branch}/logs/ls-lrt + cp -p ${pb}/${branch}/make.[01] ${pb}/${branch}/logs echo "================================================" echo "copying distfiles" echo "================================================" @@ -488,8 +522,7 @@ if [ "$nobuild" = 0 ]; then rm -rf bak/distfiles mv -f distfiles bak su ${user} -c ${scripts}/cpdistfiles > ${pb}/cpdistfiles.log 2>&1