Commit Graph

8 Commits

Author SHA1 Message Date
Chen Qi fc9f1c8168 runqemu-extract-sdk: add --numeric-owner option to tar command
If the same username exists on both target and the build host, but
the uids differ, and we start target via NFS, then the uid for the
user will be incorrect on target.

For example, if postfix's uid on host is 119 and on target is 1024,
then if we start target via NFS, the uid for postfix will be 119.

The root cause is that when we use runqemu-extract-sdk to generate
the NFS rootfs for later use, the tar command will respect the username
instead of uid. So if PSEUDO_PASSWD environment is not set correctly,
the host /etc/passwd will be used, resulting in wrong uids.

The situation for gid is completely analogous to that of uid.

It's almost impossible for the runqemu-extract-sdk to guess the correct
location of the needed password file merely based on the target tarball
name.

This patch solves this problem by adding the '--numeric-owner' option
to the tar command so that the uid/gid will be used when extracting the
tarball using runqemu-extract-sdk. In this situation, we'll always get
the correct uid/gid after extracting the tarball.

[YOCTO #5364]

(From OE-Core master rev: acce6ff1a77cfd29e3868faa89b120becb58bbbf)

(From OE-Core rev: c2baac739a521d1edd408a24f6b1fece8f755218)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 17:00:02 +00:00
Peter Seebach 92e40ec859 runqemu-export-rootfs and friends: don't put pseudo db in target fs
In a few places, we have scripts which use <rootfs>/var/pseudo for
the pseudo state directory controlling a given filesystem. This
seems possibly risky because it means that stuff running under
qemu or whatnot could wipe out the data being used to handle that
rootfs. Move this to:
  <rootfs>/../$(basename_rootfs).pseudo_state
to avoid problems.

This also solves at least one case (not directly hit by yocto's
tree) wherein you could end up trying to remove a rootfs while
pseudo was using a database inside that rootfs, and thus the
remove would fail.

(From OE-Core rev: aa5d6bd006d3b4eede21d8987451876ed3385ab8)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-29 16:02:10 -07:00
Richard Purdie d1a84c9f3d scripts: Show sensible warning messages if expected binaries don't exist
[YOCTO #1438]

(From OE-Core rev: 6b5706d1f9ce7a3fd4d8f819ff8f3fd789665647)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-02 14:21:30 +01:00
Richard Purdie 37ac9a0823 scripts/oe-setup-builddir: Fix up OE-Core/Poky mismatch for now (and fix permissions)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 19:19:33 +01:00
Richard Purdie 65f4b65410 Further cleanup of various poky references
(From OE-Core rev: fe73ea8c510877fe4e3c117985e8f3d0b79ddf1b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 12:56:16 +01:00
Richard Purdie 6b46c2aa94 runqemu-extra-sdk: Update function usage to clearly reflect its meaning
(From OE-Core rev: 04c1d218ffb775d25c0eaefa3558bab250bb3b4b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 12:56:11 +01:00
Richard Purdie 01f83c9e09 Rename ~/.poky-sdk/ temp workdir to ~/.runqemu-sdk/
(From OE-Core rev: 69a0bfb8d7203db1c477dc28974287fda35d1a50)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 12:56:10 +01:00
Richard Purdie 2c2e61743c Rename the remaining poky-* scripts to oe-* or runqemu-*
(From OE-Core rev: 877b3d84597fcfc3abf5aa332019d412f2717896)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 00:29:31 +01:00