From owner-svn-src-head@freebsd.org Thu Mar 9 01:26:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07BBAD03691; Thu, 9 Mar 2017 01:26:12 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CB63C1A8F; Thu, 9 Mar 2017 01:26:11 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v291QANV063166; Thu, 9 Mar 2017 01:26:10 GMT (envelope-from thompsa@FreeBSD.org) Received: (from thompsa@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v291QATA063165; Thu, 9 Mar 2017 01:26:10 GMT (envelope-from thompsa@FreeBSD.org) Message-Id: <201703090126.v291QATA063165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: thompsa set sender to thompsa@FreeBSD.org using -f From: Andrew Thompson Date: Thu, 9 Mar 2017 01:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314935 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2017 01:26:12 -0000 Author: thompsa Date: Thu Mar 9 01:26:10 2017 New Revision: 314935 URL: https://svnweb.freebsd.org/changeset/base/314935 Log: ec2.conf and vmimage.subr can be used from the installation livecd after install to prepare an AMI image. This can be used to create a ZFS AMI disk image using a virtual machine. Change ec2.conf to use the pkg tool from a chroot rather than trying to bootstrap it and fail from the livecd readonly filesystem. Reviewed by: gjb Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Thu Mar 9 01:21:28 2017 (r314934) +++ head/release/tools/ec2.conf Thu Mar 9 01:26:10 2017 (r314935) @@ -32,7 +32,8 @@ vm_extra_pre_umount() { # catalogue and install or update pkg when the instance first # launches, so these files would just be replaced anyway; removing # them from the image allows it to boot faster. - env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg rm ${DESTDIR}/var/db/pkg/repo-*.sqlite # The size of the EC2 root disk can be configured at instance launch