public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Pacho Ramos" <pacho@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/bluez/files/, net-wireless/bluez/
Date: Sat, 27 Sep 2025 18:07:54 +0000 (UTC)	[thread overview]
Message-ID: <1758996451.3cd9e96c31d9a8e8cd1a75bf0b3f0969423ddc2a.pacho@gentoo> (raw)

commit:     3cd9e96c31d9a8e8cd1a75bf0b3f0969423ddc2a
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 27 17:52:49 2025 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Sep 27 18:07:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3cd9e96c

net-wireless/bluez: add 5.84

Bug: https://bugs.gentoo.org/960894
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 net-wireless/bluez/Manifest                        |   1 +
 net-wireless/bluez/bluez-5.84.ebuild               | 282 +++++++++++++++++++++
 .../bluez/files/bluez-5.84-A2DP-config.patch       |  26 ++
 3 files changed, 309 insertions(+)

diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest
index 69b40904944a..bb50c5793097 100644
--- a/net-wireless/bluez/Manifest
+++ b/net-wireless/bluez/Manifest
@@ -1,2 +1,3 @@
 DIST bluez-5.79.tar.xz 2457612 BLAKE2B e908bc000b45832845a09ea7e906d39e107e4934fef4efc9a78b278b7f8ae914ed3a573ef53512de7076a3b1ca8115634fb502cb8d1d0c8516febe05f9e059f8 SHA512 74d47b1eb9b9904798f5c8093674743a14a509d22c33003cf253a1ab0c11a564e6a10a808e087e3fb7f3589d3cba1868ec9bf2923703cdc36a293c95af1d0d76
 DIST bluez-5.83.tar.xz 2492776 BLAKE2B f2467d353b80dcc8befc35b30705fef8acea4f957b7bfa2025aab011e1c425cbb5ac38583f304063a49797267d5dd80f5187ca711a6deca5fa71bb98be9046b8 SHA512 d2ab04e5d2458249964305c991c5d0c1678d24927019e5b6e10d2f8e1350e3f7d7c783fd3770874dc621a699171b68de6678bead1dcb6e6e73c9863248f26aaa
+DIST bluez-5.84.tar.xz 2193140 BLAKE2B 57a1ce55c4649b20f4e1cf15c09813178df963a41679cc6cce651b446bdc6b58f78a7ebb607288a951c87b63ee69c8ff0c50bc14e80bcade28ec5c79ae8a4e0c SHA512 a8471e3d0bf4ba6625bb88db4f24c4d0686a56ab6bdf8fe339b569a0a7c480eee65cb2b4bc9bcc8f518d0d4f640cb0ceb8708b6fd6599c9e809da95198d64d88

