]> git.decadent.org.uk Git - dak.git/blob - config/debian-security/cron.buildd
Make GPGKeyring a list of keyrings; drop PGPKeyring.
[dak.git] / config / debian-security / cron.buildd
1 #! /bin/bash
2 #
3 # Executed after cron.unchecked
4
5 ARCHS_oldstable="alpha arm hppa i386 ia64 m68k mips mipsel powerpc sparc s390"
6 ARCHS_stable="$ARCHS_oldstable"
7 ARCHS_testing="$ARCHS_stable"
8 DISTS="oldstable stable testing"
9 SSH_SOCKET=~/.ssh/buildd.debian.org.socket
10
11 set -e
12 export SCRIPTVARS=/org/security.debian.org/dak/config/debian-security/vars
13 . $SCRIPTVARS
14
15 if [ ! -e $ftpdir/Archive_Maintenance_In_Progress ]; then
16         cd $masterdir
17         for d in $DISTS; do
18                 eval SOURCES_$d=`stat -c "%Y" $base/buildd/$d/Sources.gz`
19                 eval PACKAGES_$d=`stat -c "%Y" $base/buildd/$d/Packages.gz`
20         done
21         apt-ftparchive -qq generate apt.conf.buildd-security
22         dists=
23         for d in $DISTS; do
24                 eval NEW_SOURCES_$d=`stat -c "%Y" $base/buildd/$d/Sources.gz`
25                 eval NEW_PACKAGES_$d=`stat -c "%Y" $base/buildd/$d/Packages.gz`
26                 old=SOURCES_$d
27                 new=NEW_$old
28                 if [ ${!new} -gt ${!old} ]; then
29                         if [ -z "$dists" ]; then
30                                 dists="$d"
31                         else
32                                 dists="$dists $d"
33                         fi
34                         continue
35                 fi
36                 old=PACKAGES_$d
37                 new=NEW_$old
38                 if [ ${!new} -gt ${!old} ]; then
39                         if [ -z "$dists" ]; then
40                                 dists="$d"
41                         else
42                                 dists="$dists $d"
43                         fi
44                         continue
45                 fi
46         done
47         if [ ! -z "$dists" ]; then
48                 # setup ssh master process
49                 ssh buildd@buildd -S $SSH_SOCKET -MN 2> /dev/null &
50                 SSH_PID=$!
51                 while [ ! -S $SSH_SOCKET ]; do
52                         sleep 1
53                 done
54                 trap 'kill -TERM $SSH_PID' 0
55                 for d in $dists; do
56                         archs=ARCHS_$d
57                         ARCHS=${!archs}
58                         cd /org/security.debian.org/buildd/$d
59                         for a in $ARCHS; do
60                                 quinn-diff -a /org/security.debian.org/buildd/Packages-arch-specific -A $a 2>/dev/null | ssh buildd@buildd -S $SSH_SOCKET wanna-build -d $d-security -b $a/build-db --merge-partial-quinn
61                                 ssh buildd@buildd -S $SSH_SOCKET wanna-build -d $d-security -A $a -b $a/build-db --merge-packages < Packages
62                         done
63                 done
64         fi
65 fi
66
67 ssh buildd@bester.farm.ftbfs.de -i ~/.ssh/id_bester sleep 1