From 94bb4735ff46064809013a03c8de8d684e7460bd Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 13 Jul 2025 20:37:39 +0900 Subject: [PATCH] GH-47092: [Release] Fix syntax error in APT/Yum verification scripts --- .github/workflows/verify_rc.yml | 52 ++++++++++++++++++++++--- dev/release/verify-release-candidate.sh | 12 +++++- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/.github/workflows/verify_rc.yml b/.github/workflows/verify_rc.yml index f2e17af4ba3e..6eefcaf8b9d7 100644 --- a/.github/workflows/verify_rc.yml +++ b/.github/workflows/verify_rc.yml @@ -91,16 +91,37 @@ jobs: VERSION: ${{ needs.target.outputs.version }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 - name: Run run: | dev/release/verify-release-candidate.sh ${VERSION} ${RC} - name: Verify the previous version + # TODO: We may re-enable this in the future. + # There are some problems for now: + # * We need to specify the previous versions for all + # dependencies explicitly. For example, "apt install + # libarrow-glib-dev=20.0.0-1" doesn't work. We need "apt + # install libarrow-glib-dev=20.0.0-1 + # libarrow-acero-dev=20.0.0-1 libparquet-dev=20.0.0-1 + # gir1.2-arrow-1.0=20.0.0-1 libparquet-dev=20.0.0-1 + # libarrow-dev=20.0.0-1" + continue-on-error: true run: | major_version=${VERSION%%.*} - previous_major_version$((major_version - 1)) + previous_major_version=$((major_version - 1)) previous_version=${previous_major_version}.0.0 - rc=0 # This number isn't used for APT verification - dev/release/verify-release-candidate.sh ${previous_version} ${rc} + previous_tag=apache-arrow-${previous_version} + git checkout ${previous_tag} + # This is workaround. dev/release/verify-release-candidate.sh + # in < 21.0.0 doesn't accept 20.0.0 as the VERSION argument. + # We can remove this workaround after 21.0.0 release. + sed \ + -i \ + -e 's/^\(ensure_source_directory\)$/# \1/' \ + -e 's/^\(test_source_distribution\)$/# \1/' \ + dev/release/verify-release-candidate.sh + dev/release/verify-release-candidate.sh ${previous_version} binary: name: Binary @@ -234,13 +255,32 @@ jobs: VERSION: ${{ needs.target.outputs.version }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 - name: Run run: | dev/release/verify-release-candidate.sh ${VERSION} ${RC} - name: Verify the previous version + # TODO: We may re-enable this in the future. + # There are some problems for now: + # * x86_64: libLLVM.so.18.1 needed by gandiva2000-libs on AlmaLinux 9 + # * arm64: libarrow.so.2000.0.0: refers the + # "std::condition_variable::wait(std::unique_lock&)@GLIBCXX_3.4.30" + # (not "...@@GLIBCXX_3.4.30" nor "...@GLIBCXX_3.4.11") symbol on + # AmazonLinux 2023. + continue-on-error: true run: | major_version=${VERSION%%.*} - previous_major_version$((major_version - 1)) + previous_major_version=$((major_version - 1)) previous_version=${previous_major_version}.0.0 - rc=0 # This number isn't used for Yum verification - dev/release/verify-release-candidate.sh ${previous_version} ${rc} + previous_tag=apache-arrow-${previous_version} + git checkout ${previous_tag} + # This is workaround. dev/release/verify-release-candidate.sh + # in < 21.0.0 doesn't accept 20.0.0 as the VERSION argument. + # We can remove this workaround after 21.0.0 release. + sed \ + -i \ + -e 's/^\(ensure_source_directory\)$/# \1/' \ + -e 's/^\(test_source_distribution\)$/# \1/' \ + dev/release/verify-release-candidate.sh + dev/release/verify-release-candidate.sh ${previous_version} diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index b38da36c3871..6d2a18ae5d05 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -776,11 +776,19 @@ ensure_source_directory() { elif [ "${SOURCE_KIND}" = "git" ]; then # Remote arrow repository, testing repositories must be cloned : ${SOURCE_REPOSITORY:="https://github.com/apache/arrow"} - echo "Verifying Arrow repository ${SOURCE_REPOSITORY} with revision checkout ${VERSION}" + case "${VERSION}" in + *.*.*) + revision="apache-arrow-${VERSION}" + ;; + *) + revision="${VERSION}" + ;; + esac + echo "Verifying Arrow repository ${SOURCE_REPOSITORY} with revision checkout ${revision}" export ARROW_SOURCE_DIR="${ARROW_TMPDIR}/arrow" if [ ! -d "${ARROW_SOURCE_DIR}" ]; then git clone --recurse-submodules $SOURCE_REPOSITORY $ARROW_SOURCE_DIR - git -C $ARROW_SOURCE_DIR checkout $VERSION + git -C $ARROW_SOURCE_DIR checkout "${revision}" fi else # Release tarball, testing repositories must be cloned separately