Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 823104 - media-video/pipewire-0.3.39-r4: systemctl --user enable --now wireplumber.service # failed
Summary: media-video/pipewire-0.3.39-r4: systemctl --user enable --now wireplumber.ser...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-11-11 17:27 UTC by Stefan Salewski
Modified: 2021-11-17 06:59 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Salewski 2021-11-11 17:27:17 UTC
For emerging media-video/pipewire-0.3.39-r4:0/0.3::gentoo we get this message:

* Both, new users and those upgrading, need to enable WirePlumber
 * for relevant users:
 * 
 *   systemctl --user enable --now wireplumber.service

which fails with

$ systemctl --user enable --now wireplumber.service
Failed to enable unit: File /home/salewski/.config/systemd/user/pipewire-session-manager.service already exists and is a symlink to /usr/lib/systemd/user/pipewire-media-session.service.

From https://pipewire.pages.freedesktop.org/wireplumber/running-wireplumber-daemon.html we learn that we need

$ systemctl --user --now disable pipewire-media-session
Removed /home/salewski/.config/systemd/user/pipewire.service.wants/pipewire-media-session.service.
Removed /home/salewski/.config/systemd/user/pipewire-session-manager.service.
Failed to stop pipewire-media-session.service: Unit pipewire-media-session.service not loaded.
salewski@nuc ~ $ systemctl --user enable --now wireplumber.service
Created symlink /home/salewski/.config/systemd/user/pipewire-session-manager.service → /usr/lib/systemd/user/wireplumber.service.

Which seems to work.

Reproducible: Always

Steps to Reproduce:
1.systemctl --user enable --now wireplumber.service
2.
3.
Actual Results:  
Failed to enable unit: File /home/salewski/.config/systemd/user/pipewire-session-manager.service already exists and is a symlink to /usr/lib/systemd/user/pipewire-media-session.service.


Not a big problem, sound works.
Comment 1 Niklāvs Koļesņikovs 2021-11-14 14:23:13 UTC
I'm very sorry I missed this. By the time that stuff was done I no longer had media-session.service so I could not test the transition properly (and the same was likely true for others who tested this).

I think the best solution is to either update the instructions to include --force like this:

systemctl --user --force enable --now  wireplumber.service

or we can move forward with the plan to use systemctl --global preset inside the ebuild ( https://github.com/gentoo/gentoo/pull/22768 ). The latter, of course, hasn't been tested to handle this issue either but I'm sure a --force there as well won't hurt.
Comment 2 Larry the Git Cow gentoo-dev 2021-11-17 06:59:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30127522ee8b23f3bb8f8079cc39f875ef27213a

commit 30127522ee8b23f3bb8f8079cc39f875ef27213a
Author:     Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
AuthorDate: 2021-11-16 23:19:42 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-11-17 06:59:06 +0000

    media-video/pipewire: update elog to use --force and not omit --now
    
    Using --now is a dangerous action when software versions are updated,
    unless the user is instructed to also restart the daemons. It's safer
    to reconfigure things for the next bootup but leave the current session
    as it is.
    
    Because of the annoying pipewire-session-manager.service alias which
    may exist if enable was done on certain previous PipeWire version(s),
    it's best to do WirePlumber enablement with --force flag to allow it
    to overwrite the alias symlink with a new one pointing to itself.
    
    Closes: https://bugs.gentoo.org/823104
    Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
    Closes: https://github.com/gentoo/gentoo/pull/22977
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 media-video/pipewire/pipewire-0.3.40-r1.ebuild | 20 ++++++++++++--------
 media-video/pipewire/pipewire-9999.ebuild      | 20 ++++++++++++--------
 2 files changed, 24 insertions(+), 16 deletions(-)