dttung2905 commented on code in PR #53: URL: https://github.com/apache/terraform-provider-iceberg/pull/53#discussion_r3555034562
########## dev/release/verify_rc.sh: ########## @@ -0,0 +1,221 @@ +#!/usr/bin/env bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Verifies a release candidate of the Apache Iceberg Terraform provider so you +# can cast an informed vote. It downloads the source release from the Apache dev +# SVN and checks its GPG signature and checksum, runs the Apache RAT license +# check, then builds and tests the provider from source in a throwaway sandbox. +# +# Usage: dev/release/verify_rc.sh <version> <rc> +# e.g.: dev/release/verify_rc.sh 0.7.0 1 +# +# A valid signature from a key in the KEYS file, a matching checksum, a clean RAT +# check, and a clean build/test is a +1. + +set -eu + +SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +TOP_SOURCE_DIR="$(dirname "$(dirname "${SOURCE_DIR}")")" + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 <version> <rc>" + echo " e.g.: $0 0.7.0 1" + exit 1 +fi + +set -o pipefail +set -x + +VERSION="$1" +RC="$2" + +ICEBERG_DIST_BASE_URL="https://downloads.apache.org/iceberg" +DOWNLOAD_RC_BASE_URL="https://dist.apache.org/repos/dist/dev/iceberg/apache-iceberg-terraform-${VERSION}-rc${RC}" +ARCHIVE_BASE_NAME="apache-iceberg-terraform-${VERSION}" + +: "${VERIFY_DEFAULT:=1}" +: "${VERIFY_DOWNLOAD:=${VERIFY_DEFAULT}}" +: "${VERIFY_FORCE_USE_GO_BINARY:=0}" +: "${VERIFY_SIGN:=${VERIFY_DEFAULT}}" +: "${VERIFY_RAT:=${VERIFY_DEFAULT}}" + +VERIFY_SUCCESS=no Review Comment: Also another thing I notice. The `verify_rc.sh` script currently only verifies the source tarball. Since the Terraform/OpenTofu registries consume the convenience binaries directly, voters should also be able to verify those. Could we add a step to: - Download `terraform-provider-iceberg_<version>_SHA256SUMS` and SHA256SUMS.sig` from the GitHub prerelease - Verify the signature of `SHA256SUMS.sig` against the key imported from the KEYS file - Optionally download a binary zip and verify its checksum against `SHA256SUMS` imo, this would give voters full confidence that what ends up on the registry matches what was voted on. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
