From patchwork Fri Nov 29 06:28:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adithya Balakumar X-Patchwork-Id: 230 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 29 Nov 2024 07:22:41 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pf1-f186.google.com (mail-pf1-f186.google.com [209.85.210.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AT6MdF5023343 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 29 Nov 2024 07:22:40 +0100 Received: by mail-pf1-f186.google.com with SMTP id d2e1a72fcca58-72501c1609dsf1722734b3a.2 for ; Thu, 28 Nov 2024 22:22:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732861353; cv=pass; d=google.com; s=arc-20240605; b=br7IiYYWttFlfjsgPgvUEekciIBg/C91OQxbuM0kyXxGuvaaXAkIvzjDkMUgb7/V8S ZknT1SaQNOlZOUoE7wzjst8E8P/TudWVQmkTeYMQ9jtCpufto1GO0gLE9y21NsVAUhjE CMTS3NzQDGbafoenjHNZgj0GEXd1+1VZ6TCu0dpjB8T3BbeqIYZbQa8WsO4w1lp2tG+n YFZndkh8nYBwT+XB4aQIuwGoDbrvruhD2lV1qfz91uhps1EKO2dfy/lyXfEa62OvcZVk oyNmWmXclBkujIhCI0mg2lBrWvFyO0l2vRQP4caWnvqfzDNVWuYP7wiYZoGw8UOfJ00i SREg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=ukzSsra7W5kH1E/HCVs+IcRaP8B7ZrkCU3SLMVYuBJg=; fh=gbTiSN2cKN+kY913pXj9xPpfJ3czpAhD1k5JSAv8yyw=; b=UItptGGEzRXeCpPWLyt6x/Ku65jIyHoomhjJ6tQ98uSfhnEhyjo9RsUozsXr3HeAYS 9FBx5kZAYttlinL4RIVovKx6Lru5453aGpsBGvSI8MvDT60QxLiRDiWwL+5uWODkBaF/ ycFEZGvXXK2uxKeQstfGIy7YOL7WKV4tlxKDOHTsnIPLHxU5RO258KIjsbV8Ta49pAGN 0GVjOXHwTGjU23Ln0P8J7FUx3QcELLpXzaij03ukhepfCH/cnVuWq7lW4r6REHqEpDAd AJOC/LiLCV1Cnis+9uqorDkiP21HCCb37dooo+WGU8YtHbluIC08Ga6ylLcJJ9Ql9dJP qkZQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of adithya.balakumar@toshiba-tsip.com designates 210.130.202.135 as permitted sender) smtp.mailfrom=Adithya.Balakumar@toshiba-tsip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1732861353; x=1733466153; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=ukzSsra7W5kH1E/HCVs+IcRaP8B7ZrkCU3SLMVYuBJg=; b=wrKCRbhvH2edId451XQOE1uT+WZEThqLTOIo7IIew5uoL+fZmDNbRCyNYQV2D9r/u/ AcODpJ+f8faAiQhCKmjxnBl8z97I6D97qDZIIrNY4Fj4XVJRueG1zcfCmdaxxeGSQQ4/ T69xM8MZxWDOtm0r3v7hqy37ILro0jpTqZ9Kt09/DspYy4+5WDWdG5n8aWwV4ch2C9SZ cDUTg5uoDEdxCCdqB57cEgTPuOzfR93KkQQ34k5qQOrsUMb8gJIWvpB25/7X8RGO/m1b f7Xnghj9cLU6MEoaUDhuHsUoL869o8HB4OheI5U4PT21FsksGLMi+rMpanLN89Za3NgH qCRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732861353; x=1733466153; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=ukzSsra7W5kH1E/HCVs+IcRaP8B7ZrkCU3SLMVYuBJg=; b=MmDV0i3P+H/FxMlY3lJqWIQQmn9vvdF6DDHAJui3ICSvRfxI+yzp1Ak4PSo+x4a521 AnIk2Y7Q62jyygP32IpMO/pzhUp0aCjWZXAWzxQlzGE+Mgn1vxPAp6RUPGVbc//PkNf3 PxVwnxSEOsjEE/WxsRPWsF7/lyZrQrdnh5VYkl2me/7Nep/uI9XD4+cNwFXoISb5S5av Cr3570yQNc0adWqDY3GqQL8u9zqnwyrTHl3EtH2aRWswXI7QC1rAa/zl5Ad7YVS6fTRO VH5hMnqnHhbPqUgLQE8KinHPX8iyexi0QlSyzjR2bRWyuZY0yUDeh+0qq5L46BYTI96J ktGQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWVQjNkIy+vAFNIAhRDULf1Nrm0QQ84Wxx32aLeji8X9aBk3YRDWG7ldBkhchzPZBHHAnL2w6I=@isar-build.org X-Gm-Message-State: AOJu0YzhPo6YlXwMOSkMfcs2XuPltZltVlmbO3+0Ws+ze8gTOUko123Y o58m9+0lHSCiOdJy2wrEowk4gOq0DqR4JME2bJ8D5R7Ge0dWuZJQ X-Google-Smtp-Source: AGHT+IF2jtJrcqYAPCYv8j+KA+HGxVi31S8mQGkq1hJo61GPHR5zb6BaZqe3ImRL6dFcTDFHt70Qfg== X-Received: by 2002:a17:90b:3805:b0:2ea:356f:51b3 with SMTP id 98e67ed59e1d1-2ee08e9e80fmr13204963a91.9.1732861353116; Thu, 28 Nov 2024 22:22:33 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:ec8e:b0:2e0:82fe:e3ef with SMTP id 98e67ed59e1d1-2ee25e65384ls1434656a91.2.-pod-prod-09-us; Thu, 28 Nov 2024 22:22:31 -0800 (PST) X-Received: by 2002:a17:90b:1d81:b0:2ea:4e9e:df87 with SMTP id 98e67ed59e1d1-2ee08eb62b0mr12591102a91.19.1732861351612; Thu, 28 Nov 2024 22:22:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732861351; cv=none; d=google.com; s=arc-20240605; b=Bh+Uy0KxvrjVvUoJBaqdtJDxFK9dSXFCj7Jib78fR3VqqsA+cd7LF6tMwstcAYCyPx 4mEC9Smu68BL7RXnZ1EH64GIaHXaI4ZNvn1ptoYzzjx5L5o3UixbYeFMsNDHGgGl5HAC zYnjLXhYPR8Pi8OGYZiSWzIMgxaUE+KBrQOEHXuwjzm7CRpa+xbltoAPkpQq1uJQ93VI ding2Xee/6BRcmtKKHsi4SdDexJStSbyeUYNI4RKloiHkFOBQCkCdqZvkORKLpRFNlBB MqGuAU2bwStGh8ZJheq8WLyWDbOBO534fn7BBi9xJQECExCLV7Yzpeqw8L+h3Dxq6cyr kdVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=shp7HH25X1qv3HRWXbRYVX7eY2WcsJIOM11eHS/06aY=; fh=95wLIF1hw/zIpqq2Ec+GyUgTsRZ8XfjQM59TjRw6kJk=; b=dQXCuGPHHsm5TaRktWsebR+S+VCkDeJac6dEvaImMJDJCHIF4ciivuxq50v73trWMw 5es90fpSP+zmRSP1tXm1ENTfcU99YMD31WjckfX+DIH0P2lzBUklWM3go2wy72vin3HU Z2MSpRhnSejebrCNP795TyOPwRj633JgfpHn6qT5+4/oFycuzAgbfpaQakhp49JKNeeR UXBtUs6GqObNkZYauxIUsuWTiyumKNUqf3Jxc3IKPE0O7x1Uw5nVKy3Z0tQx99kJ7phj AQOCdxpHR43fCmTf30nC4aoD0twuLmdYDqzrxIUqvzjLeh9r2bg/EQFu/LBYJAo0Wb+S 7GXg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of adithya.balakumar@toshiba-tsip.com designates 210.130.202.135 as permitted sender) smtp.mailfrom=Adithya.Balakumar@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 98e67ed59e1d1-2ee0532c1dfsi744720a91.1.2024.11.28.22.22.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2024 22:22:31 -0800 (PST) Received-SPF: pass (google.com: domain of adithya.balakumar@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 4AT6MTNf1652653; Fri, 29 Nov 2024 15:22:29 +0900 X-Iguazu-Qid: 2yAaY9rKx41uWLW0Xp X-Iguazu-QSIG: v=2; s=0; t=1732861349; q=2yAaY9rKx41uWLW0Xp; m=jzvNqh5IqbFzvd3eeCZ7NifYevspP6OoV6El2cVpGJ8= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1800) id 4AT6MSOA1226973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 29 Nov 2024 15:22:29 +0900 From: Adithya Balakumar To: isar-users@googlegroups.com Cc: jan.kiszka@siemens.com, kazuhiro3.hayashi@toshiba.co.jp, dinesh.kumar@toshiba-tsip.com, shivanand.kunijadar@toshiba-tsip.com, sai.sathujoda@toshiba-tsip.com, adithya.balakumar@toshiba-tsip.com Subject: [PATCH v1 0/1] Use oe.utils.directory_size() instead of du for calculating rootfs size Date: Fri, 29 Nov 2024 11:58:25 +0530 X-TSB-HOP2: ON Message-Id: <20241129062827.527177-1-Adithya.Balakumar@toshiba-tsip.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-OriginalArrivalTime: 29 Nov 2024 06:22:26.0543 (UTC) FILETIME=[0F4D17F0:01DB4227] X-Original-Sender: adithya.balakumar@toshiba-tsip.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of adithya.balakumar@toshiba-tsip.com designates 210.130.202.135 as permitted sender) smtp.mailfrom=Adithya.Balakumar@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=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, 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?= Currently the "du" command is used to calculate the rootfs size, and sometimes the reported size of the rootfs by du varies across multiple builds (usually by a few kb). But the rootfs contents are reproducible. Although this does not affect any functionality, but it does affect reproducibility of artifacts that rely on the calculated rootfs size. There are 2 scenarios (that I noticed) where this is affects reproducibility: 1. In the case where no size parameter is set for a rootfs partition in the wks file, wic uses the calculated rootfs size. 2. ext4 filesystem images with the IMAGE_CMD of isar, relies on rootfs size to create image. Some of the files/directories in the rootfs has different number of blocks allocated. The files/directories affected are not always the same across builds. Using the "du" command to measure the size of the rootfs directory in such a case, yields different values for the ROOTFS_SIZE. This patch introduces the use of an alternate function from oe.utils to calculate the directory size. OE-Core uses the same function to calculate the directory size (See [1]) Based on multiple build runs, usage of this function seems to give consistent size results. Some details on the issue is mentioned in the below thread in the ISAR mailing list (See [2]) [1] https://github.com/openembedded/openembedded-core/commit/d8f1f3a6b024a2ae6631d1ce25421e8d94b69a12 [2] https://groups.google.com/g/isar-users/c/Ll7t4G41Lfo/m/gvxR4hYBAwAJ Adithya Balakumar (1): image.bbclass: use oe.utils.directory_size() instead of du meta/classes/image.bbclass | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)