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 <leah@libreboot.org>
btrfsvols
Leah Rowe 2023-09-05 01:39:36 +01:00
parent 15081ed9ef
commit da991262a3
1 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ init_check()
make_archive() make_archive()
{ {
builddir="${1}" builddir="${1}"
romdir="$(mktemp -d -t coreboot_rom.XXXXXXXXXX)" || \ romdir="tmp/romdir" || \
err "make_archive: cannot create tmpdir" err "make_archive: cannot create tmpdir"
rm -Rf "${romdir}" || err "make_archive: can't remove tmpdir" rm -Rf "${romdir}" || err "make_archive: can't remove tmpdir"
target="${builddir##*/}" target="${builddir##*/}"
@ -127,7 +127,7 @@ make_archive()
tar -c "bin/${target}/" | xz -T0 -9e > "${archivename}.tar.xz" || \ tar -c "bin/${target}/" | xz -T0 -9e > "${archivename}.tar.xz" || \
err "make_archive:cant make ${projectname}-${version}_${target##*/}" 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" err "make_archive: can't copy tarball"
rm -Rf "${romdir%/bin/${target}}" || \ rm -Rf "${romdir%/bin/${target}}" || \
err "make_archive: can't delete tmpdir" err "make_archive: can't delete tmpdir"