cron.daily 1.6 KB
Newer Older
J
Joerg Jaspert 已提交
1
#! /bin/bash
2
#
3
# Run daily via cron, out of dak's crontab.
4 5

set -e
6
set -o pipefail
7 8 9 10
set -u
export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
. $SCRIPTVARS

J
Joerg Jaspert 已提交
11 12 13
# common functions are "outsourced"
. "${configdir}/common"

14 15
################################################################################

16 17 18 19 20 21 22 23
TMPFILE=$( mktemp -p ${TMPDIR} )

function cleanup {
    ERRVAL=$?
    rm -f ${TMPFILE}
    exit ${ERRVAL}
}
trap cleanup SIGHUP SIGINT SIGPIPE SIGTERM EXIT ERR
24

25 26 27 28 29
# log to dinstall's logfile instead of sending email
PROGRAM="cron.daily"
LOGFILE="$logdir/dinstall.log"
exec >> "$LOGFILE" 2>&1

30
# get the latest list of wnpp bugs and their source packages
31
wget -q -O${TMPFILE} http://qa.debian.org/data/bts/wnpp_rm
32
chmod go+r ${TMPFILE}
33
mv ${TMPFILE} /srv/ftp-master.debian.org/scripts/masterfiles/wnpp_rm
34

J
Joerg Jaspert 已提交
35 36 37 38
# Update wanna-build dump
echo "Update wanna-build database dump"
$base/dak/scripts/nfu/get-w-b-db

J
Joerg Jaspert 已提交
39 40
reports

41 42
clean_debbugs

43
# Generate list of override disparities
L
Luca Falavigna 已提交
44
dak override-disparity | gzip -9 > ${webdir}/override-disparity.gz
45

L
Luca Falavigna 已提交
46 47 48
# Generate stats about the new queue
dak stats new ${webdir}/NEW-stats.yaml 2> /dev/null

J
Joerg Jaspert 已提交
49
# Generate the contributor data
50 51 52 53
# FIXME: In a day or three, when this worked from cron without
# failure, redirect its output to dev/null. Alternatively until then
# enrico added a --quiet and we use that.
dc-tool --mine="${configdir}/contributor.source" --auth-token @"${base}/s3kr1t/contributor.auth" --source ftp.debian.org --post
J
Joerg Jaspert 已提交
54

55 56
${scriptsdir}/link_morgue.sh

57
################################################################################