I noticed that Laurent Bigonville already uploaded an NMU versioned as
7.1.7+nmu1 yesterday. I have rescheduled my NMU now and uploaded to
delayed/14 instead.

Regards,

Markus
diff -Nru reportbug-7.1.7+nmu1/bin/reportbug reportbug-7.1.7+nmu2/bin/reportbug
--- reportbug-7.1.7+nmu1/bin/reportbug	2017-12-16 12:16:37.000000000 +0100
+++ reportbug-7.1.7+nmu2/bin/reportbug	2017-12-17 18:53:39.000000000 +0100
@@ -32,6 +32,8 @@
 import optparse
 import re
 import locale
+import requests
+import json
 import subprocess
 import shlex
 import email
@@ -1926,6 +1928,33 @@
             listcc += ui.get_multiline(
                 'Enter any additional addresses this report should be sent to; press ENTER after each address.')
 
+        # If the bug is reported against a package with a version that
+        # indicates a security update add the security or lts team to CC
+        # after user confirmation
+        is_security_update = False
+        if pkgversion:
+            regex = re.compile('(\+|~)deb(\d+)u(\d+)')
+            secversion = regex.search(pkgversion)
+            if secversion:
+                if ui.yes_no('Do you want to report a regression because of a security update? ',
+                             'Yes, please inform the LTS and security teams.',
+                             'No or I am not sure.', True):
+                    is_security_update = True
+                    distnumber = secversion[2]
+                    r = requests.get('https://security-tracker.debian.org/tracker/distributions.json')
+                    data = r.json()
+                    support = 'none'
+                    for key, value in data.items():
+                        if distnumber == value['major-version']:
+                            support = value['support']
+
+        if is_security_update and support != 'none':
+            if support == 'lts':
+                email_address = ['debian-...@lists.debian.org']
+            else:
+                email_address = ['t...@security.debian.org']
+            listcc.extend(email_address)
+
         if severity and rtype:
             severity = debbugs.convert_severity(severity, rtype)
 
diff -Nru reportbug-7.1.7+nmu1/debian/changelog reportbug-7.1.7+nmu2/debian/changelog
--- reportbug-7.1.7+nmu1/debian/changelog	2017-12-16 14:40:50.000000000 +0100
+++ reportbug-7.1.7+nmu2/debian/changelog	2017-12-17 18:53:39.000000000 +0100
@@ -1,3 +1,11 @@
+reportbug (7.1.7+nmu2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * bin/reportbug: Inform lts and security team about potential regressions due
+    to security updates. (Closes: #878088)
+
+ -- Markus Koschany <a...@debian.org>  Sun, 17 Dec 2017 18:53:39 +0100
+
 reportbug (7.1.7+nmu1) unstable; urgency=medium
 
   * Non-maintainer upload.
Binärdateien /mnt/data/tmp/1KXJ6xe3mP/reportbug-7.1.7+nmu1/reportbug/__pycache__/__init__.cpython-36.pyc und /mnt/data/tmp/RFjQw0EMYC/reportbug-7.1.7+nmu2/reportbug/__pycache__/__init__.cpython-36.pyc sind verschieden.
_______________________________________________
Reportbug-maint mailing list
Reportbug-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint

Reply via email to