[libvirt PATCH v2 8/9] spec: Refactor qemu_kvm_arches definition

Andrea Bolognani abologna at redhat.com
Fri Oct 9 09:25:45 UTC 2020

There's no need to set a default for it if we're going to override
it immediately afterwards anyway, and setting with_qemu_tcg at the
same time only makes things more confusing.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
 libvirt.spec.in | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 7ab62ebd63..a0cd5ce5af 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -17,31 +17,30 @@
     %define _vpath_builddir %{_target_platform}
+%define qemu_kvm_arches         %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
+%if 0%{?rhel}
+    %define qemu_kvm_arches     x86_64 %{power64} aarch64 s390x
 # The hypervisor drivers that run in libvirtd
 %define with_qemu          0%{!?_without_qemu:1}
 %define with_lxc           0%{!?_without_lxc:1}
 %define with_libxl         0%{!?_without_libxl:1}
 %define with_vbox          0%{!?_without_vbox:1}
-%define with_qemu_tcg      %{with_qemu}
-%define qemu_kvm_arches %{ix86} x86_64
-%if 0%{?fedora}
-    %define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64
-%if 0%{?rhel}
-    %define with_qemu_tcg 0
-    %define qemu_kvm_arches x86_64 %{power64} aarch64 s390x
 %ifarch %{qemu_kvm_arches}
     %define with_qemu_kvm      %{with_qemu}
     %define with_qemu_kvm      0
+%define with_qemu_tcg      %{with_qemu}
+# RHEL disables TCG on all architectures
+%if 0%{?rhel}
+    %define with_qemu_tcg 0
 %if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
     %define with_qemu 0

More information about the libvir-list mailing list