From ddc3044891b5e723f34225f3f8ff825475d1b07e Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Fri, 20 Nov 2015 00:35:44 +1000 Subject: [PATCH] Revert upstream commit to systemd service --- bluez-5.36-systemd-conditional.patch | 38 ++++++++++++++++++++++++++++ bluez.spec | 12 +++++++-- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 bluez-5.36-systemd-conditional.patch diff --git a/bluez-5.36-systemd-conditional.patch b/bluez-5.36-systemd-conditional.patch new file mode 100644 index 0000000..67b4910 --- /dev/null +++ b/bluez-5.36-systemd-conditional.patch @@ -0,0 +1,38 @@ +From 488fd81a0f9cb193a733ac03fba0a80c145868c9 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 20 Oct 2015 12:24:45 +0200 +Subject: systemd: Check if bluetooth is supported in the kernel + +When running a kernel without bluetooth support, bluetooth.service fails to +start with + + bluetoothd[1640]: Failed to access management interface + bluetoothd[1640]: Adapter handling initialization failed + systemd[1]: bluetooth.service: Main process exited, code=exited, status=1/FAILURE + systemd[1]: Failed to start Bluetooth service. + +This causes an unnecessary "degraded" state and more importantly breaks package +installation when the bluez package auto-starts the daemon. + +Add a condition to only start the service if /sys/class/bluetooth exists. + +https://launchpad.net/bugs/1506774 +--- + src/bluetooth.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in +index 35e9457..83e4732 100644 +--- a/src/bluetooth.service.in ++++ b/src/bluetooth.service.in +@@ -1,6 +1,7 @@ + [Unit] + Description=Bluetooth service + Documentation=man:bluetoothd(8) ++ConditionPathIsDirectory=/sys/class/bluetooth + + [Service] + Type=dbus +-- +cgit v0.11.2 + diff --git a/bluez.spec b/bluez.spec index bdc526b..33e1933 100644 --- a/bluez.spec +++ b/bluez.spec @@ -5,7 +5,7 @@ Summary: Official Linux Bluetooth protocol stack Name: bluez Version: 5.36 -Release: 2 +Release: 3 License: GPLv2+ Group: Communications Url: http://www.bluez.org/ @@ -15,6 +15,8 @@ Source7: dund.conf Source8: hidd.conf Source9: rfcomm.conf Source10: bluez-uinput.modules +# Revert this commit, it leads to huge delay on boot in Plasma 5 +Patch0: bluez-5.36-systemd-conditional.patch ## Ubuntu patches Patch2: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch @@ -192,7 +194,13 @@ BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A. %prep %setup -q -%apply_patches +%patch0 -p1 -R + +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch7 -p1 libtoolize -f -c autoreconf -fi