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@true.cz>
This commit is contained in:
		@@ -256,6 +256,7 @@ sub parse_package_metadata($) {
 | 
				
			|||||||
		/^Source: \s*(.+)\s*$/ and $pkg->{source} = $1;
 | 
							/^Source: \s*(.+)\s*$/ and $pkg->{source} = $1;
 | 
				
			||||||
		/^License: \s*(.+)\s*$/ and $pkg->{license} = $1;
 | 
							/^License: \s*(.+)\s*$/ and $pkg->{license} = $1;
 | 
				
			||||||
		/^LicenseFiles: \s*(.+)\s*$/ and $pkg->{licensefiles} = $1;
 | 
							/^LicenseFiles: \s*(.+)\s*$/ and $pkg->{licensefiles} = $1;
 | 
				
			||||||
 | 
							/^CPE-ID: \s*(.+)\s*$/ and $pkg->{cpe_id} = $1;
 | 
				
			||||||
		/^Default: \s*(.+)\s*$/ and $pkg->{default} = $1;
 | 
							/^Default: \s*(.+)\s*$/ and $pkg->{default} = $1;
 | 
				
			||||||
		/^Provides: \s*(.+)\s*$/ and do {
 | 
							/^Provides: \s*(.+)\s*$/ and do {
 | 
				
			||||||
			my @vpkg = split /\s+/, $1;
 | 
								my @vpkg = split /\s+/, $1;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -611,6 +611,7 @@ ${json}{
 | 
				
			|||||||
"version":"$pkg->{version}",
 | 
					"version":"$pkg->{version}",
 | 
				
			||||||
"category":"$pkg->{category}",
 | 
					"category":"$pkg->{category}",
 | 
				
			||||||
"license":"$pkg->{license}",
 | 
					"license":"$pkg->{license}",
 | 
				
			||||||
 | 
					"cpe_id":"$pkg->{cpe_id}",
 | 
				
			||||||
"maintainer": [$pkg_maintainer],
 | 
					"maintainer": [$pkg_maintainer],
 | 
				
			||||||
"depends":[$pkg_deps]},
 | 
					"depends":[$pkg_deps]},
 | 
				
			||||||
END_JSON
 | 
					END_JSON
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user