diff options
author | Peter Marko <peter.marko@siemens.com> | 2025-05-05 12:27:56 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-08 10:28:18 +0100 |
commit | 3d7381f5b5c3301775dae38f6833dbb5c36b7770 (patch) | |
tree | 4b605482ae7d68f853bdd40b748bd174dd98b39b | |
parent | 1abcc7fe524068cf83c29cc2a3a3f170f740e462 (diff) | |
download | poky-3d7381f5b5c3301775dae38f6833dbb5c36b7770.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: ee6541d0940c65685aaafd7d41a59a9406392e7d)
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>
-rw-r--r-- | meta/classes/vex.bbclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/vex.bbclass b/meta/classes/vex.bbclass index 905d67b47d..402d8e0d96 100644 --- a/meta/classes/vex.bbclass +++ b/meta/classes/vex.bbclass | |||
@@ -196,6 +196,8 @@ python vex_write_rootfs_manifest () { | |||
196 | with open(pkgfilepath) as j: | 196 | with open(pkgfilepath) as j: |
197 | data = json.load(j) | 197 | data = json.load(j) |
198 | cve_check_merge_jsons(json_data, data) | 198 | cve_check_merge_jsons(json_data, data) |
199 | else: | ||
200 | bb.warn("Missing cve file for %s" % pkg) | ||
199 | 201 | ||
200 | d.setVar("PN", save_pn) | 202 | d.setVar("PN", save_pn) |
201 | 203 | ||
@@ -290,9 +292,12 @@ def cve_write_data_json(d, cve_data, cve_status): | |||
290 | cvelogpath = d.getVar("CVE_CHECK_SUMMARY_DIR") | 292 | cvelogpath = d.getVar("CVE_CHECK_SUMMARY_DIR") |
291 | index_path = d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH") | 293 | index_path = d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH") |
292 | bb.utils.mkdirhier(cvelogpath) | 294 | bb.utils.mkdirhier(cvelogpath) |
295 | bb.utils.mkdirhier(os.path.dirname(deploy_file)) | ||
293 | fragment_file = os.path.basename(deploy_file) | 296 | fragment_file = os.path.basename(deploy_file) |
294 | fragment_path = os.path.join(cvelogpath, fragment_file) | 297 | fragment_path = os.path.join(cvelogpath, fragment_file) |
295 | with open(fragment_path, "w") as f: | 298 | with open(fragment_path, "w") as f: |
296 | f.write(write_string) | 299 | f.write(write_string) |
300 | with open(deploy_file, "w") as f: | ||
301 | f.write(write_string) | ||
297 | with open(index_path, "a+") as f: | 302 | with open(index_path, "a+") as f: |
298 | f.write("%s\n" % fragment_path) | 303 | f.write("%s\n" % fragment_path) |