From commits-return-34166-archive-asf-public=cust-asf.ponee.io@spark.apache.org Fri Oct 19 15:40:16 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id CEC6F180674 for ; Fri, 19 Oct 2018 15:40:15 +0200 (CEST) Received: (qmail 11427 invoked by uid 500); 19 Oct 2018 13:40:14 -0000 Mailing-List: contact commits-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@spark.apache.org Received: (qmail 11417 invoked by uid 99); 19 Oct 2018 13:40:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2018 13:40:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7F5DADFC30; Fri, 19 Oct 2018 13:40:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wenchen@apache.org To: commits@spark.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: spark git commit: fix security issue of zinc Date: Fri, 19 Oct 2018 13:40:14 +0000 (UTC) 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-unsubscribe@spark.apache.org For additional commands, e-mail: commits-help@spark.apache.org