You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/02/28 22:35:37 UTC

[1/6] mesos git commit: Added 'override' to function declarations in 'LibeventSSLSocketImpl'.

Repository: mesos
Updated Branches:
  refs/heads/master 86f32a4be -> 5eb72ec74


Added 'override' to function declarations in 'LibeventSSLSocketImpl'.

Inconsistent use of the `override` keyword in
`LibeventSSLSocketImpl` was causing warnings during
clang builds. This patch makes use of the keyword
across all relevant declarations in the class.

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


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

Branch: refs/heads/master
Commit: 5eb72ec74dba61077c3006a7f31b6974c7994dd5
Parents: 2264430
Author: Greg Mann <gr...@mesosphere.io>
Authored: Tue Feb 28 14:29:39 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Tue Feb 28 14:33:45 2017 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/src/libevent_ssl_socket.hpp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5eb72ec7/3rdparty/libprocess/src/libevent_ssl_socket.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/libevent_ssl_socket.hpp b/3rdparty/libprocess/src/libevent_ssl_socket.hpp
index e589a04..9493a50 100644
--- a/3rdparty/libprocess/src/libevent_ssl_socket.hpp
+++ b/3rdparty/libprocess/src/libevent_ssl_socket.hpp
@@ -37,17 +37,17 @@ public:
 
   LibeventSSLSocketImpl(int _s);
 
-  virtual ~LibeventSSLSocketImpl();
+  ~LibeventSSLSocketImpl() override;
 
   // Implement 'SocketImpl' interface.
-  virtual Future<Nothing> connect(const Address& address);
-  virtual Future<size_t> recv(char* data, size_t size);
+  Future<Nothing> connect(const Address& address) override;
+  Future<size_t> recv(char* data, size_t size) override;
   // Send does not currently support discard. See implementation.
-  virtual Future<size_t> send(const char* data, size_t size);
-  virtual Future<size_t> sendfile(int_fd fd, off_t offset, size_t size);
-  virtual Try<Nothing> listen(int backlog);
-  virtual Future<std::shared_ptr<SocketImpl>> accept();
-  virtual SocketImpl::Kind kind() const { return SocketImpl::Kind::SSL; }
+  Future<size_t> send(const char* data, size_t size) override;
+  Future<size_t> sendfile(int_fd fd, off_t offset, size_t size) override;
+  Try<Nothing> listen(int backlog) override;
+  Future<std::shared_ptr<SocketImpl>> accept() override;
+  SocketImpl::Kind kind() const override { return SocketImpl::Kind::SSL; }
 
   // Shuts down the socket.
   //
@@ -56,7 +56,7 @@ public:
   // do not have a concept of read/write-only shutdown. If either end
   // of the socket is closed, then the futures of any outstanding read
   // requests will be completed (possibly as failures).
-  virtual Try<Nothing> shutdown(int how) override;
+  Try<Nothing> shutdown(int how) override;
 
   // We need a post-initializer because 'shared_from_this()' is not
   // valid until the constructor has finished.


[3/6] mesos git commit: CMake: Added CPack support for generating packages.

Posted by jo...@apache.org.
CMake: Added CPack support for generating packages.

The inclusion of CPack adds two new build targets:
  * `package` will generate a binary installer for the current platform.
    This includes everything installed via CMake's install command.
  * `package_source` will generate a source installer for the current
    platform.  This includes all the source files.

We also expose a variety of CPack configuration options to the user,
which are mostly disabled by default.  By default, the `package_source`
target will only generate a `.tar.gz` of the sources.  The `package`
target will not generate anything.

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


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

Branch: refs/heads/master
Commit: 3eccf7e66ea4a76d869b6e726cfac7d91115976a
Parents: 86f32a4
Author: Srinivas Brahmaroutu <sr...@us.ibm.com>
Authored: Mon Feb 27 17:33:10 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Tue Feb 28 14:33:45 2017 -0800

