Re: [Spice-devel] Announcing spice 0.12.6

2015-10-07 Thread Christophe Fergeau
Hi,

I've uploaded the manual corresponding to that release to
http://www.spice-space.org/docs/manual/
http://www.spice-space.org/docs/manual/manual.chunked/

Christophe

On Tue, Oct 06, 2015 at 05:44:05PM +0200, Christophe Fergeau wrote:
> Hey everyone,
> 
> At long last, I've rolled out a new spice 0.12.6 release.
> 
> Major changes in 0.12.6:
> 
> * Removed spicec client code, it has been superseded by remote-viewer and 
> other
>   spice-gtk based clients
> * Unix socket support
> * LZ4 support
> * Let clients specify their preferred image compression format
> * Allow to record and replay a spice-server session
> * Fixes for CVE-2015-3247 CVE-2015-5260 and CVE-2015-5261
> * spice-protocol submodule has been removed,, spice-protocol must now be
>   installed when building spice-server
> * Remove write polling in chardevs to reduce wakeups
> * Various bugs, crashes fixes, code cleanups, ...
> 
> http://spice-space.org/download/releases/spice-0.12.6.tar.bz2
> 
> The release is signed with my GPG key:
>   94A9 F756 61F7 7A61 6864  9B23 A9D8 C214 29AC 6C82
> 
> Christophe
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


signature.asc
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH] Simplify pointer computation

2015-10-07 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio 
---
 server/reds_stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/reds_stream.c b/server/reds_stream.c
index 1a595b2..6dc41ca 100644
--- a/server/reds_stream.c
+++ b/server/reds_stream.c
@@ -326,7 +326,7 @@ RedsStream *reds_stream_new(int socket)
 RedsStream *stream;
 
 stream = spice_malloc0(sizeof(RedsStream) + sizeof(RedsStreamPrivate));
-stream->priv = (RedsStreamPrivate *)(((char *)stream) + 
sizeof(RedsStream));
+stream->priv = (RedsStreamPrivate *)(stream+1);
 stream->priv->info = spice_new0(SpiceChannelEventInfo, 1);
 reds_stream_set_socket(stream, socket);
 
-- 
2.4.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 4/4] mingw: include and link to ws2_32

2015-10-07 Thread Fabiano Fidêncio
Otherwise the following errors can be faced:
src/vscclient-vscclient.o: In function `send_msg':
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:122: undefined
reference to `_imp__htonl@4'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:124: undefined
reference to `_imp__htonl@4'
src/vscclient-vscclient.o: In function `on_host_init':
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:260: undefined
reference to `_imp__ntohl@4'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:273: undefined
reference to `_imp__ntohl@4'
src/vscclient-vscclient.o: In function `do_socket_read':
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:332: undefined
reference to `_imp__ntohl@4'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:333: undefined
reference to `_imp__ntohl@4'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:334: undefined
reference to `_imp__ntohl@4'
src/vscclient-vscclient.o: In function `connect_to_qemu':
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:615: undefined
reference to `_imp__socket@12'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:628: undefined
reference to `_imp__getaddrinfo@16'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:636: undefined
reference to `_imp__connect@12'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:645: undefined
reference to `_imp__freeaddrinfo@4'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:650: undefined
reference to `_imp__freeaddrinfo@4'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:652: undefined
reference to `_imp__closesocket@4'
src/vscclient-vscclient.o: In function `main':
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:676: undefined
reference to `_imp__WSAStartup@8'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:677: undefined
reference to `_imp__WSAGetLastError@0'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:778: undefined
reference to `_imp__htonl@4'
/home/ffidenci/src/upstream/libcacard/src/vscclient.c:791: undefined
reference to `_imp__closesocket@4'
collect2: error: ld returned 1 exit status
Makefile:656: recipe for target 'vscclient.exe' failed
make[2]: *** [vscclient.exe] Error 1
make[2]: Leaving directory '/home/ffidenci/src/upstream/libcacard'
Makefile:774: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ffidenci/src/upstream/libcacard'
Makefile:495: recipe for target 'all' failed
make: *** [all] Error 2
---
 Makefile.am | 4 
 src/vscclient.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index eea8daa..bbe8e2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,6 +40,10 @@ libcacard_la_LDFLAGS =   
\
$(WARN_LDFLAGS)
$(NULL)
 
+#if OS_WIN32
+libcacard_la_LIBADD += -lws2_32
+#endif
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libcacard.pc
 
diff --git a/src/vscclient.c b/src/vscclient.c
index 24015ef..fea5aea 100644
--- a/src/vscclient.c
+++ b/src/vscclient.c
@@ -21,6 +21,7 @@
 #define closesocket(x) close(x)
 #else
 #include 
+#include 
 #include 
 #endif
 
-- 
2.4.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 0/4] libcacard: a few fixed that allows the library to be crosscompiled (using mingw)

2015-10-07 Thread Fabiano Fidêncio
Howdy!
I've been able to build latest nspr and nss using mingw
(on Fedora22) and the next obvious step was to buid libcacard.

I faced a few problems that could be solved with these 4 simple
patches.

Fabiano Fidêncio (4):
  mingw: remove cac_is_cac_card from libcacard.syms
  mingw: avoid problems for using %zd (C99)
  mingw: include ws2tcpip header
  mingw: include  and link to ws2_32

 Makefile.am| 8 
 src/libcacard.syms | 1 -
 src/vscclient.c| 2 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

-- 
2.4.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 3/4] mingw: include ws2tcpip header

2015-10-07 Thread Fabiano Fidêncio
This header has the definition of getaddrinfo, according to:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738520(v=vs.85).aspx
---
 src/vscclient.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/vscclient.c b/src/vscclient.c
index fad8db9..24015ef 100644
--- a/src/vscclient.c
+++ b/src/vscclient.c
@@ -20,6 +20,7 @@
 #include 
 #define closesocket(x) close(x)
 #else
+#include 
 #include 
 #endif
 
-- 
2.4.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 2/4] mingw: avoid problems for using %zd (C99)

2015-10-07 Thread Fabiano Fidêncio
Otherwise the following problem can be faced:
src/vscclient.c: In function 'connect_to_qemu':
src/vscclient.c:642:16: error: unknown conversion type character 'z' in format 
[-Werror=format=]
 printf("Connected (sizeof Header=%zd)!\n", sizeof(VSCMsgHeader));
 ^
