aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2020-11-04 15:51:39 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2020-11-26 16:36:35 +0100
commitc02d4652747aa3d86197ac6879b94955c95a5286 (patch)
tree7774222b14ae7e73320ca816077f742838056b20
parentdb24c08bea4a2e7f16ab8f2ff394b9b6dae119f1 (diff)
downloadbuildroot-c02d4652747aa3d86197ac6879b94955c95a5286.tar.gz
buildroot-c02d4652747aa3d86197ac6879b94955c95a5286.tar.bz2
package/pkg-utils.mk: expose CPE ID in show-info when available
This commit exposes a new per-package property in the "make show-info" JSON output: "cpe-id", which exists when a valid CPE ID is available for the package. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com> Tested-by: Heiko Thiery <heiko.thiery@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/pkg-utils.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 4fcb076e21..a2cc160d0b 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -119,6 +119,9 @@ define _json-info-pkg
"reverse_dependencies": [
$(call make-comma-list,$(sort $($(1)_RDEPENDENCIES)))
]
+ $(if $($(1)_CPE_ID_VALID), \
+ $(comma) "cpe-id": "$($(1)_CPE_ID)" \
+ )
$(if $($(1)_IGNORE_CVES),
$(comma) "ignore_cves": [
$(call make-comma-list,$(sort $($(1)_IGNORE_CVES)))