Add Rocky Linux support

Change-Id: Id5b6b02736ff368698dde33336c2570de2a2834f
This commit is contained in:
Michał Nasiadka 2021-09-16 12:06:26 +02:00
parent 623c2e0486
commit 53bf817ffc
3 changed files with 23 additions and 2 deletions

View File

@ -353,7 +353,8 @@ class Depends(object):
"fedora",
"opensuseproject", "opensuse", "opensuse-leap",
"opensuse-tumbleweed", "sles", "suselinux",
"ol", "oracle"]:
"ol", "oracle",
"rocky"]:
# Distro aliases
if distro_id in ["redhatenterpriseserver",
"redhatenterpriseworkstation"]:
@ -403,7 +404,8 @@ class Depends(object):
atoms.update(self.releasebits("sles", release))
elif "fedora" in distro_id:
atoms.add(PY2 if release_version < as_ver("23") else PY3)
elif any(w in distro_id for w in ["centos", "oracle", "rhel"]):
elif any(w in distro_id for w in ["centos", "oracle", "rhel",
"rocky"]):
atoms.add(PY2 if release_version < as_ver("8") else PY3)
# Family aliases

View File

@ -0,0 +1,13 @@
NAME="Rocky Linux"
VERSION="8.4 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.4 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8.4:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"

View File

@ -245,6 +245,12 @@ class TestDepends(TestCase):
self.assertThat(
depends.platform_profiles(), Contains("platform:rpm"))
def test_detects_rocky(self):
with DistroFixture("rocky"):
depends = Depends("")
self.assertThat(
depends.platform_profiles(), Contains("platform:rpm"))
def test_detects_release(self):
with DistroFixture("Ubuntu"):
depends = Depends("")