[mesos] Enable CentOS7

tstclair tstclair at fedoraproject.org
Fri Aug 29 16:47:15 UTC 2014


commit a233a53d8340357c50c7cd5b4082eea1574ebb55
Author: Timothy St. Clair <tstclair at redhat.com>
Date:   Fri Aug 29 11:47:15 2014 -0500

    Enable CentOS7

 mesos-0.20-integ.patch |   24 +++++++++++++++++++++---
 mesos.spec             |   31 +++++++++++++++++++------------
 2 files changed, 40 insertions(+), 15 deletions(-)
---
diff --git a/mesos-0.20-integ.patch b/mesos-0.20-integ.patch
index 92bebab..133d8f5 100644
--- a/mesos-0.20-integ.patch
+++ b/mesos-0.20-integ.patch
@@ -150,14 +150,32 @@ index 4c8547a..7723e73 100644
  MESOS_JAR=${MESOS_BUILD_DIR}/src/java/target/mesos- at PACKAGE_VERSION@.jar
  
 diff --git a/src/python/native/ext_modules.py.in b/src/python/native/ext_modules.py.in
-index 4825fe4..b9fb7b9 100644
+index 4825fe4..2c28c47 100644
 --- a/src/python/native/ext_modules.py.in
 +++ b/src/python/native/ext_modules.py.in
-@@ -102,6 +102,8 @@ if os.path.exists(libprotobuf):
+@@ -41,6 +41,7 @@ glog = os.path.join(libprocess, '3rdparty', 'glog-0.3.3')
+ libev = os.path.join(libprocess, '3rdparty', 'libev-4.15')
+ gperftools = os.path.join(libprocess, '3rdparty', 'gperftools-2.0')
+ protobuf = os.path.join(libprocess, '3rdparty', 'protobuf-2.5.0')
++httparser = os.path.join(libprocess, '3rdparty')
+ 
+ # Build the list of source files. Note that each source must be
+ # relative to our current directory (where this script lives).
+@@ -76,6 +77,8 @@ libzookeeper = os.path.join(
+     abs_top_builddir, zookeeper, '.libs', 'libzookeeper_mt.a')
+ libprotobuf = os.path.join(
+     abs_top_builddir, protobuf, 'src', '.libs', 'libprotobuf.a')
++libhttp = os.path.join(
++    abs_top_builddir, httparser, '.libs', 'libry_http_parser.a')
+ 
+ if os.path.exists(libleveldb):
+     EXTRA_OBJECTS.append(libleveldb)
+@@ -102,6 +105,9 @@ if os.path.exists(libprotobuf):
  else:
    EXTRA_OBJECTS.append('-lprotobuf')
  
-+EXTRA_OBJECTS.append('-lhttp_parser')
++if not(os.path.exists(libhttp)):
++  EXTRA_OBJECTS.append('-lhttp_parser')
 +
  # For gperftools, we need to check for the presence of libprofiler.a, since
  # it is possible to disable perftools inside libprocess.
diff --git a/mesos.spec b/mesos.spec
index 8ab76ba..33ac8e2 100644
--- a/mesos.spec
+++ b/mesos.spec
@@ -13,6 +13,8 @@
 %global unbundled   0
 %endif
 
+%global systemmvn   1
+
 Name:          mesos
 Version:       0.20.0
 Release:       2.%{shortcommit}%{?dist}
@@ -42,6 +44,18 @@ BuildRequires: openssl-devel
 BuildRequires: cyrus-sasl-devel
 BuildRequires: systemd
 
+%if %systemmvn
+BuildRequires: maven-local
+BuildRequires: maven-plugin-bundle
+BuildRequires: maven-gpg-plugin
+BuildRequires: maven-clean-plugin
+BuildRequires: maven-shade-plugin
+BuildRequires: maven-dependency-plugin
+BuildRequires: exec-maven-plugin
+BuildRequires: maven-remote-resources-plugin
+BuildRequires: maven-site-plugin
+%endif
+
 %if %unbundled
 BuildRequires: http-parser-devel
 BuildRequires: boost-devel
@@ -56,18 +70,6 @@ BuildRequires: protobuf-python
 BuildRequires: protobuf-java
 BuildRequires: zookeeper-lib-devel
 BuildRequires: protobuf-devel
-
-# Typically folks will install their own mvn
-# but if folks want to we can push outside.
-BuildRequires: maven-local
-BuildRequires: maven-plugin-bundle
-BuildRequires: maven-gpg-plugin
-BuildRequires: maven-clean-plugin
-BuildRequires: maven-shade-plugin
-BuildRequires: maven-dependency-plugin
-BuildRequires: exec-maven-plugin
-BuildRequires: maven-remote-resources-plugin
-BuildRequires: maven-site-plugin
 BuildRequires: picojson-devel
 
 Requires: protobuf-python
@@ -261,8 +263,13 @@ install -m 0644 %{SOURCE2} %{SOURCE3} %{buildroot}%{_unitdir}/
 %files java
 %doc LICENSE NOTICE
 %{_jnidir}/%{name}/%{name}.jar
+%if 0%{?fedora} >= 21
 %{_datadir}/maven-metadata/%{name}.xml
 %{_datadir}/maven-poms/%{name}/%{name}.pom
+%else
+%{_mavenpomdir}/JPP.%{name}-%{name}.pom
+%{_mavendepmapfragdir}/%{name}.xml
+%endif
 
 ######################
 %files -n python-%{name}


More information about the scm-commits mailing list