According to our platform support policy
https://libvirt.org/platforms.html
RHEL 7 and all versions of Fedora older than 33 are going to
be out of scope by the time libvirt 7.4.0 is released.
Dropping RHEL 7 in particular allows us to greatly simplify
many parts of the spec file.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
libvirt.spec.in | 102 ++++++++----------------------------------
mingw-libvirt.spec.in | 2 +-
2 files changed, 19 insertions(+), 85 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 27de42f822..013c7742a2 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -3,8 +3,8 @@
# 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 7
-%define min_fedora 31
+%define min_rhel 8
+%define min_fedora 33
%if 0%{?fedora} >= %{min_fedora} || 0%{?rhel} >= %{min_rhel}
%define supported_platform 1
@@ -12,18 +12,9 @@
%define supported_platform 0
%endif
-# On RHEL 7 and older macro _vpath_builddir is not defined.
-%if 0%{?rhel} && 0%{?rhel} <= 7
- %define _vpath_builddir %{_target_platform}
-%endif
-
%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
%if 0%{?rhel}
- %if 0%{?rhel} <= 8
- %define arches_qemu_kvm x86_64 %{power64} aarch64 s390x
- %else
- %define arches_qemu_kvm x86_64 aarch64 s390x
- %endif
+ %define arches_qemu_kvm x86_64 aarch64 s390x
%endif
%define arches_64bit x86_64 %{power64} aarch64 s390x riscv64
@@ -77,25 +68,20 @@
%define with_storage_gluster 0%{!?_without_storage_gluster:1}
%ifnarch %{arches_qemu_kvm}
- # gluster is only built where qemu driver is enabled on RHEL 8
- %if 0%{?rhel} >= 8
+ # gluster is only built where qemu driver is enabled on RHEL
+ %if 0%{?rhel}
%define with_storage_gluster 0
%endif
%endif
-# F25+ has zfs-fuse
+# Fedora has zfs-fuse
%if 0%{?fedora}
%define with_storage_zfs 0%{!?_without_storage_zfs:1}
%else
%define with_storage_zfs 0
%endif
-# We need a recent enough libiscsi (>= 1.18.0)
-%if 0%{?fedora} || 0%{?rhel} > 7
- %define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
-%else
- %define with_storage_iscsi_direct 0
-%endif
+%define with_storage_iscsi_direct 0%{!?_without_storage_iscsi_direct:1}
# Other optional features
%define with_numactl 0%{!?_without_numactl:1}
@@ -130,9 +116,7 @@
%define with_storage_rbd 0
%endif
-# RHEL doesn't ship OpenVZ, VBox, PowerHypervisor,
-# VMware, libxenlight (Xen 4.1 and newer),
-# or HyperV.
+# RHEL doesn't ship many hypervisor drivers
%if 0%{?rhel}
%define with_openvz 0
%define with_vbox 0
@@ -140,15 +124,10 @@
%define with_libxl 0
%define with_hyperv 0
%define with_vz 0
-
- %if 0%{?rhel} > 7
- %define with_lxc 0
- %endif
+ %define with_lxc 0
%endif
-%if 0%{?fedora} || 0%{?rhel} > 7
- %define with_firewalld_zone 0%{!?_without_firewalld_zone:1}
-%endif
+%define with_firewalld_zone 0%{!?_without_firewalld_zone:1}
%if (0%{?fedora} && 0%{?fedora} < 34) || (0%{?rhel} && 0%{?rhel} <
9)
%define with_netcf 0%{!?_without_netcf:1}
@@ -176,16 +155,12 @@
%define with_libssh2 0%{!?_without_libssh2:1}
%endif
-# Enable wireshark plugins for all distros except RHEL-7
-%if 0%{?fedora} || 0%{?rhel} > 7
- %define with_wireshark 0%{!?_without_wireshark:1}
- %define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan
-%endif
+# Enable wireshark plugins for all distros
+%define with_wireshark 0%{!?_without_wireshark:1}
+%define wireshark_plugindir %(pkg-config --variable plugindir wireshark)/epan
-# Enable libssh transport for new enough distros
-%if 0%{?fedora} || 0%{?rhel} > 7
- %define with_libssh 0%{!?_without_libssh:1}
-%endif
+# Enable libssh transport for all distros
+%define with_libssh 0%{!?_without_libssh:1}
%if %{with_qemu} || %{with_lxc}
# numad is used to manage the CPU and memory placement dynamically,
@@ -213,11 +188,7 @@
%define enable_werror -Dwerror=false
%endif
-%if 0%{?rhel} == 7
- %define tls_priority "NORMAL"
-%else
- %define tls_priority "@LIBVIRT,SYSTEM"
-%endif
+%define tls_priority "@LIBVIRT,SYSTEM"
Summary: Library providing a simple virtualization API
@@ -262,20 +233,12 @@ Requires: libvirt-libs = %{version}-%{release}
# All build-time requirements. Run-time requirements are
# listed against each sub-RPM
-%if 0%{?rhel} == 7
-BuildRequires: python36-docutils
-%else
BuildRequires: python3-docutils
-%endif
BuildRequires: gcc
BuildRequires: meson >= 0.54.0
BuildRequires: ninja-build
BuildRequires: git
-%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: perl-interpreter
-%else
-BuildRequires: perl
-%endif
BuildRequires: python3
BuildRequires: systemd-units
%if %{with_libxl}
@@ -333,13 +296,8 @@ BuildRequires: device-mapper-devel
# For XFS reflink clone support
BuildRequires: xfsprogs-devel
%if %{with_storage_rbd}
- %if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: librados-devel
BuildRequires: librbd-devel
- %else
-BuildRequires: librados2-devel
-BuildRequires: librbd1-devel
- %endif
%endif
%if %{with_storage_gluster}
BuildRequires: glusterfs-api-devel >= 3.4.1
@@ -401,11 +359,7 @@ BuildRequires: wireshark-devel
BuildRequires: libssh-devel >= 0.7.0
%endif
-# On RHEL-7 rpcgen is still part of glibc-common package
-%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: rpcgen
-%endif
-
BuildRequires: libtirpc-devel
# Needed for the firewalld_reload macro
@@ -440,12 +394,10 @@ Requires: /usr/bin/nc
# for modprobe of pci devices
Requires: module-init-tools
-# for /sbin/ip & /sbin/tc
+# for /sbin/ip
Requires: iproute
-# tc is provided by iproute-tc since at least Fedora 26
-%if 0%{?fedora} || 0%{?rhel} > 7
+# for /sbin/tc
Requires: iproute-tc
-%endif
Requires: polkit >= 0.112
%if %{with_dmidecode}
@@ -529,9 +481,7 @@ Requires: libvirt-libs = %{version}-%{release}
# needed for device enumeration
Requires: systemd >= 185
# For managing persistent mediated devices
-%if 0%{?fedora} || 0%{?rhel} > 7
Requires: mdevctl
-%endif
%description daemon-driver-nodedev
The nodedev driver plugin for the libvirtd daemon, providing
@@ -747,12 +697,8 @@ Requires: gzip
Requires: bzip2
Requires: lzop
Requires: xz
- %if 0%{?fedora} || 0%{?rhel} > 7
Requires: systemd-container
- %endif
- %if 0%{?fedora} || 0%{?rhel} > 7
Requires: swtpm-tools
- %endif
%description daemon-driver-qemu
The qemu driver plugin for the libvirtd daemon, providing
@@ -768,9 +714,7 @@ Requires: libvirt-daemon = %{version}-%{release}
Requires: libvirt-libs = %{version}-%{release}
# There really is a hard cross-driver dependency here
Requires: libvirt-daemon-driver-network = %{version}-%{release}
- %if 0%{?fedora} || 0%{?rhel} > 7
Requires: systemd-container
- %endif
%description daemon-driver-lxc
The LXC driver plugin for the libvirtd daemon, providing
@@ -1292,16 +1236,6 @@ mv
$RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
# raising the test timeout
VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10
-%post libs
-%if 0%{?rhel} == 7
-/sbin/ldconfig
-%endif
-
-%postun libs
-%if 0%{?rhel} == 7
-/sbin/ldconfig
-%endif
-
%pre daemon
# 'libvirt' group is just to allow password-less polkit access to
# libvirtd. The uid number is irrelevant, so we use dynamic allocation
diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in
index 288f533d52..84b8998f74 100644
--- a/mingw-libvirt.spec.in
+++ b/mingw-libvirt.spec.in
@@ -3,7 +3,7 @@
# This spec file assumes you are building on a Fedora 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_fedora 31
+%define min_fedora 33
%if 0%{?fedora} && 0%{?fedora} >= %{min_fedora}
%define supported_platform 1
--
2.26.3