From 9d1c07d364b0e0619fe78982eca49efd984e2360 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Wed, 27 Jul 2022 13:25:02 -0700 Subject: [PATCH 1/3] replace all references of tiamat to onedir --- bootstrap-salt.sh | 166 +++++++++++++++++++++++----------------------- 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 84b30ac..cb476ad 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -268,7 +268,7 @@ _CUSTOM_MASTER_CONFIG="null" _CUSTOM_MINION_CONFIG="null" _QUIET_GIT_INSTALLATION=$BS_FALSE _REPO_URL="repo.saltproject.io" -_TIAMAT_DIR="salt" +_ONEDIR_DIR="salt" _PY_EXE="python3" _INSTALL_PY="$BS_FALSE" _TORNADO_MAX_PY3_VERSION="5.0" @@ -302,13 +302,13 @@ __usage() { - git Install from the head of the master branch - git [ref] Install from any git ref (such as a branch, tag, or commit) - - tiamat Install latest tiamat release. - - tiamat [version] Install a specific version. Only supported for - tiamat packages available at repo.saltproject.io + - onedir Install latest onedir release. + - onedir [version] Install a specific version. Only supported for + onedir packages available at repo.saltproject.io - - tiamat_rc Install latest tiamat RC release. - - tiamat_rc [version] Install a specific version. Only supported for - tiamat RC packages available at repo.saltproject.io + - onedir_rc Install latest onedir RC release. + - onedir_rc [version] Install a specific version. Only supported for + onedir RC packages available at repo.saltproject.io Examples: - ${__ScriptName} @@ -320,10 +320,10 @@ __usage() { - ${__ScriptName} git 2017.7 - ${__ScriptName} git v2017.7.2 - ${__ScriptName} git 06f249901a2e2f1ed310d58ea3921a129f214358 - - ${__ScriptName} tiamat - - ${__ScriptName} tiamat 3005 - - ${__ScriptName} tiamat_rc - - ${__ScriptName} tiamat_rc 3005 + - ${__ScriptName} onedir + - ${__ScriptName} onedir 3005 + - ${__ScriptName} onedir_rc + - ${__ScriptName} onedir_rc 3005 Options: -a Pip install all Python pkg dependencies for Salt. Requires -V to install @@ -594,7 +594,7 @@ if [ "$#" -gt 0 ];then fi # Check installation type -if [ "$(echo "$ITYPE" | grep -E '(stable|testing|git|tiamat|tiamat_rc)')" = "" ]; then +if [ "$(echo "$ITYPE" | grep -E '(stable|testing|git|onedir|onedir_rc)')" = "" ]; then echoerror "Installation type \"$ITYPE\" is not known..." exit 1 fi @@ -632,17 +632,17 @@ elif [ "$ITYPE" = "stable" ]; then fi fi -elif [ "$ITYPE" = "tiamat" ]; then +elif [ "$ITYPE" = "onedir" ]; then if [ "$#" -eq 0 ];then - TIAMAT_REV="latest" + ONEDIR_REV="latest" else if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then - TIAMAT_REV="$1" + ONEDIR_REV="$1" shift elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)$')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix - TIAMAT_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') - TIAMAT_REV="minor/$TIAMAT_REV" + ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') + ONEDIR_REV="minor/$ONEDIR_REV" shift else echo "Unknown stable version: $1 (valid: 3005, latest.)" @@ -650,23 +650,23 @@ elif [ "$ITYPE" = "tiamat" ]; then fi fi -elif [ "$ITYPE" = "tiamat_rc" ]; then - # Change the _TIAMAT_DIR to be the location for the RC packages - _TIAMAT_DIR="salt_rc/salt" +elif [ "$ITYPE" = "onedir_rc" ]; then + # Change the _ONEDIR_DIR to be the location for the RC packages + _ONEDIR_DIR="salt_rc/salt" - # Change ITYPE to tiamat so we use the regular Tiamat functions - ITYPE="tiamat" + # Change ITYPE to onedir so we use the regular onedir functions + ITYPE="onedir" if [ "$#" -eq 0 ];then - TIAMAT_REV="latest" + ONEDIR_REV="latest" else if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then - TIAMAT_REV="$1" + ONEDIR_REV="$1" shift elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?rc[0-9]-[0-9]$)')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix - #TIAMAT_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') - TIAMAT_REV="minor/$1" + #ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') + ONEDIR_REV="minor/$1" shift else echo "Unknown stable version: $1 (valid: 3005, latest.)" @@ -3023,7 +3023,7 @@ __install_saltstack_ubuntu_repository() { __wait_for_apt apt-get update || return 1 } -__install_saltstack_ubuntu_tiamat_repository() { +__install_saltstack_ubuntu_onedir_repository() { # Workaround for latest non-LTS Ubuntu if { [ "$DISTRO_MAJOR_VERSION" -eq 20 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]; } || \ [ "$DISTRO_MAJOR_VERSION" -eq 21 ]; then @@ -3057,7 +3057,7 @@ __install_saltstack_ubuntu_tiamat_repository() { fi # SaltStack's stable Ubuntu repository: - SALTSTACK_UBUNTU_URL="${HTTP_VAL}://${_REPO_URL}/${_TIAMAT_DIR}/${__PY_VERSION_REPO}/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/${TIAMAT_REV}/" + SALTSTACK_UBUNTU_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/${ONEDIR_REV}/" echo "$__REPO_ARCH_DEB $SALTSTACK_UBUNTU_URL $UBUNTU_CODENAME main" > /etc/apt/sources.list.d/salt.list __apt_key_fetch "${SALTSTACK_UBUNTU_URL}salt-archive-keyring.gpg" || return 1 @@ -3237,7 +3237,7 @@ install_ubuntu_git_deps() { return 0 } -install_ubuntu_tiamat_deps() { +install_ubuntu_onedir_deps() { if [ "${_SLEEP}" -eq "${__DEFAULT_SLEEP}" ] && [ "$DISTRO_MAJOR_VERSION" -lt 16 ]; then # The user did not pass a custom sleep value as an argument, let's increase the default value echodebug "On Ubuntu systems we increase the default sleep value to 10." @@ -3269,7 +3269,7 @@ install_ubuntu_tiamat_deps() { if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ] || [ "$_CUSTOM_REPO_URL" != "null" ]; then __check_dpkg_architecture || return 1 - __install_saltstack_ubuntu_tiamat_repository || return 1 + __install_saltstack_ubuntu_onedir_repository || return 1 fi install_ubuntu_deps || return 1 @@ -3334,7 +3334,7 @@ install_ubuntu_git() { return 0 } -install_ubuntu_tiamat() { +install_ubuntu_onedir() { __PACKAGES="" if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ];then @@ -3553,7 +3553,7 @@ __install_saltstack_debian_repository() { __wait_for_apt apt-get update || return 1 } -__install_saltstack_debian_tiamat_repository() { +__install_saltstack_debian_onedir_repository() { DEBIAN_RELEASE="$DISTRO_MAJOR_VERSION" DEBIAN_CODENAME="$DISTRO_CODENAME" @@ -3579,7 +3579,7 @@ __install_saltstack_debian_tiamat_repository() { __apt_get_install_noinput ${__PACKAGES} || return 1 # amd64 is just a part of repository URI, 32-bit pkgs are hosted under the same location - SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/${_TIAMAT_DIR}/${__PY_VERSION_REPO}/debian/${DEBIAN_RELEASE}/${__REPO_ARCH}/${TIAMAT_REV}/" + SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/debian/${DEBIAN_RELEASE}/${__REPO_ARCH}/${ONEDIR_REV}/" echo "$__REPO_ARCH_DEB $SALTSTACK_DEBIAN_URL $DEBIAN_CODENAME main" > "/etc/apt/sources.list.d/salt.list" __apt_key_fetch "${SALTSTACK_DEBIAN_URL}salt-archive-keyring.gpg" || return 1 @@ -3640,7 +3640,7 @@ install_debian_deps() { return 0 } -install_debian_tiamat_deps() { +install_debian_onedir_deps() { if [ $_START_DAEMONS -eq $BS_FALSE ]; then echowarn "Not starting daemons on Debian based distributions is not working mostly because starting them is the default behaviour." fi @@ -3681,7 +3681,7 @@ install_debian_tiamat_deps() { if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ] || [ "$_CUSTOM_REPO_URL" != "null" ]; then __check_dpkg_architecture || return 1 - __install_saltstack_debian_tiamat_repository || return 1 + __install_saltstack_debian_onedir_repository || return 1 fi if [ "${_EXTRA_PACKAGES}" != "" ]; then @@ -3969,7 +3969,7 @@ install_debian_9_git() { return 0 } -install_debian_tiamat() { +install_debian_onedir() { __PACKAGES="" if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ];then @@ -4449,9 +4449,9 @@ _eof return 0 } -__install_saltstack_rhel_tiamat_repository() { +__install_saltstack_rhel_onedir_repository() { if [ "$ITYPE" = "stable" ]; then - repo_rev="$TIAMAT_REV" + repo_rev="$ONEDIR_REV" else repo_rev="latest" fi @@ -4463,7 +4463,7 @@ __install_saltstack_rhel_tiamat_repository() { # Avoid using '$releasever' variable for yum. # Instead, this should work correctly on all RHEL variants. - base_url="${HTTP_VAL}://${_REPO_URL}/${_TIAMAT_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${TIAMAT_REV}/" + base_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${ONEDIR_REV}/" if [ "${DISTRO_MAJOR_VERSION}" -eq 7 ]; then gpg_key="SALTSTACK-GPG-KEY.pub base/RPM-GPG-KEY-CentOS-7" else @@ -4489,7 +4489,7 @@ enabled=1 enabled_metadata=1 _eof - fetch_url="${HTTP_VAL}://${_REPO_URL}/${_TIAMAT_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/" + fetch_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/" for key in $gpg_key; do __rpm_import_gpg "${fetch_url}${key}" || return 1 done @@ -4807,7 +4807,7 @@ install_centos_git_post() { return 0 } -install_centos_tiamat_deps() { +install_centos_onedir_deps() { if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then yum -y update || return 1 fi @@ -4820,14 +4820,14 @@ install_centos_tiamat_deps() { if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ]; then __install_epel_repository || return 1 - __install_saltstack_rhel_tiamat_repository || return 1 + __install_saltstack_rhel_onedir_repository || return 1 fi # If -R was passed, we need to configure custom repo url with rsync-ed packages # Which is still handled in __install_saltstack_rhel_repository. This call has # its own check in case -r was passed without -R. if [ "$_CUSTOM_REPO_URL" != "null" ]; then - __install_saltstack_rhel_tiamat_repository || return 1 + __install_saltstack_rhel_onedir_repository || return 1 fi if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then @@ -4849,7 +4849,7 @@ install_centos_tiamat_deps() { return 0 } -install_centos_tiamat() { +install_centos_onedir() { __PACKAGES="" if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ];then @@ -4871,7 +4871,7 @@ install_centos_tiamat() { return 0 } -install_centos_tiamat_post() { +install_centos_onedir_post() { SYSTEMD_RELOAD=$BS_FALSE for fname in api master minion syndic; do @@ -5001,8 +5001,8 @@ install_red_hat_linux_git_deps() { return 0 } -install_red_hat_linux_tiamat_deps() { - install_centos_tiamat_deps || return 1 +install_red_hat_linux_onedir_deps() { + install_centos_onedir_deps || return 1 return 0 } @@ -5016,8 +5016,8 @@ install_red_hat_enterprise_git_deps() { return 0 } -install_red_hat_enterprise_tiamat_deps() { - install_red_hat_linux_tiamat_deps || return 1 +install_red_hat_enterprise_onedir_deps() { + install_red_hat_linux_onedir_deps || return 1 return 0 } @@ -5031,8 +5031,8 @@ install_red_hat_enterprise_linux_git_deps() { return 0 } -install_red_hat_enterprise_linux_tiamat_deps() { - install_red_hat_linux_tiamat_deps || return 1 +install_red_hat_enterprise_linux_onedir_deps() { + install_red_hat_linux_onedir_deps || return 1 return 0 } @@ -5046,8 +5046,8 @@ install_red_hat_enterprise_server_git_deps() { return 0 } -install_red_hat_enterprise_server_tiamat_deps() { - install_red_hat_linux_tiamat_deps || return 1 +install_red_hat_enterprise_server_onedir_deps() { + install_red_hat_linux_onedir_deps || return 1 return 0 } @@ -5061,7 +5061,7 @@ install_red_hat_enterprise_workstation_git_deps() { return 0 } -install_red_hat_enterprise_workstation_tiamat_deps() { +install_red_hat_enterprise_workstation_onedir_deps() { install_red_hat_linux_timat_deps || return 1 return 0 } @@ -5076,8 +5076,8 @@ install_red_hat_linux_git() { return 0 } -install_red_hat_linux_tiamat() { - install_centos_tiamat || return 1 +install_red_hat_linux_onedir() { + install_centos_onedir || return 1 return 0 } @@ -5091,8 +5091,8 @@ install_red_hat_enterprise_git() { return 0 } -install_red_hat_enterprise_tiamat() { - install_red_hat_linux_tiamat || return 1 +install_red_hat_enterprise_onedir() { + install_red_hat_linux_onedir || return 1 return 0 } @@ -5106,8 +5106,8 @@ install_red_hat_enterprise_linux_git() { return 0 } -install_red_hat_enterprise_linux_tiamat() { - install_red_hat_linux_tiamat || return 1 +install_red_hat_enterprise_linux_onedir() { + install_red_hat_linux_onedir || return 1 return 0 } @@ -5121,8 +5121,8 @@ install_red_hat_enterprise_server_git() { return 0 } -install_red_hat_enterprise_server_tiamat() { - install_red_hat_linux_tiamat || return 1 +install_red_hat_enterprise_server_onedir() { + install_red_hat_linux_onedir || return 1 return 0 } @@ -5136,8 +5136,8 @@ install_red_hat_enterprise_workstation_git() { return 0 } -install_red_hat_enterprise_workstation_tiamat() { - install_red_hat_linux_tiamat || return 1 +install_red_hat_enterprise_workstation_onedir() { + install_red_hat_linux_onedir || return 1 return 0 } @@ -5294,8 +5294,8 @@ install_oracle_linux_git_deps() { return 0 } -install_oracle_linux_tiamat_deps() { - install_centos_tiamat_deps || return 1 +install_oracle_linux_onedir_deps() { + install_centos_onedir_deps || return 1 return 0 } @@ -5314,8 +5314,8 @@ install_oracle_linux_git() { return 0 } -install_oracle_linux_tiamat() { - install_centos_tiamat || return 1 +install_oracle_linux_onedir() { + install_centos_onedir || return 1 return 0 } @@ -5367,8 +5367,8 @@ install_almalinux_git_deps() { return 0 } -install_almalinux_tiamat_deps() { - install_centos_tiamat_deps || return 1 +install_almalinux_onedir_deps() { + install_centos_onedir_deps || return 1 return 0 } @@ -5387,8 +5387,8 @@ install_almalinux_git() { return 0 } -install_almalinux_tiamat() { - install_centos_tiamat || return 1 +install_almalinux_onedir() { + install_centos_onedir || return 1 return 0 } @@ -5440,8 +5440,8 @@ install_rocky_linux_git_deps() { return 0 } -install_rocky_linux_tiamat_deps() { - install_centos_tiamat_deps || return 1 +install_rocky_linux_onedir_deps() { + install_centos_onedir_deps || return 1 return 0 } @@ -5455,8 +5455,8 @@ install_rocky_linux_stable() { return 0 } -install_rocky_linux_tiamat() { - install_centos_tiamat || return 1 +install_rocky_linux_onedir() { + install_centos_onedir || return 1 return 0 } @@ -5513,8 +5513,8 @@ install_scientific_linux_git_deps() { return 0 } -install_scientific_linux_tiamat_deps() { - install_centos_tiamat_deps || return 1 +install_scientific_linux_onedir_deps() { + install_centos_onedir_deps || return 1 return 0 } @@ -5533,8 +5533,8 @@ install_scientific_linux_git() { return 0 } -install_scientific_linux_tiamat() { - install_centos_tiamat || return 1 +install_scientific_linux_onedir() { + install_centos_onedir || return 1 return 0 } @@ -5586,8 +5586,8 @@ install_cloud_linux_git_deps() { return 0 } -install_cloud_linux_tiamat_deps() { - install_centos_tiamat_deps || return 1 +install_cloud_linux_onedir_deps() { + install_centos_onedir_deps || return 1 return 0 } @@ -8435,7 +8435,7 @@ preseed_master() { # # This function checks if all of the installed daemons are running or not. # -daemons_running_tiamat() { +daemons_running_onedir() { [ "$_START_DAEMONS" -eq $BS_FALSE ] && return 0 FAILED_DAEMONS=0 From 244e6cb85804c0e69955ab906a38f7ba55fee783 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Mon, 1 Aug 2022 09:08:41 -0700 Subject: [PATCH 2/3] Adding missing amazon_linux_2 bits. --- bootstrap-salt.sh | 96 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index cb476ad..cab0dbf 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -6155,6 +6155,92 @@ _eof fi } +install_amazon_linux_ami_2_onedir_deps() { + # Shim to figure out if we're using old (rhel) or new (aws) rpms. + _USEAWS=$BS_FALSE + pkg_append="python" + + if [ "$ITYPE" = "onedir" ]; then + repo_rev="$ONEDIR_REV" + else + repo_rev="latest" + fi + + if echo $repo_rev | grep -E -q '^archive'; then + year=$(echo "$repo_rev" | cut -d '/' -f 2 | cut -c1-4) + else + year=$(echo "$repo_rev" | cut -c1-4) + fi + + # We need to install yum-utils before doing anything else when installing on + # Amazon Linux ECS-optimized images. See issue #974. + __yum_install_noinput yum-utils + + # Do upgrade early + if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then + yum -y update || return 1 + fi + + if [ $_DISABLE_REPOS -eq $BS_FALSE ] || [ "$_CUSTOM_REPO_URL" != "null" ]; then + __REPO_FILENAME="salt.repo" + __PY_VERSION_REPO="yum" + PY_PKG_VER="" + repo_label="saltstack-repo" + repo_name="SaltStack repo for Amazon Linux 2" + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + __REPO_FILENAME="salt.repo" + __PY_VERSION_REPO="py3" + PY_PKG_VER=3 + repo_label="saltstack-py3-repo" + repo_name="SaltStack Python 3 repo for Amazon Linux 2" + fi + + base_url="$HTTP_VAL://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/amazon/2/\$basearch/$repo_rev/" + gpg_key="${base_url}SALTSTACK-GPG-KEY.pub,${base_url}base/RPM-GPG-KEY-CentOS-7" + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + gpg_key="${base_url}SALTSTACK-GPG-KEY.pub" + fi + + # This should prob be refactored to use __install_saltstack_rhel_repository() + # With args passed in to do the right thing. Reformatted to be more like the + # amazon linux yum file. + if [ ! -s "/etc/yum.repos.d/${__REPO_FILENAME}" ]; then + cat <<_eof > "/etc/yum.repos.d/${__REPO_FILENAME}" +[$repo_label] +name=$repo_name +failovermethod=priority +priority=10 +gpgcheck=1 +gpgkey=$gpg_key +baseurl=$base_url +_eof + fi + + fi + + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + # Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 + # which is already installed + if [ -n "${PY_PKG_VER}" ] && [ "${PY_PKG_VER}" -eq 3 ]; then + __PACKAGES="${pkg_append}${PY_PKG_VER}-m2crypto ${pkg_append}${PY_PKG_VER}-pyyaml" + else + __PACKAGES="m2crypto PyYAML ${pkg_append}-futures" + fi + + __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-crypto ${pkg_append}${PY_PKG_VER}-jinja2 procps-ng" + __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-msgpack ${pkg_append}${PY_PKG_VER}-requests ${pkg_append}${PY_PKG_VER}-zmq" + + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 + fi + + if [ "${_EXTRA_PACKAGES}" != "" ]; then + echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" + # shellcheck disable=SC2086 + __yum_install_noinput ${_EXTRA_PACKAGES} || return 1 + fi +} + install_amazon_linux_ami_stable() { install_centos_stable || return 1 return 0 @@ -6230,6 +6316,16 @@ install_amazon_linux_ami_2_check_services() { return 0 } +install_amazon_linux_ami_2_onedir() { + install_centos_stable || return 1 + return 0 +} + +install_amazon_linux_ami_2_onedir_post() { + install_centos_stable_post || return 1 + return 0 +} + # # Ended Amazon Linux AMI Install Functions # From f708e36b94b86d50a7a710d85b5f8c61c04069d3 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Mon, 1 Aug 2022 10:46:26 -0700 Subject: [PATCH 3/3] fixing the GPG_KEY path for rhel, onedir does not need a special path for centos 7. --- bootstrap-salt.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index cab0dbf..29eddff 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4464,11 +4464,7 @@ __install_saltstack_rhel_onedir_repository() { # Avoid using '$releasever' variable for yum. # Instead, this should work correctly on all RHEL variants. base_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${ONEDIR_REV}/" - if [ "${DISTRO_MAJOR_VERSION}" -eq 7 ]; then - gpg_key="SALTSTACK-GPG-KEY.pub base/RPM-GPG-KEY-CentOS-7" - else - gpg_key="SALTSTACK-GPG-KEY.pub" - fi + gpg_key="SALTSTACK-GPG-KEY.pub" gpg_key_urls="" for key in $gpg_key; do