From 098a08950db752d3a23a9ef102bc0ac5e790e2ca Mon Sep 17 00:00:00 2001 From: Jeff Neel <10672501+jeff350@users.noreply.github.com> Date: Wed, 23 Dec 2020 16:46:01 -0600 Subject: [PATCH] Add CentOS GPG key for RHEL7 for successful builds --- bootstrap-salt.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 965a86f..6a2e984 100644 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4120,7 +4120,11 @@ __install_saltstack_rhel_repository() { # Avoid using '$releasever' variable for yum. # Instead, this should work correctly on all RHEL variants. base_url="${HTTP_VAL}://${_REPO_URL}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${repo_rev}/" - gpg_key="SALTSTACK-GPG-KEY.pub" + if [ "${DISTRO_MAJOR_VERSION}" -eq 7 ]; then + gpg_key="${base_url}SALTSTACK-GPG-KEY.pub","${base_url}base/RPM-GPG-KEY-CentOS-7" + else + gpg_key="${base_url}SALTSTACK-GPG-KEY.pub" + fi repo_file="/etc/yum.repos.d/salt.repo" if [ ! -s "$repo_file" ] || [ "$_FORCE_OVERWRITE" -eq $BS_TRUE ]; then @@ -4130,7 +4134,7 @@ name=SaltStack ${repo_rev} Release Channel for RHEL/CentOS \$releasever baseurl=${base_url} skip_if_unavailable=True gpgcheck=1 -gpgkey=${base_url}${gpg_key} +gpgkey=${gpg_key} enabled=1 enabled_metadata=1 _eof