Skip to content

wic: updated fstab does not preserve metadata of the original file

[email protected] openembedded-core 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1wic: Content of the temporary updated fstab should be copied into the original not replacing it entirely.meta/conf/bitbake.conf scripts/lib/wic/partition.py scripts/lib/wic/plugins/source/rootfs.py+6 -172 replies
1/1Fstab: Fix xattrs not being maintained on fstab file when using wic fstab update funtionalitiesscripts/lib/wic/partition.py scripts/lib/wic/plugins/source/rootfs.py+5 -186 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] wic: updated fstab does not preserve metadata of the original file

From: Daniel Andrade <[email protected]>

Using install in the rootfs plugin forces fstab to be replaced entirely, meaning that even its Inodes will change, leading xattrs and SELinux context stored by pseudo not to be applied.
The fix just uses cp without preserving attributes from the temporary fstab since none of them are needed, just the content.
Same thing happens with the predefined mechanisms for ext4 and msdos. Using debugfs there is no way to replace contents while maintaining metadata, so the approach taken on the path was to remove the different fstab logic for those fstypes and also use the same modified cp command. Reviewing the builds I did it seems to work for all of the fstypes.

Another problem is that the timestamp applied to fstab is not the same as every other file. It seems like the SOURCE_DATE_EPOCH variable goes to the fallback timestamp (SOURCE_DATE_EPOCH_FALLBACK). Since you are using that variable everywhere, it is not the same value as REPRODUCIBLE_TIMESTAMP_ROOTFS under poky/meta/conf/bitbake.conf that is applied in every other file.

Daniel Andrade (1):
wic: Content of the temporary updated fstab should be copied into the
original not replacing it entirely.

 meta/conf/bitbake.conf                   |  4 +++-
 scripts/lib/wic/partition.py             | 15 +--------------
 scripts/lib/wic/plugins/source/rootfs.py |  4 ++--
 3 files changed, 6 insertions(+), 17 deletions(-)