public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/
Date: Tue, 12 Sep 2023 00:43:33 +0000 (UTC)	[thread overview]
Message-ID: <1694479382.8b6eb8028f4a0ff0457b47ea418dbce617d05d9f.sam@gentoo> (raw)

commit:     8b6eb8028f4a0ff0457b47ea418dbce617d05d9f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 12 00:43:02 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep 12 00:43:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b6eb802

media-video/pipewire: handle procps-4 rename of pwait->pidwait

Closes: https://bugs.gentoo.org/914030
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../pipewire/files/gentoo-pipewire-launcher.in-r3  | 84 ++++++++++++++++++++++
 ...ewire-9999.ebuild => pipewire-0.3.79-r3.ebuild} |  2 +-
 media-video/pipewire/pipewire-9999.ebuild          |  2 +-
 3 files changed, 86 insertions(+), 2 deletions(-)

diff --git a/media-video/pipewire/files/gentoo-pipewire-launcher.in-r3 b/media-video/pipewire/files/gentoo-pipewire-launcher.in-r3
new file mode 100644
index 000000000000..abe9174c4253
--- /dev/null
+++ b/media-video/pipewire/files/gentoo-pipewire-launcher.in-r3
@@ -0,0 +1,84 @@
+#!/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:-${HOME}/.config}/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
+
+    # pidwait was renamed to pwait w/ procps-4 (bug #914030)
+    if command -v pidwait > /dev/null ; then
+        pidwait -u "${USER}" -x pipewire\|wireplumber
+    elif command -v pwait > /dev/null ; then
+        pwait -u "${USER}" -x pipewire\|wireplumber
+    fi
+
+    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-9999.ebuild b/media-video/pipewire/pipewire-0.3.79-r3.ebuild
similarity index 99%
copy from media-video/pipewire/pipewire-9999.ebuild
copy to media-video/pipewire/pipewire-0.3.79-r3.ebuild
index 9ae26c068a6e..7a471fb632bf 100644
--- a/media-video/pipewire/pipewire-9999.ebuild
+++ b/media-video/pipewire/pipewire-0.3.79-r3.ebuild
@@ -300,7 +300,7 @@ multilib_src_install_all() {
 		newins "${FILESDIR}"/pipewire.desktop-r2 pipewire.desktop
 
 		exeinto /usr/bin
-		newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r2 gentoo-pipewire-launcher
+		newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r3 gentoo-pipewire-launcher
 
 		doman "${FILESDIR}"/gentoo-pipewire-launcher.1
 

diff --git a/media-video/pipewire/pipewire-9999.ebuild b/media-video/pipewire/pipewire-9999.ebuild
index 9ae26c068a6e..7a471fb632bf 100644
--- a/media-video/pipewire/pipewire-9999.ebuild
+++ b/media-video/pipewire/pipewire-9999.ebuild
@@ -300,7 +300,7 @@ multilib_src_install_all() {
 		newins "${FILESDIR}"/pipewire.desktop-r2 pipewire.desktop
 
 		exeinto /usr/bin
-		newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r2 gentoo-pipewire-launcher
+		newexe "${FILESDIR}"/gentoo-pipewire-launcher.in-r3 gentoo-pipewire-launcher
 
 		doman "${FILESDIR}"/gentoo-pipewire-launcher.1
 


             reply	other threads:[~2023-09-12  0:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12  0:43 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-28 12:08 [gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/ Sam James
2024-07-01  8:19 Sam James
2024-03-19  5:48 Sam James
2023-05-11  1:21 Sam James
2023-01-15 22:32 Sam James
2022-12-16  4:56 Sam James
2022-12-14  8:45 Sam James
2022-11-17 19:20 Sam James
2022-10-14 19:33 Sam James
2022-07-31  3:40 Sam James
2022-07-12 23:23 Sam James
2022-07-12 23:23 Sam James
2022-07-04 23:36 Sam James
2022-05-01 19:52 Sam James
2022-05-01 19:52 Sam James
2022-02-21  3:30 Sam James
2021-11-26 19:37 Andreas Sturmlechner
2021-10-24  1:58 Sam James
2021-10-13 21:11 Andreas Sturmlechner
2021-10-01  0:00 Sam James
2021-09-16 21:55 Sam James
2021-09-13 23:07 Sam James
2021-04-12 21:55 Thomas Deutschmann
2021-01-01 19:12 Andreas Sturmlechner
2020-06-28 15:36 Andreas Sturmlechner
2019-07-07 15:56 Andreas Sturmlechner

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=1694479382.8b6eb8028f4a0ff0457b47ea418dbce617d05d9f.sam@gentoo \
    --to=sam@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