From patchwork Mon Jul 3 06:22:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Pyla X-Patchwork-Id: 13299607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50CA9C001DE for ; Mon, 3 Jul 2023 06:22:40 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.131]) by mx.groups.io with SMTP id smtpd.web11.21485.1688365357306510086 for ; Sun, 02 Jul 2023 23:22:38 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.131, mailfrom: venkata.pyla@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1120) id 3636MZd43084634; Mon, 3 Jul 2023 15:22:35 +0900 X-Iguazu-Qid: 2rWhDvohsD3xND92jp X-Iguazu-QSIG: v=2; s=0; t=1688365355; q=2rWhDvohsD3xND92jp; m=VlK4GtRhjefWUsZcKoNFNRmxymIwYpJX25j1JP9dx2A= Received: from imx12-a.toshiba.co.jp ([38.106.60.135]) by relay.securemx.jp (mx-mr1120) id 3636MYBX1114363 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 3 Jul 2023 15:22:34 +0900 From: venkata.pyla@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: venkata pyla , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core v2 1/6] .reproducible-check-ci.yml: Include swupdate artifacts in reproducible check Date: Mon, 3 Jul 2023 11:52:26 +0530 X-TSB-HOP2: ON Message-Id: <20230703062231.18183-2-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <176C1D7D866704FB.6977@lists.cip-project.org> References: <176C1D7D866704FB.6977@lists.cip-project.org> MIME-Version: 1.0 X-OriginalArrivalTime: 03 Jul 2023 06:22:31.0546 (UTC) FILETIME=[BF8B3DA0:01D9AD76] List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 03 Jul 2023 06:22:40 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/12174 From: venkata pyla Till now minimal images are verified against the reproducible build checks, now extend the verification to swupdate feature. Signed-off-by: venkata pyla --- .reproducible-check-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.reproducible-check-ci.yml b/.reproducible-check-ci.yml index 6eb82ea..021d4ef 100644 --- a/.reproducible-check-ci.yml +++ b/.reproducible-check-ci.yml @@ -71,18 +71,24 @@ build:qemu-amd64-base-repro-build: - .repro-build variables: target: qemu-amd64 + extension: ebg-swu + wic_targz: enable build:qemu-arm64-base-repro-build: extends: - .repro-build variables: target: qemu-arm64 + extension: ebg-swu + wic_targz: enable build:qemu-arm-base-repro-build: extends: - .repro-build variables: target: qemu-arm + extension: ebg-swu + wic_targz: enable # repro build test test:qemu-amd64-base-repro-test: From patchwork Mon Jul 3 06:22:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Pyla X-Patchwork-Id: 13299605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 492C5C001DD for ; Mon, 3 Jul 2023 06:22:40 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.132]) by mx.groups.io with SMTP id smtpd.web10.21550.1688365358071367568 for ; Sun, 02 Jul 2023 23:22:38 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.132, mailfrom: venkata.pyla@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1121) id 3636MZoL3097883; Mon, 3 Jul 2023 15:22:36 +0900 X-Iguazu-Qid: 2rWhi9UHbwDwXEfRGz X-Iguazu-QSIG: v=2; s=0; t=1688365355; q=2rWhi9UHbwDwXEfRGz; m=PM3kTgh9oS3uiqleHPK/84aNwr0h2Ci9pMG2RWo0jcY= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1121) id 3636MYb4688591 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 3 Jul 2023 15:22:34 +0900 From: venkata.pyla@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: venkata pyla , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core v2 2/6] .reproducible-check-ci.yml: Drop 'base' in job names Date: Mon, 3 Jul 2023 11:52:27 +0530 X-TSB-HOP2: ON Message-Id: <20230703062231.18183-3-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <176C1D7D866704FB.6977@lists.cip-project.org> References: <176C1D7D866704FB.6977@lists.cip-project.org> MIME-Version: 1.0 X-OriginalArrivalTime: 03 Jul 2023 06:22:31.0546 (UTC) FILETIME=[BF8B3DA0:01D9AD76] List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 03 Jul 2023 06:22:40 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/12173 From: venkata pyla Now the reproducible check is not restricted to minimal(base) image but also it include other features like swupdate, secureboot, and security extensions, so drop the name 'base' in the job names to avoid confusion. Signed-off-by: venkata pyla --- .reproducible-check-ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.reproducible-check-ci.yml b/.reproducible-check-ci.yml index 021d4ef..f19bd2c 100644 --- a/.reproducible-check-ci.yml +++ b/.reproducible-check-ci.yml @@ -66,7 +66,7 @@ # repro build -build:qemu-amd64-base-repro-build: +build:qemu-amd64-repro-build: extends: - .repro-build variables: @@ -74,7 +74,7 @@ build:qemu-amd64-base-repro-build: extension: ebg-swu wic_targz: enable -build:qemu-arm64-base-repro-build: +build:qemu-arm64-repro-build: extends: - .repro-build variables: @@ -82,7 +82,7 @@ build:qemu-arm64-base-repro-build: extension: ebg-swu wic_targz: enable -build:qemu-arm-base-repro-build: +build:qemu-arm-repro-build: extends: - .repro-build variables: @@ -91,26 +91,26 @@ build:qemu-arm-base-repro-build: wic_targz: enable # repro build test -test:qemu-amd64-base-repro-test: +test:qemu-amd64-repro-test: extends: - .repro-test variables: target: qemu-amd64 dependencies: - - build:qemu-amd64-base-repro-build + - build:qemu-amd64-repro-build -test:qemu-arm64-base-repro-test: +test:qemu-arm64-repro-test: extends: - .repro-test variables: target: qemu-arm64 dependencies: - - build:qemu-arm64-base-repro-build + - build:qemu-arm64-repro-build -test:qemu-arm-base-repro-test: +test:qemu-arm-repro-test: extends: - .repro-test variables: target: qemu-arm dependencies: - - build:qemu-arm-base-repro-build + - build:qemu-arm-repro-build From patchwork Mon Jul 3 06:22:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Pyla X-Patchwork-Id: 13299604 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FE83C001B0 for ; Mon, 3 Jul 2023 06:22:40 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.135]) by mx.groups.io with SMTP id smtpd.web11.21486.1688365357439331981 for ; Sun, 02 Jul 2023 23:22:38 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.135, mailfrom: venkata.pyla@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1801) id 3636MZCM525454; Mon, 3 Jul 2023 15:22:36 +0900 X-Iguazu-Qid: 2yAbS7mhcmrI1NkNS6 X-Iguazu-QSIG: v=2; s=0; t=1688365355; q=2yAbS7mhcmrI1NkNS6; m=fHJEKdfx/KdiYpEQgp0O65fBYaNif2vSDo88qlcRcac= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1801) id 3636MYr11122212 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 3 Jul 2023 15:22:35 +0900 From: venkata.pyla@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: venkata pyla , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core v2 3/6] .reproducible-check-ci.yml: Include only files required for RB check Date: Mon, 3 Jul 2023 11:52:28 +0530 X-TSB-HOP2: ON Message-Id: <20230703062231.18183-4-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <176C1D7D866704FB.6977@lists.cip-project.org> References: <176C1D7D866704FB.6977@lists.cip-project.org> MIME-Version: 1.0 X-OriginalArrivalTime: 03 Jul 2023 06:22:31.0671 (UTC) FILETIME=[BF9E5070:01D9AD76] List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 03 Jul 2023 06:22:40 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/12172 From: venkata pyla artifacts folder contains many other files like dpkg_status, manifest, etc, which are not verified in reproducible check, so include only the files are used in reproducible check. Signed-off-by: venkata pyla --- .reproducible-check-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.reproducible-check-ci.yml b/.reproducible-check-ci.yml index f19bd2c..88644a7 100644 --- a/.reproducible-check-ci.yml +++ b/.reproducible-check-ci.yml @@ -40,8 +40,12 @@ expire_in: 1 day paths: - scripts/repro-tests.sh - - image1 - - image2 + - image*/*initrd.img + - image*/*-vmlinu* + - image*/*.tar.gz + - image*/*.squashfs + - image*/*.swu + - image*/linux.efi .repro-test: image: From patchwork Mon Jul 3 06:22:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Pyla X-Patchwork-Id: 13299606 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31CBCEB64DC for ; Mon, 3 Jul 2023 06:22:40 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.134]) by mx.groups.io with SMTP id smtpd.web11.21487.1688365358222209384 for ; Sun, 02 Jul 2023 23:22:38 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.134, mailfrom: venkata.pyla@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1800) id 3636MaRM904142; Mon, 3 Jul 2023 15:22:36 +0900 X-Iguazu-Qid: 2yAbM4uBPv1XQg1nk0 X-Iguazu-QSIG: v=2; s=0; t=1688365356; q=2yAbM4uBPv1XQg1nk0; m=qMMc2QOD+wPdlyp+u7CgxTjl5DcYoTL4ZOM2R7zLZsU= Received: from imx12-a.toshiba.co.jp ([38.106.60.135]) by relay.securemx.jp (mx-mr1803) id 3636MZ8d1117315 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 3 Jul 2023 15:22:35 +0900 From: venkata.pyla@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: venkata pyla , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core v2 4/6] repro-tests.sh: Enable html output in diffoscope Date: Mon, 3 Jul 2023 11:52:29 +0530 X-TSB-HOP2: ON Message-Id: <20230703062231.18183-5-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <176C1D7D866704FB.6977@lists.cip-project.org> References: <176C1D7D866704FB.6977@lists.cip-project.org> MIME-Version: 1.0 X-OriginalArrivalTime: 03 Jul 2023 06:22:31.0734 (UTC) FILETIME=[BFA7ED60:01D9AD76] List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 03 Jul 2023 06:22:40 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/12175 From: venkata pyla diffoscope generates output in html format that will be helpful to easily view the non-reproducible differences in the browser. Signed-off-by: venkata pyla --- .reproducible-check-ci.yml | 3 ++- scripts/repro-tests.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.reproducible-check-ci.yml b/.reproducible-check-ci.yml index 88644a7..1f59eba 100644 --- a/.reproducible-check-ci.yml +++ b/.reproducible-check-ci.yml @@ -66,7 +66,8 @@ when: always expire_in: 1 day paths: - - "./*diffoscope_output.txt" + - "diffoscope_output" + - "./*diffoscope_output.*" # repro build diff --git a/scripts/repro-tests.sh b/scripts/repro-tests.sh index b37c15e..94de950 100755 --- a/scripts/repro-tests.sh +++ b/scripts/repro-tests.sh @@ -78,6 +78,8 @@ res=0 for file in "$@"; do if [ -f "${artifacts1}/${file}" ] && [ -f "${artifacts1}/${file}" ]; then if $DIFFOSCOPE --text "${file}.diffoscope_output.txt" \ + --html-dir diffoscope_output \ + --html "${file}.diffoscope_output.html" \ "${artifacts1}/${file}" \ "${artifacts2}/${file}" > /dev/null 2>&1; then echo "${file}: ${GREEN}Reproducible${NC}" | tee -a diffoscope_output.txt From patchwork Mon Jul 3 06:22:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Pyla X-Patchwork-Id: 13299602 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35AF4C001B3 for ; Mon, 3 Jul 2023 06:22:40 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.131]) by mx.groups.io with SMTP id smtpd.web11.21489.1688365359412203193 for ; Sun, 02 Jul 2023 23:22:39 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.131, mailfrom: venkata.pyla@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1120) id 3636MbXD3084792; Mon, 3 Jul 2023 15:22:37 +0900 X-Iguazu-Qid: 2rWh1qS7zWxXULofdh X-Iguazu-QSIG: v=2; s=0; t=1688365357; q=2rWh1qS7zWxXULofdh; m=iMoKNkI4OppusongBzJ622HNqYLhD4LODO0yMoTaoPk= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1122) id 3636MZ0o688483 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 3 Jul 2023 15:22:36 +0900 From: venkata.pyla@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: venkata pyla , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core v2 5/6] squashfs.bbclass: Fix file timestamps are not reproducible in squashfs image Date: Mon, 3 Jul 2023 11:52:30 +0530 X-TSB-HOP2: ON Message-Id: <20230703062231.18183-6-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <176C1D7D866704FB.6977@lists.cip-project.org> References: <176C1D7D866704FB.6977@lists.cip-project.org> MIME-Version: 1.0 X-OriginalArrivalTime: 03 Jul 2023 06:22:31.0796 (UTC) FILETIME=[BFB16340:01D9AD76] List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 03 Jul 2023 06:22:40 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/12176 From: venkata pyla The generated squashfs image contains non-reproducible file timestamps, so set with value in SOURCE_DATE_EPOCH variable if it is set. Closes: #68 Signed-off-by: venkata pyla --- classes/squashfs.bbclass | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/classes/squashfs.bbclass b/classes/squashfs.bbclass index b39be0c..469cdc5 100644 --- a/classes/squashfs.bbclass +++ b/classes/squashfs.bbclass @@ -31,6 +31,12 @@ SQUASHFS_MEMLIMIT ?= "${@int(get_free_mem() * 3/4)}" SQUASHFS_CREATION_LIMITS = "-mem ${SQUASHFS_MEMLIMIT} -processors ${SQUASHFS_THREADS}" python __anonymous() { + # Set file timestamps for reproducible builds + source_date_epoch = d.getVar('SOURCE_DATE_EPOCH') + if source_date_epoch: + args = " -fstime {time}".format(time=source_date_epoch) + d.appendVar('SQUASHFS_CREATION_ARGS', args) + exclude_directories = d.getVar('SQUASHFS_EXCLUDE_DIRS').split() if len(exclude_directories) == 0: return From patchwork Mon Jul 3 06:22:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Pyla X-Patchwork-Id: 13299608 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09494C001B0 for ; Mon, 3 Jul 2023 06:22:50 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.131]) by mx.groups.io with SMTP id smtpd.web11.21490.1688365359701304096 for ; Sun, 02 Jul 2023 23:22:39 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.131, mailfrom: venkata.pyla@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1120) id 3636Mcwx3084847; Mon, 3 Jul 2023 15:22:38 +0900 X-Iguazu-Qid: 2rWh7t7B0U1DTxtjXy X-Iguazu-QSIG: v=2; s=0; t=1688365357; q=2rWh7t7B0U1DTxtjXy; m=f0XdVJIdApAnMNgY0iQ76cDa9hDcr9TqimytDOrqbnk= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1121) id 3636MasZ688689 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 3 Jul 2023 15:22:37 +0900 From: venkata.pyla@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: venkata pyla , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core v2 6/6] swupdate.bbclass: Fix file timestamps are not reproducible in swu file Date: Mon, 3 Jul 2023 11:52:31 +0530 X-TSB-HOP2: ON Message-Id: <20230703062231.18183-7-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <176C1D7D866704FB.6977@lists.cip-project.org> References: <176C1D7D866704FB.6977@lists.cip-project.org> MIME-Version: 1.0 X-OriginalArrivalTime: 03 Jul 2023 06:22:31.0796 (UTC) FILETIME=[BFB16340:01D9AD76] List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 03 Jul 2023 06:22:50 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/12177 From: venkata pyla The generated .swu file is not reproducible due to its file contents are copied with its build time stamps, so set all file timestamps to SOURCE_DATE_EPOCH value if it is set. Closes #69 Signed-off-by: venkata pyla --- classes/swupdate.bbclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass index ac59c00..3d2b5f0 100644 --- a/classes/swupdate.bbclass +++ b/classes/swupdate.bbclass @@ -115,6 +115,10 @@ IMAGE_CMD:swu() { done cd "${PP_WORK}/swu" for file in "${SWU_DESCRIPTION_FILE}" ${SWU_ADDITIONAL_FILES}; do + # Set file timestamps for reproducible builds + if [ -n "${SOURCE_DATE_EPOCH}" ]; then + touch -d@"${SOURCE_DATE_EPOCH}" "$file" + fi echo "$file" if [ -n "$sign" -a "${SWU_DESCRIPTION_FILE}" = "$file" ]; then if [ "${SWU_SIGNATURE_TYPE}" = "rsa" ]; then @@ -129,9 +133,13 @@ IMAGE_CMD:swu() { -inkey "${PP_WORK}/dev.key" \ -outform DER -nosmimecap -binary fi + # Set file timestamps for reproducible builds + if [ -n "${SOURCE_DATE_EPOCH}" ]; then + touch -d@"${SOURCE_DATE_EPOCH}" "$file.${SWU_SIGNATURE_EXT}" + fi echo "$file.${SWU_SIGNATURE_EXT}" fi - done | cpio -ovL -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}"' + done | cpio -ovL --reproducible -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}"' } python do_check_swu_partition_uuids() {