From 10cf7da310162ae78de120c00b7b20e2f12bdfd3 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 19 Jun 2012 22:15:52 +0200 Subject: [PATCH] bluez: update to 4.100. --- srcpkgs/bluez/bluez.rshlibs | 3 +- srcpkgs/bluez/files/org.bluez.service | 5 ++ .../03-Fix-return-code-of-hid2hci.patch | 61 ------------------- .../10-unregister_interface_on_exit.patch | 20 ------ .../bluez/patches/11-explicitly_close.patch | 17 ------ srcpkgs/bluez/patches/udev-183.patch | 11 ---- srcpkgs/bluez/template | 18 ++++-- 7 files changed, 18 insertions(+), 117 deletions(-) create mode 100644 srcpkgs/bluez/files/org.bluez.service delete mode 100644 srcpkgs/bluez/patches/03-Fix-return-code-of-hid2hci.patch delete mode 100644 srcpkgs/bluez/patches/10-unregister_interface_on_exit.patch delete mode 100644 srcpkgs/bluez/patches/11-explicitly_close.patch delete mode 100644 srcpkgs/bluez/patches/udev-183.patch diff --git a/srcpkgs/bluez/bluez.rshlibs b/srcpkgs/bluez/bluez.rshlibs index f16fa88f5b..01cd8ca5e3 100644 --- a/srcpkgs/bluez/bluez.rshlibs +++ b/srcpkgs/bluez/bluez.rshlibs @@ -2,8 +2,7 @@ libc.so.6 libusb-0.1.so.4 libglib-2.0.so.0 libdbus-1.so.3 -libpthread.so.0 -libcap-ng.so.0 libdl.so.2 libreadline.so.6 libudev.so.1 +librt.so.1 diff --git a/srcpkgs/bluez/files/org.bluez.service b/srcpkgs/bluez/files/org.bluez.service new file mode 100644 index 0000000000..dd7ae8f1ca --- /dev/null +++ b/srcpkgs/bluez/files/org.bluez.service @@ -0,0 +1,5 @@ +[D-BUS Service] +Name=org.bluez +Exec=/bin/false +User=root +SystemdService=dbus-org.bluez.service diff --git a/srcpkgs/bluez/patches/03-Fix-return-code-of-hid2hci.patch b/srcpkgs/bluez/patches/03-Fix-return-code-of-hid2hci.patch deleted file mode 100644 index 88931f6549..0000000000 --- a/srcpkgs/bluez/patches/03-Fix-return-code-of-hid2hci.patch +++ /dev/null @@ -1,61 +0,0 @@ -Description: bluez: getting a "Logitech, Inc. diNovo Edge Keyboard" working -Author: Nobuhiro Iwamatsu -Origin: Nobuhiro Iwamatsu -Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626975 - ---- tools/hid2hci.c -+++ tools/hid2hci.c -@@ -240,7 +240,7 @@ int main(int argc, char *argv[]) - enum mode mode = HCI; - const char *devpath = NULL; - int err = -1; -- int rc = 1; -+ int rc = 0; - - for (;;) { - int option; -@@ -288,13 +288,16 @@ int main(int argc, char *argv[]) - } - - udev = udev_new(); -- if (udev == NULL) -+ if (udev == NULL) { -+ rc = errno; - goto exit; -+ } - - snprintf(syspath, sizeof(syspath), "%s/%s", udev_get_sys_path(udev), devpath); - udev_dev = udev_device_new_from_syspath(udev, syspath); - if (udev_dev == NULL) { - fprintf(stderr, "error: could not find '%s'\n", devpath); -+ rc = errno; - goto exit; - } - -@@ -312,6 +315,7 @@ int main(int argc, char *argv[]) - dev = udev_device_get_parent_with_subsystem_devtype(dev, "usb", "usb_device"); - if (dev == NULL) { - fprintf(stderr, "error: could not find usb_device for '%s'\n", devpath); -+ rc = errno; - goto exit; - } - } -@@ -320,6 +324,7 @@ int main(int argc, char *argv[]) - if (handle == NULL) { - fprintf(stderr, "error: unable to handle '%s'\n", - udev_device_get_syspath(dev)); -+ rc = errno; - goto exit; - } - err = usb_switch(handle, mode); -@@ -331,6 +336,7 @@ int main(int argc, char *argv[]) - device = udev_device_get_devnode(udev_dev); - if (device == NULL) { - fprintf(stderr, "error: could not find hiddev device node\n"); -+ rc = errno; - goto exit; - } - err = hid_switch_logitech(device); --- -1.7.5.4 - diff --git a/srcpkgs/bluez/patches/10-unregister_interface_on_exit.patch b/srcpkgs/bluez/patches/10-unregister_interface_on_exit.patch deleted file mode 100644 index 659f44c512..0000000000 --- a/srcpkgs/bluez/patches/10-unregister_interface_on_exit.patch +++ /dev/null @@ -1,20 +0,0 @@ -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 - ---- sap/sap-dummy.c 2012-03-16 17:07:43.626644579 +0800 -+++ 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 --git a/srcpkgs/bluez/patches/11-explicitly_close.patch b/srcpkgs/bluez/patches/11-explicitly_close.patch deleted file mode 100644 index 3739e471cb..0000000000 --- a/srcpkgs/bluez/patches/11-explicitly_close.patch +++ /dev/null @@ -1,17 +0,0 @@ -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. - ---- audio/manager.c 2012-03-21 16:27:23.000000000 +0800 -+++ 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 --git a/srcpkgs/bluez/patches/udev-183.patch b/srcpkgs/bluez/patches/udev-183.patch deleted file mode 100644 index 9ade6e5a50..0000000000 --- a/srcpkgs/bluez/patches/udev-183.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- tools/hid2hci.c.orig 2012-05-26 16:50:39.734627361 +0200 -+++ tools/hid2hci.c 2012-05-26 16:50:52.229332774 +0200 -@@ -293,7 +293,7 @@ int main(int argc, char *argv[]) - goto exit; - } - -- snprintf(syspath, sizeof(syspath), "%s/%s", udev_get_sys_path(udev), devpath); -+ snprintf(syspath, sizeof(syspath), "%s/%s", "/sys", devpath); - udev_dev = udev_device_new_from_syspath(udev, syspath); - if (udev_dev == NULL) { - fprintf(stderr, "error: could not find '%s'\n", devpath); diff --git a/srcpkgs/bluez/template b/srcpkgs/bluez/template index 5b580e8f32..ac6e149c2e 100644 --- a/srcpkgs/bluez/template +++ b/srcpkgs/bluez/template @@ -1,21 +1,23 @@ # Template file for 'bluez' pkgname=bluez -version=4.99 -revision=7 +version=4.100 +revision=1 distfiles="${KERNEL_SITE}/bluetooth/$pkgname-$version.tar.xz" build_style=gnu-configure configure_args="--libexecdir=/lib --enable-gstreamer --enable-dund --enable-alsa --enable-usb --enable-tools --enable-bccmd --enable-hid2hci --enable-dfutool --enable-hidd --enable-pand ---enable-cups --enable-capng --enable-pnat --enable-wiimote --disable-test ---with-systemdunitdir=/lib/systemd/system" +--enable-cups --enable-pnat --enable-wiimote --disable-test +--with-systemdunitdir=/lib/systemd/system --enable-sap +--enable-datafiles --enable-dbusoob --enable-health" subpackages="bluez-alsa bluez-compat bluez-gstreamer libbluetooth libbluetooth-devel" -makedepends="pkg-config flex libudev-devel>=183 readline-devel gst-plugins-base-devel dbus-devel glib-devel libusb-compat-devel libcap-ng-devel libsndfile-devel cups-devel" +makedepends="pkg-config flex libudev-devel>=183 readline-devel dbus-devel glib-devel +gst-plugins-base-devel libusb-compat-devel libcap-ng-devel libsndfile-devel cups-devel" short_desc="Bluetooth tools and daemons" maintainer="Juan RP " homepage="http://www.bluez.org/" license="GPL-2" -checksum=41889a91a5516eec26c4e59095ceea076de158b1ac38fd0ede9034596f511d3b +checksum=5a2ac5fca9e496cb311ae0c2f2333e985bf5f504e77f1b45668fdede7e563a3b long_desc=" This package contains tools and system daemons for using Bluetooth devices. @@ -31,6 +33,10 @@ conf_files=" /etc/bluetooth/audio.conf /etc/bluetooth/serial.conf" +pre_build() { + cp ${FILESDIR}/org.bluez.service src +} + post_install() { for f in network input audio serial; do vinstall ${f}/${f}.conf 644 etc/bluetooth