Add pacman (alpm) parser support (#943)

Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
Morten Linderud
2022-06-13 18:51:37 +00:00
committed by GitHub
co-authored by Christopher Phillips
parent f15d4a9984
commit e72d68b0c6
42 changed files with 2348 additions and 43 deletions
+6
View File
@@ -9,6 +9,7 @@ const (
// the full set of supported packages
UnknownPkg Type = "UnknownPackage"
ApkPkg Type = "apk"
AlpmPkg Type = "alpm"
GemPkg Type = "gem"
DebPkg Type = "deb"
RpmPkg Type = "rpm"
@@ -27,6 +28,7 @@ const (
// AllPkgs represents all supported package types
var AllPkgs = []Type{
ApkPkg,
AlpmPkg,
GemPkg,
DebPkg,
RpmPkg,
@@ -47,6 +49,8 @@ func (t Type) PackageURLType() string {
switch t {
case ApkPkg:
return "alpine"
case AlpmPkg:
return "alpm"
case GemPkg:
return packageurl.TypeGem
case DebPkg:
@@ -90,6 +94,8 @@ func TypeByName(name string) Type {
return DebPkg
case packageurl.TypeRPM:
return RpmPkg
case "alpm":
return AlpmPkg
case "alpine":
return ApkPkg
case packageurl.TypeMaven: