mirror of
https://github.com/anchore/syft
synced 2024-11-10 14:24:12 +00:00
Merge pull request #341 from octarinesec/add_photon_to_list_of_distros
Added Photon OS to the list of distros
This commit is contained in:
commit
a83d79f330
3 changed files with 16 additions and 0 deletions
|
@ -75,6 +75,11 @@ func TestIdentifyDistro(t *testing.T) {
|
|||
Type: OpenSuseLeap,
|
||||
Version: "15.2.0",
|
||||
},
|
||||
{
|
||||
fixture: "test-fixtures/os/photon",
|
||||
Type: Photon,
|
||||
Version: "2.0.0",
|
||||
},
|
||||
{
|
||||
fixture: "test-fixtures/os/arch",
|
||||
Type: ArchLinux,
|
||||
|
|
8
syft/distro/test-fixtures/os/photon/etc/os-release
Normal file
8
syft/distro/test-fixtures/os/photon/etc/os-release
Normal file
|
@ -0,0 +1,8 @@
|
|||
NAME="VMware Photon OS"
|
||||
VERSION="2.0"
|
||||
ID=photon
|
||||
VERSION_ID=2.0
|
||||
PRETTY_NAME="VMware Photon OS/Linux"
|
||||
ANSI_COLOR="1;34"
|
||||
HOME_URL="https://vmware.github.io/photon/"
|
||||
BUG_REPORT_URL="https://github.com/vmware/photon/issues"
|
|
@ -17,6 +17,7 @@ const (
|
|||
OracleLinux Type = "oraclelinux"
|
||||
ArchLinux Type = "archlinux"
|
||||
OpenSuseLeap Type = "opensuseleap"
|
||||
Photon Type = "photon"
|
||||
)
|
||||
|
||||
// All contains all Linux distribution options
|
||||
|
@ -32,6 +33,7 @@ var All = []Type{
|
|||
OracleLinux,
|
||||
ArchLinux,
|
||||
OpenSuseLeap,
|
||||
Photon,
|
||||
}
|
||||
|
||||
// IDMapping connects a distro ID like "ubuntu" to a Distro type
|
||||
|
@ -47,6 +49,7 @@ var IDMapping = map[string]Type{
|
|||
"ol": OracleLinux,
|
||||
"arch": ArchLinux,
|
||||
"opensuse-leap": OpenSuseLeap,
|
||||
"photon": Photon,
|
||||
}
|
||||
|
||||
// String returns the string representation of the given Linux distribution.
|
||||
|
|
Loading…
Reference in a new issue