Skip to content

Commit

Permalink
[SPARK-39240][INFRA][BUILD] Source and binary releases using differen…
Browse files Browse the repository at this point in the history
…t tool to generate hashes for integrity

### What changes were proposed in this pull request?

unify the hash generator for release files.

### Why are the changes needed?

Currently, we use `shasum` for source but `gpg` for binary, since #30123

this confuses me when validating the integrities of spark 3.3.0 RC https://dist.apache.org/repos/dist/dev/spark/v3.3.0-rc2-bin/

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

test script manually

Closes #36619 from yaooqinn/SPARK-39240.

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Sean Owen <srowen@gmail.com>
(cherry picked from commit 3e78337)
Signed-off-by: Sean Owen <srowen@gmail.com>
  • Loading branch information
yaooqinn authored and srowen committed May 20, 2022
1 parent ab057c7 commit 3f77be2
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions dev/create-release/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,7 @@ if [[ "$1" == "package" ]]; then
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --armour \
--output $R_DIST_NAME.asc \
--detach-sig $R_DIST_NAME
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --print-md \
SHA512 $R_DIST_NAME > \
$R_DIST_NAME.sha512
shasum -a 512 $R_DIST_NAME > $R_DIST_NAME.sha512
fi

if [[ -n $PIP_FLAG ]]; then
Expand All @@ -296,19 +294,15 @@ if [[ "$1" == "package" ]]; then
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --armour \
--output $PYTHON_DIST_NAME.asc \
--detach-sig $PYTHON_DIST_NAME
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --print-md \
SHA512 $PYTHON_DIST_NAME > \
$PYTHON_DIST_NAME.sha512
shasum -a 512 $PYTHON_DIST_NAME > $PYTHON_DIST_NAME.sha512
fi

echo "Copying and signing regular binary distribution"
cp spark-$SPARK_VERSION-bin-$NAME/spark-$SPARK_VERSION-bin-$NAME.tgz .
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --armour \
--output spark-$SPARK_VERSION-bin-$NAME.tgz.asc \
--detach-sig spark-$SPARK_VERSION-bin-$NAME.tgz
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --print-md \
SHA512 spark-$SPARK_VERSION-bin-$NAME.tgz > \
spark-$SPARK_VERSION-bin-$NAME.tgz.sha512
shasum -a 512 spark-$SPARK_VERSION-bin-$NAME.tgz > spark-$SPARK_VERSION-bin-$NAME.tgz.sha512
}

# List of binary packages built. Populates two associative arrays, where the key is the "name" of
Expand Down

0 comments on commit 3f77be2

Please sign in to comment.