Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/bluez.git#47bb2ac98f1fbabb64f89d5250528c8289a3cb43
This commit is contained in:
DistroBaker 2021-03-21 11:30:16 +00:00
parent 660c6dfd68
commit 44542942b3
7 changed files with 112 additions and 94 deletions

View File

@ -0,0 +1,42 @@
From 124dee151746b4a8a2e8a7194af78f2c82f75d79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 3 Mar 2021 08:57:36 +0100
Subject: [PATCH] media: rename local function conflicting with pause(2)
profiles/audio/media.c:1284:13: error: conflicting types for 'pause'; have '_Bool(void *)'
1284 | static bool pause(void *user_data)
| ^~~~~
In file included from /usr/include/bits/sigstksz.h:24,
from /usr/include/signal.h:315,
from /usr/include/glib-2.0/glib/gbacktrace.h:36,
from /usr/include/glib-2.0/glib.h:34,
from profiles/audio/media.c:21:
/usr/include/unistd.h:478:12: note: previous declaration of 'pause' with type 'int(void)'
478 | extern int pause (void);
| ^~~~~
---
profiles/audio/media.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index c84bbe22dc..3d8c4b69c3 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -1281,7 +1281,7 @@ static bool stop(void *user_data)
return media_player_send(mp, "Stop");
}
-static bool pause(void *user_data)
+static bool pause_play(void *user_data)
{
struct media_player *mp = user_data;
@@ -1331,7 +1331,7 @@ static struct avrcp_player_cb player_cb = {
.set_volume = set_volume,
.play = play,
.stop = stop,
- .pause = pause,
+ .pause = pause_play,
.next = next,
.previous = previous,
};

View File

@ -1,33 +0,0 @@
# Some devices have a bluetooth HCI connected to an uart, these needs to be
# setup by calling btattach. The systemd btattach-bcm.service takes care of
# this. These udev rules hardware-activate that service when necessary.
#
# For now this only suports ACPI enumerated Broadcom BT HCIs.
# This has been tested on Bay and Cherry Trail devices with both ACPI and
# PCI enumerated UARTs.
# Note we check for the platform device not for the acpi device, because
# some DSDTs list multiple bluetooth adapters, but only some (or none)
# are enabled. Only enabled adapters get a platform device created.
ACTION!="add", GOTO="btattach_bcm_rules_end"
SUBSYSTEM!="platform", GOTO="btattach_bcm_rules_end"
KERNEL=="BCM2E1A:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E39:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E3A:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E3D:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E3F:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E40:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E54:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E55:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E64:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E65:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E67:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E71:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E7B:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E7C:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E7E:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E95:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
KERNEL=="BCM2E96:00", TAG+="systemd", ENV{SYSTEMD_WANTS}="btattach-bcm@%k.service"
LABEL="btattach_bcm_rules_end"

View File

@ -0,0 +1,41 @@
From 28ddec8d6b829e002fa268c07b71e4c564ba9e16 Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Thu, 11 Mar 2021 07:36:07 -0800
Subject: [PATCH] avdtp: Fix removing all remote SEPs when loading from cache
If avdtp_discover is called after cache has been loaded it end up
removing all remote SEPs as they have not been discovered yet.
Fixes: https://github.com/bluez/bluez/issues/102
---
profiles/audio/avdtp.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index 088ca58b3..1d5871c62 100644
--- a/profiles/audio/avdtp.c
+++ b/profiles/audio/avdtp.c
@@ -3381,10 +3381,18 @@ int avdtp_discover(struct avdtp *session, avdtp_discover_cb_t cb,
session->discover = g_new0(struct discover_callback, 1);
if (session->seps) {
- session->discover->cb = cb;
- session->discover->user_data = user_data;
- session->discover->id = g_idle_add(process_discover, session);
- return 0;
+ struct avdtp_remote_sep *sep = session->seps->data;
+
+ /* Check that SEP have been discovered as it may be loaded from
+ * cache.
+ */
+ if (sep->discovered) {
+ session->discover->cb = cb;
+ session->discover->user_data = user_data;
+ session->discover->id = g_idle_add(process_discover,
+ session);
+ return 0;
+ }
}
err = send_request(session, FALSE, NULL, AVDTP_DISCOVER, NULL, 0);

View File

@ -5,8 +5,8 @@
%endif
Name: bluez
Version: 5.55
Release: 3%{?dist}
Version: 5.56
Release: 4%{?dist}
Summary: Bluetooth utilities
License: GPLv2+
URL: http://www.bluez.org/
@ -14,25 +14,22 @@ URL: http://www.bluez.org/
Source0: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
Source1: bluez.gitignore
# Scripts for automatically btattach-ing serial ports connected to Broadcom HCIs
Source2: 69-btattach-bcm.rules
Source3: btattach-bcm@.service
Source4: btattach-bcm-service.sh
# https://github.com/hadess/bluez/commits/obex-5.46
Patch1: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
# https://github.com/hadess/bluez/commits/systemd-hardening
Patch10: 0001-build-Always-define-confdir-and-statedir.patch
Patch11: 0002-systemd-Add-PrivateTmp-and-NoNewPrivileges-options.patch
Patch12: 0003-systemd-Add-more-filesystem-lockdown.patch
Patch13: 0004-systemd-More-lockdown.patch
Patch14: 0005-media-rename-local-function-conflicting-with-pause-2.patch
Patch15: bluez-avdtp-fix-removing-all-seps-when-loading-from-cache.patch
BuildRequires: dbus-devel >= 1.6
BuildRequires: glib2-devel
BuildRequires: libell-devel >= 0.37
BuildRequires: libical-devel
BuildRequires: make
BuildRequires: readline-devel
BuildRequires: libell-devel >= 0.28
# For bluetooth mesh
BuildRequires: json-c-devel
# For cable pairing
@ -41,10 +38,8 @@ BuildRequires: systemd-devel
BuildRequires: cups-devel
# For autoreconf
BuildRequires: libtool automake autoconf
BuildRequires: make
Requires: dbus >= 1.6
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
@ -52,7 +47,6 @@ Requires(postun): systemd
%description
Utilities for use in Bluetooth applications:
- avinfo
- bccmd
- bluemoon
- bluetoothctl
- bluetoothd
@ -151,8 +145,7 @@ Object Exchange daemon for sharing files, contacts etc over bluetooth
%autosetup -p1
%build
libtoolize -f
autoreconf -f -i
autoreconf -vif
%configure --enable-tools --enable-library \
%if %{with deprecated}
--enable-deprecated \
@ -177,6 +170,11 @@ install -m0755 attrib/gatttool $RPM_BUILD_ROOT%{_bindir}
# Red Hat Bugzilla bug #1699680
install -m0755 tools/avinfo $RPM_BUILD_ROOT%{_bindir}
# btmgmt is not installed by "make install", but it is useful for debugging
# some issues and to set the MAC address on HCIs which don't have their
# MAC address configured
install -m0755 tools/btmgmt $RPM_BUILD_ROOT%{_bindir}
# Remove libtool archive
find $RPM_BUILD_ROOT -name '*.la' -delete
@ -199,11 +197,6 @@ install -D -p -m0644 src/main.conf ${RPM_BUILD_ROOT}/etc/bluetooth/main.conf
install -D -p -m0644 mesh/mesh-main.conf ${RPM_BUILD_ROOT}/etc/bluetooth/mesh-main.conf
sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' ${RPM_BUILD_ROOT}/%{_sysconfdir}/bluetooth/main.conf
#serial port connected Broadcom HCIs scripts
install -D -p -m0644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_udevrulesdir}/
install -D -p -m0644 %{SOURCE3} ${RPM_BUILD_ROOT}/%{_unitdir}/
install -D -p -m0755 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/
# Install the HCI emulator, useful for testing
install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/
@ -243,10 +236,10 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/
%config %{_sysconfdir}/bluetooth/main.conf
%config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
%{_bindir}/avinfo
%{_bindir}/bccmd
%{_bindir}/bluemoon
%{_bindir}/bluetoothctl
%{_bindir}/btattach
%{_bindir}/btmgmt
%{_bindir}/btmon
%{_bindir}/hex2hcd
%{_bindir}/l2ping
@ -254,19 +247,15 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/
%{_bindir}/mpris-proxy
%{_bindir}/rctest
%{_mandir}/man1/btattach.1.*
%{_mandir}/man1/bccmd.1.*
%{_mandir}/man1/l2ping.1.*
%{_mandir}/man1/rctest.1.*
%{_mandir}/man8/bluetoothd.8.*
%dir %{_libexecdir}/bluetooth
%{_libexecdir}/bluetooth/bluetoothd
%{_libexecdir}/bluetooth/btattach-bcm-service.sh
%{_libdir}/bluetooth/
%{_localstatedir}/lib/bluetooth
%{_datadir}/dbus-1/system-services/org.bluez.service
%{_unitdir}/bluetooth.service
%{_unitdir}/btattach-bcm@.service
%{_udevrulesdir}/69-btattach-bcm.rules
%{_datadir}/zsh/site-functions/_bluetoothctl
%if %{with deprecated}
@ -326,6 +315,21 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/
%{_userunitdir}/obex.service
%changelog
* Sun Mar 14 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 5.56-4
- Fix for avdtp audio disconnexts
* Sun Mar 14 2021 Hans de Goede <hdegoede@redhat.com> - 5.56-3
- Drop obsolete udev rule + systemd service to call btattach on BT-HCIs
connected via UART from userspace, this is all handled in the kernel now
- Add the btmgmt util to the packaged files
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 5.56-2
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* Sat Feb 27 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 5.56-1
- Update to 5.56
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.55-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

View File

@ -1,30 +0,0 @@
#!/bin/bash
# Simple shell script to wait for the tty for an uart using BT HCI to show up
# and then invoke btattach with the right parameters, this is intended to be
# invoked from a hardware-activated systemd service
#
# For now this only suports ACPI enumerated Broadcom BT HCIs.
# This has been tested on Bay and Cherry Trail devices with both ACPI and
# PCI enumerated UARTs.
#
# Note the kernel bt developers are working on solving this entirely in the
# kernel, so it is not worth the trouble to write something better then this.
BT_DEV="/sys/bus/platform/devices/$1"
BT_DEV="$(readlink -f $BT_DEV)"
UART_DEV="$(dirname $BT_DEV)"
# Stupid GPD-pocket has USB BT with id 0000:0000, but still claims to have
# an uart attached bt
if [ "$1" = "BCM2E7E:00" ] && lsusb | grep -q "ID 0000:0000"; then
exit 0
fi
while [ ! -d "$UART_DEV/tty" ]; do
sleep .2
done
TTY="$(ls $UART_DEV/tty)"
exec btattach --bredr "/dev/$TTY" -P bcm

View File

@ -1,6 +0,0 @@
[Unit]
Description=btattach for Broadcom devices
[Service]
Type=simple
ExecStart=/usr/libexec/bluetooth/btattach-bcm-service.sh %I

View File

@ -1 +1 @@
SHA512 (bluez-5.55.tar.xz) = 9423cb60d15a6f068838497a1eaea9f5a32d70c07191c313ba821a6919d6e0c436ada4f547cc5f2db5eacc0123429ad54851f57df2554f61fa293743ec14a033
SHA512 (bluez-5.56.tar.xz) = b320ee9d49a516f5cecb5fbc410ba42e9127f44ebcfb95647f68bd5d300147d0eaf633f8e8d0678631a2184ea3afae7b01b5f228157328874fa2a87832ed0ae1