diff --git a/.bluez.metadata b/.bluez.metadata index a6e8e36..2fc9d28 100644 --- a/.bluez.metadata +++ b/.bluez.metadata @@ -1 +1 @@ -0e378976175b08a19b1232f2af2e83cebee572bd SOURCES/bluez-5.23.tar.xz +a912b80299f6fe4f9d48502b3cf8c99854ed54b3 SOURCES/bluez-5.41.tar.xz diff --git a/.gitignore b/.gitignore index 08624cc..de88661 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/bluez-5.23.tar.xz +SOURCES/bluez-5.41.tar.xz diff --git a/SOURCES/0001-Remove-experimental-flag-for-BLE.patch b/SOURCES/0001-Remove-experimental-flag-for-BLE.patch new file mode 100644 index 0000000..ac94ead --- /dev/null +++ b/SOURCES/0001-Remove-experimental-flag-for-BLE.patch @@ -0,0 +1,202 @@ +From 8d5e7877c12c0ed4c2f23ba383dcf689e4f1b8ee Mon Sep 17 00:00:00 2001 +From: Fedora Bluez maintainers +Date: Tue, 17 May 2016 15:39:40 -0400 +Subject: [PATCH 1/3] Remove experimental flag for BLE + +Upstream says the BLE should be mostly stable by now. Remove the flag +prematurely (for just the BLE pieces), so we can say we are supporting +this API in RHEL-7.3. +--- + src/adapter.c | 4 ++-- + src/advertising.c | 4 ++-- + src/device.c | 8 ++++---- + src/gatt-client.c | 36 +++++++++++++++++++----------------- + src/gatt-database.c | 4 ++-- + 5 files changed, 29 insertions(+), 27 deletions(-) + +diff --git a/src/adapter.c b/src/adapter.c +index f4fbf82..e166b25 100644 +--- a/src/adapter.c ++++ b/src/adapter.c +@@ -7450,7 +7450,7 @@ static int adapter_register(struct btd_adapter *adapter) + return -EINVAL; + } + +- if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) { ++ //if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) { + /* Don't start advertising managers on non-LE controllers. */ + if (adapter->supported_settings & MGMT_SETTING_LE) { + adapter->adv_manager = +@@ -7459,7 +7459,7 @@ static int adapter_register(struct btd_adapter *adapter) + btd_info(adapter->dev_id, + "LEAdvertisingManager skipped, LE unavailable"); + } +- } ++ //} + + db = btd_gatt_database_get_db(adapter->database); + adapter->db_id = gatt_db_register(db, services_modified, +diff --git a/src/advertising.c b/src/advertising.c +index d2019de..7200d3d 100644 +--- a/src/advertising.c ++++ b/src/advertising.c +@@ -704,11 +704,11 @@ static DBusMessage *unregister_advertisement(DBusConnection *conn, + } + + static const GDBusMethodTable methods[] = { +- { GDBUS_EXPERIMENTAL_ASYNC_METHOD("RegisterAdvertisement", ++ { GDBUS_ASYNC_METHOD("RegisterAdvertisement", + GDBUS_ARGS({ "advertisement", "o" }, + { "options", "a{sv}" }), + NULL, register_advertisement) }, +- { GDBUS_EXPERIMENTAL_ASYNC_METHOD("UnregisterAdvertisement", ++ { GDBUS_ASYNC_METHOD("UnregisterAdvertisement", + GDBUS_ARGS({ "service", "o" }), + NULL, + unregister_advertisement) }, +diff --git a/src/device.c b/src/device.c +index 83a794e..05020cb 100644 +--- a/src/device.c ++++ b/src/device.c +@@ -2524,15 +2524,15 @@ static const GDBusPropertyTable device_properties[] = { + { "Adapter", "o", dev_property_get_adapter }, + { "ManufacturerData", "a{qv}", dev_property_get_manufacturer_data, + NULL, dev_property_manufacturer_data_exist, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "ServiceData", "a{sv}", dev_property_get_service_data, + NULL, dev_property_service_data_exist, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "TxPower", "n", dev_property_get_tx_power, NULL, + dev_property_exists_tx_power, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "ServicesResolved", "b", dev_property_get_svc_resolved, NULL, NULL, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + + { } + }; +diff --git a/src/gatt-client.c b/src/gatt-client.c +index 0cbacca..8c6441b 100644 +--- a/src/gatt-client.c ++++ b/src/gatt-client.c +@@ -609,20 +609,20 @@ static DBusMessage *descriptor_write_value(DBusConnection *conn, + + static const GDBusPropertyTable descriptor_properties[] = { + { "UUID", "s", descriptor_get_uuid, NULL, NULL, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "Characteristic", "o", descriptor_get_characteristic, NULL, NULL, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "Value", "ay", descriptor_get_value, NULL, descriptor_value_exists, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { } + }; + + static const GDBusMethodTable descriptor_methods[] = { +- { GDBUS_EXPERIMENTAL_ASYNC_METHOD("ReadValue", ++ { GDBUS_ASYNC_METHOD("ReadValue", + GDBUS_ARGS({ "options", "a{sv}" }), + GDBUS_ARGS({ "value", "ay" }), + descriptor_read_value) }, +- { GDBUS_EXPERIMENTAL_ASYNC_METHOD("WriteValue", ++ { GDBUS_ASYNC_METHOD("WriteValue", + GDBUS_ARGS({ "value", "ay" }, + { "options", "a{sv}" }), + NULL, +@@ -1285,33 +1285,33 @@ static DBusMessage *characteristic_stop_notify(DBusConnection *conn, + + static const GDBusPropertyTable characteristic_properties[] = { + { "UUID", "s", characteristic_get_uuid, NULL, NULL, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "Service", "o", characteristic_get_service, NULL, NULL, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "Value", "ay", characteristic_get_value, NULL, + characteristic_value_exists, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "Notifying", "b", characteristic_get_notifying, NULL, + characteristic_notifying_exists, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "Flags", "as", characteristic_get_flags, NULL, NULL, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { } + }; + + static const GDBusMethodTable characteristic_methods[] = { +- { GDBUS_EXPERIMENTAL_ASYNC_METHOD("ReadValue", ++ { GDBUS_ASYNC_METHOD("ReadValue", + GDBUS_ARGS({ "options", "a{sv}" }), + GDBUS_ARGS({ "value", "ay" }), + characteristic_read_value) }, +- { GDBUS_EXPERIMENTAL_ASYNC_METHOD("WriteValue", ++ { GDBUS_ASYNC_METHOD("WriteValue", + GDBUS_ARGS({ "value", "ay" }, + { "options", "a{sv}" }), + NULL, + characteristic_write_value) }, +- { GDBUS_EXPERIMENTAL_ASYNC_METHOD("StartNotify", NULL, NULL, ++ { GDBUS_ASYNC_METHOD("StartNotify", NULL, NULL, + characteristic_start_notify) }, +- { GDBUS_EXPERIMENTAL_METHOD("StopNotify", NULL, NULL, ++ { GDBUS_METHOD("StopNotify", NULL, NULL, + characteristic_stop_notify) }, + { } + }; +@@ -1445,11 +1445,11 @@ static gboolean service_get_primary(const GDBusPropertyTable *property, + + static const GDBusPropertyTable service_properties[] = { + { "UUID", "s", service_get_uuid, NULL, NULL, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "Device", "o", service_get_device, NULL, NULL, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { "Primary", "b", service_get_primary, NULL, NULL, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ }, + { } + }; + +@@ -1618,10 +1618,12 @@ static void export_service(struct gatt_db_attribute *attr, void *user_data) + static void create_services(struct btd_gatt_client *client) + { + /* Don't attempt to create any objects if experimental is disabled */ ++ /* + if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) { + info("GATT service objects disabled"); + return; + } ++ */ + + DBG("Exporting objects for GATT services: %s", client->devaddr); + +diff --git a/src/gatt-database.c b/src/gatt-database.c +index e287b98..87b4f56 100644 +--- a/src/gatt-database.c ++++ b/src/gatt-database.c +@@ -2578,11 +2578,11 @@ static DBusMessage *manager_unregister_app(DBusConnection *conn, + } + + static const GDBusMethodTable manager_methods[] = { +- { GDBUS_EXPERIMENTAL_ASYNC_METHOD("RegisterApplication", ++ { GDBUS_ASYNC_METHOD("RegisterApplication", + GDBUS_ARGS({ "application", "o" }, + { "options", "a{sv}" }), NULL, + manager_register_app) }, +- { GDBUS_EXPERIMENTAL_ASYNC_METHOD("UnregisterApplication", ++ { GDBUS_ASYNC_METHOD("UnregisterApplication", + GDBUS_ARGS({ "application", "o" }), + NULL, manager_unregister_app) }, + { } +-- +1.8.4 + diff --git a/SPECS/bluez.spec b/SPECS/bluez.spec index cb2a1f7..3a60c6a 100644 --- a/SPECS/bluez.spec +++ b/SPECS/bluez.spec @@ -1,7 +1,7 @@ Summary: Bluetooth utilities Name: bluez -Version: 5.23 -Release: 4%{?dist} +Version: 5.41 +Release: 1%{?dist} License: GPLv2+ Group: Applications/System URL: http://www.bluez.org/ @@ -16,6 +16,7 @@ Patch3: 0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch Patch4: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch Patch5: 0002-autopair-Don-t-handle-the-iCade.patch Patch7: 0004-agent-Assert-possible-infinite-loop.patch +Patch8: 0001-Remove-experimental-flag-for-BLE.patch %global _hardened_build 1 @@ -63,6 +64,7 @@ Utilities for use in Bluetooth applications: - hcidump - l2test - rctest + - gatttool - start scripts (Red Hat) - pcmcia configuration files @@ -142,6 +144,11 @@ make %{?_smp_mflags} V=1 %install make install DESTDIR=$RPM_BUILD_ROOT +# "make install" fails to install gatttool, necessary for Bluetooth Low Energy +# Red Hat Bugzilla bug #1141909 +# Debian bug #720486 +install -m0755 attrib/gatttool $RPM_BUILD_ROOT%{_bindir} + # Remove autocrap and libtool droppings find $RPM_BUILD_ROOT -name '*.la' -delete @@ -158,6 +165,10 @@ install -d -m0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/bluetooth mkdir -p $RPM_BUILD_ROOT/%{_libdir}/bluetooth/ +#copy bluetooth config file +install -D -p -m0644 src/main.conf ${RPM_BUILD_ROOT}/etc/bluetooth/main.conf +sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=false/' ${RPM_BUILD_ROOT}/%{_sysconfdir}/bluetooth/main.conf + %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig @@ -189,7 +200,9 @@ mkdir -p $RPM_BUILD_ROOT/%{_libdir}/bluetooth/ %{_bindir}/hciconfig %{_bindir}/hcidump %{_bindir}/l2test +%{_bindir}/hex2hcd %{_bindir}/mpris-proxy +%{_bindir}/gatttool %{_bindir}/rctest %{_mandir}/man1/ciptool.1.gz %{_mandir}/man1/hcitool.1.gz @@ -212,6 +225,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_libdir}/bluetooth/ %{_datadir}/dbus-1/services/org.bluez.obex.service %{_unitdir}/bluetooth.service %{_userunitdir}/obex.service +%config %{_sysconfdir}/bluetooth/main.conf %files libs %doc COPYING @@ -232,6 +246,16 @@ mkdir -p $RPM_BUILD_ROOT/%{_libdir}/bluetooth/ /lib/udev/rules.d/97-hid2hci.rules %changelog +* Fri Aug 5 2016 Don Zickus 5.41-1 +- Update to 5.41 +- obexd fixes to prevent crashes +- add /etc/bluetooth/main.conf config file +Resolves: #1313363, #1336476, #1338895 + +* Wed May 18 2016 Don Zickus 5.39-1 +- Update to 5.39 +Resolves: #1263638 #1296616 + * Fri Jul 10 2015 Bastien Nocera 5.23-4 - Build with --enable-fpie as well Resolves: #1174545