From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1722579-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(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 finch.gentoo.org (Postfix) with ESMTPS id 2558A1582EF
	for <garchives@archives.gentoo.org>; Fri, 28 Feb 2025 12:09:07 +0000 (UTC)
Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189])
	(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)
	(Authenticated sender: relay-lists.gentoo.org@gentoo.org)
	by smtp.gentoo.org (Postfix) with ESMTPSA id 12C3134327B
	for <garchives@archives.gentoo.org>; Fri, 28 Feb 2025 12:09:07 +0000 (UTC)
Received: from bobolink.gentoo.org (localhost [127.0.0.1])
	by bobolink.gentoo.org (Postfix) with ESMTP id C95B6110470;
	Fri, 28 Feb 2025 12:08:50 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.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 bobolink.gentoo.org (Postfix) with ESMTPS id BB0FB110470
	for <gentoo-commits@lists.gentoo.org>; Fri, 28 Feb 2025 12:08:50 +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))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 6C8ED3431FC
	for <gentoo-commits@lists.gentoo.org>; Fri, 28 Feb 2025 12:08:50 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 252892782
	for <gentoo-commits@lists.gentoo.org>; Fri, 28 Feb 2025 12:08:47 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
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" <sam@gentoo.org>
Message-ID: <1740744431.567cd216a230328da9e1471267e717f996a19d32.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/pipewire-pulse.initd media-video/pipewire/files/pipewire.initd media-video/pipewire/pipewire-1.2.7-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: 567cd216a230328da9e1471267e717f996a19d32
X-VCS-Branch: master
Date: Fri, 28 Feb 2025 12:08:47 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 497925dd-edec-4b28-87a4-063d246deaaa
X-Archives-Hash: b6cec9d1a4169e64239ae5fbd595766e

commit:     567cd216a230328da9e1471267e717f996a19d32
Author:     Anna (navi) Figueiredo Gomes <navi <AT> vlhl <DOT> dev>
AuthorDate: Thu Feb 27 10:29:07 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 28 12:07:11 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=567cd216

media-video/pipewire: add user initd

The ebuild still ships gentoo-pipewire-launcher in /etc/xdg/autostart,
so users in desktop environments that follow the xdg-autostart spec
should disable the pipewire launcher before attempting to use the
openrc-user init script.

Signed-off-by: Anna (navi) Figueiredo Gomes <navi <AT> vlhl.dev>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-video/pipewire/files/pipewire-pulse.initd         | 12 ++++++++++++
 media-video/pipewire/files/pipewire.initd               | 11 +++++++++++
 .../{pipewire-9999.ebuild => pipewire-1.2.7-r2.ebuild}  | 17 ++++++++++-------
 media-video/pipewire/pipewire-9999.ebuild               |  6 +++++-
 4 files changed, 38 insertions(+), 8 deletions(-)

diff --git a/media-video/pipewire/files/pipewire-pulse.initd b/media-video/pipewire/files/pipewire-pulse.initd
new file mode 100644
index 000000000000..af7de8681c4a
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-pulse.initd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+	need pipewire dbus
+}
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/bin/pipewire"
+command_args="-c pipewire-pulse.conf"

diff --git a/media-video/pipewire/files/pipewire.initd b/media-video/pipewire/files/pipewire.initd
new file mode 100644
index 000000000000..76a0f1930612
--- /dev/null
+++ b/media-video/pipewire/files/pipewire.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+	need dbus
+}
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/bin/pipewire"

diff --git a/media-video/pipewire/pipewire-9999.ebuild b/media-video/pipewire/pipewire-1.2.7-r2.ebuild
similarity index 98%
copy from media-video/pipewire/pipewire-9999.ebuild
copy to media-video/pipewire/pipewire-1.2.7-r2.ebuild
index 1593763ba9c5..e2697a5647a3 100644
--- a/media-video/pipewire/pipewire-9999.ebuild
+++ b/media-video/pipewire/pipewire-1.2.7-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -23,11 +23,11 @@ EAPI=8
 : ${PIPEWIRE_DOCS_PREBUILT:=1}
 
 PIPEWIRE_DOCS_PREBUILT_DEV=sam
