From patchwork Wed Dec 6 14:27:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: venkata.pyla@toshiba-tsip.com X-Patchwork-Id: 3226 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 06 Dec 2023 15:28:01 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pj1-f57.google.com (mail-pj1-f57.google.com [209.85.216.57]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 3B6ERxX5025195 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 6 Dec 2023 15:28:00 +0100 Received: by mail-pj1-f57.google.com with SMTP id 98e67ed59e1d1-2868fb54e3esf4581528a91.3 for ; Wed, 06 Dec 2023 06:28:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701872874; cv=pass; d=google.com; s=arc-20160816; b=ZgWTwr+i0OSSy5hc2h+LTESAJ7sUcSvwbVBJ2hvxZf+y/W2p84yBLmntBSfspTVNtD xNPcl/ZGhuGHVWqHWJQgkSr0CIawA+OIoPUsBJRFglQi9fP9QZVWZAP1E5ZiAHJeD2CE P17p+joYDxpUrAhq7pFgXBlNmepQlkZl8oEQLuMO8Sw9JZJW2jfK0dZypj2O3XE4WBLO xUt88vEyHqXHPH6lFsZK15bCbignyD4rgw4wDXg+rYYNaYd09KH+57cU6eIzz6kZ5BGX FeDvYLQVisCgzh6nfj9ggyUmuiIiqX7Aa4///dVOajkxLg8lgweyfEQQRPxWqyjBc+10 NhiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=0XTSY9pasJV2GuO+begjyoTf0q7VTC5FrYf8mVmmAo0=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=n43dNPVN2m4YbMsILYBCjgTT3wA1zeLRjEx7lSnXXpH1PeEV8f8cjbWdLD7gu90+Um zbRtY7iwv0Uu5tD6O4Gy6REPNmml8jbzyr/ZGt/KQJgBvtKwJBtlSjgpDj3l86XGw21b 4SWBA6VnTw9KCX/TRQ04zT7RWbXcHr4cFUx/UOoluGwO0WBKlchnJjEsO3Tzab2sPC/R f1gSfhiaP5TJlitoT8L0mh1vykEbZOsLe4p44HZ+5HVODO/1Zl3jnLwzCr+fW7MovNbH 8NV8eL++YyzA2CfAtS5kjUrVWMhxhpNuDQ040c/7XUIzq+NSlPhEPRgSsJ6sn/0aPCUU PDLA== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1701872874; x=1702477674; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=0XTSY9pasJV2GuO+begjyoTf0q7VTC5FrYf8mVmmAo0=; b=jwOmhJqgErg4JpDhaIFoS7h9T8pampyZ2Lf2lMRKwOkaHNunOep8IWV9n7UdMX9diz zkodO77wWN2JaZj685QyuNIyL3T0jUm9El9JUulxMQDwAgpAJFjufvtqsVc/eGfpjOJA 0PksFeu7F0GYQaWz6FjDeXmJVjp/c6rNu8oDqcpk77DOeeCVtyqD0X3jP6Z6wkm8mhJ+ hEnthnKQdqWEH8TPjtH3K8C5pmUYO4595/X6SAT/QRPBR5hCs+p4UTL3tsca/tKQxjsF xTVBfTJSwG7qhm9vo7KFF1GTLPFVK3EL4+tvkxfN2HgIcl5FggY9osbKCOVmAaoHIZ1q /g2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701872874; x=1702477674; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=0XTSY9pasJV2GuO+begjyoTf0q7VTC5FrYf8mVmmAo0=; b=THOU+e6mUBxphq/HZFlx/MgMmirRX71ylQFOfmJSqiRfbeMJl0QoxompP6+SM1KC+G Ozsk+MXwvRThR6hTGfdU3mV2BfSxudvbDkRArSJVGOZghnDTlT8wm/MXRvlzM4zleCsj AOqT6/68EPMNtLSvSqOUL8GCw42LsqkkfFZoZPNItxkAHfgXA63QpxZL1RgCNUSMSMHu 15aZZOJBzuT7qqOdwnI0yje5cfScc3GLKbavualaPyWLlVI08R0eyuZ7JWIZ4yZoNUn0 FN97KVpahvnhtIaEwcRBndkCHQRO5d/U9xmY8af78qtsMI6cETwqeS9C3hqYs2fYnUfw nb6A== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOJu0YxCWPdKtGlKLAqlz7Wa/2QLqg6G14mDLYegP+QW03tIY8XS5WTw dYsT2hFoidLlgzvXFS+R048= X-Google-Smtp-Source: AGHT+IEq2Ycxplx+onMwEnm+NLVgpJNEi6XNziPce3dPkG61M94gPN0DSm2zth3Ys8A2GalKlg5U9A== X-Received: by 2002:a17:90b:3143:b0:286:c161:3b1 with SMTP id ip3-20020a17090b314300b00286c16103b1mr937484pjb.30.1701872873846; 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-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 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; 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 X-OriginalArrivalTime: 06 Dec 2023 14:27:47.0640 (UTC) FILETIME=[62879B80:01DA2850] X-Original-Sender: venkata.pyla@toshiba-tsip.com X-Original-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 Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= 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)