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

10 views
Skip to first unread message

Felix Moessbauer

unread,
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)
--
2.30.2

Jan Kiszka

unread,
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.

Jan

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

Jan Kiszka

unread,
Apr 21, 2022, 10:42:51 AMApr 21
to Felix Moessbauer, isar-...@googlegroups.com, henning...@siemens.com, adriaan...@siemens.com
What's the status here? Asking as I see this patch more and more in
downstream layers, and it's needed there.

Jan

--
Siemens AG, Technology
Competence Center Embedded Linux

Moessbauer, Felix

unread,
Apr 21, 2022, 12:09:59 PMApr 21
to jan.k...@siemens.com, Schild, Henning, Schmidt, Adriaan, isar-...@googlegroups.com
> >> + "../pseudo")
> >> if not os.path.lexists(pseudo_dir):
> >> logger.warn("%s folder does not exist. "
> >> "Usernames and permissions will be invalid "
> >> % pseudo_dir)
> >>
> >
> > Upstream first: first OE, then Isar. At least submit to OE first. If
> > it's urgent, we can still decide to apply here earlier.
> >
>
> What's the status here? Asking as I see this patch more and more in downstream
> layers, and it's needed there.

Thanks for the hint. I just sent out the patch to oe-core. It's still valid and required.

Felix
Reply all
Reply to author
Forward
0 new messages