Updated to 5.54

This commit is contained in:
VictorR2007 2020-03-16 22:02:18 +03:00
parent f71eb6c143
commit d8ea31026d
5 changed files with 23 additions and 145 deletions

View file

@ -1,59 +1,34 @@
http://www.spinics.net/lists/linux-bluetooth/msg38490.html diff -ruN bluez-5.54_orig/Makefile.obexd bluez-5.54/Makefile.obexd
--- bluez-5.54_orig/Makefile.obexd 2019-10-31 16:12:55.000000000 +0900
From 3027cb7141fb65cf3eeda69c688db8c4045e2d3f Mon Sep 17 00:00:00 2001 +++ bluez-5.54/Makefile.obexd 2020-03-16 18:40:01.343336667 +0900
From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org> @@ -1,12 +1,12 @@
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 if SYSTEMD
systemduserunitdir = @SYSTEMD_USERUNITDIR@ systemduserunitdir = $(SYSTEMD_USERUNITDIR)
systemduserunit_DATA = obexd/src/obex.service systemduserunit_DATA = obexd/src/obex.service
+endif +endif
dbussessionbusdir = @DBUS_SESSIONBUSDIR@ dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
dbussessionbus_DATA = obexd/src/org.bluez.obex.service dbussessionbus_DATA = obexd/src/org.bluez.obex.service
-endif -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
+EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in +EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
obex_plugindir = $(libdir)/obex/plugins if OBEX
diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service diff -ruN bluez-5.54_orig/obexd/src/org.bluez.obex.service bluez-5.54/obexd/src/org.bluez.obex.service
deleted file mode 100644 --- bluez-5.54_orig/obexd/src/org.bluez.obex.service 2012-12-25 03:46:55.000000000 +1000
index a538088..0000000 +++ bluez-5.54/obexd/src/org.bluez.obex.service 1970-01-01 09:00:00.000000000 +0900
--- a/obexd/src/org.bluez.obex.service
+++ /dev/null
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
-[D-BUS Service] -[D-BUS Service]
-Name=org.bluez.obex -Name=org.bluez.obex
-Exec=/bin/false -Exec=/bin/false
-SystemdService=dbus-org.bluez.obex.service -SystemdService=dbus-org.bluez.obex.service
diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in diff -ruN bluez-5.54_orig/obexd/src/org.bluez.obex.service.in bluez-5.54/obexd/src/org.bluez.obex.service.in
new file mode 100644 --- bluez-5.54_orig/obexd/src/org.bluez.obex.service.in 1970-01-01 09:00:00.000000000 +0900
index 0000000..9c815f2 +++ bluez-5.54/obexd/src/org.bluez.obex.service.in 2020-03-16 18:38:10.868126666 +0900
--- /dev/null
+++ b/obexd/src/org.bluez.obex.service.in
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
+[D-BUS Service] +[D-BUS Service]
+Name=org.bluez.obex +Name=org.bluez.obex
+Exec=@libexecdir@/obexd +Exec=@libexecdir@/obexd
+SystemdService=dbus-org.bluez.obex.service +SystemdService=dbus-org.bluez.obex.service
--
1.8.3.1

View file

