[openwrt/openwrt] toolchain: assign PKG_CPE_ID

LEDE Commits lede-commits at lists.infradead.org
Wed Sep 27 13:22:51 PDT 2023


lynxis pushed a commit to openwrt/openwrt.git, branch openwrt-19.07:
https://git.openwrt.org/1e1d3e4eff5fdd48a1efaf5f6923a0d9d82e28a8

commit 1e1d3e4eff5fdd48a1efaf5f6923a0d9d82e28a8
Author: Alexander Couzens <lynxis at fe80.eu>
AuthorDate: Tue Sep 19 00:23:40 2023 +0200

    toolchain: assign PKG_CPE_ID
    
    The PKG_CPE_ID links to NIST CPE version 2.2.
    Assign PKG_CPE_ID to all remaining package which have a CPE ID.
    Not every package has a CPE id.
    
    Related: https://github.com/openwrt/packages/issues/8534
    Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 toolchain/binutils/Makefile       | 1 +
 toolchain/gcc/common.mk           | 1 +
 toolchain/gdb/Makefile            | 1 +
 toolchain/glibc/common.mk         | 1 +
 toolchain/kernel-headers/Makefile | 1 +
 toolchain/nasm/Makefile           | 2 +-
 6 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 24eaf70566..150eaea560 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -12,6 +12,7 @@ BIN_VERSION:=$(PKG_VERSION)
 
 PKG_SOURCE_URL:=@GNU/binutils/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_CPE_ID:=cpe:/a:gnu:binutils
 
 TAR_OPTIONS += --exclude='*.rej'
 
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index e2dfcea6cb..44a1891d4a 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -27,6 +27,7 @@ GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_CPE_ID:=cpe:/a:gnu:gcc
 
 ifeq ($(PKG_VERSION),5.5.0)
   PKG_HASH:=530cea139d82fe542b358961130c69cfde8b3d14556370b65823d2f91f0ced87
diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile
index 41ba9853fd..e7c6c72a9a 100644
--- a/toolchain/gdb/Makefile
+++ b/toolchain/gdb/Makefile
@@ -22,6 +22,7 @@ PKG_VERSION:=8.3.1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/gdb
 PKG_HASH:=1e55b4d7cdca7b34be12f4ceae651623aa73b2fd640152313f9f66a7149757c4
+PKG_CPE_ID:=cpe:/a:gnu:gdb
 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
 endif
 
diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk
index 4ddf55dfa9..4053b66499 100644
--- a/toolchain/glibc/common.mk
+++ b/toolchain/glibc/common.mk
@@ -15,6 +15,7 @@ PKG_SOURCE_VERSION:=daf88b1dd1a41fcb324801c02ead7a8d5aac3851
 PKG_MIRROR_HASH:=fc78ef46c52c922ea44d079533d4d3017a0c921b4ed9aab8bb1dd071322b169f
 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_CPE_ID:=cpe:/a:gnu:glibc
 
 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_SOURCE_SUBDIR)
 CUR_BUILD_DIR:=$(HOST_BUILD_DIR)-$(VARIANT)
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index 6931881493..bf10527141 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -17,6 +17,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=linux
 PKG_VERSION:=$(LINUX_VERSION)
 PKG_SOURCE:=$(LINUX_SOURCE)
+PKG_CPE_ID:=cpe:/o:linux:linux_kernel
 ifneq ($(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
   PKG_SOURCE_PROTO:=git
   PKG_SOURCE_URL:=$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI))
diff --git a/toolchain/nasm/Makefile b/toolchain/nasm/Makefile
index 3efcc86203..fc5bc2d2f7 100644
--- a/toolchain/nasm/Makefile
+++ b/toolchain/nasm/Makefile
@@ -9,8 +9,8 @@ PKG_VERSION:=2.14
 
 PKG_SOURCE_URL:=https://www.nasm.us/pub/nasm/releasebuilds/$(PKG_VERSION)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-
 PKG_HASH:=97c615dbf02ef80e4e2b6c385f7e28368d51efc214daa98e600ca4572500eec0
+PKG_CPE_ID:=cpe:/a:nasm:nasm
 
 HOST_BUILD_PARALLEL:=1
 




More information about the lede-commits mailing list