[PATCH RFC 1/4] rpm: boilerplate to pull in qemu-srpm-macros

Daniel P. Berrangé berrange at redhat.com
Thu Jul 20 14:50:08 UTC 2023


This package provides a few RPM macros that describe the capabilities of
the QEMU build in the distro.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 libvirt.spec.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 1f77cd90b7..73a8faae6e 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -6,6 +6,12 @@
 %define min_rhel 8
 %define min_fedora 33
 
+%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10
+    %define with_qemu_macros 1
+%else
+    %define with_qemu_macros 0
+%endif
+
 %define arches_qemu_kvm         %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
 %if 0%{?rhel}
     %if 0%{?rhel} > 8
@@ -267,6 +273,9 @@ Requires: libvirt-libs = %{version}-%{release}
 
 # All build-time requirements. Run-time requirements are
 # listed against each sub-RPM
+%if %{with_qemu_macros}
+BuildRequires: qemu-srpm-macros
+%endif
 BuildRequires: python3-docutils
 BuildRequires: gcc
 BuildRequires: meson >= 0.56.0
-- 
2.41.0



More information about the libvir-list mailing list