Date: Tue, 14 Oct 2014 15:22:47 +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: r273096 - in head/release: . amd64 i386 tools Message-ID: <201410141522.s9EFMlhb090392@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <bsd.obj.mk> @@ -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=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410141522.s9EFMlhb090392>