Commit 4b4519b9 authored by Jordan Petridіs's avatar Jordan Petridіs 🌱
Browse files

cerbero: add support for amazon linux 2

amazon linux 2 is based of rhel 7

Part-of: <!689>
parent d9e53dd1
Pipeline #292332 passed with stages
in 71 minutes and 28 seconds
...@@ -120,6 +120,7 @@ class DistroVersion: ...@@ -120,6 +120,7 @@ class DistroVersion:
REDHAT_8 = 'redhat_8' REDHAT_8 = 'redhat_8'
# Amazon Linux seems to be RedHat/CentOS-based # Amazon Linux seems to be RedHat/CentOS-based
AMAZON_LINUX = 'amazon_linux' AMAZON_LINUX = 'amazon_linux'
AMAZON_LINUX_2 = 'amazon_linux_2'
ARCH_ROLLING = 'rolling' ARCH_ROLLING = 'rolling'
GENTOO_VERSION = 'gentoo-version' GENTOO_VERSION = 'gentoo-version'
OPENSUSE_42_2 = 'opensuse_42_2' OPENSUSE_42_2 = 'opensuse_42_2'
......
...@@ -263,7 +263,7 @@ Terminating.''', file=sys.stderr) ...@@ -263,7 +263,7 @@ Terminating.''', file=sys.stderr)
distro_version = DistroVersion.DEBIAN_SID distro_version = DistroVersion.DEBIAN_SID
else: else:
raise FatalError("Distribution '%s' not supported" % str(d)) raise FatalError("Distribution '%s' not supported" % str(d))
elif d[0] in ['RedHat', 'Fedora', 'CentOS', 'Red Hat Enterprise Linux Server', 'CentOS Linux']: elif d[0] in ['RedHat', 'Fedora', 'CentOS', 'Red Hat Enterprise Linux Server', 'CentOS Linux', 'Amazon Linux']:
distro = Distro.REDHAT distro = Distro.REDHAT
if d[1] == '16': if d[1] == '16':
distro_version = DistroVersion.FEDORA_16 distro_version = DistroVersion.FEDORA_16
...@@ -309,6 +309,8 @@ Terminating.''', file=sys.stderr) ...@@ -309,6 +309,8 @@ Terminating.''', file=sys.stderr)
distro_version = DistroVersion.REDHAT_7 distro_version = DistroVersion.REDHAT_7
elif d[1].startswith('8.'): elif d[1].startswith('8.'):
distro_version = DistroVersion.REDHAT_8 distro_version = DistroVersion.REDHAT_8
elif d[0] == 'Amazon Linux' and d[1].startswith('2'):
distro_version = DistroVersion.AMAZON_LINUX_2
elif d[1] == 'amazon': elif d[1] == 'amazon':
distro_version = DistroVersion.AMAZON_LINUX distro_version = DistroVersion.AMAZON_LINUX
else: else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment