diff options
author | Glen Barber <gjb@FreeBSD.org> | 2018-05-04 20:38:26 +0000 |
---|---|---|
committer | Glen Barber <gjb@FreeBSD.org> | 2018-05-04 20:38:26 +0000 |
commit | d55f0e89c807d794d9e2b5b75301f42da4d3da1f (patch) | |
tree | a64d57d3681f8101fe3f818ed140b23e84cb88e2 /release/tools/gce.conf | |
parent | df66feb8da55cc85bd2b96ac5b826b159a9583cf (diff) | |
download | src-d55f0e89c807d794d9e2b5b75301f42da4d3da1f.tar.gz src-d55f0e89c807d794d9e2b5b75301f42da4d3da1f.zip |
Ensure the ports and src trees are available on GCE images,
satisfying a requirement to allow FreeBSD to be considered
a top-tier supported OS in Google Compute Engine.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=333262
Diffstat (limited to 'release/tools/gce.conf')
-rw-r--r-- | release/tools/gce.conf | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 848a004cbe92..626e5b5f14c0 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -85,6 +85,29 @@ debug.trace_on_panic=1 debug.debugger_on_panic=0 EOF + # To meet GCE marketplace requirements, extract the src.txz and + # ports.txz distributions to the target virtual machine disk image + # and fetch the sources for the third-part software installed on + # the image. + if [ ! -c "${DESTDIR}/dev/null" ]; then + 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) + for PACKAGE in ${_INSTALLED_PACKAGES}; do + chroot ${DESTDIR} \ + make -C /usr/ports/${PACKAGE} fetch + done + fi + if [ -c "${DESTDIR}/dev/null" ]; 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 ## of the image prior to packaging for upload to GCE. |