]> git.decadent.org.uk Git - dak.git/blob - config/debian/cron.hourly
Make permissions cascade properly
[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 -u
7
8 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
9 . $SCRIPTVARS
10
11 dak import-users-from-passwd
12 dak queue-report -n > $webdir/new.html
13 dak queue-report -8 -d new,byhand,proposedupdates,oldproposedupdates -r $webdir/stat
14 dak show-deferred -r $webdir/stat > ${webdir}/deferred.html
15 dak graph -n new,byhand,proposedupdates,oldproposedupdates,deferred -r $webdir/stat -i $webdir/stat -x $scriptsdir/rrd-release-freeze-dates
16
17 # do not run show-new and other stuff in parallel
18 LOCKFILE="$lockdir/unchecked.lock"
19 if lockfile -r16 $LOCKFILE 2> /dev/null; then
20     dak show-new > /dev/null || true
21     rm -f $LOCKFILE
22 fi
23
24 cd $webdir
25 cat removals-20*.txt > removals-full.txt
26 cat removals.txt >> removals-full.txt
27 cat removals-20*.822 > removals-full.822
28 cat removals.822 >> removals-full.822
29
30 $base/dak/tools/queue_rss.py -q $queuedir/new -o $webdir/rss/ -d $base/misc -l $base/log/
31 $base/dak/tools/removals.pl $configdir/removalsrss.rc > $webdir/rss/removals.rss
32
33
34 # Tell ries to sync its tree
35 ssh -o Batchmode=yes -o ConnectTimeout=30 -o SetupTimeout=30 -2 -i ${base}/s3kr1t/pushddmirror dak@ries.debian.org sync
36
37 $scriptsdir/generate-di
38
39
40 # do the buildd key updates
41 BUILDDFUN=$(mktemp -p "${TMPDIR}" BUILDDFUN.XXXXXX)
42 exec >> "${BUILDDFUN}" 2>&1
43 ${scriptsdir}/buildd-remove-keys
44 ${scriptsdir}/buildd-add-keys
45 ${scriptsdir}/buildd-prepare-dir
46
47 for keyring in $(dak admin k list-binary); do
48     dak import-keyring --generate-users "%s" ${keyring}
49 done
50 exec >>/dev/null 2>&1
51
52 DATE=$(date -Is)
53 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
54
55 rm -f "${BUILDDFUN}"