From 35a6ffc2dbc9b307f763653d61074f708ee68848 Mon Sep 17 00:00:00 2001 From: "Benjamin Robin (Schneider Electric)" Date: Fri, 21 Nov 2025 10:54:13 +0100 Subject: [PATCH] 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 Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit ee6541d0940c65685aaafd7d41a59a9406392e7d) Signed-off-by: Benjamin Robin (Schneider Electric) Signed-off-by: Steve Sakoman --- meta/classes/vex.bbclass | 5 +++++ 1 file changed, 5 insertions(+) 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 () { with open(pkgfilepath) as j: data = json.load(j) cve_check_merge_jsons(json_data, data) + else: + bb.warn("Missing cve file for %s" % pkg) d.setVar("PN", save_pn) @@ -306,9 +308,12 @@ def cve_write_data_json(d, cve_data, cve_status): cvelogpath = d.getVar("CVE_CHECK_SUMMARY_DIR") index_path = d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH") bb.utils.mkdirhier(cvelogpath) + bb.utils.mkdirhier(os.path.dirname(deploy_file)) fragment_file = os.path.basename(deploy_file) fragment_path = os.path.join(cvelogpath, fragment_file) with open(fragment_path, "w") as f: f.write(write_string) + with open(deploy_file, "w") as f: + f.write(write_string) with open(index_path, "a+") as f: f.write("%s\n" % fragment_path)