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: Mon, 21 Dec 2020 20:20:36
Message-Id: 1608582026.50f847ad01620846c600c4eb753191576b21de29.chutzpah@gentoo
1 commit: 50f847ad01620846c600c4eb753191576b21de29
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Mon Dec 21 18:54:14 2020 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 21 20:20:26 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50f847ad
7
8 sys-cluster/ceph-14.2.16: Version bump
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-3.0.12, Repoman-3.0.2
12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
13
14 sys-cluster/ceph/Manifest | 1 +
15 sys-cluster/ceph/ceph-14.2.16.ebuild | 401 +++++++++++++++++++++++++++++++++++
16 2 files changed, 402 insertions(+)
17
18 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
19 index 1715f2f0619..27f0a4a37c1 100644
20 --- a/sys-cluster/ceph/Manifest
21 +++ b/sys-cluster/ceph/Manifest
22 @@ -1,4 +1,5 @@
23 DIST ceph-14.2.11.tar.gz 129327263 BLAKE2B fb04f3fde6642905dd21836c7472cf3b6cb484f69367ecf01b7d427c757e0fd1db4bd483bf9b0e485e1f8924a8e9201e8d47713a1de9281d5d96e45939bd1078 SHA512 765e8982d457cfd900acddc8f82c23824b32dc6d925d45e7693cba48c06fab798b6d57991dc9ad18a9ace9aff6fb2b917bd97f2d6435a7caceb03c9733e9602a
24 DIST ceph-14.2.13.tar.gz 129255298 BLAKE2B 32d12ede10ff657e9341e2fc31412018041a327a4c62219105a4e9576fa46643c12b936c3eaa003a78677c4ef401ef6bd73fe150604e8031482f1d237d483ff1 SHA512 3d51b729ccf26aa9a40c1320f4051755ec405abc714ae5257ec5433a13549e34fed0945f3091525fd8118d00c36fe4ae793125728d9e17f4221cdd1ee7de5b12
25 DIST ceph-14.2.15.tar.gz 129254705 BLAKE2B bb30f04ace31c2175c6678a9f252fc31951fd32f47362fb460ed9b8edec3a6535752d28214530e9b996c384a6e6a23eebce5caa89cb2746a2e258f5a1e1f8a3c SHA512 20ac9244974cc1312b7c642acf00142f5b7f59b09ae338f73b6c8e1ee2054b4ebd62701b18653cc792ca575a77b98644903ebb11bee6a9f1ab3aec6b37a2ef1b
26 +DIST ceph-14.2.16.tar.gz 130220625 BLAKE2B 30fcf971dd3ebaad8decf0d8d3ade1b554c0f97844db037ca618fd3f133964c08248067dc82c525cbc7deb04949a3a3d07850a5f56e75bcb8e359957d31df85f SHA512 94cab2c9711f5ee2c826ee27b474676c7bb8507c0761ed8d0a520a7e5182c4b353402061ffafbe9b95ac45603f023015752bffbbe0936f4835dfafc9476d3275
27 DIST ceph-15.2.7.tar.gz 148140871 BLAKE2B 2a86b1af8b2ac70ac101fce8b8e048a2be4bdb8eea65e7461d7a8f71eeafdab44c7c20a23d4f08cfbdcb9bab253d24b1af66eaa23586bb64c634afdec658e916 SHA512 bfe07cefcd603d773216a2b1d49fb32bdf1185dfb69b30d5362eb48d3afa2984cebffb598f7d68bfbd9afdc2f29975130a585a9b83724ca6a3f59163895c0de0
28
29 diff --git a/sys-cluster/ceph/ceph-14.2.16.ebuild b/sys-cluster/ceph/ceph-14.2.16.ebuild
30 new file mode 100644
31 index 00000000000..ee4c404caa6
32 --- /dev/null
33 +++ b/sys-cluster/ceph/ceph-14.2.16.ebuild
34 @@ -0,0 +1,401 @@
35 +# Copyright 1999-2020 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +PYTHON_COMPAT=( python3_{6,7,8} )
40 +DISTUTILS_USE_SETUPTOOLS=rdepend
41 +CMAKE_MAKEFILE_GENERATOR=emake
42 +
43 +DISTUTILS_OPTIONAL=1
44 +
45 +inherit check-reqs bash-completion-r1 cmake distutils-r1 flag-o-matic \
46 + python-r1 udev readme.gentoo-r1 toolchain-funcs systemd tmpfiles
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 ~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 libressl lttng +mgr numa +openssl rabbitmq +radosgw +ssl
67 + spdk system-boost systemd +tcmalloc test 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/zstd:=
78 + app-shells/bash:0
79 + app-misc/jq:=
80 + dev-libs/crypto++:=
81 + dev-libs/rocksdb:=
82 + dev-libs/leveldb:=[snappy,tcmalloc(-)?]
83 + dev-libs/libaio:=
84 + dev-libs/libnl:3=
85 + dev-libs/libxml2:=
86 + dev-libs/xmlsec:=[!openssl?,!libressl?]
87 + dev-cpp/yaml-cpp:=
88 + dev-libs/nss:=
89 + dev-libs/protobuf:=
90 + net-dns/c-ares:=
91 + net-libs/gnutls:=
92 + sys-auth/oath-toolkit:=
93 + sys-apps/coreutils
94 + sys-apps/grep
95 + sys-apps/hwloc:=
96 + sys-apps/keyutils:=
97 + sys-apps/util-linux:=
98 + sys-apps/sed
99 + sys-apps/util-linux
100 + sys-libs/libcap-ng:=
101 + sys-libs/ncurses:0=
102 + sys-libs/zlib:=
103 + sys-process/numactl:=
104 + x11-libs/libpciaccess:=
105 + babeltrace? ( dev-util/babeltrace )
106 + fuse? ( sys-fs/fuse:0= )
107 + jemalloc? ( dev-libs/jemalloc:= )
108 + !jemalloc? ( >=dev-util/google-perftools-2.6.1:= )
109 + kafka? ( dev-libs/librdkafka:= )
110 + kerberos? ( virtual/krb5 )
111 + ldap? ( net-nds/openldap:= )
112 + lttng? ( dev-util/lttng-ust:= )
113 + rabbitmq? ( net-libs/rabbitmq-c:= )
114 + radosgw? (
115 + dev-libs/expat:=
116 + openssl? (
117 + dev-libs/openssl:=
118 + net-misc/curl:=[curl_ssl_openssl]
119 + )
120 + libressl? (
121 + dev-libs/libressl:=
122 + net-misc/curl:=[curl_ssl_libressl]
123 + )
124 + )
125 + ssl? (
126 + openssl? ( dev-libs/openssl:= )
127 + libressl? ( dev-libs/libressl:= )
128 + )
129 + system-boost? ( =dev-libs/boost-1.72*[threads,context,python,${PYTHON_USEDEP}] )
130 + xfs? ( sys-fs/xfsprogs:= )
131 + zfs? ( sys-fs/zfs:= )
132 + ${PYTHON_DEPS}
133 +"
134 +BDEPEND="
135 + amd64? ( dev-lang/yasm )
136 + x86? ( dev-lang/yasm )
137 + app-arch/cpio
138 + >=dev-util/cmake-3.5.0
139 + dev-python/cython[${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/findutils
147 + sys-apps/grep
148 + sys-apps/sed
149 + sys-apps/which
150 + sys-devel/bc
151 + sys-devel/patch
152 + virtual/pkgconfig
153 + test? (
154 + dev-python/coverage[${PYTHON_USEDEP}]
155 + dev-python/virtualenv[${PYTHON_USEDEP}]
156 + dev-python/requests-mock[${PYTHON_USEDEP}]
157 + sys-apps/grep[pcre]
158 + sys-fs/btrfs-progs
159 + )
160 +"
161 +RDEPEND="${DEPEND}
162 + app-admin/sudo
163 + net-misc/socat
164 + sys-apps/gptfdisk
165 + >=sys-apps/smartmontools-7.0
166 + sys-block/parted
167 + sys-fs/cryptsetup
168 + sys-fs/lsscsi
169 + sys-fs/lvm2[-device-mapper-only(-)]
170 + virtual/awk
171 + dev-python/bcrypt[${PYTHON_USEDEP}]
172 + dev-python/cherrypy[${PYTHON_USEDEP}]
173 + dev-python/flask[${PYTHON_USEDEP}]
174 + dev-python/jinja[${PYTHON_USEDEP}]
175 + dev-python/pecan[${PYTHON_USEDEP}]
176 + dev-python/prettytable[${PYTHON_USEDEP}]
177 + dev-python/pyopenssl[${PYTHON_USEDEP}]
178 + dev-python/requests[${PYTHON_USEDEP}]
179 + dev-python/werkzeug[${PYTHON_USEDEP}]
180 + mgr? (
181 + dev-python/more-itertools[${PYTHON_USEDEP}]
182 + dev-python/numpy[${PYTHON_USEDEP}]
183 + dev-python/pyjwt[${PYTHON_USEDEP}]
184 + dev-python/pyyaml[${PYTHON_USEDEP}]
185 + dev-python/routes[${PYTHON_USEDEP}]
186 + diskprediction? (
187 + $(python_gen_cond_dep '<dev-python/scipy-1.4.0[${PYTHON_USEDEP}]' python3_{6,7})
188 + )
189 + sci-libs/scikit-learn[${PYTHON_USEDEP}]
190 + dev-python/six[${PYTHON_USEDEP}]
191 + )
192 +"
193 +# diskprediction needs older scipy not compatible with py38
194 +# bug #724438
195 +REQUIRED_USE="
196 + ${PYTHON_REQUIRED_USE}
197 + ?? ( jemalloc tcmalloc )
198 + ^^ ( openssl libressl )
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-14.2.0-mgr-python-version.patch"
224 + "${FILESDIR}/ceph-14.2.5-no-virtualenvs.patch"
225 + "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
226 + "${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch"
227 + "${FILESDIR}/ceph-14.2.0-link-crc32-statically.patch"
228 + "${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
229 + "${FILESDIR}/ceph-14.2.3-dpdk-compile-fix-1.patch"
230 + "${FILESDIR}/ceph-14.2.4-python-executable.patch"
231 + "${FILESDIR}/ceph-14.2.4-undefined-behaviour.patch"
232 + "${FILESDIR}/ceph-14.2.10-build-without-mgr.patch"
233 + "${FILESDIR}/ceph-14.2.11-systemd-unit-fix.patch"
234 +)
235 +
236 +check-reqs_export_vars() {
237 + CHECKREQS_DISK_BUILD="5200M"
238 + CHECKREQS_DISK_USR="510M"
239 +
240 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
241 +}
242 +
243 +pkg_pretend() {
244 + check-reqs_export_vars
245 + check-reqs_pkg_pretend
246 +}
247 +
248 +pkg_setup() {
249 + python_setup
250 + check-reqs_export_vars
251 + check-reqs_pkg_setup
252 +}
253 +
254 +src_prepare() {
255 + cmake_src_prepare
256 +
257 + if use system-boost; then
258 + find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \
259 + | xargs --null sed -r \
260 + -e 's|Boost::|boost_|g' \
261 + -e 's|Boost_|boost_|g' \
262 + -e 's|[Bb]oost_boost|boost_system|g' -i || die
263 + fi
264 +
265 + sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
266 + src/bash_completion/CMakeLists.txt || die
267 +
268 + if ! use diskprediction; then
269 + rm -rf src/pybind/mgr/diskprediction_local || die
270 + fi
271 +
272 + # remove tests that need root access
273 + rm src/test/cli/ceph-authtool/cap*.t || die
274 +}
275 +
276 +ceph_src_configure() {
277 + local flag
278 + local mycmakeargs=(
279 + -DWITH_BABELTRACE=$(usex babeltrace)
280 + -DWITH_CEPHFS=$(usex cephfs)
281 + -DWITH_CEPHFS_SHELL=$(usex cephfs)
282 + -DWITH_DPDK=$(usex dpdk)
283 + -DWITH_SPDK=$(usex spdk)
284 + -DWITH_FUSE=$(usex fuse)
285 + -DWITH_LTTNG=$(usex lttng)
286 + -DWITH_GSSAPI=$(usex kerberos)
287 + -DWITH_GRAFANA=$(usex grafana)
288 + -DWITH_MGR=$(usex mgr)
289 + -DWITH_MGR_DASHBOARD_FRONTEND=OFF
290 + -DWITH_NUMA=$(usex numa)
291 + -DWITH_OPENLDAP=$(usex ldap)
292 + -DWITH_PYTHON3=3
293 + -DWITH_RADOSGW=$(usex radosgw)
294 + -DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq)
295 + -DWITH_RADOSGW_KAFKA_ENDPOINT=$(usex kafka)
296 + -DWITH_SSL=$(usex ssl)
297 + -DWITH_SYSTEMD=$(usex systemd)
298 + -DWITH_TESTS=$(usex test)
299 + -DWITH_XFS=$(usex xfs)
300 + -DWITH_ZFS=$(usex zfs)
301 + -DENABLE_SHARED="ON"
302 + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
303 + -DWITH_SYSTEM_BOOST=$(usex system-boost)
304 + -DBOOST_J=$(makeopts_jobs)
305 + -DWITH_SYSTEM_ROCKSDB=ON
306 + -DWITH_RDMA=OFF
307 + -DWITH_TBB=OFF
308 + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
309 + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=$(systemd_get_systemunitdir)
310 + -DEPYTHON_VERSION="${EPYTHON#python}"
311 + -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
312 + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
313 + -Wno-dev
314 + )
315 + if use amd64 || use x86; then
316 + for flag in ${CPU_FLAGS_X86[@]}; do
317 + mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
318 + done
319 + fi
320 +
321 + # needed for >=glibc-2.32
322 + has_version '>=sys-libs/glibc-2.32' && mycmakeargs+=(-DWITH_REENTRANT_STRSIGNAL:BOOL=ON)
323 +
324 + rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
325 + || die "failed to remove cmake cache"
326 +
327 + cmake_src_configure
328 +
329 + # bug #630232
330 + sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
331 + "${BUILD_DIR:-${S}}"/include/acconfig.h \
332 + || die "sed failed"
333 +}
334 +
335 +src_configure() {
336 + use custom-cflags || strip-flags
337 + ceph_src_configure
338 +}
339 +
340 +python_compile() {
341 + local CMAKE_USE_DIR="${S}"
342 + ceph_src_configure
343 +
344 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
345 + emake VERBOSE=1 clean
346 + emake VERBOSE=1 all
347 +
348 + # python modules are only compiled with "make install" so we need to do this to
349 + # prevent doing a bunch of compilation in src_install
350 + DESTDIR="${T}" emake VERBOSE=1 install
351 + popd >/dev/null || die
352 +}
353 +
354 +src_compile() {
355 + cmake_build VERBOSE=1 all
356 +
357 + # we have to do this here to prevent from building everything multiple times
358 + python_copy_sources
359 + python_foreach_impl python_compile
360 +}
361 +
362 +src_test() {
363 + make check || die "make check failed"
364 +}
365 +
366 +python_install() {
367 + local CMAKE_USE_DIR="${S}"
368 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
369 + DESTDIR="${ED}" emake VERBOSE=1 install
370 + popd >/dev/null || die
371 +
372 + python_optimize
373 +}
374 +
375 +src_install() {
376 + cmake_src_install
377 + python_foreach_impl python_install
378 +
379 + find "${ED}" -name '*.la' -type f -delete || die
380 +
381 + exeinto /usr/$(get_libdir)/ceph
382 + newexe "${BUILD_DIR}/bin/init-ceph" init-ceph
383 +
384 + insinto /etc/logrotate.d/
385 + newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
386 +
387 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
388 +
389 + fowners -R ceph:ceph /var/log/ceph
390 +
391 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
392 + newinitd "${FILESDIR}/${PN}.initd-r12" ${PN}
393 + newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
394 +
395 + insinto /etc/sysctl.d
396 + newins "${FILESDIR}"/sysctld 90-${PN}.conf
397 +
398 + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
399 +
400 + # units aren't installed by the build system unless systemd is enabled
401 + # so no point installing these with the USE flag disabled
402 + if use systemd; then
403 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
404 + "ceph-mds@.service"
405 +
406 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
407 + "ceph-osd@.service"
408 +
409 + fi
410 +
411 + udev_dorules udev/*.rules
412 + newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf
413 +
414 + readme.gentoo_create_doc
415 +
416 + python_setup
417 +
418 + # bug #630232
419 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \
420 + || die "sed failed"
421 +
422 + python_fix_shebang "${ED}"/usr/{,s}bin/
423 +
424 + # python_fix_shebang apparently is not idempotent
425 + local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]'
426 + grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \
427 + | xargs --null --no-run-if-empty -- sed -i -r "s:${shebang_regex}:\1:" || die
428 +
429 + local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* )
430 + dostrip -x "${rados_classes[@]#${ED}}"
431 +}
432 +
433 +pkg_postinst() {
434 + readme.gentoo_print_elog
435 +}