aboutsummaryrefslogtreecommitdiff
path: root/release/Makefile.gce
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2018-05-10 21:46:58 +0000
committerGlen Barber <gjb@FreeBSD.org>2018-05-10 21:46:58 +0000
commitc3955757a946b1ba02b1e0c1580c565e431bd5a0 (patch)
treebe021e3b3d3c911f8c98f3baec23fa43a9819bc1 /release/Makefile.gce
parentf348cdad1ae27327fa561a687c50b52bd32af288 (diff)
downloadsrc-c3955757a946b1ba02b1e0c1580c565e431bd5a0.tar.gz
src-c3955757a946b1ba02b1e0c1580c565e431bd5a0.zip
Add a special GCE_LICENSE variable to Makefile.gce, which when set,
will include license metadata in the resultant GCE image. GCE_LICENSE is unset by default, as it primarily pertains to images produced by the FreeBSD Project, but for downstream FreeBSD consumers, it can be set in the make(1) environment in the format of: --licenses="projects/PROJECT_ID/global/licenses/LICENSE_NAME" The "license" is not a license, per se, but required metadata that is required by the GCE marketplace. For the FreeBSD Project, the license name is simply 'freebsd', with the description of 'FreeBSD'. MFC after: 3 days Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=333473
Diffstat (limited to 'release/Makefile.gce')
-rw-r--r--release/Makefile.gce3
1 files changed, 2 insertions, 1 deletions
diff --git a/release/Makefile.gce b/release/Makefile.gce
index bbdc4981a613..e466f9a323bd 100644
--- a/release/Makefile.gce
+++ b/release/Makefile.gce
@@ -17,6 +17,7 @@ GCE_UPLOAD_TGTS= gce-do-login
CLEANFILES+= ${GCE_UPLOAD_TGTS}
GCE_BUCKET?=
+GCE_LICENSE?=
.if !defined(GCE_FAMILY) || empty(GCE_FAMILY)
GCE_FAMILY= ${TYPE:tl}-${REVISION:S,.,-,}
@@ -70,7 +71,7 @@ gce-do-upload:
/usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \
gs://${GCE_BUCKET}/
/usr/local/bin/gcloud compute images create ${GCE_TARGET} \
- --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} \
+ --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \
--source-uri gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz
touch ${.OBJDIR}/${.TARGET}