mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-05-23 15:04:59 +03:00
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 <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #17265 Closes #17271
This commit is contained in:
parent
c8fa39b46c
commit
81dec433b0
@ -29,10 +29,16 @@ Requires(post): dkms >= 2.2.0.3
|
||||
Requires(preun): dkms >= 2.2.0.3
|
||||
Requires: gcc, make, perl, diffutils
|
||||
Requires(post): gcc, make, perl, diffutils
|
||||
|
||||
# Hold back kernel upgrades if kernel is not supported by ZFS
|
||||
%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}%{?openEuler}
|
||||
Requires: kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @ZFS_META_KVER_MAX@.999
|
||||
Requires(post): kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @ZFS_META_KVER_MAX@.999
|
||||
Conflicts: kernel-devel < @ZFS_META_KVER_MIN@, kernel-devel > @ZFS_META_KVER_MAX@.999
|
||||
Requires: kernel-uname-r >= @ZFS_META_KVER_MIN@, kernel-uname-r <= @ZFS_META_KVER_MAX@.999
|
||||
Requires(post): kernel-uname-r >= @ZFS_META_KVER_MIN@, kernel-uname-r <= @ZFS_META_KVER_MAX@.999
|
||||
Conflicts: kernel-uname-r < @ZFS_META_KVER_MIN@, kernel-uname-r > @ZFS_META_KVER_MAX@.999
|
||||
|
||||
Obsoletes: spl-dkms <= %{version}
|
||||
%endif
|
||||
Provides: %{module}-kmod = %{version}
|
||||
|
Loading…
Reference in New Issue
Block a user