From: Mark Huang Date: Wed, 18 Aug 2004 16:25:36 +0000 (+0000) Subject: - merge to 1.10 X-Git-Tag: plkmod-cpu-shares~2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8bb7a4c76b4dc44928b3d0e7dc4fd794cdbdb0b9;p=build.git - merge to 1.10 --- diff --git a/build.sh b/build.sh index c5e56c79..6ff10517 100755 --- a/build.sh +++ b/build.sh @@ -4,15 +4,20 @@ # crontabs to build nightly releases (default). Can also be invoked # manually to build a tagged release (-r) in the current directory. # -# $Id: build.sh,v 1.4 2004/05/26 18:50:15 mlh-pl_rpm Exp $ +# $Id: build.sh,v 1.10 2004/08/18 16:16:56 mlh-pl_rpm Exp $ # # Set defaults -CVSROOT=pup-pl_rpm@cvs.planet-lab.org:/cvs +CVSROOT=bui-pl_rpm@cvs.planet-lab.org:/cvs CVS_RSH=ssh MODULE=rpm TAG=HEAD +# Alpha node repository +ALPHA_BOOT=build@boot.planet-lab.org +ALPHA_ROOT=/www/planetlab/install-rpms/archive/planetlab-alpha +ALPHA_RPMS=/www/planetlab/install-rpms/planetlab-alpha + # Export certain variables export CVS_RSH @@ -47,15 +52,33 @@ BASE=${BASE}${i} # Build ( +# XXX Hack to store the pup key as well as the bui key +eval `ssh-agent` +for i in `grep -l "BEGIN.*PRIVATE KEY" $HOME/.ssh/*` ; do + SSH_ASKPASS=/bin/false ssh-add $i +done + cvs -d ${CVSROOT} export -r ${TAG} -d ${BASE} ${MODULE} make -C ${BASE} ) >${BASE}/log 2>&1 -# Dump log if [ $? -ne 0 ] ; then + # Dump log if [ -f ${BASE}/log ] ; then tail -100 ${BASE}/log else echo "Error $?" fi +elif [ "$TAG" = "HEAD" ] ; then + # Update alpha node repository + for i in RPMS SRPMS ; do + ssh ${ALPHA_BOOT} mkdir -p ${ALPHA_ROOT}/${BASE}/${i} + find ${BASE}/${i} -type f | xargs -i scp {} ${ALPHA_BOOT}:${ALPHA_ROOT}/${BASE}/${i} + ssh ${ALPHA_BOOT} yum-arch ${ALPHA_ROOT}/${BASE}/${i} >/dev/null + done + # Update symlink + ssh ${ALPHA_BOOT} ln -nsf ${ALPHA_ROOT}/${BASE}/RPMS/ ${ALPHA_RPMS} fi + +# Kill the current agent +ssh-agent -k