X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.hourly;h=d2451b8a019b6a7854a584d46120c8dd84c00947;hb=95215adf6d9317e11be1118fb6144396c6dddf04;hp=80c912f854873ce59b3b413e9f814881f2726008;hpb=a1f7349b3992fad8be46e603d20fc0c734714138;p=dak.git diff --git a/config/debian/cron.hourly b/config/debian/cron.hourly index 80c912f8..d2451b8a 100755 --- a/config/debian/cron.hourly +++ b/config/debian/cron.hourly @@ -2,6 +2,10 @@ # # Executed hourly via cron, out of dak's crontab. +# Only one of me should ever run. +[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -E 0 -en "$0" "$0" +"$@" || : + set -e set -o pipefail set -u @@ -20,16 +24,23 @@ dak import-users-from-passwd # do not run show-new and other stuff in parallel LOCKFILE="$lockdir/unchecked.lock" +cleanup() { + rm -f "${LOCKFILE}" +} + if lockfile -r16 $LOCKFILE 2> /dev/null; then + trap cleanup EXIT do_new dak show-new > /dev/null || true - rm -f $LOCKFILE + cleanup + trap - EXIT fi dak queue-report -n > $webdir/new.html -dak queue-report -8 -d new,byhand,stable-new,oldstable-new -r $webdir/stat -dak show-deferred -r $webdir/stat > ${webdir}/deferred.html -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 +dak queue-report -n -d backports-new,backports-policy > ${webdir}/backports-new.html +dak queue-report -8 -d new,byhand,stable-new,oldstable-new,backports-new -r $webdir/stat +sudo -u dak-unpriv dak show-deferred -r $webdir/stat > ${webdir}/deferred.html +dak graph -n new,byhand,stable-new,oldstable-new,deferred -r $webdir/stat -i $webdir/stat -x $scriptsdir/rrd-release-freeze-dates cd $webdir cat removals-20*.txt > removals-full.txt @@ -40,12 +51,18 @@ cat removals.822 >> removals-full.822 $base/dak/tools/queue_rss.py -q $queuedir/new -o $webdir/rss/ -d $base/misc -l $base/log/ $base/dak/tools/removals.pl $configdir/removalsrss.rc > $webdir/rss/removals.rss +# cd $masterdir +# timeout -k 180 120 /usr/bin/epydoc -q --html --graph all --css blue -n DAK -o $webdir/epydoc --include-log --graph all --show-imports $masterdir/dak/ $masterdir/dakweb/ || true -# Tell ries to sync its tree -ssh -o Batchmode=yes -o ConnectTimeout=30 -o SetupTimeout=30 -2 -i ${base}/s3kr1t/pushddmirror dak@ries.debian.org sync +# Tell the public mirror to sync its tree +${scriptsdir}/sync-dd dd-sync dd-sync1 dd-sync2 sync -$scriptsdir/generate-di +$scriptsdir/generate-d-i +# Update backports ACL +sudo -u dak-unpriv cat /srv/backports-master.debian.org/etc/acl \ + | dak acl set-fingerprints backports \ + | mail -a "X-Debian: DAK" -e -s "backports: acl changes" -a "From: Debian FTP Masters " backports-team@debian.org # do the buildd key updates BUILDDFUN=$(mktemp -p "${TMPDIR}" BUILDDFUN.XXXXXX) @@ -60,6 +77,6 @@ done exec >>/dev/null 2>&1 DATE=$(date -Is) -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 +cat "${BUILDDFUN}" | mail -a "X-Debian: DAK" -e -s "[$(hostname -s)] Buildd key changes ${DATE}" -a "From: Debian FTP Masters " buildd-keys@ftp-master.debian.org rm -f "${BUILDDFUN}"