src/vscclient.c:642:16: error: too many arguments for format 
[-Werror=format-extra-args]
---
 Makefile.am | 4 
 1 file changed, 4 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index f106bd9..eea8daa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,6 +48,10 @@ vscclient_SOURCES = src/vscclient.c
 vscclient_LDADD = libcacard.la $(CACARD_LIBS) $(GTHREAD_LIBS)
 vscclient_CFLAGS = $(AM_CPPFLAGS) $(GTHREAD_CFLAGS)
 
+#if OW_WIN32
+vscclient_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
+#endif
+
 AM_CPPFLAGS = $(CACARD_CFLAGS) $(WARN_CFLAGS)
 EXTRA_DIST =   \
NEWS\
-- 
2.4.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 1/4] mingw: remove cac_is_cac_card from libcacard.syms

2015-10-07 Thread Fabiano Fidêncio
Without removing cac_is_cac_card the following error can be faced:

Cannot export cac_is_cac_card: symbol not defined
collect2: error: ld returned 1 exit status

Found a not so old QEMU thread about this:
https://www.mail-archive.com/qemu-devel%40nongnu.org/msg291698.html
---
 src/libcacard.syms | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/libcacard.syms b/src/libcacard.syms
index 1697515..2f9d423 100644
--- a/src/libcacard.syms
+++ b/src/libcacard.syms
@@ -1,5 +1,4 @@
 cac_card_init
-cac_is_cac_card
 vcard_add_applet
 vcard_apdu_delete
 vcard_apdu_new
-- 
2.4.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [ovirt-devel] ovirt-guest-agent behavior on disconnect

2015-10-07 Thread Vinzenz Feenstra

On 10/07/2015 02:52 PM, David Mansfield wrote:



On 10/01/2015 02:47 AM, Vinzenz Feenstra wrote:

On 09/30/2015 10:03 PM, Barak Azulay wrote:



Barak

On Sep 30, 2015, at 10:04, Michal Skrivanek
<michal.skriva...@redhat.com> 
wrote:




On Sep 25, 2015, at 19:40 , David Mansfield
<ov...@dm.cobite.com> wrote:


[cross-posted to de...@ovirt.org and
spice-devel@lists.freedesktop.org
]

Hi oVirt Devs,

I'm here from the spice-devel list where we were discussing some
changes to the behavior of the spice guest agent reacting to a user
disconnect (of the spice console).


Hi David,
great, any enhancement is good! Vinzenz, please add more details to
my guesses below:)



Some information about how the ovirt-guest-agent works would be
informative if you can spare a minute.

The functionality being discussed is locking the user session in the
VM when the user disconnects from spice (either intentionally or
unintentionally).


What OSs are we talking about (the behavior is significantly different
and each pose different challenges.




Also, peripherally, how does oVirt ensure secure access by
authorized users of a VM and prevent "over-the-shoulder" snooping
(spice graphics session stealing) or other forms of information leak
from a VM shared by multiple users.


We have several mechanisms to ensure that:
1 - ticketing system managed by the engine, so permissions are checked
on the ovirt-engine, if a user has permissions to connect to the vm
than the engines sends vdsm the ticket (and it sets the ticket to the
spice server ... Through libvirt), and than the client receives this
ticket to present to the spice server on connect (of course this
ticket has time expiration)
2 - every time the client disconnects we receive an event and
immediately send lock desktop command to the guest (through the
ovirt-guest-agent). This is implemented both for win and Linux but for
a Linux guest for that to work one must work on run level 5.
3 - anyway since this is racy , in order to avoid session theft we do
not allow a second user to connect to a vm when the first user
disconnected, the second user will be able to login only after the cm
was rebooted.






So here are some questions:

Can a VM be "shared" by multiple users in oVirt at all? Are there
known security issues that would make this a non-recommended or
fundamentally un-securable setup?


normally no, there is a semi-supported hook to allow that with VNC
(and even that is slightly broken IIRC at the moment), but in general
we do want so support that for specific usecases


The question is not clear enough,

In case you mean simultaneously (2 users) than the above answer is
relevant.
In case you mean sequential ... Than the answer is explained above ,
and yes we allow a vm to be shared among several users or groups.






Does the oVirt agent lock the session on disconnect? Always /
unconditionally?


IIRC It will always try to lock, but we can not guarantee that the
operation actually succeeded (long story ...)



If it's configurable, where does the configuration reside - in the
vm guest, on the vm host (/engine) or on the client?


it's oVirt management UI configuration, it changes the host's
behavior on spice disconnect per VM



Does the oVirt agent lock all sessions or the current active session?


just the active AFAIK


On windows its implemented only for desktop OSs (... Xp ...win7 ...)
we lock only the interactive session, for win server this is not
supported , in fact we do not install the SSO mechanism at all because
it works differently for those OSs (w2k3 , 2008, 2010)

On Linux it's a bit more complicated , but we find the session of the
user we know connected to the vm ... And send the lock command.

Actually not completely correct, currently we only lock the first, we
don't try to match the user, the current assumption is that we only
allow one user per VM therefore there can't be more than one active 
session.

That said, that's how it is currently implemented. Not that this is the
best way.



As explained above since there is no guarantee for that to succeed
than we do not allow other users to connect till the cm is rebooted.






How does it lock the sessions? I've looked at the code and it
appears '/usr/bin/loginctl lock-sessions' is being used on machines
it's provided on and something more complicated on older boxes.
Does the user have a way to customize this behavior? and if so, is
it VM guest, VM host or client configuration?



AFAIR this is not configurable ... But Vinzenz should be able to give
an accurate answer

The only configuration you can do as of ovirt/RHEV 3.6 is that you are
now able to say to perform one of the following actions on console
disconnect:
- Lock the screen
- Logout the current user
- Reboot the VM
- Shutdown the VM
- Do nothing



Is the console disconnect triggered by a libvirt graphics even

Re: [Spice-devel] [PATCH 4/4] mingw: include and link to ws2_32

2015-10-07 Thread Frediano Ziglio
> 
> Otherwise the following errors can be faced:
> src/vscclient-vscclient.o: In function `send_msg':
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:122: undefined
> reference to `_imp__htonl@4'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:124: undefined
> reference to `_imp__htonl@4'
> src/vscclient-vscclient.o: In function `on_host_init':
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:260: undefined
> reference to `_imp__ntohl@4'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:273: undefined
> reference to `_imp__ntohl@4'
> src/vscclient-vscclient.o: In function `do_socket_read':
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:332: undefined
> reference to `_imp__ntohl@4'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:333: undefined
> reference to `_imp__ntohl@4'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:334: undefined
> reference to `_imp__ntohl@4'
> src/vscclient-vscclient.o: In function `connect_to_qemu':
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:615: undefined
> reference to `_imp__socket@12'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:628: undefined
> reference to `_imp__getaddrinfo@16'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:636: undefined
> reference to `_imp__connect@12'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:645: undefined
> reference to `_imp__freeaddrinfo@4'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:650: undefined
> reference to `_imp__freeaddrinfo@4'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:652: undefined
> reference to `_imp__closesocket@4'
> src/vscclient-vscclient.o: In function `main':
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:676: undefined
> reference to `_imp__WSAStartup@8'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:677: undefined
> reference to `_imp__WSAGetLastError@0'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:778: undefined
> reference to `_imp__htonl@4'
> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:791: undefined
> reference to `_imp__closesocket@4'
> collect2: error: ld returned 1 exit status
> Makefile:656: recipe for target 'vscclient.exe' failed
> make[2]: *** [vscclient.exe] Error 1
> make[2]: Leaving directory '/home/ffidenci/src/upstream/libcacard'
> Makefile:774: recipe for target 'all-recursive' failed
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory '/home/ffidenci/src/upstream/libcacard'
> Makefile:495: recipe for target 'all' failed
> make: *** [all] Error 2
> ---
>  Makefile.am | 4 
>  src/vscclient.c | 1 +
>  2 files changed, 5 insertions(+)
> 
> diff --git a/Makefile.am b/Makefile.am
> index eea8daa..bbe8e2e 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -40,6 +40,10 @@ libcacard_la_LDFLAGS = 
> \
>   $(WARN_LDFLAGS)
>   $(NULL)
>  
> +#if OS_WIN32
> +libcacard_la_LIBADD += -lws2_32
> +#endif
> +
>  pkgconfigdir = $(libdir)/pkgconfig
>  pkgconfig_DATA = libcacard.pc
>  
> diff --git a/src/vscclient.c b/src/vscclient.c
> index 24015ef..fea5aea 100644
> --- a/src/vscclient.c
> +++ b/src/vscclient.c
> @@ -21,6 +21,7 @@
>  #define closesocket(x) close(x)
>  #else
>  #include 
> +#include 
>  #include 
>  #endif
>  

I don't remember why but is better to include ws2tcpip.h after winsock2.h

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 1/2] cfg.mk: Remove obsolete references to client files

