Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 934796

Summary: media-video/pipewire without automatically creating the /etc/xdg/autostart/pipewire.desktop file
Product: Gentoo Linux Reporter: Roman <roma251078>
Component: Current packagesAssignee: Sam James <sam>
Status: RESOLVED WONTFIX    
Severity: normal CC: leio, roma251078
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Roman 2024-06-24 07:01:54 UTC
Automatic creation of the /etc/xdg/autostart/pipewire.desktop file for the openrc session prevents the use of alternative ways to start Pipewire.Is it possible to use a separate flag for this, which will be turned on, but which can be turned off?
For example I use this daemon to run pipewire https://github.com/ormorph/sleepy-tree/tree/master/media-sound/pipewiredaemon. It allows multiple users to work with one pipewire server. I have to constantly delete the /etc/xdg/autostart/pipewire.desktop file. Of course, it would be ideal to be able to enable the system daemon for the openrc session, but having the option of not installing the /etc/xdg/autostart/pipewire.desktop file would be nice.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-25 00:15:53 UTC
INSTALL_MASK should work for your case, I think.

I suppose in theory we could inhibit installation of it with USE=system-service but not sure if we want to do that...
Comment 2 Roman 2024-06-25 02:57:20 UTC
(In reply to Sam James from comment #1)
> INSTALL_MASK should work for your case, I think.
> 
> I suppose in theory we could inhibit installation of it with
> USE=system-service but not sure if we want to do that...

No, in order to disable this with the system-service flag, the system daemon for openrc must be ready, but it is currently missing for pipewire. It was enough to add a new intermediate flag to enable /etc/xdg/autostart/pipewire.desktop, for example xdg. And of course, this flag should be enabled by default for openrc, but the user can disable it if desired.

systemd ( !xdg )

You'll just have to turn off this flag for systemd profiles. The new flag just needs to be described in metadata.xml. At the moment, there is no need to bind to the system-service flag.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-25 03:01:26 UTC
(In reply to Roman from comment #2)
> (In reply to Sam James from comment #1)
> > INSTALL_MASK should work for your case, I think.
> > 
> > I suppose in theory we could inhibit installation of it with
> > USE=system-service but not sure if we want to do that...
> 
> No, in order to disable this with the system-service flag, the system daemon
> for openrc must be ready, but it is currently missing for pipewire

I'm not sure if I understand. The *system daemon* isn't started by xdg?

> It was
> enough to add a new intermediate flag to enable
> /etc/xdg/autostart/pipewire.desktop, for example xdg. And of course, this
> flag should be enabled by default for openrc, but the user can disable it if
> desired.

But yes, we don't provide an init script for the OpenRC service for system-daemon.

Anyway, just use INSTALL_MASK.
Comment 4 Roman 2024-06-25 03:29:38 UTC
(In reply to Sam James from comment #3)
> Anyway, just use INSTALL_MASK.

Thanks, it works. I see the file is also installed when building the ebuild in ${D}, but during installation it is not installed on the system. For now this solves the problem. But perhaps someday there will be a system daemon for openrc. 

So far this system daemon solves my needs: https://github.com/ormorph/sleepy-tree/tree/master/media-sound/pipewiredaemon