Skip to content

Commit 38fbc0b

Browse files
Yikunsrowen
authored andcommitted
[SPARK-35458][BUILD] Use > /dev/null to replace -q in shasum
## What changes were proposed in this pull request? Use ` > /dev/null` to replace `-q` in shasum validation. ### Why are the changes needed? In PR #32505 , added the shasum check on maven. The `shasum -a 512 -q -c xxx.sha` is used to validate checksum, the `-q` args is for "don't print OK for each successfully verified file", but `-q` arg is introduce in shasum 6.x version. So we got the `Unknown option: q`. ``` ➜ ~ uname -a Darwin MacBook.local 19.6.0 Darwin Kernel Version 19.6.0: Mon Apr 12 20:57:45 PDT 2021; root:xnu-6153.141.28.1~1/RELEASE_X86_64 x86_64 ➜ ~ shasum -v 5.84 ➜ ~ shasum -q Unknown option: q Type shasum -h for help ``` it makes ARM CI failed: [1] https://amplab.cs.berkeley.edu/jenkins/job/spark-master-test-maven-arm/ ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? `shasum -a 512 -c wrong.sha > /dev/null` return code 1 without print `shasum -a 512 -c right.sha > /dev/null` return code 0 without print e2e test: ``` rm -f build/apache-maven-3.6.3-bin.tar.gz rm -r build/apache-maven-3.6.3-bin mvn -v ``` Closes #32604 from Yikun/patch-5. Authored-by: Yikun Jiang <yikunkero@gmail.com> Signed-off-by: Sean Owen <srowen@gmail.com>
1 parent 3c3533d commit 38fbc0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/mvn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ install_app() {
7878
echo " ${local_tarball}" >> ${local_checksum} # two spaces + file are important!
7979
# Assuming SHA512 here for now
8080
echo "Veryfing checksum from ${local_checksum}" 1>&2
81-
if ! shasum -a 512 -q -c "${local_checksum}" ; then
81+
if ! shasum -a 512 -c "${local_checksum}" > /dev/null ; then
8282
echo "Bad checksum from ${remote_checksum}"
8383
exit 2
8484
fi

0 commit comments

Comments
 (0)