diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 253a76931..1df1bd8de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,32 +180,32 @@ jobs: - amazonlinux-2: - name: Amazon 2 + amazonlinux-2023: + name: Amazon 2023 if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' uses: ./.github/workflows/test-linux.yml needs: - lint - generate-actions-workflow with: - distro-slug: amazonlinux-2 - display-name: Amazon 2 - container-slug: amazonlinux-2 + distro-slug: amazonlinux-2023 + display-name: Amazon 2023 + container-slug: amazonlinux-2023 timeout: 20 instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' - amazonlinux-2023: - name: Amazon 2023 + debian-11: + name: Debian 11 if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' uses: ./.github/workflows/test-linux.yml needs: - lint - generate-actions-workflow with: - distro-slug: amazonlinux-2023 - display-name: Amazon 2023 - container-slug: amazonlinux-2023 + distro-slug: debian-11 + display-name: Debian 11 + container-slug: debian-11 timeout: 20 instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' @@ -225,6 +225,21 @@ jobs: instances: '["stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]' + debian-13: + name: Debian 13 + if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' + uses: ./.github/workflows/test-linux.yml + needs: + - lint + - generate-actions-workflow + with: + distro-slug: debian-13 + display-name: Debian 13 + container-slug: debian-13 + timeout: 20 + instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' + + photon-5: name: Photon OS 5 if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' @@ -297,9 +312,10 @@ jobs: - macos-13 - macos-14 - windows-2022 - - amazonlinux-2 - amazonlinux-2023 + - debian-11 - debian-12 + - debian-13 - photon-5 - rockylinux-8 - rockylinux-9 diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index 3a4ae7125..78f1d8216 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -6,18 +6,16 @@ os.chdir(os.path.abspath(os.path.dirname(__file__))) -# only test against current containers with systemd -# will add these when they become available with systemd -# "debian-11", -# "debian-13", +# "amazonlinux-2", # "fedora-40", # "photon-4", # "ubuntu-2004", # "ubuntu-2404", LINUX_DISTROS = [ - "amazonlinux-2", "amazonlinux-2023", + "debian-11", "debian-12", + "debian-13", "photon-5", "rockylinux-8", "rockylinux-9", @@ -34,44 +32,38 @@ "macos-14", ] -# only test against current containers with systemd -# will add these when they become available with systemd -# "debian-11", -# "debian-13", +# "amazonlinux-2", # "fedora-40", # "photon-4", # "ubuntu-2004", # "ubuntu-2404", STABLE_DISTROS = [ - "amazonlinux-2", "amazonlinux-2023", + "debian-11", "debian-12", + "debian-13", "photon-5", "rockylinux-8", "rockylinux-9", "ubuntu-2204", ] -# only test against current containers with systemd -# will add these when they become available with systemd -# "debian-11", -# "debian-13", +# "amazonlinux-2", # "fedora-40", # "photon-4", # "ubuntu-2004", # "ubuntu-2404", ONEDIR_DISTROS = [ - "amazonlinux-2", "amazonlinux-2023", + "debian-11", "debian-12", + "debian-13", "photon-5", "rockylinux-8", "rockylinux-9", "ubuntu-2204", ] -# only test against current containers with systemd -# will add these when they become available with systemd # "amazonlinux-2", # "amazonlinux-2023", # "photon-4", @@ -216,19 +208,6 @@ "windows-2022": "Windows 2022", } -## "amazonlinux-2": "systemd-amazonlinux-2", -## "amazonlinux-2023": "systemd-amazonlinux-2023", -## "debian-11": "systemd-debian-11", -## "debian-12": "systemd-debian-12", -## "debian-13": "systemd-debian-13", -## "fedora-40": "systemd-fedora-40", -## "photon-4": "systemd-photon-4", -## "photon-5": "systemd-photon-5", -## "rockylinux-8": "systemd-rockylinux-8", -## "rockylinux-9": "systemd-rockylinux-9", -## "ubuntu-2004": "systemd-ubuntu-20.04", -## "ubuntu-2204": "systemd-ubuntu-22.04", -## "ubuntu-2404": "systemd-ubuntu-24.04", CONTAINER_SLUG_NAMES = { "amazonlinux-2": "amazonlinux-2", "amazonlinux-2023": "amazonlinux-2023", diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 17646579b..bd29313b8 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2468,12 +2468,6 @@ __check_services_systemd() { servicename=$1 echodebug "Checking if service ${servicename} is enabled" - ## DGM - if [ "${DISTRO_NAME_L}" = "amazon_linux_ami" ] && [ "${DISTRO_VERSION}" = "2" ]; then - echoinfo "DGM skipping the is-enabled test on AMZN2, since command 'systemctl is-enabled salt-minion' is generating error msg 'Failed to get D-Bus connection: No such file or directory' on AMZN2 container" - return 0 - fi - if [ "$(systemctl is-enabled "${servicename}")" = "enabled" ]; then echodebug "Service ${servicename} is enabled" return 0 @@ -3195,11 +3189,8 @@ install_ubuntu_git_deps() { __PACKAGES="${__PACKAGES} util-linux-extra" fi - # Additionally install procps and pciutils which allows for Docker bootstraps. See 366#issuecomment-39666813 - __PACKAGES="${__PACKAGES} procps pciutils" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + # Additionally install procps pciutils and sudo which allows for Docker bootstraps. See 366#issuecomment-39666813 + __PACKAGES="${__PACKAGES} procps pciutils sudo" # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 @@ -3598,15 +3589,12 @@ install_debian_onedir_deps() { return 1 fi - # Additionally install procps and pciutils which allows for Docker bootstraps. See 366#issuecomment-39666813 - __PACKAGES='procps pciutils' + # Additionally install procps, pciutils and sudo which allows for Docker bootstraps. See 366#issuecomment-39666813 + __PACKAGES='procps pciutils sudo' # YAML module is used for generating custom master/minion configs __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-yaml" - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" - # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 @@ -3649,11 +3637,8 @@ install_debian_git_deps() { __PACKAGES="python${PY_PKG_VER}-dev python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" echodebug "install_debian_git_deps() Installing ${__PACKAGES}" - # Additionally install procps and pciutils which allows for Docker bootstraps. See 366#issuecomment-39666813 - __PACKAGES="${__PACKAGES} procps pciutils" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + # Additionally install procps, pciutils and sudo which allows for Docker bootstraps. See 366#issuecomment-39666813 + __PACKAGES="${__PACKAGES} procps pciutils sudo" # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 @@ -3953,14 +3938,11 @@ install_fedora_deps() { __PACKAGES="${__PACKAGES} dnf-utils libyaml procps-ng python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-pip python${PY_PKG_VER}-m2crypto python${PY_PKG_VER}-pyyaml" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd sudo" if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" fi - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" - # shellcheck disable=SC2086 __dnf_install_noinput ${__PACKAGES} ${_EXTRA_PACKAGES} || return 1 @@ -3991,10 +3973,7 @@ install_fedora_git_deps() { # shellcheck disable=SC2119 __git_clone_and_checkout || return 1 - __PACKAGES="python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc gcc-c++" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + __PACKAGES="python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc gcc-c++ sudo" # shellcheck disable=SC2086 __dnf_install_noinput ${__PACKAGES} || return 1 @@ -4123,10 +4102,7 @@ install_fedora_onedir_deps() { __install_saltstack_fedora_onedir_repository || return 1 fi - __PACKAGES="dnf-utils chkconfig procps-ng" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + __PACKAGES="dnf-utils chkconfig procps-ng sudo" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 @@ -4286,10 +4262,7 @@ install_centos_stable_deps() { __install_saltstack_rhel_onedir_repository || return 1 fi - __PACKAGES="yum-utils chkconfig procps-ng findutils" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + __PACKAGES="yum-utils chkconfig procps-ng findutils sudo" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 @@ -4335,9 +4308,6 @@ install_centos_stable() { __PACKAGES="${__PACKAGES} salt-api$MINOR_VER_STRG" fi - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" - # shellcheck disable=SC2086 yum makecache || return 1 __yum_install_noinput ${__PACKAGES} || return 1 @@ -4416,10 +4386,7 @@ install_centos_git_deps() { return 1 fi - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc sudo" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 @@ -4515,10 +4482,7 @@ install_centos_onedir_deps() { __install_saltstack_rhel_onedir_repository || return 1 fi - __PACKAGES="yum-utils chkconfig procps-ng findutils" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + __PACKAGES="yum-utils chkconfig procps-ng findutils sudo" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 @@ -5619,10 +5583,7 @@ install_amazon_linux_ami_2_git_deps() { # shellcheck disable=SC2119 __git_clone_and_checkout || return 1 - __PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools python${PY_PKG_VER}-devel gcc" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + __PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools python${PY_PKG_VER}-devel gcc sudo" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 @@ -5644,10 +5605,7 @@ install_amazon_linux_ami_2_deps() { # We need to install yum-utils before doing anything else when installing on # Amazon Linux ECS-optimized images. See issue #974. - __PACKAGES="yum-utils" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + __PACKAGES="yum-utils sudo" __yum_install_noinput ${__PACKAGES} @@ -5737,10 +5695,7 @@ install_amazon_linux_ami_2_onedir_deps() { # We need to install yum-utils before doing anything else when installing on # Amazon Linux ECS-optimized images. See issue #974. - __PACKAGES="yum-utils chkconfig procps-ng findutils" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + __PACKAGES="yum-utils chkconfig procps-ng findutils sudo" __yum_install_noinput ${__PACKAGES} @@ -5897,10 +5852,7 @@ install_amazon_linux_ami_2023_git_deps() { # shellcheck disable=SC2119 __git_clone_and_checkout || return 1 - __PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools python${PY_PKG_VER}-devel gcc" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + __PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools python${PY_PKG_VER}-devel gcc sudo" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 @@ -5925,10 +5877,7 @@ install_amazon_linux_ami_2023_onedir_deps() { # We need to install yum-utils before doing anything else when installing on # Amazon Linux ECS-optimized images. See issue #974. - __PACKAGES="yum-utils chkconfig procps-ng findutils" - - # ensure sudo installed - __PACKAGES="${__PACKAGES} sudo" + __PACKAGES="yum-utils chkconfig procps-ng findutils sudo" __yum_install_noinput ${__PACKAGES} diff --git a/tests/integration/test_installation.py b/tests/integration/test_installation.py index 993f24b0e..94a9d416e 100644 --- a/tests/integration/test_installation.py +++ b/tests/integration/test_installation.py @@ -46,7 +46,10 @@ def run_salt_call(cmd): result = subprocess.run(cmdl, capture_output=True, text=True) except TypeError: result = subprocess.run( - cmdl, stdout=PIPE, stderr=PIPE, universal_newlines=True + cmdl, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + universal_newlines=True, ) print(f"DGM run_salt_call result '{result}'", flush=True) if 0 == result.returncode: