Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#72283 - [pipewire-media-session,wireplumber] Add `provides=('pipewire-session-manager')`

Attached to Project: Community Packages
Opened by Jonathon (jonathon) - Wednesday, 29 September 2021, 11:57 GMT
Last edited by David Runge (dvzrv) - Friday, 22 October 2021, 16:32 GMT
Task Type Feature Request
Category Packages
Status Assigned
Assigned To Jan Alexander Steffens (heftig)
David Runge (dvzrv)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 2
Private No

Details

Description:

WirePlumber is a drop-in replacement/enhancement to the default PipeWire session manager. Currently, `pipewire-media-session` is a hard dependency of several packages and therefore cannot be cleanly swapped out. This could be mitigated by e.g.:

```
diff --git a/PKGBUILD b/PKGBUILD
index 32656e5..83731c7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,6 +12,7 @@ makedepends=('cmake' 'cpptoml' 'doxygen' 'glib2' 'gobject-introspection'
'hotdoc' 'lua' 'meson' 'pipewire' 'python-breathe' 'python-sphinx_rtd_theme'
'python-sphinx' 'systemd')
checkdepends=('pipewire-alsa' 'pipewire-jack' 'pipewire-pulse')
+provides=('pipewire-media-session')
source=("$pkgname-$pkgver.tar.gz::https://gitlab.freedesktop.org/pipewire/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('8ded43fba5de58068516558918d49c86be7d67330e8a14e735561fefadba5e27952d556987b7304dead52b4e2f72a7d9626da0170e768c4702dd164840b08e3c')
b2sums=('4747ae405a824b019415188ff1a586d32fc2e97aba6777cd1e403aadf0e44458156d1f8b6dbc706b812a7ea8c873d0f506f2b42817d1bc5312874530edaf7234')
```

(Alternatively, both could provide a common e.g. "pipewire-session", which could be useful in the future if there are multiple alternative session managers, but that seems an overly complex approach for the moment.)

Additional info:
* Version 0.4.2-1
* https://fedoraproject.org/wiki/Changes/WirePlumber
* https://pipewire.pages.freedesktop.org/wireplumber/
This task depends upon

Comment by Jonathon (jonathon) - Wednesday, 29 September 2021, 12:29 GMT
Actually, it needs to be within the package() function... -.-

```
@@ -34,7 +34,7 @@ check() {
package_wireplumber() {
depends=('gcc-libs' 'glibc' 'lua' 'libgio-2.0.so' 'libglib-2.0.so'
'libgmodule-2.0.so' 'libgobject-2.0.so' 'libpipewire-0.3.so')
- provides=('libwireplumber-0.4.so')
+ provides=('libwireplumber-0.4.so' 'pipewire-media-session')

cd "$pkgbase-$pkgver"
DESTDIR="${pkgdir}" meson install -C build
```
Comment by Moshiur Rahman (moshiur_rahman) - Friday, 01 October 2021, 03:41 GMT
+1
wireplumber can be used as a replacement for pipewire-media-session.
I think it would be best to make wireplumber provide the session handler dependency for packages that support wireplumber instead of making wireplumber provide pipewire-media-session. This way the users get to choose which session handler they want.
Comment by David Runge (dvzrv) - Sunday, 10 October 2021, 20:32 GMT
@jonathon: Thanks for the report.

I will look into this in the coming days. I have some idea for providing jack properly which can probably all be done in one go, unless the current situation is a show stopper.
Comment by Jonathon (jonathon) - Sunday, 10 October 2021, 23:55 GMT
No show stopper, just a "nice to have".
Comment by David Runge (dvzrv) - Friday, 22 October 2021, 12:14 GMT
Both pipewire-media-session and wireplumber (in [testing]/[community-testing]) now provide pipewire-session-manager, which in turn is pulled in instead of pipewire-media-session by dependents.

Please test!
Comment by Jonathon (jonathon) - Friday, 22 October 2021, 13:03 GMT
Working as expected (signed off). ;)
Comment by Jonathon (jonathon) - Friday, 22 October 2021, 13:46 GMT
I spoke too soon - the package depends work fine, but wireplumber doesn't add its user service like pipewire-media-session does:

```
$ sudo pacman -S pipewire-media-session
...
(1/1) installing pipewire-media-session
Created symlink /etc/systemd/user/pipewire-session-manager.service → /usr/lib/systemd/user/pipewire-media-session.service.
Created symlink /etc/systemd/user/pipewire.service.wants/pipewire-media-session.service → /usr/lib/systemd/user/pipewire-media-session.service.
Optional dependencies for pipewire-media-session
pipewire-media-session-docs: Documentation
:: Running post-transaction hooks...
...
```

```
$ sudo pacman -S wireplumber
...
: Processing package changes...
(1/1) installing wireplumber
Optional dependencies for wireplumber
wireplumber-docs: for documentation
:: Running post-transaction hooks...
...
```

Although, if this is set automatically, how is a conflict resolved?
Comment by David Runge (dvzrv) - Friday, 22 October 2021, 16:31 GMT
As discussed on IRC earlier:

With both pipewire-media-session and wireplumber providing pipewire-session-manager we are in the problematic situation that pipewire-media-session enables pipewire-media-session.service globally and if we relied only on either of the two packages getting installed currently wireplumber would not enable wireplumber.service globally.

If the wireplumber package was to enable wireplumber.service globally and the two packages do not conflict we will end up in a situation where updates will enable the respective service which will lead to very annoying behavior if both packages are installed at the same time.

The proposal therefore was to either not enable services globally at all or to have the two packages conflict with one another.
Comment by David Runge (dvzrv) - Friday, 22 October 2021, 17:10 GMT
@heftig opted for having the packages conflict.

Please test whether wireplumber 0.4.4-2 in [community-testing] behaves as expected (enables wireplumber.service globally and conflicts with pipewire-media-session).
Comment by Jonathon (jonathon) - Friday, 22 October 2021, 17:19 GMT
That looks to be working nicely:

```
$ sudo pacman -S wireplumber
...
looking for conflicting packages...
:: wireplumber and pipewire-media-session are in conflict. Remove pipewire-media-session? [y/N] y

Packages (2) pipewire-media-session-1:0.4.0-1 [removal] wireplumber-0.4.4-2
...
:: Processing package changes...
Removed /etc/systemd/user/pipewire.service.wants/pipewire-media-session.service.
Removed /etc/systemd/user/pipewire-session-manager.service.
(1/1) removing pipewire-media-session
(1/1) installing wireplumber
Created symlink /etc/systemd/user/pipewire-session-manager.service → /usr/lib/systemd/user/wireplumber.service.
Created symlink /etc/systemd/user/pipewire.service.wants/wireplumber.service → /usr/lib/systemd/user/wireplumber.service.
Optional dependencies for wireplumber
wireplumber-docs: for documentation
```
Comment by David Runge (dvzrv) - Friday, 22 October 2021, 18:28 GMT
@jonathon: Thanks for testing! Will also add a post_remove() action to disable wireplumber. That's one thing I forgot.

Loading...