Accepting request 754387 from Base:System

Update to bluez 5.52

This is an update fixing security issues in hcidump.

If we cannot get this in, we need to push an security update for the current bluez package in factory somehow (ship the leap 15.1 package for factory or something like that).

OBS-URL: https://build.opensuse.org/request/show/754387
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bluez?expand=0&rev=165
This commit is contained in:
Dominique Leuenberger 2019-12-11 10:58:44 +00:00 committed by Git OBS Bridge
commit bc7437b6cf
18 changed files with 210 additions and 5302 deletions

View File

@ -1,26 +0,0 @@
From b912306ae756eaf75caa1ab7e04e3112fac4a01c Mon Sep 17 00:00:00 2001
From: Stefan Seyfried <seife+dev@b1-systems.com>
Date: Mon, 11 Dec 2017 22:52:28 +0100
Subject: [PATCH] obexd: use AM_LDFLAGS for linking
without this, --enable-pie does not work for obexd
---
Makefile.obexd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.obexd b/Makefile.obexd
index 2e33cbc72..86c395305 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
@@ -83,7 +83,7 @@ obexd_src_obexd_LDADD = lib/libbluetooth-internal.la \
gdbus/libgdbus-internal.la \
@ICAL_LIBS@ @DBUS_LIBS@ @GLIB_LIBS@ -ldl
-obexd_src_obexd_LDFLAGS = -Wl,--export-dynamic
+obexd_src_obexd_LDFLAGS = $(AM_LDFLAGS) -Wl,--export-dynamic
obexd_src_obexd_CFLAGS = $(AM_CFLAGS) @GLIB_CFLAGS@ @DBUS_CFLAGS@ \
@ICAL_CFLAGS@ -DOBEX_PLUGIN_BUILTIN \
--
2.15.1

View File

