Date: Tue, 16 Sep 2025 20:50:54 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f1995d6fc13f - main - release: Prepare GCE cloudware images for building as non-root Message-ID: <202509162050.58GKosdh046380@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f1995d6fc13fa4a36f83cea3b90f27bce2aca4d9 commit f1995d6fc13fa4a36f83cea3b90f27bce2aca4d9 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-09-16 16:54:11 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-09-16 20:50:33 +0000 release: Prepare GCE cloudware images for building as non-root - Avoid mounting devfs just to list packages and fetch distfiles. - Add metalog entries. Reviewed by: cperciva, emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D52455 --- release/tools/gce.conf | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index dc56be30c7ca..a7ccfc27a75c 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -21,6 +21,7 @@ vm_extra_install_base() { echo 'search google.internal' > ${DESTDIR}/etc/resolv.conf echo 'nameserver 169.254.169.254' >> ${DESTDIR}/etc/resolv.conf echo 'nameserver 8.8.8.8' >> ${DESTDIR}/etc/resolv.conf + metalog_add ./etc/resolv.conf } vm_extra_pre_umount() { @@ -94,25 +95,18 @@ EOF # ports.txz distributions to the target virtual machine disk image # and fetch the sources for the third-party software installed on # the image. - if [ ! -c "${DESTDIR}/dev/null" ]; then - DEVFSISOURS=1 - mkdir -p ${DESTDIR}/dev - mount -t devfs devfs ${DESTDIR}/dev - fi if [ -e "${DESTDIR}/../ftp/src.txz" ]; then tar fxJ ${DESTDIR}/../ftp/src.txz -C ${DESTDIR} fi if [ -e "${DESTDIR}/../ftp/ports.txz" ]; then tar fxJ ${DESTDIR}/../ftp/ports.txz -C ${DESTDIR} - _INSTALLED_PACKAGES=$(chroot ${DESTDIR} pkg info -o -q -a) + _INSTALLED_PACKAGES=$(pkg -r ${DESTDIR} info -o -q -a) for PACKAGE in ${_INSTALLED_PACKAGES}; do - chroot ${DESTDIR} \ - make -C /usr/ports/${PACKAGE} fetch + make -C ${DESTDIR}/usr/ports/${PACKAGE} fetch \ + DISTDIR=${DESTDIR}/usr/ports/distfiles + done fi - if [ "$DEVFSISOURS" = "1" ]; then - umount_loop ${DESTDIR}/dev - fi ## XXX: Verify this is needed. I do not see this requirement ## in the docs, and it impairs the ability to boot-test a copy @@ -128,6 +122,5 @@ vm_emulation_cleanup() { if [ -n "${QEMUSTATIC}" ]; then rm -f ${DESTDIR}/${EMULATOR} fi - umount_loop ${DESTDIR}/dev return 0 }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509162050.58GKosdh046380>