diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2025-06-04 13:33:30 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2026-07-10 15:04:45 +0000 |
| commit | 7fde3e62231ac397a779e4fef729908c5ef6f53a (patch) | |
| tree | eba92f456c8e6fa73116fcee2bdf7f54d26325be | |
| parent | c18512056301fa97dd31c4cc9a78e18f1aa8b2d5 (diff) | |
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
| -rwxr-xr-x | tools/build/beinstall.sh | 7 |
1 files 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 |
