File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed
Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,13 @@ if ${RHEL_SUBSCRIPTION}; then
9797 sudo subscription-manager release --show
9898 "${DNF_RETRY}" "clean" "all"
9999 fi
100+
101+ # Enable RHEL CDN repos to avoid problems with incomplete RHUI mirrors
102+ OSVERSION=$(awk -F: '{print $5}' /etc/system-release-cpe)
103+ sudo subscription-manager config --rhsm.manage_repos=1
104+ sudo subscription-manager repos \
105+ --enable "rhel-${OSVERSION}-for-$(uname -m)-baseos-rpms" \
106+ --enable "rhel-${OSVERSION}-for-$(uname -m)-appstream-rpms"
100107fi
101108
102109if ${INSTALL_BUILD_DEPS} || ${BUILD_AND_RUN}; then
Original file line number Diff line number Diff line change @@ -20,10 +20,6 @@ if ! sudo subscription-manager status >&/dev/null; then
2020 exit 1
2121fi
2222
23- cacert="/etc/rhsm/ca/redhat-uep.pem"
24- cert=$(find /etc/pki/entitlement -iname '*.pem' -not -iname '*-key.pem')
25- key=$(find /etc/pki/entitlement -iname '*-key.pem')
26-
2723# Get minor version of currently checked out branch.
2824# It's based on values stored in Makefile.version.$ARCH.var.
2925current_minor=$(cut -d'.' -f2 "${REPOROOT}/Makefile.version.$(uname -m).var")
@@ -35,18 +31,9 @@ stop=$(( current_minor - 3 ))
3531# and following code will try to access rhocp-4.15 (which is not released yet)
3632# and then rhocp-4.14 (which will be returned from the script because it's usable).
3733for ver in $(seq "${current_minor}" -1 "${stop}"); do
38- repository="https://cdn.redhat.com/content/dist/layered/rhel9/$(uname -m)/rhocp/4.${ver}"
39- exit_code=$(curl \
40- --silent \
41- --location \
42- --output /dev/null \
43- --write-out "%{http_code}" \
44- --cacert "${cacert}" \
45- --cert "${cert}" \
46- --key "${key}" \
47- "${repository}/os/repodata/repomd.xml")
48-
49- if [[ "${exit_code}" == "200" ]]; then
34+ repository="rhocp-4.${ver}-for-rhel-9-$(uname -m)-rpms"
35+ if sudo dnf -v repository-packages "${repository}" info cri-o 1>&2;
36+ then
5037 echo "${ver}"
5138 exit 0
5239 fi
You can’t perform that action at this time.
0 commit comments