Bug 555 - After untar sdk tarball to /opt/poky, My root folder's user info is changed!
Summary: After untar sdk tarball to /opt/poky, My root folder's user info is changed!
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.0
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.0 M3
Assignee: Dexuan Cui
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-11-30 19:19 UTC by liping Ke
Modified: 2011-02-16 21:28 UTC (History)
10 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified: Program Management
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description liping Ke 2010-11-30 19:19:01 UTC
Hi, 
Today when seeking help about some privilege problems, we suddenly found that after untar our sdk tarball, the user/group information of /opt/poky is strange. Since it is untar to /, I need to sudo. But after untar, from my / folder to all subdirectories in /opt/poky/xxx, it is all 1003/users. And under /, there is ./ and ../ which should not be there.
It is very strange. According to Qing and dongxiao's test, even if we use fake root to tar, when untar, the group/user attribute should be the same as the untar user instead of changing the owner to 1003. 
Qing said that when tar, "./" should not be included into the directory. I am not very sure about details. So cc Qing.

Thanks& Regards,
criping
Comment 1 Qing He 2010-11-30 19:31:34 UTC
(In reply to comment #0)
> Hi, 
> Today when seeking help about some privilege problems, we suddenly found that
> after untar our sdk tarball, the user/group information of /opt/poky is
> strange. Since it is untar to /, I need to sudo. But after untar, from my /
> folder to all subdirectories in /opt/poky/xxx, it is all 1003/users. And under
> /, there is ./ and ../ which should not be there.
> It is very strange. According to Qing and dongxiao's test, even if we use fake
> root to tar, when untar, the group/user attribute should be the same as the
> untar user instead of changing the owner to 1003. 
> Qing said that when tar, "./" should not be included into the directory. I am
> not very sure about details. So cc Qing.

The tarball looks like:
$ tar -jvtf ***.tar.bz2
drw-rw-rw- pokybuild/user 0 2010-11-30 00:00 ./
drw-rw-rw- pokybuild/user 0 2010-11-30 00:00 ./opt/poky
...

so there are possibly two issues:
1. the owner should be root/root? When ${FAKEROOT} is fakeroot, this is fine, but when ${FAKEROOT} is pseudo, it needs to take state into consideration.
2. "./" will override the ownership of $PWD when untar as root, this is most of the time undesirable.
Comment 2 liping Ke 2011-02-15 00:19:35 UTC
I verified this bug has been fixed before the 1.0 release. The changeset is commit: 92a9d59fccdfb, Mark Hatle, Feb 9
Comment 3 Dexuan Cui 2011-02-15 02:22:35 UTC
(In reply to comment #2)
> I verified this bug has been fixed before the 1.0 release. The changeset is
> commit: 92a9d59fccdfb, Mark Hatle, Feb 9

I think the following commits fixed the bug:

commit 87a258fe5cbfa2f678a1a569f703d6a4aeb21dd8
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Wed Jan 26 10:03:27 2011 +0000

    meta-toolchain: Use --owner and --group options instead of using pseudo's overhead for a simple task

    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>



commit 8ae1f88214acf8f44073f2e499bef59e9433fdfd
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Wed Jan 26 12:23:10 2011 +0000

    meta-toolchain: Fix tar command

    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>


Liping, since you're the report, can you please VERIFY the bug?
Comment 4 liping Ke 2011-02-15 06:12:17 UTC
Hi, Dexuan

Please see my comments above you. Actually I have verified but I did not change the status to verified. So I will change the status to verified now.

Thanks a lot!
criping
Comment 5 Dexuan Cui 2011-02-15 17:16:11 UTC
(In reply to comment #4)
> Hi, Dexuan
> Please see my comments above you. Actually I have verified but I did not change
> the status to verified. So I will change the status to verified now.
> Thanks a lot!
> criping

OK, let's mark the bug VERIFIED.