Bug 13680 - New cve-check made download problems fatal
Summary: New cve-check made download problems fatal
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium+ normal
Target Milestone: 3.1 M4
Assignee: Chee Yang
QA Contact:
URL:
Whiteboard: cve-check.bbclass
Depends on:
Blocks:
 
Reported: 2019-12-04 23:14 UTC by Adrian Bunk
Modified: 2020-04-02 06:12 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Bunk 2019-12-04 23:14:34 UTC
Different from the old cve-check, the new one made download errors fatal.

There might be situations where this makes sense, but this makes it impossible to run the CVE checking as part of a normal automated build since this adds a dependency on data at a 3rd party location that might be temporarily or permanently unavailable. For everything else static premirror contents solves this problem, but CVE data is not static.

Testcase:
Build with INHERIT += "cve-check" with networking disabled (everything except CVE data was already downloaded).

Old cve-check:
WARNING: cve-check-tool-native-5.6.4-r0 do_populate_cve_db: Error in executing cve-check-update
WARNING: cve-check-tool-native-5.6.4-r0 do_populate_cve_db: Failed to update cve-check-tool database, CVEs won't be checked

Relevant part from the new cve-check:
ERROR: cve-update-db-native-1.0-r0 do_populate_cve_db: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
...
     0065:        if proxy_opener:
     0066:            response = proxy_opener.open(meta_url)
     0067:        else:
     0068:            req = urllib.request.Request(meta_url)
 *** 0069:            response = urllib.request.urlopen(req)
...
Exception: urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

ERROR: cve-update-db-native-1.0-r0 do_populate_cve_db: <urlopen error [Errno -2] Name or service not known>
ERROR: cve-update-db-native-1.0-r0 do_populate_cve_db: Function failed: do_populate_cve_db