3 # Run once a week via cron, out of dak's crontab.
7 export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars
11 NOW=`date "+%Y.%m.%d-%H:%M:%S"`
12 LOGFILE="$logdir/weekly_${NOW}.log"
13 exec > "$LOGFILE" 2>&1
21 ################################################################################
23 # Purge empty directories
24 echo "Purging empty directories in $ftpdir/pool/"
26 if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then
27 find $ftpdir/pool/ -type d -empty | xargs rmdir;
31 echo "Splitting queue/done"
32 dak split-done > /dev/null
35 echo "VACUUM; VACUUM ANALYZE;" | psql --no-psqlrc projectb 2>&1 | grep -v "^NOTICE: Skipping.*only table owner can VACUUM it$"
37 # Do git cleanup stuff
38 echo "Doing git stuff"
39 cd /org/ftp.debian.org/git/dak.git
41 git update-server-info
42 # now workaround a git bug not honoring the setup in logs/*
43 # (fix in development, but until it reached backports.org.......)
46 # Clean up apt-ftparchive's databases
48 echo "Cleanup apt-ftparchive's database"
49 apt-ftparchive -q clean apt.conf
50 apt-ftparchive -q clean apt.conf.buildd
52 # Update wanna-build dump
53 echo "Update wanna-build database dump"
54 /org/ftp.debian.org/scripts/nfu/get-w-b-db
56 echo "Finally, all is done, compressing logfile"
62 ################################################################################