From nobody Wed Oct 18 19:17:55 2023 X-Original-To: dev-commits-src-all@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 4S9gbl6PGHz4xQBS; Wed, 18 Oct 2023 19:17:55 +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 4S9gbl5ySfz4pB0; Wed, 18 Oct 2023 19:17:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697656675; 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=QiWuHQkaxk3AAUo/MmNt+4upmB+Q1w2hwuOisI8PqFE=; b=vH8vOkE34I1zY9af6LQo4EfJAvnbDYmcV0SL/J6zNLRQC2IBXrXmDXRWLj7APH+TWtRvPe 8y98QjTqGZDOeskQ1OcGsvI5t27Uqh0Mq54/aS6kzrpFPsWPvu8bC5rdQVr8IGiSepBKBY JYKeGH9lsgzyID7SrZMHj2USHcn21WKXjXlsG03gASGFMLMgZwOIngZ89+KGCDVk6BQDNH LdYY6z+5EAiv3EyPH5etfMWMNRX5BqCYjPOeNH2qsLAwogMB4WEIZ4S0+K2URXDYhGXEwA EPGnMzZrLeHAj7v/kD0uwUFC8AGwyk5Rqj5lsAoqtcQcvVekd9tgOpbUFW+AuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697656675; a=rsa-sha256; cv=none; b=JRHXqoZFoPb3lDSmpd4JuuMPG9jxTse7dm+Y/vQlbTWBZst9Aj5twsLiGW3M1FU+2+mJ5K 8htx3vWKCklQEz5itNi7FIUvC6v/bbsXpQufBYkp8aDdywGcsWfAr6YIisWvc5CB7ioYSz uTiNwoLdbtve0CRcugcTYf8h12JK8wGFU19TxwyaG8tf2mZlUya/Du7K33baSAXck69XyJ yCgSOJMRvRf0TVcVWgzGJLFXwE62ZuAW3Xp09tlBQFkImnEnltxFi7moJ475GMfgR9Eeov m7YCPD7HNCLh41FRx+At79TeJj3/7JwJFsMBGfpOk8Sf9jKyqrwH0P+RFvKtAA== 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=1697656675; 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=QiWuHQkaxk3AAUo/MmNt+4upmB+Q1w2hwuOisI8PqFE=; b=Gq8TEeaoHQ3Kq3o5fMrU5iQPOBgp/p6JohSRj8FKJSCk8eisWYAmY3TLRJ2xgYV5kmJdg9 laGzQCQxtUbQ1/3hoqkgA8Z7DnGS8hqmoWrl59/9BUAIspcUhVuwbtYS8VeukJjeay/ayk KGph9Cpb6/wsvqHcGAoyjL8fStRkJlKYqeuwr4cfpd0qfvTwTD1kzEV/9wMpZHT07yi3LD hOID45kWFTKvInHnZhhBKevn48YBQjTkBwv1eeSIMBo1Q4KQjdRWaRG8hrH2N+b+/dNFfr n8FwXFfrj0Ivtfmu1/FQuf8D2LKIXoOEm3FqOmHRbxa+3OOSU/tt+hYaxyQWIQ== 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 4S9gbl54Znz4B6; Wed, 18 Oct 2023 19:17:55 +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 39IJHtcg062967; Wed, 18 Oct 2023 19:17:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IJHtRF062964; Wed, 18 Oct 2023 19:17:55 GMT (envelope-from git) Date: Wed, 18 Oct 2023 19:17:55 GMT Message-Id: <202310181917.39IJHtRF062964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 9103c2f0ce27 - releng/14.0 - releng-gce: Add ZFS support to GCE image buliding and uploading List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 9103c2f0ce273343391a1fdf53cdee92147d2e73 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=9103c2f0ce273343391a1fdf53cdee92147d2e73 commit 9103c2f0ce273343391a1fdf53cdee92147d2e73 Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:41:43 +0000 Commit: Li-Wen Hsu CommitDate: 2023-10-18 19:17:26 +0000 releng-gce: Add ZFS support to GCE image buliding and uploading Approved by: delphij (re), gjb (re) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41527 (cherry picked from commit 1b10bdf0e2fa80a485980b783469687623d3f1c3) (cherry picked from commit c892a9af7187e94f8dd6f720609e84d79c9e7d1f) --- release/Makefile.gce | 38 +++++++++++++++++++++----------------- release/Makefile.vm | 2 +- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/release/Makefile.gce b/release/Makefile.gce index bdf7b31ba302..f7fb0d8dc419 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -4,7 +4,6 @@ # Makefile for uploading Google Compute Engine disk images. # -GCE_IMG?= ${.OBJDIR}/gce.raw GCE_UPLOAD_TGTS= gce-check-depends \ gce-do-package \ gce-do-upload @@ -27,10 +26,6 @@ SNAPSHOT_DATE= -v${BUILDDATE} GCE_FAMILY_SUFX= -snap .endif -# Really? Uppercase characters are not allowed? Sigh... -# And don't even get me started on the '.'. -GCE_TARGET:= ${OSRELEASE:S,.raw,,:tl:S,.,-,g}${SNAPSHOT_DATE} - gce-upload: ${GCE_UPLOAD_TGTS} gce-check-depends: @@ -53,25 +48,34 @@ gce-check-depends: . endif .endif -gce-do-package: - @# Yes, really... Sigh. - cd ${.OBJDIR} && mv gce.raw disk.raw - cd ${.OBJDIR} && tar --format=gnutar -zcf \ - ${GCE_TARGET:S,${.OBJDIR}/,,}.tar.gz disk.raw - cd ${.OBJDIR} && mv disk.raw gce.raw - touch ${.OBJDIR}/${.TARGET} - gce-do-login: @echo "This requires human interaction, which is not yet supported." @true -gce-do-upload: +.for _FS in ${GCE_FSLIST} +GCE_IMG_${FS}= ${.OBJDIR}/gce.${_FS}.raw +# Really? Uppercase characters are not allowed? Sigh... +# And don't even get me started on the '.'. +GCE_TARGET_${_FS}= ${OSRELEASE:S,.raw,,:tl:S,.,-,g}-${_FS}${SNAPSHOT_DATE} + +gce-do-package-${_FS}: + @# Yes, really... Sigh. + cd ${.OBJDIR} && mv ${GCE_IMG_${_FS}} disk.raw + cd ${.OBJDIR} && tar --format=gnutar -zcf \ + ${GCE_TARGET_${_FS}:S,${.OBJDIR}/,,}.tar.gz disk.raw + cd ${.OBJDIR} && mv disk.raw ${GCE_IMG_${_FS}} + touch ${.OBJDIR}/${.TARGET} + +gce-do-upload-${_FS}: @# Fallthrough in case the bucket already exists. /usr/local/bin/gsutil mb gs://${GCE_BUCKET} || true - /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \ + /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET_${_FS}}.tar.gz \ gs://${GCE_BUCKET}/ - /usr/local/bin/gcloud compute images create ${GCE_TARGET} \ + /usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \ --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \ - --source-uri gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz + --source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz touch ${.OBJDIR}/${.TARGET} +.endfor +gce-do-package: gce-do-package-${VMFS} +gce-do-upload: gce-do-upload-${VMFS} diff --git a/release/Makefile.vm b/release/Makefile.vm index e1bba5271a4c..1a58a548b9f4 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -34,7 +34,7 @@ EC2_FLAVOURS= BASE CLOUD-INIT EC2-BASE_DESC= Amazon EC2 image EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image GCE_FORMAT= raw -GCE_FSLIST= ufs +GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image OCI_FORMAT= qcow2 OCI_FSLIST= ufs