From 2ed80b11928065ff4a09e31e22c0410fa509c575c5edc940f621c9cecee15cae Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 17 Aug 2022 20:39:29 +0000 Subject: [PATCH] - update to 5.65: * Fix issue with A2DP cache invalidation handling. * Fix issue with A2DP and not initialized SEP codec. * Fix issue with A2DP and multiple SetConfiguration to same SEP * Fix issue with AVRCP and not properly initialized volume. * Fix issue with SDP records when operating in LE only mode. * Fix issue with HoG and not reading report map of instances. * Fix issue with GATT server crashing while disconnecting. * Fix issue with not removing connected devices. * Fix issue with enabling wake support without RPA Resolution. * Fix issue with pairing failed due to the error of Already Paired. * Add support for CONFIGURATION_DIRECTORY environment variable. * Add support for STATE_DIRECTORY environment variable. * Add support for "Bonded" property with Device API. * Add experimental support for ISO socket. - drop bluez-test-2to3.diff (obsolete/upstream) OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=330 --- ...ix-memory-leak-with-malformed-packet.patch | 8 +- ...ix-memory-leak-with-malformed-packet.patch | 8 +- ...-the-43xx-firmware-into-lib-firmware.patch | 8 +- bluez-5.64.tar.xz | 3 - bluez-5.65.tar.xz | 3 + bluez-cups-libexec.patch | 16 +- bluez-disable-broken-tests.diff | 12 +- bluez-sdp-unix-path.patch | 8 +- bluez-test-2to3.diff | 721 ------------------ bluez.changes | 20 + bluez.spec | 15 +- 11 files changed, 61 insertions(+), 761 deletions(-) delete mode 100644 bluez-5.64.tar.xz create mode 100644 bluez-5.65.tar.xz delete mode 100644 bluez-test-2to3.diff diff --git a/CVE-2016-9800-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch b/CVE-2016-9800-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch index 2a49b18..acae51f 100644 --- a/CVE-2016-9800-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch +++ b/CVE-2016-9800-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch @@ -12,11 +12,11 @@ Do not allow to read more then buffer size. tools/parser/hci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -Index: bluez-5.55/tools/parser/hci.c +Index: bluez-5.65/tools/parser/hci.c =================================================================== ---- bluez-5.55.orig/tools/parser/hci.c -+++ bluez-5.55/tools/parser/hci.c -@@ -989,8 +989,14 @@ static inline void pin_code_reply_dump(i +--- bluez-5.65.orig/tools/parser/hci.c ++++ bluez-5.65/tools/parser/hci.c +@@ -976,8 +976,14 @@ static inline void pin_code_reply_dump(i memset(pin, 0, sizeof(pin)); if (parser.flags & DUMP_NOVENDOR) memset(pin, '*', cp->pin_len); diff --git a/CVE-2016-9804-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch b/CVE-2016-9804-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch index 91dd63e..b632d4e 100644 --- a/CVE-2016-9804-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch +++ b/CVE-2016-9804-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch @@ -13,11 +13,11 @@ Do not allow to read more then the size. tools/parser/csr.c | 5 +++++ 1 file changed, 5 insertions(+) -Index: bluez-5.55/tools/parser/csr.c +Index: bluez-5.65/tools/parser/csr.c =================================================================== ---- bluez-5.55.orig/tools/parser/csr.c -+++ bluez-5.55/tools/parser/csr.c -@@ -146,6 +146,11 @@ static inline void commands_dump(int lev +--- bluez-5.65.orig/tools/parser/csr.c ++++ bluez-5.65/tools/parser/csr.c +@@ -133,6 +133,11 @@ static inline void commands_dump(int lev unsigned char commands[64]; unsigned int i; diff --git a/RPi-Move-the-43xx-firmware-into-lib-firmware.patch b/RPi-Move-the-43xx-firmware-into-lib-firmware.patch index 211258d..b907773 100644 --- a/RPi-Move-the-43xx-firmware-into-lib-firmware.patch +++ b/RPi-Move-the-43xx-firmware-into-lib-firmware.patch @@ -7,11 +7,11 @@ Subject: [PATCH] Move the 43xx firmware into /lib/firmware tools/hciattach_bcm43xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: bluez-5.55/tools/hciattach_bcm43xx.c +Index: bluez-5.65/tools/hciattach_bcm43xx.c =================================================================== ---- bluez-5.55.orig/tools/hciattach_bcm43xx.c -+++ bluez-5.55/tools/hciattach_bcm43xx.c -@@ -44,7 +44,7 @@ +--- bluez-5.65.orig/tools/hciattach_bcm43xx.c ++++ bluez-5.65/tools/hciattach_bcm43xx.c +@@ -31,7 +31,7 @@ #include "hciattach.h" #ifndef FIRMWARE_DIR diff --git a/bluez-5.64.tar.xz b/bluez-5.64.tar.xz deleted file mode 100644 index 9bd489b..0000000 --- a/bluez-5.64.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ae437e65b6b3070c198bc5b0109fe9cdeb9eaa387380e2072f9de65fe8a1de34 -size 2175148 diff --git a/bluez-5.65.tar.xz b/bluez-5.65.tar.xz new file mode 100644 index 0000000..d85b0e0 --- /dev/null +++ b/bluez-5.65.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2565a4d48354b576e6ad92e25b54ed66808296581c8abb80587051f9993d96d4 +size 2208100 diff --git a/bluez-cups-libexec.patch b/bluez-cups-libexec.patch index 2c9f390..d7b0554 100644 --- a/bluez-cups-libexec.patch +++ b/bluez-cups-libexec.patch @@ -1,8 +1,8 @@ -Index: bluez-5.55/Makefile.in +Index: bluez-5.65/Makefile.in =================================================================== ---- bluez-5.55.orig/Makefile.in -+++ bluez-5.55/Makefile.in -@@ -3545,7 +3545,7 @@ unit_tests = $(am__append_54) unit/test- +--- bluez-5.65.orig/Makefile.in ++++ bluez-5.65/Makefile.in +@@ -3871,7 +3871,7 @@ unit_tests = $(am__append_55) unit/test- @DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \ @DEPRECATED_TRUE@@READLINE_TRUE@ src/libshared-glib.la $(GLIB_LIBS) -lreadline @@ -11,11 +11,11 @@ Index: bluez-5.55/Makefile.in @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.55/Makefile.tools +Index: bluez-5.65/Makefile.tools =================================================================== ---- bluez-5.55.orig/Makefile.tools -+++ bluez-5.55/Makefile.tools -@@ -462,7 +462,7 @@ endif +--- bluez-5.65.orig/Makefile.tools ++++ bluez-5.65/Makefile.tools +@@ -499,7 +499,7 @@ endif endif if CUPS diff --git a/bluez-disable-broken-tests.diff b/bluez-disable-broken-tests.diff index bc7176c..3c4059d 100644 --- a/bluez-disable-broken-tests.diff +++ b/bluez-disable-broken-tests.diff @@ -1,8 +1,8 @@ -Index: b/Makefile.am +Index: bluez-5.65/Makefile.am =================================================================== ---- a/Makefile.am -+++ b/Makefile.am -@@ -497,7 +497,8 @@ unit_test_lib_SOURCES = unit/test-lib.c +--- bluez-5.65.orig/Makefile.am ++++ bluez-5.65/Makefile.am +@@ -532,7 +532,8 @@ unit_test_lib_SOURCES = unit/test-lib.c unit_test_lib_LDADD = src/libshared-glib.la \ lib/libbluetooth-internal.la $(GLIB_LIBS) @@ -12,7 +12,7 @@ Index: b/Makefile.am unit_test_gatt_SOURCES = unit/test-gatt.c unit_test_gatt_LDADD = src/libshared-glib.la \ -@@ -527,7 +528,8 @@ unit_test_gattrib_LDADD = lib/libbluetoo +@@ -562,7 +563,8 @@ unit_test_gattrib_LDADD = lib/libbluetoo $(GLIB_LIBS) $(DBUS_LIBS) -ldl -lrt if MIDI @@ -22,7 +22,7 @@ Index: b/Makefile.am unit_test_midi_CPPFLAGS = $(AM_CPPFLAGS) $(ALSA_CFLAGS) -DMIDI_TEST unit_test_midi_SOURCES = unit/test-midi.c \ profiles/midi/libmidi.h \ -@@ -537,7 +539,7 @@ unit_test_midi_LDADD = src/libshared-gli +@@ -572,7 +574,7 @@ unit_test_midi_LDADD = src/libshared-gli endif if MESH diff --git a/bluez-sdp-unix-path.patch b/bluez-sdp-unix-path.patch index 821e6bf..55b21e1 100644 --- a/bluez-sdp-unix-path.patch +++ b/bluez-sdp-unix-path.patch @@ -1,6 +1,8 @@ ---- bluez-5.8.orig/lib/sdp.h -+++ bluez-5.8/lib/sdp.h -@@ -34,7 +34,7 @@ extern "C" { +Index: bluez-5.65/lib/sdp.h +=================================================================== +--- bluez-5.65.orig/lib/sdp.h ++++ bluez-5.65/lib/sdp.h +@@ -21,7 +21,7 @@ extern "C" { #include #include diff --git a/bluez-test-2to3.diff b/bluez-test-2to3.diff deleted file mode 100644 index 60fa602..0000000 --- a/bluez-test-2to3.diff +++ /dev/null @@ -1,721 +0,0 @@ -Index: b/test/bluezutils.py -=================================================================== ---- a/test/bluezutils.py -+++ b/test/bluezutils.py -@@ -17,7 +17,7 @@ def find_adapter(pattern=None): - - def find_adapter_in_objects(objects, pattern=None): - bus = dbus.SystemBus() -- for path, ifaces in objects.items(): -+ for path, ifaces in list(objects.items()): - adapter = ifaces.get(ADAPTER_INTERFACE) - if adapter is None: - continue -@@ -37,7 +37,7 @@ def find_device_in_objects(objects, devi - if adapter_pattern: - adapter = find_adapter_in_objects(objects, adapter_pattern) - path_prefix = adapter.object_path -- for path, ifaces in objects.items(): -+ for path, ifaces in list(objects.items()): - device = ifaces.get(DEVICE_INTERFACE) - if device is None: - continue -Index: b/test/example-advertisement -=================================================================== ---- a/test/example-advertisement -+++ b/test/example-advertisement -@@ -164,7 +164,7 @@ def find_adapter(bus): - DBUS_OM_IFACE) - objects = remote_om.GetManagedObjects() - -- for o, props in objects.items(): -+ for o, props in list(objects.items()): - if LE_ADVERTISING_MANAGER_IFACE in props: - return o - -Index: b/test/example-gatt-client -=================================================================== ---- a/test/example-gatt-client -+++ b/test/example-gatt-client -@@ -33,7 +33,7 @@ hr_ctrl_pt_chrc = None - - - def generic_error_cb(error): -- print('D-Bus call failed: ' + str(error)) -+ print(('D-Bus call failed: ' + str(error))) - mainloop.quit() - - -@@ -69,10 +69,10 @@ def sensor_contact_val_to_str(val): - - def body_sensor_val_cb(value): - if len(value) != 1: -- print('Invalid body sensor location value: ' + repr(value)) -+ print(('Invalid body sensor location value: ' + repr(value))) - return - -- print('Body sensor location value: ' + body_sensor_val_to_str(value[0])) -+ print(('Body sensor location value: ' + body_sensor_val_to_str(value[0]))) - - - def hr_msrmt_start_notify_cb(): -@@ -104,12 +104,12 @@ def hr_msrmt_changed_cb(iface, changed_p - hr_msrmt = value[1] | (value[2] << 8) - next_ind = 3 - -- print('\tHR: ' + str(int(hr_msrmt))) -- print('\tSensor Contact status: ' + -- sensor_contact_val_to_str(sc_status)) -+ print(('\tHR: ' + str(int(hr_msrmt)))) -+ print(('\tSensor Contact status: ' + -+ sensor_contact_val_to_str(sc_status))) - - if ee_status: -- print('\tEnergy Expended: ' + str(int(value[next_ind]))) -+ print(('\tEnergy Expended: ' + str(int(value[next_ind])))) - - - def start_client(): -@@ -147,7 +147,7 @@ def process_chrc(chrc_path): - global hr_ctrl_pt_chrc - hr_ctrl_pt_chrc = (chrc, chrc_props) - else: -- print('Unrecognized characteristic: ' + uuid) -+ print(('Unrecognized characteristic: ' + uuid)) - - return True - -@@ -162,7 +162,7 @@ def process_hr_service(service_path, chr - if uuid != HR_SVC_UUID: - return False - -- print('Heart Rate Service found: ' + service_path) -+ print(('Heart Rate Service found: ' + service_path)) - - # Process the characteristics. - for chrc_path in chrc_paths: -@@ -199,14 +199,14 @@ def main(): - chrcs = [] - - # List characteristics found -- for path, interfaces in objects.items(): -- if GATT_CHRC_IFACE not in interfaces.keys(): -+ for path, interfaces in list(objects.items()): -+ if GATT_CHRC_IFACE not in list(interfaces.keys()): - continue - chrcs.append(path) - - # List sevices found -- for path, interfaces in objects.items(): -- if GATT_SERVICE_IFACE not in interfaces.keys(): -+ for path, interfaces in list(objects.items()): -+ if GATT_SERVICE_IFACE not in list(interfaces.keys()): - continue - - chrc_paths = [d for d in chrcs if d.startswith(path + "/")] -Index: b/test/example-gatt-server -=================================================================== ---- a/test/example-gatt-server -+++ b/test/example-gatt-server -@@ -293,7 +293,7 @@ class HeartRateMeasurementChrc(Character - min(0xffff, self.service.energy_expended + 1) - self.hr_ee_count += 1 - -- print('Updating value: ' + repr(value)) -+ print(('Updating value: ' + repr(value))) - - self.PropertiesChanged(GATT_CHRC_IFACE, { 'Value': value }, []) - -@@ -355,7 +355,7 @@ class HeartRateControlPointChrc(Characte - raise InvalidValueLengthException() - - byte = value[0] -- print('Control Point value: ' + repr(byte)) -+ print(('Control Point value: ' + repr(byte))) - - if byte != 1: - raise FailedException("0x80") -@@ -408,12 +408,12 @@ class BatteryLevelCharacteristic(Charact - self.battery_lvl -= 2 - if self.battery_lvl < 0: - self.battery_lvl = 0 -- print('Battery Level drained: ' + repr(self.battery_lvl)) -+ print(('Battery Level drained: ' + repr(self.battery_lvl))) - self.notify_battery_level() - return True - - def ReadValue(self, options): -- print('Battery Level read: ' + repr(self.battery_lvl)) -+ print(('Battery Level read: ' + repr(self.battery_lvl))) - return [dbus.Byte(self.battery_lvl)] - - def StartNotify(self): -@@ -466,11 +466,11 @@ class TestCharacteristic(Characteristic) - CharacteristicUserDescriptionDescriptor(bus, 1, self)) - - def ReadValue(self, options): -- print('TestCharacteristic Read: ' + repr(self.value)) -+ print(('TestCharacteristic Read: ' + repr(self.value))) - return self.value - - def WriteValue(self, value, options): -- print('TestCharacteristic Write: ' + repr(value)) -+ print(('TestCharacteristic Write: ' + repr(value))) - self.value = value - - -@@ -538,11 +538,11 @@ class TestEncryptCharacteristic(Characte - CharacteristicUserDescriptionDescriptor(bus, 3, self)) - - def ReadValue(self, options): -- print('TestEncryptCharacteristic Read: ' + repr(self.value)) -+ print(('TestEncryptCharacteristic Read: ' + repr(self.value))) - return self.value - - def WriteValue(self, value, options): -- print('TestEncryptCharacteristic Write: ' + repr(value)) -+ print(('TestEncryptCharacteristic Write: ' + repr(value))) - self.value = value - - class TestEncryptDescriptor(Descriptor): -@@ -584,11 +584,11 @@ class TestSecureCharacteristic(Character - CharacteristicUserDescriptionDescriptor(bus, 3, self)) - - def ReadValue(self, options): -- print('TestSecureCharacteristic Read: ' + repr(self.value)) -+ print(('TestSecureCharacteristic Read: ' + repr(self.value))) - return self.value - - def WriteValue(self, value, options): -- print('TestSecureCharacteristic Write: ' + repr(value)) -+ print(('TestSecureCharacteristic Write: ' + repr(value))) - self.value = value - - -@@ -616,7 +616,7 @@ def register_app_cb(): - - - def register_app_error_cb(error): -- print('Failed to register application: ' + str(error)) -+ print(('Failed to register application: ' + str(error))) - mainloop.quit() - - -@@ -625,8 +625,8 @@ def find_adapter(bus): - DBUS_OM_IFACE) - objects = remote_om.GetManagedObjects() - -- for o, props in objects.items(): -- if GATT_MANAGER_IFACE in props.keys(): -+ for o, props in list(objects.items()): -+ if GATT_MANAGER_IFACE in list(props.keys()): - return o - - return None -Index: b/test/list-devices -=================================================================== ---- a/test/list-devices -+++ b/test/list-devices -@@ -32,17 +32,17 @@ def extract_uuids(uuid_list): - - objects = manager.GetManagedObjects() - --all_devices = (str(path) for path, interfaces in objects.iteritems() if -- "org.bluez.Device1" in interfaces.keys()) -+all_devices = (str(path) for path, interfaces in objects.items() if -+ "org.bluez.Device1" in list(interfaces.keys())) - --for path, interfaces in objects.iteritems(): -- if "org.bluez.Adapter1" not in interfaces.keys(): -+for path, interfaces in objects.items(): -+ if "org.bluez.Adapter1" not in list(interfaces.keys()): - continue - - print("[ " + path + " ]") - - properties = interfaces["org.bluez.Adapter1"] -- for key in properties.keys(): -+ for key in list(properties.keys()): - value = properties[key] - if (key == "UUIDs"): - list = extract_uuids(value) -@@ -58,7 +58,7 @@ for path, interfaces in objects.iteritem - dev = objects[dev_path] - properties = dev["org.bluez.Device1"] - -- for key in properties.keys(): -+ for key in list(properties.keys()): - value = properties[key] - if (key == "UUIDs"): - list = extract_uuids(value) -Index: b/test/map-client -=================================================================== ---- a/test/map-client -+++ b/test/map-client -@@ -27,15 +27,15 @@ def unwrap(x): - printed. Taken from d-feet """ - - if isinstance(x, list): -- return map(unwrap, x) -+ return list(map(unwrap, x)) - - if isinstance(x, tuple): - return tuple(map(unwrap, x)) - - if isinstance(x, dict): -- return dict([(unwrap(k), unwrap(v)) for k, v in x.iteritems()]) -+ return dict([(unwrap(k), unwrap(v)) for k, v in x.items()]) - -- for t in [unicode, str, long, int, float, bool]: -+ for t in [str, str, int, int, float, bool]: - if isinstance(x, t): - return t(x) - -Index: b/test/monitor-bluetooth -=================================================================== ---- a/test/monitor-bluetooth -+++ b/test/monitor-bluetooth -@@ -14,17 +14,17 @@ relevant_ifaces = [ "org.bluez.Adapter1" - - def property_changed(interface, changed, invalidated, path): - iface = interface[interface.rfind(".") + 1:] -- for name, value in changed.iteritems(): -+ for name, value in changed.items(): - val = str(value) - print("{%s.PropertyChanged} [%s] %s = %s" % (iface, path, name, - val)) - - def interfaces_added(path, interfaces): -- for iface, props in interfaces.iteritems(): -+ for iface, props in interfaces.items(): - if not(iface in relevant_ifaces): - continue - print("{Added %s} [%s]" % (iface, path)) -- for name, value in props.iteritems(): -+ for name, value in props.items(): - print(" %s = %s" % (name, value)) - - def interfaces_removed(path, interfaces): -Index: b/test/pbap-client -=================================================================== ---- a/test/pbap-client -+++ b/test/pbap-client -@@ -135,11 +135,11 @@ if __name__ == '__main__': - print(header) - for line in lines: - print(line), -- print -+ print() - - def test_paths(paths): - if len(paths) == 0: -- print -+ print() - print("FINISHED") - mainloop.quit() - return -Index: b/test/sap_client.py -=================================================================== ---- a/test/sap_client.py -+++ b/test/sap_client.py -@@ -165,7 +165,7 @@ class SAPParam_ConnectionStatus(SAPParam - - def __validate(self): - if self.value is not None and self.value not in (0x00, 0x01, 0x02, 0x03, 0x04): -- print "Warning. ConnectionStatus value in reserved range (0x%x)" % self.value -+ print("Warning. ConnectionStatus value in reserved range (0x%x)" % self.value) - - def deserialize(self, buf): - ret = SAPParam.deserialize(self, buf) -@@ -183,7 +183,7 @@ class SAPParam_ResultCode(SAPParam): - - def __validate(self): - if self.value is not None and self.value not in (0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07): -- print "Warning. ResultCode value in reserved range (0x%x)" % self.value -+ print("Warning. ResultCode value in reserved range (0x%x)" % self.value) - - def deserialize(self, buf): - ret = SAPParam.deserialize(self, buf) -@@ -201,7 +201,7 @@ class SAPParam_DisconnectionType(SAPPara - - def __validate(self): - if self.value is not None and self.value not in (0x00, 0x01): -- print "Warning. DisconnectionType value in reserved range (0x%x)" % self.value -+ print("Warning. DisconnectionType value in reserved range (0x%x)" % self.value) - - def deserialize(self, buf): - ret = SAPParam.deserialize(self, buf) -@@ -227,7 +227,7 @@ class SAPParam_StatusChange(SAPParam): - - def __validate(self): - if self.value is not None and self.value not in (0x00, 0x01, 0x02, 0x03, 0x04, 0x05): -- print "Warning. StatusChange value in reserved range (0x%x)" % self.value -+ print("Warning. StatusChange value in reserved range (0x%x)" % self.value) - - def deserialize(self, buf): - ret = SAPParam.deserialize(self, buf) -@@ -245,7 +245,7 @@ class SAPParam_TransportProtocol(SAPPara - - def __validate(self): - if self.value is not None and self.value not in (0x00, 0x01): -- print "Warning. TransportProtoco value in reserved range (0x%x)" % self.value -+ print("Warning. TransportProtoco value in reserved range (0x%x)" % self.value) - - def deserialize(self, buf): - ret = SAPParam.deserialize(self, buf) -@@ -728,7 +728,7 @@ class SAPClient: - self.port = first_match["port"] - self.host = first_match["host"] - -- print "SAP Service found on %s(%s)" % first_match["name"] % self.host -+ print("SAP Service found on %s(%s)" % first_match["name"] % self.host) - - def __connectRFCOMM(self): - self.sock=BluetoothSocket( RFCOMM ) -@@ -739,19 +739,19 @@ class SAPClient: - def __sendMsg(self, msg): - if isinstance(msg, SAPMessage): - s = msg.serialize() -- print "\tTX: " + msg.getContent() -+ print("\tTX: " + msg.getContent()) - return self.sock.send(s.tostring()) - - def __rcvMsg(self, msg): - if isinstance(msg, SAPMessage): -- print "\tRX Wait: %s(id = 0x%.2x)" % (msg.name, msg.id) -+ print("\tRX Wait: %s(id = 0x%.2x)" % (msg.name, msg.id)) - data = self.sock.recv(self.bufsize) - if data: - if msg.deserialize(array('B',data)): -- print "\tRX: len(%d) %s" % (len(data), msg.getContent()) -+ print("\tRX: len(%d) %s" % (len(data), msg.getContent())) - return msg - else: -- print "msg: %s" % array('B',data) -+ print("msg: %s" % array('B',data)) - raise BluetoothError ("Message deserialization failed.") - else: - raise BluetoothError ("Timeout. No data received.") -@@ -797,8 +797,8 @@ class SAPClient: - return False - else: - return False -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_disconnectByClient(self, timeout=0): -@@ -808,8 +808,8 @@ class SAPClient: - time.sleep(timeout) # let srv to close rfcomm - self.__disconnectRFCOMM() - return True -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_disconnectByServer(self, timeout=0): -@@ -823,8 +823,8 @@ class SAPClient: - - return self.proc_disconnectByClient(timeout) - -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_transferAPDU(self, apdu = "Sample APDU command"): -@@ -832,8 +832,8 @@ class SAPClient: - self.__sendMsg(SAPMessage_TRANSFER_APDU_REQ(apdu)) - params = self.__rcvMsg(SAPMessage_TRANSFER_APDU_RESP()).getParams() - return True -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_transferATR(self): -@@ -841,8 +841,8 @@ class SAPClient: - self.__sendMsg(SAPMessage_TRANSFER_ATR_REQ()) - params = self.__rcvMsg(SAPMessage_TRANSFER_ATR_RESP()).getParams() - return True -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_powerSimOff(self): -@@ -850,8 +850,8 @@ class SAPClient: - self.__sendMsg(SAPMessage_POWER_SIM_OFF_REQ()) - params = self.__rcvMsg(SAPMessage_POWER_SIM_OFF_RESP()).getParams() - return True -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_powerSimOn(self): -@@ -862,8 +862,8 @@ class SAPClient: - return self.proc_transferATR() - - return True -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_resetSim(self): -@@ -874,23 +874,23 @@ class SAPClient: - return self.proc_transferATR() - - return True -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_reportStatus(self): - try: - params = self.__rcvMsg(SAPMessage_STATUS_IND()).getParams() -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_transferCardReaderStatus(self): - try: - self.__sendMsg(SAPMessage_TRANSFER_CARD_READER_STATUS_REQ()) - params = self.__rcvMsg(SAPMessage_TRANSFER_CARD_READER_STATUS_RESP()).getParams() -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_errorResponse(self): -@@ -899,8 +899,8 @@ class SAPClient: - self.__sendMsg(SAPMessage_CONNECT_REQ()) - - params = self.__rcvMsg(SAPMessage_ERROR_RESP()).getParams() -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - def proc_setTransportProtocol(self, protocol = 0): -@@ -922,8 +922,8 @@ class SAPClient: - else: - return False - -- except BluetoothError , e: -- print "Error. " +str(e) -+ except BluetoothError as e: -+ print("Error. " +str(e)) - return False - - if __name__ == "__main__": -Index: b/test/simple-agent -=================================================================== ---- a/test/simple-agent -+++ b/test/simple-agent -@@ -24,9 +24,9 @@ dev_path = None - - def ask(prompt): - try: -- return raw_input(prompt) -- except: - return input(prompt) -+ except: -+ return eval(input(prompt)) - - def set_trusted(path): - props = dbus.Interface(bus.get_object("org.bluez", path), -Index: b/test/simple-player -=================================================================== ---- a/test/simple-player -+++ b/test/simple-player -@@ -119,7 +119,7 @@ class InputHandler: - return True - - try: -- exec "self.player.%s" % s -+ exec("self.player.%s" % s) - except Exception as e: - print(e) - pass -Index: b/test/test-adapter -=================================================================== ---- a/test/test-adapter -+++ b/test/test-adapter -@@ -61,7 +61,7 @@ if (args[0] == "list"): - om = dbus.Interface(bus.get_object("org.bluez", "/"), - "org.freedesktop.DBus.ObjectManager") - objects = om.GetManagedObjects() -- for path, interfaces in objects.iteritems(): -+ for path, interfaces in objects.items(): - if "org.bluez.Adapter1" not in interfaces: - continue - -@@ -69,7 +69,7 @@ if (args[0] == "list"): - - props = interfaces["org.bluez.Adapter1"] - -- for (key, value) in props.items(): -+ for (key, value) in list(props.items()): - if (key == "Class"): - print(" %s = 0x%06x" % (key, value)) - else: -Index: b/test/test-device -=================================================================== ---- a/test/test-device -+++ b/test/test-device -@@ -49,7 +49,7 @@ if (args[0] == "list"): - "org.freedesktop.DBus.ObjectManager") - objects = om.GetManagedObjects() - -- for path, interfaces in objects.iteritems(): -+ for path, interfaces in objects.items(): - if "org.bluez.Device1" not in interfaces: - continue - properties = interfaces["org.bluez.Device1"] -Index: b/test/test-discovery -=================================================================== ---- a/test/test-discovery -+++ b/test/test-discovery -@@ -19,9 +19,9 @@ def print_compact(address, properties): - name = "" - address = "" - -- for key, value in properties.iteritems(): -+ for key, value in properties.items(): - if type(value) is dbus.String: -- value = unicode(value).encode('ascii', 'replace') -+ value = str(value).encode('ascii', 'replace') - if (key == "Name"): - name = value - elif (key == "Address"): -@@ -39,10 +39,10 @@ def print_compact(address, properties): - def print_normal(address, properties): - print("[ " + address + " ]") - -- for key in properties.keys(): -+ for key in list(properties.keys()): - value = properties[key] - if type(value) is dbus.String: -- value = unicode(value).encode('ascii', 'replace') -+ value = str(value).encode('ascii', 'replace') - if (key == "Class"): - print(" %s = 0x%06x" % (key, value)) - else: -@@ -71,7 +71,7 @@ def interfaces_added(path, interfaces): - - if compact and skip_dev(dev, properties): - return -- devices[path] = dict(devices[path].items() + properties.items()) -+ devices[path] = dict(list(devices[path].items()) + list(properties.items())) - else: - devices[path] = properties - -@@ -94,7 +94,7 @@ def properties_changed(interface, change - - if compact and skip_dev(dev, changed): - return -- devices[path] = dict(devices[path].items() + changed.items()) -+ devices[path] = dict(list(devices[path].items()) + list(changed.items())) - else: - devices[path] = changed - -@@ -153,7 +153,7 @@ if __name__ == '__main__': - om = dbus.Interface(bus.get_object("org.bluez", "/"), - "org.freedesktop.DBus.ObjectManager") - objects = om.GetManagedObjects() -- for path, interfaces in objects.iteritems(): -+ for path, interfaces in objects.items(): - if "org.bluez.Device1" in interfaces: - devices[path] = interfaces["org.bluez.Device1"] - -Index: b/test/test-health -=================================================================== ---- a/test/test-health -+++ b/test/test-health -@@ -147,8 +147,8 @@ manager = dbus.Interface(bus.get_object( - objects = manager.GetManagedObjects() - adapters = [] - --for path, ifaces in objects.iteritems(): -- if ifaces.has_key(ADAPTER_INTERFACE): -+for path, ifaces in objects.items(): -+ if ADAPTER_INTERFACE in ifaces: - adapters.append(path) - - i = 1 -@@ -172,7 +172,7 @@ while select == None: - adapter = dbus.Interface(bus.get_object(BUS_NAME, select), ADAPTER_INTERFACE) - - devices = [] --for path, interfaces in objects.iteritems(): -+for path, interfaces in objects.items(): - if "org.bluez.Device1" not in interfaces: - continue - properties = interfaces["org.bluez.Device1"] -Index: b/test/test-health-sink -=================================================================== ---- a/test/test-health-sink -+++ b/test/test-health-sink -@@ -41,8 +41,8 @@ manager = dbus.Interface(bus.get_object( - objects = manager.GetManagedObjects() - adapters = [] - --for path, ifaces in objects.iteritems(): -- if ifaces.has_key(ADAPTER_INTERFACE): -+for path, ifaces in objects.items(): -+ if ADAPTER_INTERFACE in ifaces: - adapters.append(path) - - i = 1 -@@ -67,7 +67,7 @@ adapter = dbus.Interface(bus.get_object - ADAPTER_INTERFACE) - - devices = [] --for path, interfaces in objects.iteritems(): -+for path, interfaces in objects.items(): - if "org.bluez.Device1" not in interfaces: - continue - properties = interfaces["org.bluez.Device1"] -Index: b/test/test-hfp -=================================================================== ---- a/test/test-hfp -+++ b/test/test-hfp -@@ -186,7 +186,7 @@ class HfpProfile(dbus.service.Object): - version = 0x0105 - features = 0 - print("NewConnection(%s, %d)" % (path, fd)) -- for key in properties.keys(): -+ for key in list(properties.keys()): - if key == "Version": - version = properties[key] - elif key == "Features": -Index: b/test/test-profile -=================================================================== ---- a/test/test-profile -+++ b/test/test-profile -@@ -34,7 +34,7 @@ class Profile(dbus.service.Object): - def NewConnection(self, path, fd, properties): - self.fd = fd.take() - print("NewConnection(%s, %d)" % (path, self.fd)) -- for key in properties.keys(): -+ for key in list(properties.keys()): - if key == "Version" or key == "Features": - print(" %s = 0x%04x" % (key, properties[key])) - else: diff --git a/bluez.changes b/bluez.changes index fd6c9a2..67387ed 100644 --- a/bluez.changes +++ b/bluez.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Wed Aug 17 20:26:50 UTC 2022 - Dirk Müller + +- update to 5.65: + * Fix issue with A2DP cache invalidation handling. + * Fix issue with A2DP and not initialized SEP codec. + * Fix issue with A2DP and multiple SetConfiguration to same SEP + * Fix issue with AVRCP and not properly initialized volume. + * Fix issue with SDP records when operating in LE only mode. + * Fix issue with HoG and not reading report map of instances. + * Fix issue with GATT server crashing while disconnecting. + * Fix issue with not removing connected devices. + * Fix issue with enabling wake support without RPA Resolution. + * Fix issue with pairing failed due to the error of Already Paired. + * Add support for CONFIGURATION_DIRECTORY environment variable. + * Add support for STATE_DIRECTORY environment variable. + * Add support for "Bonded" property with Device API. + * Add experimental support for ISO socket. +- drop bluez-test-2to3.diff (obsolete/upstream) + ------------------------------------------------------------------- Sun May 8 16:12:30 UTC 2022 - Ben Greiner diff --git a/bluez.spec b/bluez.spec index d4ebaee..e6d48d9 100644 --- a/bluez.spec +++ b/bluez.spec @@ -31,13 +31,13 @@ %global modprobe_d_files 50-bluetooth.conf Name: bluez -Version: 5.64 +Version: 5.65 Release: 0 Summary: Bluetooth Stack for Linux License: GPL-2.0-or-later Group: Hardware/Mobile URL: http://www.bluez.org -Source: http://www.kernel.org/pub/linux/bluetooth/bluez-%{version}.tar.xz +Source: https://www.kernel.org/pub/linux/bluetooth/bluez-%{version}.tar.xz # we still want debuginfo #KEEP NOSOURCE DEBUGINFO Source5: baselibs.conf @@ -49,8 +49,6 @@ Patch2: bluez-sdp-unix-path.patch Patch3: bluez-cups-libexec.patch # workaround for broken tests (reported upstream but not yet fixed) Patch4: bluez-disable-broken-tests.diff -# get rid of python2. WARNING: this is autogenerated by 2to3 and might not work -Patch5: bluez-test-2to3.diff # # Move 43xx firmware path for RPi3 bluetooth support bsc#1140688 Patch10: RPi-Move-the-43xx-firmware-into-lib-firmware.patch @@ -139,8 +137,8 @@ It is uses a modular implementation. It has many interesting features: Summary: CUPS Driver for Bluetooth Printers License: GPL-2.0-or-later Group: Hardware/Printing -Requires: cups Requires: %{name} +Requires: cups Supplements: (%{name} and cups) %description cups @@ -204,8 +202,8 @@ Object Exchange daemon for sharing content. %package zsh-completion Summary: Zsh completion for bluez Group: System/Management -Requires: zsh Requires: %{name} +Requires: zsh Supplements: (%{name} and zsh) BuildArch: noarch @@ -213,8 +211,7 @@ BuildArch: noarch This package contain the zsh completion command for the Bluetooth Stack for Linux. %prep -%setup -q -%autopatch -p1 +%autosetup -p1 mkdir dbus-apis cp -a doc/*.txt dbus-apis/ @@ -373,6 +370,7 @@ done %{_bindir}/btattach %{_bindir}/l2ping %{_bindir}/hex2hcd +%{_bindir}/isotest %{_bindir}/mpris-proxy %dir %{_libdir}/bluetooth %dir %{_libdir}/bluetooth/plugins @@ -393,6 +391,7 @@ done %{_prefix}/lib/udev/ %{_mandir}/man1/btattach.1%{?ext_man} %{_mandir}/man1/btmon.1%{?ext_man} +%{_mandir}/man1/isotest.1%{?ext_man} %{_mandir}/man8/bluetoothd.8%{?ext_man} %{_mandir}/man1/hid2hci.1%{?ext_man} %{_mandir}/man1/l2ping.1%{?ext_man}