----------------------------------------------------------------------
 CMakeLists.txt              | 57 ++++++++++++++++++++++++++++++++++++++++
 docs/configuration-cmake.md | 21 +++++++++++++++
 2 files changed, 78 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3eccf7e6/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c3297c..8e492cf 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,3 +79,60 @@ add_custom_target(
   tests
   DEPENDS ${STOUT_TESTS_TARGET} ${PROCESS_TESTS_TARGET} ${MESOS_TESTS_TARGET}
   )
+
+# PACKAGING.
+############
+# List of sources we will ignore when generating a source package.
+# We assume there are no artifacts from an autotools build.
+#
+# NOTE: An in-source build is not supported. The build directory
+# must be different than the source directory.
+set(CPACK_SOURCE_IGNORE_FILES
+  .clang-format;
+  .gitignore;
+  .reviewboardrc;
+  bootstrap.bat;
+  bootstrap;
+  configure.ac;
+  Doxyfile;
+  mesos.pc.in;
+  /.git/;
+  /docs/;
+  /m4/;
+  /mpi/;
+  /site/;
+  /support/;
+  ${CMAKE_BINARY_DIR};
+  )
+
+# Convert the ignore list to a string (as required by CPack).
+set(CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}")
+
+# Set the basename of any packages to 'mesos-<version>'.
+set(CPACK_PACKAGE_FILE_NAME "mesos-${MESOS_PACKAGE_VERSION}")
+set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
+
+# By default, all forms of binary packages are disabled.
+option(CPACK_BINARY_BUNDLE       "Enable to build OSX bundles"              OFF)
+option(CPACK_BINARY_DEB          "Enable to build Debian packages"          OFF)
+option(CPACK_BINARY_DRAGNDROP    "Enable to build OSX Drag'n'Drop packages" OFF)
+option(CPACK_BINARY_IFW          "Enable to build IFW packages"             OFF)
+option(CPACK_BINARY_NSIS         "Enable to build NSIS packages"            OFF)
+option(CPACK_BINARY_OSXX11       "Enable to build OSX X11 packages"         OFF)
+option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages"    OFF)
+option(CPACK_BINARY_RPM          "Enable to build RPM packages"             OFF)
+option(CPACK_BINARY_STGZ         "Enable to build STGZ packages"            OFF)
+option(CPACK_BINARY_TBZ2         "Enable to build TBZ2 packages"            OFF)
+option(CPACK_BINARY_TGZ          "Enable to build TGZ packages"             OFF)
+option(CPACK_BINARY_TXZ          "Enable to build TXZ packages"             OFF)
+
+# Output a gzip'd tarball for the `package_source` target.
+SET(CPACK_SOURCE_TGZ ON)
+
+# By default, other forms of source packages are disabled.
+option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" OFF)
+option(CPACK_SOURCE_TXZ  "Enable to build TXZ source packages"  OFF)
+option(CPACK_SOURCE_TZ   "Enable to build TZ source packages"   OFF)
+option(CPACK_SOURCE_ZIP  "Enable to build ZIP source packages"  OFF)
+
+INCLUDE(CPack)

http://git-wip-us.apache.org/repos/asf/mesos/blob/3eccf7e6/docs/configuration-cmake.md
----------------------------------------------------------------------
diff --git a/docs/configuration-cmake.md b/docs/configuration-cmake.md
index 4115e60..c7cb09a 100644
--- a/docs/configuration-cmake.md
+++ b/docs/configuration-cmake.md
@@ -42,6 +42,27 @@ the CMake build system.
   </tr>
   <tr>
     <td>
+      -DCPACK_BINARY_(BUNDLE|DEB|DRAGNDROP|IFW|NSIS|OSXX11|PACKAGEMAKER|RPM|STGZ|TBZ2|TGZ|TXZ)
+    </td>
+    <td>
+      This modifies the 'package' target to generate binary package of
+      the specified format.  A binary package contains everything that
+      would be installed via CMake's 'install' target.
+      [default=OFF]
+    </td>
+  </tr>
+  <tr>
+    <td>
+      -DCPACK_SOURCE_(TBZ2|TXZ|TZ|ZIP)
+    </td>
+    <td>
+      This modifies the 'package_source' target to generate a package of the
+      sources required to build and test Mesos, in the specified format.
+      [default=OFF]
+    </td>
+  </tr>
+  <tr>
+    <td>
       -DENABLE_LIBEVENT
     </td>
     <td>


