Hello community,

here is the log from the commit of package virt-viewer for openSUSE:Factory 
checked in at 2014-03-28 16:29:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virt-viewer (Old)
 and      /work/SRC/openSUSE:Factory/.virt-viewer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virt-viewer"

Changes:
--------
--- /work/SRC/openSUSE:Factory/virt-viewer/virt-viewer.changes  2014-03-09 
20:28:17.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.virt-viewer.new/virt-viewer.changes     
2014-03-28 16:29:27.000000000 +0100
@@ -1,0 +2,16 @@
+Tue Mar 25 15:21:59 MDT 2014 - [email protected]
+
+- Drop patch as it causes initial viewer size problems
+  52fce019-set-VNC-display-ready-after-VNC-initialized.patch
+
+-------------------------------------------------------------------
+Fri Mar 14 12:52:40 MDT 2014 - [email protected]
+
+- Upstream bug fixes
+  530b66e9-spice-ask-credentials-for-proxy.patch
+  53209ab7-fix-scaling-of-window-upon-resize.patch
+  53219d1a-silence-message-about-missing-config-file.patch
+  5322b75b-dont-show-quit-dialog-in-kiosk-mode.patch
+  5322b929-fix-building-with-older-spice-gtk.patch
+
+-------------------------------------------------------------------

Old:
----
  52fce019-set-VNC-display-ready-after-VNC-initialized.patch

New:
----
  530b66e9-spice-ask-credentials-for-proxy.patch
  53209ab7-fix-scaling-of-window-upon-resize.patch
  53219d1a-silence-message-about-missing-config-file.patch
  5322b75b-dont-show-quit-dialog-in-kiosk-mode.patch
  5322b929-fix-building-with-older-spice-gtk.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ virt-viewer.spec ++++++
--- /var/tmp/diff_new_pack.DpPCH4/_old  2014-03-28 16:29:27.000000000 +0100
+++ /var/tmp/diff_new_pack.DpPCH4/_new  2014-03-28 16:29:27.000000000 +0100
@@ -15,6 +15,7 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Name:           virt-viewer
 Summary:        Virtual Machine Viewer
 License:        GPL-2.0+
@@ -26,8 +27,12 @@
 Patch1:         52fa6455-display-warning-if-UI-file-fails.patch
 Patch2:         52fce019-dont-free-session-if-auth-retry.patch
 Patch3:         52fce019-dont-hide-main-window-when-disconnecting.patch
-Patch4:         52fce019-set-VNC-display-ready-after-VNC-initialized.patch
-Patch5:         530b1cfc-german-translation-send-key-fix.patch
+Patch4:         530b1cfc-german-translation-send-key-fix.patch
+Patch5:         530b66e9-spice-ask-credentials-for-proxy.patch
+Patch6:         53209ab7-fix-scaling-of-window-upon-resize.patch
+Patch7:         53219d1a-silence-message-about-missing-config-file.patch
+Patch8:         5322b75b-dont-show-quit-dialog-in-kiosk-mode.patch
+Patch9:         5322b929-fix-building-with-older-spice-gtk.patch
 Patch20:        netcat.patch
 Patch21:        windows-keycombo.patch
 Patch22:        netware-keycombo.patch
@@ -71,6 +76,10 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1

++++++ 530b66e9-spice-ask-credentials-for-proxy.patch ++++++
Subject: spice: ask credentials for proxy
From: Marc-André Lureau [email protected] Mon Feb 3 18:40:01 2014 
+0100
Date: Mon Feb 24 16:36:09 2014 +0100:
Git: d1d53d0c8b5600f61e55e472c592ebc86a65ee6f

If Spice proxy requires authentication, ask credentials and try
connecting again.

diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index de5edf7..1740ba3 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -29,6 +29,8 @@
 
 #include <spice-option.h>
 #include <spice-util.h>
+#include <spice-client.h>
+
 #include <usb-device-widget.h>
 #include "virt-viewer-file.h"
 #include "virt-viewer-util.h"