diff --git a/net-wireless/bluez/bluez-5.84.ebuild b/net-wireless/bluez/bluez-5.84.ebuild
new file mode 100644
index 000000000000..e81e37800359
--- /dev/null
+++ b/net-wireless/bluez/bluez-5.84.ebuild
@@ -0,0 +1,282 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{11..13} )
+
+inherit autotools flag-o-matic linux-info optfeature python-single-r1 systemd udev multilib-minimal #readme.gentoo-r1
+
+DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
+HOMEPAGE="https://www.bluez.org https://github.com/bluez/bluez"
+SRC_URI="https://www.kernel.org/pub/linux/bluetooth/${P}.tar.xz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0/3"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
+IUSE="btpclient cups doc debug deprecated extra-tools experimental man +mesh midi +obex +readline selinux systemd test test-programs +udev"
+
+# Since this release all remaining extra-tools need readline support, but this could
+# change in the future, hence, this REQUIRED_USE constraint could be dropped
+# again in the future.
+# btpclient needs mesh, bug #790587
+REQUIRED_USE="
+	btpclient? ( mesh )
+	extra-tools? ( deprecated readline )
+	test? ( ${PYTHON_REQUIRED_USE} )
+	test-programs? ( ${PYTHON_REQUIRED_USE} )
+"
+
+TEST_DEPS="${PYTHON_DEPS}
+	$(python_gen_cond_dep '
+		>=dev-python/dbus-python-1[${PYTHON_USEDEP}]
+		dev-python/pygobject:3[${PYTHON_USEDEP}]
+	')
+"
+BDEPEND="
+	virtual/pkgconfig
+	man? ( dev-python/docutils )
+	test? ( ${TEST_DEPS} )
+"
+DEPEND="
+	>=dev-libs/glib-2.36:2[${MULTILIB_USEDEP}]
+	>=sys-apps/dbus-1.6:=
+	btpclient? ( >=dev-libs/ell-0.39 )
+	cups? ( net-print/cups:= )
+	mesh? (
+		>=dev-libs/ell-0.39
+		>=dev-libs/json-c-0.13:=
+		sys-libs/readline:0=
+	)
+	midi? ( media-libs/alsa-lib )
+	obex? ( dev-libs/libical:= )
+	readline? ( sys-libs/readline:0= )
+	systemd? ( sys-apps/systemd )
+	udev? ( >=virtual/udev-196 )
+"
+RDEPEND="${DEPEND}
+	selinux? ( sec-policy/selinux-bluetooth )
+	test-programs? ( ${TEST_DEPS} )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+	# Try both udevadm paths to cover udev/systemd vs. eudev locations (#539844)
+	# http://www.spinics.net/lists/linux-bluetooth/msg58739.html
+	# https://bugs.gentoo.org/539844
+	# https://github.com/bluez/bluez/issues/268
+	"${FILESDIR}"/${PN}-udevadm-path-r1.patch
+
+	# https://bugs.gentoo.org/928365
+	# https://github.com/bluez/bluez/issues/726
+	"${FILESDIR}"/${PN}-disable-test-vcp.patch
+
+	# Fix Bluetooth LE audio (from Fedora)
+	"${FILESDIR}"/${P}-A2DP-config.patch
+)
+
+pkg_setup() {
+	# From http://www.linuxfromscratch.org/blfs/view/svn/general/bluez.html
+	# to prevent bugs like:
+	# https://bugzilla.kernel.org/show_bug.cgi?id=196621
+	CONFIG_CHECK="~NET ~BT ~BT_RFCOMM ~BT_RFCOMM_TTY ~BT_BNEP ~BT_BNEP_MC_FILTER
+		~BT_BNEP_PROTO_FILTER ~BT_HIDP ~CRYPTO_USER_API_HASH ~CRYPTO_USER_API_SKCIPHER
+		~UHID ~RFKILL"
+	# https://bugzilla.kernel.org/show_bug.cgi?id=196621
+	# https://bugzilla.kernel.org/show_bug.cgi?id=206815
+	if use mesh || use test; then
+		CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_USER
+		~CRYPTO_USER_API ~CRYPTO_USER_API_AEAD ~CRYPTO_AES ~CRYPTO_CCM ~CRYPTO_AEAD ~CRYPTO_CMAC
+		~CRYPTO_MD5 ~CRYPTO_SHA1 ~KEY_DH_OPERATIONS"
+	fi
+	linux-info_pkg_setup
+
+	if use test || use test-programs; then
+		python-single-r1_pkg_setup
+	fi
+
+	if ! use udev; then
+		ewarn
+		ewarn "You are installing ${PN} with USE=-udev. This means various bluetooth"
+		ewarn "devices and adapters from Apple, Dell, Logitech etc. will not work,"
+		ewarn "and hid2hci will not be available."
+		ewarn
+	fi
+}
+
+src_prepare() {
+	default
+
+	# https://github.com/bluez/bluez/issues/806
+	eapply "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-session-r4.patch
+
+	eautoreconf
+
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	# unit/test-vcp test fails with LTO (bug #925745)
+	filter-lto
+
+	local myconf=(
+		# readline is automagic when client is enabled
+		# --enable-client always needs readline, bug #504038
+		# --enable-mesh is handled in the same way
+		ac_cv_header_readline_readline_h=$(multilib_native_usex readline)
+		ac_cv_header_readline_readline_h=$(multilib_native_usex mesh)
+	)
+
+	if ! multilib_is_native_abi; then
+		myconf+=(
+			# deps not used for the library
+			{DBUS,GLIB}_{CFLAGS,LIBS}=' '
+		)
+	fi
+
+	econf \
+		--localstatedir=/var \
+		--enable-datafiles \
+		--enable-optimization \
+		$(use_enable debug) \
+		--enable-pie \
+		--enable-threads \
+		--enable-library \
+		--enable-tools \
+		--enable-monitor \
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+		--with-systemduserunitdir="$(systemd_get_userunitdir)" \
+		$(multilib_native_use_enable btpclient) \
+		$(multilib_native_use_enable btpclient external-ell) \
+		$(multilib_native_use_enable cups) \
+		$(multilib_native_use_enable deprecated) \
+		$(multilib_native_use_enable experimental) \
+		$(multilib_native_use_enable man manpages) \
+		$(multilib_native_use_enable mesh) \
+		$(multilib_native_use_enable mesh external-ell) \
+		$(multilib_native_use_enable midi) \
+		$(multilib_native_use_enable obex) \
+		$(multilib_native_use_enable readline client) \
+		$(multilib_native_use_enable systemd) \
+		$(multilib_native_use_enable test-programs test) \
+		$(multilib_native_use_enable udev) \
+		$(multilib_native_use_enable udev hid2hci) \
+		$(multilib_native_use_enable udev sixaxis)
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		default
+	else
+		emake -f Makefile -f - libs \
+			<<<'libs: $(lib_LTLIBRARIES)'
+	fi
+}
+
+multilib_src_test() {
+	multilib_is_native_abi && default
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		emake DESTDIR="${D}" install
+
+		# Only install extra-tools when relevant USE flag is enabled
+		if use extra-tools; then
+			ewarn "Upstream doesn't support using this tools and their bugs are"
+			ewarn "likely to be ignored forever, also they can break without"
+			ewarn "previous announcement."
+			ewarn "Upstream also states all this tools are not really needed,"
+			ewarn "then, if you still need to rely on them, you must ask them"
+			ewarn "to either install that tool by default or add the needed"
+			ewarn "functionality to the existing 'official' tools."
+			ewarn "Please report this issues to:"
+			ewarn "http://www.bluez.org/development/lists/"
+
+			# Upstream doesn't install this, bug #524640
+			# http://permalink.gmane.org/gmane.linux.bluez.kernel/53115
+			# http://comments.gmane.org/gmane.linux.bluez.kernel/54564
+			dobin tools/btmgmt
+			# gatttool is only built with readline, bug #530776
+			# https://bugzilla.redhat.com/show_bug.cgi?id=1141909
+			# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720486
+			# https://bugs.archlinux.org/task/37686
+			dobin attrib/gatttool
+			# https://bugzilla.redhat.com/show_bug.cgi?id=1699680
+			dobin tools/avinfo
+		fi
+
+		# Not installed by default after being built, bug #666756
+		use btpclient && dobin tools/btpclient
+
+		# Unittests are not that useful once installed, so make them optional
+		if use test-programs; then
+			# Drop python2 only test tools
+			# https://bugzilla.kernel.org/show_bug.cgi?id=206819
+			rm "${ED}"/usr/$(get_libdir)/bluez/test/simple-player || die
+			# https://bugzilla.kernel.org/show_bug.cgi?id=206821
+			rm "${ED}"/usr/$(get_libdir)/bluez/test/test-hfp || die
+			# https://bugzilla.kernel.org/show_bug.cgi?id=206823
+			rm "${ED}"/usr/$(get_libdir)/bluez/test/test-sap-server	|| die
+
+			python_fix_shebang "${ED}"/usr/$(get_libdir)/bluez/test
+
+			for i in $(find "${ED}"/usr/$(get_libdir)/bluez/test -maxdepth 1 -type f ! -name "*.*"); do
+				dosym "${i#${ED}}" /usr/bin/bluez-"${i##*/}"
+			done
+		fi
+	else
+		emake DESTDIR="${D}" \
+			install-pkgincludeHEADERS \
+			install-libLTLIBRARIES \
+			install-pkgconfigDATA
+	fi
+}
+
+multilib_src_install_all() {
+	# We need to ensure obexd can be spawned automatically by systemd
+	# when user-session is enabled:
+	# http://marc.info/?l=linux-bluetooth&m=148096094716386&w=2
+	# https://bugs.gentoo.org/show_bug.cgi?id=577842
+	# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804908
+	# https://bugs.archlinux.org/task/45816
+	# https://bugzilla.redhat.com/show_bug.cgi?id=1318441
+	# https://bugzilla.redhat.com/show_bug.cgi?id=1389347
+	if use systemd; then
+		dosym obex.service /usr/lib/systemd/user/dbus-org.bluez.obex.service
+	fi
+
+	find "${D}" -name '*.la' -type f -delete || die
+
+	# Setup auto enable as Fedora does for allowing to use
+	# keyboards/mouse as soon as possible
+	insinto /etc/bluetooth
+	doins src/main.conf
+
+	newinitd "${FILESDIR}"/bluetooth-init.d-r5 bluetooth
+	newconfd "${FILESDIR}"/bluetooth-conf.d bluetooth
+
+	einstalldocs
+	use doc && dodoc doc/*.txt
+
+	# https://bugs.gentoo.org/929017
+	# https://github.com/bluez/bluez/issues/329#issuecomment-1102459104
+	fperms 0555 /etc/bluetooth
+
+	# https://bugs.gentoo.org/932172
+	if ! use systemd; then
+		keepdir /var/lib/bluetooth
+		fperms 0700 /var/lib/bluetooth
+	fi
+}
+
+pkg_postinst() {
+	use udev && udev_reload
+	systemd_reenable bluetooth.service
+
+	optfeature "Dial-up networking" net-dialup/ppp
+}
+
+pkg_postrm() {
+	use udev && udev_reload
+}

diff --git a/net-wireless/bluez/files/bluez-5.84-A2DP-config.patch b/net-wireless/bluez/files/bluez-5.84-A2DP-config.patch
new file mode 100644
index 000000000000..4ddba4d87e2a
--- /dev/null
+++ b/net-wireless/bluez/files/bluez-5.84-A2DP-config.patch
@@ -0,0 +1,26 @@
+From 6b0a08776ae44a9102d7c6875a77e83dc6a11a37 Mon Sep 17 00:00:00 2001
+From: Pauli Virtanen <pav@iki.fi>
+Date: Thu, 18 Sep 2025 20:19:35 +0300
+Subject: [PATCH] media: fix pac_config_cb() error code return
+
+Fixes: a887b1a1b91f ("audio: Add support for specific error codes for A2DP configuration")
+---
+ profiles/audio/media.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/profiles/audio/media.c b/profiles/audio/media.c
+index 332f643bb..deb321e6c 100644
+--- a/profiles/audio/media.c
++++ b/profiles/audio/media.c
+@@ -1110,7 +1110,7 @@ static void pac_config_cb(struct media_endpoint *endpoint, void *ret, int size,
+ 	if (!transport)
+ 		return;
+ 
+-	data->cb(data->stream, error_code == 0 ? 0 : -EINVAL);
++	data->cb(data->stream, (error_code && *error_code == 0) ? 0 : -EINVAL);
+ }
+ 
+ static struct media_transport *pac_ucast_config(struct bt_bap_stream *stream,
+-- 
+2.51.0
+


             reply	other threads:[~2025-09-27 18:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-27 18:07 Pacho Ramos [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-12 17:41 [gentoo-commits] repo/gentoo:master commit in: net-wireless/bluez/files/, net-wireless/bluez/ Pacho Ramos
2024-04-07 16:06 Pacho Ramos
2024-03-25 18:45 Pacho Ramos
2024-03-07 14:28 Pacho Ramos
2023-12-21  9:23 Pacho Ramos
2023-12-16  9:15 Pacho Ramos
2023-12-09 18:11 Sam James
2022-12-04 14:50 Pacho Ramos
2022-01-16  9:38 Pacho Ramos
2021-10-19 21:19 Pacho Ramos
2021-07-25  9:01 Pacho Ramos
2021-06-23  7:53 Pacho Ramos
2021-06-22 16:17 Pacho Ramos
2021-03-22 21:16 Pacho Ramos
2019-10-20 11:39 Pacho Ramos
2019-09-29 11:01 Pacho Ramos
2019-06-10 11:23 Pacho Ramos
2019-01-19  8:56 Pacho Ramos
2018-05-23 18:52 Pacho Ramos
2017-09-24 21:26 Pacho Ramos
2017-09-14 17:23 Patrick McLean
2017-02-04 15:20 Pacho Ramos
2016-02-12  8:50 Jeroen Roovers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1758996451.3cd9e96c31d9a8e8cd1a75bf0b3f0969423ddc2a.pacho@gentoo \
    --to=pacho@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox