From nobody Sun Apr 14 23:45:58 2024 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 4VHn4Q6XQVz5HJWk; Sun, 14 Apr 2024 23:45:58 +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 4VHn4Q5H43z42Mk; Sun, 14 Apr 2024 23:45:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713138358; 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=4Fr3fw6Faktj4GfvNGSdxtaIguflkARnyqZYNF6iItE=; b=vQkFxb0CRTr8HIz4c//3y3HqseMdzLePWuq8dBPOhOTwhoVKoF+sw38XcQAKPfV6JSQb0r 2rskElMiboPtkQ3Xx3vJ+Zi9evANt23chANzjv61EzIVpCsBMknFvbHlw3/i3IEueAW6rQ FjI7oVWHsLzViZonWiPa8HLphdjWxlj4x5gVfYSFeyOoUnSMQP6wmnz3yLkP+UdMCgADps D9y5jegPDGX+T34kllKV6r4RFVZ0ftQVlceVvlLPk8/4dVM/FOlJ9qucrhSoG87YXmlZOh hXSSfQGaQiu2pkf+CCBoXOHP8yPG8AL+Q0WJP/lHDMyfsNa3Ho2DQGZoyHzjhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713138358; a=rsa-sha256; cv=none; b=a36Y9Dq8px9kT4bnBMnJ7gaNejuCm/kGACgvoqjTSKJc4jLUh+CAcNE4FRcWcRbAiQ2oiC MrL0/EwX2tdu4hi35bXEiB0lE3LV6NkPFiUWmJ6JL7VFahn7c+cu8yS8oPmzeaw9+HEJgr rtH+rblyHUBlMhKNo76V8ktF+LKGKv9FtYqXL5GruSSCe0HoI50vRRQnwSziy578XzyX0f d2qHmZZxCObb6CV5rmsj9ry3JY7KmHFhHGLimtJws944gbua1AyQci58uGShQKSGbi1H/B LqmJbj9RDGl9lOcgh0DfUGUxXnL/vjaBpMq7ScwAOmLkuh7LqQABfY3TzE35Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713138358; 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=4Fr3fw6Faktj4GfvNGSdxtaIguflkARnyqZYNF6iItE=; b=eipogogFcI6f76cHuJrKnvas7vt0VQhqd7SdnWhVKI+SsSsjSXOeyAnTf0jHhPqKtui1Q4 ajLXkTYx+Ku6VUyub4KBKmFGy1SX7okUXdXstzIoFSfg0qJHpJrF1MY810yBgVFT8rypaU 9qj79yHXH8GRPCQj9yiVXVIzY2Q6lhBRNLb6GvqJtHCp4MxrOqiREM194uWrKHX3QVPXuj Inqw5mQ2fO+kpdjWvmtviAarHkMLuDa+LyudO9Kq74SoD4Bdu0jLiy84r1f0B1Ot5BwPrY WLHYn+yDPaqg7YQRdMtQaKcVVtJu2kr3ADdm41pp6wTAnbktFr2iYE19FW1byw== 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 4VHn4Q4ms9zc3j; Sun, 14 Apr 2024 23:45:58 +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 43ENjwKs012549; Sun, 14 Apr 2024 23:45:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ENjwYb012546; Sun, 14 Apr 2024 23:45:58 GMT (envelope-from git) Date: Sun, 14 Apr 2024 23:45:58 GMT Message-Id: <202404142345.43ENjwYb012546@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: 5c213bf01a5d - main - cloudware: allow disk format to be a list 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: 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: 5c213bf01a5dca7c4030efd2ad9c9f84852e7b32 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=5c213bf01a5dca7c4030efd2ad9c9f84852e7b32 commit 5c213bf01a5dca7c4030efd2ad9c9f84852e7b32 Author: Colin Percival AuthorDate: 2024-04-14 17:44:07 +0000 Commit: Colin Percival CommitDate: 2024-04-14 23:45:40 +0000 cloudware: allow disk format to be a list Make basic-cloudinit available both in qcow2 and raw formats MFC After: 3 days Co-Authored-By: bapt Sponsored by: OVHCloud (original patch from bapt) Differential Revision: https://reviews.freebsd.org/D44747 --- release/Makefile.vm | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index de73749f1985..83e3077b5bd4 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -30,7 +30,7 @@ AZURE_DESC= Microsoft Azure platform image BASIC-CI_FORMAT= raw BASIC-CI_FSLIST?= ufs BASIC-CI_DESC= Image for CI -BASIC-CLOUDINIT_FORMAT= raw +BASIC-CLOUDINIT_FORMAT= raw qcow2 BASIC-CLOUDINIT_FSLIST?= ufs zfs BASIC-CLOUDINIT_DESC?= Images for VM with cloudinit disk config support EC2_FORMAT= raw @@ -103,32 +103,44 @@ QEMUTGT?= ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf . endif . for _FS in ${${_CW:tu}_FSLIST} -CLOUDTARGETS+= cw-${_CW:tl}-${_FS} -CLEANDIRS+= cw-${_CW:tl}-${_FS} -CLEANFILES+= ${_CW:tl}.${_FS}.img \ - ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} \ - ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT}.raw -${_CW:tu}${_FS:tu}IMAGE= ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} - -cw-${_CW:tl}-${_FS}: ${QEMUTGT} +. for _FMT in ${${_CW:tu}_FORMAT} +CLOUDTARGETS+= cw-${_CW:tl}-${_FS}-${_FMT} +CLEANDIRS+= cw-${_CW:tl}-${_FS}-${_FMT} +CLEANFILES+= ${_CW:tl}.${_FS}.${_FMT}.img \ + ${_CW:tl}.${_FS}.${_FMT} \ + ${_CW:tl}.${_FS}.${_FMT}.raw +${_CW:tu}${_FS:tu}${_FMT:tu}IMAGE= ${_CW:tl}.${_FS}.${_FMT} + +cw-${_CW:tl}-${_FS}-${_FMT}: ${QEMUTGT} mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ QEMUSTATIC=${QEMUSTATIC} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${_FS} \ - -i ${.OBJDIR}/${_CW:tl}.${_FS}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ - -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}${_FS:tu}IMAGE} -c ${${_CW:tu}CONF} + -i ${.OBJDIR}/${_CW:tl}.${_FS}.${_FMT}.img -s ${VMSIZE} -f ${_FMT} \ + -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}${_FS:tu}${_FMT:tu}IMAGE} -c ${${_CW:tu}CONF} touch ${.TARGET} +. endfor . endfor -# Hardlinks from "foo.bar" to "foo-${VMFS}.bar". These can go away once all -# of the cloudware code knows how to handle multiple filesystem images (or +# Hardlinks from "foo.${FMT}" to "foo-${VMFS}.${FMT}". These can go away once +# all of the cloudware code knows how to handle multiple filesystem images (or # at least knows the name of the UFS image). -CLOUDTARGETS+= cw-${_CW:tl} -CLEANFILES+= ${_CW:tl}.${${_CW:tu}_FORMAT} -${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} -cw-${_CW:tl}: cw-${_CW:tl}-${VMFS} - ln -f ${${_CW:tu}${VMFS:tu}IMAGE} ${${_CW:tu}IMAGE} +. for _FMT in ${${_CW:tu}_FORMAT} +CLOUDTARGETS+= cw-${_CW:tl}-${_FMT} +CLEANFILES+= ${_CW:tl}.${_FMT} +${_CW:tu}${_FMT:tu}IMAGE= ${_CW:tl}.${_FMT} +cw-${_CW:tl}-${_FMT}: cw-${_CW:tl}-${VMFS}-${_FMT} + ln -f ${${_CW:tu}${VMFS:tu}${_FMT:tu}IMAGE} ${${_CW:tu}${_FMT:tu}IMAGE} +. endfor + +# Targets without a disk format listed are the first disk format on the list +. for _FS in ${${_CW:tu}_FSLIST} +${_CW:tu}${_FS:tu}IMAGE= ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT:[1]} +cw-${_CW:tl}-${_FS}: cw-${_CW:tl}-${_FS}-${${_CW:tu}_FORMAT:[1]} +. endfor +${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT:[1]} +cw-${_CW:tl}: cw-${_CW:tl}-${${_CW:tu}_FORMAT:[1]} . endfor .endif