Bug 11489

Summary: postinst-useradd uses the abs path of pseudo which is encoded in sstate
Product: [Build System, Metadata & Runtime] OE-Core Reporter: brian avery <brian.avery>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: Undecided CC: jose.perez.carranza, joshuagloe, meta.mr.watcher, meta.watcher
Version: 2.4   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on:    
Bug Blocks: 11497    

Description brian avery 2017-05-10 01:12:22 UTC
The path to pseudo-native/usr/bin/pseudo used by useradd is populated from sstate. This means if the build dir is different from the build dir that was used to generate the sstate, the useradd command will fail. One place this happens is "$bitbake <image> -c populate_sdk_ext" . This tries to do a groupadd for dbus and fails. 

This bug is being opened by me for tracking/discussion, there is a patch already available that seems to fix it in my testing, from Peter Kjellerstedt .  His patch is https://patchwork.openembedded.org/series/6598/ .

His comments on the patch cover letter:
Similar to the problem with the hosttools directory and the state
cache that was recently fixed, there is another problem with the
sysroots-components directory. This only affects postinst-useradd
scripts, so in this case the fix can be activated from useradd.bbclass
rather than sstate.bbclass and thus affects a lot less recipes.
Comment 1 Jose Perez C 2017-05-10 17:35:34 UTC
Bug 11497 created to add a test case for this scenario
Comment 2 brian avery 2017-05-10 20:13:28 UTC
duplicate of Bug 11460

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