From: venkata pyla <[email protected]> E2FSPROGS_FAKE_TIME: sets fixed times for the inodes in the file system. hash_seed: creates reproducible directory indexes in the file system.
Reference commit in e2fsprogs: e1f7100643a46456be107b33098f6034b0835e6d Signed-off-by: venkata pyla <[email protected]> --- scripts/lib/wic/partition.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index b1a2306dd1..8e2273ca2f 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py @@ -284,6 +284,17 @@ class Partition(): extraopts = self.mkfs_extraopts or "-F -i 8192" + if os.getenv('SOURCE_DATE_EPOCH'): + sde_time = int(os.getenv('SOURCE_DATE_EPOCH')) + pseudo = "export E2FSPROGS_FAKE_TIME=%s;%s" % (sde_time, pseudo) + + # Set hash_seed to generate deterministic directory indexes + namespace = uuid.UUID("e7429877-e7b3-4a68-a5c9-2f2fdf33d460") + if self.fsuuid: + namespace = uuid.UUID(self.fsuuid) + hash_seed = str(uuid.uuid5(namespace, str(sde_time))) + extraopts += " -E hash_seed=%s" % hash_seed + label_str = "" if self.label: label_str = "-L %s" % self.label -- 2.20.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192192): https://lists.openembedded.org/g/openembedded-core/message/192192 Mute This Topic: https://lists.openembedded.org/mt/103129684/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
