]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
make.sh: Always mount a separate /tmp
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Jul 2024 17:54:08 +0000 (17:54 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 8 Jul 2024 15:39:43 +0000 (15:39 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index 47281ffc34daaa7e6ceb569005ed67ebb3d3b2df..34b688979ca60cdfbe3d7f20c59dbca625eac2ab 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -412,16 +412,12 @@ prepareenv() {
 
        # Make some extra directories
        mkdir -p "${BASEDIR}/build${TOOLS_DIR}" 2>/dev/null
-       mkdir -p $BASEDIR/build/{etc,usr/src} 2>/dev/null
-       mkdir -p $BASEDIR/build/{dev/{shm,pts},proc,sys}
+       mkdir -p $BASEDIR/build/{etc,usr/src,tmp} 2>/dev/null
        mkdir -p $BASEDIR/{cache,ccache/${BUILD_ARCH}/${TOOLCHAINVER}} 2>/dev/null
 
        if [ "${ENABLE_RAMDISK}" = "on" ]; then
                mkdir -p $BASEDIR/build/usr/src
                mount -t tmpfs tmpfs -o size=8G,nr_inodes=1M,mode=1777 $BASEDIR/build/usr/src
-
-               mkdir -p ${BASEDIR}/build/tmp
-               mount -t tmpfs tmpfs -o size=4G,nr_inodes=1M,mode=1777 ${BASEDIR}/build/tmp
        fi
 
        mkdir -p $BASEDIR/build/usr/src/{cache,config,doc,html,langs,lfs,log,src,ccache}
@@ -475,6 +471,10 @@ prepareenv() {
        mount build_dev_shm "${BUILD_DIR}/dev/shm" \
                -t tmpfs -o "nosuid,nodev,strictatime,mode=1777,size=1024m"
 
+       # Mount a new /tmp
+       mount build_tmp "${BUILD_DIR}/tmp" \
+               -t tmpfs -o "nosuid,nodev,strictatime,size=4G,nr_inodes=1M,mode=1777"
+
        # Make all sources and proc available under lfs build
        mount --bind /sys            $BASEDIR/build/sys
        mount --bind $BASEDIR/cache  $BASEDIR/build/usr/src/cache