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/, sys-cluster/ceph/files/
Date: Thu, 01 Jul 2021 00:47:49
Message-Id: 1625100459.737c5a866a8274382b26f01ae7b8fb748c1033f1.chutzpah@gentoo
1 commit: 737c5a866a8274382b26f01ae7b8fb748c1033f1
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 1 00:47:24 2021 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 1 00:47:39 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=737c5a86
7
8 sys-cluster/ceph-14.2.22: Version bump
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
12
13 sys-cluster/ceph/Manifest | 1 +
14 sys-cluster/ceph/ceph-14.2.22.ebuild | 391 +++++++++++++++++++++
15 .../files/ceph-14.2.22-build-without-mgr.patch | 32 ++
16 sys-cluster/ceph/files/ceph-14.2.22-cflags.patch | 25 ++
17 .../ceph/files/ceph-14.2.22-no-virtualenvs.patch | 39 ++
18 5 files changed, 488 insertions(+)
19
20 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
21 index 6c86ea70178..6e1553aae32 100644
22 --- a/sys-cluster/ceph/Manifest
23 +++ b/sys-cluster/ceph/Manifest
24 @@ -1,4 +1,5 @@
25 DIST ceph-14.2.21.tar.gz 129272778 BLAKE2B f82f452e0f0c40a95ea1bdb3654c2d322caa3edeeb05e41247e02a8ffe731c570d9e49aefa61c447a8b73620d4a9b9872335171f1e08fbd9a08eea930ccbfe76 SHA512 39b4a0624dcab2bafa50f51a42155fcf96dad74531a001d75009ad246a8ca80ce81ae538b34c0a1b773691c363626f1d0342f2439b711bd0dd16214592171884
26 +DIST ceph-14.2.22.tar.gz 130597047 BLAKE2B 58bbb3243de076ed1d25dfd7bd75717c50ad15d16690dcbd1511d1b506477845efc3ff7fbe713cf18fb8cfcc8c16707ad2a0f30159e3198ff82e57fbd2eb3cf2 SHA512 1c66661e1a39fa9151e95e33c390b810ffe269465d8785e2197cc15b8d83bd2edde77de48a8abd71a4da68cd5830ff14bcdf6b98fd17edabe85caeb1eca018d3
27 DIST ceph-15.2.12.tar.gz 148509713 BLAKE2B 4962e7d574b38592a874a1b3fa8610bb2d0afc8713d995d67a790c025bb086cb619cbbaec76482ec096b4c55b9f1df383f5bd4806a231bc88e70ac3efbac24b5 SHA512 08266a2e9a7ca5a37e03f340873571fd012c630dd898a87241cd97c29760b2bf41fe64c8883e7b08e0f83c26245072cd26e69ecb1db02378d1ec38335ba1cd0f
28 DIST ceph-15.2.13.tar.gz 148542333 BLAKE2B 2e9668bcb0fd283ec4ab51b0c6142fc9a3b6310eb5d34e07da5e6b73b55dd7976db5ab9c78a93684ddc2f51873b1a17c4d31c5f5647b2d43a2826ee5362f7e5d SHA512 bde28c331c489db0845959f65c425146c317466a7793f56a83e2827dec35b8cd6f600bf9056151c1e6926cc0155deebbc8681c240ac9f37ad876b9a6afae96da
29 DIST ceph-16.2.4.tar.gz 155840423 BLAKE2B a803ffa61ac9fd6d42790d6d8e12aa8df843968627df0051475355f3ba0dc1272afa3d9e2716115ad769b2f322d7bd239d99b89e51610e89ce9efe39af4f01ae SHA512 8904e7fcabd50276e4e86735fd85dba96f417c194c219025146f994707def7abe372528b0f2e862e274b2f405d7b791bac86b6cbb8d57cecd6f44023a2ffb6f6
30
31 diff --git a/sys-cluster/ceph/ceph-14.2.22.ebuild b/sys-cluster/ceph/ceph-14.2.22.ebuild
32 new file mode 100644
33 index 00000000000..bbdff4749a9
34 --- /dev/null
35 +++ b/sys-cluster/ceph/ceph-14.2.22.ebuild
36 @@ -0,0 +1,391 @@
37 +# Copyright 1999-2021 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=7
41 +PYTHON_COMPAT=( python3_{7,8} )
42 +DISTUTILS_USE_SETUPTOOLS=rdepend
43 +CMAKE_MAKEFILE_GENERATOR=emake
44 +
45 +DISTUTILS_OPTIONAL=1
46 +
47 +inherit check-reqs bash-completion-r1 cmake distutils-r1 flag-o-matic \
48 + python-r1 udev readme.gentoo-r1 toolchain-funcs systemd tmpfiles
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 + KEYWORDS="~amd64 ~ppc64"
57 +fi
58 +
59 +DESCRIPTION="Ceph distributed filesystem"
60 +HOMEPAGE="https://ceph.com/"
61 +
62 +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"
63 +SLOT="0"
64 +
65 +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
66 +
67 +IUSE="babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana jemalloc
68 + kafka kerberos ldap lttng +mgr numa rabbitmq +radosgw +ssl spdk system-boost
69 + systemd +tcmalloc test xfs zfs"
70 +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
71 +
72 +DEPEND="
73 + acct-group/ceph
74 + acct-user/ceph
75 + virtual/libudev:=
76 + app-arch/bzip2:=
77 + app-arch/lz4:=
78 + app-arch/snappy:=
79 + app-arch/zstd:=
80 + app-shells/bash:0
81 + app-misc/jq:=
82 + dev-libs/crypto++:=
83 + dev-libs/leveldb:=[snappy,tcmalloc(-)?]
84 + dev-libs/libaio:=
85 + dev-libs/libnl:3=
86 + dev-libs/libxml2:=
87 + <dev-libs/rocksdb-6.15:=
88 + dev-libs/xmlsec:=[openssl]
89 + dev-cpp/yaml-cpp:=
90 + dev-libs/nss:=
91 + dev-libs/protobuf:=
92 + net-dns/c-ares:=
93 + net-libs/gnutls:=
94 + sys-auth/oath-toolkit:=
95 + sys-apps/coreutils
96 + sys-apps/grep
97 + sys-apps/hwloc:=
98 + sys-apps/keyutils:=
99 + sys-apps/util-linux:=
100 + sys-apps/sed
101 + sys-apps/util-linux
102 + sys-libs/libcap-ng:=
103 + sys-libs/ncurses:0=
104 + sys-libs/zlib:=
105 + sys-process/numactl:=
106 + x11-libs/libpciaccess:=
107 + virtual/libcrypt
108 + babeltrace? ( dev-util/babeltrace )
109 + fuse? ( sys-fs/fuse:0= )
110 + jemalloc? ( dev-libs/jemalloc:= )
111 + !jemalloc? ( >=dev-util/google-perftools-2.6.1:= )
112 + kafka? ( dev-libs/librdkafka:= )
113 + kerberos? ( virtual/krb5 )
114 + ldap? ( net-nds/openldap:= )
115 + lttng? ( dev-util/lttng-ust:= )
116 + rabbitmq? ( net-libs/rabbitmq-c:= )
117 + radosgw? (
118 + dev-libs/expat:=
119 + dev-libs/openssl:=
120 + net-misc/curl:=[curl_ssl_openssl]
121 + )
122 + ssl? ( dev-libs/openssl:= )
123 + system-boost? ( dev-libs/boost:=[threads(+),context,python,${PYTHON_USEDEP}] )
124 + xfs? ( sys-fs/xfsprogs:= )
125 + zfs? ( sys-fs/zfs:= )
126 + ${PYTHON_DEPS}
127 +"
128 +BDEPEND="
129 + amd64? ( dev-lang/yasm )
130 + x86? ( dev-lang/yasm )
131 + app-arch/cpio
132 + >=dev-util/cmake-3.5.0
133 + dev-python/cython[${PYTHON_USEDEP}]
134 + dev-python/sphinx
135 + dev-util/cunit
136 + dev-util/gperf
137 + dev-util/ragel
138 + dev-util/valgrind
139 + sys-apps/coreutils
140 + sys-apps/findutils
141 + sys-apps/grep
142 + sys-apps/sed
143 + sys-apps/which
144 + sys-devel/bc
145 + sys-devel/patch
146 + virtual/pkgconfig
147 + test? (
148 + dev-python/coverage[${PYTHON_USEDEP}]
149 + dev-python/virtualenv[${PYTHON_USEDEP}]
150 + dev-python/requests-mock[${PYTHON_USEDEP}]
151 + sys-apps/grep[pcre]
152 + sys-fs/btrfs-progs
153 + )
154 +"
155 +RDEPEND="${DEPEND}
156 + app-admin/sudo
157 + net-misc/socat
158 + sys-apps/gptfdisk
159 + >=sys-apps/smartmontools-7.0
160 + sys-block/parted
161 + sys-fs/cryptsetup
162 + sys-fs/lsscsi
163 + sys-fs/lvm2[-device-mapper-only(-)]
164 + virtual/awk
165 + dev-python/bcrypt[${PYTHON_USEDEP}]
166 + dev-python/cherrypy[${PYTHON_USEDEP}]
167 + dev-python/flask[${PYTHON_USEDEP}]
168 + dev-python/jinja[${PYTHON_USEDEP}]
169 + dev-python/pecan[${PYTHON_USEDEP}]
170 + dev-python/prettytable[${PYTHON_USEDEP}]
171 + dev-python/pyopenssl[${PYTHON_USEDEP}]
172 + dev-python/requests[${PYTHON_USEDEP}]
173 + dev-python/werkzeug[${PYTHON_USEDEP}]
174 + mgr? (
175 + dev-python/more-itertools[${PYTHON_USEDEP}]
176 + dev-python/numpy[${PYTHON_USEDEP}]
177 + <dev-python/pyjwt-2.0[${PYTHON_USEDEP}]
178 + dev-python/pyyaml[${PYTHON_USEDEP}]
179 + dev-python/routes[${PYTHON_USEDEP}]
180 + sci-libs/scikit-learn[${PYTHON_USEDEP}]
181 + dev-python/six[${PYTHON_USEDEP}]
182 + )
183 +"
184 +# diskprediction needs older scipy not compatible with py38
185 +# bug #724438
186 +REQUIRED_USE="
187 + ${PYTHON_REQUIRED_USE}
188 + ?? ( jemalloc tcmalloc )
189 + diskprediction? ( mgr !python_targets_python3_8 )
190 + kafka? ( radosgw )
191 + mgr? ( cephfs )
192 + rabbitmq? ( radosgw )
193 +"
194 +RESTRICT="!test? ( test )"
195 +
196 +# the tests need root access
197 +RESTRICT="test? ( userpriv )"
198 +
199 +# distribution tarball does not include everything needed for tests
200 +RESTRICT+=" test"
201 +
202 +# create a non-debug release
203 +CMAKE_BUILD_TYPE=RelWithDebInfo
204 +
205 +# false positives unless all USE flags are on
206 +CMAKE_WARN_UNUSED_CLI=no
207 +
208 +PATCHES=(
209 + "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
210 + "${FILESDIR}/ceph-14.2.0-cflags.patch"
211 + "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
212 + "${FILESDIR}/ceph-14.2.22-cflags.patch"
213 + "${FILESDIR}/ceph-14.2.0-mgr-python-version.patch"
214 + "${FILESDIR}/ceph-14.2.22-no-virtualenvs.patch"
215 + "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
216 + "${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch"
217 + "${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
218 + "${FILESDIR}/ceph-14.2.3-dpdk-compile-fix-1.patch"
219 + "${FILESDIR}/ceph-14.2.4-python-executable.patch"
220 + "${FILESDIR}/ceph-14.2.4-undefined-behaviour.patch"
221 + "${FILESDIR}/ceph-14.2.22-build-without-mgr.patch"
222 + "${FILESDIR}/ceph-14.2.11-systemd-unit-fix.patch"
223 + "${FILESDIR}/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch"
224 +)
225 +
226 +check-reqs_export_vars() {
227 + CHECKREQS_DISK_BUILD="5200M"
228 + CHECKREQS_DISK_USR="510M"
229 +
230 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
231 +}
232 +
233 +pkg_pretend() {
234 + check-reqs_export_vars
235 + check-reqs_pkg_pretend
236 +}
237 +
238 +pkg_setup() {
239 + python_setup
240 + check-reqs_export_vars
241 + check-reqs_pkg_setup
242 +}
243 +
244 +src_prepare() {
245 + cmake_src_prepare
246 +
247 + if use system-boost; then
248 + find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \
249 + | xargs --null sed -r \
250 + -e 's|Boost::|boost_|g' \
251 + -e 's|Boost_|boost_|g' \
252 + -e 's|[Bb]oost_boost|boost_system|g' -i || die
253 + fi
254 +
255 + sed -r -e "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
256 + -i src/bash_completion/CMakeLists.txt || die
257 +
258 + sed -e "s:objdump -p:$(tc-getOBJDUMP) -p:" -i CMakeLists.txt || die
259 +
260 + if ! use diskprediction; then
261 + rm -rf src/pybind/mgr/diskprediction_local || die
262 + fi
263 +
264 + # remove tests that need root access
265 + rm src/test/cli/ceph-authtool/cap*.t || die
266 +}
267 +
268 +ceph_src_configure() {
269 + local flag
270 + local mycmakeargs=(
271 + -DWITH_BABELTRACE=$(usex babeltrace)
272 + -DWITH_CEPHFS=$(usex cephfs)
273 + -DWITH_CEPHFS_SHELL=$(usex cephfs)
274 + -DWITH_DPDK=$(usex dpdk)
275 + -DWITH_SPDK=$(usex spdk)
276 + -DWITH_FUSE=$(usex fuse)
277 + -DWITH_LTTNG=$(usex lttng)
278 + -DWITH_GSSAPI=$(usex kerberos)
279 + -DWITH_GRAFANA=$(usex grafana)
280 + -DWITH_MGR=$(usex mgr)
281 + -DWITH_MGR_DASHBOARD_FRONTEND=OFF
282 + -DWITH_NUMA=$(usex numa)
283 + -DWITH_OPENLDAP=$(usex ldap)
284 + -DWITH_PYTHON3=3
285 + -DWITH_RADOSGW=$(usex radosgw)
286 + -DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq)
287 + -DWITH_RADOSGW_KAFKA_ENDPOINT=$(usex kafka)
288 + -DWITH_SSL=$(usex ssl)
289 + -DWITH_SYSTEMD=$(usex systemd)
290 + -DWITH_TESTS=$(usex test)
291 + -DWITH_XFS=$(usex xfs)
292 + -DWITH_ZFS=$(usex zfs)
293 + -DENABLE_SHARED="ON"
294 + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
295 + -DWITH_SYSTEM_BOOST=$(usex system-boost)
296 + -DBOOST_J=$(makeopts_jobs)
297 + -DWITH_SYSTEM_ROCKSDB=ON
298 + -DWITH_RDMA=OFF
299 + -DWITH_TBB=OFF
300 + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
301 + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=$(systemd_get_systemunitdir)
302 + -DEPYTHON_VERSION="${EPYTHON#python}"
303 + -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
304 + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
305 + -Wno-dev
306 + )
307 + if use amd64 || use x86; then
308 + for flag in ${CPU_FLAGS_X86[@]}; do
309 + mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
310 + done
311 + fi
312 +
313 + # needed for >=glibc-2.32
314 + has_version '>=sys-libs/glibc-2.32' && mycmakeargs+=(-DWITH_REENTRANT_STRSIGNAL:BOOL=ON)
315 +
316 + rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
317 + || die "failed to remove cmake cache"
318 +
319 + cmake_src_configure
320 +
321 + # bug #630232
322 + sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
323 + "${BUILD_DIR:-${S}}"/include/acconfig.h \
324 + || die "sed failed"
325 +}
326 +
327 +src_configure() {
328 + use custom-cflags || strip-flags
329 + ceph_src_configure
330 +}
331 +
332 +python_compile() {
333 + local CMAKE_USE_DIR="${S}"
334 + ceph_src_configure
335 +
336 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
337 + emake VERBOSE=1 clean
338 + emake VERBOSE=1 all
339 +
340 + # python modules are only compiled with "make install" so we need to do this to
341 + # prevent doing a bunch of compilation in src_install
342 + DESTDIR="${T}" emake VERBOSE=1 install
343 + popd >/dev/null || die
344 +}
345 +
346 +src_compile() {
347 + cmake_build VERBOSE=1 all
348 +
349 + # we have to do this here to prevent from building everything multiple times
350 + python_copy_sources
351 + python_foreach_impl python_compile
352 +}
353 +
354 +src_test() {
355 + make check || die "make check failed"
356 +}
357 +
358 +python_install() {
359 + local CMAKE_USE_DIR="${S}"
360 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
361 + DESTDIR="${ED}" emake VERBOSE=1 install
362 + popd >/dev/null || die
363 +
364 + python_optimize
365 +}
366 +
367 +src_install() {
368 + cmake_src_install
369 + python_foreach_impl python_install
370 +
371 + find "${ED}" -name '*.la' -type f -delete || die
372 +
373 + exeinto /usr/$(get_libdir)/ceph
374 + newexe "${BUILD_DIR}/bin/init-ceph" init-ceph
375 +
376 + insinto /etc/logrotate.d/
377 + newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
378 +
379 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
380 +
381 + fowners -R ceph:ceph /var/log/ceph
382 +
383 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
384 + newinitd "${FILESDIR}/${PN}.initd-r12" ${PN}
385 + newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
386 +
387 + insinto /etc/sysctl.d
388 + newins "${FILESDIR}"/sysctld 90-${PN}.conf
389 +
390 + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
391 +
392 + # units aren't installed by the build system unless systemd is enabled
393 + # so no point installing these with the USE flag disabled
394 + if use systemd; then
395 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
396 + "ceph-mds@.service"
397 +
398 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
399 + "ceph-osd@.service"
400 +
401 + fi
402 +
403 + udev_dorules udev/*.rules
404 + newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf
405 +
406 + readme.gentoo_create_doc
407 +
408 + python_setup
409 +
410 + # bug #630232
411 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \
412 + || die "sed failed"
413 +
414 + python_fix_shebang "${ED}"/usr/{,s}bin/
415 +
416 + # python_fix_shebang apparently is not idempotent
417 + local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]'
418 + grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \
419 + | xargs --null --no-run-if-empty -- sed -i -r "s:${shebang_regex}:\1:" || die
420 +
421 + local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* )
422 + dostrip -x "${rados_classes[@]#${ED}}"
423 +}
424 +
425 +pkg_postinst() {
426 + readme.gentoo_print_elog
427 +}
428
429 diff --git a/sys-cluster/ceph/files/ceph-14.2.22-build-without-mgr.patch b/sys-cluster/ceph/files/ceph-14.2.22-build-without-mgr.patch
430 new file mode 100644
431 index 00000000000..f3ba34cc165
432 --- /dev/null
433 +++ b/sys-cluster/ceph/files/ceph-14.2.22-build-without-mgr.patch
434 @@ -0,0 +1,32 @@
435 +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
436 +index ed4bbc75d44..5f5e72918d2 100644
437 +--- a/src/CMakeLists.txt
438 ++++ b/src/CMakeLists.txt
439 +@@ -451,9 +451,7 @@ if(WITH_LIBRADOSSTRIPER)
440 + add_subdirectory(libradosstriper)
441 + endif()
442 +
443 +-if(WITH_MGR)
444 +- add_subdirectory(mgr)
445 +-endif()
446 ++add_subdirectory(mgr)
447 +
448 + set(librados_config_srcs
449 + librados-config.cc)
450 +diff --git a/src/mgr/CMakeLists.txt b/src/mgr/CMakeLists.txt
451 +index e7caaeff099..b4f13c05184 100644
452 +--- a/src/mgr/CMakeLists.txt
453 ++++ b/src/mgr/CMakeLists.txt
454 +@@ -1,6 +1,7 @@
455 + add_library(mgr_cap_obj OBJECT
456 + MgrCap.cc)
457 +
458 ++if(WITH_MGR)
459 + set(mgr_srcs
460 + ${CMAKE_SOURCE_DIR}/src/ceph_mgr.cc
461 + ${CMAKE_SOURCE_DIR}/src/mon/PGMap.cc
462 +@@ -36,3 +37,4 @@ target_link_libraries(ceph-mgr
463 + set_target_properties(ceph-mgr PROPERTIES
464 + POSITION_INDEPENDENT_CODE ${EXE_LINKER_USE_PIE})
465 + install(TARGETS ceph-mgr DESTINATION bin)
466 ++endif()
467
468 diff --git a/sys-cluster/ceph/files/ceph-14.2.22-cflags.patch b/sys-cluster/ceph/files/ceph-14.2.22-cflags.patch
469 new file mode 100644
470 index 00000000000..5c9f1709861
471 --- /dev/null
472 +++ b/sys-cluster/ceph/files/ceph-14.2.22-cflags.patch
473 @@ -0,0 +1,25 @@
474 +diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
475 +index eaab331413b..4ee3f1b0768 100644
476 +--- a/cmake/modules/BuildBoost.cmake
477 ++++ b/cmake/modules/BuildBoost.cmake
478 +@@ -62,7 +62,7 @@ function(do_build_boost version)
479 + else()
480 + list(APPEND boost_features "address-model=32")
481 + endif()
482 +- set(BOOST_CXXFLAGS "-fPIC -w") # check on arm, etc <---XXX
483 ++ set(BOOST_CXXFLAGS "${CMAKE_CXX_FLAGS} -fPIC -w") # check on arm, etc <---XXX
484 + list(APPEND boost_features "cxxflags=${BOOST_CXXFLAGS}")
485 +
486 + set(boost_with_libs)
487 +diff --git a/cmake/modules/BuildZstd.cmake b/cmake/modules/BuildZstd.cmake
488 +index 799b14b281d..9b4b5ee8dcf 100644
489 +--- a/cmake/modules/BuildZstd.cmake
490 ++++ b/cmake/modules/BuildZstd.cmake
491 +@@ -1,6 +1,6 @@
492 + # libzstd - build it statically
493 + function(build_Zstd)
494 +- set(ZSTD_C_FLAGS "-fPIC -Wno-unused-variable -O3")
495 ++ set(ZSTD_C_FLAGS "-fPIC -Wno-unused-variable $ENV{CFLAGS} -O3")
496 +
497 + include(ExternalProject)
498 + ExternalProject_Add(zstd_ext
499
500 diff --git a/sys-cluster/ceph/files/ceph-14.2.22-no-virtualenvs.patch b/sys-cluster/ceph/files/ceph-14.2.22-no-virtualenvs.patch
501 new file mode 100644
502 index 00000000000..534133122f9
503 --- /dev/null
504 +++ b/sys-cluster/ceph/files/ceph-14.2.22-no-virtualenvs.patch
505 @@ -0,0 +1,39 @@
506 +diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt
507 +index 7c9cc4abd56..9f84b0c2b26 100644
508 +--- a/src/pybind/mgr/dashboard/CMakeLists.txt
509 ++++ b/src/pybind/mgr/dashboard/CMakeLists.txt
510 +@@ -2,7 +2,7 @@ set(MGR_DASHBOARD_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-dashboard-virtualenv)
511 +
512 + add_custom_target(mgr-dashboard-test-venv
513 + COMMAND
514 +- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${MGR_DASHBOARD_VIRTUALENV}
515 ++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${MGR_DASHBOARD_VIRTUALENV}
516 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard
517 + COMMENT "dashboard tests virtualenv is being created")
518 + add_dependencies(tests mgr-dashboard-test-venv)
519 +@@ -14,9 +14,9 @@ function(add_npm_command)
520 + set(multi_kw COMMAND DEPENDS)
521 + cmake_parse_arguments(NC "${options}" "${single_kw}" "${multi_kw}" ${ARGN})
522 + string(REPLACE ";" " " command "${NC_COMMAND}")
523 +- if(NC_NODEENV)
524 +- string(REGEX REPLACE "^(.*(npm|npx) .*)$" ". ${mgr-dashboard-nodeenv-dir}/bin/activate && \\1 && deactivate" command ${command})
525 +- endif()
526 ++ #if(NC_NODEENV)
527 ++ # string(REGEX REPLACE "^(.*(npm|npx) .*)$" ". ${mgr-dashboard-nodeenv-dir}/bin/activate && \\1 && deactivate" command ${command})
528 ++ #endif()
529 + string(REPLACE " " ";" command "${command}")
530 + add_custom_command(
531 + OUTPUT "${NC_OUTPUT}"
532 +@@ -41,9 +41,9 @@ else()
533 +
534 + add_custom_command(
535 + OUTPUT "${mgr-dashboard-nodeenv-dir}/bin/npm"
536 +- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv-dir}
537 +- COMMAND ${mgr-dashboard-nodeenv-dir}/bin/pip install nodeenv
538 +- COMMAND ${mgr-dashboard-nodeenv-dir}/bin/nodeenv --verbose -p --node=10.13.0
539 ++ #COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv-dir}
540 ++ #COMMAND ${mgr-dashboard-nodeenv-dir}/bin/pip install nodeenv
541 ++ #COMMAND ${mgr-dashboard-nodeenv-dir}/bin/nodeenv --verbose -p --node=10.13.0
542 + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
543 + COMMENT "dashboard nodeenv is being installed"
544 + )