2015-10-07 Thread Christophe Fergeau
The client/ directory was removed a while ago, but cfg.mk still has
mentions of files in client/.
---
 cfg.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 7cf1d58..3d49775 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -136,14 +136,14 @@ exclude_file_name_regexp--sc_preprocessor_indentation = 
^*/*.[ch]
 
 exclude_file_name_regexp--sc_const_long_option = 
^common/win/my_getopt-1.5/getopt.(3|txt)
 
-exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
^common/win/my_getopt-1.5/getopt.(3|txt)|client/windows/(spice.ico|sticky_alt.bmp)|client/tests/controller_test/build|docs/.*.odt|server/tests/base_test.ppm
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
^common/win/my_getopt-1.5/getopt.(3|txt)|docs/.*.odt|server/tests/base_test.ppm
 
 # XXX this should be removed & all cases fixde
 exclude_file_name_regexp--sc_prohibit_have_config_h = ^*/.*(c|cpp|h)
 
-exclude_file_name_regexp--sc_require_config_h = 
^client/gui/.*\.(ttf|font)\.c|client/gui/taharez.*\.c|client/x11/images/(alt_image|red_icon)\.c|common/win/my_getopt-1.5
+exclude_file_name_regexp--sc_require_config_h = common/win/my_getopt-1.5
 
-exclude_file_name_regexp--sc_require_config_h_first = 
^client/gui/.*\.(ttf|font)\.c|client/gui/taharez.*\.c|client/x11/images/(alt_image|red_icon)\.c|common/win/my_getopt-1.5
+exclude_file_name_regexp--sc_require_config_h_first = common/win/my_getopt-1.5
 
 exclude_file_name_regexp--sc_trailing_blank = 
^common/win/my_getopt-1.5/getopt.3|docs/.*.odt
 
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 2/2] build-sys: Remove client check from configure.ac

2015-10-07 Thread Christophe Fergeau
configure.ac is checking for pyparsing availability if
client/generated_marshallers.c is missing. The client/ code is gone, and
the python modules checks are done in spice-common/configure.ac
nowadays, so we can get rid of this check.
---
 configure.ac | 10 --
 1 file changed, 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8ab4c4a..283bdb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,16 +130,6 @@ if test "x$enable_celt051" = "xyes"; then
 PKG_CHECK_MODULES(CELT051, celt051 >= 0.5.1.1, 
AS_VAR_APPEND([SPICE_REQUIRES], [" celt051 >= 0.5.1.1"]))
 fi
 
-if test ! -e client/generated_marshallers.cpp; then
-AC_MSG_CHECKING([for pyparsing python module])
-echo "import pyparsing" | ${PYTHON} - >/dev/null 2>&1
-if test $? -ne 0 ; then
-AC_MSG_RESULT([not found])
-AC_MSG_ERROR([pyparsing python module is required to compile this package])
-fi
-AC_MSG_RESULT([found])
-fi
-
 PKG_CHECK_MODULES(SSL, openssl)
 AC_SUBST(SSL_CFLAGS)
 AC_SUBST(SSL_LIBS)
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-common] build-sys: Use ${PKG_CONFIG} rather than pkg-config

2015-10-07 Thread Christophe Fergeau
In mingw builds, this will be set to mingw-pkg-config rather than the
host system one. This is fixing a build failure on mingw when
spice-protocol is only installed in the mingw prefix and not
system-wide.
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 98311bf..6516c20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ SPICE_CHECK_SYSDEPS
 
 # Checks for libraries
 PKG_CHECK_MODULES([PROTOCOL], [spice-protocol >= 0.12.10])
-CODE_GENERATOR_BASEDIR=`pkg-config --variable=codegendir spice-protocol`
+CODE_GENERATOR_BASEDIR=`${PKG_CONFIG} --variable=codegendir spice-protocol`
 AC_SUBST([CODE_GENERATOR_BASEDIR])
 
 SPICE_CHECK_PYTHON_MODULES()
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH 1/2] cfg.mk: Remove obsolete references to client files

