Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPARK-5747: Fix wordsplitting bugs in make-distribution.sh #4540

Closed
wants to merge 1 commit into from
Closed

SPARK-5747: Fix wordsplitting bugs in make-distribution.sh #4540

wants to merge 1 commit into from

Conversation

dyross
Copy link
Contributor

@dyross dyross commented Feb 11, 2015

The $MVN command variable may have spaces, so when referring to it, must wrap in quotes.

@nchammas
Copy link
Contributor

I'm guessing this is a continuation of #4126.

@dyross
Copy link
Contributor Author

dyross commented Feb 11, 2015

@nchammas it is related, but #4126 was a fix to a previous break. This change is a fix after this commit: e902dc4

Sorry, I should have specified that in the description.

@nchammas
Copy link
Contributor

@dyross Thank you for fixing this issue. Could you:

  • Create a sub-task under SPARK-5747 for make-distribution.sh
  • Update the title of this PR to reference the new JIRA issue
  • Resolve all other word splitting issues with make-distribution.sh

Totally fine if you just want to fix the call to Maven, but there are a few other problematic places in this script.

For example:

@nchammas
Copy link
Contributor

FWIW, this patch LGTM as-is.

@srowen
Copy link
Member

srowen commented Feb 12, 2015

Rather than add yet more JIRAs, let's just make this part of the SPARK-5747 umbrella. We may have two commits, sure. Putting the JIRA in the title, and perhaps addressing a few more instances of this in the script, would be great.

@pwendell quick check -- if we make a fix like this, how far back does it get back-ported? 1.2 or further?

@dyross dyross changed the title Fix make-distribution.sh by adding quotes to $MVN SPARK-5747: Fix wordsplitting bugs in make-distribution.sh Feb 12, 2015
@dyross
Copy link
Contributor Author

dyross commented Feb 12, 2015

I've updated the commit wording and fixed a few more instances, as requested. The script seems to execute fine in our build system, but I am not 100% sure about all the edge cases.

@@ -100,7 +100,7 @@ if [ -z "$JAVA_HOME" ]; then
if [ $(command -v rpm) ]; then
RPM_JAVA_HOME=$(rpm -E %java_home 2>/dev/null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to quote the subshell, since its output may contain spaces.

RPM_JAVA_HOME="$(rpm -E %java_home 2>/dev/null)"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@nchammas
Copy link
Contributor

Thanks for the updates @dyross! One minor comment and I think this is good to go.

Add double quotes to several variables, including $MVN.
@nchammas
Copy link
Contributor

This patch LGTM.

@dyross
Copy link
Contributor Author

dyross commented Feb 12, 2015

Thanks for the review, @nchammas.

@srowen
Copy link
Member

srowen commented Feb 12, 2015

ok to test

@SparkQA
Copy link

SparkQA commented Feb 12, 2015

Test build #27381 has finished for PR 4540 at commit 5a41596.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

Merging into master 1.3 thanks. There were significant merge conflicts for branch-1.2 so @dyross it would be good if you could open this PR against that branch too.

asfgit pushed a commit that referenced this pull request Feb 12, 2015
The `$MVN` command variable may have spaces, so when referring to it, must wrap in quotes.

Author: David Y. Ross <dyross@gmail.com>

Closes #4540 from dyross/dyr-fix-make-distribution2 and squashes the following commits:

5a41596 [David Y. Ross] SPARK-5747: Fix wordsplitting bugs in make-distribution.sh

(cherry picked from commit 26c816e)
Signed-off-by: Andrew Or <andrew@databricks.com>
@asfgit asfgit closed this in 26c816e Feb 12, 2015
@dyross dyross deleted the dyr-fix-make-distribution2 branch April 15, 2015 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants