git: e6e5cd297ab4 - main - release/vm: fix setting NO_ROOT and WITHOUT_QEMU
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Mar 2025 23:51:47 UTC
The branch main has been updated by brooks:
URL: https://cgit.FreeBSD.org/src/commit/?id=e6e5cd297ab4cae4995895b99c713df9cf6e8c0f
commit e6e5cd297ab4cae4995895b99c713df9cf6e8c0f
Author: Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2025-03-27 23:40:47 +0000
Commit: Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2025-03-27 23:51:39 +0000
release/vm: fix setting NO_ROOT and WITHOUT_QEMU
To support common shell patterns (test -n and -z) we want NO_ROOT and
WITHOUT_QEMU to be set and not empty in mk-vmimage.sh if they are set at
all in the Makefile.
Actually do this rather than making them always set (which propogates to
submakes run by mk-vmimage.sh and unconditionally enables NO_ROOT with
undesirable side effects such as installing a /METALOG in vm images).
Reported by: cperciva
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D49544
---
release/Makefile.vm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/release/Makefile.vm b/release/Makefile.vm
index 1f56bdb03f97..f58c7c7fd092 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -129,8 +129,8 @@ cw-${_CW:tl}-${_FS}-${_FMT}: ${QEMUTGT}
mkdir -p ${.OBJDIR}/${.TARGET}
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \
QEMUSTATIC=${QEMUSTATIC} \
- WITHOUT_QEMU=${WITHOUT_QEMU:Dtrue} \
- NO_ROOT=${NO_ROOT:Dtrue} \
+ ${WITHOUT_QEMU:DWITHOUT_QEMU=true} \
+ ${NO_ROOT:DNO_ROOT=true} \
${.CURDIR}/scripts/mk-vmimage.sh \
-C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${_FS} \
-i ${.OBJDIR}/${_CW:tl}.${_FS}.${_FMT}.img -s ${VMSIZE} -f ${_FMT} \