]> xenbits.xensource.com Git - libvirt.git/commitdiff
spec: Consolidate with_qemu* definitions
authorJiri Denemark <jdenemar@redhat.com>
Thu, 17 Jul 2014 13:48:37 +0000 (15:48 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 18 Jul 2014 08:07:16 +0000 (10:07 +0200)
Decisions whether qemu driver and libvirt-daemon-{qemu,kvm} packages
should be built on various OS/arch combinations were scattered around
the spec file. Let's make it easier to see where qemu driver is going to
be built.

libvirt.spec.in

index 9c7b241204088d69634a5a966e08b7eb01c86b36..472fa4bf5079fde0d3d96445133ce78c8fabdab5 100644 (file)
 %define with_vbox          0%{!?_without_vbox:%{server_drivers}}
 
 %define with_qemu_tcg      %{with_qemu}
-# Change if we ever provide qemu-kvm binaries on non-x86 hosts
-%if 0%{?fedora} >= 18
+
+%define qemu_kvm_arches %{ix86} x86_64
+
+%if 0%{?fedora}
+    %if 0%{?fedora} < 16
+        # Fedora doesn't have any QEMU on ppc64 until FC16 - only ppc
+        %ifarch ppc64
+            %define with_qemu_tcg 0
+        %endif
+    %endif
+    %if 0%{?fedora} >= 18
+        %define qemu_kvm_arches %{ix86} x86_64 ppc64 s390x
+    %endif
     %if 0%{?fedora} >= 20
-        %define qemu_kvm_arches    %{ix86} x86_64 ppc64 s390x %{arm}
-    %else
-        %define qemu_kvm_arches    %{ix86} x86_64 ppc64 s390x
+        %define qemu_kvm_arches %{ix86} x86_64 ppc64 s390x %{arm}
     %endif
-%else
-    %define qemu_kvm_arches    %{ix86} x86_64
+%endif
+
+%if 0%{?rhel}
+    %define with_qemu_tcg 0
+    %define qemu_kvm_arches x86_64
 %endif
 
 %ifarch %{qemu_kvm_arches}
     %define with_qemu_kvm      0
 %endif
 
+%if ! %{with_qemu_tcg} && ! %{with_qemu_kvm}
+    %define with_qemu 0
+%endif
+
 # Then the hypervisor drivers that run outside libvirtd, in libvirt.so
 %define with_openvz        0%{!?_without_openvz:1}
 %define with_vmware        0%{!?_without_vmware:1}
     %define with_firewalld 1
 %endif
 
-# RHEL-5 has restricted QEMU to x86_64 only and is too old for LXC
+# RHEL-5 is too old for LXC
 %if 0%{?rhel} == 5
-    %define with_qemu_tcg 0
-    %ifnarch x86_64
-        %define with_qemu 0
-        %define with_qemu_kvm 0
-    %endif
     %define with_lxc 0
 %endif
 
-# RHEL-6 has restricted QEMU to x86_64 only, stopped including Xen
-# on all archs. Other archs all have LXC available though
+# RHEL-6 stopped including Xen on all archs.
 %if 0%{?rhel} >= 6
-    %define with_qemu_tcg 0
-    %ifnarch x86_64
-        %define with_qemu 0
-        %define with_qemu_kvm 0
-    %endif
     %define with_xen 0
 %endif
 
-# Fedora doesn't have any QEMU on ppc64 until FC16 - only ppc
-%if 0%{?fedora} && 0%{?fedora} < 16
-    %ifarch ppc64
-        %define with_qemu 0
-    %endif
-%endif
-
 # Fedora doesn't have new enough Xen for libxl until F18
 %if 0%{?fedora} && 0%{?fedora} < 18
     %define with_libxl 0