summaryrefslogtreecommitdiffstats
path: root/source/n/bluez
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2013-11-04 17:08:47 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:57:36 +0200
commit76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (patch)
tree9b98e6e193c7870cb27ac861394c1c4592850922 /source/n/bluez
parent9664bee729d487bcc0a0bc35859f8e13d5421c75 (diff)
downloadcurrent-76fc4757ac91ac7947a01fb7b53dddf9a78a01d1.tar.gz
current-76fc4757ac91ac7947a01fb7b53dddf9a78a01d1.tar.xz
Slackware 14.1slackware-14.1
Mon Nov 4 17:08:47 UTC 2013 Slackware 14.1 x86_64 stable is released! It's been another interesting release cycle here at Slackware bringing new features like support for UEFI machines, updated compilers and development tools, the switch from MySQL to MariaDB, and many more improvements throughout the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/n/bluez')
-rw-r--r--source/n/bluez/bluez-run_udev_helper.patch14
-rwxr-xr-xsource/n/bluez/bluez.SlackBuild11
-rw-r--r--source/n/bluez/config/bluetooth.sh7
3 files changed, 30 insertions, 2 deletions
diff --git a/source/n/bluez/bluez-run_udev_helper.patch b/source/n/bluez/bluez-run_udev_helper.patch
new file mode 100644
index 000000000..a3a71e6df
--- /dev/null
+++ b/source/n/bluez/bluez-run_udev_helper.patch
@@ -0,0 +1,14 @@
+Instead of automatically starting the bluetooth subsystem when devices
+are added, let's invoke a wrapper script in /lib/udev and have that
+wrapper check whether /etc/rc.d/rc.bluetooth is executable first.
+
+diff -Nur bluez-4.99/scripts/bluetooth.rules.in bluez-4.99.orig/scripts/bluetooth.rules.in
+--- bluez-4.99.orig/scripts/bluetooth.rules.in 2010-10-02 18:25:27.000000000 -0500
++++ bluez-4.99/scripts/bluetooth.rules.in 2013-06-27 22:05:55.572332197 -0500
+@@ -1,4 +1,4 @@
+ # Run helper every time a Bluetooth device appears
+ # On remove actions, bluetoothd should go away by itself
+-ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="@prefix@/sbin/bluetoothd --udev"
+-ACTION=="change", SUBSYSTEM=="bluetooth", RUN+="@prefix@/sbin/bluetoothd --udev"
++ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="/lib/udev/bluetooth.sh"
++ACTION=="change", SUBSYSTEM=="bluetooth", RUN+="/lib/udev/bluetooth.sh"
diff --git a/source/n/bluez/bluez.SlackBuild b/source/n/bluez/bluez.SlackBuild
index d77c15149..b1f31593e 100755
--- a/source/n/bluez/bluez.SlackBuild
+++ b/source/n/bluez/bluez.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for bluez - http://www.bluez.org
-# Copyright 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
PKGNAM=bluez
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -70,6 +70,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Start bluetoothd via a wrapper script to check rc.bluetooth's +/-x first
+zcat $CWD/bluez-run_udev_helper.patch.gz | patch -p1 --verbose || exit 1
+
# Enable the audio socket in audio.conf:
zcat $CWD/bluez.enable.audio.socket.diff.gz | patch -p1 --verbose || exit 1
@@ -142,6 +145,10 @@ mv $PKG/usr/share/alsa/bluetooth.conf $PKG/etc/alsa
done
)
+# Add the wrapper script
+cat $CWD/config/bluetooth.sh > $PKG/lib/udev/bluetooth.sh
+chmod 0755 $PKG/lib/udev/bluetooth.sh
+
# Add an init script
mkdir -p $PKG/etc/rc.d
cat $CWD/config/rc.bluetooth > $PKG/etc/rc.d/rc.bluetooth.new
diff --git a/source/n/bluez/config/bluetooth.sh b/source/n/bluez/config/bluetooth.sh
new file mode 100644
index 000000000..22034551c
--- /dev/null
+++ b/source/n/bluez/config/bluetooth.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Check whether /etc/rc.d/rc.bluetooth is executable before starting
+# the bluetooth subsystem for hotplugged bluetooth devices
+[ -x /etc/rc.d/rc.bluetooth ] && exec /usr/sbin/bluetoothd --udev
+exit 0
+