Closed GR360RY closed 5 months ago
@alexsander-souza , please check out the changes for rocky8. This is similar to what we did with centos7. On the same note: we rely on make to remove output-rocky8 directory when cleaning up the build. There is a better way to address it - use artifice post processor.
Do you ever use uncompressed qcow files to verify the build ?
ubuntu@maas-builder-01:~/upstream/packer-maas/rocky8$ file output-rocky8/packer-rocky8
output-rocky8/packer-rocky8: QEMU QCOW2 Image (v3), 4294967296 bytes
If not, this can be addressed with the following stanza:
post-processors {
post-processor "shell-local" {
inline = [
"SOURCE=rocky8",
"OUTPUT=${var.filename}",
"source ../scripts/fuse-nbd",
"source ../scripts/fuse-tar-root"
]
inline_shebang = "/bin/bash -e"
}
post-processor "artifice" {
files = ["rocky8.tar.gz"]
}
}
No, we don't need the qcow image after create the tarball. You can update this PR with this change if you want.
@alexsander-souza, all looks good now. No reliance on make. We can run packer build .
in rocky8
multiple times without cleaning up artifacts with make
.
--force
to override tar.gz if existsoutput
directory in shell-local post processor
artifice
post processor is not removing artifacts. Use shell-local withrm -rf output-${source.name}
instead.
@alexsander-souza , please merge/comment so I could move forward to the next distro. If possible, please also merge https://github.com/canonical/packer-maas/pull/200
Relates to #197
Remove reliance on make when building the Rocky 8 image.