debian-cd-clone/contrib/cronjob.daily

116 lines
4.8 KiB
Plaintext
Raw Normal View History

#!/bin/bash
TOPDIR=$(dirname $0)
. $TOPDIR/settings.sh
export PUBDIRJIG=$PUBDIR/daily-builds
export PUBDIRISO=$PUBDIR/daily-builds
export DATE_BUILD="$DATE-$BUILDNUM"
finalise_arch_dir () {
ARCH=$1
INST_VER=$2
ARCH_ISO_DIR=$PUBDIRISO/${INST_VER}_d-i/$DATE_BUILD/$ARCH/iso-cd
ARCH_JIGDO_DIR=$PUBDIRISO/${INST_VER}_d-i/$DATE_BUILD/$ARCH/jigdo-cd
if [ -e $ARCH_ISO_DIR ] ; then
cd $ARCH_ISO_DIR
zsyncmake -e -u *businesscard*iso *businesscard*iso > /dev/null
zsyncmake -e -u *netinst*iso *netinst*iso > /dev/null
DATESTRING=`date -u`
sed "s/ARCH/$ARCH/g;s/DATE/$DATESTRING/g;s/BUILDNUM/$BUILDNUM/g;s/INST_VER/$INST_VER/g" $TOPDIR/daily.html > HEADER.html
$TOPDIR/debian-cd/tools/imagesums $ARCH_JIGDO_DIR
cp $ARCH_JIGDO_DIR/*SUMS $ARCH_ISO_DIR
cd $TOPDIR
fi
}
export RSYNC_TARGET=/export/ftp/cdimage/daily-builds
if [ "$ARCHES"x = ""x ] ; then
ARCHES="alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc sparc multi-arch"
fi
cd $TOPDIR &&
if lockfile -r0 .debian-cd.lock ; then
echo "svn update debian-cd:"
cd debian-cd && svn cleanup ; svn up ; cd ..
. images4testing_d-i
for arch in $ARCHES; do
echo "Building $arch:"
if [ "$arch" = "multi-arch" ] ; then
echo " i386/amd64/ppc sid netinst"
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
TASK=debian-installer+kernel LOGAPPEND="-1" \
MAXISOS=ALL MAXJIGDOS=ALL DI=sid DI_DIST="$DI_DIST" \
DI_WWW_HOME=default ./testingcds "amd64 i386 powerpc"
echo " alpha/hppa/ia64 sid netinst"
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
TASK=debian-installer+kernel LOGAPPEND="-2" \
MAXISOS=ALL MAXJIGDOS=ALL DI=sid DI_DIST="$DI_DIST" \
DI_WWW_HOME=default ./testingcds "alpha hppa ia64"
finalise_arch_dir $arch sid
rm -rf $PUBDIRISO/sid_d-i/$DATE_BUILD/multi-arch
mv $PUBDIRISO/sid_d-i/$DATE_BUILD/multi $PUBDIRISO/sid_d-i/$DATE_BUILD/multi-arch
echo " i386/amd64/ppc lenny netinst"
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
TASK=debian-installer+kernel LOGAPPEND="-1" \
MAXISOS=ALL MAXJIGDOS=ALL DI=lenny DI_DIST="$DI_DIST" ./testingcds "amd64 i386 powerpc"
echo " alpha/hppa/ia64 lenny netinst"
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
TASK=debian-installer+kernel LOGAPPEND="-2" \
MAXISOS=ALL MAXJIGDOS=ALL DI=lenny DI_DIST="$DI_DIST" ./testingcds "alpha hppa ia64"
finalise_arch_dir $arch lenny
rm -rf $PUBDIRISO/lenny_d-i/$DATE_BUILD/multi-arch
mv $PUBDIRISO/lenny_d-i/$DATE_BUILD/multi $PUBDIRISO/lenny_d-i/$DATE_BUILD/multi-arch
else # end of m-a
echo " $arch sid bc"
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=1 TASK=debian-installer MAXISOS=ALL MAXJIGDOS=ALL DI=sid DI_WWW_HOME=default DI_DIR="$ARCH_DI_DIR" ./testingcds "$arch"
echo " $arch sid netinst"
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL DI=sid DI_WWW_HOME=default DI_DIR="$ARCH_DI_DIR" ./testingcds "$arch"
finalise_arch_dir $arch sid
echo " $arch lenny bc"
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=1 TASK=debian-installer MAXISOS=ALL MAXJIGDOS=ALL DI=lenny DI_DIST="$DI_DIST" ./testingcds "$arch"
echo " $arch lenny netinst"
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL DI=lenny DI_DIST="$DI_DIST" ./testingcds "$arch"
finalise_arch_dir $arch lenny
fi # end of normal arch build
done
if [ "$NOSYNC"x = ""x ] ; then
echo "Sync across to output dir on farbror"
rsync -rHltv $PUBDIRISO/ $RSYNC_TARGET/
echo "Remove extra dailies:"
~/bin/remove_extra_dailies
echo "Clean up old builds on build machine:"
for DIR in $PUBDIRISO/* ; do
cd $DIR
for THIS in 20* ; do
if [ $THIS != $DATE-$BUILDNUM ] ; then
echo " Deleting $DIR/$THIS"
rm -rf $DIR/$THIS
fi
done
done
echo "$DATE-$BUILDNUM" > $RSYNC_TARGET/daily-trace
fi
cd $TOPDIR
rm -f .debian-cd.lock
fi