Skip to content

Commit

Permalink
Fix installation of kernel-devel on Rocky 8
Browse files Browse the repository at this point in the history
Use the `--releasever` option to make sure the repos from the same
minor release as the currently running kernel are used when installing
kernel-devel.

Install kernel-devel before installing the base packages to avoid dkms
pulling kernel-devel from the wrong repos.

Signed-off-by: Jacopo De Amicis <[email protected]>
  • Loading branch information
jdeamicis committed Nov 24, 2023
1 parent 5de32ac commit 8c02e1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
use 'partial/_install_packages_common.rb'
use 'partial/_install_packages_rhel_amazon.rb'

action :install_kernel_source do
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']}
dnf clean all
INSTALL_KERNEL_SOURCE
end
end

def default_packages
# environment-modules required by EFA, Intel MPI and ARM PL
# iptables needed for IMDS setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
end

action :setup do
action_install_base_packages
action_install_kernel_source
action_install_base_packages
action_install_extras
end

0 comments on commit 8c02e1d

Please sign in to comment.