This commit is contained in:
commit
6922b79381
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
296
rhpl-exception.py
Normal file
296
rhpl-exception.py
Normal file
@ -0,0 +1,296 @@
|
||||
#
|
||||
# exception.py - general exception formatting and saving
|
||||
#
|
||||
# Matt Wilson <msw@redhat.com>
|
||||
# Erik Troan <ewt@redhat.com>
|
||||
# Harald Hoyer <harald@redhat.com>
|
||||
#
|
||||
# Copyright 2001, 2002 Red Hat, Inc.
|
||||
#
|
||||
# This software may be freely redistributed under the terms of the GNU
|
||||
# library public license.
|
||||
#
|
||||
# You should have received a copy of the GNU Library Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
|
||||
import os, sys
|
||||
import signal
|
||||
import traceback
|
||||
import types
|
||||
from string import joinfields
|
||||
from cPickle import Pickler
|
||||
dumpHash = {}
|
||||
#from rhpl.translate import _
|
||||
def _(x):
|
||||
return x
|
||||
|
||||
|
||||
#
|
||||
# ExceptionWindow class
|
||||
#
|
||||
class ExceptionWindow:
|
||||
def __init__ (self, text, component_name):
|
||||
import gtk
|
||||
win = gtk.Dialog(_("Exception Occured"), None, gtk.DIALOG_MODAL)
|
||||
win.add_button(_("Debug"), 0)
|
||||
win.add_button(_("Save to file"), 1)
|
||||
win.add_button(gtk.STOCK_QUIT, 2)
|
||||
buffer = gtk.TextBuffer(None)
|
||||
buffer.set_text(text)
|
||||
textbox = gtk.TextView()
|
||||
textbox.set_buffer(buffer)
|
||||
textbox.set_property("editable", gtk.FALSE)
|
||||
textbox.set_property("cursor_visible", gtk.FALSE)
|
||||
sw = gtk.ScrolledWindow ()
|
||||
sw.add (textbox)
|
||||
sw.set_policy (gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
|
||||
hbox = gtk.HBox (gtk.FALSE)
|
||||
hbox.set_border_width(5)
|
||||
txt = _("An unhandled exception has occured. This "
|
||||
"is most likely a bug. Please save the crash "
|
||||
"dump and file a detailed bug "
|
||||
"report against %s at "
|
||||
"https://bugzilla.redhat.com/bugzilla") % \
|
||||
component_name
|
||||
info = gtk.Label(txt)
|
||||
info.set_line_wrap(gtk.TRUE)
|
||||
hbox.pack_start (sw, gtk.TRUE)
|
||||
win.vbox.pack_start (info, gtk.FALSE)
|
||||
win.vbox.pack_start (hbox, gtk.TRUE)
|
||||
win.vbox.set_border_width(5)
|
||||
win.set_size_request (500, 300)
|
||||
win.set_position (gtk.WIN_POS_CENTER)
|
||||
addFrame(win)
|
||||
win.show_all ()
|
||||
self.window = win
|
||||
self.rc = self.window.run ()
|
||||
self.window.destroy()
|
||||
|
||||
def quit (self, dialog, button):
|
||||
self.rc = button
|
||||
|
||||
def getrc (self):
|
||||
# I did it this way for future expantion
|
||||
# 0 is debug
|
||||
if self.rc == 0:
|
||||
return 1
|
||||
# 1 is save
|
||||
if self.rc == 1:
|
||||
return 2
|
||||
# 2 is OK
|
||||
elif self.rc == 2:
|
||||
return 0
|
||||
|
||||
def addFrame(dialog):
|
||||
import gtk
|
||||
contents = dialog.get_children()[0]
|
||||
dialog.remove(contents)
|
||||
frame = gtk.Frame()
|
||||
frame.set_shadow_type(gtk.SHADOW_OUT)
|
||||
frame.add(contents)
|
||||
dialog.add(frame)
|
||||
|
||||
# XXX do length limits on obj dumps.
|
||||
def dumpClass(instance, fd, level=0):
|
||||
# protect from loops
|
||||
if not dumpHash.has_key(instance):
|
||||
dumpHash[instance] = None
|
||||
else:
|
||||
fd.write("Already dumped\n")
|
||||
return
|
||||
if (instance.__class__.__dict__.has_key("__str__") or
|
||||
instance.__class__.__dict__.has_key("__repr__")):
|
||||
fd.write("%s\n" % (instance,))
|
||||
return
|
||||
fd.write("%s instance, containing members:\n" %
|
||||
(instance.__class__.__name__))
|
||||
pad = ' ' * ((level) * 2)
|
||||
for key, value in instance.__dict__.items():
|
||||
if type(value) == types.ListType:
|
||||
fd.write("%s%s: [" % (pad, key))
|
||||
first = 1
|
||||
for item in value:
|
||||
if not first:
|
||||
fd.write(", ")
|
||||
else:
|
||||
first = 0
|
||||
if type(item) == types.InstanceType:
|
||||
dumpClass(item, fd, level + 1)
|
||||
else:
|
||||
fd.write("%s" % (item,))
|
||||
fd.write("]\n")
|
||||
elif type(value) == types.DictType:
|
||||
fd.write("%s%s: {" % (pad, key))
|
||||
first = 1
|
||||
for k, v in value.items():
|
||||
if not first:
|
||||
fd.write(", ")
|
||||
else:
|
||||
first = 0
|
||||
if type(k) == types.StringType:
|
||||
fd.write("'%s': " % (k,))
|
||||
else:
|
||||
fd.write("%s: " % (k,))
|
||||
if type(v) == types.InstanceType:
|
||||
dumpClass(v, fd, level + 1)
|
||||
else:
|
||||
fd.write("%s" % (v,))
|
||||
fd.write("}\n")
|
||||
elif type(value) == types.InstanceType:
|
||||
fd.write("%s%s: " % (pad, key))
|
||||
dumpClass(value, fd, level + 1)
|
||||
else:
|
||||
fd.write("%s%s: %s\n" % (pad, key, value))
|
||||
|
||||
def dumpException(out, text, tb):
|
||||
p = Pickler(out)
|
||||
|
||||
out.write(text)
|
||||
|
||||
trace = tb
|
||||
while trace.tb_next:
|
||||
trace = trace.tb_next
|
||||
frame = trace.tb_frame
|
||||
out.write ("\nLocal variables in innermost frame:\n")
|
||||
try:
|
||||
for (key, value) in frame.f_locals.items():
|
||||
out.write ("%s: %s\n" % (key, value))
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def exceptionWindow(title, text, name):
|
||||
import gtk
|
||||
#print text
|
||||
win = ExceptionWindow (text, name)
|
||||
|
||||
return win.getrc ()
|
||||
|
||||
|
||||
def generic_error_dialog (message, parent_dialog,
|
||||
message_type=None,
|
||||
widget=None, page=0, broken_widget=None):
|
||||
import gtk
|
||||
if message_type == None:
|
||||
message_type = gtk.MESSAGE_ERROR
|
||||
|
||||
dialog = gtk.MessageDialog(parent_dialog,
|
||||
gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT,
|
||||
message_type, gtk.BUTTONS_OK,
|
||||
message)
|
||||
|
||||
if widget != None:
|
||||
if isinstance (widget, gtk.CList):
|
||||
widget.select_row (page, 0)
|
||||
elif isinstance (widget, gtk.Notebook):
|
||||
widget.set_current_page (page)
|
||||
if broken_widget != None:
|
||||
broken_widget.grab_focus ()
|
||||
if isinstance (broken_widget, gtk.Entry):
|
||||
broken_widget.select_region (0, -1)
|
||||
|
||||
if parent_dialog:
|
||||
dialog.set_position (gtk.WIN_POS_CENTER_ON_PARENT)
|
||||
dialog.set_transient_for(parent_dialog)
|
||||
else:
|
||||
dialog.set_position (gtk.WIN_POS_CENTER)
|
||||
|
||||
ret = dialog.run ()
|
||||
dialog.destroy()
|
||||
return ret
|
||||
|
||||
#
|
||||
# FileSelection class
|
||||
#
|
||||
class FileSelection:
|
||||
def __init__(self, text):
|
||||
import gtk
|
||||
import gnome.ui
|
||||
win = gtk.Dialog (_("Select a file:"))
|
||||
#win.connect ("clicked", self.quit)
|
||||
win.add_button (gtk.STOCK_OK, gtk.RESPONSE_OK)
|
||||
win.add_button (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||
hbox = gtk.HBox (FALSE)
|
||||
|
||||
info = gtk.Label(text)
|
||||
self.entry = gnome.ui.FileEntry("", "")
|
||||
self.entry.set_modal(TRUE)
|
||||
win.vbox.pack_start (info, FALSE)
|
||||
win.vbox.pack_start (self.entry, TRUE)
|
||||
win.set_position (gtk.WIN_POS_CENTER)
|
||||
win.show_all ()
|
||||
self.window = win
|
||||
self.rc = self.window.run ()
|
||||
|
||||
def quit (self, dialog, button):
|
||||
self.rc = button
|
||||
|
||||
def getrc (self):
|
||||
return self.rc
|
||||
|
||||
def get_filename(self):
|
||||
return self.entry.get_full_path(FALSE)
|
||||
|
||||
#
|
||||
# handleException function
|
||||
#
|
||||
def handleException((type, value, tb), progname, version):
|
||||
import gtk
|
||||
list = traceback.format_exception (type, value, tb)
|
||||
tblast = traceback.extract_tb(tb, limit=None)
|
||||
if len(tblast):
|
||||
tblast = tblast[len(tblast)-1]
|
||||
extxt = traceback.format_exception_only(type, value)
|
||||
text = "Component: %s\n" % progname
|
||||
text = text + "Version: %s\n" % version
|
||||
text = text + "Summary: TB "
|
||||
if tblast and len(tblast) > 3:
|
||||
tblast = tblast[:3]
|
||||
for t in tblast:
|
||||
text = text + str(t) + ":"
|
||||
text = text + extxt[0]
|
||||
text = text + joinfields(list, "")
|
||||
|
||||
while 1:
|
||||
rc = exceptionWindow (_("Exception Occurred"), text, progname)
|
||||
|
||||
if rc == 1 and tb:
|
||||
print text
|
||||
import pdb
|
||||
pdb.post_mortem (tb)
|
||||
os.kill(os.getpid(), signal.SIGKILL)
|
||||
elif not rc:
|
||||
sys.exit(10)
|
||||
else:
|
||||
fs = FileSelection(_("Please specify a file to save the dump"))
|
||||
rc = fs.getrc()
|
||||
if rc == gtk.RESPONSE_OK:
|
||||
file = fs.get_filename()
|
||||
print file
|
||||
fs.window.destroy()
|
||||
|
||||
if not file or file=="":
|
||||
file = "/tmp/dump"
|
||||
|
||||
try:
|
||||
out = open(file, "w")
|
||||
dumpException (out, text, tb)
|
||||
out.close()
|
||||
|
||||
except IOError:
|
||||
generic_error_dialog(_("Failed to write to file %s.") \
|
||||
% (file), None)
|
||||
else:
|
||||
generic_error_dialog(
|
||||
_("The application's state has been successfully\n"
|
||||
"written to the file '%s'.") % (file), None,
|
||||
message_type = "info")
|
||||
sys.exit(10)
|
||||
|
||||
else:
|
||||
continue
|
||||
|
||||
sys.exit(10)
|
||||
|
3
virt-manager-0.3.0.tar.bz2
Normal file
3
virt-manager-0.3.0.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:028b8b65781114b71df0c209c6dfc82fd29b4ddd94cc498cd8e279127ef786b4
|
||||
size 368785
|
42
virt-manager.changes
Normal file
42
virt-manager.changes
Normal file
@ -0,0 +1,42 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 29 09:15:26 MST 2007 - ccoffing@novell.com
|
||||
|
||||
- Fix desktop file. (#239275)
|
||||
- Update to 0.3.0 (updated translations; no code changes)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 22 11:15:18 MST 2007 - ccoffing@novell.com
|
||||
|
||||
- Fix desktop file, so icon shows in YaST. (#237046)
|
||||
- Clean up macros in spec file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 19 16:58:05 MST 2007 - ccoffing@novell.com
|
||||
|
||||
- Use temporary icon until real ones arrive.
|
||||
- Update to changeset 371 to fix VNC issues.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 17 15:19:12 MST 2007 - ccoffing@novell.com
|
||||
|
||||
- Fix BuildRequires and paths to work with both SLES10 and STABLE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 12 19:44:03 MST 2007 - ccoffing@novell.com
|
||||
|
||||
- Fix sysconfdir path.
|
||||
- Add desktop file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 11 15:48:22 MST 2007 - ccoffing@novell.com
|
||||
|
||||
- Add to SLES 10 SP1 (fate #301181)
|
||||
- Update to virt-manager 0.2.6.
|
||||
- Fix type_register deprecation warnings.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 24 11:09:43 MDT 2006 - ccoffing@novell.com
|
||||
|
||||
- Initial package.
|
||||
- Replace virt-inst with xen-vm-install (part of xen-tools-install)
|
||||
|
153
virt-manager.spec
Normal file
153
virt-manager.spec
Normal file
@ -0,0 +1,153 @@
|
||||
#
|
||||
# spec file for package virt-manager (Version 0.3.0)
|
||||
#
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: virt-manager
|
||||
BuildRequires: autoconf automake gconf2 gettext gtk2-devel python-devel python-gtk update-desktop-files
|
||||
%if %suse_version > 1010
|
||||
BuildRequires: python-gobject2-devel python-gtk-devel
|
||||
%define gsysconfdir /etc
|
||||
%define gconftool /usr/bin/gconftool-2
|
||||
%else
|
||||
%define gsysconfdir /etc/opt/gnome
|
||||
%define gconftool /opt/gnome/bin/gconftool-2
|
||||
%endif
|
||||
License: GNU General Public License (GPL)
|
||||
Group: System/Monitoring
|
||||
Autoreqprov: yes
|
||||
Version: 0.3.0
|
||||
Release: 1
|
||||
Summary: Virtual Machine Manager
|
||||
Source0: virt-manager-0.3.0.tar.bz2
|
||||
Source1: rhpl-exception.py
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: python-gtk
|
||||
Requires: python-gnome
|
||||
# Absolutely require this version or newer
|
||||
Requires: libvirt-python >= 0.1.4-3
|
||||
# FIXME: Check dbus-1-python 0.60 vs. 0.61 API changes
|
||||
Requires: dbus-1-python
|
||||
# Minimum we've tested with
|
||||
Requires: libxml2-python >= 2.6.23
|
||||
Requires: vte
|
||||
Requires: xen-tools >= 3.0.4_13100
|
||||
ExclusiveArch: %ix86 x86_64
|
||||
Patch0: virtman-desktop.diff
|
||||
Patch1: virtman-install.diff
|
||||
Patch2: virtman-type-register.diff
|
||||
Requires: gconf2
|
||||
|
||||
%description
|
||||
Virt Manager provides a graphical tool for administering virtual
|
||||
machines.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Daniel Berrange <berrange@redhat.com>
|
||||
Hugh O. Brock <hbrock@redhat.com>
|
||||
Jeremy Katz <katzj@redhat.com>
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
#automake
|
||||
#autoconf
|
||||
autoreconf -i
|
||||
%configure --sysconfdir=%{gsysconfdir}
|
||||
make
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/virt-manager/sparkline.a
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/virt-manager/sparkline.la
|
||||
install -m755 %SOURCE1 $RPM_BUILD_ROOT%{_datadir}/virt-manager/exception.py
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
||||
# Unsupported languages:
|
||||
rm -rf $RPM_BUILD_ROOT/usr/share/locale/as
|
||||
rm -rf $RPM_BUILD_ROOT/usr/share/locale/or
|
||||
%find_lang virt-manager
|
||||
%suse_update_desktop_file virt-manager
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%pre
|
||||
if [ "$1" -gt 1 ]; then
|
||||
export GCONF_CONFIG_SOURCE=`%{gconftool} --get-default-source`
|
||||
%{gconftool} --makefile-uninstall-rule \
|
||||
%{gsysconfdir}/gconf/schemas/virt-manager.schemas > /dev/null || :
|
||||
fi
|
||||
|
||||
%post
|
||||
export GCONF_CONFIG_SOURCE=`%{gconftool} --get-default-source`
|
||||
%{gconftool} --makefile-install-rule \
|
||||
%{gsysconfdir}/gconf/schemas/virt-manager.schemas > /dev/null || :
|
||||
|
||||
%preun
|
||||
if [ "$1" -eq 0 ]; then
|
||||
export GCONF_CONFIG_SOURCE=`%{gconftool} --get-default-source`
|
||||
%{gconftool} --makefile-uninstall-rule \
|
||||
%{gsysconfdir}/gconf/schemas/virt-manager.schemas > /dev/null || :
|
||||
fi
|
||||
|
||||
%files -f virt-manager.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING AUTHORS ChangeLog
|
||||
%{gsysconfdir}/gconf/schemas/virt-manager.schemas
|
||||
%{_bindir}/virt-manager
|
||||
%{_libexecdir}/virt-manager-launch
|
||||
%{_libdir}/virt-manager/
|
||||
%dir %{_datadir}/virt-manager
|
||||
%{_datadir}/virt-manager/*.glade
|
||||
%dir %{_datadir}/virt-manager/pixmaps
|
||||
%{_datadir}/virt-manager/pixmaps/*.png
|
||||
%{_datadir}/virt-manager/pixmaps/*.svg
|
||||
%{_datadir}/virt-manager/*.py
|
||||
%dir %{_datadir}/virt-manager/virtManager
|
||||
%{_datadir}/virt-manager/virtManager/*.py
|
||||
%dir %{_datadir}/virt-manager/vncViewer
|
||||
%{_datadir}/virt-manager/vncViewer/*.py
|
||||
%{_datadir}/applications/YaST2/virt-manager.desktop
|
||||
%{_datadir}/dbus-1/services/virt-manager.service
|
||||
# FIXME: autobuild complains that these are unowned (not true...)
|
||||
%dir %{_datadir}/dbus-1
|
||||
%dir %{_datadir}/dbus-1/services
|
||||
%dir %{_datadir}/applications/YaST2
|
||||
|
||||
%changelog -n virt-manager
|
||||
* Mon Jan 29 2007 - ccoffing@novell.com
|
||||
- Fix desktop file. (#239275)
|
||||
- Update to 0.3.0 (updated translations; no code changes)
|
||||
* Mon Jan 22 2007 - ccoffing@novell.com
|
||||
- Fix desktop file, so icon shows in YaST. (#237046)
|
||||
- Clean up macros in spec file.
|
||||
* Fri Jan 19 2007 - ccoffing@novell.com
|
||||
- Use temporary icon until real ones arrive.
|
||||
- Update to changeset 371 to fix VNC issues.
|
||||
* Wed Jan 17 2007 - ccoffing@novell.com
|
||||
- Fix BuildRequires and paths to work with both SLES10 and STABLE.
|
||||
* Fri Jan 12 2007 - ccoffing@novell.com
|
||||
- Fix sysconfdir path.
|
||||
- Add desktop file.
|
||||
* Thu Jan 11 2007 - ccoffing@novell.com
|
||||
- Add to SLES 10 SP1 (fate #301181)
|
||||
- Update to virt-manager 0.2.6.
|
||||
- Fix type_register deprecation warnings.
|
||||
* Tue Oct 24 2006 - ccoffing@novell.com
|
||||
- Initial package.
|
||||
- Replace virt-inst with xen-vm-install (part of xen-tools-install)
|
37
virtman-desktop.diff
Normal file
37
virtman-desktop.diff
Normal file
@ -0,0 +1,37 @@
|
||||
Index: virt-manager-0.2.6/src/virt-manager.desktop.in
|
||||
===================================================================
|
||||
--- virt-manager-0.2.6.orig/src/virt-manager.desktop.in
|
||||
+++ virt-manager-0.2.6/src/virt-manager.desktop.in
|
||||
@@ -1,9 +1,16 @@
|
||||
[Desktop Entry]
|
||||
Name=Virtual Machine Manager
|
||||
Comment=The virtual machine management tool
|
||||
-Icon=::ICONDIR::/::PACKAGE::-icon.svg
|
||||
-Exec=::PACKAGE::
|
||||
+Exec=/usr/bin/virt-manager
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
||||
-Categories=System;
|
||||
+Categories=Qt;X-SuSE-YaST;
|
||||
+X-SuSE-YaST-Call=/usr/bin/virt-manager
|
||||
+X-SuSE-YaST-Group=Virtualization
|
||||
+X-SuSE-YaST-Argument=
|
||||
+X-SuSE-YaST-RootOnly=true
|
||||
+X-SuSE-YaST-Geometry=
|
||||
+X-SuSE-YaST-SortKey=
|
||||
+Icon=yast-network
|
||||
+X-SuSE-translate=true
|
||||
Index: virt-manager-0.2.6/src/Makefile.am
|
||||
===================================================================
|
||||
--- virt-manager-0.2.6.orig/src/Makefile.am
|
||||
+++ virt-manager-0.2.6/src/Makefile.am
|
||||
@@ -14,7 +14,7 @@ libexec_SCRIPTS = $(PACKAGE)-launch
|
||||
gladedir = $(pkgdatadir)
|
||||
glade_DATA = $(PACKAGE).glade
|
||||
|
||||
-desktopdir = $(datadir)/applications
|
||||
+desktopdir = $(datadir)/applications/YaST2/
|
||||
desktop_SOURCES = $(PACKAGE).desktop.in
|
||||
desktop_DATA = $(PACKAGE).desktop
|
||||
|
60
virtman-install.diff
Normal file
60
virtman-install.diff
Normal file
@ -0,0 +1,60 @@
|
||||
Index: virt-manager-0.2.6/src/virtManager/engine.py
|
||||
===================================================================
|
||||
--- virt-manager-0.2.6.orig/src/virtManager/engine.py
|
||||
+++ virt-manager-0.2.6/src/virtManager/engine.py
|
||||
@@ -30,7 +30,7 @@ from virtManager.manager import vmmManag
|
||||
from virtManager.details import vmmDetails
|
||||
from virtManager.console import vmmConsole
|
||||
from virtManager.asyncjob import vmmAsyncJob
|
||||
-from virtManager.create import vmmCreate
|
||||
+from xen.install.gui import VMCreate as vmmCreate
|
||||
from virtManager.serialcon import vmmSerialConsole
|
||||
|
||||
class vmmEngine:
|
||||
@@ -38,7 +38,7 @@ class vmmEngine:
|
||||
self.windowConnect = None
|
||||
self.windowPreferences = None
|
||||
self.windowAbout = None
|
||||
- self.windowCreate = None
|
||||
+ self.windowCreate = {}
|
||||
self.connections = {}
|
||||
|
||||
self.timer = None
|
||||
@@ -136,8 +136,7 @@ class vmmEngine:
|
||||
ct += window.is_visible()
|
||||
if conn["windowManager"]:
|
||||
ct += conn["windowManager"].is_visible()
|
||||
- if self.windowCreate:
|
||||
- ct += self.windowCreate.is_visible()
|
||||
+ ct += len(filter(lambda w: w.is_visible(), self.windowCreate.values()))
|
||||
return ct
|
||||
|
||||
def change_timer_interval(self,ignore1,ignore2,ignore3,ignore4):
|
||||
@@ -245,13 +244,21 @@ class vmmEngine:
|
||||
self.connections[uri]["windowManager"] = manager
|
||||
self.connections[uri]["windowManager"].show()
|
||||
|
||||
+ def _create_closing(self, src, key):
|
||||
+ del self.windowCreate[key]
|
||||
+
|
||||
def show_create(self, uri):
|
||||
- if self.windowCreate == None:
|
||||
- self.windowCreate = vmmCreate(self.get_config(), self.get_connection(uri, False))
|
||||
- self.windowCreate.connect("action-show-console", self._do_show_console)
|
||||
- self.windowCreate.connect("action-show-terminal", self._do_show_terminal)
|
||||
- self.windowCreate.reset_state()
|
||||
- self.windowCreate.show()
|
||||
+ key = 0
|
||||
+ while True:
|
||||
+ if not self.windowCreate.has_key(key):
|
||||
+ break
|
||||
+ key += 1
|
||||
+ window = vmmCreate(virtman=True, key=key)
|
||||
+ self.windowCreate[key] = window
|
||||
+ window.connect("action-show-console", self._do_show_console)
|
||||
+ window.connect("action-show-terminal", self._do_show_terminal)
|
||||
+ window.connect("vmmcreate-closing", self._create_closing)
|
||||
+ window.show()
|
||||
|
||||
def get_connection(self, uri, readOnly=True):
|
||||
if not(self.connections.has_key(uri)):
|
83
virtman-type-register.diff
Normal file
83
virtman-type-register.diff
Normal file
@ -0,0 +1,83 @@
|
||||
Index: virt-manager-0.2.6/src/virtManager/connect.py
|
||||
===================================================================
|
||||
--- virt-manager-0.2.6.orig/src/virtManager/connect.py
|
||||
+++ virt-manager-0.2.6/src/virtManager/connect.py
|
||||
@@ -102,4 +102,3 @@ class vmmConnect(gobject.GObject):
|
||||
self.close()
|
||||
self.emit("completed", uri, readOnly)
|
||||
|
||||
-gobject.type_register(vmmConnect)
|
||||
Index: virt-manager-0.2.6/src/virtManager/connection.py
|
||||
===================================================================
|
||||
--- virt-manager-0.2.6.orig/src/virtManager/connection.py
|
||||
+++ virt-manager-0.2.6/src/virtManager/connection.py
|
||||
@@ -242,5 +242,4 @@ class vmmConnection(gobject.GObject):
|
||||
uuid.append('-')
|
||||
return "".join(uuid)
|
||||
|
||||
-gobject.type_register(vmmConnection)
|
||||
|
||||
Index: virt-manager-0.2.6/src/virtManager/console.py
|
||||
===================================================================
|
||||
--- virt-manager-0.2.6.orig/src/virtManager/console.py
|
||||
+++ virt-manager-0.2.6/src/virtManager/console.py
|
||||
@@ -423,4 +423,3 @@ class vmmConsole(gobject.GObject):
|
||||
self.ignorePause = False
|
||||
self.ignorePause = False
|
||||
|
||||
-gobject.type_register(vmmConsole)
|
||||
Index: virt-manager-0.2.6/src/virtManager/details.py
|
||||
===================================================================
|
||||
--- virt-manager-0.2.6.orig/src/virtManager/details.py
|
||||
+++ virt-manager-0.2.6/src/virtManager/details.py
|
||||
@@ -466,4 +466,3 @@ class vmmDetails(gobject.GObject):
|
||||
for d in netList:
|
||||
netsModel.append(None, d)
|
||||
|
||||
-gobject.type_register(vmmDetails)
|
||||
Index: virt-manager-0.2.6/src/virtManager/domain.py
|
||||
===================================================================
|
||||
--- virt-manager-0.2.6.orig/src/virtManager/domain.py
|
||||
+++ virt-manager-0.2.6/src/virtManager/domain.py
|
||||
@@ -509,4 +509,3 @@ class vmmDomain(gobject.GObject):
|
||||
memory = int(memory)
|
||||
self.vm.setMaxMemory(memory)
|
||||
|
||||
-gobject.type_register(vmmDomain)
|
||||
Index: virt-manager-0.2.6/src/virtManager/manager.py
|
||||
===================================================================
|
||||
--- virt-manager-0.2.6.orig/src/virtManager/manager.py
|
||||
+++ virt-manager-0.2.6/src/virtManager/manager.py
|
||||
@@ -597,4 +597,3 @@ class vmmManager(gobject.GObject):
|
||||
data.reverse()
|
||||
cell.set_property('data_array', data)
|
||||
|
||||
-gobject.type_register(vmmManager)
|
||||
Index: virt-manager-0.2.6/src/vncViewer/vnc.py
|
||||
===================================================================
|
||||
--- virt-manager-0.2.6.orig/src/vncViewer/vnc.py
|
||||
+++ virt-manager-0.2.6/src/vncViewer/vnc.py
|
||||
@@ -113,7 +113,6 @@ class GRFBFrameBuffer(rfb.RFBFrameBuffer
|
||||
def move_cursor(self, x, y):
|
||||
logging.error("Unsupported move_cursor operation requested")
|
||||
|
||||
-gobject.type_register(GRFBFrameBuffer)
|
||||
|
||||
|
||||
class GRFBNetworkClient(rfb.RFBNetworkClient, gobject.GObject):
|
||||
@@ -166,7 +165,6 @@ class GRFBNetworkClient(rfb.RFBNetworkCl
|
||||
|
||||
def update_pointer(self, mask, x, y):
|
||||
self.send(pack('>BBHH', 5, mask, x, y))
|
||||
-gobject.type_register(GRFBNetworkClient)
|
||||
|
||||
|
||||
class GRFBViewer(gtk.DrawingArea):
|
||||
@@ -512,7 +510,6 @@ class GRFBViewer(gtk.DrawingArea):
|
||||
gc = self.window.new_gc()
|
||||
self.window.draw_drawable(gc, self.fb.get_pixmap(), event.area.x, event.area.y, event.area.x, event.area.y, event.area.width, event.area.height)
|
||||
|
||||
-gobject.type_register(GRFBViewer)
|
||||
|
||||
|
||||
def main():
|
Loading…
x
Reference in New Issue
Block a user