[Spice-devel] [PATCH linux vdagent v2] Add systemd socket activation

2017-07-21 Thread Jonathon Jongsma
If we are configured to use the systemd init script, also add support for systemd socket activation. systemd will listen on the socket that is used to communicate between the session agent and the system daemon. When the session agent connects, the system daemon will automatically be started. The s

Re: [Spice-devel] [vdagent-win PATCH] Remove small memory leak in log_version

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 09:58:59AM -0400, Frediano Ziglio wrote: > > > > > > > > #define LOG_ROLL_SIZE (1024 * 1024) > > > > > > @@ -80,7 +81,6 @@ void log_version() > > > { > > > DWORD handle; > > > TCHAR module_fname[MAX_PATH]; > > > -TCHAR* info_buf = NULL; > > > > > >

Re: [Spice-devel] [vdagent-win PATCH] Remove small memory leak in log_version

2017-07-21 Thread Frediano Ziglio
> > On Fri, Jul 21, 2017 at 02:01:12PM +0100, Frediano Ziglio wrote: > > The outer info_buf pointer were always NULL (the internal one > > is another variable). > > I'd expand a bit on what the leak is, at first I thought the short log > and long log were unrelated. > "log_version() declares 2 in

Re: [Spice-devel] [vdagent-win PATCH v8 5/5] Add test for PNG files

2017-07-21 Thread Frediano Ziglio
> > > Acked-by: Christophe Fergeau > Changed a bit adding check for intermediate image, some additional tests and image cleanup Frediano > On Wed, Jul 19, 2017 at 09:42:43AM +0100, Frediano Ziglio wrote: > > Test various image and formats. > > The idea is to decode and encode again an image

[Spice-devel] [vdagent-win PATCH v10 0/6] Rewrite image support

2017-07-21 Thread Frediano Ziglio
CxImage is used for image conversion for clipboard support. CxImage have currently some issue: - library is old and unsupported; - required an old libpng library. Currently the MingW binary we distribute due to some issue have PNG disabled (so no clipboard image support). Note that currently we sup

[Spice-devel] [vdagent-win PATCH v10 3/6] Write code to decode PNG format

2017-07-21 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- Makefile.am | 6 +- configure.ac | 3 + vdagent/image.cpp| 8 +- vdagent/imagepng.cpp | 236 +++ vdagent/imagepng.h | 25 ++ 5 files changed, 269 insertions(+), 9 deletions(-) cre

[Spice-devel] [vdagent-win PATCH v10 6/6] RFC spec: run tests during RPM build if possible

2017-07-21 Thread Frediano Ziglio
Currently to fully run checks we need Wine for both 32 and 64 bit. Some distros (like RHEL 7) don't seem to allow installing both 32 and 64 bit versions so turn on checks based on distro versions. Signed-off-by: Frediano Ziglio --- mingw-spice-vdagent.spec.in | 27 +++ 1

[Spice-devel] [vdagent-win PATCH v10 2/6] Initial rewrite of image conversion code

2017-07-21 Thread Frediano Ziglio
Remove CxImage linking. Support Windows BMP format. Signed-off-by: Frediano Ziglio --- Makefile.am | 4 +- configure.ac| 4 +- mingw-spice-vdagent.spec.in | 10 +-- vdagent/image.cpp | 172 +--- vdagent/image.

[Spice-devel] [vdagent-win PATCH v10 4/6] Support encoding PNG images

2017-07-21 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio Acked-by: Christophe Fergeau --- vdagent/imagepng.cpp | 110 +-- 1 file changed, 106 insertions(+), 4 deletions(-) diff --git a/vdagent/imagepng.cpp b/vdagent/imagepng.cpp index 5642cc9..8a759f7 100644 --- a/vdagent/

[Spice-devel] [vdagent-win PATCH v10 5/6] Add test for PNG files

2017-07-21 Thread Frediano Ziglio
Test various image and formats. The idea is to decode and encode again an image and check for differences. ImageMagick is used to create some test image and compare results. Wine is used to execute a test helper. Signed-off-by: Frediano Ziglio --- Makefile.am | 20 + test-p

[Spice-devel] [vdagent-win PATCH v10 1/6] Move image handling to a separate file

