From 53f491b33ee2de8e710f241577dda25ff52ac7f6 Mon Sep 17 00:00:00 2001 From: VictorR2007 Date: Wed, 13 Mar 2019 23:18:30 +0300 Subject: [PATCH] Rebuild with new build options --- ...-agent-Assert-possible-infinite-loop.patch | 25 ++++++++++++ bluez-5.36-systemd-conditional.patch | 38 +++++++++++++++++++ bluez.spec | 16 +++++--- 3 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 0004-agent-Assert-possible-infinite-loop.patch create mode 100644 bluez-5.36-systemd-conditional.patch diff --git a/0004-agent-Assert-possible-infinite-loop.patch b/0004-agent-Assert-possible-infinite-loop.patch new file mode 100644 index 0000000..2746e0c --- /dev/null +++ b/0004-agent-Assert-possible-infinite-loop.patch @@ -0,0 +1,25 @@ +From 67e5477687a2753d3f7b300bcfdc74464d8ad41f Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Mon, 9 Dec 2013 18:04:56 +0100 +Subject: [PATCH 4/5] agent: Assert possible infinite loop + +--- + src/agent.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/agent.c b/src/agent.c +index bcba969..b292881 100644 +--- a/src/agent.c ++++ b/src/agent.c +@@ -203,6 +203,8 @@ void agent_unref(struct agent *agent) + if (agent->ref > 0) + return; + ++ g_assert (agent->ref == 0); ++ + if (agent->request) { + DBusError err; + agent_pincode_cb pincode_cb; +-- +1.8.4.2 + 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 b2d384f..28b5058 100644 --- a/bluez.spec +++ b/bluez.spec @@ -5,7 +5,7 @@ Summary: Official Linux Bluetooth protocol stack Name: bluez Version: 5.50 -Release: 6 +Release: 7 License: GPLv2+ Group: Communications Url: http://www.bluez.org/ @@ -16,11 +16,14 @@ Source3: hidd.conf Source4: rfcomm.conf Source5: 97-bluetooth.rules 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 -Patch0: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch +Patch1: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch # Non-upstream -Patch1: bluez-5.50-allow-using-obexd-without-systemd-in-the-user-sessio.patch -Patch2: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch +Patch2: bluez-5.50-allow-using-obexd-without-systemd-in-the-user-sessio.patch +Patch3: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch +Patch4: 0004-agent-Assert-possible-infinite-loop.patch BuildRequires: bison BuildRequires: flex BuildRequires: cups-devel @@ -198,9 +201,11 @@ BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A. %prep %setup -q -%patch0 -p1 +%patch0 -p1 -R %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 libtoolize -f -c autoreconf -fi @@ -271,3 +276,4 @@ ln -s bluetooth.service %{buildroot}%{_unitdir}/dbus-org.bluez.service sed 's|#AutoEnable=false|AutoEnable=true|' -i %{buildroot}%{_sysconfdir}/bluetooth/main.conf +%changelog