You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2013/08/01 23:55:09 UTC

[2/6] git commit: Cleaned up the pre-installed "wrappers".

Cleaned up the pre-installed "wrappers".

Review: https://reviews.apache.org/r/13176


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

Branch: refs/heads/master
Commit: 43a60ca04b719e5cf959e7ffe972a34430ec5138
Parents: a6208d3
Author: Benjamin Hindman <be...@gmail.com>
Authored: Wed Jul 31 14:20:20 2013 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Thu Aug 1 14:52:57 2013 -0700

----------------------------------------------------------------------
 bin/gdb-mesos-local.sh.in    |  8 ++++----
 bin/gdb-mesos-master.sh.in   |  8 ++++----
 bin/gdb-mesos-slave.sh.in    |  8 ++++----
 bin/gdb-mesos-tests.sh.in    |  8 ++++----
 bin/mesos-local-flags.sh.in  | 20 ++++++++++++++++++++
 bin/mesos-local.sh.in        | 12 ++++--------
 bin/mesos-master-flags.sh.in | 19 +++++++++++++++++++
 bin/mesos-master.sh.in       |  8 +++-----
 bin/mesos-slave-flags.sh.in  | 28 ++++++++++++++++++++++++++++
 bin/mesos-slave.sh.in        | 10 +++-------
 bin/mesos-tests-flags.sh.in  | 20 ++++++++++++++++++++
 bin/mesos-tests.sh.in        |  9 +++------
 configure.ac                 |  4 ++++
 13 files changed, 120 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/gdb-mesos-local.sh.in
----------------------------------------------------------------------
diff --git a/bin/gdb-mesos-local.sh.in b/bin/gdb-mesos-local.sh.in
index b30f55f..72cfb68 100644
--- a/bin/gdb-mesos-local.sh.in
+++ b/bin/gdb-mesos-local.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -16,8 +16,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This is a wrapper for running gdb on the mesos-local before it is
-# installed that first sets up environment variables as appropriate.
+# This is a wrapper for running gdb on mesos-local before it is
+# installed that first sets up some flags via environment variables.
 
 # Use colors for errors.
 . @abs_top_srcdir@/support/colors.sh
@@ -35,7 +35,7 @@ test $? != 0 && \
   echo "${RED}Generated libtool doesn't appear to support gdb${NORMAL}" && \
   exit 1
 
-. @abs_top_builddir@/bin/mesos-build-env.sh
+. @abs_top_builddir@/bin/mesos-local-flags.sh
 
 exec ${LIBTOOL} --mode=execute gdb --args \
   @abs_top_builddir@/src/mesos-local "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/gdb-mesos-master.sh.in
----------------------------------------------------------------------
diff --git a/bin/gdb-mesos-master.sh.in b/bin/gdb-mesos-master.sh.in
index 35812eb..f00af07 100644
--- a/bin/gdb-mesos-master.sh.in
+++ b/bin/gdb-mesos-master.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -16,8 +16,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This is a wrapper for running gdb on the mesos-master before it is
-# installed that first sets up environment variables as appropriate.
+# This is a wrapper for running gdb on mesos-master before it is
+# installed that first sets up some flags via environment variables.
 
 # Use colors for errors.
 . @abs_top_srcdir@/support/colors.sh
@@ -35,7 +35,7 @@ test $? != 0 && \
   echo "${RED}Generated libtool doesn't appear to support gdb${NORMAL}" && \
   exit 1
 
-. @abs_top_builddir@/bin/mesos-build-env.sh
+. @abs_top_builddir@/bin/mesos-master-flags.sh
 
 exec ${LIBTOOL} --mode=execute gdb --args \
   @abs_top_builddir@/src/mesos-master "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/gdb-mesos-slave.sh.in
----------------------------------------------------------------------
diff --git a/bin/gdb-mesos-slave.sh.in b/bin/gdb-mesos-slave.sh.in
index cfa576e..e01325c 100644
--- a/bin/gdb-mesos-slave.sh.in
+++ b/bin/gdb-mesos-slave.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -16,8 +16,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This is a wrapper for running gdb on the mesos-master before it is
-# installed that first sets up environment variables as appropriate.
+# This is a wrapper for running gdb on mesos-slave before it is
+# installed that first sets up some flags via environment variables.
 
 # Use colors for errors.
 . @abs_top_srcdir@/support/colors.sh
