]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian-security/cron.daily
Add obsolete_lintian_tags.pl tool to recognize obsolete tags
[dak.git] / config / debian-security / cron.daily
index abe3c08a946e3460d1fe3382b573526153ea5b08..bfa6dd38f97a9ef8c810e12d8a95acdb993086ab 100755 (executable)
@@ -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
@@ -20,7 +23,6 @@ find . -maxdepth 1 -mindepth 1 -type l | xargs --no-run-if-empty rm
 
 for suite in $suites; do
     case $suite in
-        oldstable) override_suite=lenny;;
         stable) override_suite=squeeze;;
         testing) override_suite=wheezy;;
         *) echo "Unknown suite type ($suite)"; exit 1;;
@@ -48,7 +50,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; do
     rm -f override.$dist.all3
     components="main contrib non-free";
     if [ -f override.$dist.main.debian-installer.gz ]; then
@@ -66,10 +68,24 @@ done
 
 cd $configdir
 dak import-keyring -L /srv/keyring.debian.org/keyrings/debian-keyring.gpg
+
+cleanup() {
+    rm -f "$LOCKFILE"
+}
+
+if ! lockfile -r100 "$LOCKFILE"; then
+    echo "Could not lock $LOCKFILE." >&2
+    exit 1
+fi
+trap cleanup EXIT
+
 dak clean-queues
 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)