diff options
Diffstat (limited to 'recipes-extended/ceph/ceph_15.2.9.bb')
-rw-r--r-- | recipes-extended/ceph/ceph_15.2.9.bb | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/recipes-extended/ceph/ceph_15.2.9.bb b/recipes-extended/ceph/ceph_15.2.9.bb new file mode 100644 index 00000000..0d821f0b --- /dev/null +++ b/recipes-extended/ceph/ceph_15.2.9.bb | |||
@@ -0,0 +1,145 @@ | |||
1 | SUMMARY = "User space components of the Ceph file system" | ||
2 | LICENSE = "LGPLv2.1 & GPLv2 & Apache-2.0 & MIT" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \ | ||
4 | file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
5 | file://COPYING;md5=4eb012c221c5fd4b760029a2981a6754 \ | ||
6 | " | ||
7 | inherit cmake python3native python3-dir systemd | ||
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 | |||
11 | SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ | ||
12 | file://0001-ceph-fix-build-errors-for-cross-compile.patch \ | ||
13 | file://0001-fix-host-library-paths-were-used.patch \ | ||
14 | file://ceph.conf \ | ||
15 | file://0001-add-missing-include-for-atomic-bool.patch \ | ||
16 | file://0001-cmake-add-support-for-python3.9.patch \ | ||
17 | " | ||
18 | |||
19 | SRC_URI[md5sum] = "5a949b91199efe130bfe2e57f200eacd" | ||
20 | SRC_URI[sha256sum] = "ea7fa2be68b3570c5c3aa02774dca27de20b6f20a8498f65e5c4ef375a209ace" | ||
21 | SRC_URI[sha1sum] = "0503649d7c7d9268cb61b03bbe839106988f87d7" | ||
22 | SRC_URI[sha384sum] = "57208c126ea8e640c3979073fd64ce58606f17b4b7ed2e005b0792bdfd51b13391af325658d0f68f961f94175d93e891" | ||
23 | SRC_URI[sha512sum] = "1f55b0a13bf06df782831d0c9d5f8617c22442ab97fb186e6ccb08183e02bf1756caf8633fa6b1cf156c3fb7b1bdff90a60a1249adfad0b9450036e2329bf8ff" | ||
24 | |||
25 | DEPENDS = "boost bzip2 curl expat gperf-native \ | ||
26 | keyutils libaio libibverbs lz4 \ | ||
27 | nspr nss \ | ||
28 | oath openldap openssl \ | ||
29 | python3 python3-cython-native rabbitmq-c rocksdb snappy udev \ | ||
30 | valgrind xfsprogs zlib \ | ||
31 | " | ||
32 | SYSTEMD_SERVICE_${PN} = " \ | ||
33 | ceph-radosgw@.service \ | ||
34 | ceph-radosgw.target \ | ||
35 | ceph-mon@.service \ | ||
36 | ceph-mon.target \ | ||
37 | ceph-mds@.service \ | ||
38 | ceph-mds.target \ | ||
39 | ceph-osd@.service \ | ||
40 | ceph-osd.target \ | ||
41 | ceph.target \ | ||
42 | ceph-rbd-mirror@.service \ | ||
43 | ceph-rbd-mirror.target \ | ||
44 | ceph-volume@.service \ | ||
45 | ceph-mgr@.service \ | ||
46 | ceph-mgr.target \ | ||
47 | ceph-crash.service \ | ||
48 | rbdmap.service \ | ||
49 | ceph-immutable-object-cache@.service \ | ||
50 | ceph-immutable-object-cache.target \ | ||
51 | " | ||
52 | OECMAKE_GENERATOR = "Unix Makefiles" | ||
53 | |||
54 | EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \ | ||
55 | -DWITH_FUSE=OFF \ | ||
56 | -DWITH_SPDK=OFF \ | ||
57 | -DWITH_LEVELDB=OFF \ | ||
58 | -DWITH_LTTNG=OFF \ | ||
59 | -DWITH_BABELTRACE=OFF \ | ||
60 | -DWITH_TESTS=OFF \ | ||
61 | -DWITH_MGR=OFF \ | ||
62 | -DWITH_MGR_DASHBOARD_FRONTEND=OFF \ | ||
63 | -DWITH_SYSTEM_BOOST=ON \ | ||
64 | -DWITH_SYSTEM_ROCKSDB=ON \ | ||
65 | -DWITH_RDMA=OFF \ | ||
66 | -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ | ||
67 | -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 \ | ||
68 | -DPython3_EXECUTABLE=${PYTHON} \ | ||
69 | -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ | ||
70 | -DWITH_REENTRANT_STRSIGNAL=ON \ | ||
71 | " | ||
72 | |||
73 | export STAGING_DIR_HOST | ||
74 | |||
75 | do_configure_prepend () { | ||
76 | echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake | ||
77 | echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake | ||
78 | echo "set( PYTHON_SITEPACKAGES_DIR \"${PYTHON_SITEPACKAGES_DIR}\" )" >> ${WORKDIR}/toolchain.cmake | ||
79 | } | ||
80 | |||
81 | do_install_append () { | ||
82 | sed -i -e 's:^#!/usr/bin/python$:&3:' \ | ||
83 | -e 's:${WORKDIR}.*python3:${bindir}/python3:' \ | ||
84 | ${D}${bindir}/ceph ${D}${bindir}/ceph-crash \ | ||
85 | ${D}${bindir}/ceph-volume ${D}${bindir}/ceph-volume-systemd | ||
86 | find ${D} -name SOURCES.txt | xargs sed -i -e 's:${WORKDIR}::' | ||
87 | install -d ${D}${sysconfdir}/ceph | ||
88 | install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/ | ||
89 | install -d ${D}${systemd_unitdir} | ||
90 | mv ${D}${libexecdir}/systemd/system ${D}${systemd_unitdir} | ||
91 | mv ${D}${libexecdir}/ceph/ceph-osd-prestart.sh ${D}${libdir}/ceph | ||
92 | mv ${D}${libexecdir}/ceph/ceph_common.sh ${D}${libdir}/ceph | ||
93 | # WITH_FUSE is set to OFF, remove ceph-fuse related units | ||
94 | rm ${D}${systemd_unitdir}/system/ceph-fuse.target ${D}${systemd_unitdir}/system/ceph-fuse@.service | ||
95 | } | ||
96 | |||
97 | do_install_append_class-target () { | ||
98 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
99 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
100 | echo "d /var/lib/ceph/crash/posted 0755 root root - -" > ${D}${sysconfdir}/tmpfiles.d/ceph-placeholder.conf | ||
101 | fi | ||
102 | |||
103 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
104 | install -d ${D}${sysconfdir}/default/volatiles | ||
105 | echo "d root root 0755 /var/lib/ceph/crash/posted none" > ${D}${sysconfdir}/default/volatiles/99_ceph-placeholder | ||
106 | fi | ||
107 | } | ||
108 | |||
109 | pkg_postinst_${PN}() { | ||
110 | if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then | ||
111 | ${sysconfdir}/init.d/populate-volatile.sh update | ||
112 | fi | ||
113 | } | ||
114 | |||
115 | FILES_${PN} += "\ | ||
116 | ${libdir}/rados-classes/*.so.* \ | ||
117 | ${libdir}/ceph/compressor/*.so \ | ||
118 | ${libdir}/rados-classes/*.so \ | ||
119 | ${libdir}/ceph/*.so \ | ||
120 | " | ||
121 | |||
122 | FILES_${PN} += " \ | ||
123 | /etc/tmpfiles.d/ceph-placeholder.conf \ | ||
124 | /etc/default/volatiles/99_ceph-placeholder \ | ||
125 | " | ||
126 | |||
127 | FILES_${PN}-python = "\ | ||
128 | ${PYTHON_SITEPACKAGES_DIR}/* \ | ||
129 | " | ||
130 | RDEPENDS_${PN} += "\ | ||
131 | python3-core \ | ||
132 | python3-misc \ | ||
133 | python3-modules \ | ||
134 | python3-prettytable \ | ||
135 | ${PN}-python \ | ||
136 | " | ||
137 | COMPATIBLE_HOST = "(x86_64).*" | ||
138 | PACKAGES += " \ | ||
139 | ${PN}-python \ | ||
140 | " | ||
141 | INSANE_SKIP_${PN}-python += "ldflags" | ||
142 | INSANE_SKIP_${PN} += "dev-so" | ||
143 | CCACHE_DISABLE = "1" | ||
144 | |||
145 | CVE_PRODUCT = "ceph ceph_storage ceph_storage_mon ceph_storage_osd" | ||