<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">&lt;<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>&gt;</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>
&gt; From: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
&gt;<br>
&gt; Since many embedded systems don&#39;t have non-root users, it&#39;s useful to be able<br>
&gt; to use pulseaudio autospawn for root as well.<br>
&gt;<br>
&gt; Signed-off-by: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
&gt; ---<br>
&gt;  meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 18<br>
&gt; ++++++++++++++++++<br>
&gt;  1 file changed, 18 insertions(+)<br>
&gt;<br>
&gt; diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc<br>
&gt; index 6199dcd..70009d0 100644<br>
&gt; --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc<br>
&gt; +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc<br>
&gt; @@ -47,6 +47,11 @@ PACKAGECONFIG[systemd] = &quot;--enable-systemd-daemon --enable-systemd-login --enabl<br>
&gt;  PACKAGECONFIG[x11] = &quot;--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb&quot;<br>
&gt;  PACKAGECONFIG[avahi] = &quot;--enable-avahi,--disable-avahi,avahi&quot;<br>
&gt;  PACKAGECONFIG[jack] = &quot;--enable-jack,--disable-jack,jack&quot;<br>
&gt; +# Since many embedded systems don&#39;t have non-root users, it&#39;s useful to be<br>
&gt; +# able to use pulseaudio autospawn for root as well. Autospawn will only be<br>
&gt; +# used if the systemd packageconfig is not enabled, otherwise it will rely on<br>
&gt; +# systemd&#39;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&#39;s own<br>
autospawning.<br></blockquote><div><br></div><div>Ah, thanks for the clarification. I&#39;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="">
&gt; +PACKAGECONFIG[autospawn-for-root] = &quot;,,,&quot;<br>
&gt;<br>
&gt;  EXTRA_OECONF_append_arm = &quot;${@bb.utils.contains(&quot;TUNE_FEATURES&quot;, &quot;neon&quot;, &quot;&quot;, &quot; --enable-neon-opt=no&quot;, d)}&quot;<br>
&gt;  EXTRA_OECONF_append_armeb = &quot;${@bb.utils.contains(&quot;TUNE_FEATURES&quot;, &quot;neon&quot;, &quot;&quot;, &quot; --enable-neon-opt=no&quot;, d)}&quot;<br>
&gt; @@ -59,6 +64,19 @@ export TARGET_PFPU = &quot;${TARGET_FPU}&quot;<br>
&gt;  OE_LT_RPATH_ALLOW = &quot;any&quot;<br>
&gt;  OE_LT_RPATH_ALLOW[export]=&quot;1&quot;<br>
&gt;<br>
&gt; +set_cfg_value () {<br>
&gt; +  Â  Â sed -i -e &quot;s/\(; *\)\?$2 =.*/$2 = $3/&quot; &quot;$1&quot;<br>
&gt; +  Â  Â if ! grep -q &quot;^$2 = $3\$&quot; &quot;$1&quot;; then<br>
&gt; +  Â  Â  Â  Â  Â  Â die &quot;Use of sed to set &#39;$2&#39; to &#39;$3&#39; in &#39;$1&#39; failed&quot;<br>
&gt; +  Â  Â fi<br>
&gt; +}<br>
&gt; +<br>
&gt; +do_compile_append () {<br>
&gt; +  Â  Â if ${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;autospawn-for-root&#39;, &#39;true&#39;, &#39;false&#39;, d)}; then<br>
&gt; +  Â  Â  Â  Â  Â  Â set_cfg_value src/client.conf allow-autospawn-for-root yes<br>
&gt; +  Â  Â fi<br>
&gt; +}<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&#39;m not against applying this patch for now, but if<br>
I&#39;m not alone with this preference, I&#39;ll add the configure option later<br>
myself.</blockquote></div><br>It needs to stay a runtime configuration file option for administrators, no? We&#39;re just changing the default. So I&#39;m not sure that having a configure option do it or us do it really changes all that much, particularly since it&#39;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&#39;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>