@@ -471,8 +473,10 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel 
*channel G_GNUC_UNUSED
                                              SpiceChannelEvent event,
                                              VirtViewerSession *session)
 {
+    const GError *error;
     VirtViewerSessionSpice *self = VIRT_VIEWER_SESSION_SPICE(session);
-    gchar *password = NULL;
+    gchar *password = NULL, *user = NULL;
+    int ret;
 
     g_return_if_fail(self != NULL);
 
@@ -499,10 +503,10 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel 
*channel G_GNUC_UNUSED
                                   _("invalid password"));
         self->priv->pass_try++;
 
-        int ret = virt_viewer_auth_collect_credentials(self->priv->main_window,
-                                                       "SPICE",
-                                                       NULL,
-                                                       NULL, &password);
+        ret = virt_viewer_auth_collect_credentials(self->priv->main_window,
+                                                   "SPICE",
+                                                   NULL,
+                                                   NULL, &password);
         if (ret < 0) {
             g_signal_emit_by_name(session, "session-cancelled");
         } else {
@@ -518,8 +522,33 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel 
*channel G_GNUC_UNUSED
         }
         break;
     case SPICE_CHANNEL_ERROR_CONNECT:
+#if defined(SPICE_GTK_CHECK_VERSION) && SPICE_GTK_CHECK_VERSION(0, 23, 21)
+        error = spice_channel_get_error(channel);
+
+        DEBUG_LOG("main channel: failed to connect %s", error ? error->message 
: "");
+
+        if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_PROXY_NEED_AUTH) ||
+            g_error_matches(error, G_IO_ERROR, G_IO_ERROR_PROXY_AUTH_FAILED)) {
+            SpiceURI *proxy = spice_session_get_proxy_uri(self->priv->session);
+            g_warn_if_fail(proxy != NULL);
+
+            ret = virt_viewer_auth_collect_credentials(self->priv->main_window,
+                                                       "proxy", NULL,
+                                                       &user, &password);
+            if (ret < 0) {
+                g_signal_emit_by_name(session, "session-cancelled");
+            } else {
+                spice_uri_set_user(proxy, user);
+                spice_uri_set_password(proxy, password);
+                spice_session_connect(self->priv->session);
+            }
+        } else {
+            g_signal_emit_by_name(session, "session-disconnected");
+        }
+#else
         DEBUG_LOG("main channel: failed to connect");
         g_signal_emit_by_name(session, "session-disconnected");
+#endif
         break;
     case SPICE_CHANNEL_ERROR_IO:
     case SPICE_CHANNEL_ERROR_LINK:
@@ -532,6 +561,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel 
*channel G_GNUC_UNUSED
     }
 
     g_free(password);
+    g_free(user);
 }
 
 static void remove_cb(GtkContainer   *container G_GNUC_UNUSED,
++++++ 53209ab7-fix-scaling-of-window-upon-resize.patch ++++++
Subject: Fix scaling of window upon resize
From: Daniel P. Berrange [email protected] Wed Mar 12 17:33:24 2014 +0000
Date: Wed Mar 12 17:34:47 2014 +0000:
Git: f2c4a99b6e94bdcdd71f4ab5f264849e1cd45e33

The code to determine scaling of windows was incorrectly
using the original desktop size instead of the host screen
size. The 128 pixel fudge factor was also causing windows
to be scaled when there was no need for them to be.

Signed-off-by: Daniel P. Berrange <[email protected]>

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 05d5fe7..3740a9e 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -433,24 +433,22 @@ virt_viewer_window_resize(VirtViewerWindow *self, 
gboolean keep_win_size)
                                     (screen, 
gtk_widget_get_window(priv->window)),
                                     &fullscreen);
 
-    g_return_if_fail(fullscreen.height > 128);
-    g_return_if_fail(fullscreen.width > 128);
     g_return_if_fail(desktopWidth > 0);
     g_return_if_fail(desktopHeight > 0);
 
     desktopAspect = (double)desktopWidth / (double)desktopHeight;
-    screenAspect = (double)(fullscreen.width - 128) / 
(double)(fullscreen.height - 128);
+    screenAspect = (double)fullscreen.width / (double)fullscreen.height;
 
