--- virt-viewer-0.2.1.orig/debian/virt-viewer.install +++ virt-viewer-0.2.1/debian/virt-viewer.install @@ -0,0 +1,3 @@ +usr/bin/ +usr/share/man/ +usr/share/virt-viewer/ --- virt-viewer-0.2.1.orig/debian/mozilla-virt-viewer.install +++ virt-viewer-0.2.1/debian/mozilla-virt-viewer.install @@ -0,0 +1 @@ +usr/lib/mozilla/plugins/*.so usr/lib/virt-viewer/plugins/ --- virt-viewer-0.2.1.orig/debian/mozilla-virt-viewer.links +++ virt-viewer-0.2.1/debian/mozilla-virt-viewer.links @@ -0,0 +1,3 @@ +/usr/lib/virt-viewer/plugins/virt-viewer-plugin.so /usr/lib/xulrunner-addons/plugins/virt-viewer-plugin.so +/usr/lib/virt-viewer/plugins/virt-viewer-plugin.so /usr/lib/mozilla/plugins/virt-viewer-plugin.so +/usr/lib/virt-viewer/plugins/virt-viewer-plugin.so /usr/lib/firefox-addons/plugins/virt-viewer-plugin.so --- virt-viewer-0.2.1.orig/debian/control +++ virt-viewer-0.2.1/debian/control @@ -0,0 +1,48 @@ +Source: virt-viewer +Section: admin +Priority: extra +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Libvirt Maintainers +Uploaders: Guido Günther , Laurent Léonard +Build-Depends: cdbs, debhelper (>= 7), autotools-dev, libvirt-dev, libgtk-vnc-1.0-dev (>= 0.3.4), libxml2-dev, + libgtk2.0-dev (>= 2.10), xulrunner-dev, autotools-dev, quilt, automake, autoconf, libffi-dev, libtool, + libglade2-dev, intltool +Standards-Version: 3.8.3 +Vcs-Git: git://git.debian.org/git/pkg-libvirt/virt-viewer.git +Vcs-Browser: http://git.debian.org/?p=pkg-libvirt/virt-viewer.git;a=summary +Homepage: http://virt-manager.et.redhat.com/ +DM-Upload-Allowed: yes + +Package: virt-viewer +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: netcat +Description: Displaying the graphical console of a virtual machine + The console is accessed using the VNC protocol. The guest can be referred to + based on its name, ID, or UUID. If the guest is not already running, then the + viewer can be told to wait until is starts before attempting to connect to the + console The viewer can connect to remote hosts to lookup the console + information and then also connect to the remote console using the same network + transport. + +Package: mozilla-virt-viewer +Architecture: any +Section: web +Depends: ${shlibs:Depends}, ${misc:Depends}, virt-viewer (= ${binary:Version}), + firefox | seamonkey +XB-Npp-Applications: ec8030f7-c20a-464f-9b0e-13a3a9e97384, 92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a +XB-Npp-Name: Virt-viewer Mozilla plugin +XB-Npp-MimeType: application/x-virt-viewer +XB-Npp-Description: Virtual machine console viewer plugin +XB-Npp-File: virt-viewer-plugin.so +Description: A virt-viewer widget for GTK+ (mozilla plugin) + The console is accessed using the VNC protocol. The guest can be referred to + based on its name, ID, or UUID. If the guest is not already running, then the + viewer can be told to wait until is starts before attempting to connect to the + console The viewer can connect to remote hosts to lookup the console + information and then also connect to the remote console using the same network + transport. + . + This package contains the experimental mozilla plugin. The plugin is not + secure. Plase check the README. + --- virt-viewer-0.2.1.orig/debian/watch +++ virt-viewer-0.2.1/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://virt-manager.et.redhat.com/download/sources/virt-viewer/virt-viewer-(.*)\.tar\.gz --- virt-viewer-0.2.1.orig/debian/compat +++ virt-viewer-0.2.1/debian/compat @@ -0,0 +1 @@ +7 --- virt-viewer-0.2.1.orig/debian/README.source +++ virt-viewer-0.2.1/debian/README.source @@ -0,0 +1,6 @@ +Building virt-viewer for Debian +------------------------------- + +The virt-viewer source package uses quilt to apply and remove its patches. +Please refer to /usr/share/doc/quilt/README.source for information about how to +use quilt for source packages. --- virt-viewer-0.2.1.orig/debian/rules +++ virt-viewer-0.2.1/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f + +LDFLAGS += "-Wl,--as-needed" + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +DEB_CONFIGURE_EXTRA_FLAGS += --enable-plugin=yes +DEB_DH_MAKESHLIBS_ARGS_mozilla-virt-viewer += --noscripts -X /plugins/ + +clean:: + rm -f $(CURDIR)/aclocal.m4 + rm -f $(CURDIR)/config.h.in + rm -f $(CURDIR)/configure + rm -f $(CURDIR)/Makefile.in + rm -f $(CURDIR)/man/Makefile.in + rm -f $(CURDIR)/man/virt-viewer.1 + rm -f $(CURDIR)/plugin/Makefile.in + rm -f $(CURDIR)/src/Makefile.in + +post-patches:: + autoreconf -i --- virt-viewer-0.2.1.orig/debian/mozilla-virt-viewer.examples +++ virt-viewer-0.2.1/debian/mozilla-virt-viewer.examples @@ -0,0 +1 @@ +plugin/test.html --- virt-viewer-0.2.1.orig/debian/copyright +++ virt-viewer-0.2.1/debian/copyright @@ -0,0 +1,21 @@ +This package was debianized by Guido Guenther on +Fri, 23 Nov 2007 00:20:13 +0100. + +It was downloaded from http://virt-manager.et.redhat.com/download.html + +Upstream Author: + + Daniel P. Berrange + +Copyright: + + 2007 Red Hat + +License: + + You are free to distribute this software under the terms of the GNU General + Public License Version 2. The full text of this license can be found in the + file /usr/share/common-licenses/GPL-2 + +The Debian packaging is (C) 2007, Guido Guenther and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. --- virt-viewer-0.2.1.orig/debian/changelog +++ virt-viewer-0.2.1/debian/changelog @@ -0,0 +1,217 @@ +virt-viewer (0.2.1-1ubuntu2) maverick; urgency=low + + * Fix FTBFS with last xulrunner + + -- Laurent Bigonville Tue, 13 Jul 2010 00:56:10 +0200 + +virt-viewer (0.2.1-1ubuntu1) maverick; urgency=low + + * Merge with Debian unstable. Remaining changes: + - Put plugins in /usr/lib/{xulrunner-addons,mozilla,firefox-addons}/plugins + instead of the iceape and iceweasel equivalents. + - mozilla-virt-viewer Depends on firefox | seamonkey instead of iceape and + iceweasel. + - Add Plugin Finder Service metadata for web plugin. + + -- Laurent Bigonville Mon, 12 Jul 2010 23:09:44 +0200 + +virt-viewer (0.2.1-1) unstable; urgency=low + + [ Guido Günther ] + * [c2945b4] bump standards version + * [8ca5ea3] exclude plugins from dh_makeshlibs + + [ Laurent Léonard ] + * [39043d7] Remove libtool issue fix. + * [a460a21] Revert "Remove libtool issue fix." This reverts commit + 39043d7460220d7aeecb30b7b489e9064b591440. + * [9ab8056] Bump Debhelper version to 7. + * [366e279] Bump Standards-Version to 3.8.3. + * [0a4e524] Clean debian/rules. + * [e662ab7] Remove debian/docs. + * [409e5bf] Update clean target in debian/rules. + * [a57c8ba] Allow DM upload and add myself as uploader. + * [2f26f4f] Clean debian/watch. + + [ Guido Günther ] + * [6806613] Imported Upstream version 0.2.1 + * [b956a6e] Build-dep on intltool + * [b6fa2e2] Use xulrunner-dev instead of iceape-dev + * [431a46e] New patch 0001-Fix-build-with-xulrunner-1.9.1.patch: Fix build + with xulrunner 1.9.1 + * [c3381c5] New patch 0002-Define-GLADE_DIR.patch: Define GLADE_DIR + * [720c999] Depend on virt-viewer + * [94828c7] New patch 0003-Add-some-docs.patch: Adds some docs + * [8aaf986] Add example web page + * [ae04386] Warn about security implications + + -- Guido Günther Tue, 02 Feb 2010 21:27:29 +0100 + +virt-viewer (0.2.0-1) experimental; urgency=low + + * [67b0e98] Imported Upstream version 0.2.0 + * [6152ea0] drop patch applied upstream rm-in-plugindir.diff + * [5d943f5] add missing libglade2-dev + * [adbf4fc] install ui files + + -- Guido Günther Thu, 30 Jul 2009 15:50:55 +0200 + +virt-viewer (0.0.3-7) experimental; urgency=low + + [ Laurent Léonard ] + * [06ed1a6] Add missing separator in mozilla-virt-viewer dependencies. + * [1bd570f] Fix libtool issue. + + -- Guido Günther Wed, 29 Jul 2009 12:34:06 +0200 + +virt-viewer (0.0.3-6ubuntu7.xul191.1) karmic; urgency=low + + * xulrunner-1.9.1 by default transition + + see: https://blueprints.launchpad.net/ubuntu/+spec/desktop-karmic-firefox-3.5 + - bump minimal xulrunner-dev version + - sync npunix.c plugin code with 1.9.1 examples + + add debian/patches/0002-xulrunner-191-plugin.patch + + -- Alexander Sack Fri, 07 Aug 2009 11:40:43 +0200 + +virt-viewer (0.0.3-6ubuntu7) jaunty; urgency=low + + * no changes upload for nss/nspr SONAME mini-transition + + -- Alexander Sack Mon, 12 Jan 2009 16:22:20 +0100 + +virt-viewer (0.0.3-6ubuntu6) jaunty; urgency=low + + * Set the correct XB-Npp-Applications header, and add + XB-Npp-{Description,File} headers. + + -- Soren Hansen Thu, 08 Jan 2009 11:22:49 +0100 + +virt-viewer (0.0.3-6ubuntu5) jaunty; urgency=low + + * Brown paper bag release: Fix better-default-uri.diff patch again. + * Add XB-Npp headers the Mozilla plugin package. + + -- Soren Hansen Wed, 07 Jan 2009 21:14:28 +0100 + +virt-viewer (0.0.3-6ubuntu4) jaunty; urgency=low + + * Fix faulty better-default-uri.diff patch. + + -- Soren Hansen Mon, 05 Jan 2009 00:31:59 +0100 + +virt-viewer (0.0.3-6ubuntu3) jaunty; urgency=low + + * Apply same heuristics as virsh when choosing the default connection uri: + If we have write access to the libvirt UNIX socket, use qemu:///system. + If not, use qemu:///session. + + -- Soren Hansen Sun, 04 Jan 2009 17:14:12 +0100 + +virt-viewer (0.0.3-6ubuntu2) jaunty; urgency=low + + * The version formerly known as 0.0.3-6ubuntu1. Now, with .install files. + + -- Soren Hansen Fri, 12 Dec 2008 16:25:55 -0800 + +virt-viewer (0.0.3-6ubuntu1) jaunty; urgency=low + + * Merge from Debian experimental (to get the mozilla plugin). + * Build against xulrunner instead of iceape (update build-dependency, and + don't apply the iceape-not-mozilla patch) + * Put plugins in /usr/lib/{xulrunner-addons,mozilla,firefox}/plugins instead + of the iceape and iceweasel equivalents. + + -- Soren Hansen Fri, 12 Dec 2008 09:56:22 -0800 + +virt-viewer (0.0.3-6) experimental; urgency=low + + * [1f49897] install missing binary (Closes: #507549) + + -- Guido Günther Thu, 04 Dec 2008 12:41:50 +0100 + +virt-viewer (0.0.3-5) experimental; urgency=low + + * [a645d5c] really look into destdir (Closes: #504287) + + -- Guido Günther Mon, 03 Nov 2008 19:36:55 +0100 + +virt-viewer (0.0.3-4) experimental; urgency=low + + * [fc7c0aa] rm files in plugindir - same bug as in gtk-vnc so use the + same fix (Closes: #504287) + + -- Guido Günther Sun, 02 Nov 2008 18:20:49 +0100 + +virt-viewer (0.0.3-3) experimental; urgency=low + + * [24287e3] set maintainer to pkg-libvirt-maintainers + * [314c1a9] build the mozilla-plugin + * [0749e02] add README.source + * [937201b] bump standards version + * [02cf615] add Vcs-{Git,Browser} and Homepage fields + + -- Guido Günther Mon, 27 Oct 2008 20:59:02 +0100 + +virt-viewer (0.0.3-2ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - DebianMaintainerField. + - Add Ctrl-Alt-F9 to list of keystrokes to send. + - Add libxen3-dev to Build-Depends. + + -- Andres Rodriguez Mon, 05 May 2008 14:49:14 -0500 + +virt-viewer (0.0.3-2) unstable; urgency=low + + * debian/control: depend on gtk that has gtk_widget_is_composited + * debian/copyright: make copyright match what's in main.c + + -- Guido Guenther Tue, 25 Mar 2008 11:53:23 +0100 + +virt-viewer (0.0.3-1) unstable; urgency=low + + * new upstream version 0.0.3 + * remove upstream author(s) template + * add watch file + * build depend on recent libgtk-vnc (>= 0.3.4) since we need some new + symbols out of it + * remove superflous debian/dirs + * bump standards version + + -- Guido Guenther Wed, 12 Mar 2008 10:48:19 +0100 + +virt-viewer (0.0.2-1ubuntu1) hardy; urgency=low + + * Merge with Debian unstable. Remaining changes: + - DebianMaintainerField. + - Add Ctrl-Alt-F9 to list of keystrokes to send. + - Add libxen3-dev to Build-Depends. + + -- Soren Hansen Sat, 09 Feb 2008 00:57:37 +0100 + +virt-viewer (0.0.2-1) unstable; urgency=low + + * Initial release (Closes: #452514) + + -- Guido Guenther Fri, 23 Nov 2007 00:20:13 +0100 + +virt-viewer (0.0.2-0ubuntu3) hardy; urgency=low + + * Modified Depends to use libxen3.2-dev + * Changed standards to version 3.7.3 + + -- Rick Clark Thu, 07 Feb 2008 14:49:49 -0500 + +virt-viewer (0.0.2-0ubuntu2) hardy; urgency=low + + * Added Ctrl-Alt-F9 to list of keys you can send to the vm. + + -- Soren Hansen Sat, 12 Jan 2008 23:45:33 +0100 + +virt-viewer (0.0.2-0ubuntu1) hardy; urgency=low + + * Initial release. Based on work by Richard W.M. Jones . + Thanks! + + -- Soren Hansen Sat, 12 Jan 2008 23:35:43 +0100 --- virt-viewer-0.2.1.orig/debian/patches/0001-Fix-build-with-xulrunner-1.9.1.patch +++ virt-viewer-0.2.1/debian/patches/0001-Fix-build-with-xulrunner-1.9.1.patch @@ -0,0 +1,383 @@ +From: =?UTF-8?q?Guido=20G=C3=BCnther?= +Date: Tue, 2 Feb 2010 20:16:52 +0100 +Subject: [PATCH] Fix build with xulrunner 1.9.1 + +--- + plugin/npshell.c | 1 - + plugin/npunix.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++--- + 2 files changed, 168 insertions(+), 9 deletions(-) + +--- a/plugin/npshell.c ++++ b/plugin/npshell.c +@@ -84,7 +84,6 @@ + #include + + #include +-#include + + #include "virt-viewer-plugin.h" + +@@ -150,8 +149,8 @@ + NPError + NPP_New(NPMIMEType pluginType G_GNUC_UNUSED, + NPP instance, +- uint16 mode, +- int16 argc, ++ uint16_t mode, ++ int16_t argc, + char* argn[], + char* argv[], + NPSavedData *saved G_GNUC_UNUSED) +@@ -253,7 +252,7 @@ + return VirtViewerXSetWindow(instance, window); + } + +-int32 ++int32_t + NPP_WriteReady(NPP instance, NPStream *stream) + { + /*printf("NPP_WriteReady()\n");*/ +@@ -267,9 +266,9 @@ + return -1L; /* don't accept any bytes in NPP_Write() */ + } + +-int32 ++int32_t + NPP_Write(NPP instance, NPStream *stream, +- int32 offset G_GNUC_UNUSED, int32 len G_GNUC_UNUSED, ++ int32_t offset G_GNUC_UNUSED, int32_t len G_GNUC_UNUSED, + void *buffer G_GNUC_UNUSED) + { + /*printf("NPP_Write()\n");*/ +@@ -386,7 +385,7 @@ + } + } + +-int16 NPP_HandleEvent(NPP instance, void* event) ++int16_t NPP_HandleEvent(NPP instance, void* event) + { + /*printf("NPP_HandleEvent()\n");*/ + +--- a/plugin/npunix.c ++++ b/plugin/npunix.c +@@ -57,7 +57,151 @@ + + #include + #include ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + #include ++#else ++#include ++// For 1.9 compatibility ++// ------------------------------------------------ ++typedef NPError (*NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); ++#define NewNPN_GetValueProc(FUNC) \ ++ ((NPN_GetValueUPP) (FUNC)) ++#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) ++ ++typedef NPError (*NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); ++#define NewNPN_SetValueProc(FUNC) \ ++ ((NPN_SetValueUPP) (FUNC)) ++#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) ++ ++typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window); ++#define NewNPN_GetURLProc(FUNC) \ ++ ((NPN_GetURLUPP) (FUNC)) ++#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3)) ++ ++typedef NPError (*NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData); ++#define NewNPN_GetURLNotifyProc(FUNC) \ ++ ((NPN_GetURLNotifyUPP) (FUNC)) ++#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) ++ ++typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file); ++#define NewNPN_PostURLProc(FUNC) \ ++ ((NPN_PostURLUPP) (FUNC)) ++#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) ++ ++typedef NPError (*NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData); ++#define NewNPN_PostURLNotifyProc(FUNC) \ ++ ((NPN_PostURLNotifyUPP) (FUNC)) ++#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ ++ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) ++ ++typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); ++#define NewNPN_RequestReadProc(FUNC) \ ++ ((NPN_RequestReadUPP) (FUNC)) ++#define CallNPN_RequestReadProc(FUNC, stream, range) \ ++ (*(FUNC))((stream), (range)) ++ ++typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); ++#define NewNPN_NewStreamProc(FUNC) \ ++ ((NPN_NewStreamUPP) (FUNC)) ++#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ ++ (*(FUNC))((npp), (type), (window), (stream)) ++ ++typedef int32_t (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32_t len, void* buffer); ++#define NewNPN_WriteProc(FUNC) \ ++ ((NPN_WriteUPP) (FUNC)) ++#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ ++ (*(FUNC))((npp), (stream), (len), (buffer)) ++ ++typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); ++#define NewNPN_DestroyStreamProc(FUNC) \ ++ ((NPN_DestroyStreamUPP) (FUNC)) ++#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ ++ (*(FUNC))((npp), (stream), (reason)) ++ ++typedef void (*NPN_StatusUPP)(NPP instance, const char* message); ++#define NewNPN_StatusProc(FUNC) \ ++ ((NPN_StatusUPP) (FUNC)) ++#define CallNPN_StatusProc(FUNC, npp, msg) \ ++ (*(FUNC))((npp), (msg)) ++ ++typedef const char* (*NPN_UserAgentUPP)(NPP instance); ++#define NewNPN_UserAgentProc(FUNC) \ ++ ((NPN_UserAgentUPP) (FUNC)) ++#define CallNPN_UserAgentProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef void* (*NPN_MemAllocUPP)(uint32_t size); ++#define NewNPN_MemAllocProc(FUNC) \ ++ ((NPN_MemAllocUPP) (FUNC)) ++#define CallNPN_MemAllocProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef void (*NPN_MemFreeUPP)(void* ptr); ++#define NewNPN_MemFreeProc(FUNC) \ ++ ((NPN_MemFreeUPP) (FUNC)) ++#define CallNPN_MemFreeProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef uint32_t (*NPN_MemFlushUPP)(uint32_t size); ++#define NewNPN_MemFlushProc(FUNC) \ ++ ((NPN_MemFlushUPP) (FUNC)) ++#define CallNPN_MemFlushProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages); ++#define NewNPN_ReloadPluginsProc(FUNC) \ ++ ((NPN_ReloadPluginsUPP) (FUNC)) ++#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef void (*NPN_InvalidateRectUPP)(NPP instance, NPRect *rect); ++#define NewNPN_InvalidateRectProc(FUNC) \ ++ ((NPN_InvalidateRectUPP) (FUNC)) ++#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) ++ ++typedef void (*NPN_InvalidateRegionUPP)(NPP instance, NPRegion region); ++#define NewNPN_InvalidateRegionProc(FUNC) \ ++ ((NPN_InvalidateRegionUPP) (FUNC)) ++#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) ++ ++typedef void (*NPN_ForceRedrawUPP)(NPP instance); ++#define NewNPN_ForceRedrawProc(FUNC) \ ++ ((NPN_ForceRedrawUPP) (FUNC)) ++#define CallNPN_ForceRedrawProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef void* (*NPN_GetJavaEnvUPP)(); ++#define NewNPN_GetJavaEnvProc(FUNC) \ ++ ((NPN_GetJavaEnvUPP) (FUNC)) ++#define CallNPN_GetJavaEnvProc(FUNC) \ ++ (*(FUNC))() ++ ++typedef void* (*NPN_GetJavaPeerUPP)(NPP instance); ++#define NewNPN_GetJavaPeerProc(FUNC) \ ++ ((NPN_GetJavaPeerUPP) (FUNC)) ++#define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++typedef bool (*NPN_PushPopupsEnabledStateUPP)(NPP instance, NPBool enabled); ++#define NewNPN_PushPopupsEnabledStateProc(FUNC) \ ++ ((NPN_PushPopupsEnabledStateUPP) (FUNC)) ++#define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \ ++ (*(FUNC))((ARG1), (ARG2)) ++ ++typedef bool (*NPN_PopPopupsEnabledStateUPP)(NPP instance); ++#define NewNPN_PopPopupsEnabledStateProc(FUNC) \ ++ ((NPN_PopPopupsEnabledStateUPP) (FUNC)) ++#define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \ ++ (*(FUNC))((ARG1)) ++ ++#endif + + #include /* just for G_GNUC_UNUSED */ + +@@ -134,14 +278,14 @@ + + NPError + NPN_PostURL(NPP instance, const char* url, const char* window, +- uint32 len, const char* buf, NPBool file) ++ uint32_t len, const char* buf, NPBool file) + { + return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance, + url, window, len, buf, file); + } + + NPError +-NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, ++NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, + const char* buf, NPBool file, void* notifyData) + { + return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify, +@@ -163,8 +307,8 @@ + type, window, stream_ptr); + } + +-int32 +-NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer) ++int32_t ++NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer) + { + return CallNPN_WriteProc(gNetscapeFuncs.write, instance, + stream, len, buffer); +@@ -190,7 +334,7 @@ + } + + void* +-NPN_MemAlloc(uint32 size) ++NPN_MemAlloc(uint32_t size) + { + return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size); + } +@@ -200,7 +344,7 @@ + CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr); + } + +-uint32 NPN_MemFlush(uint32 size) ++uint32_t NPN_MemFlush(uint32_t size) + { + return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size); + } +@@ -269,8 +413,8 @@ + ***********************************************************************/ + + static NPError +-Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, +- int16 argc, char* argn[], char* argv[], NPSavedData* saved) ++Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode, ++ int16_t argc, char* argn[], char* argv[], NPSavedData* saved) + { + NPError ret; + PLUGINDEBUGSTR("New"); +@@ -297,7 +441,7 @@ + static NPError + Private_NewStream(NPP instance G_GNUC_UNUSED, NPMIMEType type G_GNUC_UNUSED, + NPStream* stream G_GNUC_UNUSED, +- NPBool seekable G_GNUC_UNUSED, uint16* stype G_GNUC_UNUSED) ++ NPBool seekable G_GNUC_UNUSED, uint16_t* stype G_GNUC_UNUSED) + { + NPError err = NPERR_NO_ERROR; + PLUGINDEBUGSTR("NewStream"); +@@ -305,7 +449,7 @@ + return err; + } + +-static int32 ++static int32_t + Private_WriteReady(NPP instance, NPStream* stream) + { + unsigned int result; +@@ -314,8 +458,8 @@ + return result; + } + +-static int32 +-Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, ++static int32_t ++Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, + void* buffer) + { + unsigned int result; +@@ -377,7 +521,7 @@ + } + #endif + +-static int16 ++static int16_t + Private_HandleEvent(NPP instance, void* event) + { + return NPP_HandleEvent(instance, event); +@@ -501,6 +645,7 @@ + */ + pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; + pluginFuncs->size = sizeof(NPPluginFuncs); ++#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20) + pluginFuncs->newp = NewNPP_NewProc(Private_New); + pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy); + pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow); +@@ -513,6 +658,21 @@ + pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify); + pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue); + pluginFuncs->event = NewNPP_HandleEventProc(Private_HandleEvent); ++#else ++ pluginFuncs->newp = (NPP_NewProcPtr)(Private_New); ++ pluginFuncs->destroy = (NPP_DestroyProcPtr)(Private_Destroy); ++ pluginFuncs->setwindow = (NPP_SetWindowProcPtr)(Private_SetWindow); ++ pluginFuncs->newstream = (NPP_NewStreamProcPtr)(Private_NewStream); ++ pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream); ++ pluginFuncs->asfile = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile); ++ pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady); ++ pluginFuncs->write = (NPP_WriteProcPtr)(Private_Write); ++ pluginFuncs->print = (NPP_PrintProcPtr)(Private_Print); ++ pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify); ++ pluginFuncs->getvalue = (NPP_GetValueProcPtr)(Private_GetValue); ++ pluginFuncs->event = (NPP_HandleEventProcPtr)(Private_HandleEvent); ++#endif ++ + #ifdef OJI + pluginFuncs->javaClass = Private_GetJavaClass(); + #endif +--- a/plugin/virt-viewer-plugin.h ++++ b/plugin/virt-viewer-plugin.h +@@ -37,6 +37,7 @@ + #define VIRT_VIEWER_PLUGIN_H + + #include ++#include + #include + #include + #include "viewer.h" +@@ -46,10 +47,10 @@ + #define PLUGIN_DESCRIPTION "Virtual machine console viewer plugin" + + typedef struct { +- uint16 mode; ++ uint16_t mode; + NPWindow *window; +- int32 x, y; +- uint32 width, height; ++ int32_t x, y; ++ uint32_t width, height; + + NPP instance; + NPBool pluginsHidden; +@@ -62,7 +63,7 @@ + + extern NPError VirtViewerXSetWindow (NPP instance, NPWindow* window); + extern NPError VirtViewerDestroyWindow (NPP instance); +-extern int16 VirtViewerXHandleEvent (NPP instance, void* event); ++extern int16_t VirtViewerXHandleEvent (NPP instance, void* event); + + #ifdef ENABLE_DEBUG + static void +--- a/plugin/virt-viewer-plugin.c ++++ b/plugin/virt-viewer-plugin.c +@@ -111,7 +111,7 @@ + + static NPWindow windowlessWindow; + +-int16 ++int16_t + VirtViewerXHandleEvent(NPP instance, void *event) + { + XGraphicsExposeEvent exposeEvent; --- virt-viewer-0.2.1.orig/debian/patches/0003-Add-some-docs.patch +++ virt-viewer-0.2.1/debian/patches/0003-Add-some-docs.patch @@ -0,0 +1,81 @@ +From: =?UTF-8?q?Guido=20G=C3=BCnther?= +Date: Tue, 2 Feb 2010 20:59:10 +0100 +Subject: [PATCH] Add some docs + +--- + plugin/README | 40 ++++++++++++++++++++++++++++++++++++++++ + plugin/test.html | 17 +++++++++++++++++ + 2 files changed, 57 insertions(+), 0 deletions(-) + create mode 100644 plugin/README + create mode 100644 plugin/test.html + +diff --git a/plugin/README b/plugin/README +new file mode 100644 +index 0000000..dea7b78 +--- /dev/null ++++ b/plugin/README +@@ -0,0 +1,40 @@ ++Testing ++------- ++ ++Restart your browser. In the location bar, type: ++ ++ about:plugins ++ ++Amongst your other plugins you should see the virt-viewer plugin: ++ ++ Virt-viewer browser plugin ++ ++ File name: virt-viewer-plugin.so ++ Virtual machine console viewer plugin ++ ++ MIME Type Description Suffixes Enabled ++ application/x-virt-viewer Virt viewer virt-viewer Yes ++ ++If that appears, then next edit the test.html page in the current ++directory. You will need to change the name of this page to point ++to a virtual machine. ++ ++Then load the edited 'test.html' page into your browser, and you should see a ++virt-viewer widget and the display of the virtual machine. ++ ++SECURITY ++-------- ++ ++If you install this plugin, then any web page could invoke it. ++ ++Specific security implications of this are: ++ ++(1) Malicious web page could cause your browser to connect to an arbitrary ++virtual machine even addresses behind a firewall. If you allow the plugin to be ++controlled by Javascript, and to communicate back success/failure indications, ++then this would allow a hacker to probe ports which they might otherwise not ++have access to. ++ ++(2) A web page could connect to a malicious virtual machine. The virt-viewer ++widget is not hardened against responses from malicious VNC servers which might ++provide faulty responses, causing virt-viewer to crash or be subverted. +diff --git a/plugin/test.html b/plugin/test.html +new file mode 100644 +index 0000000..33d333f +--- /dev/null ++++ b/plugin/test.html +@@ -0,0 +1,17 @@ ++ ++ ++ ++

Virt-viewer applet test

++ ++

You will need to edit the source to ++ set uri, name etc.

++ ++ ++ ++ ++

End of page

++ ++ ++ +-- --- virt-viewer-0.2.1.orig/debian/patches/0002-Define-GLADE_DIR.patch +++ virt-viewer-0.2.1/debian/patches/0002-Define-GLADE_DIR.patch @@ -0,0 +1,23 @@ +From: =?UTF-8?q?Guido=20G=C3=BCnther?= +Date: Tue, 2 Feb 2010 20:44:38 +0100 +Subject: [PATCH] Define GLADE_DIR + +so the plugin can find the glade files. +--- + plugin/Makefile.am | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/plugin/Makefile.am b/plugin/Makefile.am +index 93284cc..dde76a9 100644 +--- a/plugin/Makefile.am ++++ b/plugin/Makefile.am +@@ -3,6 +3,8 @@ if ENABLE_PLUGIN + plugindir = $(libdir)/mozilla/plugins + plugin_LTLIBRARIES = virt-viewer-plugin.la + ++gladedir = $(pkgdatadir)/ui ++ + virt_viewer_plugin_la_SOURCES = \ + ../src/util.c ../src/util.h \ + ../src/auth.c ../src/auth.h \ +-- --- virt-viewer-0.2.1.orig/debian/patches/series +++ virt-viewer-0.2.1/debian/patches/series @@ -0,0 +1,3 @@ +0001-Fix-build-with-xulrunner-1.9.1.patch +0002-Define-GLADE_DIR.patch +0003-Add-some-docs.patch