Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please unblock spice-gtk. I upload 0.12-3 to unstable at 29th Jun, and find a bug[1] which forbit other package to compile. Then I uploaded 0.12-4 at 9th July, and this cause 0.12-3 cannot automatically migrate to testing 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. The difference between 0.12-3 and 0.12-4 is: liang@guoliangc:~/opt/src/spice/spice-gtk$ git diff unstable/0.12-3 unstable/0.12-4 diff --git a/debian/changelog b/debian/changelog index 263fc96..161d6e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +spice-gtk (0.12-4) unstable; urgency=low + + * Correct version problem in *.pc (Closes: #680290) + + -- Liang Guo <guoli...@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 diff --git a/debian/rules b/debian/rules index 94eccd2..29c2b71 100755 --- a/debian/rules +++ b/debian/rules @@ -27,6 +27,7 @@ build-stamp: build-gtk3-stamp build-gtk2-stamp build-gtk2-stamp: mkdir build-gtk2 ls |grep -v debian|grep -v build-gtk2|grep -v build-gtk3|xargs -i cp -r {} build-gtk2/ + 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 \ @@ -39,6 +40,7 @@ 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/ + 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 \ liang@guoliangc:~/opt/src/spice/spice-gtk$ But current version in testing is 0.12-1, So I think it is necesary to explain the changes since 0.12-1. In the 0.12-2, the primary change is add support to usb redirect and multiarch support. The detailed changes are: liang@guoliangc:~/opt/src/spice/spice-gtk$ git diff unstable/0.12-1 unstable/0.12-2 diff --git a/debian/changelog b/debian/changelog index 5e42d70..a1952a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +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 <guoli...@debian.org> Fri, 25 May 2012 21:52:45 +0800 + spice-gtk (0.12-1) unstable; urgency=low * New upstream release diff --git a/debian/compat b/debian/compat index 45a4fb7..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/debian/control b/debian/control index c705d39..583766e 100644 --- a/debian/control +++ b/debian/control @@ -1,9 +1,9 @@ Source: spice-gtk Section: misc Priority: optional -Maintainer: Liang Guo <bluestonech...@gmail.com> +Maintainer: Liang Guo <guoli...@debian.org> Build-Depends: - debhelper (>= 8.0.0), + debhelper (>= 9), libspice-protocol-dev (>= 0.10.1), libspice-server-dev, libpixman-1-dev (>= 0.17.7), @@ -14,8 +14,8 @@ Build-Depends: 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, python-all, python-gtk2-dev (>= 2.0.0), python-pyparsing, @@ -26,6 +26,11 @@ Build-Depends: libgirepository1.0-dev, gir1.2-gtk-2.0, libtext-csv-perl, + libusbredirhost-dev, + libacl1-dev, + libpolkit-agent-1-dev, + libpolkit-gobject-1-dev, + 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 @@ Description: Simple clients for interacting with SPICE servers Package: libspice-client-glib-2.0-1 Section: libs Architecture: i386 amd64 +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: libspice-client-glib-2.0-4 Conflicts: libspice-client-glib-2.0-4 @@ -58,6 +65,7 @@ Description: GObject for communicating with Spice servers (runtime library) 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 @@ Description: GObject for communicating with Spice servers (development files) Package: libspice-client-gtk-2.0-1 Section: libs Architecture: i386 amd64 +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} 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 @@ Description: GTK2 widget for SPICE clients (development files) Package: libspice-client-gtk-3.0-1 Section: libs Architecture: i386 amd64 +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: GTK3 widget for SPICE clients (runtime library) libspice-gtk3 provides gtk3 widget to show spice display diff --git a/debian/gir1.2-spice-client-glib-2.0.install b/debian/gir1.2-spice-client-glib-2.0.install index 7fa3bcf..f6fc13f 100644 --- a/debian/gir1.2-spice-client-glib-2.0.install +++ b/debian/gir1.2-spice-client-glib-2.0.install @@ -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 diff --git a/debian/gir1.2-spice-client-gtk-2.0.install b/debian/gir1.2-spice-client-gtk-2.0.install index df39cae..3f18558 100644 --- a/debian/gir1.2-spice-client-gtk-2.0.install +++ b/debian/gir1.2-spice-client-gtk-2.0.install @@ -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 diff --git a/debian/gir1.2-spice-client-gtk-3.0.install b/debian/gir1.2-spice-client-gtk-3.0.install index 62af1b2..2597696 100644 --- a/debian/gir1.2-spice-client-gtk-3.0.install +++ b/debian/gir1.2-spice-client-gtk-3.0.install @@ -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 --git a/debian/libspice-client-glib-2.0-1.install b/debian/libspice-client-glib-2.0-1.install index 07ed653..8262d7b 100644 --- a/debian/libspice-client-glib-2.0-1.install +++ b/debian/libspice-client-glib-2.0-1.install @@ -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 +usr/share/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy diff --git a/debian/libspice-client-glib-2.0-1.postinst b/debian/libspice-client-glib-2.0-1.postinst new file mode 100644 index 0000000..bf1d99f --- /dev/null +++ b/debian/libspice-client-glib-2.0-1.postinst @@ -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 --git a/debian/libspice-client-glib-2.0-1.postrm b/debian/libspice-client-glib-2.0-1.postrm new file mode 100644 index 0000000..3d35ad7 --- /dev/null +++ b/debian/libspice-client-glib-2.0-1.postrm @@ -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 diff --git a/debian/libspice-client-glib-2.0-dev.install b/debian/libspice-client-glib-2.0-dev.install index 5b67714..6eb6cf1 100644 --- a/debian/libspice-client-glib-2.0-dev.install +++ b/debian/libspice-client-glib-2.0-dev.install @@ -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 diff --git a/debian/libspice-client-gtk-2.0-1.install b/debian/libspice-client-gtk-2.0-1.install index cdecd8d..5383454 100644 --- a/debian/libspice-client-gtk-2.0-1.install +++ b/debian/libspice-client-gtk-2.0-1.install @@ -1 +1 @@ -usr/lib/libspice-client-gtk-2.0.so.* +usr/lib/*/libspice-client-gtk-2.0.so.* diff --git a/debian/libspice-client-gtk-2.0-dev.install b/debian/libspice-client-gtk-2.0-dev.install index 48c3b40..2488517 100644 --- a/debian/libspice-client-gtk-2.0-dev.install +++ b/debian/libspice-client-gtk-2.0-dev.install @@ -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 diff --git a/debian/libspice-client-gtk-3.0-1.install b/debian/libspice-client-gtk-3.0-1.install index b8c3b9c..bd544f1 100644 --- a/debian/libspice-client-gtk-3.0-1.install +++ b/debian/libspice-client-gtk-3.0-1.install @@ -1 +1 @@ -usr/lib/libspice-client-gtk-3.0.so.* +usr/lib/*/libspice-client-gtk-3.0.so.* diff --git a/debian/libspice-client-gtk-3.0-dev.install b/debian/libspice-client-gtk-3.0-dev.install index 7a2fee3..e916584 100644 --- a/debian/libspice-client-gtk-3.0-dev.install +++ b/debian/libspice-client-gtk-3.0-dev.install @@ -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 diff --git a/debian/rules b/debian/rules index 2f00e95..c349df2 100755 --- a/debian/rules +++ b/debian/rules @@ -12,8 +12,10 @@ else 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-arch: build build-indep: build @@ -25,18 +27,22 @@ build-stamp: build-gtk3-stamp build-gtk2-stamp 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 \ + 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-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 \ + 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-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 In 0.12-3, The primary change is disable celt. spice-gtk and spice use celt 0.5.1 as audio codec. celt 0.5.1 is not maintained by any one, to prevent potential security problem, we decide to remove celt 0.5.1 from debian. In Debian, spice package ships an embedded celt051 before 0.10.1-3~nocelt and spice-gtk depends on spice. The current spice in unstable is 0.11.0-1 and it doesn't ships celt, so spice-gtk (<0.12-3) cannot work with spice (>=0.10.1-3~nocelt). spice 0.11-1 breaks spice-gtk (<= 0.12-2), but the current spice-gtk in testing is 0.12-1, this forbit spice migrate to testing. The detailed changes are: liang@guoliangc:~/opt/src/spice/spice-gtk$ git diff unstable/0.12-2 unstable/0.12-3 diff --git a/debian/changelog b/debian/changelog index a1952a0..263fc96 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +spice-gtk (0.12-3) unstable; urgency=low + + * Add patch make-celt-to-be-optional.patch + * Disable celt + + -- Liang Guo <guoli...@debian.org> Fri, 29 Jun 2012 01:37:37 +0800 + spice-gtk (0.12-2) unstable; urgency=low * Enable usb redirect (Closes: #677662) diff --git a/debian/patches/make-celt-to-be-optional.patch b/debian/patches/make-celt-to-be-optional.patch new file mode 100644 index 0000000..7a9b2c1 --- /dev/null +++ b/debian/patches/make-celt-to-be-optional.patch @@ -0,0 +1,328 @@ +From 2cf990f2bb971b8090ed8954f5a2868b3143afbd Mon Sep 17 00:00:00 2001 +From: Liang Guo <guoli...@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; diff --git a/debian/patches/series b/debian/patches/series index e4ce6a7..67ba052 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 --git a/debian/rules b/debian/rules index c349df2..94eccd2 100755 --- a/debian/rules +++ b/debian/rules @@ -27,9 +27,10 @@ build-stamp: build-gtk3-stamp build-gtk2-stamp 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 && 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-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 @@ -38,9 +39,10 @@ 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 && 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-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 you can visit spice-gtk package git repository[2] for your convience. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680290 [2] git://git.debian.org/collab-maint/spice.git Thanks and Regards, -- Liang Guo http://bluestone.cublog.cn
signature.asc
Description: Digital signature