-    if ((desktopWidth > (fullscreen.width - 128)) ||
-        (desktopHeight > (fullscreen.height - 128))) {
+    if ((desktopWidth > fullscreen.width) ||
+        (desktopHeight > fullscreen.height)) {
         /* Doesn't fit native res, so go as large as possible
            maintaining aspect ratio */
         if (screenAspect > desktopAspect) {
-            width = desktopHeight * desktopAspect;
-            height = desktopHeight;
+            width = fullscreen.height * desktopAspect;
+            height = fullscreen.height;
         } else {
-            width = desktopWidth;
-            height = desktopWidth / desktopAspect;
+            width = fullscreen.width;
+            height = fullscreen.width / desktopAspect;
         }
     } else {
         width = desktopWidth;
++++++ 53219d1a-silence-message-about-missing-config-file.patch ++++++
Subject: Silence a message about missing configuration file
From: Marc-André Lureau [email protected] Wed Mar 12 14:43:28 2014 
+0100
Date: Thu Mar 13 12:57:14 2014 +0100:
Git: 4b283b26a9040e8dd266093e2eba650725e35759

Do not print a g_debug() error when the configuration file is missing,
unless given the --debug option.

https://bugzilla.redhat.com/show_bug.cgi?id=1006737

Index: virt-viewer-0.6.0/src/virt-viewer-app.c
===================================================================
--- virt-viewer-0.6.0.orig/src/virt-viewer-app.c
+++ virt-viewer-0.6.0/src/virt-viewer-app.c
@@ -1578,8 +1578,11 @@ virt_viewer_app_init (VirtViewerApp *sel
 
     g_key_file_load_from_file(self->priv->config, self->priv->config_file,
                     G_KEY_FILE_KEEP_COMMENTS|G_KEY_FILE_KEEP_TRANSLATIONS, 
&error);
-    if (error)
-        g_debug("Couldn't load configuration: %s", error->message);
+
+    if (g_error_matches(error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
+        DEBUG_LOG("No configuration file %s", self->priv->config_file);
+    else if (error)
+        g_warning("Couldn't load configuration: %s", error->message);
 
     g_clear_error(&error);
 
++++++ 5322b75b-dont-show-quit-dialog-in-kiosk-mode.patch ++++++
Subject: Don't show 'do you want to quit' dialog in kiosk mode
From: Christophe Fergeau [email protected] Thu Feb 6 10:07:14 2014 +0100
Date: Fri Mar 14 09:01:31 2014 +0100:
Git: eb65226a9db87ee3afa1cd6b6b24057bca6ee2ba

In some situation, (for example, guest without vdagent running), it's
possible to pass key combinations to virt-viewer. When using alt+f4,
this can cause the 'do you want to quit?' dialog to show while it's
non-functional.
This commit moves the check for kiosk mode to before we show this dialog.

diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 9b3bacc..718c124 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -252,13 +252,9 @@ static void
 virt_viewer_app_quit(VirtViewerApp *self)
 {
     g_return_if_fail(VIRT_VIEWER_IS_APP(self));
+    g_return_if_fail(!self->priv->kiosk);
     VirtViewerAppPrivate *priv = self->priv;
 
-    if (self->priv->kiosk) {
-        g_warning("The app is in kiosk mode and can't quit");
-        return;
-    }
-
     virt_viewer_app_save_config(self);
 
     if (priv->session) {
@@ -367,6 +363,11 @@ virt_viewer_app_maybe_quit(VirtViewerApp *self, 
VirtViewerWindow *window)
 {
     GError *error = NULL;
 
+    if (self->priv->kiosk) {
+        g_warning("The app is in kiosk mode and can't quit");
+        return;
+    }
+
     gboolean ask = g_key_file_get_boolean(self->priv->config,
                                           "virt-viewer", "ask-quit", &error);
     if (error) {
++++++ 5322b929-fix-building-with-older-spice-gtk.patch ++++++
Subject: Fix building with older spice-gtk
From: Martin Kletzander [email protected] Thu Mar 13 11:39:48 2014 +0100
Date: Fri Mar 14 09:09:13 2014 +0100:
Git: b6d2744baeb468a1e394e8f9ab1a9c9c8d278842

Due to spice-gtk-0.23 missing SPICE_GTK_CHECK_VERSION macro, the
condition:

causes the following error:

virt-viewer-session-spice.c: In function 
'virt_viewer_session_spice_main_channel_event':
virt-viewer-session-spice.c:525:64: error: missing binary operator before token 
"("
 #if defined(SPICE_GTK_CHECK_VERSION) && SPICE_GTK_CHECK_VERSION(0, 23, 21)
                                                                ^
Also one more warning is fixed in this patch:

virt-viewer-session-spice.c:476:19: warning: unused variable 'error'
[-Wunused-variable] const GError *error;
                                  ^

Signed-off-by: Martin Kletzander <[email protected]>

diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index 1740ba3..2712514 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -1,7 +1,7 @@
 /*
  * Virt Viewer: A virtual machine console viewer
  *
- * Copyright (C) 2007-2012 Red Hat, Inc.
+ * Copyright (C) 2007-2012, 2014 Red Hat, Inc.
  * Copyright (C) 2009-2012 Daniel P. Berrange
  * Copyright (C) 2010 Marc-André Lureau
  *
@@ -44,6 +44,10 @@
 #include "gbinding.c"
 #endif
 
+#ifndef SPICE_GTK_CHECK_VERSION
+#define SPICE_GTK_CHECK_VERSION(x, y, z) 0
+#endif
+
 G_DEFINE_TYPE (VirtViewerSessionSpice, virt_viewer_session_spice, 
VIRT_VIEWER_TYPE_SESSION)
 
 
@@ -473,7 +477,6 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel 
*channel G_GNUC_UNUSED
                                              SpiceChannelEvent event,
                                              VirtViewerSession *session)
 {
-    const GError *error;
     VirtViewerSessionSpice *self = VIRT_VIEWER_SESSION_SPICE(session);
     gchar *password = NULL, *user = NULL;
     int ret;
@@ -522,8 +525,9 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel 
*channel G_GNUC_UNUSED
         }
         break;
     case SPICE_CHANNEL_ERROR_CONNECT:
-#if defined(SPICE_GTK_CHECK_VERSION) && SPICE_GTK_CHECK_VERSION(0, 23, 21)
-        error = spice_channel_get_error(channel);
+#if SPICE_GTK_CHECK_VERSION(0, 23, 21)
+    {
+        const GError *error = spice_channel_get_error(channel);
 
         DEBUG_LOG("main channel: failed to connect %s", error ? error->message 
: "");
 
@@ -545,6 +549,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel 
*channel G_GNUC_UNUSED
         } else {
             g_signal_emit_by_name(session, "session-disconnected");
         }
+    }
 #else
         DEBUG_LOG("main channel: failed to connect");
         g_signal_emit_by_name(session, "session-disconnected");
++++++ netcat.patch ++++++
--- /var/tmp/diff_new_pack.DpPCH4/_old  2014-03-28 16:29:27.000000000 +0100
+++ /var/tmp/diff_new_pack.DpPCH4/_new  2014-03-28 16:29:27.000000000 +0100
@@ -2,7 +2,7 @@
 ===================================================================
 --- virt-viewer-0.6.0.orig/src/virt-viewer-app.c
 +++ virt-viewer-0.6.0/src/virt-viewer-app.c
-@@ -541,7 +541,7 @@ virt_viewer_app_open_tunnel_ssh(const ch
+@@ -542,7 +542,7 @@ virt_viewer_app_open_tunnel_ssh(const ch
          cmd[n++] = sshuser;
      }
      cmd[n++] = sshhost;

++++++ netware-keycombo.patch ++++++
--- /var/tmp/diff_new_pack.DpPCH4/_old  2014-03-28 16:29:27.000000000 +0100
+++ /var/tmp/diff_new_pack.DpPCH4/_new  2014-03-28 16:29:27.000000000 +0100
@@ -2,7 +2,7 @@
 ===================================================================
 --- virt-viewer-0.6.0.orig/src/virt-viewer-window.c
 +++ virt-viewer-0.6.0/src/virt-viewer-window.c
-@@ -581,6 +581,15 @@ static const struct keyComboDef keyCombo
+@@ -579,6 +579,15 @@ static const struct keyComboDef keyCombo
      { { GDK_Control_L, GDK_Alt_L, GDK_BackSpace, GDK_VoidSymbol }, 
N_("Ctrl+Alt+_Backspace"), NULL},
      { { GDK_Control_R, GDK_Scroll_Lock, GDK_Scroll_Lock, GDK_VoidSymbol }, 
N_("Ctrl+Scroll+Scroll"), NULL},
      { { GDK_VoidSymbol }, "" , NULL},
@@ -18,7 +18,7 @@
      { { GDK_Control_L, GDK_Alt_L, GDK_F1, GDK_VoidSymbol }, 
N_("Ctrl+Alt+F_1"), NULL},
      { { GDK_Control_L, GDK_Alt_L, GDK_F2, GDK_VoidSymbol }, 
N_("Ctrl+Alt+F_2"), NULL},
      { { GDK_Control_L, GDK_Alt_L, GDK_F3, GDK_VoidSymbol }, 
N_("Ctrl+Alt+F_3"), NULL},
-@@ -590,7 +599,7 @@ static const struct keyComboDef keyCombo
+@@ -588,7 +597,7 @@ static const struct keyComboDef keyCombo
      { { GDK_Control_L, GDK_Alt_L, GDK_F7, GDK_VoidSymbol }, 
N_("Ctrl+Alt+F_7"), NULL},
      { { GDK_Control_L, GDK_Alt_L, GDK_F8, GDK_VoidSymbol }, 
N_("Ctrl+Alt+F_8"), NULL},
      { { GDK_Control_L, GDK_Alt_L, GDK_F9, GDK_VoidSymbol }, 
N_("Ctrl+Alt+F_9"), NULL},

++++++ spice-gtk.patch ++++++
--- /var/tmp/diff_new_pack.DpPCH4/_old  2014-03-28 16:29:27.000000000 +0100
+++ /var/tmp/diff_new_pack.DpPCH4/_new  2014-03-28 16:29:27.000000000 +0100
@@ -25,7 +25,7 @@
  #include <glib/gi18n.h>
  
  #include <spice-option.h>
-@@ -84,6 +85,27 @@ static void virt_viewer_session_spice_sm
+@@ -90,6 +91,27 @@ static void virt_viewer_session_spice_sm
  static gboolean 
virt_viewer_session_spice_fullscreen_auto_conf(VirtViewerSessionSpice *self);
  static void 
virt_viewer_session_spice_apply_monitor_geometry(VirtViewerSession *self, 
GdkRectangle *monitors, guint nmonitors);
  

++++++ windows-keycombo.patch ++++++
--- /var/tmp/diff_new_pack.DpPCH4/_old  2014-03-28 16:29:27.000000000 +0100
+++ /var/tmp/diff_new_pack.DpPCH4/_new  2014-03-28 16:29:27.000000000 +0100
@@ -2,7 +2,7 @@
 ===================================================================
 --- virt-viewer-0.6.0.orig/src/virt-viewer-window.c
 +++ virt-viewer-0.6.0/src/virt-viewer-window.c
-@@ -579,6 +579,7 @@ struct keyComboDef {
+@@ -577,6 +577,7 @@ struct keyComboDef {
  static const struct keyComboDef keyCombos[] = {
      { { GDK_Control_L, GDK_Alt_L, GDK_Delete, GDK_VoidSymbol }, 
N_("Ctrl+Alt+_Del"), "<virt-viewer>/send/secure-attention"},
      { { GDK_Control_L, GDK_Alt_L, GDK_BackSpace, GDK_VoidSymbol }, 
N_("Ctrl+Alt+_Backspace"), NULL},

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to