2015-10-07 Thread Fabiano Fidêncio
On Wed, Oct 7, 2015 at 4:24 PM, Christophe Fergeau  wrote:
> The client/ directory was removed a while ago, but cfg.mk still has
> mentions of files in client/.
> ---
>  cfg.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/cfg.mk b/cfg.mk
> index 7cf1d58..3d49775 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -136,14 +136,14 @@ exclude_file_name_regexp--sc_preprocessor_indentation = 
> ^*/*.[ch]
>
>  exclude_file_name_regexp--sc_const_long_option = 
> ^common/win/my_getopt-1.5/getopt.(3|txt)
>
> -exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
> ^common/win/my_getopt-1.5/getopt.(3|txt)|client/windows/(spice.ico|sticky_alt.bmp)|client/tests/controller_test/build|docs/.*.odt|server/tests/base_test.ppm
> +exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
> ^common/win/my_getopt-1.5/getopt.(3|txt)|docs/.*.odt|server/tests/base_test.ppm
>
>  # XXX this should be removed & all cases fixde
>  exclude_file_name_regexp--sc_prohibit_have_config_h = ^*/.*(c|cpp|h)
>
> -exclude_file_name_regexp--sc_require_config_h = 
> ^client/gui/.*\.(ttf|font)\.c|client/gui/taharez.*\.c|client/x11/images/(alt_image|red_icon)\.c|common/win/my_getopt-1.5
> +exclude_file_name_regexp--sc_require_config_h = common/win/my_getopt-1.5
>
> -exclude_file_name_regexp--sc_require_config_h_first = 
> ^client/gui/.*\.(ttf|font)\.c|client/gui/taharez.*\.c|client/x11/images/(alt_image|red_icon)\.c|common/win/my_getopt-1.5
> +exclude_file_name_regexp--sc_require_config_h_first = 
> common/win/my_getopt-1.5
>
>  exclude_file_name_regexp--sc_trailing_blank = 
> ^common/win/my_getopt-1.5/getopt.3|docs/.*.odt
>
> --
> 2.5.0
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

ACK both patches!
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH 4/4] mingw: include and link to ws2_32

2015-10-07 Thread Fabiano Fidêncio
On Wed, Oct 7, 2015 at 3:14 PM, Frediano Ziglio  wrote:
>>
>> Otherwise the following errors can be faced:
>> src/vscclient-vscclient.o: In function `send_msg':
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:122: undefined
>> reference to `_imp__htonl@4'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:124: undefined
>> reference to `_imp__htonl@4'
>> src/vscclient-vscclient.o: In function `on_host_init':
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:260: undefined
>> reference to `_imp__ntohl@4'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:273: undefined
>> reference to `_imp__ntohl@4'
>> src/vscclient-vscclient.o: In function `do_socket_read':
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:332: undefined
>> reference to `_imp__ntohl@4'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:333: undefined
>> reference to `_imp__ntohl@4'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:334: undefined
>> reference to `_imp__ntohl@4'
>> src/vscclient-vscclient.o: In function `connect_to_qemu':
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:615: undefined
>> reference to `_imp__socket@12'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:628: undefined
>> reference to `_imp__getaddrinfo@16'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:636: undefined
>> reference to `_imp__connect@12'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:645: undefined
>> reference to `_imp__freeaddrinfo@4'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:650: undefined
>> reference to `_imp__freeaddrinfo@4'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:652: undefined
>> reference to `_imp__closesocket@4'
>> src/vscclient-vscclient.o: In function `main':
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:676: undefined
>> reference to `_imp__WSAStartup@8'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:677: undefined
>> reference to `_imp__WSAGetLastError@0'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:778: undefined
>> reference to `_imp__htonl@4'
>> /home/ffidenci/src/upstream/libcacard/src/vscclient.c:791: undefined
>> reference to `_imp__closesocket@4'
>> collect2: error: ld returned 1 exit status
>> Makefile:656: recipe for target 'vscclient.exe' failed
>> make[2]: *** [vscclient.exe] Error 1
>> make[2]: Leaving directory '/home/ffidenci/src/upstream/libcacard'
>> Makefile:774: recipe for target 'all-recursive' failed
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory '/home/ffidenci/src/upstream/libcacard'
>> Makefile:495: recipe for target 'all' failed
>> make: *** [all] Error 2
>> ---
>>  Makefile.am | 4 
>>  src/vscclient.c | 1 +
>>  2 files changed, 5 insertions(+)
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index eea8daa..bbe8e2e 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -40,6 +40,10 @@ libcacard_la_LDFLAGS =
>>  \
>>   $(WARN_LDFLAGS)
>>   $(NULL)
>>
>> +#if OS_WIN32
>> +libcacard_la_LIBADD += -lws2_32
>> +#endif
>> +
>>  pkgconfigdir = $(libdir)/pkgconfig
>>  pkgconfig_DATA = libcacard.pc
>>
>> diff --git a/src/vscclient.c b/src/vscclient.c
>> index 24015ef..fea5aea 100644
>> --- a/src/vscclient.c
>> +++ b/src/vscclient.c
>> @@ -21,6 +21,7 @@
>>  #define closesocket(x) close(x)
>>  #else
>>  #include 
>> +#include 
>>  #include 
>>  #endif
>>
>
> I don't remember why but is better to include ws2tcpip.h after winsock2.h

Okay, locally fixed, thanks!
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH 2/2] build-sys: Remove client check from configure.ac

2015-10-07 Thread Frediano Ziglio
> 
> configure.ac is checking for pyparsing availability if
> client/generated_marshallers.c is missing. The client/ code is gone, and
> the python modules checks are done in spice-common/configure.ac
> nowadays, so we can get rid of this check.

I would also add that the code is checking for a .cpp file so I'm sure this 
code is not triggered

Acked!

Frediano


> ---
>  configure.ac | 10 --
>  1 file changed, 10 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 8ab4c4a..283bdb8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -130,16 +130,6 @@ if test "x$enable_celt051" = "xyes"; then
>  PKG_CHECK_MODULES(CELT051, celt051 >= 0.5.1.1,
>  AS_VAR_APPEND([SPICE_REQUIRES], [" celt051 >= 0.5.1.1"]))
>  fi
>  
> -if test ! -e client/generated_marshallers.cpp; then
> -AC_MSG_CHECKING([for pyparsing python module])
> -echo "import pyparsing" | ${PYTHON} - >/dev/null 2>&1
> -if test $? -ne 0 ; then
> -AC_MSG_RESULT([not found])
> -AC_MSG_ERROR([pyparsing python module is required to compile this
> package])
> -fi
> -AC_MSG_RESULT([found])
> -fi
> -
>  PKG_CHECK_MODULES(SSL, openssl)
>  AC_SUBST(SSL_CFLAGS)
>  AC_SUBST(SSL_LIBS)
> --
> 2.5.0
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-common] build-sys: Use ${PKG_CONFIG} rather than pkg-config

