From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 00:00:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 209EF588; Wed, 1 Apr 2015 00:00:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E62C3CE8; Wed, 1 Apr 2015 00:00:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3100Iqc094936; Wed, 1 Apr 2015 00:00:18 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3100Iu6094933; Wed, 1 Apr 2015 00:00:18 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201504010000.t3100Iu6094933@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Wed, 1 Apr 2015 00:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280928 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2015 00:00:19 -0000 Author: cperciva Date: Wed Apr 1 00:00:17 2015 New Revision: 280928 URL: https://svnweb.freebsd.org/changeset/base/280928 Log: Add code for creating an EC2 AMI. Added: head/release/Makefile.ec2 (contents, props changed) Modified: head/release/Makefile.vm Added: head/release/Makefile.ec2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/Makefile.ec2 Wed Apr 1 00:00:17 2015 (r280928) @@ -0,0 +1,44 @@ +# +# $FreeBSD$ +# +# +# Makefile for creating an EC2 AMI from a disk image. +# + +.if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" +AMINAMESUFFIX!= date +-%Y-%m-%d +.endif +.if defined(EC2PUBLIC) +PUBLISH= --public +.endif + +ec2ami: cw-ec2 +.if !exists(/usr/local/bin/bsdec2-image-upload) + @echo "--------------------------------------------------------------" + @echo ">>> Creating EC2 AMIs requires bsdec2-image-upload" + @echo "--------------------------------------------------------------" + @false +.endif +.if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE}) + @echo "--------------------------------------------------------------" + @echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation" + @echo "--------------------------------------------------------------" + @false +.endif +.if !defined(AWSREGION) + @echo "--------------------------------------------------------------" + @echo ">>> AWSREGION must be specified EC2 AMI creation" + @echo "--------------------------------------------------------------" + @false +.endif +.if !defined(AWSBUCKET) + @echo "--------------------------------------------------------------" + @echo ">>> AWSBUCKET must be specified for EC2 AMI creation" + @echo "--------------------------------------------------------------" + @false +.endif + /usr/local/bin/bsdec2-image-upload ${PUBLISH} \ + ${.OBJDIR}/ec2.raw \ + "${TYPE} ${REVISION}-${BRANCH}${AMINAMESUFFIX}" \ + "${TYPE} ${REVISION}-${BRANCH}" \ + ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} Modified: head/release/Makefile.vm ============================================================================== --- head/release/Makefile.vm Tue Mar 31 23:39:34 2015 (r280927) +++ head/release/Makefile.vm Wed Apr 1 00:00:17 2015 (r280928) @@ -152,3 +152,5 @@ cloudware-install: .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDINSTALL} .endif + +.include "${.CURDIR}/Makefile.ec2"