* [PATCH v3 1/1] wic: Update to the latest revision of wic in scarthgap
2024-07-16 11:29 [PATCH v3 0/1] Update to the latest revision of wic in scarthgap Adithya Balakumar
@ 2024-07-16 11:29 ` Adithya Balakumar
2024-07-23 7:39 ` [PATCH v3 0/1] " Uladzimir Bely
1 sibling, 0 replies; 3+ messages in thread
From: Adithya Balakumar @ 2024-07-16 11:29 UTC (permalink / raw)
To: isar-users, amikan
Cc: Adithya Balakumar, jan.kiszka, kazuhiro3.hayashi, dinesh.kumar,
shivanand.kunijadar, sai.sathujoda
From: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
Updates wic revision to a4e7334a4b87f1bb1947f6b10f71ddb445c91d0c
from the scarthgap branch of oe-core
This change sets hash_seed when deploying an empty ext partition.
Although this is handled for the rootfs plugin case, but its
missed when deploying an empty ext partition.
Signed-off-by: Adithya Balakumar <adithya.balakumar@toshiba-tsip.com>
---
scripts/lib/wic/partition.py | 37 ++++++++++++++++++++++--------------
1 file changed, 23 insertions(+), 14 deletions(-)
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 795707ec..bf2c34d5 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -284,19 +284,8 @@ class Partition():
extraopts = self.mkfs_extraopts or "-F -i 8192"
- if os.getenv('SOURCE_DATE_EPOCH'):
- sde_time = int(os.getenv('SOURCE_DATE_EPOCH'))
- if pseudo:
- pseudo = "export E2FSPROGS_FAKE_TIME=%s;%s " % (sde_time, pseudo)
- else:
- pseudo = "export E2FSPROGS_FAKE_TIME=%s; " % sde_time
-
- # 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
+ # use hash_seed to generate reproducible ext4 images
+ (extraopts, pseudo) = self.get_hash_seed_ext4(extraopts, pseudo)
label_str = ""
if self.label:
@@ -344,6 +333,23 @@ class Partition():
self.check_for_Y2038_problem(rootfs, native_sysroot)
+ def get_hash_seed_ext4(self, extraopts, pseudo):
+ if os.getenv('SOURCE_DATE_EPOCH'):
+ sde_time = int(os.getenv('SOURCE_DATE_EPOCH'))
+ if pseudo:
+ pseudo = "export E2FSPROGS_FAKE_TIME=%s;%s " % (sde_time, pseudo)
+ else:
+ pseudo = "export E2FSPROGS_FAKE_TIME=%s; " % sde_time
+
+ # 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
+
+ return (extraopts, pseudo)
+
def prepare_rootfs_btrfs(self, rootfs, cr_workdir, oe_builddir, rootfs_dir,
native_sysroot, pseudo):
"""
@@ -437,13 +443,16 @@ class Partition():
extraopts = self.mkfs_extraopts or "-i 8192"
+ # use hash_seed to generate reproducible ext4 images
+ (extraopts, pseudo) = self.get_hash_seed_ext4(extraopts, None)
+
label_str = ""
if self.label:
label_str = "-L %s" % self.label
mkfs_cmd = "mkfs.%s -F %s %s -U %s %s" % \
(self.fstype, extraopts, label_str, self.fsuuid, rootfs)
- exec_native_cmd(mkfs_cmd, native_sysroot)
+ exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
self.check_for_Y2038_problem(rootfs, native_sysroot)
--
2.39.2
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240716112959.2441845-2-Adithya.Balakumar%40toshiba-tsip.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3 0/1] Update to the latest revision of wic in scarthgap
2024-07-16 11:29 [PATCH v3 0/1] Update to the latest revision of wic in scarthgap Adithya Balakumar
2024-07-16 11:29 ` [PATCH v3 1/1] wic: " Adithya Balakumar
@ 2024-07-23 7:39 ` Uladzimir Bely
1 sibling, 0 replies; 3+ messages in thread
From: Uladzimir Bely @ 2024-07-23 7:39 UTC (permalink / raw)
To: Adithya Balakumar, isar-users, amikan
Cc: jan.kiszka, kazuhiro3.hayashi, dinesh.kumar, shivanand.kunijadar,
sai.sathujoda
On Tue, 2024-07-16 at 16:59 +0530, Adithya Balakumar wrote:
> This patch updates wic revision to
> a4e7334a4b87f1bb1947f6b10f71ddb445c91d0c
> from the scarthgap branch of oe-core
>
> This brings the change to set a hash_seed to generate deterministic
> directory
> indexes while deploying empty ext filesystems for reproducible
> builds.
>
> This patch is also shared with openembedded-core and accepted.
> master branch commit: 0202fb594fb05098cb8d8b6088e63beb40b5906e
> scarthgap branch commit: a4e7334a4b87f1bb1947f6b10f71ddb445c91d0c
>
> Changes since v2:
> Update commit message to reflect the commit id of the patch in the
> scarthgap
> branch of OE-core.
>
> Changes since v1:
> There is no change in the patch from v1. Just that this patch is also
> applied
> to the scarthgap branch in OE-core.
>
> Adithya Balakumar (1):
> wic: Update to the latest revision of wic in scarthgap
>
> scripts/lib/wic/partition.py | 37 ++++++++++++++++++++++------------
> --
> 1 file changed, 23 insertions(+), 14 deletions(-)
>
> --
> 2.39.2
>
>
Applied to next, thanks.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/4ad1093fcfadc6da8c7c438c585cedecf49df971.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 3+ messages in thread