Hi, On Thu, Jul 12, 2012 at 05:51:08PM +0100, Adam D. Barratt wrote: > >The difference between 0.12-3 and 0.12-4 is slight, just > >copy .version and .tarball-version to build directory. > >for the build script use the version information in > >.tarball-version to determine the version it is building. > > Testing currently has 0.12-1, so the changes which are relevant are > everything after that, not just those in -4. > > Regards, > > Adam Hi, This is the debdiff result of 0.12-1 and 0.12-4, I'll add my comment start with "//" liang@guoliangc:~/opt/src/spice$ debdiff spice-gtk_0.12-1.dsc spice-gtk_0.12-4.dsc diff -Nru spice-gtk-0.12/debian/changelog spice-gtk-0.12/debian/changelog --- spice-gtk-0.12/debian/changelog 2012-05-14 12:53:12.000000000 +0800 +++ spice-gtk-0.12/debian/changelog 2012-07-09 01:20:26.000000000 +0800 @@ -1,3 +1,27 @@ +spice-gtk (0.12-4) unstable; urgency=low + + * Correct version problem in *.pc (Closes: #680290) + + -- Liang Guo <guoliang@debian.org> Mon, 09 Jul 2012 00:36:14 +0800 + +spice-gtk (0.12-3) unstable; urgency=low + + * Add patch make-celt-to-be-optional.patch + * Disable celt + + -- Liang Guo <guoliang@debian.org> Fri, 29 Jun 2012 01:37:37 +0800 + +spice-gtk (0.12-2) unstable; urgency=low + + * Enable usb redirect (Closes: #677662) + * Switch to vala 0.16 (Closes: #675665) + * Enable multiarch for libspice-client-glib-2.0-1, + libspice-client-gtk-2.0-1, libspice-client-gtk-3.0-1 + * Build with hardening flags + * Use dpkg-statoverride to handle setuid bits + + -- Liang Guo <guoliang@debian.org> Fri, 25 May 2012 21:52:45 +0800 + spice-gtk (0.12-1) unstable; urgency=low * New upstream release //The primary change since 0.12-1 are: //1) Enable usb redirect support. Usb redirect is used to // redirect usb attached to the spice client to the // spice server(normally a virtual machine). When the // user want to connect his usb device to the virtual // machine, he can just pulg his usb device, then he // can see his usb device in the virtual machine. This // option significantly improve the user experience //2) Disable celt codec support. Celt version 0.5.1 is // the audio codec used by spice, but is not maintained // long long ago. To avoid potential security problem, // we decide to remove celt 0.5.1 from debian. // libspice-server1 embedded celt before 0.10.1-3~nocelt // but libspice-server1 don't ship celt since // 0.10.1-3~nocelt, this breaks spice-gtk(<= 0.12-2) // which cause spice cannot migerate to testing. diff -Nru spice-gtk-0.12/debian/compat spice-gtk-0.12/debian/compat --- spice-gtk-0.12/debian/compat 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/compat 2012-06-09 12:39:51.000000000 +0800 @@ -1 +1 @@ -8 +9 //Introduce by adding multi-arch support diff -Nru spice-gtk-0.12/debian/control spice-gtk-0.12/debian/control --- spice-gtk-0.12/debian/control 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/control 2012-06-23 09:54:33.000000000 +0800 @@ -1,9 +1,9 @@ Source: spice-gtk Section: misc Priority: optional -Maintainer: Liang Guo <bluestonechina@gmail.com> +Maintainer: Liang Guo <guoliang@debian.org> Build-Depends: - debhelper (>= 8.0.0), + debhelper (>= 9), //Introduce by adding multi-arch support libspice-protocol-dev (>= 0.10.1), libspice-server-dev, libpixman-1-dev (>= 0.17.7), @@ -14,8 +14,8 @@ libcairo2-dev (>= 1.2.0), libpulse-dev, libusb-1.0-0-dev, - valac-0.14, - libvala-0.14-dev, + valac-0.16, + libvala-0.16-dev, //Switch to vala 0.16, this closes bug 675665 python-all, python-gtk2-dev (>= 2.0.0), python-pyparsing, @@ -26,6 +26,11 @@ libgirepository1.0-dev, gir1.2-gtk-2.0, libtext-csv-perl, + libusbredirhost-dev, + libacl1-dev, + libpolkit-agent-1-dev, + libpolkit-gobject-1-dev, //Introduced by adding usb redirect support, //usb redirect use acl and policy kit to control //the access to usb devices. + dpkg-dev (>= 1.16.1~), Standards-Version: 3.9.3 X-Python-Version: >= 2.5 Homepage: http://www.spice-space.org/ @@ -46,6 +51,8 @@ Package: libspice-client-glib-2.0-1 Section: libs Architecture: i386 amd64 +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} //Introduce by adding multi-arch support Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: libspice-client-glib-2.0-4 Conflicts: libspice-client-glib-2.0-4 @@ -58,6 +65,7 @@ Package: gir1.2-spice-client-glib-2.0 Section: introspection Architecture: i386 amd64 +Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${gir:Depends} Description: GObject for communicating with Spice servers (GObject-Introspection) libspice-glib4 provides glib objects for spice protocol @@ -84,6 +92,8 @@ Package: libspice-client-gtk-2.0-1 Section: libs Architecture: i386 amd64 +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} //Introduce by adding multi-arch support Depends: ${shlibs:Depends}, ${misc:Depends} Description: GTK2 widget for SPICE clients (runtime library) libspice-gtk2 provides gtk2 widget to show spice display @@ -118,6 +128,8 @@ Package: libspice-client-gtk-3.0-1 Section: libs Architecture: i386 amd64 +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} //Introduce by adding multi-arch support Depends: ${shlibs:Depends}, ${misc:Depends} Description: GTK3 widget for SPICE clients (runtime library) libspice-gtk3 provides gtk3 widget to show spice display diff -Nru spice-gtk-0.12/debian/gir1.2-spice-client-glib-2.0.install spice-gtk-0.12/debian/gir1.2-spice-client-glib-2.0.install --- spice-gtk-0.12/debian/gir1.2-spice-client-glib-2.0.install 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/gir1.2-spice-client-glib-2.0.install 2012-06-09 13:17:07.000000000 +0800 @@ -1 +1 @@ -usr/lib/girepository-1.0/SpiceClientGLib-2.0.typelib +usr/lib/*/girepository-1.0/SpiceClientGLib-2.0.typelib usr/lib/girepository-1.0 //Introduce by adding multi-arch support diff -Nru spice-gtk-0.12/debian/gir1.2-spice-client-gtk-2.0.install spice-gtk-0.12/debian/gir1.2-spice-client-gtk-2.0.install --- spice-gtk-0.12/debian/gir1.2-spice-client-gtk-2.0.install 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/gir1.2-spice-client-gtk-2.0.install 2012-06-09 13:17:13.000000000 +0800 @@ -1 +1 @@ -usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib +usr/lib/*/girepository-1.0/SpiceClientGtk-2.0.typelib usr/lib/girepository-1.0 //Introduce by adding multi-arch support diff -Nru spice-gtk-0.12/debian/gir1.2-spice-client-gtk-3.0.install spice-gtk-0.12/debian/gir1.2-spice-client-gtk-3.0.install --- spice-gtk-0.12/debian/gir1.2-spice-client-gtk-3.0.install 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/gir1.2-spice-client-gtk-3.0.install 2012-06-09 13:17:19.000000000 +0800 @@ -1 +1 @@ -usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib +usr/lib/*/girepository-1.0/SpiceClientGtk-3.0.typelib usr/lib/girepository-1.0 diff -Nru spice-gtk-0.12/debian/libspice-client-glib-2.0-1.install spice-gtk-0.12/debian/libspice-client-glib-2.0-1.install --- spice-gtk-0.12/debian/libspice-client-glib-2.0-1.install 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/libspice-client-glib-2.0-1.install 2012-06-09 12:42:31.000000000 +0800 @@ -1,2 +1,4 @@ -usr/lib/libspice-client-glib-2.0.so.* -usr/lib/libspice-controller.so.* +usr/lib/*/libspice-client-glib-2.0.so.* +usr/lib/*/libspice-controller.so.* +usr/lib/*/spice-gtk/spice-client-glib-usb-acl-helper //Introduce by adding multi-arch support +usr/share/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy //Introduce by usb redirect, this file is the usb device //access control policy diff -Nru spice-gtk-0.12/debian/libspice-client-glib-2.0-1.postinst spice-gtk-0.12/debian/libspice-client-glib-2.0-1.postinst --- spice-gtk-0.12/debian/libspice-client-glib-2.0-1.postinst 1970-01-01 08:00:00.000000000 +0800 +++ spice-gtk-0.12/debian/libspice-client-glib-2.0-1.postinst 2012-06-23 20:48:47.000000000 +0800 @@ -0,0 +1,11 @@ +#!/bin/sh +set -e +#DEBHELPER# +for i in /usr/lib/*/spice-gtk/spice-client-glib-usb-acl-helper +do + # only do something when no setting exists + if ! dpkg-statoverride --list $i >/dev/null 2>&1 + then + dpkg-statoverride --update --add root root 4755 $i + fi +done diff -Nru spice-gtk-0.12/debian/libspice-client-glib-2.0-1.postrm spice-gtk-0.12/debian/libspice-client-glib-2.0-1.postrm --- spice-gtk-0.12/debian/libspice-client-glib-2.0-1.postrm 1970-01-01 08:00:00.000000000 +0800 +++ spice-gtk-0.12/debian/libspice-client-glib-2.0-1.postrm 2012-06-23 20:40:05.000000000 +0800 @@ -0,0 +1,10 @@ +#!/bin/sh +set -e +#DEBHELPER# +for i in /usr/lib/x86_64-linux-gnu/spice-gtk/spice-client-glib-usb-acl-helper +do + if dpkg-statoverride --list $i >/dev/null 2>&1 + then + dpkg-statoverride --remove $i + fi +done //Introduce by usb redirect, spice-client-glib-usb-acl-helper is //the helper program called by spice-gtk to check whether the //current user are allowed to access the usb device. it is a //suid program, so I use dpkg-statoverride to save the suid //bits. diff -Nru spice-gtk-0.12/debian/libspice-client-glib-2.0-dev.install spice-gtk-0.12/debian/libspice-client-glib-2.0-dev.install --- spice-gtk-0.12/debian/libspice-client-glib-2.0-dev.install 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/libspice-client-glib-2.0-dev.install 2012-06-09 13:22:26.000000000 +0800 @@ -1,7 +1,7 @@ -usr/lib/libspice-client-glib-2.0.so -usr/lib/libspice-controller.so -usr/lib/pkgconfig/spice-controller.pc -usr/lib/pkgconfig/spice-client-glib-2.0.pc +usr/lib/*/libspice-client-glib-2.0.so +usr/lib/*/libspice-controller.so +usr/lib/*/pkgconfig/spice-controller.pc +usr/lib/*/pkgconfig/spice-client-glib-2.0.pc usr/include/spice-client-glib-2.0 usr/include/spice-controller usr/share/vala/vapi/spice-protocol.vapi //Introduce by adding multi-arch support diff -Nru spice-gtk-0.12/debian/libspice-client-gtk-2.0-1.install spice-gtk-0.12/debian/libspice-client-gtk-2.0-1.install --- spice-gtk-0.12/debian/libspice-client-gtk-2.0-1.install 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/libspice-client-gtk-2.0-1.install 2012-06-09 12:42:49.000000000 +0800 @@ -1 +1 @@ -usr/lib/libspice-client-gtk-2.0.so.* +usr/lib/*/libspice-client-gtk-2.0.so.* //Introduce by adding multi-arch support diff -Nru spice-gtk-0.12/debian/libspice-client-gtk-2.0-dev.install spice-gtk-0.12/debian/libspice-client-gtk-2.0-dev.install --- spice-gtk-0.12/debian/libspice-client-gtk-2.0-dev.install 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/libspice-client-gtk-2.0-dev.install 2012-06-09 13:22:48.000000000 +0800 @@ -1,6 +1,6 @@ usr/include/spice-client-gtk-2.0/* -usr/lib/libspice-client-gtk-2.0.so -usr/lib/pkgconfig/spice-client-gtk-2.0.pc +usr/lib/*/libspice-client-gtk-2.0.so +usr/lib/*/pkgconfig/spice-client-gtk-2.0.pc usr/share/gtk-doc usr/share/gir-1.0/SpiceClientGtk-2.0.gir usr/share/vala/vapi/spice-client-gtk-2.0.deps //Introduce by adding multi-arch support diff -Nru spice-gtk-0.12/debian/libspice-client-gtk-3.0-1.install spice-gtk-0.12/debian/libspice-client-gtk-3.0-1.install --- spice-gtk-0.12/debian/libspice-client-gtk-3.0-1.install 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/libspice-client-gtk-3.0-1.install 2012-06-09 12:43:04.000000000 +0800 @@ -1 +1 @@ -usr/lib/libspice-client-gtk-3.0.so.* +usr/lib/*/libspice-client-gtk-3.0.so.* diff -Nru spice-gtk-0.12/debian/libspice-client-gtk-3.0-dev.install spice-gtk-0.12/debian/libspice-client-gtk-3.0-dev.install --- spice-gtk-0.12/debian/libspice-client-gtk-3.0-dev.install 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/libspice-client-gtk-3.0-dev.install 2012-06-09 13:23:28.000000000 +0800 @@ -1,6 +1,6 @@ usr/include/spice-client-gtk-3.0/* -usr/lib/libspice-client-gtk-3.0.so -usr/lib/pkgconfig/spice-client-gtk-3.0.pc +usr/lib/*/libspice-client-gtk-3.0.so +usr/lib/*/pkgconfig/spice-client-gtk-3.0.pc usr/share/gir-1.0/SpiceClientGtk-3.0.gir usr/share/vala/vapi/spice-client-gtk-3.0.deps usr/share/vala/vapi/spice-client-gtk-3.0.vapi //Introduce by adding multi-arch support diff -Nru spice-gtk-0.12/debian/patches/make-celt-to-be-optional.patch spice-gtk-0.12/debian/patches/make-celt-to-be-optional.patch --- spice-gtk-0.12/debian/patches/make-celt-to-be-optional.patch 1970-01-01 08:00:00.000000000 +0800 +++ spice-gtk-0.12/debian/patches/make-celt-to-be-optional.patch 2012-06-29 01:21:01.000000000 +0800 @@ -0,0 +1,328 @@ +From 2cf990f2bb971b8090ed8954f5a2868b3143afbd Mon Sep 17 00:00:00 2001 +From: Liang Guo <guoliang@debian.org> +Date: Tue, 12 Jun 2012 13:46:58 +0800 +Subject: [PATCH] Make celt to be optional + +Like patch [1] for spice, This patch will make celt to be +optional for spice-gtk. + +[1] http://lists.freedesktop.org/archives/spice-devel/2012-June/009410.html +--- a/configure.ac ++++ b/configure.ac +@@ -95,11 +95,24 @@ + AC_SUBST(PIXMAN_LIBS) + SPICE_GLIB_REQUIRES+=" pixman-1 >= 0.17.7" + +-PKG_CHECK_MODULES(CELT051, celt051 >= 0.5.1.1) +-AC_SUBST(CELT051_CFLAGS) +-AC_SUBST(CELT051_LIBS) +-AC_SUBST(CELT051_LIBDIR) +-SPICE_GLIB_REQUIRES+=" celt051 >= 0.5.1.1" ++AC_ARG_ENABLE([celt], ++ AS_HELP_STRING([--enable-celt=@<:@yes/no@:>@], ++ [Enable celt support @<:@default=yes@:>@]), ++ [], ++ [enable_celt="yes"]) ++ ++if test "x$enable_celt" = "xno"; then ++ AM_CONDITIONAL(WITH_CELT051, false) ++else ++ PKG_CHECK_MODULES(CELT051, celt051 >= 0.5.1.1) ++ AC_SUBST(CELT051_CFLAGS) ++ AC_SUBST(CELT051_LIBS) ++ AC_SUBST(CELT051_LIBDIR) ++ SPICE_GLIB_REQUIRES+=" celt051 >= 0.5.1.1" ++ AC_DEFINE(HAVE_CELT051, [1], [Define if celt codec]) ++ AM_CONDITIONAL(WITH_CELT051, true) ++fi ++ + + PKG_CHECK_MODULES(SSL, openssl) + AC_SUBST(SSL_CFLAGS) +@@ -618,6 +631,7 @@ + SASL support: ${enable_sasl} + Smartcard support: ${enable_smartcard} + USB redirection support: ${have_usbredir} ++ CELT support: ${enable_celt} + Gtk: $GTK_API_VERSION + + Now type 'make' to build $PACKAGE +--- a/gtk/channel-playback.c ++++ b/gtk/channel-playback.c +@@ -15,7 +15,6 @@ + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +-#include <celt051/celt.h> + + #include "spice-client.h" + #include "spice-common.h" +@@ -24,6 +23,10 @@ + + #include "spice-marshal.h" + ++#if HAVE_CELT051 ++#include <celt051/celt.h> ++#endif ++ + /** + * SECTION:channel-playback + * @short_description: audio stream for playback +@@ -48,8 +51,10 @@ + + struct _SpicePlaybackChannelPrivate { + int mode; ++#if HAVE_CELT051 + CELTMode *celt_mode; + CELTDecoder *celt_decoder; ++#endif + guint32 frame_count; + guint32 last_time; + guint8 nchannels; +@@ -86,14 +91,16 @@ + static void spice_playback_channel_init(SpicePlaybackChannel *channel) + { + channel->priv = SPICE_PLAYBACK_CHANNEL_GET_PRIVATE(channel); +- ++#ifdef HAVE_CELT051 + if (!g_getenv("SPICE_DISABLE_CELT")) + spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_PLAYBACK_CAP_CELT_0_5_1); ++#endif + spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_PLAYBACK_CAP_VOLUME); + } + + static void spice_playback_channel_finalize(GObject *obj) + { ++#if HAVE_CELT051 + SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(obj)->priv; + + if (c->celt_decoder) { +@@ -105,9 +112,9 @@ + celt051_mode_destroy(c->celt_mode); + c->celt_mode = NULL; + } +- + g_free(c->volume); + c->volume = NULL; ++#endif + + if (G_OBJECT_CLASS(spice_playback_channel_parent_class)->finalize) + G_OBJECT_CLASS(spice_playback_channel_parent_class)->finalize(obj); +@@ -158,8 +165,8 @@ + /* main or coroutine context */ + static void spice_playback_channel_reset(SpiceChannel *channel, gboolean migrating) + { ++#ifdef HAVE_CELT051 + SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv; +- + if (c->celt_decoder) { + celt051_decoder_destroy(c->celt_decoder); + c->celt_decoder = NULL; +@@ -169,7 +176,7 @@ + celt051_mode_destroy(c->celt_mode); + c->celt_mode = NULL; + } +- ++#endif + SPICE_CHANNEL_CLASS(spice_playback_channel_parent_class)->channel_reset(channel, migrating); + } + +@@ -353,6 +360,7 @@ + emit_main_context(channel, SPICE_PLAYBACK_DATA, + packet->data, packet->data_size); + break; ++#ifdef HAVE_CELT051 + case SPICE_AUDIO_DATA_MODE_CELT_0_5_1: { + celt_int16_t pcm[256 * 2]; + +@@ -368,6 +376,7 @@ + (uint8_t *)pcm, sizeof(pcm)); + break; + } ++#endif + default: + g_warning("%s: unhandled mode", __FUNCTION__); + break; +@@ -403,8 +412,9 @@ + { + SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv; + SpiceMsgPlaybackStart *start = spice_msg_in_parsed(in); ++#ifdef HAVE_CELT051 + int celt_mode_err; +- ++#endif + SPICE_DEBUG("%s: fmt %d channels %d freq %d time %d", __FUNCTION__, + start->format, start->channels, start->frequency, start->time); + +@@ -416,6 +426,7 @@ + emit_main_context(channel, SPICE_PLAYBACK_START, + start->format, start->channels, start->frequency); + break; ++#ifdef HAVE_CELT051 + case SPICE_AUDIO_DATA_MODE_CELT_0_5_1: { + /* TODO: only support one setting now */ + int frame_size = 256; +@@ -435,6 +446,7 @@ + start->format, start->channels, start->frequency); + break; + } ++#endif + default: + g_warning("%s: unhandled mode", __FUNCTION__); + break; +--- a/gtk/channel-record.c ++++ b/gtk/channel-record.c +@@ -15,7 +15,6 @@ + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ +-#include <celt051/celt.h> + + #include "spice-client.h" + #include "spice-common.h" +@@ -24,6 +23,10 @@ + #include "spice-marshal.h" + #include "spice-session-priv.h" + ++#if HAVE_CELT051 ++#include <celt051/celt.h> ++#endif ++ + /** + * SECTION:channel-record + * @short_description: audio stream for recording +@@ -51,8 +54,10 @@ + struct _SpiceRecordChannelPrivate { + int mode; + gboolean started; ++#ifdef HAVE_CELT051 + CELTMode *celt_mode; + CELTEncoder *celt_encoder; ++#endif + gsize frame_bytes; + guint8 *last_frame; + gsize last_frame_current; +@@ -92,9 +97,10 @@ + static void spice_record_channel_init(SpiceRecordChannel *channel) + { + channel->priv = SPICE_RECORD_CHANNEL_GET_PRIVATE(channel); +- ++#ifdef HAVE_CELT051 + if (!g_getenv("SPICE_DISABLE_CELT")) + spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_RECORD_CAP_CELT_0_5_1); ++#endif + spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_RECORD_CAP_VOLUME); + } + +@@ -104,7 +110,7 @@ + + g_free(c->last_frame); + c->last_frame = NULL; +- ++#ifdef HAVE_CELT051 + if (c->celt_encoder) { + celt051_encoder_destroy(c->celt_encoder); + c->celt_encoder = NULL; +@@ -114,7 +120,7 @@ + celt051_mode_destroy(c->celt_mode); + c->celt_mode = NULL; + } +- ++#endif + g_free(c->volume); + c->volume = NULL; + +@@ -170,7 +176,7 @@ + + g_free(c->last_frame); + c->last_frame = NULL; +- ++#ifdef HAVE_CELT051 + if (c->celt_encoder) { + celt051_encoder_destroy(c->celt_encoder); + c->celt_encoder = NULL; +@@ -180,7 +186,7 @@ + celt051_mode_destroy(c->celt_mode); + c->celt_mode = NULL; + } +- ++#endif + SPICE_CHANNEL_CLASS(spice_record_channel_parent_class)->channel_reset(channel, migrating); + } + +@@ -318,12 +324,13 @@ + SpiceRecordChannelPrivate *rc; + + rc = SPICE_RECORD_CHANNEL(channel)->priv; ++ rc->mode = SPICE_AUDIO_DATA_MODE_RAW; ++#ifdef HAVE_CELT051 + if (!g_getenv("SPICE_DISABLE_CELT") && + spice_channel_test_capability(channel, SPICE_RECORD_CAP_CELT_0_5_1)) { + rc->mode = SPICE_AUDIO_DATA_MODE_CELT_0_5_1; +- } else { +- rc->mode = SPICE_AUDIO_DATA_MODE_RAW; +- } ++ } ++#endif + } + + /* main context */ +@@ -357,9 +364,10 @@ + { + SpiceRecordChannelPrivate *rc; + SpiceMsgcRecordPacket p = {0, }; ++#ifdef HAVE_CELT051 + int celt_compressed_frame_bytes = FRAME_SIZE * CELT_BIT_RATE / 44100 / 8; + uint8_t *celt_buf = NULL; +- ++#endif + g_return_if_fail(channel != NULL); + g_return_if_fail(spice_channel_get_read_only(SPICE_CHANNEL(channel)) == FALSE); + +@@ -370,10 +378,10 @@ + spice_record_start_mark(channel, time); + rc->started = TRUE; + } +- ++#ifdef HAVE_CELT051 + if (rc->mode == SPICE_AUDIO_DATA_MODE_CELT_0_5_1) + celt_buf = g_alloca(celt_compressed_frame_bytes); +- ++#endif + p.time = time; + + while (bytes > 0) { +@@ -405,7 +413,7 @@ + rc->last_frame_current = n; + break; + } +- ++#ifdef HAVE_CELT051 + if (rc->mode == SPICE_AUDIO_DATA_MODE_CELT_0_5_1) { + frame_size = celt051_encode(rc->celt_encoder, (celt_int16_t *)frame, NULL, celt_buf, + celt_compressed_frame_bytes); +@@ -415,7 +423,7 @@ + } + frame = celt_buf; + } +- ++#endif + msg = spice_msg_out_new(SPICE_CHANNEL(channel), SPICE_MSGC_RECORD_DATA); + msg->marshallers->msgc_record_data(msg->marshaller, &p); + spice_marshaller_add(msg->marshaller, frame, frame_size); +@@ -451,6 +459,7 @@ + emit_main_context(channel, SPICE_RECORD_START, + start->format, start->channels, start->frequency); + break; ++#ifdef HAVE_CELT051 + case SPICE_AUDIO_DATA_MODE_CELT_0_5_1: { + int celt_mode_err; + +@@ -472,6 +481,7 @@ + start->format, start->channels, start->frequency); + break; + } ++#endif + default: + g_warning("%s: unhandled mode %d", __FUNCTION__, c->mode); + break; //make-celt-to-be-optional.patch, for there are some //changes to configure.ac, we decide to switch to //use autoreconf. diff -Nru spice-gtk-0.12/debian/patches/series spice-gtk-0.12/debian/patches/series --- spice-gtk-0.12/debian/patches/series 2012-05-14 12:49:46.000000000 +0800 +++ spice-gtk-0.12/debian/patches/series 2012-06-29 01:15:40.000000000 +0800 @@ -1,3 +1,4 @@ remove-libjpeg-turbo-warning.patch fix-parsing-uri-query.patch fix-spice-audio-binding.patch +make-celt-to-be-optional.patch diff -Nru spice-gtk-0.12/debian/rules spice-gtk-0.12/debian/rules --- spice-gtk-0.12/debian/rules 2012-05-03 09:13:48.000000000 +0800 +++ spice-gtk-0.12/debian/rules 2012-07-09 01:15:06.000000000 +0800 @@ -12,8 +12,10 @@ CFLAGS += -O2 endif -#libspice_client_gtkinclude_HEADERS and libspice_client_glibinclude_HEADERS -#should be copied to build directory, or build will fail. +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk //Build with hardening flags, I cannot rember //the reason, maybe a lintian warning. build-arch: build build-indep: build @@ -25,18 +27,26 @@ build-gtk2-stamp: mkdir build-gtk2 ls |grep -v debian|grep -v build-gtk2|grep -v build-gtk3|xargs -i cp -r {} build-gtk2/ - cd build-gtk2 && ./configure --prefix=/usr \ + cp .version .tarball-version build-gtk2/ + cd build-gtk2 && autoreconf + cd build-gtk2 && ./configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --enable-smartcard=no --with-gtk=2.0 --disable-static \ - --enable-introspection --enable-usbredir=no --enable-vala + --enable-introspection --enable-vala --enable-celt=no \ + --enable-usbredir=yes --enable-polkit=yes \ + --with-usb-acl-helper-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/spice-gtk $(MAKE) -C build-gtk2 touch build-gtk2-stamp build-gtk3-stamp: mkdir build-gtk3 ls |grep -v debian|grep -v build-gtk2|grep -v build-gtk3|xargs -i cp -r {} build-gtk3/ - cd build-gtk3 && ./configure --prefix=/usr \ + cp .version .tarball-version build-gtk3/ + cd build-gtk3 && autoreconf + cd build-gtk3 && ./configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --enable-smartcard=no --with-gtk=3.0 --disable-static \ - --enable-introspection --enable-usbredir=no --enable-vala + --enable-introspection --enable-vala --enable-celt=no \ + --enable-usbredir=yes --enable-polkit=yes \ + --with-usb-acl-helper-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/spice-gtk $(MAKE) -C build-gtk3 touch build-gtk3-stamp //Autoreconf pushes version information stored in .version //and .tarball-version to configure script. so they should //be copied to build dir. Thanks and Regards, -- Liang Guo http://bluestone.cublog.cn
Attachment:
signature.asc
Description: Digital signature