Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904851 - media-video/pipewire: gentoo-pipewire-launcher lacks restart functionality
Summary: media-video/pipewire: gentoo-pipewire-launcher lacks restart functionality
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Sam James
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-04-23 06:19 UTC by Alexis
Modified: 2023-05-11 01:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to add 'restart' functionality. (launcher.diff,1.15 KB, patch)
2023-05-01 00:27 UTC, Alexis
Details | Diff
Patch for application by git-am (0001-gentoo-pipewire-launcher.in-Add-restart-functionalit.patch,1.69 KB, patch)
2023-05-05 08:16 UTC, Alexis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis 2023-04-23 06:19:14 UTC
The `gentoo-pipewire-launcher` script currently lacks any functionality to restart PipeWire and WirePlumber instances as required (e.g. to pick up configuration changes). i've just added a "Restarting PipeWire and WirePlumber" subsection to the PipeWire page on the wiki:

https://wiki.gentoo.org/wiki/PipeWire#Restarting_PipeWire_and_WirePlumber

but this feels Less Than Awesome from an end-user perspective.

Instead, such commands could be called from within the `gentoo-pipewire-launcher` script if it was called with an argument of `restart`.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-23 06:23:52 UTC
Yeah, fair point. Patches welcome if interested.

Really, can't help but feel like the real fix is https://github.com/OpenRC/openrc/pull/573.
Comment 2 Enne Eziarc 2023-04-23 19:12:39 UTC
I've been running it in bwrap because that provides process tree cleanup functionality, though it's a bit heavyweight and unshare --kill-child would probably also do the job.

IIRC someone already asked upstream a year ago if they'd consider making pipewire clean up its child processes on exit and got a non-answer, so we have to fend for ourselves one way or the other.
Comment 3 Alexis 2023-05-01 00:27:14 UTC
Created attachment 860978 [details, diff]
Patch to add 'restart' functionality.

Patch for `gentoo-pipewire-launcher` attached. Works For Me (tm). Please let me know of any required changes (including stylistic changes if needed - is there a Gentoo style guide for scripts?).
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-05 06:41:57 UTC
(In reply to Enne Eziarc from comment #2)
> I've been running it in bwrap because that provides process tree cleanup
> functionality, though it's a bit heavyweight and unshare --kill-child would
> probably also do the job.
> 
> IIRC someone already asked upstream a year ago if they'd consider making
> pipewire clean up its child processes on exit and got a non-answer, so we
> have to fend for ourselves one way or the other.

Ah, thanks for the context.

(In reply to Alexis from comment #3)
> Created attachment 860978 [details, diff] [details, diff]
> Patch to add 'restart' functionality.
> 
> Patch for `gentoo-pipewire-launcher` attached. Works For Me (tm). Please let
> me know of any required changes (including stylistic changes if needed - is
> there a Gentoo style guide for scripts?).

I'd missed you posted this!

Could you ideally give it as a patch (git am-able patch to gentoo.git with a sign-off (note that signed-off-by allows consistent pseudonyms now))?
Comment 5 Alexis 2023-05-05 08:16:11 UTC
Created attachment 861171 [details, diff]
Patch for application by git-am
Comment 6 Alexis 2023-05-05 08:18:39 UTC
(In reply to Sam James from comment #4)
> I'd missed you posted this!
> 
> Could you ideally give it as a patch (git am-able patch to gentoo.git with a
> sign-off (note that signed-off-by allows consistent pseudonyms now))?

Sure! Done. :-)
Comment 7 Larry the Git Cow gentoo-dev 2023-05-05 08:35:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=460a8f68d767b8a634aed94cd7478e384b456f1c

commit 460a8f68d767b8a634aed94cd7478e384b456f1c
Author:     Alexis <flexibeast@gmail.com>
AuthorDate: 2023-05-05 08:03:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-05 08:35:36 +0000

    media-video/pipewire: gentoo-pipewire-launcher.in: Add restart functionality.
    
    Closes: https://bugs.gentoo.org/904851
    Signed-off-by: Alexis <flexibeast@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../pipewire/files/gentoo-pipewire-launcher.in-r1  |  52 +++
 media-video/pipewire/pipewire-0.3.70-r1.ebuild     | 474 +++++++++++++++++++++
 media-video/pipewire/pipewire-9999.ebuild          |   2 +-
 3 files changed, 527 insertions(+), 1 deletion(-)
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-05 08:39:00 UTC
Thanks!
Comment 9 Larry the Git Cow gentoo-dev 2023-05-11 01:21:54 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fa782429b4f607f8a1dc0e41e5cbe1bd94b35c3

commit 5fa782429b4f607f8a1dc0e41e5cbe1bd94b35c3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-11 00:48:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-11 00:48:00 +0000

    media-video/pipewire: write error messages from gentoo-pipewire-launcher to stderr
    
    Thanks to Andrei Slavoiu and flexibeast.
    
    Bug: https://bugs.gentoo.org/904851
    Closes: https://bugs.gentoo.org/906070
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/pipewire/files/gentoo-pipewire-launcher.in-r1         | 8 ++++----
 .../{pipewire-0.3.70-r1.ebuild => pipewire-0.3.70-r2.ebuild}      | 0
 2 files changed, 4 insertions(+), 4 deletions(-)