From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7264619869010657280 X-Received: by 2002:a05:6214:3102:b0:63c:fe60:4c84 with SMTP id ks2-20020a056214310200b0063cfe604c84mr9363620qvb.37.1691427530547; Mon, 07 Aug 2023 09:58:50 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a0c:f0c1:0:b0:635:a666:7535 with SMTP id d1-20020a0cf0c1000000b00635a6667535ls3471633qvl.2.-pod-prod-00-us; Mon, 07 Aug 2023 09:58:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG0Fb4t9uvrbPBds9/05IDnt+MYXMJxORcYHYBg+DM8Jy0U0Re2KnZyyQecZamHJqkwbnN7DKH78Q== X-Received: by 2002:ad4:4e32:0:b0:63c:f62c:45dd with SMTP id dm18-20020ad44e32000000b0063cf62c45ddmr45832qvb.5.1691427529275; Mon, 07 Aug 2023 09:58:49 -0700 (PDT) X-Google-Web-Client: true Date: Mon, 7 Aug 2023 09:58:49 -0700 (PDT) From: vijai kumar To: isar-users Message-Id: <6340d949-acc1-4283-9713-01f584686929n@googlegroups.com> In-Reply-To: <20230807163512.19570-2-venkata.pyla@toshiba-tsip.com> References: <20230807163512.19570-1-venkata.pyla@toshiba-tsip.com> <20230807163512.19570-2-venkata.pyla@toshiba-tsip.com> Subject: Re: [PATCH 1/2] rootfs.bbclass: clean blkid cache files from rootfs MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_58956_1706821439.1691427529033" X-TUID: AJ+oIxpsJEpQ ------=_Part_58956_1706821439.1691427529033 Content-Type: multipart/alternative; boundary="----=_Part_58957_1807048419.1691427529033" ------=_Part_58957_1807048419.1691427529033 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Monday, August 7, 2023 at 10:05:21=E2=80=AFPM UTC+5:30=20 venkat...@toshiba-tsip.com wrote: From: venkata pyla =20 Sometimes `blkid` generates cached files `/run/blkid/blkdid.tab*`, these=20 cache files are not reproducible and not necessary in the final image,=20 so remove them to achieve reproducible builds.=20 Signed-off-by: venkata pyla =20 ---=20 meta/classes/rootfs.bbclass | 6 ++++++=20 1 file changed, 6 insertions(+)=20 diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass=20 index 22449d71..5d493ea2 100644=20 --- a/meta/classes/rootfs.bbclass=20 +++ b/meta/classes/rootfs.bbclass=20 @@ -293,6 +293,12 @@ rootfs_export_dpkg_status() {=20 '${ROOTFS_DPKGSTATUS_DEPLOY_DIR}'/'${ROOTFS_PACKAGE_SUFFIX}'.dpkg_status=20 }=20 +ROOTFS_POSTPROCESS_COMMAND +=3D "rootfs_postprocess_clean_blkid_cache"=20 +rootfs_postprocess_clean_blkid_cache() {=20 + # blkid generates cache file which are not reproducible=20 + sudo rm -rf "${ROOTFSDIR}/run/blkid/blkid.tab"*=20 +}=20 If this is a necessary clean up function, can we not move to=20 rootfs_finalize? Or maybe adding it to ROOTFS_CLEAN_FILES? Thanks, Vijai Kumar K =20 +=20 do_rootfs_postprocess[vardeps] =3D "${ROOTFS_POSTPROCESS_COMMAND}"=20 do_rootfs_postprocess[network] =3D "${TASK_USE_SUDO}"=20 python do_rootfs_postprocess() {=20 --=20 2.20.1=20 ------=_Part_58957_1807048419.1691427529033 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

On Monday, August 7, 2023 at 10:05:21=E2= =80=AFPM UTC+5:30 venkat...@toshiba-tsip.com wrote:
From: venkata pyla <venkat...@toshiba-tsip.com>

Sometimes `blkid` generates cached files `/run/blkid/blkdid.tab*`, th= ese
cache files are not reproducible and not necessary in the final image= ,
so remove them to achieve reproducible builds.

Signed-off-by: venkata pyla <venkat.= ..@toshiba-tsip.com>
---
meta/classes/rootfs.bbclass | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclas= s
index 22449d71..5d493ea2 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -293,6 +293,12 @@ rootfs_export_dpkg_status() {
'${ROOTFS_DPKGSTATUS_DEPLOY_DIR}'/'${ROOTFS_PACKAGE_SUFFIX}'.= dpkg_status
}
=20
+ROOTFS_POSTPROCESS_COMMAND +=3D "rootfs_postprocess_clean_blkid_cach= e"
+rootfs_postprocess_clean_blkid_cache() {
+ # blkid generates cache file which are not reproducible
+ sudo rm -rf "${ROOTFSDIR}/run/blkid/blkid.tab"*
+}

If this is a necessary clean up fu= nction, can we not move to rootfs_finalize? Or maybe adding it to ROOTFS_CL= EAN_FILES?

Thanks,
Vijai Kumar K
=
=C2=A0
+
do_rootfs_postprocess[vardeps] =3D "${ROOTFS_POSTPROCESS_COMMAND}"
do_rootfs_postprocess[network] =3D "${TASK_USE_SUDO}"
python do_rootfs_postprocess() {
--=20
2.20.1


------=_Part_58957_1807048419.1691427529033-- ------=_Part_58956_1706821439.1691427529033--