diff options
Diffstat (limited to 'recipes-extended/ceph')
-rw-r--r-- | recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch | 129 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch | 28 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph/ceph.conf | 70 | ||||
-rw-r--r-- | recipes-extended/ceph/ceph_13.2.2.bb (renamed from recipes-extended/ceph/ceph_13.2.1.bb) | 45 |
4 files changed, 235 insertions, 37 deletions
diff --git a/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch b/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch new file mode 100644 index 00000000..f9c53406 --- /dev/null +++ b/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch | |||
@@ -0,0 +1,129 @@ | |||
1 | From 00d44940c2e83bf73101a05d2aa8f88c2e2fca58 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dengke Du <dengke.du@windriver.com> | ||
3 | Date: Tue, 23 Oct 2018 15:34:53 +0800 | ||
4 | Subject: [PATCH] ceph: add pybind support in OE | ||
5 | |||
6 | 1. add sysroot to CFLAGS when cross compiling pybind | ||
7 | 2. change the pybind's INSTALL path to OE's INSTALL path | ||
8 | 3. delete the check for header files, because the check method using | ||
9 | host compiler. | ||
10 | |||
11 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
12 | Upstream-Status: Inappropriate [oe specific] | ||
13 | --- | ||
14 | cmake/modules/Distutils.cmake | 12 +++--------- | ||
15 | src/pybind/cephfs/setup.py | 8 -------- | ||
16 | src/pybind/rados/setup.py | 8 -------- | ||
17 | src/pybind/rbd/setup.py | 8 -------- | ||
18 | src/pybind/rgw/setup.py | 8 -------- | ||
19 | 5 files changed, 3 insertions(+), 41 deletions(-) | ||
20 | |||
21 | diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake | ||
22 | index d6e9f38..3091d97 100644 | ||
23 | --- a/cmake/modules/Distutils.cmake | ||
24 | +++ b/cmake/modules/Distutils.cmake | ||
25 | @@ -47,7 +47,7 @@ function(distutils_add_cython_module name src) | ||
26 | LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} | ||
27 | CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR} | ||
28 | CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} | ||
29 | - CFLAGS=\"-iquote${CMAKE_SOURCE_DIR}/src/include -w\" | ||
30 | + CFLAGS=\"-iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT}\" | ||
31 | ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py | ||
32 | build --verbose --build-base ${CYTHON_MODULE_DIR} | ||
33 | --build-platlib ${CYTHON_MODULE_DIR}/lib.${PYTHON${PYTHON_VERSION}_VERSION_MAJOR} | ||
34 | @@ -69,14 +69,8 @@ function(distutils_install_cython_module name) | ||
35 | set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\") | ||
36 | |||
37 | set(options --prefix=${CMAKE_INSTALL_PREFIX}) | ||
38 | - if(DEFINED ENV{DESTDIR}) | ||
39 | - if(EXISTS /etc/debian_version) | ||
40 | - list(APPEND options --install-layout=deb) | ||
41 | - endif() | ||
42 | - list(APPEND options --root=\$ENV{DESTDIR}) | ||
43 | - else() | ||
44 | - list(APPEND options --root=/) | ||
45 | - endif() | ||
46 | + list(APPEND options --root=${CMAKE_DESTDIR}) | ||
47 | + list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR}) | ||
48 | execute_process( | ||
49 | COMMAND | ||
50 | ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py | ||
51 | diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py | ||
52 | index 6533f41..1ee4a59 100755 | ||
53 | --- a/src/pybind/cephfs/setup.py | ||
54 | +++ b/src/pybind/cephfs/setup.py | ||
55 | @@ -121,14 +121,6 @@ def check_sanity(): | ||
56 | finally: | ||
57 | shutil.rmtree(tmp_dir) | ||
58 | |||
59 | - | ||
60 | -if 'BUILD_DOC' in os.environ.keys(): | ||
61 | - pass | ||
62 | -elif check_sanity(): | ||
63 | - pass | ||
64 | -else: | ||
65 | - sys.exit(1) | ||
66 | - | ||
67 | cmdclass = {} | ||
68 | try: | ||
69 | from Cython.Build import cythonize | ||
70 | diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py | ||
71 | index ef7c307..5204017 100755 | ||
72 | --- a/src/pybind/rados/setup.py | ||
73 | +++ b/src/pybind/rados/setup.py | ||
74 | @@ -117,14 +117,6 @@ def check_sanity(): | ||
75 | finally: | ||
76 | shutil.rmtree(tmp_dir) | ||
77 | |||
78 | - | ||
79 | -if 'BUILD_DOC' in os.environ.keys(): | ||
80 | - pass | ||
81 | -elif check_sanity(): | ||
82 | - pass | ||
83 | -else: | ||
84 | - sys.exit(1) | ||
85 | - | ||
86 | cmdclass = {} | ||
87 | try: | ||
88 | from Cython.Build import cythonize | ||
89 | diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py | ||
90 | index bcf96f2..d4cbbeb 100755 | ||
91 | --- a/src/pybind/rbd/setup.py | ||
92 | +++ b/src/pybind/rbd/setup.py | ||
93 | @@ -120,14 +120,6 @@ def check_sanity(): | ||
94 | finally: | ||
95 | shutil.rmtree(tmp_dir) | ||
96 | |||
97 | - | ||
98 | -if 'BUILD_DOC' in os.environ.keys(): | ||
99 | - pass | ||
100 | -elif check_sanity(): | ||
101 | - pass | ||
102 | -else: | ||
103 | - sys.exit(1) | ||
104 | - | ||
105 | cmdclass = {} | ||
106 | try: | ||
107 | from Cython.Build import cythonize | ||
108 | diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py | ||
109 | index f14f30c..ee7570b 100755 | ||
110 | --- a/src/pybind/rgw/setup.py | ||
111 | +++ b/src/pybind/rgw/setup.py | ||
112 | @@ -120,14 +120,6 @@ def check_sanity(): | ||
113 | finally: | ||
114 | shutil.rmtree(tmp_dir) | ||
115 | |||
116 | - | ||
117 | -if 'BUILD_DOC' in os.environ.keys(): | ||
118 | - pass | ||
119 | -elif check_sanity(): | ||
120 | - pass | ||
121 | -else: | ||
122 | - sys.exit(1) | ||
123 | - | ||
124 | cmdclass = {} | ||
125 | try: | ||
126 | from Cython.Build import cythonize | ||
127 | -- | ||
128 | 2.7.4 | ||
129 | |||
diff --git a/recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch b/recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch deleted file mode 100644 index bfba5b07..00000000 --- a/recipes-extended/ceph/ceph/0001-ceph-disable-pybind.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 05bdb2bb6026c3a2e536c7143b39a763ffc1225f Mon Sep 17 00:00:00 2001 | ||
2 | From: Dengke Du <dengke.du@windriver.com> | ||
3 | Date: Thu, 27 Sep 2018 09:09:40 +0800 | ||
4 | Subject: [PATCH] ceph: disable pybind | ||
5 | |||
6 | New ceph version have bad support for corss compile, | ||
7 | so disable pybind temporarily. | ||
8 | |||
9 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
10 | --- | ||
11 | src/CMakeLists.txt | 1 - | ||
12 | 1 file changed, 1 deletion(-) | ||
13 | |||
14 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
15 | index 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 | -- | ||
27 | 2.7.4 | ||
28 | |||
diff --git a/recipes-extended/ceph/ceph/ceph.conf b/recipes-extended/ceph/ceph/ceph.conf new file mode 100644 index 00000000..fd9de6ce --- /dev/null +++ b/recipes-extended/ceph/ceph/ceph.conf | |||
@@ -0,0 +1,70 @@ | |||
1 | [global] | ||
2 | # Unique ID for the cluster. Run uuidgen to get this string. | ||
3 | fsid = %CLUSTER_UUID% | ||
4 | # Initial monitor | ||
5 | mon initial members = node1 | ||
6 | # IP address of the initial monitor, i.e. 128.224.149.xx | ||
7 | mon host = %PUBLIC_IP% | ||
8 | # Public network where the monitor is connected to, i.e, 128.224.0.0/16 | ||
9 | public network = %PUBLIC_DOMAIN% | ||
10 | # For version 0.55 and beyond, you must explicitly enable | ||
11 | # or disable authentication with "auth" entries in [global]. | ||
12 | auth cluster required = cephx | ||
13 | auth service required = cephx | ||
14 | auth client required = cephx | ||
15 | osd journal size = 1024 | ||
16 | |||
17 | # Uncomment the following line if you are mounting with ext4 | ||
18 | # filestore xattr use omap = true | ||
19 | |||
20 | # Number of replicas of objects. Write an object 2 times. | ||
21 | # Cluster cannot reach an active + clean state until there's enough OSDs | ||
22 | # to handle the number of copies of an object. In this case, it requires | ||
23 | # at least 2 OSDs | ||
24 | osd pool default size = 2 | ||
25 | |||
26 | # Allow writing one copy in a degraded state. | ||
27 | osd pool default min size = 1 | ||
28 | |||
29 | # Ensure you have a realistic number of placement groups. We recommend | ||
30 | # approximately 100 per OSD. E.g., total number of OSDs multiplied by 100 | ||
31 | # divided by the number of replicas (i.e., osd pool default size). So for | ||
32 | # 10 OSDs and osd pool default size = 2, we'd recommend approximately | ||
33 | # (100 * 10) / 2 = 500. | ||
34 | osd pool default pg num = 500 | ||
35 | osd pool default pgp num = 500 | ||
36 | osd crush chooseleaf type = 1 | ||
37 | |||
38 | [osd] | ||
39 | osd mkfs type = xfs | ||
40 | osd mkfs options xfs = "-f" | ||
41 | osd mount options xfs = "rw,noatime,inode64,logbufs=8,logbsize=256k" | ||
42 | |||
43 | # All port numbers below are not hard-coded, but expected by ceph, so please | ||
44 | # do not change the numbers. | ||
45 | [mon.node1] | ||
46 | host = node1 | ||
47 | mon addr = %PUBLIC_IP%:6789 | ||
48 | |||
49 | [osd.0] | ||
50 | host = node1 | ||
51 | public addr = %PUBLIC_IP%:6800 | ||
52 | cluster addr = %PRIVATE_IP%:6800 | ||
53 | devs = /dev/sda1 | ||
54 | |||
55 | [osd.1] | ||
56 | host = node1 | ||
57 | public addr = %PUBLIC_IP%:6801 | ||
58 | cluster addr = %PRIVATE_IP%:6801 | ||
59 | devs = /dev/sda2 | ||
60 | |||
61 | [osd.2] | ||
62 | host = node1 | ||
63 | public addr = %PUBLIC_IP%:6802 | ||
64 | cluster addr = %PRIVATE_IP%:6802 | ||
65 | devs = /dev/sda3 | ||
66 | |||
67 | [mds.a] | ||
68 | host = node1 | ||
69 | devs = /dev/sda4 | ||
70 | |||
diff --git a/recipes-extended/ceph/ceph_13.2.1.bb b/recipes-extended/ceph/ceph_13.2.2.bb index e89bbebc..6c6da41b 100644 --- a/recipes-extended/ceph/ceph_13.2.1.bb +++ b/recipes-extended/ceph/ceph_13.2.2.bb | |||
@@ -1,29 +1,36 @@ | |||
1 | SUMMARY = "User space components of the Ceph file system" | 1 | SUMMARY = "User space components of the Ceph file system" |
2 | LICENSE = "LGPLv2.1 & GPLv2 & Unknown & Apache-2.0 & MIT" | 2 | LICENSE = "LGPLv2.1 & GPLv2 & Apache-2.0 & MIT" |
3 | LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \ | 3 | LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \ |
4 | file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 4 | file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
5 | file://COPYING;md5=92d301c8fccd296f2221a68a8dd53828 \ | 5 | file://COPYING;md5=92d301c8fccd296f2221a68a8dd53828 \ |
6 | " | 6 | " |
7 | 7 | inherit cmake pythonnative python-dir systemd | |
8 | # Disable python pybind support for ceph temporary, when corss compiling pybind, | 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. | 9 | # pybind mix cmake and python setup environment, would case a lot of errors. |
10 | 10 | ||
11 | SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ | 11 | SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ |
12 | file://0001-Correct-the-path-to-find-version.h-in-rocksdb.patch \ | 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 \ | 13 | file://0001-zstd-fix-error-for-cross-compile.patch \ |
14 | file://0001-ceph-add-pybind-support-in-OE.patch \ | ||
15 | file://ceph.conf \ | ||
15 | " | 16 | " |
16 | SRC_URI[md5sum] = "4b0ee225e153fbb2515fa3f8a3666d17" | 17 | SRC_URI[md5sum] = "ce118be451dcb6b89e9e0a45057827dd" |
17 | SRC_URI[sha256sum] = "32086294d2007fdf64f85fcd919de2f092eeaa897bd8dc7c01e005e14516903c" | 18 | SRC_URI[sha256sum] = "f3a61db4c90e00c38a2dac7239b956ec367ef56f601e07335ed3011f931d8840" |
18 | 19 | ||
19 | DEPENDS = "boost bzip2 curl expat gperf-native \ | 20 | DEPENDS = "boost bzip2 curl expat gperf-native \ |
20 | keyutils libaio libibverbs lz4 \ | 21 | keyutils libaio libibverbs lz4 \ |
21 | nspr nss \ | 22 | nspr nss \ |
22 | oath openldap openssl \ | 23 | oath openldap openssl \ |
23 | python rocksdb snappy udev \ | 24 | python python-cython-native rocksdb snappy udev \ |
24 | valgrind xfsprogs zlib \ | 25 | valgrind xfsprogs zlib \ |
25 | " | 26 | " |
26 | inherit cmake pythonnative python-dir | 27 | SYSTEMD_SERVICE_${PN} = "ceph-radosgw@.service \ |
28 | ceph-mon@.service \ | ||
29 | ceph-mds@.service \ | ||
30 | ceph-disk@.service \ | ||
31 | ceph-osd@.service \ | ||
32 | ceph.target \ | ||
33 | " | ||
27 | OECMAKE_GENERATOR = "Unix Makefiles" | 34 | OECMAKE_GENERATOR = "Unix Makefiles" |
28 | 35 | ||
29 | EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ | 36 | EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ |
@@ -41,23 +48,43 @@ EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ | |||
41 | 48 | ||
42 | do_configure_prepend () { | 49 | do_configure_prepend () { |
43 | echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake | 50 | echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake |
51 | echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake | ||
52 | echo "set( PYTHON_SITEPACKAGES_DIR \"${PYTHON_SITEPACKAGES_DIR}\" )" >> ${WORKDIR}/toolchain.cmake | ||
44 | } | 53 | } |
45 | 54 | ||
46 | do_install_append () { | 55 | do_install_append () { |
47 | sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph | 56 | sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph |
57 | install -d ${D}${sysconfdir}/ceph | ||
58 | install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/ | ||
59 | install -d ${D}${systemd_unitdir}/system | ||
60 | mv ${D}${libexecdir}/systemd/system/ceph-radosgw@.service ${D}${systemd_unitdir}/system/ceph-radosgw@.service | ||
61 | mv ${D}${libexecdir}/systemd/system/ceph-mon@.service ${D}${systemd_unitdir}/system/ceph-mon@.service | ||
62 | mv ${D}${libexecdir}/systemd/system/ceph-mds@.service ${D}${systemd_unitdir}/system/ceph-mds@.service | ||
63 | mv ${D}${libexecdir}/systemd/system/ceph-disk@.service ${D}${systemd_unitdir}/system/ceph-disk@.service | ||
64 | mv ${D}${libexecdir}/systemd/system/ceph-osd@.service ${D}${systemd_unitdir}/system/ceph-osd@.service | ||
65 | mv ${D}${libexecdir}/systemd/system/ceph.target ${D}${systemd_unitdir}/system/ceph.target | ||
48 | } | 66 | } |
49 | 67 | ||
50 | FILES_${PN} += "\ | 68 | FILES_${PN} += "\ |
51 | ${libdir}/rados-classes/*.so.* \ | 69 | ${libdir}/rados-classes/*.so.* \ |
52 | " | 70 | " |
53 | |||
54 | FILES_${PN}-dev += "\ | 71 | FILES_${PN}-dev += "\ |
55 | ${libdir}/ceph/compressor/*.so \ | 72 | ${libdir}/ceph/compressor/*.so \ |
56 | ${libdir}/rados-classes/*.so \ | 73 | ${libdir}/rados-classes/*.so \ |
57 | ${libdir}/ceph/*.so \ | 74 | ${libdir}/ceph/*.so \ |
58 | " | 75 | " |
59 | 76 | FILES_${PN}-python = "\ | |
77 | ${PYTHON_SITEPACKAGES_DIR}/* \ | ||
78 | " | ||
60 | RDEPENDS_${PN} += "\ | 79 | RDEPENDS_${PN} += "\ |
61 | python \ | 80 | python \ |
81 | python-misc \ | ||
82 | python-modules \ | ||
83 | python-prettytable \ | ||
84 | ${PN}-python \ | ||
62 | " | 85 | " |
63 | COMPATIBLE_HOST = "(x86_64).*" | 86 | COMPATIBLE_HOST = "(x86_64).*" |
87 | PACKAGES += " \ | ||
88 | ${PN}-python \ | ||
89 | " | ||
90 | INSANE_SKIP_${PN}-python += "ldflags" | ||