]> code.ossystems Code Review - openembedded-core.git/commitdiff
useradd.bbclass: set PSEUDO_PASSWD consistent with root directory
authorPeter A. Bigot <pab@pabigot.com>
Sat, 15 Nov 2014 19:53:54 +0000 (13:53 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 31 Dec 2014 10:17:31 +0000 (10:17 +0000)
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.

(From OE-Core rev: ec3417ad825c52f5137d38b91d8fcb4637a50f4c)

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/classes/useradd.bbclass

index 3b70e80b2fe96bfbfc1e09f2cf6a5cb1d215b5c1..0b9a843b24922d35b63f256fef1d2e91d0bd8d34 100644 (file)
@@ -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