From nobody Wed Aug 09 22:45:16 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RLlWJ5fwXz4mPmF; Wed, 9 Aug 2023 22:45:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RLlWJ5BLtz4MSB; Wed, 9 Aug 2023 22:45:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691621116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RnzPT5ULxnqep/GymR0pOrUr8chTdRx40d3+21ySxdE=; b=nGIcG5zyblGtt0hoCMIU9hZQl+IMYZO+TPag84Fcw2Uhd8XJPPR30bVxdQq1ZeXkenJWkB uUJiABLf9M0qoVQ2cEJnUIj3nnQYITYwX2g7/5CPLDiAaEZZBzGlirET2kt/XltizRvJEb KCI5WyJOHbtz87599bs1JhBfjf9yxv0zYzy31CFPWo5hymoqbzscMCTfuBC+7KlHR5FFm4 2YPliojNCObOaz3biURtw9ZFccLnMZ0BXrfSjqeAmM0HB71lDoGrH9vm7VuWvZVLQEi2OJ YC61BIHV8WtbaYGh3Axq2aUi8bdOk46h1dIvPxRYnJAKb4YRdjiLQMLnh8oyxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691621116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RnzPT5ULxnqep/GymR0pOrUr8chTdRx40d3+21ySxdE=; b=ynbdFPnvbvsUB366KXihjckLxTNdXAXIHpEaoMlShDgU5fp73N2HmY5rOD+L4KfSWoWQRx jHbEmyAvHOEQh6DTrHOn6D0uhqPVkryYd48SMuH3U4iBG38y9pz1gTyK05gptrNFFZzzrS a8R33EmVTFpR/yQ5jvpOje5pqYWTU+uqnGGfFoeMFLcJkLd0Q6/8oTWx6ZmRzyoPac/2qx mtC9jOEn6dTHFqZKetDu3fvwQ1Un19NUA8hx+zFuLkw2Olf23DC0riDzjBdlnrC4d9EMOW oiCG3JzMrzM6Wke+tHvM629ESEj4s/LQqsAde7EEteuyy8/mgMYl6T0lKB86aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691621116; a=rsa-sha256; cv=none; b=IjZrScFL8GK8RG846snMk0vmHpjYVav4TlrSqtRibGKYuYqPsNlT2Zt4yxWrYZyN4252nD PjzzlEw7ZG/VCjVwySQEBbdataH4Bv3hUANB1t/fhZen+Uqub3QdXBI9QbmV/sjXBap1Yb UpZJVsTpFN905V9EV8YXo3xcxJ8TAuhPXRAkPWubnEqF6FtjUV8PCTvA6H9HiLAdBnocQz 0DrqE/rHFLRUEzyk71Jy71Ya1jl4mJ5DgITu34GofHgnYKhStfpk5Mf8JXLbzgvi0sRmRc Gl9SI2Y7Vgs7xyyhto7U1QbVHxaIq21txy4yc74/V7k6Z6q/+fhcRz+lVGnYMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RLlWJ3qRvzYpy; Wed, 9 Aug 2023 22:45:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 379MjGE1058558; Wed, 9 Aug 2023 22:45:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 379MjGFW058555; Wed, 9 Aug 2023 22:45:16 GMT (envelope-from git) Date: Wed, 9 Aug 2023 22:45:16 GMT Message-Id: <202308092245.379MjGFW058555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 32ae9a6b3937 - main - release: Build UFS and ZFS VM images List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32ae9a6b39372808f3d662300c15157513704aff Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=32ae9a6b39372808f3d662300c15157513704aff commit 32ae9a6b39372808f3d662300c15157513704aff Author: Colin Percival AuthorDate: 2023-08-07 01:53:16 +0000 Commit: Colin Percival CommitDate: 2023-08-09 22:44:54 +0000 release: Build UFS and ZFS VM images A new option 'VMFSLIST' controls the list of filesystems for which VM images will be built; the default is to build both UFS and ZFS. The vm-install target installs these as ${OSRELEASE}-${FS}.${FORMAT}, e.g. FreeBSD-14.0-CURRENT-amd64-zfs.vmdk. For backwards compatibility, the ${VMFS} image is linked to the previously used ${OSRELEASE}.${FORMAT} name. Cloudware building will be updated in a later commit. Reviewed by: gjb Reviewed by: emaste, markj (previous version) Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41340 --- release/Makefile.vm | 33 +++++++++++++++++++++++++-------- share/man/man7/release.7 | 13 ++++++++++++- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index ce86fabdfe5e..0ab683c090ef 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -9,6 +9,7 @@ VMTARGETS= vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 5120m VMFS?= ufs +VMFSLIST?= ufs zfs SWAPSIZE?= 1g VMBASE?= vm @@ -112,8 +113,10 @@ cw${_CW:tl}-package: .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-base: vm-image 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 @@ vm-install: .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 index 8ce2cf47b4fd..068837ff682f 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -366,13 +366,24 @@ is used, the resulting files compressed with 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