From: Aurelien Jarno Date: Tue, 8 Dec 2015 14:12:12 +0000 (+0100) Subject: cron.d/dsa-buildd: cleanup upload queues X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=9a5b2471b4d7d46e7671f6c8f7dfb99dd27eb5ae;p=mirror%2Fdsa-puppet.git cron.d/dsa-buildd: cleanup upload queues The security upload queue is not cleaned after packages are accepted as mails are not sent for security reasons. The standard upload queue is not also not always cleaned as packages can be rejected (new version, out-of date chroot with Built-Using, etc.) Automatically cleanup upload queues by removing files older than 60 days. After this time it's probably better to rebuild the package with an up-to-date chroot. Signed-off-by: Aurelien Jarno --- diff --git a/modules/buildd/files/cron.d-dsa-buildd b/modules/buildd/files/cron.d-dsa-buildd index 0ad3a6bb1..d165fdb7f 100644 --- a/modules/buildd/files/cron.d-dsa-buildd +++ b/modules/buildd/files/cron.d-dsa-buildd @@ -2,5 +2,11 @@ ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## + +# Restart the build daemons on reboot @reboot buildd [ -f ~buildd/NO-DAEMON-PLEASE ] && grep 'delete-on-boot' ~buildd/NO-DAEMON-PLEASE > /dev/null && rm -f ~buildd/NO-DAEMON-PLEASE && if [ -x ~buildd/.bootscript ]; then ~buildd/.bootscript; else buildd-watcher; fi @reboot buildd2 [ -f ~buildd2/NO-DAEMON-PLEASE ] && grep 'delete-on-boot' ~buildd2/NO-DAEMON-PLEASE > /dev/null && rm -f ~buildd2/NO-DAEMON-PLEASE && if [ -x ~buildd2/.bootscript ]; then ~buildd2/.bootscript; else buildd-watcher; fi + +# Clean old files in the upload queues after 60 days +@daily buildd [ -d ~buildd/upload ] && find ~buildd/upload -type f -mtime +60 -delete +@daily buildd [ -d ~buildd/upload-security ] && find ~buildd/upload-security -type f -mtime +60 -delete