summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorBenjamin Robin (Schneider Electric) <benjamin.robin@bootlin.com>2025-11-21 10:54:13 +0100
committerSteve Sakoman <steve@sakoman.com>2025-12-01 07:34:55 -0800
commit35a6ffc2dbc9b307f763653d61074f708ee68848 (patch)
tree419dfe464b042e38a8731f8d0b34e7a9708561fd /meta
parent86f11fe94f607212f07add0145e754670fc6d125 (diff)
downloadpoky-35a6ffc2dbc9b307f763653d61074f708ee68848.tar.gz
vex: fix rootfs manifest
Rootfs VEX file is created by gathering files from CVE_CHECK_DIR (deploy directory), however recipes generate the files only in CVE_CHECK_DIR (log directory). This make the rootfs VEX be always empty without any message. The code is copied from cve_check class, which writes to both, so let keep them aligned and make also vex write both files. Also add a warning for case that a cve file would be still missing. (From OE-Core rev: 7493eeed6d53bc704f558a0ccf8a0b5195381873) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ee6541d0940c65685aaafd7d41a59a9406392e7d) Signed-off-by: Benjamin Robin (Schneider Electric) <benjamin.robin@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/vex.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/vex.bbclass b/meta/classes/vex.bbclass
index c447b37db8..707e6f45a1 100644
--- a/meta/classes/vex.bbclass
+++ b/meta/classes/vex.bbclass
@@ -213,6 +213,8 @@ python vex_write_rootfs_manifest () {
213 with open(pkgfilepath) as j: 213 with open(pkgfilepath) as j:
214 data = json.load(j) 214 data = json.load(j)
215 cve_check_merge_jsons(json_data, data) 215 cve_check_merge_jsons(json_data, data)
216 else:
217 bb.warn("Missing cve file for %s" % pkg)
216 218
217 d.setVar("PN", save_pn) 219 d.setVar("PN", save_pn)
218 220
@@ -306,9 +308,12 @@ def cve_write_data_json(d, cve_data, cve_status):
306 cvelogpath = d.getVar("CVE_CHECK_SUMMARY_DIR") 308 cvelogpath = d.getVar("CVE_CHECK_SUMMARY_DIR")
307 index_path = d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH") 309 index_path = d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH")
308 bb.utils.mkdirhier(cvelogpath) 310 bb.utils.mkdirhier(cvelogpath)
311 bb.utils.mkdirhier(os.path.dirname(deploy_file))
309 fragment_file = os.path.basename(deploy_file) 312 fragment_file = os.path.basename(deploy_file)
310 fragment_path = os.path.join(cvelogpath, fragment_file) 313 fragment_path = os.path.join(cvelogpath, fragment_file)
311 with open(fragment_path, "w") as f: 314 with open(fragment_path, "w") as f:
312 f.write(write_string) 315 f.write(write_string)
316 with open(deploy_file, "w") as f:
317 f.write(write_string)
313 with open(index_path, "a+") as f: 318 with open(index_path, "a+") as f:
314 f.write("%s\n" % fragment_path) 319 f.write("%s\n" % fragment_path)