From owner-svn-src-head@FreeBSD.ORG Tue Oct 14 15:22:48 2014 Return-Path: Delivered-To: svn-src-head@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 5CCA9E0; Tue, 14 Oct 2014 15:22:48 +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 3DC9FBBE; Tue, 14 Oct 2014 15:22:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EFMm7o090396; Tue, 14 Oct 2014 15:22:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EFMlhb090392; Tue, 14 Oct 2014 15:22:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410141522.s9EFMlhb090392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 14 Oct 2014 15:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273096 - in head/release: . amd64 i386 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.18-1 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: Tue, 14 Oct 2014 15:22:48 -0000 Author: gjb Date: Tue Oct 14 15:22:46 2014 New Revision: 273096 URL: https://svnweb.freebsd.org/changeset/base/273096 Log: Merge the following from ^/projects/release-vmimage: r273076, r273077, r273079, r273095: r273076: Add a separate make(1) target to release/Makefile to build FreeBSD virtual machine disk images for use on the Microsoft Azure service. For now, this target is not directly connected to the build, however can be manually invoked. The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh, which does the heavy lifting to produce proper VHDs. mk-azure.sh uses a configuration file, defaulting to tools/azure.conf if otherwise unset. r273077: Clear VM_RC_LIST. r273079: Fix signal list to trigger umount(8). r273095: Output an informational message when mkimg(1) runs, so it does not appear that the process has stopped while waiting for a 'y/n' response when waagent is deprovisioned. Tested on: releng/10.1@r272876 MFC after: 3 days X-MFC-10.1: yes Sponsored by: The FreeBSD Foundation Added: head/release/amd64/mk-azure.sh - copied, changed from r273076, projects/release-vmimage/release/amd64/mk-azure.sh head/release/i386/mk-azure.sh - copied, changed from r273076, projects/release-vmimage/release/i386/mk-azure.sh head/release/tools/azure.conf - copied, changed from r273076, projects/release-vmimage/release/tools/azure.conf Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Tue Oct 14 15:18:22 2014 (r273095) +++ head/release/Makefile Tue Oct 14 15:22:46 2014 (r273096) @@ -101,6 +101,7 @@ VMTARGETS= vm-base vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G VMBASE?= vm +AZURECONF?= ${.CURDIR}/tools/azure.conf CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) @@ -121,6 +122,12 @@ CLEANDIRS= dist ftp release bootonly dvd .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) CLEANDIRS+= ${VMTARGETS} .endif +.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) +CLEANFILES+= ${OSRELEASE}.vhd \ + ${OSRELEASE}.vhd.raw \ + azure.img +CLEANDIRS+= vm-azure +.endif beforeclean: chflags -R noschg . .include @@ -338,3 +345,11 @@ vm-image: vm-base . endif .endif touch ${.TARGET} + +vm-azure: +.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \ + ${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \ + ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OSRELEASE}.vhd +.endif + touch ${.TARGET} Copied and modified: head/release/amd64/mk-azure.sh (from r273076, projects/release-vmimage/release/amd64/mk-azure.sh) ============================================================================== --- projects/release-vmimage/release/amd64/mk-azure.sh Tue Oct 14 11:48:28 2014 (r273076, copy source) +++ head/release/amd64/mk-azure.sh Tue Oct 14 15:22:46 2014 (r273096) @@ -67,7 +67,7 @@ vm_create_azure() { usage fi - trap "umount ${DESTDIR}/dev ${DESTDIR}" EXIT + trap "umount ${DESTDIR}/dev ${DESTDIR}" INT QUIT TRAP ABRT TERM i=0 mkdir -p ${DESTDIR} @@ -130,6 +130,8 @@ vm_create_azure() { sleep 1 done + echo "Creating image... Please wait." + mkimg -f vhdf -s gpt \ -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ -p freebsd-swap/swapfs::1G \ Copied and modified: head/release/i386/mk-azure.sh (from r273076, projects/release-vmimage/release/i386/mk-azure.sh) ============================================================================== --- projects/release-vmimage/release/i386/mk-azure.sh Tue Oct 14 11:48:28 2014 (r273076, copy source) +++ head/release/i386/mk-azure.sh Tue Oct 14 15:22:46 2014 (r273096) @@ -67,7 +67,7 @@ vm_create_azure() { usage fi - trap "umount ${DESTDIR}/dev ${DESTDIR}" EXIT + trap "umount ${DESTDIR}/dev ${DESTDIR}" INT QUIT TRAP ABRT TERM i=0 mkdir -p ${DESTDIR} @@ -130,6 +130,8 @@ vm_create_azure() { sleep 1 done + echo "Creating image... Please wait." + mkimg -f vhdf -s gpt \ -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ -p freebsd-swap/swapfs::1G \ Copied and modified: head/release/tools/azure.conf (from r273076, projects/release-vmimage/release/tools/azure.conf) ============================================================================== --- projects/release-vmimage/release/tools/azure.conf Tue Oct 14 11:48:28 2014 (r273076, copy source) +++ head/release/tools/azure.conf Tue Oct 14 15:22:46 2014 (r273096) @@ -11,4 +11,4 @@ export VM_EXTRA_PACKAGES= # Set to a list of third-party software to enable in rc.conf(5). # Example: #export VM_RC_LIST="apache24" -export VM_RC_LIST="apache24" +export VM_RC_LIST=