Commit graph

15 commits

Author SHA1 Message Date
Barnabás Pőcze
f2c878a2c1 meson.build: rework systemd related options
One issues is that the `systemd-{system,user}-service` feature options
do not anything without the `systemd` option. This makes it more
complicated to arrive at the desired build configuration since there
are 3^3 = 27 possible ways to set each of them, but if `systemd=disabled`,
then the other two are just ignored.

Secondly, the `systemd` option also influences whether or not libsystemd
will be used or not. This is not strictly necessary, since the "systemd"
and "libsystemd" pkg-config files might be split, and one might wish to
disable any kind of service file generation, but use libsystemd.

Solve the first issues by using the `systemd-{system,user}-service` options
when looking up the "systemd" dependency for generating service files. This
means that the corresponding option is in full control, no secondary options
are necessary. This means that the "systemd" dependency is looked up potentially
twice, but that should not be a significant issue since meson caches dependecy
lookups.

And solve the second issue by renaming the now unused `systemd` option to
`libsystemd` and using it solely to control whether or not libsystemd will
be used.

Furthermore, the default value of `systemd-user-service` is set to "auto" to
prevent the dependency lookup from failing on non-systemd systemd out of
the box. And the journal tests in "test-support" are extended to return "skip"
if `sd_journal_open()` returns `ENOSYS`, which is needed because "elogind"
ships the systemd pkg-config files and headers.
2025-07-18 09:46:17 +00:00
Wim Taymans
dea6fa7f4c systemd: add systemwide pipewire-pulse files
We can and it works, so why not.
2025-01-30 12:50:49 +01:00
Jonas Holmberg
0163d4d440 systemd: Limit system manager socket permissions
Remove group permission on the system manager socket so that restricted
clients cannot use it to get unrestricted access. It is assumed that the
session manager system service (wireplumber) is running as pipewire user
and will get access to the manager socket, while other clients are
members of the pipewire group and will only get access to the normal
socket.
2023-11-06 15:02:10 +00:00
Barnabás Pőcze
ec465966bc treewide: meson.build: simplify get_variable() calls
Since 01c6fd0a88 the
minimum required meson version is 0.59.0, and since
meson 0.58.0, `get_variable()` on a dependency object
accepts a positional argument. The "type" of variable
(internal, pkgconfig, etc.) in that case does not need
to be specified explicitly.
2022-01-17 08:28:53 +00:00
Timo Gurr
814d409501 systemd: Add systemd-system-unit-dir override 2022-01-06 12:17:10 +00:00
Petros Angelatos
5054b48c9d systemd: correctly prefix systemd system units
The definition of the `systemdsystemunitdir` variable uses `rootprefix`
instead of `prefix`:

https://github.com/systemd/systemd/blob/v250/src/core/systemd.pc.in#L23

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2021-12-31 20:47:56 +01:00
Barnabás Pőcze
b666edde78 daemon: meson.build: use get_variable()
Use `get_variable()` on the dependency instead of `get_pkgconfig_variable()`
as that has been deprecated in meson 0.56.0.
2021-12-28 18:37:10 +01:00
Peter Hutterer
1bced6b2ef Remove media-session from this tree
It is now available as a separate project in
https://gitlab.freedesktop.org/pipewire/media-session

The code required by pw-reservice has moved to src/tools/reserve.{c|h}
2021-10-18 20:44:07 +10:00
Nils Tonnätt
dd12910769 Revert "[Meson] Fix all deprecation warnings"
This reverts commit f7e1175ef0.
2021-08-08 19:18:40 +00:00
Nils Tonnätt
f7e1175ef0 [Meson] Fix all deprecation warnings 2021-08-06 07:56:16 +00:00
Niklāvs Koļesņikovs
d7cddbdb61 meson: changes meson switches for controlling session manager
Some distributions set --auto_features=enabled which messes with the
internal logic of the build system when features are used for other
purposes than pure dependency control. The only solution is to either
avoid the value auto or change the type of the option to non-feature.

This commit does the later by replacing -Dmedia-session, -Dwireplumber
and -Dsession-manager with the new -Dsession-managers array and
-Ddefault-session-manager combo options.

Fixes #1333
Fixes #1336
2021-06-24 14:22:13 +00:00
Peter Hutterer
223f20709d meson: replace join_paths(a, b) with a / b
More readable and from the meson reference manual:
(since 0.49.0) Using the/ operator on strings is equivalent to calling join_paths.
2021-04-15 06:57:00 +00:00
Thibault Saunier
485bae5eb0 meson: Use feature options everywhere it makes sense 2021-03-10 20:18:34 +00:00
George Kiagiadakis
012a68f8ef systemd: add unit files for pipewire-media-session
... and disable starting it from context.exec in the config
2021-02-23 16:21:59 +00: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