diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-virtualization/recipes-extended/ceph/ceph | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/meta-virtualization/recipes-extended/ceph/ceph')
5 files changed, 301 insertions, 0 deletions
diff --git a/external/meta-virtualization/recipes-extended/ceph/ceph/0001-Correct-the-path-to-find-version.h-in-rocksdb.patch b/external/meta-virtualization/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/external/meta-virtualization/recipes-extended/ceph/ceph/0001-Correct-the-path-to-find-version.h-in-rocksdb.patch @@ -0,0 +1,40 @@ +From a53605694d5301b7bb543464b17f74bbbd35d372 Mon Sep 17 00:00:00 2001 +From: Dengke Du <dengke.du@windriver.com> +Date: Tue, 28 Aug 2018 10:04:40 +0800 +Subject: [PATCH] Correct the path to find version.h in rocksdb + +Signed-off-by: Dengke Du <dengke.du@windriver.com> +--- + cmake/modules/Findrocksdb.cmake | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/cmake/modules/Findrocksdb.cmake b/cmake/modules/Findrocksdb.cmake +index f8369f7..36b67ea 100644 +--- a/cmake/modules/Findrocksdb.cmake ++++ b/cmake/modules/Findrocksdb.cmake +@@ -9,17 +9,17 @@ + # ROCKSDB_VERSION_MINOR + # ROCKSDB_VERSION_PATCH + +-find_path(ROCKSDB_INCLUDE_DIR rocksdb/db.h) ++find_path(ROCKSDB_INCLUDE_DIR rocksdb/db.h ${CMAKE_SYSROOT}) + +-find_library(ROCKSDB_LIBRARIES rocksdb) ++find_library(ROCKSDB_LIBRARIES rocksdb ${CMAKE_SYSROOT}) + + if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h") + foreach(ver "MAJOR" "MINOR" "PATCH") +- file(STRINGS "${ROCKSDB_INCLUDE_DIR}/version.h" ROCKSDB_VER_${ver}_LINE ++ file(STRINGS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h" ROCKSDB_VER_${ver}_LINE + REGEX "^#define[ \t]+ROCKSDB_${ver}[ \t]+[0-9]+$") + string(REGEX REPLACE "^#define[ \t]+ROCKSDB_${ver}[ \t]+([0-9]+)$" +- "\\1" ROCKSDB_VERSION_${ver} "${ROCKDB_VER_${ver}_LINE}") +- unset(${ROCKDB_VER_${ver}_LINE}) ++ "\\1" ROCKSDB_VERSION_${ver} "${ROCKSDB_VER_${ver}_LINE}") ++ unset(ROCKSDB_VER_${ver}_LINE) + endforeach() + set(ROCKSDB_VERSION_STRING + "${ROCKSDB_VERSION_MAJOR}.${ROCKSDB_VERSION_MINOR}.${ROCKSDB_VERSION_PATCH}") +-- +2.7.4 + diff --git a/external/meta-virtualization/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch b/external/meta-virtualization/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch new file mode 100644 index 00000000..f9c53406 --- /dev/null +++ b/external/meta-virtualization/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch @@ -0,0 +1,129 @@ +From 00d44940c2e83bf73101a05d2aa8f88c2e2fca58 Mon Sep 17 00:00:00 2001 +From: Dengke Du <dengke.du@windriver.com> +Date: Tue, 23 Oct 2018 15:34:53 +0800 +Subject: [PATCH] ceph: add pybind support in OE + +1. add sysroot to CFLAGS when cross compiling pybind +2. change the pybind's INSTALL path to OE's INSTALL path +3. delete the check for header files, because the check method using + host compiler. + +Signed-off-by: Dengke Du <dengke.du@windriver.com> +Upstream-Status: Inappropriate [oe specific] +--- + cmake/modules/Distutils.cmake | 12 +++--------- + src/pybind/cephfs/setup.py | 8 -------- + src/pybind/rados/setup.py | 8 -------- + src/pybind/rbd/setup.py | 8 -------- + src/pybind/rgw/setup.py | 8 -------- + 5 files changed, 3 insertions(+), 41 deletions(-) + +diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake +index d6e9f38..3091d97 100644 +--- a/cmake/modules/Distutils.cmake ++++ b/cmake/modules/Distutils.cmake +@@ -47,7 +47,7 @@ function(distutils_add_cython_module name src) + LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} + CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR} + CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} +- CFLAGS=\"-iquote${CMAKE_SOURCE_DIR}/src/include -w\" ++ CFLAGS=\"-iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT}\" + ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py + build --verbose --build-base ${CYTHON_MODULE_DIR} + --build-platlib ${CYTHON_MODULE_DIR}/lib.${PYTHON${PYTHON_VERSION}_VERSION_MAJOR} +@@ -69,14 +69,8 @@ function(distutils_install_cython_module name) + set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\") + + set(options --prefix=${CMAKE_INSTALL_PREFIX}) +- if(DEFINED ENV{DESTDIR}) +- if(EXISTS /etc/debian_version) +- list(APPEND options --install-layout=deb) +- endif() +- list(APPEND options --root=\$ENV{DESTDIR}) +- else() +- list(APPEND options --root=/) +- endif() ++ list(APPEND options --root=${CMAKE_DESTDIR}) ++ list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR}) + execute_process( + COMMAND + ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py +diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py +index 6533f41..1ee4a59 100755 +--- a/src/pybind/cephfs/setup.py ++++ b/src/pybind/cephfs/setup.py +@@ -121,14 +121,6 @@ def check_sanity(): + finally: + shutil.rmtree(tmp_dir) + +- +-if 'BUILD_DOC' in os.environ.keys(): +- pass +-elif check_sanity(): +- pass +-else: +- sys.exit(1) +- + cmdclass = {} + try: + from Cython.Build import cythonize +diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py +index ef7c307..5204017 100755 +--- a/src/pybind/rados/setup.py ++++ b/src/pybind/rados/setup.py +@@ -117,14 +117,6 @@ def check_sanity(): + finally: + shutil.rmtree(tmp_dir) + +- +-if 'BUILD_DOC' in os.environ.keys(): +- pass +-elif check_sanity(): +- pass +-else: +- sys.exit(1) +- + cmdclass = {} + try: + from Cython.Build import cythonize +diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py +index bcf96f2..d4cbbeb 100755 +--- a/src/pybind/rbd/setup.py ++++ b/src/pybind/rbd/setup.py +@@ -120,14 +120,6 @@ def check_sanity(): + finally: + shutil.rmtree(tmp_dir) + +- +-if 'BUILD_DOC' in os.environ.keys(): +- pass +-elif check_sanity(): +- pass +-else: +- sys.exit(1) +- + cmdclass = {} + try: + from Cython.Build import cythonize +diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py +index f14f30c..ee7570b 100755 +--- a/src/pybind/rgw/setup.py ++++ b/src/pybind/rgw/setup.py +@@ -120,14 +120,6 @@ def check_sanity(): + finally: + shutil.rmtree(tmp_dir) + +- +-if 'BUILD_DOC' in os.environ.keys(): +- pass +-elif check_sanity(): +- pass +-else: +- sys.exit(1) +- + cmdclass = {} + try: + from Cython.Build import cythonize +-- +2.7.4 + diff --git a/external/meta-virtualization/recipes-extended/ceph/ceph/0001-ceph-detect-init-correct-the-installation-for-OE.patch b/external/meta-virtualization/recipes-extended/ceph/ceph/0001-ceph-detect-init-correct-the-installation-for-OE.patch new file mode 100644 index 00000000..875501bf --- /dev/null +++ b/external/meta-virtualization/recipes-extended/ceph/ceph/0001-ceph-detect-init-correct-the-installation-for-OE.patch @@ -0,0 +1,36 @@ +From 6aaf04036f0affbeddda123bff111990c4d5fd72 Mon Sep 17 00:00:00 2001 +From: Dengke Du <dengke.du@windriver.com> +Date: Fri, 26 Oct 2018 14:31:10 +0800 +Subject: [PATCH] ceph-detect-init: correct the installation for OE + +Signed-off-by: Dengke Du <dengke.du@windriver.com> +Upstream-Status: Inappropriate [oe specific] +--- + cmake/modules/Distutils.cmake | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake +index 3091d97..c50fe77 100644 +--- a/cmake/modules/Distutils.cmake ++++ b/cmake/modules/Distutils.cmake +@@ -16,15 +16,8 @@ function(distutils_install_module name) + cmake_parse_arguments(DU "" INSTALL_SCRIPT "" ${ARGN}) + install(CODE " + set(options --prefix=${CMAKE_INSTALL_PREFIX}) +- if(DEFINED ENV{DESTDIR}) +- if(EXISTS /etc/debian_version) +- list(APPEND options --install-layout=deb) +- endif() +- list(APPEND options --root=\$ENV{DESTDIR}) +- if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\") +- list(APPEND options --install-script=${DU_INSTALL_SCRIPT}) +- endif() +- endif() ++ list(APPEND options --root=${CMAKE_DESTDIR}) ++ list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR}) + execute_process( + COMMAND ${PYTHON${PYTHON_VERSION}_EXECUTABLE} + setup.py install \${options} +-- +2.7.4 + diff --git a/external/meta-virtualization/recipes-extended/ceph/ceph/0001-zstd-fix-error-for-cross-compile.patch b/external/meta-virtualization/recipes-extended/ceph/ceph/0001-zstd-fix-error-for-cross-compile.patch new file mode 100644 index 00000000..66b5f0a5 --- /dev/null +++ b/external/meta-virtualization/recipes-extended/ceph/ceph/0001-zstd-fix-error-for-cross-compile.patch @@ -0,0 +1,26 @@ +From 3e86b6d9db2682b123839e38e9bf45060e2bb2ab Mon Sep 17 00:00:00 2001 +From: Dengke Du <dengke.du@windriver.com> +Date: Wed, 29 Aug 2018 16:57:52 +0800 +Subject: [PATCH] zstd: fix error for cross compile + +Signed-off-by: Dengke Du <dengke.du@windriver.com> +--- + src/compressor/zstd/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt +index e30cb89..b298a3d 100644 +--- a/src/compressor/zstd/CMakeLists.txt ++++ b/src/compressor/zstd/CMakeLists.txt +@@ -9,7 +9,7 @@ ExternalProject_Add(zstd_ext + CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} + -DCMAKE_C_FLAGS=${ZSTD_C_FLAGS} +- -DCMAKE_AR=${CMAKE_AR} ++ -DCMAKE_SYSROOT=${CMAKE_SYSROOT} + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/libzstd + BUILD_COMMAND $(MAKE) libzstd_static + INSTALL_COMMAND "true") +-- +2.7.4 + diff --git a/external/meta-virtualization/recipes-extended/ceph/ceph/ceph.conf b/external/meta-virtualization/recipes-extended/ceph/ceph/ceph.conf new file mode 100644 index 00000000..fd9de6ce --- /dev/null +++ b/external/meta-virtualization/recipes-extended/ceph/ceph/ceph.conf @@ -0,0 +1,70 @@ +[global] + # Unique ID for the cluster. Run uuidgen to get this string. + fsid = %CLUSTER_UUID% + # Initial monitor + mon initial members = node1 + # IP address of the initial monitor, i.e. 128.224.149.xx + mon host = %PUBLIC_IP% + # Public network where the monitor is connected to, i.e, 128.224.0.0/16 + public network = %PUBLIC_DOMAIN% + # For version 0.55 and beyond, you must explicitly enable + # or disable authentication with "auth" entries in [global]. + auth cluster required = cephx + auth service required = cephx + auth client required = cephx + osd journal size = 1024 + + # Uncomment the following line if you are mounting with ext4 + # filestore xattr use omap = true + + # Number of replicas of objects. Write an object 2 times. + # Cluster cannot reach an active + clean state until there's enough OSDs + # to handle the number of copies of an object. In this case, it requires + # at least 2 OSDs + osd pool default size = 2 + + # Allow writing one copy in a degraded state. + osd pool default min size = 1 + + # Ensure you have a realistic number of placement groups. We recommend + # approximately 100 per OSD. E.g., total number of OSDs multiplied by 100 + # divided by the number of replicas (i.e., osd pool default size). So for + # 10 OSDs and osd pool default size = 2, we'd recommend approximately + # (100 * 10) / 2 = 500. + osd pool default pg num = 500 + osd pool default pgp num = 500 + osd crush chooseleaf type = 1 + +[osd] + osd mkfs type = xfs + osd mkfs options xfs = "-f" + osd mount options xfs = "rw,noatime,inode64,logbufs=8,logbsize=256k" + +# All port numbers below are not hard-coded, but expected by ceph, so please +# do not change the numbers. +[mon.node1] + host = node1 + mon addr = %PUBLIC_IP%:6789 + +[osd.0] + host = node1 + public addr = %PUBLIC_IP%:6800 + cluster addr = %PRIVATE_IP%:6800 + devs = /dev/sda1 + +[osd.1] + host = node1 + public addr = %PUBLIC_IP%:6801 + cluster addr = %PRIVATE_IP%:6801 + devs = /dev/sda2 + +[osd.2] + host = node1 + public addr = %PUBLIC_IP%:6802 + cluster addr = %PRIVATE_IP%:6802 + devs = /dev/sda3 + +[mds.a] + host = node1 + devs = /dev/sda4 + |