@ -1,7 +1,7 @@
From f7861d27fbcbc519f57d8496aa9486f487908821 Mon Sep 17 00:00:00 2001 From 90b72b787a6ae6b9b0bf8ece238e108e8607a433 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net> From: Bastien Nocera <hadess@hadess.net>
Date: Sat, 9 Nov 2013 18:13:43 +0100 Date: Sat, 9 Nov 2013 18:13:43 +0100
Subject: [PATCH 1/5] obex: Use GLib helper function to manipulate paths Subject: [PATCH 1/2] obex: Use GLib helper function to manipulate paths
Instead of trying to do it by hand. This also makes sure that Instead of trying to do it by hand. This also makes sure that
relative paths aren't used by the agent. relative paths aren't used by the agent.
@ -10,10 +10,10 @@ relative paths aren't used by the agent.
1 file changed, 5 insertions(+), 5 deletions(-) 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/obexd/src/manager.c b/obexd/src/manager.c diff --git a/obexd/src/manager.c b/obexd/src/manager.c
index cec8a39..f18896e 100644 index f84384ae4..285c07c37 100644
--- a/obexd/src/manager.c --- a/obexd/src/manager.c
+++ b/obexd/src/manager.c +++ b/obexd/src/manager.c
@@ -651,14 +651,14 @@ static void agent_reply(DBusPendingCall *call, void *user_data) @@ -650,14 +650,14 @@ static void agent_reply(DBusPendingCall *call, void *user_data)
DBUS_TYPE_STRING, &name, DBUS_TYPE_STRING, &name,
DBUS_TYPE_INVALID)) { DBUS_TYPE_INVALID)) {
/* Splits folder and name */ /* Splits folder and name */
@ -34,5 +34,5 @@ index cec8a39..f18896e 100644
} }
-- --
1.8.4.2 2.14.1

View file

