From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7342481464494129152 X-Received: by 2002:a05:6a20:8e28:b0:1a1:2d03:f651 with SMTP id y40-20020a056a208e2800b001a12d03f651mr4108161pzj.21.1709705645914; Tue, 05 Mar 2024 22:14:05 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:d812:b0:29b:5c2e:d673 with SMTP id a18-20020a17090ad81200b0029b5c2ed673ls892384pjv.2.-pod-prod-01-us; Tue, 05 Mar 2024 22:14:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IEU76FoioZtsXTVlvA9nnra6XLDnR5czrqyqH0hQUtXyaDIChPQRydMYmrH7mLTofLatMmC X-Received: by 2002:a17:90a:5986:b0:29a:e05f:3f55 with SMTP id l6-20020a17090a598600b0029ae05f3f55mr10969043pji.2.1709705644824; Tue, 05 Mar 2024 22:14:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709705644; cv=none; d=google.com; s=arc-20160816; b=UQSTweN3BDx5krvxCThWTqwanv4HH3N8YX82Tg02kq0xORedmfIY/bunmrt4XOK07s FfuHJ3vt2MR4KFCBvb04G7yytrsYAH+bMBSNveEIWhWwvt0mmzEdcGbc8p8Mh4IykWGm fhCvvL/hdS9ImdzhWHW9TdxiN54dE55NHpFkT+DkDHr1i82vIPBwUiXVQ/M2TwWNJGvx bD4RvB5Ao4EmQakTHQ7HoNqDgjR+A3A2/+f7DlhkfArpABAAtqWqtEbPiNlbUwoMvUqo LivtotfjGzFZahRgi37h+draL0MHh5A1exlDvsAkiaz/UFx1oHbt8NtPrsdh9SpKhwmK QOsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=U6g6rl1zNzW96g9COv0nxqL+Y8QlBvkuqYhnx9corzo=; fh=K/mZt3pelG5XhoKo7NmnVKDkBr0U6QSPt5Hs4miWPTI=; b=biBg6BlRssR9F5q7GZzSgABzuT7aDa3ziixRCaxSg1oiF/rguJgy38uLtKaFOLz3rN zFjdbMJVbHacNtfp427Ec/IqPme62sIa1r81f8UPJ58jeaMbf5llzFyR01IfXCzpYEDj Rq1cTmQW0P+0jtTPOXSVqplDEcFVO+Cb9/9Qp2yNsJxHT3HCUQ0y6xA0choJ9gp918uV 5zmmP0YtNp7znKyYehN51jqj3bqceaRW5Hxm0s11ivGuQykN5keIHW+GBxX1kreQ2+Vv 17TGKTInuigqg8MhvlSzcYcsaDGwHWnfSKXkfERp1bedWl+UgCFkCVKDKb9n/bRWGvLF ah6g==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of adithya.balakumar@toshiba-tsip.com designates 210.130.202.152 as permitted sender) smtp.mailfrom=Adithya.Balakumar@toshiba-tsip.com Return-Path: Received: from mo-csw.securemx.jp (mo-csw1802.securemx.jp. [210.130.202.152]) by gmr-mx.google.com with ESMTPS id z12-20020a17090ad78c00b0029b6fea28absi165518pju.3.2024.03.05.22.14.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 22:14:04 -0800 (PST) Received-SPF: pass (google.com: domain of adithya.balakumar@toshiba-tsip.com designates 210.130.202.152 as permitted sender) client-ip=210.130.202.152; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of adithya.balakumar@toshiba-tsip.com designates 210.130.202.152 as permitted sender) smtp.mailfrom=Adithya.Balakumar@toshiba-tsip.com Received: by mo-csw.securemx.jp (mx-mo-csw1802) id 4266E2NF3344049; Wed, 6 Mar 2024 15:14:02 +0900 X-Iguazu-Qid: 2yAaJS4woLWolvstyV X-Iguazu-QSIG: v=2; s=0; t=1709705642; q=2yAaJS4woLWolvstyV; m=8VO2zfB7xywEMe0WJKCA9MHxxjMQQr/95rs0oFYOsVQ= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1801) id 4266E1LO2762549 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 6 Mar 2024 15:14:02 +0900 From: Adithya Balakumar To: isar-users@googlegroups.com, amikan@ilbers.de Cc: kazuhiro3.hayashi@toshiba.co.jp, dinesh.kumar@toshiba-tsip.com, shivanand.kunijadar@toshiba-tsip.com, sai.sathujoda@toshiba-tsip.com, adithya.balakumar@toshiba-tsip.com Subject: [PATCH v2 1/2] isar-bootstrap.inc: Export SOURCE_DATE_EPOCH variable Date: Wed, 6 Mar 2024 11:44:22 +0530 X-TSB-HOP2: ON Message-Id: <20240306061423.1088541-2-Adithya.Balakumar@toshiba-tsip.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240306061423.1088541-1-Adithya.Balakumar@toshiba-tsip.com> References: <20240306061423.1088541-1-Adithya.Balakumar@toshiba-tsip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 06 Mar 2024 06:13:58.0495 (UTC) FILETIME=[79C61EF0:01DA6F8D] X-TUID: d5eDN6anc8D0 The third field in the /etc/shadow file (sp_lstchg) contains the date of the last password change expressed as the number of days since Jan 1, 1970. The sp_lstchg value changes when the images are built on different days making the image not reproducible. Exporting the SOURCE_DATE_EPOCH variable ensures that sp_lstchg value is set with respect to the SOURCE_DATE_EPOCH value while debootstrap creates the minimal rootfile system. Signed-off-by: Adithya Balakumar --- meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index 3477c2fb..b1fcd7b0 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -292,6 +292,10 @@ do_bootstrap() { sudo rm -rf --one-file-system "${ROOTFSDIR}" deb_dl_dir_import "${ROOTFSDIR}" "${BOOTSTRAP_BASE_DISTRO}-${BASE_DISTRO_CODENAME}" + if [ -n "${SOURCE_DATE_EPOCH}" ]; then + export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH}" + fi + sudo -E -s <<'EOSUDO' set -e if [ "${BOOTSTRAP_FOR_HOST}" = "0" ]; then -- 2.39.2