diff options
-rw-r--r-- | media-video/wireplumber/metadata.xml | 3 | ||||
-rw-r--r-- | media-video/wireplumber/wireplumber-0.4.7-r1.ebuild | 23 | ||||
-rw-r--r-- | media-video/wireplumber/wireplumber-9999.ebuild | 23 | ||||
-rw-r--r-- | profiles/base/package.use.mask | 1 |
4 files changed, 42 insertions, 8 deletions
diff --git a/media-video/wireplumber/metadata.xml b/media-video/wireplumber/metadata.xml index 6c8e29d33878..d0319b1689c5 100644 --- a/media-video/wireplumber/metadata.xml +++ b/media-video/wireplumber/metadata.xml @@ -14,4 +14,7 @@ <changelog>https://gitlab.freedesktop.org/pipewire/wireplumber/-/releases</changelog> <!--doc>https://gitlab.freedesktop.org/pipewire/wireplumber/-/wikis/home</doc--> </upstream> + <use> + <flag name="system-service">Install systemd unit files for running as a system service. Not recommended.</flag> + </use> </pkgmetadata> diff --git a/media-video/wireplumber/wireplumber-0.4.7-r1.ebuild b/media-video/wireplumber/wireplumber-0.4.7-r1.ebuild index a071b5b2b18f..6c3ec05b1b1c 100644 --- a/media-video/wireplumber/wireplumber-0.4.7-r1.ebuild +++ b/media-video/wireplumber/wireplumber-0.4.7-r1.ebuild @@ -21,11 +21,12 @@ HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber" LICENSE="MIT" SLOT="0/0.4" -IUSE="elogind systemd test" +IUSE="elogind system-service systemd test" REQUIRED_USE=" ${LUA_REQUIRED_USE} ?? ( elogind systemd ) + system-service? ( systemd ) " RESTRICT="!test? ( test )" @@ -50,7 +51,12 @@ DEPEND=" # $(lua_gen_cond_dep ' # dev-lua/<NAME>[${LUA_USEDEP}] # ') -RDEPEND="${DEPEND}" +RDEPEND="${DEPEND} + system-service? ( + acct-user/pipewire + acct-group/pipewire + ) +" DOCS=( {NEWS,README}.rst ) @@ -66,7 +72,7 @@ src_configure() { -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version)) $(meson_feature elogind) $(meson_feature systemd) - -Dsystemd-system-service=false # Matches upstream + $(meson_use system-service systemd-system-service) $(meson_use systemd systemd-user-service) -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir) -Dsystemd-user-unit-dir=$(systemd_get_userunitdir) @@ -90,5 +96,14 @@ pkg_postinst() { ewarn "or, if it does exist, that any reference to" ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)." fi - ewarn + if use system-service; then + ewarn + ewarn "WARNING: you have enabled the system-service USE flag, which installs" + ewarn "the system-wide systemd units that enable WirePlumber to run as a system" + ewarn "service. This is more than likely NOT what you want. You are strongly" + ewarn "advised not to enable this mode and instead stick with systemd user" + ewarn "units. The default configuration files will likely not work out of" + ewarn "box, and you are on your own with configuration." + ewarn + fi } diff --git a/media-video/wireplumber/wireplumber-9999.ebuild b/media-video/wireplumber/wireplumber-9999.ebuild index 2e6c068b1ee9..f377227e2460 100644 --- a/media-video/wireplumber/wireplumber-9999.ebuild +++ b/media-video/wireplumber/wireplumber-9999.ebuild @@ -21,11 +21,12 @@ HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber" LICENSE="MIT" SLOT="0/0.4" -IUSE="elogind systemd test" +IUSE="elogind system-service systemd test" REQUIRED_USE=" ${LUA_REQUIRED_USE} ?? ( elogind systemd ) + system-service? ( systemd ) " RESTRICT="!test? ( test )" @@ -50,7 +51,12 @@ DEPEND=" # $(lua_gen_cond_dep ' # dev-lua/<NAME>[${LUA_USEDEP}] # ') -RDEPEND="${DEPEND}" +RDEPEND="${DEPEND} + system-service? ( + acct-user/pipewire + acct-group/pipewire + ) +" DOCS=( {NEWS,README}.rst ) @@ -62,7 +68,7 @@ src_configure() { -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version)) $(meson_feature elogind) $(meson_feature systemd) - -Dsystemd-system-service=false # Matches upstream + $(meson_use system-service systemd-system-service) $(meson_use systemd systemd-user-service) -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir) -Dsystemd-user-unit-dir=$(systemd_get_userunitdir) @@ -86,5 +92,14 @@ pkg_postinst() { ewarn "or, if it does exist, that any reference to" ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)." fi - ewarn + if use system-service; then + ewarn + ewarn "WARNING: you have enabled the system-service USE flag, which installs" + ewarn "the system-wide systemd units that enable WirePlumber to run as a system" + ewarn "service. This is more than likely NOT what you want. You are strongly" + ewarn "advised not to enable this mode and instead stick with systemd user" + ewarn "units. The default configuration files will likely not work out of" + ewarn "box, and you are on your own with configuration." + ewarn + fi } diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask index ce62e749c618..22b5b3da0336 100644 --- a/profiles/base/package.use.mask +++ b/profiles/base/package.use.mask @@ -10,6 +10,7 @@ # We're still ironing out some kinks and writing documentation for # this feature, so keep masked for now. media-video/pipewire system-service +media-video/wireplumber system-service # Sam James <sam@gentoo.org> (2021-01-24) # USE=custom-cflags is _particularly_ dangerous on sys-libs/glibc and |