When do_rootfs is run for an image which is built from RPM packages, some of which need to create user accounts, the base-passwd package is not guaranteed to be installed. This causes the postinst scripts to add the user/group accounts to fail, as /etc/passwd and /etc/group do not exist yet. An easy way to reproduce this bug is to add openssh-sshd to the IMAGE_INSTALL of core-image-minimal and build it. Your do_rootfs log will show useradd errors, and that the openssh-sshd package was installed before base-passwd.
Created attachment 376 [details] do_rootfs log
Note, this bug does not occur when using the ipk packaging backend.
Reproduced this bug. I will dig into it as much as i can.
One hacky fix: diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index a6d46d7..5f7877d 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -431,7 +431,11 @@ package_install_internal_rpm () { fi - cat ${target_rootfs}/install/install_solution.manifest > ${target_rootfs}/install/total_solution.manifest + in=${target_rootfs}/install/install_solution.manifest + out=${target_rootfs}/install/total_solution.manifest + cat $in | grep /base-passwd-[0-9] > $out + cat $in | grep /shadow-[0-9] >> $out + cat $in | grep -v /shadow-[0-9] | grep -v /base-passwd-[0-9] >> $out cat ${target_rootfs}/install/install_multilib_solution.manifest >> ${target_rootfs}/install/total_solution.manifest # Construct install scriptlet wrapper
I'm currently testing a variation on Richard's fix for this.
Fixed in oe-core and poky master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c65d82a88ad8dbd27287e94fb62b98017941fb91
*** Bug 1889 has been marked as a duplicate of this bug. ***