Bug 11489 - postinst-useradd uses the abs path of pseudo which is encoded in sstate
Summary: postinst-useradd uses the abs path of pseudo which is encoded in sstate
Status: RESOLVED DUPLICATE of bug 11460
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 11497
  Show dependency tree
 
Reported: 2017-05-10 01:12 UTC by brian avery
Modified: 2017-05-10 20:13 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***