Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Tanu Kaskinen <tanuk@iki.fi>
To: Christopher Larson <kergoth@gmail.com>,
	 openembedded-core@lists.openembedded.org
Cc: Christopher Larson <chris_larson@mentor.com>
Subject: Re: [PATCH 5/5] pulseaudio: add 'autospawn-for-root' PACKAGECONFIG
Date: Tue, 25 Aug 2015 11:35:51 +0300	[thread overview]
Message-ID: <1440491751.5373.27.camel@iki.fi> (raw)
In-Reply-To: <b22733643db015ebedf00241ab7ef40a0ee50a7b.1440454579.git.chris_larson@mentor.com>

On Mon, 2015-08-24 at 15:19 -0700, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@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@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.

> +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.

-- 
Tanu



  reply	other threads:[~2015-08-25  8:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 22:19 [PATCH 0/5] Various bits related to pulseaudio Christopher Larson
2015-08-24 22:19 ` [PATCH 1/5] libunwind: always depend on libatomics-ops Christopher Larson
2015-08-24 22:19 ` [PATCH 2/5] libatomic-ops: move to recipes-support, fix recipe name Christopher Larson
2015-08-25  0:32   ` Khem Raj
2015-08-25 15:39     ` Christopher Larson
2015-08-24 22:19 ` [PATCH 3/5] packagegroup-core-x11-sato: obey the pulseaudio distro feature Christopher Larson
2015-08-24 22:19 ` [PATCH 4/5] pulseaudio: pass --with-systemduserunitdir Christopher Larson
2015-08-24 22:19 ` [PATCH 5/5] pulseaudio: add 'autospawn-for-root' PACKAGECONFIG Christopher Larson
2015-08-25  8:35   ` Tanu Kaskinen [this message]
2015-08-25 14:26     ` Christopher Larson
2015-08-25 16:08       ` Tanu Kaskinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440491751.5373.27.camel@iki.fi \
    --to=tanuk@iki.fi \
    --cc=chris_larson@mentor.com \
    --cc=kergoth@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox