[yocto] How to use same user in two recipes?

Burton, Ross ross.burton at intel.com
Wed Oct 11 01:54:04 PDT 2017


Both of your recipes will need to depend on the user-creating recipe.

Ross

On 11 October 2017 at 07:45, Fabien Lahoudere <
fabien.lahoudere at collabora.co.uk> wrote:

> On Tue, 2017-10-10 at 15:31 -0700, Aaron_Wright at selinc.com wrote:
>
> > Hi
> >
> > I want to use the same user in two different recipe.
> > I create the user in recipe A.bb and it works fine.
> > Now I want to use the same user in B.bb so I add DEPENDS = "A"
> > thinking that sysroot will be
> > populated with A.bb users.
> >
> > But when I bitbake the recipe, user is not found.
> > I conclude that I have to use USERADD_* in each recipe, right?
> >
> > What happen if I use different USERADD_PARAM_${PN} in each recipe?
> >
> > I also try to use EXTRA_USERS_PARAMS but without success?
> >
> > Is there a way to populate sysroot with users?
> >
> > Thanks
> >
> > --
> > Fabien
> > --
>
> When I have this issue I just make a separate recipe that creates the
> user, and have all the other recipes depend on it.
> That way the user is always created with the same parameters, without
> possibility of getting out of sync.
>
>
> Thanks Aaron
>
> Yes it is exactly what we do before with morty but now we use pyro and the
> sysroot is per recipe and not common to all recipe.
> And I search in the sysroot and the users created in recipe A are not
> applied to /etc/passwd.
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20171011/f0953672/attachment.html>


More information about the yocto mailing list