From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1C8DF158086 for ; Sun, 24 Oct 2021 01:58:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5F627E0823; Sun, 24 Oct 2021 01:58:04 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 34BD9E0823 for ; Sun, 24 Oct 2021 01:58:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EC1533432AF for ; Sun, 24 Oct 2021 01:58:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 559C6172 for ; Sun, 24 Oct 2021 01:58:00 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1635040669.e4a4227c737503f7145ad76dea878f96f25688ca.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/pipewire/files/gentoo-pipewire-launcher.in media-video/pipewire/pipewire-9999.ebuild X-VCS-Directories: media-video/pipewire/files/ media-video/pipewire/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: e4a4227c737503f7145ad76dea878f96f25688ca X-VCS-Branch: master Date: Sun, 24 Oct 2021 01:58:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 51010fa1-3c7f-45c8-b9c9-d00d5c1aae07 X-Archives-Hash: 2807f7c6271408737c8754edc2d0522f commit: e4a4227c737503f7145ad76dea878f96f25688ca Author: Niklāvs Koļesņikovs <89q1r14hd relay firefox com> AuthorDate: Mon Oct 18 20:16:19 2021 +0000 Commit: Sam James gentoo org> CommitDate: Sun Oct 24 01:57:49 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4a4227c media-video/pipewire: adds WirePlumber support for OpenRC As an added bonus the launcher script now starts all the daemons itself, which means we no longer need to carry and conditionally apply a patch, which has proven to require recurrent updates. The instructions for disabling PulseAudio compatibility are pretty narly and the approach is best reworked (or given up on entirely), since those instructions have never been the whole story. Thanks-to: Sam James gentoo.org> (reviewing & eprefix hint) Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd relay.firefox.com> Signed-off-by: Sam James gentoo.org> .../pipewire/files/gentoo-pipewire-launcher.in | 26 +++++++++++ media-video/pipewire/pipewire-9999.ebuild | 52 ++++++++++++---------- 2 files changed, 55 insertions(+), 23 deletions(-) diff --git a/media-video/pipewire/files/gentoo-pipewire-launcher.in b/media-video/pipewire/files/gentoo-pipewire-launcher.in new file mode 100644 index 00000000000..4e66e2fe317 --- /dev/null +++ b/media-video/pipewire/files/gentoo-pipewire-launcher.in @@ -0,0 +1,26 @@ +#!/bin/sh + +# PipeWire launcher script for XDG compliant desktops on OpenRC. +# +# systemd users are very _STRONGLY_ advised to use the much +# more reliable and predictable user units instead. + +# WARNING: This script assumes being run inside XDG compliant session, +# which means D-Bus session instance is expected to be correctly set up +# prior to this script starting. If that is not true, things may break! + +# Best to reap any existing daemons and only then try to start a new set. +pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1 + +# The core daemon which by itself does probably nothing. +@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire & + +# The so called pipewire-pulse daemon used for PulseAudio compatibility. +# Commenting this out will stop the PA proxying daemon from starting, +# however ALSA (with pipewire-alsa), JACK (with jack-sdk) and PW API using +# clients will still have access to audio and may end up clashing with +# non-PW apps over HW control (most notably, /usr/bin/pulseaudio daemon). +@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire -c pipewire-pulse.conf & + +# Finally a session manager is required for PipeWire to do anything. +exec @GENTOO_PORTAGE_EPREFIX@/usr/bin/wireplumber diff --git a/media-video/pipewire/pipewire-9999.ebuild b/media-video/pipewire/pipewire-9999.ebuild index eaa51173cfc..360882c6ea6 100644 --- a/media-video/pipewire/pipewire-9999.ebuild +++ b/media-video/pipewire/pipewire-9999.ebuild @@ -5,7 +5,7 @@ EAPI="7" PYTHON_COMPAT=( python3_{8..10} ) -inherit meson-multilib optfeature python-any-r1 systemd udev +inherit meson-multilib optfeature prefix python-any-r1 systemd udev if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git" @@ -113,12 +113,6 @@ python_check_deps() { src_prepare() { default - if ! use systemd; then - # This can be applied non-conditionally but would make for a - # significantly worse user experience on systemd then. - eapply "${FILESDIR}"/${PN}-0.3.36-non-systemd-integration.patch - fi - einfo "Generating ${limitsdfile}" cat > ${limitsdfile} <<- EOF || die # Start of ${limitsdfile} from ${P} @@ -206,8 +200,9 @@ multilib_src_install_all() { insinto /etc/xdg/autostart newins "${FILESDIR}"/pipewire.desktop pipewire.desktop - exeinto /usr/libexec - newexe "${FILESDIR}"/pipewire-launcher.sh pipewire-launcher + exeinto /usr/bin + newexe "${FILESDIR}"/gentoo-pipewire-launcher.in gentoo-pipewire-launcher + eprefixify "${ED}"/usr/bin/gentoo-pipewire-launcher fi } @@ -247,20 +242,31 @@ pkg_postinst() { elog " systemctl --user enable --now wireplumber.service" elog else - elog "This ebuild auto-enables PulseAudio replacement. Because of that, users" - elog "are recommended to edit: ${EROOT}/etc/pulse/client.conf and disable" - elog "autospawning of the original daemon by setting:" - elog - elog " autospawn = no" - elog - elog "Please note that the semicolon (;) must _NOT_ be at the beginning of the line!" - elog - elog "Alternatively, if replacing PulseAudio daemon is not desired, edit" - elog "${EROOT}/etc/pipewire/pipewire.conf by commenting out the relevant" - elog "command near the end of the file:" - elog - elog "#\"/usr/bin/pipewire\" = { args = \"-c pipewire-pulse.conf\" }" - elog + ewarn "PipeWire daemon startup has been moved to a launcher script!" + ewarn "Make sure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist or no" + ewarn "longer is set to start a session manager or PulseAudio compatibility daemon (all" + ewarn "lines similar to `{ path = \"/usr/bin/pipewire*` should be commented out)" + ewarn + ewarn "Those manually starting /usr/bin/pipewire via .xinitrc or similar _must_ from" + ewarn "now on start ${EROOT}/usr/bin/gentoo-pipewire-launcher instead! It is highly" + ewarn "advised that a D-Bus user session is set up before starting the script." + ewarn + if has_version 'media-sound/pulseaudio[daemon]' || has_version 'media-sound/pulseaudio-daemon'; then + elog "This ebuild auto-enables PulseAudio replacement. Because of that, users" + elog "are recommended to edit: ${EROOT}/etc/pulse/client.conf and disable" + elog "autospawning of the original daemon by setting:" + elog + elog " autospawn = no" + elog + elog "Please note that the semicolon (;) must _NOT_ be at the beginning of the line!" + elog + elog "Alternatively, if replacing PulseAudio daemon is not desired, edit" + elog "${EROOT}/usr/bin/gentoo-pipewire-launcher by commenting out the relevant" + elog "command:" + elog + elog "#${EROOT}/usr/bin/pipewire -c pipewire-pulse.conf &" + elog + fi elog "NOTE:" elog "Starting with PipeWire-0.3.30, this package is no longer installing its config" elog "into ${EROOT}/etc/pipewire by default. In case you need to change"