# Executed daily via cron, out of dak's crontab.
set -e
-export SCRIPTVARS=/org/ftp.debian.org/dak/config/debian/vars
+export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars
. $SCRIPTVARS
################################################################################
################################################################################
echo "Creating pre-daily-cron-job backup of projectb database..."
-pg_dump projectb > /org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
+pg_dump projectb > $base/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
################################################################################
TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
-update-bugdoctxt
-update-mirrorlists
-update-mailingliststxt
+cd $configdir
+$scriptsdir/update-bugdoctxt
+$scriptsdir/update-mirrorlists
+$scriptsdir/update-mailingliststxt
################################################################################
lockfile $LOCKAC
cd $accepted
rm -f REPORT
-dak process-unchecked -pa *.changes | tee REPORT | \
+dak process-accepted -pa *.changes | tee REPORT | \
mail -s "Install for $(date +%D)" ftpmaster@ftp-master.debian.org
chgrp debadmin REPORT
chmod 664 REPORT
TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
-cd $masterdir
dak check-overrides
rm -f $LOCKAC
TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
-cd $masterdir
dak make-suite-file-list
TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
# Generate Packages and Sources files
-cd $masterdir
+cd $configdir
apt-ftparchive generate apt.conf
# Generate *.diff/ incremental updates
dak generate-index-diffs
TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
-mkmaintainers
-copyoverrides
-mklslar
-mkfilesindices
-mkchecksums
+cd $scriptsdir
+./mkmaintainers
+./copyoverrides
+./mklslar
+./mkfilesindices
+./mkchecksums
#
# Fetch bugs information before unchecked processing is allowed again.
-/org/ftp.debian.org/testing/britney bugs
+$base/testing/britney allowdaklock bugs || true
rm -f $NOTICE
ssh buildd@buildd /org/wanna-build/trigger.daily
################################################################################
echo "Creating post-daily-cron-job backup of projectb database..."
-POSTDUMP=/org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
+POSTDUMP=$base/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
pg_dump projectb > $POSTDUMP
-(cd /org/ftp.debian.org/backup; ln -sf $POSTDUMP current)
+(cd $base/backup; ln -sf $POSTDUMP current)
################################################################################
ulimit -m 90000 -d 90000 -s 10000 -v 90000
-run-parts --report /org/ftp.debian.org/scripts/distmnt
+run-parts --report $base/scripts/distmnt
echo Daily cron scripts successful.
TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
# Stats pr0n
-cd $masterdir
-update-ftpstats $base/log/* > $base/misc/ftpstats.data
+cd $configdir
+$scriptsdir/update-ftpstats $base/log/* > $base/misc/ftpstats.data
R --slave --vanilla < $base/misc/ftpstats.R
TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)