Updated the distro package to include SLES type to expand support, this change will not include the new sqlite3 rpmDB format

Signed-off-by: Toure Dunnon <toure.dunnon@anchore.com>
This commit is contained in:
Toure Dunnon 2021-08-23 14:35:49 -04:00
parent ff828fbac2
commit 0f0fe59bf2
No known key found for this signature in database
GPG Key ID: 0BC150AECC1706B7
3 changed files with 17 additions and 0 deletions

View File

@ -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/sles",
Type: SLES,
Version: "15.2.0",
},
{ {
fixture: "test-fixtures/os/photon", fixture: "test-fixtures/os/photon",
Type: Photon, Type: Photon,

View File

@ -0,0 +1,9 @@
NAME="SLES"
VERSION="15-SP2"
VERSION_ID="15.2"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP2"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp2"
DOCUMENTATION_URL="https://documentation.suse.com/"

View File

@ -17,6 +17,7 @@ const (
OracleLinux Type = "oraclelinux" OracleLinux Type = "oraclelinux"
ArchLinux Type = "archlinux" ArchLinux Type = "archlinux"
OpenSuseLeap Type = "opensuseleap" OpenSuseLeap Type = "opensuseleap"
SLES Type = "sles"
Photon Type = "photon" Photon Type = "photon"
Windows Type = "windows" Windows Type = "windows"
) )
@ -34,6 +35,7 @@ var All = []Type{
OracleLinux, OracleLinux,
ArchLinux, ArchLinux,
OpenSuseLeap, OpenSuseLeap,
SLES,
Photon, Photon,
Windows, Windows,
} }
@ -51,6 +53,7 @@ var IDMapping = map[string]Type{
"ol": OracleLinux, "ol": OracleLinux,
"arch": ArchLinux, "arch": ArchLinux,
"opensuse-leap": OpenSuseLeap, "opensuse-leap": OpenSuseLeap,
"sles": SLES,
"photon": Photon, "photon": Photon,
"windows": Windows, "windows": Windows,
} }