diff mbox series

[08/11] build-appliance-image: use a real /tmp

Message ID 20230221204445.23931-9-twoerner@gmail.com
State New
Headers show
Series build-appliance-image revival | expand

Commit Message

Trevor Woerner Feb. 21, 2023, 8:44 p.m. UTC
Make /tmp a real directory in the root filesystem and not a link to an
in-memory tmpfs. Otherwise bitbake will run out of inodes on /tmp very quickly
and stop any build.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 meta/recipes-core/images/build-appliance-image_15.0.0.bb | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index 3a84de0a2b43..1f7b96a9fcf4 100644
--- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb
+++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -113,6 +113,12 @@  fakeroot do_tweak_image () {
 	# add a /lib64 symlink
 	# this is needed for building rust-native on a 64-bit build appliance
 	ln -rs ${IMAGE_ROOTFS}/lib ${IMAGE_ROOTFS}/lib64
+
+	# make /tmp a real directory and not a link to an in-memory tmpfs
+	# otherwise /tmp will run out of inodes very quickly when bitbaking
+	sed -i -e 's#l root root 1777 /tmp /var/tmp#d root root 1777 /tmp none#' ${IMAGE_ROOTFS}/etc/default/volatiles/00_core
+	mkdir -p ${IMAGE_ROOTFS}/tmp
+	chmod 1777 ${IMAGE_ROOTFS}/tmp
 }
 
 IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; do_tweak_image; "