Bug 8759 - useradd recipes don't re-create accounts in sysroot after base-passwd rebuilds
Summary: useradd recipes don't re-create accounts in sysroot after base-passwd rebuilds
Status: RESOLVED DUPLICATE of bug 7724
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-12-03 21:58 UTC by Haris Okanovic
Modified: 2015-12-08 23:35 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Haris Okanovic 2015-12-03 21:58:05 UTC
Recipes using useradd.bbclass to create new user and group accounts in
STAGING_DIR_TARGET (the target sysroot) don't re-create their accounts
when they rebuild after a clean base-passwd rebuild. A rebuild of
base-passwd resets /etc/passwd and /etc/group in the sysroot, but
bitbake doesn't seem to propagate this change up to dependent recipes
like cronie, which adds more accounts to these files. So if cronie
rebuilds after a clean base-passwd build, the sysroot isn't updated with
cronie accounts.

This can fail other downstream recipes which expect cronie's crontab
group to be there by depending on cronie.

Reproduction steps, MACHINE=x64:

bitbake base-passwd cronie
grep crontab tmp-glibc/sysroots/x64/etc/group   --> contains a crontab group, as expected
bitbake -c cleanall base-passwd
bitbake base-passwd
grep crontab tmp-glibc/sysroots/x64/etc/group   --> missing crontab group, as expected
bitbake cronie
grep crontab tmp-glibc/sysroots/x64/etc/group   --> still missing crontab group

Workaround:

bitbake -c cleanall cronie
bitbake cronie
grep crontab tmp-glibc/sysroots/x64/etc/group   --> crontab group is back

The difference between the second and third builds of cronie appears to
be an sstate-cache hit, which doesn't update the sysroot with cronie
accounts.
Comment 1 Haris Okanovic 2015-12-08 23:35:02 UTC
This is a dup of Yocto bug 7724. It's almost the same reproduction case as well, but uses contrived recipes instead of cronie.

*** This bug has been marked as a duplicate of bug 7724 ***