Bug 2280

Summary: /etc/group not exists while executing useradd/groupadd scripts
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Dongxiao Xu <dongxiao.xu>
Component: coreAssignee: Scott Garman <scott.a.garman>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: mark.hatle, meta.mr.watcher, meta.watcher, richard.purdie, shane.wang
Version: unspecified   
Target Milestone: 1.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Dongxiao Xu 2012-04-11 16:52:27 UTC
Steps to reproduce:
1) Change core-image-basic.bb to be following:

DESCRIPTION = "A foundational basic image without support for X that can be \
reasonably used for customization."

IMAGE_FEATURES += "apps-console-core ssh-server-openssh"

IMAGE_INSTALL = "\
    task-core-basic \
    task-core-ssh-openssh \
    task-core-apps-console \
    task-core-boot \
    "
inherit core-image

2) run "bitbake core-image-basic"

We will meet rootfs error and the log is something like:

groupadd: group 'netdev' already exists
grep: /distro/sdb/build-basic/tmp/work/qemux86-poky-linux/hob-image-hob-basic-1.0-r0/rootfs/etc/group: No such file or directory
WARNING: groupadd command did not succeed. Retrying...
groupadd: group 'netdev' already exists
grep: /distro/sdb/build-basic/tmp/work/qemux86-poky-linux/hob-image-hob-basic-1.0-r0/rootfs/etc/group: No such file or directory
WARNING: groupadd command did not succeed. Retrying...
groupadd: group 'netdev' already exists
grep: /distro/sdb/build-basic/tmp/work/qemux86-poky-linux/hob-image-hob-basic-1.0-r0/rootfs/etc/group: No such file or directory
WARNING: groupadd command did not succeed. Retrying...
groupadd: group 'netdev' already exists
grep: /distro/sdb/build-basic/tmp/work/qemux86-poky-linux/hob-image-hob-basic-1.0-r0/rootfs/etc/group: No such file or directory
WARNING: groupadd command did not succeed. Retrying...
groupadd: group 'netdev' already exists
grep: /distro/sdb/build-basic/tmp/work/qemux86-poky-linux/hob-image-hob-basic-1.0-r0/rootfs/etc/group: No such file or directory
WARNING: groupadd command did not succeed. Retrying...
ERROR: tried running groupadd command 10 times without success, giving up
dbus-1                      ##################################################
 Adding system startup for /distro/sdb/build-basic/tmp/work/qemux86-poky-linux/hob-image-hob-basic-1.0-r0/rootfs/etc/init.d/dbus-1.
kernel-module-uvesafb       ##################################################
libusb-compat               ##################################################
base-passwd                 ##################################################
shadow                      ##################################################
...


I checked that dbus-1 RDEPENDS on base-passwd, however from the above log we can see that, system tries to install dbus-1 firstly, and then base-passwd, causing the useradd/groupadd scripts panic.
Comment 1 Saul Wold 2012-04-11 23:52:00 UTC
I think RP has resolved this, but please verify.
Comment 2 Scott Garman 2012-04-12 00:07:03 UTC
Yes, this is now fixed in oe-core and poky master as of:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0923ee40ae59133c91a95e0727eb1ab95aca13b8