1 |
commit: a3b86c8057583ba85cb568b61795bd4a4ee37227 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 30 04:55:03 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 30 04:55:04 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3b86c80 |
7 |
|
8 |
sys-cluster/ceph: fix build w/ boost 1.81 |
9 |
|
10 |
Thanks-to: Michael Uleysky <uleysky <AT> gmail.com> |
11 |
Closes: https://bugs.gentoo.org/887481 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
sys-cluster/ceph/ceph-17.2.5-r2.ebuild | 477 +++++++++++++++++++++ |
15 |
.../ceph/files/ceph-17.2.5-boost-1.81.patch | 49 +++ |
16 |
2 files changed, 526 insertions(+) |
17 |
|
18 |
diff --git a/sys-cluster/ceph/ceph-17.2.5-r2.ebuild b/sys-cluster/ceph/ceph-17.2.5-r2.ebuild |
19 |
new file mode 100644 |
20 |
index 000000000000..1401c2d28548 |
21 |
--- /dev/null |
22 |
+++ b/sys-cluster/ceph/ceph-17.2.5-r2.ebuild |
23 |
@@ -0,0 +1,477 @@ |
24 |
+# Copyright 1999-2022 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=8 |
28 |
+ |
29 |
+PYTHON_COMPAT=( python3_{8..10} ) |
30 |
+LUA_COMPAT=( lua5-{3..4} ) |
31 |
+ |
32 |
+inherit check-reqs bash-completion-r1 cmake flag-o-matic lua-single \ |
33 |
+ python-r1 udev readme.gentoo-r1 toolchain-funcs systemd tmpfiles |
34 |
+ |
35 |
+SRC_URI=" |
36 |
+ https://download.ceph.com/tarballs/${P}.tar.gz |
37 |
+ parquet? ( https://github.com/xtensor-stack/xsimd/archive/aeec9c872c8b475dedd7781336710f2dd2666cb2.tar.gz -> ceph-xsimd-${PV}.tar.gz ) |
38 |
+" |
39 |
+KEYWORDS="~amd64 ~arm64" |
40 |
+ |
41 |
+DESCRIPTION="Ceph distributed filesystem" |
42 |
+HOMEPAGE="https://ceph.com/" |
43 |
+ |
44 |
+LICENSE="Apache-2.0 LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ LGPL-2.1 LGPL-3 GPL-3 BSD Boost-1.0 MIT public-domain" |
45 |
+SLOT="0" |
46 |
+ |
47 |
+CPU_FLAGS_X86=(avx2 avx512f pclmul sse{,2,3,4_1,4_2} ssse3) |
48 |
+ |
49 |
+IUSE=" |
50 |
+ babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana |
51 |
+ jemalloc jaeger kafka kerberos ldap lttng +mgr +parquet pmdk rabbitmq |
52 |
+ +radosgw rbd-rwl rbd-ssd rdma rgw-lua +ssl spdk +sqlite +system-boost |
53 |
+ systemd +tcmalloc test +uring xfs zbd zfs |
54 |
+" |
55 |
+ |
56 |
+IUSE+="$(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})" |
57 |
+ |
58 |
+DEPEND=" |
59 |
+ ${LUA_DEPS} |
60 |
+ ${PYTHON_DEPS} |
61 |
+ acct-group/ceph |
62 |
+ acct-user/ceph |
63 |
+ virtual/libudev:= |
64 |
+ app-arch/bzip2:= |
65 |
+ app-arch/lz4:= |
66 |
+ app-arch/snappy:= |
67 |
+ >=app-arch/snappy-1.1.9-r1 |
68 |
+ app-arch/zstd:= |
69 |
+ app-shells/bash:0 |
70 |
+ app-misc/jq:= |
71 |
+ dev-libs/crypto++:= |
72 |
+ dev-cpp/gflags:= |
73 |
+ dev-lang/jsonnet:= |
74 |
+ <dev-libs/leveldb-1.23:=[snappy,tcmalloc(-)?] |
75 |
+ dev-libs/libaio:= |
76 |
+ >=dev-libs/libfmt-6.2.1:= |
77 |
+ <dev-libs/libfmt-9:= |
78 |
+ dev-libs/libnl:3= |
79 |
+ dev-libs/libxml2:= |
80 |
+ dev-libs/libevent:= |
81 |
+ dev-libs/libutf8proc:= |
82 |
+ dev-libs/nss:= |
83 |
+ dev-libs/openssl:= |
84 |
+ <dev-libs/rocksdb-6.15:= |
85 |
+ dev-libs/thrift:= |
86 |
+ dev-libs/xmlsec:=[openssl] |
87 |
+ dev-cpp/yaml-cpp:= |
88 |
+ dev-python/natsort[${PYTHON_USEDEP}] |
89 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
90 |
+ net-dns/c-ares:= |
91 |
+ net-libs/gnutls:= |
92 |
+ sys-auth/oath-toolkit:= |
93 |
+ sys-apps/coreutils |
94 |
+ sys-apps/hwloc:= |
95 |
+ sys-apps/keyutils:= |
96 |
+ sys-apps/util-linux:= |
97 |
+ sys-libs/libcap-ng:= |
98 |
+ sys-libs/ncurses:0= |
99 |
+ sys-libs/zlib:= |
100 |
+ sys-process/numactl:= |
101 |
+ virtual/libcrypt:= |
102 |
+ x11-libs/libpciaccess:= |
103 |
+ babeltrace? ( dev-util/babeltrace ) |
104 |
+ fuse? ( sys-fs/fuse:3= ) |
105 |
+ jemalloc? ( dev-libs/jemalloc:= ) |
106 |
+ !jemalloc? ( >=dev-util/google-perftools-2.6.1:= ) |
107 |
+ jaeger? ( |
108 |
+ dev-cpp/nlohmann_json:= |
109 |
+ dev-cpp/opentelemetry-cpp:=[jaeger] |
110 |
+ ) |
111 |
+ kafka? ( dev-libs/librdkafka:= ) |
112 |
+ kerberos? ( virtual/krb5 ) |
113 |
+ ldap? ( net-nds/openldap:= ) |
114 |
+ lttng? ( dev-util/lttng-ust:= ) |
115 |
+ parquet? ( dev-libs/re2:= ) |
116 |
+ pmdk? ( >=dev-libs/pmdk-1.10.0:= ) |
117 |
+ rabbitmq? ( net-libs/rabbitmq-c:= ) |
118 |
+ radosgw? ( |
119 |
+ dev-libs/icu:= |
120 |
+ dev-libs/expat:= |
121 |
+ net-misc/curl:=[curl_ssl_openssl] |
122 |
+ ) |
123 |
+ rbd-rwl? ( dev-libs/pmdk:= ) |
124 |
+ rdma? ( sys-cluster/rdma-core:= ) |
125 |
+ spdk? ( dev-util/cunit ) |
126 |
+ sqlite? ( dev-db/sqlite:= ) |
127 |
+ system-boost? ( dev-libs/boost:=[context,python,${PYTHON_USEDEP},zlib] ) |
128 |
+ uring? ( sys-libs/liburing:= ) |
129 |
+ xfs? ( sys-fs/xfsprogs:= ) |
130 |
+ zbd? ( sys-block/libzbd:= ) |
131 |
+ zfs? ( sys-fs/zfs:= ) |
132 |
+" |
133 |
+BDEPEND=" |
134 |
+ amd64? ( dev-lang/nasm ) |
135 |
+ x86? ( dev-lang/yasm ) |
136 |
+ app-arch/cpio |
137 |
+ >=dev-util/cmake-3.5.0 |
138 |
+ dev-python/cython[${PYTHON_USEDEP}] |
139 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
140 |
+ dev-python/sphinx |
141 |
+ dev-util/gperf |
142 |
+ dev-util/ragel |
143 |
+ dev-util/valgrind |
144 |
+ sys-apps/coreutils |
145 |
+ sys-apps/grep |
146 |
+ sys-apps/util-linux |
147 |
+ sys-apps/which |
148 |
+ sys-devel/bc |
149 |
+ sys-devel/patch |
150 |
+ virtual/pkgconfig |
151 |
+ jaeger? ( |
152 |
+ sys-devel/bison |
153 |
+ sys-devel/flex |
154 |
+ ) |
155 |
+ test? ( |
156 |
+ dev-util/cunit |
157 |
+ dev-python/coverage[${PYTHON_USEDEP}] |
158 |
+ dev-python/virtualenv[${PYTHON_USEDEP}] |
159 |
+ dev-python/requests-mock[${PYTHON_USEDEP}] |
160 |
+ sys-apps/grep[pcre] |
161 |
+ sys-fs/btrfs-progs |
162 |
+ ) |
163 |
+" |
164 |
+RDEPEND=" |
165 |
+ ${DEPEND} |
166 |
+ app-admin/sudo |
167 |
+ net-misc/socat |
168 |
+ sys-apps/gptfdisk |
169 |
+ sys-apps/nvme-cli |
170 |
+ >=sys-apps/smartmontools-7.0 |
171 |
+ sys-block/parted |
172 |
+ sys-fs/cryptsetup |
173 |
+ sys-fs/lsscsi |
174 |
+ sys-fs/lvm2[lvm] |
175 |
+ app-alternatives/awk |
176 |
+ dev-python/bcrypt[${PYTHON_USEDEP}] |
177 |
+ dev-python/cherrypy[${PYTHON_USEDEP}] |
178 |
+ dev-python/python-dateutil[${PYTHON_USEDEP}] |
179 |
+ dev-python/flask[${PYTHON_USEDEP}] |
180 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
181 |
+ dev-python/pecan[${PYTHON_USEDEP}] |
182 |
+ dev-python/prettytable[${PYTHON_USEDEP}] |
183 |
+ dev-python/pyopenssl[${PYTHON_USEDEP}] |
184 |
+ dev-python/requests[${PYTHON_USEDEP}] |
185 |
+ dev-python/werkzeug[${PYTHON_USEDEP}] |
186 |
+ mgr? ( |
187 |
+ dev-python/jsonpatch[${PYTHON_USEDEP}] |
188 |
+ dev-python/more-itertools[${PYTHON_USEDEP}] |
189 |
+ dev-python/numpy[${PYTHON_USEDEP}] |
190 |
+ dev-python/pyjwt[${PYTHON_USEDEP}] |
191 |
+ dev-python/routes[${PYTHON_USEDEP}] |
192 |
+ diskprediction? ( |
193 |
+ >=dev-python/scipy-1.4.0[${PYTHON_USEDEP}] |
194 |
+ ) |
195 |
+ sci-libs/scikit-learn[${PYTHON_USEDEP}] |
196 |
+ dev-python/six[${PYTHON_USEDEP}] |
197 |
+ ) |
198 |
+" |
199 |
+REQUIRED_USE=" |
200 |
+ ${PYTHON_REQUIRED_USE} |
201 |
+ ${LUA_REQUIRED_USE} |
202 |
+ ?? ( jemalloc tcmalloc ) |
203 |
+ diskprediction? ( mgr ) |
204 |
+ kafka? ( radosgw ) |
205 |
+ mgr? ( cephfs ) |
206 |
+ rabbitmq? ( radosgw ) |
207 |
+ rgw-lua? ( radosgw ) |
208 |
+" |
209 |
+ |
210 |
+RESTRICT=" |
211 |
+ !test? ( test ) |
212 |
+" |
213 |
+ |
214 |
+# tests need root access, and network access |
215 |
+RESTRICT+="test" |
216 |
+ |
217 |
+# false positives unless all USE flags are on |
218 |
+CMAKE_WARN_UNUSED_CLI=no |
219 |
+ |
220 |
+PATCHES=( |
221 |
+ "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch" |
222 |
+ "${FILESDIR}/ceph-14.2.0-cflags.patch" |
223 |
+ "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch" |
224 |
+ "${FILESDIR}/ceph-16.2.2-cflags.patch" |
225 |
+ "${FILESDIR}/ceph-17.2.1-no-virtualenvs.patch" |
226 |
+ "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch" |
227 |
+ "${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch" |
228 |
+ "${FILESDIR}/ceph-16.2.0-rocksdb-cmake.patch" |
229 |
+ "${FILESDIR}/ceph-16.2.0-spdk-tinfo.patch" |
230 |
+ "${FILESDIR}/ceph-16.2.0-jaeger-system-boost.patch" |
231 |
+ "${FILESDIR}/ceph-16.2.0-liburing.patch" |
232 |
+ "${FILESDIR}/ceph-17.2.0-cyclic-deps.patch" |
233 |
+ "${FILESDIR}/ceph-17.2.0-pybind-boost-1.74.patch" |
234 |
+ "${FILESDIR}/ceph-17.2.0-findre2.patch" |
235 |
+ "${FILESDIR}/ceph-17.2.0-install-dbstore.patch" |
236 |
+ "${FILESDIR}/ceph-17.2.0-deprecated-boost.patch" |
237 |
+ "${FILESDIR}/ceph-17.2.0-system-opentelemetry.patch" |
238 |
+ "${FILESDIR}/ceph-17.2.0-fuse3.patch" |
239 |
+ "${FILESDIR}/ceph-17.2.0-osd_class_dir.patch" |
240 |
+ "${FILESDIR}/ceph-17.2.0-gcc12-header.patch" |
241 |
+ "${FILESDIR}/ceph-17.2.3-flags.patch" |
242 |
+ "${FILESDIR}/ceph-17.2.4-cyclic-deps.patch" |
243 |
+ # https://bugs.gentoo.org/866165 |
244 |
+ "${FILESDIR}/ceph-17.2.5-suppress-cmake-warning.patch" |
245 |
+ "${FILESDIR}/ceph-17.2.5-gcc13.patch" |
246 |
+ "${FILESDIR}/ceph-17.2.5-boost-1.81.patch" |
247 |
+) |
248 |
+ |
249 |
+check-reqs_export_vars() { |
250 |
+ CHECKREQS_DISK_BUILD="6G" |
251 |
+ |
252 |
+ if use system-boost; then |
253 |
+ CHECKREQS_DISK_USR="350M" |
254 |
+ else |
255 |
+ CHECKREQS_DISK_USR="510M" |
256 |
+ fi |
257 |
+ |
258 |
+ export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR |
259 |
+} |
260 |
+ |
261 |
+pkg_pretend() { |
262 |
+ check-reqs_export_vars |
263 |
+ check-reqs_pkg_pretend |
264 |
+} |
265 |
+ |
266 |
+pkg_setup() { |
267 |
+ python_setup |
268 |
+ lua_setup |
269 |
+ check-reqs_export_vars |
270 |
+ check-reqs_pkg_setup |
271 |
+} |
272 |
+ |
273 |
+src_prepare() { |
274 |
+ cmake_src_prepare |
275 |
+ |
276 |
+ if use system-boost; then |
277 |
+ find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \ |
278 |
+ | xargs --null sed -r \ |
279 |
+ -e 's|Boost::|boost_|g' \ |
280 |
+ -e 's|Boost_|boost_|g' \ |
281 |
+ -e 's|[Bb]oost_boost|boost_system|g' \ |
282 |
+ -i || die |
283 |
+ fi |
284 |
+ |
285 |
+ if ! use systemd; then |
286 |
+ find "${S}"/src/ceph-volume/ceph_volume -name '*.py' -print0 \ |
287 |
+ | xargs --null sed \ |
288 |
+ -e '/^from ceph_volume.systemd import systemctl/ d' \ |
289 |
+ -i || die |
290 |
+ fi |
291 |
+ |
292 |
+ sed -r -e "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \ |
293 |
+ -i src/bash_completion/CMakeLists.txt || die |
294 |
+ |
295 |
+ sed -e "s:objdump -p:$(tc-getOBJDUMP) -p:" -i CMakeLists.txt || die |
296 |
+ |
297 |
+ # force lua version to use selected version |
298 |
+ local lua_version |
299 |
+ lua_version=$(ver_cut 1-2 $(lua_get_version)) |
300 |
+ sed "s:find_package(Lua [0-9][.][0-9] REQUIRED):find_package(Lua ${lua_version} EXACT REQUIRED):" \ |
301 |
+ -i src/CMakeLists.txt |
302 |
+ |
303 |
+ if use spdk; then |
304 |
+ # https://bugs.gentoo.org/871942 |
305 |
+ sed -i 's/[#]ifndef HAVE_ARC4RANDOM/#if 0/' src/spdk/lib/iscsi/iscsi.c || die |
306 |
+ fi |
307 |
+ |
308 |
+ # remove tests that need root access |
309 |
+ rm src/test/cli/ceph-authtool/cap*.t || die |
310 |
+} |
311 |
+ |
312 |
+ceph_src_configure() { |
313 |
+ local mycmakeargs=( |
314 |
+ -DWITH_BABELTRACE:BOOL=$(usex babeltrace) |
315 |
+ -DWITH_BLUESTORE_PMEM:BOOL=$(usex pmdk) |
316 |
+ -DWITH_CEPHFS:BOOL=$(usex cephfs) |
317 |
+ -DWITH_CEPHFS_SHELL:BOOL=$(usex cephfs) |
318 |
+ -DWITH_DPDK:BOOL=$(usex dpdk) |
319 |
+ -DWITH_SPDK:BOOL=$(usex spdk) |
320 |
+ -DWITH_FUSE:BOOL=$(usex fuse) |
321 |
+ -DWITH_LTTNG:BOOL=$(usex lttng) |
322 |
+ -DWITH_GSSAPI:BOOL=$(usex kerberos) |
323 |
+ -DWITH_GRAFANA:BOOL=$(usex grafana) |
324 |
+ -DWITH_MGR:BOOL=$(usex mgr) |
325 |
+ -DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF |
326 |
+ -DWITH_OPENLDAP:BOOL=$(usex ldap) |
327 |
+ -DWITH_PYTHON3:STRING=3 |
328 |
+ -DWITH_RADOSGW:BOOL=$(usex radosgw) |
329 |
+ -DWITH_RADOSGW_AMQP_ENDPOINT:BOOL=$(usex rabbitmq) |
330 |
+ -DWITH_RADOSGW_KAFKA_ENDPOINT:BOOL=$(usex kafka) |
331 |
+ -DWITH_RADOSGW_LUA_PACKAGES:BOOL=$(usex rgw-lua "$(usex radosgw)" "NO") |
332 |
+ -DWITH_RBD_RWL:BOOL=$(usex rbd-rwl) |
333 |
+ -DWITH_RBD_SSD_CACHE:BOOL=$(usex rbd-ssd) |
334 |
+ -DWITH_SYSTEMD:BOOL=$(usex systemd) |
335 |
+ -DWITH_TESTS:BOOL=$(usex test) |
336 |
+ -DWITH_LIBURING:BOOL=$(usex uring) |
337 |
+ -DWITH_SYSTEM_LIBURING:BOOL=$(usex uring) |
338 |
+ -DWITH_LIBCEPHSQLITE:BOOL=$(usex sqlite) |
339 |
+ -DWITH_XFS:BOOL=$(usex xfs) |
340 |
+ -DWITH_ZBD:BOOL=$(usex zbd) |
341 |
+ -DWITH_ZFS:BOOL=$(usex zfs) |
342 |
+ -DENABLE_SHARED:BOOL=ON |
343 |
+ -DALLOCATOR:STRING=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')") |
344 |
+ -DWITH_SYSTEM_PMDK:BOOL=$(usex pmdk 'YES' "$(usex rbd-rwl '')") |
345 |
+ -DWITH_SYSTEM_BOOST:BOOL=$(usex system-boost) |
346 |
+ -DWITH_SYSTEM_ROCKSDB:BOOL=ON |
347 |
+ -DWITH_SYSTEM_ZSTD:BOOL=ON |
348 |
+ -DWITH_RDMA:BOOL=$(usex rdma) |
349 |
+ -DCMAKE_INSTALL_DOCDIR:PATH="${EPREFIX}/usr/share/doc/${PN}-${PVR}" |
350 |
+ -DCMAKE_INSTALL_SYSCONFDIR:PATH="${EPREFIX}/etc" |
351 |
+ -Wno-dev |
352 |
+ ) |
353 |
+ |
354 |
+ # this breaks when re-configuring for python impl |
355 |
+ if [[ ${EBUILD_PHASE} == configure ]]; then |
356 |
+ mycmakeargs+=( |
357 |
+ -DWITH_JAEGER:BOOL=$(usex jaeger) |
358 |
+ -DWITH_RADOSGW_SELECT_PARQUET:BOOL=$(usex parquet) |
359 |
+ ) |
360 |
+ else |
361 |
+ mycmakeargs+=( |
362 |
+ -DWITH_RADOSGW_SELECT_PARQUET:BOOL=OFF |
363 |
+ -DWITH_JAEGER:BOOL=OFF |
364 |
+ # don't want to warn about unused CLI when reconfiguring for python |
365 |
+ -DCMAKE_WARN_UNUSED_CLI:BOOL=OFF |
366 |
+ ) |
367 |
+ fi |
368 |
+ |
369 |
+ # conditionally used cmake args |
370 |
+ use test && mycmakearts+=( -DWITH_SYSTEM_GTEST:BOOL=$(usex test) ) |
371 |
+ use systemd && mycmakeargs+=( -DSYSTEMD_SYSTEM_UNIT_DIR:PATH=$(systemd_get_systemunitdir) ) |
372 |
+ |
373 |
+ if use amd64 || use x86; then |
374 |
+ local flag |
375 |
+ for flag in "${CPU_FLAGS_X86[@]}"; do |
376 |
+ case "${flag}" in |
377 |
+ avx*) |
378 |
+ local var=${flag%f} |
379 |
+ mycmakeargs+=( |
380 |
+ "-DHAVE_NASM_X64_${var^^}:BOOL=$(usex cpu_flags_x86_${flag})" |
381 |
+ ) |
382 |
+ ;; |
383 |
+ *) mycmakeargs+=( |
384 |
+ "-DHAVE_INTEL_${flag^^}:BOOL=$(usex cpu_flags_x86_${flag})" |
385 |
+ );; |
386 |
+ esac |
387 |
+ done |
388 |
+ fi |
389 |
+ |
390 |
+ # needed for >=glibc-2.32 |
391 |
+ has_version '>=sys-libs/glibc-2.32' && mycmakeargs+=( -DWITH_REENTRANT_STRSIGNAL:BOOL=ON ) |
392 |
+ |
393 |
+ rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \ |
394 |
+ || die "failed to remove cmake cache" |
395 |
+ |
396 |
+ # hopefully this will not be necessary in the next release |
397 |
+ use parquet && export ARROW_XSIMD_URL="file:///${DISTDIR}/ceph-xsimd-${PV}.tar.gz" |
398 |
+ |
399 |
+ cmake_src_configure |
400 |
+ |
401 |
+ # bug #630232 |
402 |
+ sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \ |
403 |
+ "${BUILD_DIR:-${S}}"/include/acconfig.h \ |
404 |
+ || die "sed failed" |
405 |
+} |
406 |
+ |
407 |
+src_configure() { |
408 |
+ use custom-cflags || strip-flags |
409 |
+ ceph_src_configure |
410 |
+} |
411 |
+ |
412 |
+src_compile() { |
413 |
+ cmake_build all |
414 |
+ |
415 |
+ # we have to do this here to prevent from building everything multiple times |
416 |
+ python_copy_sources |
417 |
+ python_foreach_impl python_compile |
418 |
+} |
419 |
+ |
420 |
+python_compile() { |
421 |
+ local CMAKE_USE_DIR="${S}" |
422 |
+ ceph_src_configure |
423 |
+ |
424 |
+ cmake_build src/pybind/CMakeFiles/cython_modules |
425 |
+} |
426 |
+ |
427 |
+src_install() { |
428 |
+ python_foreach_impl python_install |
429 |
+ |
430 |
+ python_setup |
431 |
+ cmake_src_install |
432 |
+ python_optimize |
433 |
+ |
434 |
+ find "${ED}" -name '*.la' -type f -delete || die |
435 |
+ |
436 |
+ exeinto /usr/$(get_libdir)/ceph |
437 |
+ newexe "${BUILD_DIR}/bin/init-ceph" init-ceph |
438 |
+ |
439 |
+ insinto /etc/logrotate.d/ |
440 |
+ newins "${FILESDIR}"/ceph.logrotate-r2 ${PN} |
441 |
+ |
442 |
+ keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat |
443 |
+ |
444 |
+ fowners -R ceph:ceph /var/log/ceph |
445 |
+ |
446 |
+ newinitd "${FILESDIR}/rbdmap.initd-r1" rbdmap |
447 |
+ newinitd "${FILESDIR}/${PN}.initd-r12" ${PN} |
448 |
+ newconfd "${FILESDIR}/${PN}.confd-r5" ${PN} |
449 |
+ |
450 |
+ insinto /etc/sudoers.d |
451 |
+ doins sudoers.d/* |
452 |
+ |
453 |
+ insinto /etc/sysctl.d |
454 |
+ newins "${FILESDIR}"/sysctld 90-${PN}.conf |
455 |
+ |
456 |
+ use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc |
457 |
+ |
458 |
+ # units aren't installed by the build system unless systemd is enabled |
459 |
+ # so no point installing these with the USE flag disabled |
460 |
+ if use systemd; then |
461 |
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" "ceph-mds@.service" |
462 |
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" "ceph-osd@.service" |
463 |
+ fi |
464 |
+ |
465 |
+ udev_dorules udev/*.rules |
466 |
+ newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf |
467 |
+ |
468 |
+ readme.gentoo_create_doc |
469 |
+ |
470 |
+ # bug #630232 |
471 |
+ sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \ |
472 |
+ || die "sed failed" |
473 |
+ |
474 |
+ python_fix_shebang "${ED}"/usr/{,s}bin/ |
475 |
+ |
476 |
+ # python_fix_shebang apparently is not idempotent |
477 |
+ local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]' |
478 |
+ grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \ |
479 |
+ | xargs --null --no-run-if-empty -- sed -i -r "s:${shebang_regex}:\1:" || die |
480 |
+ |
481 |
+ local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* ) |
482 |
+ dostrip -x "${rados_classes[@]#${ED}}" |
483 |
+} |
484 |
+ |
485 |
+python_install() { |
486 |
+ local CMAKE_USE_DIR="${S}" |
487 |
+ DESTDIR="${ED}" cmake_build src/pybind/install |
488 |
+ |
489 |
+ python_optimize |
490 |
+} |
491 |
+ |
492 |
+pkg_postinst() { |
493 |
+ readme.gentoo_print_elog |
494 |
+ tmpfiles_process ${PN}.conf |
495 |
+ udev_reload |
496 |
+} |
497 |
+ |
498 |
+pkg_postrm() { |
499 |
+ udev_reload |
500 |
+} |
501 |
|
502 |
diff --git a/sys-cluster/ceph/files/ceph-17.2.5-boost-1.81.patch b/sys-cluster/ceph/files/ceph-17.2.5-boost-1.81.patch |
503 |
new file mode 100644 |
504 |
index 000000000000..2dd06edb312f |
505 |
--- /dev/null |
506 |
+++ b/sys-cluster/ceph/files/ceph-17.2.5-boost-1.81.patch |
507 |
@@ -0,0 +1,49 @@ |
508 |
+https://bugs.gentoo.org/887481 |
509 |
+--- a/src/rgw/rgw_asio_client.cc |
510 |
++++ b/src/rgw/rgw_asio_client.cc |
511 |
+@@ -39,11 +39,11 @@ |
512 |
+ const auto& value = header->value(); |
513 |
+ |
514 |
+ if (field == beast::http::field::content_length) { |
515 |
+- env.set("CONTENT_LENGTH", value.to_string()); |
516 |
++ env.set("CONTENT_LENGTH", value); |
517 |
+ continue; |
518 |
+ } |
519 |
+ if (field == beast::http::field::content_type) { |
520 |
+- env.set("CONTENT_TYPE", value.to_string()); |
521 |
++ env.set("CONTENT_TYPE", value); |
522 |
+ continue; |
523 |
+ } |
524 |
+ |
525 |
+@@ -62,26 +62,26 @@ |
526 |
+ } |
527 |
+ *dest = '\0'; |
528 |
+ |
529 |
+- env.set(buf, value.to_string()); |
530 |
++ env.set(buf, value); |
531 |
+ } |
532 |
+ |
533 |
+ int major = request.version() / 10; |
534 |
+ int minor = request.version() % 10; |
535 |
+ env.set("HTTP_VERSION", std::to_string(major) + '.' + std::to_string(minor)); |
536 |
+ |
537 |
+- env.set("REQUEST_METHOD", request.method_string().to_string()); |
538 |
++ env.set("REQUEST_METHOD", request.method_string()); |
539 |
+ |
540 |
+ // split uri from query |
541 |
+ auto uri = request.target(); |
542 |
+ auto pos = uri.find('?'); |
543 |
+ if (pos != uri.npos) { |
544 |
+ auto query = uri.substr(pos + 1); |
545 |
+- env.set("QUERY_STRING", query.to_string()); |
546 |
++ env.set("QUERY_STRING", query); |
547 |
+ uri = uri.substr(0, pos); |
548 |
+ } |
549 |
+- env.set("SCRIPT_URI", uri.to_string()); |
550 |
++ env.set("SCRIPT_URI", uri); |
551 |
+ |
552 |
+- env.set("REQUEST_URI", request.target().to_string()); |
553 |
++ env.set("REQUEST_URI", request.target()); |
554 |
+ |
555 |
+ char port_buf[16]; |
556 |
+ snprintf(port_buf, sizeof(port_buf), "%d", local_endpoint.port()); |