From: "MOESSBAUER, Felix" <felix.moessbauer@siemens.com>
To: "isar-users@googlegroups.com" <isar-users@googlegroups.com>,
"vijaikumar.kanagarajan@gmail.com"
<vijaikumar.kanagarajan@gmail.com>
Subject: Re: [PATCH 1/2] rootfs.bbclass: clean blkid cache files from rootfs
Date: Thu, 31 Aug 2023 06:16:38 +0000 [thread overview]
Message-ID: <e0a69e4a80d78de84e620d9b9e7e88af14c5c644.camel@siemens.com> (raw)
In-Reply-To: <6340d949-acc1-4283-9713-01f584686929n@googlegroups.com>
On Mon, 2023-08-07 at 09:58 -0700, vijai kumar wrote:
>
>
> On Monday, August 7, 2023 at 10:05:21 PM UTC+5:30
> venkat...@toshiba-tsip.com wrote:
> > From: venkata pyla <venkat...@toshiba-tsip.com>
> >
> > Sometimes `blkid` generates cached files `/run/blkid/blkdid.tab*`,
> > these
> > 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.bbclass
> > 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
> > }
> >
> > +ROOTFS_POSTPROCESS_COMMAND +=
> > "rootfs_postprocess_clean_blkid_cache"
> > +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 function, can we not move to
> rootfs_finalize? Or maybe adding it to ROOTFS_CLEAN_FILES?
Why is the /run dir included at all? It will be over-mounted with a
tmpfs at runtime (when using systemd) and by that we could also clear
it. For non systemd use-cases like the containers, the content of that
directory is also not needed.
For details, see
https://www.freedesktop.org/software/systemd/man/file-hierarchy.html#/run/
Felix
>
> Thanks,
> Vijai Kumar K
>
> > +
> > do_rootfs_postprocess[vardeps] = "${ROOTFS_POSTPROCESS_COMMAND}"
> > do_rootfs_postprocess[network] = "${TASK_USE_SUDO}"
> > python do_rootfs_postprocess() {
> > --
> > 2.20.1
> >
> >
next prev parent reply other threads:[~2023-08-31 6:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 16:35 [PATCH 0/2] Fix reproducible issues in armhf venkata.pyla
2023-08-07 16:35 ` [PATCH 1/2] rootfs.bbclass: clean blkid cache files from rootfs venkata.pyla
2023-08-07 16:58 ` vijai kumar
2023-08-09 4:05 ` Venkata.Pyla
2023-08-09 13:47 ` [PATCH v2 0/2] Fix reproducible issues in armhf venkata.pyla
2023-08-14 11:57 ` vijai kumar
2023-08-15 14:59 ` Uladzimir Bely
2023-08-09 13:47 ` [PATCH v2 1/2] image.bbclass: remove core files generated in rootfs venkata.pyla
2023-08-09 13:47 ` [PATCH v2 2/2] image.bbclass: clean blkid cache files from rootfs venkata.pyla
2023-08-31 6:16 ` MOESSBAUER, Felix [this message]
2023-08-07 16:35 ` [PATCH 2/2] image.bbclass: remove core files generated in rootfs venkata.pyla
2023-08-31 6:21 ` MOESSBAUER, Felix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e0a69e4a80d78de84e620d9b9e7e88af14c5c644.camel@siemens.com \
--to=felix.moessbauer@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=vijaikumar.kanagarajan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox