<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 25, 2015 at 1:35 AM, Tanu Kaskinen <span dir="ltr"><<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, 2015-08-24 at 15:19 -0700, Christopher Larson wrote:<br>
> From: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
><br>
> Since many embedded systems don't have non-root users, it's useful to be able<br>
> to use pulseaudio autospawn for root as well.<br>
><br>
> Signed-off-by: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
> ---<br>
>Â meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 18<br>
> ++++++++++++++++++<br>
>Â 1 file changed, 18 insertions(+)<br>
><br>
> diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc<br>
> index 6199dcd..70009d0 100644<br>
> --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc<br>
> +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc<br>
> @@ -47,6 +47,11 @@ PACKAGECONFIG[systemd] = "--enable-systemd-daemon --enable-systemd-login --enabl<br>
>Â PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb"<br>
>Â PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"<br>
>Â PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"<br>
> +# Since many embedded systems don't have non-root users, it's useful to be<br>
> +# able to use pulseaudio autospawn for root as well. Autospawn will only be<br>
> +# used if the systemd packageconfig is not enabled, otherwise it will rely on<br>
> +# systemd's user services to spawn it.<br>
<br>
</span>The latter sentence is incorrect. Having systemd enabled does not<br>
currently have any effect on autospawning. The systemd service and<br>
socket files get installed, but not enabled by default, because the D<br>
-Bus session socket is not available to services that are started by<br>
systemd, which causes some trouble for PulseAudio. Once D-Bus works<br>
better out of the box, systemd socket activation will be enabled for<br>
PulseAudio, but until then we will rely on PulseAudio's own<br>
autospawning.<br></blockquote><div><br></div><div>Ah, thanks for the clarification. I'll just remove the second sentence entirely.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> +PACKAGECONFIG[autospawn-for-root] = ",,,"<br>
><br>
>Â EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"<br>
>Â EXTRA_OECONF_append_armeb = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"<br>
> @@ -59,6 +64,19 @@ export TARGET_PFPU = "${TARGET_FPU}"<br>
>Â OE_LT_RPATH_ALLOW = "any"<br>
>Â OE_LT_RPATH_ALLOW[export]="1"<br>
><br>
> +set_cfg_value () {<br>
> +Â Â Â sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1"<br>
> +Â Â Â if ! grep -q "^$2 = $3\$" "$1"; then<br>
> +Â Â Â Â Â Â Â die "Use of sed to set '$2' to '$3' in '$1' failed"<br>
> +Â Â Â fi<br>
> +}<br>
> +<br>
> +do_compile_append () {<br>
> +Â Â Â if ${@bb.utils.contains('PACKAGECONFIG', 'autospawn-for-root', 'true', 'false', d)}; then<br>
> +Â Â Â Â Â Â Â set_cfg_value src/client.conf allow-autospawn-for-root yes<br>
> +Â Â Â fi<br>
> +}<br>
<br>
</span>I think a configure option like --allow-autospawn-for-root-by-default<br>
would be nicer than patching configuration files like this. What do you<br>
(and others) think? I'm not against applying this patch for now, but if<br>
I'm not alone with this preference, I'll add the configure option later<br>
myself.</blockquote></div><br>It needs to stay a runtime configuration file option for administrators, no? We're just changing the default. So I'm not sure that having a configure option do it or us do it really changes all that much, particularly since it's probably unlikely that upstream would be interested in such a patch.</div><div class="gmail_extra"><br></div><div class="gmail_extra">That said, I don't feel at all strongly about it, so if others would rather see a configure option, go for it.<br>-- <br><div class="gmail_signature"><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div></div>
</div></div>