2015-10-07 Thread Jonathon Jongsma
ACK


On Wed, 2015-10-07 at 16:27 +0200, Christophe Fergeau wrote:
> In mingw builds, this will be set to mingw-pkg-config rather than the
> host system one. This is fixing a build failure on mingw when
> spice-protocol is only installed in the mingw prefix and not
> system-wide.
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 98311bf..6516c20 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -29,7 +29,7 @@ SPICE_CHECK_SYSDEPS
>  
>  # Checks for libraries
>  PKG_CHECK_MODULES([PROTOCOL], [spice-protocol >= 0.12.10])
> -CODE_GENERATOR_BASEDIR=`pkg-config --variable=codegendir spice-protocol`
> +CODE_GENERATOR_BASEDIR=`${PKG_CONFIG} --variable=codegendir spice-protocol`
>  AC_SUBST([CODE_GENERATOR_BASEDIR])
>  
>  SPICE_CHECK_PYTHON_MODULES()


___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-common] build-sys: Use ${PKG_CONFIG} rather than pkg-config

2015-10-07 Thread Christophe Fergeau
On Wed, Oct 07, 2015 at 10:34:11AM -0500, Jonathon Jongsma wrote:
> ACK

Thanks, pushed.

Christophe


signature.asc
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH 1/2] cfg.mk: Remove obsolete references to client files

2015-10-07 Thread Christophe Fergeau
On Wed, Oct 07, 2015 at 04:55:12PM +0200, Fabiano Fidêncio wrote:
> On Wed, Oct 7, 2015 at 4:24 PM, Christophe Fergeau  
> wrote:
> > The client/ directory was removed a while ago, but cfg.mk still has
> > mentions of files in client/.
> > ---
> >  cfg.mk | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/cfg.mk b/cfg.mk
> > index 7cf1d58..3d49775 100644
> > --- a/cfg.mk
> > +++ b/cfg.mk
> > @@ -136,14 +136,14 @@ exclude_file_name_regexp--sc_preprocessor_indentation 
> > = ^*/*.[ch]
> >
> >  exclude_file_name_regexp--sc_const_long_option = 
> > ^common/win/my_getopt-1.5/getopt.(3|txt)
> >
> > -exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
> > ^common/win/my_getopt-1.5/getopt.(3|txt)|client/windows/(spice.ico|sticky_alt.bmp)|client/tests/controller_test/build|docs/.*.odt|server/tests/base_test.ppm
> > +exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
> > ^common/win/my_getopt-1.5/getopt.(3|txt)|docs/.*.odt|server/tests/base_test.ppm
> >
> >  # XXX this should be removed & all cases fixde
> >  exclude_file_name_regexp--sc_prohibit_have_config_h = ^*/.*(c|cpp|h)
> >
> > -exclude_file_name_regexp--sc_require_config_h = 
> > ^client/gui/.*\.(ttf|font)\.c|client/gui/taharez.*\.c|client/x11/images/(alt_image|red_icon)\.c|common/win/my_getopt-1.5
> > +exclude_file_name_regexp--sc_require_config_h = common/win/my_getopt-1.5
> >
> > -exclude_file_name_regexp--sc_require_config_h_first = 
> > ^client/gui/.*\.(ttf|font)\.c|client/gui/taharez.*\.c|client/x11/images/(alt_image|red_icon)\.c|common/win/my_getopt-1.5
> > +exclude_file_name_regexp--sc_require_config_h_first = 
> > common/win/my_getopt-1.5
> >
> >  exclude_file_name_regexp--sc_trailing_blank = 
> > ^common/win/my_getopt-1.5/getopt.3|docs/.*.odt
> >
> > --
> > 2.5.0
> >
> > ___
> > Spice-devel mailing list
> > Spice-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
> ACK both patches!

Actually I'll squash this one in a bigger cleanup, there are more
obsolete files listed in cfg.mk.

Christophe


signature.asc
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH 2/2] build-sys: Remove client check from configure.ac

2015-10-07 Thread Christophe Fergeau
On Wed, Oct 07, 2015 at 10:57:38AM -0400, Frediano Ziglio wrote:
> > 
> > configure.ac is checking for pyparsing availability if
> > client/generated_marshallers.c is missing. The client/ code is gone, and
> > the python modules checks are done in spice-common/configure.ac
> > nowadays, so we can get rid of this check.
> 
> I would also add that the code is checking for a .cpp file so I'm sure this 
> code is not triggered

Ah right, I'll change the changelog to mention
generated_marshallers.cpp, not .c

Christophe


signature.asc
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] syntax-check fixes

2015-10-07 Thread Christophe Fergeau
Hey,

spice has a 'make syntax-check' rule which runs various consistency checks on
the codebase. It hadn't been run in a while, and was not passing successfully.
This series fixes that.

Christophe

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 08/10] syntax-check: Clean-up exception rules

2015-10-07 Thread Christophe Fergeau
Some files no longer exists, some exceptions are no longer needed, ...
---
 cfg.mk | 13 +++--
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 7cf1d58..00ef691 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -130,22 +130,15 @@ sc_check_author_list:
 
 
 # XXX some of these tools/ programs probably ought to bindtextdomain ?
-exclude_file_name_regexp--sc_bindtextdomain = 
^server/tests|common/region.c|common/win/my_getopt-1.5/main.c|tools/(bitmap_to_c.c|icon_to_c.c|reds_stat.c)
+exclude_file_name_regexp--sc_bindtextdomain = 
^server/tests|common/region.c|tools/(bitmap_to_c.c|icon_to_c.c|reds_stat.c)
 
 exclude_file_name_regexp--sc_preprocessor_indentation = ^*/*.[ch]
 
-exclude_file_name_regexp--sc_const_long_option = 
^common/win/my_getopt-1.5/getopt.(3|txt)
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
docs/.*.odt|server/tests/base_test.ppm
 
-exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
^common/win/my_getopt-1.5/getopt.(3|txt)|client/windows/(spice.ico|sticky_alt.bmp)|client/tests/controller_test/build|docs/.*.odt|server/tests/base_test.ppm
-
-# XXX this should be removed & all cases fixde
+# XXX this should be removed & all cases fixed
 exclude_file_name_regexp--sc_prohibit_have_config_h = ^*/.*(c|cpp|h)
 
