Closed cjac closed 3 months ago
- execute_with_retries "dnf -y -q install pciutils kernel-devel gcc"
+ execute_with_retries "dnf -y -q install pciutils gcc"
+
+ local dnf_cmd="dnf -y -q install kernel-devel-${uname_r}"
+ local kernel_devel_pkg_out="$(eval "${dnf_cmd} 2>&1")"
+ if [[ "${kernel_devel_pkg_out}" =~ 'Unable to find a match: kernel-devel-' ]] ; then
+ # this kernel-devel may have been migrated to the vault
+ local vault="https://download.rockylinux.org/vault/rocky/$(os_version)/"
+ execute_with_retries dnf -y -q --setopt=localpkg_gpgcheck=1 install \
+ "${vault}/BaseOS/x86_64/os/Packages/k/kernel-${uname_r}.rpm" \
+ "${vault}/BaseOS/x86_64/os/Packages/k/kernel-core-${uname_r}.rpm" \
+ "${vault}/BaseOS/x86_64/os/Packages/k/kernel-modules-${uname_r}.rpm" \
+ "${vault}/BaseOS/x86_64/os/Packages/k/kernel-modules-core-${uname_r}.rpm" \
+ "${vault}/AppStream/x86_64/os/Packages/k/kernel-devel-${uname_r}.rpm"
+ else
+ execute_with_retries "${dnf_cmd}"
+ fi
Thanks go to skip77 from #rockylinux on libera for the work-around here and to tmz for the note to validate packages with --setopt=localpkg_gpgcheck=1
in case we end up fetching from a mirror.
see PR #1207 for review
Fixed with #1207
When new kernels are released, the old kernel-devel (which we depend on to build kernel drivers with) is removed from the repository from which we can install. We need to add a work-around to fetch from the vault instead.