You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2021/05/20 21:00:36 UTC
[spark] branch branch-3.1 updated: [SPARK-35458][BUILD] Use ` >
/dev/null` to replace `-q` in shasum
This is an automated email from the ASF dual-hosted git repository.
srowen pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new c3aba52 [SPARK-35458][BUILD] Use ` > /dev/null` to replace `-q` in shasum
c3aba52 is described below
commit c3aba526035e30315fd549fbd56cc2f504226c2e
Author: Yikun Jiang <yi...@gmail.com>
AuthorDate: Thu May 20 15:59:13 2021 -0500
[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 https://github.com/apache/spark/pull/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 <yi...@gmail.com>
Signed-off-by: Sean Owen <sr...@gmail.com>
(cherry picked from commit 38fbc0b4f77dbdd1ed9a69ca7ab170c7ccee04bc)
Signed-off-by: Sean Owen <sr...@gmail.com>
---
build/mvn | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/mvn b/build/mvn
index 7c1cb2b..5a78ae8 100755
--- a/build/mvn
+++ b/build/mvn
@@ -78,7 +78,7 @@ install_app() {
echo " ${local_tarball}" >> ${local_checksum} # two spaces + file are important!
# Assuming SHA512 here for now
echo "Veryfing checksum from ${local_checksum}" 1>&2
- if ! shasum -a 512 -q -c "${local_checksum}" ; then
+ if ! shasum -a 512 -c "${local_checksum}" > /dev/null ; then
echo "Bad checksum from ${remote_checksum}"
exit 2
fi
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org