summaryrefslogtreecommitdiffstats
path: root/release/Makefile
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2014-10-16 23:16:26 +0000
committergjb <gjb@FreeBSD.org>2014-10-16 23:16:26 +0000
commit14d211224f468a8dd7230c45ab955332a1e7c7f6 (patch)
treedb3eb2d3dde887a2edb12ab243214e73752b80ac /release/Makefile
parent4b803d9674b63d29e710951b81c052966a1717d6 (diff)
downloadFreeBSD-src-14d211224f468a8dd7230c45ab955332a1e7c7f6.zip
FreeBSD-src-14d211224f468a8dd7230c45ab955332a1e7c7f6.tar.gz
MFC r273093, r273096:
r273093: Merge the following from ^/projects/release-vmimage: r272436, r272437, r272792: r272436: Remove the first argument to panic(), which was initially intended to be the exit code, however when a non-zero exit code was returned to release/Makefile, this would prevent any remaining (and possibly successful) stages from being attempted. r272437: If the vm-base target fails, prevent the vm-image target from being run since it cannot possibly succeed. r272792: Add /usr/local/bin and /usr/local/sbin to PATH, needed if third-party software needs to use utilities outside of the base system during post-install stages (indexinfo is one culprit). r273096: 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. Relnotes: yes Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release/Makefile')
-rw-r--r--release/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/release/Makefile b/release/Makefile
index a86e368..ca18667 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -117,6 +117,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)
@@ -137,6 +138,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>
@@ -372,3 +379,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}
OpenPOWER on IntegriCloud