5 export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars
8 # common functions are "outsourced"
9 . "${configdir}/common"
12 LOCKFILE="$lockdir/unchecked.lock"
13 NOTICE="$lockdir/daily.lock"
15 if [ -e $NOTICE ]; then exit 0; fi
17 STAMP=$(date "+%Y%m%d%H%M")
21 if [ ! -z "$LOCKDAILY" ]; then
26 # in case there is anything NEW processed, move it over into the accepted queue
28 for file in $(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs); do
29 sed '1,/Files:/d' "${file}" | sed '/BEGIN PGP SIGNATURE/,$d' \
30 | while read notused1 notused2 notused3 notused4 NAME; do
31 if [ -z "${NAME}" ]; then
32 # Sometimes there is a newline after the Files:, ignore it
35 if [ -f "${NAME}" ]; then
36 mv --target-directory="${accepted}" "${NAME}"
38 log_error "Error, couldn't find file ${NAME} to move to ${accepted}"
42 mv --target-directory="${accepted}" "${file}" "${file%%.changes}.dak"
45 # only run one cron.unchecked
46 if lockfile -r3 $LOCKFILE; then
50 changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
51 report=$queuedir/REPORT
52 timestamp=$(date "+%Y-%m-%d %H:%M")
54 if [ ! -z "$changes" ]; then
55 echo "$timestamp": "$changes" >> $report
56 dak process-unchecked -a -d "$unchecked" >> $report
60 rsync -aq -e "ssh -o Batchmode=yes -o ConnectTimeout=30 -o SetupTimeout=30" --remove-source-files $queuedir/bts_version_track/ bugs-sync:/org/bugs.debian.org/versions/queue/ftp-master/ 2>/dev/null && touch $lockdir/synced_bts_version || true
63 TSTAMP=$(stat -c %Y $lockdir/synced_bts_version)
64 DIFF=$(( NOW - TSTAMP ))
65 if [ $DIFF -ge 259200 ]; then
66 echo "Kids, you tried your best and you failed miserably. The lesson is, never try. (Homer Simpson)"
69 if lockfile -r3 $NOTICE; then
71 psql projectb -A -t -q -c "SELECT filename FROM queue_build WHERE queue = 0 AND suite = 5 AND in_queue = true AND filename ~ 'd(sc|eb)$'" > $dbdir/dists/unstable_accepted.list
73 dak make-overrides &>/dev/null
74 rm -f override.sid.all3 override.sid.all3.src
75 for i in main contrib non-free main.debian-installer; do
76 cat override.sid.$i >> override.sid.all3
77 if [ "$i" != "main.debian-installer" ]; then
78 cat override.sid.$i.src >> override.sid.all3.src
83 . $configdir/cron.buildd
86 echo "$timestamp": Nothing to do >> $report