mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 08:53:15 +01: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
@ -75,6 +75,11 @@ func TestIdentifyDistro(t *testing.T) {
|
|||||||
Type: OpenSuseLeap,
|
Type: OpenSuseLeap,
|
||||||
Version: "15.2.0",
|
Version: "15.2.0",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fixture: "test-fixtures/os/photon",
|
||||||
|
Type: Photon,
|
||||||
|
Version: "2.0.0",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fixture: "test-fixtures/os/arch",
|
fixture: "test-fixtures/os/arch",
|
||||||
Type: ArchLinux,
|
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"
|
OracleLinux Type = "oraclelinux"
|
||||||
ArchLinux Type = "archlinux"
|
ArchLinux Type = "archlinux"
|
||||||
OpenSuseLeap Type = "opensuseleap"
|
OpenSuseLeap Type = "opensuseleap"
|
||||||
|
Photon Type = "photon"
|
||||||
)
|
)
|
||||||
|
|
||||||
// All contains all Linux distribution options
|
// All contains all Linux distribution options
|
||||||
@ -32,6 +33,7 @@ var All = []Type{
|
|||||||
OracleLinux,
|
OracleLinux,
|
||||||
ArchLinux,
|
ArchLinux,
|
||||||
OpenSuseLeap,
|
OpenSuseLeap,
|
||||||
|
Photon,
|
||||||
}
|
}
|
||||||
|
|
||||||
// IDMapping connects a distro ID like "ubuntu" to a Distro type
|
// IDMapping connects a distro ID like "ubuntu" to a Distro type
|
||||||
@ -47,6 +49,7 @@ var IDMapping = map[string]Type{
|
|||||||
"ol": OracleLinux,
|
"ol": OracleLinux,
|
||||||
"arch": ArchLinux,
|
"arch": ArchLinux,
|
||||||
"opensuse-leap": OpenSuseLeap,
|
"opensuse-leap": OpenSuseLeap,
|
||||||
|
"photon": Photon,
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns the string representation of the given Linux distribution.
|
// String returns the string representation of the given Linux distribution.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user