From patchwork Thu Dec 7 15:41:10 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: 3227 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 07 Dec 2023 16:41:30 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f192.google.com (mail-il1-f192.google.com [209.85.166.192]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 3B7FfTo7030696 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 7 Dec 2023 16:41:29 +0100 Received: by mail-il1-f192.google.com with SMTP id e9e14a558f8ab-35d5b10fcd8sf9800185ab.2 for ; Thu, 07 Dec 2023 07:41:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701963683; cv=pass; d=google.com; s=arc-20160816; b=pOTGhtgU0V1e0Zxx26wC7XBSkUTSinM3vQVrHn3egXtv9NG09lDN0PNha5RXJ7OfgS 2cQBdro7e/phQFYfKclsdel12ycUFe/PFMMFCfY0v9jB7jL0957lj1s0gzVKmPI3SpwP VF0KdXquau5ZzLFVbyDD5hgEpN/h8jGa29AJEJgdFoCYRVkSqdpb75YRfi2OMJ0B4ogK NqFM0lTepth6ito2kuqvFG+Gq1ka+lPogMp6UzhB7/XrgR0t16bg4RmbwBMttsE1OR1y 6QiliBxTpEmRSZ5icv8PRseMuiFJ9GFgX6CuNkH4YTZRFWco1VS/UMjLHA1TBE8zTCHL +S6Q== 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:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=fumn9qsi+bAbbqafL8XRUWSRRberGdqHTIBpIiQYALk=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=pRH5HDBoutw553AUihmxkHt449ZVCqQMdH4CGcB6mYPoLZ+Itzu5E4FcVuR2kGHU7x C36fXKqm1ZN16uQV266CF4HQF6liFeJWG8boZhiecb5rqFRep2fYNbWv2hTIZryLGKMv aai2/gEqR+bnuRIiXyHFJ/S3cSVUq/yaU+S4xn4nA/ABluCeaY3mkqlCkWm30AkzDs9E gsLMLTCTVegccxobDgCkKUUYUl3pUuybN3cDFTZ9xstPKZZUfhLco0XqWCv15Lw59ZQo M66XMv+nh9Of2XgyGNhD+F3F2k2kt0pWeQcoIyNi+cxBMiADe9NKb/5rhubKfcqQrnxZ l8Ow== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.132 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=1701963683; x=1702568483; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=fumn9qsi+bAbbqafL8XRUWSRRberGdqHTIBpIiQYALk=; b=d13Qy5OpJIsvNVEgLwbdF27gVOHLA4GD03ovRJK+fYCrA4xxJ+eo3Fc3YOfSJz4zjy 7KeiBexaig8ZqlXZnDudErZ8qid7cGH8aGlVJAe3M8f+g2kM2b0qxgN+yw4JtanQ77/P wbWAxVe3yH/HieiyJD3Vj/SP2e0DXoVT6Mw6ZiCXDJU+xH7CHlLbiH3SIyP2uLpwh8ZJ yCHU5Yrk+EIboAiMgypgQjQpC77uytUkcZ0EbxAuhblnc8G1hqyI0/G3gWWeI/i0knzV AZe0RriASK/76evqS3+lU9y71qRTWSHSfl3oAnhZULhlaEA3XGNES5Qb2vX2Xvkbpjp3 ULng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701963683; x=1702568483; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=fumn9qsi+bAbbqafL8XRUWSRRberGdqHTIBpIiQYALk=; b=rfzMdZcynh0IkMHQ/rXQTlmHEtYfI8Pr7P2r+vlofloVDi2QUpHE5Zzb+Vts+3TnRn WD759M1YziN6fPFVEjEem2hSLUmUXEvRx4jPowCgX6yz0mK5Upij3Z3HVCWdM5cCWLQ8 E65Mj4g4FhSHgF8eIksJwhqc9eLRfd3BTGQc9FSmuUumbLjd04ntYtbahJ+ZjdxoESNp v2eylbYTZ1G6cgf7g0yOrLwkYsL9KCD/O52NSJrlmWP6Iu41/XeG1yQtMGxHTDYuI/4i M/LjVsa2NJq0Oq/ryc7fBqBC0xaMA51aKq0ZUae+grCqZTQAK3LKJeBaF8flsirEfbMk cTYQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOJu0YzwXAknXT6Cso236UFN6637KI1NZ+sGrL7BxD+I/gs8WiZ6Xi8d 49m4iyApfEbFZoVPw7V5ZzY= X-Google-Smtp-Source: AGHT+IGbBn/3vTp8BfYjQbmcProU3uM+dYn5ENOZusLZiLmZoUjkOfTufbcwMLDeEG8+ZtB/GxDWyg== X-Received: by 2002:a92:b709:0:b0:35d:6579:f6de with SMTP id k9-20020a92b709000000b0035d6579f6demr3003758ili.21.1701963683585; Thu, 07 Dec 2023 07:41:23 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a92:c846:0:b0:35c:d0b2:2d3 with SMTP id b6-20020a92c846000000b0035cd0b202d3ls721418ilq.1.-pod-prod-09-us; Thu, 07 Dec 2023 07:41:23 -0800 (PST) X-Received: by 2002:a05:6e02:1a08:b0:359:6e32:70ae with SMTP id s8-20020a056e021a0800b003596e3270aemr4166190ild.4.1701963682760; Thu, 07 Dec 2023 07:41:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701963682; cv=none; d=google.com; s=arc-20160816; b=iM0pkPsZpkgS1mtxDgD/twTSVXjWm90GLB/TmGBksOrTGecvQsvwtNSCgTddHw191i oYdDAO5SRizdPPDDIMzop8c7bETx8m8AlgPJu3XISZ3m39QR6RfhQfjoU9ZerfGCHdnH PIu14qiIcWVw0+RCK7bx7dSsCHRfT6EieLBnmdtHHnX3uwiYmLBwL8NyaXEk1tGT41E5 LAEMyR5xIr6E0sHiLQm4/s00gPafKMuo86Q07yGFA5HHmE/rdoJ4w8QyNjbAaM5oHMSc tKpp/pwHpel71EQhBywMHXRvbshWkQIGbGT+HrNVO7rVJSgfqZYZ5sx9xvygk0LG5wnu Ps8w== 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=uc7rBtnBW+ExfvcYJqdHVE3DuUt4r3BkGCAW08vhRMU=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=YX3X8HH44kSqyEQoXezEP8ykV81rE53uZIWg8WwX7EIaf0415LRuwZRbNluaCWAO1q j0p105dLRf7vaATpBEG2OCNY9VjAXBxrXHtHLS5CkIj5sAUN+9uPvdgUxU5a/UEsAguY +dj/vGDRHfvn7zJz2gSxY2CZqwrOcnqCVo5VK+Dxwbb1zY4kRa1WGlbNWl6CMoPIN9rL unLZWosrV8wakyN+YTLUpLQFI+07R5cAxbzqnzO1wbICy5HQWkFf/DUDGaJXaFCyTF1F eYAsNLgrXPOUo+yg62WWj9IChqE+N7D1RceSPc4i9NsT8HXGgvv447QSeNxIwF9HefNi yoGg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.132 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Received: from mo-csw.securemx.jp (mo-csw1121.securemx.jp. [210.130.202.132]) by gmr-mx.google.com with ESMTPS id b5-20020a92c845000000b0035d661cac44si184414ilq.5.2023.12.07.07.41.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 07:41:21 -0800 (PST) Received-SPF: pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.132 as permitted sender) client-ip=210.130.202.132; Received: by mo-csw.securemx.jp (mx-mo-csw1121) id 3B7FfJ4d298604; Fri, 8 Dec 2023 00:41:19 +0900 X-Iguazu-Qid: 2rWhQFUwauhZLLNurJ X-Iguazu-QSIG: v=2; s=0; t=1701963679; q=2rWhQFUwauhZLLNurJ; m=fg7d1a3cGIEOzeyoiNIxt2OJXYLeb/nRu1puf0W7QvM= Received: from imx12-a.toshiba.co.jp ([38.106.60.135]) by relay.securemx.jp (mx-mr1122) id 3B7FfIfN2876603 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 8 Dec 2023 00:41:18 +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 1/5] linux-module: Use debug-prefix-map to build modules deterministically Date: Thu, 7 Dec 2023 21:11:10 +0530 X-TSB-HOP2: ON Message-Id: <20231207154114.20400-2-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> References: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 07 Dec 2023 15:41:14.0558 (UTC) FILETIME=[CFABADE0:01DA2923] 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.132 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.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 custom linux modules are built non-determinstically due to the reason that the kernel build includes absolute paths in the debug information which is not necessary and can be trimmed using `debug-prefix-map` option. Signed-off-by: venkata pyla Acked-by: Felix Moessbauer --- meta/recipes-kernel/linux-module/files/debian/rules.tmpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/recipes-kernel/linux-module/files/debian/rules.tmpl b/meta/recipes-kernel/linux-module/files/debian/rules.tmpl index 7d950e38..20d5f670 100755 --- a/meta/recipes-kernel/linux-module/files/debian/rules.tmpl +++ b/meta/recipes-kernel/linux-module/files/debian/rules.tmpl @@ -45,11 +45,14 @@ KERNEL_DEP := $(shell dpkg-query -W -f '$${Depends}' ${KERNEL_HEADERS_PKG} | sed KDIR := $(shell dpkg -L $(KERNEL_DEP) | grep "/lib/modules/.*/build") endif +KCFLAGS := "-fdebug-prefix-map=$(PWD)=." +KAFLAGS := "-fdebug-prefix-map=$(PWD)=." + override_dh_auto_clean: $(MAKE) -C $(KDIR) M=$(PWD) clean override_dh_auto_build: - $(MAKE) -C $(KDIR) M=$(PWD) $(PARALLEL_MAKE) modules + $(MAKE) -C $(KDIR) M=$(PWD) $(PARALLEL_MAKE) KCFLAGS="$(KCFLAGS)" KAFLAGS="$(KAFLAGS)" modules ifneq ($(filter pkg.sign,$(DEB_BUILD_PROFILES)),) find . -name "*.ko" -print -exec $(KDIR)/scripts/sign-file ${SIGNATURE_HASHFN} ${SIGNATURE_KEYFILE} ${SIGNATURE_CERTFILE} {} \; endif From patchwork Thu Dec 7 15:41:11 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: 3228 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 07 Dec 2023 16:41:31 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-oo1-f56.google.com (mail-oo1-f56.google.com [209.85.161.56]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 3B7FfTQc030709 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 7 Dec 2023 16:41:30 +0100 Received: by mail-oo1-f56.google.com with SMTP id 006d021491bc7-58aa86278e1sf1022350eaf.0 for ; Thu, 07 Dec 2023 07:41:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701963684; cv=pass; d=google.com; s=arc-20160816; b=UXZeWmvzG0azKuesIWJhNWFbsm3XJ7uSY5XxdM0oNN2qq9lsSecHyVjlykHHRH5PUr oSgj0p85KWIl2+ls9FLKxaCniPdXyX7w2KLWUfM48g79XBUkDZ7V/CaKCDDhEeNUkJeo 6Hi6HGs3GYpMbwOcWWWBoiPIX3kRx8qvUPxDEaDCy2ylQ6A5AS/SoAwzDlEn2SHCIsfe PkBWOZnHMcr6KmIYvD8VktDMjG7Fq8fbKDXsiM+Slu2XJkAQfVOiH0GwmI99p/uHpH83 y9LIJC0osBdU6RGYPQ/23OH1cufeZY0cnuAUwTOs36cXxF9Iinu+RakYNbRM8IPV4Wm2 SSxQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:sender:dkim-signature; bh=zcmoY+FrqIga4gIfrOAAyHKRNpRbCNJEV6aMCMt8QbM=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=E4AI1RooFxMozxm0SeQNOWD3tDpVW5Wm0XhmmsjDZY4Nl/KBxIzoh7BddavnHj+fIY OSjN4A6pwxKW5OJ4OhTqZAUrxj/DQWQt2HUR/nnGEtNhqqdIBIgQbqk/lqOizCEKUmrh PFecjyIG8yR5Bwh1BVPkRugkmnD7kV+0LUXNitzaNRBWTLg/uTpUR3KaZvr2AVDCZW0J bo96vmULhrIY3taI3mD7Kuo0HXS5N6tRJAV+/oIvA9TK2jHcaknxUWPx5fdz5RTuWdK8 1jImEuf9YmUz3m1VlT4cpaZcHL3cIykzDGVunddQ7CJJ0V3ND5WW8k8WOBPYtINOK6db piVw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.135 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=1701963684; x=1702568484; 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:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=zcmoY+FrqIga4gIfrOAAyHKRNpRbCNJEV6aMCMt8QbM=; b=lFgc/d00PMXnH+R5quMZ2NUCQwRRHf3kciZ4u77oE1x1IOy/h+RUf/VFWdft2DPTtO mz1M212BPqI56KF6T4iFSzawu3wVbPFohfd6BkHRWBV9aUS84itVH/KXXhq0+j5qBxjy MjmsVPEdlOAJi/Ipv0wa1Krs/vzJtodvnWNVrhsbR2ttHBeySHgVmRE01yNCUoy2kHXP TnOWNJAhR8jjt/QPWvZY8EFdgNU5Jr3liHzU91fzML2hNuZc2QSpILrJOfRbXX3/dtEQ jdruwHwF0bDOXHJPmUBj8j5Kw07Uc4iLjrL7NQmOQqjM4Ag2mxFQnSS11Q9LsXa1vruo w8zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701963684; x=1702568484; 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=zcmoY+FrqIga4gIfrOAAyHKRNpRbCNJEV6aMCMt8QbM=; b=KYUaxxCgWWjoODpYw0zNANw9NpA6g0FztkHonBuoLjqL/rOeABuOZZNDIlhUGpIn5f NAN07WJSaxtRmCxfb8ECFxk+/VP2/rixon+9fPpALFeRvIT1orCiYuhrUIlKVIw3spq/ kD1jF1/atCjZvnm5P/zmRxkITGoYPErv5CPYokGZXIkhAM9WMUx0lKoWbnXQ452INRrn MVc4vehWfnp2SeCXvh/GVJMlSUk5jBIFEVrvgOCwvt4VIOv3K4eUs0SBrrROf6gewKiX VYwBYifOSQ5q0F1vkekWSToa/+OwrU91YRpZE5ESeIATr8P19EcTmHDt37jTA52I9sdV 122A== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOJu0YwcbZv3xg4+yvgzKUke5gq1/imwoFNlHTBo7FiDVROLVCzts0LP DFEfMDFiQH95+mTjTPstrOs= X-Google-Smtp-Source: AGHT+IE3HW6L+iMIT2IUotSPZJVrMIoZtRYQKjPPpvhD31+Mt2HCfwu15ilnW6mfZ+0oaw+9B+YmIg== X-Received: by 2002:a05:6820:229f:b0:590:1b40:4aeb with SMTP id ck31-20020a056820229f00b005901b404aebmr3148650oob.10.1701963684131; Thu, 07 Dec 2023 07:41:24 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6820:602:b0:58d:582d:7ff1 with SMTP id e2-20020a056820060200b0058d582d7ff1ls1305740oow.0.-pod-prod-04-us; Thu, 07 Dec 2023 07:41:23 -0800 (PST) X-Received: by 2002:a05:6830:448:b0:6d6:4c4f:34cc with SMTP id d8-20020a056830044800b006d64c4f34ccmr3250023otc.37.1701963683279; Thu, 07 Dec 2023 07:41:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701963683; cv=none; d=google.com; s=arc-20160816; b=Z84VCPJNexjuuwo7kiS5gSpK5IfEscU/4wU2tO4deGv0tuudL2f6LZi0k4D81dHaxC uCG+FZb9e1yGxr5yjpQOAgijERtMR7iy7HVd8VZdW2vZlP4/Yr8R1Ev99eofFcNSnoPu 7U+YpQUKpPmE2WAPdKd7BSgY0S+npytph6ZhNcOLeWukt3l1qJVRlqDZ7zgt+Utl5nQe eElGKEiE39+GBwjjGn9JsY3d/4VVlCrKvn8o9IiH64uMhZN5W7xfhrv2M3FISDyHOz0b t021xKAhByBDk8EbnWLfOngnnWDJpwf8l53lb8+b2UD9nP+wA4h/MltEZC0aBhZZpbwH XtwQ== 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=WhzI2UiTUxMAr+jQdDzioqrhZ/Cp/+nMlDku8onuA9M=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=XBmyZ4x/CkCc0w2eGKWdQrrkKl5WxhELJ+JPE5Abr5xpGuCe44OSOp82ktT53Eekob HBz5oI0E8cUrpCHIqfr/rjx1YQJSxezSgp3n6XFF1HbY+0/F8dkV/TkiO7FL7Vf0Ip0k D9/y/PXXKFnLqX1Tuzks4dw7kWbdNoVf1aaOvzOF0GyFVV7g5H3UFxBOHnY3tYuevWfy brNH/tmzLkI5wOJzprfbi5HMtAWY+dw4m2g7F+Sc/b5rIU314wUlrcwdtmH7yIrTjwd6 px1esAybw9w/m5uL+/MO3KkLlJteu3PGkrodf9u+jn9chH5f1ECpsObaBXGmsJNOvcUH 779A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.135 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Received: from mo-csw.securemx.jp (mo-csw1801.securemx.jp. [210.130.202.135]) by gmr-mx.google.com with ESMTPS id s26-20020a05683004da00b006d84d3144e4si2683otd.4.2023.12.07.07.41.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 07:41:22 -0800 (PST) Received-SPF: pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.135 as permitted sender) client-ip=210.130.202.135; Received: by mo-csw.securemx.jp (mx-mo-csw1801) id 3B7FfKrX065375; Fri, 8 Dec 2023 00:41:20 +0900 X-Iguazu-Qid: 2yAbPDmovHUXDo1nV2 X-Iguazu-QSIG: v=2; s=0; t=1701963680; q=2yAbPDmovHUXDo1nV2; m=crRH21V0rauP1vyK72eRRDUGRBDyj+ib58flcSzuQ24= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1800) id 3B7FfJ3r1172085 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 8 Dec 2023 00:41:19 +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 2/5] wic: Set file system uuid to ext4 partitions Date: Thu, 7 Dec 2023 21:11:11 +0530 X-TSB-HOP2: ON Message-Id: <20231207154114.20400-3-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> References: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 07 Dec 2023 15:41:14.0574 (UTC) FILETIME=[CFAE1EE0:01DA2923] 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.135 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 Adding pre configured UUID's to the file systems will helps to build reproducible images. Signed-off-by: venkata pyla --- meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc | 2 +- meta-isar/scripts/lib/wic/canned-wks/de0-nano-soc.wks.in | 2 +- meta-isar/scripts/lib/wic/canned-wks/efi-plus-pcbios.wks | 2 +- meta-isar/scripts/lib/wic/canned-wks/hikey.wks | 2 +- meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks | 4 ++-- meta-isar/scripts/lib/wic/canned-wks/nanopi-neo-efi.wks.in | 2 +- meta-isar/scripts/lib/wic/canned-wks/nanopi-neo.wks.in | 2 +- meta-isar/scripts/lib/wic/canned-wks/rpi-sdimg.wks | 2 +- .../scripts/lib/wic/canned-wks/sdimage-efi-sb-debian.wks | 2 +- meta-isar/scripts/lib/wic/canned-wks/sdimage-efi-sd.wks | 2 +- meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks | 2 +- meta-isar/scripts/lib/wic/canned-wks/sifive-fu540.wks | 2 +- .../scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in | 2 +- meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc b/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc index fe028b50..71885cb4 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc +++ b/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc @@ -1,3 +1,3 @@ # This file is included into 3 canned wks files from this directory part /boot --source bootimg-pcbios-isar --ondisk sda --label boot --active --align 1024 -part / --source rootfs --use-uuid --fstype=ext4 --label platform --align 1024 --exclude-path=boot --mkfs-extraopts "-T default" +part / --source rootfs --use-uuid --fstype=ext4 --label platform --align 1024 --exclude-path=boot --mkfs-extraopts "-T default" --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 diff --git a/meta-isar/scripts/lib/wic/canned-wks/de0-nano-soc.wks.in b/meta-isar/scripts/lib/wic/canned-wks/de0-nano-soc.wks.in index 0794a2f3..06154e01 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/de0-nano-soc.wks.in +++ b/meta-isar/scripts/lib/wic/canned-wks/de0-nano-soc.wks.in @@ -5,6 +5,6 @@ part --source rawcopy --sourceparams "file=/usr/lib/u-boot/${MACHINE}/${U_BOOT_BIN}" --system-id 0xa2 --align 1 -part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --active +part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 bootloader --append "rw rootwait" diff --git a/meta-isar/scripts/lib/wic/canned-wks/efi-plus-pcbios.wks b/meta-isar/scripts/lib/wic/canned-wks/efi-plus-pcbios.wks index 03928915..321be10b 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/efi-plus-pcbios.wks +++ b/meta-isar/scripts/lib/wic/canned-wks/efi-plus-pcbios.wks @@ -1,6 +1,6 @@ # Example to show how to create an efi + pcbios image # Note, that the loader argument is mandatory. But systemd-boot also works. part /boot --source bootimg-biosplusefi-isar --sourceparams="loader=grub-efi" --label boot --active --align 1024 -part / --source rootfs --ondisk sda --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --exclude-path=boot +part / --source rootfs --ondisk sda --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --exclude-path=boot --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 bootloader --ptable gpt --timeout 3 --append "rootwait console=ttyS0,115200 console=tty0" diff --git a/meta-isar/scripts/lib/wic/canned-wks/hikey.wks b/meta-isar/scripts/lib/wic/canned-wks/hikey.wks index 0c966e65..27447e2d 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/hikey.wks +++ b/meta-isar/scripts/lib/wic/canned-wks/hikey.wks @@ -5,6 +5,6 @@ part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" --ondisk mmcblk1 --label efi --part-type EF00 --align 1024 -part / --source rootfs --ondisk mmcblk1 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid --exclude-path boot/ +part / --source rootfs --ondisk mmcblk1 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid --exclude-path boot/ --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 bootloader --ptable gpt --timeout=3 diff --git a/meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks b/meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks index b3abb3d0..ac8ebea9 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks +++ b/meta-isar/scripts/lib/wic/canned-wks/multipart-efi.wks @@ -1,8 +1,8 @@ # Example showing how to split a single rootfs across partitions part /boot --ondisk sda --source bootimg-efi-isar --sourceparams="loader=grub-efi" --label boot --active --align 1024 # when excluding paths, just specify --exclude-path once and separate paths using spaces -part / --ondisk sda --source rootfs --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --exclude-path boot home --extra-space 1G +part / --ondisk sda --source rootfs --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --exclude-path boot home --extra-space 1G --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 # put home last to support auto-expand of this partition -part /home --ondisk sda --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 +part /home --ondisk sda --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120004 bootloader --ptable gpt --timeout 3 --append "rootwait console=ttyS0,115200 console=tty0" diff --git a/meta-isar/scripts/lib/wic/canned-wks/nanopi-neo-efi.wks.in b/meta-isar/scripts/lib/wic/canned-wks/nanopi-neo-efi.wks.in index 7171a23e..4baf0642 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/nanopi-neo-efi.wks.in +++ b/meta-isar/scripts/lib/wic/canned-wks/nanopi-neo-efi.wks.in @@ -10,6 +10,6 @@ part u-boot --source rawcopy --sourceparams "file=/usr/lib/u-boot/nanopi_neo/u-boot-sunxi-with-spl.bin" --no-table --align 128 part /boot --use-uuid --source bootimg-efi-isar --sourceparams="loader=systemd-boot" --label efi --part-type EF00 --align 1024 -part / --use-uuid --source rootfs --fstype=ext4 --mkfs-extraopts "-T default" --label platform --active --align 1024 --exclude-path boot +part / --use-uuid --source rootfs --fstype=ext4 --mkfs-extraopts "-T default" --label platform --active --align 1024 --exclude-path boot --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 bootloader --ptable gpt --timeout 0 --append "rootwait" diff --git a/meta-isar/scripts/lib/wic/canned-wks/nanopi-neo.wks.in b/meta-isar/scripts/lib/wic/canned-wks/nanopi-neo.wks.in index af5b6f08..cfad430e 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/nanopi-neo.wks.in +++ b/meta-isar/scripts/lib/wic/canned-wks/nanopi-neo.wks.in @@ -5,6 +5,6 @@ part u-boot --source rawcopy --sourceparams "file=/usr/lib/u-boot/nanopi_neo/u-boot-sunxi-with-spl.bin" --no-table --align 8 -part / --source rootfs-u-boot --ondisk mmcblk2 --fstype ext4 --mkfs-extraopts "-T default" --sourceparams "builtin_dt=yes" --label platform --align 1024 --active +part / --source rootfs-u-boot --ondisk mmcblk2 --fstype ext4 --mkfs-extraopts "-T default" --sourceparams "builtin_dt=yes" --label platform --align 1024 --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 bootloader --append "rw rootwait" diff --git a/meta-isar/scripts/lib/wic/canned-wks/rpi-sdimg.wks b/meta-isar/scripts/lib/wic/canned-wks/rpi-sdimg.wks index e5a3668b..de1b742e 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/rpi-sdimg.wks +++ b/meta-isar/scripts/lib/wic/canned-wks/rpi-sdimg.wks @@ -1,5 +1,5 @@ part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 10 -part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --mkfs-extraopts "-T default" --label root --align 4096 --exclude-path=boot +part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --mkfs-extraopts "-T default" --label root --align 4096 --exclude-path=boot --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 bootloader diff --git a/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi-sb-debian.wks b/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi-sb-debian.wks index cd99ebca..bb2da5ac 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi-sb-debian.wks +++ b/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi-sb-debian.wks @@ -5,6 +5,6 @@ part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi,use-debian-sb-stub=true" --ondisk sda --label efi --part-type EF00 --align 1024 -part / --source rootfs --ondisk sda --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid --exclude-path boot/ +part / --source rootfs --ondisk sda --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid --exclude-path boot/ --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 bootloader --ptable gpt --timeout 3 --append "rootwait console=ttyS0,115200 console=tty0" diff --git a/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi-sd.wks b/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi-sd.wks index 7fe2953f..6dc9c6c4 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi-sd.wks +++ b/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi-sd.wks @@ -4,7 +4,7 @@ part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot" --ondisk sda --label efi --part-type EF00 --align 1024 -part / --source rootfs --ondisk sda --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid --exclude-path boot/ +part / --source rootfs --ondisk sda --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid --exclude-path boot/ --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 include expand-padding.wks.inc diff --git a/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks b/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks index 80c3a535..8c864f2f 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks +++ b/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks @@ -4,7 +4,7 @@ part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" --ondisk sda --label efi --part-type EF00 --align 1024 -part / --source rootfs --ondisk sda --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid --exclude-path boot/ +part / --source rootfs --ondisk sda --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid --exclude-path boot/ --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 include expand-padding.wks.inc diff --git a/meta-isar/scripts/lib/wic/canned-wks/sifive-fu540.wks b/meta-isar/scripts/lib/wic/canned-wks/sifive-fu540.wks index 9cd0e662..ef99edd7 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/sifive-fu540.wks +++ b/meta-isar/scripts/lib/wic/canned-wks/sifive-fu540.wks @@ -5,6 +5,6 @@ part --source rawcopy --sourceparams "file=/usr/lib/opensbi/sifive-fu540/fw_payload.bin" --ondisk mmcblk0 --fixed-size 8M --align 1 --part-type 2e54b353-1271-4842-806f-e436d6af6985 -part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --active --align 1024 --sourceparams "no_initrd=yes,script_prepend=setenv fdtfile sifive/hifive-unleashed-a00.dtb" +part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --active --align 1024 --sourceparams "no_initrd=yes,script_prepend=setenv fdtfile sifive/hifive-unleashed-a00.dtb" --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 bootloader --ptable gpt --append "rootwait" diff --git a/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in index 0f3d76a9..c265c752 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in +++ b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in @@ -18,6 +18,6 @@ part --source rawcopy --sourceparams "file=/usr/share/visionfive2-u-boot-firmwar # EFI part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot" --use-uuid --label efi --part-type EF00 --align 1024 # rootfs -part / --source rootfs --use-uuid --fstype ext4 --mkfs-extraopts "-T default" --label image --active --align 1024 --exclude-path=boot/ +part / --source rootfs --use-uuid --fstype ext4 --mkfs-extraopts "-T default" --label image --active --align 1024 --exclude-path=boot/ --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 bootloader --ptable gpt --timeout=0 --append "console=tty0 console=ttyS0,115200 earlycon rootwait" diff --git a/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in b/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in index 5d96f65f..6e651292 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in +++ b/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in @@ -11,6 +11,6 @@ part teeh --part-name teeh --source rawcopy --sourceparams "file=/usr/lib/optee- part teed --part-name teed --source rawcopy --sourceparams "file=/usr/lib/optee-os/${MACHINE}/tee-pageable_v2.stm32" --fstype=ext4 --fsoptions "noauto" --part-type 0x8301 --fixed-size 1024K part teex --part-name teex --source rawcopy --sourceparams "file=/usr/lib/optee-os/${MACHINE}/tee-pager_v2.stm32" --fstype=ext4 --fsoptions "noauto" --part-type 0x8301 --fixed-size 256K -part / --source rootfs-u-boot --fstype ext4 --mkfs-extraopts "-T default" --label root --align 1024 --active --use-uuid +part / --source rootfs-u-boot --fstype ext4 --mkfs-extraopts "-T default" --label root --align 1024 --active --use-uuid --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 bootloader --ptable gpt --append="rootwait rw console=ttySTM0,115200" From patchwork Thu Dec 7 15:41:12 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: 3229 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 07 Dec 2023 16:41:32 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f183.google.com (mail-il1-f183.google.com [209.85.166.183]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 3B7FfVWe030714 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 7 Dec 2023 16:41:32 +0100 Received: by mail-il1-f183.google.com with SMTP id e9e14a558f8ab-35da762b700sf3728075ab.3 for ; Thu, 07 Dec 2023 07:41:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701963686; cv=pass; d=google.com; s=arc-20160816; b=v9MVn5KSLOOebS0WMwlBd1S6udoH4D4IHP6lzaKVXo41pHw8fhtL2Cy/cIXDGneyQC uFD3Nnsne5hJl8cEG3U3g1057JpifP/eR4+wkIsjdHqVRpsvTIX2t99UxY3pbzCqbK4y qSPGIjVwmqr4dmlXgXyHk4u3K7lnDfxAtdEnQ4e5hrvAcZ/hwURWXU2/2KcCE/mzg//+ QzRmSRgDm4LICrDmq3O4s7DZtNx/feDe9+4CNyPqG5chSXXTC/OhbLUzwIjxqrB5i7Gm mTxodxALIrh/01reRRuaY5oKbCJPMQRvr+oVUrgkTAD1YKl9BdW8SRYec5LyAkgELNSW JgaQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=g8j2429XEOR82lpcPQODnqDvsRnvGJA7B/V16AaLuiE=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=tUbgBWDVZxd51JajMf3vss1e7vhu2oYfHo746zgpG4rB0N06R3sf6weeE71WjAzinR J9vAUm/7h9dbdJpQNYp/jFTEBd4f4Y1Yy7O5T3Orob/UguNQOi0oukAWF5hf6Ag15e6D 3/DEhBSLCuwpIzPsDsbMo29zVgGY8ZGpNhjlFDEIPtOrf2Bupa8yVgyWAn9bdC1c8TBE 9bFQv3DCGAteLMSkSNrKtZlzIwqJ/bMQj1XfESDl768y5oiiLzx+w2/IEqLLIJu8VkSr uSYGjA5BQvT+xawZXLUZiLg9Z1G7BlORFDm4WW2pbWpk5mMQRHOvTZZMOQI+G/3FuVeA nkcw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.131 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=1701963686; x=1702568486; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=g8j2429XEOR82lpcPQODnqDvsRnvGJA7B/V16AaLuiE=; b=TjMPSDgQ2PraM99KT19Dz+8GR98mmuPNKiVXR2snUrXbYqwcLfTtiEPpsLobxUpfsx yruGx41J8hhPXiLNyDC9w+4PjaGz8JJgCKEYXThukzgsWtK+r8EXrcNxzRGrUChUMjW6 MY074AhRcWAqSWctrN1MJIjCx8LdOEOq9dgctEOVQgK4tx3vzRd2qMA5oW1j4WPZtWi6 K6nPLMnKX11lkxf8rmfiEKBuT3s7w48O9yJHNXLjtZJQjtec2krbN3I5v2EXeAQdgIni rmLQqxiNdENVaj9eC8MZGMQ/SAfrtSoFJGCqGruafiBeIkeyhUo6yV+rugrhVb7PRsDj aXEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701963686; x=1702568486; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=g8j2429XEOR82lpcPQODnqDvsRnvGJA7B/V16AaLuiE=; b=Iy3UPbudf7howzKVMI1Ijt0Yvtz8ZpL7VDoxb5QoLRiY/siXoNWXhuqZ5lek9/Cx70 ZeOJN24VNoZBqQ9J5vv5U/U8jxGlaaUIB5OAASrk7u2PX84hvDj2LdQuBRREiheuOyLx 97vLg/fZ1x35EMA/MUvZCDrFU/K4pCIIr7h2nsCGHFeAdLg+MZb8ErQunwwBecQxomLz bivaba/+vskBqRxDgEHIo9S1BJY47I7a58eDRq5hE2MpUSca7WtubO1U0VNDvyljKyoJ +vHErboYy66s5baRnBG3JxERqRB18O85+VMpwlay2mVOkO5/10TySDtxEZ4p52sE0qNL NYxg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOJu0YylZ7OUxhkXum9HuJ+Qd7t0iCc81tfzt22yoQ2O0vs2WWY1Hf0Q BeMCHwTlIX1GiR9NfIJPt1s= X-Google-Smtp-Source: AGHT+IGYF2uVq76DCztkK07p3IORm5GyCqq8WUFt8PHTkyVCkg5ABlT+Ix4ka/b22Ff1XOl4bE9TjA== X-Received: by 2002:a05:6e02:963:b0:35c:b5b2:1b33 with SMTP id q3-20020a056e02096300b0035cb5b21b33mr2851013ilt.16.1701963685208; Thu, 07 Dec 2023 07:41:25 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a92:2812:0:b0:35c:bf23:c627 with SMTP id l18-20020a922812000000b0035cbf23c627ls255263ilf.0.-pod-prod-01-us; Thu, 07 Dec 2023 07:41:24 -0800 (PST) X-Received: by 2002:a92:520c:0:b0:35d:70c7:4c6f with SMTP id g12-20020a92520c000000b0035d70c74c6fmr3355407ilb.49.1701963684314; Thu, 07 Dec 2023 07:41:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701963684; cv=none; d=google.com; s=arc-20160816; b=na2h1jGwcu3kkiESWEpBZNz7+7Julif9b4JnpDM5PAO+PDm8YEy+MqrXM8JglegSY3 nbVLlbo9Ewo1KKsLAD5g18O4/lOUbmiwx4s5S/3c/L4bxzzj8c5YM/K+8bezSebO1wVm LFhARV8VJoRdO4w1FASUZBY0u0WM06NCupp3N4OPxMxstkgmOJvg2Zyw+iUVsmq0jTSU purXO578EEJqWnKasTfYS8W8g19z65VAKpaMW9LsDdOHi6DZwueTGwlGpSx9pZ68QmcR 9nVemTQumh5fp8kzMOg5OT5WfVg4siZVmNro01EckBiohzM+vRIPdUBZjkjkS5OelZKX FM4Q== 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=cV3lPxYfznBf6hMRjjUrlJTFT8OF+M06ph4h+QxyT3Y=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=emqAV6MJIM5qSHb0JIqmDtjERPVVpbEJ3ZdpNePhwaLCSTKXiOB2YshWfbTIx9tGUR re9KrDBKv453qfy1n0ypiyQpZiAG/fZn+xdETHO0hXejzs5wAGCatWNCsfNOd3u2VUyc EH/dT7kH0FXTVJPZyZahY8NnTKkX6SmnPqn7d+mrCHw7Qg85ys9dxDV2N8oM6Wtrk4ah sf9ClU0oTNb/r8vEo74QJIfngctYt1oMVT0p4ACcVvfG2kDPcYHBsECdoaymeeCsr7Io U6grTMbZeabYcOV5wU7tG2FBPwAr2WUX03xV8zpuRlb38Job9dfDnYXso2o1RYw+rKI8 ik7Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.131 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Received: from mo-csw.securemx.jp (mo-csw1120.securemx.jp. [210.130.202.131]) by gmr-mx.google.com with ESMTPS id a8-20020a92a308000000b0035c823a9411si162002ili.3.2023.12.07.07.41.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 07:41:24 -0800 (PST) Received-SPF: pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.131 as permitted sender) client-ip=210.130.202.131; Received: by mo-csw.securemx.jp (mx-mo-csw1120) id 3B7FfLwv214962; Fri, 8 Dec 2023 00:41:21 +0900 X-Iguazu-Qid: 2rWhxbaRURrxdJrF7g X-Iguazu-QSIG: v=2; s=0; t=1701963681; q=2rWhxbaRURrxdJrF7g; m=Ji2sjW5NzqGYXHo3dhSmTxUpHARKe6H6z+ObT9klbRM= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1121) id 3B7FfKHB2748869 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 8 Dec 2023 00:41:21 +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 3/5] wic: use E2FSPROGS_FAKE_TIME and hash_seed to generate reproducible ext4 images Date: Thu, 7 Dec 2023 21:11:12 +0530 X-TSB-HOP2: ON Message-Id: <20231207154114.20400-4-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> References: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 07 Dec 2023 15:41:14.0652 (UTC) FILETIME=[CFBA05C0:01DA2923] 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.131 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.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 E2FSPROGS_FAKE_TIME: sets fixed times for the inodes in the file system. hash_seed: creates reproducible directory indexes in the file system. Reference commit in e2fsprogs: e1f7100643a46456be107b33098f6034b0835e6d Signed-off-by: venkata pyla --- scripts/lib/wic/partition.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index e50871b8..90b2c037 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py @@ -280,6 +280,17 @@ class Partition(): extraopts = self.mkfs_extraopts or "-F -i 8192" + if os.getenv('SOURCE_DATE_EPOCH'): + sde_time = int(os.getenv('SOURCE_DATE_EPOCH')) + pseudo = "export E2FSPROGS_FAKE_TIME=%s;%s" % (sde_time, pseudo) + + # Set hash_seed to generate deterministic directory indexes + namespace = uuid.UUID("e7429877-e7b3-4a68-a5c9-2f2fdf33d460") + if self.fsuuid: + namespace = uuid.UUID(self.fsuuid) + hash_seed = str(uuid.uuid5(namespace, str(sde_time))) + extraopts += " -E hash_seed=%s" % hash_seed + label_str = "" if self.label: label_str = "-L %s" % self.label From patchwork Thu Dec 7 15:41:13 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: 3230 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 07 Dec 2023 16:41:34 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f57.google.com (mail-qv1-f57.google.com [209.85.219.57]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 3B7FfXHs030726 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 7 Dec 2023 16:41:34 +0100 Received: by mail-qv1-f57.google.com with SMTP id 6a1803df08f44-67add991c9bsf12040836d6.1 for ; Thu, 07 Dec 2023 07:41:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701963688; cv=pass; d=google.com; s=arc-20160816; b=kROX4Ooq7S4dj38SYFuHAxneDg9t66oUxUhWk7MIQImx2rGQW1gSG8qkX6hXBXG5Vd zL/2rw3peB1K+tUQleEW68HmYcKNdHzQIwg+PqV7tEjGCYYhHKkEh9pWL72Q7AXFnEZc A2286Zfvc3Aba/eWO/JFXoVZoit95Sayj9XJXdvS6W3FtzLMxySgF6eU9Je+ab4MwPnH +CQ7bxaTA4SWSfQ2tgpwlf/8htOLGY20OEQA7x/y9F/JV31AZIgcxF4XvGF49Qvn6Jhx MhuRyd10TY8ui9LeNvdjE9ZSsuVzDiXZ9w5+cFCZ5B/F1/LDrakiYxtzwIqT4GKiZdbK Z/2g== 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:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=SSTDvyQDGiyXoERjMmCP9DY3rQn60h61OZknFc025jo=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=KTnjO4gYWuc05WE49+fn+/JFzHYzHcffsB60K7PTuZhr4tBLA62i/hyxiQYEwuvoS5 8QopeT9BQjT1YQ/5wv5E4Lm2Z2QwZ2C1Zf5bIrIBi97304F02XTx/OWZnDk+7YWGOGxW rvqOQNvnWXb5tcWDlWTTlrLGEdo1ZsuY7VbVKpBf0kUXxeXKT4zs8/4a69vie/Ip6ifY 3Yvemtm35wrJgT8r6jZcy1gM+kyYWmdgTYYYLq3He3sL5eC2HpOVLK0jsSb9/X6QqMvr P9J18YuYU27BS2AQzDzJRDpXhj7LzX1IhC8MN69FOVJR1P4cDd4todtKIcT5tt1KKVe8 iQNw== 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=1701963688; x=1702568488; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=SSTDvyQDGiyXoERjMmCP9DY3rQn60h61OZknFc025jo=; b=R91XpLH4NeRu023j4MWGu4kR/W8O9YiTIiPwBicp/mLVP5U6nepEZO30dwjo+KpoXW 7CMF37eYYsbqVpP+4TlXnPK+hgE9dMGRyWUuTc9/4PL2lvu3qUkROz9h4yQTyEef6j+o KlY4wsLZwVi2iueYyfRfG27DjWs8j8jwEF4ZC+BULskWoCOacD6U5brKLLNyTsrhGj9Z scPCZxZIzKTNppKb3COka1DBG1XoY0nbCByAJN+imGQwHebW92wXgBlqP+hfCpetGL6c yG9bgvdsX75ZI/Q5QxgGnPAv6Zb7CX67FqaRCnvgPDinOAHgN+ymyYGneG5yCpU+4J9X vetA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701963688; x=1702568488; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=SSTDvyQDGiyXoERjMmCP9DY3rQn60h61OZknFc025jo=; b=CMJkE8VL4uX57Vlw26itwzLJ9hY8bIMAGe05PbZ4EFR5YK7NmYv0M45XyGUy8Prtts SJPl+cesXuCcKTptYDA6FBQoAI0cgBsXMyNPRZhCEqhZ3vAmGc1npchF4MJOYmEUF4y2 IiQ4iDmWcCo0KlIXlGtiisloqRRltApL31plfnnrGe2t+eRuXidaxA9W/j8TWq4BYYjm EQga70pIoNv89zUuyrTT6YalURTwkiDs3W+owWd2dKvN100QQ7CJ6ikBVsV3EKPn815u BuIz0fy5hJdJHUwSCbk1AZsMZy2OOK0BO4jJepLSiPJW6r81qnOKpHkY+CeZmZF7sIMo GE2A== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOJu0YwLauH2/NhT/p12EtIVDtbhmm1uMiGn+w33AJDuqNnPBUCSvVzm tHOsBcCN9mz8UnqicrA6L8M= X-Google-Smtp-Source: AGHT+IGaLZLZCnWUmXf1KGcdseT4OLtOOl+5NRvNwLKXbS2OoOfkdRzlzIroTptEWwA8aTRihAbdzg== X-Received: by 2002:a0c:ed34:0:b0:67a:9cd1:6b18 with SMTP id u20-20020a0ced34000000b0067a9cd16b18mr2585821qvq.48.1701963687944; Thu, 07 Dec 2023 07:41:27 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6214:1242:b0:67a:bf7a:7ba6 with SMTP id r2-20020a056214124200b0067abf7a7ba6ls1190020qvv.1.-pod-prod-01-us; Thu, 07 Dec 2023 07:41:26 -0800 (PST) X-Received: by 2002:a05:6102:511e:b0:464:7c56:d827 with SMTP id bm30-20020a056102511e00b004647c56d827mr3017380vsb.60.1701963686620; Thu, 07 Dec 2023 07:41:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701963686; cv=none; d=google.com; s=arc-20160816; b=YxHiQtSx4pocU6XpMNmbZlhA0bVuzxs8PFC1CWpy+cOSbtR4FdhsSO9IFleKeEMNpM DksOXGgKuN4QSLr4b6Aov9ggExa3eIAHbkqxZSzDusGDiriZQSs8fqWf1w0klGy/9cfL kjTPVRW2yxhgWB1fbX83lxYWrJ9v9gmzAIsB25fgllVDbLAdSI3redaBIaICYECYwD6+ uXU97YX9+l55P2y8bSmLuhPvp9sT4eNQkpKWnfeNqoC3mADWqmReW0ogBwFcBcI344pH 4Wa2ix8wZvqoOpaxzA77NfVLJ3WNcNKtzpTVFaPZIJkRUYV7l/SMUbtnqMi1RV6BsP0T LBlQ== 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=3Jno3Dgkk5+HWp0gRTwL9FCy3cqK4loaRFpvMQkRfK4=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=oGvEpfAhkYZBl14nwfrwgw14bCB/3lfmB/75SF8i3Vr8Zle+mjQIX/So2N+rBHhUes RhuVU+gbbemYjgXclHuhSRZj7tiZp+0oETvN6UnjVPx99MEudWdT9SgFD3u6+kkaKIco lE6VMR3lbh7apX9/s/JbDngbHUFFnBi8MFQme/ZPJ8X5V+Ov8i+c0pVP06uoi3Lea681 wXFKkUplpxFI7ow4Z6qjXWXy/NwoMd05NYyNf7/8moRNm1vCW1A1y7AID3o6bsbvY0eu IWOZCCJHvygAB0C87KgaZ0OKJMTQh8BJCWXSZgIQPI+Wu/EUzNYQsbGOZsO26eZHT2JE dXgA== 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 bq17-20020ab03e11000000b007c56697eaefsi122830uab.1.2023.12.07.07.41.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 07:41:25 -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 3B7FfMd34084148; Fri, 8 Dec 2023 00:41:23 +0900 X-Iguazu-Qid: 2yAbPDmovHUXRs1X5E X-Iguazu-QSIG: v=2; s=0; t=1701963682; q=2yAbPDmovHUXRs1X5E; m=mp+9d9LxgmiyUI6KWA8JFKwGK6pFtuaH5nb3zg8QN+U= Received: from imx12-a.toshiba.co.jp ([38.106.60.135]) by relay.securemx.jp (mx-mr1801) id 3B7FfM1a668078 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 8 Dec 2023 00:41:22 +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 4/5] wic: honor the SOURCE_DATE_EPOCH in case of updated fstab Date: Thu, 7 Dec 2023 21:11:13 +0530 X-TSB-HOP2: ON Message-Id: <20231207154114.20400-5-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> References: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 07 Dec 2023 15:41:14.0667 (UTC) FILETIME=[CFBC4FB0:01DA2923] 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.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 In case user requested to build a binary repeatable package, it's required to honor the SOURCE_DATE_EPOCH environment variable. So forcefully set mtime inside all the routines which modify fstab in case it is updated. Taken from openembedded-core: 99719a3712a88dce8450994d995803e126e49115 Signed-off-by: venkata pyla --- scripts/lib/wic/partition.py | 7 ++++++- scripts/lib/wic/plugins/imager/direct.py | 3 +++ scripts/lib/wic/plugins/source/rootfs.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 90b2c037..44b1277e 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py @@ -305,6 +305,11 @@ class Partition(): f.write("cd etc\n") f.write("rm fstab\n") f.write("write %s fstab\n" % (self.updated_fstab_path)) + if os.getenv('SOURCE_DATE_EPOCH'): + fstab_time = int(os.getenv('SOURCE_DATE_EPOCH')) + for time in ["atime", "mtime", "ctime"]: + f.write("set_inode_field fstab %s %s\n" % (time, hex(fstab_time))) + f.write("set_inode_field fstab %s_extra 0\n" % (time)) debugfs_cmd = "debugfs -w -f %s %s" % (debugfs_script_path, rootfs) exec_native_cmd(debugfs_cmd, native_sysroot) @@ -364,7 +369,7 @@ class Partition(): exec_native_cmd(mcopy_cmd, native_sysroot) if self.updated_fstab_path and self.has_fstab and not self.no_fstab_update: - mcopy_cmd = "mcopy -i %s %s ::/etc/fstab" % (rootfs, self.updated_fstab_path) + mcopy_cmd = "mcopy -m -i %s %s ::/etc/fstab" % (rootfs, self.updated_fstab_path) exec_native_cmd(mcopy_cmd, native_sysroot) chmod_cmd = "chmod 644 %s" % rootfs diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index c44159b2..4d8f9216 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py @@ -149,6 +149,9 @@ class DirectPlugin(ImagerPlugin): self.updated_fstab_path = os.path.join(self.workdir, "fstab") with open(self.updated_fstab_path, "w") as f: f.writelines(fstab_lines) + if os.getenv('SOURCE_DATE_EPOCH'): + fstab_time = int(os.getenv('SOURCE_DATE_EPOCH')) + os.utime(self.updated_fstab_path, (fstab_time, fstab_time)) def _full_path(self, path, name, extention): """ Construct full file path to a file we generate. """ diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index fc06312e..e29f3a4c 100644 --- a/scripts/lib/wic/plugins/source/rootfs.py +++ b/scripts/lib/wic/plugins/source/rootfs.py @@ -224,7 +224,7 @@ class RootfsPlugin(SourcePlugin): if part.update_fstab_in_rootfs and part.has_fstab and not part.no_fstab_update: fstab_path = os.path.join(new_rootfs, "etc/fstab") # Assume that fstab should always be owned by root with fixed permissions - install_cmd = "install -m 0644 %s %s" % (part.updated_fstab_path, fstab_path) + install_cmd = "install -m 0644 -p %s %s" % (part.updated_fstab_path, fstab_path) if new_pseudo: pseudo = cls.__get_pseudo(native_sysroot, new_rootfs, new_pseudo) else: From patchwork Thu Dec 7 15:41:14 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: 3231 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 07 Dec 2023 16:41:35 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-oa1-f59.google.com (mail-oa1-f59.google.com [209.85.160.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 3B7FfXNr030766 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 7 Dec 2023 16:41:34 +0100 Received: by mail-oa1-f59.google.com with SMTP id 586e51a60fabf-1fadd34d7e5sf1897739fac.3 for ; Thu, 07 Dec 2023 07:41:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701963688; cv=pass; d=google.com; s=arc-20160816; b=yXFXZj4ehKCwnt9gS1kRj2cAnheS/y4rR2aAglYtZ87ahtNb0GEazvH2OJIoGmQYh0 +BDlVVoF+OJeg2O7LEx5Hunwg+JvLEKrq3B998jGx140O+yYYqEXy2W1FZsRvaLaxW79 OKNPprD6Vfu5PsEk0k59jHOaqoHCygsmbHYCSySLeAX23m05l9m4yau+0u84val90h8Y ZFVswqt+6WpYCV5rcMWRaDQ8HXd5mHUA4Co0qBburXRdd8VrO98HUmnwC+sMt6BSxDpZ 8bTVTIL9HR+JNpv2dnvC2NcvuaaAy0lz/APEmFEqVLDCIYwwsPXwlTrGlhsB9Z+WiIOo vemg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=+Vm9ALQTC6IQm48rZNVbzNvtwlJKfRUgppP05biAi3M=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=P/gEFTRcf79AzM/R+lKlicebNg/XJO6i0M+V+mGgfyYo9ZcBw7wFR974gpcGJ7JuZy CYAp8FaBF3Cgk6VYbcqLAWx7kWOgZbrZ2KT0JXINawWN97PqnFV7COv+kAB7E/CwG2jc TS8Vxp1r1Fq3BRye3DR3QApU1+j3h6yJHVPT+w5k4BLGesfNgBxcy1MxE2WmkB7xgBnQ gzuWFXRcVfY/8ZLdOOBREVq7C8PBMC9D7GkHG2WNBi0zrzNSHZ6//cD/bvJFEf0r0mja d+cEvFGQ+VGdbwQKU+fohnXupCI+HmKVkvAFqNDpY3bztP7Qt2POiGjrfUSBPmZ8MxuC u2hg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.158 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=1701963688; x=1702568488; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=+Vm9ALQTC6IQm48rZNVbzNvtwlJKfRUgppP05biAi3M=; b=MHm+zphFgSqSn8Q1meos8nsxakTFje7ZW1IBsMSsn9un4Y4JBNm6yBqN4l46OcH/F+ ZtFozje6FlpKzJ9DJMbpldtfcqT0u8pqJi1jGCPhnJrxHDXLAH/GQ2IVdX1PIsFCu896 DVdj6GvbwH9bjDcw+s0F+F/4vkfggp2D0Mwk5btn1EC1mIvBWrbYfdPnQZHDES9uos2u SIwozrwACNyT9wa2C9Byjjg0GdGiz9yo4H1P/Pq5L2OMpAtMyJY2KTpM/BlvDwB7N69q HuL/hjPDYqOfO2s4SDqSDvE1mcUJkbOdYvK6h3mAxFvx7wExvOT3eUPCPpamyrvCxj+S 4RdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701963688; x=1702568488; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=+Vm9ALQTC6IQm48rZNVbzNvtwlJKfRUgppP05biAi3M=; b=jikr3K0dNjl2w4E+pex4pNGxMuq1jfwaVHoRbbh8KBg1tYwsm7jnswH7rGgjWKYIDp SbwO+RnI9d7SUIfOn6QqMgmfr915enJSg7WS74Bw691Cdqd0DbzTjrdtlCkn0Ggkl32H bSbMNyXYI5lxdwg1KOLctI3jenN6Po4P5EbHoj3yizPV9MzxXDyiyG9uHcZFxpEPws8t t4Qo+KjH8Ph8wsFhmubDBTWUsE4F0CXKtP5MrMBqk2sdwvr+3TkWJZwkaRATn3uN1Aa9 Y9h+nWDBihc+1RTxXC9sgyDmGuSLpuSxzwCssNhKNTPFL5ifp6cMHKSRKu1/33CKUsGb GCCw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOJu0YzJJIRD+Rry2jZLbUTI2OXxfsf+byIF1t9wIX9qdLKAMxvPuhyp GSwza5qe/kHmy9H2j0cLigY= X-Google-Smtp-Source: AGHT+IFwt92D2JxnUMgw3R9pDKYxN10SBJgxqA8vBnyLzt594bll9+Q7KWvZrfd+p7ITfVYf/VLurQ== X-Received: by 2002:a05:6870:f286:b0:1fa:f234:660b with SMTP id u6-20020a056870f28600b001faf234660bmr3168318oap.20.1701963688322; Thu, 07 Dec 2023 07:41:28 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6870:c45:b0:1fb:3148:c486 with SMTP id lf5-20020a0568700c4500b001fb3148c486ls890290oab.2.-pod-prod-04-us; Thu, 07 Dec 2023 07:41:27 -0800 (PST) X-Received: by 2002:a05:6871:8a3:b0:1fb:2137:ebcb with SMTP id r35-20020a05687108a300b001fb2137ebcbmr3023711oaq.38.1701963687178; Thu, 07 Dec 2023 07:41:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701963687; cv=none; d=google.com; s=arc-20160816; b=t+1ddqY4ChffXOns9XUPOgF1iROzI7Dk7+XdJyQtpFpx2q+UAVWO2Lwf/gDAY0K1Ej /VzOX+jTpFcsWHXwXxK5ZHAIqJfHdI5/Np/s9eH2BbnSDdosibNbVr2anjrDyVwtT76H /tZRVoMiORx/j6NHywxgPHpIygyxobvlquJg3Jx9w0G6tP4soEYGI5bIMXzwMmaVqiOi TJIon8bag52TU24Ymn4qaOpD5HJJRFPfZ6ZjcASngnke4zOIBVywUAwCEsqNJ1ifOUyO XGT2tnbX9rXtbX2WkAJhCqNSf1iH47Df+HqzjnFF2JiC/VVjTdyAFbw/RCt6JWm49u5a ixLg== 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=JQ02Jxz6K4B+7BPnz2ay1iEjVACGFU2UJjehvwy7ftE=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=pccWTbpaMm5ucomMtorfZO2B0V5vHwPQshaedihbamhJymKiuWiBsILl3haE6otD/x irFuWAUKEejOwKYqhI9yGNBZu4VhmecvSsLC8wn8S8RZaHvfhL7b7nE+1BS8OQfHpQdM dk/vFCi6nR26j7g6MrQw2HBxSgCXIVmuTPDZu0dtqaXwi56DXwjOxNY/sw2W8lc5H33s LoPR5pQiZ9C+55UeIJRM39WYYn1bdduO7Bs7KNjoA/d73DLOvKg132MR7ZrvAtm0J7wy T3hAuNS8gEUL0iTPYwhxpQkfsTsoxs9aW48A3qIn3nqA92dhrifvIininD2brPm79J3a P58g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.158 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Received: from mo-csw.securemx.jp (mo-csw1122.securemx.jp. [210.130.202.158]) by gmr-mx.google.com with ESMTPS id lw12-20020a0568708e0c00b001fab154c144si8130oab.1.2023.12.07.07.41.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 07:41:27 -0800 (PST) Received-SPF: pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.158 as permitted sender) client-ip=210.130.202.158; Received: by mo-csw.securemx.jp (mx-mo-csw1122) id 3B7FfOxA394143; Fri, 8 Dec 2023 00:41:24 +0900 X-Iguazu-Qid: 2rWhVu35FtyT0i2apc X-Iguazu-QSIG: v=2; s=0; t=1701963684; q=2rWhVu35FtyT0i2apc; m=A/vU35dwX+sag7U72XSZCYExOV7EAK1dlKbTq2DSkGw= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1123) id 3B7FfNit2798156 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 8 Dec 2023 00:41:23 +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 5/5] wic: make ext2/3/4 images reproducible Date: Thu, 7 Dec 2023 21:11:14 +0530 X-TSB-HOP2: ON Message-Id: <20231207154114.20400-6-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> References: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 07 Dec 2023 15:41:14.0730 (UTC) FILETIME=[CFC5ECA0:01DA2923] 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.158 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 Ext2/3/4 FS contains not only mtime, but also ctime, atime and crtime. Currently, all the files are being added into the rootfs image using mkfs -d functionality which affects all the timestamps excluding mtime. This patch ensures these timestamps inside the FS image equal to the SOURCE_DATE_EPOCH if it is set. taken from openembedded-core: 75d2dd0ea7790db2e8ee921784ca373abff2df65 Signed-off-by: venkata pyla --- scripts/lib/wic/partition.py | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 44b1277e..e7641c9e 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py @@ -305,17 +305,36 @@ class Partition(): f.write("cd etc\n") f.write("rm fstab\n") f.write("write %s fstab\n" % (self.updated_fstab_path)) - if os.getenv('SOURCE_DATE_EPOCH'): - fstab_time = int(os.getenv('SOURCE_DATE_EPOCH')) - for time in ["atime", "mtime", "ctime"]: - f.write("set_inode_field fstab %s %s\n" % (time, hex(fstab_time))) - f.write("set_inode_field fstab %s_extra 0\n" % (time)) debugfs_cmd = "debugfs -w -f %s %s" % (debugfs_script_path, rootfs) exec_native_cmd(debugfs_cmd, native_sysroot) mkfs_cmd = "fsck.%s -pvfD %s" % (self.fstype, rootfs) exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo) + if os.getenv('SOURCE_DATE_EPOCH'): + sde_time = hex(int(os.getenv('SOURCE_DATE_EPOCH'))) + debugfs_script_path = os.path.join(cr_workdir, "debugfs_script") + files = [] + for root, dirs, others in os.walk(rootfs_dir): + base = root.replace(rootfs_dir, "").rstrip(os.sep) + files += [ "/" if base == "" else base ] + files += [ base + "/" + n for n in dirs + others ] + with open(debugfs_script_path, "w") as f: + f.write("set_current_time %s\n" % (sde_time)) + if self.updated_fstab_path and self.has_fstab and not self.no_fstab_update: + f.write("set_inode_field /etc/fstab mtime %s\n" % (sde_time)) + f.write("set_inode_field /etc/fstab mtime_extra 0\n") + for file in set(files): + for time in ["atime", "ctime", "crtime"]: + f.write("set_inode_field \"%s\" %s %s\n" % (file, time, sde_time)) + f.write("set_inode_field \"%s\" %s_extra 0\n" % (file, time)) + for time in ["wtime", "mkfs_time", "lastcheck"]: + f.write("set_super_value %s %s\n" % (time, sde_time)) + for time in ["mtime", "first_error_time", "last_error_time", "kbytes_written"]: + f.write("set_super_value %s 0\n" % (time)) + debugfs_cmd = "debugfs -w -f %s %s" % (debugfs_script_path, rootfs) + exec_native_cmd(debugfs_cmd, native_sysroot) + self.check_for_Y2038_problem(rootfs, native_sysroot) def prepare_rootfs_btrfs(self, rootfs, cr_workdir, oe_builddir, rootfs_dir,