mesos: 0.23.0 -> 0.26.0

Update mesos to 0.26.0 and build with SSL support.
This commit is contained in:
Kevin Cox 2016-01-23 09:49:19 -05:00
parent aa31d99d29
commit d5ed1637b6
2 changed files with 41 additions and 14 deletions

@ -1,7 +1,7 @@
{ stdenv, lib, makeWrapper, fetchurl, curl, sasl, openssh, autoconf
, automake114x, libtool, unzip, gnutar, jdk, maven, python, wrapPython
, setuptools, boto, pythonProtobuf, apr, subversion
, leveldb, glog, perf, utillinux, libnl, iproute
, automake115x, libtool, unzip, gnutar, jdk, maven, python, wrapPython
, setuptools, boto, pythonProtobuf, apr, subversion, gzip
, leveldb, glog, perf, utillinux, libnl, iproute, openssl, libevent
}:
let
@ -9,25 +9,26 @@ let
soext = if stdenv.system == "x86_64-darwin" then "dylib" else "so";
in stdenv.mkDerivation rec {
version = "0.23.0";
version = "0.26.0";
name = "mesos-${version}";
dontDisableStatic = true;
src = fetchurl {
url = "mirror://apache/mesos/${version}/${name}.tar.gz";
sha256 = "1v5xpn4wal4vcrvcklchx9slkpa8xlwqkdbnxzy9zkzpq5g3arxr";
sha256 = "0csvaql9gky15w23gmiw6cvlfnrlhfxvdqd2pv3j3grr44ph0ab5";
};
patches = [
# https://reviews.apache.org/r/36610/
./rb36610.patch
./maven_repo.patch
];
buildInputs = [
makeWrapper autoconf automake114x libtool curl sasl jdk maven
makeWrapper autoconf automake115x libtool curl sasl jdk maven
python wrapPython boto setuptools leveldb
subversion apr glog
subversion apr glog openssl libevent
] ++ lib.optionals stdenv.isLinux [
libnl
];
@ -37,17 +38,18 @@ in stdenv.mkDerivation rec {
];
preConfigure = ''
export MAVEN_OPTS="-Dmaven.repo.local=${mavenRepo}"
substituteInPlace src/Makefile.am --subst-var-by mavenRepo ${mavenRepo}
substituteInPlace src/launcher/fetcher.cpp \
--replace '"gzip' '"${gzip}/bin/gzip' \
--replace '"tar' '"${gnutar}/bin/tar' \
--replace '"unzip' '"${unzip}/bin/unzip'
substituteInPlace src/cli/mesos-scp \
--replace "'scp " "'${openssh}/bin/scp "
substituteInPlace src/cli/python/mesos/cli.py \
--replace "['mesos-resolve'" "['$out/bin/mesos-resolve'"
substituteInPlace src/python/cli/src/mesos/cli.py \
--replace "['mesos-resolve'" "['$out/bin/mesos-resolve'"
'' + lib.optionalString (stdenv.isLinux) ''
@ -57,13 +59,13 @@ in stdenv.mkDerivation rec {
substituteInPlace src/linux/perf.cpp \
--replace '"perf ' '"${perf}/bin/perf '
substituteInPlace src/slave/containerizer/isolators/filesystem/shared.cpp \
substituteInPlace src/slave/containerizer/mesos/isolators/filesystem/shared.cpp \
--replace '"mount ' '"${utillinux}/bin/mount ' \
substituteInPlace src/slave/containerizer/isolators/namespaces/pid.cpp \
substituteInPlace src/slave/containerizer/mesos/isolators/namespaces/pid.cpp \
--replace '"mount ' '"${utillinux}/bin/mount ' \
substituteInPlace src/slave/containerizer/isolators/network/port_mapping.cpp \
substituteInPlace src/slave/containerizer/mesos/isolators/network/port_mapping.cpp \
--replace '"tc ' '"${iproute}/bin/tc ' \
--replace '"ip ' '"${iproute}/bin/ip ' \
--replace '"mount ' '"${utillinux}/bin/mount ' \
@ -79,6 +81,10 @@ in stdenv.mkDerivation rec {
"--with-glog=${glog}"
"--enable-optimize"
"--disable-python-dependency-install"
"--enable-ssl"
"--with-ssl=${openssl}"
"--enable-libevent"
"--with-libevent=${libevent}"
] ++ lib.optionals stdenv.isLinux [
"--with-network-isolator"
];
@ -107,6 +113,14 @@ in stdenv.mkDerivation rec {
--prefix="$out"
rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*
popd
# optional python dependency for mesos cli
pushd src/python/cli
${python}/bin/${python.executable} setup.py install \
--install-lib=$out/lib/${python.libPrefix}/site-packages \
--old-and-unmanageable \
--prefix="$out"
popd
'';
postFixup = ''
@ -127,7 +141,7 @@ in stdenv.mkDerivation rec {
# wrap the python programs
for prog in mesos-cat mesos-ps mesos-scp mesos-tail; do
wrapProgram "$out/bin/$prog" \
--prefix PYTHONPATH ":" "$out/libexec/mesos/python"
--prefix PYTHONPATH ":" "$out/lib/${python.libPrefix}/site-packages"
true
done
'';

@ -0,0 +1,13 @@
diff --git a/src/Makefile.am b/src/Makefile.am
index ae2740a..1df91a7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1310,7 +1310,7 @@ if HAS_JAVA
$(MESOS_JAR): $(MESOS_JAR_SOURCE) $(MESOS_JAR_GENERATED) java/mesos.pom
@echo "Building mesos-$(PACKAGE_VERSION).jar ..."
- @cd $(abs_top_builddir)/src/java && $(MVN) -f mesos.pom clean package
+ @cd $(abs_top_builddir)/src/java && $(MVN) -f mesos.pom -Dmaven.repo.local=@mavenRepo@ clean package
# Convenience library for JNI bindings.
# TODO(Charles Reiss): We really should be building the Java library