From owner-svn-src-stable-10@freebsd.org Wed Jun 24 18:56:29 2015 Return-Path: Delivered-To: svn-src-stable-10@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 97EAF916E0A; Wed, 24 Jun 2015 18:56:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) 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 7C7241BBA; Wed, 24 Jun 2015 18:56:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5OIuTNJ015868; Wed, 24 Jun 2015 18:56:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5OIuSm0015865; Wed, 24 Jun 2015 18:56:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506241856.t5OIuSm0015865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 24 Jun 2015 18:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284774 - in stable/10/release: . tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2015 18:56:29 -0000 Author: gjb Date: Wed Jun 24 18:56:28 2015 New Revision: 284774 URL: https://svnweb.freebsd.org/changeset/base/284774 Log: MFC r284660, r284676: r284660: Remove the Azure-local vm_extra_create_disk(), since we no longer need qemu-img to convert the final VHD image to an Azure-compatible format. Although the waagent utility is installed from ports, create the symlink to /usr/sbin, pending investigation on where this is hard-coded, so it can be reported upstream. r284676: Append the hour and minute to the snapshot suffix for EC2 AMIs and Azure VM images. This is particularly helpful for testing to avoid name collisions, but also useful for cases where a necessary rebuild is done before the date changes. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile.azure stable/10/release/Makefile.ec2 stable/10/release/tools/azure.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile.azure ============================================================================== --- stable/10/release/Makefile.azure Wed Jun 24 18:40:34 2015 (r284773) +++ stable/10/release/Makefile.azure Wed Jun 24 18:56:28 2015 (r284774) @@ -17,7 +17,7 @@ AZURE${VAR}!= grep -E ^AZURE${VAR} ${AZU .endif .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" -SNAPSHOT_DATE!= date +-%Y-%m-%d +SNAPSHOT_DATE!= date +-%Y-%m-%d-%H:%M .endif AZURE_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE}.vhd Modified: stable/10/release/Makefile.ec2 ============================================================================== --- stable/10/release/Makefile.ec2 Wed Jun 24 18:40:34 2015 (r284773) +++ stable/10/release/Makefile.ec2 Wed Jun 24 18:56:28 2015 (r284774) @@ -6,7 +6,7 @@ # .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" -AMINAMESUFFIX!= date +-%Y-%m-%d +AMINAMESUFFIX!= date +-%Y-%m-%d-%H:%M .endif .if defined(EC2PUBLIC) PUBLISH= --public Modified: stable/10/release/tools/azure.conf ============================================================================== --- stable/10/release/tools/azure.conf Wed Jun 24 18:40:34 2015 (r284773) +++ stable/10/release/tools/azure.conf Wed Jun 24 18:56:28 2015 (r284774) @@ -14,6 +14,7 @@ export VM_EXTRA_PACKAGES="sysutils/azure export VM_RC_LIST= vm_extra_pre_umount() { + chroot ${DESTDIR} ln -s /usr/local/sbin/waagent /usr/sbin/waagent chroot ${DESTDIR} /usr/local/sbin/waagent -verbose -install yes | chroot ${DESTDIR} /usr/local/sbin/waagent -deprovision echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf @@ -26,17 +27,3 @@ vm_extra_pre_umount() { return 0 } - -vm_extra_create_disk() { - if [ ! -x "/usr/local/bin/qemu-img" ]; then - env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-devel - fi - - mv ${VMIMAGE} ${VMIMAGE}.raw - size=$(qemu-img info -f raw --output json ${VMIMAGE}.raw | awk '/virtual-size/ {print $2}' | tr -d ',') - size=$(( ( ${size} / ( 1024 * 1024 ) + 1 ) * ( 1024 * 1024 ) )) - qemu-img resize ${VMIMAGE}.raw ${size} - qemu-img convert -f raw -o subformat=fixed -O vpc ${VMIMAGE}.raw ${VMIMAGE} - - return 0 -}