mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
Add new distro and mapping to support Rocky Linux distro identification (#624)
Signed-off-by: Swathi Gangisetty <swathi@anchore.com>
This commit is contained in:
parent
25835ef589
commit
e732f419f8
@ -123,6 +123,11 @@ func TestIdentifyDistro(t *testing.T) {
|
||||
Type: Mariner,
|
||||
Version: "1.0.0",
|
||||
},
|
||||
{
|
||||
fixture: "test-fixtures/os/rockylinux",
|
||||
Type: RockyLinux,
|
||||
Version: "8.4.0",
|
||||
},
|
||||
}
|
||||
|
||||
observedDistros := internal.NewStringSet()
|
||||
|
||||
13
syft/distro/test-fixtures/os/rockylinux/etc/os-release
Normal file
13
syft/distro/test-fixtures/os/rockylinux/etc/os-release
Normal file
@ -0,0 +1,13 @@
|
||||
NAME="Rocky Linux"
|
||||
VERSION="8.4 (Green Obsidian)"
|
||||
ID="rocky"
|
||||
ID_LIKE="rhel fedora"
|
||||
VERSION_ID="8.4"
|
||||
PLATFORM_ID="platform:el8"
|
||||
PRETTY_NAME="Rocky Linux 8.4 (Green Obsidian)"
|
||||
ANSI_COLOR="0;32"
|
||||
CPE_NAME="cpe:/o:rocky:rocky:8.4:GA"
|
||||
HOME_URL="https://rockylinux.org/"
|
||||
BUG_REPORT_URL="https://bugs.rockylinux.org/"
|
||||
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
|
||||
ROCKY_SUPPORT_PRODUCT_VERSION="8"
|
||||
@ -21,6 +21,7 @@ const (
|
||||
Photon Type = "photon"
|
||||
Windows Type = "windows"
|
||||
Mariner Type = "mariner"
|
||||
RockyLinux Type = "rockylinux"
|
||||
)
|
||||
|
||||
// All contains all Linux distribution options
|
||||
@ -40,6 +41,7 @@ var All = []Type{
|
||||
Photon,
|
||||
Windows,
|
||||
Mariner,
|
||||
RockyLinux,
|
||||
}
|
||||
|
||||
// IDMapping connects a distro ID like "ubuntu" to a Distro type
|
||||
@ -59,6 +61,7 @@ var IDMapping = map[string]Type{
|
||||
"photon": Photon,
|
||||
"windows": Windows,
|
||||
"mariner": Mariner,
|
||||
"rocky": RockyLinux,
|
||||
}
|
||||
|
||||
// String returns the string representation of the given Linux distribution.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user