mirror of https://gitee.com/openkylin/libvirt.git
rpm: increase min required RHEL to 7
We no longer build on RHEL-6, so can bump min required RHEL to 7 removing many conditions. Reviewed-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
cf92b90e35
commit
0f5c19b4b6
|
@ -3,7 +3,7 @@
|
|||
# This spec file assumes you are building on a Fedora or RHEL version
|
||||
# that's still supported by the vendor. It may work on other distros
|
||||
# or versions, but no effort will be made to ensure that going forward.
|
||||
%define min_rhel 6
|
||||
%define min_rhel 7
|
||||
%define min_fedora 26
|
||||
|
||||
%if (0%{?fedora} && 0%{?fedora} >= %{min_fedora}) || (0%{?rhel} && 0%{?rhel} >= %{min_rhel})
|
||||
|
@ -34,10 +34,7 @@
|
|||
|
||||
%if 0%{?rhel}
|
||||
%define with_qemu_tcg 0
|
||||
%define qemu_kvm_arches x86_64
|
||||
%if 0%{?rhel} >= 7
|
||||
%define qemu_kvm_arches x86_64 %{power64} aarch64 s390x
|
||||
%endif
|
||||
%define qemu_kvm_arches x86_64 %{power64} aarch64 s390x
|
||||
%endif
|
||||
|
||||
%ifarch %{qemu_kvm_arches}
|
||||
|
@ -58,11 +55,7 @@
|
|||
%define with_hyperv 0%{!?_without_hyperv:1}
|
||||
|
||||
# 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
|
||||
%define with_storage_rbd 0%{!?_without_storage_rbd:1}
|
||||
%if 0%{?fedora}
|
||||
%define with_storage_sheepdog 0%{!?_without_storage_sheepdog:1}
|
||||
%else
|
||||
|
@ -116,7 +109,7 @@
|
|||
|
||||
# librados and librbd are built only on x86_64 on rhel
|
||||
%ifnarch x86_64
|
||||
%if 0%{?rhel} >= 7
|
||||
%if 0%{?rhel}
|
||||
%define with_storage_rbd 0
|
||||
%endif
|
||||
%endif
|
||||
|
@ -146,20 +139,12 @@
|
|||
%endif
|
||||
%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} >= 7
|
||||
%define with_firewalld 1
|
||||
%endif
|
||||
%define with_systemd 1
|
||||
%define with_pm_utils 0
|
||||
%define with_firewalld 1
|
||||
|
||||
# fuse is used to provide virtualized /proc for LXC
|
||||
%if %{with_lxc} && 0%{?rhel} != 6
|
||||
%if %{with_lxc}
|
||||
%define with_fuse 0%{!?_without_fuse:1}
|
||||
%endif
|
||||
|
||||
|
@ -194,10 +179,7 @@
|
|||
%define with_libssh 0%{!?_without_libssh:1}
|
||||
%endif
|
||||
|
||||
# Enable bash-completion for new enough distros
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
%define with_bash_completion 0%{!?_without_bash_completion:1}
|
||||
%endif
|
||||
%define with_bash_completion 0%{!?_without_bash_completion:1}
|
||||
|
||||
# Use Python 3 when possible, Python 2 otherwise
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
|
@ -220,11 +202,7 @@
|
|||
%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
|
||||
|
@ -315,47 +293,29 @@ BuildRequires: bash-completion >= 2.0
|
|||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gettext
|
||||
BuildRequires: libtasn1-devel
|
||||
%if (0%{?rhel} && 0%{?rhel} < 7)
|
||||
BuildRequires: libgcrypt-devel
|
||||
%endif
|
||||
BuildRequires: gnutls-devel
|
||||
BuildRequires: libattr-devel
|
||||
# For pool-build probing for existing pools
|
||||
BuildRequires: libblkid-devel >= 2.17
|
||||
# for augparse, optionally used in testing
|
||||
BuildRequires: augeas
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
BuildRequires: systemd-devel >= 185
|
||||
%else
|
||||
BuildRequires: libudev-devel >= 145
|
||||
%endif
|
||||
BuildRequires: libpciaccess-devel >= 0.10.9
|
||||
BuildRequires: jansson-devel
|
||||
%if %{with_sanlock}
|
||||
BuildRequires: sanlock-devel >= 2.4
|
||||
%endif
|
||||
BuildRequires: libpcap-devel
|
||||
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||
BuildRequires: libnl-devel
|
||||
%else
|
||||
BuildRequires: libnl3-devel
|
||||
%endif
|
||||
BuildRequires: avahi-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: dnsmasq >= 2.41
|
||||
BuildRequires: iptables
|
||||
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||
BuildRequires: iptables-ipv6
|
||||
%endif
|
||||
BuildRequires: radvd
|
||||
BuildRequires: ebtables
|
||||
BuildRequires: module-init-tools
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
BuildRequires: polkit >= 0.112
|
||||
%else
|
||||
BuildRequires: polkit >= 0.93
|
||||
%endif
|
||||
# For mount/umount in FS driver
|
||||
BuildRequires: util-linux
|
||||
%if %{with_qemu}
|
||||
|
@ -373,12 +333,8 @@ BuildRequires: parted-devel
|
|||
# For Multipath support
|
||||
BuildRequires: device-mapper-devel
|
||||
%if %{with_storage_rbd}
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
BuildRequires: librados2-devel
|
||||
BuildRequires: librbd1-devel
|
||||
%else
|
||||
BuildRequires: ceph-devel
|
||||
%endif
|
||||
%endif
|
||||
%if %{with_storage_gluster}
|
||||
BuildRequires: glusterfs-api-devel >= 3.4.1
|
||||
|
@ -405,11 +361,7 @@ BuildRequires: fuse-devel >= 2.8.6
|
|||
BuildRequires: libssh2-devel >= 1.3.0
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
BuildRequires: netcf-devel >= 0.2.2
|
||||
%else
|
||||
BuildRequires: netcf-devel >= 0.1.8
|
||||
%endif
|
||||
%if %{with_esx}
|
||||
BuildRequires: libcurl-devel
|
||||
%endif
|
||||
|
@ -485,11 +437,7 @@ Requires: iproute-tc
|
|||
%endif
|
||||
|
||||
Requires: avahi-libs
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
Requires: polkit >= 0.112
|
||||
%else
|
||||
Requires: polkit >= 0.93
|
||||
%endif
|
||||
%ifarch %{ix86} x86_64 ia64
|
||||
# For virConnectGetSysinfo
|
||||
Requires: dmidecode
|
||||
|
@ -539,9 +487,6 @@ Requires: libvirt-libs = %{version}-%{release}
|
|||
Requires: dnsmasq >= 2.41
|
||||
Requires: radvd
|
||||
Requires: iptables
|
||||
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||
Requires: iptables-ipv6
|
||||
%endif
|
||||
|
||||
%description daemon-driver-network
|
||||
The network driver plugin for the libvirtd daemon, providing
|
||||
|
@ -554,9 +499,6 @@ Summary: Nwfilter driver plugin for the libvirtd daemon
|
|||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
Requires: libvirt-libs = %{version}-%{release}
|
||||
Requires: iptables
|
||||
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||
Requires: iptables-ipv6
|
||||
%endif
|
||||
Requires: ebtables
|
||||
|
||||
%description daemon-driver-nwfilter
|
||||
|
@ -570,11 +512,7 @@ Summary: Nodedev driver plugin for the libvirtd daemon
|
|||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
Requires: libvirt-libs = %{version}-%{release}
|
||||
# needed for device enumeration
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
Requires: systemd >= 185
|
||||
%else
|
||||
Requires: udev >= 145
|
||||
%endif
|
||||
|
||||
%description daemon-driver-nodedev
|
||||
The nodedev driver plugin for the libvirtd daemon, providing
|
||||
|
@ -586,9 +524,7 @@ capabilities.
|
|||
Summary: Interface driver plugin for the libvirtd daemon
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
Requires: libvirt-libs = %{version}-%{release}
|
||||
%if (0%{?fedora} || 0%{?rhel} >= 7)
|
||||
Requires: netcf-libs >= 0.2.2
|
||||
%endif
|
||||
|
||||
%description daemon-driver-interface
|
||||
The interface driver plugin for the libvirtd daemon, providing
|
||||
|
@ -1254,11 +1190,7 @@ exit 1
|
|||
%define arg_init_script --with-init-script=redhat
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
%define arg_selinux_mount --with-selinux-mount="/sys/fs/selinux"
|
||||
%else
|
||||
%define arg_selinux_mount --with-selinux-mount="/selinux"
|
||||
%endif
|
||||
%define arg_selinux_mount --with-selinux-mount="/sys/fs/selinux"
|
||||
|
||||
%if 0%{?fedora}
|
||||
# Nightly firmware repo x86/OVMF
|
||||
|
@ -2028,8 +1960,6 @@ exit 0
|
|||
%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
|
||||
|
||||
%files libs -f %{name}.lang
|
||||
# RHEL6 doesn't have 'license' macro
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING COPYING.LESSER
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirt-admin.conf
|
||||
|
|
Loading…
Reference in New Issue