summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Julien Durillon <julien.durillon@clever-cloud.com> 2018-06-07 23:33:23 +0200
committerAvatar Julien Durillon <julien.durillon@clever-cloud.com> 2018-09-14 13:39:07 +0200
commitf55f96f3316b2b783a2f3b696cf4a9c83a1085bc (patch)
tree7fdcc5fd81debbc66a7685afc31ba80e0bc29a51
parent93d90d49e70cd10c0a919d00c8f5d3d314d9e07a (diff)
downloadnet-f55f96f3316b2b783a2f3b696cf4a9c83a1085bc.tar.gz
net-f55f96f3316b2b783a2f3b696cf4a9c83a1085bc.tar.xz
Bump ceph 13.2.1.
-rw-r--r--packages/sys-cluster/ceph/ceph-13.2.1.exheres-0 (renamed from packages/sys-cluster/ceph/ceph-12.2.6.exheres-0)42
-rw-r--r--packages/sys-cluster/ceph/files/0001-include-sysmacros.h.patch24
-rw-r--r--packages/sys-cluster/ceph/files/0002-fix-gcc-spdk.patch62
3 files changed, 96 insertions, 32 deletions
diff --git a/packages/sys-cluster/ceph/ceph-12.2.6.exheres-0 b/packages/sys-cluster/ceph/ceph-13.2.1.exheres-0
index 5e1649e..cf4e3b0 100644
--- a/packages/sys-cluster/ceph/ceph-12.2.6.exheres-0
+++ b/packages/sys-cluster/ceph/ceph-13.2.1.exheres-0
@@ -1,12 +1,13 @@
# Copyright 2013 Kevin Decherf <kevin@kdecherf.com>
# Distributed under the terms of the GNU General Public License v2
-require cmake [ api=2 ]
+require cmake [ api=2 cmake_minimum_version=2.8.11 ]
PLATFORMS="~amd64"
DEFAULT_SRC_PREPARE_PATCHES=(
"${FILES}"/hostname-fix.patch
+ "${FILES}"/0002-fix-gcc-spdk.patch
)
SUMMARY="Ceph is a distributed object store and file system"
@@ -28,7 +29,7 @@ MYOPTIONS="
DEPENDENCIES="
build:
dev-lang/yasm
- dev-lang/python:*
+ dev-lang/python:2.7
dev-python/Cython
dev-python/setuptools
dev-python/virtualenv
@@ -38,13 +39,14 @@ DEPENDENCIES="
app-arch/lz4
app-arch/snappy
dev-db/leveldb[>=1.20.0]
- dev-libs/boost
+ dev-libs/boost[>=1.67.0]
dev-libs/jemalloc
dev-libs/libaio
dev-libs/libatomic_ops
dev-libs/nss
dev-python/PrettyTable
sys-apps/keyutils
+ sys-fs/e2fsprogs
sys-fs/xfsprogs
client? (
dev-libs/expat
@@ -79,7 +81,11 @@ CMAKE_SRC_CONFIGURE_PARAMS=(
-DCMAKE_INSTALL_PREFIX:PATH=/usr/$(exhost --target)
-DCMAKE_INSTALL_FULL_SBINDIR:PATH=/usr/$(exhost --target)/bin
-DCMAKE_INSTALL_SBINDIR=bin
+ -DCMAKE_C_COMPILER:PATH=/usr/host/bin/$(exhost --tool-prefix)cc
+ -DCMAKE_CC:PATH=/usr/host/bin/$(exhost --tool-prefix)cc
-DCMAKE_AR:PATH=/usr/host/bin/$(exhost --tool-prefix)ar
+ -DCMAKE_LD:PATH=/usr/host/bin/$(exhost --tool-prefix)ld
+ -DCROSS=$(exhost --tool-prefix)
# Disable unused stuff. Add matching option if you want to enable it.
-DWITH_OPENLDAP=OFF
-DWITH_RDMA=OFF
@@ -88,24 +94,44 @@ CMAKE_SRC_CONFIGURE_PARAMS=(
-DWITH_SELINUX=OFF
-DWITH_BABELTRACE=OFF
-DHAVE_BABELTRACE=OFF
+ # Disable dashboard for mgr. It downloads boost 1.67 and runs some pip install stuff.
+ # I don't want it for now.
+ -DWITH_MGR_DASHBOARD_FRONTEND=OFF
# Enable shared system boost. Add option if you want to disable
-DWITH_SYSTEM_BOOST=ON
- -DWITH_NSS=ON
-DWITH_XFS=ON
# There should be better performances with jemalloc
-DALLOCATOR="jemalloc"
)
src_prepare() {
- edo sed -i 's/DESTINATION sbin/DESTINATION bin/' ${WORKBASE}/${PNV}/src/CMakeLists.txt
+ # Fix for boost 1.67.
+ # (Patches are pending in master)
+ edo sed -i 's/BOOST_COMPONENTS python/BOOST_COMPONENTS python27/' ${WORKBASE}/${PNV}/CMakeLists.txt
+ edo sed -i -e 's/DESTINATION sbin/DESTINATION bin/' \
+ -e 's/Boost::python/Boost::python27/' \
+ ${WORKBASE}/${PNV}/src/CMakeLists.txt
+
edo sed -i 's/CMAKE_INSTALL_LIBEXECDIR/CMAKE_INSTALL_LIBDIR/' ${WORKBASE}/${PNV}/systemd/CMakeLists.txt
edo sed -i 's;/usr/lib/ceph/ceph-osd-prestart.sh;/usr/host/libexec/ceph/ceph-osd-prestart.sh;' \
- ${WORKBASE}/${PNV}/systemd/ceph-osd@.service
- cmake_src_prepare
+ ${WORKBASE}/${PNV}/systemd/ceph-osd@.service.in
+
+ # ceph embeds dependencies with hardcoded calls to unprefixed tools
+ # This is mostly copied from rust-build.exlib
+ local dir="${WORKBASE}"/symlinked-build-tools
+ local tool
+ edo mkdir -p "${dir}"
+ for tool in ar cc g++ gcc ld; do
+ edo ln -s /usr/host/bin/$(exhost --tool-prefix)${tool} "${dir}"/${tool}
+ done
+
+ export PATH="${dir}:${PATH}"
+
+ CC="/usr/host/bin/$(exhost --tool-prefix)cc" cmake_src_prepare
}
src_configure() {
- LDFLAGS="${LDFLAGS} -lpthread" cmake_src_configure
+ LDFLAGS="${LDFLAGS} -lpthread" CC="/usr/host/bin/$(exhost --tool-prefix)cc" cmake_src_configure
}
src_install() {
diff --git a/packages/sys-cluster/ceph/files/0001-include-sysmacros.h.patch b/packages/sys-cluster/ceph/files/0001-include-sysmacros.h.patch
deleted file mode 100644
index 8ec0d82..0000000
--- a/packages/sys-cluster/ceph/files/0001-include-sysmacros.h.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From c493b660f0efe08eff52beb27b6dc1ca1b22d3ec Mon Sep 17 00:00:00 2001
-From: Julien Durillon <julien.durillon@gmail.com>
-Date: Wed, 3 May 2017 00:42:04 +0200
-Subject: [PATCH] include sysmacros.h
-
----
- src/rocksdb/env/io_posix.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/rocksdb/env/io_posix.cc b/src/rocksdb/env/io_posix.cc
-index bb352140..3a793f94 100644
---- a/src/rocksdb/env/io_posix.cc
-+++ b/src/rocksdb/env/io_posix.cc
-@@ -25,6 +25,7 @@
- #ifdef OS_LINUX
- #include <sys/statfs.h>
- #include <sys/syscall.h>
-+#include <sys/sysmacros.h>
- #endif
- #include "env/posix_logger.h"
- #include "monitoring/iostats_context_imp.h"
---
-2.12.2
-
diff --git a/packages/sys-cluster/ceph/files/0002-fix-gcc-spdk.patch b/packages/sys-cluster/ceph/files/0002-fix-gcc-spdk.patch
new file mode 100644
index 0000000..0102704
--- /dev/null
+++ b/packages/sys-cluster/ceph/files/0002-fix-gcc-spdk.patch
@@ -0,0 +1,62 @@
+From cff8a962e96bc8e4654a38cc4da559e0c92681df Mon Sep 17 00:00:00 2001
+From: Julien Durillon <julien.durillon@clever-cloud.com>
+Date: Wed, 12 Sep 2018 17:03:41 +0200
+Subject: [PATCH] Try to fix ceph build.
+
+---
+ CMakeLists.txt | 4 ++--
+ cmake/modules/BuildDPDK.cmake | 2 +-
+ cmake/modules/BuildSPDK.cmake | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d68c755324..90543f0db6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -416,7 +416,7 @@ if(WITH_RADOSGW)
+ execute_process(
+ COMMAND
+ "sh" "-c"
+- "objdump -p ${OPENSSL_SSL_LIBRARY} | sed -n 's/^ SONAME *//p'"
++ "${CMAKE_OBJDUMP} -p ${OPENSSL_SSL_LIBRARY} | sed -n 's/^ SONAME *//p'"
+ OUTPUT_VARIABLE LIBSSL_SONAME
+ ERROR_VARIABLE OBJDUMP_ERRORS
+ RESULT_VARIABLE OBJDUMP_RESULTS
+@@ -430,7 +430,7 @@ if(WITH_RADOSGW)
+ execute_process(
+ COMMAND
+ "sh" "-c"
+- "objdump -p ${OPENSSL_CRYPTO_LIBRARY} | sed -n 's/^ SONAME *//p'"
++ "${CMAKE_OBJDUMP} -p ${OPENSSL_CRYPTO_LIBRARY} | sed -n 's/^ SONAME *//p'"
+ OUTPUT_VARIABLE LIBCRYPTO_SONAME
+ ERROR_VARIABLE OBJDUMP_ERRORS
+ RESULT_VARIABLE OBJDUMP_RESULTS
+diff --git a/cmake/modules/BuildDPDK.cmake b/cmake/modules/BuildDPDK.cmake
+index ea60857733..51c10d5907 100644
+--- a/cmake/modules/BuildDPDK.cmake
++++ b/cmake/modules/BuildDPDK.cmake
+@@ -67,7 +67,7 @@ function(do_build_dpdk dpdk_dir)
+ ExternalProject_Add(dpdk-ext
+ SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/spdk/dpdk
+ CONFIGURE_COMMAND $(MAKE) config O=${dpdk_dir} T=${target}
+- BUILD_COMMAND env CC=${CMAKE_C_COMPILER} $(MAKE) O=${dpdk_dir} EXTRA_CFLAGS=-fPIC
++ BUILD_COMMAND env CC=${CMAKE_C_COMPILER} CROSS=${CROSS} $(MAKE) CROSS=${CROSS} AR=${CMAKE_AR} LD=${CMAKE_LD} O=${dpdk_dir} EXTRA_CFLAGS=-fPIC
+ BUILD_IN_SOURCE 1
+ INSTALL_COMMAND "true")
+ ExternalProject_Add_Step(dpdk-ext patch-config
+diff --git a/cmake/modules/BuildSPDK.cmake b/cmake/modules/BuildSPDK.cmake
+index 348071228f..a85fe98926 100644
+--- a/cmake/modules/BuildSPDK.cmake
++++ b/cmake/modules/BuildSPDK.cmake
+@@ -16,7 +16,7 @@ macro(build_spdk)
+ # unset $CFLAGS, otherwise it will interfere with how SPDK sets
+ # its include directory.
+ # unset $LDFLAGS, otherwise SPDK will fail to mock some functions.
+- BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} $(MAKE) EXTRA_CFLAGS="-fPIC"
++ BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} CROSS=${CROSS} $(MAKE) CROSS=${CROSS} AR=${CMAKE_AR} LD=${CMAKE_LD} EXTRA_CFLAGS="-fPIC"
+ BUILD_IN_SOURCE 1
+ INSTALL_COMMAND "true")
+ ExternalProject_Get_Property(spdk-ext source_dir)
+--
+2.18.0
+