@ -1,77 +0,0 @@
From 477ecca127c529611adbc53f08039cefaf86305d Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Tue, 26 Jun 2018 13:37:33 +0300
Subject: [PATCH] policy: Add logic to connect a Sink
References: boo#1131772
Patch-mainline: 5.51
Git-commit: 477ecca127c529611adbc53f08039cefaf86305d
If HFP/HSP HS connects and the device also supports a Sink connect it
as well since some devices (e.g. Sony MW600) may not connect it
automatically.
Acked-by: Michal Suchanek <msuchanek@suse.de>
---
plugins/policy.c | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/plugins/policy.c b/plugins/policy.c
index 1f5a506a2c2f..de51e58b91dc 100644
--- a/plugins/policy.c
+++ b/plugins/policy.c
@@ -297,6 +297,42 @@ static void sink_cb(struct btd_service *service, btd_service_state_t old_state,
}
}
+static void hs_cb(struct btd_service *service, btd_service_state_t old_state,
+ btd_service_state_t new_state)
+{
+ struct btd_device *dev = btd_service_get_device(service);
+ struct policy_data *data;
+ struct btd_service *sink;
+
+ /* If the device supports Sink set a timer to connect it as well */
+ sink = btd_device_get_service(dev, A2DP_SINK_UUID);
+ if (sink == NULL)
+ return;
+
+ data = policy_get_data(dev);
+
+ switch (new_state) {
+ case BTD_SERVICE_STATE_UNAVAILABLE:
+ break;
+ case BTD_SERVICE_STATE_DISCONNECTED:
+ break;
+ case BTD_SERVICE_STATE_CONNECTING:
+ break;
+ case BTD_SERVICE_STATE_CONNECTED:
+ /* Check if service initiate the connection then proceed
+ * immediately otherwise set timer
+ */
+ if (old_state == BTD_SERVICE_STATE_CONNECTING)
+ policy_connect(data, sink);
+ else if (btd_service_get_state(sink) !=
+ BTD_SERVICE_STATE_CONNECTED)
+ policy_set_sink_timer(data);
+ break;
+ case BTD_SERVICE_STATE_DISCONNECTING:
+ break;
+ }
+}
+
static gboolean policy_connect_tg(gpointer user_data)
{
struct policy_data *data = user_data;
@@ -615,6 +651,9 @@ static void service_cb(struct btd_service *service,
controller_cb(service, old_state, new_state);
else if (g_str_equal(profile->remote_uuid, AVRCP_TARGET_UUID))
target_cb(service, old_state, new_state);
+ else if (g_str_equal(profile->remote_uuid, HFP_HS_UUID) ||
+ g_str_equal(profile->remote_uuid, HSP_HS_UUID))
+ hs_cb(service, old_state, new_state);
/*
* Return if the reconnection feature is not enabled (all
--
2.20.1

View File

@ -1,67 +0,0 @@
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 7 Jun 2019 09:51:33 +0200
Subject: tools: Fix build after y2038 changes in glibc
Git-repo: git://git.kernel.org/pub/scm/bluetooth/bluez.git
Git-commit: f36f71f60b1e68c0f12e615b9b128d089ec3dd19
Patch-mainline: yes
The 32-bit SIOCGSTAMP has been deprecated. Use the deprecated name
to fix the build.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
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

View File

@ -1,3 +1,7 @@
# Upstream suggests to use btmon instead of hcidump and does not want those patches
# => PATCH-FIX-OPENSUSE for those two :-)
# fix some memory leak with malformed packet (reported upstream but not yet fixed)
From 5ca9510314d15d562e9ef5515a5483be5f28258d Mon Sep 17 00:00:00 2001
From: "Cho, Yu-Chen" <acho@suse.com>
Date: Wed, 21 Mar 2018 17:32:45 +0800

View File

@ -1,3 +1,7 @@
# Upstream suggests to use btmon instead of hcidump and does not want those patches
# => PATCH-FIX-OPENSUSE for those two :-)
# fix some memory leak with malformed packet (reported upstream but not yet fixed)
From 00f50518f232c758855ac9884a841f707f41a301 Mon Sep 17 00:00:00 2001
From: "Cho, Yu-Chen" <acho@suse.com>
Date: Thu, 3 May 2018 18:52:19 +0800

8
README.md Normal file
View File

@ -0,0 +1,8 @@
# Build the openSUSE bluez package
* copy the `_service` into your new OBS project directory
* `osc service disabledrun`
* `osc build`
That's it.

9
_service Normal file
View File

@ -0,0 +1,9 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/seifes-opensuse-packages/bluez.git</param>
<param name="scm">git</param>
<param name="extract">*.*</param>
<param name="version">_none_</param>
</service>
<service mode="disabled" name="download_files"/>
</services>

View File

@ -1,3 +1,5 @@
# fix some logitech HID devices, bnc#681049, bnc#850478 --seife+obs@b1-systems.com
Apparently some Logitech devices need different rules.
https://bugzilla.novell.com/show_bug.cgi?id=681049
https://bugzilla.novell.com/show_bug.cgi?id=850478

View File

@ -1,22 +0,0 @@
diff --git a/Makefile.am b/Makefile.am
index 84e67a4..cac5283 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -395,7 +395,7 @@ unit_test_lib_SOURCES = unit/test-lib.c
unit_test_lib_LDADD = src/libshared-glib.la \
lib/libbluetooth-internal.la @GLIB_LIBS@
-unit_tests += unit/test-gatt
+#unit_tests += unit/test-gatt
unit_test_gatt_SOURCES = unit/test-gatt.c
unit_test_gatt_LDADD = src/libshared-glib.la \
@@ -424,7 +424,7 @@ unit_test_gattrib_LDADD = lib/libbluetooth-internal.la \
@GLIB_LIBS@ @DBUS_LIBS@ -ldl -lrt
if MIDI
-unit_tests += unit/test-midi
+#unit_tests += unit/test-midi
unit_test_midi_CFLAGS = $(AM_CFLAGS) @ALSA_CFLAGS@ -DMIDI_TEST
unit_test_midi_SOURCES = unit/test-midi.c \
profiles/midi/libmidi.h \

File diff suppressed because it is too large Load Diff

View File

@ -1,321 +0,0 @@
From 0be5246170f76a476101aa2dd7e748937363a1dc Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Fri, 11 Jan 2019 10:16:17 -0300
Subject: unit: Fix fsanitize-address-use-after-scope with GCC 9
Raw data payload must be copied since the declaration goes out of
scope:
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=202213
---
From: Antoine Belvire <antoine.belvire@opensuse.org>
Trivial rebase to apply on bluez 5.50 (only test-gatt.c hunk #4 modified).
---
unit/test-avctp.c | 9 +++++++--
unit/test-avdtp.c | 13 +++++++++----
unit/test-avrcp.c | 15 ++++++++++-----
unit/test-gatt.c | 11 +++++++++--
unit/test-hfp.c | 13 +++++++++----
unit/test-hog.c | 10 +++++-----
unit/test-sdp.c | 6 +++---
7 files changed, 52 insertions(+), 25 deletions(-)
diff --git a/unit/test-avctp.c b/unit/test-avctp.c
index 60fd6ad71..c92618bab 100644
--- a/unit/test-avctp.c
+++ b/unit/test-avctp.c
@@ -43,7 +43,7 @@
struct test_pdu {
bool valid;
- const uint8_t *data;
+ uint8_t *data;
size_t size;
};
@@ -66,7 +66,7 @@ struct context {
#define raw_pdu(args...) \
{ \
.valid = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
}
@@ -84,6 +84,11 @@ struct context {
static void test_free(gconstpointer user_data)
{
const struct test_data *data = user_data;
+ struct test_pdu *pdu;
+ int i;
+
+ for (i = 0; (pdu = &data->pdu_list[i]) && pdu->valid; i++)
+ g_free(pdu->data);
g_free(data->test_name);
g_free(data->pdu_list);
diff --git a/unit/test-avdtp.c b/unit/test-avdtp.c
index 176852ae7..13c03d037 100644
--- a/unit/test-avdtp.c
+++ b/unit/test-avdtp.c
@@ -47,7 +47,7 @@
struct test_pdu {
bool valid;
bool fragmented;
- const uint8_t *data;
+ uint8_t *data;
size_t size;
};
@@ -61,7 +61,7 @@ struct test_data {
#define raw_pdu(args...) \
{ \
.valid = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
}
@@ -69,7 +69,7 @@ struct test_data {
{ \
.valid = true, \
.fragmented = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
}
@@ -81,7 +81,7 @@ struct test_data {
static struct test_data data; \
data.test_name = g_strdup(name); \
data.pdu_list = g_memdup(pdus, sizeof(pdus)); \
- tester_add(name, &data, NULL, function, NULL); \
+ tester_add(name, &data, NULL, function, NULL); \
} while (0)
struct context {
@@ -102,6 +102,11 @@ struct context {
static void test_free(gconstpointer user_data)
{
const struct test_data *data = user_data;
+ struct test_pdu *pdu;
+ int i;
+
+ for (i = 0; (pdu = &data->pdu_list[i]) && pdu->valid; i++)
+ g_free(pdu->data);
g_free(data->test_name);
g_free(data->pdu_list);
diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index 9ffd44cfd..adf25f002 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -49,7 +49,7 @@ struct test_pdu {
bool fragmented;
bool continuing;
bool browse;
- const uint8_t *data;
+ uint8_t *data;
size_t size;
};
@@ -74,7 +74,7 @@ struct context {
#define raw_pdu(args...) \
{ \
.valid = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
}
@@ -82,7 +82,7 @@ struct context {
{ \
.valid = true, \
.browse = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
}
@@ -90,7 +90,7 @@ struct context {
{ \
.valid = true, \
.fragmented = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
}
@@ -98,7 +98,7 @@ struct context {
{ \
.valid = true, \
.continuing = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
}
@@ -116,6 +116,11 @@ struct context {
static void test_free(gconstpointer user_data)
{
const struct test_data *data = user_data;
+ struct test_pdu *pdu;
+ int i;
+
+ for (i = 0; (pdu = &data->pdu_list[i]) && pdu->valid; i++)
+ g_free(pdu->data);
g_free(data->test_name);
g_free(data->pdu_list);
diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index d8d007386..e35271b61 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -48,7 +48,7 @@
struct test_pdu {
bool valid;
- const uint8_t *data;
+ uint8_t *data;
size_t size;
};
@@ -86,7 +86,7 @@ struct context {
#define raw_pdu(args...) \
{ \
.valid = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
}
@@ -306,6 +306,11 @@ static bt_uuid_t uuid_char_128 = {
static void test_free(gconstpointer user_data)
{
const struct test_data *data = user_data;
+ struct test_pdu *pdu;
+ int i;
+
+ for (i = 0; (pdu = &data->pdu_list[i]) && pdu->valid; i++)
+ g_free(pdu->data);
g_free(data->test_name);
g_free(data->pdu_list);
@@ -1911,6 +1916,8 @@ static void test_server(gconstpointer data)
g_assert_cmpint(len, ==, pdu.size);
util_hexdump('<', pdu.data, len, test_debug, "GATT: ");
+
+ g_free(pdu.data);
}
static void test_search_primary(gconstpointer data)
diff --git a/unit/test-hfp.c b/unit/test-hfp.c
index f2b9622c2..890eee659 100644
--- a/unit/test-hfp.c
+++ b/unit/test-hfp.c
@@ -43,7 +43,7 @@ struct context {
struct test_pdu {
bool valid;
- const uint8_t *data;
+ uint8_t *data;
size_t size;
enum hfp_gw_cmd_type type;
bool fragmented;
@@ -63,7 +63,7 @@ struct test_data {
#define raw_pdu(args...) \
{ \
.valid = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
}
@@ -75,7 +75,7 @@ struct test_data {
#define type_pdu(cmd_type, args...) \
{ \
.valid = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
.type = cmd_type, \
}
@@ -83,7 +83,7 @@ struct test_data {
#define frg_pdu(args...) \
{ \
.valid = true, \
- .data = data(args), \
+ .data = g_memdup(data(args), sizeof(data(args))), \
.size = sizeof(data(args)), \
.fragmented = true, \
}
@@ -119,6 +119,11 @@ struct test_data {
static void test_free(gconstpointer user_data)
{
const struct test_data *data = user_data;
+ struct test_pdu *pdu;
+ int i;
+
+ for (i = 0; (pdu = &data->pdu_list[i]) && pdu->valid; i++)
+ g_free(pdu->data);
g_free(data->test_name);
g_free(data->pdu_list);
diff --git a/unit/test-hog.c b/unit/test-hog.c
index 37d3abe3f..e257fbd88 100644
--- a/unit/test-hog.c
+++ b/unit/test-hog.c
@@ -69,11 +69,11 @@ struct context {
#define data(args...) ((const unsigned char[]) { args })
-#define raw_pdu(args...) \
-{ \
- .valid = true, \
- .data = data(args), \
- .size = sizeof(data(args)),\
+#define raw_pdu(args...) \
+{ \
+ .valid = true, \
+ .data = g_memdup(data(args), sizeof(data(args))), \
+ .size = sizeof(data(args)), \
}
#define false_pdu() \
diff --git a/unit/test-sdp.c b/unit/test-sdp.c
index 66da038cd..03501d021 100644
--- a/unit/test-sdp.c
+++ b/unit/test-sdp.c
@@ -60,14 +60,14 @@ struct test_data {
#define raw_pdu(args...) \
{ \
.valid = true, \
- .raw_data = raw_data(args), \
+ .raw_data = g_memdup(raw_data(args), sizeof(raw_data(args))), \
.raw_size = sizeof(raw_data(args)), \
}
#define raw_pdu_cont(cont, args...) \
{ \
.valid = true, \
- .raw_data = raw_data(args), \
+ .raw_data = g_memdup(raw_data(args), sizeof(raw_data(args))), \
.raw_size = sizeof(raw_data(args)), \
.cont_len = cont, \
}
@@ -105,7 +105,7 @@ struct test_data_de {
#define define_test_de_attr(name, input, exp) \
do { \
static struct test_data_de data; \
- data.input_data = input; \
+ data.input_data = g_memdup(input, sizeof(input)); \
data.input_size = sizeof(input); \
data.expected = exp; \
tester_add("/sdp/DE/ATTR/" name, &data, NULL, \
--
cgit 1.2-0.3.lf.el7

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911
size 1755384

3
bluez-5.52.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f7144ce2039202cfac18ccb52426efea11c98e4f6e1bb8041bcb994b8378560a
size 1957504

View File

@ -1,26 +1,26 @@
Index: bluez-5.44/Makefile.in
Index: b/Makefile.in
===================================================================
--- bluez-5.44.orig/Makefile.in
+++ bluez-5.44/Makefile.in
@@ -2710,7 +2710,7 @@ unit_tests = $(am__append_48) unit/test-
--- a/Makefile.in
+++ b/Makefile.in
@@ -3439,7 +3439,7 @@ unit_tests = $(am__append_54) unit/test-
@DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \
@DEPRECATED_TRUE@@READLINE_TRUE@ src/libshared-glib.la @GLIB_LIBS@ -lreadline
@DEPRECATED_TRUE@@READLINE_TRUE@ src/libshared-glib.la $(GLIB_LIBS) -lreadline
-@CUPS_TRUE@cupsdir = $(libdir)/cups/backend
+@CUPS_TRUE@cupsdir = $(libexecdir)/../cups/backend
+@CUPS_TRUE@cupsdir = $(libexecdir)/cups/backend
@CUPS_TRUE@profiles_cups_bluetooth_SOURCES = profiles/cups/main.c \
@CUPS_TRUE@ profiles/cups/cups.h \
@CUPS_TRUE@ profiles/cups/sdp.c \
Index: bluez-5.44/Makefile.tools
Index: b/Makefile.tools
===================================================================
--- bluez-5.44.orig/Makefile.tools
+++ bluez-5.44/Makefile.tools
@@ -388,7 +388,7 @@ endif
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -441,7 +441,7 @@ endif
endif
if CUPS
-cupsdir = $(libdir)/cups/backend
+cupsdir = $(libexecdir)/../cups/backend
+cupsdir = $(libexecdir)/cups/backend
cups_PROGRAMS = profiles/cups/bluetooth

View File

@ -0,0 +1,33 @@
Index: b/Makefile.am
===================================================================
--- a/Makefile.am
+++ b/Makefile.am
@@ -481,7 +481,8 @@ unit_test_lib_SOURCES = unit/test-lib.c
unit_test_lib_LDADD = src/libshared-glib.la \
lib/libbluetooth-internal.la $(GLIB_LIBS)
-unit_tests += unit/test-gatt
+# hangs forever in OBS where AF_ALG is not supported.
+#unit_tests += unit/test-gatt
unit_test_gatt_SOURCES = unit/test-gatt.c
unit_test_gatt_LDADD = src/libshared-glib.la \
@@ -511,7 +512,8 @@ unit_test_gattrib_LDADD = lib/libbluetoo
$(GLIB_LIBS) $(DBUS_LIBS) -ldl -lrt
if MIDI
-unit_tests += unit/test-midi
+# fails on i386??? or just random?
+#unit_tests += unit/test-midi
unit_test_midi_CPPFLAGS = $(AM_CPPFLAGS) $(ALSA_CFLAGS) -DMIDI_TEST
unit_test_midi_SOURCES = unit/test-midi.c \
profiles/midi/libmidi.h \
@@ -521,7 +523,7 @@ unit_test_midi_LDADD = src/libshared-gli
endif
if MESH
-unit_tests += unit/test-mesh-crypto
+#unit_tests += unit/test-mesh-crypto
unit_test_mesh_crypto_CPPFLAGS = $(ell_cflags)
unit_test_mesh_crypto_SOURCES = unit/test-mesh-crypto.c \
mesh/crypto.h ell/internal ell/ell.h \

View File

@ -1,3 +1,78 @@
-------------------------------------------------------------------
Thu Nov 21 16:51:16 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- BuildIgnore shared-mime-info, pulled in by libgio-2_0-0, not
required for building, but causes a build loop.
- Add bcond for mesh, also enable mesh on Leap 15.2/SLE15SP2.
- Properly conditionalize all files which are only built with enabled
mesh functionality, fixes build on Leap 15.1 and earlier.
-------------------------------------------------------------------
Thu Nov 7 11:14:13 UTC 2019 - Stefan Seyfried <seife+obs@b1-systems.com>
- fix udev directory from %_libexecdir to %_prefix/lib
-------------------------------------------------------------------
Mon Nov 4 21:22:20 UTC 2019 - Stefan Seyfried <seife+obs@b1-systems.com>
- update to version 5.52:
* Fix issue with AVDTP session disconnect timeout handling.
* Mark media endpoint APIs as stable interfaces.
- remove obsolete 0001-mesh-Fix-segmentation-fault-on-Join-call.patch
- disable one more segfaulting patch
-------------------------------------------------------------------
Mon Oct 7 14:56:28 UTC 2019 - Stefan Seyfried <seife+obs@b1-systems.com>
- add 0001-mesh-Fix-segmentation-fault-on-Join-call.patch
(boo#1152672)
-------------------------------------------------------------------
Sun Oct 6 13:24:51 UTC 2019 - Stefan Seyfried <seife+obs@b1-systems.com>
- add _service to use github.com/seifes-obs-packages/bluez.git
as source for the package
-------------------------------------------------------------------
Fri Oct 4 10:50:15 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Combine multiple %service_* to reduce generated boilerplate.
-------------------------------------------------------------------
Wed Oct 2 08:33:56 UTC 2019 - Stefan Seyfried <seife+obs@b1-systems.com>
- disable mesh service due to security concerns, see boo#1151518
- add README-mesh.SUSE to explain the issue
- remove no longer necessary temporary-rpmlintrc
-------------------------------------------------------------------
Fri Sep 20 19:32:43 UTC 2019 - Stefan Seyfried <seife+obs@b1-systems.com>
- update to version 5.51:
* Fix issue with first agent not being registered as default.
* Fix issue with loading devices without Service Changed CCC.
* Fix issue with GATT client and extended property reading.
* Fix issue with handling GATT client invalid read behavior.
* Fix issue with handling GATT disconnect handler removal.
* Fix issue with missing GATT/GAP service records for SDP.
* Fix issue with checking SDP continuation state length.
* Fix issue with HID device removal on HoG disconnect.
* Fix issue with AVDTP and session destroy handling.
* Fix issue with AVCTP and output MTU accounting.
* Fix issue with AVRCP and creating media items.
* Add support for GATT database caching feature.
* Add experimental support for Bluetooth Mesh Profile.
- removed obsoleted patches:
* 0001-obexd-use-AM_LDFLAGS-for-linking.patch
* 0001-policy-Add-logic-to-connect-a-Sink.patch
* 0001-tools-Fix-build-after-y2038-changes-in-glibc.patch
* bluez-5.50-a2dp-backports.patch
* bluez-5.50-gcc9.patch
* disable_some_obex_tests.patch
* bluez-5.45-disable-broken-tests.diff
- add bluez-disable-broken-tests.diff
- add temporary rpmlintrc until security team approves
-------------------------------------------------------------------
Sun Aug 18 18:11:08 UTC 2019 - Antoine Belvire <antoine.belvire@opensuse.org>

View File

@ -1,8 +1,8 @@
#
# spec file for package bluez
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2010-2017 B1 Systems GmbH, Vohburg, Germany
# Copyright (c) 2019 SUSE LLC
# Copyright (c) 2010-2019 B1 Systems GmbH, Vohburg, Germany
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,14 +17,25 @@
#
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150200
%bcond_without mesh
%else
%bcond_with mesh
%endif
# maintained at https://github.com/seifes-opensuse-packages/bluez.git
# contributions via pull requests are welcome!
#
Name: bluez
Version: 5.50
Version: 5.52
Release: 0
Summary: Bluetooth Stack for Linux
License: GPL-2.0-or-later
Group: Hardware/Mobile
Url: http://www.bluez.org
URL: http://www.bluez.org
Source: http://www.kernel.org/pub/linux/bluetooth/bluez-%{version}.tar.xz
# unused in the package, but allows to use "extract *.*" in source service
Source42: README.md
Source5: baselibs.conf
Source7: bluetooth.modprobe
# fix some logitech HID devices, bnc#681049, bnc#850478 --seife+obs@b1-systems.com
@ -33,21 +44,9 @@ Patch2: bluez-sdp-unix-path.patch
# PATCH-FIX-UPSTREAM: find the cups dir in libexec not in libdir
Patch3: bluez-cups-libexec.patch
# workaround for broken tests (reported upstream but not yet fixed)
Patch4: bluez-5.45-disable-broken-tests.diff
# PATCH-FIX-UPSTREAM: obexd not compiled with -fpie -- seife+obs@b1-systems.com
Patch5: 0001-obexd-use-AM_LDFLAGS-for-linking.patch
# disable tests for bypass boo#1078285
Patch6: disable_some_obex_tests.patch
# PATCH-FIX-UPSTREAM: improve profile availability on some audio devices
Patch7: 0001-policy-Add-logic-to-connect-a-Sink.patch
# PATCH-FIX-UPSTREAM a2dp fixes for newer codecs
Patch8: bluez-5.50-a2dp-backports.patch
# PATCH-FIX-UPSTREAM tools: Fix build after y2038 changes in glibc
Patch9: 0001-tools-Fix-build-after-y2038-changes-in-glibc.patch
Patch4: bluez-disable-broken-tests.diff
# Move 43xx firmware path for RPi3 bluetooth support bsc#1140688
Patch10: RPi-Move-the-43xx-firmware-into-lib-firmware.patch
# PATCH-FIX-UPSTREAM fix build with gcc 9, picked from upstream and rebased (boo#1121404, bko#202213)
Patch11: bluez-5.50-gcc9.patch
# Upstream suggests to use btmon instead of hcidump and does not want those patches
# => PATCH-FIX-OPENSUSE for those two :-)
# fix some memory leak with malformed packet (reported upstream but not yet fixed)
@ -67,8 +66,13 @@ BuildRequires: pkgconfig(dbus-1) >= 1.6
BuildRequires: pkgconfig(ell) >= 0.3
%endif
BuildRequires: pkgconfig(glib-2.0) >= 2.28
# libgio-2_0-0 has a runtime dependency on shared-mime-info, which is not
# required for building here, but causes a build loop
#!BuildIgnore: shared-mime-info
%if %{with mesh}
# json-c is needed for --enable-mesh
BuildRequires: pkgconfig(json-c)
%endif
BuildRequires: pkgconfig(libcap-ng)
BuildRequires: pkgconfig(libical)
BuildRequires: pkgconfig(libudev)
@ -160,15 +164,7 @@ desktop specific applets like blueman or GNOME or KDE applets).
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%ifarch ppc ppc64 ppc64le
%patch6 -p1
%endif
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch101 -p1
%patch102 -p1
mkdir dbus-apis
@ -191,7 +187,7 @@ autoreconf -fi
--enable-library \
--enable-tools \
--enable-cups \
%if 0%{?suse_version} >= 1550
%if %{with mesh}
--enable-mesh \
%endif
--enable-midi \
@ -238,7 +234,25 @@ cd %{buildroot}%{_libdir}/bluez/test
chmod 0644 *.py *.xml *.dtd
# fix python shebang
sed -i -e '1s/env p/p/' %{buildroot}%{_libdir}/bluez/test/example-gatt-{client,server}
sed -i -e '1s/env p/p/' %{buildroot}%{_libdir}/bluez/test/{example-gatt-{client,server},test-mesh}
%if %{with mesh}
# boo#1151518
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
mv %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth-mesh.conf %{buildroot}%{_defaultdocdir}/%{name}
mv %{buildroot}%{_datadir}/dbus-1/system-services/org.bluez.mesh.service %{buildroot}%{_defaultdocdir}/%{name}
cat > %{buildroot}%{_defaultdocdir}/%{name}/README-mesh.SUSE << EOF
The bluetooth-mesh dbus system config has been disabled due to security
concerns. See https://bugzilla.opensuse.org/show_bug.cgi?id=1151518 for
details.
If you want to use this feature anyway, copy
bluetooth-mesh.conf to %{_sysconfdir}/dbus-1/systemd.d/ and
org.bluez.mesh.service to %{_datadir}/dbus-1/system-services/,
then reboot.
EOF
touch -r %{SOURCE0} %{buildroot}%{_defaultdocdir}/%{name}/README-mesh.SUSE
%endif
%check
%if ! 0%{?qemu_user_space_build}
@ -248,22 +262,22 @@ make check V=0
%endif
%pre
%service_add_pre bluetooth.service
%service_add_pre bluetooth.service bluetooth-mesh.service
%post
%{?udev_rules_update:%udev_rules_update}
# todo: check if this is still obeyed / needed with systemd
%{fillup_only -n bluetooth}
# We need the bluez systemd service enabled at any time. It won't start up
# on it's own, as it is triggered by udev in the end (bnc#796671)
# on its own, as it is triggered by udev in the end (bnc#796671)
/bin/systemctl enable bluetooth.service 2>&1 || :
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%preun
%service_del_preun bluetooth.service
%service_del_preun bluetooth.service bluetooth-mesh.service
%postun
%service_del_postun bluetooth.service
%service_del_postun bluetooth.service bluetooth-mesh.service
%post -n libbluetooth3 -p /sbin/ldconfig
%postun -n libbluetooth3 -p /sbin/ldconfig
@ -271,6 +285,9 @@ make check V=0
%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog README dbus-apis src/main.conf
%if %{with mesh}
%doc %{_defaultdocdir}/%{name}/*
%endif
%license COPYING
%{_bindir}/bluemoon
%{_bindir}/btattach
@ -289,15 +306,18 @@ make check V=0
%{_libdir}/bluetooth/plugins/sixaxis.so
%dir %{_libexecdir}/bluetooth
%{_libexecdir}/bluetooth/bluetoothd
%if %{with mesh}
%{_libexecdir}/bluetooth/bluetooth-meshd
%endif
%{_libexecdir}/bluetooth/obexd
%{_bindir}/bluetoothctl
%{_bindir}/btmon
%if 0%{?suse_version} >= 1550
%if %{with mesh}
%{_bindir}/meshctl
%endif
%{_bindir}/hcidump
%{_bindir}/bccmd
%{_libexecdir}/udev/
%{_prefix}/lib/udev/
%{_mandir}/man1/btattach.1%{ext_man}
%{_mandir}/man1/hcidump.1%{ext_man}
%{_mandir}/man1/hciattach.1%{ext_man}
@ -312,12 +332,20 @@ make check V=0
%{_mandir}/man1/rfcomm.1%{ext_man}
%{_mandir}/man1/rctest.1%{ext_man}
%config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
# not packaged, boo#1151518
###%%config %%{_sysconfdir}/dbus-1/system.d/bluetooth-mesh.conf
%dir %{_localstatedir}/lib/bluetooth
%dir %{_sysconfdir}/modprobe.d
%config(noreplace) %{_sysconfdir}/modprobe.d/50-bluetooth.conf
%{_unitdir}/bluetooth.service
%if %{with mesh}
%{_unitdir}/bluetooth-mesh.service
%endif
%{_datadir}/dbus-1/system-services/org.bluez.service
%{_datadir}/dbus-1/services/org.bluez.obex.service
# not packaged, boo#1151518
###%%{_datadir}/dbus-1/system-services/org.bluez.mesh.service
%{_datadir}/zsh/site-functions/_bluetoothctl
%files devel
%defattr(-, root, root)

View File

@ -1,28 +0,0 @@
From: Michel Normand <normand@linux.vnet.ibm.com>
Subject: disable some obex tests
Date: Tue, 30 Jan 2018 17:01:45 +0100
disable some obex tests as transient failures
reported by bug
https://bugzilla.suse.com/show_bug.cgi?id=1078285
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
---
Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: bluez-5.48/Makefile.am
===================================================================
--- bluez-5.48.orig/Makefile.am
+++ bluez-5.48/Makefile.am
@@ -363,8 +363,8 @@ unit_test_gdbus_client_SOURCES = unit/te
unit_test_gdbus_client_LDADD = gdbus/libgdbus-internal.la \
src/libshared-glib.la @GLIB_LIBS@ @DBUS_LIBS@
-unit_tests += unit/test-gobex-header unit/test-gobex-packet unit/test-gobex \
- unit/test-gobex-transfer unit/test-gobex-apparam
+unit_tests += unit/test-gobex-header unit/test-gobex-packet \
+ unit/test-gobex-apparam
unit_test_gobex_SOURCES = $(gobex_sources) unit/util.c unit/util.h \
unit/test-gobex.c