mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 07:02:42 +00:00
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
This commit is contained in:
parent
96950419f1
commit
97bd53ef4d
@ -81,6 +81,7 @@ emulator-portinstall:
|
|||||||
env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-user-static
|
env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-user-static
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
touch ${.TARGET}
|
||||||
|
|
||||||
QEMUSTATIC=/usr/local/bin/qemu-${TARGET_ARCH}-static
|
QEMUSTATIC=/usr/local/bin/qemu-${TARGET_ARCH}-static
|
||||||
.endif
|
.endif
|
||||||
@ -137,10 +138,11 @@ vm-image:
|
|||||||
.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
|
.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
|
||||||
. for FORMAT in ${VMFORMATS}
|
. for FORMAT in ${VMFORMATS}
|
||||||
. for FS in ${VMFSLIST}
|
. for FS in ${VMFSLIST}
|
||||||
mkdir -p ${.OBJDIR}/${.TARGET}
|
mkdir -p ${.OBJDIR}/${.TARGET}-${FORMAT}-${FS}
|
||||||
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \
|
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \
|
||||||
${.CURDIR}/scripts/mk-vmimage.sh \
|
${.CURDIR}/scripts/mk-vmimage.sh \
|
||||||
-C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${FS} \
|
-C ${.CURDIR}/tools/vmimage.subr \
|
||||||
|
-d ${.OBJDIR}/${.TARGET}-${FORMAT}-${FS} -F ${FS} \
|
||||||
-i ${.OBJDIR}/${FORMAT}.${FS}.img -s ${VMSIZE} -f ${FORMAT} \
|
-i ${.OBJDIR}/${FORMAT}.${FS}.img -s ${VMSIZE} -f ${FORMAT} \
|
||||||
-S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FS}.${FORMAT}
|
-S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FS}.${FORMAT}
|
||||||
. endfor
|
. endfor
|
||||||
|
Loading…
Reference in New Issue
Block a user