<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13680</bug_id>
          
          <creation_ts>2019-12-04 23:14:34 +0000</creation_ts>
          <short_desc>New cve-check made download problems fatal</short_desc>
          <delta_ts>2020-04-02 06:12:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>cve-check.bbclass</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Bunk">bunk</reporter>
          <assigned_to name="Chee Yang">chee.yang.lee</assigned_to>
          <cc>chee.yang.lee</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tim.orling</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>85718</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Bunk">bunk</who>
    <bug_when>2019-12-04 23:14:34 +0000</bug_when>
    <thetext>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 += &quot;cve-check&quot; 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&apos;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: &lt;urlopen error [Errno -2] Name or service not known&gt;

ERROR: cve-update-db-native-1.0-r0 do_populate_cve_db: &lt;urlopen error [Errno -2] Name or service not known&gt;
ERROR: cve-update-db-native-1.0-r0 do_populate_cve_db: Function failed: do_populate_cve_db</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86859</commentid>
    <comment_count>1</comment_count>
    <who name="Chee Yang">chee.yang.lee</who>
    <bug_when>2020-03-30 02:30:29 +0000</bug_when>
    <thetext>this should fix the problem 
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=117a6dac73b7642f56e9e51a890748679d6dbab4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>