From: Peter A. Bigot Date: Sat, 15 Nov 2014 19:53:54 +0000 (-0600) Subject: useradd.bbclass: set PSEUDO_PASSWD consistent with root directory X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~31972 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec3417ad825c52f5137d38b91d8fcb4637a50f4c;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git useradd.bbclass: set PSEUDO_PASSWD consistent with root directory When installing into a sysroot this class examines $D/etc/passwd for content, then invokes useradd to make changes. Under pseudo useradd attempts to look up user information in directories specified by $PSEUDO_PASSWD. For opkg multilib installs $D is not always the same as $IMAGE_ROOT, and the user might already be in the IMAGE_ROOT files, causing a failure during rootfs population. Fix this by ensuring the files pseudo looks at when doing useradd stuff are the same ones that useradd.bbclass will be manipulating. Signed-off-by: Peter A. Bigot --- diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index 3b70e80b2fe..0b9a843b249 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass @@ -24,6 +24,8 @@ if test "x$D" != "x"; then # Installing into a sysroot SYSROOT="$D" OPT="--root $D" + # user/group lookups should match useradd/groupadd --root + export PSEUDO_PASSWD="$SYSROOT:${STAGING_DIR_NATIVE}" fi # If we're not doing a special SSTATE/SYSROOT install