From: Ansgar Burchardt Date: Sat, 12 Jan 2013 11:40:03 +0000 (+0100) Subject: First set of dinstall changes for backports merge X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5390eff0ba7a732269f040b0a4c4a3b9a0db2733;p=dak First set of dinstall changes for backports merge Still missing is everything that makes the backports archive public, e.g. the mirror push itself. --- diff --git a/config/debian/common b/config/debian/common index bb799fc1..7dcd339b 100644 --- a/config/debian/common +++ b/config/debian/common @@ -138,7 +138,10 @@ function do_new () { log "Doing NEW processing" fi (dak process-policy new; dak process-policy byhand) | mail -a "X-Debian: DAK" -e -s "NEW and BYHAND processing" ftpmaster@ftp-master.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org - dak clean-suites -a new + + dak process-policy backports-new | mail -a "X-Debian: DAK" -e -s "NEW processing for backports-new" team@backports.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org + + dak clean-suites -a new,backports-new } function sync_debbugs () { @@ -180,3 +183,14 @@ function pg_timestamp() { log "Saving postgres transaction id for ${tsname}" psql -tAc 'select txid_current();' > $base/backup/txid_${tsname}_$(date +%Y.%m.%d-%H:%M:%S) } + +function get_archiveroot() { + local archivename="$1" + local query="SELECT path FROM archive WHERE name='${archivename}'" + local archiveroot="$(psql -tAc "${query}")" + if [ -z "${archiveroot}" ]; then + echo "get_archiveroot: couldn't get archiveroot for '${archivename}'" >&2 + return 1 + fi + echo "${archiveroot}" +} diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 4836f538..ee1b58e2 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -146,14 +146,21 @@ function overrides() { } function mpfm() { + local archiveroot + log "Generating package / file mapping" - dak make-pkg-file-mapping ftp-master | bzip2 -9 > $base/ftp/indices/package-file.map.bz2 + for archive in "${public_archives[@]}"; do + archiveroot="$(get_archiveroot "${archive}")" + dak make-pkg-file-mapping "${archive}" | bzip2 -9 > "${archiveroot}/indices/package-file.map.bz2" + done } function packages() { log "Generating Packages and Sources files" - dak generate-packages-sources2 -a ftp-master - dak contents generate -a ftp-master + for archive in "${public_archives[@]}"; do + dak generate-packages-sources2 -a "${archive}" + dak contents generate -a "${archive}" + done } function pdiff() { @@ -170,8 +177,11 @@ function release() { $scriptsdir/generate-i18n-Index $dist; done ) + log "Generating Release files" - dak generate-releases -a ftp-master + for archive in "${public_archives[@]}"; do + dak generate-releases -a "${archive}" + done } function dakcleanup() { @@ -188,28 +198,38 @@ function buildd_dir() { } function mklslar() { - cd $ftpdir + local archiveroot + local FILENAME=ls-lR - FILENAME=ls-lR + for archive in "${public_archives[@]}"; do + archiveroot="$(get_archiveroot "${archive}")" + cd "${archiveroot}" - log "Removing any core files ..." - find -type f -name core -print -delete + log "Removing any core files ..." + find -type f -name core -print -delete - log "Checking symlinks ..." - symlinks -rd . + log "Checking symlinks ..." + symlinks -rd . - log "Creating recursive directory listing ... " - rm -f ${FILENAME}.gz - TZ=UTC ls -lR | gzip -9c --rsyncable > ${FILENAME}.gz + log "Creating recursive directory listing ... " + rm -f ${FILENAME}.gz + TZ=UTC ls -lR | gzip -9c --rsyncable > ${FILENAME}.gz + done } function mkmaintainers() { + local archiveroot + log 'Creating Maintainers index ... ' - cd $indices - dak make-maintainers -a ftp-master ${scriptdir}/masterfiles/pseudo-packages.maintainers - gzip -9v --rsyncable Maintainers.gz - gzip -9v --rsyncable Uploaders.gz + for archive in "${public_archives[@]}"; do + archiveroot="$(get_archiveroot "${archive}")" + cd "${archiveroot}/indices" + + dak make-maintainers -a "${archive}" ${scriptdir}/masterfiles/pseudo-packages.maintainers + gzip -9v --rsyncable Maintainers.gz + gzip -9v --rsyncable Uploaders.gz + done } function copyoverrides() { diff --git a/config/debian/vars b/config/debian/vars index cea5344f..03a86a78 100644 --- a/config/debian/vars +++ b/config/debian/vars @@ -30,6 +30,8 @@ exportpublic=$public/rsync/export/ ftpgroup=debadmin +public_archives=(ftp-master backports) + TMPDIR=${base}/tmp PATH=$masterdir:$PATH