Skip to content

Commit 2c46c6c

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 RPMs to 6.14, but hold back kernel-devel at 6.13, for example. This commit includes version checks for the 'kernel', 'kernel-core' and 'kernel-modules-core' packages. Closes: #17265 Original-patch-by: @jkool702 Signed-off-by: Tony Hutter <[email protected]>
1 parent 38c3a8b commit 2c46c6c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rpm/generic/zfs-dkms.spec.in

+10
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,19 @@ Requires(preun): dkms >= 2.2.0.3
3030
Requires: gcc, make, perl, diffutils
3131
Requires(post): gcc, make, perl, diffutils
3232
%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}%{?openEuler}
33+
# Hold back kernel upgrades if kernel is not supported by ZFS
3334
Requires: kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @[email protected]
3435
Requires(post): kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @[email protected]
3536
Conflicts: kernel-devel < @ZFS_META_KVER_MIN@, kernel-devel > @[email protected]
37+
Requires: kernel-modules-core >= @ZFS_META_KVER_MIN@, kernel-modules-core <= @[email protected]
38+
Requires(post): kernel-modules-core >= @ZFS_META_KVER_MIN@, kernel-modules-core <= @[email protected]
39+
Conflicts: kernel-modules-core < @ZFS_META_KVER_MIN@, kernel-modules-core > @[email protected]
40+
Requires: kernel-core >= @ZFS_META_KVER_MIN@, kernel-core <= @[email protected]
41+
Requires(post): kernel-core >= @ZFS_META_KVER_MIN@, kernel-core <= @[email protected]
42+
Conflicts: kernel-core < @ZFS_META_KVER_MIN@, kernel-core > @[email protected]
43+
Requires: kernel >= @ZFS_META_KVER_MIN@, kernel <= @[email protected]
44+
Requires(post): kernel >= @ZFS_META_KVER_MIN@, kernel <= @[email protected]
45+
Conflicts: kernel < @ZFS_META_KVER_MIN@, kernel > @[email protected]
3646
Obsoletes: spl-dkms <= %{version}
3747
%endif
3848
Provides: %{module}-kmod = %{version}

0 commit comments

Comments
 (0)