mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
spec: Add support for building the zfs storage driver
Where it can be supported in Fedora, the driver is built and made available as a subpackage. Signed-off-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
99eac2668c
commit
9af764e86a
@ -71,6 +71,13 @@
|
|||||||
%define with_storage_gluster 0%{!?_without_storage_gluster:1}
|
%define with_storage_gluster 0%{!?_without_storage_gluster:1}
|
||||||
%define with_numactl 0%{!?_without_numactl:1}
|
%define with_numactl 0%{!?_without_numactl:1}
|
||||||
|
|
||||||
|
# F25+ has zfs-fuse
|
||||||
|
%if 0%{?fedora} >= 25
|
||||||
|
%define with_storage_zfs 0%{!?_without_storage_zfs:1}
|
||||||
|
%else
|
||||||
|
%define with_storage_zfs 0
|
||||||
|
%endif
|
||||||
|
|
||||||
# A few optional bits off by default, we enable later
|
# A few optional bits off by default, we enable later
|
||||||
%define with_fuse 0%{!?_without_fuse:0}
|
%define with_fuse 0%{!?_without_fuse:0}
|
||||||
%define with_cgconfig 0%{!?_without_cgconfig:0}
|
%define with_cgconfig 0%{!?_without_cgconfig:0}
|
||||||
@ -115,6 +122,12 @@
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# zfs-fuse is not available on some architectures
|
||||||
|
%ifarch s390 s390x aarch64
|
||||||
|
%define with_storage_zfs 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
# RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor,
|
# RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor,
|
||||||
# VMware, libxenserver (xenapi), libxenlight (Xen 4.1 and newer),
|
# VMware, libxenserver (xenapi), libxenlight (Xen 4.1 and newer),
|
||||||
# or HyperV.
|
# or HyperV.
|
||||||
@ -373,6 +386,12 @@ BuildRequires: glusterfs-devel >= 3.4.1
|
|||||||
%if %{with_storage_sheepdog}
|
%if %{with_storage_sheepdog}
|
||||||
BuildRequires: sheepdog
|
BuildRequires: sheepdog
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_storage_zfs}
|
||||||
|
# Support any conforming implementation of zfs. On stock Fedora
|
||||||
|
# this is zfs-fuse, but could be zfsonlinux upstream RPMs
|
||||||
|
BuildRequires: /sbin/zfs
|
||||||
|
BuildRequires: /sbin/zpool
|
||||||
|
%endif
|
||||||
%if %{with_numactl}
|
%if %{with_numactl}
|
||||||
# For QEMU/LXC numa info
|
# For QEMU/LXC numa info
|
||||||
BuildRequires: numactl-devel
|
BuildRequires: numactl-devel
|
||||||
@ -705,6 +724,21 @@ sheepdog volumes using.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with_storage_zfs}
|
||||||
|
%package daemon-driver-storage-zfs
|
||||||
|
Summary: Storage driver plugin for ZFS
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||||
|
# Support any conforming implementation of zfs
|
||||||
|
Requires: /sbin/zfs
|
||||||
|
Requires: /sbin/zpool
|
||||||
|
|
||||||
|
%description daemon-driver-storage-zfs
|
||||||
|
The storage driver backend adding implementation of the storage APIs for
|
||||||
|
ZFS volumes.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package daemon-driver-storage
|
%package daemon-driver-storage
|
||||||
Summary: Storage driver plugin including all backends for the libvirtd daemon
|
Summary: Storage driver plugin including all backends for the libvirtd daemon
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -723,6 +757,9 @@ Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release}
|
|||||||
%if %{with_storage_sheepdog}
|
%if %{with_storage_sheepdog}
|
||||||
Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release}
|
Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_storage_zfs}
|
||||||
|
Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description daemon-driver-storage
|
%description daemon-driver-storage
|
||||||
The storage driver plugin for the libvirtd daemon, providing
|
The storage driver plugin for the libvirtd daemon, providing
|
||||||
@ -1180,6 +1217,12 @@ rm -rf .git
|
|||||||
%define arg_storage_gluster --without-storage-gluster
|
%define arg_storage_gluster --without-storage-gluster
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with_storage_zfs}
|
||||||
|
%define arg_storage_zfs --with-storage-zfs
|
||||||
|
%else
|
||||||
|
%define arg_storage_zfs --without-storage-zfs
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with_numactl}
|
%if %{with_numactl}
|
||||||
%define arg_numactl --with-numactl
|
%define arg_numactl --with-numactl
|
||||||
%else
|
%else
|
||||||
@ -1288,7 +1331,7 @@ rm -f po/stamp-po
|
|||||||
%{?arg_storage_rbd} \
|
%{?arg_storage_rbd} \
|
||||||
%{?arg_storage_sheepdog} \
|
%{?arg_storage_sheepdog} \
|
||||||
%{?arg_storage_gluster} \
|
%{?arg_storage_gluster} \
|
||||||
--without-storage-zfs \
|
%{?arg_storage_zfs} \
|
||||||
--without-storage-vstorage \
|
--without-storage-vstorage \
|
||||||
%{?arg_numactl} \
|
%{?arg_numactl} \
|
||||||
%{?arg_numad} \
|
%{?arg_numad} \
|
||||||
@ -1851,6 +1894,11 @@ exit 0
|
|||||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so
|
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with_storage_zfs}
|
||||||
|
%files daemon-driver-storage-zfs
|
||||||
|
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_zfs.so
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with_qemu}
|
%if %{with_qemu}
|
||||||
%files daemon-driver-qemu
|
%files daemon-driver-qemu
|
||||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
|
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
|
||||||
|
Loading…
Reference in New Issue
Block a user