From nobody Tue Aug 29 17:43:14 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 4RZvsZ6cgBz4s2QL; Tue, 29 Aug 2023 17:43:14 +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 4RZvsZ4sXNz4HqK; Tue, 29 Aug 2023 17:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693330994; 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=8QTswiYkHS4iT8dKhgH2wYbtUN737ZH43eHFzZoEhPs=; b=VWqfFyPwtT06i43mcRMMxJ1kB3FkYzfNck5EKAvF7vmLGNYVQoVnuH72UyCOkcQiNjYfJi KSiiAWqgm2zebi4B7R+KKSqLg7fcWJV8Gn+cte365yQWJ79oylCLZ4f15uEAxc5JUr8g0u F6PorfaKR7+yUmcAUYZ0lrxKx2w9IxXaGpJjH8rAClreM1lb6UCpafZRRIdyv/1YtCX7eh IJrvtuzgTJPg21mDP4ESqoiDAk/xF53JmtZXZMcQ4pjNVMFD03ML3mbtZgiPalSiuMyceh 2M9ZOfEJkfc4IQ6GuicCoPQiKPt0xyguGFTUnoEVRYaX8ehDKv7/4KL8W1PY3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693330994; a=rsa-sha256; cv=none; b=hTnrZFszcROoLJq2IJXPLuM3H0nQPwpVJp4EyRyHp+V3aQ3jqbOPOcNkpTlRB9dlXw7zrS KGQ9LSRCptKhb/4PClkXnYI4fgRj60lVav5Ngrf/658PsPYHJM+imuiZD/9XZDtyKTH2k0 43z7oXK48mTqlw9UvQuWWWM97DwQ8swtowMfcJoIk8kQQGbAObheVL0xUhTLClrras0BuX +XgYijJQcX+AiqGFNbVDE+lkqJPumuYmipRMK1umdg8XLIJltoywJ61y2eMLiXGEwbAyS2 duzsxB5xzL+YAw/IrNV/bp0KCYfEr8SgOIC5VfR6hJZt2reQUI6NbIBKuvibWQ== 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=1693330994; 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=8QTswiYkHS4iT8dKhgH2wYbtUN737ZH43eHFzZoEhPs=; b=xnwQMhusMlEGup/iUlWFLcTvcA6imS8SqpX9yODAnk8sb0A3YzUglb6Y5ZncpFqTlu7HYy XaF3gVCZbsOvvRpHzKLlPHZmzo0DrPZsojVh9+wFnK3rz8qG/UKafNFMpe/ocW0HclKNYS ZO8I7EthHWtYSBB8bnZzUGMGyBHOqs4zlJE1sy2LbreEEGIH9ckejt46BjO53AxYADzQ8Z 8d8Qpn9CXoBhCOPvbMt1jMgi/X9RGPqG+dEGdadtCMxqcugB+pIsQz/jji77tFA9rMCF/f cZ7w6MSD2IasBw1pWNxet3LmKoIQ+klPcd0Pz4c7gWEqPh1wYtoU/eS1iVw9Qw== 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 4RZvsZ3lhZz11N0; Tue, 29 Aug 2023 17:43:14 +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 37THhEbn089531; Tue, 29 Aug 2023 17:43:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37THhE14089528; Tue, 29 Aug 2023 17:43:14 GMT (envelope-from git) Date: Tue, 29 Aug 2023 17:43:14 GMT Message-Id: <202308291743.37THhE14089528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 1b10bdf0e2fa - main - releng-gce: Add ZFS support to GCE image buliding and uploading 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b10bdf0e2fa80a485980b783469687623d3f1c3 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=1b10bdf0e2fa80a485980b783469687623d3f1c3 commit 1b10bdf0e2fa80a485980b783469687623d3f1c3 Author: Li-Wen Hsu AuthorDate: 2023-08-29 17:41:43 +0000 Commit: Li-Wen Hsu CommitDate: 2023-08-29 17:41:43 +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 --- 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 a5d194cc2678..ad09f3ff6602 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -36,7 +36,7 @@ EC2_FSLIST= ufs zfs EC2_DESC= Amazon EC2 image EC2_DISK= ${OSRELEASE}.${EC2_FORMAT} GCE_FORMAT= raw -GCE_FSLIST= ufs +GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image GCE_DISK= disk.${GCE_FORMAT} OCI_FORMAT= qcow2