[poky] Add single user

ChenQi Qi.Chen at windriver.com
Thu Oct 10 20:07:17 PDT 2013


On 10/11/2013 06:06 AM, Michael Davis wrote:
>
> I am attempting to add a single user to my poky build.  I am trying to 
> follow the useradd-example.bb layout but I cannot get bitbake to like 
> it.  My bb file looks like so:
>
> SUMMARY = "Add a user"
>
> DESCRIPTION = "This recipe will add a new user"
>
> PR = "r0"
>
> LICENSE = "MIT"
>
> LIC_FILES_CHKSUM = 
> "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
>
> S = "${WORKDIR}"
>
> inherit useradd
>
> USERADD_PACKAGES = "${PN}"
>
> USERADD_PARAM_${PN} = "--disabled-password hal"
>
> do_install () {
>
>            chown -R hal ${D}${datadir}/hal
>
> }
>
> FILES_${PN} = "${datadir}/hal/*"
>
> I have the useradd package specified as a dependency for a package 
> group which I am installing for my image.  When I bake, it attempts 
> do_rootfs but fails and spits out a huge log after which it simple 
> states that it couldn't satisfy dependencies for my package group and 
> and points the the useradd package.  Is there any obvious reason why 
> such a simple recipe like this would not work?  Thanks
>

Are you sure your package is not empty?
Maybe you want this in your recipe.
ALLOW_EMPTY_${PN} = "1"

Also, if you're only trying to add a user, use EXTRA_USERS_PARAMS in 
your conf file (assume you're using poky/master, i'm not sure whether 
dylan has this feature).

Best Regards,
Chen Qi

> -Mike
>
>
>
> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/poky/attachments/20131011/fc64daba/attachment.html>


More information about the poky mailing list