Problem Description -------------------- Under the following circumstances will the problem appear: 1. The same user name exists both on target and on the build host, but the uids/gids are different. For example, there's a user named postfix, its UID on host is 119 and on target is 1024. 2. The target is started with NFS. That means we're using runqemu-extract-sdk to extract the rootfs tarball. If the above two conditions are satisfied, the uid/gid would be incorrect on target. In the above example, the uid for postfix on target (if started via NFS) will be 119 instead of 1024. Root Cause ---------- The tar command will respect the username/groupname when extracting a tarball. So when we're using runqemu-extract-sdk, the uid/gid will be changed to the host ones. Solution -------- 1. Set a correct value for PSEUDO_PASSEWD environment variable and export it in the runqemu-extract-sdk script. However, this solution is not possible as we can't guess the correct rootfs directory merely based on the image tarball name. 2. When creating the rootfs tarball, use --numeric-owner option to the tar command in image_types.bbclass. In this case, the username/groupname will not be recorded in the tarball. As our task is to build an image, we should have used this option. Because, in our image, we have our own passwd and group file. //Chen Qi
Branch: master Commit: acce6ff1a77cfd29e3868faa89b120becb58bbbf URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=acce6ff1a77cfd29e3868faa89b120becb58bbbf //Chen Qi