From 426301008d8e6771a500e0a58a90bda0ce1c9f315b9becfb6304e31e84b18166 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 7 Jul 2014 08:21:47 +0000 Subject: [PATCH] - Update requirements for kvm package. Instead of calling qemu-kvm and Requires: kvm, replace the Requires with /usr/bin/qemu-system-$ARCH Define the helper for aarch64, ppc64, s390x and x86_64. Other archs have to use LIBGUESTFS_HV= (bnc#884564) OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=298 --- libguestfs.changes | 8 ++++++++ libguestfs.spec | 19 +++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/libguestfs.changes b/libguestfs.changes index 0243913..71cf274 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jul 7 10:12:36 CEST 2014 - ohering@suse.de + +- Update requirements for kvm package. Instead of calling qemu-kvm + and Requires: kvm, replace the Requires with /usr/bin/qemu-system-$ARCH + Define the helper for aarch64, ppc64, s390x and x86_64. + Other archs have to use LIBGUESTFS_HV= (bnc#884564) + ------------------------------------------------------------------- Mon Jul 7 09:37:23 CEST 2014 - ohering@suse.de diff --git a/libguestfs.spec b/libguestfs.spec index 3682c2f..9ab38f0 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -95,6 +95,21 @@ Release: 0 %define kernel_binary /boot/uImage %endif # +# use 'env LIBGUESTFS_HV=/path/to/kvm libguestfs-test-tool' to verify +%define kvm_binary /bin/false +%ifarch aarch64 +%define kvm_binary /usr/bin/qemu-system-aarch64 +%endif +%ifarch ppc64 +%define kvm_binary /usr/bin/qemu-system-ppc64 +%endif +%ifarch s390x +%define kvm_binary /usr/bin/qemu-system-s390x +%endif +%ifarch x86_64 +%define kvm_binary /usr/bin/qemu-system-x86_64 +%endif +# %define guestfs_docdir %{_defaultdocdir}/%{name} # Name: libguestfs @@ -207,7 +222,7 @@ License: GPL-2.0 Group: System/Filesystems Provides: %{name} = %{version} Obsoletes: %{name} < %{version} -Requires: kvm >= 1.1 +Requires: %{kvm_binary} %if %{with bash_completion} Recommends: bash-completion >= 2.0 %endif @@ -493,7 +508,7 @@ export PERLLIB=`echo $PWD/Pod-Simple-*/lib` # With QEMU in environment qemu and kvm packages are not needed at build time. # With SUPERMIN and SUPERMIN_HELPER in environment, supermin package is not needed at build time. export vmchannel_test=no -export QEMU=/usr/bin/qemu-kvm +export QEMU="%{kvm_binary}" export SUPERMIN=supermin export SUPERMIN_HELPER=supermin-helper # for configure macro below