spark git commit: fix security issue of zinc(simplier version)

2018-10-21 Thread wenchen
Repository: spark
Updated Branches:
  refs/heads/branch-2.2 ca950c17f -> 8906696ac


fix security issue of zinc(simplier version)


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/8906696a
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/8906696a
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/8906696a

Branch: refs/heads/branch-2.2
Commit: 8906696ac2089f3d6500b0496af7d9995c7de99b
Parents: ca950c1
Author: Wenchen Fan 
Authored: Fri Oct 19 23:54:15 2018 +0800
Committer: Wenchen Fan 
Committed: Mon Oct 22 12:24:31 2018 +0800

--
 build/mvn   | 33 ++--
 dev/create-release/release-build.sh |  6 --
 dev/run-tests.py| 10 --
 3 files changed, 10 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/8906696a/build/mvn
--
diff --git a/build/mvn b/build/mvn
index 926027e..6a7d4db 100755
--- a/build/mvn
+++ b/build/mvn
@@ -130,17 +130,8 @@ if [ "$1" == "--force" ]; then
   shift
 fi
 
-if [ "$1" == "--zinc" ]; then
-  echo "Using zinc for incremental compilation. Be sure you are aware of the 
implications of "
-  echo "running this server process on your machine"
-  USE_ZINC=1
-  shift
-fi
-
 # Install the proper version of Scala, Zinc and Maven for the build
-if [ -n "${USE_ZINC}" ]; then
-  install_zinc
-fi
+install_zinc
 install_scala
 install_mvn
 
@@ -149,15 +140,13 @@ cd "${_CALLING_DIR}"
 
 # Now that zinc is ensured to be installed, check its status and, if its
 # not running or just installed, start it
-if [ -n "${USE_ZINC}" ]; then
-  if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
-export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
-"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-"${ZINC_BIN}" -start -port ${ZINC_PORT} -server 127.0.0.1 \
-  -idle-timeout 30m \
-  -scala-compiler "${SCALA_COMPILER}" \
-  -scala-library "${SCALA_LIBRARY}" &>/dev/null
-  fi
+if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
+  export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
+  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+  "${ZINC_BIN}" -start -port ${ZINC_PORT} \
+-server 127.0.0.1 -idle-timeout 30m \
+-scala-compiler "${SCALA_COMPILER}" \
+-scala-library "${SCALA_LIBRARY}" &>/dev/null
 fi
 
 # Set any `mvn` options if not already present
@@ -168,7 +157,5 @@ echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
 # Last, call the `mvn` command as usual
 ${MVN_BIN} -DzincPort=${ZINC_PORT} "$@"
 
-if [ -n "${USE_ZINC}" ]; then
-  # Try to shut down zinc explicitly
-  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-fi
+# Try to shut down zinc explicitly
+"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}

http://git-wip-us.apache.org/repos/asf/spark/blob/8906696a/dev/create-release/release-build.sh
--
diff --git a/dev/create-release/release-build.sh 
b/dev/create-release/release-build.sh
index 1272b6d..b4d27ed 100755
--- a/dev/create-release/release-build.sh
+++ b/dev/create-release/release-build.sh
@@ -343,9 +343,6 @@ if [[ "$1" == "publish-snapshot" ]]; then
   $MVN -DzincPort=$ZINC_PORT -Dscala-2.10 --settings $tmp_settings \
 -DskipTests $PUBLISH_PROFILES clean deploy
 
-  # Clean-up Zinc nailgun process
-  $LSOF -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
-
   rm $tmp_settings
   cd ..
   exit 0
@@ -381,9 +378,6 @@ if [[ "$1" == "publish-release" ]]; then
   $MVN -DzincPort=$ZINC_PORT -Dmaven.repo.local=$tmp_repo -Dscala-2.10 \
 -DskipTests $PUBLISH_PROFILES clean install
 
-  # Clean-up Zinc nailgun process
-  $LSOF -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
-
   ./dev/change-version-to-2.10.sh
 
   pushd $tmp_repo/org/apache/spark

