X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian-security%2Fcron.daily;h=213b0a903ee3043ebe978ca0dbad77e9b025c3e7;hb=6cb0b0401eaeeb6900551c20617f0a8f2293cd89;hp=025f6fcaab038a3503bd978b822c86e149d75ebe;hpb=883c05418a2987751597e906ec2c63b1f5425df6;p=dak.git diff --git a/config/debian-security/cron.daily b/config/debian-security/cron.daily index 025f6fca..213b0a90 100755 --- a/config/debian-security/cron.daily +++ b/config/debian-security/cron.daily @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash # # Executed daily via cron, out of dak's crontab. set -e -export SCRIPTVARS=/org/security-master.debian.org/dak/config/debian-security/vars +export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars . $SCRIPTVARS ################################################################################ @@ -20,9 +20,9 @@ find . -maxdepth 1 -mindepth 1 -type l | xargs --no-run-if-empty rm for suite in $suites; do case $suite in - oldstable) override_suite=etch;; - stable) override_suite=lenny;; - testing) override_suite=squeeze;; + oldstable) override_suite=lenny;; + stable) override_suite=squeeze;; + testing) override_suite=wheezy;; *) echo "Unknown suite type ($suite)"; exit 1;; esac for component in $components; do @@ -44,7 +44,7 @@ for suite in $suites; do done # Generate .all3 overides for the buildd support -for dist in etch lenny squeeze; do +for dist in lenny squeeze wheezy; do rm -f override.$dist.all3 components="main contrib non-free"; if [ -f override.$dist.main.debian-installer.gz ]; then @@ -60,19 +60,21 @@ done ################################################################################ -cd $masterdir +cd $configdir +dak import-keyring -L /srv/keyring.debian.org/keyrings/debian-keyring.gpg dak clean-queues +dak clean-queues -i $disembargo dak clean-suites -apt-ftparchive -q clean apt.conf -apt-ftparchive -q clean apt.conf.buildd symlinks -d -r $ftpdir pg_dump obscurity > /org/security-master.debian.org/dak-backup/dump_$(date +%Y.%m.%d-%H:%M:%S) +find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mmin +720 | +while read dumpname; do + bzip2 -9fv "$dumpname" +done -# Vacuum the database -set +e -echo "VACUUM; VACUUM ANALYZE;" | psql obscurity 2>&1 | egrep -v "^NOTICE: Skipping \"pg_.*only table or database owner can VACUUM it$|^VACUUM$" -set -e +apt-ftparchive -q clean apt.conf +apt-ftparchive -q clean apt.conf.buildd ################################################################################