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: Fri, 15 Mar 2019 21:18:54
Message-Id: 1552684716.0e9f26758cdc285372757707d8e0db28475f91ac.chutzpah@gentoo
1 commit: 0e9f26758cdc285372757707d8e0db28475f91ac
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Fri Mar 15 21:15:22 2019 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 15 21:18:36 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e9f2675
7
8 sys-cluster/ceph: Version bump to 13.2.5
9
10 Remove dependency on nodejs (bug #675744)
11
12 Bug: https://bugs.gentoo.org/675744
13 Copyright: Sony Interactive Entertainment Inc.
14 Package-Manager: Portage-2.3.62, Repoman-2.3.12
15 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
16
17 sys-cluster/ceph/Manifest | 1 +
18 sys-cluster/ceph/ceph-13.2.5.ebuild | 322 ++++++++++++++++++++++++++++++++++++
19 2 files changed, 323 insertions(+)
20
21 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
22 index fd8e0ccbd0a..14f64964442 100644
23 --- a/sys-cluster/ceph/Manifest
24 +++ b/sys-cluster/ceph/Manifest
25 @@ -10,3 +10,4 @@ DIST ceph-13.2.1.tar.gz 90786830 BLAKE2B e0884a039ff0e8a1705d8f31f4dcf4cd8ab8989
26 DIST ceph-13.2.2-frontend-node-modules.tar.xz 45100632 BLAKE2B c3929a6c5e6ec3da5ff60967ae40b99377b2186f31e64af571d9be14889d90bc48b570489aea300ead8e99afc0e62db4438cf343686757a39d84889e772c7fa9 SHA512 93eabc2010c0977c2980c739e131d231a809e375c42120e81effc6cecdeaf0e50b4f8c88286993ef60f1ffaede94f637475104e09fd7af58a289350bd670bf2f
27 DIST ceph-13.2.2.tar.gz 90840817 BLAKE2B db5933f358a1ae6888030bca7522e20545a2e107055dca44b371e295537c854568682fa558d3f90193e0dfe618947918ce21816b5e20795fff8a14bc837216bb SHA512 37c4845ae52550428c7f1e0d77d9d671ea1d6f5cad5bce0713dce97b54f3abe7346daa2cbd44b76638fb74fe7bdc4797033a4bf808253cfc8bec0fa495ec7e03
28 DIST ceph-13.2.4.tar.gz 90910119 BLAKE2B eb395f435552d91789869bd92fee2a8b2fef155205f13b118bd01be4ff78a8e1dde682425a24311822bb819ec8cf41a9d45245ffa3cb7a921d3269f6658bf920 SHA512 5055979067234ad7fd2774007d524ef4643d968bf7ce42fc8c3f8e469fd84cbd7afc163cd6ddda53584bd5677fdea2fecf8194a378d49724504f639b9f688ff7
29 +DIST ceph-13.2.5.tar.gz 91006057 BLAKE2B 68551e2f54d78aff7b0e9ec3c62e6a3394dd7c23e80924a5b400cd9666a05a42e5f22445deee4040f1b78201c6a6660b283109878d4c92d845821bff831c8a5e SHA512 6daea524523f829e725609328ea71f416b2c3a9530fa8956720a7bc69dc08e55a169654f500704579dc9ba693f04eedd7e04614c0850e9ab1169cd45f19039f8
30
31 diff --git a/sys-cluster/ceph/ceph-13.2.5.ebuild b/sys-cluster/ceph/ceph-13.2.5.ebuild
32 new file mode 100644
33 index 00000000000..cca90b166f0
34 --- /dev/null
35 +++ b/sys-cluster/ceph/ceph-13.2.5.ebuild
36 @@ -0,0 +1,322 @@
37 +# Copyright 1999-2019 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=6
41 +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
42 +DISTUTILS_OPTIONAL=1
43 +
44 +inherit check-reqs bash-completion-r1 cmake-utils distutils-r1 flag-o-matic \
45 + multiprocessing python-r1 udev user readme.gentoo-r1 toolchain-funcs \
46 + systemd
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 ~x86"
55 +fi
56 +
57 +DESCRIPTION="Ceph distributed filesystem"
58 +HOMEPAGE="https://ceph.com/"
59 +
60 +LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 BSD Boost-1.0 MIT"
61 +SLOT="0"
62 +
63 +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
64 +
65 +IUSE="babeltrace cephfs dpdk fuse jemalloc ldap lttng +mgr"
66 +IUSE+=" +radosgw +ssl static-libs +system-boost systemd +tcmalloc test"
67 +IUSE+=" xfs zfs"
68 +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
69 +
70 +# unbundling code commented out pending bugs 584056 and 584058
71 +#>=dev-libs/jerasure-2.0.0-r1
72 +#>=dev-libs/gf-complete-2.0.0
73 +COMMON_DEPEND="
74 + virtual/libudev:=
75 + app-arch/bzip2:=[static-libs?]
76 + app-arch/lz4:=[static-libs?]
77 + app-arch/snappy:=[static-libs?]
78 + app-arch/zstd:=[static-libs?]
79 + app-misc/jq:=[static-libs?]
80 + dev-libs/crypto++:=[static-libs?]
81 + dev-libs/leveldb:=[snappy,static-libs?,tcmalloc?]
82 + dev-libs/libaio:=[static-libs?]
83 + dev-libs/libxml2:=[static-libs?]
84 + dev-libs/nss:=
85 + sys-auth/oath-toolkit:=
86 + sys-apps/keyutils:=[static-libs?]
87 + sys-apps/util-linux:=[static-libs?]
88 + sys-libs/zlib:=[static-libs?]
89 + babeltrace? ( dev-util/babeltrace )
90 + ldap? ( net-nds/openldap:=[static-libs?] )
91 + lttng? ( dev-util/lttng-ust:= )
92 + fuse? ( sys-fs/fuse:0=[static-libs?] )
93 + ssl? ( dev-libs/openssl:=[static-libs?] )
94 + xfs? ( sys-fs/xfsprogs:=[static-libs?] )
95 + zfs? ( sys-fs/zfs:=[static-libs?] )
96 + radosgw? (
97 + dev-libs/expat:=[static-libs?]
98 + dev-libs/openssl:=[static-libs?]
99 + net-misc/curl:=[curl_ssl_openssl,static-libs?]
100 + )
101 + system-boost? (
102 + >=dev-libs/boost-1.67:=[threads,context,python,static-libs?,${PYTHON_USEDEP}]
103 + )
104 + jemalloc? ( dev-libs/jemalloc:=[static-libs?] )
105 + !jemalloc? ( >=dev-util/google-perftools-2.4:=[static-libs?] )
106 + ${PYTHON_DEPS}
107 + "
108 +DEPEND="${COMMON_DEPEND}
109 + amd64? ( dev-lang/yasm )
110 + x86? ( dev-lang/yasm )
111 + app-arch/cpio
112 + dev-python/cython[${PYTHON_USEDEP}]
113 + dev-python/sphinx
114 + dev-util/cunit
115 + dev-util/gperf
116 + dev-util/valgrind
117 + sys-apps/which
118 + sys-devel/bc
119 + virtual/pkgconfig
120 + test? (
121 + dev-python/coverage[${PYTHON_USEDEP}]
122 + dev-python/tox[${PYTHON_USEDEP}]
123 + dev-python/virtualenv[${PYTHON_USEDEP}]
124 + sys-apps/grep[pcre]
125 + sys-fs/btrfs-progs
126 + )"
127 +RDEPEND="${COMMON_DEPEND}
128 + net-misc/socat
129 + sys-apps/gptfdisk
130 + sys-block/parted
131 + sys-fs/cryptsetup
132 + sys-fs/lvm2
133 + !<sys-apps/openrc-0.26.3
134 + dev-python/bcrypt[${PYTHON_USEDEP}]
135 + dev-python/cherrypy[${PYTHON_USEDEP}]
136 + dev-python/flask[${PYTHON_USEDEP}]
137 + dev-python/jinja[${PYTHON_USEDEP}]
138 + dev-python/pecan[${PYTHON_USEDEP}]
139 + dev-python/prettytable[${PYTHON_USEDEP}]
140 + dev-python/pyopenssl[${PYTHON_USEDEP}]
141 + dev-python/requests[${PYTHON_USEDEP}]
142 + dev-python/werkzeug[${PYTHON_USEDEP}]
143 + "
144 +REQUIRED_USE="
145 + ${PYTHON_REQUIRED_USE}
146 + || ( $(python_gen_useflags 'python3*') )
147 + ?? ( jemalloc tcmalloc )
148 + "
149 +
150 +# the tests need root access
151 +RESTRICT="test? ( userpriv )"
152 +
153 +# distribution tarball does not include everything needed for tests
154 +RESTRICT+=" test"
155 +
156 +# false positives unless all USE flags are on
157 +CMAKE_WARN_UNUSED_CLI="no"
158 +
159 +STRIP_MASK="/usr/lib*/rados-classes/*"
160 +
161 +UNBUNDLE_LIBS=(
162 + src/erasure-code/jerasure/jerasure
163 + src/erasure-code/jerasure/gf-complete
164 +)
165 +
166 +PATCHES=(
167 + "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
168 + "${FILESDIR}/ceph-12.2.0-cflags.patch"
169 + "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
170 + "${FILESDIR}/ceph-13.2.0-cflags.patch"
171 + "${FILESDIR}/ceph-12.2.4-rocksdb-cflags.patch"
172 + "${FILESDIR}/ceph-13.2.0-mgr-python-version.patch"
173 + "${FILESDIR}/ceph-13.2.0-no-virtualenvs.patch"
174 + "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
175 +)
176 +
177 +check-reqs_export_vars() {
178 + if use amd64; then
179 + CHECKREQS_DISK_BUILD="12G"
180 + CHECKREQS_DISK_USR="460M"
181 + else
182 + CHECKREQS_DISK_BUILD="1400M"
183 + CHECKREQS_DISK_USR="450M"
184 + fi
185 +
186 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
187 +}
188 +
189 +user_setup() {
190 + enewgroup ceph ${CEPH_GID}
191 + enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph
192 +}
193 +
194 +pkg_pretend() {
195 + check-reqs_export_vars
196 + check-reqs_pkg_pretend
197 +}
198 +
199 +pkg_setup() {
200 + python_setup 'python3*'
201 + check-reqs_export_vars
202 + check-reqs_pkg_setup
203 + user_setup
204 +}
205 +
206 +src_prepare() {
207 + cmake-utils_src_prepare
208 +
209 + if use system-boost; then
210 + eapply "${FILESDIR}/ceph-13.2.0-boost-sonames.patch"
211 + fi
212 +
213 + sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
214 + src/bash_completion/CMakeLists.txt || die
215 +
216 + # remove tests that need root access
217 + rm src/test/cli/ceph-authtool/cap*.t || die
218 +
219 + #rm -rf "${UNBUNDLE_LIBS[@]}"
220 +}
221 +
222 +ceph_src_configure() {
223 + local flag
224 + local mycmakeargs=(
225 + -DWITH_BABELTRACE=$(usex babeltrace)
226 + -DWITH_CEPHFS=$(usex cephfs)
227 + -DWITH_DPDK=$(usex dpdk)
228 + -DWITH_FUSE=$(usex fuse)
229 + -DWITH_LTTNG=$(usex lttng)
230 + -DWITH_MGR=$(usex mgr)
231 + -DWITH_MGR_DASHBOARD_FRONTEND=NO
232 + -DWITH_OPENLDAP=$(usex ldap)
233 + -DWITH_RADOSGW=$(usex radosgw)
234 + -DWITH_SSL=$(usex ssl)
235 + -DWITH_SYSTEMD=$(usex systemd)
236 + -DWITH_TESTS=$(usex test)
237 + -DWITH_XFS=$(usex xfs)
238 + -DWITH_ZFS=$(usex zfs)
239 + -DENABLE_SHARED=$(usex static-libs '' 'yes' 'no')
240 + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
241 + -DWITH_SYSTEM_BOOST=$(usex system-boost)
242 + -DBOOST_J=$(makeopts_jobs)
243 + -DWITH_RDMA=no
244 + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
245 + -DEPYTHON_VERSION="${EPYTHON#python}"
246 + -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${P}"
247 + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
248 + -Wno-dev
249 + )
250 + if use amd64 || use x86; then
251 + for flag in ${CPU_FLAGS_X86[@]}; do
252 + mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
253 + done
254 + fi
255 +
256 + rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt"
257 + cmake-utils_src_configure
258 +
259 + # bug #630232
260 + sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
261 + "${BUILD_DIR:-${CMAKE_BUILD_DIR:-${S}}}"/include/acconfig.h \
262 + || die "sed failed"
263 +}
264 +
265 +src_configure() {
266 + ceph_src_configure
267 +}
268 +
269 +python_compile() {
270 + local CMAKE_USE_DIR="${S}"
271 + ceph_src_configure
272 +
273 + rm -r "${BUILD_DIR}/lib/cython_modules" || die
274 +
275 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
276 + emake VERBOSE=1 clean
277 + emake VERBOSE=1 all
278 +
279 + # python modules are only compiled with "make install" so we need to do this to
280 + # prevent doing a bunch of compilation in src_install
281 + DESTDIR="${T}" emake VERBOSE=1 install
282 + popd >/dev/null || die
283 +}
284 +
285 +src_compile() {
286 + cmake-utils_src_make VERBOSE=1 all
287 +
288 + # we have to do this here to prevent from building everything multiple times
289 + BUILD_DIR="${CMAKE_BUILD_DIR}" python_copy_sources
290 + python_foreach_impl python_compile
291 +}
292 +
293 +src_test() {
294 + make check || die "make check failed"
295 +}
296 +
297 +python_install() {
298 + local CMAKE_USE_DIR="${S}"
299 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
300 + DESTDIR="${ED}" emake install
301 + popd >/dev/null || die
302 +}
303 +
304 +src_install() {
305 + cmake-utils_src_install
306 + python_foreach_impl python_install
307 +
308 + prune_libtool_files --all
309 +
310 + exeinto /usr/$(get_libdir)/ceph
311 + newexe "${CMAKE_BUILD_DIR}/bin/init-ceph" ceph_init.sh
312 +
313 + insinto /etc/logrotate.d/
314 + newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
315 +
316 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
317 +
318 + fowners -R ceph:ceph /var/lib/ceph /var/log/ceph
319 +
320 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
321 + newinitd "${FILESDIR}/${PN}.initd-r11" ${PN}
322 + newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
323 +
324 + insinto /etc/sysctl.d
325 + newins "${FILESDIR}"/sysctld 90-${PN}.conf
326 +
327 + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
328 +
329 + # units aren't installed by the build system unless systemd is enabled
330 + # so no point installing these with the USE flag disabled
331 + if use systemd; then
332 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
333 + "ceph-mds@.service"
334 +
335 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
336 + "ceph-osd@.service"
337 + fi
338 +
339 + udev_dorules udev/*.rules
340 +
341 + readme.gentoo_create_doc
342 +
343 + python_setup 'python3*'
344 +
345 + # bug #630232
346 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph \
347 + || die "sed failed"
348 +
349 + python_fix_shebang "${ED}"/usr/{,s}bin/
350 +
351 + # python_fix_shebang apparently is not idempotent
352 + sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \
353 + "${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed"
354 +}
355 +
356 +pkg_postinst() {
357 + readme.gentoo_print_elog
358 +}