http://git-wip-us.apache.org/repos/asf/spark/blob/8906696a/dev/run-tests.py
--
diff --git a/dev/run-tests.py b/dev/run-tests.py
index 72d148d..0a399ab 100755
--- a/dev/run-tests.py
+++ b/dev/run-tests.py
@@ -249,15 +249,6 @@ def get_zinc_port():
 return random.randrange(3030, 4030)
 
 
-def kill_zinc_on_port(zinc_port):
-"""
-Kill the Zinc process running on the given port, if one exists.
-"""
-cmd = ("/usr/sbin/lsof -P |grep %s | grep LISTEN "
-   "| awk '{ print $2; }' | xargs kill") % zinc_port
-subprocess.check_call(cmd, shell=True)
-
-
 def exec_maven(mvn_args=()):
 """Will call Maven in the current directory with the list of mvn_args 
passed
 in and returns the subprocess for any further processing"""
@@ -267,7 +258,6 @@ def exec_maven(mvn_args=()):
 zinc_f

spark git commit: fix security issue of zinc(simplier version)

2018-10-21 Thread wenchen
Repository: spark
Updated Branches:
  refs/heads/branch-2.3 719ff7af6 -> d7a35877b


fix security issue of zinc(simplier version)


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d7a35877
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d7a35877
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d7a35877

Branch: refs/heads/branch-2.3
Commit: d7a35877b96dce8b742acf77e79bda189e402ae2
Parents: 719ff7a
Author: Wenchen Fan 
Authored: Fri Oct 19 23:54:15 2018 +0800
Committer: Wenchen Fan 
Committed: Mon Oct 22 12:22:10 2018 +0800

--
 build/mvn   | 33 ++--
 dev/create-release/release-build.sh |  6 --
 dev/run-tests.py| 10 --
 3 files changed, 10 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/d7a35877/build/mvn
--
diff --git a/build/mvn b/build/mvn
index 9c0d1a7..7951e10 100755
--- a/build/mvn
+++ b/build/mvn
@@ -130,17 +130,8 @@ if [ "$1" == "--force" ]; then
   shift
 fi
 
-if [ "$1" == "--zinc" ]; then
-  echo "Using zinc for incremental compilation. Be sure you are aware of the 
implications of "
-  echo "running this server process on your machine"
-  USE_ZINC=1
-  shift
-fi
-
 # Install the proper version of Scala, Zinc and Maven for the build
-if [ -n "${USE_ZINC}" ]; then
-  install_zinc
-fi
+install_zinc
 install_scala
 install_mvn
 
@@ -149,15 +140,13 @@ cd "${_CALLING_DIR}"
 
 # Now that zinc is ensured to be installed, check its status and, if its
 # not running or just installed, start it
-if [ -n "${USE_ZINC}" ]; then
-  if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
-export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
-"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-"${ZINC_BIN}" -start -port ${ZINC_PORT} -server 127.0.0.1 \
-  -idle-timeout 30m \
-  -scala-compiler "${SCALA_COMPILER}" \
-  -scala-library "${SCALA_LIBRARY}" &>/dev/null
-  fi
+if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
+  export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
+  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+  "${ZINC_BIN}" -start -port ${ZINC_PORT} \
+-server 127.0.0.1 -idle-timeout 30m \
+-scala-compiler "${SCALA_COMPILER}" \
+-scala-library "${SCALA_LIBRARY}" &>/dev/null
 fi
 
 # Set any `mvn` options if not already present
@@ -168,7 +157,5 @@ echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
 # Last, call the `mvn` command as usual
 ${MVN_BIN} -DzincPort=${ZINC_PORT} "$@"
 
-if [ -n "${USE_ZINC}" ]; then
-  # Try to shut down zinc explicitly
-  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-fi
+# Try to shut down zinc explicitly
+"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}

