diff options
author | Colin Percival <cperciva@FreeBSD.org> | 2023-11-27 21:29:05 +0000 |
---|---|---|
committer | Colin Percival <cperciva@FreeBSD.org> | 2023-12-05 23:40:59 +0000 |
commit | 91cb6905e927e034ad14fe698879e5043f2bd329 (patch) | |
tree | c72f68f0d868cce1f84d1412cc4c7a0e26a6f9c0 /release | |
parent | ee1d1e38fae65d045b113a7053651bbd7b780e1d (diff) | |
download | src-91cb6905e927e034ad14fe698879e5043f2bd329.tar.gz src-91cb6905e927e034ad14fe698879e5043f2bd329.zip |
Makefile.vm: Fix duplicate rc.conf files
Two bugs in Makefile.vm resulted in disk images being "built" multiple
times, resulting in lines added to /etc/rc.conf being duplicated:
1. The vm-image target reused the same "staging tree" directory for all
of its builds (multiple disk image types and multiple filesystem types).
2. The cw-type-flavour-fs target depends on emulator-portinstall, which
did not have a 'touch ${.TARGET}' and thus re-ran every time -- and
caused the cw-type-flavour-fs target to be re-run. This was triggered
by release builds running `make cloudware-release` (creating the disk
images) followed by `make ec2amis` (which re-created the disk images
prior to uploading them).
MFC After: 1 week
Sponsored by: https://www.patreon.com/cperciva
(cherry picked from commit 97bd53ef4d20b7d15e0b0976e885af9438f5637e)
Diffstat (limited to 'release')
-rw-r--r-- | release/Makefile.vm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/release/Makefile.vm b/release/Makefile.vm index 5c47ff9367a8..171ef227a7f0 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -65,6 +65,7 @@ emulator-portinstall: env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-user-static .endif .endif + touch ${.TARGET} QEMUSTATIC=/usr/local/bin/qemu-${TARGET_ARCH}-static .endif @@ -120,10 +121,11 @@ vm-base: vm-image vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . for FORMAT in ${VMFORMATS} - mkdir -p ${.OBJDIR}/${.TARGET} + mkdir -p ${.OBJDIR}/${.TARGET}-${FORMAT} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ - -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ + -C ${.CURDIR}/tools/vmimage.subr \ + -d ${.OBJDIR}/${.TARGET}-${FORMAT} \ -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} . endfor |