Date: Fri, 23 Jan 2015 21:05:00 +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: r277609 - head/release Message-ID: <201501232105.t0NL50B2099391@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gjb Date: Fri Jan 23 21:04:59 2015 New Revision: 277609 URL: https://svnweb.freebsd.org/changeset/base/277609 Log: When iterating through VMFORMATS, the VMBASE file is not removed or truncated to a zero-size file, which if used to create more than one disk image format, can result in accidental pollution of the target formatted disk image. Instead of using a single VMBASE image (vm.img, by default), use a single base file for each format, named as VMFORMAT.img, which produces VMBASE.VMFORMAT as the final formatted image. Reported by: cperciva MFC after: 1 month X-MFC-with: r277458, r277536 Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.vm Modified: head/release/Makefile.vm ============================================================================== --- head/release/Makefile.vm Fri Jan 23 20:40:31 2015 (r277608) +++ head/release/Makefile.vm Fri Jan 23 21:04:59 2015 (r277609) @@ -50,8 +50,8 @@ vm-${_CW:tl}: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) CLEANDIRS+= ${VMTARGETS} -CLEANFILES+= ${VMBASE}.img . for FORMAT in ${VMFORMATS} +CLEANFILES+= ${FORMAT}.img CLEANFILES+= ${VMBASE}.${FORMAT} . endfor .endif @@ -65,7 +65,7 @@ vm-image: env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ - -i ${.OBJDIR}/${VMBASE}.img -s ${VMSIZE} -f ${FORMAT} \ + -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} . endfor .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501232105.t0NL50B2099391>