[4/6] mesos git commit: Updated docker-build.sh with CMake specifics.

Posted by jo...@apache.org.
Updated docker-build.sh with CMake specifics.

This tweaks the cmake build command and comments in our Docker build
helper script.  The updates are:
  * Bootstrap is not needed for CMake builds.
  * `make check` now builds everything.
  * `make distcheck` is not supported, nor planned to be supported.


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

Branch: refs/heads/master
Commit: 1fa329997b5b0683587ebfad31e6faf56c26a38c
Parents: 3eccf7e
Author: Joseph Wu <jo...@apache.org>
Authored: Tue Feb 28 13:50:51 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Tue Feb 28 14:33:45 2017 -0800

----------------------------------------------------------------------
 support/docker-build.sh | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1fa32999/support/docker-build.sh
----------------------------------------------------------------------
diff --git a/support/docker-build.sh b/support/docker-build.sh
index ac251d3..d16766b 100755
--- a/support/docker-build.sh
+++ b/support/docker-build.sh
@@ -158,11 +158,9 @@ else
 	    CONFIGURATION="$CONFIGURATION $element=1"
 	done
 
-	# MESOS-5433: `distcheck` is not currently supported by our CMake scripts.
-	# MESOS-5624: In source build is not yet supported.
-	# Also, we run `make` in addition to `make check` because the latter only
-	# compiles stout and libprocess sources and tests.
-	append_dockerfile "CMD ./bootstrap && mkdir build && cd build && cmake $CONFIGURATION .. && make -j6 check && make -j6"
+	# MESOS-5433: `distcheck` is not supported.
+	# MESOS-5624: In source build is not supported.
+	append_dockerfile "CMD mkdir build && cd build && cmake $CONFIGURATION .. && make -j6 check"
 	;;
       *)
 	echo "Unknown build tool $BUILDTOOL"


[6/6] mesos git commit: CMake: Exclude tests from the default build.

Posted by jo...@apache.org.
CMake: Exclude tests from the default build.

Currently, if you run `make`, you will end up building the `stout-tests`
binary because we do not exclude it from the default build.  This
commit adds the `EXCLUDE_FROM_ALL` property to the `stout-tests` binary.

`make check` will still run the test.


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

Branch: refs/heads/master
Commit: e4c6acb01a52635232c9688adaa4a930e15432c7
Parents: 1fa3299
Author: Joseph Wu <jo...@apache.org>
Authored: Tue Feb 28 14:20:30 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Tue Feb 28 14:33:45 2017 -0800

----------------------------------------------------------------------
 3rdparty/stout/tests/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e4c6acb0/3rdparty/stout/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/CMakeLists.txt b/3rdparty/stout/tests/CMakeLists.txt
index 4e22bf6..4bbe713 100644
--- a/3rdparty/stout/tests/CMakeLists.txt
+++ b/3rdparty/stout/tests/CMakeLists.txt
@@ -106,7 +106,7 @@ link_directories(${STOUT_TEST_LIB_DIRS})
 
 # THE STOUT TEST EXECUTABLE (generates, e.g., stout-tests, etc., on Linux).
 ###########################################################################
-add_executable(${STOUT_TESTS_TARGET} ${STOUT_TESTS_SRC})
+add_executable(${STOUT_TESTS_TARGET} EXCLUDE_FROM_ALL ${STOUT_TESTS_SRC})
 
 GROUP_STOUT_HEADERS()
 


[5/6] mesos git commit: CMake: Exclude tests from the default build.

Posted by jo...@apache.org.
CMake: Exclude tests from the default build.

