]> git.decadent.org.uk Git - dak.git/commitdiff
Merge branch 'master' into dbtests
authorTorsten Werner <twerner@debian.org>
Fri, 18 Feb 2011 17:23:01 +0000 (18:23 +0100)
committerTorsten Werner <twerner@debian.org>
Fri, 18 Feb 2011 17:23:01 +0000 (18:23 +0100)
config/backports/cron.dinstall
config/backports/dak.conf
config/debian-security/dak.conf
config/debian-security/export.sh [new file with mode: 0755]
dak/make_changelog.py
dak/new_security_install.py
daklib/dbconn.py
templates/rm.bug-close
templates/rm.bug-close-related

index 634ef1d979e287113359524248562c0567f57de7..5b03527917b3c669aa5565da4844a702a42e6813 100755 (executable)
@@ -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"
index 8bde62390dac12fdb133bc8296a01d5b982a05d8..c79533d618df42f02de510123c93de02374e8501 100644 (file)
@@ -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/";
index 32dc6aad5a8c3b5990501aaf24fd26012d4e8941..1d9b1e6530101dbbc9b10bcbd79e20ccb8b41a39 100644 (file)
@@ -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 (executable)
index 0000000..81d5ee0
--- /dev/null
@@ -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
index 6d33e0529e15e722b7a823a4c590ad0222416fc0..0a76bcc1118d7f80cef661a461a6fae6bf6053c6 100755 (executable)
@@ -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)))
index 08ccbc748e19fb325b2e03e0790a02ce893d629c..2048e215ea3da3ef0db43d0136171dbf8c0561ab 100755 (executable)
@@ -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()
 
 
index d430124ae13c7f3c4480f285f8291798558ee828..7221d243f226970ad91fcfce89992098d04dbe7a 100755 (executable)
@@ -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)))
 
index 78addd22b9ce49b21236822dbddae553b822b90b..fc229ed67249ff706e764d640ecea352480c9c9a 100644 (file)
@@ -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__.
 
index 8ea9547a810f7bd51a9e60dd53f17b28ba28c23d..3c5cbe0dc8faedbdb4fb41e02652266e0e7c28d4 100644 (file)
@@ -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__.