]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/cron.dinstall
Merge branch 'master' of ssh://ftp-master.debian.org/srv/ftp.debian.org/git/dak
[dak.git] / config / debian / cron.dinstall
index 2e84dae1c8db74f7b50e3d1f2cbf9a84b44488a8..1ecbca743de92036ab5502f79d3f2600711af697 100755 (executable)
@@ -235,6 +235,13 @@ function buildd() {
     apt-ftparchive generate apt.conf.buildd
 }
 
+function buildd_dir() {
+    # Rebuilt the buildd dir to avoid long times of 403
+    log "Regenerating the buildd incoming dir"
+    STAMP=$(date "+%Y%m%d%H%M")
+    make_buildd_dir
+}
+
 function scripts() {
     log "Running various scripts from $scriptsdir"
     cd $scriptsdir
@@ -262,6 +269,12 @@ function expire() {
     $scriptsdir/expire_dumps -d . -p -f "dump_*"
 }
 
+function transitionsclean() {
+    log "Removing out of date transitions..."
+    cd $base
+    dak transitions -c -a
+}
+
 function reports() {
     # Send a report on NEW/BYHAND packages
     log "Nagging ftpteam about NEW/BYHAND packages"
@@ -285,8 +298,10 @@ function bts() {
 
 function merkel2() {
     # Push dak@merkel so it syncs the projectb there. Returns immediately, the sync runs detached
-    log "Trigger merkels projectb sync"
+    log "Trigger merkel/flotows projectb sync"
     ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_merkel_projectb dak@merkel.debian.org sleep 1
+    # Also trigger flotow, the ftpmaster test box
+    ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_flotow_projectb dak@flotow.debconf.org sleep 1
 }
 
 function merkel3() {
@@ -324,6 +339,8 @@ function stats() {
     cd $configdir
     $scriptsdir/update-ftpstats $base/log/* > $base/misc/ftpstats.data
     R --slave --vanilla < $base/misc/ftpstats.R
+    dak stats arch-space > $webdir/arch-space
+    dak stats pkg-nums > $webdir/pkg-nums
 }
 
 function aptftpcleanup() {
@@ -337,12 +354,12 @@ function compress() {
     cd $base/backup/
     find -maxdepth 1 -mindepth 1 -type f -name 'dump_pre_*' -mtime +2 -print0 | xargs -0 --no-run-if-empty rm
 
-    find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mmin 720 |
+    find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mmin +720 |
     while read dumpname; do
         echo "Compressing $dumpname"
         bzip2 -9v "$dumpname"
     done
-    find -maxdepth 1 -mindepth 1 -type f -name "dumpall_*" \! -name '*.bz2' \! -name '*.gz' -mmin 720 |
+    find -maxdepth 1 -mindepth 1 -type f -name "dumpall_*" \! -name '*.bz2' \! -name '*.gz' -mmin +720 |
     while read dumpname; do
         echo "Compressing $dumpname"
         bzip2 -9v "$dumpname"
@@ -383,6 +400,16 @@ function renamelogfile() {
 function testingsourcelist() {
     dak ls -s testing -f heidi -r .| egrep 'source$' > ${webdir}/testing.list
 }
+
+# do a last run of process-unchecked before dinstall is on.
+function process_unchecked() {
+    log "Processing the unchecked queue"
+    acceptnew
+    UNCHECKED_WITHOUT_LOCK="-p"
+    do_unchecked
+    sync_debbugs
+}
+
 ########################################################################
 ########################################################################
 
@@ -493,9 +520,12 @@ NOTICE="$ftpdir/Archive_Maintenance_In_Progress"
 # lock cron.unchecked (it immediately exits when this exists)
 LOCK_DAILY="$lockdir/daily.lock"
 
-# Lock process-new and cron.unchecked from doing work
+# Lock cron.unchecked from doing work
 LOCK_ACCEPTED="$lockdir/unchecked.lock"
 
+# Lock process-new from doing work
+LOCK_NEW="$lockdir/processnew.lock"
+
 # This file is simply used to indicate to britney whether or not
 # the Packages file updates completed sucessfully.  It's not a lock
 # from our point of view
@@ -576,6 +606,16 @@ GO=(
 stage $GO
 
 lockfile "$LOCK_ACCEPTED"
+lockfile "$LOCK_NEW"
+
+GO=(
+    FUNC="process_unchecked"
+    TIME=""
+    ARGS=""
+    ERR=""
+)
+stage $GO
+
 
 GO=(
     FUNC="accepted"
@@ -585,6 +625,14 @@ GO=(
 )
 stage $GO
 
+GO=(
+    FUNC="buildd_dir"
+    TIME="buildd_dir"
+    ARGS=""
+    ERR="false"
+)
+stage $GO
+
 GO=(
     FUNC="cruft"
     TIME="cruft"
@@ -594,6 +642,7 @@ GO=(
 stage $GO
 
 rm -f "$LOCK_ACCEPTED"
+rm -f "$LOCK_NEW"
 
 GO=(
     FUNC="msfl"
@@ -712,6 +761,14 @@ GO=(
 )
 stage $GO
 
+GO=(
+    FUNC="transitionsclean"
+    TIME="transitionsclean"
+    ARGS=""
+    ERR=""
+)
+stage $GO
+
 GO=(
     FUNC="reports"
     TIME="reports"
@@ -790,7 +847,7 @@ GO=(
     FUNC="aptftpcleanup"
     TIME="apt-ftparchive cleanup"
     ARGS=""
-    ERR=""
+    ERR="false"
 )
 stage $GO