@ -4,8 +4,8 @@
Summary: Official Linux Bluetooth protocol stack Summary: Official Linux Bluetooth protocol stack
Name: bluez Name: bluez
Version: 5.48 Version: 5.54
Release: 4 Release: 1
Epoch: 1 Epoch: 1
License: GPLv2+ License: GPLv2+
Group: Communications Group: Communications
@ -25,9 +25,6 @@ Patch1: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
Patch2: 0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch Patch2: 0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
Patch3: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch Patch3: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
Patch4: 0004-agent-Assert-possible-infinite-loop.patch Patch4: 0004-agent-Assert-possible-infinite-loop.patch
# Upstream
Patch5: fix-lp1750308-upstream-commit-1bf03369.patch
Patch6: fix_build_with_5.2-rc2_kernel_headers.patch
BuildRequires: bison BuildRequires: bison
BuildRequires: flex BuildRequires: flex
BuildRequires: cups-devel BuildRequires: cups-devel
@ -47,7 +44,6 @@ BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(udev) >= 186 BuildRequires: pkgconfig(udev) >= 186
Requires(pre): rpm-helper Requires(pre): rpm-helper
Suggests: obex-data-server
Obsoletes: bluez-alsa < 5.0 Obsoletes: bluez-alsa < 5.0
Obsoletes: bluez-gstreamer < 5.0 Obsoletes: bluez-gstreamer < 5.0
@ -92,6 +88,7 @@ These are the official Bluetooth communication libraries for Linux.
%config(noreplace) %{_sysconfdir}/bluetooth %config(noreplace) %{_sysconfdir}/bluetooth
%{_datadir}/dbus-1/system-services/org.bluez.service %{_datadir}/dbus-1/system-services/org.bluez.service
%{_datadir}/dbus-1/services/org.bluez.obex.service %{_datadir}/dbus-1/services/org.bluez.obex.service
%{_datadir}/zsh/site-functions/_bluetoothctl
%{_localstatedir}/lib/bluetooth %{_localstatedir}/lib/bluetooth
%dir %{_libdir}/bluetooth %dir %{_libdir}/bluetooth
%dir %{_libdir}/bluetooth/plugins %dir %{_libdir}/bluetooth/plugins
@ -209,8 +206,6 @@ BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1
%patch6 -p1
libtoolize -f -c libtoolize -f -c
autoreconf -fi autoreconf -fi
@ -260,6 +255,8 @@ rm %{buildroot}%{_sysconfdir}/udev/rules.d/*.rules
install -p -m644 tools/hid2hci.rules -D %{buildroot}/lib/udev/rules.d/97-hid2hci.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 %{SOURCE5} -D %{buildroot}%{_udevrulesdir}/97-bluetooth.rules
sed s,"/usr/bin/bluetoothd","%{_libexecdir}/bluetooth/bluetoothd",g -i %{buildroot}%{_udevrulesdir}/97-bluetooth.rules sed s,"/usr/bin/bluetoothd","%{_libexecdir}/bluetooth/bluetoothd",g -i %{buildroot}%{_udevrulesdir}/97-bluetooth.rules
sed s,"/bin/false","%{_libexecdir}/bluetooth/bluetoothd",g -i %{buildroot}%{_datadir}/dbus-1/system-services/org.bluez.service
sed s,"@libexecdir@","%{_libexecdir}/bluetooth",g -i %{buildroot}%{_datadir}/dbus-1/services/org.bluez.obex.service
#install more config files #install more config files
install -m0644 profiles/network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/ install -m0644 profiles/network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/

View file

@ -1,37 +0,0 @@
From 1bf0336942fd093a0f8fa890eb026e1dc379f35f Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Tue, 20 Feb 2018 11:11:26 +0200
Subject: [PATCH] shared/io: Don't process HUP cond before others
When a HUP happens there maybe data left to be processed so the
disconnect handler shall be called last.
---
src/shared/io-glib.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/shared/io-glib.c b/src/shared/io-glib.c
index 6687a6b28..d62de4e10 100644
--- a/src/shared/io-glib.c
+++ b/src/shared/io-glib.c
@@ -179,6 +179,7 @@ static struct io_watch *watch_new(struct io *io, GIOCondition cond,
io_destroy_func_t destroy)
{
struct io_watch *watch;
+ int prio;
watch = g_try_new0(struct io_watch, 1);
if (!watch)
@@ -189,7 +190,9 @@ static struct io_watch *watch_new(struct io *io, GIOCondition cond,
watch->destroy = destroy;
watch->user_data = user_data;
- watch->id = g_io_add_watch_full(io->channel, G_PRIORITY_DEFAULT,
+ prio = cond == G_IO_HUP ? G_PRIORITY_DEFAULT_IDLE : G_PRIORITY_DEFAULT;
+
+ watch->id = g_io_add_watch_full(io->channel, prio,
cond | G_IO_ERR | G_IO_NVAL,
watch_callback, watch,
watch_destroy);
--
2.15.1

View file

@ -1,57 +0,0 @@
The 32-bit SIOCGSTAMP has been deprecated. Use the deprecated name
to fix the build.
---
tools/l2test.c | 6 +++++-
tools/rctest.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/tools/l2test.c b/tools/l2test.c
index e755ac881..e787c2ce2 100644
--- a/tools/l2test.c
+++ b/tools/l2test.c
@@ -55,6 +55,10 @@
#define BREDR_DEFAULT_PSM 0x1011
#define LE_DEFAULT_PSM 0x0080
+#ifndef SIOCGSTAMP_OLD
+#define SIOCGSTAMP_OLD SIOCGSTAMP
+#endif
+
/* Test modes */
enum {
SEND,
@@ -907,7 +911,7 @@ static void recv_mode(int sk)
if (timestamp) {
struct timeval tv;
- if (ioctl(sk, SIOCGSTAMP, &tv) < 0) {
+ if (ioctl(sk, SIOCGSTAMP_OLD, &tv) < 0) {
timestamp = 0;
memset(ts, 0, sizeof(ts));
} else {
diff --git a/tools/rctest.c b/tools/rctest.c
index 94490f462..bc8ed875d 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -50,6 +50,10 @@
#include "src/shared/util.h"
+#ifndef SIOCGSTAMP_OLD
+#define SIOCGSTAMP_OLD SIOCGSTAMP
+#endif
+
/* Test modes */
enum {
SEND,
@@ -505,7 +509,7 @@ static void recv_mode(int sk)
if (timestamp) {
struct timeval tv;
- if (ioctl(sk, SIOCGSTAMP, &tv) < 0) {
+ if (ioctl(sk, SIOCGSTAMP_OLD, &tv) < 0) {
timestamp = 0;
memset(ts, 0, sizeof(ts));
} else {
--
2.21.0