Re: [Spice-devel] [PATCH v4 7/8] vdagent: Use GMainLoop

2017-10-16 Thread Jakub Janků
On Mon, Oct 16, 2017 at 4:53 PM, Frediano Ziglio wrote: >> >> From: Jakub Janků >> >> Replace existing main while-loop with GMainLoop. >> >> Use GIOChannel with g_io_add_watch() to manage IO >> from x11 connections in the main loop. >> >> udscs_connect() now internally creates GSources >> by call

Re: [Spice-devel] [PATCH v4 1/8] Bump GLib version to 2.34

2017-10-16 Thread Frediano Ziglio
> > From: Jakub Janků > > This is required for the following GMainLoop integration, > which utilizes some of the new functions/definitions, namely: > > [definition][GLib version] > g_clear_pointer() 2.34 > G_SOURCE_REMOVE 2.32 > G_SOURCE_CONTINUE 2.32 > g_unix_signal_add() 2.30 > > GLi

Re: [Spice-devel] [PATCH v4 7/8] vdagent: Use GMainLoop

2017-10-16 Thread Frediano Ziglio
> > From: Jakub Janků > > Replace existing main while-loop with GMainLoop. > > Use GIOChannel with g_io_add_watch() to manage IO > from x11 connections in the main loop. > > udscs_connect() now internally creates GSources > by calling g_io_add_watch(). > This enables GMainLoop integration, > c

[Spice-devel] [PATCH v4 7/8] vdagent: Use GMainLoop

2017-10-16 Thread Frediano Ziglio
From: Jakub Janků Replace existing main while-loop with GMainLoop. Use GIOChannel with g_io_add_watch() to manage IO from x11 connections in the main loop. udscs_connect() now internally creates GSources by calling g_io_add_watch(). This enables GMainLoop integration, clients no longer need to

[Spice-devel] [PATCH v4 8/8] udscs: remove client support for select()

2017-10-16 Thread Frediano Ziglio
From: Jakub Janků Drop functions: - udscs_client_fill_fds() - udscs_client_handle_fds() These became obsolete with GMainLoop integration. Move required code to udscs_server_fill_fds() and udscs_server_handle_fds(), respectively. Acked-by: Frediano Ziglio --- src/udscs.c | 48 ++

[Spice-devel] [PATCH v4 5/8] vdagent: small refactor on udscs setup function

2017-10-16 Thread Frediano Ziglio
From: Victor Toso This is mostly a preparatory patch to reduce the usage of globals and the GMainLoop integration. The changes target one function by: * Changing its name from client_setup() to client_setup_sync(): As it important to clarify that the function block; * Removing the 'reconnect'

[Spice-devel] [PATCH v4 3/8] vdagent: move file xfer finalize to a function

