Skip to content

Commit

Permalink
fix: run depmod after installing ZFS RPMs
Browse files Browse the repository at this point in the history
With zfs 2.1.x, this happened automatically. Though unsure of why, it no
longer seems to occur manually when installing the zfs 2.2.x RPMs in the
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.
  • Loading branch information
bsherman committed Dec 20, 2023
1 parent 3adfd6c commit 399fbf1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fedora-coreos/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions main/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -ouex pipefail

KERNEL="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
RELEASE="$(rpm -E %fedora)"

#### PREPARE
Expand All @@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit 399fbf1

Please sign in to comment.