From patchwork Thu May 26 18:16:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 97607 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 87139B6F8E for ; Fri, 27 May 2011 04:16:18 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QPf6U-0006yO-4j; Thu, 26 May 2011 18:16:14 +0000 Received: from smtp.outflux.net ([198.145.64.163]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QPf6S-0006yJ-JA for kernel-team@lists.ubuntu.com; Thu, 26 May 2011 18:16:12 +0000 Received: from www.outflux.net (serenity-end.outflux.net [10.2.0.2]) by vinyl.outflux.net (8.14.3/8.14.3/Debian-9.2ubuntu1) with ESMTP id p4QIGBk5005334 for ; Thu, 26 May 2011 11:16:11 -0700 Date: Thu, 26 May 2011 11:16:11 -0700 From: Kees Cook To: kernel-team@lists.ubuntu.com Subject: [PATCH][kteam-tools] cve-tracker: add verbose progress reporting, speed up CVE linkage Message-ID: <20110526181611.GH19633@outflux.net> MIME-Version: 1.0 Content-Disposition: inline Organization: Ubuntu X-MIMEDefang-Filter: outflux$Revision: 1.316 $ X-HELO: www.outflux.net X-Scanned-By: MIMEDefang 2.69 on 10.2.0.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Progress reporting, replace CVE linkage, fix reported staging URL. Signed-off-by: Kees Cook --- stable/create-cve-tracker | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/stable/create-cve-tracker b/stable/create-cve-tracker index a06d6eb..b9d957e 100755 --- a/stable/create-cve-tracker +++ b/stable/create-cve-tracker @@ -152,8 +152,10 @@ class CreateCveTracker(StdApp): try: self.merge_config_options(self.defaults, cmdline.process(argv, self.defaults)) cmdline.verify_options(self.cfg) + print "Starting up ..." self.initialize() + print "Connecting to Launchpad ..." lp = self.lp.launchpad # Title: CVE-xxxx-xxxx @@ -167,30 +169,29 @@ class CreateCveTracker(StdApp): description = "Placeholder" try: + print "Creating bug ..." bug = self.lp.create_bug(project='ubuntu', package='linux', title=title, description=description) try: + print "Updating tags ..." bug.tags.append('kernel-cve-tracking-bug') + 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))