]> git.decadent.org.uk Git - dak.git/blob - config/debian-security/cron.unchecked
89baf28a6bdac267c46de736983677db4728bcb4
[dak.git] / config / debian-security / cron.unchecked
1 #! /bin/bash
2
3 set -e
4 set -u
5
6 export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars
7 . $SCRIPTVARS
8
9 # And use one locale, no matter what the caller has set
10 export LANG=C
11 export LC_ALL=C
12
13 report=$queuedir/REPORT
14 reportdis=$queuedir/REPORT.disembargo
15 timestamp=$(date "+%Y-%m-%d %H:%M")
16 doanything=false
17
18 # So first we should go and see if any process-policy action is done
19 dak process-policy embargo | mail -a "X-Debian: DAK" -e -s "Automatically accepted from embargoed" team@security.debian.org -- -F "Debian FTP Masters" -f ftonaster@ftp-master.debian.org
20 dak process-policy disembargo | mail -a "X-Debian: DAK" -e -s "Automatically accepted from unembargoed" team@security.debian.org -- -F "Debian FTP Masters" -f ftonaster@ftp-master.debian.org
21
22 # Now, if this really did anything, we can then sync it over. Files
23 # in newstage mean they are (late) accepts of security stuff, need
24 # to sync to ftp-master
25
26 cd $newstage
27 changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
28 if [ -n "$changes" ]; then
29     echo "$timestamp": ${changes:-"Nothing to do in newstage"}  >> $report
30     rsync -a -q $newstage/. /srv/queued/ftpmaster/.
31     dak process-upload -a -d "$newstage" >> $report
32 fi
33
34 cd $unchecked
35 changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
36 if [ -n "$changes" ]; then
37     doanything=true
38     echo "$timestamp": ${changes:-"Nothing to do in unchecked"}  >> $report
39     dak process-upload -a -d "$unchecked" >> $report
40 fi
41
42 cd $disembargo
43 changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
44
45 if [ -n "$changes" ]; then
46     doanything=true
47     echo "$timestamp": ${changes:-"Nothing to do in disembargo"}  >> $reportdis
48     dak process-upload -a -d "$disembargo" >> $reportdis
49 fi
50
51 if ! $doanything; then
52   echo "$timestamp": Nothing to do >> $report
53   exit 0
54 fi
55
56 dak dominate
57 dak generate-filelist
58 cd $configdir
59 $configdir/map.sh
60 apt-ftparchive generate apt.conf
61 dak generate-releases
62 /srv/security-master.debian.org/dak/config/debian-security/make-mirror.sh
63 sudo -u archvsync -H /home/archvsync/signal_security
64
65 $masterdir/cron.buildd