aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Bergin <peter@berginkonsult.se>2021-10-07 08:26:20 +0200
committerArmin Kuster <akuster808@gmail.com>2021-10-08 17:23:52 -0700
commit41e43410611a2fc8aff8da36b558ed338bb85e30 (patch)
treec0b410969ab539d5c8994bccf3cc226644b91321
parent9fa4691e3d32de9255645916f8022812c64c1316 (diff)
downloadmeta-openembedded-contrib-honister-next.tar.gz
meta-openembedded-contrib-honister-next.tar.bz2
meta-openembedded-contrib-honister-next.zip
pipewire: rework PACKAGECONFIG for systemd service fileshonister-next
pipewire project have config option to enable installation of systemd user and/or system services. Before update of pipewire to current version (02de7746) only system service files was added, after update both user and system service files was added. This commit will make it possible to configure which service files that is wanted. Default PACKAGECONFIG is to add systemd service files as it was before version upgrade. Yocto systemd class currently does not handle user service files during package and those files are only installed in rootfs but user service is not enabled as a system service is. Another use case is where you want your own service files and can disable the default ones from pipewire and add your own in a bbappend. Signed-off-by: Peter Bergin <peter@berginkonsult.se> (cherry picked from commit 3b0458715178a0e0f4d8d0255d1ad2cd71f90041) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb20
1 files changed, 10 insertions, 10 deletions
diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb b/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb
index fe1de6221b..2abc64efb2 100644
--- a/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb
+++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb
@@ -39,11 +39,6 @@ SYSTEMD_PACKAGES = "${PN} ${PN}-media-session"
#
# libcamera support currently does not build successfully.
#
-# systemd user service files are disabled because per-user
-# PipeWire instances aren't really something that makes
-# much sense in an embedded environment. A system-wide
-# instance does.
-#
# manpage generation requires xmltoman, which is not available.
EXTRA_OEMESON += " \
-Daudiotestsrc=enabled \
@@ -59,7 +54,8 @@ EXTRA_OEMESON += " \
PACKAGECONFIG ??= "\
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
- ${@bb.utils.filter('DISTRO_FEATURES', 'alsa systemd', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service', '', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)} \
gstreamer jack sndfile pw-cat v4l2 \
"
@@ -68,7 +64,6 @@ PACKAGECONFIG ??= "\
# libjack.so* files, thus colliding with the libpack package. This
# is why these two are marked in their respective packageconfigs
# as being in conflict.
-
PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev"
PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc"
PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native"
@@ -76,7 +71,12 @@ PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,glib-2.0 gs
PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack"
PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,virtual/libsdl2"
PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
-PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=enabled -Dsystemd-user-service=enabled,-Dsystemd=disabled -Dsystemd-system-service=disabled -Dsystemd-user-service=disabled,systemd"
+PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd"
+PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsystemd-system-service=disabled,systemd"
+# "systemd-user-service" packageconfig will only install service
+# files to rootfs but not enable them as systemd.bbclass
+# currently lacks the feature of enabling user services.
+PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd"
# pw-cat needs sndfile packageconfig to be enabled
PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled"
PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev"
@@ -191,7 +191,7 @@ PACKAGES =+ "\
PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*"
-SYSTEMD_SERVICE:${PN} = "pipewire.service"
+SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}"
CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf"
FILES:${PN} = " \
${datadir}/pipewire/pipewire.conf \
@@ -248,7 +248,7 @@ FILES:${PN}-jack = "\
# Example session manager. Not intended for use in production.
CONFFILES:${PN}-media-session = "${datadir}/pipewire/media-session.d/*"
-SYSTEMD_SERVICE:${PN}-media-session = "pipewire-media-session.service"
+SYSTEMD_SERVICE:${PN}-media-session = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire-media-session.service', '', d)}"
FILES:${PN}-media-session = " \
${bindir}/pipewire-media-session \
${datadir}/pipewire/media-session.d/* \