Skip to content

Commit

Permalink
Install kernel-devel for Rocky Linux from vault
Browse files Browse the repository at this point in the history
Previous releases are moved into a vault area once a new minor release version is available for at least a week.
This means we cannot use `--releasever` to install 8.8 version because it is not more available in the repo.

On RHEL8 instead all versions of the packages will remain available.

With this patch we're downloading this specific package from vault and installing it.

## Tests

Manual execution of the new steps.

## References

* https://wiki.rockylinux.org/rocky/repo/#notes-on-devel

Signed-off-by: Enrico Usai <[email protected]>
  • Loading branch information
enrico-usai committed Dec 12, 2023
1 parent 25a1a91 commit b321ef9
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,22 @@
use 'partial/_install_packages_rhel_amazon.rb'

action :install_kernel_source do
# Previous releases are moved into a vault area once a new minor release version is available for at least a week.
# https://wiki.rockylinux.org/rocky/repo/#notes-on-devel
bash "Install kernel source" do
user 'root'
code <<-INSTALL_KERNEL_SOURCE
set -e
dnf install -y #{kernel_source_package}-#{kernel_source_package_version} --releasever #{node['platform_version']}
package="#{kernel_source_package}-#{kernel_source_package_version}"
# try to install kernel source for a specific release version
dnf install -y ${package} --releasever #{node['platform_version']}
if [ $? -ne 0 ]; then
# Previous releases are moved into a vault area once a new minor release version is available for at least a week.
# https://wiki.rockylinux.org/rocky/repo/#notes-on-devel
wget https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/$(uname -m)/os/Packages/k/${package}.rpm
dnf install -y ./${package}.rpm
fi
dnf clean all
INSTALL_KERNEL_SOURCE
end unless on_docker?
Expand Down

0 comments on commit b321ef9

Please sign in to comment.