- Requires for grub2-x86_64-xen is only valid for x86_64

virt-manager.spec

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=159
This commit is contained in:
Charles Arnold 2014-03-28 14:17:05 +00:00 committed by Git OBS Bridge
parent dc1fe4caa9
commit 849fbaee8b
3 changed files with 50 additions and 11 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 28 08:00:48 MDT 2014 - carnold@suse.com
- Requires for grub2-x86_64-xen is only valid for x86_64
virt-manager.spec
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 27 18:54:21 MDT 2014 - carnold@suse.com Wed Mar 27 18:54:21 MDT 2014 - carnold@suse.com

View File

@ -68,16 +68,17 @@ Patch154: virtinst-detect-suse-distros.patch
Patch155: virtinst-xen-drive-type.patch Patch155: virtinst-xen-drive-type.patch
Patch156: virtinst-modify-gui-defaults.patch Patch156: virtinst-modify-gui-defaults.patch
Patch157: virtinst-pvgrub2-bootloader.patch Patch157: virtinst-pvgrub2-bootloader.patch
Patch158: virtinst-set-qemu-emulator.patch
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define verrel %{version}-%{release} %define verrel %{version}-%{release}
Requires: avahi Requires: virt-manager-common = %{verrel}
Requires: dbus-1-x11 Requires: avahi
Requires: dconf
Requires: gtk3 Requires: gtk3
Requires: python-gconf Requires: python-gconf
Requires: virt-manager-common = %{verrel} Requires: dconf
Requires: dbus-1-x11
Requires: vm-install >= 0.5.6 Requires: vm-install >= 0.5.6
# Libvirt-glib # Libvirt-glib
@ -92,12 +93,12 @@ Requires: typelib-1_0-Vte-2_90
Requires: gtk-vnc2 Requires: gtk-vnc2
Requires: libspice-client-glib-2_0-8 Requires: libspice-client-glib-2_0-8
Requires: libspice-client-gtk-3_0-4 Requires: libspice-client-gtk-3_0-4
Requires: python-gobject-cairo
Requires: typelib-1_0-GVnc-1_0
Requires: typelib-1_0-Gtk-3_0
Requires: typelib-1_0-GtkVnc-2_0
Requires: typelib-1_0-SpiceClientGlib-2_0 Requires: typelib-1_0-SpiceClientGlib-2_0
Requires: typelib-1_0-SpiceClientGtk-3_0 Requires: typelib-1_0-SpiceClientGtk-3_0
Requires: typelib-1_0-Gtk-3_0
Requires: typelib-1_0-GVnc-1_0
Requires: typelib-1_0-GtkVnc-2_0
Requires: python-gobject-cairo
Recommends: python-SpiceClientGtk Recommends: python-SpiceClientGtk
Requires: virt-install Requires: virt-install
@ -126,12 +127,14 @@ Group: System/Monitoring
# This version not strictly required: virt-manager should work with older, # This version not strictly required: virt-manager should work with older,
# however varying amounts of functionality will not be enabled. # however varying amounts of functionality will not be enabled.
Requires: libvirt-python >= 0.7.0 Requires: libvirt-python >= 0.7.0
Requires: python-urlgrabber
Requires: python-ipaddr Requires: python-ipaddr
Requires: python-libxml2 Requires: python-libxml2
Requires: python-urlgrabber %ifarch x86_64
%if 0%{?suse_version} >= 1315 %if 0%{?suse_version} >= 1315
Requires: grub2-x86_64-xen Requires: grub2-x86_64-xen
%endif %endif
%endif
%description common %description common
Common files used by the different virt-manager interfaces, as well as Common files used by the different virt-manager interfaces, as well as
@ -144,10 +147,10 @@ Group: System/Monitoring
Requires: virt-manager-common = %{verrel} Requires: virt-manager-common = %{verrel}
Provides: python-virtinst
Provides: virt-clone Provides: virt-clone
Provides: virt-convert
Provides: virt-image Provides: virt-image
Provides: virt-convert
Provides: python-virtinst
Obsoletes: python-virtinst <= 0.600.4 Obsoletes: python-virtinst <= 0.600.4
Supplements: virt-manager Supplements: virt-manager
@ -191,6 +194,7 @@ machine).
%patch155 -p1 %patch155 -p1
%patch156 -p1 %patch156 -p1
%patch157 -p1 %patch157 -p1
%patch158 -p1
%build %build
%if %{qemu_user} %if %{qemu_user}

View File

@ -0,0 +1,29 @@
Index: virt-manager-1.0.1/virtinst/guest.py
===================================================================
--- virt-manager-1.0.1.orig/virtinst/guest.py
+++ virt-manager-1.0.1/virtinst/guest.py
@@ -19,6 +19,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
+import os
import logging
import urlgrabber.progress as progress
@@ -724,12 +725,13 @@ class Guest(XMLBuilder):
self.emulator = None
return
- if self.emulator:
+ preferred_emulator = "/usr/lib/xen/bin/qemu-system-i386"
+ if self.emulator and self.emulator == preferred_emulator:
return
if self.os.is_hvm() and self.type == "xen":
- if self.conn.caps.host.cpu.arch == "x86_64":
- self.emulator = "/usr/lib64/xen/bin/qemu-dm"
+ if os.path.exists(preferred_emulator):
+ self.emulator = preferred_emulator
else:
self.emulator = "/usr/lib/xen/bin/qemu-dm"