[Secure-testing-commits] r29227 - bin lib/python
Holger Levsen
holger at moszumanska.debian.org
Fri Oct 3 07:36:34 UTC 2014
Author: holger
Date: 2014-10-03 07:36:34 +0000 (Fri, 03 Oct 2014)
New Revision: 29227
Modified:
bin/tracker_service.py
lib/python/security_db.py
Log:
Include squeeze- and wheezy-backports in issue and package views. (Closes: #664866)
Modified: bin/tracker_service.py
===================================================================
--- bin/tracker_service.py 2014-10-03 07:36:29 UTC (rev 29226)
+++ bin/tracker_service.py 2014-10-03 07:36:34 UTC (rev 29227)
@@ -759,8 +759,8 @@
WHERE cve_name = st.bug_name)
FROM source_package_status AS st, source_packages AS sp
WHERE st.vulnerable AND sp.rowid = st.package
- AND sp.release = ? AND sp.subrelease = ''
- ORDER BY sp.name, st.bug_name""", (rel,)):
+ AND sp.release = ? AND sp.subrelease = ?
+ ORDER BY sp.name, st.bug_name""", (rel,subrel)):
if bf.urgencyFiltered(urgency, vulnerable):
continue
if bf.remoteFiltered(remote):
@@ -804,19 +804,22 @@
return self.page_status_release_unstable_like(
path, params, url,
title='Vulnerable source packages in the unstable suite',
- rel='sid')
+ rel='sid',
+ subrel='')
def page_status_release_stable_backports(self, path, params, url):
return self.page_status_release_unstable_like(
path, params, url,
title='Vulnerable source packages among backports for stable',
- rel='wheezy-backports')
+ rel='wheezy',
+ subrel='backports')
def page_status_release_oldstable_backports(self, path, params, url):
return self.page_status_release_unstable_like(
path, params, url,
title='Vulnerable source packages among backports for oldstable',
- rel='squeeze-backports')
+ rel='squeeze',
+ subrel='backports')
def page_status_dtsa_candidates(self, path, params, url):
bf = BugFilter(params,nonodsa=True)
Modified: lib/python/security_db.py
===================================================================
--- lib/python/security_db.py 2014-10-03 07:36:29 UTC (rev 29226)
+++ lib/python/security_db.py 2014-10-03 07:36:34 UTC (rev 29227)
@@ -385,7 +385,7 @@
AND NOT COALESCE((SELECT NOT vulnerable
FROM source_packages AS secp, source_package_status AS secst
WHERE secp.name = sp.name
- AND secp.release = '%s' AND ( secp.subrelease = 'security' OR secp.subrelease = 'lts' )
+ AND secp.release = '%s' AND ( secp.subrelease = 'security' OR secp.subrelease = 'lts' OR secp.subrelease = 'backports' )
AND secp.archive = sp.archive
AND secst.bug_name = st.bug_name
AND secst.package = secp.rowid), 0)
@@ -452,7 +452,7 @@
return -1
self.db.createscalarfunction("release_to_number", release_to_number, 1)
- subreleases = ['', 'security', 'lts']
+ subreleases = ['', 'security', 'lts', 'backports']
def subrelease_to_number(u):
try:
return subreleases.index(u)
@@ -598,6 +598,12 @@
if release == 'squeeze-lts':
release = 'squeeze'
subrelease = 'lts'
+ elif release == 'squeeze-backports':
+ release = 'squeeze'
+ subrelease = 'backports'
+ elif release == 'wheezy-backports':
+ release = 'wheezy'
+ subrelease = 'backports'
cursor.execute(
"""DELETE FROM source_packages
WHERE release = ? AND subrelease = ? AND archive = ?""",
@@ -661,6 +667,12 @@
if release == 'squeeze-lts':
release = 'squeeze'
subrelease = 'lts'
+ elif release == 'squeeze-backports':
+ release = 'squeeze'
+ subrelease = 'backports'
+ elif release == 'wheezy-backports':
+ release = 'wheezy'
+ subrelease = 'backports'
(unch, parsed) = self._parseFile(cursor, filename)
unchanged = unchanged and unch
for name in parsed.keys():
@@ -1189,14 +1201,14 @@
# note/release/subrelease triple, but we should check that
# here.
- status = {'' : {}, 'security' : {}, 'lts' : {}}
+ status = {'' : {}, 'security' : {}, 'lts' : {}, 'backports' : {}}
for (package, note, subrelease, vulnerable, urgency) in cursor.execute(
"""SELECT DISTINCT sp.name, n.id, sp.subrelease,
st.vulnerable, n.urgency
FROM source_package_status AS st,
source_packages AS sp, package_notes AS n
WHERE st.bug_name = ? AND sp.rowid = st.package
- AND sp.release = ? AND sp.subrelease IN ('', 'security', 'lts')
+ AND sp.release = ? AND sp.subrelease IN ('', 'security', 'lts', 'backports')
AND n.bug_name = st.bug_name AND n.package = sp.name
ORDER BY sp.name""",
(bug_name, nickname)):
@@ -1218,6 +1230,8 @@
fixed_in_security = False
elif status['lts'].get((package, note), True):
fixed_in_security = False
+ elif status['backports'].get((package, note), True):
+ fixed_in_security = False
elif vulnerable == 2:
undet_pkgs[package] = True
@@ -1330,7 +1344,7 @@
FROM source_packages AS p, source_package_status AS st
WHERE p.name = ?
AND p.release = ?
- AND p.subrelease IN ('', 'security', 'lts')
+ AND p.subrelease IN ('', 'security', 'lts', 'backports')
AND st.bug_name = ?
AND st.package = p.rowid
ORDER BY p.version COLLATE version DESC"""
@@ -1491,10 +1505,10 @@
# covers binary-only NMUs.
for (v,) in c.execute("""SELECT version
FROM source_packages WHERE name = ?1
- AND release = ?2 AND subrelease IN ('', 'security', 'lts')
+ AND release = ?2 AND subrelease IN ('', 'security', 'lts', 'backports')
UNION ALL SELECT source_version
FROM binary_packages WHERE source = ?1
- AND release = ?2 AND subrelease IN ('', 'security', 'lts')""",
+ AND release = ?2 AND subrelease IN ('', 'security', 'lts', 'backports')""",
(package, release)):
if debian_support.Version(v) >= v_ref:
other_versions[v] = True
@@ -1565,7 +1579,7 @@
store_value('release/1/' + release, '\n'.join(result))
- for release in ('sid', 'squeeze', 'wheezy', 'jessie'):
+ for release in ('sid', 'jessie', 'wheezy', 'squeeze'):
gen_release(release)
result = result_start
@@ -1713,14 +1727,14 @@
AND COALESCE((SELECT st2.vulnerable FROM source_packages AS sp2,
source_package_status AS st2
WHERE sp2.name = sp.name AND sp2.release = sp.release
- AND ( sp2.subrelease = 'security' OR sp2.subrelease = 'lts' ) AND sp2.archive = sp.archive
+ AND ( sp2.subrelease = 'security' OR sp2.subrelease = 'lts' OR sp2.subrelease = 'backports' ) AND sp2.archive = sp.archive
AND st2.package = sp2.rowid AND st2.bug_name = st.bug_name
ORDER BY st2.vulnerable DESC), 1)) AS vulnerable,
st.urgency = 'unimportant' OR NOT vulnerable AS unimportant
FROM source_packages AS sp, source_package_status AS st, bugs
WHERE sp.name = ?
AND sp.release IN ('squeeze', 'wheezy', 'jessie', 'sid')
- AND sp.subrelease <> 'security' AND sp.subrelease <> 'lts'
+ AND sp.subrelease <> 'security' AND sp.subrelease <> 'lts' AND sp.subrelease <> 'backports'
AND st.package = sp.rowid
AND bugs.name = st.bug_name
AND (bugs.name LIKE 'CVE-%' OR bugs.name LIKE 'TEMP-%')
More information about the Secure-testing-commits
mailing list