spec: fix logic that enables numactl and numad support

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=555
This commit is contained in:
James Fehlig 2016-08-02 21:28:46 +00:00 committed by Git OBS Bridge
parent f0336af2de
commit 619f54d34a

View File

@ -44,7 +44,6 @@
%define with_storage_rbd 0
%define with_storage_sheepdog 0
%define with_storage_gluster 0
%define with_numactl 0%{!?_without_numactl:1}
%define with_apparmor 0%{!?_without_apparmor:1}
# Optional bits on by default
@ -54,6 +53,7 @@
# A few optional bits off by default, we enable later
%define with_cgconfig 0%{!?_without_cgconfig:0}
%define with_systemd 0%{!?_without_systemd:0}
%define with_numactl 0%{!?_without_numactl:0}
%define with_numad 0%{!?_without_numad:0}
%define with_firewalld 0%{!?_without_firewalld:0}
%define with_wireshark 0%{!?_without_wireshark:0}
@ -77,9 +77,17 @@
%endif
%endif
# numactl has 'ExcludeArch s390 s390x'
%ifarch s390 s390x
%define with_numactl 0
# Enable numactl for most architectures. Handle aarch64 separately
%ifnarch s390 s390x %arm %ix86 aarch64
%define with_numactl 0%{!?_without_numactl:1}
%endif
# For aarch64, numactl is only available on newer than 1320, or SLE12
# family newer than 120100
%ifarch aarch64
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?sle_version} > 120100 ) )
%define with_numactl 0%{!?_without_numactl:1}
%endif
%endif
# vbox is available only on i386 x86_64
@ -138,11 +146,19 @@
%define with_wireshark 0
# numad is used to manage the CPU and memory placement dynamically for
# qemu, lxc, and uml drivers. We'll only use it on aarch64 and x86_64
# qemu, lxc, and uml drivers
%if %{with_qemu} || %{with_lxc} || %{with_uml}
%ifarch aarch64 x86_64
# Always enable numad on x86_64
%ifarch x86_64
%define with_numad 0%{!?_without_numad:1}
%endif
# For aarch64, enable on anything newer than 1320, or SLE12 family newer
# than 120100
%ifarch aarch64
%if 0%{?suse_version} > 1320 || ( 0%{?is_opensuse} == 0 && 0%{?sle_version} > 120100 )
%define with_numad 0%{!?_without_numad:1}
%endif
%endif
%endif
# Force QEMU to run as qemu:qemu