Revert upstream commit to systemd service

This commit is contained in:
Andrey Bondrov 2015-11-20 00:35:44 +10:00
parent d120dc1f2c
commit ddc3044891
2 changed files with 48 additions and 2 deletions

View file

@ -0,0 +1,38 @@
From 488fd81a0f9cb193a733ac03fba0a80c145868c9 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
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

View file

@ -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