http://git-wip-us.apache.org/repos/asf/spark/blob/d7a35877/dev/create-release/release-build.sh
--
diff --git a/dev/create-release/release-build.sh 
b/dev/create-release/release-build.sh
index 5faa3d3..3e60641 100755
--- a/dev/create-release/release-build.sh
+++ b/dev/create-release/release-build.sh
@@ -323,9 +323,6 @@ if [[ "$1" == "publish-snapshot" ]]; then
   #$MVN -DzincPort=$ZINC_PORT --settings $tmp_settings \
   #  -DskipTests $SCALA_2_12_PROFILES $PUBLISH_PROFILES clean deploy
 
-  # Clean-up Zinc nailgun process
-  $LSOF -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
-
   rm $tmp_settings
   cd ..
   exit 0
@@ -360,9 +357,6 @@ if [[ "$1" == "publish-release" ]]; then
   #$MVN -DzincPort=$ZINC_PORT -Dmaven.repo.local=$tmp_repo \
   #  -DskipTests $SCALA_2_12_PROFILES §$PUBLISH_PROFILES clean install
 
-  # Clean-up Zinc nailgun process
-  $LSOF -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
-
   #./dev/change-scala-version.sh 2.11
 
   pushd $tmp_repo/org/apache/spark

http://git-wip-us.apache.org/repos/asf/spark/blob/d7a35877/dev/run-tests.py
--
diff --git a/dev/run-tests.py b/dev/run-tests.py
index 7e6f7ff..f86b122 100755
--- a/dev/run-tests.py
+++ b/dev/run-tests.py
@@ -249,15 +249,6 @@ def get_zinc_port():
 return random.randrange(3030, 4030)
 
 
