Skip to content

Commit 2f8fc4a

Browse files
committed
RPM: Hold back incompatible kernel packages on Fedora
A user reported that when your upgrade your kernel packages on Fedora with ZFS installed, only the kernel-devel package gets held back to the ZFS-supported version, but not the other kernel packages. So if ZFS only supports the 6.13 kernel, Fedora will still happily upgrade the kernel RPM to 6.14, but hold back kernel-devel at 6.13, for example. This commit includes version checks for the 'kernel-uname-r' dependency, typically provided by the 'kernel-core' package. Original-patch-by: @jkool702 Reviewed-by: @jkool702 Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes openzfs#17265 Closes openzfs#17271
1 parent a39a14e commit 2f8fc4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rpm/generic/zfs-dkms.spec.in

+6
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@ Requires(post): dkms >= 2.2.0.3
2929
Requires(preun): dkms >= 2.2.0.3
3030
Requires: gcc, make, perl, diffutils
3131
Requires(post): gcc, make, perl, diffutils
32+
33+
# Hold back kernel upgrades if kernel is not supported by ZFS
3234
%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}%{?openEuler}
3335
Requires: kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @[email protected]
3436
Requires(post): kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @[email protected]
3537
Conflicts: kernel-devel < @ZFS_META_KVER_MIN@, kernel-devel > @[email protected]
38+
Requires: kernel-uname-r >= @ZFS_META_KVER_MIN@, kernel-uname-r <= @[email protected]
39+
Requires(post): kernel-uname-r >= @ZFS_META_KVER_MIN@, kernel-uname-r <= @[email protected]
40+
Conflicts: kernel-uname-r < @ZFS_META_KVER_MIN@, kernel-uname-r > @[email protected]
41+
3642
Obsoletes: spl-dkms <= %{version}
3743
%endif
3844
Provides: %{module}-kmod = %{version}

0 commit comments

Comments
 (0)