diff --git a/release/Makefile.vm b/release/Makefile.vm --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -9,6 +9,7 @@ VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 5120m VMFS?= ufs +VMFSLIST?= ufs zfs SWAPSIZE?= 1g VMBASE?= vm @@ -112,8 +113,10 @@ .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) CLEANDIRS+= ${VMTARGETS} . for FORMAT in ${VMFORMATS} -CLEANFILES+= ${FORMAT}.img -CLEANFILES+= ${VMBASE}.${FORMAT} +. for FS in ${VMFSLIST} +CLEANFILES+= ${FORMAT}.${FS}.img +CLEANFILES+= ${VMBASE}.${FS}.${FORMAT} +. endfor . endfor .endif @@ -122,12 +125,14 @@ vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . for FORMAT in ${VMFORMATS} +. for FS in ${VMFSLIST} mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ ${.CURDIR}/scripts/mk-vmimage.sh \ - -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${VMFS} \ - -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ - -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} + -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${FS} \ + -i ${.OBJDIR}/${FORMAT}.${FS}.img -s ${VMSIZE} -f ${FORMAT} \ + -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FS}.${FORMAT} +. endfor . endfor .endif touch ${.TARGET} @@ -154,15 +159,27 @@ .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) mkdir -p ${DESTDIR}/vmimages . for FORMAT in ${VMFORMATS} - cp -p ${VMBASE}.${FORMAT} \ - ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} +. for FS in ${VMFSLIST} + cp -p ${VMBASE}.${FS}.${FORMAT} \ + ${DESTDIR}/vmimages/${OSRELEASE}-${FS}.${FORMAT} +. endfor . endfor . if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) . for FORMAT in ${VMFORMATS} +. for FS in ${VMFSLIST} # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. - ${XZ_CMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} + ${XZ_CMD} ${DESTDIR}/vmimages/${OSRELEASE}-${FS}.${FORMAT} +. endfor . endfor . endif + # Compatibility hardlinks from "foo.bar" to "foo-${VMFS}.bar". +. for FORMAT in ${VMFORMATS} +. if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) + ln -f ${DESTDIR}/vmimages/${OSRELEASE}-${VMFS}.${FORMAT}.xz ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT}.xz +. else + ln -f ${DESTDIR}/vmimages/${OSRELEASE}-${VMFS}.${FORMAT} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} +. endif +. endfor cd ${DESTDIR}/vmimages && sha512 ${OSRELEASE}* > \ ${DESTDIR}/vmimages/CHECKSUM.SHA512 cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -366,13 +366,24 @@ compress to roughly the same size, regardless of the specified disk image size. .It Va VMFS -Set to specify the file system type to use. +(Deprecated.) +Set to specify which of the filesystem(s) listed in +.Va VMFSLIST +is linked to the historical non-filesystem-labelled file name. Valid values are .Va ufs and .Va zfs . The default value is .Va ufs . +.It Va VMFSLIST +Set to specify the list of file system types to build images for. +Valid values are one or both of +.Va ufs +and +.Va zfs . +The default value is +.Va ufs zfs . .It Va VMFORMATS Set to the target virtual disk image format(s) to create. By default, the