]> code.ossystems Code Review - openembedded-core.git/commit
wic: Fix permissions when using exclude or include path
authorRicardo Ribalda Delgado <ricardo@ribalda.com>
Wed, 4 Mar 2020 14:49:35 +0000 (15:49 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 6 Apr 2020 13:25:55 +0000 (14:25 +0100)
commit36993eea89d1c011397b7692b9b8d61b499d0171
treefbe1761b3a99b45ff2eb6b29a76dc83ceca6a137
parentbc895522eb940539a0e3cb6192c4a64f13ca8d6a
wic: Fix permissions when using exclude or include path

When parameters include_path or exclude_path are passed to the rootfs
plugin, it will copy the partition content into a folder and make all
the modifications there.

This is done using copyhardlinktree(), which does not take into
consideration the content of the pseudo folder, which contains the
information about the right permissions and ownership of the folders.

This results in a rootfs owned by the user that is running the wic
command (usually UID 1000), which makes some rootfs unbootable.

To fix this we copy the content of the pseudo folders to the new folder
and modify the pseudo database using the "pseudo -B" command.

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/plugins/source/rootfs.py