Accepting request 130745 from Virtualization
- bnc#772744 - vm-install requires root, while original virt-manager vm creation code works fine as user This patch makes virt-install available for local installs via a pop-down menu. virtman-virtinstall.diff - Update to virt-manager 0.9.4 0.9.4 is a bugfix release for 0.9.2, fixing VNC keyboard focus issues. 0.9.2 changelog: * Convert to gtkbuilder: UI can now be editted with modern glade tool * virt-manager no longer runs on RHEL5, but can manage a remote RHEL5 host * Option to configure spapr net and disk devices for pseries (Li Zhang) * Many bug fixes and improvements OBS-URL: https://build.opensuse.org/request/show/130745 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virt-manager?expand=0&rev=76
This commit is contained in:
commit
8a99b53cda
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:9936059ac6b6d1d8a8dfe4bccd23696dcdeaa42a9953914fbd316c077ec5d953
|
|
||||||
size 945613
|
|
3
virt-manager-0.9.4.tar.bz2
Normal file
3
virt-manager-0.9.4.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f7e447ed8468d0850b75889d2c71149a3f462c381e7af39cd493e0aa3023983f
|
||||||
|
size 941625
|
@ -1,3 +1,23 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 9 15:19:27 MDT 2012 - carnold@novell.com
|
||||||
|
|
||||||
|
- bnc#772744 - vm-install requires root, while original virt-manager
|
||||||
|
vm creation code works fine as user
|
||||||
|
This patch makes virt-install available for local installs via a
|
||||||
|
pop-down menu.
|
||||||
|
virtman-virtinstall.diff
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 7 09:21:50 MDT 2012 - carnold@novell.com
|
||||||
|
|
||||||
|
- Update to virt-manager 0.9.4
|
||||||
|
0.9.4 is a bugfix release for 0.9.2, fixing VNC keyboard focus
|
||||||
|
issues. 0.9.2 changelog:
|
||||||
|
* Convert to gtkbuilder: UI can now be editted with modern glade tool
|
||||||
|
* virt-manager no longer runs on RHEL5, but can manage a remote RHEL5 host
|
||||||
|
* Option to configure spapr net and disk devices for pseries (Li Zhang)
|
||||||
|
* Many bug fixes and improvements
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 13 11:20:18 MDT 2012 - carnold@novell.com
|
Fri Jul 13 11:20:18 MDT 2012 - carnold@novell.com
|
||||||
|
|
||||||
|
@ -15,11 +15,12 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define gsysconfdir /etc
|
%define gsysconfdir /etc
|
||||||
%define gconftool /usr/bin/gconftool-2
|
%define gconftool /usr/bin/gconftool-2
|
||||||
%define virtinst_maj 0
|
%define virtinst_maj 0
|
||||||
%define virtinst_min 600
|
%define virtinst_min 600
|
||||||
%define virtinst_rel 2
|
%define virtinst_rel 3
|
||||||
%define virtinst_name virtinst-%{virtinst_maj}.%{virtinst_min}.%{virtinst_rel}
|
%define virtinst_name virtinst-%{virtinst_maj}.%{virtinst_min}.%{virtinst_rel}
|
||||||
|
|
||||||
%define pysite %(python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()")
|
%define pysite %(python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()")
|
||||||
@ -28,7 +29,7 @@ Name: virt-manager
|
|||||||
Summary: Virtual Machine Manager
|
Summary: Virtual Machine Manager
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
Group: System/Monitoring
|
Group: System/Monitoring
|
||||||
Version: 0.9.3
|
Version: 0.9.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://virt-manager.et.redhat.com
|
Url: http://virt-manager.et.redhat.com
|
||||||
Source0: virt-manager-%{version}.tar.bz2
|
Source0: virt-manager-%{version}.tar.bz2
|
||||||
@ -45,6 +46,7 @@ Patch63: virtman-eepro100.diff
|
|||||||
Patch64: virtman-qed.diff
|
Patch64: virtman-qed.diff
|
||||||
Patch65: virtman-update-backend.diff
|
Patch65: virtman-update-backend.diff
|
||||||
Patch66: virtman-slow-mouse.diff
|
Patch66: virtman-slow-mouse.diff
|
||||||
|
Patch67: virtman-virtinstall.diff
|
||||||
ExclusiveArch: %{ix86} x86_64
|
ExclusiveArch: %{ix86} x86_64
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%gconf_schemas_prereq
|
%gconf_schemas_prereq
|
||||||
@ -109,6 +111,7 @@ Authors:
|
|||||||
%patch64 -p1
|
%patch64 -p1
|
||||||
%patch65 -p1
|
%patch65 -p1
|
||||||
%patch66 -p1
|
%patch66 -p1
|
||||||
|
%patch67 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# autoreconf -i
|
# autoreconf -i
|
||||||
|
132
virtman-virtinstall.diff
Normal file
132
virtman-virtinstall.diff
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
Index: virt-manager-0.9.4/src/vmm-manager.ui
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-0.9.4.orig/src/vmm-manager.ui
|
||||||
|
+++ virt-manager-0.9.4/src/vmm-manager.ui
|
||||||
|
@@ -293,7 +293,7 @@
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="show_arrow">False</property>
|
||||||
|
<child>
|
||||||
|
- <object class="GtkToolButton" id="vm-new">
|
||||||
|
+ <object class="GtkMenuToolButton" id="vm-new">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="has_tooltip">True</property>
|
||||||
|
@@ -306,7 +306,6 @@
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
- <property name="homogeneous">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
Index: virt-manager-0.9.4/src/virtManager/manager.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-0.9.4.orig/src/virtManager/manager.py
|
||||||
|
+++ virt-manager-0.9.4/src/virtManager/manager.py
|
||||||
|
@@ -260,7 +260,8 @@ class vmmManager(vmmGObjectUI):
|
||||||
|
self.config.is_vmlist_network_traffic_visible())
|
||||||
|
|
||||||
|
def init_toolbar(self):
|
||||||
|
- self.widget("vm-new").set_icon_name("vm_new")
|
||||||
|
+ uihelpers.build_new_button_menu(self.widget("vm-new"),
|
||||||
|
+ self.virtinstall_new_vm)
|
||||||
|
self.widget("vm-open").set_icon_name("icon_console")
|
||||||
|
uihelpers.build_shutdown_button_menu(self.widget("vm-shutdown"),
|
||||||
|
self.poweroff_vm,
|
||||||
|
@@ -506,6 +507,9 @@ class vmmManager(vmmGObjectUI):
|
||||||
|
def new_vm(self, src_ignore=None):
|
||||||
|
self.emit("action-show-create", self.current_conn_uri())
|
||||||
|
|
||||||
|
+ def virtinstall_new_vm(self, src_ignore=None):
|
||||||
|
+ self.emit("action-show-create-virtinstall", self.current_conn_uri())
|
||||||
|
+
|
||||||
|
def show_about(self, src_ignore):
|
||||||
|
self.emit("action-show-about")
|
||||||
|
|
||||||
|
@@ -1228,6 +1232,7 @@ vmmManager.signal_new(vmmManager, "actio
|
||||||
|
vmmManager.signal_new(vmmManager, "action-show-host", [str])
|
||||||
|
vmmManager.signal_new(vmmManager, "action-show-preferences", [])
|
||||||
|
vmmManager.signal_new(vmmManager, "action-show-create", [str])
|
||||||
|
+vmmManager.signal_new(vmmManager, "action-show-create-virtinstall", [str])
|
||||||
|
vmmManager.signal_new(vmmManager, "action-suspend-domain", [str, str])
|
||||||
|
vmmManager.signal_new(vmmManager, "action-resume-domain", [str, str])
|
||||||
|
vmmManager.signal_new(vmmManager, "action-run-domain", [str, str])
|
||||||
|
Index: virt-manager-0.9.4/src/virtManager/uihelpers.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-0.9.4.orig/src/virtManager/uihelpers.py
|
||||||
|
+++ virt-manager-0.9.4/src/virtManager/uihelpers.py
|
||||||
|
@@ -835,6 +835,24 @@ def mediadev_set_default_selection(widge
|
||||||
|
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
+# Build toolbar new button menu (manager and details toolbar) #
|
||||||
|
+####################################################################
|
||||||
|
+
|
||||||
|
+def build_new_button_menu(widget, virtinstall_cb):
|
||||||
|
+ icon_name = util.running_config.get_new_icon_name()
|
||||||
|
+ widget.set_icon_name(icon_name)
|
||||||
|
+ menu = gtk.Menu()
|
||||||
|
+ widget.set_menu(menu)
|
||||||
|
+
|
||||||
|
+ virtinstallimg = gtk.image_new_from_icon_name(icon_name, gtk.ICON_SIZE_MENU)
|
||||||
|
+
|
||||||
|
+ virtinstall = gtk.ImageMenuItem(_("_Virt-install"))
|
||||||
|
+ virtinstall.set_image(virtinstallimg)
|
||||||
|
+ virtinstall.show()
|
||||||
|
+ virtinstall.connect("activate", virtinstall_cb)
|
||||||
|
+ menu.add(virtinstall)
|
||||||
|
+
|
||||||
|
+####################################################################
|
||||||
|
# Build toolbar shutdown button menu (manager and details toolbar) #
|
||||||
|
####################################################################
|
||||||
|
|
||||||
|
Index: virt-manager-0.9.4/src/virtManager/config.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-0.9.4.orig/src/virtManager/config.py
|
||||||
|
+++ virt-manager-0.9.4/src/virtManager/config.py
|
||||||
|
@@ -149,6 +149,13 @@ class vmmConfig(object):
|
||||||
|
|
||||||
|
# General app wide helpers (gconf agnostic)
|
||||||
|
|
||||||
|
+ def get_new_icon_name(self):
|
||||||
|
+ theme = gtk.icon_theme_get_default()
|
||||||
|
+ iconname = "vm_new"
|
||||||
|
+ if theme.has_icon(iconname):
|
||||||
|
+ return iconname
|
||||||
|
+ return "media-record"
|
||||||
|
+
|
||||||
|
def get_shutdown_icon_name(self):
|
||||||
|
theme = gtk.icon_theme_get_default()
|
||||||
|
iconname = "system-shutdown"
|
||||||
|
Index: virt-manager-0.9.4/src/virtManager/engine.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-0.9.4.orig/src/virtManager/engine.py
|
||||||
|
+++ virt-manager-0.9.4/src/virtManager/engine.py
|
||||||
|
@@ -628,6 +628,7 @@ class vmmEngine(vmmGObject):
|
||||||
|
obj.connect("action-show-vm", self._do_show_vm)
|
||||||
|
obj.connect("action-show-preferences", self._do_show_preferences)
|
||||||
|
obj.connect("action-show-create", self._do_show_create)
|
||||||
|
+ obj.connect("action-show-create-virtinstall", self._do_show_create_virtinstall)
|
||||||
|
obj.connect("action-show-help", self._do_show_help)
|
||||||
|
obj.connect("action-show-about", self._do_show_about)
|
||||||
|
obj.connect("action-show-host", self._do_show_host)
|
||||||
|
@@ -674,14 +675,17 @@ class vmmEngine(vmmGObject):
|
||||||
|
def _vmmcreate_closing(self,signal,key):
|
||||||
|
self.windowCreate = None
|
||||||
|
|
||||||
|
- def _do_show_create(self, src, uri):
|
||||||
|
+ def _do_show_create_virtinstall(self, src, uri):
|
||||||
|
+ self._do_show_create(src, uri, True)
|
||||||
|
+
|
||||||
|
+ def _do_show_create(self, src, uri, use_virtinstall=False):
|
||||||
|
if uri is None:
|
||||||
|
uri = default_uri()
|
||||||
|
conn = self._lookup_conn(uri)
|
||||||
|
do_remote = conn.is_remote()
|
||||||
|
if self.windowCreate == None or do_remote != self.remote_install:
|
||||||
|
try:
|
||||||
|
- if do_remote:
|
||||||
|
+ if do_remote or use_virtinstall:
|
||||||
|
from virtManager.create import vmmCreate
|
||||||
|
create = vmmCreate(self)
|
||||||
|
create.connect("action-show-vm", self._do_show_vm)
|
Loading…
Reference in New Issue
Block a user