git: 1ad1e7b13d94 - stable/15 - beinstall: Avoid chrooting into new world
Ed Maste <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.src |
|---|---|
| Message-ID | <6a675ebd.3d693.291406ce__47296.5379174397$1785159373$gmane$org@gitrepo.freebsd.org> |
The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1ad1e7b13d94a5060e47b3070b55c9b110d702b9 commit 1ad1e7b13d94a5060e47b3070b55c9b110d702b9 Author: Ed Maste <[email protected]> AuthorDate: 2025-06-04 13:33:30 +0000 Commit: Ed Maste <[email protected]> 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