X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fhourly.functions;h=ccedc5bc4ffc926e66f041fce019d108000098ba;hb=1271e98ab531ba104007fb8b96931d95d61061ab;hp=5ba908537f307f9fab9d9e37ebb671c0c26db8e2;hpb=813801add25896afc4bd9839f5d1fe0c05eea465;p=dak.git diff --git a/config/debian/hourly.functions b/config/debian/hourly.functions index 5ba90853..ccedc5bc 100644 --- a/config/debian/hourly.functions +++ b/config/debian/hourly.functions @@ -6,7 +6,7 @@ function importusers() { function newoverview() { # do not run show-new and other stuff in parallel - if lockfile -r16 $LOCK_UNCHECKED 2> /dev/null; then + if lockfile -r16 ${LOCK_UNCHECKED} 2> /dev/null; then TMPFILES="${TMPFILES} ${LOCK_UNCHECKED}" do_new log "Output html for packages in NEW" @@ -15,15 +15,25 @@ function newoverview() { fi } +function do_report() { + local target=${1:-"${webdir}/new.html"} + local opts=${2:-"-n"} + local TMPOUT=$( mktemp -p "${TMPDIR}" reportout.XXXXXX ) + TMPFILES="${TMPFILES} ${TMPOUT}" + dak queue-report ${opts} > ${TMPOUT} + chmod 644 ${TMPOUT} + mv -f ${TMPOUT} ${target} +} + function queuereport() { log "Creating queue reports, new/backports-new, 822 format" - dak queue-report -n > ${webdir}/new.html - 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 + do_report + do_report ${webdir}/backports-new.html "-n -d backports-new,backports-policy" + dak queue-report -8 -d new,byhand,stable-new,oldstable-new,backports-new -r ${webdir}/stat log "Deferred queue overview" sudo -u dak-unpriv dak show-deferred -r ${webdir}/stat > ${webdir}/deferred.html log "Graphs about the queues" - dak graph -n new,byhand,stable-new,oldstable-new,deferred,backports-new -r ${webdir}/stat -i ${webdir}/stat -x $scriptsdir/rrd-release-freeze-dates + dak graph -n new,byhand,stable-new,oldstable-new,deferred,backports-new -r ${webdir}/stat -i ${webdir}/stat -x ${scriptsdir}/rrd-release-freeze-dates } function removalstxt() { @@ -36,13 +46,13 @@ function removalstxt() { function rss() { log "NEW RSS feed" - $base/dak/tools/queue_rss.py -q $queuedir/new -o ${webdir}/rss/ -d $base/misc -l $base/log/ + ${base}/dak/tools/queue_rss.py -q ${queuedir}/new -o ${webdir}/rss/ -d ${base}/misc -l ${base}/log/ log "Removals RSS feed" - $base/dak/tools/removals.pl $configdir/removalsrss.rc > ${webdir}/rss/removals.rss + ${base}/dak/tools/removals.pl ${configdir}/removalsrss.rc > ${webdir}/rss/removals.rss } function gen_di() { - $scriptsdir/generate-d-i + ${scriptsdir}/generate-d-i } function backportsacl() { @@ -54,8 +64,7 @@ function backportsacl() { # do the buildd key updates function builddautosigning() { - BUILDDFUN=$(mktemp -p "${TMPDIR}" BUILDDFUN.XXXXXX) - TMPFILES="${TMPFILES} ${BUILDDFUN}" + BUILDDFUN=$( gettempfile ) exec >> "${BUILDDFUN}" 2>&1 ${scriptsdir}/buildd-remove-keys ${scriptsdir}/buildd-add-keys @@ -67,7 +76,7 @@ function builddautosigning() { exec >>/dev/null 2>&1 DATE=$(date -Is) - cat "${BUILDDFUN}" | mail -a "X-Debian: DAK" -e -s "[${HOSTNAME}] Buildd key changes ${DATE}" -a "From: Debian FTP Masters " buildd-keys@ftp-master.debian.org + mail -a "X-Debian: DAK" -e -s "[${HOSTNAME}] Buildd key changes ${DATE}" -a "From: Debian FTP Masters " buildd-keys@ftp-master.debian.org < "${BUILDDFUN}" rm -f "${BUILDDFUN}" }