From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7309488335508996096 X-Received: by 2002:a17:90a:c706:b0:286:6ed8:2384 with SMTP id o6-20020a17090ac70600b002866ed82384mr724928pjt.30.1701872873941; Wed, 06 Dec 2023 06:27:53 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90b:3944:b0:285:93e9:eaaf with SMTP id oe4-20020a17090b394400b0028593e9eaafls6062255pjb.0.-pod-prod-03-us; Wed, 06 Dec 2023 06:27:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHh1Xyv0MjG/1tiCBFJEW2LwaHgi+zUkCFaCNFfkNBiqS8NfKIluA7NoCXxrayPT3HY8GLN X-Received: by 2002:a17:90b:1b4d:b0:286:d6fb:3d4f with SMTP id nv13-20020a17090b1b4d00b00286d6fb3d4fmr1026824pjb.24.1701872872306; Wed, 06 Dec 2023 06:27:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701872872; cv=none; d=google.com; s=arc-20160816; b=hsFJ5OEmo5mRrpEAkPYa2U0GlY7WQ7KnwxY8n5Hi02JRom1Qk8TvQkZN4JrUMXrG1R X5WIbwrYKms7Xb54QFJSUMgFnxaulRRIalzyzDOPA/4b80w8lIK+4aTmnV4AfpZaY5ZI axmpoafdhJjFXKL5uJf9z/twVW6bNqQDlYEoFw1KLRnba1vg9QhVQ2iifj6nWMckqcLk RmrnfyAddM2k3huuA1KUISjlAiP7S72xFPAqKGOaIgXI+74j5qgskaOsHANdukHLOFli uzktA1Vq0EqWGo1Z+GfLW2gHegNbLkT27YE/fv9X5qqdUjNdt+tSnBwYGI9/MfndDiiQ LFTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=C6fcXibJp4o/YFalxK5zaG1+0774IuW3OgOU9p7ZtGY=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=lFMP+McN7cE3owQ9/reooJI1Q4UAuBJb/SmL2ouHCmH0Kdv9cHTjiUe81R824Uiuz0 Bf2f0Gr6/7t+cz+ogmEs0RfIlqr9NSdMYeAsVnKhYEb5SucQTEkP+HBYwr+RSX78Bt/X IexsUe+GLwKE3c1qEz3I9XcgmYiRyk0qcElhubjvrznr2cd2TWKgDRdxAqsPl6jvMjMF Mr/vAVeRKUyCE0BK7TgCVS7gimqO0OqF8GckS+FitM8MDnMc+Icg29aKL5x7NFABqg2r tJzlePVmbi6FtPFzrW9MWUbCOd2RhPFTCr1TSfKsoYMcm91olTQR9Blwdnm042T8+5hQ O4ow== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.134 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Return-Path: Received: from mo-csw.securemx.jp (mo-csw1800.securemx.jp. [210.130.202.134]) by gmr-mx.google.com with ESMTPS id w3-20020a17090aad4300b00288620290d8si96341pjv.1.2023.12.06.06.27.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 06:27:52 -0800 (PST) Received-SPF: pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.134 as permitted sender) client-ip=210.130.202.134; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.134 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Received: by mo-csw.securemx.jp (mx-mo-csw1800) id 3B6ERojQ857704; Wed, 6 Dec 2023 23:27:50 +0900 X-Iguazu-Qid: 2yAbcQjG76UYV6vqWu X-Iguazu-QSIG: v=2; s=0; t=1701872870; q=2yAbcQjG76UYV6vqWu; m=++rTOmTvFgemK+rakiTM0VKqaspgx/13AkWlIVuB4Rc= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1800) id 3B6ERnk13316100 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 6 Dec 2023 23:27:49 +0900 From: venkata.pyla@toshiba-tsip.com To: isar-users@googlegroups.com Cc: venkata pyla , jan.kiszka@siemens.com, kazuhiro3.hayashi@toshiba.co.jp, dinesh.kumar@toshiba-tsip.com, felix.moessbauer@siemens.com Subject: [PATCH] wic:rootfs-u-boot.py: Set timestamps for newly updated files Date: Wed, 6 Dec 2023 19:57:47 +0530 X-TSB-HOP2: ON Message-Id: <20231206142747.14117-1-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 06 Dec 2023 14:27:47.0640 (UTC) FILETIME=[62879B80:01DA2850] X-TUID: 8tilgl4lJZQz From: venkata pyla The u-boot rootfs image is not reproducible because the `update-u-boot-script` is creating new files with build timestamps, whereas the rootfs files timestamps are set to SOURCE_DATE_EPOCH during do_rootfs_finalize task and so for set the timestamps for the newly updated files. Signed-off-by: venkata pyla --- meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py b/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py index 93600dc2..b7011775 100644 --- a/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py +++ b/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py @@ -106,6 +106,15 @@ class RootfsUBootPlugin(RootfsPlugin): rm_cmd = "rm -f %s/usr/bin/%s" % (real_rootfs_dir, qemu_static) exec_cmd(rm_cmd) + # For reproducibility set the time stamp of newly updated files + if os.getenv('SOURCE_DATE_EPOCH'): + sde_time = int(os.getenv('SOURCE_DATE_EPOCH')) + os.utime(u_boot_script, (sde_time, sde_time)) + os.utime(os.path.join(real_rootfs_dir, "boot/boot.scr"), + (sde_time, sde_time)) + os.utime(os.path.join(real_rootfs_dir, "tmp"), + (sde_time, sde_time)) + RootfsPlugin.do_prepare_partition(part, source_params, cr, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, krootfs_dir, native_sysroot) -- 2.20.1