File tree 2 files changed +10
-16
lines changed
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
97
97
sudo subscription-manager release --show
98
98
" ${DNF_RETRY} " " clean" " all"
99
99
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"
100
107
fi
101
108
102
109
if ${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
20
20
exit 1
21
21
fi
22
22
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
-
27
23
# Get minor version of currently checked out branch.
28
24
# It's based on values stored in Makefile.version.$ARCH.var.
29
25
current_minor=$( cut -d' .' -f2 " ${REPOROOT} /Makefile.version.$( uname -m) .var" )
@@ -35,18 +31,9 @@ stop=$(( current_minor - 3 ))
35
31
# and following code will try to access rhocp-4.15 (which is not released yet)
36
32
# and then rhocp-4.14 (which will be returned from the script because it's usable).
37
33
for 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
50
37
echo " ${ver} "
51
38
exit 0
52
39
fi
You can’t perform that action at this time.
0 commit comments