From: Norbert Lange <nolange79@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] fs: clean the volatile /run and /tmp directories
Date: Sat, 6 Jun 2020 00:48:57 +0200 [thread overview]
Message-ID: <20200605224858.12870-2-nolange79@gmail.com> (raw)
In-Reply-To: <20200605224858.12870-1-nolange79@gmail.com>
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>
---
fs/common.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/common.mk b/fs/common.mk
index 842ea924a5..a5c6b4ea96 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -171,6 +171,7 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),\
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
+ echo "rm -rf $$(TARGET_DIR)/run/* $$(TARGET_DIR)/run/.[^.]* $$(TARGET_DIR)/tmp/* $$(TARGET_DIR)/tmp/.[^.]*" >> $$(FAKEROOT_SCRIPT)
$$(call PRINTF,$$(ROOTFS_REPRODUCIBLE)) >> $$(FAKEROOT_SCRIPT)
$$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT)
chmod a+x $$(FAKEROOT_SCRIPT)
--
2.26.2
next prev parent reply other threads:[~2020-06-05 22:48 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 ` Norbert Lange [this message]
2020-06-06 20:42 ` [Buildroot] [PATCH 2/2] fs: clean the volatile /run and /tmp directories Thomas Petazzoni
2020-06-06 22:57 ` Norbert Lange
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=20200605224858.12870-2-nolange79@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