mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
Adding AlmaLinux OS Support (#652)
* Adding AlmaLinux Support Signed-off-by: Bala Raman <srbala@gmail.com> * Adding AlmaLinux Support Signed-off-by: Bala Raman <srbala@gmail.com>
This commit is contained in:
parent
7957294b26
commit
7a359dc16b
@ -6,10 +6,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
hashiVer "github.com/hashicorp/go-version"
|
|
||||||
|
|
||||||
"github.com/anchore/syft/internal"
|
"github.com/anchore/syft/internal"
|
||||||
"github.com/anchore/syft/syft/source"
|
"github.com/anchore/syft/syft/source"
|
||||||
|
hashiVer "github.com/hashicorp/go-version"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -128,6 +127,11 @@ func TestIdentifyDistro(t *testing.T) {
|
|||||||
Type: RockyLinux,
|
Type: RockyLinux,
|
||||||
Version: "8.4.0",
|
Version: "8.4.0",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fixture: "test-fixtures/os/almalinux",
|
||||||
|
Type: AlmaLinux,
|
||||||
|
Version: "8.4.0",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
observedDistros := internal.NewStringSet()
|
observedDistros := internal.NewStringSet()
|
||||||
|
|||||||
15
syft/distro/test-fixtures/os/almalinux/etc/os-release
Normal file
15
syft/distro/test-fixtures/os/almalinux/etc/os-release
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
NAME="AlmaLinux"
|
||||||
|
VERSION="8.4 (Electric Cheetah)"
|
||||||
|
ID="almalinux"
|
||||||
|
ID_LIKE="rhel centos fedora"
|
||||||
|
VERSION_ID="8.4"
|
||||||
|
PLATFORM_ID="platform:el8"
|
||||||
|
PRETTY_NAME="AlmaLinux 8.4 (Electric Cheetah)"
|
||||||
|
ANSI_COLOR="0;34"
|
||||||
|
CPE_NAME="cpe:/o:almalinux:almalinux:8.4:GA"
|
||||||
|
HOME_URL="https://almalinux.org/"
|
||||||
|
DOCUMENTATION_URL="https://wiki.almalinux.org/"
|
||||||
|
BUG_REPORT_URL="https://bugs.almalinux.org/"
|
||||||
|
|
||||||
|
ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8"
|
||||||
|
ALMALINUX_MANTISBT_PROJECT_VERSION="8.4"
|
||||||
@ -22,6 +22,7 @@ const (
|
|||||||
Windows Type = "windows"
|
Windows Type = "windows"
|
||||||
Mariner Type = "mariner"
|
Mariner Type = "mariner"
|
||||||
RockyLinux Type = "rockylinux"
|
RockyLinux Type = "rockylinux"
|
||||||
|
AlmaLinux Type = "almalinux"
|
||||||
)
|
)
|
||||||
|
|
||||||
// All contains all Linux distribution options
|
// All contains all Linux distribution options
|
||||||
@ -42,6 +43,7 @@ var All = []Type{
|
|||||||
Windows,
|
Windows,
|
||||||
Mariner,
|
Mariner,
|
||||||
RockyLinux,
|
RockyLinux,
|
||||||
|
AlmaLinux,
|
||||||
}
|
}
|
||||||
|
|
||||||
// IDMapping connects a distro ID like "ubuntu" to a Distro type
|
// IDMapping connects a distro ID like "ubuntu" to a Distro type
|
||||||
@ -62,6 +64,7 @@ var IDMapping = map[string]Type{
|
|||||||
"windows": Windows,
|
"windows": Windows,
|
||||||
"mariner": Mariner,
|
"mariner": Mariner,
|
||||||
"rocky": RockyLinux,
|
"rocky": RockyLinux,
|
||||||
|
"almalinux": AlmaLinux,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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