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