@@ -35,7 +35,7 @@ test $? != 0 && \
   echo "${RED}Generated libtool doesn't appear to support gdb${NORMAL}" && \
   exit 1
 
-. @abs_top_builddir@/bin/mesos-build-env.sh
+. @abs_top_builddir@/bin/mesos-slave-flags.sh
 
 exec ${LIBTOOL} --mode=execute gdb --args \
   @abs_top_builddir@/src/mesos-slave "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/gdb-mesos-tests.sh.in
----------------------------------------------------------------------
diff --git a/bin/gdb-mesos-tests.sh.in b/bin/gdb-mesos-tests.sh.in
index 7179d55..626fefe 100644
--- a/bin/gdb-mesos-tests.sh.in
+++ b/bin/gdb-mesos-tests.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -16,8 +16,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This is a wrapper for running gdb on the mesos-master before it is
-# installed that first sets up environment variables as appropriate.
+# This is a wrapper for running gdb on mesos-tests that first sets up
+# some flags via environment variables.
 
 # Use colors for errors.
 . @abs_top_srcdir@/support/colors.sh
@@ -35,7 +35,7 @@ test $? != 0 && \
   echo "${RED}Generated libtool doesn't appear to support gdb${NORMAL}" && \
   exit 1
 
-. @abs_top_builddir@/bin/mesos-build-env.sh
+. @abs_top_builddir@/bin/mesos-tests-flags.sh
 
 exec ${LIBTOOL} --mode=execute gdb --args \
   @abs_top_builddir@/src/mesos-tests "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/mesos-local-flags.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-local-flags.sh.in b/bin/mesos-local-flags.sh.in
new file mode 100644
index 0000000..aecf880
--- /dev/null
+++ b/bin/mesos-local-flags.sh.in
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+. @abs_top_builddir@/bin/mesos-master-flags.sh
+. @abs_top_builddir@/bin/mesos-slave-flags.sh

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/mesos-local.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-local.sh.in b/bin/mesos-local.sh.in
index 4910cc9..1b0e661 100644
--- a/bin/mesos-local.sh.in
+++ b/bin/mesos-local.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -17,12 +17,8 @@
 # limitations under the License.
 
 # This is a wrapper for running mesos-local before it is installed
-# that first sets up environment variables as appropriate.
+# that sets up some flags via environment variables.
 
-MESOS_WEBUI_DIR=@abs_top_srcdir@/src/webui
-MESOS_LAUNCHER_DIR=@abs_top_builddir@/src
+. @abs_top_builddir@/bin/mesos-local-flags.sh
 
-export MESOS_WEBUI_DIR
-export MESOS_LAUNCHER_DIR
-
-@abs_top_builddir@/src/mesos-local "${@}"
+exec @abs_top_builddir@/src/mesos-local "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/mesos-master-flags.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-master-flags.sh.in b/bin/mesos-master-flags.sh.in
new file mode 100644
index 0000000..951c3e4
--- /dev/null
+++ b/bin/mesos-master-flags.sh.in
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+export MESOS_WEBUI_DIR=@abs_top_srcdir@/src/webui

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/mesos-master.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-master.sh.in b/bin/mesos-master.sh.in
index 51118f3..57adc2a 100644
--- a/bin/mesos-master.sh.in
+++ b/bin/mesos-master.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -17,10 +17,8 @@
 # limitations under the License.
 
 # This is a wrapper for running mesos-master before it is installed
-# that first sets up environment variables as appropriate.
+# that sets up some flags via environment variables.
 
-MESOS_WEBUI_DIR=@abs_top_srcdir@/src/webui
-
-export MESOS_WEBUI_DIR
+. @abs_top_srcdir@/bin/mesos-master-flags.sh
 
 exec @abs_top_builddir@/src/mesos-master "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/mesos-slave-flags.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-slave-flags.sh.in b/bin/mesos-slave-flags.sh.in
