|
|
|
@ -1,62 +1,42 @@
@@ -1,62 +1,42 @@
|
|
|
|
|
# -*- rpm-spec -*- |
|
|
|
|
%define supported_platform 1 |
|
|
|
|
# Default to skipping autoreconf. Distros can change just this one line |
|
|
|
|
# (or provide a command-line override) if they backport any patches that |
|
|
|
|
# touch configure.ac or Makefile.am. |
|
|
|
|
%{!?enable_autotools:%global enable_autotools 0} |
|
|
|
|
# The hypervisor drivers that run in libvirtd |
|
|
|
|
%define with_xen 0%{!?_without_xen:1} |
|
|
|
|
%define with_qemu 0%{!?_without_qemu:1} |
|
|
|
|
%define with_lxc 0%{!?_without_lxc:1} |
|
|
|
|
%define with_uml 0%{!?_without_uml:1} |
|
|
|
|
%define with_libxl 0%{!?_without_libxl:1} |
|
|
|
|
%define with_vbox 0%{!?_without_vbox:1} |
|
|
|
|
|
|
|
|
|
%define with_xen 0 |
|
|
|
|
%define with_qemu 1 |
|
|
|
|
%define with_lxc 1 |
|
|
|
|
%define with_uml 0 |
|
|
|
|
%define with_libxl 0 |
|
|
|
|
%define with_vbox 0 |
|
|
|
|
%define qemu_kvm_arches x86_64 ppc64 ppc64le aarch64 |
|
|
|
|
|
|
|
|
|
%define with_qemu_tcg 1 |
|
|
|
|
|
|
|
|
|
%ifarch %{qemu_kvm_arches} |
|
|
|
|
%define with_qemu_kvm %{with_qemu} |
|
|
|
|
%else |
|
|
|
|
%define with_qemu_kvm 0 |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
%if ! %{with_qemu_tcg} && ! %{with_qemu_kvm} |
|
|
|
|
%define with_qemu 0 |
|
|
|
|
%endif |
|
|
|
|
%define with_qemu_tcg 1 |
|
|
|
|
%define with_qemu_kvm 1 |
|
|
|
|
|
|
|
|
|
# Then the hypervisor drivers that run outside libvirtd, in libvirt.so |
|
|
|
|
%define with_openvz 0%{!?_without_openvz:1} |
|
|
|
|
%define with_vmware 0%{!?_without_vmware:1} |
|
|
|
|
%define with_phyp 0%{!?_without_phyp:1} |
|
|
|
|
%define with_esx 0%{!?_without_esx:1} |
|
|
|
|
%define with_hyperv 0%{!?_without_hyperv:1} |
|
|
|
|
%define with_openvz 0 |
|
|
|
|
%define with_vmware 0 |
|
|
|
|
%define with_phyp 1 |
|
|
|
|
%define with_esx 0 |
|
|
|
|
%define with_hyperv 0 |
|
|
|
|
|
|
|
|
|
# Then the secondary host drivers, which run inside libvirtd |
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7 |
|
|
|
|
%define with_storage_rbd 0%{!?_without_storage_rbd:1} |
|
|
|
|
%else |
|
|
|
|
%define with_storage_rbd 0 |
|
|
|
|
%endif |
|
|
|
|
%if 0%{?fedora} |
|
|
|
|
%define with_storage_sheepdog 0%{!?_without_storage_sheepdog:1} |
|
|
|
|
%else |
|
|
|
|
%define with_storage_sheepdog 0 |
|
|
|
|
%endif |
|
|
|
|
%define with_storage_gluster 0%{!?_without_storage_gluster:1} |
|
|
|
|
%define with_numactl 0%{!?_without_numactl:1} |
|
|
|
|
%define with_storage_rbd 1 |
|
|
|
|
%define with_storage_sheepdog 0 |
|
|
|
|
%define with_storage_gluster 1 |
|
|
|
|
%define with_numactl 1 |
|
|
|
|
|
|
|
|
|
# A few optional bits off by default, we enable later |
|
|
|
|
%define with_fuse 0%{!?_without_fuse:0} |
|
|
|
|
%define with_cgconfig 0%{!?_without_cgconfig:0} |
|
|
|
|
%define with_sanlock 0%{!?_without_sanlock:0} |
|
|
|
|
%define with_systemd 0%{!?_without_systemd:0} |
|
|
|
|
%define with_numad 0%{!?_without_numad:0} |
|
|
|
|
%define with_firewalld 0%{!?_without_firewalld:0} |
|
|
|
|
%define with_libssh2 0%{!?_without_libssh2:0} |
|
|
|
|
%define with_wireshark 0%{!?_without_wireshark:0} |
|
|
|
|
%define with_libssh 0%{!?_without_libssh:0} |
|
|
|
|
%define with_fuse 1 |
|
|
|
|
%define with_cgconfig 0 |
|
|
|
|
%define with_sanlock 1 |
|
|
|
|
%define with_systemd 1 |
|
|
|
|
%define with_numad 1 |
|
|
|
|
%define with_firewalld 0 |
|
|
|
|
%define with_libssh2 1 |
|
|
|
|
%define with_wireshark 0 |
|
|
|
|
%define with_libssh 1 |
|
|
|
|
%define with_pm_utils 1 |
|
|
|
|
|
|
|
|
|
# Finally set the OS / architecture specific special cases |
|
|
|
@ -77,92 +57,17 @@
@@ -77,92 +57,17 @@
|
|
|
|
|
%define with_numactl 0 |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# libgfapi is built only on x86_64 on rhel |
|
|
|
|
%ifnarch x86_64 |
|
|
|
|
%if 0%{?rhel} |
|
|
|
|
%define with_storage_gluster 0 |
|
|
|
|
%endif |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# librados and librbd are built only on x86_64 on rhel |
|
|
|
|
%ifnarch x86_64 |
|
|
|
|
%if 0%{?rhel} >= 7 |
|
|
|
|
%define with_storage_rbd 0 |
|
|
|
|
%endif |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor, |
|
|
|
|
# VMware, libxenserver (xenapi), libxenlight (Xen 4.1 and newer), |
|
|
|
|
# or HyperV. |
|
|
|
|
%if 0%{?rhel} |
|
|
|
|
%define with_openvz 0 |
|
|
|
|
%define with_vbox 0 |
|
|
|
|
%define with_uml 0 |
|
|
|
|
%define with_phyp 1 |
|
|
|
|
%define with_vmware 1 |
|
|
|
|
%define with_xenapi 0 |
|
|
|
|
%define with_libxl 0 |
|
|
|
|
%define with_hyperv 1 |
|
|
|
|
%define with_vz 0 |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# Fedora 17 / RHEL-7 are first where we use systemd. Although earlier |
|
|
|
|
# Fedora has systemd, libvirt still used sysvinit there. |
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7 |
|
|
|
|
%define with_systemd 1 |
|
|
|
|
%define with_pm_utils 0 |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# Fedora 18 / RHEL-7 are first where firewalld support is enabled |
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 8 |
|
|
|
|
%define with_firewalld 1 |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# RHEL-6 stopped including Xen on all archs. |
|
|
|
|
%if 0%{?rhel} |
|
|
|
|
%define with_xen 0 |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# fuse is used to provide virtualized /proc for LXC |
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7 |
|
|
|
|
%define with_fuse 0%{!?_without_fuse:1} |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# Enable sanlock library for lock management with QEMU |
|
|
|
|
# Sanlock is available only on arches where kvm is available for RHEL |
|
|
|
|
%if 0%{?fedora} |
|
|
|
|
%define with_sanlock 0%{!?_without_sanlock:1} |
|
|
|
|
%endif |
|
|
|
|
%if 0%{?rhel} |
|
|
|
|
%ifarch %{qemu_kvm_arches} |
|
|
|
|
%define with_sanlock 0%{!?_without_sanlock:1} |
|
|
|
|
%endif |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# Enable libssh2 transport for new enough distros |
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} |
|
|
|
|
%define with_libssh2 0%{!?_without_libssh2:1} |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# Enable wireshark plugins for all distros shipping libvirt 1.2.2 or newer |
|
|
|
|
%if 0%{?fedora} |
|
|
|
|
%define with_wireshark 0%{!?_without_wireshark:1} |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# Enable libssh transport for new enough distros |
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} |
|
|
|
|
%define with_libssh 0%{!?_without_libssh:1} |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with_qemu} || %{with_lxc} || %{with_uml} |
|
|
|
|
# numad is used to manage the CPU and memory placement dynamically, |
|
|
|
|
# it's not available on s390[x] and ARM. |
|
|
|
|
%ifnarch s390 s390x %{arm} |
|
|
|
|
%define with_numad 0%{!?_without_numad:1} |
|
|
|
|
%endif |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# Pull in cgroups config system |
|
|
|
|
%if %{with_qemu} || %{with_lxc} |
|
|
|
|
%define with_cgconfig 0%{!?_without_cgconfig:1} |
|
|
|
@ -172,37 +77,22 @@
@@ -172,37 +77,22 @@
|
|
|
|
|
%define qemu_user qemu |
|
|
|
|
%define qemu_group qemu |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7 |
|
|
|
|
%define with_systemd_macros 1 |
|
|
|
|
%else |
|
|
|
|
%define with_systemd_macros 0 |
|
|
|
|
%endif |
|
|
|
|
%define with_systemd_macros 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# RHEL releases provide stable tool chains and so it is safe to turn |
|
|
|
|
# compiler warning into errors without being worried about frequent |
|
|
|
|
# changes in reported warnings |
|
|
|
|
%if 0%{?rhel} |
|
|
|
|
%define enable_werror --enable-werror |
|
|
|
|
%else |
|
|
|
|
%define enable_werror --disable-werror |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} >= 25 |
|
|
|
|
%define tls_priority "@LIBVIRT,SYSTEM" |
|
|
|
|
%else |
|
|
|
|
%if 0%{?fedora} |
|
|
|
|
%define tls_priority "@SYSTEM" |
|
|
|
|
%else |
|
|
|
|
%define tls_priority "NORMAL" |
|
|
|
|
%endif |
|
|
|
|
%endif |
|
|
|
|
%define enable_werror --enable-werror |
|
|
|
|
### # # # %define enable_werror --disable-werror |
|
|
|
|
|
|
|
|
|
%define tls_priority "@LIBVIRT,SYSTEM" |
|
|
|
|
### %define tls_priority "@SYSTEM" |
|
|
|
|
### %define tls_priority "NORMAL" |
|
|
|
|
|
|
|
|
|
Summary: Library providing a simple virtualization API |
|
|
|
|
Name: libvirt |
|
|
|
|
Version: 4.0.0 |
|
|
|
|
Version: 4.2.0 |
|
|
|
|
Release: 1%{?dist}%{?extra_release} |
|
|
|
|
License: LGPLv2+ |
|
|
|
|
Group: Development/Libraries |
|
|
|
@ -1308,7 +1198,8 @@ rm -fr %{buildroot}
@@ -1308,7 +1198,8 @@ rm -fr %{buildroot}
|
|
|
|
|
# Avoid using makeinstall macro as it changes prefixes rather than setting |
|
|
|
|
# DESTDIR. Newer make_install macro would be better but it's not available |
|
|
|
|
# on RHEL 5, thus we need to expand it here. |
|
|
|
|
make %{?_smp_mflags} install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir} |
|
|
|
|
### make %{?_smp_mflags} install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir} |
|
|
|
|
make install DESTDIR=%{?buildroot} SYSTEMD_UNIT_DIR=%{_unitdir} |
|
|
|
|
|
|
|
|
|
make %{?_smp_mflags} -C examples distclean |
|
|
|
|
|
|
|
|
|