From 4a5b6ced41996016e26fe03dff084ded69a69393 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Sun, 12 Dec 2021 20:15:25 +0100 Subject: [PATCH] zfs-dkms rpm: Fix scriptlets dependencies To ensure that the necessary packages are available during the %post and %preun scriptlets, require them properly. Reviewed-by: Tony Hutter Reviewed-by: Brian Behlendorf Signed-off-by: Till Maas Closes #12822 Closes #12832 --- rpm/generic/zfs-dkms.spec.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpm/generic/zfs-dkms.spec.in b/rpm/generic/zfs-dkms.spec.in index e0e0efe2a..02be716aa 100644 --- a/rpm/generic/zfs-dkms.spec.in +++ b/rpm/generic/zfs-dkms.spec.in @@ -24,9 +24,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: dkms >= 2.2.0.3 +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 %if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version} 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 Obsoletes: spl-dkms %endif Provides: %{module}-kmod = %{version}