summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorChris Laplante <chris.laplante@agilent.com>2020-09-29 11:57:45 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-30 15:01:51 +0100
commit47a35a3843258e8c590d62603d5062d0b096a22d (patch)
tree7461858be533a9b3ff23a30f4ebea8ef97e199e0 /meta/classes
parent6817a1b683e3ff1b40b00910ce4fb28e7d03aa99 (diff)
downloadpoky-47a35a3843258e8c590d62603d5062d0b096a22d.tar.gz
cve-check: introduce CVE_CHECK_RECIPE_FILE variable to allow changing of per-recipe check file
The addition of this variable also makes it possible to change the output suffix of the check files, e.g. in local.conf: CVE_CHECK_MANIFEST_append = ".txt" CVE_CHECK_RECIPE_FILE_append = ".txt" (From OE-Core rev: 0d40f1482c6d87785ae47c46c2305e1df46f459a) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/cve-check.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 02fef7c205..df28a93687 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -36,6 +36,7 @@ CVE_CHECK_SUMMARY_FILE_NAME ?= "cve-summary"
36CVE_CHECK_SUMMARY_FILE ?= "${CVE_CHECK_SUMMARY_DIR}/${CVE_CHECK_SUMMARY_FILE_NAME}" 36CVE_CHECK_SUMMARY_FILE ?= "${CVE_CHECK_SUMMARY_DIR}/${CVE_CHECK_SUMMARY_FILE_NAME}"
37 37
38CVE_CHECK_DIR ??= "${DEPLOY_DIR}/cve" 38CVE_CHECK_DIR ??= "${DEPLOY_DIR}/cve"
39CVE_CHECK_RECIPE_FILE ?= "${CVE_CHECK_DIR}/${PN}"
39CVE_CHECK_MANIFEST ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cve" 40CVE_CHECK_MANIFEST ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cve"
40CVE_CHECK_COPY_FILES ??= "1" 41CVE_CHECK_COPY_FILES ??= "1"
41CVE_CHECK_CREATE_MANIFEST ??= "1" 42CVE_CHECK_CREATE_MANIFEST ??= "1"
@@ -118,7 +119,7 @@ python cve_check_write_rootfs_manifest () {
118 import shutil 119 import shutil
119 120
120 if d.getVar("CVE_CHECK_COPY_FILES") == "1": 121 if d.getVar("CVE_CHECK_COPY_FILES") == "1":
121 deploy_file = os.path.join(d.getVar("CVE_CHECK_DIR"), d.getVar("PN")) 122 deploy_file = d.getVar("CVE_CHECK_RECIPE_FILE")
122 if os.path.exists(deploy_file): 123 if os.path.exists(deploy_file):
123 bb.utils.remove(deploy_file) 124 bb.utils.remove(deploy_file)
124 125
@@ -355,9 +356,8 @@ def cve_write_data(d, patched, unpatched, whitelisted, cve_data):
355 f.write(write_string) 356 f.write(write_string)
356 357
357 if d.getVar("CVE_CHECK_COPY_FILES") == "1": 358 if d.getVar("CVE_CHECK_COPY_FILES") == "1":
358 cve_dir = d.getVar("CVE_CHECK_DIR") 359 deploy_file = d.getVar("CVE_CHECK_RECIPE_FILE")
359 bb.utils.mkdirhier(cve_dir) 360 bb.utils.mkdirhier(os.path.dirname(deploy_file))
360 deploy_file = os.path.join(cve_dir, d.getVar("PN"))
361 with open(deploy_file, "w") as f: 361 with open(deploy_file, "w") as f:
362 f.write(write_string) 362 f.write(write_string)
363 363