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,
Version: "15.2.0",
},
{
fixture: "test-fixtures/os/sles",
Type: SLES,
Version: "15.2.0",
},
{
fixture: "test-fixtures/os/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"
ArchLinux Type = "archlinux"
OpenSuseLeap Type = "opensuseleap"
SLES Type = "sles"
Photon Type = "photon"
Windows Type = "windows"
)
@ -34,6 +35,7 @@ var All = []Type{
OracleLinux,
ArchLinux,
OpenSuseLeap,
SLES,
Photon,
Windows,
}
@ -51,6 +53,7 @@ var IDMapping = map[string]Type{
"ol": OracleLinux,
"arch": ArchLinux,
"opensuse-leap": OpenSuseLeap,
"sles": SLES,
"photon": Photon,
"windows": Windows,
}