Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/, sys-cluster/ceph/files/
Date: Mon, 29 Apr 2019 22:58:01
Message-Id: 1556578480.8312633ba545894a52d9ec130a05e7c8068e0196.chutzpah@gentoo
1 commit: 8312633ba545894a52d9ec130a05e7c8068e0196
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Mon Apr 29 22:54:40 2019 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 29 22:54:40 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8312633b
7
8 sys-cluster/ceph: Version bump to 14.2.1
9
10 - Add experimental support for USE="system-boost" with boost-1.70
11 - Revbump init script to allow extra commands in conf.d (bug 684366)
12
13 Bug: https://bugs.gentoo.org/684366
14 Copyright: Sony Interactive Entertainment Inc.
15 Package-Manager: Portage-2.3.65, Repoman-2.3.12
16 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
17
18 sys-cluster/ceph/Manifest | 1 +
19 sys-cluster/ceph/ceph-14.2.1.ebuild | 362 +++++++++++++++++++++
20 .../files/ceph-14.2.0-boost-1.70-sonames.patch | 321 ++++++++++++++++++
21 .../ceph/files/ceph-14.2.0-boost-1.70.patch | 120 +++++++
22 sys-cluster/ceph/files/ceph.initd-r12 | 115 +++++++
23 5 files changed, 919 insertions(+)
24
25 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
26 index bfbbc7b64d7..4c6e42c016e 100644
27 --- a/sys-cluster/ceph/Manifest
28 +++ b/sys-cluster/ceph/Manifest
29 @@ -3,3 +3,4 @@ DIST ceph-12.2.12.tar.gz 77467762 BLAKE2B a5224432121db9ef49c1e22771d847399df2f7
30 DIST ceph-12.2.8.tar.gz 77243685 BLAKE2B 37c34396a0c276b8d79735e14934ac70da024822c2a060061531c234e03e5d41aad6c41dc64b05c2ce47f03287d0cae9ef9bed67e4a0861b6380c8ce1de4ea69 SHA512 91c5c11aaeef701b3e31c9f8a1192b6b79fd34f3b96c61595c65173c98bfce0009c5b7c9b29764f5e4d4b1f5ac2ca7109fed5ae598c176aba717a34a132fabac
31 DIST ceph-13.2.5.tar.gz 91006057 BLAKE2B 68551e2f54d78aff7b0e9ec3c62e6a3394dd7c23e80924a5b400cd9666a05a42e5f22445deee4040f1b78201c6a6660b283109878d4c92d845821bff831c8a5e SHA512 6daea524523f829e725609328ea71f416b2c3a9530fa8956720a7bc69dc08e55a169654f500704579dc9ba693f04eedd7e04614c0850e9ab1169cd45f19039f8
32 DIST ceph-14.2.0.tar.gz 118882504 BLAKE2B e650d99dceb11c7b035480c8cdd9f63ee4a5f81ffea27988e180a2956433e3e4b34e496a73bf5992c428eff859311c623b92a6f006eb694ebf928d8204dc9b06 SHA512 c86a335714fd5678988133ec0e60cb10cd948250a133c073d1ed055c5bba232fa6f1e102dd7fcb0c70b37a07c9c2d1220d4a1713720e4dcab9659152ee577480
33 +DIST ceph-14.2.1.tar.gz 117111511 BLAKE2B c00181223c6e02e7fe696ed4226f1751eca48e799f8b5377a06621eb3300f81b58dc20f325b455df04fcbd0c28b981fae1cfc778a8d69414247ddd206d0c6175 SHA512 fccde341344c721fbfc7f7cb73db4f65933d7fcacc9495398b55b37d1e208f0bad0cd78a4da08a3b5e26cca3175e7707f7dfb76fae5aa094f58afaed8603c866
34
35 diff --git a/sys-cluster/ceph/ceph-14.2.1.ebuild b/sys-cluster/ceph/ceph-14.2.1.ebuild
36 new file mode 100644
37 index 00000000000..6cab06ebd9c
38 --- /dev/null
39 +++ b/sys-cluster/ceph/ceph-14.2.1.ebuild
40 @@ -0,0 +1,362 @@
41 +# Copyright 1999-2019 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=7
45 +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
46 +DISTUTILS_OPTIONAL=1
47 +
48 +inherit check-reqs bash-completion-r1 cmake-utils distutils-r1 flag-o-matic \
49 + multiprocessing python-r1 udev user readme.gentoo-r1 toolchain-funcs \
50 + systemd
51 +
52 +if [[ ${PV} == *9999* ]]; then
53 + inherit git-r3
54 + EGIT_REPO_URI="https://github.com/ceph/ceph.git"
55 + SRC_URI=""
56 +else
57 + SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
58 + KEYWORDS="~amd64 ~arm64 ~x86"
59 +fi
60 +
61 +DESCRIPTION="Ceph distributed filesystem"
62 +HOMEPAGE="https://ceph.com/"
63 +
64 +LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ BSD Boost-1.0 MIT public-domain"
65 +SLOT="0"
66 +
67 +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
68 +
69 +IUSE="babeltrace cephfs dpdk fuse grafana jemalloc kerberos ldap libressl"
70 +IUSE+=" lttng +mgr numa rabbitmq +radosgw +ssl static-libs system-boost"
71 +IUSE+=" systemd +tcmalloc test xfs zfs"
72 +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
73 +
74 +COMMON_DEPEND="
75 + virtual/libudev:=
76 + app-arch/bzip2:=[static-libs?]
77 + app-arch/lz4:=[static-libs?]
78 + app-arch/snappy:=[static-libs?]
79 + app-arch/zstd:=[static-libs?]
80 + app-misc/jq:=[static-libs?]
81 + dev-libs/crypto++:=[static-libs?]
82 + dev-libs/leveldb:=[snappy,static-libs?,tcmalloc?]
83 + dev-libs/libaio:=[static-libs?]
84 + dev-libs/libxml2:=[static-libs?]
85 + dev-libs/nss:=
86 + sys-auth/oath-toolkit:=
87 + sys-apps/keyutils:=[static-libs?]
88 + sys-apps/util-linux:=[static-libs?]
89 + sys-libs/ncurses:0=[static-libs?]
90 + sys-libs/zlib:=[static-libs?]
91 + babeltrace? ( dev-util/babeltrace )
92 + ldap? ( net-nds/openldap:=[static-libs?] )
93 + lttng? ( dev-util/lttng-ust:= )
94 + fuse? ( sys-fs/fuse:0=[static-libs?] )
95 + kerberos? ( virtual/krb5 )
96 + rabbitmq? ( net-libs/rabbitmq-c:=[static-libs?] )
97 + ssl? (
98 + !libressl? ( dev-libs/openssl:=[static-libs?] )
99 + libressl? ( dev-libs/libressl:=[static-libs?] )
100 + )
101 + xfs? ( sys-fs/xfsprogs:=[static-libs?] )
102 + zfs? ( sys-fs/zfs:=[static-libs?] )
103 + radosgw? (
104 + dev-libs/expat:=[static-libs?]
105 + !libressl? (
106 + dev-libs/openssl:=[static-libs?]
107 + net-misc/curl:=[curl_ssl_openssl,static-libs?]
108 + )
109 + libressl? (
110 + dev-libs/libressl:=[static-libs?]
111 + net-misc/curl:=[curl_ssl_libressl,static-libs?]
112 + )
113 + )
114 + system-boost? (
115 + || (
116 + ~dev-libs/boost-1.70.0[threads,context,python,static-libs?,${PYTHON_USEDEP}]
117 + ~dev-libs/boost-1.67.0[threads,context,python,static-libs?,${PYTHON_USEDEP}]
118 + )
119 + dev-libs/boost:=[threads,context,python,static-libs?,${PYTHON_USEDEP}]
120 + )
121 + jemalloc? ( dev-libs/jemalloc:=[static-libs?] )
122 + !jemalloc? ( >=dev-util/google-perftools-2.4:=[static-libs?] )
123 + ${PYTHON_DEPS}
124 + "
125 +DEPEND="${COMMON_DEPEND}
126 + amd64? ( dev-lang/yasm )
127 + x86? ( dev-lang/yasm )
128 + dev-python/cython[${PYTHON_USEDEP}]
129 + dev-python/sphinx
130 + dev-util/cunit
131 + test? (
132 + dev-python/coverage[${PYTHON_USEDEP}]
133 + dev-python/virtualenv[${PYTHON_USEDEP}]
134 + sys-apps/grep[pcre]
135 + sys-fs/btrfs-progs
136 + )
137 + "
138 +BDEPEND=" app-arch/cpio
139 + >=dev-util/cmake-3.5.0
140 + dev-util/gperf
141 + dev-util/valgrind
142 + sys-apps/which
143 + sys-devel/bc
144 + virtual/pkgconfig
145 + "
146 +RDEPEND="${COMMON_DEPEND}
147 + net-misc/socat
148 + sys-apps/gptfdisk
149 + sys-block/parted
150 + sys-fs/cryptsetup
151 + sys-fs/lvm2[-device-mapper-only(-)]
152 + !<sys-apps/openrc-0.26.3
153 + dev-python/bcrypt[${PYTHON_USEDEP}]
154 + dev-python/cherrypy[${PYTHON_USEDEP}]
155 + dev-python/flask[${PYTHON_USEDEP}]
156 + dev-python/jinja[${PYTHON_USEDEP}]
157 + dev-python/pecan[${PYTHON_USEDEP}]
158 + dev-python/prettytable[${PYTHON_USEDEP}]
159 + dev-python/pyopenssl[${PYTHON_USEDEP}]
160 + dev-python/requests[${PYTHON_USEDEP}]
161 + dev-python/werkzeug[${PYTHON_USEDEP}]
162 + "
163 +REQUIRED_USE="
164 + ${PYTHON_REQUIRED_USE}
165 + || ( $(python_gen_useflags 'python3*') )
166 + ?? ( jemalloc tcmalloc )
167 + rabbitmq? ( radosgw )
168 + "
169 +
170 +# the tests need root access
171 +RESTRICT="test? ( userpriv )"
172 +
173 +# distribution tarball does not include everything needed for tests
174 +RESTRICT+=" test"
175 +
176 +# false positives unless all USE flags are on
177 +CMAKE_WARN_UNUSED_CLI="no"
178 +
179 +UNBUNDLE_LIBS=(
180 + src/erasure-code/jerasure/jerasure
181 + src/erasure-code/jerasure/gf-complete
182 +)
183 +
184 +PATCHES=(
185 + "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
186 + "${FILESDIR}/ceph-14.2.0-cflags.patch"
187 + "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
188 + "${FILESDIR}/ceph-13.2.0-cflags.patch"
189 + "${FILESDIR}/ceph-14.2.0-mgr-python-version.patch"
190 + "${FILESDIR}/ceph-14.2.0-no-virtualenvs.patch"
191 + "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
192 + "${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch"
193 + "${FILESDIR}/ceph-14.2.0-link-crc32-statically.patch"
194 + "${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
195 + "${FILESDIR}/ceph-14.2.1-ncurses-tinfo.patch"
196 +)
197 +
198 +# dpdk and ninja don't get along
199 +CMAKE_MAKEFILE_GENERATOR="emake"
200 +
201 +check-reqs_export_vars() {
202 + if use amd64; then
203 + CHECKREQS_DISK_BUILD="12G"
204 + CHECKREQS_DISK_USR="460M"
205 + else
206 + CHECKREQS_DISK_BUILD="1400M"
207 + CHECKREQS_DISK_USR="450M"
208 + fi
209 +
210 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
211 +}
212 +
213 +user_setup() {
214 + enewgroup ceph ${CEPH_GID}
215 + enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph
216 +}
217 +
218 +pkg_pretend() {
219 + check-reqs_export_vars
220 + check-reqs_pkg_pretend
221 +
222 + if use system-boost && has_version '~dev-libs/boost-1.70.0'; then
223 + ewarn "Building with boost-1.70 is experimental, and may cause runtime"
224 + ewarn "failures. Disable the system-boost USE flag to use bundled boost"
225 + ewarn "if you want an upstream supported configuration."
226 + fi
227 +}
228 +
229 +pkg_setup() {
230 + python_setup 'python3*'
231 + check-reqs_export_vars
232 + check-reqs_pkg_setup
233 + user_setup
234 +}
235 +
236 +src_prepare() {
237 + cmake-utils_src_prepare
238 +
239 + if use system-boost; then
240 + if has_version '~dev-libs/boost-1.70.0'; then
241 + eapply "${FILESDIR}/ceph-14.2.0-boost-1.70-sonames.patch" \
242 + "${FILESDIR}/ceph-14.2.0-boost-1.70.patch"
243 + else
244 + eapply "${FILESDIR}/ceph-14.2.0-boost-sonames.patch"
245 + fi
246 + fi
247 +
248 + sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
249 + src/bash_completion/CMakeLists.txt || die
250 +
251 + # remove tests that need root access
252 + rm src/test/cli/ceph-authtool/cap*.t || die
253 +}
254 +
255 +ceph_src_configure() {
256 + local flag
257 + local mycmakeargs=(
258 + -DWITH_BABELTRACE=$(usex babeltrace)
259 + -DWITH_CEPHFS=$(usex cephfs)
260 + -DWITH_CEPHFS_SHELL=$(if python_is_python3; then usex cephfs; else echo OFF; fi)
261 + -DWITH_DPDK=$(usex dpdk)
262 + -DWITH_FUSE=$(usex fuse)
263 + -DWITH_LTTNG=$(usex lttng)
264 + -DWITH_GSSAPI=$(usex kerberos)
265 + -DWITH_GRAFANA=$(usex grafana)
266 + -DWITH_MGR=$(usex mgr)
267 + -DWITH_MGR_DASHBOARD_FRONTEND=NO
268 + -DWITH_NUMA=$(usex numa)
269 + -DWITH_OPENLDAP=$(usex ldap)
270 + -DWITH_PYTHON3=$(if python_is_python3; then echo "ON"; else echo "OFF"; fi)
271 + -DWITH_PYTHON2=$(if python_is_python3; then echo "OFF"; else echo "ON"; fi)
272 + -DWITH_RADOSGW=$(usex radosgw)
273 + -DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq)
274 + -DWITH_SSL=$(usex ssl)
275 + -DWITH_SYSTEMD=$(usex systemd)
276 + -DWITH_TESTS=$(usex test)
277 + -DWITH_XFS=$(usex xfs)
278 + -DWITH_ZFS=$(usex zfs)
279 + -DENABLE_SHARED=$(usex static-libs '' 'ON' 'OFF')
280 + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
281 + -DWITH_SYSTEM_BOOST=$(usex system-boost)
282 + -DBOOST_J=$(makeopts_jobs)
283 + -DWITH_RDMA=no
284 + -DWITH_TBB=no
285 + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
286 + -DEPYTHON_VERSION="${EPYTHON#python}"
287 + -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
288 + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
289 + #-Wno-dev
290 + )
291 + if use amd64 || use x86; then
292 + for flag in ${CPU_FLAGS_X86[@]}; do
293 + mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
294 + done
295 + fi
296 +
297 + rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
298 + || die "failed to remove cmake cache"
299 +
300 + cmake-utils_src_configure
301 +
302 + # bug #630232
303 + sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
304 + "${BUILD_DIR:-${S}}"/include/acconfig.h \
305 + || die "sed failed"
306 +}
307 +
308 +src_configure() {
309 + ceph_src_configure
310 +}
311 +
312 +python_compile() {
313 + local CMAKE_USE_DIR="${S}"
314 + ceph_src_configure
315 +
316 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
317 + emake VERBOSE=1 clean
318 + emake VERBOSE=1 all
319 +
320 + # python modules are only compiled with "make install" so we need to do this to
321 + # prevent doing a bunch of compilation in src_install
322 + DESTDIR="${T}" emake VERBOSE=1 install
323 + popd >/dev/null || die
324 +}
325 +
326 +src_compile() {
327 + cmake-utils_src_make VERBOSE=1 all
328 +
329 + # we have to do this here to prevent from building everything multiple times
330 + python_copy_sources
331 + python_foreach_impl python_compile
332 +}
333 +
334 +src_test() {
335 + make check || die "make check failed"
336 +}
337 +
338 +python_install() {
339 + local CMAKE_USE_DIR="${S}"
340 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
341 + DESTDIR="${ED}" emake VERBOSE=1 install
342 + popd >/dev/null || die
343 +}
344 +
345 +src_install() {
346 + cmake-utils_src_install
347 + python_foreach_impl python_install
348 +
349 + find "${ED}" -name '*.la' -type f -delete || die
350 +
351 + exeinto /usr/$(get_libdir)/ceph
352 + newexe "${BUILD_DIR}/bin/init-ceph" init-ceph
353 +
354 + insinto /etc/logrotate.d/
355 + newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
356 +
357 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
358 +
359 + fowners -R ceph:ceph /var/lib/ceph /var/log/ceph
360 +
361 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
362 + newinitd "${FILESDIR}/${PN}.initd-r12" ${PN}
363 + newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
364 +
365 + insinto /etc/sysctl.d
366 + newins "${FILESDIR}"/sysctld 90-${PN}.conf
367 +
368 + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
369 +
370 + # units aren't installed by the build system unless systemd is enabled
371 + # so no point installing these with the USE flag disabled
372 + if use systemd; then
373 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
374 + "ceph-mds@.service"
375 +
376 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
377 + "ceph-osd@.service"
378 + fi
379 +
380 + udev_dorules udev/*.rules
381 +
382 + readme.gentoo_create_doc
383 +
384 + python_setup 'python3*'
385 +
386 + # bug #630232
387 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \
388 + || die "sed failed"
389 +
390 + python_fix_shebang "${ED}"/usr/{,s}bin/
391 +
392 + # python_fix_shebang apparently is not idempotent
393 + sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \
394 + "${ED}"/usr/sbin/{mount.*,ceph-volume{,-systemd}} || die "sed failed"
395 +
396 + local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* )
397 + dostrip -x "${rados_classes[@]#${ED}}"
398 +}
399 +
400 +pkg_postinst() {
401 + readme.gentoo_print_elog
402 +}
403
404 diff --git a/sys-cluster/ceph/files/ceph-14.2.0-boost-1.70-sonames.patch b/sys-cluster/ceph/files/ceph-14.2.0-boost-1.70-sonames.patch
405 new file mode 100644
406 index 00000000000..6d712003742
407 --- /dev/null
408 +++ b/sys-cluster/ceph/files/ceph-14.2.0-boost-1.70-sonames.patch
409 @@ -0,0 +1,321 @@
410 +diff --git a/cmake/modules/FindBoost.cmake b/cmake/modules/FindBoost.cmake
411 +index bfab4ca436..90ed0cbb17 100644
412 +--- a/cmake/modules/FindBoost.cmake
413 ++++ b/cmake/modules/FindBoost.cmake
414 +@@ -1181,10 +1181,10 @@ endif()
415 + # on all platforms to keep end user code free from platform dependent
416 + # code. Also provide convenience targets to disable autolinking and
417 + # enable dynamic linking.
418 +-if(NOT TARGET Boost::diagnostic_definitions)
419 +- add_library(Boost::diagnostic_definitions INTERFACE IMPORTED)
420 +- add_library(Boost::disable_autolinking INTERFACE IMPORTED)
421 +- add_library(Boost::dynamic_linking INTERFACE IMPORTED)
422 ++if(NOT TARGET boost_diagnostic_definitions)
423 ++ add_library(boost_diagnostic_definitions INTERFACE IMPORTED)
424 ++ add_library(boost_disable_autolinking INTERFACE IMPORTED)
425 ++ add_library(boost_dynamic_linking INTERFACE IMPORTED)
426 + endif()
427 + if(WIN32)
428 + # In windows, automatic linking is performed, so you do not have
429 +@@ -1205,11 +1205,11 @@ if(WIN32)
430 + # code to emit a #pragma message each time a library is selected
431 + # for linking.
432 + set(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC")
433 +- set_target_properties(Boost::diagnostic_definitions PROPERTIES
434 ++ set_target_properties(boost_diagnostic_definitions PROPERTIES
435 + INTERFACE_COMPILE_DEFINITIONS "BOOST_LIB_DIAGNOSTIC")
436 +- set_target_properties(Boost::disable_autolinking PROPERTIES
437 ++ set_target_properties(boost_disable_autolinking PROPERTIES
438 + INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB")
439 +- set_target_properties(Boost::dynamic_linking PROPERTIES
440 ++ set_target_properties(boost_dynamic_linking PROPERTIES
441 + INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_DYN_LINK")
442 + endif()
443 +
444 +@@ -2018,52 +2018,52 @@ if(Boost_FOUND)
445 + endif()
446 +
447 + foreach(COMPONENT ${Boost_FIND_COMPONENTS})
448 +- if(_Boost_IMPORTED_TARGETS AND NOT TARGET Boost::${COMPONENT})
449 ++ if(_Boost_IMPORTED_TARGETS AND NOT TARGET boost_${COMPONENT})
450 + string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
451 + if(Boost_${UPPERCOMPONENT}_FOUND)
452 + if(Boost_USE_STATIC_LIBS)
453 +- add_library(Boost::${COMPONENT} STATIC IMPORTED)
454 ++ add_library(boost_${COMPONENT} STATIC IMPORTED)
455 + else()
456 + # Even if Boost_USE_STATIC_LIBS is OFF, we might have static
457 + # libraries as a result.
458 +- add_library(Boost::${COMPONENT} UNKNOWN IMPORTED)
459 ++ add_library(boost_${COMPONENT} UNKNOWN IMPORTED)
460 + endif()
461 + if(Boost_INCLUDE_DIRS)
462 +- set_target_properties(Boost::${COMPONENT} PROPERTIES
463 ++ set_target_properties(boost_${COMPONENT} PROPERTIES
464 + INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}")
465 + endif()
466 + if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY}")
467 +- set_target_properties(Boost::${COMPONENT} PROPERTIES
468 ++ set_target_properties(boost_${COMPONENT} PROPERTIES
469 + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
470 + IMPORTED_LOCATION "${Boost_${UPPERCOMPONENT}_LIBRARY}")
471 + endif()
472 + if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE}")
473 +- set_property(TARGET Boost::${COMPONENT} APPEND PROPERTY
474 ++ set_property(TARGET boost_${COMPONENT} APPEND PROPERTY
475 + IMPORTED_CONFIGURATIONS RELEASE)
476 +- set_target_properties(Boost::${COMPONENT} PROPERTIES
477 ++ set_target_properties(boost_${COMPONENT} PROPERTIES
478 + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
479 + IMPORTED_LOCATION_RELEASE "${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE}")
480 + endif()
481 + if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG}")
482 +- set_property(TARGET Boost::${COMPONENT} APPEND PROPERTY
483 ++ set_property(TARGET boost_${COMPONENT} APPEND PROPERTY
484 + IMPORTED_CONFIGURATIONS DEBUG)
485 +- set_target_properties(Boost::${COMPONENT} PROPERTIES
486 ++ set_target_properties(boost_${COMPONENT} PROPERTIES
487 + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
488 + IMPORTED_LOCATION_DEBUG "${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG}")
489 + endif()
490 + if(_Boost_${UPPERCOMPONENT}_DEPENDENCIES)
491 + unset(_Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES)
492 + foreach(dep ${_Boost_${UPPERCOMPONENT}_DEPENDENCIES})
493 +- list(APPEND _Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES Boost::${dep})
494 ++ list(APPEND _Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES boost_${dep})
495 + endforeach()
496 + if(COMPONENT STREQUAL "thread")
497 + list(APPEND _Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES Threads::Threads)
498 + endif()
499 +- set_target_properties(Boost::${COMPONENT} PROPERTIES
500 ++ set_target_properties(boost_${COMPONENT} PROPERTIES
501 + INTERFACE_LINK_LIBRARIES "${_Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES}")
502 + endif()
503 + if(_Boost_${UPPERCOMPONENT}_COMPILER_FEATURES)
504 +- set_target_properties(Boost::${COMPONENT} PROPERTIES
505 ++ set_target_properties(boost_${COMPONENT} PROPERTIES
506 + INTERFACE_COMPILE_FEATURES "${_Boost_${UPPERCOMPONENT}_COMPILER_FEATURES}")
507 + endif()
508 + endif()
509 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
510 +index 1b1f19d464..21c222280f 100644
511 +--- a/src/CMakeLists.txt
512 ++++ b/src/CMakeLists.txt
513 +@@ -353,12 +353,12 @@ set(ceph_common_objs
514 + set(ceph_common_deps
515 + json_spirit erasure_code arch crc32
516 + ${LIB_RESOLV}
517 +- Boost::thread
518 +- Boost::system
519 +- Boost::random
520 +- Boost::program_options
521 +- Boost::date_time
522 +- Boost::iostreams
523 ++ boost_thread
524 ++ boost_system
525 ++ boost_random
526 ++ boost_program_options
527 ++ boost_date_time
528 ++ boost_iostreams
529 + ${BLKID_LIBRARIES}
530 + ${Backtrace_LIBRARIES}
531 + ${BLKIN_LIBRARIES}
532 +@@ -518,7 +518,7 @@ if (WITH_CEPHFS)
533 + ceph_mds.cc)
534 + add_executable(ceph-mds ${ceph_mds_srcs})
535 + target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static ceph-common
536 +- Boost::thread)
537 ++ boost_thread)
538 + install(TARGETS ceph-mds DESTINATION bin)
539 + endif()
540 +
541 +diff --git a/src/crimson/CMakeLists.txt b/src/crimson/CMakeLists.txt
542 +index d7b58521d4..e1533af33f 100644
543 +--- a/src/crimson/CMakeLists.txt
544 ++++ b/src/crimson/CMakeLists.txt
545 +@@ -106,8 +106,8 @@ target_link_libraries(crimson-common
546 + PRIVATE
547 + crc32
548 + crimson::cflags
549 +- Boost::iostreams
550 +- Boost::random
551 ++ boost_iostreams
552 ++ boost_random
553 + ${NSS_LIBRARIES} ${NSPR_LIBRARIES} OpenSSL::Crypto)
554 +
555 + set(crimson_auth_srcs
556 +diff --git a/src/mgr/CMakeLists.txt b/src/mgr/CMakeLists.txt
557 +index 252fb3e5e3..213482da16 100644
558 +--- a/src/mgr/CMakeLists.txt
559 ++++ b/src/mgr/CMakeLists.txt
560 +@@ -26,7 +26,7 @@ target_include_directories(ceph-mgr SYSTEM PRIVATE "${PYTHON_INCLUDE_DIRS}")
561 + target_link_libraries(ceph-mgr
562 + osdc client heap_profiler
563 + global-static ceph-common
564 +- Boost::python${MGR_PYTHON_VERSION_MAJOR}${MGR_PYTHON_VERSION_MINOR}
565 ++ boost_python${MGR_PYTHON_VERSION_MAJOR}${MGR_PYTHON_VERSION_MINOR}
566 + ${MGR_PYTHON_LIBRARIES} ${CMAKE_DL_LIBS} ${GSSAPI_LIBRARIES})
567 + set_target_properties(ceph-mgr PROPERTIES
568 + POSITION_INDEPENDENT_CODE ${EXE_LINKER_USE_PIE})
569 +diff --git a/src/rbd_replay/CMakeLists.txt b/src/rbd_replay/CMakeLists.txt
570 +index e9d3804c5f..5c6eb58de1 100644
571 +--- a/src/rbd_replay/CMakeLists.txt
572 ++++ b/src/rbd_replay/CMakeLists.txt
573 +@@ -36,7 +36,7 @@ if(HAVE_BABELTRACE)
574 + global
575 + babeltrace
576 + babeltrace-ctf
577 +- Boost::date_time
578 ++ boost_date_time
579 + )
580 + install(TARGETS rbd-replay-prep DESTINATION bin)
581 + endif(HAVE_BABELTRACE)
582 +diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt
583 +index ccc4f74cfe..854aa6e5e9 100644
584 +--- a/src/rgw/CMakeLists.txt
585 ++++ b/src/rgw/CMakeLists.txt
586 +@@ -199,7 +199,7 @@ if(WITH_CURL_OPENSSL)
587 + endif()
588 +
589 + if(WITH_BOOST_CONTEXT)
590 +- target_link_libraries(rgw_a PRIVATE Boost::coroutine Boost::context)
591 ++ target_link_libraries(rgw_a PRIVATE boost_coroutine boost_context)
592 + endif()
593 +
594 + set(rgw_libs rgw_a)
595 +@@ -341,7 +341,7 @@ if(WITH_RADOSGW_AMQP_ENDPOINT)
596 + target_link_libraries(rgw_admin_user PRIVATE RabbitMQ::RabbitMQ)
597 + endif()
598 + if(WITH_BOOST_CONTEXT)
599 +- target_link_libraries(rgw_admin_user PRIVATE Boost::coroutine Boost::context)
600 ++ target_link_libraries(rgw_admin_user PRIVATE boost_coroutine boost_context)
601 + endif()
602 +
603 + if(WITH_TESTS)
604 +diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
605 +index 20a64fd41b..a8bb323614 100644
606 +--- a/src/test/CMakeLists.txt
607 ++++ b/src/test/CMakeLists.txt
608 +@@ -158,7 +158,7 @@ add_executable(ceph_omapbench
609 + )
610 + target_link_libraries(ceph_omapbench
611 + librados
612 +- Boost::program_options
613 ++ boost_program_options
614 + global
615 + ${BLKID_LIBRARIES}
616 + ${CMAKE_DL_LIBS}
617 +diff --git a/src/test/common/CMakeLists.txt b/src/test/common/CMakeLists.txt
618 +index 71fb77cda9..aff8fb6565 100644
619 +--- a/src/test/common/CMakeLists.txt
620 ++++ b/src/test/common/CMakeLists.txt
621 +@@ -315,8 +315,8 @@ add_ceph_unittest(unittest_hobject)
622 +
623 + add_executable(unittest_async_completion test_async_completion.cc)
624 + add_ceph_unittest(unittest_async_completion)
625 +-target_link_libraries(unittest_async_completion Boost::system)
626 ++target_link_libraries(unittest_async_completion boost_system)
627 +
628 + add_executable(unittest_async_shared_mutex test_async_shared_mutex.cc)
629 + add_ceph_unittest(unittest_async_shared_mutex)
630 +-target_link_libraries(unittest_async_shared_mutex ceph-common Boost::system)
631 ++target_link_libraries(unittest_async_shared_mutex ceph-common boost_system)
632 +diff --git a/src/test/erasure-code/CMakeLists.txt b/src/test/erasure-code/CMakeLists.txt
633 +index 721f6c3675..1cd9635c77 100644
634 +--- a/src/test/erasure-code/CMakeLists.txt
635 ++++ b/src/test/erasure-code/CMakeLists.txt
636 +@@ -2,15 +2,15 @@
637 + add_executable(ceph_erasure_code_benchmark
638 + ${CMAKE_SOURCE_DIR}/src/erasure-code/ErasureCode.cc
639 + ceph_erasure_code_benchmark.cc)
640 +-target_link_libraries(ceph_erasure_code_benchmark ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
641 ++target_link_libraries(ceph_erasure_code_benchmark ceph-common boost_program_options global ${CMAKE_DL_LIBS})
642 + install(TARGETS ceph_erasure_code_benchmark
643 + DESTINATION bin)
644 +
645 + add_executable(ceph_erasure_code_non_regression ceph_erasure_code_non_regression.cc)
646 +-target_link_libraries(ceph_erasure_code_non_regression ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
647 ++target_link_libraries(ceph_erasure_code_non_regression ceph-common boost_program_options global ${CMAKE_DL_LIBS})
648 +
649 + add_executable(ceph_erasure_code ceph_erasure_code.cc)
650 +-target_link_libraries(ceph_erasure_code ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
651 ++target_link_libraries(ceph_erasure_code ceph-common boost_program_options global ${CMAKE_DL_LIBS})
652 + install(TARGETS ceph_erasure_code
653 + DESTINATION bin)
654 +
655 +diff --git a/src/test/librados/CMakeLists.txt b/src/test/librados/CMakeLists.txt
656 +index 4fc53d2406..e6304394f8 100644
657 +--- a/src/test/librados/CMakeLists.txt
658 ++++ b/src/test/librados/CMakeLists.txt
659 +@@ -62,7 +62,7 @@ add_executable(ceph_test_rados_api_asio asio.cc)
660 + target_link_libraries(ceph_test_rados_api_asio global
661 + librados ${UNITTEST_LIBS})
662 + if(WITH_BOOST_CONTEXT)
663 +- target_link_libraries(ceph_test_rados_api_asio Boost::coroutine Boost::context)
664 ++ target_link_libraries(ceph_test_rados_api_asio boost_coroutine boost_context)
665 + endif()
666 +
667 + add_executable(ceph_test_rados_api_list
668 +@@ -132,7 +132,7 @@ add_executable(ceph_test_rados_api_tier_pp
669 + tier_cxx.cc
670 + $<TARGET_OBJECTS:unit-main>)
671 + target_link_libraries(ceph_test_rados_api_tier_pp
672 +- librados global ${UNITTEST_LIBS} Boost::system radostest-cxx)
673 ++ librados global ${UNITTEST_LIBS} boost_system radostest-cxx)
674 +
675 + add_executable(ceph_test_rados_api_snapshots
676 + snapshots.cc)
677 +diff --git a/src/test/librbd/CMakeLists.txt b/src/test/librbd/CMakeLists.txt
678 +index 2bf6723c40..e99b8afa11 100644
679 +--- a/src/test/librbd/CMakeLists.txt
680 ++++ b/src/test/librbd/CMakeLists.txt
681 +@@ -27,7 +27,7 @@ target_link_libraries(rbd_test PRIVATE
682 + radostest
683 + radostest-cxx
684 + librados
685 +- Boost::thread
686 ++ boost_thread
687 + GMock::GMock
688 + GTest::GTest)
689 +
690 +diff --git a/src/test/rgw/CMakeLists.txt b/src/test/rgw/CMakeLists.txt
691 +index 9b2c6b6321..80e4cb7829 100644
692 +--- a/src/test/rgw/CMakeLists.txt
693 ++++ b/src/test/rgw/CMakeLists.txt
694 +@@ -143,7 +143,7 @@ add_ceph_unittest(unittest_rgw_dmclock_scheduler)
695 + target_link_libraries(unittest_rgw_dmclock_scheduler ${rgw_libs} dmclock)
696 + if(WITH_BOOST_CONTEXT)
697 + target_compile_definitions(unittest_rgw_dmclock_scheduler PRIVATE BOOST_COROUTINES_NO_DEPRECATION_WARNING)
698 +- target_link_libraries(unittest_rgw_dmclock_scheduler Boost::coroutine Boost::context)
699 ++ target_link_libraries(unittest_rgw_dmclock_scheduler boost_coroutine boost_context)
700 + endif()
701 +
702 + if(WITH_RADOSGW_AMQP_ENDPOINT)
703 +diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
704 +index d31f3d2408..6945018b11 100644
705 +--- a/src/tools/CMakeLists.txt
706 ++++ b/src/tools/CMakeLists.txt
707 +@@ -35,20 +35,20 @@ install(PROGRAMS
708 + endif(WITH_TESTS)
709 +
710 + add_executable(ceph-osdomap-tool ceph_osdomap_tool.cc)
711 +-target_link_libraries(ceph-osdomap-tool os global Boost::program_options)
712 ++target_link_libraries(ceph-osdomap-tool os global boost_program_options)
713 + install(TARGETS ceph-osdomap-tool DESTINATION bin)
714 +
715 + add_executable(ceph-monstore-tool
716 + ceph_monstore_tool.cc
717 + ../mgr/mgr_commands.cc)
718 +-target_link_libraries(ceph-monstore-tool os global Boost::program_options)
719 ++target_link_libraries(ceph-monstore-tool os global boost_program_options)
720 + install(TARGETS ceph-monstore-tool DESTINATION bin)
721 +
722 + add_executable(ceph-objectstore-tool
723 + ceph_objectstore_tool.cc
724 + rebuild_mondb.cc
725 + RadosDump.cc)
726 +-target_link_libraries(ceph-objectstore-tool osd os global Boost::program_options ${CMAKE_DL_LIBS})
727 ++target_link_libraries(ceph-objectstore-tool osd os global boost_program_options ${CMAKE_DL_LIBS})
728 + if(WITH_FUSE)
729 + target_link_libraries(ceph-objectstore-tool ${FUSE_LIBRARIES})
730 + endif(WITH_FUSE)
731
732 diff --git a/sys-cluster/ceph/files/ceph-14.2.0-boost-1.70.patch b/sys-cluster/ceph/files/ceph-14.2.0-boost-1.70.patch
733 new file mode 100644
734 index 00000000000..ce2ee92b3d8
735 --- /dev/null
736 +++ b/sys-cluster/ceph/files/ceph-14.2.0-boost-1.70.patch
737 @@ -0,0 +1,120 @@
738 +diff --git a/CMakeLists.txt b/CMakeLists.txt
739 +index f97f96b5bf..f5e5d06d35 100644
740 +--- a/CMakeLists.txt
741 ++++ b/CMakeLists.txt
742 +@@ -657,13 +657,13 @@ if(WITH_SYSTEM_BOOST)
743 + if(BOOST_ROOT AND CMAKE_LIBRARY_ARCHITECTURE)
744 + set(BOOST_LIBRARYDIR "${BOOST_ROOT}/lib/${CMAKE_LIBRARY_ARCHITECTURE}")
745 + endif()
746 +- find_package(Boost 1.67 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
747 ++ find_package(Boost 1.70 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
748 + else()
749 + set(BOOST_J 1 CACHE STRING
750 + "max jobs for Boost build") # override w/-DBOOST_J=<n>
751 + set(Boost_USE_STATIC_LIBS ON)
752 + include(BuildBoost)
753 +- build_boost(1.67
754 ++ build_boost(1.70
755 + COMPONENTS ${BOOST_COMPONENTS} ${BOOST_HEADER_COMPONENTS})
756 + endif()
757 + include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIRS})
758 +diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
759 +index f46cc0d485..4254508570 100644
760 +--- a/cmake/modules/BuildBoost.cmake
761 ++++ b/cmake/modules/BuildBoost.cmake
762 +@@ -137,14 +137,14 @@ function(do_build_boost version)
763 + check_boost_version("${PROJECT_SOURCE_DIR}/src/boost" ${version})
764 + set(source_dir
765 + SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/boost")
766 +- elseif(version VERSION_GREATER 1.67)
767 ++ elseif(version VERSION_GREATER 1.70)
768 + message(FATAL_ERROR "Unknown BOOST_REQUESTED_VERSION: ${version}")
769 + else()
770 + message(STATUS "boost will be downloaded...")
771 + # NOTE: If you change this version number make sure the package is available
772 + # at the three URLs below (may involve uploading to download.ceph.com)
773 +- set(boost_version 1.67.0)
774 +- set(boost_sha256 2684c972994ee57fc5632e03bf044746f6eb45d4920c343937a465fd67a5adba)
775 ++ set(boost_version 1.70.0)
776 ++ set(boost_sha256 430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778)
777 + string(REPLACE "." "_" boost_version_underscore ${boost_version} )
778 + set(boost_url
779 + https://dl.bintray.com/boostorg/release/${boost_version}/source/boost_${boost_version_underscore}.tar.bz2)
780 +diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc
781 +index e4be074ec7..4af3695dc1 100644
782 +--- a/src/rgw/rgw_asio_frontend.cc
783 ++++ b/src/rgw/rgw_asio_frontend.cc
784 +@@ -81,7 +81,8 @@ class StreamIO : public rgw::asio::ClientIO {
785 + using SharedMutex = ceph::async::SharedMutex<boost::asio::io_context::executor_type>;
786 +
787 + template <typename Stream>
788 +-void handle_connection(RGWProcessEnv& env, Stream& stream,
789 ++void handle_connection(boost::asio::io_context& context,
790 ++ RGWProcessEnv& env, Stream& stream,
791 + boost::beast::flat_buffer& buffer, bool is_ssl,
792 + SharedMutex& pause_mutex,
793 + rgw::dmclock::Scheduler *scheduler,
794 +@@ -152,7 +153,7 @@ void handle_connection(RGWProcessEnv& env, Stream& stream,
795 + rgw::io::add_conlen_controlling(
796 + &real_client))));
797 + RGWRestfulIO client(cct, &real_client_io);
798 +- auto y = optional_yield{socket.get_io_context(), yield};
799 ++ auto y = optional_yield{context, yield};
800 + process_request(env.store, env.rest, &req, env.uri_prefix,
801 + *env.auth_registry, &client, env.olog, y, scheduler);
802 + }
803 +@@ -560,7 +561,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
804 + return;
805 + }
806 + buffer.consume(bytes);
807 +- handle_connection(env, stream, buffer, true, pause_mutex,
808 ++ handle_connection(context, env, stream, buffer, true, pause_mutex,
809 + scheduler.get(), ec, yield);
810 + if (!ec) {
811 + // ssl shutdown (ignoring errors)
812 +@@ -578,7 +579,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
813 + auto c = connections.add(conn);
814 + boost::beast::flat_buffer buffer;
815 + boost::system::error_code ec;
816 +- handle_connection(env, s, buffer, false, pause_mutex,
817 ++ handle_connection(context, env, s, buffer, false, pause_mutex,
818 + scheduler.get(), ec, yield);
819 + s.shutdown(tcp::socket::shutdown_both, ec);
820 + });
821 +diff --git a/src/rgw/rgw_dmclock_async_scheduler.h b/src/rgw/rgw_dmclock_async_scheduler.h
822 +index 70487a5253..1d454acd2e 100644
823 +--- a/src/rgw/rgw_dmclock_async_scheduler.h
824 ++++ b/src/rgw/rgw_dmclock_async_scheduler.h
825 +@@ -82,7 +82,12 @@ class AsyncScheduler : public md_config_obs_t, public Scheduler {
826 + using Completion = async::Completion<Signature, async::AsBase<Request>>;
827 +
828 + using Clock = ceph::coarse_real_clock;
829 ++#if BOOST_VERSION < 107000
830 + using Timer = boost::asio::basic_waitable_timer<Clock>;
831 ++#else
832 ++ using Timer = boost::asio::basic_waitable_timer<Clock,
833 ++ boost::asio::wait_traits<Clock>, executor_type>;
834 ++#endif
835 + Timer timer; //< timer for the next scheduled request
836 +
837 + CephContext *const cct;
838 +diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h
839 +index d99a6ff68d..213fc238d2 100644
840 +--- a/src/rgw/rgw_reshard.h
841 ++++ b/src/rgw/rgw_reshard.h
842 +@@ -183,7 +183,14 @@ class RGWReshardWait {
843 + ceph::condition_variable cond;
844 +
845 + struct Waiter : boost::intrusive::list_base_hook<> {
846 +- boost::asio::basic_waitable_timer<Clock> timer;
847 ++#if BOOST_VERSION < 107000
848 ++ using Timer = boost::asio::basic_waitable_timer<Clock>;
849 ++#else
850 ++ using Executor = boost::asio::io_context::executor_type;
851 ++ using Timer = boost::asio::basic_waitable_timer<Clock,
852 ++ boost::asio::wait_traits<Clock>, Executor>;
853 ++#endif
854 ++ Timer timer;
855 + explicit Waiter(boost::asio::io_context& ioc) : timer(ioc) {}
856 + };
857 + boost::intrusive::list<Waiter> waiters;
858
859 diff --git a/sys-cluster/ceph/files/ceph.initd-r12 b/sys-cluster/ceph/files/ceph.initd-r12
860 new file mode 100644
861 index 00000000000..4a90e3c3f98
862 --- /dev/null
863 +++ b/sys-cluster/ceph/files/ceph.initd-r12
864 @@ -0,0 +1,115 @@
865 +#!/sbin/openrc-run
866 +
867 +# make sure /etc/conf.d/ceph gets loaded for ceph-mon etc
868 +_CONFD_FILE="${RC_SERVICE%/*}/../conf.d/${RC_SVCNAME%-*}"
869 +if [ -r "${_CONFD_FILE}" ]; then
870 + . "${_CONFD_FILE}" || exit 1
871 +fi
872 +
873 +: "${ceph_conf:=/etc/ceph/ceph.conf}"
874 +daemon_type="${RC_SVCNAME#ceph-}"
875 +daemon_type="${daemon_type%%.*}"
876 +daemon_id="${RC_SVCNAME#ceph-*.}"
877 +daemon_id="${daemon_id:-0}"
878 +: "${rundir:=/run/ceph}"
879 +: "${user:=ceph}"
880 +: "${group:=ceph}"
881 +: "${rc_ulimit:=-n 1048576 -u 1048576}"
882 +
883 +pidfile="${rundir}/supervisor-${daemon_type}.${daemon_id}.pid"
884 +daemon_pidfile="${rundir}/${daemon_type}.${daemon_id}.pid"
885 +
886 +command="/usr/bin/${RC_SVCNAME%%.*}"
887 +command_args="-i ${daemon_id} --pid-file ${daemon_pidfile} -c ${ceph_conf}"
888 +extra_commands="${extra_commands} reload"
889 +command_args_foreground="--foreground"
890 +
891 +retry="${CEPH_TERMTIMEOUT:-TERM/120/KILL/5}"
892 +start_stop_daemon_args="--user ${user} --group ${group}"
893 +supervise_daemon_args="--user ${user} --group ${group}"
894 +
895 +: "${supervisor:=supervise-daemon}"
896 +: "${stdout:=/var/log/ceph/ceph}"
897 +: "${stderr:=/var/log/ceph/ceph}"
898 +: "${respawn_delay:=10}"
899 +: "${respawn_max:=5}"
900 +: "${respawn_period:=1800}"
901 +
902 +: "${osd_respawn_delay:=15}"
903 +: "{osd_respawn_max:=10}"
904 +
905 +: "{radosgw_respawn_max:=5}"
906 +: "${radosgw_respawn_period:=30}"
907 +
908 +depend() {
909 + use dns logger
910 + after net ntpd ntp-client chronyd
911 + before netmount
912 +}
913 +
914 +is_type_valid() {
915 + case ${daemon_type} in
916 + mon|mds|osd|mgr|radosgw) return 0;;
917 + *) return 1;;
918 + esac
919 +}
920 +
921 +start_pre() {
922 + local log_dir
923 + export CEPH_CONF="${ceph_conf}"
924 +
925 + checkpath -d -q -o "${user}:${group}" "${rundir}"
926 +
927 + if ! is_type_valid ;then
928 + eerror "Please give valid Ceph Server Type: mds, mon, osd"
929 + return 1
930 +
931 + elif pgrep -f "[c]eph-${daemon_type} -i ${daemon_id} "; then
932 + eerror "${daemon_type}.${daemon_id} is still running, refusing to start"
933 + return 1
934 + fi
935 +
936 + if [ -n "${bluestore_osd_fsid}" ]; then
937 + einfo "Mounting Bluestore"
938 + ceph-volume lvm activate "${daemon_id}" "${bluestore_osd_fsid}" --no-systemd
939 + fi
940 +
941 + if [ "${daemon_type}" = radosgw ] && [ "${RADOSGW_WANT_NAME_PARAM}" = y ]; then
942 + command_args="${command_args} --name client.${daemon_id}"
943 + fi
944 +
945 + local arg_name arg_val repl_arg_name
946 + for arg_name in stdout stderr respawn_delay respawn_max respawn_period; do
947 + eval arg_val="\${${daemon_type}_${arg_name}}"
948 +
949 + if [ -z "${arg_val}" ]; then
950 + eval arg_val="\${${arg_name}}"
951 + else
952 + eval "${arg_name}=\"${arg_val}\""
953 + fi
954 +
955 + if [ "${arg_name}" = "stderr" ] || [ "${arg_name}" = "stdout" ]; then
956 + local log_file log_postfix
957 + log_postfix=".${daemon_id}-${arg_name}.log"
958 + log_file="${arg_val}"
959 +
960 + if [ "${log_file}" != /dev/null ]; then
961 + log_file="${log_file}${log_postfix}"
962 +
963 + log_dir="$(dirname "${log_file}")"
964 + checkpath -m 0755 -o "${user}:${group}" -d "${log_dir}"
965 + fi
966 +
967 + repl_arg_name="$(printf -- "%s\n" "${arg_name}" | tr _ -)"
968 + supervise_daemon_args="${supervise_daemon_args} --${repl_arg_name}=${log_file}"
969 + fi
970 + done
971 +}
972 +
973 +reload() {
974 + ebegin "Reloading Ceph ${daemon_type}.${daemon_id}"
975 + start-stop-daemon --signal 1 "${start_stop_daemon_args}"
976 + eend ${?}
977 +}
978 +
979 +# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet: