summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/cve-check.bbclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 646cc879dd..ed86403b6b 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -53,6 +53,9 @@ CVE_CHECK_PN_WHITELIST ?= ""
53# 53#
54CVE_CHECK_WHITELIST ?= "" 54CVE_CHECK_WHITELIST ?= ""
55 55
56# set to "alphabetical" for version using single alphabetical character as increament release
57CVE_VERSION_SUFFIX ??= ""
58
56python cve_save_summary_handler () { 59python cve_save_summary_handler () {
57 import shutil 60 import shutil
58 import datetime 61 import datetime
@@ -210,6 +213,7 @@ def check_cves(d, patched_cves):
210 213
211 pn = d.getVar("PN") 214 pn = d.getVar("PN")
212 real_pv = d.getVar("PV") 215 real_pv = d.getVar("PV")
216 suffix = d.getVar("CVE_VERSION_SUFFIX")
213 217
214 cves_unpatched = [] 218 cves_unpatched = []
215 # CVE_PRODUCT can contain more than one product (eg. curl/libcurl) 219 # CVE_PRODUCT can contain more than one product (eg. curl/libcurl)
@@ -263,8 +267,8 @@ def check_cves(d, patched_cves):
263 else: 267 else:
264 if operator_start: 268 if operator_start:
265 try: 269 try:
266 vulnerable_start = (operator_start == '>=' and Version(pv) >= Version(version_start)) 270 vulnerable_start = (operator_start == '>=' and Version(pv,suffix) >= Version(version_start,suffix))
267 vulnerable_start |= (operator_start == '>' and Version(pv) > Version(version_start)) 271 vulnerable_start |= (operator_start == '>' and Version(pv,suffix) > Version(version_start,suffix))
268 except: 272 except:
269 bb.warn("%s: Failed to compare %s %s %s for %s" % 273 bb.warn("%s: Failed to compare %s %s %s for %s" %
270 (product, pv, operator_start, version_start, cve)) 274 (product, pv, operator_start, version_start, cve))
@@ -274,8 +278,8 @@ def check_cves(d, patched_cves):
274 278
275 if operator_end: 279 if operator_end:
276 try: 280 try:
277 vulnerable_end = (operator_end == '<=' and Version(pv) <= Version(version_end) ) 281 vulnerable_end = (operator_end == '<=' and Version(pv,suffix) <= Version(version_end,suffix) )
278 vulnerable_end |= (operator_end == '<' and Version(pv) < Version(version_end) ) 282 vulnerable_end |= (operator_end == '<' and Version(pv,suffix) < Version(version_end,suffix) )
279 except: 283 except:
280 bb.warn("%s: Failed to compare %s %s %s for %s" % 284 bb.warn("%s: Failed to compare %s %s %s for %s" %
281 (product, pv, operator_end, version_end, cve)) 285 (product, pv, operator_end, version_end, cve))