public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Tanu Kaskinen <tanuk@iki.fi>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 3/3] pulseaudio: fix to manage user services corretly
Date: Thu, 08 Sep 2016 14:22:02 +0300	[thread overview]
Message-ID: <1473333722.3099.33.camel@iki.fi> (raw)
In-Reply-To: <57D10664.3050007@windriver.com>

On Thu, 2016-09-08 at 14:34 +0800, ChenQi wrote:
> On 09/07/2016 06:29 PM, Pau Espin Pedrol wrote:
> > 
> > 
> > 
> > Pau Espin Pedrol
> > 
> > 2016-09-07 11:22 GMT+02:00 Chen Qi <Qi.Chen@windriver.com 
> > <mailto:Qi.Chen@windriver.com>>:
> > 
> >     Make use of the new SYSTEMD_USER_SERVICE variable added in
> >     systemd.bbclass
> >     to manage user services in pulseaudio-server package.
> > 
> >     Signed-off-by: Chen Qi <Qi.Chen@windriver.com
> >     <mailto:Qi.Chen@windriver.com>>
> >     ---
> >      meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 4 ++--
> >      1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> >     diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
> >     b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
> >     index 6ed79ef..f3754d7 100644
> >     --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
> >     +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
> >     @@ -124,8 +124,8 @@ FILES_${PN}-conf = "${sysconfdir}"
> >      FILES_${PN}-bin +=
> >     "${sysconfdir}/default/volatiles/volatiles.04_pulse"
> >      FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-*
> >     ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules
> >     */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*"
> > 
> >     -#SYSTEMD_PACKAGES = "${PN}-server"
> >     -SYSTEMD_SERVICE_${PN}-server = "pulseaudio.service"
> >     +SYSTEMD_PACKAGES = "${PN}-server"
> >     +SYSTEMD_USER_SERVICE_${PN}-server = "pulseaudio.service
> >     pulseaudio.socket"
> > 
> > I think specifying "pulseaudio.socket" for 
> > SYSTEMD_USER_SERVICE_${PN}-server should be enough, systemd.bbclass is 
> > going to add the .service file afair.
> 
> Add both:
> chenqi@pek-hostel-deb01:~/poky/build-systemd [1] $ ls 
> tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/systemd/user
> default.target.wants  sockets.target.wants
> 
> Add pulseaudio.socket:
> chenqi@pek-hostel-deb01:~/poky/build-systemd [1] $ ls 
> tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/systemd/user
> sockets.target.wants
> 
> They have different results.
> I don't know a lot about pulseaudio. Can you confirm that 
> pulseaudio.socket is enough?

If I understood correctly, Pau's argument was that there would be no
difference, which doesn't seem to be the case. However, if
pulseaudio.service isn't included in default.target.wants, that
shouldn't be a big problem, because socket activation will anyway start
the service when needed. On the other hand, I don't
think SYSTEMD_USER_SERVICE is intended to be used for controlling which
units to enable - it looks more like a variable that should contain all
units contained in the package. If my understanding is correct, you
should list both units in the variable.

The distributions that I've seen to use systemd to manage pulseaudio
only enable pulseaudio.socket, so that socket activation is used rather
than starting pulseaudio automatically as part of the user session. I
don't know if OE supports that - it looks like there's only a toggle to
enable all units or none. Other distributions also patch client.conf to
disable pulseaudio's own autospawning mechanism, since it's redundant
when using socket activation. Leaving autospawning enabled shouldn't
break anything in normal use, but it can cause some confusing behaviour
if the user tries to manually disable automatic pulseaudio starting by
disabling the systemd units.

-- 
Tanu


  reply	other threads:[~2016-09-08 11:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  9:22 [PATCH 0/3] systemd: add support to manage user units Chen Qi
2016-09-07  9:22 ` [PATCH 1/3] systemd-systemctl: add option to manage user services Chen Qi
2016-09-07  9:22 ` [PATCH 2/3] systemd.bbclass: add support " Chen Qi
2016-09-07 12:14   ` Pau Espin Pedrol
2016-09-08  2:33     ` ChenQi
2016-09-09 17:48       ` Pau Espin Pedrol
2016-09-07  9:22 ` [PATCH 3/3] pulseaudio: fix to manage user services corretly Chen Qi
2016-09-07 10:29   ` Pau Espin Pedrol
2016-09-08  6:34     ` ChenQi
2016-09-08 11:22       ` Tanu Kaskinen [this message]
2016-09-09 18:10         ` Pau Espin Pedrol
2016-09-09 18:34           ` Tanu Kaskinen
2016-09-07  9:43 ` [PATCH 0/3] systemd: add support to manage user units Jérémy Rosen

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=1473333722.3099.33.camel@iki.fi \
    --to=tanuk@iki.fi \
    --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