diff options
author | gjb <gjb@FreeBSD.org> | 2015-06-24 18:56:28 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2015-06-24 18:56:28 +0000 |
commit | 7af02b3d4c6d726b1cd24be1ada62d1df0afd4f4 (patch) | |
tree | a66d6bcf087e66ff96d3619fdeaed92cfa9e9189 | |
parent | c8b4a5d462f81bded2f88253a2feb3abc492b84a (diff) | |
download | FreeBSD-src-7af02b3d4c6d726b1cd24be1ada62d1df0afd4f4.zip FreeBSD-src-7af02b3d4c6d726b1cd24be1ada62d1df0afd4f4.tar.gz |
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
-rw-r--r-- | release/Makefile.azure | 2 | ||||
-rw-r--r-- | release/Makefile.ec2 | 2 | ||||
-rw-r--r-- | release/tools/azure.conf | 15 |
3 files changed, 3 insertions, 16 deletions
diff --git a/release/Makefile.azure b/release/Makefile.azure index 01e2204..92ddaf2 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -17,7 +17,7 @@ AZURE${VAR}!= grep -E ^AZURE${VAR} ${AZURE_UPLOAD_CONF} | awk -F' ' '{print $$2} .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 diff --git a/release/Makefile.ec2 b/release/Makefile.ec2 index 4efdc7f..f4e5025 100644 --- a/release/Makefile.ec2 +++ b/release/Makefile.ec2 @@ -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 diff --git a/release/tools/azure.conf b/release/tools/azure.conf index 4267f97..6007698 100644 --- a/release/tools/azure.conf +++ b/release/tools/azure.conf @@ -14,6 +14,7 @@ export VM_EXTRA_PACKAGES="sysutils/azure-agent" 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 -} |