summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* build-sys: Add the SPICE_WARNING() and SPICE_PRINT_MESSAGES m4 macrosFrancois Gouget2015-11-041-0/+21
| | | | | | | | | | A call to SPICE_WARNING() anywhere in the configure file results in the warning being printed at the end of the configure run where it will be be visible. This makes it possible to keep the SPICE_WARNING() calls together with the related feature checks instead of having to put a separate AC_MSG_WARN() call near the end. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
* build-sys: Add missing # to commentChristophe Fergeau2015-11-021-1/+1
| | | | | | SPICE_CHECK_SMARTCARD documentation ends with a '-------' comment, but the # to start the comment is missing, causing a warning message when running configure.
* build-sys: Rename SUPPORT_GL to HAVE_GLChristophe Fergeau2015-10-232-3/+3
| | | | | The other conditionals are using the HAVE_ prefix, using HAVE_GL rather than SUPPORT_GL improves consistency.
* build-sys: Set automake conditional in SPICE_CHECK_SMARTCARDChristophe Fergeau2015-10-231-2/+4
| | | | spice-server will use this.
* build-sys: Fix error in SPICE_CHECK_LZ4 descriptionChristophe Fergeau2015-10-231-1/+1
| | | | This macro does not define a SUPPORT_LZ4 automake conditional.
* build-sys: Add gio-2.0 to SPICE_CHECK_GLIB2Christophe Fergeau2015-10-231-1/+1
| | | | | | GInetAddress is defined in gio, not glib. Not checking for gio-2.0 in SPICE_CHECK_GLIB2 means gio won't be in GLIB2_LIBS, which causes link errors when trying to build spice-server.
* ssl-verify: Changed IPv4 hostname to IPv6Lukas Venhoda2015-10-231-24/+21
| | | | | | | | Change inet_aton function to glib functions. inet_aton only supported IPv4 addresses, and wasn't available on windows machines. GInetAddress functions support IPv6 natively, and requires less boilerplate code then IPv6 gettaddrinfo().
* m4: Require glib version >= 2.22Lukas Venhoda2015-10-231-1/+1
| | | | This is required by the GInetAddress functions.
* ssl-verify: Only check addr length when using IP addrLukas Venhoda2015-10-231-7/+8
| | | | | Only check for address length, when connecting through IP address. It is not used, when connecting through DNS hostname.
* build-sys: Rework SPICE_CHECK_* m4 macrosChristophe Fergeau2015-10-132-56/+40
| | | | | | | | | | | | | | | These macros were automatically appending the needed CFLAGS/LIBS to variables passed as arguments. This is how spice-common uses them, but now how spice-gtk/spice want to use them, and is making the macros more complicated than they could (in particular this makes them use AS_VAR_APPEND). This is also not flexible enough as spice-gtk uses libcacard libraries, while spice-common does not need them. If SPICE_CHECK_SMARTCARD unconditionnally libcacard libraries to the variable spice-common passes it as an argument, we'll end up linking with an unneeded library. This commit removes this automatic appending from the SPICE_CHECK_* macros and moves it to spice-common as it's the only one which needs it.
* build-sys: Use ${PKG_CONFIG} rather than pkg-configChristophe Fergeau2015-10-071-1/+1
| | | | | | | 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.
* Add marshaller test caseChristophe Fergeau2015-09-155-0/+111
| | | | | This allows to test the spice_marshaller_linearize() fix which was sent recently.
* Fix linearization of several marshallers with one itemJavier Celaya2015-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | The linearization optimization that avoids copying only one item must check that there are no further marshallers in the chain. Just to be clear, we are trying to marshall a message like this: message { uint32 data_size; uint64 *data[data_size] @marshall; } SomeData; Where the data field points to an array in dynamic memory. Marshalling and demarshalling functions look good. The marshalling function creates a submarshaller for the data field and links it to the root marshaller. But when it comes to sending the data through the wire, only the data_size field gets sent. We have observed that, in spice_marshaller_linearize, execution enters into the optimization that avoids copying the data when the root marshaller only has one item, but it ignores the following marshallers in the list. Checking if there are more marshallers fixes the problem.
* common: Fix typo in commentFrediano Ziglio2015-08-141-1/+1
| | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* build-sys: Remove code generation files from EXTRA_DISTChristophe Fergeau2015-08-141-8/+0
| | | | | This breaks make distcheck otherwise since commit 7665dcf1 removed these files.
* Remove files moved to spice-protocolFrediano Ziglio2015-08-1113-5987/+1
| | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* Use installed spice-protocol for code generationChristophe Fergeau2015-08-113-30/+27
| | | | | | Now that spice-protocol ships the needed .proto files as well as the corresponding python scripts, spice-common can use these in order to generate the C code for the SPICE (de)marshallers.
* Remove spice-protocol submoduleChristophe Fergeau2015-08-114-7/+1
| | | | | | | | spice-protocol is a separate project which is having releases, so there is no need to have a private spice-protocol copy in each spice-common user, especially as after installation, the system-wide spice-protocol copy will be used instead of the private one the module was built against.
* codegen: ptypes.py: keep attribute names in setsUri Lublin2015-08-041-4/+4
| | | | | | | | | | | | | | | | | | This patch changes the type of 'valid_attributes' and 'attributes_with_arguments'. Both of them are list of different strings and are kept in sets. This was the intention of the original code, but this patch use a specific set([ strings ]) format, instead of { strings }. This fixes the build for me on RHEL-6 (python-2.6.6). Build error is: File "/home/ulublin/git/spice/spice-common/python_modules/ptypes.py", line 67 'end', ^ SyntaxError: invalid syntax
* Update spice-protocol submoduleChristophe Fergeau2015-07-291-0/+0
| | | | | | | | | | Christophe Fergeau (3): Prepare for spice-protocol 0.12.8 release Post-release version bump Rename SpiceImageCompress constants Sandy Stutsman (1): Add QXL_ESCAPE_MONITOR_CONFIG enum
* codegen: Allow to specify C type for index variableFrediano Ziglio2015-07-231-1/+3
| | | | | | | | This is to prepare to generate the wireshark dissector which uses glib types instead of the newer C ones (for compatibility with some compilers). Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* codegen: Check we don't pop too many indexesFrediano Ziglio2015-07-231-0/+1
|
* codegen: Remove old ptr32 attributeFrediano Ziglio2015-07-231-4/+0
| | | | | | This attribute is not used in code. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* codegen: Do some checks on attributesFrediano Ziglio2015-07-231-0/+72
| | | | | | | | | Verify that the attribute is known. This could help for instance to avoid some future typo mistakes. We also now have a list of attributes that we can comment for documentation purpose. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* codegen: Reuse code to fix attribute from prototype fileFrediano Ziglio2015-07-231-16/+16
| | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* codegen: Remove duplicate variable initializationFrediano Ziglio2015-07-231-1/+0
| | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* codegen: Optimize code indentation and avoid a loopFrediano Ziglio2015-07-231-2/+1
| | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* codegen: Fix typo in variable nameFrediano Ziglio2015-07-231-1/+1
| | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* codegen: Simplify if/else blocksFrediano Ziglio2015-07-231-18/+11
| | | | | | Blocks were mainly the same, this reduces the amount of code. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* codegen: Import six module before first useFrediano Ziglio2015-07-231-1/+2
| | | | | | | The module is used in the initial try/except so make sure it is already imported. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* codegen: Fix enums.h generation with python3Christophe Fergeau2015-07-231-2/+2
| | | | | | | | | | | | | | | | | Trying to generate enums.h with python3 results in Traceback (most recent call last): File "./spice_codegen.py", line 217, in <module> write_enums(writer, options.generate_dissector) File "./spice_codegen.py", line 99, in write_enums write_channel_enums(writer, c, False, False) File "./spice_codegen.py", line 17, in write_channel_enums if len(messages) == 0: TypeError: object of type 'filter' has no len() filter() returns an enumerator object in python3 while it used to return a list in python2. Using list(filter()) instead fixes that error. I've checked that the generated enums.h is identical with python2 and python3.
* proto: Remove space before tabChristophe Fergeau2015-07-202-3/+3
| | | | | | There are 3 lines in spice.proto/spice1.proto which start with spaces and then contain a tab. This commit removes the spaces and only keep the tab.
* m4: Add compat AS_VAR_APPEND for older autoconfChristophe Fergeau2015-07-022-4/+5
| | | | This causes failures on EL6 otherwise as autoconf is too old there.
* ppc: Fix quic magic endianessLukas Venhoda2015-07-021-1/+2
| | | | | | | | | Runtime conversion from a string to uint32 is storing the magic with the same endianness on both LE and BE machines. This requires aditional byte swap when sending magic between LE/BE machines. Changing quic magic to a constant will ensure, that it will be always stored in native endianness, and the second byte swap won't be needed.
* ppc: Fix lz magic endianessLukas Venhoda2015-07-022-4/+3
| | | | | | | | | | | | | | Commit d39dfbfe changes lz magic to be always treated as LE when encoded. Runtime conversion from a string to uint32 is storing the magic with the same endianness on both LE and BE machines. This requires aditional byte swap when sending magic between LE/BE machines. Changing lz magic to a constant will ensure, that it will be always stored in native endianness, and the second byte swap won't be needed. This commit reverts d39dfbfe changes in lz.c while keeping the rest. They will be needed in future commit for quic.c
* ppc: Fix quic decode endianessLukas Venhoda2015-07-021-3/+5
| | | | | Converts all decoded words in quic from little endian to local machine endianness.
* Update spice-protocolChristophe Fergeau2015-06-221-0/+0
| | | | | | | | | Christophe Fergeau (1): Post-release version bump Javier Celaya (2): Update enums.h for preferred compression message Add a preferred compression capability
* Proto: Add preferred compression message and constants.Javier Celaya2015-06-223-0/+20
| | | | | | | | | When accessing a virtual desktop from different devices, some may have different image compression requirements, e.g. slow devices may prefer the faster LZ4 over GLZ. This message instructs the server to switch the image compression algorithm. This patch also promotes the SPICE_IMAGE_COMPRESS_* constants so that they are available from both the server and the client.
* m4: Add macro for --enable-lz4Christophe Fergeau2015-06-171-0/+24
| | | | | It's not directly used by spice-common, but this way spice-gtk and spice-server can share the same implementation.
* Update spice-protocol submoduleVictor Toso2015-04-241-0/+0
| | | | This includes volume synchronization protocol;
* codegen: Use six.PY3 rather than six.PY2Christophe Fergeau2015-04-142-6/+6
| | | | | | Older versions of python-six (at least 1.3.0) defined six.PY3 but not six.PY2. six.PY2 is only used twice in straightforward tests so it's easy to use six.PY3 instead.
* configure.ac: Check for needed python modules for git buildsChristophe Fergeau2015-04-134-1/+71
| | | | | | | | | | | | After the patch adding support for python 3 to the code generator, python-six is required when building from git. Since I got 2 different reports of SPICE build failures right after introducing it, it's probably better to check for the needed python modules from configure, and exit with an error if they are missing. This commit adds a --enable-python-checks configure flag for that though, since we only want to do that when building from git. It assumes that people running from git will be running autogen.sh, while people building from tarballs will run configure.
* ppc: build-sys: Add big-endian supportErlon Cruz2015-04-101-0/+1
| | | | | | | | | | A few files (the generated marshalling code and pixman-related utils) make use of WORDS_BIGENDIAN in order to do the right thing depending on endianness. configure.ac must call AC_C_BIGENDIAN for it to be defined. Signed-off-by: Erlon R. Cruz <erlon.cruz@br.flextronics.com> Signed-off-by: Rafael F. Santos <fonsecasantos.rafael@gmail.com> Signed-off-by: Fabiano Fidêncio <Fabiano.Fidêncio@fit-tecnologia.org.br>
* ppc: Fix lz magic endiannessErlon Cruz2015-04-103-1/+16
| | | | | | Signed-off-by: Erlon R. Cruz <erlon.cruz@br.flextronics.com> Signed-off-by: Rafael F. Santos <fonsecasantos.rafael@gmail.com> Signed-off-by: Fabiano Fidêncio <Fabiano.Fidêncio@fit-tecnologia.org.br>
* Make spice_codegen.py work on both Python 2 and 3Alexander Wauck2015-04-016-69/+78
| | | | | | | | | | | | | | | | | | | | | | | | This is a new version of my previous patch that does not include six.py. It's still kind of big, but at least it's all spice-common changes now. There are also a few other fixes that Christophe brought to my attention. Note that six now needs to be installed on the system (python-six on Fedora and Debian, six on PyPI). This *should* be enough to make spice_codegen.py work on both Python 2 and Python 3. The major changes are as follows: * cStringIO.StringIO -> io.StringIO * str vs. unicode updates (io.StringIO doesn't like str) * integer division * foo.has_key(bar) -> bar in foo * import internal_thing -> from . import internal_thing * removed from __future__ import with_statement (might break Python 2.5?) * changed some lambdas to list comprehensions (done by 2to3) * cast some_dict.keys() to list where needed (e.g. for sorting) * use normal type names with isinstance instead of types.WhateverType Signed-off-by: Alexander Wauck <awauck@codeweavers.com>
* ssl_verify: Move wincrypt.h related #ifdef closer to the includeChristophe Fergeau2015-03-261-4/+4
| | | | | | | | | Both wincrypt.h and openssl try to define X509_NAME. The wincrypt.h one is not useful for us, so we currently #undef it if this was set. However, it's done very late, right before including x509v3.h which defines the X509_NAME type. Any header included in between may try to #include x509v3.h so it's better to undefine X509_NAME right after including wincrypt.h.
* Get rid of SW_CANVAS_IMAGE_CACHEChristophe Fergeau2015-03-266-42/+14
| | | | | | | | | | | | | | | | | | | | Every time it's used, it's in constructs similar to: #ifdef SW_CANVAS_CACHE , SpiceImageCache *bits_cache , SpicePaletteCache *palette_cache #elif defined(SW_CANVAS_IMAGE_CACHE) , SpiceImageCache *bits_cache #endif This can be rewritten as: , SpiceImageCache *bits_cache #ifdef SW_CANVAS_CACHE , SpicePaletteCache *palette_cache #endif allowing to get rid of SW_CANVAS_IMAGE_CACHE.
* Remove another redundant (SW_CANVAS_CACHE) || (SW_CANVAS_IMAGE_CACHE) #ifdefChristophe Fergeau2015-03-261-2/+0
|
* Fix typo in pixman_image_get_stride() functionFabiano Fidêncio2015-02-251-1/+1
| | | | pixman_image_surface_get_stride -> pixman_image_get_stride
* LZ4: Do not include arpa/inet.h in Windows buildsJavier Celaya2015-02-031-0/+2
|