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/
Date: Thu, 03 Mar 2022 01:52:53
Message-Id: 1646272282.d0282521f25296038ade9279cbfac5fa265a248a.chutzpah@gentoo
1 commit: d0282521f25296038ade9279cbfac5fa265a248a
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 3 01:51:03 2022 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 3 01:51:22 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0282521
7
8 sys-cluster/ceph: version bump to 15.2.16
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
12
13 sys-cluster/ceph/Manifest | 1 +
14 sys-cluster/ceph/ceph-15.2.16.ebuild | 407 +++++++++++++++++++++++++++++++++++
15 2 files changed, 408 insertions(+)
16
17 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
18 index b9d1bf4a7e80..88d06bae3ea1 100644
19 --- a/sys-cluster/ceph/Manifest
20 +++ b/sys-cluster/ceph/Manifest
21 @@ -1,5 +1,6 @@
22 DIST ceph-14.2.22.tar.gz 130597047 BLAKE2B 58bbb3243de076ed1d25dfd7bd75717c50ad15d16690dcbd1511d1b506477845efc3ff7fbe713cf18fb8cfcc8c16707ad2a0f30159e3198ff82e57fbd2eb3cf2 SHA512 1c66661e1a39fa9151e95e33c390b810ffe269465d8785e2197cc15b8d83bd2edde77de48a8abd71a4da68cd5830ff14bcdf6b98fd17edabe85caeb1eca018d3
23 DIST ceph-15.2.15.tar.gz 148584988 BLAKE2B 6ff629846a74c9b30c7e5d54731e2c85c67942f1871194cc8e704c56826b86cdd6163d6693805d9d6210bc0e3fc4d84fada12b9d81a5640e34d76be83cfe6e47 SHA512 e4d929ffda5c3e31767d93340fb97b5d49ca1d5641f6c30134ce5542486fc4f72684aef2ef47cb940a332e8b9144d8cec63ce8a9f86c773dbc0ccebdd8e7fb19
24 +DIST ceph-15.2.16.tar.gz 148628915 BLAKE2B 4f624078027c706428eae3eddd5b5479efe3b4442c19a4e6b6cdf8d3839cf56e2863b18249dc3c5079a7e25f60796bfec3202ffd695537587654f5e2f820caaa SHA512 532b8a5073e157fe9ed552b26976faeb64dc29b79a249910c0982134ad5f945d4f57d8bf451adf63487b6d285c6e4bd5c39f0e3fcd449230d6fb3087539f8c3b
25 DIST ceph-16.2.5.tar.gz 155933825 BLAKE2B 3c8f3f1663b91d4de1e3736317add0b88d9083db5ab2fc3e2e913278977deec076bd4410e309f4e47ccc169d74356c2ab1221c94532cc45ee75ec73673fc42a0 SHA512 5c32f9aa817ecfa788725bcfe5743756853ca9b3f9ee453242110f1b5e1bdd1feaef79ad9ccf2b185445c9644bcecb1355e151a2255bfd27edc9818e0d6d4c4a
26 DIST ceph-16.2.6.tar.gz 156087762 BLAKE2B e2595d1a958200e4f1877e4597c53319a9eee2e95606ea1b3ba2966a0d17f1cfcf52e05cca59752cc6ac383e32d944c380920d111aec840631235aef273a4de1 SHA512 f01e29088ae566d4111c21b5d0c173ddb02badaa0d8272f7f1548eb8e66a95dc7052b3945d9fb342e6c97a65c57648fda394317340d1f4236a57af7580073658
27 DIST ceph-16.2.7.tar.gz 156621262 BLAKE2B 3c79cb1586e71927df4578fe7f3a13f4ab257a5e145b6bf76d942292cbca7bf32583350373f3d816f6d8f8700ee0f98a14f350c823b0eb89ffd7735acee7de63 SHA512 eab047e646970d444acf1064d98237b8b1677fb16b5e771082d55880f7bc6d8bdb278c2fe514c82ae12c438878d9ecea29139fa6b8d890f9f737138f10fb740c
28
29 diff --git a/sys-cluster/ceph/ceph-15.2.16.ebuild b/sys-cluster/ceph/ceph-15.2.16.ebuild
30 new file mode 100644
31 index 000000000000..978bc4fd9e23
32 --- /dev/null
33 +++ b/sys-cluster/ceph/ceph-15.2.16.ebuild
34 @@ -0,0 +1,407 @@
35 +# Copyright 1999-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=8
39 +PYTHON_COMPAT=( python3_{8..9} )
40 +CMAKE_MAKEFILE_GENERATOR=emake
41 +
42 +DISTUTILS_OPTIONAL=1
43 +
44 +inherit check-reqs bash-completion-r1 cmake distutils-r1 flag-o-matic \
45 + python-r1 udev readme.gentoo-r1 toolchain-funcs systemd tmpfiles \
46 + multiprocessing
47 +
48 +if [[ ${PV} == *9999* ]]; then
49 + inherit git-r3
50 + EGIT_REPO_URI="https://github.com/ceph/ceph.git"
51 + SRC_URI=""
52 +else
53 + SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
54 + KEYWORDS="~amd64 ~arm64 ~ppc64"
55 +fi
56 +
57 +DESCRIPTION="Ceph distributed filesystem"
58 +HOMEPAGE="https://ceph.com/"
59 +
60 +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"
61 +SLOT="0"
62 +
63 +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
64 +
65 +IUSE="babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana jemalloc
66 + kafka kerberos ldap lttng +mgr numa pmdk rabbitmq +radosgw rbd-rwl +ssl spdk
67 + +system-boost systemd +tcmalloc test uring xfs zfs"
68 +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
69 +
70 +DEPEND="
71 + acct-group/ceph
72 + acct-user/ceph
73 + virtual/libudev:=
74 + app-arch/bzip2:=
75 + app-arch/lz4:=
76 + app-arch/snappy:=
77 + || ( >=app-arch/snappy-1.1.9-r1 <app-arch/snappy-1.1.9 )
78 + app-arch/zstd:=
79 + app-shells/bash:0
80 + app-misc/jq:=
81 + dev-libs/crypto++:=
82 + dev-cpp/gflags:=
83 + dev-libs/leveldb:=[snappy,tcmalloc(-)?]
84 + dev-libs/libaio:=
85 + dev-libs/libfmt:=
86 + dev-libs/libnl:3=
87 + dev-libs/libxml2:=
88 + <dev-libs/rocksdb-6.15:=
89 + dev-libs/xmlsec:=[openssl]
90 + dev-cpp/yaml-cpp:=
91 + dev-libs/nss:=
92 + dev-libs/protobuf:=
93 + net-dns/c-ares:=
94 + net-libs/gnutls:=
95 + sys-auth/oath-toolkit:=
96 + sys-apps/coreutils
97 + sys-apps/grep
98 + sys-apps/hwloc:=
99 + sys-apps/keyutils:=
100 + sys-apps/util-linux:=
101 + sys-apps/sed
102 + sys-apps/util-linux
103 + sys-libs/libcap-ng:=
104 + sys-libs/ncurses:0=
105 + sys-libs/zlib:=
106 + sys-process/numactl:=
107 + virtual/libcrypt:=
108 + x11-libs/libpciaccess:=
109 + babeltrace? ( dev-util/babeltrace )
110 + fuse? ( sys-fs/fuse:0= )
111 + jemalloc? ( dev-libs/jemalloc:= )
112 + !jemalloc? ( >=dev-util/google-perftools-2.6.1:= )
113 + kafka? ( dev-libs/librdkafka:= )
114 + kerberos? ( virtual/krb5 )
115 + ldap? ( net-nds/openldap:= )
116 + lttng? ( dev-util/lttng-ust:= )
117 + pmdk? ( dev-libs/pmdk:= )
118 + rabbitmq? ( net-libs/rabbitmq-c:= )
119 + radosgw? (
120 + dev-libs/expat:=
121 + dev-libs/openssl:=
122 + net-misc/curl:=[curl_ssl_openssl]
123 + )
124 + rbd-rwl? ( dev-libs/pmdk:= )
125 + ssl? ( dev-libs/openssl:= )
126 + system-boost? ( >=dev-libs/boost-1.72:=[threads(+),context,python,${PYTHON_USEDEP}] )
127 + !system-boost? ( <sys-libs/glibc-2.34 )
128 + uring? ( sys-libs/liburing:= )
129 + xfs? ( sys-fs/xfsprogs:= )
130 + zfs? ( sys-fs/zfs:= )
131 +"
132 +BDEPEND="
133 + ${PYTHON_DEPS}
134 + amd64? ( dev-lang/yasm )
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/cunit
142 + dev-util/gperf
143 + dev-util/ragel
144 + dev-util/valgrind
145 + sys-apps/coreutils
146 + sys-apps/grep
147 + sys-apps/sed
148 + sys-apps/which
149 + sys-devel/bc
150 + sys-devel/patch
151 + virtual/pkgconfig
152 + test? (
153 + dev-python/coverage[${PYTHON_USEDEP}]
154 + dev-python/virtualenv[${PYTHON_USEDEP}]
155 + dev-python/requests-mock[${PYTHON_USEDEP}]
156 + sys-apps/grep[pcre]
157 + sys-fs/btrfs-progs
158 + )
159 +"
160 +RDEPEND="${DEPEND}
161 + ${PYTHON_DEPS}
162 + app-admin/sudo
163 + net-misc/socat
164 + sys-apps/gptfdisk
165 + sys-apps/nvme-cli
166 + >=sys-apps/smartmontools-7.0
167 + sys-block/parted
168 + sys-fs/cryptsetup
169 + sys-fs/lsscsi
170 + sys-fs/lvm2[-device-mapper-only(-)]
171 + virtual/awk
172 + dev-python/bcrypt[${PYTHON_USEDEP}]
173 + dev-python/cherrypy[${PYTHON_USEDEP}]
174 + dev-python/python-dateutil[${PYTHON_USEDEP}]
175 + dev-python/flask[${PYTHON_USEDEP}]
176 + dev-python/jinja[${PYTHON_USEDEP}]
177 + dev-python/pecan[${PYTHON_USEDEP}]
178 + dev-python/prettytable[${PYTHON_USEDEP}]
179 + dev-python/pyopenssl[${PYTHON_USEDEP}]
180 + dev-python/requests[${PYTHON_USEDEP}]
181 + dev-python/setuptools[${PYTHON_USEDEP}]
182 + dev-python/werkzeug[${PYTHON_USEDEP}]
183 + mgr? (
184 + dev-python/jsonpatch[${PYTHON_USEDEP}]
185 + dev-python/more-itertools[${PYTHON_USEDEP}]
186 + dev-python/numpy[${PYTHON_USEDEP}]
187 + dev-python/pyjwt[${PYTHON_USEDEP}]
188 + dev-python/pyyaml[${PYTHON_USEDEP}]
189 + dev-python/routes[${PYTHON_USEDEP}]
190 + sci-libs/scikit-learn[${PYTHON_USEDEP}]
191 + dev-python/six[${PYTHON_USEDEP}]
192 + )
193 +"
194 +# diskprediction needs older scipy not compatible with py38
195 +# bug #724438
196 +REQUIRED_USE="
197 + ${PYTHON_REQUIRED_USE}
198 + ?? ( jemalloc tcmalloc )
199 + diskprediction? ( mgr !python_targets_python3_8 )
200 + kafka? ( radosgw )
201 + mgr? ( cephfs )
202 + rabbitmq? ( radosgw )
203 +"
204 +RESTRICT="!test? ( test )"
205 +
206 +# the tests need root access
207 +RESTRICT="test? ( userpriv )"
208 +
209 +# distribution tarball does not include everything needed for tests
210 +RESTRICT+=" test"
211 +
212 +# create a non-debug release
213 +CMAKE_BUILD_TYPE=RelWithDebInfo
214 +
215 +# false positives unless all USE flags are on
216 +CMAKE_WARN_UNUSED_CLI=no
217 +
218 +PATCHES=(
219 + "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
220 + "${FILESDIR}/ceph-14.2.0-cflags.patch"
221 + "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
222 + "${FILESDIR}/ceph-13.2.0-cflags.patch"
223 + "${FILESDIR}/ceph-15.2.15-no-virtualenvs.patch"
224 + "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
225 + "${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch"
226 + "${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
227 + "${FILESDIR}/ceph-15.2.0-rocksdb-cmake.patch"
228 + "${FILESDIR}/ceph-15.2.2-systemd-unit.patch"
229 + "${FILESDIR}/ceph-15.2.3-spdk-compile.patch"
230 + "${FILESDIR}/ceph-15.2.4-system-uring.patch"
231 + "${FILESDIR}/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch"
232 + "${FILESDIR}/ceph-15.2.15-snappy-1.1.9.patch"
233 +)
234 +
235 +check-reqs_export_vars() {
236 + CHECKREQS_DISK_BUILD="5400M"
237 + CHECKREQS_DISK_USR="510M"
238 +
239 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
240 +}
241 +
242 +pkg_pretend() {
243 + check-reqs_export_vars
244 + check-reqs_pkg_pretend
245 +}
246 +
247 +pkg_setup() {
248 + python_setup
249 + check-reqs_export_vars
250 + check-reqs_pkg_setup
251 +}
252 +
253 +src_prepare() {
254 + cmake_src_prepare
255 +
256 + if use system-boost; then
257 + find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \
258 + | xargs --null sed -r \
259 + -e 's|Boost::|boost_|g' \
260 + -e 's|Boost_|boost_|g' \
261 + -e 's|[Bb]oost_boost|boost_system|g' -i || die
262 + fi
263 +
264 + sed -r -e "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
265 + -i src/bash_completion/CMakeLists.txt || die
266 +
267 + sed -e "s:objdump -p:$(tc-getOBJDUMP) -p:" -i CMakeLists.txt || die
268 +
269 + if ! use diskprediction; then
270 + rm -rf src/pybind/mgr/diskprediction_local || die
271 + fi
272 +
273 + # remove tests that need root access
274 + rm src/test/cli/ceph-authtool/cap*.t || die
275 +}
276 +
277 +ceph_src_configure() {
278 + local flag
279 + local mycmakeargs=(
280 + -DWITH_BABELTRACE=$(usex babeltrace)
281 + -DWITH_BLUESTORE_PMEM=$(usex pmdk)
282 + -DWITH_CEPHFS=$(usex cephfs)
283 + -DWITH_CEPHFS_SHELL=$(usex cephfs)
284 + -DWITH_DPDK=$(usex dpdk)
285 + -DWITH_SPDK=$(usex spdk)
286 + -DWITH_FUSE=$(usex fuse)
287 + -DWITH_LTTNG=$(usex lttng)
288 + -DWITH_GSSAPI=$(usex kerberos)
289 + -DWITH_GRAFANA=$(usex grafana)
290 + -DWITH_MGR=$(usex mgr)
291 + -DWITH_MGR_DASHBOARD_FRONTEND=OFF
292 + -DWITH_NUMA=$(usex numa)
293 + -DWITH_OPENLDAP=$(usex ldap)
294 + -DWITH_PYTHON3=3
295 + -DWITH_RADOSGW=$(usex radosgw)
296 + -DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq)
297 + -DWITH_RADOSGW_KAFKA_ENDPOINT=$(usex kafka)
298 + -DWITH_RBD_RWL=$(usex rbd-rwl)
299 + -DWITH_SSL=$(usex ssl)
300 + -DWITH_SYSTEMD=$(usex systemd)
301 + -DWITH_TESTS=$(usex test)
302 + -DWITH_LIBURING=$(usex uring)
303 + -DWITH_XFS=$(usex xfs)
304 + -DWITH_ZFS=$(usex zfs)
305 + -DENABLE_SHARED="ON"
306 + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
307 + -DWITH_SYSTEM_PMDK=$(usex pmdk 'YES' "$(usex rbd-rwl)")
308 + -DWITH_SYSTEM_BOOST=$(usex system-boost)
309 + -DBOOST_J=$(makeopts_jobs)
310 + -DWITH_SYSTEM_ROCKSDB=ON
311 + -DWITH_RDMA=OFF
312 + -DWITH_TBB=OFF
313 + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
314 + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=$(systemd_get_systemunitdir)
315 + -DEPYTHON_VERSION="${EPYTHON#python}"
316 + -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
317 + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
318 + -Wno-dev
319 + )
320 + if use amd64 || use x86; then
321 + for flag in ${CPU_FLAGS_X86[@]}; do
322 + mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
323 + done
324 + fi
325 +
326 + # needed for >=glibc-2.32
327 + has_version '>=sys-libs/glibc-2.32' && mycmakeargs+=(-DWITH_REENTRANT_STRSIGNAL:BOOL=ON)
328 +
329 + rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
330 + || die "failed to remove cmake cache"
331 +
332 + cmake_src_configure
333 +
334 + # bug #630232
335 + sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
336 + "${BUILD_DIR:-${S}}"/include/acconfig.h \
337 + || die "sed failed"
338 +}
339 +
340 +src_configure() {
341 + use custom-cflags || strip-flags
342 + ceph_src_configure
343 +}
344 +
345 +python_compile() {
346 + local CMAKE_USE_DIR="${S}"
347 + ceph_src_configure
348 +
349 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
350 + emake VERBOSE=1 clean
351 + emake VERBOSE=1 all
352 +
353 + # python modules are only compiled with "make install" so we need to do this to
354 + # prevent doing a bunch of compilation in src_install
355 + DESTDIR="${T}" emake VERBOSE=1 install
356 + popd >/dev/null || die
357 +}
358 +
359 +src_compile() {
360 + cmake_build VERBOSE=1 all
361 +
362 + # we have to do this here to prevent from building everything multiple times
363 + python_copy_sources
364 + python_foreach_impl python_compile
365 +}
366 +
367 +src_test() {
368 + make check || die "make check failed"
369 +}
370 +
371 +python_install() {
372 + local CMAKE_USE_DIR="${S}"
373 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
374 + DESTDIR="${ED}" emake VERBOSE=1 install
375 + popd >/dev/null || die
376 +
377 + python_optimize
378 +}
379 +
380 +src_install() {
381 + cmake_src_install
382 + python_foreach_impl python_install
383 +
384 + find "${ED}" -name '*.la' -type f -delete || die
385 +
386 + exeinto /usr/$(get_libdir)/ceph
387 + newexe "${BUILD_DIR}/bin/init-ceph" init-ceph
388 +
389 + insinto /etc/logrotate.d/
390 + newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
391 +
392 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
393 +
394 + fowners -R ceph:ceph /var/log/ceph
395 +
396 + newinitd "${FILESDIR}/rbdmap.initd-r1" rbdmap
397 + newinitd "${FILESDIR}/${PN}.initd-r12" ${PN}
398 + newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
399 +
400 + insinto /etc/sysctl.d
401 + newins "${FILESDIR}"/sysctld 90-${PN}.conf
402 +
403 + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
404 +
405 + # units aren't installed by the build system unless systemd is enabled
406 + # so no point installing these with the USE flag disabled
407 + if use systemd; then
408 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
409 + "ceph-mds@.service"
410 +
411 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
412 + "ceph-osd@.service"
413 +
414 + fi
415 +
416 + udev_dorules udev/*.rules
417 + newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf
418 +
419 + readme.gentoo_create_doc
420 +
421 + python_setup
422 +
423 + # bug #630232
424 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \
425 + || die "sed failed"
426 +
427 + python_fix_shebang "${ED}"/usr/{,s}bin/
428 +
429 + # python_fix_shebang apparently is not idempotent
430 + local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]'
431 + grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \
432 + | xargs --null --no-run-if-empty -- sed -i -r "s:${shebang_regex}:\1:" || die
433 +
434 + local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* )
435 + dostrip -x "${rados_classes[@]#${ED}}"
436 +}
437 +
438 +pkg_postinst() {
439 + readme.gentoo_print_elog
440 + tmpfiles_process ${PN}.conf
441 +}