From: Peter Krempa <[email protected]>

On Fedora 43 and newer the 'fuse-zfs' package was removed. Commit
bd30147e740 added an 'Obsoletes' directive so that the storage driver
core package will update properly but hardcoded the obsoleted version
as 11.4 (when the change was comitted) similarly to the old sheepdog/rbd
packages and disabled the build.

Now it is still possible to obtain ZFS support from other means and it
may be useful for users to have libvirt's ZFS backend. This patch thus:

 - re-enables build of 'libvirt-daemon-driver-storage-zfs' on Fedora
 - removes 'libvirt-daemon-driver-storage-zfs' as 'Requires dependency
   from 'daemon-driver-storage' meta-package on Fedora 43 and newer
 - removes dependancy on '/sbin/zpool' and '/sbin/zfs' on Fedora 43
   and newer

With this the package still is built and installable but will require
users to get their ZFS support installed somehow.

Fixes: bd30147e740d49fdb5844160e480ca34611f75e5
Signed-off-by: Peter Krempa <[email protected]>
---
 libvirt.spec.in | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

Remove the dependency on the programs too.

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 8314fbeb34..62af7fb517 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -76,8 +76,10 @@
     %define with_storage_gluster 0
 %endif

-# Fedora had zfs-fuse until F43
-%if 0%{?fedora} && 0%{?fedora} < 43
+# On Fedora 43, the 'zfs-fuse' package was removed, but is obtainable via
+# other means. Build the backend, but it's no longer considered to be part
+# of 'daemon-driver-storage'.
+%if 0%{?fedora}
     %define with_storage_zfs      0%{!?_without_storage_zfs:1}
 %else
     %define with_storage_zfs      0
@@ -667,9 +669,6 @@ Requires: /usr/bin/qemu-img
 Obsoletes: libvirt-daemon-driver-storage-rbd < 5.2.0
     %endif
 Obsoletes: libvirt-daemon-driver-storage-sheepdog < 8.8.0
-    %if !%{with_storage_zfs}
-Obsoletes: libvirt-daemon-driver-storage-zfs < 11.4.0
-    %endif

 %description daemon-driver-storage-core
 The storage driver plugin for the libvirtd daemon, providing
@@ -770,9 +769,13 @@ volumes using the ceph protocol.
 Summary: Storage driver plugin for ZFS
 Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
 Requires: libvirt-libs = %{version}-%{release}
-# Support any conforming implementation of zfs
+# Starting with Fedora 43 the 'zfs-fuse' is no longer shipped but obtainable
+# externally. The package builds fine without these. Users will have to provide
+# their own implementation.
+        %if 0%{?fedora} && 0%{?fedora} < 43
 Requires: /sbin/zfs
 Requires: /sbin/zpool
+        %endif

 %description daemon-driver-storage-zfs
 The storage driver backend adding implementation of the storage APIs for
@@ -796,7 +799,10 @@ Requires: libvirt-daemon-driver-storage-gluster = 
%{version}-%{release}
     %if %{with_storage_rbd}
 Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release}
     %endif
-    %if %{with_storage_zfs}
+# Starting with Fedora 43 the 'zfs-fuse' is no longer shipped but obtainable
+# externally. We do not want to install this as part of 'daemon-driver-storage'
+# any more.
+    %if %{with_storage_zfs} && 0%{?fedora} && 0%{?fedora} < 43
 Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release}
     %endif

-- 
2.51.1

Reply via email to