]> git.decadent.org.uk Git - dak.git/blob - config/debian/hourly.functions
A bit more logging, and newoverview in hourly runs backgrounded
[dak.git] / config / debian / hourly.functions
1 # -*- mode:sh -*-
2
3 function importusers() {
4     dak import-users-from-passwd
5 }
6
7 function newoverview() {
8     # do not run show-new and other stuff in parallel
9     if lockfile -r16 $LOCK_UNCHECKED 2> /dev/null; then
10         TMPFILES="${TMPFILES} ${LOCK_UNCHECKED}"
11         do_new
12         log "Output html for packages in NEW"
13         dak show-new > /dev/null || true
14         cleantempfiles
15     fi
16 }
17
18 function queuereport() {
19     log "Creating queue reports, new/backports-new, 822 format"
20     dak queue-report -n > ${webdir}/new.html
21     dak queue-report -n -d backports-new,backports-policy > ${webdir}/backports-new.html
22     dak queue-report -8 -d new,byhand,stable-new,oldstable-new,backports-new -r $webdir/stat
23     log "Deferred queue overview"
24     sudo -u dak-unpriv dak show-deferred -r ${webdir}/stat > ${webdir}/deferred.html
25     log "Graphs about the queues"
26     dak graph -n new,byhand,stable-new,oldstable-new,deferred,backports-new -r ${webdir}/stat -i ${webdir}/stat -x $scriptsdir/rrd-release-freeze-dates
27 }
28
29 function removalstxt() {
30     cd ${webdir}
31     cat removals-20*.txt > removals-full.txt
32     cat removals.txt >> removals-full.txt
33     cat removals-20*.822 > removals-full.822
34     cat removals.822 >> removals-full.822
35 }
36
37 function rss() {
38     log "NEW RSS feed"
39     $base/dak/tools/queue_rss.py -q $queuedir/new -o ${webdir}/rss/ -d $base/misc -l $base/log/
40     log "Removals RSS feed"
41     $base/dak/tools/removals.pl $configdir/removalsrss.rc > ${webdir}/rss/removals.rss
42 }
43
44 function gen_di() {
45     $scriptsdir/generate-d-i
46 }
47
48 function backportsacl() {
49     # Update backports ACL
50     sudo -u dak-unpriv cat /srv/backports-master.debian.org/etc/acl \
51         | dak acl set-fingerprints backports \
52         | mail -a "X-Debian: DAK" -e -s "backports: acl changes" -a "From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>" backports-team@debian.org
53 }
54
55 # do the buildd key updates
56 function builddautosigning() {
57     BUILDDFUN=$(mktemp -p "${TMPDIR}" BUILDDFUN.XXXXXX)
58     TMPFILES="${TMPFILES} ${BUILDDFUN}"
59     exec >> "${BUILDDFUN}" 2>&1
60     ${scriptsdir}/buildd-remove-keys
61     ${scriptsdir}/buildd-add-keys
62     ${scriptsdir}/buildd-prepare-dir
63
64     for keyring in $(dak admin k list-binary); do
65         dak import-keyring --generate-users "%s" ${keyring}
66     done
67     exec >>/dev/null 2>&1
68
69     DATE=$(date -Is)
70     cat "${BUILDDFUN}" | mail -a "X-Debian: DAK" -e -s "[$(hostname -s)] Buildd key changes ${DATE}" -a "From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>" buildd-keys@ftp-master.debian.org
71
72     rm -f "${BUILDDFUN}"
73 }