This is an automated email from the ASF dual-hosted git repository.
pan3793 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new d3df7c90d352 [MINOR][BUILD] Quote checksum file path in build/mvn to
support directories with spaces
d3df7c90d352 is described below
commit d3df7c90d3524e022c16f41dbeaf8a7aa485e9fa
Author: Narendra Singh <[email protected]>
AuthorDate: Tue Nov 10 14:15:05 2026 +0800
[MINOR][BUILD] Quote checksum file path in build/mvn to support directories
with spaces
### What changes were proposed in this pull request?
Quote the `${local_checksum}` redirect target in `build/mvn`
(`install_app`), where the tarball path is appended to the downloaded `.sha512`
file before `shasum -c`.
### Why are the changes needed?
When the Spark directory path contains a space, `./build/mvn` fails to
install Maven:
```
./build/mvn: line 93: ${local_checksum}: ambiguous redirect
shasum: .../build/apache-maven-3.10.0-bin.tar.gz.sha512: no properly
formatted SHA checksum lines found
Bad checksum from
https://maven-central.storage-download.googleapis.com/maven2/org/apache/maven/apache-maven/3.10.0/apache-maven-3.10.0-bin.tar.gz.sha512
```
The unquoted variable is split by bash. It was added in SPARK-35373, and is
a regression of SPARK-11052 / SPARK-24526, which made `build/mvn` work with
spaces before.
### Does this PR introduce _any_ user-facing change?
No (developer build script only).
### How was this patch tested?
Manually on macOS, in a directory whose path contains a space, with no
Maven on `PATH`:
```
mkdir -p "/tmp/dir with space/build"
cp pom.xml "/tmp/dir with space/"
cp build/mvn "/tmp/dir with space/build/"
cd "/tmp/dir with space" && ./build/mvn -v
```
- Before: fails with the error above.
- After: Maven 3.10.0 is downloaded, the checksum is verified, and `mvn -v`
prints `Apache Maven 3.10.0`.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)
Closes #60209 from CODERNSINGH/fix-build-mvn-spaces.
Authored-by: Narendra Singh <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
skip-checks: true
---
build/mvn | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/mvn b/build/mvn
index 74c37591a9c6..21867584d015 100755
--- a/build/mvn
+++ b/build/mvn
@@ -90,7 +90,7 @@ install_app() {
# Checksum may not have been specified; don't check if doesn't exist
if [ "$(command -v shasum)" ]; then
if [ -f "${local_checksum}" ]; then
- echo " ${local_tarball}" >> ${local_checksum} # two spaces + file are
important!
+ echo " ${local_tarball}" >> "${local_checksum}" # two spaces + file
are important!
# Assuming SHA512 here for now
echo "Verifying checksum from ${local_checksum}" 1>&2
if ! shasum -a 512 -c "${local_checksum}" > /dev/null ; then
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]