X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fmonthly.functions;h=c930f62a5810c2bc7ba1ad8ffdf78d52f421fee7;hb=a915dd4a125c321cce1842de85dcf16102b70f09;hp=0241a96df13bd4f3c2315180e32c0e66404afa28;hpb=32063f01897651692754f8a2a0f189fa7c1f3c64;p=dak.git diff --git a/config/debian/monthly.functions b/config/debian/monthly.functions index 0241a96d..c930f62a 100644 --- a/config/debian/monthly.functions +++ b/config/debian/monthly.functions @@ -16,4 +16,24 @@ function rotatequeued() { sudo -u dak-unpriv touch run/log xz -9 log.${OLDDATE} sudo -u dak-unpriv /srv/upload.debian.org/queued/debianqueued 2>/dev/null -} \ No newline at end of file +} + +function archivequeuedone() { + log "Archiving queue/done files of ${DONEYEAR}-${DONEMONTH}" + cd ${queuedir}/done/${DONEYEAR} + tar --create --xz --remove-files --file ${DONEMONTH}.tar.xz ${DONEMONTH} +} + +function rotatereports() { + # Do not rotate while it might receive data + if lockfile -r -1 ${LOCK_UNCHECKED} 2> /dev/null; then + TMPFILES="${TMPFILES} ${LOCK_UNCHECKED}" + for dir in ${queuedir}/{.,p-u-new,o-p-u-new} /srv/backports-master.debian.org/queue/policy; do + cd ${dir} + mv REPORT REPORT.${OLDDATE} + xz -9 REPORT.${OLDDATE} + touch REPORT + done + fi + rm ${LOCK_UNCHECKED} +}