mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
libvirt.spec.in: drop Fedora < 20 and RHEL < 6
Simplify conditionals to assume Fedora >= 20 or RHEL >= 6 The %prep section will explicitly check the version and refuse to run if insufficient. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
56edf2fefe
commit
3694e038fd
220
libvirt.spec.in
220
libvirt.spec.in
@ -1,13 +1,12 @@
|
|||||||
# -*- rpm-spec -*-
|
# -*- rpm-spec -*-
|
||||||
|
|
||||||
# This spec file assumes you are building for Fedora 13 or newer,
|
# This spec file assumes you are building for Fedora 20 or newer,
|
||||||
# or for RHEL 5 or newer. It may need some tweaks for other distros.
|
# or for RHEL 6 or newer. It may need some tweaks for other distros.
|
||||||
# If neither fedora nor rhel was defined, try to guess them from dist
|
# If neither fedora nor rhel was defined, try to guess them from dist
|
||||||
%if !0%{?rhel} && !0%{?fedora}
|
%if (0%{?fedora} && 0%{?fedora} >= 20) || (0%{?rhel} && 0%{?rhel} >= 6)
|
||||||
%{expand:%(echo "%{?dist}" | \
|
%define supported_platform 1
|
||||||
sed -ne 's/^\.el\([0-9]\+\).*/%%define rhel \1/p')}
|
%else
|
||||||
%{expand:%(echo "%{?dist}" | \
|
%define supported_platform 0
|
||||||
sed -ne 's/^\.fc\?\([0-9]\+\).*/%%define fedora \1/p')}
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Default to skipping autoreconf. Distros can change just this one line
|
# Default to skipping autoreconf. Distros can change just this one line
|
||||||
@ -21,15 +20,6 @@
|
|||||||
# of a command-line or ~/.rpmmacros override for client-only.
|
# of a command-line or ~/.rpmmacros override for client-only.
|
||||||
%{!?client_only:%global client_only 0}
|
%{!?client_only:%global client_only 0}
|
||||||
|
|
||||||
# Now turn off server build in certain cases
|
|
||||||
|
|
||||||
# RHEL-5 builds are client-only for s390, ppc
|
|
||||||
%if 0%{?rhel} == 5
|
|
||||||
%ifnarch %{ix86} x86_64 ia64
|
|
||||||
%define client_only 1
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Disable all server side drivers if client only build requested
|
# Disable all server side drivers if client only build requested
|
||||||
%if %{client_only}
|
%if %{client_only}
|
||||||
%define server_drivers 0
|
%define server_drivers 0
|
||||||
@ -60,19 +50,7 @@
|
|||||||
%define qemu_kvm_arches %{ix86} x86_64
|
%define qemu_kvm_arches %{ix86} x86_64
|
||||||
|
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
%if 0%{?fedora} < 16
|
%define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64
|
||||||
# Fedora doesn't have any QEMU on ppc64 until FC16 - only ppc
|
|
||||||
# I think F17 is the first release with the power64 macro
|
|
||||||
%ifarch ppc64
|
|
||||||
%define with_qemu_tcg 0
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
%if 0%{?fedora} >= 18
|
|
||||||
%define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x
|
|
||||||
%endif
|
|
||||||
%if 0%{?fedora} >= 20
|
|
||||||
%define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
@ -108,21 +86,17 @@
|
|||||||
%define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}}
|
%define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}}
|
||||||
%define with_storage_disk 0%{!?_without_storage_disk:%{server_drivers}}
|
%define with_storage_disk 0%{!?_without_storage_disk:%{server_drivers}}
|
||||||
%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}}
|
%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}}
|
||||||
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
%define with_storage_rbd 0%{!?_without_storage_rbd:%{server_drivers}}
|
%define with_storage_rbd 0%{!?_without_storage_rbd:%{server_drivers}}
|
||||||
%else
|
%else
|
||||||
%define with_storage_rbd 0
|
%define with_storage_rbd 0
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?fedora} >= 17
|
%if 0%{?fedora}
|
||||||
%define with_storage_sheepdog 0%{!?_without_storage_sheepdog:%{server_drivers}}
|
%define with_storage_sheepdog 0%{!?_without_storage_sheepdog:%{server_drivers}}
|
||||||
%else
|
%else
|
||||||
%define with_storage_sheepdog 0
|
%define with_storage_sheepdog 0
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 6
|
%define with_storage_gluster 0%{!?_without_storage_gluster:%{server_drivers}}
|
||||||
%define with_storage_gluster 0%{!?_without_storage_gluster:%{server_drivers}}
|
|
||||||
%else
|
|
||||||
%define with_storage_gluster 0
|
|
||||||
%endif
|
|
||||||
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
|
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
|
||||||
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
|
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
|
||||||
|
|
||||||
@ -178,7 +152,7 @@
|
|||||||
|
|
||||||
# libgfapi is built only on x86_64 on rhel
|
# libgfapi is built only on x86_64 on rhel
|
||||||
%ifnarch x86_64
|
%ifnarch x86_64
|
||||||
%if 0%{?rhel} >= 6
|
%if 0%{?rhel}
|
||||||
%define with_storage_gluster 0
|
%define with_storage_gluster 0
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -207,48 +181,33 @@
|
|||||||
|
|
||||||
# Fedora 17 / RHEL-7 are first where we use systemd. Although earlier
|
# Fedora 17 / RHEL-7 are first where we use systemd. Although earlier
|
||||||
# Fedora has systemd, libvirt still used sysvinit there.
|
# Fedora has systemd, libvirt still used sysvinit there.
|
||||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
%define with_systemd 1
|
%define with_systemd 1
|
||||||
%define with_systemd_daemon 1
|
%define with_systemd_daemon 1
|
||||||
%define with_pm_utils 0
|
%define with_pm_utils 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Fedora 18 / RHEL-7 are first where firewalld support is enabled
|
# Fedora 18 / RHEL-7 are first where firewalld support is enabled
|
||||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
%define with_firewalld 1
|
%define with_firewalld 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# RHEL-5 is too old for LXC
|
|
||||||
%if 0%{?rhel} == 5
|
|
||||||
%define with_lxc 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# RHEL-6 stopped including Xen on all archs.
|
# RHEL-6 stopped including Xen on all archs.
|
||||||
%if 0%{?rhel} >= 6
|
%if 0%{?rhel}
|
||||||
%define with_xen 0
|
%define with_xen 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Fedora doesn't have new enough Xen for libxl until F18
|
|
||||||
%if 0%{?fedora} && 0%{?fedora} < 18
|
|
||||||
%define with_libxl 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# fuse is used to provide virtualized /proc for LXC
|
# fuse is used to provide virtualized /proc for LXC
|
||||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
%define with_fuse 0%{!?_without_fuse:1}
|
%define with_fuse 0%{!?_without_fuse:1}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# RHEL 5 lacks newer tools
|
%define with_polkit 0%{!?_without_polkit:1}
|
||||||
%if 0%{?rhel} == 5
|
%define with_capng 0%{!?_without_capng:1}
|
||||||
%define with_hal 0%{!?_without_hal:%{server_drivers}}
|
%define with_netcf 0%{!?_without_netcf:%{server_drivers}}
|
||||||
%else
|
%define with_udev 0%{!?_without_udev:%{server_drivers}}
|
||||||
%define with_polkit 0%{!?_without_polkit:1}
|
%define with_yajl 0%{!?_without_yajl:%{server_drivers}}
|
||||||
%define with_capng 0%{!?_without_capng:1}
|
%define with_dtrace 1
|
||||||
%define with_netcf 0%{!?_without_netcf:%{server_drivers}}
|
|
||||||
%define with_udev 0%{!?_without_udev:%{server_drivers}}
|
|
||||||
%define with_yajl 0%{!?_without_yajl:%{server_drivers}}
|
|
||||||
%define with_dtrace 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# interface requires netcf
|
# interface requires netcf
|
||||||
%if ! 0%{?with_netcf}
|
%if ! 0%{?with_netcf}
|
||||||
@ -257,17 +216,17 @@
|
|||||||
|
|
||||||
# Enable sanlock library for lock management with QEMU
|
# Enable sanlock library for lock management with QEMU
|
||||||
# Sanlock is available only on arches where kvm is available for RHEL
|
# Sanlock is available only on arches where kvm is available for RHEL
|
||||||
%if 0%{?fedora} >= 16
|
%if 0%{?fedora}
|
||||||
%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
|
%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?rhel} >= 6
|
%if 0%{?rhel}
|
||||||
%ifarch %{qemu_kvm_arches}
|
%ifarch %{qemu_kvm_arches}
|
||||||
%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
|
%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Enable libssh2 transport for new enough distros
|
# Enable libssh2 transport for new enough distros
|
||||||
%if 0%{?fedora} >= 17
|
%if 0%{?fedora}
|
||||||
%define with_libssh2 0%{!?_without_libssh2:1}
|
%define with_libssh2 0%{!?_without_libssh2:1}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -304,10 +263,8 @@
|
|||||||
|
|
||||||
# numad is used to manage the CPU and memory placement dynamically,
|
# numad is used to manage the CPU and memory placement dynamically,
|
||||||
# it's not available on s390[x] and ARM.
|
# it's not available on s390[x] and ARM.
|
||||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
|
%ifnarch s390 s390x %{arm}
|
||||||
%ifnarch s390 s390x %{arm}
|
%define with_numad 0%{!?_without_numad:%{server_drivers}}
|
||||||
%define with_numad 0%{!?_without_numad:%{server_drivers}}
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -316,10 +273,8 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Pull in cgroups config system
|
# Pull in cgroups config system
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
%if %{with_qemu} || %{with_lxc}
|
||||||
%if %{with_qemu} || %{with_lxc}
|
%define with_cgconfig 0%{!?_without_cgconfig:1}
|
||||||
%define with_cgconfig 0%{!?_without_cgconfig:1}
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_udev} || %{with_hal}
|
%if %{with_udev} || %{with_hal}
|
||||||
@ -336,13 +291,8 @@
|
|||||||
|
|
||||||
|
|
||||||
# Force QEMU to run as non-root
|
# Force QEMU to run as non-root
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
%define qemu_user qemu
|
||||||
%define qemu_user qemu
|
%define qemu_group qemu
|
||||||
%define qemu_group qemu
|
|
||||||
%else
|
|
||||||
%define qemu_user root
|
|
||||||
%define qemu_group root
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
# Advertise OVMF and AAVMF from nightly firmware repo
|
# Advertise OVMF and AAVMF from nightly firmware repo
|
||||||
@ -351,15 +301,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
# The RHEL-5 Xen package has some feature backports. This
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
# flag is set to enable use of those special bits on RHEL-5
|
|
||||||
%if 0%{?rhel} == 5
|
|
||||||
%define with_rhel5 1
|
|
||||||
%else
|
|
||||||
%define with_rhel5 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
|
|
||||||
%define with_systemd_macros 1
|
%define with_systemd_macros 1
|
||||||
%else
|
%else
|
||||||
%define with_systemd_macros 0
|
%define with_systemd_macros 0
|
||||||
@ -460,7 +402,7 @@ BuildRequires: readline-devel
|
|||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: libtasn1-devel
|
BuildRequires: libtasn1-devel
|
||||||
%if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 19)
|
%if (0%{?rhel} && 0%{?rhel} < 7)
|
||||||
BuildRequires: libgcrypt-devel
|
BuildRequires: libgcrypt-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: gnutls-devel
|
BuildRequires: gnutls-devel
|
||||||
@ -469,15 +411,13 @@ BuildRequires: libattr-devel
|
|||||||
# For pool-build probing for existing pools
|
# For pool-build probing for existing pools
|
||||||
BuildRequires: libblkid-devel >= 2.17
|
BuildRequires: libblkid-devel >= 2.17
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
|
||||||
# for augparse, optionally used in testing
|
# for augparse, optionally used in testing
|
||||||
BuildRequires: augeas
|
BuildRequires: augeas
|
||||||
%endif
|
|
||||||
%if %{with_hal}
|
%if %{with_hal}
|
||||||
BuildRequires: hal-devel
|
BuildRequires: hal-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with_udev}
|
%if %{with_udev}
|
||||||
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
BuildRequires: systemd-devel >= 185
|
BuildRequires: systemd-devel >= 185
|
||||||
%else
|
%else
|
||||||
BuildRequires: libudev-devel >= 145
|
BuildRequires: libudev-devel >= 145
|
||||||
@ -488,23 +428,13 @@ BuildRequires: libpciaccess-devel >= 0.10.9
|
|||||||
BuildRequires: yajl-devel
|
BuildRequires: yajl-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with_sanlock}
|
%if %{with_sanlock}
|
||||||
# make sure libvirt is built with new enough sanlock on
|
|
||||||
# distros that have it; required for on_lockfailure
|
|
||||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
|
|
||||||
BuildRequires: sanlock-devel >= 2.4
|
BuildRequires: sanlock-devel >= 2.4
|
||||||
%else
|
|
||||||
BuildRequires: sanlock-devel >= 1.8
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%if %{with_libpcap}
|
%if %{with_libpcap}
|
||||||
BuildRequires: libpcap-devel
|
BuildRequires: libpcap-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with_libnl}
|
%if %{with_libnl}
|
||||||
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
|
|
||||||
BuildRequires: libnl3-devel
|
BuildRequires: libnl3-devel
|
||||||
%else
|
|
||||||
BuildRequires: libnl-devel
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%if %{with_avahi}
|
%if %{with_avahi}
|
||||||
BuildRequires: avahi-devel
|
BuildRequires: avahi-devel
|
||||||
@ -518,7 +448,7 @@ BuildRequires: libapparmor-devel
|
|||||||
%if %{with_network}
|
%if %{with_network}
|
||||||
BuildRequires: dnsmasq >= 2.41
|
BuildRequires: dnsmasq >= 2.41
|
||||||
BuildRequires: iptables
|
BuildRequires: iptables
|
||||||
%if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0%{?rhel} < 7)
|
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||||
BuildRequires: iptables-ipv6
|
BuildRequires: iptables-ipv6
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: radvd
|
BuildRequires: radvd
|
||||||
@ -531,16 +461,12 @@ BuildRequires: module-init-tools
|
|||||||
BuildRequires: cyrus-sasl-devel
|
BuildRequires: cyrus-sasl-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with_polkit}
|
%if %{with_polkit}
|
||||||
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
# F22 polkit-devel doesn't pull in polkit anymore, which we need for pkcheck
|
# F22 polkit-devel doesn't pull in polkit anymore, which we need for pkcheck
|
||||||
BuildRequires: polkit >= 0.112
|
BuildRequires: polkit >= 0.112
|
||||||
BuildRequires: polkit-devel >= 0.112
|
BuildRequires: polkit-devel >= 0.112
|
||||||
%else
|
%else
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
|
||||||
BuildRequires: polkit-devel >= 0.93
|
BuildRequires: polkit-devel >= 0.93
|
||||||
%else
|
|
||||||
BuildRequires: PolicyKit-devel >= 0.6
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if %{with_storage_fs}
|
%if %{with_storage_fs}
|
||||||
@ -567,19 +493,10 @@ BuildRequires: iscsi-initiator-utils
|
|||||||
%if %{with_storage_disk}
|
%if %{with_storage_disk}
|
||||||
# For disk driver
|
# For disk driver
|
||||||
BuildRequires: parted-devel
|
BuildRequires: parted-devel
|
||||||
%if 0%{?rhel} == 5
|
|
||||||
# Broken RHEL-5 parted RPM is missing a dep
|
|
||||||
BuildRequires: e2fsprogs-devel
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%if %{with_storage_mpath} || %{with_storage_disk}
|
%if %{with_storage_mpath} || %{with_storage_disk}
|
||||||
# For Multipath support
|
# For Multipath support
|
||||||
%if 0%{?rhel} == 5
|
|
||||||
# Broken RHEL-5 packaging has header files in main RPM :-(
|
|
||||||
BuildRequires: device-mapper
|
|
||||||
%else
|
|
||||||
BuildRequires: device-mapper-devel
|
BuildRequires: device-mapper-devel
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%if %{with_storage_rbd}
|
%if %{with_storage_rbd}
|
||||||
%if 0%{?rhel} >= 7
|
%if 0%{?rhel} >= 7
|
||||||
@ -590,13 +507,8 @@ BuildRequires: ceph-devel
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if %{with_storage_gluster}
|
%if %{with_storage_gluster}
|
||||||
%if 0%{?rhel} >= 6
|
|
||||||
BuildRequires: glusterfs-api-devel >= 3.4.0
|
|
||||||
BuildRequires: glusterfs-devel >= 3.4.0
|
|
||||||
%else
|
|
||||||
BuildRequires: glusterfs-api-devel >= 3.4.1
|
BuildRequires: glusterfs-api-devel >= 3.4.1
|
||||||
BuildRequires: glusterfs-devel >= 3.4.1
|
BuildRequires: glusterfs-devel >= 3.4.1
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%if %{with_numactl}
|
%if %{with_numactl}
|
||||||
# For QEMU/LXC numa info
|
# For QEMU/LXC numa info
|
||||||
@ -613,22 +525,14 @@ BuildRequires: libssh2-devel >= 1.3.0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_netcf}
|
%if %{with_netcf}
|
||||||
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
BuildRequires: netcf-devel >= 0.2.2
|
BuildRequires: netcf-devel >= 0.2.2
|
||||||
%else
|
%else
|
||||||
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 6
|
|
||||||
BuildRequires: netcf-devel >= 0.1.8
|
BuildRequires: netcf-devel >= 0.1.8
|
||||||
%else
|
|
||||||
BuildRequires: netcf-devel >= 0.1.4
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if %{with_esx}
|
%if %{with_esx}
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
|
||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
%else
|
|
||||||
BuildRequires: curl-devel
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%if %{with_hyperv}
|
%if %{with_hyperv}
|
||||||
BuildRequires: libwsman-devel >= 2.2.3
|
BuildRequires: libwsman-devel >= 2.2.3
|
||||||
@ -698,21 +602,13 @@ Requires: module-init-tools
|
|||||||
# for /sbin/ip & /sbin/tc
|
# for /sbin/ip & /sbin/tc
|
||||||
Requires: iproute
|
Requires: iproute
|
||||||
%if %{with_avahi}
|
%if %{with_avahi}
|
||||||
%if 0%{?rhel} == 5
|
|
||||||
Requires: avahi
|
|
||||||
%else
|
|
||||||
Requires: avahi-libs
|
Requires: avahi-libs
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%if %{with_polkit}
|
%if %{with_polkit}
|
||||||
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
Requires: polkit >= 0.112
|
Requires: polkit >= 0.112
|
||||||
%else
|
%else
|
||||||
%if 0%{?fedora} || 0%{?rhel} >=6
|
|
||||||
Requires: polkit >= 0.93
|
Requires: polkit >= 0.93
|
||||||
%else
|
|
||||||
Requires: PolicyKit >= 0.6
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if %{with_cgconfig}
|
%if %{with_cgconfig}
|
||||||
@ -779,7 +675,7 @@ Requires: libvirt-daemon = %{version}-%{release}
|
|||||||
Requires: dnsmasq >= 2.41
|
Requires: dnsmasq >= 2.41
|
||||||
Requires: radvd
|
Requires: radvd
|
||||||
Requires: iptables
|
Requires: iptables
|
||||||
%if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0%{?rhel} < 7)
|
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||||
Requires: iptables-ipv6
|
Requires: iptables-ipv6
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -796,7 +692,7 @@ Summary: Nwfilter driver plugin for the libvirtd daemon
|
|||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
Requires: iptables
|
Requires: iptables
|
||||||
%if (0%{?fedora} && 0%{?fedora} < 17) || (0%{?rhel} && 0%{?rhel} < 7)
|
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||||
Requires: iptables-ipv6
|
Requires: iptables-ipv6
|
||||||
%endif
|
%endif
|
||||||
Requires: ebtables
|
Requires: ebtables
|
||||||
@ -818,7 +714,7 @@ Requires: libvirt-daemon = %{version}-%{release}
|
|||||||
Requires: hal
|
Requires: hal
|
||||||
%endif
|
%endif
|
||||||
%if %{with_udev}
|
%if %{with_udev}
|
||||||
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
Requires: systemd >= 185
|
Requires: systemd >= 185
|
||||||
%else
|
%else
|
||||||
Requires: udev >= 145
|
Requires: udev >= 145
|
||||||
@ -837,7 +733,7 @@ capabilities.
|
|||||||
Summary: Interface driver plugin for the libvirtd daemon
|
Summary: Interface driver plugin for the libvirtd daemon
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
%if %{with_netcf} && (0%{?fedora} >= 18 || 0%{?rhel} >= 7)
|
%if %{with_netcf} && (0%{?fedora} || 0%{?rhel} >= 7)
|
||||||
Requires: netcf-libs >= 0.2.2
|
Requires: netcf-libs >= 0.2.2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -1203,11 +1099,7 @@ Include header files & development libraries for the libvirt C library.
|
|||||||
%package lock-sanlock
|
%package lock-sanlock
|
||||||
Summary: Sanlock lock manager plugin for QEMU driver
|
Summary: Sanlock lock manager plugin for QEMU driver
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
|
|
||||||
Requires: sanlock >= 2.4
|
Requires: sanlock >= 2.4
|
||||||
%else
|
|
||||||
Requires: sanlock >= 1.8
|
|
||||||
%endif
|
|
||||||
#for virt-sanlock-cleanup require augeas
|
#for virt-sanlock-cleanup require augeas
|
||||||
Requires: augeas
|
Requires: augeas
|
||||||
Requires: %{name}-daemon = %{version}-%{release}
|
Requires: %{name}-daemon = %{version}-%{release}
|
||||||
@ -1230,6 +1122,11 @@ Libvirt plugin for NSS for translating domain names into IP addresses.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%if ! %{supported_platform}
|
||||||
|
echo "This RPM requires either Fedora >= 20 or RHEL >= 6"
|
||||||
|
exit 1
|
||||||
|
%endif
|
||||||
|
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
# Patches have to be stored in a temporary file because RPM has
|
# Patches have to be stored in a temporary file because RPM has
|
||||||
@ -1329,10 +1226,6 @@ rm -rf .git
|
|||||||
%define _without_uml --without-uml
|
%define _without_uml --without-uml
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_rhel5}
|
|
||||||
%define _with_rhel5_api --with-rhel5-api
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if ! %{with_interface}
|
%if ! %{with_interface}
|
||||||
%define _without_interface --without-interface
|
%define _without_interface --without-interface
|
||||||
%endif
|
%endif
|
||||||
@ -1470,7 +1363,7 @@ rm -rf .git
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_selinux}
|
%if %{with_selinux}
|
||||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
%define with_selinux_mount --with-selinux-mount="/sys/fs/selinux"
|
%define with_selinux_mount --with-selinux-mount="/sys/fs/selinux"
|
||||||
%else
|
%else
|
||||||
%define with_selinux_mount --with-selinux-mount="/selinux"
|
%define with_selinux_mount --with-selinux-mount="/selinux"
|
||||||
@ -1504,7 +1397,6 @@ rm -f po/stamp-po
|
|||||||
--without-bhyve \
|
--without-bhyve \
|
||||||
%{?_without_interface} \
|
%{?_without_interface} \
|
||||||
%{?_without_network} \
|
%{?_without_network} \
|
||||||
%{?_with_rhel5_api} \
|
|
||||||
%{?_without_storage_fs} \
|
%{?_without_storage_fs} \
|
||||||
%{?_without_storage_lvm} \
|
%{?_without_storage_lvm} \
|
||||||
%{?_without_storage_iscsi} \
|
%{?_without_storage_iscsi} \
|
||||||
@ -1638,10 +1530,6 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} == 5
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/60-libvirtd.conf
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -fr %{buildroot}
|
rm -fr %{buildroot}
|
||||||
|
|
||||||
@ -1666,7 +1554,6 @@ fi
|
|||||||
%pre daemon
|
%pre daemon
|
||||||
%if ! %{with_driver_modules}
|
%if ! %{with_driver_modules}
|
||||||
%if %{with_qemu}
|
%if %{with_qemu}
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
|
||||||
# We want soft static allocation of well-known ids, as disk images
|
# We want soft static allocation of well-known ids, as disk images
|
||||||
# are commonly shared across NFS mounts by id rather than name; see
|
# are commonly shared across NFS mounts by id rather than name; see
|
||||||
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups
|
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups
|
||||||
@ -1679,17 +1566,14 @@ if ! getent passwd qemu >/dev/null; then
|
|||||||
useradd -r -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
|
useradd -r -g qemu -G kvm -d / -s /sbin/nologin -c "qemu user" qemu
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_polkit}
|
%if %{with_polkit}
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
|
||||||
# 'libvirt' group is just to allow password-less polkit access to
|
# 'libvirt' group is just to allow password-less polkit access to
|
||||||
# libvirtd. The uid number is irrelevant, so we use dynamic allocation
|
# libvirtd. The uid number is irrelevant, so we use dynamic allocation
|
||||||
# described at the above link.
|
# described at the above link.
|
||||||
getent group libvirt >/dev/null || groupadd -r libvirt
|
getent group libvirt >/dev/null || groupadd -r libvirt
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
@ -1712,7 +1596,7 @@ fi
|
|||||||
%if %{with_cgconfig}
|
%if %{with_cgconfig}
|
||||||
# Starting with Fedora 16/RHEL-7, systemd automounts all cgroups,
|
# Starting with Fedora 16/RHEL-7, systemd automounts all cgroups,
|
||||||
# and cgconfig is no longer a necessary service.
|
# and cgconfig is no longer a necessary service.
|
||||||
%if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 16)
|
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||||
if [ "$1" -eq "1" ]; then
|
if [ "$1" -eq "1" ]; then
|
||||||
/sbin/chkconfig cgconfig on
|
/sbin/chkconfig cgconfig on
|
||||||
fi
|
fi
|
||||||
@ -1864,7 +1748,6 @@ fi
|
|||||||
%if %{with_driver_modules}
|
%if %{with_driver_modules}
|
||||||
%if %{with_qemu}
|
%if %{with_qemu}
|
||||||
%pre daemon-driver-qemu
|
%pre daemon-driver-qemu
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
|
||||||
# We want soft static allocation of well-known ids, as disk images
|
# We want soft static allocation of well-known ids, as disk images
|
||||||
# are commonly shared across NFS mounts by id rather than name; see
|
# are commonly shared across NFS mounts by id rather than name; see
|
||||||
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups
|
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups
|
||||||
@ -1878,7 +1761,6 @@ if ! getent passwd qemu >/dev/null; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%endif # %{with_libvirtd}
|
%endif # %{with_libvirtd}
|
||||||
@ -1987,9 +1869,7 @@ exit 0
|
|||||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
|
||||||
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
|
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
|
||||||
%endif
|
|
||||||
|
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
||||||
%dir %{_datadir}/libvirt/
|
%dir %{_datadir}/libvirt/
|
||||||
@ -2017,13 +1897,9 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_polkit}
|
%if %{with_polkit}
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
|
||||||
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
|
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
|
||||||
%{_datadir}/polkit-1/actions/org.libvirt.api.policy
|
%{_datadir}/polkit-1/actions/org.libvirt.api.policy
|
||||||
%{_datadir}/polkit-1/rules.d/50-libvirt.rules
|
%{_datadir}/polkit-1/rules.d/50-libvirt.rules
|
||||||
%else
|
|
||||||
%{_datadir}/PolicyKit/policy/org.libvirt.unix.policy
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
|
||||||
|
Loading…
Reference in New Issue
Block a user