Bug 12412 - WIC: rootfs wrong file ownership on rocko branch
Summary: WIC: rootfs wrong file ownership on rocko branch
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-12-10 15:14 UTC by Andrej Rode
Modified: 2021-06-17 15:16 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
Patch reverting commit (2.75 KB, patch)
2017-12-10 15:14 UTC, Andrej Rode
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Rode 2017-12-10 15:14:45 UTC
Created attachment 4154 [details]
Patch reverting commit

Using the `wic` tool to create a rootfs results in all files owned by the unprivileged build user. 

Reverting commit 92e1c7d47e695eb4ce1a863cd0f6c49dca1c2339 fixes this behaviour. 

I think this might be due to `pseudo` not matching on permissions it has to apply to the files? Unfortunately I have no real in-depth experience, but reverting this commit at least fixes image creation on my side.
Comment 1 Stephano Cetola 2017-12-13 16:24:39 UTC
https://patchwork.openembedded.org/patch/146571/
Comment 2 Stephano Cetola 2017-12-13 22:38:32 UTC
Could you provide the exact wic command that you are running. I'd like to be sure that I'm reproducing the same problem that you are seeing.
Comment 3 Andrej Rode 2018-01-05 18:40:54 UTC
Will test the patch when I'm back at my system next week. Will close the bug if it is fixed. 

The command I'm running: `wic create ../meta-foo/contrib/wks/sdimage-16G.wks  -e foo-image -o images/$MACHINE`.
Comment 4 Stephano Cetola 2018-01-08 18:11:15 UTC
Thank you for testing Andrej. I do not believe the patch fixes this issue, but let me know your results. If it doesn't fix your issue I will reassign this to someone for a fix.
Comment 5 Andrej Rode 2018-01-15 22:45:12 UTC
Testing with commit 78f29a052477dd81f0819287e3db405932bb7fae results in getting a non-root owned FS again.
What's strange: all Folders are owned by the non-privileged user. Files are owned by root.
Comment 6 Andrej Rode 2018-01-16 00:11:12 UTC
(In reply to comment #5)
> Testing with commit 78f29a052477dd81f0819287e3db405932bb7fae results in
> getting a non-root owned FS again.
> What's strange: all Folders are owned by the non-privileged user. Files are
> owned by root.

The patch i posted still applies and works around the issue.
Comment 7 Stephano Cetola 2018-01-29 20:06:11 UTC
I see that reverting 92e1c7d47e695eb4ce1a863cd0f6c49dca1c2339 does fix the issue, but it also breaks parallel do_image_wic calls. I'd like to find a solution to both issues so I am putting this back into design and pushing off till M3.
Comment 8 Oleksandr Kravchuk 2019-06-12 23:20:12 UTC
rocko is not supported anymore. Should this issue be closed?
Comment 9 Randy MacLeod 2021-06-17 15:16:28 UTC
Much has change so re-open if you can reproduce with oe-core/master.