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

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 | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

I originally thought that the 'Requires' dependancy requiring
/sbin/zpool and /sbin/zfs would need to be dropped but even without
'zfs-fuse' on F43 it builds fine.

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 8314fbeb34..1bfe7d715b 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
@@ -796,7 +795,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