From 4b3e03a37e9ffe79ddd3a6912ff8e900e9876802 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Sep 13 2013 13:45:24 +0000 Subject: import spice-gtk-0.20-6.el7.src.rpm --- diff --git a/.spice-gtk.metadata b/.spice-gtk.metadata new file mode 100644 index 0000000..17b1006 --- /dev/null +++ b/.spice-gtk.metadata @@ -0,0 +1 @@ +4d4bc89757ffc1668e1aa73f32b383241a3608c0 SOURCES/spice-gtk-0.20.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-Add-spice_channel_string_to_type-to-map-files.patch b/SOURCES/0001-Add-spice_channel_string_to_type-to-map-files.patch new file mode 100644 index 0000000..019c518 --- /dev/null +++ b/SOURCES/0001-Add-spice_channel_string_to_type-to-map-files.patch @@ -0,0 +1,91 @@ +From b85ca792af72d5f1e10aa6af9515eb96a044fc5c Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Wed, 26 Jun 2013 17:39:39 +0200 +Subject: [PATCH spice-gtk] Add spice_channel_string_to_type to map files + +And document both spice_channel_string_to_type and +spice_channel_type_to_string. + +Signed-off-by: Hans de Goede +--- + doc/reference/spice-gtk-sections.txt | 1 + + gtk/map-file | 1 + + gtk/spice-channel.c | 18 ++++++++++++++++++ + gtk/spice-glib-sym-file | 1 + + 4 files changed, 21 insertions(+) + +diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt +index e1e2833..8d61aa9 100644 +--- a/doc/reference/spice-gtk-sections.txt ++++ b/doc/reference/spice-gtk-sections.txt +@@ -98,6 +98,7 @@ spice_channel_disconnect + spice_channel_test_capability + spice_channel_test_common_capability + spice_channel_type_to_string ++spice_channel_string_to_type + spice_channel_set_capability + spice_channel_flush_async + spice_channel_flush_finish +diff --git a/gtk/map-file b/gtk/map-file +index a0b7330..a69eb40 100644 +--- a/gtk/map-file ++++ b/gtk/map-file +@@ -11,6 +11,7 @@ spice_channel_get_type; + spice_channel_new; + spice_channel_open_fd; + spice_channel_set_capability; ++spice_channel_string_to_type; + spice_channel_test_capability; + spice_channel_test_common_capability; + spice_channel_type_to_string; +diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c +index 0a32d6c..093b292 100644 +--- a/gtk/spice-channel.c ++++ b/gtk/spice-channel.c +@@ -1884,6 +1884,15 @@ static const char *to_string[] = { + [ SPICE_CHANNEL_PORT ] = "port", + }; + ++/** ++ * spice_channel_type_to_string: ++ * @type: a channel-type property value ++ * ++ * Convert a channel-type property value to a string. ++ * ++ * Returns: string representation of @type. ++ * Since: 0.20 ++ **/ + const gchar* spice_channel_type_to_string(gint type) + { + const char *str = NULL; +@@ -1895,6 +1904,15 @@ const gchar* spice_channel_type_to_string(gint type) + return str ? str : "unknown channel type"; + } + ++/** ++ * spice_channel_string_to_type: ++ * @str: a string representation of the channel-type property ++ * ++ * Convert a channel-type property value to a string. ++ * ++ * Returns: the channel-type property value for a @str channel ++ * Since: 0.21 ++ **/ + gint spice_channel_string_to_type(const gchar *str) + { + int i; +diff --git a/gtk/spice-glib-sym-file b/gtk/spice-glib-sym-file +index 2b172d0..8540307 100644 +--- a/gtk/spice-glib-sym-file ++++ b/gtk/spice-glib-sym-file +@@ -14,6 +14,7 @@ spice_channel_set_capability + spice_channel_test_capability + spice_channel_test_common_capability + spice_channel_type_to_string ++spice_channel_string_to_type + spice_client_error_quark + spice_cursor_channel_get_type + spice_display_channel_get_type +-- +1.8.3.rc1.49.g8d97506 + diff --git a/SOURCES/0002-smartcard-Handle-VCARD_EMUL_INIT_ALREADY_INITED.patch b/SOURCES/0002-smartcard-Handle-VCARD_EMUL_INIT_ALREADY_INITED.patch new file mode 100644 index 0000000..4f24e85 --- /dev/null +++ b/SOURCES/0002-smartcard-Handle-VCARD_EMUL_INIT_ALREADY_INITED.patch @@ -0,0 +1,45 @@ +From 3bb15dd43daaed6b1d77e66c59432f228935322e Mon Sep 17 00:00:00 2001 +From: Christophe Fergeau +Date: Thu, 11 Jul 2013 15:18:33 +0200 +Subject: [spice-gtk] smartcard: Handle VCARD_EMUL_INIT_ALREADY_INITED + +When initializing a software smartcard, vcard_emul_init() can +report success, error, or indicate that initialization has already +been done. In this last case, we would assume that an error occurred +instead of behaving as if the initialization succeeded. + +vcard_emul_init() can end up being called multiple time if the +smartcard channel gets destroyed and recreated during the lifetime +of the application + +Fixes rhbz#815639 +--- + gtk/smartcard-manager.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gtk/smartcard-manager.c b/gtk/smartcard-manager.c +index 4b1efe2..2a0e397 100644 +--- a/gtk/smartcard-manager.c ++++ b/gtk/smartcard-manager.c +@@ -408,6 +408,7 @@ static gboolean smartcard_manager_init(SpiceSession *session, + { + gchar *emul_args = NULL; + VCardEmulOptions *options = NULL; ++ VCardEmulError emul_init_status; + gchar *dbname = NULL; + GStrv certificates = NULL; + gboolean retval = FALSE; +@@ -448,7 +449,9 @@ static gboolean smartcard_manager_init(SpiceSession *session, + + init: + SPICE_DEBUG("vcard_emul_init"); +- if (vcard_emul_init(options) != VCARD_EMUL_OK) { ++ emul_init_status = vcard_emul_init(options); ++ if ((emul_init_status != VCARD_EMUL_OK) ++ && (emul_init_status != VCARD_EMUL_INIT_ALREADY_INITED)) { + *err = g_error_new(SPICE_CLIENT_ERROR, + SPICE_CLIENT_ERROR_FAILED, + "Failed to initialize smartcard"); +-- +1.8.3.1 + diff --git a/SOURCES/0003-channel-main-Convert-text-line-endings-if-necessary-.patch b/SOURCES/0003-channel-main-Convert-text-line-endings-if-necessary-.patch new file mode 100644 index 0000000..788d21a --- /dev/null +++ b/SOURCES/0003-channel-main-Convert-text-line-endings-if-necessary-.patch @@ -0,0 +1,130 @@ +From 28ef25781f62d6e3d96dba57a7ec772899b83661 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 24 Jun 2013 14:30:43 +0200 +Subject: [PATCH] channel-main: Convert text line-endings if necessary + (rhbz#752350) + +This implements line-ending conversion following the specification in the +commit message of spice-protocol commit 7be0e88e7e03a956b364cc847aad11b96ed4 : +vd_agent: Add caps for the agent to signal the guest line-ending (rhbz#752350) + +Signed-off-by: Hans de Goede +(cherry picked from commit e45a446a9981ad4adaeff9c885962a8c6140333e) +--- + gtk/channel-main.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 69 insertions(+), 4 deletions(-) + +diff --git a/gtk/channel-main.c b/gtk/channel-main.c +index b58af52..b9e0da2 100644 +--- a/gtk/channel-main.c ++++ b/gtk/channel-main.c +@@ -1181,6 +1181,24 @@ static void agent_announce_caps(SpiceMainChannel *channel) + #define HAS_CLIPBOARD_SELECTION(c) \ + VD_AGENT_HAS_CAPABILITY((c)->agent_caps, G_N_ELEMENTS((c)->agent_caps), VD_AGENT_CAP_CLIPBOARD_SELECTION) + ++#define GUEST_LINEEND_LF(c) \ ++ VD_AGENT_HAS_CAPABILITY((c)->agent_caps, G_N_ELEMENTS((c)->agent_caps), VD_AGENT_CAP_GUEST_LINEEND_LF) ++ ++#define GUEST_LINEEND_CRLF(c) \ ++ VD_AGENT_HAS_CAPABILITY((c)->agent_caps, G_N_ELEMENTS((c)->agent_caps), VD_AGENT_CAP_GUEST_LINEEND_CRLF) ++ ++#ifdef G_OS_UNIX ++#define CLIENT_LINEEND_LF 1 ++#else ++#define CLIENT_LINEEND_LF 0 ++#endif ++ ++#ifdef G_OS_WIN32 ++#define CLIENT_LINEEND_CRLF 1 ++#else ++#define CLIENT_LINEEND_CRLF 0 ++#endif ++ + /* any context: the message is not flushed immediately, + you can wakeup() the channel coroutine or send_msg_queue() */ + static void agent_clipboard_grab(SpiceMainChannel *channel, guint selection, +@@ -1751,6 +1769,29 @@ static void file_xfer_handle_status(SpiceMainChannel *channel, + file_xfer_completed(task, error); + } + ++/* any context */ ++static guchar *convert_lineend(const guchar *in, gsize *size, ++ const gchar *from, const gchar *to) ++{ ++ gchar *nul_terminated, **split, *out; ++ ++ /* Nul-terminate */ ++ nul_terminated = g_malloc(*size + 1); ++ memcpy(nul_terminated, in, *size); ++ nul_terminated[*size] = 0; ++ ++ /* Convert */ ++ split = g_strsplit(nul_terminated, from, -1); ++ out = g_strjoinv(to, split); ++ *size = strlen(out); ++ ++ /* Clean-up */ ++ g_strfreev(split); ++ g_free(nul_terminated); ++ ++ return (guchar *)out; ++} ++ + /* coroutine context */ + static void main_agent_handle_msg(SpiceChannel *channel, + VDAgentMessage *msg, gpointer payload) +@@ -1809,12 +1850,22 @@ static void main_agent_handle_msg(SpiceChannel *channel, + case VD_AGENT_CLIPBOARD: + { + VDAgentClipboard *cb = payload; ++ guchar *data = cb->data; ++ gsize size = msg->size - sizeof(VDAgentClipboard); ++ if (cb->type == VD_AGENT_CLIPBOARD_UTF8_TEXT) { ++ if (GUEST_LINEEND_LF(c) && CLIENT_LINEEND_CRLF) ++ data = convert_lineend(data, &size, "\n", "\r\n"); ++ if (GUEST_LINEEND_CRLF(c) && CLIENT_LINEEND_LF) ++ data = convert_lineend(data, &size, "\r\n", "\n"); ++ } + emit_main_context(channel, SPICE_MAIN_CLIPBOARD_SELECTION, selection, +- cb->type, cb->data, msg->size - sizeof(VDAgentClipboard)); ++ cb->type, data, size); + +- if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD) ++ if (selection == VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD) + emit_main_context(channel, SPICE_MAIN_CLIPBOARD, +- cb->type, cb->data, msg->size - sizeof(VDAgentClipboard)); ++ cb->type, data, size); ++ if (data != cb->data) ++ g_free(data); + break; + } + case VD_AGENT_CLIPBOARD_GRAB: +@@ -2554,13 +2605,27 @@ void spice_main_clipboard_notify(SpiceMainChannel *channel, + * Since: 0.6 + **/ + void spice_main_clipboard_selection_notify(SpiceMainChannel *channel, guint selection, +- guint32 type, const guchar *data, size_t size) ++ guint32 type, const guchar *_data, size_t _size) + { ++ const guchar *data = _data; ++ gsize size = _size; ++ + g_return_if_fail(channel != NULL); + g_return_if_fail(SPICE_IS_MAIN_CHANNEL(channel)); + ++ SpiceMainChannelPrivate *c = channel->priv; ++ ++ if (type == VD_AGENT_CLIPBOARD_UTF8_TEXT) { ++ if (CLIENT_LINEEND_CRLF && GUEST_LINEEND_LF(c)) ++ data = convert_lineend(data, &size, "\r\n", "\n"); ++ if (CLIENT_LINEEND_LF && GUEST_LINEEND_CRLF(c)) ++ data = convert_lineend(data, &size, "\n", "\r\n"); ++ } + agent_clipboard_notify(channel, selection, type, data, size); + spice_channel_wakeup(SPICE_CHANNEL(channel), FALSE); ++ ++ if (data != _data) ++ g_free((guchar *)data); + } + + /** diff --git a/SOURCES/0004-usb-widget-fix-gtk2-Python-bindings.patch b/SOURCES/0004-usb-widget-fix-gtk2-Python-bindings.patch new file mode 100644 index 0000000..c627229 --- /dev/null +++ b/SOURCES/0004-usb-widget-fix-gtk2-Python-bindings.patch @@ -0,0 +1,53 @@ +From 3010789e722f4a0fce62d7f172ad8134e1c5e866 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +Date: Tue, 6 Aug 2013 12:09:18 +0200 +Subject: [spice-gtk] usb-widget: fix gtk2 Python bindings + +The Python bindings generator failed to bind the USB widget, because of +the object/class declaration. The declaration was circumventing the +deprecated errors when compiling with GTK_DISABLE_DEPRECATED. We used +to need that because of broken gtk+ headers, but it is no longer +necessary since 15bd7ceba1434b5d710bfd16078044f30693467b. + +(cherry picked from commit a7565265532f6abec0fd3c6d843683b58eee070a) +--- + gtk/usb-device-widget.h | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) + +diff --git a/gtk/usb-device-widget.h b/gtk/usb-device-widget.h +index 3920990..b68cc6b 100644 +--- a/gtk/usb-device-widget.h ++++ b/gtk/usb-device-widget.h +@@ -37,14 +37,6 @@ typedef struct _SpiceUsbDeviceWidget SpiceUsbDeviceWidget; + typedef struct _SpiceUsbDeviceWidgetClass SpiceUsbDeviceWidgetClass; + typedef struct _SpiceUsbDeviceWidgetPrivate SpiceUsbDeviceWidgetPrivate; + +-#if GTK_CHECK_VERSION(3,0,0) +-typedef struct _GtkBox _SpiceGtkBox; +-typedef struct _GtkBoxClass _SpiceGtkBoxClass; +-#else +-typedef struct _GtkVBox _SpiceGtkBox; +-typedef struct _GtkVBoxClass _SpiceGtkBoxClass; +-#endif +- + /** + * SpiceUsbDeviceWidget: + * +@@ -52,7 +44,7 @@ typedef struct _GtkVBoxClass _SpiceGtkBoxClass; + */ + struct _SpiceUsbDeviceWidget + { +- _SpiceGtkBox parent; ++ GtkVBox parent; + + /*< private >*/ + SpiceUsbDeviceWidgetPrivate *priv; +@@ -67,7 +59,7 @@ struct _SpiceUsbDeviceWidget + */ + struct _SpiceUsbDeviceWidgetClass + { +- _SpiceGtkBoxClass parent_class; ++ GtkVBoxClass parent_class; + + /* signals */ + void (*connect_failed) (SpiceUsbDeviceWidget *widget, diff --git a/SOURCES/0005-glib-compat-g_slist_free_full-pass-the-right-ptr-to-.patch b/SOURCES/0005-glib-compat-g_slist_free_full-pass-the-right-ptr-to-.patch new file mode 100644 index 0000000..2db36a8 --- /dev/null +++ b/SOURCES/0005-glib-compat-g_slist_free_full-pass-the-right-ptr-to-.patch @@ -0,0 +1,27 @@ +From f5dfea28a3b909e51bcb544c399b02bd3ff65df7 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 19 Aug 2013 16:51:58 +0200 +Subject: [PATCH spice-gtk] glib-compat: g_slist_free_full: pass the right ptr + to destroy (rhbz#997893) + +The destroy function passed to g_slist_free_full should be passed the elements +data pointer, not the element itself. + +Signed-off-by: Hans de Goede +--- + gtk/glib-compat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gtk/glib-compat.c b/gtk/glib-compat.c +index 21be1f6..c3bb8e6 100644 +--- a/gtk/glib-compat.c ++++ b/gtk/glib-compat.c +@@ -88,7 +88,7 @@ g_slist_free_full(GSList *list, + + if (free_func) { + for (el = list; el ; el = g_slist_next(el)) { +- free_func(el); ++ free_func(el->data); + } + } + diff --git a/SOURCES/0006-gtk-channel-cursor.c-add-cursor_type_to_string-for-d.patch b/SOURCES/0006-gtk-channel-cursor.c-add-cursor_type_to_string-for-d.patch new file mode 100644 index 0000000..5d9eac5 --- /dev/null +++ b/SOURCES/0006-gtk-channel-cursor.c-add-cursor_type_to_string-for-d.patch @@ -0,0 +1,53 @@ +From 630d4d0b2cddefa85aeab796b1859a9d65aaec5d Mon Sep 17 00:00:00 2001 +From: Alon Levy +Date: Wed, 28 Aug 2013 16:01:15 +0300 +Subject: [PATCH 1/2] gtk/channel-cursor.c: add cursor_type_to_string for + debugging + +--- + gtk/channel-cursor.c | 22 ++++++++++++++++++++-- + 1 file changed, 20 insertions(+), 2 deletions(-) + +diff --git a/gtk/channel-cursor.c b/gtk/channel-cursor.c +index 99e7a48..41ad696 100644 +--- a/gtk/channel-cursor.c ++++ b/gtk/channel-cursor.c +@@ -325,6 +325,23 @@ static void display_cursor_unref(display_cursor *cursor) + g_free(cursor); + } + ++static const char *cursor_type_to_string(int type) ++{ ++ switch (type) { ++ case SPICE_CURSOR_TYPE_MONO: ++ return "mono"; ++ case SPICE_CURSOR_TYPE_ALPHA: ++ return "alpha"; ++ case SPICE_CURSOR_TYPE_COLOR32: ++ return "color32"; ++ case SPICE_CURSOR_TYPE_COLOR16: ++ return "color16"; ++ case SPICE_CURSOR_TYPE_COLOR4: ++ return "color4"; ++ } ++ return "unknown"; ++} ++ + static display_cursor *set_cursor(SpiceChannel *channel, SpiceCursor *scursor) + { + SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv; +@@ -343,8 +360,9 @@ static display_cursor *set_cursor(SpiceChannel *channel, SpiceCursor *scursor) + if (scursor->flags & SPICE_CURSOR_FLAGS_NONE) + return NULL; + +- CHANNEL_DEBUG(channel, "%s: type %d, %" PRIx64 ", %dx%d", __FUNCTION__, +- hdr->type, hdr->unique, hdr->width, hdr->height); ++ CHANNEL_DEBUG(channel, "%s: type %s(%d), %" PRIx64 ", %dx%d", __FUNCTION__, ++ cursor_type_to_string(hdr->type), hdr->type, hdr->unique, ++ hdr->width, hdr->height); + + if (scursor->flags & SPICE_CURSOR_FLAGS_FROM_CACHE) { + item = cache_find(&c->cursors, hdr->unique); +-- +1.8.3.1 + diff --git a/SOURCES/0007-gtk-channel-cursor-copy-spicec-hack-RHBZ-998529.patch b/SOURCES/0007-gtk-channel-cursor-copy-spicec-hack-RHBZ-998529.patch new file mode 100644 index 0000000..eff55c1 --- /dev/null +++ b/SOURCES/0007-gtk-channel-cursor-copy-spicec-hack-RHBZ-998529.patch @@ -0,0 +1,50 @@ +From c4428fd886ca344fb77a684028e181236873b05e Mon Sep 17 00:00:00 2001 +From: Alon Levy +Date: Wed, 28 Aug 2013 16:14:16 +0300 +Subject: [PATCH 2/2] gtk/channel-cursor: copy spicec hack, RHBZ #998529 + +flip -> unsupported by x11, since XCreatePixmapCursor has no invert +functionality, only a mask, shape, background and foreground colors. Use +this checkerboard hack to get some contrast for cursors in the guest +that relied on invert for the same contrast. +--- + gtk/channel-cursor.c | 23 ++++++++++++++++++----- + 1 file changed, 18 insertions(+), 5 deletions(-) + +diff --git a/gtk/channel-cursor.c b/gtk/channel-cursor.c +index 41ad696..e4a996b 100644 +--- a/gtk/channel-cursor.c ++++ b/gtk/channel-cursor.c +@@ -259,11 +259,24 @@ static void mono_cursor(display_cursor *cursor, const guint8 *data) + for (x = 0; x < cursor->hdr.width; x++, dest += 4) { + if (and[x/8] & bit) { + if (xor[x/8] & bit) { +- /* flip -> hmm? */ +- dest[0] = 0x00; +- dest[1] = 0x00; +- dest[2] = 0x00; +- dest[3] = 0x80; ++ /* ++ * flip -> unsupported by x11, since XCreatePixmapCursor has ++ * no invert functionality, only a mask, shape, background and ++ * foreground colors. Use this checkerboard hack to get some ++ * contrast for cursors in the guest that relied on invert for ++ * the same contrast. ++ */ ++ if ((x ^ y) & 1) { ++ dest[0] = 0x30; ++ dest[1] = 0x30; ++ dest[2] = 0x30; ++ dest[3] = 0xc0; ++ } else { ++ dest[0] = 0x50; ++ dest[1] = 0x50; ++ dest[2] = 0x50; ++ dest[3] = 0x30; ++ } + } else { + /* unchanged -> transparent */ + dest[0] = 0x00; +-- +1.8.3.1 + diff --git a/SOURCES/0008-SECURITY-acl-helper-Use-ruid-of-invoker-rather-than-.patch b/SOURCES/0008-SECURITY-acl-helper-Use-ruid-of-invoker-rather-than-.patch new file mode 100644 index 0000000..67db32c --- /dev/null +++ b/SOURCES/0008-SECURITY-acl-helper-Use-ruid-of-invoker-rather-than-.patch @@ -0,0 +1,31 @@ +From e9e14844f9055b6b527a8fdcd346c71101db1df4 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Wed, 21 Aug 2013 17:15:39 -0400 +Subject: [PATCH] [SECURITY] acl helper: Use ruid of invoker rather than looking up euid in /proc + +This way we avoid a race condition if the parent execve()s a setuid +program (possibly this program). + +This is the same as the fix for pkexec which is CVE-2011-1485: +See: https://bugzilla.redhat.com/show_bug.cgi?id=692922 +--- + gtk/spice-client-glib-usb-acl-helper.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/gtk/spice-client-glib-usb-acl-helper.c b/gtk/spice-client-glib-usb-acl-helper.c +index 93b9b3a..3ed6cad 100644 +--- a/gtk/spice-client-glib-usb-acl-helper.c ++++ b/gtk/spice-client-glib-usb-acl-helper.c +@@ -348,7 +348,8 @@ int main(void) + FATAL_ERROR("Parent process was reaped by init(1)\n"); + return 1; + } +- subject = polkit_unix_process_new(parent_pid); ++ /* Do what pkexec does */ ++ subject = polkit_unix_process_new_for_owner(parent_pid, 0, getuid ()); + + stdin_unix_stream = g_unix_input_stream_new(STDIN_FILENO, 0); + stdin_stream = g_data_input_stream_new(stdin_unix_stream); +-- +1.7.1 + diff --git a/SPECS/spice-gtk.spec b/SPECS/spice-gtk.spec new file mode 100644 index 0000000..28dd179 --- /dev/null +++ b/SPECS/spice-gtk.spec @@ -0,0 +1,456 @@ +# we don't want to provide private python extension libs +%{?filter_setup: +%filter_provides_in %{python_sitearch}/.*\.so$ +%filter_setup +} + +%define with_gtk3 0 +%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 +%define with_gtk3 1 +%endif + +#define _version_suffix + +Name: spice-gtk +Version: 0.20 +Release: 6%{?dist} +Summary: A GTK+ widget for SPICE clients + +Group: System Environment/Libraries +License: LGPLv2+ +URL: http://spice-space.org/page/Spice-Gtk +#VCS: git:git://anongit.freedesktop.org/spice/spice-gtk +Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2 +Patch1: 0001-Add-spice_channel_string_to_type-to-map-files.patch +Patch2: 0002-smartcard-Handle-VCARD_EMUL_INIT_ALREADY_INITED.patch +Patch3: 0003-channel-main-Convert-text-line-endings-if-necessary-.patch +Patch4: 0004-usb-widget-fix-gtk2-Python-bindings.patch +Patch5: 0005-glib-compat-g_slist_free_full-pass-the-right-ptr-to-.patch +Patch6: 0006-gtk-channel-cursor.c-add-cursor_type_to_string-for-d.patch +Patch7: 0007-gtk-channel-cursor-copy-spicec-hack-RHBZ-998529.patch +Patch8: 0008-SECURITY-acl-helper-Use-ruid-of-invoker-rather-than-.patch + +BuildRequires: intltool +BuildRequires: gtk2-devel >= 2.14 +BuildRequires: usbredir-devel >= 0.5.2 +BuildRequires: libusb1-devel >= 1.0.9 +BuildRequires: libgudev1-devel +BuildRequires: pixman-devel openssl-devel libjpeg-turbo-devel +BuildRequires: celt051-devel pulseaudio-libs-devel +BuildRequires: pygtk2-devel python-devel zlib-devel +BuildRequires: cyrus-sasl-devel +BuildRequires: libcacard-devel +BuildRequires: gobject-introspection-devel +BuildRequires: dbus-glib-devel +BuildRequires: libacl-devel +BuildRequires: polkit-devel +BuildRequires: gtk-doc +BuildRequires: vala-tools +BuildRequires: usbutils +%if %{with_gtk3} +BuildRequires: gtk3-devel +%endif +# FIXME: should ship the generated files.. +BuildRequires: pyparsing +# keep me to get gendeps magic happen +BuildRequires: spice-protocol +# Hack because of bz #613466 +BuildRequires: libtool +Requires: spice-glib%{?_isa} = %{version}-%{release} + + +%description +Client libraries for SPICE desktop servers. + +%package devel +Summary: Development files to build GTK2 applications with spice-gtk-2.0 +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: spice-glib-devel%{?_isa} = %{version}-%{release} +Requires: pkgconfig +Requires: gtk2-devel + +%description devel +spice-client-gtk-2.0 provides a SPICE viewer widget for GTK2. + +Libraries, includes, etc. to compile with the spice-gtk2 libraries + +%package -n spice-glib +Summary: A GObject for communicating with Spice servers +Group: Development/Libraries + +%description -n spice-glib +spice-client-glib-2.0 is a SPICE client library for GLib2. + +%package -n spice-glib-devel +Summary: Development files to build Glib2 applications with spice-glib-2.0 +Group: Development/Libraries +Requires: spice-glib%{?_isa} = %{version}-%{release} +Requires: pkgconfig +Requires: glib2-devel + +%description -n spice-glib-devel +spice-client-glib-2.0 is a SPICE client library for GLib2. + +Libraries, includes, etc. to compile with the spice-glib-2.0 libraries + + +%if %{with_gtk3} +%package -n spice-gtk3 +Summary: A GTK3 widget for SPICE clients +Group: Development/Libraries +Requires: spice-glib%{?_isa} = %{version}-%{release} + +%description -n spice-gtk3 +spice-client-glib-3.0 is a SPICE client library for Gtk3. + +%package -n spice-gtk3-devel +Summary: Development files to build GTK3 applications with spice-gtk-3.0 +Group: Development/Libraries +Requires: spice-gtk3%{?_isa} = %{version}-%{release} +Requires: spice-glib-devel%{?_isa} = %{version}-%{release} +Requires: pkgconfig +Requires: gtk3-devel + +%description -n spice-gtk3-devel +spice-client-gtk-3.0 provides a SPICE viewer widget for GTK3. + +Libraries, includes, etc. to compile with the spice-gtk3 libraries + +%package -n spice-gtk3-vala +Summary: Vala bindings for the spice-gtk-3.0 library +Group: Development/Libraries +Requires: spice-gtk3%{?_isa} = %{version}-%{release} +Requires: spice-gtk3-devel%{?_isa} = %{version}-%{release} + +%description -n spice-gtk3-vala +A module allowing use of the spice-gtk-3.0 widget from vala +%endif + +%package python +Summary: Python bindings for the spice-gtk-2.0 library +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description python +SpiceClientGtk module provides a SPICE viewer widget for GTK2. + +A module allowing use of the spice-gtk-2.0 widget from python + +%package tools +Summary: Spice-gtk tools +Group: Applications/Internet +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description tools +Simple clients for interacting with SPICE servers. +spicy is a client to a SPICE desktop server. +spicy-screenshot is a tool to capture screen-shots of a SPICE desktop. + + +%prep +%setup -q -n spice-gtk-%{version}%{?_version_suffix} -c +if [ -n '%{?_version_suffix}' ]; then + mv spice-gtk-%{version}%{?_version_suffix} spice-gtk-%{version} +fi + +pushd spice-gtk-%{version} +%patch0001 -p1 +%patch0002 -p1 +%patch0003 -p1 +%patch0004 -p1 +%patch0005 -p1 +%patch0006 -p1 +%patch0007 -p1 +%patch0008 -p1 +find . -name '*.stamp' | xargs touch +popd + +%if %{with_gtk3} +cp -a spice-gtk-%{version} spice-gtk3-%{version} +%endif + + +%build + +cd spice-gtk-%{version} +%configure --with-gtk=2.0 --enable-gtk-doc --with-usb-acl-helper-dir=%{_libexecdir}/spice-gtk-%{_arch}/ +make %{?_smp_mflags} +cd .. + +%if %{with_gtk3} +cd spice-gtk3-%{version} +%configure --with-gtk=3.0 --enable-vala --with-usb-acl-helper-dir=%{_libexecdir}/spice-gtk-%{_arch}/ +make %{?_smp_mflags} +cd .. +%endif + + +%install + +%if %{with_gtk3} +cd spice-gtk3-%{version} +make install DESTDIR=%{buildroot} +cd .. +%endif + +cd spice-gtk-%{version} +make install DESTDIR=%{buildroot} +cd .. + +rm -f %{buildroot}%{_libdir}/*.a +rm -f %{buildroot}%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/python*/site-packages/*.a +rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la + +# needed because of the upstream issue described in +# http://lists.freedesktop.org/archives/spice-devel/2012-August/010343.html +# these are unwanted spice-protocol files +rm -rf %{buildroot}%{_includedir}/spice-1 +rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc + +%find_lang %{name} + + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%post -n spice-glib -p /sbin/ldconfig +%postun -n spice-glib -p /sbin/ldconfig + +%if %{with_gtk3} +%post -n spice-gtk3 -p /sbin/ldconfig +%postun -n spice-gtk3 -p /sbin/ldconfig +%endif + + +%files +%doc spice-gtk-%{version}/AUTHORS +%doc spice-gtk-%{version}/COPYING +%doc spice-gtk-%{version}/README +%doc spice-gtk-%{version}/NEWS +%{_libdir}/libspice-client-gtk-2.0.so.* +%{_libdir}/girepository-1.0/SpiceClientGtk-2.0.typelib + +%files devel +%{_libdir}/libspice-client-gtk-2.0.so +%{_includedir}/spice-client-gtk-2.0 +%{_libdir}/pkgconfig/spice-client-gtk-2.0.pc +%{_datadir}/gir-1.0/SpiceClientGtk-2.0.gir + +%files -n spice-glib -f %{name}.lang +%{_libdir}/libspice-client-glib-2.0.so.* +%{_libdir}/libspice-controller.so.* +%{_libdir}/girepository-1.0/SpiceClientGLib-2.0.typelib +%dir %{_libexecdir}/spice-gtk-%{_arch}/ +%attr(4755, root, root) %{_libexecdir}/spice-gtk-%{_arch}/spice-client-glib-usb-acl-helper +%{_datadir}/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy + +%files -n spice-glib-devel +%{_libdir}/libspice-client-glib-2.0.so +%{_libdir}/libspice-controller.so +%{_includedir}/spice-client-glib-2.0 +%{_includedir}/spice-controller +%{_libdir}/pkgconfig/spice-client-glib-2.0.pc +%{_libdir}/pkgconfig/spice-controller.pc +%{_datadir}/gir-1.0/SpiceClientGLib-2.0.gir +%{_datadir}/vala/vapi/spice-protocol.vapi +%doc %{_datadir}/gtk-doc/html/* + +%if %{with_gtk3} +%files -n spice-gtk3 +%{_libdir}/libspice-client-gtk-3.0.so.* +%{_libdir}/girepository-1.0/SpiceClientGtk-3.0.typelib + +%files -n spice-gtk3-devel +%{_libdir}/libspice-client-gtk-3.0.so +%{_includedir}/spice-client-gtk-3.0 +%{_libdir}/pkgconfig/spice-client-gtk-3.0.pc +%{_datadir}/gir-1.0/SpiceClientGtk-3.0.gir + +%files -n spice-gtk3-vala +%{_datadir}/vala/vapi/spice-client-glib-2.0.deps +%{_datadir}/vala/vapi/spice-client-glib-2.0.vapi +%{_datadir}/vala/vapi/spice-client-gtk-3.0.deps +%{_datadir}/vala/vapi/spice-client-gtk-3.0.vapi +%endif + +%files python +%{_libdir}/python*/site-packages/SpiceClientGtk.so + +%files tools +%{_bindir}/spicy +%{_bindir}/spicy-screenshot +%{_bindir}/spicy-stats + +%changelog +* Fri Sep 13 2013 Christophe Fergeau 0.20-6 +- Add patch for CVE-2013-4324 + +* Fri Sep 13 2013 Hans de Goede - 0.20-5 +- Fix the spice-client-glib-usb-acl-helper no longer being suid root + +* Fri Sep 13 2013 Christophe Fergeau 0.20-4 +- Add misc upstream patches fixing various 0.20 bugs + +* Wed Aug 28 2013 Alon Levy - 0.20-3 +- Fix wrong mono cursor local rendering (rhbz#998529) + +* Sun Aug 04 2013 Fedora Release Engineering - 0.20-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sat Jul 6 2013 Marc-André Lureau - 0.20-2 +- Fix spice_channel_string_to_type symbol visibility (rhbz#981815) + +* Wed Jun 26 2013 Marc-André Lureau - 0.20-1 +- Update to spice-gtk 0.20 + +* Fri Apr 19 2013 Daniel Mach - 0.19-1.1 +- Rebuild for cyrus-sasl + +* Thu Apr 11 2013 Marc-André Lureau - 0.19-1 +- Update to spice-gtk 0.19 + +* Thu Mar 14 2013 Hans de Goede - 0.18-2 +- Fix "Warning no automount-inhibiting implementation available" warnings + +* Wed Feb 13 2013 Marc-André Lureau - 0.18-1 +- Update to spice-gtk 0.18 + +* Wed Feb 6 2013 Marc-André Lureau - 0.17-1 +- Update to spice-gtk 0.17 + +* Thu Jan 31 2013 Marc-André Lureau - 0.16-2 +- Remove perl-text-csv build requirement. (rhbz#873174) + +* Sat Jan 12 2013 Marc-André Lureau - 0.16-1 +- Update to spice-gtk 0.16 + +* Mon Dec 31 2012 Marc-André Lureau - 0.15.3-1 +- Update to spice-gtk 0.15.3, fixes TLS & password regressions + +* Fri Dec 21 2012 Christophe Fergeau - 0.15-2 +- Update to spice-gtk 0.15 + +* Thu Oct 25 2012 Christophe Fergeau - 0.14-2 +- Add various upstream patches + +* Fri Sep 21 2012 Christophe Fergeau - 0.14-1 +- Update to 0.14 release + +* Fri Sep 14 2012 Christophe Fergeau - 0.13.29-4 +- Add patch fixing CVE 2012-4425 + +* Thu Sep 13 2012 Christophe Fergeau - 0.13.29-3 +- Run autoreconf after applying patch 2 as it only modifies Makefile.am + +* Tue Sep 11 2012 Christophe Fergeau - 0.13.29-2 +- Add patch to fix symbol versioning + +* Fri Sep 7 2012 Hans de Goede - 0.13.29-1 +- Update to the spice-gtk 0.13.29 development release +- Rebuild for new usbredir + +* Mon Sep 03 2012 Christophe Fergeau - 0.13-2 +- Update to spice-gtk 0.13 + +* Tue Aug 07 2012 Christophe Fergeau - 0.12.101-1 +- Update to the spice-gtk 0.12.101 development release (needed by Boxes + 3.5.5) + +* Sat Jul 21 2012 Fedora Release Engineering - 0.12-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue May 15 2012 Marc-André Lureau - 0.12-4 +- re-Add back spice-protocol BuildRequires to help some deps magic happen + +* Thu May 10 2012 Marc-André Lureau - 0.12-3 +- Fix Spice.Audio constructor Python binding + https://bugzilla.redhat.com/show_bug.cgi?id=820335 + +* Wed May 2 2012 Marc-André Lureau - 0.12-2 +- Fix virt-manager console not showing up, rhbz#818169 + +* Tue Apr 24 2012 Marc-André Lureau - 0.12-1 +- New upstream release 0.12 + +* Tue Apr 10 2012 Christophe Fergeau - 0.11-5 +- Fix build on PPC +- Remove ExclusiveArch. While spice-gtk will build on ARM and PPC, it + hasn't been tested on these arch, so there may be some bugs. + +* Tue Mar 20 2012 Hans de Goede - 0.11-4 +- Add missing BuildRequires: usbutils, so that we get proper USB device + descriptions in the USB device selection menu + +* Wed Mar 14 2012 Hans de Goede - 0.11-3 +- Fix a crash triggered when trying to view a usbredir enabled vm from + virt-manager + +* Mon Mar 12 2012 Hans de Goede - 0.11-2 +- Add back spice-protocol BuildRequires to help some deps magic happen + +* Fri Mar 9 2012 Hans de Goede - 0.11-1 +- New upstream release 0.11 +- Fix multilib conflict in spice-glib + +* Thu Feb 23 2012 Marc-André Lureau - 0.10-1 +- New upstream release 0.10 + +* Mon Jan 30 2012 Hans de Goede - 0.9-1 +- New upstream release 0.9 + +* Mon Jan 16 2012 Hans de Goede - 0.8-1 +- New upstream release 0.8 +- Various small specfile improvements +- Enable vala bindings + +* Sat Jan 14 2012 Fedora Release Engineering - 0.7.39-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Nov 14 2011 Adam Jackson 0.7.39-2 +- Rebuild to break bogus libpng dependency +- Fix summaries for gtk3 subpackages to not talk about gtk2 + +* Fri Sep 2 2011 Hans de Goede - 0.7.39-1 +- Update to git snapshot 0.7.39-ab64, to add usbredir support + +* Tue Jul 26 2011 Marc-André Lureau - 0.7.1-1 +- Upstream version 0.7.1-d5a8 (fix libtool versionning) + +* Tue Jul 19 2011 Marc-André Lureau - 0.7-1 +- Upstream release 0.7 + +* Wed May 25 2011 Christophe Fergeau - 0.6-1 +- Upstream release 0.6 + +* Tue Mar 1 2011 Hans de Goede - 0.5-6 +- Fix spice-glib requires in .pc file (#680314) + +* Fri Feb 11 2011 Matthias Clasen - 0.5-5 +- Fix build against glib 2.28 + +* Thu Feb 10 2011 Matthias Clasen - 0.5-4 +- Rebuild against newer gtk + +* Wed Feb 09 2011 Fedora Release Engineering - 0.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Feb 2 2011 Matthias Clasen - 0.5-2 +- Rebuild against newer gtk + +* Thu Jan 27 2011 Marc-André Lureau - 0.5-1 +- Upstream release 0.5 + +* Fri Jan 14 2011 Daniel P. Berrange - 0.4-2 +- Add support for parallel GTK3 build + +* Mon Jan 10 2011 Dan Horák - 0.4-2 +- add ExclusiveArch as only x86 is supported + +* Sun Jan 09 2011 Marc-André Lureau - 0.4-1 +- Upstream release 0.4 +- Initial release (#657403) + +* Thu Nov 25 2010 Marc-André Lureau - 0.1.0-1 +- Initial packaging