Currently, if you run `make`, you will end up building the
`mesos-tests` binary because we do not exclude it from the default
build.  This commit adds the `EXCLUDE_FROM_ALL` property to the
`mesos-tests` binary.

The `EXCLUDE_FROM_ALL` property is also added to the test helper
binary `test-helper` and all the test modules.

`make check` will still run the test.


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

Branch: refs/heads/master
Commit: 22644301859cdff4156ca9aac991588e7dc76756
Parents: 68a4d89
Author: Joseph Wu <jo...@apache.org>
Authored: Tue Feb 28 14:22:31 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Tue Feb 28 14:33:45 2017 -0800

----------------------------------------------------------------------
 src/examples/CMakeLists.txt | 26 +++++++++++++-------------
 src/tests/CMakeLists.txt    |  4 ++--
 2 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/22644301/src/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt
index 6244a52..dfab1b4 100644
--- a/src/examples/CMakeLists.txt
+++ b/src/examples/CMakeLists.txt
@@ -53,19 +53,19 @@ set(TEST_HTTP_FRAMEWORK_SRC           test_http_framework.cpp)
 #########################
 # NOTE: Modules are not supported on Windows.
 if (NOT WIN32)
-  add_library(${TEST_ALLOCATOR}          SHARED ${TEST_ALLOCATOR_SRC})
-  add_library(${TEST_ANONYMOUS}          SHARED ${TEST_ANONYMOUS_SRC})
-  add_library(${TEST_AUTHENTICATION}     SHARED ${TEST_AUTHENTICATION_SRC})
-  add_library(${TEST_AUTHORIZER}         SHARED ${TEST_AUTHORIZER_SRC})
-  add_library(${TEST_CONTAINER_LOGGER}   SHARED ${TEST_CONTAINER_LOGGER_SRC})
-  add_library(${TEST_EXAMPLEMODULE}      SHARED ${TEST_EXAMPLEMODULE_SRC})
-  add_library(${TEST_HOOK}               SHARED ${TEST_HOOK_SRC})
-  add_library(${TEST_HTTPAUTHENTICATOR}  SHARED ${TEST_HTTPAUTHENTICATOR_SRC})
-  add_library(${TEST_ISOLATOR}           SHARED ${TEST_ISOLATOR_SRC})
-  add_library(${TEST_MASTER_CONTENDER}   SHARED ${TEST_MASTER_CONTENDER_SRC})
-  add_library(${TEST_MASTER_DETECTOR}    SHARED ${TEST_MASTER_DETECTOR_SRC})
-  add_library(${TEST_QOS_CONTROLLER}     SHARED ${TEST_QOS_CONTROLLER_SRC})
-  add_library(${TEST_RESOURCE_ESTIMATOR} SHARED ${TEST_RESOURCE_ESTIMATOR_SRC})
+  add_library(${TEST_ALLOCATOR}          SHARED EXCLUDE_FROM_ALL ${TEST_ALLOCATOR_SRC})
+  add_library(${TEST_ANONYMOUS}          SHARED EXCLUDE_FROM_ALL ${TEST_ANONYMOUS_SRC})
+  add_library(${TEST_AUTHENTICATION}     SHARED EXCLUDE_FROM_ALL ${TEST_AUTHENTICATION_SRC})
+  add_library(${TEST_AUTHORIZER}         SHARED EXCLUDE_FROM_ALL ${TEST_AUTHORIZER_SRC})
+  add_library(${TEST_CONTAINER_LOGGER}   SHARED EXCLUDE_FROM_ALL ${TEST_CONTAINER_LOGGER_SRC})
+  add_library(${TEST_EXAMPLEMODULE}      SHARED EXCLUDE_FROM_ALL ${TEST_EXAMPLEMODULE_SRC})
+  add_library(${TEST_HOOK}               SHARED EXCLUDE_FROM_ALL ${TEST_HOOK_SRC})
+  add_library(${TEST_HTTPAUTHENTICATOR}  SHARED EXCLUDE_FROM_ALL ${TEST_HTTPAUTHENTICATOR_SRC})
+  add_library(${TEST_ISOLATOR}           SHARED EXCLUDE_FROM_ALL ${TEST_ISOLATOR_SRC})
+  add_library(${TEST_MASTER_CONTENDER}   SHARED EXCLUDE_FROM_ALL ${TEST_MASTER_CONTENDER_SRC})
+  add_library(${TEST_MASTER_DETECTOR}    SHARED EXCLUDE_FROM_ALL ${TEST_MASTER_DETECTOR_SRC})
+  add_library(${TEST_QOS_CONTROLLER}     SHARED EXCLUDE_FROM_ALL ${TEST_QOS_CONTROLLER_SRC})
+  add_library(${TEST_RESOURCE_ESTIMATOR} SHARED EXCLUDE_FROM_ALL ${TEST_RESOURCE_ESTIMATOR_SRC})
 endif (NOT WIN32)
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/22644301/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 3b08bb4..fd72b6f 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -237,8 +237,8 @@ link_directories(${MESOS_TESTS_LIB_DIRS})
 
 # THE TEST AND HELPER EXECUTABLEs (generates, e.g., stout-tests, etc., on Linux).
 #################################$###############################################
