summaryrefslogtreecommitdiff
path: root/base-image
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-04-15 09:03:21 +0300
committerLars Wirzenius <liw@liw.fi>2022-04-15 09:03:21 +0300
commite7dfb7dac8ecb9689f3d2538e48aedf9eee17f83 (patch)
tree2d3dba0fa4c0413cf7a3f8e2bd5043fe5bbda9d7 /base-image
parentfb291f77dcbb6236a4e2722f439a50fc1f723fea (diff)
downloadansibleness-e7dfb7dac8ecb9689f3d2538e48aedf9eee17f83.tar.gz
chore(base-image): add a Makefile to make building smoother
Sponsored-by: author
Diffstat (limited to 'base-image')
-rw-r--r--base-image/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/base-image/Makefile b/base-image/Makefile
new file mode 100644
index 0000000..7af2dd1
--- /dev/null
+++ b/base-image/Makefile
@@ -0,0 +1,16 @@
+qcows = bullseye-vm.qcow2
+
+.SUFFIXES: .vmdb .img .qcow2
+
+.vmdb.img:
+ sudo vmdb2 --log "$*.log" --output "$@" --rootfs-tarball "$*.tar.gz" --verbose "$<"
+ sudo chown "${USER}" "$@" "$*.tar.gz" "$*.log"
+
+.img.qcow2:
+ qemu-img convert -f raw -O qcow2 "$<" "$@"
+
+all: $(qcows)
+
+$(qcows): Makefile base-image.yml
+
+bullseye-vm.qcow2: bullseye-vm.vmdb