diff options
Diffstat (limited to 'release/tools/gce.conf')
| -rw-r--r-- | release/tools/gce.conf | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 382a839786f3..558641821b16 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -17,10 +17,21 @@ export VM_RC_LIST="ntpd sshd growfs \ google_accounts_daemon google_clock_skew_daemon \ google_instance_setup google_network_daemon" +# Hack for FreeBSD 15.0; should go away before 15.1. +MISSING_METALOGS=" +./usr/local/etc/instance_configs.cfg.distro +./usr/local/etc/pam.d/sudo +./usr/local/etc/sudo.conf +./usr/local/etc/sudo_logsrvd.conf +./usr/local/etc/sudoers +./usr/local/etc/syslog.d/90-google.conf +" + 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_data ./etc/resolv.conf } vm_extra_pre_umount() { @@ -50,6 +61,7 @@ kern.timecounter.hardware=ACPI-safe aesni_load="YES" nvme_load="YES" EOF + metalog_add_data ./boot/loader.conf echo '169.254.169.254 metadata.google.internal metadata' >> \ ${DESTDIR}/etc/hosts @@ -94,24 +106,26 @@ 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} + ( cd ${DESTDIR} && find ./usr/src ) | + while read P; do + metalog_add_data ${P} + done 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 | grep -v ^base/) 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 \ + DISABLE_VULNERABILITIES=YES \ + I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES done - fi - if [ "$DEVFSISOURS" = "1" ]; then - umount_loop ${DESTDIR}/dev + ( cd ${DESTDIR} && find ./usr/ports ) | + while read P; do + metalog_add_data ${P} + done fi ## XXX: Verify this is needed. I do not see this requirement @@ -119,8 +133,6 @@ EOF ## of the image prior to packaging for upload to GCE. #sed -E -i '' 's/^([^#].*[[:space:]])on/\1off/' ${DESTDIR}/etc/ttys - touch ${DESTDIR}/firstboot - return 0 } @@ -130,6 +142,5 @@ vm_emulation_cleanup() { if [ -n "${QEMUSTATIC}" ]; then rm -f ${DESTDIR}/${EMULATOR} fi - umount_loop ${DESTDIR}/dev return 0 } |
