Commit e8112678 authored by Guido Günther's avatar Guido Günther

Imported Debian patch 0.5.0-0ubuntu0~ppa2

parent 24bd5c68
virt-manager (0.5.0-0ubuntu0~ppa2) feisty; urgency=low
* debian/patches:
- 01_vnc_connect_localhost.dpatch
- 02-fixed_call_to_get_local_hostname.dpatch
- 03-console_connection_retries_more_robust.dpatch
* Remove various Build-deps
-- Marcelo Boveto Shima <marceloshima@gmail.com> Sat, 15 Sep 2007 01:27:27 -0300
virt-manager (0.5.0-0ubuntu0~ppa1) feisty; urgency=low
* New upstream release.
* Depends on python-libvirt, virtinst, python-gtk-vnc.
-- Marcelo Boveto Shima <marceloshima@gmail.com> Fri, 14 Sep 2007 18:53:12 -0300
virt-manager (0.4.0-0ubuntu0~ppa2) feisty; urgency=low
* Change Architecture from all to any.
-- Marcelo Boveto Shima <marceloshima@gmail.com> Fri, 14 Sep 2007 16:05:12 -0300
virt-manager (0.4.0-0ubuntu0~ppa1) feisty; urgency=low
* Initial release based on xenbr packages.
-- Marcelo Boveto Shima <marceloshima@gmail.com> Thu, 7 Jun 2007 01:08:24 -0300
Source: virt-manager
Section: universe/admin
Priority: optional
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Standards-Version: 3.7.2
Build-Depends: debhelper (>= 4.2.28), dpatch, python-dev, python-gtk2-dev, scrollkeeper, python-central (>= 0.5), cdbs
Package: virt-manager
Section: universe/admin
Priority: optional
Architecture: any
Depends: ${shlibs:Depends}, ${python:Depends}, python-gtk2, python-glade2, python-gnome2, python-dbus, python-urlgrabber, python-vte, librsvg2-common, python-libvirt, virtinst, python-gtk-vnc
Description: virt-manager is a desktop application for managing virtual machines.
It presents a summary view of running domains and their live performance & resource
utilization statistics. A detailed view presents graphs showing performance &
utilization over time. Ultimately it will allow creation of new domains, and
configuration & adjustment of a domain's resource allocation & virtual hardware.
Finally an embedded VNC client viewer presents a full graphical console to the guest domain.
.
NOTE: the GUI is still considered experimental.
This is the Ubuntu / Debian GNU/Linux prepackaged version of the
RedHat Cluster Suite GUI configurator.
Packaged by Fabio M. Di Nitto <fabbione@ubuntu.com>
Downloaded from
http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 dated June, 1991.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
On Ubuntu / Debian GNU/Linux systems, the complete text of the GNU
General Public License can be found in `/usr/share/common-licenses/GPL'.
01_vnc_connect_localhost
02-fixed_call_to_get_local_hostname
03-console_connection_retries_more_robust
#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_vnc_connect_localhost.dpatch by <marceloshima@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad virt-manager-0.5.0~/src/virtManager/connection.py virt-manager-0.5.0/src/virtManager/connection.py
--- virt-manager-0.5.0~/src/virtManager/connection.py 2007-08-29 18:09:47.000000000 -0300
+++ virt-manager-0.5.0/src/virtManager/connection.py 2007-09-15 00:37:25.000000000 -0300
@@ -47,7 +47,7 @@
return hostname[0:offset]
return hostname
-def get_hostname(uri):
+def get_hostname(uri, resolveLocal=False):
try:
(scheme, username, netloc, path, query, fragment) = uri_split(uri)
@@ -55,8 +55,10 @@
return netloc
except Exception, e:
logging.warning("Cannot parse URI %s: %s" % (uri, str(e)))
-
- return get_local_hostname()
+
+ if resolveLocal:
+ return get_local_hostname()
+ return "localhost"
def is_remote(uri):
try:
@@ -271,14 +273,11 @@
return self.uri
- def get_local_hostname(self):
- return get_local_hostname()
-
def get_short_hostname(self):
return get_short_hostname(self.uri)
- def get_hostname(self):
- return get_hostname(self.uri)
+ def get_hostname(self, resolveLocal=False):
+ return get_hostname(self.uri, resolveLocal)
def get_transport(self):
return get_transport(self.uri)
diff -urNad virt-manager-0.5.0~/src/virtManager/host.py virt-manager-0.5.0/src/virtManager/host.py
--- virt-manager-0.5.0~/src/virtManager/host.py 2007-08-29 18:09:47.000000000 -0300
+++ virt-manager-0.5.0/src/virtManager/host.py 2007-09-15 00:37:25.000000000 -0300
@@ -41,7 +41,7 @@
topwin = self.window.get_widget("vmm-host")
topwin.hide()
- self.window.get_widget("overview-hostname").set_text(self.conn.get_hostname())
+ self.window.get_widget("overview-hostname").set_text(self.conn.get_hostname(True))
self.window.get_widget("overview-hypervisor").set_text(self.conn.get_type())
self.window.get_widget("overview-memory").set_text(self.conn.pretty_host_memory_size())
self.window.get_widget("overview-cpus").set_text(str(self.conn.host_active_processor_count()))
#! /bin/sh /usr/share/dpatch/dpatch-run
## 02-fixed_call_toget_local_hostname.dpatch by <marceloshima@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad virt-manager-0.5.0~/src/virtManager/connection.py virt-manager-0.5.0/src/virtManager/connection.py
--- virt-manager-0.5.0~/src/virtManager/connection.py 2007-09-15 01:05:34.000000000 -0300
+++ virt-manager-0.5.0/src/virtManager/connection.py 2007-09-15 01:06:02.000000000 -0300
@@ -255,7 +255,7 @@
scheme = scheme[0:i]
if netloc == "":
- netloc = self.get_local_hostname()
+ netloc = get_local_hostname()
if scheme == "xen":
return "Xen on %s" % netloc
#! /bin/sh /usr/share/dpatch/dpatch-run
## 03-console_connection_retries_more_robust.dpatch by <marceloshima@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad virt-manager-0.5.0~/AUTHORS virt-manager-0.5.0/AUTHORS
--- virt-manager-0.5.0~/AUTHORS 2007-08-29 18:09:46.000000000 -0300
+++ virt-manager-0.5.0/AUTHORS 2007-09-15 01:07:30.000000000 -0300
@@ -25,6 +25,7 @@
Mark Johnson <johnson-dot-nh-at-gmail-dot-com>
Cole Robinson <crobinso-at-redhat-dot-com>
Alexander Todorov <atodorov-at-redhat-dot-com>
+ Bernhard Kaindl <bk-at-suse-dot-de>
<...send a patch & get your name here...>
diff -urNad virt-manager-0.5.0~/src/virtManager/console.py virt-manager-0.5.0/src/virtManager/console.py
--- virt-manager-0.5.0~/src/virtManager/console.py 2007-08-29 18:09:47.000000000 -0300
+++ virt-manager-0.5.0/src/virtManager/console.py 2007-09-15 01:07:30.000000000 -0300
@@ -74,8 +74,9 @@
self.window.get_widget("console-pages").append_page(self.vncViewer)
self.vncViewer.realize()
self.vncViewer.show()
- self.vncViewerFailures = 0
+ self.vncViewerRetriesScheduled = 0
self.vncViewerRetryDelay = 125
+ self.connected = 0
self.notifyID = None
try:
@@ -231,44 +232,61 @@
return 1
return 0
+ def view_vm_status(self):
+ status = self.vm.status()
+ if status == libvirt.VIR_DOMAIN_SHUTOFF:
+ self.activate_unavailable_page(_("Guest not running"))
+ else:
+ if status == libvirt.VIR_DOMAIN_CRASHED:
+ self.activate_unavailable_page(_("Guest has crashed"))
+
def _vnc_disconnected(self, src):
+ self.connected = 0
logging.debug("VNC disconnected")
- self.vncViewerFailures = self.vncViewerFailures + 1
- self.activate_unavailable_page(_("Console was disconnected from guest"))
if not self.is_visible():
return
- if self.vncViewerFailures < 10:
- self.schedule_retry()
- else:
- logging.error("Too many connection failures, not retrying again")
+ if self.vm.status() in [ libvirt.VIR_DOMAIN_SHUTOFF, libvirt.VIR_DOMAIN_CRASHED ]:
+ self.view_vm_status()
+ return
+
+ self.activate_unavailable_page(_("TCP/IP error: VNC connection to hypervisor host got refused or disconnected!"))
+ self.schedule_retry()
def _vnc_initialized(self, src):
+ self.connected = 1
logging.debug("VNC initialized")
self.activate_viewer_page()
# Had a succesfull connect, so reset counters now
- self.vncViewerFailures = 0
+ self.vncViewerRetriesScheduled = 0
self.vncViewerRetryDelay = 125
def schedule_retry(self):
+ self.vncViewerRetriesScheduled = self.vncViewerRetriesScheduled + 1
+ if self.vncViewerRetriesScheduled >= 10:
+ logging.error("Too many connection failures, not retrying again")
+ return
logging.warn("Retrying connection in %d ms", self.vncViewerRetryDelay)
gobject.timeout_add(self.vncViewerRetryDelay, self.retry_login)
if self.vncViewerRetryDelay < 2000:
self.vncViewerRetryDelay = self.vncViewerRetryDelay * 2
def retry_login(self):
+ if self.connected:
+ return
gtk.gdk.threads_enter()
try:
logging.debug("Got timed retry")
self.try_login()
- return False
+ return
finally:
gtk.gdk.threads_leave()
def try_login(self, src=None):
if self.vm.get_id() < 0:
- self.activate_unavailable_page(_("Console not available for inactive guest"))
+ self.activate_unavailable_page(_("Guest not running"))
+ self.schedule_retry()
return
logging.debug("Trying console login")
@@ -320,7 +338,7 @@
self.vncViewer.set_credential(credList[i], "libvirt")
else:
# Force it to stop re-trying
- self.vncViewerFailures = 10
+ self.vncViewerRetriesScheduled = 10
self.vncViewer.close()
self.activate_unavailable_page(_("Unsupported console authentication type"))
@@ -503,7 +521,7 @@
if self.window.get_widget("console-pages").get_current_page() != PAGE_UNAVAILABLE:
self.vncViewer.close()
self.window.get_widget("console-pages").set_current_page(PAGE_UNAVAILABLE)
- self.activate_unavailable_page(_("Console not available for inactive guest"))
+ self.view_vm_status()
else:
if status == libvirt.VIR_DOMAIN_PAUSED:
if self.window.get_widget("console-pages").get_current_page() == PAGE_VNCVIEWER:
@@ -543,7 +561,7 @@
if self.vncViewer.is_open():
self.activate_viewer_page()
else:
- self.vncViewerFailures = 0
+ self.vncViewerRetriesScheduled = 0
self.vncViewerRetryDelay = 125
self.try_login()
self.ignorePause = False
#!/bin/sh
set -e
if [ "$1" = purge ]; then
rm -rf /usr/share/virt-manager
fi
#DEBHELPER#
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
DEB_PYTHON_SYSTEM=pycentral
DEB_DH_INSTALL_SOURCEDIR = debian/tmp
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/dpatch.mk
include /usr/share/cdbs/1/class/makefile.mk
#export CFLAGS += -fno-stack-protector
DEB_CONFIGURE_EXTRA_FLAGS := --prefix=/usr
binary-install/python-libvirt::
dh_pycentral -ppython-libvirt -ppython-virtinst
<?xml version="1.0" standalone="no"?>
<omf>
<resource>
<creator>
hbrock@redhat.com (Hugh Brock)
</creator>
<title>
Virtual Machine Manager Manual
</title>
<date>
2007-03-01
</date>
<version identifier="0.0.1" date="2007-03-01" description="First Release"/>
<subject category="GNOME|Applications|System Tools"/>
<description>
This is the manual for the Virtual Machine Manager application.
</description>
<type>
manual
</type>
<format mime="text/xml" dtd="-//OASIS//DTD DocBook XML V4.1.2//EN"/>
<identifier url="file:/usr/share/gnome/help/virt-manager/C/virt-manager.xml"/>
<language code="C"/>
<relation seriesid="37dd0df4-cd98-11db-8f4f-fd6860e92e9b"/>
<rights type="GNU FDL" license.version="1.1" license="http://www.gnu.org/licenses/fdl.html" holder="Red Hat Inc., and Hugh Brock"/>
</resource>
</omf>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,7 @@
#line 3 "../../../src/graphWidgets/pysparklinemodule.override"
#line 3 "./pysparklinemodule.override"
#include <Python.h>
#include "pygobject.h"
#include "sparkline.h"
......
;; -*- scheme -*-
; object definitions ...
(define-object CellRendererSparkline
(in-module "Gtk")
(parent "GtkCellRenderer")
(c-name "GtkCellRendererSparkline")
(gtype-id "GTK_TYPE_CELL_RENDERER_SPARKLINE")
)
(define-object Sparkline
(in-module "Gtk")
(parent "GtkDrawingArea")
(c-name "GtkSparkline")
(gtype-id "GTK_TYPE_SPARKLINE")
)
;; Enumerations and flags ...
;; From sparkline.h
(define-function gtk_sparkline_get_type
(c-name "gtk_sparkline_get_type")
(return-type "GType")
)
(define-function gtk_sparkline_new
(c-name "gtk_sparkline_new")
(is-constructor-of "GtkSparkline")
(return-type "GtkWidget*")
)
;; From cellrenderersparkline.h
(define-function gtk_cell_renderer_sparkline_get_type
(c-name "gtk_cell_renderer_sparkline_get_type")
(return-type "GType")
)
(define-function gtk_cell_renderer_sparkline_new
(c-name "gtk_cell_renderer_sparkline_new")
(is-constructor-of "GtkCellRendererSparkline")
(return-type "GtkCellRenderer*")
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment