From 605ae65076a4665d0192ed92f224ca5470ab6b00 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 21 Mar 2018 03:10:54 +0000 Subject: [PATCH] 5.49 --- 0001-core-Fixes-order-InterfaceAdded.patch | 71 ------------------- ...nt-Reset-callbacks-when-unregisterin.patch | 41 ----------- ...obex-Work-around-compilation-failure.patch | 41 ----------- bluez.spec | 26 ++++--- sources | 2 +- 5 files changed, 13 insertions(+), 168 deletions(-) delete mode 100644 0001-core-Fixes-order-InterfaceAdded.patch delete mode 100644 0002-shared-gatt-client-Reset-callbacks-when-unregisterin.patch delete mode 100644 0004-obex-Work-around-compilation-failure.patch diff --git a/0001-core-Fixes-order-InterfaceAdded.patch b/0001-core-Fixes-order-InterfaceAdded.patch deleted file mode 100644 index ecd6f02..0000000 --- a/0001-core-Fixes-order-InterfaceAdded.patch +++ /dev/null @@ -1,71 +0,0 @@ -From cd5853c6b3e930eab1c90510d42e0d1c631b682d Mon Sep 17 00:00:00 2001 -From: Luiz Augusto von Dentz -Date: Fri, 9 Feb 2018 12:53:13 +0200 -Subject: [PATCH 1/2] core: Fixes order InterfaceAdded - -Registering on the callback of MGMT_OP_READ_ADV_FEATURES causes -InterfacesAdded to be reschedule after the device objects which causes -tools such as PulseAudio to consider it invalid. - -Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1534857 ---- - src/advertising.c | 28 +++++++++++++++------------- - 1 file changed, 15 insertions(+), 13 deletions(-) - -diff --git a/src/advertising.c b/src/advertising.c -index 94a8c4050..970c3d87b 100644 ---- a/src/advertising.c -+++ b/src/advertising.c -@@ -1032,14 +1032,6 @@ static void read_adv_features_callback(uint8_t status, uint16_t length, - if (manager->max_ads == 0) - return; - -- if (!g_dbus_register_interface(btd_get_dbus_connection(), -- adapter_get_path(manager->adapter), -- LE_ADVERTISING_MGR_IFACE, methods, -- NULL, properties, manager, NULL)) { -- error("Failed to register " LE_ADVERTISING_MGR_IFACE); -- return; -- } -- - /* Reset existing instances */ - if (feat->num_instances) - remove_advertising(manager, 0); -@@ -1061,19 +1053,29 @@ static struct btd_adv_manager *manager_create(struct btd_adapter *adapter) - } - - manager->mgmt_index = btd_adapter_get_index(adapter); -+ manager->clients = queue_new(); -+ manager->supported_flags = MGMT_ADV_FLAG_LOCAL_NAME; -+ -+ if (!g_dbus_register_interface(btd_get_dbus_connection(), -+ adapter_get_path(manager->adapter), -+ LE_ADVERTISING_MGR_IFACE, methods, -+ NULL, properties, manager, NULL)) { -+ error("Failed to register " LE_ADVERTISING_MGR_IFACE); -+ goto fail; -+ } - - if (!mgmt_send(manager->mgmt, MGMT_OP_READ_ADV_FEATURES, - manager->mgmt_index, 0, NULL, - read_adv_features_callback, manager, NULL)) { - error("Failed to read advertising features"); -- manager_destroy(manager); -- return NULL; -+ goto fail; - } - -- manager->clients = queue_new(); -- manager->supported_flags = MGMT_ADV_FLAG_LOCAL_NAME; -- - return manager; -+ -+fail: -+ manager_destroy(manager); -+ return NULL; - } - - struct btd_adv_manager *btd_adv_manager_new(struct btd_adapter *adapter) --- -2.14.3 - diff --git a/0002-shared-gatt-client-Reset-callbacks-when-unregisterin.patch b/0002-shared-gatt-client-Reset-callbacks-when-unregisterin.patch deleted file mode 100644 index 43eddcf..0000000 --- a/0002-shared-gatt-client-Reset-callbacks-when-unregisterin.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 502df5778437dbbd73aff0d673aca6ba3235c667 Mon Sep 17 00:00:00 2001 -From: Luiz Augusto von Dentz -Date: Fri, 9 Feb 2018 12:53:15 +0200 -Subject: [PATCH 2/2] shared/gatt-client: Reset callbacks when unregistering - -If user application is unregistering a notification handler its -callbacks shall not be called even CCC write is still holding a -reference to notify_data. ---- - src/shared/gatt-client.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c -index 8083ff719..1285c37ef 100644 ---- a/src/shared/gatt-client.c -+++ b/src/shared/gatt-client.c -@@ -1212,7 +1212,9 @@ static void complete_notify_request(void *data) - struct notify_data *notify_data = data; - - notify_data->att_id = 0; -- notify_data->callback(0, notify_data->user_data); -+ -+ if (notify_data->callback) -+ notify_data->callback(0, notify_data->user_data); - } - - static bool notify_data_write_ccc(struct notify_data *notify_data, bool enable, -@@ -3157,6 +3159,10 @@ bool bt_gatt_client_unregister_notify(struct bt_gatt_client *client, - /* Remove data if it has been queued */ - queue_remove(notify_data->chrc->reg_notify_queue, notify_data); - -+ /* Reset callbacks */ -+ notify_data->callback = NULL; -+ notify_data->notify = NULL; -+ - complete_unregister_notify(notify_data); - return true; - } --- -2.14.3 - diff --git a/0004-obex-Work-around-compilation-failure.patch b/0004-obex-Work-around-compilation-failure.patch deleted file mode 100644 index 70b8033..0000000 --- a/0004-obex-Work-around-compilation-failure.patch +++ /dev/null @@ -1,41 +0,0 @@ -From d746de1bbcd6e9349dbd990ff9d33351f0bad319 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Tue, 5 Sep 2017 10:46:03 +0200 -Subject: [PATCH 4/4] obex: Work-around compilation failure - -obexd/plugins/bluetooth.c: In function 'register_profile': -obexd/plugins/bluetooth.c:310:7: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] - profile->driver->port); - ^~~~~~~ -obexd/plugins/bluetooth.c:314:7: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] - profile->driver->name); - ^~~~~~~ ---- - obexd/plugins/bluetooth.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/obexd/plugins/bluetooth.c b/obexd/plugins/bluetooth.c -index 3ee54325f..3e31eaef6 100644 ---- a/obexd/plugins/bluetooth.c -+++ b/obexd/plugins/bluetooth.c -@@ -302,6 +302,9 @@ static int register_profile(struct bluetooth_profile *profile) - &opt); - dict_append_entry(&opt, "AutoConnect", DBUS_TYPE_BOOLEAN, - &auto_connect); -+ -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-nonliteral" - if (profile->driver->record) { - if (profile->driver->port != 0) - xml = g_markup_printf_escaped(profile->driver->record, -@@ -312,6 +315,7 @@ static int register_profile(struct bluetooth_profile *profile) - xml = g_markup_printf_escaped(profile->driver->record, - profile->driver->channel, - profile->driver->name); -+#pragma GCC diagnostic pop - dict_append_entry(&opt, "ServiceRecord", DBUS_TYPE_STRING, - &xml); - g_free(xml); --- -2.14.1 - diff --git a/bluez.spec b/bluez.spec index 52230ad..67f015e 100644 --- a/bluez.spec +++ b/bluez.spec @@ -1,7 +1,7 @@ Name: bluez Summary: Bluetooth utilities -Version: 5.48 -Release: 5%{?dist} +Version: 5.49 +Release: 1%{?dist} License: GPLv2+ URL: http://www.bluez.org/ @@ -15,25 +15,20 @@ Source3: btattach-bcm@.service Source4: btattach-bcm-service.sh # https://github.com/hadess/bluez/commits/build-fixes-5.46 -Patch0: 0001-build-Enable-BIND_NOW.patch +Patch1: 0001-build-Enable-BIND_NOW.patch Patch2: 0003-tools-csr_usb-Fix-compilation-failure.patch -Patch3: 0004-obex-Work-around-compilation-failure.patch # https://github.com/hadess/bluez/commits/obex-5.46 -Patch4: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch +Patch3: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch # https://github.com/hadess/bluez/commits/hostname-plugin-5.47 -Patch6: 0001-hostname-Fix-BlueZ-5.XX-adapter-name-on-startup.patch +Patch4: 0001-hostname-Fix-BlueZ-5.XX-adapter-name-on-startup.patch # https://github.com/hadess/bluez/commits/systemd-hardening -Patch120: 0001-build-Always-define-confdir-and-statedir.patch -Patch121: 0002-systemd-Add-PrivateTmp-and-NoNewPrivileges-options.patch -Patch122: 0003-systemd-Add-more-filesystem-lockdown.patch -Patch123: 0004-systemd-More-lockdown.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1534857 -Patch200: 0001-core-Fixes-order-InterfaceAdded.patch -Patch201: 0002-shared-gatt-client-Reset-callbacks-when-unregisterin.patch +Patch20: 0001-build-Always-define-confdir-and-statedir.patch +Patch21: 0002-systemd-Add-PrivateTmp-and-NoNewPrivileges-options.patch +Patch22: 0003-systemd-Add-more-filesystem-lockdown.patch +Patch23: 0004-systemd-More-lockdown.patch BuildRequires: git-core BuildRequires: dbus-devel >= 1.6 @@ -269,6 +264,9 @@ make check %{_userunitdir}/obex.service %changelog +* Tue Mar 20 2018 Peter Robinson 5.49-1 +- Update to 5.49 + * Tue Mar 06 2018 Björn Esser - 5.48-5 - Rebuilt for libjson-c.so.4 (json-c v0.13.1) diff --git a/sources b/sources index d90e15f..3300e4e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bluez-5.48.tar.xz) = 38cb20b8acee8adaab286a0b042efa770df367e7a69556117961fcc46d9e0a0e2a48059c7df9511bb00fe7fc37e916e34c928df9372b45051fcc57c8965b0bb7 +SHA512 (bluez-5.49.tar.xz) = bc2988649420232b92e2c6836857027369f05ace005972f575ed0601c02cc97a07a3b7a0707a8bad72be73df7e8096c8bf023530443556e87c2ccb667981b37d