new file mode 100644
index 0000000..dc73aef
--- /dev/null
+++ b/bin/mesos-slave-flags.sh.in
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+export MESOS_LAUNCHER_DIR=@abs_top_builddir@/src
+
+# Add the native library so we can run JVM based executors without
+# them needing to figure this out for themselves.
+if test $(uname) = 'Darwin'; then
+  MESOS_NATIVE_LIBRARY=@abs_top_builddir@/src/.libs/libmesos-@VERSION@.dylib
+else
+  MESOS_NATIVE_LIBRARY=@abs_top_builddir@/src/.libs/libmesos-@VERSION@.so
+fi
+export MESOS_NATIVE_LIBRARY

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/mesos-slave.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-slave.sh.in b/bin/mesos-slave.sh.in
index 1877ef5..d1e7bc1 100644
--- a/bin/mesos-slave.sh.in
+++ b/bin/mesos-slave.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -17,12 +17,8 @@
 # limitations under the License.
 
 # This is a wrapper for running mesos-slave before it is installed
-# that first sets up environment variables as appropriate.
+# that sets up some flags environment variables.
 
-MESOS_WEBUI_DIR=@abs_top_srcdir@/src/webui
-MESOS_LAUNCHER_DIR=@abs_top_builddir@/src
-
-export MESOS_WEBUI_DIR
-export MESOS_LAUNCHER_DIR
+. @abs_top_srcdir@/bin/mesos-slave-flags.sh
 
 @abs_top_builddir@/src/mesos-slave "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/mesos-tests-flags.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-tests-flags.sh.in b/bin/mesos-tests-flags.sh.in
new file mode 100644
index 0000000..cf8aec6
--- /dev/null
+++ b/bin/mesos-tests-flags.sh.in
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Currently no flags are necessary to run mesos-tests, this is just
+# here as a placeholder.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/bin/mesos-tests.sh.in
----------------------------------------------------------------------
diff --git a/bin/mesos-tests.sh.in b/bin/mesos-tests.sh.in
index f234035..27be3c7 100644
--- a/bin/mesos-tests.sh.in
+++ b/bin/mesos-tests.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -17,12 +17,9 @@
 # limitations under the License.
 
 # This is a wrapper for running mesos-tests from the build directory
-# that first sets up environment variables as appropriate.
+# that sets up some flags via environment variables.
 
-MESOS_WEBUI_DIR=@abs_top_srcdir@/src/webui
-MESOS_LAUNCHER_DIR=@abs_top_builddir@/src
+. @abs_top_builddir@/bin/mesos-tests-flags.sh
 
-export MESOS_WEBUI_DIR
-export MESOS_LAUNCHER_DIR
 
 exec @abs_top_builddir@/src/mesos-tests "${@}"

http://git-wip-us.apache.org/repos/asf/mesos/blob/43a60ca0/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 15ada8f..43f6d52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,6 +88,10 @@ AC_CONFIG_FILES([bin/mesos-local.sh], [chmod +x bin/mesos-local.sh])
 AC_CONFIG_FILES([bin/mesos-master.sh], [chmod +x bin/mesos-master.sh])
 AC_CONFIG_FILES([bin/mesos-slave.sh], [chmod +x bin/mesos-slave.sh])
 AC_CONFIG_FILES([bin/mesos-tests.sh], [chmod +x bin/mesos-tests.sh])
+AC_CONFIG_FILES([bin/mesos-local-flags.sh], [chmod +x bin/mesos-local-flags.sh])
+AC_CONFIG_FILES([bin/mesos-master-flags.sh], [chmod +x bin/mesos-master-flags.sh])
+AC_CONFIG_FILES([bin/mesos-slave-flags.sh], [chmod +x bin/mesos-slave-flags.sh])
+AC_CONFIG_FILES([bin/mesos-tests-flags.sh], [chmod +x bin/mesos-tests-flags.sh])
 AC_CONFIG_FILES([bin/gdb-mesos-local.sh], [chmod +x bin/gdb-mesos-local.sh])
 AC_CONFIG_FILES([bin/gdb-mesos-master.sh], [chmod +x bin/gdb-mesos-master.sh])
 AC_CONFIG_FILES([bin/gdb-mesos-slave.sh], [chmod +x bin/gdb-mesos-slave.sh])