]> git.decadent.org.uk Git - dak.git/blob - debian/cron.hourly
LOCAL: Remove replay check
[dak.git] / 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 PROGRAM="Hourly"
13 ########################################################################
14 # Functions                                                            #
15 ########################################################################
16 # common functions are "outsourced"
17 . "${configdir}/common"
18
19 dak import-users-from-passwd
20
21 # do not run show-new and other stuff in parallel
22 LOCKFILE="$lockdir/unchecked.lock"
23 cleanup() {
24     rm -f "${LOCKFILE}"
25 }
26
27 if lockfile -r16 $LOCKFILE 2> /dev/null; then
28     trap cleanup EXIT
29     do_new
30     dak show-new > /dev/null || true
31     cleanup
32     trap - EXIT
33 fi
34
35 dak queue-report -n > $webdir/new.html
36 dak queue-report -n -d backports-new > ${webdir}/backports-new.html
37 dak queue-report -8 -d new,byhand,stable-new,oldstable-new,backports-new -r $webdir/stat
38 sudo -u dak-unpriv dak show-deferred -r $webdir/stat > ${webdir}/deferred.html
39 dak graph -n new,byhand,stable-new,oldstable-new,deferred -r $webdir/stat -i $webdir/stat -x $scriptsdir/rrd-release-freeze-dates
40
41 cd $webdir
42 cat removals-20*.txt > removals-full.txt
43 cat removals.txt >> removals-full.txt
44 cat removals-20*.822 > removals-full.822
45 cat removals.822 >> removals-full.822
46
47 $base/dak/tools/queue_rss.py -q $queuedir/new -o $webdir/rss/ -d $base/misc -l $base/log/
48 $base/dak/tools/removals.pl $configdir/removalsrss.rc > $webdir/rss/removals.rss
49
50
51 # Tell ries to sync its tree
52 ${scriptsdir}/sync-dd ries-sync ries-sync1 ries-sync2 sync
53
54 $scriptsdir/generate-d-i
55
56 # Update backports ACL
57 sudo -u dak-unpriv cat /srv/backports-master.debian.org/etc/acl \
58   | dak acl set-fingerprints backports \
59   | mail -a "X-Debian: DAK" -e -s "backports: acl changes" backports-team@debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org
60
61 # do the buildd key updates
62 BUILDDFUN=$(mktemp -p "${TMPDIR}" BUILDDFUN.XXXXXX)
63 exec >> "${BUILDDFUN}" 2>&1
64 ${scriptsdir}/buildd-remove-keys
65 ${scriptsdir}/buildd-add-keys
66 ${scriptsdir}/buildd-prepare-dir
67
68 for keyring in $(dak admin k list-binary); do
69     dak import-keyring --generate-users "%s" ${keyring}
70 done
71 exec >>/dev/null 2>&1
72
73 DATE=$(date -Is)
74 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
75
76 rm -f "${BUILDDFUN}"