[OE-core] [PATCH 5/5] pulseaudio: add 'autospawn-for-root' PACKAGECONFIG

Christopher Larson kergoth at gmail.com
Tue Aug 25 14:26:51 UTC 2015


On Tue, Aug 25, 2015 at 1:35 AM, Tanu Kaskinen <tanuk at iki.fi> wrote:

> On Mon, 2015-08-24 at 15:19 -0700, Christopher Larson wrote:
> > From: Christopher Larson <chris_larson at mentor.com>
> >
> > Since many embedded systems don't have non-root users, it's useful to be
> able
> > to use pulseaudio autospawn for root as well.
> >
> > Signed-off-by: Christopher Larson <chris_larson at mentor.com>
> > ---
> >  meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 18
> > ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
> b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
> > index 6199dcd..70009d0 100644
> > --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
> > +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
> > @@ -47,6 +47,11 @@ PACKAGECONFIG[systemd] = "--enable-systemd-daemon
> --enable-systemd-login --enabl
> >  PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxtst
> libice libsm libxcb"
> >  PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
> >  PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
> > +# Since many embedded systems don't have non-root users, it's useful to
> be
> > +# able to use pulseaudio autospawn for root as well. Autospawn will
> only be
> > +# used if the systemd packageconfig is not enabled, otherwise it will
> rely on
> > +# systemd's user services to spawn it.
>
> The latter sentence is incorrect. Having systemd enabled does not
> currently have any effect on autospawning. The systemd service and
> socket files get installed, but not enabled by default, because the D
> -Bus session socket is not available to services that are started by
> systemd, which causes some trouble for PulseAudio. Once D-Bus works
> better out of the box, systemd socket activation will be enabled for
> PulseAudio, but until then we will rely on PulseAudio's own
> autospawning.
>

Ah, thanks for the clarification. I'll just remove the second sentence
entirely.

> +PACKAGECONFIG[autospawn-for-root] = ",,,"
> >
> >  EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES",
> "neon", "", " --enable-neon-opt=no", d)}"
> >  EXTRA_OECONF_append_armeb = "${@bb.utils.contains("TUNE_FEATURES",
> "neon", "", " --enable-neon-opt=no", d)}"
> > @@ -59,6 +64,19 @@ export TARGET_PFPU = "${TARGET_FPU}"
> >  OE_LT_RPATH_ALLOW = "any"
> >  OE_LT_RPATH_ALLOW[export]="1"
> >
> > +set_cfg_value () {
> > +     sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1"
> > +     if ! grep -q "^$2 = $3\$" "$1"; then
> > +             die "Use of sed to set '$2' to '$3' in '$1' failed"
> > +     fi
> > +}
> > +
> > +do_compile_append () {
> > +     if ${@bb.utils.contains('PACKAGECONFIG', 'autospawn-for-root',
> 'true', 'false', d)}; then
> > +             set_cfg_value src/client.conf allow-autospawn-for-root yes
> > +     fi
> > +}
>
> I think a configure option like --allow-autospawn-for-root-by-default
> would be nicer than patching configuration files like this. What do you
> (and others) think? I'm not against applying this patch for now, but if
> I'm not alone with this preference, I'll add the configure option later
> myself.


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.

That said, I don't feel at all strongly about it, so if others would rather
see a configure option, go for it.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150825/9d089188/attachment-0002.html>


More information about the Openembedded-core mailing list