diff --git a/0002-python-fix-Spice.Audio-binding.patch b/0002-python-fix-Spice.Audio-binding.patch new file mode 100644 index 0000000..5a24551 --- /dev/null +++ b/0002-python-fix-Spice.Audio-binding.patch @@ -0,0 +1,44 @@ +From bac3fd5ae1b783237100a1e5edf989ce7bd39d51 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +Date: Thu, 10 May 2012 02:55:14 +0200 +Subject: [PATCH spice-gtk] python: fix Spice.Audio binding + +The spice_audio_new() function is not correctly generated h2def.py +anymore because of the surrounding #ifdef and macros. Add it in +the manual.defs instead. + +Avoid API breakage: +2012-05-10 01:56:48,884 (cli:83): Uncaught exception: +Traceback (most recent call last): + File /usr/share/virt-manager/virtManager/console.py, line 475, in +_channel_new_cb + self.audio = spice.Audio(self.spice_session) +TypeError: GObject.__init__() takes exactly 0 arguments (1 given) + +https://bugzilla.redhat.com/show_bug.cgi?id=820335 +--- + gtk/spice-client-gtk-manual.defs | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/gtk/spice-client-gtk-manual.defs b/gtk/spice-client-gtk-manual.defs +index 60f207c..9631b74 100644 +--- a/gtk/spice-client-gtk-manual.defs ++++ b/gtk/spice-client-gtk-manual.defs +@@ -104,3 +104,14 @@ + '("failed" "SPICE_CLIENT_ERROR_FAILED") + ) + ) ++ ++(define-function spice_audio_new ++ (c-name "spice_audio_new") ++ (is-constructor-of "SpiceAudio") ++ (return-type "SpiceAudio*") ++ (parameters ++ '("SpiceSession*" "session") ++ '("GMainContext*" "context") ++ '("const-char*" "name") ++ ) ++) +-- +1.7.10.1 + diff --git a/spice-gtk.spec b/spice-gtk.spec index 9bdc4f7..93808bb 100644 --- a/spice-gtk.spec +++ b/spice-gtk.spec @@ -13,7 +13,7 @@ Name: spice-gtk Version: 0.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A GTK+ widget for SPICE clients Group: System Environment/Libraries @@ -21,6 +21,7 @@ License: LGPLv2+ URL: http://spice-space.org/page/Spice-Gtk Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2 Patch1: 0001-Fix-parsing-URI-query.patch +Patch2: 0002-python-fix-Spice.Audio-binding.patch BuildRequires: intltool BuildRequires: gtk2-devel >= 2.14 @@ -146,6 +147,7 @@ fi pushd spice-gtk-%{version} %patch1 -p1 +%patch2 -p1 popd %if %{with_gtk3} @@ -258,6 +260,10 @@ rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la %{_bindir}/spicy-stats %changelog +* 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