Author: fw Date: 2005-10-24 14:43:04 +0000 (Mon, 24 Oct 2005) New Revision: 2554 Modified: bin/tracker_service.py lib/python/security_db.py Log: Add a summary page for tracked bugs without a CVE name. lib/python/security_db.py (DB.getFakeBugs): New method. bin/tracker_service.py (TrackerService.page_data_fake_names): New method. (TrackerService.__intit__, TrackerService.page_home): Use it. Modified: bin/tracker_service.py ==================================================================--- bin/tracker_service.py 2005-10-24 14:36:16 UTC (rev 2553) +++ bin/tracker_service.py 2005-10-24 14:43:04 UTC (rev 2554) @@ -97,6 +97,7 @@ self.register(''data/missing-epochs'', self.page_data_missing_epochs) self.register(''data/releases'', self.page_data_releases) self.register(''data/funny-versions'', self.page_data_funny_versions) + self.register(''data/fake-names'', self.page_data_fake_names) def page_home(self, path, params, url): query = params.get(''query'', ('''',))[0] @@ -129,6 +130,7 @@ (''status/itp'', ''ITPs with potential security issues''), (''data/unknown-packages'', ''Packages names not found in the archive''), + (''data/fake-names'', ''Tracked issues without a CVE name''), (''data/missing-epochs'', ''Package versions which might lack an epoch''), (''data/funny-versions'', @@ -832,8 +834,27 @@ long as none of the binary packages carries the same name as the source package, most confusion is avoided or can be easily explained.""")]) - + def page_data_fake_names(self, path, params, url): + def gen(): + for (bug, description) in self.db.getFakeBugs(): + yield self.make_xref(url, bug), description + return self.create_page( + url, "Automatically generated issue names", + [P("""Some issues have not been assigned CVE names, but are still +tracked by this database. In this case, the system automatically assigns +a unique name. These names are not stable and can change when the database +is updated, so they should not be used in external references."""), + P(''''''The automatically generated names come in two flavors: +the first kind starts with the string "'''''', CODE("FAKE-000000-"), + ''''''". This means that no Debian bug has been assigned to this +issue (or a bug has been created and is not recorded in this database). +In the second kind of names, there is a Debian bug for the issue, and the "'''''', + CODE("000000"), ''''''"part of the name is replaced with the +Debian bug number.''''''), + make_table(gen(), + caption=("Bug", "Description"))]) + def create_page(self, url, title, body, search_in_page=False, status=200): append = body.append append(HR()) Modified: lib/python/security_db.py ==================================================================--- lib/python/security_db.py 2005-10-24 14:36:16 UTC (rev 2553) +++ lib/python/security_db.py 2005-10-24 14:43:04 UTC (rev 2554) @@ -1478,6 +1478,17 @@ if old_package: yield (old_package, bugs) + def getFakeBugs(self, cursor=None): + """Returns a list of pairs (BUG-NAME, DESCRIPTION).""" + + if cursor is None: + cursor = self.cursor() + + return list(cursor.execute( + """SELECT name, description FROM bugs + WHERE name > ''FAKE-'' AND name LIKE ''FAKE-%'' + ORDER BY name""")) + def getITPs(self, cursor): """Returns a generator for a list of unknown packages. Each entry has the form (PACKAGE, BUG-LIST, DEBIAN-BUG-LIST)."""