From 1995c4ef16bc6a50a82ea95ba070ea17a86d8b31 Mon Sep 17 00:00:00 2001 From: Florian Wilhelm <2292245+fwilhe@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:45:30 +0100 Subject: [PATCH] Increase size of temp fs This allows for some larger images to be built without 'no space left on device' issues. --- builder/bootstrap | 2 +- builder/configure | 2 +- builder/configure_nativetools | 2 +- builder/image | 2 +- builder/image.d/makepart | 4 ++-- builder/image.d/makesecureboot | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/builder/bootstrap b/builder/bootstrap index bc8cde4..c157670 100755 --- a/builder/bootstrap +++ b/builder/bootstrap @@ -9,7 +9,7 @@ keyring="$(realpath "$4")" output="$5" chroot_dir="$(mktemp -d)" -mount -t tmpfs -o size=2G tmpfs "$chroot_dir" +mount -t tmpfs -o size=4G tmpfs "$chroot_dir" chmod 755 "$chroot_dir" container=lxc debootstrap --keyring "$keyring" --arch "$arch" --variant minbase "$version" "$chroot_dir" "$repo" trixie || (cat "$chroot_dir/debootstrap/debootstrap.log"; false) diff --git a/builder/configure b/builder/configure index b79d762..7708334 100755 --- a/builder/configure +++ b/builder/configure @@ -9,7 +9,7 @@ output="$3" IFS=',' read -r -a features <<< "$BUILDER_FEATURES" chroot_dir="$(mktemp -d)" -mount -t tmpfs -o size=2G tmpfs "$chroot_dir" +mount -t tmpfs -o size=4G tmpfs "$chroot_dir" chmod 755 "$chroot_dir" chcon system_u:object_r:unlabeled_t:s0 "$chroot_dir" diff --git a/builder/configure_nativetools b/builder/configure_nativetools index 6b0c664..2f9967c 100755 --- a/builder/configure_nativetools +++ b/builder/configure_nativetools @@ -9,7 +9,7 @@ shift 2 touch "$output" chroot_dir="$(mktemp -d)" -mount -t tmpfs -o size=2G tmpfs "$chroot_dir" +mount -t tmpfs -o size=4G tmpfs "$chroot_dir" chmod 755 "$chroot_dir" chcon system_u:object_r:unlabeled_t:s0 "$chroot_dir" diff --git a/builder/image b/builder/image index 798ae16..c65a7c3 100755 --- a/builder/image +++ b/builder/image @@ -35,7 +35,7 @@ echo "---------------" image="$(mktemp -u)" chroot_dir="$(mktemp -d)" -mount -t tmpfs -o size=2G tmpfs "$chroot_dir" +mount -t tmpfs -o size=4G tmpfs "$chroot_dir" tar --extract --xattrs --xattrs-include '*' --directory "$chroot_dir" < "$input" (export PATH="/builder/image.d:$PATH"; makepart "$chroot_dir" < "$fstab" | makedisk "$chroot_dir" "$image") diff --git a/builder/image.d/makepart b/builder/image.d/makepart index 6386af5..ed4f98e 100755 --- a/builder/image.d/makepart +++ b/builder/image.d/makepart @@ -9,7 +9,7 @@ exec 1>&2 rootfs="$1" rootfs_work=$(mktemp -d) -mount -t tmpfs -o size=2G tmpfs "$rootfs_work" +mount -t tmpfs -o size=4G tmpfs "$rootfs_work" cp -a "$rootfs/." "$rootfs_work" fstab="$(mktemp)" @@ -143,7 +143,7 @@ sed 's/#.*//;/^[[:space:]]*$/d' \ [ ! -e "$rootfs/builder" ] mkdir "$rootfs/builder" mount --rbind --make-rprivate /builder "$rootfs/builder" - mount -t tmpfs -o size=2G none "$rootfs/tmp" + mount -t tmpfs -o size=4G none "$rootfs/tmp" [[ "$data_source" == /tmp* ]] [ "$(dirname "$file")" = /tmp ] mkdir -p "$rootfs$data_source" diff --git a/builder/image.d/makesecureboot b/builder/image.d/makesecureboot index b362849..8cd5262 100755 --- a/builder/image.d/makesecureboot +++ b/builder/image.d/makesecureboot @@ -69,7 +69,7 @@ mount --rbind /dev "$rootfs/dev" kernel_file=$(find "$rootfs/boot/" -name 'vmlinuz-*') kernel_version="${kernel_file#*-}" -unshare --user --map-root-user --mount -- bash -c 'mount -t tmpfs -o size=2G tmpfs '"$rootfs/var/tmp"' && mount -t tmpfs -o size=2G tmpfs /sys && mount --bind /usr/bin/false /usr/bin/systemd-detect-virt && "$@"' -- \ +unshare --user --map-root-user --mount -- bash -c 'mount -t tmpfs -o size=4G tmpfs '"$rootfs/var/tmp"' && mount -t tmpfs -o size=4G tmpfs /sys && mount --bind /usr/bin/false /usr/bin/systemd-detect-virt && "$@"' -- \ chroot "$rootfs" env dracut \ --no-hostonly \ --force \