From 9846f7435775ccfbc3d3c514563560a04f17f375 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Wed, 20 Dec 2023 11:10:16 -0600 Subject: [PATCH] fix: run depmod after installing ZFS RPMs With zfs 2.1.x, depmod ran automatically. Though unclear why, it no longer seems to occur when installing zfs 2.2.x RPMs in a container build (it does still work automatically on a non image-based Fedora system). Manually running depmod, as in this commit, ensures the 2.2.x kmods load as expected. --- fedora-coreos/install.sh | 3 +++ main/install.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/fedora-coreos/install.sh b/fedora-coreos/install.sh index a67947d..3554b8b 100755 --- a/fedora-coreos/install.sh +++ b/fedora-coreos/install.sh @@ -3,6 +3,7 @@ set -ouex pipefail RELEASE="$(rpm -E %fedora)" +KERNEL="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" #### PREPARE # enable testing repos if not enabled on testing stream @@ -25,6 +26,8 @@ find /tmp/rpms/ ## CONDITIONAL: install ZFS (and sanoid deps) if [[ "-zfs" == "${ZFS_TAG}" ]]; then rpm-ostree install pv /tmp/rpms/zfs/*.rpm + # for some reason depmod ran automatically with zfs 2.1 but not with 2.2 + depmod -A ${KERNEL} fi ## CONDITIONAL: install NVIDIA diff --git a/main/install.sh b/main/install.sh index 05bc81e..e7aedc8 100755 --- a/main/install.sh +++ b/main/install.sh @@ -2,6 +2,7 @@ set -ouex pipefail +KERNEL="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" RELEASE="$(rpm -E %fedora)" #### PREPARE @@ -22,6 +23,7 @@ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo # inspect to see what RPMS we copied in find /tmp/rpms/ + ## CONDITIONAL: install ZFS (and sanoid deps) if [[ "-zfs" == "${ZFS_TAG}" ]]; then rpm-ostree install /tmp/rpms/zfs/*.rpm \ @@ -32,6 +34,8 @@ if [[ "-zfs" == "${ZFS_TAG}" ]]; then perl-Config-IniFiles \ perl-Getopt-Long \ pv + # for some reason depmod ran automatically with zfs 2.1 but not with 2.2 + depmod -A ${KERNEL} fi ## CONDITIONAL: install NVIDIA