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: Tue, 31 Jul 2018 23:54:07
Message-Id: 1533080621.7833f7fabee43f2fa1a53ae1a7cc54544c957d3c.chutzpah@gentoo
1 commit: 7833f7fabee43f2fa1a53ae1a7cc54544c957d3c
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 31 23:05:20 2018 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 31 23:43:41 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7833f7fa
7
8 sys-cluster/ceph: Version bump to 13.2.1
9
10 Bug: https://bugs.gentoo.org/638750
11
12 Package-Manager: Portage-2.3.44, Repoman-2.3.10
13
14 sys-cluster/ceph/Manifest | 2 +
15 sys-cluster/ceph/ceph-13.2.1.ebuild | 348 ++++++++++++++++++++++++++++++++++++
16 sys-cluster/ceph/metadata.xml | 2 +-
17 3 files changed, 351 insertions(+), 1 deletion(-)
18
19 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
20 index a648a5b1f70..437a4828096 100644
21 --- a/sys-cluster/ceph/Manifest
22 +++ b/sys-cluster/ceph/Manifest
23 @@ -9,3 +9,5 @@ DIST ceph-12.2.5.tar.gz 78758920 BLAKE2B 0e4a515ff80fdd39e8f1afd737434c7dc2a218f
24 DIST ceph-12.2.7.tar.gz 78783279 BLAKE2B 9058a5e408b3431cf0e8c28b44f95f6eb12f029697348eb6879efa9db4ad6a3b52b1040f484919a3f1781ac3a4aa72af3b8905760480fd3f3724dbceeab4eb07 SHA512 dde75a41c31cca54d4a680b0b93e28680a23f912a348cccca65e55e600c315bbfe3ced008d758fe8ba1e801a9d6e5f8079cc157ec5eef8916b86f487f42064ea
25 DIST ceph-13.2.0-frontend-node-modules.tar.xz 44082360 BLAKE2B 0f1bcf1c5154bdc352c9314853099b314b76c76cf1c3ee2447803ea5d79d02bbc91a0f8aefa6df96b47fc2d89e531354ac485752d2dbb762498d3eaba273635a SHA512 ad3c38b055ba886215aea07c4afb202cc3bfb64cdebc816eb4f124f76f2401e04e5645859b2a780828bf8eddcc0093b36d4d9935b703ac2bbc4212e913abeb8c
26 DIST ceph-13.2.0.tar.gz 89077825 BLAKE2B 07ee531a672e436df8f218ecb4a2425d33911771dcf9c63fa9fc36a868c93a101029d8a8c69fcea026882ac466e6032da76be0dc961ceb03845b955fb5762add SHA512 2524ad5a868024463e1a1edc5bd9c3f7bc1f58e47bf8d331902ed53206120abc6a427dd9c1d657131e67efd955d6ed8052b6c3fed8658aa905d58ac58ee62973
27 +DIST ceph-13.2.1-frontend-node-modules.tar.xz 44352460 BLAKE2B 0a0099e60f0b36d48928dcda3f69dbb00e14a9a9e10c688ecbeb3daa3adbe339655652a43924043fe140ce1754525be2abed61f1ad5f24779fa4ff890d2b7cf6 SHA512 3938e8cadb6385cdaf023fe55ab5f202e44ed80173b128e3b76fc4849556cea90ce5d8884a928b93776b0509b5aef814f1078ba5e44a9d644b43a871aea06dd9
28 +DIST ceph-13.2.1.tar.gz 90786830 BLAKE2B e0884a039ff0e8a1705d8f31f4dcf4cd8ab8989d7c2fa703417038ff9a6cf7b0fbca09abceb901970fbb2dd9a1dc87c2500fec38a2bfca86a9a6dcaab15be991 SHA512 411218ea6037bdf9425a741720ea89876e893e64fbfa518c9584ba581f805fde2c82b13ed47313279665e5d20f36223fc8d5c27055b580c72b22c2004e4da81b
29
30 diff --git a/sys-cluster/ceph/ceph-13.2.1.ebuild b/sys-cluster/ceph/ceph-13.2.1.ebuild
31 new file mode 100644
32 index 00000000000..15c74939685
33 --- /dev/null
34 +++ b/sys-cluster/ceph/ceph-13.2.1.ebuild
35 @@ -0,0 +1,348 @@
36 +# Copyright 1999-2018 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
41 +DISTUTILS_OPTIONAL=1
42 +
43 +inherit check-reqs cmake-utils distutils-r1 flag-o-matic multiprocessing \
44 + python-r1 udev user readme.gentoo-r1 toolchain-funcs systemd
45 +
46 +if [[ ${PV} == *9999* ]]; then
47 + inherit git-r3
48 + EGIT_REPO_URI="https://github.com/ceph/ceph.git"
49 + SRC_URI=""
50 +else
51 + SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz
52 + mgr-frontend? ( mirror://gentoo/${P}-frontend-node-modules.tar.xz )"
53 + KEYWORDS="~amd64 ~x86"
54 +fi
55 +
56 +DESCRIPTION="Ceph distributed filesystem"
57 +HOMEPAGE="https://ceph.com/"
58 +
59 +LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 BSD Boost-1.0 MIT"
60 +SLOT="0"
61 +
62 +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
63 +
64 +IUSE="babeltrace cephfs dpdk fuse jemalloc ldap lttng +mgr mgr-frontend"
65 +IUSE+=" +radosgw +ssl static-libs +system-boost systemd +tcmalloc test"
66 +IUSE+=" xfs zfs"
67 +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
68 +
69 +# unbundling code commented out pending bugs 584056 and 584058
70 +#>=dev-libs/jerasure-2.0.0-r1
71 +#>=dev-libs/gf-complete-2.0.0
72 +COMMON_DEPEND="
73 + virtual/libudev:=
74 + app-arch/bzip2:=[static-libs?]
75 + app-arch/lz4:=[static-libs?]
76 + app-arch/snappy:=[static-libs?]
77 + app-arch/zstd:=[static-libs?]
78 + app-misc/jq:=[static-libs?]
79 + dev-libs/crypto++:=[static-libs?]
80 + dev-libs/leveldb:=[snappy,static-libs?,tcmalloc?]
81 + dev-libs/libaio:=[static-libs?]
82 + dev-libs/libxml2:=[static-libs?]
83 + dev-libs/nss:=
84 + sys-auth/oath-toolkit:=
85 + sys-apps/keyutils:=[static-libs?]
86 + sys-apps/util-linux:=[static-libs?]
87 + sys-libs/zlib:=[static-libs?]
88 + babeltrace? ( dev-util/babeltrace )
89 + ldap? ( net-nds/openldap:=[static-libs?] )
90 + lttng? ( dev-util/lttng-ust:= )
91 + fuse? ( sys-fs/fuse:0=[static-libs?] )
92 + ssl? ( dev-libs/openssl:=[static-libs?] )
93 + xfs? ( sys-fs/xfsprogs:=[static-libs?] )
94 + zfs? ( sys-fs/zfs:=[static-libs?] )
95 + mgr? (
96 + <net-libs/nodejs-9.0
97 + >net-libs/nodejs-8.10
98 + )
99 + mgr-frontend? ( net-libs/nodejs[npm] )
100 + radosgw? (
101 + dev-libs/expat:=[static-libs?]
102 + dev-libs/openssl:=[static-libs?]
103 + net-misc/curl:=[curl_ssl_openssl,static-libs?]
104 + )
105 + system-boost? (
106 + >=dev-libs/boost-1.67:=[threads,context,python,static-libs?,${PYTHON_USEDEP}]
107 + )
108 + jemalloc? ( dev-libs/jemalloc:=[static-libs?] )
109 + !jemalloc? ( >=dev-util/google-perftools-2.4:=[static-libs?] )
110 + ${PYTHON_DEPS}
111 + "
112 +DEPEND="${COMMON_DEPEND}
113 + amd64? ( dev-lang/yasm )
114 + x86? ( dev-lang/yasm )
115 + app-arch/cpio
116 + dev-python/cython[${PYTHON_USEDEP}]
117 + dev-python/sphinx
118 + dev-util/cunit
119 + dev-util/gperf
120 + dev-util/valgrind
121 + sys-apps/which
122 + sys-devel/bc
123 + virtual/pkgconfig
124 + test? (
125 + dev-python/coverage[${PYTHON_USEDEP}]
126 + dev-python/tox[${PYTHON_USEDEP}]
127 + dev-python/virtualenv[${PYTHON_USEDEP}]
128 + sys-apps/grep[pcre]
129 + sys-fs/btrfs-progs
130 + )"
131 +RDEPEND="${COMMON_DEPEND}
132 + net-misc/socat
133 + sys-apps/gptfdisk
134 + sys-block/parted
135 + sys-fs/cryptsetup
136 + sys-fs/lvm2
137 + !<sys-apps/openrc-0.26.3
138 + dev-python/bcrypt[${PYTHON_USEDEP}]
139 + dev-python/cherrypy[${PYTHON_USEDEP}]
140 + dev-python/flask[${PYTHON_USEDEP}]
141 + dev-python/jinja[${PYTHON_USEDEP}]
142 + dev-python/pecan[${PYTHON_USEDEP}]
143 + dev-python/prettytable[${PYTHON_USEDEP}]
144 + dev-python/pyopenssl[${PYTHON_USEDEP}]
145 + dev-python/requests[${PYTHON_USEDEP}]
146 + dev-python/werkzeug[${PYTHON_USEDEP}]
147 + "
148 +REQUIRED_USE="
149 + ${PYTHON_REQUIRED_USE}
150 + || ( $(python_gen_useflags 'python3*') )
151 + mgr-frontend? ( mgr || ( $(python_gen_useflags 'python2*') ) )
152 + ?? ( jemalloc tcmalloc )
153 + "
154 +
155 +# currently does not configure without the mgr
156 +REQUIRED_USE+=" mgr"
157 +
158 +RESTRICT="test? ( userpriv )"
159 +
160 +# distribution tarball does not include everything needed for tests
161 +RESTRICT+=" test"
162 +
163 +# false positives unless all USE flags are on
164 +CMAKE_WARN_UNUSED_CLI="no"
165 +
166 +STRIP_MASK="/usr/lib*/rados-classes/*"
167 +
168 +UNBUNDLE_LIBS=(
169 + src/erasure-code/jerasure/jerasure
170 + src/erasure-code/jerasure/gf-complete
171 +)
172 +
173 +PATCHES=(
174 + "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
175 + "${FILESDIR}/ceph-12.2.0-cflags.patch"
176 + "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
177 + "${FILESDIR}/ceph-13.2.0-cflags.patch"
178 + "${FILESDIR}/ceph-12.2.4-rocksdb-cflags.patch"
179 + "${FILESDIR}/ceph-13.2.0-mgr-python-version.patch"
180 + "${FILESDIR}/ceph-13.2.0-no-virtualenvs.patch"
181 +)
182 +
183 +check-reqs_export_vars() {
184 + if use amd64; then
185 + CHECKREQS_DISK_BUILD="12G"
186 + CHECKREQS_DISK_USR="460M"
187 + else
188 + CHECKREQS_DISK_BUILD="1400M"
189 + CHECKREQS_DISK_USR="450M"
190 + fi
191 +
192 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
193 +}
194 +
195 +user_setup() {
196 + enewgroup ceph ${CEPH_GID}
197 + enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph
198 +}
199 +
200 +pkg_pretend() {
201 + check-reqs_export_vars
202 + check-reqs_pkg_pretend
203 +}
204 +
205 +pkg_setup() {
206 + python_setup 'python3*'
207 + check-reqs_export_vars
208 + check-reqs_pkg_setup
209 + user_setup
210 +}
211 +
212 +src_prepare() {
213 + cmake-utils_src_prepare
214 +
215 + if use system-boost; then
216 + eapply "${FILESDIR}/ceph-13.2.0-boost-sonames.patch"
217 + fi
218 +
219 + # remove tests that need root access
220 + rm src/test/cli/ceph-authtool/cap*.t || die
221 +
222 + #rm -rf "${UNBUNDLE_LIBS[@]}"
223 +}
224 +
225 +ceph_src_configure() {
226 + local flag
227 + local mycmakeargs=(
228 + -DWITH_BABELTRACE=$(usex babeltrace)
229 + -DWITH_CEPHFS=$(usex cephfs)
230 + -DWITH_DPDK=$(usex dpdk)
231 + -DWITH_FUSE=$(usex fuse)
232 + -DWITH_LTTNG=$(usex lttng)
233 + -DWITH_MGR=$(usex mgr)
234 + -DWITH_MGR_DASHBOARD_FRONTEND=$(usex mgr-frontend)
235 + -DWITH_OPENLDAP=$(usex ldap)
236 + -DWITH_RADOSGW=$(usex radosgw)
237 + -DWITH_SSL=$(usex ssl)
238 + -DWITH_SYSTEMD=$(usex systemd)
239 + -DWITH_TESTS=$(usex test)
240 + -DWITH_XFS=$(usex xfs)
241 + -DWITH_ZFS=$(usex zfs)
242 + -DENABLE_SHARED=$(usex static-libs '' 'yes' 'no')
243 + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
244 + -DWITH_SYSTEM_BOOST=$(usex system-boost)
245 + -DBOOST_J=$(makeopts_jobs)
246 + -DWITH_RDMA=no
247 + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
248 + -DEPYTHON_VERSION="${EPYTHON#python}"
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 +
272 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
273 + emake VERBOSE=1 all
274 +
275 + # python modules are only compiled with "make install" so we need to do this to
276 + # prevent doing a bunch of compilation in src_install
277 + DESTDIR="${T}" emake VERBOSE=1 install
278 + popd >/dev/null || die
279 +}
280 +
281 +src_compile() {
282 + if use mgr-frontend; then
283 + # npm likes trying to create /etc/npm
284 + addpredict /etc/npm
285 +
286 + # subshell to avoid polluting the environment
287 + (
288 + python_setup 'python2*'
289 +
290 + export CC="$(tc-getCC)" CXX="$(tc-getCXX)"
291 +
292 + set -e
293 +
294 + pushd src/pybind/mgr/dashboard/frontend >/dev/null
295 +
296 + npm install --offline --no-save --verbose --parseable \
297 + --no-rollback --no-progress --fetch-retries=0 \
298 + --nodedir="/usr/include/node" \
299 + --cache="${WORKDIR}/${P}-npm-cache" \
300 + --registry="http://npmjs.invalid" \
301 + --sass-binary-site="http://sass.invalid"
302 +
303 + # this tends to get installed to the system if it's still here
304 + rm -rf node_modules/node-sass/build
305 +
306 + popd >/dev/null
307 +
308 + ) || die "failed to build node modules for mgr-frontend"
309 + fi
310 +
311 + cmake-utils_src_make all
312 +
313 + # we have to do this here to prevent from building everything multiple times
314 + BUILD_DIR="${CMAKE_BUILD_DIR}" python_copy_sources
315 + python_foreach_impl python_compile
316 +}
317 +
318 +src_test() {
319 + make check || die "make check failed"
320 +}
321 +
322 +python_install() {
323 + local CMAKE_USE_DIR="${S}"
324 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
325 + DESTDIR="${ED}" emake install
326 + popd >/dev/null || die
327 +}
328 +
329 +src_install() {
330 + cmake-utils_src_install
331 + python_foreach_impl python_install
332 +
333 + prune_libtool_files --all
334 +
335 + exeinto /usr/$(get_libdir)/ceph
336 + newexe "${CMAKE_BUILD_DIR}/bin/init-ceph" ceph_init.sh
337 +
338 + insinto /etc/logrotate.d/
339 + newins "${FILESDIR}"/ceph.logrotate ${PN}
340 +
341 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
342 +
343 + fowners -R ceph:ceph /var/lib/ceph /var/log/ceph
344 +
345 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
346 + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN}
347 + newconfd "${FILESDIR}/${PN}.confd-r4" ${PN}
348 +
349 + insinto /etc/sysctl.d
350 + newins "${FILESDIR}"/sysctld 90-${PN}.conf
351 +
352 + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
353 +
354 + # units aren't installed by the build system unless systemd is enabled
355 + # so no point installing these with the USE flag disabled
356 + if use systemd; then
357 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
358 + "ceph-mds@.service"
359 +
360 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
361 + "ceph-osd@.service"
362 + fi
363 +
364 + udev_dorules udev/*.rules
365 +
366 + readme.gentoo_create_doc
367 +
368 + python_setup 'python3*'
369 +
370 + # bug #630232
371 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph \
372 + || die "sed failed"
373 +
374 + python_fix_shebang "${ED}"/usr/{,s}bin/
375 +
376 + # python_fix_shebang apparently is not idempotent
377 + sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \
378 + "${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed"
379 +}
380 +
381 +pkg_postinst() {
382 + readme.gentoo_print_elog
383 +}
384
385 diff --git a/sys-cluster/ceph/metadata.xml b/sys-cluster/ceph/metadata.xml
386 index 0a4f8d20e2e..01d3158a614 100644
387 --- a/sys-cluster/ceph/metadata.xml
388 +++ b/sys-cluster/ceph/metadata.xml
389 @@ -27,7 +27,7 @@
390 <flag name="libaio">Use libaio as asynchronous input/output library</flag>
391 <flag name="lttng">Add support for LTTng</flag>
392 <flag name="mgr">Build the ceph-mgr daemon</flag>
393 - <flag name="mgr-frontend">Build/install the mgr/dashboard frontend with npm</flag>
394 + <flag name="mgr-frontend">Build the mgr/dashboard frontend with npm, this is not required for the frontend to work</flag>
395 <flag name="nss">Use <pkg>dev-libs/nss</pkg> for cryptography</flag>
396 <flag name="radosgw">Add radosgw support</flag>
397 <flag name="system-boost">Use system <pkg>dev-libs/boost</pkg> instead of the bundled one</flag>