* [gentoo-catalyst] [PATCH 1/2] Call systemd-tmpfiles when the chroot is set up (stable branch)
@ 2022-01-17 14:43 Andreas K. Hüttel
2022-01-17 14:43 ` [gentoo-catalyst] [PATCH 2/2] Make a proper /run (and more) also in stage1 /tmp/stage1root Andreas K. Hüttel
0 siblings, 1 reply; 2+ messages in thread
From: Andreas K. Hüttel @ 2022-01-17 14:43 UTC (permalink / raw
To: gentoo-catalyst; +Cc: Andreas K. Hüttel
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
targets/support/chroot-functions.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index f3727d06..5bf7b1ca 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -242,6 +242,14 @@ update_env_settings(){
[ -f /tmp/envscript ] && source /tmp/envscript
}
+update_tmpfiles() {
+ # if ROOT is unset, make sure it becomes "/"
+ [ -x /bin/systemd-tmpfiles ] && \
+ echo "Setting up tmpfiles in ${ROOT:-/} ..." && \
+ /bin/systemd-tmpfiles --remove --create --boot "--root=${ROOT:-/}" \
+ --exclude-prefix=/dev --exclude-prefix=/proc --exclude-prefix=/sys
+}
+
die() {
echo "$1"
exit 1
@@ -324,6 +332,7 @@ run_default_funcs() {
if [ "${RUN_DEFAULT_FUNCS}" != "no" ]
then
update_env_settings
+ update_tmpfiles
setup_myfeatures
show_debug
fi
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-catalyst] [PATCH 2/2] Make a proper /run (and more) also in stage1 /tmp/stage1root
2022-01-17 14:43 [gentoo-catalyst] [PATCH 1/2] Call systemd-tmpfiles when the chroot is set up (stable branch) Andreas K. Hüttel
@ 2022-01-17 14:43 ` Andreas K. Hüttel
0 siblings, 0 replies; 2+ messages in thread
From: Andreas K. Hüttel @ 2022-01-17 14:43 UTC (permalink / raw
To: gentoo-catalyst; +Cc: Andreas K. Hüttel
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
targets/stage1/stage1-chroot.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh
index 99539886..27389620 100755
--- a/targets/stage1/stage1-chroot.sh
+++ b/targets/stage1/stage1-chroot.sh
@@ -52,6 +52,11 @@ fi
[ -e ${clst_make_conf} ] && ${clst_sed} -i -e "/^USE=\"${BINDIST} ${USE}\"/d" ${clst_make_conf}
make_destpath /tmp/stage1root
+# Set up /run and its contents inside stage1root, see bug 816303
+make_destpath /tmp/stage1root/run
+mount -t tmpfs stage1run /tmp/stage1root/run || die
+ROOT=/tmp/stage1root update_tmpfiles
+
## START BUILD
# First, we drop in a known-good baselayout
[ -e ${clst_make_conf} ] && echo "USE=\"${USE} -build\"" >> ${clst_make_conf}
@@ -97,3 +102,6 @@ done
# Clear USE
[ -e ${clst_make_conf} ] && ${clst_sed} -i -e "/^CATALYST_USE/d" ${clst_make_conf}
[ -e ${clst_make_conf} ] && ${clst_sed} -i -e "/^USE=\"/s/\${CATALYST_USE} ${USE} ${BOOTSTRAP_USE}//" ${clst_make_conf}
+
+# Remove run tmpfs again, bug 816303
+umount /tmp/stage1root/run || die
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-17 14:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-17 14:43 [gentoo-catalyst] [PATCH 1/2] Call systemd-tmpfiles when the chroot is set up (stable branch) Andreas K. Hüttel
2022-01-17 14:43 ` [gentoo-catalyst] [PATCH 2/2] Make a proper /run (and more) also in stage1 /tmp/stage1root Andreas K. Hüttel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox