X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian-security%2Fcron.daily;h=213b0a903ee3043ebe978ca0dbad77e9b025c3e7;hb=6cb0b0401eaeeb6900551c20617f0a8f2293cd89;hp=e482a192b4b2e44a23b4a52690aa89e1b1acce75;hpb=290343bd9e607cb870f315d68a19796c5e9989c0;p=dak.git diff --git a/config/debian-security/cron.daily b/config/debian-security/cron.daily index e482a192..213b0a90 100755 --- a/config/debian-security/cron.daily +++ b/config/debian-security/cron.daily @@ -1,16 +1,16 @@ -#!/bin/sh +#!/bin/bash # # Executed daily via cron, out of dak's crontab. set -e -export SCRIPTVARS=/org/security.debian.org/dak/config/debian-security/vars +export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars . $SCRIPTVARS ################################################################################ # Fix overrides -rsync --delete -r --include=override\* --exclude=\* --password-file /srv/non-us.debian.org/s3kr1t/rsync-password -ql security-master@ftp-master::indices/ $overridedir +rsync --delete -r --include=override\* --exclude=\* --password-file /srv/security-master.debian.org/s3kr1t/rsync-password -ql security-master@ftp-master::indices/ $overridedir cd $overridedir for file in override*.gz; do @@ -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.debian.org/dak-backup/dump_$(date +%Y.%m.%d-%H:%M:%S) +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 ################################################################################