assembler/qcow2: Move temporary image out of /tmp

Directory /tmp is hosted on tmpfs. Therefore the image size could be
limited by memory size. By moving the image to /var/tmp we assure that
the file is hosted on disk allowing us to build bigger images or build
images on memory-constrained machines (e.g. CI).
This commit is contained in:
Ondřej Budai 2019-09-05 08:30:18 +02:00 committed by Lars Karlitski
parent 6bd568192a
commit f78db47a0e

View file

@ -45,7 +45,7 @@ def main(tree, output_dir, options, loop_client):
if size % 512 != 0:
raise ValueError("`size` must be a multiple of sector size (512)")
image = f"/tmp/osbuild-image.raw"
image = f"/var/tmp/osbuild-image.raw"
mountpoint = f"/tmp/osbuild-mnt"
# Create an empty image file