-add_executable(${MESOS_TESTS_TARGET} ${MESOS_TESTS_SRC})
-add_executable(${TEST_HELPER_TARGET} ${TEST_HELPER_SRC})
+add_executable(${MESOS_TESTS_TARGET} EXCLUDE_FROM_ALL ${MESOS_TESTS_SRC})
+add_executable(${TEST_HELPER_TARGET} EXCLUDE_FROM_ALL ${TEST_HELPER_SRC})
 
 # ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
 ######################################################


[2/6] mesos git commit: CMake: Exclude tests from the default build.

Posted by jo...@apache.org.
CMake: Exclude tests from the default build.

Currently, if you run `make`, you will end up building the
`libprocess-tests` binary because we do not exclude it from the default
build.  This commit adds the `EXCLUDE_FROM_ALL` property to the
`libprocess-tests` binary.

The `EXCLUDE_FROM_ALL` property is also added to the test helper
binary `test-linkee`.

`make check` will still run the test.


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

Branch: refs/heads/master
Commit: 68a4d8960b30df25c12b521b28de14294506dc2f
Parents: e4c6acb
Author: Joseph Wu <jo...@apache.org>
Authored: Tue Feb 28 14:20:56 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Tue Feb 28 14:33:45 2017 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/src/tests/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/68a4d896/3rdparty/libprocess/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/CMakeLists.txt b/3rdparty/libprocess/src/tests/CMakeLists.txt
index c65c7f5..cf1900e 100644
--- a/3rdparty/libprocess/src/tests/CMakeLists.txt
+++ b/3rdparty/libprocess/src/tests/CMakeLists.txt
@@ -67,7 +67,7 @@ link_directories(${PROCESS_TEST_LIB_DIRS})
 
 # THE PROCESS TEST EXECUTABLE (generates, e.g., libprocess-tests, etc., on Linux).
 ###############################################################################
-add_executable(${PROCESS_TESTS_TARGET} ${PROCESS_TESTS_SRC})
+add_executable(${PROCESS_TESTS_TARGET} EXCLUDE_FROM_ALL ${PROCESS_TESTS_SRC})
 
 GROUP_STOUT_HEADERS()
 GROUP_PROCESS_HEADERS()
@@ -88,7 +88,7 @@ add_dependencies(${PROCESS_TESTS_TARGET} ${PROCESS_TEST_DEPENDENCIES})
 
 # ADDITIONAL EXECUTABLE(s).
 ###########################
-add_executable(test-linkee test_linkee.cpp)
+add_executable(test-linkee EXCLUDE_FROM_ALL test_linkee.cpp)
 target_link_libraries(test-linkee ${PROCESS_TEST_LIBS})
 add_dependencies(${PROCESS_TESTS_TARGET} test-linkee)