buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
From: Norbert Lange <nolange79@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] fs: clean the volatile /run and /tmp directories
Date: Sun, 7 Jun 2020 00:57:23 +0200	[thread overview]
Message-ID: <CADYdroO8PNfE=Cmd96rE-Kfd_nTq_7+h-JLdH-uUPGP3GmsBqg@mail.gmail.com> (raw)
In-Reply-To: <20200606224227.60a26aeb@windsurf>

Am Sa., 6. Juni 2020 um 22:42 Uhr schrieb Thomas Petazzoni
<thomas.petazzoni@bootlin.com>:
>
> Hello,
>
> On Sat,  6 Jun 2020 00:48:57 +0200
> Norbert Lange <nolange79@gmail.com> wrote:
>
> > Scripts in the fakeroot environment could call
> > tools preparing the early environment, leaving
> > traces in /run or /tmp.
> >
> > mkusers might create home directories in /run for
> > example.
> >
> > Signed-off-by: Norbert Lange <nolange79@gmail.com>
>
> Looping Yann on this. I agree that we definitely want /tmp and /run to
> be empty, as we are anyway going to mount a tmpfs over them, so
> whatever they contains is not visible on the target system, but takes
> up some space on the filesystem.
>
> However, I'm not sure if removing all what they contain is the right
> approach. Shouldn't we avoid creating things in /tmp and /run in the
> first place ?

Yeah we should avoid creating stuff there, but it's sometimes hard to do.
One example is defining a user with home dir in /run, mkusers will
then create a dir there
(pretty late to clear it up otherwise)

More important would be tools that lazily create stuff on the first boot,
and either buildroot or a custom fakeroot stage script would run this
on the host instead (worstcase in some sort of container/chroot).


>
> Yann, any feedback on this ?
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Norbert

  reply	other threads:[~2020-06-06 22:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 22:48 [Buildroot] [PATCH 1/2] Makefile: remove /usr/lib/rpm directory on target Norbert Lange
2020-06-05 22:48 ` [Buildroot] [PATCH 2/2] fs: clean the volatile /run and /tmp directories Norbert Lange
2020-06-06 20:42   ` Thomas Petazzoni
2020-06-06 22:57     ` Norbert Lange [this message]
2020-06-07  8:47       ` Thomas Petazzoni
2020-06-07 18:41         ` Norbert Lange
2020-06-10 22:55           ` Norbert Lange
2022-01-09  9:11   ` Arnout Vandecappelle
2020-06-06 20:39 ` [Buildroot] [PATCH 1/2] Makefile: remove /usr/lib/rpm directory on target Thomas Petazzoni
2020-06-06 22:51   ` Norbert Lange
2020-06-07 18:43     ` Norbert Lange

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='CADYdroO8PNfE=Cmd96rE-Kfd_nTq_7+h-JLdH-uUPGP3GmsBqg@mail.gmail.com' \
    --to=nolange79@gmail.com \
    --cc=buildroot@busybox.net \
    /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;
as well as URLs for NNTP newsgroup(s).