Skip to content

Commit

Permalink
sll-185: Fix a bug in rmt-client-setup-res that prevented update on s…
Browse files Browse the repository at this point in the history
…ystems installed from SLL8 media
  • Loading branch information
plorinc committed Jun 23, 2023
1 parent 1e2a7a7 commit 6e730de
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions public/tools/rmt-client-setup-res
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ DNF=/usr/bin/dnf
CURL=/usr/bin/curl
TEMPFILE="/etc/pki/ca-trust/source/anchors/rmt.crt"
UPDATE_CA_TRUST=/usr/bin/update-ca-trust
RPM_GPG_KEY_LOCATION="/etc/pki/rpm-gpg"

PARAMS=$@

function import_rpm_signing_keys()
{
$RPM --import ${RPM_GPG_KEY_LOCATION}/*
}

function usage()
{
cat << EOT >&2
Expand Down Expand Up @@ -147,15 +153,17 @@ if [ ! -x $SUSECONNECT ]; then
$DNF config-manager --add-repo ${REGURL}/repo/SUSE/Updates/${SLL_name}-AS/${SLL_version}/x86_64/update
$DNF install --allowerasing ${SLL_release_package}

// For SLL8, remove all old signing keys and import SUSE keys installed with sles_es-release package
# For RHEL8/CentOS8, remove all old signing keys and import SUSE keys installed with sles_es-release package
if [[ ${SLL_version} -eq 8 ]]; then
$RPM -e gpg-pubkey-*
$RPM --import /etc/pki/rpm-gpg/*
import_rpm_signing_keys
fi

$DNF install SUSEConnect librepo
$DNF config-manager --set-disabled "${RMTNAME}_repo_SUSE_Updates_${SLL_name}_${SLL_version}_x86_64_update"
$DNF config-manager --set-disabled "${RMTNAME}_repo_SUSE_Updates_${SLL_name}-AS_${SLL_version}_x86_64_update"
elif [[ ${SLL_version} -eq 8 ]]; then
# For SLL8, the release package is already installed, just import the keys
import_rpm_signing_keys
fi

$CURL --silent --show-error --insecure $REGURL/tools/rmt-client-setup --output rmt-client-setup
Expand Down

0 comments on commit 6e730de

Please sign in to comment.