X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.unchecked;h=d41d573d6377d4b8c1fc04ebdc678956facf530a;hb=1e1457bde3318c6605b4c97d4299803fdaf8e774;hp=406636ef65b0e0504e0c92bfdcae143c4420208c;hpb=9247d27a07634e8bb8ed47ed5d5da7bcef279fcc;p=dak.git diff --git a/config/debian/cron.unchecked b/config/debian/cron.unchecked index 406636ef..d41d573d 100755 --- a/config/debian/cron.unchecked +++ b/config/debian/cron.unchecked @@ -5,6 +5,9 @@ set -u export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars . $SCRIPTVARS +# common functions are "outsourced" +. "${configdir}/common" + LOCKDAILY="" LOCKFILE="$lockdir/unchecked.lock" NOTICE="$lockdir/daily.lock" @@ -31,11 +34,18 @@ if lockfile -r3 $LOCKFILE; then if [ ! -z "$changes" ]; then echo "$timestamp": "$changes" >> $report - dak process-unchecked -a $changes >> $report + dak process-unchecked -a -d "$unchecked" >> $report echo "--" >> $report # sync with debbugs - rsync -aq --remove-source-files $queuedir/bts_version_track/ bugs-sync:/org/bugs.debian.org/versions/queue/ftp-master/ + 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 + + NOW=$(date +%s) + TSTAMP=$(stat -c %Y $lockdir/synced_bts_version) + DIFF=$(( NOW - TSTAMP )) + if [ $DIFF -ge 259200 ]; then + echo "Kids, you tried your best and you failed miserably. The lesson is, never try. (Homer Simpson)" + fi if lockfile -r3 $NOTICE; then LOCKDAILY="YES" @@ -49,20 +59,7 @@ if lockfile -r3 $LOCKFILE; then cat override.sid.$i.src >> override.sid.all3.src fi done - cd $configdir - apt-ftparchive -qq -o APT::FTPArchive::Contents=off generate apt.conf.buildd - - cd ${incoming} - rm -f buildd/Release* - apt-ftparchive -qq -o APT::FTPArchive::Release::Origin="Debian" -o APT::FTPArchive::Release::Label="Debian" -o APT::FTPArchive::Release::Description="buildd incoming" -o APT::FTPArchive::Release::Architectures="${archs}" release buildd > Release - gpg --secret-keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/secring.gpg --keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/pubring.gpg --no-options --batch --no-tty --armour --default-key 6070D3A1 --detach-sign -o Release.gpg Release - mv Release* buildd/. - - cd ${incoming} - mkdir -p tree/${STAMP} - cp -al ${incoming}/buildd/. tree/${STAMP}/ - ln -sfT tree/${STAMP} ${incoming}/builddweb - find ./tree -mindepth 1 -maxdepth 1 -not -name "${STAMP}" -type d -print0 | xargs --no-run-if-empty -0 rm -rf + make_buildd_dir . $configdir/cron.buildd fi