2017-10-16 Thread Frediano Ziglio
From: Victor Toso This patch creates vdagent_finalize_file_xfer() to finalize and stop file xfer. Moving this code to a function removes some duplication. Signed-off-by: Victor Toso Acked-by: Frediano Ziglio --- src/vdagent/vdagent.c | 22 -- 1 file changed, 12 insertions(

[Spice-devel] [PATCH v4 4/8] vdagent: Use glib's commandline parser

2017-10-16 Thread Frediano Ziglio
From: Victor Toso As we already depend on glib, let's remove code that glib can take care of. In this case, we don't need to handle commandline parsing ourselves. In regard the global variables: * static const char * -> static gchar * [only paths] path variables: portdev, fx_dir, vdagentd_soc

[Spice-devel] [PATCH v4 6/8] vdagent: Incapsulate iteration state into a VDAgent structure

2017-10-16 Thread Frediano Ziglio
Related to ongoing work to use GMainLoop and GTK integration Based on work from Victor Toso --- src/vdagent/vdagent.c | 121 ++ 1 file changed, 72 insertions(+), 49 deletions(-) diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c index 1f44

[Spice-devel] [PATCH v4 1/8] Bump GLib version to 2.34

2017-10-16 Thread Frediano Ziglio
From: Jakub Janků This is required for the following GMainLoop integration, which utilizes some of the new functions/definitions, namely: [definition][GLib version] g_clear_pointer() 2.34 G_SOURCE_REMOVE 2.32 G_SOURCE_CONTINUE 2.32 g_unix_signal_add() 2.30 GLib version accross distribut

[Spice-devel] [PATCH v4 2/8] vdagent: move file xfer initialization to a function

2017-10-16 Thread Frediano Ziglio
From: Victor Toso This patch creates two functions: - xfer_get_download_directory() - vdagent_init_file_xfer() The logic should be similar as it was before this patch, taking in consideration the global variables fx_open_dir and fx_dir which are set from command line. Signed-off-by: Victor Toso

[Spice-devel] [PATCH v4 0/8] GMainLoop integration

2017-10-16 Thread Frediano Ziglio
Changes since v3: - remove GObject requirements, was not improving after making udcsc independent. Changes since v2: - hide "-y" command line option in help - remove 1 second delay introduced in previous versions, when starting vdagent - remove all GSources on VDAgent finalization -- Major c

Re: [Spice-devel] [PATCH vdagent v3 7/8] vdagent: Use GMainLoop

2017-10-16 Thread Jakub Janků
On Oct 16, 2017 4:20 PM, "Frediano Ziglio" wrote: On Fri, Oct 13, 2017 at 3:49 PM Frediano Ziglio wrote: > > On Fri, Oct 13, 2017, 9:29 AM Frediano Ziglio wrote: > >> > >> > On Wed, Oct 11, 2017 at 1:43 PM, Frediano Ziglio >> wrote: >> > >> >> > >> Replace existing main while-loop with GMain

Re: [Spice-devel] [PATCH vdagent v3 7/8] vdagent: Use GMainLoop

2017-10-16 Thread Frediano Ziglio
> On Fri, Oct 13, 2017 at 3:49 PM Frediano Ziglio < fzig...@redhat.com > wrote: > > > > On Fri, Oct 13, 2017, 9:29 AM Frediano Ziglio < fzig...@redhat.com > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, Oct 11, 2017 at 1:43 PM, Frediano Ziglio < > > > > > >

Re: [Spice-devel] [NSIS] automation: add standard ci support

2017-10-16 Thread Yedidyah Bar David
On Mon, Oct 16, 2017 at 4:16 PM, Yedidyah Bar David wrote: > On Mon, Oct 16, 2017 at 4:07 PM, Christophe Fergeau > wrote: >> My understanding is that the short log really should be saying "oVirt CI >> support" rather than "standard CI support". > > Changed to 'standard oVirt CI support' and adde

Re: [Spice-devel] [NSIS] automation: add standard ci support

2017-10-16 Thread Yedidyah Bar David
On Mon, Oct 16, 2017 at 4:07 PM, Christophe Fergeau wrote: > My understanding is that the short log really should be saying "oVirt CI > support" rather than "standard CI support". Changed to 'standard oVirt CI support' and added a link. oVirt has also non-standard CI, which is currently used for

Re: [Spice-devel] [nsis] Properly quote path to service binaries

2017-10-16 Thread Yedidyah Bar David
Looks good to me. Minor comment below. Adding also others. On Mon, Oct 16, 2017 at 4:03 PM, Christophe Fergeau wrote: > If these paths are unquoted, and the path contains spaces (C:\Program > Files (x86)\...), this could be exploited by putting a binary with a > crafted name (C:\Program.exe), lea

Re: [Spice-devel] [NSIS] automation: add standard ci support

2017-10-16 Thread Christophe Fergeau
My understanding is that the short log really should be saying "oVirt CI support" rather than "standard CI support". Has gitlab built-in CI been considered for this work? In other words, why use oVirt for CI rather than something more "standard"? Where would the error messages go if CI fails? Are

[Spice-devel] [NSIS] automation: add standard oVirt CI support

2017-10-16 Thread Yedidyah Bar David
From: Sandro Bonazzola This patch was previously merged in ovirt gerrit with Change-Id Ie16cc0902c4393e62b074661a86f2f5bb9a1efc1, but removed from master branch there for review on spice-devel. For reference: https://www.ovirt.org/develop/dev-process/build-and-test-standards/ Change-Id: I042f3

[Spice-devel] [nsis] Properly quote path to service binaries

2017-10-16 Thread Christophe Fergeau
If these paths are unquoted, and the path contains spaces (C:\Program Files (x86)\...), this could be exploited by putting a binary with a crafted name (C:\Program.exe), leading to priviledge escalation as this is a service that is being started. https://www.commonexploits.com/unquoted-service-pat

[Spice-devel] [NSIS] automation: add standard ci support

2017-10-16 Thread Yedidyah Bar David
From: Sandro Bonazzola This patch was previously merged in ovirt gerrit with Change-Id Ie16cc0902c4393e62b074661a86f2f5bb9a1efc1, but removed from master branch there for review on spice-devel. Change-Id: I042f30d87b0730ae76e2c8b537e46a56cbbf65f7 Signed-off-by: Sandro Bonazzola --- automation/

[Spice-devel] [NSIS] automation: add standard ci support

2017-10-16 Thread Yedidyah Bar David
From: Sandro Bonazzola Change-Id: Ie16cc0902c4393e62b074661a86f2f5bb9a1efc1 Signed-off-by: Sandro Bonazzola --- automation/build-artifacts.packages | 15 +++ automation/build-artifacts.repos| 3 +++ automation/build-artifacts.sh | 23 +++ automation/ch

Re: [Spice-devel] Spice Protocol Missing Headers

2017-10-16 Thread Frediano Ziglio
- Original Message - > From: ge...@hostfission.com > To: "Frediano Ziglio" > Cc: "Christophe Fergeau" , > spice-devel@lists.freedesktop.org > Sent: Saturday, October 14, 2017 8:34:42 AM > Subject: Re: [Spice-devel] Spice Protocol Missing Headers > > On 2017-10-13 20:05, Frediano Ziglio

Re: [Spice-devel] qxl and page flip

2017-10-16 Thread Gerd Hoffmann
Hi, > Why extending QXL protocol is not worth doing but writing workaround > on workaround is? Problem is extending the qxl protocol requires changes on the host side. A fix which doesn't need that has the advantage that it'll work on hosts with old spice-server and qemu versions. We can look

Re: [Spice-devel] [PATCH spice-server 1/2] tests: Check leaks registering migration interface

2017-10-16 Thread Christophe Fergeau
On Fri, Oct 13, 2017 at 12:20:02PM -0400, Frediano Ziglio wrote: > > > > For the series, > > Acked-by: Christophe Fergeau > > though I would put the test after the fix, or squash both. > > > > Christophe > > > > Some TDD methodologies suggest that test should first fail. > But this does not wo

Re: [Spice-devel] [PATCH spice-server v6 13/19] stream-device: Start supporting resetting device when close/open on guest

2017-10-16 Thread Frediano Ziglio
> > On Thu, 2017-10-12 at 15:52 +0100, Frediano Ziglio wrote: > > When guest close the device the host device has to be reset too. > > This make easier to restart the guest device which can happen in case > > of reboot, agent issues or if we want to update the agent. > > > > Signed-off-by: Fredia

Re: [Spice-devel] intel vgpu & spice & cursor

2017-10-16 Thread Frediano Ziglio
> > Hi, > > We need to figure a way to handle intel vgpu with spice, especially how > to handle the cursor. > > What we'll get from the vgpu is two dma-bufs: One for the primary > plane (aka guest display), one for the cursor plane. We also get the > position of the cursor. We do *not* get th