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, 13 Jun 2018 17:53:02
Message-Id: 1528912279.15907512d886d53b2f4559b740eb69eb127e7a07.chutzpah@gentoo
1 commit: 15907512d886d53b2f4559b740eb69eb127e7a07
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 13 17:45:58 2018 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 13 17:51:19 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15907512
7
8 sys-cluster/ceph: Version bump to 13.2.0 (unkeyworded for the moment)
9
10 Closes: https://bugs.gentoo.org/657430
11 Package-Manager: Portage-2.3.40, Repoman-2.3.9
12
13 sys-cluster/ceph/Manifest | 2 +
14 sys-cluster/ceph/ceph-13.2.0.ebuild | 355 +++++++++++++++++++++
15 .../ceph/files/ceph-13.2.0-boost-sonames.patch | 166 ++++++++++
16 sys-cluster/ceph/files/ceph-13.2.0-cflags.patch | 26 ++
17 .../files/ceph-13.2.0-mgr-python-version.patch | 16 +
18 .../ceph/files/ceph-13.2.0-no-virtualenvs.patch | 78 +++++
19 .../ceph/files/make-node-frontend-tarball.bash | 140 ++++++++
20 sys-cluster/ceph/metadata.xml | 2 +
21 8 files changed, 785 insertions(+)
22
23 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
24 index 00c897026da..ecef19d5151 100644
25 --- a/sys-cluster/ceph/Manifest
26 +++ b/sys-cluster/ceph/Manifest
27 @@ -6,3 +6,5 @@ DIST ceph-12.2.1.tar.gz 148738778 BLAKE2B df4bea1ad552ab2361174c1e2f285f42b4a07a
28 DIST ceph-12.2.2.tar.gz 148763718 BLAKE2B 5c9a56bc536b723ca3a6a0aa68c7f456032c892716167dfa213cda4964e3a45e970efe6dd67e5c43ef6f6018bd9367e0c890de270acccf3217b848b58cb98488 SHA512 89b166dc4b58e0110ebe0147eef9f47e1090ccee01702b3f72cfbdca856d02bf03b2663de9e88c84b21a2a61f8f92211e217a05b8bdcf7d5de3158adbe49db88
29 DIST ceph-12.2.4.tar.gz 78694838 BLAKE2B 862c275eb5e42065b2f42d417f8efd2ee8ee67c19575eb19bc799d5923d0720fa4810e1c51915fee6f96a44d433059ca6b180861013b735287751ad24235e611 SHA512 ce9ec49e8693d11345adb3a219763cc76b626db2c26d8d9ba08ff0a4d6fdeb08739da29bb87ff0946fed8e6fd55c8db0672cb286f7ebb90cf2e11a47042ba5d6
30 DIST ceph-12.2.5.tar.gz 78758920 BLAKE2B 0e4a515ff80fdd39e8f1afd737434c7dc2a218f0a89b53ec31bc3a5478bfd876c6f2bf3c2947a8c2f056d9b94ffa34d18ceac06b00008605e84485ec631c7a32 SHA512 bd78358590eb077afcc3c1e12864fadee906c95ac8afee25bdca6155f99b75f89d923159fcc13430abba21a89fee3e566177ff5f9ffabdd3b3f220d05602ab86
31 +DIST ceph-13.2.0-frontend-node-modules.tar.xz 44082360 BLAKE2B 0f1bcf1c5154bdc352c9314853099b314b76c76cf1c3ee2447803ea5d79d02bbc91a0f8aefa6df96b47fc2d89e531354ac485752d2dbb762498d3eaba273635a SHA512 ad3c38b055ba886215aea07c4afb202cc3bfb64cdebc816eb4f124f76f2401e04e5645859b2a780828bf8eddcc0093b36d4d9935b703ac2bbc4212e913abeb8c
32 +DIST ceph-13.2.0.tar.gz 89077825 BLAKE2B 07ee531a672e436df8f218ecb4a2425d33911771dcf9c63fa9fc36a868c93a101029d8a8c69fcea026882ac466e6032da76be0dc961ceb03845b955fb5762add SHA512 2524ad5a868024463e1a1edc5bd9c3f7bc1f58e47bf8d331902ed53206120abc6a427dd9c1d657131e67efd955d6ed8052b6c3fed8658aa905d58ac58ee62973
33
34 diff --git a/sys-cluster/ceph/ceph-13.2.0.ebuild b/sys-cluster/ceph/ceph-13.2.0.ebuild
35 new file mode 100644
36 index 00000000000..036cfc442fc
37 --- /dev/null
38 +++ b/sys-cluster/ceph/ceph-13.2.0.ebuild
39 @@ -0,0 +1,355 @@
40 +# Copyright 1999-2018 Gentoo Foundation
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=6
44 +PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
45 +DISTUTILS_OPTIONAL=1
46 +
47 +inherit check-reqs cmake-utils distutils-r1 flag-o-matic multiprocessing \
48 + python-r1 udev user readme.gentoo-r1 toolchain-funcs systemd
49 +
50 +if [[ ${PV} == *9999* ]]; then
51 + inherit git-r3
52 + EGIT_REPO_URI="https://github.com/ceph/ceph.git"
53 + SRC_URI=""
54 +else
55 + SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz
56 + mgr-frontend? ( mirror://gentoo/${P}-frontend-node-modules.tar.xz )"
57 + # unkeyworded for testing that this actually works
58 + # had to do a lot of hackery for the mgr frontend, dunno if anything broke
59 + #KEYWORDS="~amd64 ~x86"
60 +fi
61 +
62 +DESCRIPTION="Ceph distributed filesystem"
63 +HOMEPAGE="https://ceph.com/"
64 +
65 +LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 BSD Boost-1.0 MIT"
66 +SLOT="0"
67 +
68 +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
69 +
70 +IUSE="babeltrace cephfs dpdk fuse jemalloc ldap lttng +mgr mgr-frontend nss"
71 +IUSE+=" +radosgw +ssl static-libs +system-boost systemd +tcmalloc test"
72 +IUSE+=" xfs zfs"
73 +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
74 +
75 +# unbundling code commented out pending bugs 584056 and 584058
76 +#>=dev-libs/jerasure-2.0.0-r1
77 +#>=dev-libs/gf-complete-2.0.0
78 +COMMON_DEPEND="
79 + virtual/libudev:=
80 + app-arch/bzip2:=[static-libs?]
81 + app-arch/lz4:=[static-libs?]
82 + app-arch/snappy:=[static-libs?]
83 + app-arch/zstd:=[static-libs?]
84 + app-misc/jq:=[static-libs?]
85 + dev-libs/crypto++:=[static-libs?]
86 + dev-libs/leveldb:=[snappy,static-libs?,tcmalloc?]
87 + dev-libs/libaio:=[static-libs?]
88 + dev-libs/libxml2:=[static-libs?]
89 + sys-auth/oath-toolkit:=
90 + sys-apps/keyutils:=[static-libs?]
91 + sys-apps/util-linux:=[static-libs?]
92 + sys-libs/zlib:=[static-libs?]
93 + babeltrace? ( dev-util/babeltrace )
94 + ldap? ( net-nds/openldap:=[static-libs?] )
95 + lttng? ( dev-util/lttng-ust:= )
96 + nss? ( dev-libs/nss:= )
97 + fuse? ( sys-fs/fuse:0=[static-libs?] )
98 + ssl? ( dev-libs/openssl:=[static-libs?] )
99 + xfs? ( sys-fs/xfsprogs:=[static-libs?] )
100 + zfs? ( sys-fs/zfs:=[static-libs?] )
101 + mgr? (
102 + <net-libs/nodejs-9.0
103 + >net-libs/nodejs-8.10
104 + )
105 + mgr-frontend? ( net-libs/nodejs[npm] )
106 + radosgw? (
107 + dev-libs/expat:=[static-libs?]
108 + dev-libs/openssl:=[static-libs?]
109 + net-misc/curl:=[curl_ssl_openssl,static-libs?]
110 + )
111 + system-boost? (
112 + >=dev-libs/boost-1.66:=[threads,context,python,static-libs?,${PYTHON_USEDEP}]
113 + )
114 + jemalloc? ( dev-libs/jemalloc:=[static-libs?] )
115 + !jemalloc? ( >=dev-util/google-perftools-2.4:=[static-libs?] )
116 + ${PYTHON_DEPS}
117 + "
118 +DEPEND="${COMMON_DEPEND}
119 + amd64? ( dev-lang/yasm )
120 + x86? ( dev-lang/yasm )
121 + app-arch/cpio
122 + dev-python/cython[${PYTHON_USEDEP}]
123 + dev-python/sphinx
124 + dev-util/cunit
125 + dev-util/gperf
126 + dev-util/valgrind
127 + sys-apps/which
128 + sys-devel/bc
129 + virtual/pkgconfig
130 + test? (
131 + dev-python/coverage[${PYTHON_USEDEP}]
132 + dev-python/tox[${PYTHON_USEDEP}]
133 + dev-python/virtualenv[${PYTHON_USEDEP}]
134 + sys-apps/grep[pcre]
135 + sys-fs/btrfs-progs
136 + )"
137 +RDEPEND="${COMMON_DEPEND}
138 + net-misc/socat
139 + sys-apps/gptfdisk
140 + sys-block/parted
141 + sys-fs/cryptsetup
142 + sys-fs/lvm2
143 + !<sys-apps/openrc-0.26.3
144 + dev-python/bcrypt[${PYTHON_USEDEP}]
145 + dev-python/cherrypy[${PYTHON_USEDEP}]
146 + dev-python/flask[${PYTHON_USEDEP}]
147 + dev-python/jinja[${PYTHON_USEDEP}]
148 + dev-python/pecan[${PYTHON_USEDEP}]
149 + dev-python/prettytable[${PYTHON_USEDEP}]
150 + dev-python/pyopenssl[${PYTHON_USEDEP}]
151 + dev-python/requests[${PYTHON_USEDEP}]
152 + dev-python/werkzeug[${PYTHON_USEDEP}]
153 + "
154 +REQUIRED_USE="
155 + ${PYTHON_REQUIRED_USE}
156 + || ( $(python_gen_useflags 'python3*') )
157 + mgr-frontend? ( mgr || ( $(python_gen_useflags 'python2*') ) )
158 + ?? ( ssl nss )
159 + ?? ( jemalloc tcmalloc )
160 + "
161 +
162 +# currently does not configure without the mgr
163 +REQUIRED_USE+=" mgr"
164 +
165 +RESTRICT="test? ( userpriv )"
166 +
167 +# distribution tarball does not include everything needed for tests
168 +RESTRICT+=" test"
169 +
170 +# false positives unless all USE flags are on
171 +CMAKE_WARN_UNUSED_CLI="no"
172 +
173 +STRIP_MASK="/usr/lib*/rados-classes/*"
174 +
175 +UNBUNDLE_LIBS=(
176 + src/erasure-code/jerasure/jerasure
177 + src/erasure-code/jerasure/gf-complete
178 +)
179 +
180 +PATCHES=(
181 + "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
182 + "${FILESDIR}/ceph-12.2.0-cflags.patch"
183 + "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
184 + "${FILESDIR}/ceph-13.2.0-cflags.patch"
185 + "${FILESDIR}/ceph-12.2.4-rocksdb-cflags.patch"
186 + "${FILESDIR}/ceph-13.2.0-mgr-python-version.patch"
187 + "${FILESDIR}/ceph-13.2.0-no-virtualenvs.patch"
188 +)
189 +
190 +check-reqs_export_vars() {
191 + if use amd64; then
192 + CHECKREQS_DISK_BUILD="12G"
193 + CHECKREQS_DISK_USR="460M"
194 + else
195 + CHECKREQS_DISK_BUILD="1400M"
196 + CHECKREQS_DISK_USR="450M"
197 + fi
198 +
199 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
200 +}
201 +
202 +user_setup() {
203 + enewgroup ceph ${CEPH_GID}
204 + enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph
205 +}
206 +
207 +pkg_pretend() {
208 + check-reqs_export_vars
209 + check-reqs_pkg_pretend
210 +}
211 +
212 +pkg_setup() {
213 + python_setup 'python3*'
214 + check-reqs_export_vars
215 + check-reqs_pkg_setup
216 + user_setup
217 +}
218 +
219 +src_prepare() {
220 + cmake-utils_src_prepare
221 +
222 + if use system-boost; then
223 + eapply "${FILESDIR}/ceph-13.2.0-boost-sonames.patch"
224 + fi
225 +
226 + # prevent useless javascript from being installed to the system
227 + use mgr-frontend || rm -rf src/pybind/mgr/dashboard/frontend
228 +
229 + # remove tests that need root access
230 + rm src/test/cli/ceph-authtool/cap*.t || die
231 +
232 + #rm -rf "${UNBUNDLE_LIBS[@]}"
233 +}
234 +
235 +ceph_src_configure() {
236 + local flag
237 + local mycmakeargs=(
238 + -DWITH_BABELTRACE=$(usex babeltrace)
239 + -DWITH_CEPHFS=$(usex cephfs)
240 + -DWITH_DPDK=$(usex dpdk)
241 + -DWITH_FUSE=$(usex fuse)
242 + -DWITH_LTTNG=$(usex lttng)
243 + -DWITH_MGR=$(usex mgr)
244 + -DWITH_MGR_DASHBOARD_FRONTEND=$(usex mgr-frontend)
245 + -DWITH_NSS=$(usex nss)
246 + -DWITH_OPENLDAP=$(usex ldap)
247 + -DWITH_RADOSGW=$(usex radosgw)
248 + -DWITH_SSL=$(usex ssl)
249 + -DWITH_SYSTEMD=$(usex systemd)
250 + -DWITH_TESTS=$(usex test)
251 + -DWITH_XFS=$(usex xfs)
252 + -DWITH_ZFS=$(usex zfs)
253 + -DENABLE_SHARED=$(usex static-libs '' 'yes' 'no')
254 + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' '' "$(usex jemalloc 'jemalloc' '' 'libc' '')" '')
255 + -DWITH_SYSTEM_BOOST=$(usex system-boost)
256 + -DBOOST_J=$(makeopts_jobs)
257 + -DWITH_RDMA=no
258 + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
259 + -DEPYTHON_VERSION="${EPYTHON#python}"
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 +
283 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
284 + emake VERBOSE=1 all
285 +
286 + # python modules are only compiled with "make install" so we need to do this to
287 + # prevent doing a bunch of compilation in src_install
288 + DESTDIR="${T}" emake VERBOSE=1 install
289 + popd >/dev/null || die
290 +}
291 +
292 +src_compile() {
293 + if use mgr-frontend; then
294 + # npm likes trying to create /etc/npm
295 + addpredict /etc/npm
296 +
297 + # subshell to avoid polluting the environment
298 + (
299 + python_setup 'python2*'
300 +
301 + export CC="$(tc-getCC)" CXX="$(tc-getCXX)"
302 +
303 + set -e
304 +
305 + pushd src/pybind/mgr/dashboard/frontend >/dev/null
306 +
307 + npm install --offline --no-save --verbose --parseable \
308 + --no-rollback --no-progress --fetch-retries=0 \
309 + --nodedir="/usr/include/node" \
310 + --cache="${WORKDIR}/${P}-npm-cache" \
311 + --registry="http://npmjs.invalid" \
312 + --sass-binary-site="http://sass.invalid"
313 +
314 + # this tends to get installed to the system if it's still here
315 + rm -rf node_modules/node-sass/build
316 +
317 + popd >/dev/null
318 +
319 + ) || die "failed to build node modules for mgr-frontend"
320 + fi
321 +
322 + cmake-utils_src_make all
323 +
324 + # we have to do this here to prevent from building everything multiple times
325 + BUILD_DIR="${CMAKE_BUILD_DIR}" python_copy_sources
326 + python_foreach_impl python_compile
327 +}
328 +
329 +src_test() {
330 + make check || die "make check failed"
331 +}
332 +
333 +python_install() {
334 + local CMAKE_USE_DIR="${S}"
335 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
336 + DESTDIR="${ED}" emake install
337 + popd >/dev/null || die
338 +}
339 +
340 +src_install() {
341 + cmake-utils_src_install
342 + python_foreach_impl python_install
343 +
344 + prune_libtool_files --all
345 +
346 + exeinto /usr/$(get_libdir)/ceph
347 + newexe "${CMAKE_BUILD_DIR}/bin/init-ceph" ceph_init.sh
348 +
349 + insinto /etc/logrotate.d/
350 + newins "${FILESDIR}"/ceph.logrotate ${PN}
351 +
352 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
353 +
354 + fowners -R ceph:ceph /var/lib/ceph /var/log/ceph
355 +
356 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
357 + newinitd "${FILESDIR}/${PN}.initd-r8" ${PN}
358 + newconfd "${FILESDIR}/${PN}.confd-r4" ${PN}
359 +
360 + insinto /etc/sysctl.d
361 + newins "${FILESDIR}"/sysctld 90-${PN}.conf
362 +
363 + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
364 +
365 + # units aren't installed by the build system unless systemd is enabled
366 + # so no point installing these with the USE flag disabled
367 + if use systemd; then
368 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
369 + "ceph-mds@.service"
370 +
371 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
372 + "ceph-osd@.service"
373 + fi
374 +
375 + udev_dorules udev/*.rules
376 +
377 + readme.gentoo_create_doc
378 +
379 + python_setup 'python3*'
380 +
381 + # bug #630232
382 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph \
383 + || die "sed failed"
384 +
385 + python_fix_shebang "${ED}"/usr/{,s}bin/
386 +
387 + # python_fix_shebang apparently is not idempotent
388 + sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \
389 + "${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed"
390 +}
391 +
392 +pkg_postinst() {
393 + readme.gentoo_print_elog
394 +}
395
396 diff --git a/sys-cluster/ceph/files/ceph-13.2.0-boost-sonames.patch b/sys-cluster/ceph/files/ceph-13.2.0-boost-sonames.patch
397 new file mode 100644
398 index 00000000000..8de09b91d8a
399 --- /dev/null
400 +++ b/sys-cluster/ceph/files/ceph-13.2.0-boost-sonames.patch
401 @@ -0,0 +1,166 @@
402 +diff --git a/CMakeLists.txt b/CMakeLists.txt
403 +index 2f997d03f8..748cb190e6 100644
404 +--- a/CMakeLists.txt
405 ++++ b/CMakeLists.txt
406 +@@ -591,7 +591,7 @@ set(BOOST_COMPONENTS
407 + set(BOOST_HEADER_COMPONENTS container)
408 +
409 + if(WITH_MGR)
410 +- list(APPEND BOOST_COMPONENTS python)
411 ++ list(APPEND BOOST_COMPONENTS python-${EPYTHON_VERSION})
412 + endif()
413 + if(WITH_BOOST_CONTEXT)
414 + list(APPEND BOOST_COMPONENTS context coroutine)
415 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
416 +index 3d3b4c0919..94ab42ef9f 100644
417 +--- a/src/CMakeLists.txt
418 ++++ b/src/CMakeLists.txt
419 +@@ -630,12 +630,12 @@ set(ceph_common_objs
420 + $<TARGET_OBJECTS:crush_objs>)
421 + set(ceph_common_deps
422 + json_spirit erasure_code ${LIB_RESOLV}
423 +- Boost::thread
424 +- Boost::system
425 +- Boost::random
426 +- Boost::program_options
427 +- Boost::date_time
428 +- Boost::iostreams
429 ++ boost_thread
430 ++ boost_system
431 ++ boost_random
432 ++ boost_program_options
433 ++ boost_date_time
434 ++ boost_iostreams
435 + ${BLKID_LIBRARIES}
436 + ${Backtrace_LIBRARIES}
437 + ${BLKIN_LIBRARIES}
438 +@@ -759,7 +759,7 @@ if (WITH_MGR)
439 + $<TARGET_OBJECTS:heap_profiler_objs>)
440 + target_include_directories(ceph-mgr SYSTEM PRIVATE "${PYTHON_INCLUDE_DIRS}")
441 + target_link_libraries(ceph-mgr osdc client global-static ceph-common
442 +- Boost::python ${MGR_PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
443 ++ boost_python-${EPYTHON_VERSION} ${MGR_PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
444 + install(TARGETS ceph-mgr DESTINATION bin)
445 + endif (WITH_MGR)
446 +
447 +@@ -888,7 +888,7 @@ set(ceph_mds_srcs
448 + ceph_mds.cc)
449 + add_executable(ceph-mds ${ceph_mds_srcs})
450 + target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static ceph-common
451 +- Boost::thread)
452 ++ boost_thread)
453 + install(TARGETS ceph-mds DESTINATION bin)
454 +
455 + add_subdirectory(erasure-code)
456 +diff --git a/src/rbd_replay/CMakeLists.txt b/src/rbd_replay/CMakeLists.txt
457 +index e9d3804c5f..5c6eb58de1 100644
458 +--- a/src/rbd_replay/CMakeLists.txt
459 ++++ b/src/rbd_replay/CMakeLists.txt
460 +@@ -36,7 +36,7 @@ if(HAVE_BABELTRACE)
461 + global
462 + babeltrace
463 + babeltrace-ctf
464 +- Boost::date_time
465 ++ boost_date_time
466 + )
467 + install(TARGETS rbd-replay-prep DESTINATION bin)
468 + endif(HAVE_BABELTRACE)
469 +diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt
470 +index c1edd3b882..000c8daaf8 100644
471 +--- a/src/rgw/CMakeLists.txt
472 ++++ b/src/rgw/CMakeLists.txt
473 +@@ -162,7 +162,7 @@ target_link_libraries(rgw_a librados cls_otp_client cls_lock_client cls_rgw_clie
474 +
475 + if (WITH_RADOSGW_BEAST_FRONTEND)
476 + target_compile_definitions(rgw_a PUBLIC BOOST_COROUTINES_NO_DEPRECATION_WARNING)
477 +- target_link_libraries(rgw_a Boost::coroutine Boost::context)
478 ++ target_link_libraries(rgw_a boost_coroutine boost_context)
479 + endif()
480 +
481 + if (WITH_CURL_OPENSSL OR (WITH_RADOSGW_BEAST_FRONTEND AND WITH_RADOSGW_BEAST_OPENSSL))
482 +diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
483 +index a43335e825..a0d056faaa 100644
484 +--- a/src/test/CMakeLists.txt
485 ++++ b/src/test/CMakeLists.txt
486 +@@ -147,7 +147,7 @@ add_executable(ceph_omapbench
487 + )
488 + target_link_libraries(ceph_omapbench
489 + librados
490 +- Boost::program_options
491 ++ boost_program_options
492 + global
493 + ${BLKID_LIBRARIES}
494 + ${CMAKE_DL_LIBS}
495 +diff --git a/src/test/erasure-code/CMakeLists.txt b/src/test/erasure-code/CMakeLists.txt
496 +index 4ba31ab2a8..ab66208b57 100644
497 +--- a/src/test/erasure-code/CMakeLists.txt
498 ++++ b/src/test/erasure-code/CMakeLists.txt
499 +@@ -2,15 +2,15 @@
500 + add_executable(ceph_erasure_code_benchmark
501 + ${CMAKE_SOURCE_DIR}/src/erasure-code/ErasureCode.cc
502 + ceph_erasure_code_benchmark.cc)
503 +-target_link_libraries(ceph_erasure_code_benchmark ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
504 ++target_link_libraries(ceph_erasure_code_benchmark ceph-common boost_program_options global ${CMAKE_DL_LIBS})
505 + install(TARGETS ceph_erasure_code_benchmark
506 + DESTINATION bin)
507 +
508 + add_executable(ceph_erasure_code_non_regression ceph_erasure_code_non_regression.cc)
509 +-target_link_libraries(ceph_erasure_code_non_regression ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
510 ++target_link_libraries(ceph_erasure_code_non_regression ceph-common boost_program_options global ${CMAKE_DL_LIBS})
511 +
512 + add_executable(ceph_erasure_code ceph_erasure_code.cc)
513 +-target_link_libraries(ceph_erasure_code ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
514 ++target_link_libraries(ceph_erasure_code ceph-common boost_program_options global ${CMAKE_DL_LIBS})
515 + install(TARGETS ceph_erasure_code
516 + DESTINATION bin)
517 +
518 +diff --git a/src/test/librados/CMakeLists.txt b/src/test/librados/CMakeLists.txt
519 +index 1c909ee1ce..7c1ef32df1 100644
520 +--- a/src/test/librados/CMakeLists.txt
521 ++++ b/src/test/librados/CMakeLists.txt
522 +@@ -61,7 +61,7 @@ set_target_properties(ceph_test_rados_api_asio PROPERTIES COMPILE_FLAGS
523 + target_link_libraries(ceph_test_rados_api_asio global
524 + librados ${UNITTEST_LIBS})
525 + if(WITH_BOOST_CONTEXT)
526 +- target_link_libraries(ceph_test_rados_api_asio Boost::coroutine Boost::context)
527 ++ target_link_libraries(ceph_test_rados_api_asio boost_coroutine boost_context)
528 + endif()
529 +
530 + # ceph_test_rados_api_list
531 +@@ -147,7 +147,7 @@ add_executable(ceph_test_rados_api_tier
532 + set_target_properties(ceph_test_rados_api_tier PROPERTIES COMPILE_FLAGS
533 + ${UNITTEST_CXX_FLAGS})
534 + target_link_libraries(ceph_test_rados_api_tier
535 +- librados global ${UNITTEST_LIBS} Boost::system radostest)
536 ++ librados global ${UNITTEST_LIBS} boost_system radostest)
537 +
538 + # ceph_test_rados_api_snapshots
539 + add_executable(ceph_test_rados_api_snapshots
540 +diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
541 +index e0844ec0c7..886839302c 100644
542 +--- a/src/tools/CMakeLists.txt
543 ++++ b/src/tools/CMakeLists.txt
544 +@@ -29,20 +29,20 @@ install(PROGRAMS
545 + endif(WITH_TESTS)
546 +
547 + add_executable(ceph-osdomap-tool ceph_osdomap_tool.cc)
548 +-target_link_libraries(ceph-osdomap-tool os global Boost::program_options)
549 ++target_link_libraries(ceph-osdomap-tool os global boost_program_options)
550 + install(TARGETS ceph-osdomap-tool DESTINATION bin)
551 +
552 + add_executable(ceph-monstore-tool
553 + ceph_monstore_tool.cc
554 + ../mgr/mgr_commands.cc)
555 +-target_link_libraries(ceph-monstore-tool os global Boost::program_options)
556 ++target_link_libraries(ceph-monstore-tool os global boost_program_options)
557 + install(TARGETS ceph-monstore-tool DESTINATION bin)
558 +
559 + add_executable(ceph-objectstore-tool
560 + ceph_objectstore_tool.cc
561 + rebuild_mondb.cc
562 + RadosDump.cc)
563 +-target_link_libraries(ceph-objectstore-tool osd os global Boost::program_options ${CMAKE_DL_LIBS})
564 ++target_link_libraries(ceph-objectstore-tool osd os global boost_program_options ${CMAKE_DL_LIBS})
565 + if(WITH_FUSE)
566 + target_link_libraries(ceph-objectstore-tool fuse)
567 + endif(WITH_FUSE)
568
569 diff --git a/sys-cluster/ceph/files/ceph-13.2.0-cflags.patch b/sys-cluster/ceph/files/ceph-13.2.0-cflags.patch
570 new file mode 100644
571 index 00000000000..b275a177da3
572 --- /dev/null
573 +++ b/sys-cluster/ceph/files/ceph-13.2.0-cflags.patch
574 @@ -0,0 +1,26 @@
575 +diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
576 +index d6572115a4..cc0bdddc9f 100644
577 +--- a/cmake/modules/BuildBoost.cmake
578 ++++ b/cmake/modules/BuildBoost.cmake
579 +@@ -62,7 +62,7 @@ function(do_build_boost version)
580 + else()
581 + list(APPEND boost_features "address-model=32")
582 + endif()
583 +- set(BOOST_CXXFLAGS "-fPIC -w") # check on arm, etc <---XXX
584 ++ set(BOOST_CXXFLAGS "${CMAKE_CXX_FLAGS} -fPIC -w") # check on arm, etc <---XXX
585 + list(APPEND boost_features "cxxflags=${BOOST_CXXFLAGS}")
586 +
587 + list(FIND Boost_BUILD_COMPONENTS "python" with_python)
588 +diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt
589 +index 5a80aa539c..8d6ff5c8f0 100644
590 +--- a/src/compressor/zstd/CMakeLists.txt
591 ++++ b/src/compressor/zstd/CMakeLists.txt
592 +@@ -1,7 +1,7 @@
593 + # zstd
594 +
595 + # libzstd - build it statically
596 +-set(ZSTD_C_FLAGS "-fPIC -Wno-unused-variable -O3")
597 ++set(ZSTD_C_FLAGS "-fPIC -Wno-unused-variable $ENV{CFLAGS} -O3")
598 +
599 + include(ExternalProject)
600 + ExternalProject_Add(zstd_ext
601
602 diff --git a/sys-cluster/ceph/files/ceph-13.2.0-mgr-python-version.patch b/sys-cluster/ceph/files/ceph-13.2.0-mgr-python-version.patch
603 new file mode 100644
604 index 00000000000..0dc90ebeaef
605 --- /dev/null
606 +++ b/sys-cluster/ceph/files/ceph-13.2.0-mgr-python-version.patch
607 @@ -0,0 +1,16 @@
608 +diff --git a/src/pybind/CMakeLists.txt b/src/pybind/CMakeLists.txt
609 +index c996cd9402..f99765702b 100644
610 +--- a/src/pybind/CMakeLists.txt
611 ++++ b/src/pybind/CMakeLists.txt
612 +@@ -62,11 +62,6 @@ foreach(python_version ${py_vers})
613 + endforeach()
614 +
615 + if(WITH_MGR)
616 +- if(NOT WITH_PYTHON2 AND MGR_PYTHON_VERSION_MAJOR EQUAL 2)
617 +- message(FATAL_ERROR "mgr plugins require python2 binding")
618 +- elseif(NOT WITH_PYTHON3 AND MGR_PYTHON_VERSION_MAJOR EQUAL 3)
619 +- message(FATAL_ERROR "mgr plugins require python3 binding")
620 +- endif()
621 + # Location needs to match default setting for mgr_module_path, currently:
622 + # OPTION(mgr_module_path, OPT_STR, CEPH_PKGLIBDIR "/mgr")
623 + install(DIRECTORY
624
625 diff --git a/sys-cluster/ceph/files/ceph-13.2.0-no-virtualenvs.patch b/sys-cluster/ceph/files/ceph-13.2.0-no-virtualenvs.patch
626 new file mode 100644
627 index 00000000000..470dbaeb3c0
628 --- /dev/null
629 +++ b/sys-cluster/ceph/files/ceph-13.2.0-no-virtualenvs.patch
630 @@ -0,0 +1,78 @@
631 +diff --git a/src/ceph-detect-init/CMakeLists.txt b/src/ceph-detect-init/CMakeLists.txt
632 +index 6e5946b784..233cccfc9b 100644
633 +--- a/src/ceph-detect-init/CMakeLists.txt
634 ++++ b/src/ceph-detect-init/CMakeLists.txt
635 +@@ -2,8 +2,8 @@ set(CEPH_DETECT_INIT_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtua
636 +
637 + add_custom_target(ceph-detect-init
638 + COMMAND
639 +- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DETECT_INIT_VIRTUALENV} &&
640 +- ${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e .
641 ++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DETECT_INIT_VIRTUALENV} &&
642 ++ #${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e .
643 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-detect-init
644 + COMMENT "ceph-detect-init is being created")
645 + add_dependencies(tests ceph-detect-init)
646 +diff --git a/src/ceph-disk/CMakeLists.txt b/src/ceph-disk/CMakeLists.txt
647 +index 00aaec4a80..b0700c488f 100644
648 +--- a/src/ceph-disk/CMakeLists.txt
649 ++++ b/src/ceph-disk/CMakeLists.txt
650 +@@ -2,8 +2,8 @@ set(CEPH_DISK_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv)
651 +
652 + add_custom_target(ceph-disk
653 + COMMAND
654 +- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DISK_VIRTUALENV} &&
655 +- ${CEPH_DISK_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e .
656 ++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DISK_VIRTUALENV} &&
657 ++ #${CEPH_DISK_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e .
658 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-disk
659 + COMMENT "ceph-disk is being created")
660 + add_dependencies(tests ceph-disk)
661 +diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt
662 +index 2b050f6c6e..e9fb87f76b 100644
663 +--- a/src/pybind/mgr/dashboard/CMakeLists.txt
664 ++++ b/src/pybind/mgr/dashboard/CMakeLists.txt
665 +@@ -2,7 +2,7 @@ set(MGR_DASHBOARD_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-dashboard-virtualenv)
666 +
667 + add_custom_target(mgr-dashboard-test-venv
668 + COMMAND
669 +- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${MGR_DASHBOARD_VIRTUALENV}
670 ++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${MGR_DASHBOARD_VIRTUALENV}
671 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard
672 + COMMENT "dashboard tests virtualenv is being created")
673 + add_dependencies(tests mgr-dashboard-test-venv)
674 +@@ -13,9 +13,9 @@ set(mgr-dashboard-nodeenv ${CMAKE_CURRENT_BINARY_DIR}/node-env)
675 +
676 + add_custom_command(
677 + OUTPUT "${mgr-dashboard-nodeenv}/bin/npm"
678 +- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv}
679 +- COMMAND ${mgr-dashboard-nodeenv}/bin/pip install nodeenv
680 +- COMMAND ${mgr-dashboard-nodeenv}/bin/nodeenv -p -n 8.10.0
681 ++ #COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv}
682 ++ #COMMAND ${mgr-dashboard-nodeenv}/bin/pip install nodeenv
683 ++ #COMMAND ${mgr-dashboard-nodeenv}/bin/nodeenv -p -n 8.10.0
684 + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
685 + COMMENT "dashboard nodeenv is being installed"
686 + )
687 +@@ -27,7 +27,7 @@ add_custom_target(mgr-dashboard-nodeenv
688 +
689 + add_custom_command(
690 + OUTPUT "${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/node_modules"
691 +- COMMAND . ${mgr-dashboard-nodeenv}/bin/activate && npm install && deactivate
692 ++ #COMMAND . ${mgr-dashboard-nodeenv}/bin/activate && npm install && deactivate
693 + DEPENDS frontend/package.json
694 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend
695 + COMMENT "dashboard frontend dependencies are being installed"
696 +@@ -62,9 +62,11 @@ else()
697 + set(npm_command npm run build)
698 + endif()
699 +
700 ++LIST(APPEND CMAKE_PROGRAM_PATH ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/node_modules/.bin)
701 ++
702 + add_custom_command(
703 + OUTPUT "${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/dist"
704 +- COMMAND . ${mgr-dashboard-nodeenv}/bin/activate && ${npm_command} && deactivate
705 ++ COMMAND PREFIX="${CMAKE_SOURCE_DIR}" ${npm_command}
706 + DEPENDS ${frontend_src} frontend/node_modules
707 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend
708 + COMMENT "dashboard frontend is being created"
709
710 diff --git a/sys-cluster/ceph/files/make-node-frontend-tarball.bash b/sys-cluster/ceph/files/make-node-frontend-tarball.bash
711 new file mode 100644
712 index 00000000000..0a8015ffa98
713 --- /dev/null
714 +++ b/sys-cluster/ceph/files/make-node-frontend-tarball.bash
715 @@ -0,0 +1,140 @@
716 +#!/bin/bash
717 +
718 +frontend_path="src/pybind/mgr/dashboard/frontend"
719 +node_dir="node_modules"
720 +output_name_format="ceph-%s-frontend-node-modules.tar.xz"
721 +cache_dir_format="ceph-%s-npm-cache"
722 +
723 +# regexes for modules to remove
724 +remove_modules=(
725 + "^karma.*"
726 + "^jasmine.*"
727 + ".+/jasmine.*"
728 + "^tslint.*"
729 + "^codelyzer"
730 + "^protractor"
731 + "^ts-node"
732 +)
733 +
734 +# location to find dependencies to prune
735 +node_dep_location="devDependencies"
736 +
737 +# node package files
738 +node_package_file="package.json"
739 +node_package_lock="package-lock.json"
740 +
741 +# system commands needed
742 +dependencies=(
743 + wget
744 + git
745 + gzip
746 + jq
747 + tar
748 + xz
749 +)
750 +
751 +check_deps() {
752 + local dep
753 +
754 + for dep in "${dependencies[@]}"; do
755 + if ! command -v "${dep}" >/dev/null; then
756 + printf '%s: ERROR could not find required command "%s"\n' "${appname}" "${dep}" >&2
757 + exit 1
758 + fi
759 + done
760 +
761 + # make sure that jq was compiled with support for regexes
762 + if ! jq -c 'map( select(. | test("TEST"; "i")))' <<< '{"TEST": "TEST"}' >/dev/null; then
763 + printf '%s: ERROR: jq does not support regular expressions, make sure the "oniguruma" USE flag is enabled\n' \
764 + "${appname}"
765 + exit 1
766 + fi
767 + :
768 +}
769 +
770 +get_npm_packages() {
771 + local tempfile jq_regex full_cache_dir
772 +
773 + full_cache_dir="${PWD}/${cache_dir}"
774 +
775 + pushd "${source_path}/${frontend_path}" > /dev/null
776 + if [[ ! -r "${node_package_file}" ]]; then
777 + printf '%s: ERROR: could not find "%s" in "%s"\n' "${appname}" \
778 + "${node_package_file}" "${frontend_path}"
779 + exit 1
780 + fi
781 +
782 + tempfile="$(TMPDIR="." mktemp packages-XXXXX.json)"
783 +
784 + jq_regex="$(printf "%s|" "${remove_modules[@]}")"
785 +
786 + # filter out test only deps that pull in precompiled binaries
787 + # shellcheck disable=SC2031
788 + jq --monochrome-output --raw-output --exit-status \
789 + '."'"${node_dep_location}"'"|=with_entries(select(.key|test("('"${jq_regex%|}"')")|not))' \
790 + "${node_package_file}" > "${tempfile}"
791 +
792 + # make sure output is still valid JSON
793 + jq . --exit-status "${tempfile}" > /dev/null
794 +
795 + mv "${tempfile}" "${node_package_file}"
796 +
797 + rm -rf "${full_cache_dir:?}" "${node_dir:?}" "${node_package_lock:?}"
798 +
799 + npm install --ignore-scripts --cache="${full_cache_dir}"
800 +
801 + popd >/dev/null
802 +}
803 +
804 +main() {
805 + local appname source_path version cache_dir
806 +
807 + set -e
808 + set -o pipefail
809 + shopt -s nullglob
810 +
811 + appname=$(basename "${0}")
812 + source_path="${1}"
813 + version="${2}"
814 +
815 + if [[ -z ${source_path} || -z ${version} ]]; then
816 + printf 'Syntax: %s <source directory> <version>\n' "${appname}" >&2
817 + return 1
818 +
819 + elif [[ ! -d ${source_path} ]]; then
820 + printf '%s: ERROR: Not a directory: %s\n' "${appname}" "${source_path}"
821 + return 1
822 + fi
823 +
824 + check_deps
825 +
826 + # shellcheck disable=SC2059
827 + cache_dir="$(printf -- "${cache_dir_format}\\n" "${version}")"
828 +
829 + get_npm_packages
830 + pack_tarball
831 +}
832 +
833 +pack_tarball() {
834 + local output
835 +
836 + # shellcheck disable=SC2059
837 + output="$(printf -- "${output_name_format}\\n" "${version}")"
838 +
839 + tar caf "${output}" \
840 + --numeric-owner \
841 + --anchored \
842 + --owner="root:0" \
843 + --group="root:0" \
844 + --exclude-vcs \
845 + --transform="s:^${source_path}/:ceph-${version}/:" \
846 + "${cache_dir}" \
847 + "${source_path}/${frontend_path}/${node_package_file}" \
848 + "${source_path}/${frontend_path}/${node_package_lock}"
849 +
850 + printf '%s: Output written to "%s"\n' "${appname}" "${output}"
851 +}
852 +
853 +main "${@}"
854 +
855 +# vim:ft=sh:noet:ts=4:sts=4:sw=4:
856
857 diff --git a/sys-cluster/ceph/metadata.xml b/sys-cluster/ceph/metadata.xml
858 index 8ed7a4c83e4..0a4f8d20e2e 100644
859 --- a/sys-cluster/ceph/metadata.xml
860 +++ b/sys-cluster/ceph/metadata.xml
861 @@ -20,12 +20,14 @@
862 <flag name="babeltrace">Add support for LTTng babeltrace</flag>
863 <flag name="cryptopp">Use <pkg>dev-libs/crypto++</pkg> for cryptography</flag>
864 <flag name="cephfs">Build support for cephfs, a POSIX compatible filesystem built on top of ceph</flag>
865 + <flag name="dpdk">Enable DPDK messaging</flag>
866 <flag name="fuse">Build fuse client</flag>
867 <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations</flag>
868 <flag name="libatomic">Use libatomic instead of builtin atomic operations</flag>
869 <flag name="libaio">Use libaio as asynchronous input/output library</flag>
870 <flag name="lttng">Add support for LTTng</flag>
871 <flag name="mgr">Build the ceph-mgr daemon</flag>
872 + <flag name="mgr-frontend">Build/install the mgr/dashboard frontend with npm</flag>
873 <flag name="nss">Use <pkg>dev-libs/nss</pkg> for cryptography</flag>
874 <flag name="radosgw">Add radosgw support</flag>
875 <flag name="system-boost">Use system <pkg>dev-libs/boost</pkg> instead of the bundled one</flag>