From c4d92ab721dfc646b4a58429d965e9446294ce26 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 4 Dec 2022 21:03:51 +0000 Subject: gentoo auto-resync : 04:12:2022 - 21:03:51 --- net-wireless/Manifest.gz | Bin 14545 -> 14553 bytes net-wireless/bluez/Manifest | 6 +- net-wireless/bluez/bluez-5.64.ebuild | 296 -------------------- net-wireless/bluez/bluez-5.66.ebuild | 300 +++++++++++++++++++++ .../bluez-5.66-power-state-adapter-property.patch | 28 ++ .../files/bluez-5.66-transient-hostname-fix.patch | 185 +++++++++++++ 6 files changed, 517 insertions(+), 298 deletions(-) delete mode 100644 net-wireless/bluez/bluez-5.64.ebuild create mode 100644 net-wireless/bluez/bluez-5.66.ebuild create mode 100644 net-wireless/bluez/files/bluez-5.66-power-state-adapter-property.patch create mode 100644 net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch (limited to 'net-wireless') diff --git a/net-wireless/Manifest.gz b/net-wireless/Manifest.gz index 301f65b421b1..a8d3917d0caa 100644 Binary files a/net-wireless/Manifest.gz and b/net-wireless/Manifest.gz differ diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest index a886689dd51f..d5a1427801cb 100644 --- a/net-wireless/bluez/Manifest +++ b/net-wireless/bluez/Manifest @@ -4,10 +4,12 @@ AUX 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch 1252 BLAKE2B ce AUX bluetooth-conf.d 21 BLAKE2B 7c94e499438f441fc18f0b50178e707982ac91871a74b2e7a35c9930d32441a89f742993e993e3003f9bcb5e3ee9adde2ab1cbe33b27245b1b1e91e7c3dc1a0b SHA512 45befd3fb42ea3462fa6e1ee9f3ee9591e197d4925a4c9df6733bacfe44cf44f54ed3aad6fd7a6a2953da54b93460a1cf0ea1cadf0d7e47f811e4c3182af74d5 AUX bluetooth-init.d-r5 313 BLAKE2B 6bad1b9a75de5927ab22a229d6ce18247b32a79b994078338eff33df7f74a7dc4a5266212f6d0150101600e3a864a9b64ce6a576208218750bfbe88bc5911baa SHA512 95aff192be6207047fc01b42754bcd34d5cd7f82c16486fdd81bb1d14be040e4f3e9bafd8dc2f4e8b87bf1eb50f6634f526feaf2b38c0c6807f40784d84dac96 AUX bluez-5.63-musl-limits.patch 558 BLAKE2B 2dd66c54aee0bd8bfe3fd530a4e29139d79f6eb153e06e13680df42f2a361274d6a8f0f80989b7962173d693f37d1cac8b16506267a1319e608382511cf4bfe1 SHA512 b752414c8219befb71e0f0a59fa33be5a0d2add2b89a0c8f90de13aef1815307e5f4b8f076d3778778ab3de6656fd50d59f621af50d9ed39695b5f7978660348 +AUX bluez-5.66-power-state-adapter-property.patch 1085 BLAKE2B 9d76822b8ab649eb322e9511b86d85b912d8a073f15c563b689ad57b12e1c1eb043ed1741b62364dfae3b4a100ad4fdce36e723103f231dd77bf070c4ae0be73 SHA512 df52b4d260e0de6de9ad4bc1201740b2bc37a537c96e2a22d4f8b698caf6fcea81eba1e8d7b152ad6a1237a51e06212e7cfdc429b9b7f7ff66d23a294cbc55e5 +AUX bluez-5.66-transient-hostname-fix.patch 5163 BLAKE2B 6a0f63370634ec7bdc830d8bb26ca47f273194e4a5ebf3c7fc654371f520d117da5112e76b4939e96e0d56ede2a0663ae1414dc809b9315a8bac63045ed70867 SHA512 fe787ec5a2e77da7ca3483797b07b1c4d0dbc133d22095e8b6fb3361a79f7762284af265e3bee54e330e22b110ee95916ad1f4f1f37002af9fc7859b09d1bdd0 AUX bluez-udevadm-path-r1.patch 564 BLAKE2B 0b4dc12f55ab60d254aa3365baf35186a5913026dbfcbc3da41c113b3c423c81189b87016dabcb2c505b684cad376d10d10df9aa17558b8fd022928995931e0e SHA512 d9b0dd452258e425802cf5ad4980a77796be79e94bf6ce641927c5ab7ea1117ce6589063f3a0b96bf25e81303234279a09d58484fec49cfc6aa1db46f245f9c6 -DIST bluez-5.64.tar.xz 2175148 BLAKE2B 828c620330d1993d5c5c2a865f2d27a29425e3583aac01a1a782290a805ee0fd6456b6832c804ad323dd8714fa9329487b2616ed08f1f491ea29403ee05dba2d SHA512 f11f9974b29c5c6fce3890d7e42425c1cb02e42c1b8f49c5cc4b249234e67b64317d0e5e82721e2fbf1b53269c8569a9c869d59ce42b5e927f6622f0753e53cd DIST bluez-5.65.tar.xz 2208100 BLAKE2B 9d2937e2e14d8d8945183c6436921d9d16a6d3bcb5dbe3e2493554fbc4972bb4c006aabc793c9fb8eae47a7e9f29ae9fdf47551dfc0a238e86f5a76ce7436ae2 SHA512 c20c09a1a75053c77d73b3ce15ac7fd321eb6df5ca1646d57c6848b87c0c9957908bc17dd928da4ef2aacfc8667877cbc7511c1ba43db839bfa9bf1fb8269907 +DIST bluez-5.66.tar.xz 2257288 BLAKE2B af1911cf590461a874daa16bedb8a021a3b2c2af3254360c035d2180e0f355372651bd41da342c26e6d9631d726dd08e0d6a83a22069333b94b6fce6d546718c SHA512 ed0994932687eacf27207867366671b323671f5d5199daf36ea5eff8f254f2bc99ef989ef7df9883b35c06f2af60452be8bad0a06109428a4717cf2b247b4865 DIST power-state-adapter-property.patch 22488 BLAKE2B a46173c0ebe4f4822c67c2f8f2f3e67dab261753f64204f1a61665c3bba1d7a10e0f8511b38ce273d986490ffd262a737bee82694909683df7386b2015301607 SHA512 b039a578454681f291dc3b04079c8d0151b13a84b4b013e290aa3c28aba1538cef2d9e9aadfe88a0dbfb8e4cea1c251cb5043f4175fb32d53526f7b82de0451a -EBUILD bluez-5.64.ebuild 9384 BLAKE2B 9763e7477924ed3255d85e1f4961e40018b6680b55d6a1eec4afa9c5e35c4e193c67cdb489147d860934d42cbd3da7bd3134eb9f80e85e703d7406b2c637adc1 SHA512 2f40e7a0b95c163c57b579b31b973ee3da519cd3ad4945bd76de674feb070f17cdf134e1b69db00f42ff2a2090deaa5bc78c22679263903f0eaec40b51f2236c EBUILD bluez-5.65.ebuild 9527 BLAKE2B 2089a41aee0dcf30d070dbe59787e0ea2d69d7d168705086487fcd18910c7f5f233e532eda91adf5353c2b750f13cafb898e0d684aef8093490c0a9e8006311b SHA512 5b11b34f7b93603175a2b83fad3c37c85f2806bf582bd57ba8cb1bf79fc0cd1a48a8a7a346b20876d0de1f1b58447ff7ee2c4a00930a54047c4e16daecf901e4 +EBUILD bluez-5.66.ebuild 9621 BLAKE2B 7c110dffd4eab5911091a299f350729fa9bd024a7b2da96abbfb5ee153f24b91593d4a78aacd3b8b0c924e037d9cce31a488829bf12a2569d8f4243ec4140121 SHA512 71afb0946d9b452404e191ac3ade4f1b64233d4592fa3f0c948ca92d061bbffdd7671ebb675e4582ab29c1e8818fc745039b2f1acbdf6fc5468e7981898a24cf MISC metadata.xml 1099 BLAKE2B 75b6db1d43b75f9b22ce5fb6ec640e2e06b2f2575ff75441318a2076b8486ed7d81a62714540c61ab3a35198113538546b9aa71d05ef4cd7106c8a7f09c13029 SHA512 6e4a7bba7102b4850a938ba0f6feec9cd12488d4b440b19982751c2a742b33a565933fae3967080c060e5b5eb51d90268abc87a2c0a2efb7f4c773020c29462a diff --git a/net-wireless/bluez/bluez-5.64.ebuild b/net-wireless/bluez/bluez-5.64.ebuild deleted file mode 100644 index d70099f17051..000000000000 --- a/net-wireless/bluez/bluez-5.64.ebuild +++ /dev/null @@ -1,296 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -PYTHON_COMPAT=( python3_{8..10} ) - -inherit autotools linux-info python-single-r1 readme.gentoo-r1 systemd udev multilib-minimal - -DESCRIPTION="Bluetooth Tools and System Daemons for Linux" -HOMEPAGE="http://www.bluez.org" -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 ~mips ppc ppc64 ~riscv x86" -IUSE="btpclient cups doc debug deprecated extra-tools experimental +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=" - dev-python/docutils - virtual/pkgconfig - test? ( ${TEST_DEPS} ) -" -DEPEND=" - >=dev-libs/glib-2.28:2[${MULTILIB_USEDEP}] - 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 ) - >=sys-apps/dbus-1.6:= - udev? ( >=virtual/udev-172 ) -" -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://github.com/bluez/bluez/issues/267 - "${FILESDIR}"/${PN}-5.63-musl-limits.patch - - # Fedora patches - # http://www.spinics.net/lists/linux-bluetooth/msg40136.html - "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.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 ~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 - - # http://www.spinics.net/lists/linux-bluetooth/msg38490.html - if ! use systemd; then - eapply "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch - fi - - eautoreconf - - if use cups; then - # Only not .am to not need to run eautoreconf only because of this - sed -i \ - -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \ - Makefile.{in,tools} || die - fi - - multilib_copy_sources -} - -multilib_src_configure() { - 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 \ - --disable-android \ - --enable-datafiles \ - --enable-optimization \ - $(use_enable debug) \ - --enable-pie \ - --enable-threads \ - --enable-library \ - --enable-tools \ - --enable-manpages \ - --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 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}" /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 - - keepdir /var/lib/bluetooth - - # Upstream don't want people to play with them - # But we keep installing them due to 'historical' reasons - insinto /etc/bluetooth - local d - for d in input network; do - doins profiles/${d}/${d}.conf - done - # Setup auto enable as Fedora does for allowing to use - # keyboards/mouse as soon as possible - sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' src/main.conf || die - doins src/main.conf - - newinitd "${FILESDIR}"/bluetooth-init.d-r5 bluetooth - newconfd "${FILESDIR}"/bluetooth-conf.d bluetooth - - einstalldocs - use doc && dodoc doc/*.txt - # Install .json files as examples to be used by meshctl - if use mesh; then - dodoc tools/mesh-gatt/*.json - local DOC_CONTENTS="Some example .json files were installed into - /usr/share/doc/${PF} to be used with meshctl. Feel free to - uncompress and copy them to ~/.config/meshctl to use them." - readme.gentoo_create_doc - fi -} - -pkg_postinst() { - use udev && udev_reload - systemd_reenable bluetooth.service - - has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp" - use mesh && readme.gentoo_print_elog -} - -pkg_postrm() { - use udev && udev_reload -} diff --git a/net-wireless/bluez/bluez-5.66.ebuild b/net-wireless/bluez/bluez-5.66.ebuild new file mode 100644 index 000000000000..9a5ea90d88e1 --- /dev/null +++ b/net-wireless/bluez/bluez-5.66.ebuild @@ -0,0 +1,300 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{8..11} ) + +inherit autotools linux-info python-single-r1 systemd udev multilib-minimal #readme.gentoo-r1 + +DESCRIPTION="Bluetooth Tools and System Daemons for Linux" +HOMEPAGE="http://www.bluez.org" +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 +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=" + dev-python/docutils + virtual/pkgconfig + test? ( ${TEST_DEPS} ) +" +DEPEND=" + >=dev-libs/glib-2.28:2[${MULTILIB_USEDEP}] + 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 ) + >=sys-apps/dbus-1.6:= + udev? ( >=virtual/udev-172 ) +" +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 + + # Fedora patches + # http://www.spinics.net/lists/linux-bluetooth/msg40136.html + "${FILESDIR}"/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch + + # https://lore.kernel.org/linux-bluetooth/20220901110719.176944-1-hadess@hadess.net/T/#m9c08d004cd5422783ee1d93154f42303bba9169f + "${FILESDIR}"/${PN}-5.66-power-state-adapter-property.patch + + # Fixed in next release + "${FILESDIR}"/${P}-transient-hostname-fix.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 ~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 + + # http://www.spinics.net/lists/linux-bluetooth/msg38490.html + if ! use systemd; then + eapply "${FILESDIR}"/0001-Allow-using-obexd-without-systemd-in-the-user-session-r2.patch + fi + + eautoreconf + + if use cups; then + # Only not .am to not need to run eautoreconf only because of this + sed -i \ + -e "s:cupsdir = \$(libdir)/cups:cupsdir = $(cups-config --serverbin):" \ + Makefile.{in,tools} || die + fi + + multilib_copy_sources +} + +multilib_src_configure() { + 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 \ + --disable-android \ + --enable-datafiles \ + --enable-optimization \ + $(use_enable debug) \ + --enable-pie \ + --enable-threads \ + --enable-library \ + --enable-tools \ + --enable-manpages \ + --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 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}" /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 + + keepdir /var/lib/bluetooth + + # Upstream don't want people to play with them + # But we keep installing them due to 'historical' reasons + insinto /etc/bluetooth + local d + for d in input network; do + doins profiles/${d}/${d}.conf + done + # Setup auto enable as Fedora does for allowing to use + # keyboards/mouse as soon as possible + sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' src/main.conf || die + doins src/main.conf + + newinitd "${FILESDIR}"/bluetooth-init.d-r5 bluetooth + newconfd "${FILESDIR}"/bluetooth-conf.d bluetooth + + einstalldocs + use doc && dodoc doc/*.txt + # Upstream dropped the example files + # Install .json files as examples to be used by meshctl + #if use mesh; then + #dodoc tools/mesh-gatt/*.json + # local DOC_CONTENTS="Some example .json files were installed into + # /usr/share/doc/${PF} to be used with meshctl. Feel free to + # uncompress and copy them to ~/.config/meshctl to use them." + # readme.gentoo_create_doc + #fi +} + +pkg_postinst() { + use udev && udev_reload + systemd_reenable bluetooth.service + + has_version net-dialup/ppp || elog "To use dial up networking you must install net-dialup/ppp" + #use mesh && readme.gentoo_print_elog +} + +pkg_postrm() { + use udev && udev_reload +} diff --git a/net-wireless/bluez/files/bluez-5.66-power-state-adapter-property.patch b/net-wireless/bluez/files/bluez-5.66-power-state-adapter-property.patch new file mode 100644 index 000000000000..566d7c08b591 --- /dev/null +++ b/net-wireless/bluez/files/bluez-5.66-power-state-adapter-property.patch @@ -0,0 +1,28 @@ +From 70309219acd4c81e3a9e2b3652d2d93eb08b0aee Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 31 Aug 2022 11:16:34 +0200 +Subject: [PATCH 6/6] adapter: Remove experimental flag for PowerState + +Now that the feature has been tested, that the API is deemed adequate +and the reliability sufficient. +--- + src/adapter.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/adapter.c b/src/adapter.c +index 8fb2acdc8..841096d7f 100644 +--- a/src/adapter.c ++++ b/src/adapter.c +@@ -3864,8 +3864,7 @@ static const GDBusPropertyTable adapter_properties[] = { + { "Alias", "s", property_get_alias, property_set_alias }, + { "Class", "u", property_get_class }, + { "Powered", "b", property_get_powered, property_set_powered }, +- { "PowerState", "s", property_get_power_state, NULL, NULL, +- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL }, ++ { "PowerState", "s", property_get_power_state }, + { "Discoverable", "b", property_get_discoverable, + property_set_discoverable }, + { "DiscoverableTimeout", "u", property_get_discoverable_timeout, +-- +2.37.2 + diff --git a/net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch b/net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch new file mode 100644 index 000000000000..fef2776f7a0e --- /dev/null +++ b/net-wireless/bluez/files/bluez-5.66-transient-hostname-fix.patch @@ -0,0 +1,185 @@ +From e515f4b6e25c971c47ab79e9cbdfa17119bbde23 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 9 Nov 2022 16:17:55 +0100 +Subject: [PATCH 1/2] hostname: Add '' around printed strings + +Otherwise we can't see whether the string is nul, or empty. +--- + plugins/hostname.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/plugins/hostname.c b/plugins/hostname.c +index 1a9513adb..14b6450b5 100644 +--- a/plugins/hostname.c ++++ b/plugins/hostname.c +@@ -128,7 +128,7 @@ static void property_changed(GDBusProxy *proxy, const char *name, + + dbus_message_iter_get_basic(iter, &str); + +- DBG("pretty hostname: %s", str); ++ DBG("pretty hostname: '%s'", str); + + g_free(pretty_hostname); + pretty_hostname = g_strdup(str); +@@ -146,7 +146,7 @@ static void property_changed(GDBusProxy *proxy, const char *name, + + dbus_message_iter_get_basic(iter, &str); + +- DBG("static hostname: %s", str); ++ DBG("static hostname: '%s'", str); + + g_free(static_hostname); + static_hostname = g_strdup(str); +@@ -165,7 +165,7 @@ static void property_changed(GDBusProxy *proxy, const char *name, + + dbus_message_iter_get_basic(iter, &str); + +- DBG("chassis: %s", str); ++ DBG("chassis: '%s'", str); + + for (i = 0; chassis_table[i].chassis; i++) { + if (strcmp(chassis_table[i].chassis, str)) +-- +2.37.3 + + +From e2b2b1675f310023862319ea10ffd205a75cc0cb Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 9 Nov 2022 16:17:56 +0100 +Subject: [PATCH 2/2] hostname: Fallback to transient hostname + +After pretty hostname, and static hostname, also support transient +hostname as a last resort before 'BlueZ X.XX'. + +This happens on Fedora's Workstation installation as it calls +"hostnamectl set-hostname" on startup. In Fedora Silverblue, the default +hostname is set as fedora in /etc/os-release. + +In both cases, we should fall back to that transient hostname, as bad as +it could be. + +Note that the transient hostname needs to be monitored through the +kernel directly, as explained in: +https://www.freedesktop.org/software/systemd/man/org.freedesktop.hostname1.html +--- + plugins/hostname.c | 57 ++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 55 insertions(+), 2 deletions(-) + +diff --git a/plugins/hostname.c b/plugins/hostname.c +index 14b6450b5..51707f07d 100644 +--- a/plugins/hostname.c ++++ b/plugins/hostname.c +@@ -16,6 +16,8 @@ + #include + #include + #include ++#include ++#include + + #include "lib/bluetooth.h" + #include "lib/sdp.h" +@@ -44,8 +46,10 @@ + static uint8_t major_class = MAJOR_CLASS_MISCELLANEOUS; + static uint8_t minor_class = MINOR_CLASS_UNCATEGORIZED; + +-static char *pretty_hostname = NULL; +-static char *static_hostname = NULL; ++static char *pretty_hostname = NULL; ++static char *static_hostname = NULL; ++static char *transient_hostname = NULL; ++static guint hostname_id = 0; + + /* + * Fallback to static hostname only if empty pretty hostname was already +@@ -60,6 +64,10 @@ static const char *get_hostname(void) + if (static_hostname && + g_str_equal(static_hostname, "") == FALSE) + return static_hostname; ++ ++ if (transient_hostname && ++ g_str_equal(transient_hostname, "") == FALSE) ++ return transient_hostname; + } + + return NULL; +@@ -181,6 +189,32 @@ static void property_changed(GDBusProxy *proxy, const char *name, + } + } + ++static void read_transient_hostname(void) ++{ ++ struct utsname u; ++ ++ if (uname(&u) != 0) { ++ g_free(transient_hostname); ++ transient_hostname = NULL; ++ DBG("failed to read transient hostname"); ++ return; ++ } ++ ++ g_free(transient_hostname); ++ transient_hostname = g_strdup(u.nodename); ++ ++ DBG("read transient hostname: '%s'", transient_hostname); ++} ++ ++static gboolean hostname_cb(GIOChannel *io, GIOCondition cond, ++ gpointer user_data) ++{ ++ DBG("transient hostname changed"); ++ read_transient_hostname(); ++ adapter_foreach(update_class, NULL); ++ return TRUE; ++} ++ + static int hostname_probe(struct btd_adapter *adapter) + { + DBG(""); +@@ -261,9 +295,11 @@ static GDBusProxy *hostname_proxy = NULL; + static int hostname_init(void) + { + DBusConnection *conn = btd_get_dbus_connection(); ++ int fd; + int err; + + read_dmi_fallback(); ++ read_transient_hostname(); + + hostname_client = g_dbus_client_new(conn, "org.freedesktop.hostname1", + "/org/freedesktop/hostname1"); +@@ -289,6 +325,17 @@ static int hostname_init(void) + hostname_client = NULL; + } + ++ fd = open("/proc/sys/kernel/hostname", O_RDONLY); ++ if (fd < 0) { ++ error("open(/proc/sys/kernel/hostname): %s (%d)", ++ strerror(errno), errno); ++ } else { ++ GIOChannel *io = g_io_channel_unix_new(fd); ++ ++ hostname_id = g_io_add_watch(io, G_IO_ERR, hostname_cb, NULL); ++ g_io_channel_unref(io); ++ } ++ + return err; + } + +@@ -306,8 +353,14 @@ static void hostname_exit(void) + hostname_client = NULL; + } + ++ if (hostname_id != 0) { ++ g_source_remove(hostname_id); ++ hostname_id = 0; ++ } ++ + g_free(pretty_hostname); + g_free(static_hostname); ++ g_free(transient_hostname); + } + + BLUETOOTH_PLUGIN_DEFINE(hostname, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT, +-- +2.37.3 + -- cgit v1.2.3