From: Torsten Werner Date: Fri, 18 Feb 2011 17:23:01 +0000 (+0100) Subject: Merge branch 'master' into dbtests X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=commitdiff_plain;h=a8c91601641c5ae0fee611869c2cd742195a1d9f;hp=15193f20eeebbd19c75f0d124f1a7b2a582a179b Merge branch 'master' into dbtests --- diff --git a/config/backports/cron.dinstall b/config/backports/cron.dinstall index 634ef1d9..5b035279 100755 --- a/config/backports/cron.dinstall +++ b/config/backports/cron.dinstall @@ -355,6 +355,14 @@ rm -f "${LOCK_DAILY}" ts "locked part finished" state "postlock" +GO=( + FUNC="changelogs" + TIME="changelogs" + ARGS="" + ERR="false" +) +stage $GO & + GO=( FUNC="pgdump_post" TIME="pg_dump2" diff --git a/config/backports/dak.conf b/config/backports/dak.conf index 8bde6239..c79533d6 100644 --- a/config/backports/dak.conf +++ b/config/backports/dak.conf @@ -211,6 +211,7 @@ Dir { Root "/srv/backports-master.debian.org/ftp/"; Pool "/srv/backports-master.debian.org/ftp/pool/"; + Export "/srv/backports-master.debian.org/export/"; Templates "/srv/backports-master.debian.org/dak/templates/"; PoolRoot "pool/"; Lists "/srv/backports-master.debian.org/database/dists/"; diff --git a/config/debian-security/dak.conf b/config/debian-security/dak.conf index 32dc6aad..1d9b1e65 100644 --- a/config/debian-security/dak.conf +++ b/config/debian-security/dak.conf @@ -226,6 +226,7 @@ Dir { Root "/srv/security-master.debian.org/ftp/"; Pool "/srv/security-master.debian.org/ftp/pool/"; + Export "/srv/security-master.debian.org/export/"; Dak "/srv/security-master.debian.org/dak/"; Templates "/srv/security-master.debian.org/dak/templates/"; PoolRoot "pool/"; @@ -239,6 +240,7 @@ Dir Override "/srv/security-master.debian.org/scripts/override/"; QueueBuild "/srv/security-master.debian.org/buildd/"; Upload "/srv/queued/ftpmaster/"; + TempPath "/srv/security-master.debian.org/tmp"; Queue { Byhand "/srv/security-master.debian.org/queue/byhand/"; @@ -433,3 +435,8 @@ Urgency critical; }; }; + +Changelogs +{ + Export "/srv/security-master.debian.org/export/changelogs"; +} diff --git a/config/debian-security/export.sh b/config/debian-security/export.sh new file mode 100755 index 00000000..81d5ee08 --- /dev/null +++ b/config/debian-security/export.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e +set -u +set -E + +export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars +. $SCRIPTVARS + +# Make sure we start out with a sane umask setting +umask 022 + +# And use one locale, no matter what the caller has set +export LANG=C +export LC_ALL=C + +. "${configdir}/../debian/common" + +# extract changelogs and stuff +function changelogs() { + log "Extracting changelogs" + dak make-changelog -e + mkdir -p ${exportpublic}/changelogs + cd ${exportpublic}/changelogs + rsync -aHW --delete --delete-after --ignore-errors ${exportdir}/changelogs/. . + sudo -H -u archvsync /home/archvsync/runmirrors metasdo > ~dak/runmirrors-metadata.log 2>&1 & +} + +changelogs diff --git a/dak/make_changelog.py b/dak/make_changelog.py index 6d33e052..0a76bcc1 100755 --- a/dak/make_changelog.py +++ b/dak/make_changelog.py @@ -212,7 +212,7 @@ def export_files(session, pool, clpool, temppath): if not result: stats['unpack'] += 1 for file in files: - for f in glob(os.path.join(tempdir, 'debian', '*%s*' % file)): + for f in glob(os.path.join(tempdir, 'debian', '*%s' % file)): for s in unpack[p][1]: suite = os.path.join(unpack[p][0], '%s.%s' \ % (s, os.path.basename(f))) diff --git a/dak/new_security_install.py b/dak/new_security_install.py index 08ccbc74..2048e215 100755 --- a/dak/new_security_install.py +++ b/dak/new_security_install.py @@ -109,9 +109,11 @@ def _do_Approve(): spawn("apt-ftparchive generate %s" % (utils.which_apt_conf_file())) print "Updating Release files..." spawn("dak generate-releases") - print "Triggering security mirrors..." + print "Triggering security mirrors... (this may take a while)" spawn("/srv/security-master.debian.org/dak/config/debian-security/make-mirror.sh") spawn("sudo -u archvsync -H /home/archvsync/signal_security") + print "Triggering metadata export for packages.d.o and other consumers" + spawn("/srv/security-master.debian.org/dak/config/debian-security/export.sh") ######################################################################## ######################################################################## @@ -167,17 +169,25 @@ def main(): # Yes, we could do this inside do_Approve too. But this way we see who exactly # called it (ownership of the file) - dbchange=get_dbchange(os.path.basename(changes[0]), session) - # strip epoch from version - version=dbchange.version - version=version[(version.find(':')+1):] - acceptfilename="%s/COMMENTS/ACCEPT.%s_%s" % (os.path.dirname(os.path.abspath(changes[0])), dbchange.source, version) + + acceptfiles={} + for change in changes: + dbchange=get_dbchange(os.path.basename(change), session) + # strip epoch from version + version=dbchange.version + version=version[(version.find(':')+1):] + acceptfilename="%s/COMMENTS/ACCEPT.%s_%s" % (os.path.dirname(os.path.abspath(changes[0])), dbchange.source, version) + acceptfiles[acceptfilename]=1 + if Options["No-Action"]: - print "Would create %s now and then go on to accept this package, but No-Action is set" % (acceptfilename) + print "Would create %s now and then go on to accept this package, but No-Action is set" % (acceptfiles.keys()) sys.exit(0) - accept_file = file(acceptfilename, "w") - accept_file.write("OK\n") - accept_file.close() + + for acceptfilename in acceptfiles.keys(): + accept_file = file(acceptfilename, "w") + accept_file.write("OK\n") + accept_file.close() + do_Approve() diff --git a/daklib/dbconn.py b/daklib/dbconn.py index d430124a..7221d243 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -2291,9 +2291,9 @@ def source_exists(source, source_version, suites = ["any"], session=None): maps = [ (x[1], x[2]) for x in maps if x[0] == "map" or x[0] == "silent-map" ] s = [suite] - for x in maps: - if x[1] in s and x[0] not in s: - s.append(x[0]) + for (from_, to) in maps: + if from_ in s and to not in s: + s.append(to) q = q.filter(DBSource.suites.any(Suite.suite_name.in_(s))) diff --git a/templates/rm.bug-close b/templates/rm.bug-close index 78addd22..fc229ed6 100644 --- a/templates/rm.bug-close +++ b/templates/rm.bug-close @@ -32,6 +32,9 @@ removed from the Bug Tracking System. Please check all open bugs and close them or re-assign them to another package if the removed package was superseded by another one. +The version of this package that was in Debian prior to this removal +can still be found using http://snapshot.debian.org/. + Thank you for reporting the bug, which will now be closed. If you have further comments please address them to __BUG_NUMBER__@__BUG_SERVER__. diff --git a/templates/rm.bug-close-related b/templates/rm.bug-close-related index 8ea9547a..3c5cbe0d 100644 --- a/templates/rm.bug-close-related +++ b/templates/rm.bug-close-related @@ -18,6 +18,9 @@ that we couldn't deal with your issue properly. For details on the removal, please see http://__BUG_SERVER__/__BUG_NUMBER__ +The version of this package that was in Debian prior to this removal +can still be found using http://snapshot.debian.org/. + This message was generated automatically; if you believe that there is a problem with it please contact the archive administrators by mailing __ADMIN_ADDRESS__.