git: 35c935b4b370 - stable/14 - vmimage.subr: Use makefs -N
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Sep 2026 00:30:52 UTC
The branch stable/14 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=35c935b4b370d26dd13821a5456b1014426e7344
commit 35c935b4b370d26dd13821a5456b1014426e7344
Author: Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2026-09-02 16:37:58 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2026-09-09 00:30:45 +0000
vmimage.subr: Use makefs -N
By default, makefs uses the host environment's user and group databases
when creating filesystems. This causes makefs to fail when trying to
create files owned by users or groups which don't exist in the host
environment, for example when creating a VM with packages pre-installed
which added their own users/groups.
Pass "-N ${DESTDIR}/etc" to makefs to point it at the user and group
databases from the image being created.
MFC after: 1 week
Sponsored by: Amazon
(cherry picked from commit 7ca0c1eba2e4c49ac92499ef0f6adf27c8b930d4)
---
release/tools/vmimage.subr | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index 7a078e357adf..35070303e8ed 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -268,7 +268,7 @@ vm_create_disk() {
WITH_UNIFIED_OBJDIR=yes \
make -C ${WORLDDIR}/stand -V .OBJDIR)"
BOOTFILES="$(realpath ${BOOTFILES})"
- MAKEFSARGS="-s ${VMSIZE}"
+ MAKEFSARGS="-s ${VMSIZE} -N ${DESTDIR}/etc"
case "${TARGET}:${TARGET_ARCH}" in
amd64:amd64 | i386:i386)