[PATCH v1 1/1] Fix permissions when splitting rootfs folders across partitions.

Skip to first unread message

Felix Moessbauer

Nov 3, 2021, 8:53:14 AM11/3/21
to isar-...@googlegroups.com, henning...@siemens.com, adriaan...@siemens.com, Felix Moessbauer
This patches ensures that the file database containing the file and
folder usernames and permissions is always located relative to the
source and not to the appended rootfs-dir.

Prior to this patch, the database was not found when using
-rootfs-dir in the WIC script, leading to erronous file
permissions and ownership.

Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
scripts/lib/wic/plugins/source/rootfs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index 96d940a..5ab771e 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -95,7 +95,7 @@ class RootfsPlugin(SourcePlugin):

part.rootfs_dir = cls.__get_rootfs_dir(rootfs_dir)
part.has_fstab = os.path.exists(os.path.join(part.rootfs_dir, "etc/fstab"))
- pseudo_dir = os.path.join(part.rootfs_dir, "../pseudo")
+ pseudo_dir = os.path.join(krootfs_dir['ROOTFS_DIR'], "../pseudo")
if not os.path.lexists(pseudo_dir):
logger.warn("%s folder does not exist. "
"Usernames and permissions will be invalid " % pseudo_dir)

Jan Kiszka

Nov 3, 2021, 9:26:07 AM11/3/21
to Felix Moessbauer, isar-...@googlegroups.com, henning...@siemens.com, adriaan...@siemens.com
Upstream first: first OE, then Isar. At least submit to OE first. If
it's urgent, we can still decide to apply here earlier.


Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
Reply all
Reply to author
0 new messages