summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Petridis <jordan@centricular.com>2021-03-29 21:57:02 +0300
committerJordan Petridis <jordan@centricular.com>2021-03-30 08:07:00 +0300
commit4b4519b9a95b1bd03823b7c311e6230b0ba1fe1a (patch)
treed66a4e840a0a22ad31a27e00bcc2d98a72859f1b
parentd9e53dd16d6588961c13dffaf7b00b7534cfe816 (diff)
cerbero: add support for amazon linux 2
amazon linux 2 is based of rhel 7 Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/689>
-rw-r--r--cerbero/enums.py1
-rw-r--r--cerbero/utils/__init__.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/cerbero/enums.py b/cerbero/enums.py
index 3fba0f03..eda3883e 100644
--- a/cerbero/enums.py
+++ b/cerbero/enums.py
@@ -120,6 +120,7 @@ class DistroVersion:
REDHAT_8 = 'redhat_8'
# Amazon Linux seems to be RedHat/CentOS-based
AMAZON_LINUX = 'amazon_linux'
+ AMAZON_LINUX_2 = 'amazon_linux_2'
ARCH_ROLLING = 'rolling'
GENTOO_VERSION = 'gentoo-version'
OPENSUSE_42_2 = 'opensuse_42_2'
diff --git a/cerbero/utils/__init__.py b/cerbero/utils/__init__.py
index 7effed97..3a58827f 100644
--- a/cerbero/utils/__init__.py
+++ b/cerbero/utils/__init__.py
@@ -263,7 +263,7 @@ Terminating.''', file=sys.stderr)
distro_version = DistroVersion.DEBIAN_SID
else:
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
if d[1] == '16':
distro_version = DistroVersion.FEDORA_16
@@ -309,6 +309,8 @@ Terminating.''', file=sys.stderr)
distro_version = DistroVersion.REDHAT_7
elif d[1].startswith('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':
distro_version = DistroVersion.AMAZON_LINUX
else: