+ print "Marking as security ..."
bug.security_related = True
- # Link the appropriate cve to the bug
- #
- found = False
- for cve in self.lp.launchpad.cves:
- if title in cve.display_name:
- found = True
- break
- if found:
- bug.lpbug.linkCVE(cve=cve)
-
- lp = self.lp.launchpad
+ # Link the appropriate cve to the bug.
+ # Cannot safely use 'linkCVE' due to LP: #439470
+ print "Linking to %s ..." % (title)
+ bug.add_comment(content=title)
+
ubuntu = lp.distributions["ubuntu"]
# Add bug tasks for related source packages
#
pkgs = ['linux-fsl-imx51', 'linux-mvl-dove', 'linux-lts-backport-maverick', 'linux-ti-omap4']
for p in pkgs:
+ print "Finding source package '%s' ..." % (p)
pkg = ubuntu.getSourcePackage(name=p)
+ print "Adding bug task for '%s' ..." % (p)
t = bug.lpbug.addTask(target=pkg)
# Nominate for all active series
@@ -198,12 +199,14 @@ class CreateCveTracker(StdApp):
sc = ubuntu.series_collection
for s in sc:
if s.active:
+ print "Adding nomination for '%s' ..." % (s.name)
nomination = bug.lpbug.addNomination(target=s)
+ print "Approving nomination for '%s' ..." % (s.name)
if nomination.canApprove():
nomination.approve()
if 'staging' in self.cfg:
- print("https://bugs.qastaging.launchpad.net/bugs/%s" % (bug.id))
+ print("https://qastaging.launchpad.net/bugs/%s" % (bug.id))
else:
print("https://bugs.launchpad.net/bugs/%s" % (bug.id))
I don't really care for the additional debugging prints. If you want
to add then as part of a --verbose option, I'd be open to that.
+ print "Marking as security ..."
bug.security_related = True
- # Link the appropriate cve to the bug
- #
- found = False
- for cve in self.lp.launchpad.cves:
- if title in cve.display_name:
- found = True
- break
- if found:
- bug.lpbug.linkCVE(cve=cve)
-
- lp = self.lp.launchpad
+ # Link the appropriate cve to the bug.
+ # Cannot safely use 'linkCVE' due to LP: #439470
+ print "Linking to %s ..." % (title)
+ bug.add_comment(content=title)
+
ubuntu = lp.distributions["ubuntu"]
# Add bug tasks for related source packages
#
pkgs = ['linux-fsl-imx51', 'linux-mvl-dove',
'linux-lts-backport-maverick', 'linux-ti-omap4']
for p in pkgs:
+ print "Finding source package '%s' ..." % (p)
pkg = ubuntu.getSourcePackage(name=p)
+ print "Adding bug task for '%s' ..." % (p)
t = bug.lpbug.addTask(target=pkg)
# Nominate for all active series
@@ -198,12 +199,14 @@ class CreateCveTracker(StdApp):
sc = ubuntu.series_collection
for s in sc:
if s.active:
+ print "Adding nomination for '%s' ..." % (s.name)
nomination = bug.lpbug.addNomination(target=s)
+ print "Approving nomination for '%s' ..." % (s.name)
if nomination.canApprove():
nomination.approve()
if 'staging' in self.cfg:
- print("https://bugs.qastaging.launchpad.net/bugs/%s" % (bug.id))
+ print("https://qastaging.launchpad.net/bugs/%s" % (bug.id))
else:
print("https://bugs.launchpad.net/bugs/%s" % (bug.id))
I don't really care for the additional debugging prints. If you want
to add then as part of a --verbose option, I'd be open to that.
Brad
The advantage to the progress prints is that you don't ^C early if
Launchpad is really slow.
rtg
--
Tim Gardner tim.gardner@canonical.com
--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
06-06-2011, 05:37 PM
Brad Figg
cve-tracker: add verbose progress reporting, speed up CVE linkage
+ print "Marking as security ..."
bug.security_related = True
- # Link the appropriate cve to the bug
- #
- found = False
- for cve in self.lp.launchpad.cves:
- if title in cve.display_name:
- found = True
- break
- if found:
- bug.lpbug.linkCVE(cve=cve)
-
- lp = self.lp.launchpad
+ # Link the appropriate cve to the bug.
+ # Cannot safely use 'linkCVE' due to LP: #439470
+ print "Linking to %s ..." % (title)
+ bug.add_comment(content=title)
+
ubuntu = lp.distributions["ubuntu"]
# Add bug tasks for related source packages
#
pkgs = ['linux-fsl-imx51', 'linux-mvl-dove',
'linux-lts-backport-maverick', 'linux-ti-omap4']
for p in pkgs:
+ print "Finding source package '%s' ..." % (p)
pkg = ubuntu.getSourcePackage(name=p)
+ print "Adding bug task for '%s' ..." % (p)
t = bug.lpbug.addTask(target=pkg)
# Nominate for all active series
@@ -198,12 +199,14 @@ class CreateCveTracker(StdApp):
sc = ubuntu.series_collection
for s in sc:
if s.active:
+ print "Adding nomination for '%s' ..." % (s.name)
nomination = bug.lpbug.addNomination(target=s)
+ print "Approving nomination for '%s' ..." % (s.name)
if nomination.canApprove():
nomination.approve()
if 'staging' in self.cfg:
- print("https://bugs.qastaging.launchpad.net/bugs/%s" % (bug.id))
+ print("https://qastaging.launchpad.net/bugs/%s" % (bug.id))
else:
print("https://bugs.launchpad.net/bugs/%s" % (bug.id))
I don't really care for the additional debugging prints. If you want
to add then as part of a --verbose option, I'd be open to that.
Brad
The advantage to the progress prints is that you don't ^C early if Launchpad is really slow.
rtg
I'll add in the verbose messages such that they are enabled by use of the --verbose command line
flag.
I don't like the removal of the use of "linkCVE". According to the bug referenced, this is only
an issue if the CVE isn't already know to LP. This patch turns this operation into a manual step
for all CVE, even ones know to LP. Note: we've been doing this for a while now and don't seem
to have run into this issue.