2017-07-21 Thread Frediano Ziglio
This will make easier to change code that handle images. Signed-off-by: Frediano Ziglio Acked-by: Christophe Fergeau --- Makefile.am | 2 ++ vdagent/image.cpp | 88 + vdagent/image.h | 48 + vdagent/v

Re: [Spice-devel] [vdagent-win PATCH v8 4/5] Support encoding PNG images

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 09:13:26AM -0400, Frediano Ziglio wrote: > > > > On Wed, Jul 19, 2017 at 09:42:42AM +0100, Frediano Ziglio wrote: > > > -uint8_t *PngCoder::from_bitmap(const BITMAPINFO& info, const void *bits, > > > long &size) > > > +uint8_t *PngCoder::from_bitmap(const BITMAPINFO& bmp_in

Re: [Spice-devel] [vdagent-win PATCH v8 5/5] Add test for PNG files

2017-07-21 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Wed, Jul 19, 2017 at 09:42:43AM +0100, Frediano Ziglio wrote: > Test various image and formats. > The idea is to decode and encode again an image and > check for differences. ImageMagick is used to create > some test image and compare results. > Wine is used to ex

Re: [Spice-devel] [vdagent-win PATCH v8 4/5] Support encoding PNG images

2017-07-21 Thread Frediano Ziglio
> > On Wed, Jul 19, 2017 at 09:42:42AM +0100, Frediano Ziglio wrote: > > -uint8_t *PngCoder::from_bitmap(const BITMAPINFO& info, const void *bits, > > long &size) > > +uint8_t *PngCoder::from_bitmap(const BITMAPINFO& bmp_info, const void > > *bits, long &size) > > { > > -// TODO not implement

Re: [Spice-devel] [vdagent-win PATCH] Remove small memory leak in log_version

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 02:01:12PM +0100, Frediano Ziglio wrote: > The outer info_buf pointer were always NULL (the internal one > is another variable). I'd expand a bit on what the leak is, at first I thought the short log and long log were unrelated. "log_version() declares 2 info_buf variables,

Re: [Spice-devel] [vdagent-win PATCH v8 4/5] Support encoding PNG images

2017-07-21 Thread Christophe Fergeau
On Wed, Jul 19, 2017 at 09:42:42AM +0100, Frediano Ziglio wrote: > -uint8_t *PngCoder::from_bitmap(const BITMAPINFO& info, const void *bits, > long &size) > +uint8_t *PngCoder::from_bitmap(const BITMAPINFO& bmp_info, const void *bits, > long &size) > { > -// TODO not implemented > -retur

Re: [Spice-devel] [vdagent-win PATCH v8 3/5] Write code to decode PNG format

2017-07-21 Thread Frediano Ziglio
> > On Wed, Jul 19, 2017 at 09:42:41AM +0100, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > > Makefile.am | 6 +- > > configure.ac | 3 + > > vdagent/image.cpp| 8 +- > > vdagent/imagepng.cpp | 237 > > +

[Spice-devel] [vdagent-win PATCH] Remove small memory leak in log_version

2017-07-21 Thread Frediano Ziglio
The outer info_buf pointer were always NULL (the internal one is another variable). Signed-off-by: Frediano Ziglio --- OT: wonder why not using FindResource/LoadResource and so on instead of having to use the module file. --- common/vdlog.cpp | 9 - 1 file changed, 4 insertions(+), 5 del

Re: [Spice-devel] [vdagent-win PATCH v8 1/5] Move image handling to a separate file

2017-07-21 Thread Frediano Ziglio
> > On Fri, Jul 21, 2017 at 08:25:30AM -0400, Frediano Ziglio wrote: > > > > > > On Wed, Jul 19, 2017 at 09:42:39AM +0100, Frediano Ziglio wrote: > > > > This will make easier to change code that handle images. > > > > > > > > Signed-off-by: Frediano Ziglio > > > > Acked-by: Christophe Fergeau

Re: [Spice-devel] [vdagent-win PATCH v8 3/5] Write code to decode PNG format

2017-07-21 Thread Christophe Fergeau
On Wed, Jul 19, 2017 at 09:42:41AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > Makefile.am | 6 +- > configure.ac | 3 + > vdagent/image.cpp| 8 +- > vdagent/imagepng.cpp | 237 > +++ > vdagent/

Re: [Spice-devel] [vdagent-win PATCH v8 1/5] Move image handling to a separate file

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 08:25:30AM -0400, Frediano Ziglio wrote: > > > > On Wed, Jul 19, 2017 at 09:42:39AM +0100, Frediano Ziglio wrote: > > > This will make easier to change code that handle images. > > > > > > Signed-off-by: Frediano Ziglio > > > Acked-by: Christophe Fergeau > > > --- > > >

Re: [Spice-devel] [vdagent-win PATCH v8 1/5] Move image handling to a separate file

2017-07-21 Thread Frediano Ziglio
> > On Wed, Jul 19, 2017 at 09:42:39AM +0100, Frediano Ziglio wrote: > > This will make easier to change code that handle images. > > > > Signed-off-by: Frediano Ziglio > > Acked-by: Christophe Fergeau > > --- > > Makefile.am | 2 ++ > > vdagent/image.cpp | 88 > > +

Re: [Spice-devel] [vdagent-win PATCH v8 1/5] Move image handling to a separate file

2017-07-21 Thread Christophe Fergeau
On Wed, Jul 19, 2017 at 09:42:39AM +0100, Frediano Ziglio wrote: > This will make easier to change code that handle images. > > Signed-off-by: Frediano Ziglio > Acked-by: Christophe Fergeau > --- > Makefile.am | 2 ++ > vdagent/image.cpp | 88 > ++

[Spice-devel] Proposal: review branches (was Re: [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code)

2017-07-21 Thread Christophe de Dinechin
> On 21 Jul 2017, at 12:41, Frediano Ziglio wrote: > >> >> On Fri, Jul 21, 2017 at 06:18:49AM -0400, Frediano Ziglio wrote: >>> Beside that I wonder why I had to wait 8 months for these reviews, >>> not counting the time to decide to rewrite this part of code >>> (with all the wasted time tryin

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-21 Thread Frediano Ziglio
> > On Fri, Jul 21, 2017 at 06:18:49AM -0400, Frediano Ziglio wrote: > > Beside that I wonder why I had to wait 8 months for these reviews, > > not counting the time to decide to rewrite this part of code > > (with all the wasted time trying to not do it) and the time we > > waited to fix a known

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 06:18:49AM -0400, Frediano Ziglio wrote: > Beside that I wonder why I had to wait 8 months for these reviews, > not counting the time to decide to rewrite this part of code > (with all the wasted time trying to not do it) and the time we > waited to fix a known bug which is

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-21 Thread Frediano Ziglio
> > > On 20 Jul 2017, at 11:23, Christophe Fergeau wrote: > > > > On Thu, Jul 20, 2017 at 09:42:26AM +0200, Christophe de Dinechin wrote: > >>> I moved to "unsigned int" 2 versions ago. > >> > >> It was courteous of you. > > > > Yup, thanks, did not take a look at the newer iterations yet. > >

Re: [Spice-devel] [PATCH spice-gtk v2] spice-gtk: Use time comparisons that still work after wraparound

2017-07-21 Thread Marc-André Lureau
Hi - Original Message - > On Tue, 2017-07-18 at 16:50 +0200, Christophe de Dinechin wrote: > > > On 18 Jul 2017, at 16:48, Christophe Fergeau > > > wrote: > > > > > > Hey, > > > > > > On Tue, Jul 18, 2017 at 04:37:29PM +0200, Christophe de Dinechin > > > wrote: > > > > OK. Since you see

Re: [Spice-devel] [vdagent-win PATCH] Use single variable for path computations

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 09:51:48AM +0100, Frediano Ziglio wrote: > This saves some stack memory not reducing any readability. I think I've read in the past about studies which found that code reusing a variable for different purposes had more bugs than code not doing that ;) Acked-by: Christophe

Re: [Spice-devel] [RFC spice-gtk] Add flatpak builder manifest file for spicy

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 10:42:03AM +0200, Pavel Grunt wrote: > > Any reason for using org.spicespace rather than org.spice-space? > I know, apparently it is not allowed to use '-' in the name Ah right, I was suspecting something like that :) spicespace will be good enough then! > > Is that really

Re: [Spice-devel] [PATCH spice-gtk] Add flatpak builder manifest file for spicy

2017-07-21 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Fri, Jul 21, 2017 at 11:02:57AM +0200, Pavel Grunt wrote: > To give an example for creating flatpaks depending on spice-gtk > > How to build and run the flatpak: > spicy uses GNOME SDK runtime, version 3.24. The runtime provides tools > and libraries necessary to

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 11:12:13AM +0200, Christophe de Dinechin wrote: > > > On 20 Jul 2017, at 11:23, Christophe Fergeau wrote: > > > > On Thu, Jul 20, 2017 at 09:42:26AM +0200, Christophe de Dinechin wrote: > >>> I moved to "unsigned int" 2 versions ago. > >> > >> It was courteous of you. >

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-21 Thread Christophe de Dinechin
> On 20 Jul 2017, at 11:23, Christophe Fergeau wrote: > > On Thu, Jul 20, 2017 at 09:42:26AM +0200, Christophe de Dinechin wrote: >>> I moved to "unsigned int" 2 versions ago. >> >> It was courteous of you. > > Yup, thanks, did not take a look at the newer iterations yet. > >> >>> >>> But s

Re: [Spice-devel] [vdagent-win PATCH] RFC spec: run tests during RPM build if possible

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 09:54:10AM +0100, Frediano Ziglio wrote: > Currently to fully run checks we need Wine for both 32 and 64 bit. > Some distros (like RHEL 7) don't seem to allow installing > both 32 and 64 bit versions so turn on checks based on distro > versions. > > Signed-off-by: Frediano

[Spice-devel] [PATCH spice-gtk] Add flatpak builder manifest file for spicy

2017-07-21 Thread Pavel Grunt
To give an example for creating flatpaks depending on spice-gtk How to build and run the flatpak: spicy uses GNOME SDK runtime, version 3.24. The runtime provides tools and libraries necessary to build the flatpak $ flatpak remote-add --if-not-exists gnome https://sdk.gnome.org/gnome.flatpakrepo

[Spice-devel] [vdagent-win PATCH v9 5/5] Add test for PNG files

2017-07-21 Thread Frediano Ziglio
Test various image and formats. The idea is to decode and encode again an image and check for differences. ImageMagick is used to create some test image and compare results. Wine is used to execute a test helper. Signed-off-by: Frediano Ziglio --- Makefile.am | 20 + test-p

[Spice-devel] [vdagent-win PATCH] RFC spec: run tests during RPM build if possible

2017-07-21 Thread Frediano Ziglio
Currently to fully run checks we need Wine for both 32 and 64 bit. Some distros (like RHEL 7) don't seem to allow installing both 32 and 64 bit versions so turn on checks based on distro versions. Signed-off-by: Frediano Ziglio --- mingw-spice-vdagent.spec.in | 25 + 1 fi

[Spice-devel] [vdagent-win PATCH] Use single variable for path computations

2017-07-21 Thread Frediano Ziglio
This saves some stack memory not reducing any readability. Signed-off-by: Frediano Ziglio --- vdservice/vdservice.cpp | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.cpp index 7f3a5a3..329f9c2 100644 --- a/vdservice/vd

Re: [Spice-devel] [RFC spice-gtk] Add flatpak builder manifest file for spicy

2017-07-21 Thread Pavel Grunt
On Fri, 2017-07-21 at 10:29 +0200, Christophe Fergeau wrote: > Hey, > > On Thu, Jul 20, 2017 at 10:49:48PM +0200, Pavel Grunt wrote: > > To give example for creating flatpaks depending on spice-gtk > > > > Yup, good idea, just a few minor comments: > > > How to use to build and run the flatpak:

Re: [Spice-devel] [RFC spice-gtk] Add flatpak builder manifest file for spicy

2017-07-21 Thread Christophe Fergeau
Hey, On Thu, Jul 20, 2017 at 10:49:48PM +0200, Pavel Grunt wrote: > To give example for creating flatpaks depending on spice-gtk > Yup, good idea, just a few minor comments: > How to use to build and run the flatpak: Maybe mention that the gnome 3.24 SDK has to be installed? > $ flatpak-buil