Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 May 2018 21:46:58 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r333473 - head/release
Message-ID:  <201805102146.w4ALkwib046722@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Thu May 10 21:46:58 2018
New Revision: 333473
URL: https://svnweb.freebsd.org/changeset/base/333473

Log:
  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

Modified:
  head/release/Makefile.gce

Modified: head/release/Makefile.gce
==============================================================================
--- head/release/Makefile.gce	Thu May 10 20:39:04 2018	(r333472)
+++ head/release/Makefile.gce	Thu May 10 21:46:58 2018	(r333473)
@@ -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}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805102146.w4ALkwib046722>