-def kill_zinc_on_port(zinc_port):
-"""
-Kill the Zinc process running on the given port, if one exists.
-"""
-cmd = "%s -P |grep %s | grep LISTEN | awk '{ print $2; }' | xargs kill"
-lsof_exe = which("lsof")
-subprocess.check_call(cmd % (lsof_exe if lsof_exe else "/usr/sbin/lsof", 
zinc_port), shell=True)
-
-
 def exec_maven(mvn_args=()):
 """Will call Maven in the current directory with the list of mvn_args 
passed
 in and returns the subprocess for any further 

spark git commit: fix security issue of zinc(simplier version)

2018-10-21 Thread wenchen
Repository: spark
Updated Branches:
  refs/heads/branch-2.4 0239277dd -> c21d7e1bb


fix security issue of zinc(simplier version)


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c21d7e1b
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c21d7e1b
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c21d7e1b

Branch: refs/heads/branch-2.4
Commit: c21d7e1bb958a0cfa4cba34a688d594466088c9e
Parents: 0239277
Author: Wenchen Fan 
Authored: Fri Oct 19 23:54:15 2018 +0800
Committer: Wenchen Fan 
Committed: Mon Oct 22 12:19:24 2018 +0800

--
 build/mvn   | 33 ++--
 dev/create-release/release-build.sh |  6 --
 dev/run-tests.py| 10 --
 3 files changed, 10 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/c21d7e1b/build/mvn
--
diff --git a/build/mvn b/build/mvn
index 0289ef3..b60ea64 100755
--- a/build/mvn
+++ b/build/mvn
@@ -139,17 +139,8 @@ if [ "$1" == "--force" ]; then
   shift
 fi
 
-if [ "$1" == "--zinc" ]; then
-  echo "Using zinc for incremental compilation. Be sure you are aware of the 
implications of "
-  echo "running this server process on your machine"
-  USE_ZINC=1
-  shift
-fi
-
 # Install the proper version of Scala, Zinc and Maven for the build
-if [ -n "${USE_ZINC}" ]; then
-  install_zinc
-fi
+install_zinc
 install_scala
 install_mvn
 
@@ -158,15 +149,13 @@ cd "${_CALLING_DIR}"
 
 # Now that zinc is ensured to be installed, check its status and, if its
 # not running or just installed, start it
-if [ -n "${USE_ZINC}" ]; then
-  if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
-export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
-"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-"${ZINC_BIN}" -start -port ${ZINC_PORT} -server 127.0.0.1 \
-  -idle-timeout 30m \
-  -scala-compiler "${SCALA_COMPILER}" \
-  -scala-library "${SCALA_LIBRARY}" &>/dev/null
-  fi
+if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
+  export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
+  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+  "${ZINC_BIN}" -start -port ${ZINC_PORT} \
+-server 127.0.0.1 -idle-timeout 30m \
+-scala-compiler "${SCALA_COMPILER}" \
+-scala-library "${SCALA_LIBRARY}" &>/dev/null
 fi
 
 # Set any `mvn` options if not already present
@@ -177,7 +166,5 @@ echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
 # Last, call the `mvn` command as usual
 "${MVN_BIN}" -DzincPort=${ZINC_PORT} "$@"
 
-if [ -n "${USE_ZINC}" ]; then
-  # Try to shut down zinc explicitly
-  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-fi
+# Try to shut down zinc explicitly
+"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}

http://git-wip-us.apache.org/repos/asf/spark/blob/c21d7e1b/dev/create-release/release-build.sh
--
diff --git a/dev/create-release/release-build.sh 
b/dev/create-release/release-build.sh
index cce5f8b..02c4193 100755
--- a/dev/create-release/release-build.sh
+++ b/dev/create-release/release-build.sh
@@ -386,9 +386,6 @@ if [[ "$1" == "publish-snapshot" ]]; then
   #$MVN -DzincPort=$ZINC_PORT --settings $tmp_settings \
   #  -DskipTests $SCALA_2_12_PROFILES $PUBLISH_PROFILES clean deploy
 
-  # Clean-up Zinc nailgun process
-  $LSOF -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
-
   rm $tmp_settings
   cd ..
   exit 0
@@ -433,9 +430,6 @@ if [[ "$1" == "publish-release" ]]; then
   -DskipTests $PUBLISH_PROFILES $SCALA_2_12_PROFILES clean install
   fi
 
-  # Clean-up Zinc nailgun process
-  $LSOF -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
-
   ./dev/change-scala-version.sh 2.11
 
   pushd $tmp_repo/org/apache/spark

http://git-wip-us.apache.org/repos/asf/spark/blob/c21d7e1b/dev/run-tests.py
--
diff --git a/dev/run-tests.py b/dev/run-tests.py
index f534637..65e6f29 100755
--- a/dev/run-tests.py
+++ b/dev/run-tests.py
@@ -249,15 +249,6 @@ def get_zinc_port():
 return random.randrange(3030, 4030)
 
 
-def kill_zinc_on_port(zinc_port):
-"""
-Kill the Zinc process running on the given port, if one exists.
-"""
-cmd = "%s -P |grep %s | grep LISTEN | awk '{ print $2; }' | xargs kill"
-lsof_exe = which("lsof")
-subprocess.check_call(cmd % (lsof_exe if lsof_exe else "/usr/sbin/lsof", 
zinc_port), shell=True)
-
-
 def exec_maven(mvn_args=()):
 """Will call Maven in the current directory with the list of mvn_args 
passed
 in and returns the subprocess for any further processing"""
@@ -267,7 +258,6 @@ def exec_maven(mvn_arg

spark git commit: fix security issue of zinc(update run-tests.py)

2018-10-19 Thread wenchen
Repository: spark
Updated Branches:
  refs/heads/master 9ad0f6ea8 -> 130121711


fix security issue of zinc(update run-tests.py)


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/13012171
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/13012171
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/13012171

Branch: refs/heads/master
Commit: 130121711c3258cc5cb6123379f2b4b419851c6e
Parents: 9ad0f6e
Author: Wenchen Fan 
Authored: Sat Oct 20 00:21:22 2018 +0800
Committer: Wenchen Fan 
Committed: Sat Oct 20 00:23:16 2018 +0800

--
 dev/run-tests.py | 10 --
 1 file changed, 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/13012171/dev/run-tests.py
--
diff --git a/dev/run-tests.py b/dev/run-tests.py
index 26045ee..7ec7334 100755
--- a/dev/run-tests.py
+++ b/dev/run-tests.py
@@ -249,15 +249,6 @@ def get_zinc_port():
 return random.randrange(3030, 4030)
 
 
-def kill_zinc_on_port(zinc_port):
-"""
-Kill the Zinc process running on the given port, if one exists.
-"""
-cmd = "%s -P |grep %s | grep LISTEN | awk '{ print $2; }' | xargs kill"
-lsof_exe = which("lsof")
-subprocess.check_call(cmd % (lsof_exe if lsof_exe else "/usr/sbin/lsof", 
zinc_port), shell=True)
-
-
 def exec_maven(mvn_args=()):
 """Will call Maven in the current directory with the list of mvn_args 
