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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2CA0815806E for ; Wed, 7 Jun 2023 09:52:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 27709E0849; Wed, 7 Jun 2023 09:52:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 11289E0849 for ; Wed, 7 Jun 2023 09:52:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0640B340D31 for ; Wed, 7 Jun 2023 09:52:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 28095A8B for ; Wed, 7 Jun 2023 09:52:26 +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: <1686131388.18e66b5f484739b45fcc12f8fa89c4d45acd8b80.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/files/, media-video/pipewire/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/pipewire/files/gentoo-pipewire-launcher.in-r2 media-video/pipewire/pipewire-0.3.71-r2.ebuild media-video/pipewire/pipewire-9999.ebuild X-VCS-Directories: media-video/pipewire/ media-video/pipewire/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 18e66b5f484739b45fcc12f8fa89c4d45acd8b80 X-VCS-Branch: master Date: Wed, 7 Jun 2023 09:52:26 +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: 50e54fb6-af1d-4cfd-9803-a5b6a173016f X-Archives-Hash: dab7bf4f35b42d039ca23a7a24e85369 commit: 18e66b5f484739b45fcc12f8fa89c4d45acd8b80 Author: Alexis gmail com> AuthorDate: Mon Jun 5 09:43:26 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jun 7 09:49:48 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18e66b5f media-video/pipewire: Add logging support to gentoo-pipewire-launcher Closes: https://bugs.gentoo.org/907891 Signed-off-by: Alexis gmail.com> Signed-off-by: Sam James gentoo.org> .../pipewire/files/gentoo-pipewire-launcher.in-r2 | 77 ++++++++++++++++++++++ media-video/pipewire/pipewire-0.3.71-r2.ebuild | 2 +- media-video/pipewire/pipewire-9999.ebuild | 2 +- 3 files changed, 79 insertions(+), 2 deletions(-) diff --git a/media-video/pipewire/files/gentoo-pipewire-launcher.in-r2 b/media-video/pipewire/files/gentoo-pipewire-launcher.in-r2 new file mode 100644 index 000000000000..ea2032b74b42 --- /dev/null +++ b/media-video/pipewire/files/gentoo-pipewire-launcher.in-r2 @@ -0,0 +1,77 @@ +#!/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! + +DATE_FORMAT='+%Y-%m-%dT%H:%M:%S%Z' + +CONF="${XDG_CONFIG_HOME}/gentoo-pipewire-launcher.conf" +if [ -f "${CONF}" ] +then + . "${CONF}" +else + GENTOO_PIPEWIRE_LOG='/dev/null' + GENTOO_PIPEWIRE_PULSE_LOG='/dev/null' + GENTOO_WIREPLUMBER_LOG='/dev/null' +fi +for L in \ + "${GENTOO_PIPEWIRE_LOG}" \ + "${GENTOO_PIPEWIRE_PULSE_LOG}" \ + "${GENTOO_WIREPLUMBER_LOG}" +do + if [ ! -e "${L}" ] + then + touch "${L}" + fi +done + +restart () { + echo "Terminating PipeWire processes ..." + pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1 + pwait -u "${USER}" -x pipewire\|wireplumber + echo "PipeWire terminated." +} + +if [ "${#}" -gt 0 ] +then + if [ "${1}" = 'restart' ] + then + restart + else + echo "Unrecognised argument." >&2 + echo "Usage: gentoo-pipewire-launcher [restart]" >&2 + exit 1 + fi +fi + +if pgrep -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1 +then + echo "PipeWire already running, exiting." >&2 + echo "(Use 'gentoo-pipewire-launcher restart' to restart PipeWire and WirePlumber.)" >&2 + exit 1 +fi + +# The core daemon which by itself does probably nothing. +echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting PipeWire." 1>>"${GENTOO_PIPEWIRE_LOG}" +@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire 1>>"${GENTOO_PIPEWIRE_LOG}" 2>&1 & + +# 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). +echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting PipeWire-Pulse." 1>>"${GENTOO_PIPEWIRE_PULSE_LOG}" +@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire -c pipewire-pulse.conf 1>>"${GENTOO_PIPEWIRE_PULSE_LOG}" 2>&1 & + +# Hack for bug #822498 +sleep 1 + +# Finally a session manager is required for PipeWire to do anything. +echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting WirePlumber." 1>>"${GENTOO_WIREPLUMBER_LOG}" +exec @GENTOO_PORTAGE_EPREFIX@/usr/bin/wireplumber 1>>"${GENTOO_WIREPLUMBER_LOG}" 2>&1 diff --git a/media-video/pipewire/pipewire-0.3.71-r2.ebuild b/media-video/pipewire/pipewire-0.3.71-r2.ebuild index f8791a4a2601..39e2c38af13b 100644 --- a/media-video/pipewire/pipewire-0.3.71-r2.ebuild +++ b/media-video/pipewire/pipewire-0.3.71-r2.ebuild @@ -297,7 +297,7 @@ multilib_src_install_all() { newins "${FILESDIR}"/pipewire.desktop-r1 pipewire.desktop exeinto /usr/bin - newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r1 gentoo-pipewire-launcher + newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r2 gentoo-pipewire-launcher # Disable pipewire-pulse if sound-server is disabled. if ! use sound-server ; then diff --git a/media-video/pipewire/pipewire-9999.ebuild b/media-video/pipewire/pipewire-9999.ebuild index f8791a4a2601..39e2c38af13b 100644 --- a/media-video/pipewire/pipewire-9999.ebuild +++ b/media-video/pipewire/pipewire-9999.ebuild @@ -297,7 +297,7 @@ multilib_src_install_all() { newins "${FILESDIR}"/pipewire.desktop-r1 pipewire.desktop exeinto /usr/bin - newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r1 gentoo-pipewire-launcher + newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r2 gentoo-pipewire-launcher # Disable pipewire-pulse if sound-server is disabled. if ! use sound-server ; then