-exclude_file_name_regexp--sc_require_config_h = 
^client/gui/.*\.(ttf|font)\.c|client/gui/taharez.*\.c|client/x11/images/(alt_image|red_icon)\.c|common/win/my_getopt-1.5
-
-exclude_file_name_regexp--sc_require_config_h_first = 
^client/gui/.*\.(ttf|font)\.c|client/gui/taharez.*\.c|client/x11/images/(alt_image|red_icon)\.c|common/win/my_getopt-1.5
-
-exclude_file_name_regexp--sc_trailing_blank = 
^common/win/my_getopt-1.5/getopt.3|docs/.*.odt
 
 exclude_file_name_regexp--sc_unmarked_diagnostics = ^.*\.(c|py|h)
 
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 07/10] syntax-check: Remove unused #include

2015-10-07 Thread Christophe Fergeau
---
 server/tests/replay.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/server/tests/replay.c b/server/tests/replay.c
index 220bfe7..d08e92c 100644
--- a/server/tests/replay.c
+++ b/server/tests/replay.c
@@ -8,7 +8,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 05/10] syntax-check: Don't use tabs for indentation

2015-10-07 Thread Christophe Fergeau
---
 server/red_worker.c  |  2 +-
 server/reds_stream.c | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index babb597..011c688 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -12117,7 +12117,7 @@ static void red_init(RedWorker *worker, WorkerInitData 
*init_data)
 if (worker->record_fd == NULL) {
 spice_error("failed to open recording file %s\n", record_filename);
 }
-   if (fwrite(header, sizeof(header)-1, 1, worker->record_fd) != 1) {
+if (fwrite(header, sizeof(header)-1, 1, worker->record_fd) != 1) {
 spice_error("failed to write replay header");
 }
 }
diff --git a/server/reds_stream.c b/server/reds_stream.c
index 1a595b2..5f9890e 100644
--- a/server/reds_stream.c
+++ b/server/reds_stream.c
@@ -448,16 +448,16 @@ static void async_read_handler(G_GNUC_UNUSED int fd,
 break;
 default:
 async_read_clear_handlers(async);
-   if (async->error) {
+if (async->error) {
 async->error(async->opaque, errno);
-   }
+}
 return;
 }
 } else {
 async_read_clear_handlers(async);
-   if (async->error) {
-   async->error(async->opaque, 0);
-   }
+if (async->error) {
+async->error(async->opaque, 0);
+}
 return;
 }
 } else {
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 06/10] syntax-check: Add missing #include

2015-10-07 Thread Christophe Fergeau
---
 server/spice_bitmap_utils.c | 3 +++
 server/spice_image_cache.c  | 3 +++
 server/tests/replay.c   | 4 
 3 files changed, 10 insertions(+)

diff --git a/server/spice_bitmap_utils.c b/server/spice_bitmap_utils.c
index aa7d71b..ddbd2a9 100644
--- a/server/spice_bitmap_utils.c
+++ b/server/spice_bitmap_utils.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
 #include 
 
 #include "common/log.h"
diff --git a/server/spice_image_cache.c b/server/spice_image_cache.c
index 291094c..c20eac8 100644
--- a/server/spice_image_cache.c
+++ b/server/spice_image_cache.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
 #include "spice_image_cache.h"
 
 static ImageCacheItem *image_cache_find(ImageCache *cache, uint64_t id)
diff --git a/server/tests/replay.c b/server/tests/replay.c
index a17037c..220bfe7 100644
--- a/server/tests/replay.c
+++ b/server/tests/replay.c
@@ -1,6 +1,10 @@
 /* Replay a previously recorded file (via SPICE_WORKER_RECORD_FILENAME)
  */
 
+#ifdef HAVE_CONFIG_H
+#include 
+#endif
+
 #include 
 #include 
 #include 
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 01/10] syntax-check: Add missing AUTHORS

2015-10-07 Thread Christophe Fergeau
---
 .mailmap |  8 ++--
 AUTHORS  | 26 +-
 2 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/.mailmap b/.mailmap
index 4daed49..4a68752 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,5 +1,9 @@
  
- 
- 
+ 
  
+ 
+ 
+ 
+ 
  
+ 
diff --git a/AUTHORS b/AUTHORS
index a516469..de6d8a9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,42 +3,58 @@
 
 The current active Spice maintainers are
 
-Alon Levy 
 Christophe Fergeau 
-Gerd Hoffmann 
-Marc-André Lureau 
+Frediano Ziglio 
+Jonathon Jongsma 
 Uri Lublin 
-Yonit Halperin 
 
 Previous Spice maintainers were
 
+Alon Levy 
+Gerd Hoffmann 
 Izik Eidus 
+Marc-André Lureau 
 Yaniv Kamay  (Original project author)
+Yonit Halperin 
 
 Patches also contributed by
 
 Alexander Larsson 
+Alexander Tsoy 
 Andrew Eikum 
 Aric Stewart 
 Arnon Gilboa 
+Axel Lin 
+소병철 
+Cédric Bosdonnat 
+Christian Ruppert 
+Cole Robinson 
 Daniel P. Berrange 
 Dan Kenigsberg 
 Dan McGee 
 David Gibson 
+David Jaša 
+Dunrong Huang 
 Erlon Cruz 
 Fabiano Fidêncio 
-Jeremy White 
+Francois Gouget 
 Gal Hammer 
 Hans de Goede 
+Javier Celaya 
+Jeremy White 
 Jürg Billeter 
 Liang Guo 
 Michael Tokarev 
 Nahum Shalman 
 Nikolay Orlyuk 
+Pavel Grunt 
 Peter Robinson 
+Sandy Stutsman 
 Søren Sandmann Pedersen 
 Thomas Tyminski 
 Tiziano Mueller 
+Victor Toso 
+Wang Qiang 
 Yann E. MORIN 
 Zeeshan Ali (Khattak) 
 
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 02/10] syntax-check: manual: Remove duplicate word

2015-10-07 Thread Christophe Fergeau
---
 docs/manual/manual.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/manual/manual.txt b/docs/manual/manual.txt
