mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Improve logic to account for Alma Linux
This commit is contained in:
parent
9baf9bb76a
commit
5f48635fe8
6 changed files with 61 additions and 14 deletions
|
@ -11,7 +11,7 @@ def test_services(install_salt, salt_cli, salt_minion):
|
|||
services_enabled = []
|
||||
if install_salt.distro_id in ("ubuntu", "debian"):
|
||||
services_enabled = ["salt-master", "salt-minion", "salt-syndic", "salt-api"]
|
||||
elif install_salt.distro_id in ("centos", "redhat", "amzn", "fedora"):
|
||||
elif install_salt.distro_id in ("almalinux", "centos", "redhat", "amzn", "fedora"):
|
||||
services_disabled = ["salt-master", "salt-minion", "salt-syndic", "salt-api"]
|
||||
elif install_salt.distro_id == "photon":
|
||||
services_enabled = ["salt-master", "salt-minion", "salt-syndic", "salt-api"]
|
||||
|
|
|
@ -188,7 +188,13 @@ def test_paths_log_rotation(
|
|||
):
|
||||
pytest.skip("Package path ownership was changed in salt 3006.4")
|
||||
|
||||
if install_salt.distro_id not in ("centos", "redhat", "amzn", "fedora"):
|
||||
if install_salt.distro_id not in (
|
||||
"almalinux",
|
||||
"centos",
|
||||
"redhat",
|
||||
"amzn",
|
||||
"fedora",
|
||||
):
|
||||
pytest.skip(
|
||||
"Only tests RedHat family packages till logrotation paths are resolved on Ubuntu/Debian, see issue 65231"
|
||||
)
|
||||
|
|
|
@ -14,6 +14,8 @@ def test_system_config(grains):
|
|||
"""
|
||||
if grains["os_family"] == "RedHat":
|
||||
if grains["osfinger"] in (
|
||||
"AlmaLinux-8",
|
||||
"AlmaLinux-9",
|
||||
"CentOS Stream-8",
|
||||
"CentOS Linux-8",
|
||||
"CentOS Stream-9",
|
||||
|
|
|
@ -126,7 +126,14 @@ def test_compare_pkg_versions_redhat_rc(version, install_salt):
|
|||
package of the same version. For example, v3004~rc1 should be less than
|
||||
v3004.
|
||||
"""
|
||||
if install_salt.distro_id not in ("centos", "redhat", "amzn", "fedora", "photon"):
|
||||
if install_salt.distro_id not in (
|
||||
"almalinux",
|
||||
"centos",
|
||||
"redhat",
|
||||
"amzn",
|
||||
"fedora",
|
||||
"photon",
|
||||
):
|
||||
pytest.skip("Only tests rpm packages")
|
||||
|
||||
pkg = [x for x in install_salt.pkgs if "rpm" in x]
|
||||
|
|
|
@ -111,7 +111,14 @@ class SaltPkgInstall:
|
|||
|
||||
@pkg_mngr.default
|
||||
def _default_pkg_mngr(self):
|
||||
if self.distro_id in ("centos", "redhat", "amzn", "fedora", "photon"):
|
||||
if self.distro_id in (
|
||||
"almalinux",
|
||||
"centos",
|
||||
"redhat",
|
||||
"amzn",
|
||||
"fedora",
|
||||
"photon",
|
||||
):
|
||||
return "yum"
|
||||
elif self.distro_id in ("ubuntu", "debian"):
|
||||
ret = self.proc.run("apt-get", "update")
|
||||
|
@ -120,7 +127,14 @@ class SaltPkgInstall:
|
|||
|
||||
@rm_pkg.default
|
||||
def _default_rm_pkg(self):
|
||||
if self.distro_id in ("centos", "redhat", "amzn", "fedora", "photon"):
|
||||
if self.distro_id in (
|
||||
"almalinux",
|
||||
"centos",
|
||||
"redhat",
|
||||
"amzn",
|
||||
"fedora",
|
||||
"photon",
|
||||
):
|
||||
return "remove"
|
||||
elif self.distro_id in ("ubuntu", "debian"):
|
||||
return "purge"
|
||||
|
@ -128,7 +142,14 @@ class SaltPkgInstall:
|
|||
@dbg_pkg.default
|
||||
def _default_dbg_pkg(self):
|
||||
dbg_pkg = None
|
||||
if self.distro_id in ("centos", "redhat", "amzn", "fedora", "photon"):
|
||||
if self.distro_id in (
|
||||
"almalinux",
|
||||
"centos",
|
||||
"redhat",
|
||||
"amzn",
|
||||
"fedora",
|
||||
"photon",
|
||||
):
|
||||
dbg_pkg = "salt-debuginfo"
|
||||
elif self.distro_id in ("ubuntu", "debian"):
|
||||
dbg_pkg = "salt-dbg"
|
||||
|
@ -144,7 +165,14 @@ class SaltPkgInstall:
|
|||
"salt-cloud",
|
||||
"salt-minion",
|
||||
]
|
||||
if self.distro_id in ("centos", "redhat", "amzn", "fedora", "photon"):
|
||||
if self.distro_id in (
|
||||
"almalinux",
|
||||
"centos",
|
||||
"redhat",
|
||||
"amzn",
|
||||
"fedora",
|
||||
"photon",
|
||||
):
|
||||
salt_pkgs.append("salt")
|
||||
elif self.distro_id in ("ubuntu", "debian"):
|
||||
salt_pkgs.append("salt-common")
|
||||
|
@ -518,13 +546,14 @@ class SaltPkgInstall:
|
|||
"3006.0"
|
||||
)
|
||||
distro_name = self.distro_name
|
||||
if distro_name == "centos" or distro_name == "fedora":
|
||||
if distro_name in ("almalinux", "centos", "fedora"):
|
||||
distro_name = "redhat"
|
||||
root_url = "salt/py3/"
|
||||
if self.classic:
|
||||
root_url = "py3/"
|
||||
|
||||
if self.distro_name in [
|
||||
"almalinux",
|
||||
"redhat",
|
||||
"centos",
|
||||
"amazon",
|
||||
|
|
15
tools/ci.py
15
tools/ci.py
|
@ -791,18 +791,21 @@ def pkg_matrix(
|
|||
parts = distro_slug.split("-")
|
||||
name = parts[0]
|
||||
version = parts[1]
|
||||
if name in ("debian", "ubuntu"):
|
||||
arch = "amd64"
|
||||
elif name in ("centos", "centosstream", "amazonlinux", "photonos"):
|
||||
arch = "x86_64"
|
||||
|
||||
if len(parts) > 2:
|
||||
arch = parts[2]
|
||||
elif name in ("debian", "ubuntu"):
|
||||
arch = "amd64"
|
||||
else:
|
||||
arch = "x86_64"
|
||||
|
||||
if name == "amazonlinux":
|
||||
name = "amazon"
|
||||
if "centos" in name:
|
||||
elif "centos" in name or name == "almalinux":
|
||||
name = "redhat"
|
||||
if "photon" in name:
|
||||
elif "photon" in name:
|
||||
name = "photon"
|
||||
|
||||
if name == "windows":
|
||||
prefixes = {
|
||||
"classic": "windows/",
|
||||
|
|
Loading…
Add table
Reference in a new issue