You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "amoeba (via GitHub)" <gi...@apache.org> on 2026/04/18 01:20:36 UTC
[PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
amoeba opened a new pull request, #49788:
URL: https://github.com/apache/arrow/pull/49788
### Rationale for this change
We need a script for the release manager to run during the release to locally sign the Windows artifacts for the FlightSQL ODBC driver.
### What changes are included in this PR?
- New script, `07-flightsql-odbc-upload.sh`
- Update to release guide
### Are these changes tested?
Not 100% but I've tested each separate. I tested on my fork using fake tags and releases.
### Are there any user-facing changes?
No.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on PR #49788:
URL: https://github.com/apache/arrow/pull/49788#issuecomment-4293003919
Rebased since I think that will fix the failing CI jobs. I'll merge when green.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on PR #49788:
URL: https://github.com/apache/arrow/pull/49788#issuecomment-4293741130
Merged, thanks for the help @kou.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105576240
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
Review Comment:
Good point. Changed in 92a8ae8860c2267c804ceac62c18f47726e093fd.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105074859
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
+ if [ -z "${run_id}" ]; then
+ echo "ERROR: failed to get run ID from workflow trigger" >&2
+ exit 1
+ fi
+ echo "Triggered run: ${run_url}"
+
+ echo "[6/9] Waiting for workflow to complete..."
+ gh run watch "${run_id}" --repo "${GITHUB_REPOSITORY}" --exit-status
Review Comment:
If this may take long time, we may want to add `--interval XXX`.
##########
dev/release/09-binary-verify.sh:
##########
Review Comment:
Could you remove `08-binary-verify.sh`?
##########
dev/release/08-publish-gh-release.sh:
##########
Review Comment:
Could you remove `07-publish-gh-release.sh`?
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
Review Comment:
How about setting them in `dev/release/.env`?
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
Review Comment:
How about using `--json` and `--jq` like we did in https://github.com/apache/arrow/blob/6dd07b1cb78506dee6de77f4c1ff6c41f7a0fbce/dev/release/utils-watch-gh-workflow.sh#L37-L43 ?
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
Review Comment:
Why do we need to remove unsigned DLL?
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
Review Comment:
How about using constant temporary directory (such as `dev/release/tmp/`) instead of `mktemp -d`?
If we use `mktemp -d`, we need to remove the temporary directory manually.
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
+ if [ -z "${run_id}" ]; then
+ echo "ERROR: failed to get run ID from workflow trigger" >&2
+ exit 1
+ fi
+ echo "Triggered run: ${run_url}"
+
+ echo "[6/9] Waiting for workflow to complete..."
+ gh run watch "${run_id}" --repo "${GITHUB_REPOSITORY}" --exit-status
+ echo "Run id ${run_id} completed."
+fi
+
+if [ ${PHASE_SIGN_MSI} -gt 0 ]; then
+ echo "[7/9] Downloading unsigned MSI..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "Apache-Arrow-Flight-SQL-ODBC-*-win64.msi" \
Review Comment:
```suggestion
--pattern "Apache-Arrow-Flight-SQL-ODBC-${version}-win64.msi" \
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105576647
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
Review Comment:
Good idea. Done in 62265bd1f92c2b1211bacc64b6d0edd60fa323a0.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba merged PR #49788:
URL: https://github.com/apache/arrow/pull/49788
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3112021746
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
Review Comment:
That's a good point. I think we can use utils-watch-gha-workflow.sh for this then. It already includes `--interval`.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105615460
##########
dev/release/09-binary-verify.sh:
##########
@@ -0,0 +1,49 @@
+#!/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.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+rc_tag="apache-arrow-${version}-rc${rc}"
+repository="${REPOSITORY:-apache/arrow}"
+
+run_id=$(gh run list \
+ --branch "${rc_tag}" \
+ --jq '.[].databaseId' \
+ --json databaseId \
+ --limit 1 \
+ --repo "${repository}" \
+ --workflow "verify_rc.yml")
+gh run rerun \
+ "${run_id}" \
+ --failed \
+ --repo "${repository}"
Review Comment:
Unrelated change.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105575031
##########
dev/release/09-binary-verify.sh:
##########
Review Comment:
Same mistake. Will fix.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3111898825
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,194 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# Set these in .env.
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: "${PHASE_DEFAULT=1}"
+: "${PHASE_SIGN_DLL=${PHASE_DEFAULT}}"
+: "${PHASE_BUILD_MSI=${PHASE_DEFAULT}}"
+: "${PHASE_SIGN_MSI=${PHASE_DEFAULT}}"
+
+if [ "${PHASE_SIGN_DLL}" -eq 0 ] && [ "${PHASE_BUILD_MSI}" -eq 0 ] && [ "${PHASE_SIGN_MSI}" -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local exit_code=0
+ jsign extract --format PEM "${file}" > /dev/null 2>&1 || exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+ return ${exit_code}
+}
+
+# Use dev/release/tmp for temporary files
+tmp_dir="${SOURCE_DIR}/tmp"
+if [ -e "${tmp_dir}" ]; then
+ echo "ERROR: temp dir already exists: ${tmp_dir}. Remove it manually and run again." >&2
+ exit 1
+fi
+
+if [ "${PHASE_SIGN_DLL}" -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_unsigned}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ mv "${tmp_dir}/${dll_unsigned}" "${tmp_dir}/${dll_signed}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ "${PHASE_BUILD_MSI}" -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+' || true)
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
+ if [ -z "${run_id}" ]; then
+ echo "ERROR: failed to get run ID from workflow trigger" >&2
+ exit 1
+ fi
+ echo "Triggered run: ${run_url}"
+
Review Comment:
Not relevant as this PR needs to be rebased after another is merged for this PR to make sense.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105575907
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
+ if [ -z "${run_id}" ]; then
+ echo "ERROR: failed to get run ID from workflow trigger" >&2
+ exit 1
+ fi
+ echo "Triggered run: ${run_url}"
+
+ echo "[6/9] Waiting for workflow to complete..."
+ gh run watch "${run_id}" --repo "${GITHUB_REPOSITORY}" --exit-status
Review Comment:
Changed in 5b01a0f4e77af3f7194a1ea99d16f9bec1e104e7.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105612694
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
+ if [ -z "${run_id}" ]; then
+ echo "ERROR: failed to get run ID from workflow trigger" >&2
+ exit 1
+ fi
+ echo "Triggered run: ${run_url}"
Review Comment:
This seems overly cautious. The call-out about the grep erroring and failing the script is fair though so I added a `|| true` so it continues and empty run_id gets caught below. 7f0e6e0282660b56c98bbea39d02495b64350608
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105605286
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
Review Comment:
I think this is a correct call-out. Fixed in 47ec0389a1086c4af3153891b82a32e148763da8.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3111895552
##########
docs/source/developers/release.rst:
##########
@@ -264,13 +264,24 @@ Build source and binaries and submit them
# NOTE: You need to have GitHub CLI installed to run this script.
dev/release/06-matlab-upload.sh <version> <rc-number>
+ # Sign, build the installer for, and sign the installer for the FlightSQL
+ # ODBC Windows driver
+ #
+ # NOTE: This must be run by a PMC member
+ # Note: You need to have jsign installed and an available credential from
+ # ASF to sign artifacts. Not all PMC members will have access to code
+ # signing.
+ # Note: The script requires setup of ssl.com environment variables.
+ # Note: Invoking this script costs money.
+ dev/release/07-flightsqlodbc-upload.sh <version> <rc_number>
Review Comment:
Done in d051f0ba20b3fa58c2ed6fe3e8a931985388c118.
##########
docs/source/developers/release.rst:
##########
@@ -264,13 +264,24 @@ Build source and binaries and submit them
# NOTE: You need to have GitHub CLI installed to run this script.
dev/release/06-matlab-upload.sh <version> <rc-number>
+ # Sign, build the installer for, and sign the installer for the FlightSQL
+ # ODBC Windows driver
+ #
+ # NOTE: This must be run by a PMC member
+ # Note: You need to have jsign installed and an available credential from
+ # ASF to sign artifacts. Not all PMC members will have access to code
+ # signing.
+ # Note: The script requires setup of ssl.com environment variables.
+ # Note: Invoking this script costs money.
+ dev/release/07-flightsqlodbc-upload.sh <version> <rc_number>
+
# Move the Release Candidate GitHub Release from draft to published state
# This will update the artifacts download URL which will be available for the
# verification step.
- dev/release/07-publish-gh-release.sh <version> <rc-number>
+ dev/release/08-publish-gh-release.sh <version> <rc-number>
# Start verifications for binaries and wheels
- dev/release/08-binary-verify.sh <version> <rc-number>
+ dev/release/09-binary-verify.sh <version> <rc-number>
Review Comment:
Fixed in 07a432865a28058e9209f3e861175417a3c7f553.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3106333695
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
Review Comment:
Oh, sorry. I misunderstood the used command...
> Doing it this way isn't ideal but it seems slightly better than the alternative which would be to use `gh run list` with the right filters and assume the first result is the correct run. I guess that's a pretty safe assumption.
>
> Do you have a preference?
If it works, I prefer it. Parsing free format text may be fragile. `gh workflow run` output format may be changed.
If it doesn't work, let's parse free format text.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105575704
##########
dev/release/08-publish-gh-release.sh:
##########
Review Comment:
Fixed in f120e3c41c56c6dfbac08f4969651a95b6982f33.
##########
dev/release/09-binary-verify.sh:
##########
Review Comment:
Fixed in f120e3c41c56c6dfbac08f4969651a95b6982f33.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3112035871
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
Review Comment:
I like that idea. I removed the step in ac39888b3cc2b62e334c3a1eaab78880206f93c7.
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
Review Comment:
Changed in df22a8ef9f74bc9ead3036ca1866980aeff26c52.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #49788:
URL: https://github.com/apache/arrow/pull/49788#issuecomment-4296094277
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit e8b7b4e35e231a0fcdbfa74f6a6b0075108dd5dc.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/72499432350) has more details. It also includes information about 13 possible false positives for unstable benchmarks that are known to sometimes produce them.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3111892305
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,194 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# Set these in .env.
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
Review Comment:
Whoops. Fixed in 81b1e88dd175f4d84c4e894177d3752ea5fb0def.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105597103
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
Review Comment:
`workflow run` doesn't have a `--json` output arg and the command just prints,
```
[4/9] Triggering odbc_release_step in cpp_extra.yml workflow...
✓ Created workflow_dispatch event for cpp_extra.yml at AMOEBA-arrow-99.9.9-rc0
https://github.com/amoeba/arrow/actions/runs/24583481107
To see the created workflow run, try: gh run view 24583481107
To see runs for this workflow, try: gh run list --workflow="cpp_extra.yml"
```
Doing it this way isn't ideal but it seems slightly better than the alternative which would be to use `gh run list` with the right filters and assume the first result is the correct run. I guess that's a pretty safe assumption.
Do you have a preference?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on PR #49788:
URL: https://github.com/apache/arrow/pull/49788#issuecomment-4274325299
That seems to fix it and now pre-commit is green in CI. I filed https://github.com/apache/arrow/pull/49791. Reverted the test change in 7b99cd6ad8cede7ec70374a5192fb7c698a6a8e4.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on PR #49788:
URL: https://github.com/apache/arrow/pull/49788#issuecomment-4274307436
The pre-commit failure in https://github.com/apache/arrow/actions/runs/24610839359/job/71964834631?pr=49788#step:5:192 looks like it's caused by an unrelated issue. The fs package recently made a breaking change and it now requires libuv-dev.
I'm going to test a fix in ff033b6ce6573abebae07b222a93bb3ea0a8fe7c but will revert it and put it into another PR.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3106363686
##########
.pre-commit-config.yaml:
##########
@@ -349,7 +349,8 @@ repos:
?^cpp/examples/tutorial_examples/run\.sh$|
?^cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc\.sh$|
?^dev/release/05-binary-upload\.sh$|
- ?^dev/release/08-binary-verify\.sh$|
+ ?^dev/release/07-flightsqlodbc-upload\.sh$|
+ ?^dev/release/09-binary-verify\.sh$|
Review Comment:
Could you also add `08-publishgh-release.sh` if it doesn't have any lint failures?
If it has any lint failures, it's out of scope of this PR.
Could you also add `07-flightsqlodbc-upload.sh` to https://github.com/apache/arrow/blob/7190a7c6a48c99179922861ec5a5fe3b10534d8d/.pre-commit-config.yaml#L365-L383 ?
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,194 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# Set these in .env.
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
Review Comment:
Could you move them after `utils-env.sh`?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3111894024
##########
.pre-commit-config.yaml:
##########
@@ -349,7 +349,8 @@ repos:
?^cpp/examples/tutorial_examples/run\.sh$|
?^cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc\.sh$|
?^dev/release/05-binary-upload\.sh$|
- ?^dev/release/08-binary-verify\.sh$|
+ ?^dev/release/07-flightsqlodbc-upload\.sh$|
+ ?^dev/release/09-binary-verify\.sh$|
Review Comment:
I checked 08-publishgh-release.sh locally, and it has one failure. I'll file a separate PR.
I added the script to the shfmt step in fa646fcb1a5adb7faadc1e7545abcdd736e89bce.
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,194 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# Set these in .env.
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: "${PHASE_DEFAULT=1}"
+: "${PHASE_SIGN_DLL=${PHASE_DEFAULT}}"
+: "${PHASE_BUILD_MSI=${PHASE_DEFAULT}}"
+: "${PHASE_SIGN_MSI=${PHASE_DEFAULT}}"
Review Comment:
Done in 402b75f91eef25ed005583408adb652384d3fb50.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105600962
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
Review Comment:
This is a good suggestion. I changed the call to use `||` to avoid this issue: 33866c709069da16557cfaad645f96a579ab19fb.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105603942
##########
dev/release/08-publish-gh-release.sh:
##########
@@ -0,0 +1,38 @@
+#!/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.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+REPOSITORY="apache/arrow"
+
+rc_tag="apache-arrow-${version}-rc${rc}"
+gh release edit ${rc_tag} --repo ${REPOSITORY} --draft=false
Review Comment:
Already removed.
##########
dev/release/09-binary-verify.sh:
##########
@@ -0,0 +1,49 @@
+#!/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.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+rc_tag="apache-arrow-${version}-rc${rc}"
+repository="${REPOSITORY:-apache/arrow}"
+
+run_id=$(gh run list \
+ --branch "${rc_tag}" \
+ --jq '.[].databaseId' \
+ --json databaseId \
+ --limit 1 \
+ --repo "${repository}" \
+ --workflow "verify_rc.yml")
+gh run rerun \
+ "${run_id}" \
+ --failed \
+ --repo "${repository}"
Review Comment:
Already removed.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105574799
##########
dev/release/08-publish-gh-release.sh:
##########
Review Comment:
Ah, my mistake there. I still had the final commit in my git stash.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3106333695
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
Review Comment:
Oh, sorry. I misunderstood the used command...
> Doing it this way isn't ideal but it seems slightly better than the alternative which would be to use `gh run list` with the right filters and assume the first result is the correct run. I guess that's a pretty safe assumption.
>
> Do you have a preference?
If it works, I prefer it. Parsing free format text may be fragile. `gh workflow run` output format may be changed.
If it doesn't work, let's parsing free format text.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3106348148
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
Review Comment:
I see.
How about keeping the unsigned DLL while we use this workflow (building the unsigned DLL in CI, signing the unsigned DLL on local and uploading the signed DLL from local) so that we may be able to debug something or retry signing when the signed DLL has any problem.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105086459
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
Review Comment:
`is_signed()` uses `output=$(jsign extract ...)` while `set -e` is enabled. If the file is unsigned, `jsign extract` will return non-zero and the whole script will exit before `exit_code=$?` / cleanup runs, so the “unsigned vs signed” checks can’t work. Consider temporarily disabling `-e` inside the function (or using an `if jsign extract ...; then ...` pattern) and always running the cleanup.
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
Review Comment:
The DLL signing phase signs `${dll_unsigned}` in place, but then verifies/uploads `${dll_signed}` (`arrow_flight_sql_odbc.dll`) without ever creating/renaming that file. As written, the verification will fail and the upload will reference a non-existent path. After signing, rename/copy the signed `${dll_unsigned}` to `${dll_signed}` (or update the subsequent checks/uploads to point at the actual signed file).
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
Review Comment:
PR description mentions creating `07-flightsql-odbc-upload.sh`, but the added script is named `07-flightsqlodbc-upload.sh` (no dash). If the release guide / automation refers to the dashed name, this mismatch will break those instructions—either rename the script to match the documented name or update the docs accordingly.
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
Review Comment:
The phase default assignments use unquoted `${var=...}` expansions (e.g. `: ${PHASE_DEFAULT=1}`), which differs from the pattern used elsewhere in these release scripts (e.g. `: "${UPLOAD_DEFAULT:=1}"` in `05-binary-upload.sh`). Quoting and `:=` avoids word-splitting/globbing surprises and is more consistent with the rest of `dev/release`.
```suggestion
: "${PHASE_DEFAULT:=1}"
: "${PHASE_SIGN_DLL:=${PHASE_DEFAULT}}"
: "${PHASE_BUILD_MSI:=${PHASE_DEFAULT}}"
: "${PHASE_SIGN_MSI:=${PHASE_DEFAULT}}"
```
##########
dev/release/08-publish-gh-release.sh:
##########
@@ -0,0 +1,38 @@
+#!/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.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+REPOSITORY="apache/arrow"
+
+rc_tag="apache-arrow-${version}-rc${rc}"
+gh release edit ${rc_tag} --repo ${REPOSITORY} --draft=false
Review Comment:
This file duplicates `dev/release/07-publish-gh-release.sh` (same contents) but with a different step number. Keeping both versions will be confusing and risks the release guide pointing at the wrong step. Consider renumbering by renaming/moving the existing script (and updating references) instead of adding a duplicate, or deleting one of the copies.
```suggestion
# Compatibility wrapper: delegate to the canonical implementation to avoid
# keeping two numbered scripts with the same release logic.
exec "${SOURCE_DIR}/07-publish-gh-release.sh" "$@"
```
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ ${PHASE_BUILD_MSI} -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+')
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
+ if [ -z "${run_id}" ]; then
+ echo "ERROR: failed to get run ID from workflow trigger" >&2
+ exit 1
+ fi
+ echo "Triggered run: ${run_url}"
Review Comment:
`run_url=$(gh workflow run ... | grep ...)` runs under `set -e -o pipefail`; if `gh` output format changes or `grep` finds no match, the assignment will cause an immediate exit and the later `run_id` validation won’t run. Prefer using `gh workflow run ... --json` (if available) or add a non-fatal fallback (`|| true`) and/or follow up by querying `gh run list` for the latest run on the tag.
```suggestion
trigger_output=$(gh workflow run cpp_extra.yml \
--repo "${GITHUB_REPOSITORY}" \
--ref "${tag}" \
--field odbc_release_step=true 2>&1)
run_url=$(printf '%s\n' "${trigger_output}" | grep -oE 'https://[^ ]+' || true)
run_id=""
if [ -n "${run_url}" ]; then
run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
fi
if [ -z "${run_id}" ]; then
run_id=$(gh run list \
--repo "${GITHUB_REPOSITORY}" \
--workflow cpp_extra.yml \
--branch "${tag}" \
--limit 1 \
--json databaseId \
--jq '.[0].databaseId' || true)
fi
if [ -z "${run_id}" ] || [ "${run_id}" = "null" ]; then
echo "ERROR: failed to get run ID from workflow trigger" >&2
exit 1
fi
if [ -n "${run_url}" ]; then
echo "Triggered run: ${run_url}"
else
echo "Triggered run id: ${run_id}"
fi
```
##########
dev/release/09-binary-verify.sh:
##########
@@ -0,0 +1,49 @@
+#!/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.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+rc_tag="apache-arrow-${version}-rc${rc}"
+repository="${REPOSITORY:-apache/arrow}"
+
+run_id=$(gh run list \
+ --branch "${rc_tag}" \
+ --jq '.[].databaseId' \
+ --json databaseId \
+ --limit 1 \
+ --repo "${repository}" \
+ --workflow "verify_rc.yml")
+gh run rerun \
+ "${run_id}" \
+ --failed \
+ --repo "${repository}"
Review Comment:
`run_id` is derived from `gh run list` without checking for an empty result. If there are no matching runs on the tag (or the workflow name changes), `gh run rerun` will be invoked with an empty ID. Add a guard that errors out with a clear message when `run_id` is empty (similar to `utils-watch-gh-workflow.sh`).
##########
dev/release/09-binary-verify.sh:
##########
@@ -0,0 +1,49 @@
+#!/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.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+rc_tag="apache-arrow-${version}-rc${rc}"
+repository="${REPOSITORY:-apache/arrow}"
+
+run_id=$(gh run list \
+ --branch "${rc_tag}" \
+ --jq '.[].databaseId' \
+ --json databaseId \
+ --limit 1 \
+ --repo "${repository}" \
+ --workflow "verify_rc.yml")
+gh run rerun \
+ "${run_id}" \
+ --failed \
+ --repo "${repository}"
Review Comment:
This script is a copy of `dev/release/08-binary-verify.sh` but renumbered. Having both makes it unclear which step should be used and makes future changes easy to miss in one of the copies. Prefer renaming the existing script (and updating references) rather than adding a duplicate.
```suggestion
# Keep this script as a compatibility entry point, but delegate to the
# canonical implementation to avoid maintaining duplicate release logic.
exec "${SOURCE_DIR}/08-binary-verify.sh" "$@"
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on PR #49788:
URL: https://github.com/apache/arrow/pull/49788#issuecomment-4272294181
The new script depends on the unmerged changes in https://github.com/apache/arrow/pull/49603 so this PR will need a rebase after that's merged. Reviewers will note that the script in this PR refers to a `workflow_dispatch` trigger in https://github.com/apache/arrow/pull/49603 that's not on main yet.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3106367898
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,194 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# Set these in .env.
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: "${PHASE_DEFAULT=1}"
+: "${PHASE_SIGN_DLL=${PHASE_DEFAULT}}"
+: "${PHASE_BUILD_MSI=${PHASE_DEFAULT}}"
+: "${PHASE_SIGN_MSI=${PHASE_DEFAULT}}"
Review Comment:
The PHASE_* defaults use `${var=default}` which only assigns when the variable is unset (not when it is set but empty). If someone runs with `PHASE_DEFAULT=` (or any PHASE_* set to an empty string), the subsequent numeric `-eq` tests will error. Use the `:=` form (and keep the quoting) to default unset-or-empty values, consistent with other `dev/release` scripts.
```suggestion
: "${PHASE_DEFAULT:=1}"
: "${PHASE_SIGN_DLL:=${PHASE_DEFAULT}}"
: "${PHASE_BUILD_MSI:=${PHASE_DEFAULT}}"
: "${PHASE_SIGN_MSI:=${PHASE_DEFAULT}}"
```
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,194 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# Set these in .env.
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: "${PHASE_DEFAULT=1}"
+: "${PHASE_SIGN_DLL=${PHASE_DEFAULT}}"
+: "${PHASE_BUILD_MSI=${PHASE_DEFAULT}}"
+: "${PHASE_SIGN_MSI=${PHASE_DEFAULT}}"
+
+if [ "${PHASE_SIGN_DLL}" -eq 0 ] && [ "${PHASE_BUILD_MSI}" -eq 0 ] && [ "${PHASE_SIGN_MSI}" -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local exit_code=0
+ jsign extract --format PEM "${file}" > /dev/null 2>&1 || exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+ return ${exit_code}
+}
+
+# Use dev/release/tmp for temporary files
+tmp_dir="${SOURCE_DIR}/tmp"
+if [ -e "${tmp_dir}" ]; then
+ echo "ERROR: temp dir already exists: ${tmp_dir}. Remove it manually and run again." >&2
+ exit 1
+fi
+
+if [ "${PHASE_SIGN_DLL}" -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_unsigned}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ mv "${tmp_dir}/${dll_unsigned}" "${tmp_dir}/${dll_signed}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
+fi
+
+if [ "${PHASE_BUILD_MSI}" -gt 0 ]; then
+ echo "[5/9] Triggering odbc_release_step in cpp_extra.yml workflow..."
+ run_url=$(gh workflow run cpp_extra.yml \
+ --repo "${GITHUB_REPOSITORY}" \
+ --ref "${tag}" \
+ --field odbc_release_step=true 2>&1 | grep -oE 'https://[^ ]+' || true)
+ run_id=${run_url##*/} # Extract the run ID from the URL (the part after the last slash)
+ if [ -z "${run_id}" ]; then
+ echo "ERROR: failed to get run ID from workflow trigger" >&2
+ exit 1
+ fi
+ echo "Triggered run: ${run_url}"
+
Review Comment:
`PHASE_BUILD_MSI` triggers `gh workflow run cpp_extra.yml ... --field odbc_release_step=true`, but `.github/workflows/cpp_extra.yml` in this branch does not define `workflow_dispatch` inputs (or any `workflow_dispatch` at all). `gh workflow run` will fail in that case, so the “build MSI” phase can’t work as written. Either add an appropriate `workflow_dispatch` trigger+input to the workflow, or change the script to re-run an existing run via `gh run rerun` / use a workflow that actually supports manual dispatch.
```suggestion
echo "[5/9] Re-running cpp_extra.yml workflow for tag ${tag}..."
tag_sha=$(gh api \
--repo "${GITHUB_REPOSITORY}" \
"repos/{owner}/{repo}/commits/${tag}" \
--jq '.sha')
if [ -z "${tag_sha}" ]; then
echo "ERROR: failed to resolve commit SHA for tag ${tag}" >&2
exit 1
fi
run_id=$(gh run list \
--repo "${GITHUB_REPOSITORY}" \
--workflow cpp_extra.yml \
--json databaseId,headSha \
--limit 100 \
--jq ".[] | select(.headSha == \"${tag_sha}\") | .databaseId" | head -n 1)
if [ -z "${run_id}" ]; then
echo "ERROR: failed to find an existing cpp_extra.yml run for tag ${tag} (commit ${tag_sha})" >&2
exit 1
fi
gh run rerun "${run_id}" --repo "${GITHUB_REPOSITORY}"
run_url="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${run_id}"
echo "Re-ran existing workflow run: ${run_url}"
```
##########
docs/source/developers/release.rst:
##########
@@ -264,13 +264,24 @@ Build source and binaries and submit them
# NOTE: You need to have GitHub CLI installed to run this script.
dev/release/06-matlab-upload.sh <version> <rc-number>
+ # Sign, build the installer for, and sign the installer for the FlightSQL
+ # ODBC Windows driver
+ #
+ # NOTE: This must be run by a PMC member
+ # Note: You need to have jsign installed and an available credential from
+ # ASF to sign artifacts. Not all PMC members will have access to code
+ # signing.
+ # Note: The script requires setup of ssl.com environment variables.
+ # Note: Invoking this script costs money.
+ dev/release/07-flightsqlodbc-upload.sh <version> <rc_number>
Review Comment:
The placeholder uses `<rc_number>` here, but the rest of the guide (and the scripts’ usage strings) use `<rc-number>`. Using a consistent placeholder avoids confusion/copy-paste errors in the release checklist.
```suggestion
dev/release/07-flightsqlodbc-upload.sh <version> <rc-number>
```
##########
docs/source/developers/release.rst:
##########
@@ -264,13 +264,24 @@ Build source and binaries and submit them
# NOTE: You need to have GitHub CLI installed to run this script.
dev/release/06-matlab-upload.sh <version> <rc-number>
+ # Sign, build the installer for, and sign the installer for the FlightSQL
+ # ODBC Windows driver
+ #
+ # NOTE: This must be run by a PMC member
+ # Note: You need to have jsign installed and an available credential from
+ # ASF to sign artifacts. Not all PMC members will have access to code
+ # signing.
+ # Note: The script requires setup of ssl.com environment variables.
+ # Note: Invoking this script costs money.
+ dev/release/07-flightsqlodbc-upload.sh <version> <rc_number>
+
# Move the Release Candidate GitHub Release from draft to published state
# This will update the artifacts download URL which will be available for the
# verification step.
- dev/release/07-publish-gh-release.sh <version> <rc-number>
+ dev/release/08-publish-gh-release.sh <version> <rc-number>
# Start verifications for binaries and wheels
- dev/release/08-binary-verify.sh <version> <rc-number>
+ dev/release/09-binary-verify.sh <version> <rc-number>
Review Comment:
Introducing `dev/release/09-binary-verify.sh` creates a step-number collision with the existing `dev/release/09-vote-email.sh` / `09-vote-email-test.rb` scripts referenced later in this guide. Having multiple “09-*” steps is confusing and makes the release sequence ambiguous; consider renumbering one of the steps (and updating the corresponding filenames + references) to keep the numeric ordering unique.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105560426
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
+
+if [ ${PHASE_SIGN_DLL} -eq 0 ] && [ ${PHASE_BUILD_MSI} -eq 0 ] && [ ${PHASE_SIGN_MSI} -eq 0 ]; then
+ echo "No phases specified. Exiting."
+ exit 1
+fi
+
+# Utility function to use jsign to check if a file is signed or not
+is_signed() {
+ local file="$1"
+ local output
+ local exit_code
+ output=$(jsign extract --format PEM "${file}" 2>&1)
+ exit_code=$?
+ # jsign writes a PEM file even though it also prints to stdout. Clean up after
+ # it. Use -f since so it still runs on unsigned files without error.
+ rm -f "${file}.sig.pem"
+
+ return ${exit_code}
+}
+
+# All work with release artifacts happens in a temp dir
+tmp_dir="$(mktemp -d)"
+
+if [ ${PHASE_SIGN_DLL} -gt 0 ]; then
+ echo "[1/9] Downloading ${dll_unsigned} from release..."
+ gh release download "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --pattern "${dll_unsigned}" \
+ --dir "${tmp_dir}"
+ if is_signed "${tmp_dir}/${dll_unsigned}"; then
+ echo "ERROR: ${dll_unsigned} is already signed" >&2
+ exit 1
+ fi
+
+ echo "[2/9] Signing ${dll_signed}..."
+ echo "NOTE: Running jsign. You may be prompted for your OTP PIN..."
+ jsign --storetype ESIGNER \
+ --alias d97c5110-c66a-4c0c-ac0c-1cd6af812ee6 \
+ --storepass "${ESIGNER_STOREPASS}" \
+ --keypass "${ESIGNER_KEYPASS}" \
+ --tsaurl="http://ts.ssl.com" \
+ --tsmode RFC3161 \
+ --alg SHA256 \
+ "${tmp_dir}/${dll_unsigned}"
+ if ! is_signed "${tmp_dir}/${dll_signed}"; then
+ echo "ERROR: ${dll_signed} is not signed" >&2
+ exit 1
+ fi
+
+ echo "[3/9] Uploading signed DLL to GitHub Release..."
+ gh release upload "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --clobber \
+ "${tmp_dir}/${dll_signed}"
+
+ echo "[4/9] Removing unsigned DLL from GitHub Release..."
+ gh release delete-asset "${tag}" \
+ --repo "${GITHUB_REPOSITORY}" \
+ --yes \
+ "${dll_unsigned}"
Review Comment:
Just to reduce confusion and artifact usage, we don't need to. I don't know if I have a principled reason either way. If we did jsign signing entirely in CI, we'd probably build the unsigned DLL, sign it, and only upload the signed version. Happy to change this though.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on code in PR #49788:
URL: https://github.com/apache/arrow/pull/49788#discussion_r3105603371
##########
dev/release/07-flightsqlodbc-upload.sh:
##########
@@ -0,0 +1,190 @@
+#!/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.
+#
+# FlightSQL ODBC Release Signing Script
+#
+# This script handles the signing of FlightSQL ODBC Windows binaries and MSI
+# installer. It requires jsign to be configured with ASF code signing
+# credentials. Keep reading below:
+#
+# Required environment variables:
+#
+# ESIGNER_STOREPASS - The ssl.com credentials in "username|password" format
+# ESIGNER_KEYPASS - The ssl.com eSigner secret code (not the PIN)
+#
+# How to get ESIGNER_KEYPASS:
+#
+# 1. Log into ssl.com
+# 2. In your Dashboard, under "invitations", click the link under the order. Or
+# go to Orders, find the order, expand the order, and click "certificate
+# details"
+# 3. Enter your PIN to get your OTP. This is ESIGNER_KEYPASS.
+#
+# If you don't have access, see https://infra.apache.org/code-signing-use.html.
+
+set -e
+set -u
+set -o pipefail
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 <version> <rc-num>"
+ exit 1
+fi
+
+if [ -z "${ESIGNER_STOREPASS:-}" ]; then
+ echo "ERROR: ESIGNER_STOREPASS is not set" >&2
+ exit 1
+fi
+if [ -z "${ESIGNER_KEYPASS:-}" ]; then
+ echo "ERROR: ESIGNER_KEYPASS is not set" >&2
+ exit 1
+fi
+
+. "${SOURCE_DIR}/utils-env.sh"
+
+version=$1
+rc=$2
+
+version_with_rc="${version}-rc${rc}"
+tag="apache-arrow-${version_with_rc}"
+
+dll_unsigned="arrow_flight_sql_odbc_unsigned.dll"
+dll_signed="arrow_flight_sql_odbc.dll"
+
+: "${GITHUB_REPOSITORY:=apache/arrow}"
+
+: ${PHASE_DEFAULT=1}
+: ${PHASE_SIGN_DLL=${PHASE_DEFAULT}}
+: ${PHASE_BUILD_MSI=${PHASE_DEFAULT}}
+: ${PHASE_SIGN_MSI=${PHASE_DEFAULT}}
Review Comment:
Already fixed by 6717e3477a55c9313effcfa0e31997061a78bc1e.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-49686: [C++][FlightRPC][ODBC][Release] Create signing script for Windows FlightSQL ODBC build [arrow]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on PR #49788:
URL: https://github.com/apache/arrow/pull/49788#issuecomment-4274326746
Thanks for the review @kou. I think I've addressed everything so this is ready for another review.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org