git: 1ad1e7b13d94 - stable/15 - beinstall: Avoid chrooting into new world
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Jul 2026 13:35:57 UTC
The branch stable/15 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=1ad1e7b13d94a5060e47b3070b55c9b110d702b9
commit 1ad1e7b13d94a5060e47b3070b55c9b110d702b9
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-06-04 13:33:30 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-07-27 13:35:46 +0000
beinstall: Avoid chrooting into new world
The new world may use system calls that are not in the currently-running
kernel, so we cannot chroot into the new environment to run `make
installworld`, `etcupdate`, etc. Partially revert commit 16702050ac95
("beinstall: perform pre-installworld steps") and switch back to using
DESTDIR for installworld and so on.
Reported by: olivier
Reviewed by: olivier
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50682
(cherry picked from commit 7fde3e62231ac397a779e4fef729908c5ef6f53a)
---
tools/build/beinstall.sh | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/build/beinstall.sh b/tools/build/beinstall.sh
index dcafd1030c91..e4ae4a81617b 100755
--- a/tools/build/beinstall.sh
+++ b/tools/build/beinstall.sh
@@ -125,9 +125,8 @@ update_etcupdate_pre() {
}
update_etcupdate() {
- chroot ${BE_MNTPT} \
- ${ETCUPDATE_CMD} -s ${srcdir} ${ETCUPDATE_FLAGS} || return $?
- chroot ${BE_MNTPT} ${ETCUPDATE_CMD} resolve
+ ${ETCUPDATE_CMD} -s ${srcdir} ${ETCUPDATE_FLAGS} || return $?
+ ${ETCUPDATE_CMD} resolve -D ${BE_MNTPT}
}
@@ -216,7 +215,7 @@ mount -t nullfs "${srcdir}" "${BE_MNTPT}${srcdir}" || errx "Unable to mount src"
mount -t nullfs "${objdir}" "${BE_MNTPT}${objdir}" || errx "Unable to mount obj"
mount -t devfs devfs "${BE_MNTPT}/dev" || errx "Unable to mount devfs"
-chroot ${BE_MNTPT} make "$@" -C ${srcdir} installworld || \
+make "$@" DESTDIR=${BE_MNTPT} -DDB_FROM_SRC installworld || \
errx "Installworld failed!"
if [ -n "${CONFIG_UPDATER}" ]; then