]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/dinstall.functions
Update configuration for wheezy release.
[dak.git] / config / debian / dinstall.functions
index faa063330c11bb5ce10a2f5ed6996a2bc4fadb01..135dabdd1b9518609b212d8adae34fbd40ee2cd7 100644 (file)
@@ -9,9 +9,14 @@ function remove_daily_lock() {
     rm -f $LOCK_DAILY
 }
 
+# Remove changelog lock
+function remove_changelog_lock() {
+    rm -f $LOCK_CHANGELOG
+}
+
 # Remove all locks
 function remove_all_locks() {
-    rm -f $LOCK_DAILY $LOCK_ACCEPTED $LOCK_NEW
+    rm -f $LOCK_DAILY $LOCK_ACCEPTED
 }
 
 # If we error out this one is called, *FOLLOWED* by cleanup above
@@ -240,7 +245,7 @@ function mkmaintainers() {
 function copyoverrides() {
     log 'Copying override files into public view ...'
 
-    for ofile in ${overridedir}/override.{squeeze,wheezy,sid}.{,extra.}{main,contrib,non-free}*; do
+    for ofile in ${overridedir}/override.{squeeze,wheezy,jessie,sid}.{,extra.}{main,contrib,non-free}*; do
         bname=${ofile##*/}
         gzip -9cv --rsyncable ${ofile} > ${indices}/${bname}.gz
         chmod g+w ${indices}/${bname}.gz
@@ -385,15 +390,15 @@ function mkfilesindices() {
 }
 
 function mkchecksums() {
-    local archiveroot
+    local archiveroot dsynclist md5list
 
     for archive in "${public_archives[@]}"; do
+        archiveroot="$(get_archiveroot "${archive}")"
         dsynclist=$dbdir/dsync.${archive}.list
-        md5list=$indices/md5sums
+        md5list=${archiveroot}/indices/md5sums
 
         log -n "Creating md5 / dsync index file for ${archive}... "
 
-        archiveroot="$(get_archiveroot "${archive}")"
         cd "$archiveroot"
         ${bindir}/dsync-flist -q generate $dsynclist --exclude $dsynclist --md5
         ${bindir}/dsync-flist -q md5sums $dsynclist | gzip -9n > ${md5list}.gz
@@ -404,7 +409,7 @@ function mkchecksums() {
 function mirror() {
     local archiveroot
 
-    log "Regenerating \"public\" mirror/ hardlink fun for ${archive}"
+    log "Regenerating \"public\" mirror/ hardlink fun"
     DATE_SERIAL=$(date +"%Y%m%d01")
     FILESOAPLUS1=$(awk '/serial/ { print $3+1 }' ${TRACEFILE} )
     if [ "$DATE_SERIAL" -gt "$FILESOAPLUS1" ]; then
@@ -614,12 +619,22 @@ EOF
 
 # extract changelogs and stuff
 function changelogs() {
-    log "Extracting changelogs"
-    dak make-changelog -e -a ftp-master
-    mkdir -p ${exportpublic}/changelogs
-    cd ${exportpublic}/changelogs
-    rsync -aHW --delete --delete-after --ignore-errors ${exportdir}/changelogs/. .
-    sudo -H -u archvsync /home/archvsync/runmirrors metaftpdo > ~dak/runmirrors-metadata.log 2>&1 &
+    if lockfile -r3 $LOCK_CHANGELOG; then
+        log "Extracting changelogs"
+        dak make-changelog -e -a ftp-master
+        [ -f ${exportdir}/changelogs/filelist.yaml ] && xz -f ${exportdir}/changelogs/filelist.yaml
+        mkdir -p ${exportpublic}/changelogs
+        cd ${exportpublic}/changelogs
+        rsync -aHW --delete --delete-after --ignore-errors ${exportdir}/changelogs/. .
+        sudo -H -u staticsync /usr/local/bin/static-update-component ftp-master.metadata.debian.org >/dev/null 2>&1 &
+
+        #dak make-changelog -e -a backports
+        #[ -f /srv/backports-master.debian.org/export/changelogs/filelist.yaml ] && xz -f /srv/backports-master.debian.org/export/changelogs/filelist.yaml
+        #mkdir -p /srv/backports-master.debian.org/rsync/export/changelogs
+        #cd /srv/backports-master.debian.org/rsync/export/changelogs
+        #rsync -aHW --delete --delete-after --ignore-errors /srv/backports-master.debian.org/export/changelogs/. .
+        trap remove_changelog_lock EXIT TERM HUP INT QUIT
+    fi
 }
 
 function gitpdiff() {