[OE-core] useradd.bbclass question

Andreas Müller schnitzeltony at googlemail.com
Thu May 2 14:43:08 UTC 2013


On Thu, May 2, 2013 at 4:34 PM, Paul Eggleton
<paul.eggleton at linux.intel.com> wrote:
> On Thursday 02 May 2013 08:35:55 Mark Hatle wrote:
>> On 5/2/13 2:49 AM, Andreas Müller wrote:
>> > on one of my build machines useradd.bbclass seem to use the UID/GID of
>> > build host. On other machines useradd works correct.
>> >
>> > I have the follwing in gdm:
>> >
>> > <snip>
>> > do_install_append() {
>> >
>> >      ...
>> >      chown -R gdm:gdm ${D}${localstatedir}/lib/gdm
>> >      chmod 0750 ${D}${localstatedir}/lib/gdm
>> >
>> > }
>> >
>> > ...
>> >
>> > USERADD_PACKAGES = "${PN}"
>> > USERADD_PARAM_${PN} = "--system --no-create-home --home
>> > ${localstatedir}/lib/gdm --user-group gdm"
>> > <snip/>
>> >
>> > In sysroot /etc/group I see
>> > gdm:x:990:
>> >
>> > In sysroot /etc/group I see
>> > gdm:!:993:990::/var/lib/gdm:
>> >
>> > The folder in packet/image has IDs 42:42 which is taken from build host.
>>
>> This says that something ran an operation outside of the pseudo environment.
>>  So it fell back to looking up the uid from the host system.  (The
>> alternative is the item was installed -before- the /etc/passwd,/etc/group
>> was written to the disk.
>
> Right, do_install will be well before this stuff happens and it is not a
> fakeroot task anyway. This needs to be moved to a postinstall script (which
> should be able to run during image creation).
>
> Cheers,
> Paul
>
Did this change - it is mentioned this way in

meta-skeleton/recipes-skeleton/useradd/useradd-example.bb

Andreas




More information about the Openembedded-core mailing list