summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDengke Du <dengke.du@windriver.com>2018-09-29 09:15:33 +0800
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-09-30 21:31:21 -0400
commita49ca99d063bce9158c7094279cf498dfbfe0455 (patch)
tree442091efd898410ce9c90802ba7f7ca4b7445a53
parent2dc1de2286bbf72afd8009188e1e1ec9fb35f804 (diff)
downloadmeta-virtualization-a49ca99d063bce9158c7094279cf498dfbfe0455.tar.gz
ceph: add support for ceph
Ceph is a distributed object, block, and file storage platform, ceph depends on oath-toolkit, so add the oath-toolkit also. Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-extended/ceph/ceph/0001-Correct-the-path-to-find-version.h-in-rocksdb.patch40
-rw-r--r--recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch28
-rw-r--r--recipes-extended/ceph/ceph/0001-zstd-fix-error-for-cross-compile.patch26
-rw-r--r--recipes-extended/ceph/ceph_13.2.1.bb62
-rw-r--r--recipes-extended/oath/oath/0001-oath-fix-macro-definition-error.patch32
-rw-r--r--recipes-extended/oath/oath_2.6.2.bb19
6 files changed, 207 insertions, 0 deletions
diff --git a/recipes-extended/ceph/ceph/0001-Correct-the-path-to-find-version.h-in-rocksdb.patch b/recipes-extended/ceph/ceph/0001-Correct-the-path-to-find-version.h-in-rocksdb.patch
new file mode 100644
index 00000000..788505b2
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-Correct-the-path-to-find-version.h-in-rocksdb.patch
@@ -0,0 +1,40 @@
1From a53605694d5301b7bb543464b17f74bbbd35d372 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Tue, 28 Aug 2018 10:04:40 +0800
4Subject: [PATCH] Correct the path to find version.h in rocksdb
5
6Signed-off-by: Dengke Du <dengke.du@windriver.com>
7---
8 cmake/modules/Findrocksdb.cmake | 10 +++++-----
9 1 file changed, 5 insertions(+), 5 deletions(-)
10
11diff --git a/cmake/modules/Findrocksdb.cmake b/cmake/modules/Findrocksdb.cmake
12index f8369f7..36b67ea 100644
13--- a/cmake/modules/Findrocksdb.cmake
14+++ b/cmake/modules/Findrocksdb.cmake
15@@ -9,17 +9,17 @@
16 # ROCKSDB_VERSION_MINOR
17 # ROCKSDB_VERSION_PATCH
18
19-find_path(ROCKSDB_INCLUDE_DIR rocksdb/db.h)
20+find_path(ROCKSDB_INCLUDE_DIR rocksdb/db.h ${CMAKE_SYSROOT})
21
22-find_library(ROCKSDB_LIBRARIES rocksdb)
23+find_library(ROCKSDB_LIBRARIES rocksdb ${CMAKE_SYSROOT})
24
25 if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h")
26 foreach(ver "MAJOR" "MINOR" "PATCH")
27- file(STRINGS "${ROCKSDB_INCLUDE_DIR}/version.h" ROCKSDB_VER_${ver}_LINE
28+ file(STRINGS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h" ROCKSDB_VER_${ver}_LINE
29 REGEX "^#define[ \t]+ROCKSDB_${ver}[ \t]+[0-9]+$")
30 string(REGEX REPLACE "^#define[ \t]+ROCKSDB_${ver}[ \t]+([0-9]+)$"
31- "\\1" ROCKSDB_VERSION_${ver} "${ROCKDB_VER_${ver}_LINE}")
32- unset(${ROCKDB_VER_${ver}_LINE})
33+ "\\1" ROCKSDB_VERSION_${ver} "${ROCKSDB_VER_${ver}_LINE}")
34+ unset(ROCKSDB_VER_${ver}_LINE)
35 endforeach()
36 set(ROCKSDB_VERSION_STRING
37 "${ROCKSDB_VERSION_MAJOR}.${ROCKSDB_VERSION_MINOR}.${ROCKSDB_VERSION_PATCH}")
38--
392.7.4
40
diff --git a/recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch b/recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch
new file mode 100644
index 00000000..bfba5b07
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch
@@ -0,0 +1,28 @@
1From 05bdb2bb6026c3a2e536c7143b39a763ffc1225f Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Thu, 27 Sep 2018 09:09:40 +0800
4Subject: [PATCH] ceph: disable pybind
5
6New ceph version have bad support for corss compile,
7so disable pybind temporarily.
8
9Signed-off-by: Dengke Du <dengke.du@windriver.com>
10---
11 src/CMakeLists.txt | 1 -
12 1 file changed, 1 deletion(-)
13
14diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
15index 374cbc7..44845f8 100644
16--- a/src/CMakeLists.txt
17+++ b/src/CMakeLists.txt
18@@ -777,7 +777,6 @@ if(NOT CEPH_BUILD_VIRTUALENV)
19 set(CEPH_BUILD_VIRTUALENV /tmp)
20 endif()
21
22-add_subdirectory(pybind)
23 add_subdirectory(ceph-disk)
24 add_subdirectory(ceph-volume)
25 add_subdirectory(ceph-detect-init)
26--
272.7.4
28
diff --git a/recipes-extended/ceph/ceph/0001-zstd-fix-error-for-cross-compile.patch b/recipes-extended/ceph/ceph/0001-zstd-fix-error-for-cross-compile.patch
new file mode 100644
index 00000000..66b5f0a5
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-zstd-fix-error-for-cross-compile.patch
@@ -0,0 +1,26 @@
1From 3e86b6d9db2682b123839e38e9bf45060e2bb2ab Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 29 Aug 2018 16:57:52 +0800
4Subject: [PATCH] zstd: fix error for cross compile
5
6Signed-off-by: Dengke Du <dengke.du@windriver.com>
7---
8 src/compressor/zstd/CMakeLists.txt | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt
12index e30cb89..b298a3d 100644
13--- a/src/compressor/zstd/CMakeLists.txt
14+++ b/src/compressor/zstd/CMakeLists.txt
15@@ -9,7 +9,7 @@ ExternalProject_Add(zstd_ext
16 CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
17 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
18 -DCMAKE_C_FLAGS=${ZSTD_C_FLAGS}
19- -DCMAKE_AR=${CMAKE_AR}
20+ -DCMAKE_SYSROOT=${CMAKE_SYSROOT}
21 BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/libzstd
22 BUILD_COMMAND $(MAKE) libzstd_static
23 INSTALL_COMMAND "true")
24--
252.7.4
26
diff --git a/recipes-extended/ceph/ceph_13.2.1.bb b/recipes-extended/ceph/ceph_13.2.1.bb
new file mode 100644
index 00000000..d7186b94
--- /dev/null
+++ b/recipes-extended/ceph/ceph_13.2.1.bb
@@ -0,0 +1,62 @@
1SUMMARY = "User space components of the Ceph file system"
2LICENSE = "LGPLv2.1 & GPLv2 & Unknown & Apache-2.0 & MIT"
3LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \
4 file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
5 file://COPYING;md5=92d301c8fccd296f2221a68a8dd53828 \
6"
7
8# Disable python pybind support for ceph temporary, when corss compiling pybind,
9# pybind mix cmake and python setup environment, would case a lot of errors.
10
11SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \
12 file://0001-Correct-the-path-to-find-version.h-in-rocksdb.patch \
13 file://0001-ceph-disable-pybind.patch \
14 file://0001-zstd-fix-error-for-cross-compile.patch \
15"
16SRC_URI[md5sum] = "4b0ee225e153fbb2515fa3f8a3666d17"
17SRC_URI[sha256sum] = "32086294d2007fdf64f85fcd919de2f092eeaa897bd8dc7c01e005e14516903c"
18
19DEPENDS = "boost bzip2 curl expat gperf-native \
20 keyutils libaio libibverbs lz4 \
21 nspr nss \
22 oath openldap openssl \
23 python rocksdb snappy udev \
24 valgrind xfsprogs zlib \
25"
26inherit cmake pythonnative python-dir
27OECMAKE_GENERATOR = "Unix Makefiles"
28
29EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \
30 -DWITH_FUSE=OFF \
31 -DWITH_SPDK=OFF \
32 -DWITH_LEVELDB=OFF \
33 -DWITH_LTTNG=OFF \
34 -DWITH_BABELTRACE=OFF \
35 -DWITH_TESTS=OFF \
36 -DWITH_MGR=OFF \
37 -DWITH_MGR_DASHBOARD_FRONTEND=OFF \
38 -DWITH_SYSTEM_BOOST=ON \
39 -DWITH_SYSTEM_ROCKSDB=ON \
40"
41
42do_configure_prepend () {
43 echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake
44}
45
46do_install_append () {
47 sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph
48}
49
50FILES_${PN} += "\
51 ${libdir}/rados-classes/*.so.* \
52"
53
54FILES_${PN}-dev += "\
55 ${libdir}/ceph/compressor/*.so \
56 ${libdir}/rados-classes/*.so \
57 ${libdir}/ceph/*.so \
58"
59
60RDEPENDS_${PN} += "\
61 python \
62"
diff --git a/recipes-extended/oath/oath/0001-oath-fix-macro-definition-error.patch b/recipes-extended/oath/oath/0001-oath-fix-macro-definition-error.patch
new file mode 100644
index 00000000..37f9d753
--- /dev/null
+++ b/recipes-extended/oath/oath/0001-oath-fix-macro-definition-error.patch
@@ -0,0 +1,32 @@
1From ba86973a3014caa9a4110611f470d4d9af5c2982 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Thu, 27 Sep 2018 09:37:08 +0800
4Subject: [PATCH] oath: fix macro definition error
5
6Signed-off-by: Dengke Du <dengke.du@windriver.com>
7---
8 oathtool/gl/intprops.h | 6 +++---
9 1 file changed, 3 insertions(+), 3 deletions(-)
10
11diff --git a/oathtool/gl/intprops.h b/oathtool/gl/intprops.h
12index e1fce5c..cee4997 100644
13--- a/oathtool/gl/intprops.h
14+++ b/oathtool/gl/intprops.h
15@@ -230,11 +230,11 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
16 (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
17 that the result (e.g., A + B) has that type. */
18 #if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
19-# define _GL_ADD_OVERFLOW(a, b, min, max)
20+# define _GL_ADD_OVERFLOW(a, b, min, max) \
21 __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
22-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
23+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
24 __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
25-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
26+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
27 __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
28 #else
29 # define _GL_ADD_OVERFLOW(a, b, min, max) \
30--
312.7.4
32
diff --git a/recipes-extended/oath/oath_2.6.2.bb b/recipes-extended/oath/oath_2.6.2.bb
new file mode 100644
index 00000000..f4230449
--- /dev/null
+++ b/recipes-extended/oath/oath_2.6.2.bb
@@ -0,0 +1,19 @@
1LICENSE = "GPLv3 & LGPLv2.1"
2LIC_FILES_CHKSUM = "file://COPYING;md5=62e1e33aebac5b1bc9fc48a866e2f61b \
3 file://oathtool/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
4 file://liboath/COPYING;md5=4fbd65380cdd255951079008b364516c \
5 file://pam_oath/COPYING;md5=d32239bcb673463ab874e80d47fae504"
6
7SRC_URI = "http://download.savannah.nongnu.org/releases/oath-toolkit/oath-toolkit-${PV}.tar.gz \
8 file://0001-oath-fix-macro-definition-error.patch \
9"
10
11S = "${WORKDIR}/${BPN}-toolkit-${PV}"
12SRC_URI[md5sum] = "4a05cd4768764843bd5493609a6bdb17"
13SRC_URI[sha256sum] = "b03446fa4b549af5ebe4d35d7aba51163442d255660558cd861ebce536824aa0"
14
15inherit autotools
16
17# Specify any options you want to pass to the configure script using EXTRA_OECONF:
18EXTRA_OECONF = ""
19DEPENDS = "gtk-doc-native"