Commit graph

12 commits

Author SHA1 Message Date
Bryan Quigley
dd1bf796cb systemd: add sandboxing and slice similar to pulseaudio
Adds as much sandboxing as seems to work with user sessions.
Adds pipewire to session slice per https://systemd.io/DESKTOP_ENVIRONMENTS/

Inspired from https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/master/src/daemon/systemd/user/pulseaudio.service.in

Fixes: 763
2021-02-19 09:08:51 +00:00
Wim Taymans
cd5ceae69e systemd: remove LimitMEMLOCK lines
The LimitMEMLOCK lines can only lower the use limits so it is not
very useful.

See #692
2021-02-08 14:56:50 +01:00
Wim Taymans
c866d5c1f4 Increase memlock limits in systemd service files 2021-01-22 13:18:48 +01:00
Jarkko Sakkinen
ec9dfe72ff systemd: Add systemd-user-unit-dir override
Add a new build option 'system-user-unit=dir', which can be used to
override the pkg-config default value.

By doing this, it becomes more practical to make a local unprivileged
build of the latest PipeWire:

$ meson --prefix=~/.local build
$ meson configure build -Dpipewire-alsa=false
$ meson configure build -Dsystemd-user-unit-dir=~/.config/systemd/user
$ meson configure build -Dudevrulesdir="`mktemp -d`"
$ ninja -C build install

For a local build enabling ALSA plugins is not plausible.

JACK needs a simple addition to the ~/.profile:

export LD_LIBRARY_PATH=$HOME/.local/lib/x86_64-linux-gnu/pipewire-0.3/jack

Finally, the genuine PulseAudio must be masked and local services
enabled:

systemctl --user enable pipewire.socket
systemctl --user enable pipewire-pulse.socket
systemctl --user mask pulseaudio.service

A sanity check [*] shows that nothing has leaked out of the home
directory (even though at least on my Debian 10 system PolKit still
asks for authorization during the meson build).

Not perfect, but lowers a barrier to run the development version a lot,
as that does not anymore to trash your system.

[*]  find / -name "*pipewire*" \! -path "/home/*"  \! -path "/var/lib/flatpak/*" 2> /dev/null

Signed-off-by: Jarkko Sakkinen <jarkko@suppilovahvero.lan>
2021-01-09 12:11:22 +01:00
Ihor Kalnytskyi
8942f6b402 launch: avoid autostarting pipewire-pulse systemd units for root
Long story short, this is something pulseaudio has since 2017 [1]. If
pipewire-pulse is aiming to be a drop-in replacement, the same behaviour
is probably expected.

I noticed that without this line I hit some issues with systemd socket
activation. In fact, it does not work properly at all. It probably has
something to do with the fact that pipewire-pulse is started for GDM
session and is somehow propagated down to my own user session.

[1] 24928d6b6f
2020-12-28 13:35:41 +01:00
Wim Taymans
798bcc10b1 pulse: add a small pulseaudio daemon
Add a small application that loads the pulse server and makes it
listen on the pulseaudio socket.
Add some systemd activation files to start the service.
2020-11-12 16:53:55 +01:00
Jonas Holmberg
5c52670421 systemd: Add system service and socket
Add system service and socket in addition to the user service and
socket. The system service is started as pipewire user and group and
clients need to be in the pipewire group to be able to connect.
2020-08-19 17:46:50 +00:00
worldofpeace
6b06341b14 build: use define_variable for get_pkgconfig_variable
On NixOS all packages are installed into their own immutable prefix.
Because of this get_pkgconfig_variable will return a
path from within systemd's prefix and we cannot write to it.
By using define_variable we can replace the respective directory
to be from the paths from meson.
2020-03-02 14:51:27 +00:00
Wim Taymans
1ace2a5daf make systemd dependency optional
Don't recurse into the directory of systemd when it was not found.
There are still some issues because libudev is actually provided
by systemd these days and we still need that for building the v4l2 and
alsa monitors.
2017-12-14 09:30:34 +01:00
Wim Taymans
b7e334e55d Release 0.1.4
Remove spec file
Fix systemd service file
Send error on link errors
Init socket to -1 so that we don't close anything on error
Wait for all proxy objects in device monitor
2017-08-23 13:22:39 +02:00
Wim Taymans
593df62ccc update spec 2017-08-17 19:42:10 +02:00
Wim Taymans
29eb58f7a2 Add systemd socket activation files
Notify of jack graph changes
2017-08-17 18:59:03 +02:00