X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian-security%2Fcron.daily;h=3105dd69bd5014354e623a92057321f8d7a5a576;hb=695759e80feca4d6b2c27143a076d5e2ddf90339;hp=f33a732cb574c75f69a056fd4c142a29d2def057;hpb=475051efae41a30723cdc1ab82c521cd1accf75b;p=dak.git diff --git a/config/debian-security/cron.daily b/config/debian-security/cron.daily index f33a732c..3105dd69 100755 --- a/config/debian-security/cron.daily +++ b/config/debian-security/cron.daily @@ -3,9 +3,12 @@ # Executed daily via cron, out of dak's crontab. set -e +set -o pipefail export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars . $SCRIPTVARS +LOCKFILE="$lockdir/unchecked.lock" + ################################################################################ # Fix overrides @@ -18,11 +21,11 @@ for file in override*.gz; do done find . -maxdepth 1 -mindepth 1 -type l | xargs --no-run-if-empty rm -for suite in $suites; do +for suite in stable testing; do case $suite in - oldstable) override_suite=lenny;; - stable) override_suite=squeeze;; - testing) override_suite=wheezy;; + oldstable) override_suite=squeeze;; + stable) override_suite=wheezy;; + testing) override_suite=jessie;; *) echo "Unknown suite type ($suite)"; exit 1;; esac for component in $components; do @@ -48,7 +51,7 @@ for suite in $suites; do done # Generate .all3 overides for the buildd support -for dist in lenny squeeze wheezy; do +for dist in squeeze wheezy jessie; do rm -f override.$dist.all3 components="main contrib non-free"; if [ -f override.$dist.main.debian-installer.gz ]; then @@ -66,10 +69,24 @@ done cd $configdir dak import-keyring -L /srv/keyring.debian.org/keyrings/debian-keyring.gpg -dak clean-queues + +cleanup() { + rm -f "$LOCKFILE" +} + +if ! lockfile -r100 "$LOCKFILE"; then + echo "Could not lock $LOCKFILE." >&2 + exit 1 +fi +trap cleanup EXIT + +dak clean-queues -i ${unchecked} dak clean-queues -i $disembargo dak clean-suites +cleanup +trap - EXIT + symlinks -d -r $ftpdir pg_dump obscurity > /org/security-master.debian.org/dak-backup/dump_$(date +%Y.%m.%d-%H:%M:%S) @@ -78,7 +95,7 @@ while read dumpname; do bzip2 -9fv "$dumpname" done -apt-ftparchive -q clean apt.conf -apt-ftparchive -q clean apt.conf.buildd +#apt-ftparchive -q clean apt.conf +#apt-ftparchive -q clean apt.conf.buildd ################################################################################