From patchwork Wed Nov 4 14:51:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1394032 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CR8kc2xphz9sVM for ; Thu, 5 Nov 2020 01:52:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E0F6C2047B; Wed, 4 Nov 2020 14:52:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x1WP2c40n8Kq; Wed, 4 Nov 2020 14:52:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 742DE20443; Wed, 4 Nov 2020 14:52:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 9FEA71BF2CE for ; Wed, 4 Nov 2020 14:52:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 93A7F8685B for ; Wed, 4 Nov 2020 14:52:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ORGauBMgQeOT for ; Wed, 4 Nov 2020 14:52:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A25FE867C6 for ; Wed, 4 Nov 2020 14:52:00 +0000 (UTC) X-Originating-IP: 86.201.80.25 Received: from localhost (lfbn-tou-1-236-25.w86-201.abo.wanadoo.fr [86.201.80.25]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id F38DF1BF217; Wed, 4 Nov 2020 14:51:58 +0000 (UTC) From: Thomas Petazzoni To: Buildroot List Date: Wed, 4 Nov 2020 15:51:39 +0100 Message-Id: <20201104145145.1316167-6-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201104145145.1316167-1-thomas.petazzoni@bootlin.com> References: <20201104145145.1316167-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 05/10] package/pkg-utils.mk: expose CPE ID in show-info when available X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Weber , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 Reviewed-by: Matt Weber Tested-by: Heiko Thiery --- package/pkg-utils.mk | 3 +++ 1 file changed, 3 insertions(+) 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)))