index edbb48f..8d06aa2 100644
--- a/docs/manual/manual.txt
+++ b/docs/manual/manual.txt
@@ -169,7 +169,7 @@ Client mouse::
 Not captured and is used as the effective pointing device. To enable
 client mouse, the VDI host application must register an absolute
 pointing device (e.g. USB tablet in QEMU). This mode is appropriate
-for WAN or or for a loaded server, since cursor has smooth motion and
+for WAN or for a loaded server, since cursor has smooth motion and
 responsiveness. However, the cursor might lose synchronization
 (position and shape) for a while.
 
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 09/10] syntax-check: Exclude png files from sc_prohibit_empty_lines_at_EOF

2015-10-07 Thread Christophe Fergeau
---
 cfg.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 00ef691..1bf60c9 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -134,7 +134,7 @@ exclude_file_name_regexp--sc_bindtextdomain = 
^server/tests|common/region.c|tool
 
 exclude_file_name_regexp--sc_preprocessor_indentation = ^*/*.[ch]
 
-exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
docs/.*.odt|server/tests/base_test.ppm
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = 
docs/.*.odt|server/tests/base_test.ppm|docs/manual/images/.*.png
 
 # XXX this should be removed & all cases fixed
 exclude_file_name_regexp--sc_prohibit_have_config_h = ^*/.*(c|cpp|h)
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 04/10] syntax-check: Don't cast free() arguments

2015-10-07 Thread Christophe Fergeau
---
 server/red_replay_qxl.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/server/red_replay_qxl.c b/server/red_replay_qxl.c
index ad1a8fd..7dcfc16 100644
--- a/server/red_replay_qxl.c
+++ b/server/red_replay_qxl.c
@@ -439,9 +439,9 @@ static void red_replay_image_free(SpiceReplay *replay, 
QXLPHYSICAL p, uint32_t f
 
 switch (qxl->descriptor.type) {
 case SPICE_IMAGE_TYPE_BITMAP:
-free((void*)qxl->bitmap.palette);
+free(qxl->bitmap.palette);
 if (qxl->bitmap.flags & QXL_BITMAP_DIRECT) {
-free((void*)qxl->bitmap.data);
+free(qxl->bitmap.data);
 } else {
 red_replay_data_chunks_free(replay, (void*)qxl->bitmap.data, 0);
 }
@@ -640,7 +640,7 @@ static void red_replay_stroke_free(SpiceReplay *replay, 
QXLStroke *qxl, uint32_t
 {
 red_replay_path_free(replay, qxl->path);
 if (qxl->attr.flags & SPICE_LINE_FLAGS_STYLED) {
-free((void*)qxl->attr.style);
+free(qxl->attr.style);
 }
 red_replay_brush_free(replay, &qxl->brush, flags);
 }
@@ -772,9 +772,9 @@ static void red_replay_composite_ptr(SpiceReplay *replay, 
QXLComposite *qxl, uin
 static void red_replay_composite_free(SpiceReplay *replay, QXLComposite *qxl, 
uint32_t flags)
 {
 red_replay_image_free(replay, qxl->src, flags);
-free((void*)qxl->src_transform);
+free(qxl->src_transform);
 red_replay_image_free(replay, qxl->mask, flags);
-free((void*)qxl->mask_transform);
+free(qxl->mask_transform);
 
 }
 
@@ -1048,7 +1048,7 @@ static void red_replay_surface_cmd_free(SpiceReplay 
*replay, QXLSurfaceCmd *qxl)
 replay_id_free(replay, qxl->surface_id);
 }
 
-free((void*)qxl->u.surface_create.data);
+free(qxl->u.surface_create.data);
 free(qxl);
 }
 
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 10/10] Add missing license headers

2015-10-07 Thread Christophe Fergeau
---
 server/char_device.h| 17 +
 server/dispatcher.h | 17 +
 server/main_dispatcher.c| 17 +
 server/main_dispatcher.h| 17 +
 server/red_time.h   | 17 +
 server/reds-private.h   | 17 +
 server/spice-experimental.h | 17 +
 server/spice_bitmap_utils.c | 17 +
 server/spice_image_cache.c  | 17 +
 server/spice_image_cache.h  | 17 +
 server/spice_server_utils.h | 17 +
 server/tests/basic_event_loop.c | 17 +
 server/tests/basic_event_loop.h | 17 +
 server/tests/replay.c   | 18 ++
 server/tests/test_display_base.c| 17 +
 server/tests/test_display_base.h| 17 +
 server/tests/test_display_no_ssl.c  | 17 +
 server/tests/test_display_resolution_changes.c  | 17 +
 server/tests/test_display_streaming.c   | 17 +
 server/tests/test_display_width_stride.c| 17 +
 server/tests/test_empty_success.c   | 17 +
 server/tests/test_fail_on_null_core_interface.c | 17 +
 server/tests/test_just_sockets_no_ssl.c | 17 +
 server/tests/test_playback.c| 17 +
 server/tests/test_two_servers.c | 17 +
 server/tests/test_util.h| 17 +
 server/tests/test_vdagent.c | 17 +
 27 files changed, 460 insertions(+)

diff --git a/server/char_device.h b/server/char_device.h
index 3dbc761..55d1ee6 100644
--- a/server/char_device.h
+++ b/server/char_device.h
@@ -1,3 +1,20 @@
+/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/*
+   Copyright (C) 2009-2015 Red Hat, Inc.
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   This library 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see .
+*/
 #ifndef __CHAR_DEVICE_H__
 #define __CHAR_DEVICE_H__
 
diff --git a/server/dispatcher.h b/server/dispatcher.h
index 8cfa1d4..c3e7c74 100644
--- a/server/dispatcher.h
+++ b/server/dispatcher.h
@@ -1,3 +1,20 @@
+/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/*
+   Copyright (C) 2009-2015 Red Hat, Inc.
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   This library 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see .
+*/
 #ifndef DISPATCHER_H
 #define DISPATCHER_H
 
diff --git a/server/main_dispatcher.c b/server/main_dispatcher.c
index dbe1037..6ad9d89 100644
--- a/server/main_dispatcher.c
+++ b/server/main_dispatcher.c
@@ -1,3 +1,20 @@
+/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/*
+   Copyright (C) 2009-2015 Red Hat, Inc.
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   This library 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see .
+*/
 #include 
 #include 
 #include 
diff --git a

[Spice-devel] [PATCH 03/10] syntax-check: Ignore .png files in sc_trailing_blank test

2015-10-07 Thread Christophe Fergeau
---
 maint.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/maint.mk b/maint.mk
index fa2fe74..1eb5217 100644
--- a/maint.mk
+++ b/maint.mk
@@ -696,7 +696,7 @@ sc_require_test_exit_idiom:
  exit 1; } || :;   \
