diff --git a/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch b/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch deleted file mode 100644 index 1ea3e6f..0000000 --- a/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 3027cb7141fb65cf3eeda69c688db8c4045e2d3f Mon Sep 17 00:00:00 2001 -From: Giovanni Campagna -Date: Sat, 12 Oct 2013 17:45:25 +0200 -Subject: [PATCH] Allow using obexd without systemd in the user session - -Not all sessions run systemd --user (actually, the majority -doesn't), so the dbus daemon must be able to spawn obexd -directly, and to do so it needs the full path of the daemon. ---- - Makefile.obexd | 4 ++-- - obexd/src/org.bluez.obex.service | 4 ---- - obexd/src/org.bluez.obex.service.in | 4 ++++ - 3 files changed, 6 insertions(+), 6 deletions(-) - delete mode 100644 obexd/src/org.bluez.obex.service - create mode 100644 obexd/src/org.bluez.obex.service.in - -diff --git a/Makefile.obexd b/Makefile.obexd -index 3760867..142e7c3 100644 ---- a/Makefile.obexd -+++ b/Makefile.obexd -@@ -2,12 +2,12 @@ - if SYSTEMD - systemduserunitdir = @SYSTEMD_USERUNITDIR@ - systemduserunit_DATA = obexd/src/obex.service -+endif - - dbussessionbusdir = @DBUS_SESSIONBUSDIR@ - dbussessionbus_DATA = obexd/src/org.bluez.obex.service --endif - --EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service -+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in - - obex_plugindir = $(libdir)/obex/plugins - -diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service -deleted file mode 100644 -index a538088..0000000 ---- a/obexd/src/org.bluez.obex.service -+++ /dev/null -@@ -1,4 +0,0 @@ --[D-BUS Service] --Name=org.bluez.obex --Exec=/bin/false --SystemdService=dbus-org.bluez.obex.service -diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in -new file mode 100644 -index 0000000..9c815f2 ---- /dev/null -+++ b/obexd/src/org.bluez.obex.service.in -@@ -0,0 +1,4 @@ -+[D-BUS Service] -+Name=org.bluez.obex -+Exec=@libexecdir@/obexd -+SystemdService=dbus-org.bluez.obex.service --- -1.8.3.1 - diff --git a/10-local.rules b/10-local.rules new file mode 100644 index 0000000..f88cefe --- /dev/null +++ b/10-local.rules @@ -0,0 +1,2 @@ +# Set bluetooth power up +ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="/usr/bin/hciconfig %k up" diff --git a/bluetooth.conf b/bluetooth.conf new file mode 100644 index 0000000..3072d78 --- /dev/null +++ b/bluetooth.conf @@ -0,0 +1,3 @@ +# use "reset=1" as default, since it should be safe for recent devices and +# solves all kind of problems. +options btusb reset=1 diff --git a/bluez-5.50-allow-using-obexd-without-systemd-in-the-user-sessio.patch b/bluez-5.50-allow-using-obexd-without-systemd-in-the-user-sessio.patch new file mode 100644 index 0000000..e52d12c --- /dev/null +++ b/bluez-5.50-allow-using-obexd-without-systemd-in-the-user-sessio.patch @@ -0,0 +1,34 @@ +diff -urN bluez-5.50/Makefile.obexd bluez-5.50-patched/Makefile.obexd +--- bluez-5.50/Makefile.obexd 2018-06-01 11:37:35.000000000 +0300 ++++ bluez-5.50-patched/Makefile.obexd 2018-06-05 09:28:26.537699230 +0300 +@@ -1,12 +1,12 @@ + if SYSTEMD + systemduserunitdir = @SYSTEMD_USERUNITDIR@ + systemduserunit_DATA = obexd/src/obex.service ++endif + + dbussessionbusdir = @DBUS_SESSIONBUSDIR@ + dbussessionbus_DATA = obexd/src/org.bluez.obex.service +-endif + +-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service ++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in + + if OBEX + +diff -urN bluez-5.50/obexd/src/org.bluez.obex.service bluez-5.50-patched/obexd/src/org.bluez.obex.service +--- bluez-5.50/obexd/src/org.bluez.obex.service 2012-12-24 21:46:55.000000000 +0400 ++++ bluez-5.50-patched/obexd/src/org.bluez.obex.service 1970-01-01 03:00:00.000000000 +0300 +@@ -1,4 +0,0 @@ +-[D-BUS Service] +-Name=org.bluez.obex +-Exec=/bin/false +-SystemdService=dbus-org.bluez.obex.service +diff -urN bluez-5.50/obexd/src/org.bluez.obex.service.in bluez-5.50-patched/obexd/src/org.bluez.obex.service.in +--- bluez-5.50/obexd/src/org.bluez.obex.service.in 1970-01-01 03:00:00.000000000 +0300 ++++ bluez-5.50-patched/obexd/src/org.bluez.obex.service.in 2018-06-05 09:30:29.454367592 +0300 +@@ -0,0 +1,4 @@ ++[D-BUS Service] ++Name=org.bluez.obex ++Exec=@libexecdir@/obexd ++SystemdService=dbus-org.bluez.obex.service diff --git a/bluez.spec b/bluez.spec index 2ebd14b..ca86573 100644 --- a/bluez.spec +++ b/bluez.spec @@ -4,8 +4,8 @@ Summary: Official Linux Bluetooth protocol stack Name: bluez -Version: 5.49 -Release: 3 +Version: 5.50 +Release: 1 License: GPLv2+ Group: Communications Url: http://www.bluez.org/ @@ -14,14 +14,16 @@ Source1: pand.conf Source2: dund.conf Source3: hidd.conf Source4: rfcomm.conf -Source5: 97-bluetooth.rules +Source5: bluetooth.conf +Source6: 10-local.rules +Source7: 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 Patch1: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch # Non-upstream -Patch2: 0001-Allow-using-obexd-without-systemd-in-the-user-sessio.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 @@ -88,6 +90,8 @@ These are the official Bluetooth communication libraries for Linux. %dir %{_libdir}/bluetooth/plugins %{_libdir}/bluetooth/plugins/sixaxis.so %{_udevrulesdir}/97-bluetooth.rules +%{_sysconfdir}/udev/rules.d/10-local.rules +%{_sysconfdir}/modprobe.d/bluetooth.conf %post %_post_service bluetooth @@ -251,12 +255,16 @@ install -d %{buildroot}%{_prefix}/lib mv %{buildroot}%{_libdir}/cups %{buildroot}%{_prefix}/lib/cups %endif +mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d +install -m644 %{SOURCE5} -D %{buildroot}%{_sysconfdir}/modprobe.d/bluetooth.conf + cp test/test-* %{buildroot}%{_bindir} cp test/simple-agent %{buildroot}%{_bindir}/simple-agent rm %{buildroot}%{_sysconfdir}/udev/rules.d/*.rules install -p -m644 tools/hid2hci.rules -D %{buildroot}/lib/udev/rules.d/97-hid2hci.rules -install -m644 %{SOURCE5} -D %{buildroot}%{_udevrulesdir}/97-bluetooth.rules +install -m644 %{SOURCE6} -D %{buildroot}%{_sysconfdir}/udev/rules.d/10-local.rules +install -m644 %{SOURCE7} -D %{buildroot}%{_udevrulesdir}/97-bluetooth.rules sed s,"/usr/bin/bluetoothd","%{_libexecdir}/bluetooth/bluetoothd",g -i %{buildroot}%{_udevrulesdir}/97-bluetooth.rules #install more config files @@ -270,3 +278,5 @@ install -d -m0755 %{buildroot}%{_localstatedir}/lib/bluetooth ln -s bluetooth.service %{buildroot}%{_unitdir}/dbus-org.bluez.service sed 's|#AutoEnable=false|AutoEnable=true|' -i %{buildroot}%{_sysconfdir}/bluetooth/main.conf +sed 's|#FastConnectable = false|FastConnectable = true|' -i %{buildroot}%{_sysconfdir}/bluetooth/main.conf +