--- builds_bin/build_all 2006/02/13 04:20:40 1.10 +++ builds_bin/build_all 2006/12/02 20:39:18 1.15 @@ -5,57 +5,96 @@ # Normally run as "buildrobot" # Requires CVS/SSH access to cvs.sourceforge.net:/cvsroot/smeserver -PATH=/builds/bin:$PATH -export PATH +umask 002 -cd ~/work +PATH=~/bin:$PATH +export PATH -for package in $(cat modules) -do +check_package() +{ + for NVR in $(rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE}\n" --specfile $SPEC) + do + SRPM=/builds/rpms/SRPMS/$NVR.src.rpm + if [ -f $SRPM ] + then + echo "$SRPM already exists" + return + fi + done case $package in - SMEServer) continue ;; - builds_bin) continue ;; - cdrom.image) continue ;; - e-smith-qpsmtpd) continue ;; - e-smith-spamassassin) continue ;; - - *) ;; + openssl) + build_package "--arch i386,i586,i686" + ;; + kmod-*) + build_package "--arch i586,i686" + ;; + *) + build_package + ;; esac +} - echo -n "Checking $package "; date +build_package() +{ + if mzbuild $1 --specfile $SPEC >> $LOG 2>&1 + then + release_rpms *.rpm + else + echo "Build of $package failed - check $LOG" + fi +} - [ -d $package ] || mzget $package +for package in $(ls /builds/cvsroot/smeserver | grep "^$1.*$") +do + case $package in + CVSROOT|anaconda|builds_bin|cdrom.image|devguide|isolinux) + continue + ;; + esac - cd $package + LOG=$HOME/logs/$package.log + > $LOG - LOG=$package.log - mzclean >$LOG 2>&1 - - SPEC=$(echo F/*.spec) # XXX - FIXME - only one SPEC file - - if [ ! -f $SPEC ] - then - echo "Sorry - can't find $SPEC" - continue - fi + echo -n "Checking $package "; date + (echo -n "Checking $package "; date) >> $LOG + echo ========================================================== >> $LOG - NVR=$(rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE}" --specfile $SPEC) + cd ~/work + rm -rf ~/work/$package + mzget --dir /builds/cvsroot/smeserver $package >> $LOG - SRPM=/builds/rpms/SRPMS/$NVR.src.rpm + cd ~/work/$package - if [ -f $SRPM ] + SPEC=$(ls F/*.spec 2> /dev/null | tail -1) + if [ -z "$SPEC" ] then - echo "$SRPM already exists" + echo "Not building $package (No SPEC file)" continue - fi - - if mzbuild >>$LOG 2>&1 - then - release_rpms *.rpm else - echo "Build of $package failed - check $LOG" + TAGS=$(cvs status -v $SPEC | awk '/\(revision:/{ print $1 }' | sort -u) fi + check_package - cd ~/work + for tag in $TAGS + do + echo >> $LOG + + echo -n "Checking $package ($tag) "; date + (echo -n "Checking $package ($tag) "; date) >> $LOG + echo ========================================================== >> $LOG + cd ~/work + rm -rf ~/work/$package + mzget --dir /builds/cvsroot/smeserver --tag $tag $package >> $LOG + + cd ~/work/$package + + SPEC=$(ls F/*.spec 2> /dev/null | tail -1) + if [ -z "$SPEC" ] + then + echo "Not building $package (No SPEC file)" + continue + fi + check_package + done done