From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7163187300010033152 X-Received: by 2002:a05:6512:3124:b0:4b0:9473:58 with SMTP id p4-20020a056512312400b004b094730058mr19075268lfd.223.1668064359238; Wed, 09 Nov 2022 23:12:39 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:9684:0:b0:26e:76e9:3567 with SMTP id q4-20020a2e9684000000b0026e76e93567ls101892lji.11.-pod-prod-gmail; Wed, 09 Nov 2022 23:12:37 -0800 (PST) X-Google-Smtp-Source: AMsMyM6j2jDhjLOOmNRoDEloo8YBDZ7LLgDavwcSdhGhF2E2TwXcnrMnQotWGKad408mRFyjd8Od X-Received: by 2002:a2e:92d5:0:b0:277:a6b:348f with SMTP id k21-20020a2e92d5000000b002770a6b348fmr8959583ljh.202.1668064357752; Wed, 09 Nov 2022 23:12:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668064357; cv=pass; d=google.com; s=arc-20160816; b=XqQjLO9CqsDDsEG2919kVjfY/iwk0hMD3/nCI8UT7L2kcaGs5Zg7CocZ4czqf5m5eb Uj1VkW7+IzMAwsPNuoGZixEemURhZ1wimPTG0m7waiWCZeam8t35XNsU1K8RuQ5XuqRm /woda37HQgQrsSQLAeXKpAoV6z+zdVe6/cTTcf/6eAknVFaHlftRft0hGz7IvRDesJZU 8BRwTq9Hsj8PJzJdiCtOrOF/Z9Thljgk6zJxotNeJLMklvogDBQLtHuwNhZsJTfLvrq/ NMhT35chConbus+dKl4vreIp+XLl3jfehZ/kU9w6uafdMZesNHKNhy8O1PRsH9R15p0R +wEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=j6kH/ib5TsBC9QClC4w086Dtava4khFSEPzXLB9u6LY=; b=XjqYsUI2IhOizXo+oXjl/JNqImuPMVfYMzjj45ITMFCO3xiFEVJPwAKPOJHZyXzVEL b5Nr2jMrMQI84uCiAedv+xdRBW7qEPkV6uq8JflXk0/Gm2GdJMWhn9rJm8Sh3Ag+vlwm r1CJGXIh3Tt6WVXUjGaA+6bvVFfcqBeUYEVct5Q7dxXt8ZZyt4F/zpgNCGSJk6OaZDjF 6vsxutlhKOQLRF4mecOUWi2AZqGz/rxrOB0g5viRN8y/Fa5hixTSOEMZ24tXjdQ316ue oU8PYZ5O7L3Trb01185ee7TFrmTCqaYBanYKyD0A8m8zDlFvYrk3g007rknSafiFHcLY wJVg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=tfNcVHdc; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 40.107.6.68 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60068.outbound.protection.outlook.com. [40.107.6.68]) by gmr-mx.google.com with ESMTPS id p18-20020a2eb992000000b002773925701bsi638616ljp.1.2022.11.09.23.12.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Nov 2022 23:12:37 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 40.107.6.68 as permitted sender) client-ip=40.107.6.68; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=tfNcVHdc; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 40.107.6.68 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZznYJtbhFokyE9THItXSBADmXWo22rj/ruVIDDd5tLNhqNUqJrHgSwBjl/4RTl0bvV9LV35RmkCGIrJV0IMKNr2J99KowOpk3ixrouOM6z+JzPM0P9vw3pUh4dtzB3oIHRtOlGDPBOvbr57iJr9PvceaDn5TLRY1WweQ3VBNMujSN7xM9Bg9PjlPcsmdiUHxtstxDIu0NeoJkdYkEdcoa2BhR4o3sn/7lebm3LcBd6WGez9OYkAVx54b5zODNeME1hWTyWacCgqEZEmn9CTeODLCn8Wk1GxwSnELVGiT1EkDimSNbKj8dld7D/MjRAvWnZzvtzAGk6+v0y5yp0+zEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=j6kH/ib5TsBC9QClC4w086Dtava4khFSEPzXLB9u6LY=; b=PMwDMukjyAJyznI4gXDlfy0llPTP/UD89Eug6VXKbpBAl6l70VZ3NgzlRwMenfZUV1IGzMWQWzSJ1ZxyYxecMC0wNy6BgAkGZuPj3LfwW7APKdZnHxODAGfA6eDbpScoEpuW3tddnJhTL8BZRZsT97nOMm0XglMv8ee2Z9oCeo1KAmcX3TXAQ5Dx8g8s1DLWecytkyyb4XUWS9wM2X5SJpLrnmgXx9T4Lp8HMJsOFLlT5De49st97iY6u/EtpGWcjhbr898ol2i0i9HUFD+PL/+WIwvj8B5c/qkD5ye6WuNVaguG2HkCiz0k0T6lQtuo0z/ukhi7vGMz5Mu4UxYI1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j6kH/ib5TsBC9QClC4w086Dtava4khFSEPzXLB9u6LY=; b=tfNcVHdcs4p5IQfATtEYCZYld7HetziFwz5ry2Rzlp7I7f3/vvmDO+eFiwOYQ0te2a4VFc8l0AV+UfogwBmXeg5BoCpIryJaEvzJ/NCLyMlU8mDDWVmChuHbx/IqkwFd2sJiWE6sS2zSyi5BeDc5ZEwpY/v4wXtUkCLKccuaHgNAbeI2PjVsdb6xwFEYaHtGRjjI9UqvnG9+JDZMU5mEIZ6h292d4TyWmfx9+bHCTPaeCZqj++cI/ltvqURACq55f/84UhCdyfXphozWZbA/KtD5uQRrwQt6+vxwEnHP1G3XiiMiIK5OZDVuq3JfNI7rgx1YEupA+FQsxyRkoY791g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:269::8) by DB9PR10MB7219.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:461::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Thu, 10 Nov 2022 07:12:36 +0000 Received: from PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM ([fe80::e9f4:4305:f82d:1abb]) by PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM ([fe80::e9f4:4305:f82d:1abb%3]) with mapi id 15.20.5791.027; Thu, 10 Nov 2022 07:12:36 +0000 Date: Thu, 10 Nov 2022 09:12:26 +0200 From: Henning Schild To: Cc: , , , Subject: Re: [PATCH] image.bbclass: set file timestamps inside the rootfs and initramfs image Message-ID: <20221110091226.4a3695f2@md1za8fc.ad001.siemens.net> In-Reply-To: References: <20221107082503.14774-1-venkata.pyla@toshiba-tsip.com> <20221107105335.619fa4e1@md1za8fc.ad001.siemens.net> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: CH0PR03CA0078.namprd03.prod.outlook.com (2603:10b6:610:cc::23) To PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:269::8) Return-Path: henning.schild@siemens.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PA4PR10MB5780:EE_|DB9PR10MB7219:EE_ X-MS-Office365-Filtering-Correlation-Id: de89b532-7845-4c42-27af-08dac2eaf1ad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HC3JtLhy0epAuXF3odC6ZjKt6pp3S8OyJ7uNRrkwZPWEUnrRkYdXIrvhhsF/T06JtEt3DAd8PMxvs6hIqb4/EvuCKCnkPSabzOHG1Hw+vlqbkO63Ulh0zq9YqL6O+rzgu9oOxL5VHeCih1J7eM94BxS90N4PGWOx+zZhUgLUe/bzsXx16feK8gKoHTMfFbzioEuBMsXNzcLdMXUCRoK6O3ve3pm4hMrpppR/ULUS4EfnMgDX0YDrTS9JIcAo7WOZ+OKCLcsUZuuYtoE8ItOkKpQTapz3mlEhTnvZfMVu4+wnj3WNZ3ilROfDZ/2NSXuzCAuSaYxAyWEdPxHHoZO01wdMprDh257bkH6PtGc03Grq+SujbSg8Si3lFNsqM1QiLUwU4MR9XceIf7rhxjlyW9MTKGGgiOYe4MEE+YzMGBV1IQCfL7sOtl+JQbUjTHM3oX5VqFxVWWNxdvyLDJIONd5mb59ueW2N06cqx/huwCDzrNtgbRp0iYK3uMYIYqWLQrS5FW3QLEycMN1o6pCJdLz6iYbyfJ/j/nxmbHt5jHe5YyxfE855H145/4HaM62yxRiKnUM45qB7vfQKPPM29OQFWleXWvjYlb3OrXlMF3Q20rqNoqCDRSW0MmvbArVJEtbgqkprUNUuV30Jt+dGopnCtaEP6cHMpNE+r5Aq2ErTg/KQFm3lcVLHQOQRX5QQrgmUNKdS8/yR9Co5fVR4Y/uwoquRqUSYWO7NqUYYcJijCr6ZScE2k93V0KDKot3rnrGVv8lFIAf2US7hkDdHJA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(366004)(346002)(376002)(136003)(396003)(451199015)(66899015)(82960400001)(6512007)(966005)(83380400001)(478600001)(86362001)(6486002)(2906002)(186003)(1076003)(9686003)(6506007)(38100700002)(26005)(44832011)(8936002)(66946007)(5660300002)(4326008)(6916009)(6666004)(41300700001)(54906003)(66476007)(316002)(8676002)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Qk94YjdQUjM4dis0TCtFVjdPTFpySnBnRVFQa1FMZDIrb0FUNG9DemNyRUlL?= =?utf-8?B?N2RlUjBBa1oxVlEwd3IzOHNkYVBMY1grN0N3OWR4M1VscGNQMFRrWHlBY2pH?= =?utf-8?B?SUFKZjcxaVVmbVRUcWxhcmc1S09pa2RhclJ6T2RPRHQzeFl2UkFXVmh5ekJN?= =?utf-8?B?M3A1V0o4Vlh3Q2pzcTA4Yys0QnlpUkdwSXBIVGUvYWlvaFRNQjdzb3Z3L1hu?= =?utf-8?B?RG1haDBLdUI2bHE5Q2dmdjd4QUFQeGc4ZHJ6TmpYMnJ4UklXTDJBSWFmYUtS?= =?utf-8?B?K0NHa2pjSWFQOEFSNEJmTmE0cHpnb2tzT1NwSmRpQ3dITlJkd0xWN1hLK2tv?= =?utf-8?B?cE55UGFjYWNCMzF2dGtDeFhyeHlZeGFsekthamJYalJjcjJlZ3NURnNMclhH?= =?utf-8?B?ODdQRTMrMEp4WUVUbmNTcHE0blZaMHdtZnJKVDFuK0s4dFNkalY0SW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CrossTenant-AuthSource: PA4PR10MB5780.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2022 07:12:36.1794 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UKWDA+gvTjC/Z586w+B0pACsaHDSyyzMFealNFHxq6ZwiNpLr2O9ChtaEIXWaU6vJVCVQlYMKKKtDOPnyrgULrbm2TxLttIdmqLUnMq+75g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR10MB7219 X-TUID: ONMk4Aml9P2+ Am Wed, 9 Nov 2022 09:27:20 +0000 schrieb : > Hi Henning Schild, >=20 > Thanks for your review, please find my comments below. >=20 >=20 > Thanks, > Venkata. >=20 > >-----Original Message----- > >From: Henning Schild > >Sent: 07 November 2022 14:24 > >To: pyla venkata(=EF=BC=B4=EF=BC=B3=EF=BC=A9=EF=BC=B0 TMIEC ODG Porting)= >tsip.com> =20 > >Cc: isar-users@googlegroups.com; jan.kiszka@siemens.com; hayashi > >kazuhiro(=E6=9E=97=E5=92=8C=E5=AE=8F =E2=96=A1=EF=BC=B3=EF=BC=B7=EF=BC= =A3=E2=97=AF=EF=BC=A1=EF=BC=A3=EF=BC=B4) ; > >dinesh kumar(=EF=BC=B4=EF=BC=B3=EF=BC=A9=EF=BC=B0 TMIEC ODG Porting) > > Subject: Re: [PATCH] image.bbclass: > >set file timestamps inside the rootfs and initramfs image > > > >Am Mon, 7 Nov 2022 13:55:03 +0530 > >schrieb venkata.pyla@toshiba-tsip.com: > > =20 > >> From: venkata pyla > >> > >> As part of reproducible-build work, one of the problem chosen to > >> solve is the file time stamps inside rootfs and initramfs are not > >> identical between two builds. > >> > >> With the help of reproducible-builds.org and their suggestions, the > >> above problem can be fixed using 'SOURCE_DATE_EPOCH' variable [2]. > >> > >> In case of rootfs file time-stamps, set all the files and folders > >> that are newer than 'SOURCE_DATE_EPOCH' and set it to same. > >> In case of initramfs, regenerate the initramfs image with > >> 'SOURCE_DATE_EPOCH' variable set as the mkinitramfs script is > >> already taken care of creating reproducible initramfs image when > >> the variable is set in the environment[3]. > >> > >> The SOURCE_DATE_EPOCH variable should be set to the last > >> modification of the git repository as explained in the > >> documentation[2]. > >> > >> e.g: > >> SOURCE_DATE_EPOCH=3D$(git log -1 --pretty=3D%ct) > >> > >> To know more about the reproducible builds and its goals please > >> refer [1]. > >> > >> [1] https://reproducible-builds.org/ > >> [2] https://reproducible-builds.org/docs/source-date-epoch/ > >> [3] > >> https://manpages.debian.org/bullseye/initramfs-tools-core/mkinitramfs. > >> 8.en.html#ENVIRONMENT > >> > >> Signed-off-by: venkata pyla > >> --- > >> meta/classes/image.bbclass | 15 +++++++++++++++ > >> 1 file changed, 15 insertions(+) > >> > >> diff --git a/meta/classes/image.bbclass > >> b/meta/classes/image.bbclass index ccff810..c1bb4fd 100644 > >> --- a/meta/classes/image.bbclass > >> +++ b/meta/classes/image.bbclass > >> @@ -431,6 +431,21 @@ do_rootfs_finalize() { > >> "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" > >> > >> rm -f "${ROOTFSDIR}/etc/apt/sources-list" > >> + > >> + # Recreate initramfs inorder to set timestamps to > >> SOURCE_DATE_EPOCH > >> + # inorder to make reproducible initramfs > >> + test ! -z "${SOURCE_DATE_EPOCH}" && \ > >> + SOURCE_DATE_EPOCH=3D${SOURCE_DATE_EPOCH} chroot > >> "${ROOTFSDIR}" \ > >> + update-initramfs -u -v =20 > > > >This should be done where that initial update-initramfs can be found. > >And not fix things up later. Not every image will have an initrd so > >that is wrong in multiple ways. =20 >=20 > Thanks for correcting me, I understood the initrd update should not > be in the goal of image class, as some of the images may not be > required initrd as you mentioned. I will find the better place to do > this and send the another patch. >=20 > > =20 > >> + > >> + # Set timestamp to files inside the rootfs image inorder > >> to make > >> + # reproducible rootfs > >> + test ! -z "${SOURCE_DATE_EPOCH}" && \ > >> + find ${ROOTFSDIR} -newermt \ > >> + "$(date -d@${SOURCE_DATE_EPOCH} '+%Y-%m-%d > >> %H:%M:%S')" \ > >> + -printf "%y %p\n" \ > >> + -exec touch '{}' -h -d@${SOURCE_DATE_EPOCH} ';' > >> + =20 > > > >No! Which files do we care about? My guess would content of packages > >built with isar. We should export the variable in the dpkg class > >then the packages will be correct and we do not have to mess around > >with that rootfs and fix problems that should have never been there. > >=20 >=20 > This will only change the files are created during build, and not the > files come with package. All files, or very close to all, come with packages. Because isar builds packages for stuff it does. The wanted timestamp has to be provided at build time of those packages so that later on one does not need to run such a find. You basically first want to make sure the packages (those from isar-apt) are reproducible and only later look at the whole rootfs. That whole rootfs will have remaining differences, just from what maintainer hooks and stuff do. That find violates the rule that everything should come from a package. There are some exceptions to that rule in isar, but those are likely the ones causing repro issues. And anyhow not everyone delivers only the images, some people also deliver the packages. So those need to be reproducible as well ... or even first. > The idea is to set time stamps to the files as same that are modified > or added during build time (e.g: /etc/*) and they are newer than > SOURCE_DATE_EPOCH date. >=20 >=20 > > > >I would like to ask for test cases. Ideally first a breaking test > >and later a commit fixing the issue. =20 >=20 > I executed this in one of the child project (isar-cip-core) and > reported the issue here [1], are you expecting to write test cases in > isar? >=20 > [1] https://gitlab.com/cip-project/cip-core/isar-cip-core/-/issues/31=20 The motivation always has to come with the patch. So that manual diffoscope workflow should be explained in the commit message or documentation. Ideally you would add a test that actually runs that and asserts that there are no problems left. Or ignoring the left ones for starters. That layer and all other layers will later benefit. But whatever you try to fix has to be explained and consistent inside isar only. So issues from some layer clearly do not count. Say we get the debian package feed to become reproducible, i bet we could just compare the repo metadata and the package checksums. Not even dive into the packages and check what might be different. A good way of explaining a change is also to first write the test and later the code to fix the problem a test shows. Everybody would understand easily and if any future change would break it again we would see before a merge. regards, Henning > > > >Note that deriving the time from git means one needs git. And when > >using layers just that one Isar git is clearly not good enough. And > >we will have to check how that works with sstate. I assume any new > >commit would rebuild all custom packages. Here i see a conflict > >between regular dev work and repro pedantics. We might need a way to > >turn that stuff off. > > > >regards, > >Henning > > =20 > >> EOSUDO > >> } > >> addtask rootfs_finalize before do_rootfs after > >> do_rootfs_postprocess =20 >=20