]> git.decadent.org.uk Git - dak.git/commitdiff
Merge commit 'origin/master'
authorMark Hymers <mhy@debian.org>
Wed, 8 Apr 2009 20:24:13 +0000 (21:24 +0100)
committerMark Hymers <mhy@debian.org>
Wed, 8 Apr 2009 20:24:13 +0000 (21:24 +0100)
config/debian/common
config/debian/cron.dinstall
config/debian/cron.unchecked
dak/cruft_report.py
scripts/debian/expire_dumps

index ad10ea6ce08f83221960ea97f66470cefc166a63..3655d9d2a20591547b0b4086d8c380097d480eaa 100644 (file)
@@ -24,3 +24,21 @@ function debug () {
         log "$*"
     fi
 }
+
+# used by cron.dinstall *and* cron.unchecked.
+function make_buildd_dir () {
+       cd $configdir
+       apt-ftparchive -qq -o APT::FTPArchive::Contents=off generate apt.conf.buildd
+
+       cd  ${incoming}
+       rm -f buildd/Release*
+       apt-ftparchive -qq -o APT::FTPArchive::Release::Origin="Debian" -o APT::FTPArchive::Release::Label="Debian" -o APT::FTPArchive::Release::Description="buildd incoming" -o APT::FTPArchive::Release::Architectures="${archs}" release buildd > Release
+       gpg --secret-keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/secring.gpg --keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/pubring.gpg --no-options --batch --no-tty --armour --default-key 6070D3A1 --detach-sign -o Release.gpg Release
+       mv Release* buildd/.
+
+       cd ${incoming}
+       mkdir -p tree/${STAMP}
+       cp -al ${incoming}/buildd/. tree/${STAMP}/
+       ln -sfT tree/${STAMP} ${incoming}/builddweb
+       find ./tree -mindepth 1 -maxdepth 1 -not -name "${STAMP}" -type d -print0 | xargs --no-run-if-empty -0 rm -rf
+}
index 9c9840d7c45e27213cedf62a65d7e44e443fdb0d..c730a116c28120978e8bc040f79ec574150de43b 100755 (executable)
@@ -74,7 +74,7 @@ function merkel1() {
 # Create the postgres dump files
 function pgdump_pre() {
     log "Creating pre-daily-cron-job backup of projectb database..."
-    pg_dump projectb > $base/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
+    pg_dump projectb > $base/backup/dump_pre_$(date +%Y.%m.%d-%H:%M:%S)
 }
 
 function pgdump_post() {
@@ -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
@@ -289,6 +296,12 @@ function merkel2() {
     ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_merkel_projectb dak@merkel.debian.org sleep 1
 }
 
+function merkel3() {
+    # Push dak@merkel to tell it to sync the dd accessible parts. Returns immediately, the sync runs detached
+    log "Trigger merkels dd accessible parts sync"
+    ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_merkel_ddaccess dak@merkel.debian.org sleep 1
+}
+
 function runparts() {
     log "Using run-parts to run scripts in $base/scripts/distmnt"
     run-parts --report $base/scripts/distmnt
@@ -318,6 +331,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() {
@@ -329,11 +344,19 @@ function aptftpcleanup() {
 function compress() {
     log "Compress old psql backups"
     cd $base/backup/
-    find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mtime +1 |
+    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 |
     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 |
+    while read dumpname; do
+        echo "Compressing $dumpname"
+        bzip2 -9v "$dumpname"
+    done
+    finddup -l -d $base/backup
 }
 
 function logstats() {
@@ -571,6 +594,14 @@ GO=(
 )
 stage $GO
 
+GO=(
+    FUNC="buildd_dir"
+    TIME="buildd_dir"
+    ARGS=""
+    ERR="false"
+)
+stage $GO
+
 GO=(
     FUNC="cruft"
     TIME="cruft"
@@ -780,6 +811,14 @@ GO=(
 )
 stage $GO
 
+GO=(
+    FUNC="merkel3"
+    TIME="merkel ddaccessible sync"
+    ARGS=""
+    ERR="false"
+)
+stage $GO
+
 GO=(
     FUNC="compress"
     TIME="compress"
index 5e7a035dcfeeafb0592bab7bbddd6e6b9e1dc645..d41d573d6377d4b8c1fc04ebdc678956facf530a 100755 (executable)
@@ -5,6 +5,9 @@ set -u
 export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars
 . $SCRIPTVARS
 
+# common functions are "outsourced"
+. "${configdir}/common"
+
 LOCKDAILY=""
 LOCKFILE="$lockdir/unchecked.lock"
 NOTICE="$lockdir/daily.lock"
@@ -56,20 +59,7 @@ if lockfile -r3 $LOCKFILE; then
                    cat override.sid.$i.src >> override.sid.all3.src
                fi
            done
-           cd $configdir
-           apt-ftparchive -qq -o APT::FTPArchive::Contents=off generate apt.conf.buildd
-
-           cd  ${incoming}
-           rm -f buildd/Release*
-           apt-ftparchive -qq -o APT::FTPArchive::Release::Origin="Debian" -o APT::FTPArchive::Release::Label="Debian" -o APT::FTPArchive::Release::Description="buildd incoming" -o APT::FTPArchive::Release::Architectures="${archs}" release buildd > Release
-           gpg --secret-keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/secring.gpg --keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/pubring.gpg --no-options --batch --no-tty --armour --default-key 6070D3A1 --detach-sign -o Release.gpg Release 
-               mv Release* buildd/.
-
-           cd ${incoming}
-           mkdir -p tree/${STAMP}
-           cp -al ${incoming}/buildd/. tree/${STAMP}/
-           ln -sfT tree/${STAMP} ${incoming}/builddweb
-           find ./tree -mindepth 1 -maxdepth 1 -not -name "${STAMP}" -type d -print0 | xargs --no-run-if-empty -0 rm -rf
+        make_buildd_dir
 
            . $configdir/cron.buildd
        fi
index 3c3d73cb8c5dbb58038f807b7d19f84d823fa574..4c6d323e82c1d380e3e1f8c8c4f537c499491d5d 100755 (executable)
@@ -168,7 +168,7 @@ def parse_nfu(architecture):
 
         f.close()
     else:
-        utils.warn("No wanna-build dump file for architecture %s", architecture)
+        utils.warn("No wanna-build dump file for architecture %s" % architecture)
     return ret
 
 ################################################################################
@@ -428,6 +428,8 @@ def main ():
     for component in check_components:
         architectures = filter(utils.real_arch, database.get_suite_architectures(suite))
         for architecture in architectures:
+           if component == 'main/debian-installer' and re.match("kfreebsd", architecture):
+               continue
             filename = "%s/dists/%s/%s/binary-%s/Packages.gz" % (Cnf["Dir::Root"], suite, component, architecture)
             # apt_pkg.ParseTagFile needs a real file handle
             (fd, temp_filename) = utils.temp_filename()
index 9fa6adebae808d6206db6e2fc82fd5e91dc62903..2907ba28c55737bbc82eff789bac5c5978862ae6 100755 (executable)
@@ -40,6 +40,7 @@ RULES = [
     # keep 14 days, all each day
     # keep 31 days, 1 each 7th day
     # keep 365 days, 1 each 31th day
+    # keep 3650 days, 1 each 365th day
 ]
 
 TODAY = datetime.today()