diff options
author | Jason A. Donenfeld <zx2c4@gentoo.org> | 2022-02-06 00:56:27 +0100 |
---|---|---|
committer | Jason A. Donenfeld <zx2c4@gentoo.org> | 2022-02-06 00:57:33 +0100 |
commit | 9b93721339840ee78f87dd8a855164154e0d3c32 (patch) | |
tree | fbb24bb88a16b1e3f8dc5d4b33e1c1678db25bbe /media-video | |
parent | media-video/pipewire: add masked USE=system-service (diff) | |
download | gentoo-9b93721339840ee78f87dd8a855164154e0d3c32.tar.gz gentoo-9b93721339840ee78f87dd8a855164154e0d3c32.tar.bz2 gentoo-9b93721339840ee78f87dd8a855164154e0d3c32.zip |
media-video/wireplumber: add masked USE=system-service
Closes: https://github.com/gentoo/gentoo/pull/23972
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
Diffstat (limited to 'media-video')
-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 |
3 files changed, 41 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 } |