summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter A. Bigot <pab@pabigot.com>2014-11-15 13:53:54 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-31 10:18:51 +0000
commite7d461a473f2f0df2e0a7e228aa93de423d002f6 (patch)
treedd466c7a705ec479069df755bcfcb66a38e000ac
parent358794f2fb9351a66eabed67a58a1e9f7711da40 (diff)
downloadpoky-e7d461a473f2f0df2e0a7e228aa93de423d002f6.tar.gz
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. (From OE-Core rev: ec3417ad825c52f5137d38b91d8fcb4637a50f4c) (From OE-Core rev: 0b7e70aafdee68825f3c65bae89bde3e03a20de8) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/useradd.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 3b70e80b2f..0b9a843b24 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -24,6 +24,8 @@ if test "x$D" != "x"; then
24 # Installing into a sysroot 24 # Installing into a sysroot
25 SYSROOT="$D" 25 SYSROOT="$D"
26 OPT="--root $D" 26 OPT="--root $D"
27 # user/group lookups should match useradd/groupadd --root
28 export PSEUDO_PASSWD="$SYSROOT:${STAGING_DIR_NATIVE}"
27fi 29fi
28 30
29# If we're not doing a special SSTATE/SYSROOT install 31# If we're not doing a special SSTATE/SYSROOT install