[yocto] extrausers working from image file .bb but not from .bbappend
Paul Eggleton
paul.eggleton at linux.intel.com
Wed Apr 22 01:10:37 PDT 2015
On Tuesday 21 April 2015 18:54:29 Khem Raj wrote:
> Hi Chris
>
> > On Apr 21, 2015, at 6:27 PM, Chris Morgan <chmorgan at gmail.com> wrote:
> >
> > Hello.
> >
> > Based on
> > http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#ref-c
> > lasses-extrausers and the .bbclass file I've added this to a .bbappend,
> > pulseaudio_%.bbappend actually so root user can use pactl when
> > pulseaudio is running in system mode:
> >
> > inherit extrausers
> > EXTRA_USERS_PARAMS = "\
> >
> > usermod -a -G audio root \
> >
> > "
> >
> >
> > From the .bbappend this isn't working. If instead I add it to our
> > custom image file recipe (image-blah.bb) it does work.
>
> its a image level config so thats right behavior.
>
> > I'm not sure how to debug or why it isn't working from the .bbappend.
> > Thoughts?
> >
> >
> >
> > Also, the documentation in the .bbclass seems out of date but wanted to
> > confirm:
> >
> > http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/classes/extrausers.bb
> > class
> >
> > shows:
> >
> > Below is an example showing how to use this functionality.
> > # INHERIT += "extrausers"
> > # EXTRA_USERS_PARAMS = "\
> > # useradd -p '' tester; \
> > # groupadd developers; \
> > # userdel nobody; \
> > # groupdel -g video; \
> > # groupmod -g 1020 developers; \
> > # usermod -s /bin/sh tester; \
> > # "
> >
> > This INHERIT vs. inherit seems like it could be something that changed
> > in bitbake in the past but was left over in the .bbclass.
>
> its correct because its assuming you are adding it to config metadata and
> not recipe metadata may be location is not right. Send a patch
It should work either in the image recipe (with inherit) or at the
configuration level (with INHERIT +=), but I agree extrausers not intended to
work from individual recipes, we have useradd for that.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the yocto
mailing list