-PIPEWIRE_DOCS_VERSION="${PV}"
+PIPEWIRE_DOCS_VERSION="$(ver_cut 1-2).0"
 # Default to generating docs (inc. man pages) if no prebuilt; overridden later
 PIPEWIRE_DOCS_USEFLAG="+man"
 PYTHON_COMPAT=( python3_{10..13} )
-inherit meson-multilib optfeature prefix python-any-r1 systemd tmpfiles udev
+inherit eapi9-ver meson-multilib optfeature prefix python-any-r1 systemd tmpfiles udev
 
 if [[ ${PV} == 9999 ]]; then
 	PIPEWIRE_DOCS_PREBUILT=0
@@ -334,8 +334,12 @@ multilib_src_install_all() {
 		dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf /etc/alsa/conf.d/99-pipewire-default-hook.conf
 	fi
 
+	exeinto /etc/user/init.d
+	newexe "${FILESDIR}"/pipewire.initd pipewire
 	# Enable required wireplumber alsa and bluez monitors
 	if use sound-server; then
+		newexe "${FILESDIR}"/pipewire-pulse.initd pipewire-pulse
+
 		# Install sound-server enabler for wireplumber 0.5.0+ conf syntax
 		insinto /etc/wireplumber/wireplumber.conf.d
 		doins "${FILESDIR}"/gentoo-sound-server-enable-audio-bluetooth.conf
@@ -387,8 +391,7 @@ pkg_postinst() {
 
 	use system-service && tmpfiles_process pipewire.conf
 
-	local ver
-	for ver in ${REPLACING_VERSIONS} ; do
+	if [[ -n ${REPLACING_VERSIONS} ]] ; then
 		if has_version kde-plasma/kwin[screencast] || has_version x11-wm/mutter[screencast] ; then
 			# https://bugs.gentoo.org/908490
 			# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3243
@@ -396,7 +399,7 @@ pkg_postinst() {
 			ewarn "Screencasting may not work until you do."
 		fi
 
-		if ver_test ${ver} -le 0.3.66-r1 ; then
+		if ver_replacing -le 0.3.66-r1 ; then
 			elog ">=pipewire-0.3.66 uses the 'pipewire' group to manage permissions"
 			elog "and limits needed to function smoothly:"
 			elog
@@ -462,7 +465,7 @@ pkg_postinst() {
 				fi
 			fi
 		fi
-	done
+	fi
 
 	if [[ ${HAD_SOUND_SERVER} -eq 0 || -z ${REPLACING_VERSIONS} ]] ; then
 		# TODO: We could drop most of this if we set up systemd presets?

diff --git a/media-video/pipewire/pipewire-9999.ebuild b/media-video/pipewire/pipewire-9999.ebuild
index 1593763ba9c5..98cf773a4ab6 100644
--- a/media-video/pipewire/pipewire-9999.ebuild
+++ b/media-video/pipewire/pipewire-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -334,8 +334,12 @@ multilib_src_install_all() {
 		dosym ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf /etc/alsa/conf.d/99-pipewire-default-hook.conf
 	fi
 
+	exeinto /etc/user/init.d
+	newexe "${FILESDIR}"/pipewire.initd pipewire
 	# Enable required wireplumber alsa and bluez monitors
 	if use sound-server; then
+		newexe "${FILESDIR}"/pipewire-pulse.initd pipewire-pulse
+
 		# Install sound-server enabler for wireplumber 0.5.0+ conf syntax
 		insinto /etc/wireplumber/wireplumber.conf.d
 		doins "${FILESDIR}"/gentoo-sound-server-enable-audio-bluetooth.conf