passed
 in and returns the subprocess for any further processing"""
@@ -267,7 +258,6 @@ def exec_maven(mvn_args=()):
 zinc_flag = "-DzincPort=%s" % zinc_port
 flags = [os.path.join(SPARK_HOME, "build", "mvn"), "--force", zinc_flag]
 run_cmd(flags + mvn_args)
-kill_zinc_on_port(zinc_port)
 
 
 def exec_sbt(sbt_args=()):


-
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org



spark git commit: fix security issue of zinc(simplier version)

2018-10-19 Thread wenchen
Repository: spark
Updated Branches:
  refs/heads/master ec1fafe3e -> ac586bbb0


fix security issue of zinc(simplier version)


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/ac586bbb
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ac586bbb
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ac586bbb

Branch: refs/heads/master
Commit: ac586bbb016d70c60b1bd2ea5320fd56c3a8eead
Parents: ec1fafe
Author: Wenchen Fan 
Authored: Fri Oct 19 23:54:15 2018 +0800
Committer: Wenchen Fan 
Committed: Fri Oct 19 23:54:15 2018 +0800

--
 build/mvn   | 33 ++--
 dev/create-release/release-build.sh |  6 --
 2 files changed, 10 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/ac586bbb/build/mvn
--
diff --git a/build/mvn b/build/mvn
index 0289ef3..b60ea64 100755
--- a/build/mvn
+++ b/build/mvn
@@ -139,17 +139,8 @@ if [ "$1" == "--force" ]; then
   shift
 fi
 
-if [ "$1" == "--zinc" ]; then
-  echo "Using zinc for incremental compilation. Be sure you are aware of the 
implications of "
-  echo "running this server process on your machine"
-  USE_ZINC=1
-  shift
-fi
-
 # Install the proper version of Scala, Zinc and Maven for the build
-if [ -n "${USE_ZINC}" ]; then
-  install_zinc
-fi
+install_zinc
 install_scala
 install_mvn
 
@@ -158,15 +149,13 @@ cd "${_CALLING_DIR}"
 
 # Now that zinc is ensured to be installed, check its status and, if its
 # not running or just installed, start it
-if [ -n "${USE_ZINC}" ]; then
-  if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
-export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
-"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-"${ZINC_BIN}" -start -port ${ZINC_PORT} -server 127.0.0.1 \
-  -idle-timeout 30m \
-  -scala-compiler "${SCALA_COMPILER}" \
-  -scala-library "${SCALA_LIBRARY}" &>/dev/null
-  fi
+if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
+  export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
+  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+  "${ZINC_BIN}" -start -port ${ZINC_PORT} \
+-server 127.0.0.1 -idle-timeout 30m \
+-scala-compiler "${SCALA_COMPILER}" \
+-scala-library "${SCALA_LIBRARY}" &>/dev/null
 fi
 
 # Set any `mvn` options if not already present
@@ -177,7 +166,5 @@ echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
 # Last, call the `mvn` command as usual
 "${MVN_BIN}" -DzincPort=${ZINC_PORT} "$@"
 
-if [ -n "${USE_ZINC}" ]; then
-  # Try to shut down zinc explicitly
-  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-fi
+# Try to shut down zinc explicitly
+"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}

http://git-wip-us.apache.org/repos/asf/spark/blob/ac586bbb/dev/create-release/release-build.sh
--
diff --git a/dev/create-release/release-build.sh 
b/dev/create-release/release-build.sh
index a741a3b..26e0868 100755
--- a/dev/create-release/release-build.sh
+++ b/dev/create-release/release-build.sh
@@ -389,9 +389,6 @@ if [[ "$1" == "publish-snapshot" ]]; then
   #$MVN -DzincPort=$ZINC_PORT --settings $tmp_settings \
   #  -DskipTests $SCALA_2_12_PROFILES $PUBLISH_PROFILES clean deploy
 
-  # Clean-up Zinc nailgun process
-  $LSOF -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
-
   rm $tmp_settings
   cd ..
   exit 0
@@ -436,9 +433,6 @@ if [[ "$1" == "publish-release" ]]; then
   -DskipTests $PUBLISH_PROFILES $SCALA_2_12_PROFILES clean install
   fi
 
-  # Clean-up Zinc nailgun process
-  $LSOF -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
-
   ./dev/change-scala-version.sh 2.11
 
   pushd $tmp_repo/org/apache/spark


-
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org



spark git commit: fix security issue of zinc

2018-10-19 Thread wenchen
Repository: spark
Updated Branches:
  refs/heads/branch-2.2 2e3b923e0 -> d6542fa3f


fix security issue of zinc


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d6542fa3
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d6542fa3
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d6542fa3

Branch: refs/heads/branch-2.2
Commit: d6542fa3f02587712d26e4e191353362a4031794
Parents: 2e3b923
Author: Wenchen Fan 
Authored: Fri Oct 19 21:39:58 2018 +0800
Committer: Wenchen Fan 
Committed: Fri Oct 19 21:40:40 2018 +0800

--
 build/mvn | 31 ---
 1 file changed, 24 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/d6542fa3/build/mvn
--
diff --git a/build/mvn b/build/mvn
index 1e393c3..926027e 100755
--- a/build/mvn
+++ b/build/mvn
@@ -130,8 +130,17 @@ if [ "$1" == "--force" ]; then
   shift
 fi
 
+if [ "$1" == "--zinc" ]; then
+  echo "Using zinc for incremental compilation. Be sure you are aware of the 
implications of "
+  echo "running this server process on your machine"
+  USE_ZINC=1
+  shift
+fi
+
 # Install the proper version of Scala, Zinc and Maven for the build
-install_zinc
+if [ -n "${USE_ZINC}" ]; then
+  install_zinc
+fi
 install_scala
 install_mvn
 
@@ -140,12 +149,15 @@ cd "${_CALLING_DIR}"
 
 # Now that zinc is ensured to be installed, check its status and, if its
 # not running or just installed, start it
-if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
-  export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
-  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-  "${ZINC_BIN}" -start -port ${ZINC_PORT} \
--scala-compiler "${SCALA_COMPILER}" \
--scala-library "${SCALA_LIBRARY}" &>/dev/null
+if [ -n "${USE_ZINC}" ]; then
+  if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
+export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
+"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+"${ZINC_BIN}" -start -port ${ZINC_PORT} -server 127.0.0.1 \
+  -idle-timeout 30m \
+  -scala-compiler "${SCALA_COMPILER}" \
+  -scala-library "${SCALA_LIBRARY}" &>/dev/null
+  fi
 fi
 
 # Set any `mvn` options if not already present
@@ -155,3 +167,8 @@ echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
 
 # Last, call the `mvn` command as usual
 ${MVN_BIN} -DzincPort=${ZINC_PORT} "$@"
+
+if [ -n "${USE_ZINC}" ]; then
+  # Try to shut down zinc explicitly
+  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+fi


-
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org



spark git commit: fix security issue of zinc

2018-10-19 Thread wenchen
Repository: spark
Updated Branches:
  refs/heads/branch-2.3 353d32804 -> 5cef11acc


fix security issue of zinc


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5cef11ac
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5cef11ac
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5cef11ac

Branch: refs/heads/branch-2.3
Commit: 5cef11acc0770ca49a0487d6543eb81022b7415d
Parents: 353d328
Author: Wenchen Fan 
Authored: Fri Oct 19 21:39:58 2018 +0800
Committer: Wenchen Fan 
Committed: Fri Oct 19 21:39:58 2018 +0800

--
 build/mvn | 31 ---
 1 file changed, 24 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/5cef11ac/build/mvn
--
diff --git a/build/mvn b/build/mvn
index efa4f93..9c0d1a7 100755
--- a/build/mvn
+++ b/build/mvn
@@ -130,8 +130,17 @@ if [ "$1" == "--force" ]; then
   shift
 fi
 
+if [ "$1" == "--zinc" ]; then
+  echo "Using zinc for incremental compilation. Be sure you are aware of the 
implications of "
+  echo "running this server process on your machine"
+  USE_ZINC=1
+  shift
+fi
+
 # Install the proper version of Scala, Zinc and Maven for the build
-install_zinc
+if [ -n "${USE_ZINC}" ]; then
+  install_zinc
+fi
 install_scala
 install_mvn
 
@@ -140,12 +149,15 @@ cd "${_CALLING_DIR}"
 
 # Now that zinc is ensured to be installed, check its status and, if its
 # not running or just installed, start it
-if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
-  export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
-  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-  "${ZINC_BIN}" -start -port ${ZINC_PORT} \
--scala-compiler "${SCALA_COMPILER}" \
--scala-library "${SCALA_LIBRARY}" &>/dev/null
+if [ -n "${USE_ZINC}" ]; then
+  if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
+export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
+"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+"${ZINC_BIN}" -start -port ${ZINC_PORT} -server 127.0.0.1 \
+  -idle-timeout 30m \
+  -scala-compiler "${SCALA_COMPILER}" \
+  -scala-library "${SCALA_LIBRARY}" &>/dev/null
+  fi
 fi
 
 # Set any `mvn` options if not already present
@@ -155,3 +167,8 @@ echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
 
 # Last, call the `mvn` command as usual
 ${MVN_BIN} -DzincPort=${ZINC_PORT} "$@"
+
+if [ -n "${USE_ZINC}" ]; then
+  # Try to shut down zinc explicitly
+  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+fi


-
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org



spark git commit: fix security issue of zinc

2018-10-19 Thread wenchen
Repository: spark
Updated Branches:
  refs/heads/branch-2.4 6a06b8cce -> 8926c4a62


fix security issue of zinc


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/8926c4a6
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/8926c4a6
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/8926c4a6

Branch: refs/heads/branch-2.4
Commit: 8926c4a6237ab059875aa7502d6417317d58381a
Parents: 6a06b8c
Author: Wenchen Fan 
Authored: Fri Oct 19 21:34:35 2018 +0800
Committer: Wenchen Fan 
Committed: Fri Oct 19 21:34:35 2018 +0800

--
 build/mvn | 31 ---
 1 file changed, 24 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/8926c4a6/build/mvn
--
diff --git a/build/mvn b/build/mvn
index 2487b81..0289ef3 100755
--- a/build/mvn
+++ b/build/mvn
@@ -139,8 +139,17 @@ if [ "$1" == "--force" ]; then
   shift
 fi
 
+if [ "$1" == "--zinc" ]; then
+  echo "Using zinc for incremental compilation. Be sure you are aware of the 
implications of "
+  echo "running this server process on your machine"
+  USE_ZINC=1
+  shift
+fi
+
 # Install the proper version of Scala, Zinc and Maven for the build
-install_zinc
+if [ -n "${USE_ZINC}" ]; then
+  install_zinc
+fi
 install_scala
 install_mvn
 
@@ -149,12 +158,15 @@ cd "${_CALLING_DIR}"
 
 # Now that zinc is ensured to be installed, check its status and, if its
 # not running or just installed, start it
-if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
-  export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
-  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-  "${ZINC_BIN}" -start -port ${ZINC_PORT} \
--scala-compiler "${SCALA_COMPILER}" \
--scala-library "${SCALA_LIBRARY}" &>/dev/null
+if [ -n "${USE_ZINC}" ]; then
+  if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
+export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
+"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+"${ZINC_BIN}" -start -port ${ZINC_PORT} -server 127.0.0.1 \
+  -idle-timeout 30m \
+  -scala-compiler "${SCALA_COMPILER}" \
+  -scala-library "${SCALA_LIBRARY}" &>/dev/null
+  fi
 fi
 
 # Set any `mvn` options if not already present
@@ -164,3 +176,8 @@ echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
 
 # Last, call the `mvn` command as usual
 "${MVN_BIN}" -DzincPort=${ZINC_PORT} "$@"
+
+if [ -n "${USE_ZINC}" ]; then
+  # Try to shut down zinc explicitly
+  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+fi


-
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org



spark git commit: fix security issue of zinc

2018-10-19 Thread wenchen
Repository: spark
Updated Branches:
  refs/heads/master f38594fc5 -> ec1fafe3e


fix security issue of zinc


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/ec1fafe3
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ec1fafe3
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ec1fafe3

Branch: refs/heads/master
Commit: ec1fafe3e78a40372975dfacb2516fe24bdfa2d2
Parents: f38594f
Author: Wenchen Fan 
Authored: Fri Oct 19 21:33:11 2018 +0800
Committer: Wenchen Fan 
Committed: Fri Oct 19 21:33:11 2018 +0800

--
 build/mvn | 31 ---
 1 file changed, 24 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/spark/blob/ec1fafe3/build/mvn
--
diff --git a/build/mvn b/build/mvn
index 2487b81..0289ef3 100755
--- a/build/mvn
+++ b/build/mvn
@@ -139,8 +139,17 @@ if [ "$1" == "--force" ]; then
   shift
 fi
 
+if [ "$1" == "--zinc" ]; then
+  echo "Using zinc for incremental compilation. Be sure you are aware of the 
implications of "
+  echo "running this server process on your machine"
+  USE_ZINC=1
+  shift
+fi
+
 # Install the proper version of Scala, Zinc and Maven for the build
-install_zinc
+if [ -n "${USE_ZINC}" ]; then
+  install_zinc
+fi
 install_scala
 install_mvn
 
@@ -149,12 +158,15 @@ cd "${_CALLING_DIR}"
 
 # Now that zinc is ensured to be installed, check its status and, if its
 # not running or just installed, start it
-if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
-  export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
-  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
-  "${ZINC_BIN}" -start -port ${ZINC_PORT} \
--scala-compiler "${SCALA_COMPILER}" \
--scala-library "${SCALA_LIBRARY}" &>/dev/null
+if [ -n "${USE_ZINC}" ]; then
+  if [ -n "${ZINC_INSTALL_FLAG}" -o -z "`"${ZINC_BIN}" -status -port 
${ZINC_PORT}`" ]; then
+export ZINC_OPTS=${ZINC_OPTS:-"$_COMPILE_JVM_OPTS"}
+"${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+"${ZINC_BIN}" -start -port ${ZINC_PORT} -server 127.0.0.1 \
+  -idle-timeout 30m \
+  -scala-compiler "${SCALA_COMPILER}" \
+  -scala-library "${SCALA_LIBRARY}" &>/dev/null
+  fi
 fi
 
 # Set any `mvn` options if not already present
@@ -164,3 +176,8 @@ echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
 
 # Last, call the `mvn` command as usual
 "${MVN_BIN}" -DzincPort=${ZINC_PORT} "$@"
+
+if [ -n "${USE_ZINC}" ]; then
+  # Try to shut down zinc explicitly
+  "${ZINC_BIN}" -shutdown -port ${ZINC_PORT}
+fi


-
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org