]> git.donarmstrong.com Git - dak.git/blob - config/debian/cron.hourly
Merge remote-tracking branch 'ansgar/pu/multiarchive-2' into merge
[dak.git] / config / debian / cron.hourly
1 #! /bin/bash
2 #
3 # Executed hourly via cron, out of dak's crontab.
4
5 set -e
6 set -o pipefail
7 set -u
8
9 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
10 . $SCRIPTVARS
11
12 dak import-users-from-passwd
13 dak queue-report -n > $webdir/new.html
14 dak queue-report -8 -d new,byhand,proposedupdates,oldproposedupdates -r $webdir/stat
15 dak show-deferred -r $webdir/stat > ${webdir}/deferred.html
16 dak graph -n new,byhand,p-u-new,o-p-u-new,deferred -r $webdir/stat -i $webdir/stat -x $scriptsdir/rrd-release-freeze-dates
17
18 # do not run show-new and other stuff in parallel
19 LOCKFILE="$lockdir/unchecked.lock"
20 if lockfile -r16 $LOCKFILE 2> /dev/null; then
21     do_new
22     dak show-new > /dev/null || true
23     rm -f $LOCKFILE
24 fi
25
26 cd $webdir
27 cat removals-20*.txt > removals-full.txt
28 cat removals.txt >> removals-full.txt
29 cat removals-20*.822 > removals-full.822
30 cat removals.822 >> removals-full.822
31
32 $base/dak/tools/queue_rss.py -q $queuedir/new -o $webdir/rss/ -d $base/misc -l $base/log/
33 $base/dak/tools/removals.pl $configdir/removalsrss.rc > $webdir/rss/removals.rss
34
35
36 # Tell ries to sync its tree
37 ssh -o Batchmode=yes -o ConnectTimeout=30 -o SetupTimeout=30 -2 -i ${base}/s3kr1t/pushddmirror dak@ries.debian.org sync
38
39 $scriptsdir/generate-di
40
41
42 # do the buildd key updates
43 BUILDDFUN=$(mktemp -p "${TMPDIR}" BUILDDFUN.XXXXXX)
44 exec >> "${BUILDDFUN}" 2>&1
45 ${scriptsdir}/buildd-remove-keys
46 ${scriptsdir}/buildd-add-keys
47 ${scriptsdir}/buildd-prepare-dir
48
49 for keyring in $(dak admin k list-binary); do
50     dak import-keyring --generate-users "%s" ${keyring}
51 done
52 exec >>/dev/null 2>&1
53
54 DATE=$(date -Is)
55 cat "${BUILDDFUN}" | mail -a "X-Debian: DAK" -e -s "[$(hostname -s)] Buildd key changes ${DATE}" buildd-keys@ftp-master.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org
56
57 rm -f "${BUILDDFUN}"