<?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>13991</bug_id>
          
          <creation_ts>2020-07-28 07:44:02 +0000</creation_ts>
          <short_desc>cve_check fails</short_desc>
          <delta_ts>2020-09-17 08:00:48 +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>oe-core other</component>
          <version>3.1.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>3.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matthias Schoepfer">matthias.schoepfer</reporter>
          <assigned_to name="akuster">akuster808</assigned_to>
          <cc>akuster808</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87843</commentid>
    <comment_count>0</comment_count>
    <who name="Matthias Schoepfer">matthias.schoepfer</who>
    <bug_when>2020-07-28 07:44:02 +0000</bug_when>
    <thetext>Since this Sunday (July, 26), cve_check fails with:
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:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:do_populate_cve_db(d)
     0003:
File: &apos;/home/mschoepf/ithinx/git/sa171s-yocto-main/poky/meta/recipes-core/meta/cve-update-db-native.bb&apos;, lineno: 97, function: do_populate_cve_db
     0093:            # Update db with current year json file
     0094:            try:
     0095:                response = urllib.request.urlopen(json_url)
     0096:                if response:
 *** 0097:                    update_db(c, gzip.decompress(response.read()).decode(&apos;utf-8&apos;))
     0098:                c.execute(&quot;insert or replace into META values (?, ?)&quot;, [year, last_modified])
     0099:            except urllib.error.URLError as e:
     0100:                cve_f.write(&apos;Warning: CVE db update error, CVE data is outdated.\n\n&apos;)
     0101:                bb.warn(&quot;Cannot parse CVE data (%s), update failed&quot; % e.reason)
File: &apos;/home/mschoepf/ithinx/git/sa171s-yocto-main/poky/meta/recipes-core/meta/cve-update-db-native.bb&apos;, lineno: 182, function: update_db
     0178:
     0179:        cveId = elt[&apos;cve&apos;][&apos;CVE_data_meta&apos;][&apos;ID&apos;]
     0180:        cveDesc = elt[&apos;cve&apos;][&apos;description&apos;][&apos;description_data&apos;][0][&apos;value&apos;]
     0181:        date = elt[&apos;lastModifiedDate&apos;]
 *** 0182:        accessVector = elt[&apos;impact&apos;][&apos;baseMetricV2&apos;][&apos;cvssV2&apos;][&apos;accessVector&apos;]
     0183:        cvssv2 = elt[&apos;impact&apos;][&apos;baseMetricV2&apos;][&apos;cvssV2&apos;][&apos;baseScore&apos;]
     0184:
     0185:        try:
     0186:            cvssv3 = elt[&apos;impact&apos;][&apos;baseMetricV3&apos;][&apos;cvssV3&apos;][&apos;baseScore&apos;]
Exception: KeyError: &apos;baseMetricV2&apos;

ERROR: Logfile of failure stored in: /home/mschoepf/yocto/sa171-dunfell/builddir/tmp-glibc/work/x86_64-linux/cve-update-db-native/1.0-r0/temp/log.do_populate_cve_db.3664076
ERROR: Task (/home/mschoepf/ithinx/git/sa171s-yocto-main/poky/meta/recipes-core/meta/cve-update-db-native.bb:do_populate_cve_db) failed with exit code &apos;1&apos;


When on master, everything works. When applying fca05777a49411e07c2277d6e171419b4e831717, effects are mitigated to:
(Might have to do with multiconfig build?!)

ERROR: Execution of event handler &apos;cve_save_summary_handler&apos; failed
Traceback (most recent call last):
  File &quot;/home/mschoepf/ithinx/git/sa171s-yocto-main/poky/meta/classes/cve-check.bbclass&quot;, line 65, in cve_save_summary_handler(e=&lt;bb.event.BuildCompleted object at 0x7f647de6d790&gt;):
     
    &gt;    shutil.copyfile(cve_tmp_file, cve_summary_file)
     
  File &quot;/usr/lib/python3.7/shutil.py&quot;, line 120, in copyfile(src=&apos;/home/mschoepf/yocto/sa171-dunfell/builddir/tmp-glibc/cve_check&apos;, dst=&apos;/home/mschoepf/yocto/sa171-dunfell/builddir/tmp-glibc/log/cve/cve-summary-20200728163805.txt&apos;, follow_symlinks=True):
         else:
    &gt;        with open(src, &apos;rb&apos;) as fsrc:
                 with open(dst, &apos;wb&apos;) as fdst:
FileNotFoundError: [Errno 2] No such file or directory: &apos;/home/mschoepf/yocto/sa171-dunfell/builddir/tmp-glibc/cve_check&apos;


Summary: There was 1 ERROR message shown, returning a non-zero exit code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87855</commentid>
    <comment_count>1</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2020-07-30 07:29:21 +0000</bug_when>
    <thetext>https://git.openembedded.org/openembedded-core/commit/?id=fdcbf3f28289188c5a97664d1421d4a5c4991eda

is in master.

the other failure has had a patch sent

https://patchwork.openembedded.org/patch/174786/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88159</commentid>
    <comment_count>2</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2020-09-17 08:00:35 +0000</bug_when>
    <thetext>fixed:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/classes?id=06b20b01a0164547c689f1a8367ff9b14d8fdacc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88160</commentid>
    <comment_count>3</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2020-09-17 08:00:48 +0000</bug_when>
    <thetext>.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>