CODERNSINGH opened a new pull request, #60209:
URL: https://github.com/apache/spark/pull/60209

   ### 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?
   
   AI Help: Claude Code (Claude Opus 5.5)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to