[Spice-devel] [PATCH 0/5] use common submodule

Marc-André Lureau marcandre.lureau at gmail.com
Wed Mar 14 18:13:30 PDT 2012


Hi,

For quite some time, spice-gtk and spice have been using a seperate common/ subdirectory for historical reasons. But the aim has always been to use the same source tree. It hasn't been kept in sync, and I finally decided to take some time to solve this.

We agreed in a previous discussion to use a common submodule for now. Later on, it could eventually become a proper library.

The upstream wip branch http://cgit.freedesktop.org/spice/spice-common/log/?h=wip has been extracted from current spice common, and spice-gtk changes have been added on top (from before-split tag). Both project make distcheck on Linux pass, haven't checked other systems.

The largest change is a clean-up of our various and multiply defined macros red_print*/red_error/PANIC*/ASSERT/DEBUG/WARN* to use a common spice_log handler, giving some consistency in error reporting and which can be tweaked at compile-time (will abort by default for criticals, but can be disabled) and run-time (log-level and abort-level).

spice*.proto and spice_codegen.py should be moved too, but I haven't looked at it (I am afraid the smartcard bits cause problems).

Marc-André Lureau (5):
  Use the spice-common submodule
  Use new spice/common logging functions
  Copy common/win/my_getopt-1.5/my_getopt.c
    client/windows/my_getopt.cpp
  build: fix build with new messages.h
  build: use common/client_{de,}marshallers.h

 .gitignore                             |    1 +
 .gitmodules                            |    3 +
 client/Makefile.am                     |    6 +-
 client/demarshallers.h                 |   27 -
 client/marshallers.h                   |   63 -
 client/red_channel.h                   |    4 +-
 client/red_client.cpp                  |    2 +-
 client/windows/generate.bat            |    2 +-
 client/windows/generate1.bat           |    2 +-
 client/windows/my_getopt.cpp           |  301 +++-
 client/windows/redc.vcproj             |    2 +-
 common                                 |    1 +
 common/.gitignore                      |    9 -
 common/Makefile.am                     |   76 -
 common/backtrace.c                     |  133 --
 common/backtrace.h                     |   34 -
 common/bitops.h                        |   91 -
 common/canvas_base.c                   | 3394 ------------------------------
 common/canvas_base.h                   |  327 ---
 common/canvas_utils.c                  |  299 ---
 common/canvas_utils.h                  |   80 -
 common/draw.h                          |  281 ---
 common/gdi_canvas.c                    | 1858 ----------------
 common/gdi_canvas.h                    |   51 -
 common/gl_canvas.c                     |  906 --------
 common/gl_canvas.h                     |   53 -
 common/gl_utils.h                      |   61 -
 common/glc.c                           | 1513 -------------
 common/glc.h                           |  167 --
 common/lines.c                         | 3613 --------------------------------
 common/lines.h                         |  138 --
 common/lz.c                            |  740 -------
 common/lz.h                            |   82 -
 common/lz_common.h                     |   69 -
 common/lz_compress_tmpl.c              |  529 -----
 common/lz_config.h                     |   39 -
 common/lz_decompress_tmpl.c            |  326 ---
 common/marshaller.c                    |  615 ------
 common/marshaller.h                    |   74 -
 common/mem.c                           |  297 ---
 common/mem.h                           |  162 --
 common/messages.h                      |  525 -----
 common/mutex.h                         |   44 -
 common/ogl_ctx.c                       |  251 ---
 common/ogl_ctx.h                       |   38 -
 common/pixman_utils.c                  | 1594 --------------
 common/pixman_utils.h                  |  136 --
 common/quic.c                          | 1699 ---------------
 common/quic.h                          |   72 -
 common/quic_config.h                   |   48 -
 common/quic_family_tmpl.c              |  117 -
 common/quic_rgb_tmpl.c                 |  765 -------
 common/quic_tmpl.c                     |  635 ------
 common/rect.h                          |  122 --
 common/region.c                        |  890 --------
 common/region.h                        |   70 -
 common/ring.h                          |  172 --
 common/rop3.c                          |  650 ------
 common/rop3.h                          |   42 -
 common/spice_common.h                  |   78 -
 common/ssl_verify.c                    |  482 -----
 common/ssl_verify.h                    |   66 -
 common/sw_canvas.c                     | 1327 ------------
 common/sw_canvas.h                     |   70 -
 common/win/Makefile.am                 |    1 -
 common/win/my_getopt-1.5/ChangeLog     |   22 -
 common/win/my_getopt-1.5/LICENSE       |   22 -
 common/win/my_getopt-1.5/Makefile.am   |   14 -
 common/win/my_getopt-1.5/Makefile.test |   26 -
 common/win/my_getopt-1.5/README        |  140 --
 common/win/my_getopt-1.5/getopt.3      |  288 ---
 common/win/my_getopt-1.5/getopt.h      |   56 -
 common/win/my_getopt-1.5/getopt.txt    |  330 ---
 common/win/my_getopt-1.5/main.c        |  387 ----
 common/win/my_getopt-1.5/my_getopt.c   |  281 ---
 common/win/my_getopt-1.5/my_getopt.h   |   72 -
 configure.ac                           |    2 -
 server/agent-msg-filter.c              |    8 +-
 server/dispatcher.c                    |   33 +-
 server/inputs_channel.c                |   34 +-
 server/jpeg_encoder.c                  |   14 +-
 server/main_channel.c                  |   66 +-
 server/mjpeg_encoder.c                 |    2 +-
 server/red_channel.c                   |   96 +-
 server/red_client_cache.h              |    4 +-
 server/red_client_shared_cache.h       |    8 +-
 server/red_dispatcher.c                |   37 +-
 server/red_memslots.c                  |   28 +-
 server/red_parse_qxl.c                 |   45 +-
 server/red_tunnel_worker.c             |  240 ++--
 server/red_worker.c                    |  602 +++---
 server/red_worker.h                    |    4 +-
 server/reds.c                          |  448 ++--
 server/smartcard.c                     |   24 +-
 server/snd_worker.c                    |   98 +-
 server/spicevmc.c                      |    6 +-
 server/tests/Makefile.am               |    1 +
 server/zlib_encoder.c                  |   16 +-
 98 files changed, 1200 insertions(+), 28579 deletions(-)
 delete mode 100644 client/demarshallers.h
 delete mode 100644 client/marshallers.h
 create mode 160000 common
 delete mode 100644 common/.gitignore
 delete mode 100644 common/Makefile.am
 delete mode 100644 common/backtrace.c
 delete mode 100644 common/backtrace.h
 delete mode 100644 common/bitops.h
 delete mode 100644 common/canvas_base.c
 delete mode 100644 common/canvas_base.h
 delete mode 100644 common/canvas_utils.c
 delete mode 100644 common/canvas_utils.h
 delete mode 100644 common/draw.h
 delete mode 100644 common/gdi_canvas.c
 delete mode 100644 common/gdi_canvas.h
 delete mode 100644 common/gl_canvas.c
 delete mode 100644 common/gl_canvas.h
 delete mode 100644 common/gl_utils.h
 delete mode 100644 common/glc.c
 delete mode 100644 common/glc.h
 delete mode 100644 common/lines.c
 delete mode 100644 common/lines.h
 delete mode 100644 common/lz.c
 delete mode 100644 common/lz.h
 delete mode 100644 common/lz_common.h
 delete mode 100644 common/lz_compress_tmpl.c
 delete mode 100644 common/lz_config.h
 delete mode 100644 common/lz_decompress_tmpl.c
 delete mode 100644 common/marshaller.c
 delete mode 100644 common/marshaller.h
 delete mode 100644 common/mem.c
 delete mode 100644 common/mem.h
 delete mode 100644 common/messages.h
 delete mode 100644 common/mutex.h
 delete mode 100644 common/ogl_ctx.c
 delete mode 100644 common/ogl_ctx.h
 delete mode 100644 common/pixman_utils.c
 delete mode 100644 common/pixman_utils.h
 delete mode 100644 common/quic.c
 delete mode 100644 common/quic.h
 delete mode 100644 common/quic_config.h
 delete mode 100644 common/quic_family_tmpl.c
 delete mode 100644 common/quic_rgb_tmpl.c
 delete mode 100644 common/quic_tmpl.c
 delete mode 100644 common/rect.h
 delete mode 100644 common/region.c
 delete mode 100644 common/region.h
 delete mode 100644 common/ring.h
 delete mode 100644 common/rop3.c
 delete mode 100644 common/rop3.h
 delete mode 100644 common/spice_common.h
 delete mode 100644 common/ssl_verify.c
 delete mode 100644 common/ssl_verify.h
 delete mode 100644 common/sw_canvas.c
 delete mode 100644 common/sw_canvas.h
 delete mode 100644 common/win/Makefile.am
 delete mode 100644 common/win/my_getopt-1.5/ChangeLog
 delete mode 100644 common/win/my_getopt-1.5/LICENSE
 delete mode 100644 common/win/my_getopt-1.5/Makefile.am
 delete mode 100644 common/win/my_getopt-1.5/Makefile.test
 delete mode 100644 common/win/my_getopt-1.5/README
 delete mode 100644 common/win/my_getopt-1.5/getopt.3
 delete mode 100644 common/win/my_getopt-1.5/getopt.h
 delete mode 100644 common/win/my_getopt-1.5/getopt.txt
 delete mode 100644 common/win/my_getopt-1.5/main.c
 delete mode 100644 common/win/my_getopt-1.5/my_getopt.c
 delete mode 100644 common/win/my_getopt-1.5/my_getopt.h

-- 
1.7.7.6



More information about the Spice-devel mailing list