diff options
author | kris <kris@FreeBSD.org> | 2006-01-23 04:45:11 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2006-01-23 04:45:11 +0800 |
commit | 50725181ce9e714bf3dd149c8d4b4a864d8d5115 (patch) | |
tree | dc73e714f4d4ed05cf6a69282d08659497bae7dc | |
parent | 0334d7c8002cda832390ccf61823b1a8d02b9994 (diff) | |
download | freebsd-ports-gnome-50725181ce9e714bf3dd149c8d4b4a864d8d5115.tar.gz freebsd-ports-gnome-50725181ce9e714bf3dd149c8d4b4a864d8d5115.tar.zst freebsd-ports-gnome-50725181ce9e714bf3dd149c8d4b4a864d8d5115.zip |
Support 7.x INDEX builds
Add a few more local configuration variables
Minor cleanups
-rwxr-xr-x | Tools/scripts/tindex | 53 |
1 files changed, 37 insertions, 16 deletions
diff --git a/Tools/scripts/tindex b/Tools/scripts/tindex index 7ab84a3c8159..3167171f33d2 100755 --- a/Tools/scripts/tindex +++ b/Tools/scripts/tindex @@ -22,22 +22,27 @@ ERROR_ADDRESS=root@localhost SCP_DEST=root@localhost:/usr/local/www/ports # Location of ports tree and source trees -export PORTSDIR=/vol/vol0/users/kris/ports.clean -export SRCDIR4=/vol/vol0/users/kris/src.4 -export SRCDIR5=/vol/vol0/users/kris/src.5 -export SRCDIR6=/vol/vol0/users/kris/src.6 +export BASEDIR=/local0/tmp/kris/tindex +export PORTSDIR=${BASEDIR}/ports +export SRCDIR4=${BASEDIR}/src.4 +export SRCDIR5=${BASEDIR}/src.5 +export SRCDIR6=${BASEDIR}/src.6 +export SRCDIR7=${BASEDIR}/src.7 + +# SSH key to use for copying INDEXes to www host (if non-default) +export SSHKEY="-i /home/kris/.ssh/id_dsa-index" # -------------------------------------------------------- blame() { # Find out who is responsible for current version of file $1 - # Fastest way to extract is from the $FreeBSD$ tag + # Fastest way to extract is from the CVS "FreeBSD" tag ident=$(ident $1 2>/dev/null | grep '$FreeBSD') who=$(echo $ident | awk '{print $6}') if [ -z "$ident" ]; then - # No $FreeBSD$ tag, fall back to slower method of parsing cvs logs. + # No FreeBSD tag, fall back to slower method of parsing cvs logs. rev=$(cvs status $1 2>/dev/null | grep 'Working revision:' | awk '{print $3}') if [ "$rev" != "No" ]; then # "No" means not under CVS control ident=$(cvs -Rq log -r$rev $1 | grep "^date:" | head -1 | sed 's,;,,g') @@ -109,6 +114,9 @@ checkfixed() { export __MAKE_CONF=/dev/null export PORT_DBDIR=/nonexistent export PKG_DBDIR=/nonexistent +export INDEX_PRISTINE=1 +export INDEX_JOBS=4 +export INDEX_QUIET=1 # First update the source trees to get current OSVERSION cd ${SRCDIR4}/sys/sys @@ -120,22 +128,22 @@ cvs -Rq update -PdA -r RELENG_5 param.h OSVERSION5=$(awk '/^#define __FreeBSD_version/ {print $3}' < ${SRCDIR5}/sys/sys/param.h) cd ${SRCDIR6}/sys/sys -cvs -Rq update -PdA param.h +cvs -Rq update -PdA -r RELENG_6 param.h OSVERSION6=$(awk '/^#define __FreeBSD_version/ {print $3}' < ${SRCDIR6}/sys/sys/param.h) +cd ${SRCDIR7}/sys/sys +cvs -Rq update -PdA param.h +OSVERSION7=$(awk '/^#define __FreeBSD_version/ {print $3}' < ${SRCDIR7}/sys/sys/param.h) + cd ${PORTSDIR} -rm -f INDEX INDEX.bz2 INDEX-5 INDEX-5.bz2 INDEX-6 INDEX-6.bz2 +rm -f INDEX INDEX.bz2 INDEX-5 INDEX-5.bz2 INDEX-6 INDEX-6.bz2 INDEX-7 INDEX-7.bz2 (cvs -Rq update -PdA 2>1 ) > cvs.log if grep -q ^C cvs.log ; then (echo "cvs update failed with conflicts:"; - grep ^C cvs.log) | mail -s "Ports cvsup failed" ${PRIVATE_ADDRESS} + grep ^C cvs.log) | mail -s "Ports cvsup failed" ${ERROR_ADDRESS} exit 1 fi -export INDEX_PRISTINE=1 -export INDEX_JOBS=4 -export INDEX_QUIET=1 - export OSVERSION=${OSVERSION4} BRANCH=4.x echo "Building INDEX for ${BRANCH} with OSVERSION=${OSVERSION}" @@ -147,7 +155,7 @@ fi checkfixed ${BRANCH} bzip2 -kf ${PORTSDIR}/INDEX -scp ${PORTSDIR}/INDEX ${PORTSDIR}/INDEX.bz2 ${SCP_DEST} || mail -s "Cannot copy INDEX" ${ERROR_ADDRESS} < /dev/null +scp ${SSHKEY} ${PORTSDIR}/INDEX ${PORTSDIR}/INDEX.bz2 ${SCP_DEST} || mail -s "Cannot copy INDEX" ${ERROR_ADDRESS} < /dev/null BRANCH=5.x export OSVERSION=${OSVERSION5} @@ -160,7 +168,7 @@ fi checkfixed ${BRANCH} bzip2 -kf ${PORTSDIR}/INDEX-5 -scp ${PORTSDIR}/INDEX-5 ${PORTSDIR}/INDEX-5.bz2 ${SCP_DEST} || mail -s "Cannot copy INDEX-5" ${ERROR_ADDRESS} < /dev/null +scp ${SSHKEY} ${PORTSDIR}/INDEX-5 ${PORTSDIR}/INDEX-5.bz2 ${SCP_DEST} || mail -s "Cannot copy INDEX-5" ${ERROR_ADDRESS} < /dev/null BRANCH=6.x export OSVERSION=${OSVERSION6} @@ -173,7 +181,20 @@ fi checkfixed ${BRANCH} bzip2 -kf ${PORTSDIR}/INDEX-6 -scp ${PORTSDIR}/INDEX-6 ${PORTSDIR}/INDEX-6.bz2 ${SCP_DEST} || mail -s "Cannot copy INDEX-6" ${ERROR_ADDRESS} < /dev/null +scp ${SSHKEY} ${PORTSDIR}/INDEX-6 ${PORTSDIR}/INDEX-6.bz2 ${SCP_DEST} || mail -s "Cannot copy INDEX-6" ${ERROR_ADDRESS} < /dev/null + +BRANCH=7.x +export OSVERSION=${OSVERSION7} +echo "Building INDEX for ${BRANCH} with OSVERSION=${OSVERSION}" +cd ${PORTSDIR} +((make index 2> index.err) > index.out) || indexfail ${BRANCH} +if [ -s index.err ]; then + indexfail ${BRANCH} +fi +checkfixed ${BRANCH} + +bzip2 -kf ${PORTSDIR}/INDEX-7 +scp ${SSHKEY} ${PORTSDIR}/INDEX-7 ${PORTSDIR}/INDEX-7.bz2 ${SCP_DEST} || mail -s "Cannot copy INDEX-7" ${ERROR_ADDRESS} < /dev/null # All indexes built successfully, clear the hook rm -f ${PORTSDIR}/hook |