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