fi
 
-exclude_file_name_regexp--sc_trailing_blank = \.ico$$|\.bmp$$|\.odt$$
+exclude_file_name_regexp--sc_trailing_blank = \.ico$$|\.bmp$$|\.odt$$|\.png$$
 
 sc_trailing_blank:
@prohibit='[ ]$$'   \
-- 
2.5.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH 04/10] syntax-check: Don't cast free() arguments

2015-10-07 Thread Victor Toso
Hi,

On Wed, Oct 07, 2015 at 06:45:11PM +0200, Christophe Fergeau wrote:
> ---
>  server/red_replay_qxl.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/server/red_replay_qxl.c b/server/red_replay_qxl.c
> index ad1a8fd..7dcfc16 100644
> --- a/server/red_replay_qxl.c
> +++ b/server/red_replay_qxl.c
> @@ -439,9 +439,9 @@ static void red_replay_image_free(SpiceReplay *replay, 
> QXLPHYSICAL p, uint32_t f
>  
>  switch (qxl->descriptor.type) {
>  case SPICE_IMAGE_TYPE_BITMAP:
> -free((void*)qxl->bitmap.palette);
> +free(qxl->bitmap.palette);

I'm getting -Werror=int-conversion here (gcc)


red_replay_qxl.c: In function 'red_replay_image_free':
red_replay_qxl.c:442:14: error: passing argument 1 of 'free' makes pointer from 
integer without a cast [-Werror=int-conversion]
 free(qxl->bitmap.palette);
  ^



>  if (qxl->bitmap.flags & QXL_BITMAP_DIRECT) {
> -free((void*)qxl->bitmap.data);
> +free(qxl->bitmap.data);

same.

>  } else {
>  red_replay_data_chunks_free(replay, (void*)qxl->bitmap.data, 0);
>  }
> @@ -640,7 +640,7 @@ static void red_replay_stroke_free(SpiceReplay *replay, 
> QXLStroke *qxl, uint32_t
>  {
>  red_replay_path_free(replay, qxl->path);
>  if (qxl->attr.flags & SPICE_LINE_FLAGS_STYLED) {
> -free((void*)qxl->attr.style);
> +free(qxl->attr.style);

same.

>  }
>  red_replay_brush_free(replay, &qxl->brush, flags);
>  }
> @@ -772,9 +772,9 @@ static void red_replay_composite_ptr(SpiceReplay *replay, 
> QXLComposite *qxl, uin
>  static void red_replay_composite_free(SpiceReplay *replay, QXLComposite 
> *qxl, uint32_t flags)
>  {
>  red_replay_image_free(replay, qxl->src, flags);
> -free((void*)qxl->src_transform);
> +free(qxl->src_transform);
>  red_replay_image_free(replay, qxl->mask, flags);
> -free((void*)qxl->mask_transform);
> +free(qxl->mask_transform);
>

same.

>  }
>
> @@ -1048,7 +1048,7 @@ static void red_replay_surface_cmd_free(SpiceReplay 
> *replay, QXLSurfaceCmd *qxl)
>  replay_id_free(replay, qxl->surface_id);
>  }
>
> -free((void*)qxl->u.surface_create.data);
> +free(qxl->u.surface_create.data);

same.
>  free(qxl);
>  }

cheers,
  Victor Toso
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH 05/10] syntax-check: Don't use tabs for indentation

2015-10-07 Thread Victor Toso
Hi,

On Wed, Oct 07, 2015 at 06:45:12PM +0200, Christophe Fergeau wrote:
> ---
>  server/red_worker.c  |  2 +-
>  server/reds_stream.c | 10 +-
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/server/red_worker.c b/server/red_worker.c
> index babb597..011c688 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -12117,7 +12117,7 @@ static void red_init(RedWorker *worker, 
> WorkerInitData *init_data)
>  if (worker->record_fd == NULL) {
>  spice_error("failed to open recording file %s\n", 
> record_filename);
>  }
> - if (fwrite(header, sizeof(header)-1, 1, worker->record_fd) != 1) {
> +if (fwrite(header, sizeof(header)-1, 1, worker->record_fd) != 1) {
>  spice_error("failed to write replay header");
>  }
>  }
> diff --git a/server/reds_stream.c b/server/reds_stream.c
> index 1a595b2..5f9890e 100644
> --- a/server/reds_stream.c
> +++ b/server/reds_stream.c
> @@ -448,16 +448,16 @@ static void async_read_handler(G_GNUC_UNUSED int fd,
>  break;
>  default:
>  async_read_clear_handlers(async);
> - if (async->error) {
> +if (async->error) {
>  async->error(async->opaque, errno);
> - }
> +}
>  return;
>  }
>  } else {
>  async_read_clear_handlers(async);
> - if (async->error) {
> - async->error(async->opaque, 0);
> - }
> +if (async->error) {
> +async->error(async->opaque, 0);
> +}
>  return;
>  }
>  } else {

Would make sense to remove other tabs as well?


grep -nrIP '\t' server/ --exclude=Makefile*
server/mjpeg_encoder.c:277:  unsigned char ** outbuffer;/* target 
buffer */
server/mjpeg_encoder.c:279:  uint8_t * buffer;  /* start of buffer */
server/mjpeg_encoder.c:337:#define OUTPUT_BUF_SIZE  4096/* choose an 
efficiently fwrite'able size */
server/mjpeg_encoder.c:339:  if (outbuffer == NULL || outsize == NULL) /* 
sanity check */
server/mjpeg_encoder.c:345:  if (cinfo->dest == NULL) { /* first time for this 
JPEG object? */
server/glz_encoder.h:45:NOTE  : currently supports only rgb images in 
which width*bytes_per_pixel = stride OR


We could also have some git-hook to avoid new tab insertions in the
future.

cheers,
  Victor Toso
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] syntax-check fixes

2015-10-07 Thread Victor Toso
Hi!

On Wed, Oct 07, 2015 at 06:45:07PM +0200, Christophe Fergeau wrote:
> Hey,
>
> spice has a 'make syntax-check' rule which runs various consistency checks on
> the codebase. It hadn't been run in a while, and was not passing successfully.
> This series fixes that.
>
> Christophe

Building with --disable-werror make syntax-check worked well here.

Cheers,
  toso
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel