debian-cd-clone/contrib/cronjob.weekly

344 lines
12 KiB
Plaintext
Raw Normal View History

2010-07-02 23:24:56 +00:00
#!/bin/bash
TOPDIR=$(dirname $0)
if [ "$TOPDIR" = "." ] ; then
TOPDIR=`pwd`
fi
export TOPDIR
. $TOPDIR/settings.sh
export PUBDIRJIG=$PUBDIR/weekly-builds
export DATE_BUILD="$DATE-$BUILDNUM"
BUILDLOCK=$HOME/.debian-cd.lock
. $TOPDIR/common.sh
2010-07-02 23:24:56 +00:00
# Make sure the machine isn't rebooted while we're busy
reboot_lock
# Uncomment the following to use daily d-i builds for these images
# rather than what's in the archive
USE_DAILY_DI=Y
if [ "$RELEASE_BUILD"x = ""x ] ; then
export RSYNC_TARGET=/mnt/nfs-cdimage/weekly-builds
export RSYNC_TARGET_FIRMWARE=/mnt/nfs-cdimage/unofficial/non-free/cd-including-firmware/weekly-builds
else
export RSYNC_TARGET=/mnt/nfs-cdimage/.${RELEASE_BUILD}
export RSYNC_TARGET_FIRMWARE=/mnt/nfs-cdimage/unofficial/non-free/cd-including-firmware/.${RELEASE_BUILD}
export CONF=~/build.wheezy/CONF.sh.${RELEASE_BUILD}
export RELEASE_BUILD=$RELEASE_BUILD
# If we're doing a normal set of daily/weekly builds, leave the
# checksum filenames alone. Otherwise, make life easier for people
# combining things later and append a suitable name as we build.
2009-08-22 22:44:44 +00:00
export SUMS_EXTENSION=".large"
USE_DAILY_DI=N
2009-08-22 22:44:44 +00:00
fi
. images4testing_d-i
2009-08-22 22:44:44 +00:00
if [ "$USE_DAILY_DI"x = "Y"x ] ; then
export DI=sid
export DI_WWW_HOME=default
export DI_DIR="$ARCH_DI_DIR"
else
unset DI_WWW_HOME
2009-08-22 22:44:44 +00:00
fi
export DI_DIST
export DI_CODENAME
2010-07-02 23:24:56 +00:00
BUILDS_RUNNING=""
if lockfile -r0 $BUILDLOCK ; then
2010-07-02 23:24:56 +00:00
# echo "NOT checking for svn updates"
echo "svn update debian-cd"
cd debian-cd && svn cleanup; svn up ; cd ..
2010-07-02 23:24:56 +00:00
# echo "NOT checking for popcon updates"
if [ "$NOPOPCON"x = ""x ] ; then
cd debian-cd && ./tools/update_popcon tasks/wheezy/popularity-contest ; cd ..
fi
cd $TOPDIR
mkdir -p $PUBDIRJIG/trace
mkdir -p $RSYNC_TARGET
for arch in $ARCHES; do
# Reset envvars for next iteration
2010-07-02 23:24:56 +00:00
arch_error=""
arch_start=`now`
if [ "$arch" != multi-arch ] ; then
rm -rf $PUBDIRJIG/$arch
mkdir -p $PUBDIRJIG/$arch
# export DI_DIR="$ARCH_DI_DIR"
export VARIANTS=""
# Full CD set
if [ "$NOCD"x = ""x ] && [ "$NOFULLCD"x = ""x ] ; then
unset FORCE_CD_SIZE1
2010-07-02 23:24:56 +00:00
export MAX_PKG_SIZE=500000000
case $arch in
i386|amd64)
export MAXISOS=8; export MAXJIGDOS=ALL ;;
source)
# don't make CD ISOs for source, DVD will do
export MAXISOS=0; export MAXJIGDOS=ALL ;;
*)
export MAXISOS=3; export MAXJIGDOS=ALL ;;
esac
build_started CD
./testingcds "$arch" &
fi
2009-08-22 22:44:44 +00:00
# Full DVD set
if [ "$NODVD"x = ""x ] ; then
unset FORCE_CD_SIZE1
2010-07-02 23:24:56 +00:00
export MAX_PKG_SIZE=999999999999
2009-08-22 22:44:44 +00:00
case $arch in
i386|amd64)
export MAXISOS=3
export MAXJIGDOS=ALL
export VARIANTS=xen
# Special case: make DVD1 fit on a 4GB USB
# stick (#612074)
export FORCE_CD_SIZE1=STICK4GB
;;
source)
2009-08-22 22:44:44 +00:00
export MAXISOS=ALL; export MAXJIGDOS=ALL ;;
powerpc)
# Special case: make DVD1 fit on a 4GB USB
# stick (#686471)
export FORCE_CD_SIZE1=STICK4GB
export MAXISOS=1; export MAXJIGDOS=ALL ;;
2009-08-22 22:44:44 +00:00
*)
export MAXISOS=1; export MAXJIGDOS=ALL ;;
2009-08-22 22:44:44 +00:00
esac
export DESKTOP=all
build_started DVD
INSTALLER_CD=3 TASK=Debian-all \
KERNEL_PARAMS='desktop=all' \
./testingcds "$arch" &
2009-08-22 22:44:44 +00:00
fi
# Full BD set
if [ "$NOBD"x = ""x ] ; then
unset DESKTOP
unset FORCE_CD_SIZE1
2010-07-02 23:24:56 +00:00
export MAX_PKG_SIZE=999999999999
case $arch in
i386|amd64|source)
export MAXISOS=0
export MAXJIGDOS=ALL
2009-08-22 22:44:44 +00:00
export DESKTOP=all
export VARIANTS=xen
build_started BD
INSTALLER_CD=9 TASK=Debian-all \
KERNEL_PARAMS='desktop=all' \
./testingcds "$arch" &
;;
*)
echo " Not running BD build for $arch"
;;
esac
fi
# Full DLBD set
if [ "$NOBD"x = ""x ] && [ "$NODLBD"x = ""x ] ; then
unset DESKTOP
unset FORCE_CD_SIZE1
export MAX_PKG_SIZE=999999999999
case $arch in
i386|amd64|source)
export MAXISOS=0
export MAXJIGDOS=ALL
export DESKTOP=all
export VARIANTS=xen
build_started DLBD
INSTALLER_CD=D TASK=Debian-all \
KERNEL_PARAMS='desktop=all' \
./testingcds "$arch" &
;;
*)
echo " Not running DLBD build for $arch"
;;
esac
fi
# kde, xfce and lxde cds
if [ "$arch"x != "source"x ] && [ "$NOCD"x = ""x ] ; then
if [ "$NOKDECD"x = ""x ] ; then
export MAX_PKG_SIZE=300000000
export DESKTOP=kde
export MAXISOS=1; export MAXJIGDOS=1
unset FORCE_CD_SIZE1
export VARIANTS=""
build_started KDECD
2010-07-02 23:24:56 +00:00
INSTALLER_CD=4 TASK=Debian-kde \
KERNEL_PARAMS='desktop=kde' \
MAXCDS=1 MAXISOS=ALL MAXJIGDOS=ALL \
./testingcds "$arch" &
fi
if [ "$NOXFCECD"x = ""x ] ; then
export MAX_PKG_SIZE=300000000
export DESKTOP=xfce
export MAXISOS=1; export MAXJIGDOS=1
unset FORCE_CD_SIZE1
export VARIANTS=""
build_started XFCECD
INSTALLER_CD=5 TASK=Debian-xfce \
KERNEL_PARAMS='desktop=xfce' \
MAXCDS=1 MAXISOS=ALL MAXJIGDOS=ALL \
./testingcds "$arch" &
fi
if [ "$NOLXDECD"x = ""x ] ; then
export MAX_PKG_SIZE=300000000
export DESKTOP=lxde
export MAXISOS=1; export MAXJIGDOS=1
unset FORCE_CD_SIZE1
export VARIANTS=""
build_started LXDECD
INSTALLER_CD=A TASK=Debian-lxde \
KERNEL_PARAMS='desktop=lxde' \
MAXCDS=1 MAXISOS=ALL MAXJIGDOS=ALL \
./testingcds "$arch" &
fi
2010-07-02 23:24:56 +00:00
fi
# netinst CD
if [ "$arch"x != "source"x ] && [ "$NOCD"x = ""x ] && [ "$NONI"x = ""x ] ; then
export MAX_PKG_SIZE=300000000
export DESKTOP=all
export MAXISOS=1; export MAXJIGDOS=1
unset FORCE_CD_SIZE1
export VARIANTS=""
export OUT_FREE_SID=$PUBDIRJIG
export OUT_FREE_TST=$PUBDIRJIG
export OUT_FW_SID=${PUBDIRJIG}-firmware
export OUT_FW_TST=${PUBDIRJIG}-firmware
build_started NI
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
KERNEL_PARAMS="desktop=all" \
DESKTOP=all VARIANTS=xen \
TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
DI=${DI} DI_DIST=${DI} \
./testingcds "$arch" &
for arch1 in $ARCHES_FIRMWARE; do
if [ "$arch" = "$arch1" ] ; then
build_started NIFIRMWARE
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=C \
FORCE_FIRMWARE=1 CDNAME=firmware \
KERNEL_PARAMS="desktop=all" \
DESKTOP=all VARIANTS=xen \
TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
DI=${DI} DI_DIST=${DI} \
./testingcds "$arch" &
fi
done
fi
catch_parallel_builds
if [ "$NOSYNC"x = ""x ] ; then
2010-07-02 23:24:56 +00:00
if [ "$arch_error"x = "none"x ] ; then
echo " Running ~/build.wheezy/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ $arch &"
~/build.wheezy/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ $arch &
if [ -d $PUBDIRJIG-firmware/$arch ] ; then
echo " Running ~/build.wheezy/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ $arch &"
~/build.wheezy/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ $arch &
fi
2010-07-02 23:24:56 +00:00
else
~/build.wheezy/report_build_error $RSYNC_TARGET $arch "$arch_error"
2010-07-02 23:24:56 +00:00
fi
fi
else # multi-arch
rm -rf $PUBDIRJIG/multi-arch
for i in iso-dvd jigdo-dvd iso-cd jigdo-cd; do
mkdir -p $PUBDIRJIG/multi-arch/$i
done
if [ "$NODVD"x = ""x ] ; then
2010-07-02 23:24:56 +00:00
export MAX_PKG_SIZE=999999999999
2009-08-22 22:44:44 +00:00
export DESKTOP=all
# Special case: make DVD1 fit on a 4GB USB
# stick (#612074)
build_started DVD
export FORCE_CD_SIZE1=STICK4GB
2009-08-22 22:44:44 +00:00
INSTALLER_CD=6 TASK=Debian-all \
KERNEL_PARAMS='desktop=all' \
MAXCDS=1 MAXISOS=ALL MAXJIGDOS=ALL \
VARIANTS=xen \
./testingcds "i386 amd64 source" &
fi
2009-08-23 00:12:41 +00:00
if [ "$NOCD"x = ""x ] && [ "$NONI"x = ""x ] ; then
export DESKTOP=all
export OUT_FREE_SID=$PUBDIRJIG
export OUT_FREE_TST=$PUBDIRJIG
build_started NI
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
KERNEL_PARAMS="desktop=all" \
DESKTOP=all VARIANTS=xen \
TASK=debian-installer+kernel \
MAXISOS=ALL MAXJIGDOS=ALL \
DI=${DI} DI_DIST=${DI} \
./testingcds "amd64 i386" &
for arch1 in $ARCHES_FIRMWARE; do
if [ "$arch" = "$arch1" ] ; then
build_started NIFIRMWARE
OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=C \
FORCE_FIRMWARE=1 CDNAME=firmware \
KERNEL_PARAMS="desktop=all" \
DESKTOP=all VARIANTS=xen \
TASK=debian-installer+kernel \
MAXISOS=ALL MAXJIGDOS=ALL \
DI=${DI} DI_DIST=${DI} \
./testingcds "amd64 i386" &
fi
2009-08-23 00:12:41 +00:00
done
fi
catch_parallel_builds
if [ "$NOSYNC"x = ""x ] ; then
2010-07-02 23:24:56 +00:00
if [ "$arch_error"x = "none"x ] || [ "$arch_error"x = ""x ] ; then
echo " Running ~/build.wheezy/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ multi-arch &"
~/build.wheezy/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ multi-arch &
if [ -d $PUBDIRJIG-firmware/multi-arch ] ; then
echo " Running ~/build.wheezy/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ multi-arch &"
~/build.wheezy/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ multi-arch &
fi
2010-07-02 23:24:56 +00:00
else
~/build.wheezy/report_build_error $RSYNC_TARGET multi-arch "$arch_error"
2010-07-02 23:24:56 +00:00
fi
fi
fi # end of multi-arch
2009-08-22 22:44:44 +00:00
done
if [ "$NOFW"x = ""x ] ; then
~/build.wheezy/generate_firmware_images wheezy
~/build.wheezy/generate_firmware_images sid
fi
if [ "$NOSNAP"x = ""x ] ; then
~/bin/weekly-snapshots
fi
date -u > $PUBDIRJIG/trace/cdimage.debian.org
rm -f $BUILDLOCK
fi