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