path: root/release/tools
diff options
authorGlen Barber <gjb@FreeBSD.org>2019-05-30 16:49:40 +0000
committerGlen Barber <gjb@FreeBSD.org>2019-05-30 16:49:40 +0000
commit5f0c63b621adad0636845b4364ab49836d102010 (patch)
tree7792b258193f0cc40db77afa2cccd058578e3a31 /release/tools
parentc8124e20e5493651b5adca11c0c796cdcf5b2696 (diff)
Fix GCE virtual machine startup.
The ports/head branch recently switched to python3 as the default, which breaks the sysutils/py-google-compute-engine startup scripts, as lang/python installs lang/python3{,.x} where lang/python2{,.x} are needed. Set DEFAULT_VERSIONS in release/tools/gce.conf to python=2.7, and remove the lang/python3 inclusion in VM_EXTRA_PACKAGES. Additionally, unset DEFAULT_VERSIONS in release/tools/vmimage.subr to prevent persistence of DEFAULT_VERSIONS=python=2.7 in subsequent VM/cloud image builds. Note: at present, this affects only 13-CURRENT and 12-STABLE, as the stable/11 branch had already switched to using the 2019Q2 branch at the start of the 11.3-RELEASE cycle, so this does not immediately affect 11.3-BETA, hence the 1-week merge timeout. This had been manually tested on 13-CURRENT. Reported by: ler (privately) MFC after: 1 week Sponsored by: The FreeBSD Foundation
Notes: svn path=/head/; revision=348438
Diffstat (limited to 'release/tools')
2 files changed, 9 insertions, 1 deletions
diff --git a/release/tools/gce.conf b/release/tools/gce.conf
index f156a5bb93eb..951b615e7e26 100644
--- a/release/tools/gce.conf
+++ b/release/tools/gce.conf
@@ -6,10 +6,14 @@
# The default of 3GB is too small for GCE, so override the size here.
export VMSIZE=20G
+# The sysutils/py-google-compute-engine port needs the lang/python
+# symbolic link to point to lang/python2.
+export DEFAULT_VERSIONS="python=2.7"
# Set to a list of packages to install.
export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \
google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \
- lang/python lang/python2 lang/python3"
+ lang/python lang/python2"
# Set to a list of third-party software to enable in rc.conf(5).
export VM_RC_LIST="ntpd sshd growfs \
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index 6e29139402be..bcf9a285a293 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -72,6 +72,10 @@ cleanup() {
mdconfig -d -u ${mddev}
+ # Avoid inheriting the DEFAULT_VERSIONS for lang/python from
+ # the gce.conf.
return 0