From da991262a33a5d6e8b55b1c9e5c18d09df65cce5 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 5 Sep 2023 01:39:36 +0100 Subject: build/release/roms: use tmp/romdir, not TMPDIR we must conserve memory usage, in the event that the user's /tmp is a tmpfs. copying of ROM images into tmpfs is ill advised; we must copy them, due to how the release process works (e.g. stripping of blobs, but this must be done in a way so as to not interfere with regular builds, thus they are copied instead) Signed-off-by: Leah Rowe --- script/build/release/roms | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script') diff --git a/script/build/release/roms b/script/build/release/roms index 10c0d6b2..500bdcfc 100755 --- a/script/build/release/roms +++ b/script/build/release/roms @@ -77,7 +77,7 @@ init_check() make_archive() { builddir="${1}" - romdir="$(mktemp -d -t coreboot_rom.XXXXXXXXXX)" || \ + romdir="tmp/romdir" || \ err "make_archive: cannot create tmpdir" rm -Rf "${romdir}" || err "make_archive: can't remove tmpdir" target="${builddir##*/}" @@ -127,7 +127,7 @@ make_archive() tar -c "bin/${target}/" | xz -T0 -9e > "${archivename}.tar.xz" || \ err "make_archive:cant make ${projectname}-${version}_${target##*/}" ) - cp "${romdir%/bin/${target}}/${archivename}.tar.xz" "${f}.tar.xz" || \ + mv "${romdir%/bin/${target}}/${archivename}.tar.xz" "${f}.tar.xz" || \ err "make_archive: can't copy tarball" rm -Rf "${romdir%/bin/${target}}" || \ err "make_archive: can't delete tmpdir" -- cgit v1.2.1