[openwrt/openwrt] package-metadata: add CPE information to JSON package manifests
LEDE Commits
lede-commits at lists.infradead.org
Thu Nov 2 07:45:21 PDT 2023
ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/fdeb7d6dd050a56ede48e29f9ebfb5fe351328a5
commit fdeb7d6dd050a56ede48e29f9ebfb5fe351328a5
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Wed Oct 19 15:46:45 2022 +0200
package-metadata: add CPE information to JSON package manifests
Common Platform Enumeration (CPE) is a structured naming scheme for
information technology systems, software, and packages.
In order for the information to be processed further, it should also be
available in JSON package manifests.
Signed-off-by: Petr Štetiar <ynezz at true.cz>
(cherry picked from commit 8562c65ff8aae3899cdb190319709500b7651492)
---
scripts/metadata.pm | 1 +
scripts/package-metadata.pl | 1 +
2 files changed, 2 insertions(+)
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index ee5a2945ca..e716f75d10 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -256,6 +256,7 @@ sub parse_package_metadata($) {
/^Source: \s*(.+)\s*$/ and $pkg->{source} = $1;
/^License: \s*(.+)\s*$/ and $pkg->{license} = $1;
/^LicenseFiles: \s*(.+)\s*$/ and $pkg->{licensefiles} = $1;
+ /^CPE-ID: \s*(.+)\s*$/ and $pkg->{cpe_id} = $1;
/^Default: \s*(.+)\s*$/ and $pkg->{default} = $1;
/^Provides: \s*(.+)\s*$/ and do {
my @vpkg = split /\s+/, $1;
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 6288584d65..dfb2800453 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -609,6 +609,7 @@ ${json}{
"version":"$pkg->{version}",
"category":"$pkg->{category}",
"license":"$pkg->{license}",
+"cpe_id":"$pkg->{cpe_id}",
"maintainer": [$pkg_maintainer],
"depends":[$pkg_deps]},
END_JSON
More information about the lede-commits
mailing list