diff -Nru bluez-4.98/debian/bluez.bluetooth.default bluez-4.98/debian/bluez.bluetooth.default --- bluez-4.98/debian/bluez.bluetooth.default 2012-01-13 22:11:21.000000000 +0000 +++ bluez-4.98/debian/bluez.bluetooth.default 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -# Defaults for bluez - -# start bluetooth on boot? -# compatibility note: if this variable is _not_ found bluetooth will start -BLUETOOTH_ENABLED=1 - -# This setting used to switch HID devices (e.g mouse/keyboad) to HCI mode, that -# is you will have bluetooth functionality from your dongle instead of only -# HID. This is accomplished for supported devices by udev in -# /lib/udev/rules.d/62-bluez-hid2hci.rules by invoking hid2hci with correct -# parameters. -# See /usr/share/doc/bluez/NEWS.Debian.gz for further information. - -# Older daemons like pand dund and hidd can be found in bluez-compat package as -# they are deprecated and provided for backward compatibility only. - -# Note that not every bluetooth dongle is capable of switching back to HID mode, -# see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=355497 -HID2HCI_ENABLED=0 -HID2HCI_UNDO=0 diff -Nru bluez-4.98/debian/bluez.bluetooth.upstart bluez-4.98/debian/bluez.bluetooth.upstart --- bluez-4.98/debian/bluez.bluetooth.upstart 2012-02-22 09:50:59.000000000 +0000 +++ bluez-4.98/debian/bluez.bluetooth.upstart 2012-03-07 20:04:00.000000000 +0000 @@ -9,18 +9,10 @@ env RFCOMM_CONF=/etc/bluetooth/rfcomm.conf expect fork +respawn exec /usr/sbin/bluetoothd -pre-start script - test -f /etc/default/bluetooth && . /etc/default/bluetooth || : - - if [ "$BLUETOOTH_ENABLED" = "0" ]; - then - exit 1 - fi -end script - post-start script [ "$VERBOSE" = no ] && redirect='>/dev/null 2>&1' || redirect= diff -Nru bluez-4.98/debian/bluez.maintscript bluez-4.98/debian/bluez.maintscript --- bluez-4.98/debian/bluez.maintscript 1970-01-01 00:00:00.000000000 +0000 +++ bluez-4.98/debian/bluez.maintscript 2012-03-12 22:08:28.000000000 +0000 @@ -0,0 +1 @@ +rm_conffile /etc/default/bluetooth 4.98-2ubuntu4 diff -Nru bluez-4.98/debian/bluez.postrm bluez-4.98/debian/bluez.postrm --- bluez-4.98/debian/bluez.postrm 1970-01-01 00:00:00.000000000 +0000 +++ bluez-4.98/debian/bluez.postrm 2012-03-07 20:04:00.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# postrm script for bluez +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|failed-upgrade|disappear) + ;; + + purge) + if [ "$(cat /etc/init/bluetooth.override)" = "$(printf "# Inserted by bluez\nmanual\n")" ]; then + rm -f /etc/init/bluetooth.override + fi + ;; + + abort-install|abort-upgrade) + if dpkg --compare-versions "$2" le-nl 4.98-2ubuntu1; then + perl -i -0pe 's/# Inserted by bluez\nmanual\n//' /etc/init/bluetooth.override + fi + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru bluez-4.98/debian/bluez.preinst bluez-4.98/debian/bluez.preinst --- bluez-4.98/debian/bluez.preinst 1970-01-01 00:00:00.000000000 +0000 +++ bluez-4.98/debian/bluez.preinst 2012-03-07 20:04:00.000000000 +0000 @@ -0,0 +1,45 @@ +#!/bin/sh +# preinst script for bluez +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + if dpkg --compare-versions "$2" le-nl 4.98-2ubuntu1; then + ( + test -f /etc/default/bluetooth && . /etc/default/bluetooth + if [ "$BLUETOOTH_ENABLED" = 0 ] && + (! [ -f /etc/init/bluetooth.override ] || + ! grep -q -e "start on" -e "manual" /etc/init/bluetooth.override); then + printf "# Inserted by bluez\nmanual\n" >> /etc/init/bluetooth.override + fi + ) + fi + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru bluez-4.98/debian/changelog bluez-4.98/debian/changelog --- bluez-4.98/debian/changelog 2012-03-02 03:16:27.000000000 +0000 +++ bluez-4.98/debian/changelog 2012-04-08 02:49:40.000000000 +0000 @@ -1,9 +1,59 @@ -bluez (4.98-2ubuntu1linaro1) precise; urgency=low +bluez (4.98-2ubuntu7linaro1) precise; urgency=low * debian/patches/0001-Adding-snowball-target-and-line-disc.patch: Adding support for snowball. - -- Ricardo Salveti de Araujo Fri, 02 Mar 2012 00:16:09 -0300 + -- Ricardo Salveti de Araujo Sat, 07 Apr 2012 23:49:24 -0300 + +bluez (4.98-2ubuntu7) precise; urgency=low + + * debian/patches/10-unregister_interface_on_exit.patch: unregister the SAP + interface on exit. Thanks to Jesse Sung for the patch. + * debian/patches/11-explicitly_close.patch: make sure the io channel for + HFP is properly closed on exit. Thanks to Jesse Sung for the patch. + (LP: #907818) + + -- Mathieu Trudel-Lapierre Wed, 21 Mar 2012 15:27:57 -0400 + +bluez (4.98-2ubuntu6) precise; urgency=low + + * debian/control: Drop unused python-gobject dependency. + + -- Martin Pitt Tue, 13 Mar 2012 19:41:36 +0100 + +bluez (4.98-2ubuntu5) precise; urgency=low + + * Fix the version number in debian/bluez.maintscript so it actually + cleans up the file. (LP: #953448) + + -- Evan Broder Mon, 12 Mar 2012 15:07:44 -0700 + +bluez (4.98-2ubuntu4) precise; urgency=low + + [ Pali Rohár ] + * Respawn bluetooth daemon if crashed. + + [ Evan Broder ] + * Eliminate the /etc/default/bluetooth conffile as it's not the Upstart + way. Transition the BLUETOOTH_ENABLED variable to an Upstart override + variable if it's been changed. + + -- Evan Broder Wed, 07 Mar 2012 11:33:02 -0800 + +bluez (4.98-2ubuntu3) precise; urgency=low + + * debian/patches/enable_audio_profiles.patch: properly enable the Source + profile, its state is checked twice, once in audio/a2dp.c again which was + not taken into account in the previous upload. (LP: #948613) + + -- Mathieu Trudel-Lapierre Wed, 07 Mar 2012 14:36:24 -0500 + +bluez (4.98-2ubuntu2) precise; urgency=low + + * debian/patches/enable_audio_profiles.patch: enable the Gateway and Source + audio profiles by default. (LP: #948613) + + -- Mathieu Trudel-Lapierre Wed, 07 Mar 2012 10:44:35 -0500 bluez (4.98-2ubuntu1) precise; urgency=low diff -Nru bluez-4.98/debian/control bluez-4.98/debian/control --- bluez-4.98/debian/control 2012-02-22 10:07:06.000000000 +0000 +++ bluez-4.98/debian/control 2012-03-13 18:41:34.000000000 +0000 @@ -72,7 +72,8 @@ Package: bluez Architecture: amd64 armel i386 ia64 mips mipsel powerpc s390 s390x sparc alpha armhf avr32 hppa m68k powerpcspe sh4 sparc64 ppc64 -Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, module-init-tools, udev (>= 170-1), lsb-base, dbus, python-gobject, python-dbus +Pre-Depends: ${misc:Pre-Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, module-init-tools, udev (>= 170-1), lsb-base, dbus, python-dbus Replaces: bluez-input, bluez-network, bluez-serial, bluez-utils (<= 3.36-3), bluez-audio (<= 3.36-3), udev (<< 170-1) Conflicts: bluez-utils (<= 3.36-3), bluez-audio (<= 3.36-3) Breaks: udev (<< 170-1) diff -Nru bluez-4.98/debian/patches/10-unregister_interface_on_exit.patch bluez-4.98/debian/patches/10-unregister_interface_on_exit.patch --- bluez-4.98/debian/patches/10-unregister_interface_on_exit.patch 1970-01-01 00:00:00.000000000 +0000 +++ bluez-4.98/debian/patches/10-unregister_interface_on_exit.patch 2012-03-21 19:33:47.000000000 +0000 @@ -0,0 +1,22 @@ +From: Jesse Sung +Subject: Unregister the SAP dummy interface on exit. + +This fixes error messages when the rfkill switch is toggled: + +bluetoothd[5416]: sap/manager.c:sap_server_probe() path /org/bluez/5416/hci0 +bluetoothd[5416]: sap-dummy interface org.bluez.SimAccessTest init failed on path /org/bluez/test +bluetoothd[5416]: Sap driver initialization failed. +bluetoothd[5416]: sap-server: Operation not permitted (1 + +Index: bluez-4.98/sap/sap-dummy.c +=================================================================== +--- bluez-4.98.orig/sap/sap-dummy.c 2012-03-16 17:07:43.626644579 +0800 ++++ bluez-4.98/sap/sap-dummy.c 2012-03-16 17:10:32.774636738 +0800 +@@ -340,6 +340,7 @@ + + void sap_exit(void) + { ++ g_dbus_unregister_interface(connection, SAP_DUMMY_PATH, SAP_DUMMY_IFACE); + dbus_connection_unref(connection); + connection = NULL; + } diff -Nru bluez-4.98/debian/patches/11-explicitly_close.patch bluez-4.98/debian/patches/11-explicitly_close.patch --- bluez-4.98/debian/patches/11-explicitly_close.patch 1970-01-01 00:00:00.000000000 +0000 +++ bluez-4.98/debian/patches/11-explicitly_close.patch 2012-03-21 19:36:04.000000000 +0000 @@ -0,0 +1,19 @@ +From: Jesse Sung +Subject: Shutdown the IO channel for the HFP server on exit. + +When the rfkill switch is toggled, the channel is unref'd before being closed, +which lead to issues with the interfaces properly getting brought back up +when the rfkill switch gets back to a non-blocked state. + +Index: bluez-4.98/audio/manager.c +=================================================================== +--- bluez-4.98.orig/audio/manager.c 2012-03-21 16:27:23.000000000 +0800 ++++ bluez-4.98/audio/manager.c 2012-03-21 16:29:52.340242119 +0800 +@@ -990,6 +990,7 @@ + } + + if (adp->hfp_hs_server) { ++ g_io_channel_shutdown(adp->hfp_hs_server, TRUE, NULL); + g_io_channel_unref(adp->hfp_hs_server); + adp->hfp_hs_server = NULL; + } diff -Nru bluez-4.98/debian/patches/enable_audio_profiles.patch bluez-4.98/debian/patches/enable_audio_profiles.patch --- bluez-4.98/debian/patches/enable_audio_profiles.patch 1970-01-01 00:00:00.000000000 +0000 +++ bluez-4.98/debian/patches/enable_audio_profiles.patch 2012-03-07 19:53:23.000000000 +0000 @@ -0,0 +1,40 @@ +From: Mathieu Trudel-Lapierre +Subject: Enable the Gateway and Source audio profiles by default. +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/948613 + +Those can be disabled by the user in /etc/bluetooth/audio.conf if necessary. + +--- + audio/a2dp.c | 2 +- + audio/manager.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +Index: b/audio/manager.c +=================================================================== +--- a/audio/manager.c ++++ b/audio/manager.c +@@ -113,9 +113,9 @@ static GSList *devices = NULL; + static struct enabled_interfaces enabled = { + .hfp = TRUE, + .headset = TRUE, +- .gateway = FALSE, ++ .gateway = TRUE, + .sink = TRUE, +- .source = FALSE, ++ .source = TRUE, + .control = TRUE, + .socket = TRUE, + .media = TRUE, +Index: b/audio/a2dp.c +=================================================================== +--- a/audio/a2dp.c ++++ b/audio/a2dp.c +@@ -1390,7 +1390,7 @@ int a2dp_register(DBusConnection *conn, + { + int sbc_srcs = 1, sbc_sinks = 1; + int mpeg12_srcs = 0, mpeg12_sinks = 0; +- gboolean source = TRUE, sink = FALSE, socket = TRUE; ++ gboolean source = TRUE, sink = TRUE, socket = TRUE; + gboolean delay_reporting = FALSE; + char *str; + GError *err = NULL; diff -Nru bluez-4.98/debian/patches/series bluez-4.98/debian/patches/series --- bluez-4.98/debian/patches/series 2012-03-02 03:16:06.000000000 +0000 +++ bluez-4.98/debian/patches/series 2012-04-08 02:48:53.000000000 +0000 @@ -6,4 +6,7 @@ # 08-0001-systemd-install-systemd-unit-files.patch 09_fix_compile_with_C++.patch socket_audio.patch +enable_audio_profiles.patch +10-unregister_interface_on_exit.patch +11-explicitly_close.patch 0001-Adding-snowball-target-and-line-disc.patch