public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrick McLean" <chutzpah@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/
Date: Thu, 23 Apr 2020 20:44:30 +0000 (UTC)	[thread overview]
Message-ID: <1587674661.bea94b24a68841e9c60b819c6634f5850c98e895.chutzpah@gentoo> (raw)

commit:     bea94b24a68841e9c60b819c6634f5850c98e895
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Apr 22 23:40:05 2020 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Apr 23 20:44:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bea94b24

sys-cluster/ceph: remove static-libs useflag

as per policy
https://projects.gentoo.org/qa/policy-guide/installed-files.html?highlight=static#pg0302

for more context read:
https://flameeyes.blog/2011/08/29/useless-flag-static-libs/
https://archives.gentoo.org/gentoo-dev/message/2dada80c2b9c85b0e83e6328428bf8ab

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/15476
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 sys-cluster/ceph/ceph-12.2.12-r3.ebuild | 320 ++++++++++++++++++++++++++
 sys-cluster/ceph/ceph-14.2.7-r1.ebuild  | 370 ++++++++++++++++++++++++++++++
 sys-cluster/ceph/ceph-14.2.8-r1.ebuild  | 368 ++++++++++++++++++++++++++++++
 sys-cluster/ceph/ceph-14.2.9-r1.ebuild  | 368 ++++++++++++++++++++++++++++++
 sys-cluster/ceph/ceph-15.2.1-r1.ebuild  | 389 ++++++++++++++++++++++++++++++++
 5 files changed, 1815 insertions(+)

diff --git a/sys-cluster/ceph/ceph-12.2.12-r3.ebuild b/sys-cluster/ceph/ceph-12.2.12-r3.ebuild
new file mode 100644
index 00000000000..029b309f009
--- /dev/null
+++ b/sys-cluster/ceph/ceph-12.2.12-r3.ebuild
@@ -0,0 +1,320 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_6 )
+DISTUTILS_OPTIONAL=1
+
+inherit check-reqs cmake-utils distutils-r1 flag-o-matic multiprocessing \
+	python-r1 udev readme.gentoo-r1 systemd
+
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/ceph/ceph.git"
+	SRC_URI=""
+else
+	SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
+	# currently broken (bug #708294)
+	#KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="https://ceph.com/"
+
+LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 BSD Boost-1.0 MIT"
+SLOT="0"
+
+CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
+
+IUSE="babeltrace cephfs fuse jemalloc ldap lttng +mgr nss +radosgw +ssl"
+IUSE+=" +system-boost systemd +tcmalloc test xfs zfs"
+IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
+
+# unbundling code commented out pending bugs 584056 and 584058
+#>=dev-libs/jerasure-2.0.0-r1
+#>=dev-libs/gf-complete-2.0.0
+COMMON_DEPEND="
+	acct-group/ceph
+	acct-user/ceph
+	virtual/libudev:=
+	app-arch/bzip2:=
+	app-arch/lz4:=
+	app-arch/snappy:=
+	app-arch/zstd:=
+	app-misc/jq:=
+	<dev-libs/crypto++-7.0:=
+	dev-libs/leveldb:=[snappy,tcmalloc?]
+	dev-libs/libaio:=
+	dev-libs/libxml2:=
+	sys-apps/keyutils:=
+	sys-apps/util-linux:=
+	sys-libs/zlib:=
+	babeltrace? ( dev-util/babeltrace )
+	ldap? ( net-nds/openldap:= )
+	lttng? ( dev-util/lttng-ust:= )
+	nss? ( dev-libs/nss:= )
+	fuse? ( sys-fs/fuse:0= )
+	xfs? ( sys-fs/xfsprogs:= )
+	zfs? ( sys-fs/zfs:= )
+	ssl? ( dev-libs/openssl:0= )
+	radosgw? (
+		dev-libs/expat:=
+		<dev-libs/openssl-1.1:=
+		net-misc/curl:=[curl_ssl_openssl]
+	)
+	system-boost? (
+		=dev-libs/boost-1.66*:=[threads,context,python,${PYTHON_USEDEP}]
+	)
+	jemalloc? ( dev-libs/jemalloc:= )
+	!jemalloc? ( >=dev-util/google-perftools-2.4:= )
+	${PYTHON_DEPS}
+	"
+DEPEND="${COMMON_DEPEND}
+	app-arch/cpio
+	amd64? ( dev-lang/yasm )
+	x86? ( dev-lang/yasm )
+	dev-python/cython[${PYTHON_USEDEP}]
+	dev-python/sphinx
+	dev-util/gperf
+	dev-util/valgrind
+	sys-apps/which
+	sys-devel/bc
+	virtual/pkgconfig
+	test? (
+		dev-python/virtualenv[${PYTHON_USEDEP}]
+		sys-apps/grep[pcre]
+		sys-fs/btrfs-progs
+	)"
+RDEPEND="${COMMON_DEPEND}
+	net-misc/socat
+	sys-apps/gptfdisk
+	sys-block/parted
+	sys-fs/e2fsprogs
+	sys-fs/cryptsetup
+	sys-fs/lvm2
+	!<sys-apps/openrc-0.26.3
+	dev-python/cherrypy[${PYTHON_USEDEP}]
+	dev-python/flask[${PYTHON_USEDEP}]
+	dev-python/jinja[${PYTHON_USEDEP}]
+	dev-python/pecan[${PYTHON_USEDEP}]
+	dev-python/prettytable[${PYTHON_USEDEP}]
+	dev-python/pyopenssl[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	dev-python/werkzeug[${PYTHON_USEDEP}]
+	"
+REQUIRED_USE="
+	$(python_gen_useflags 'python2*')
+	${PYTHON_REQUIRED_USE}
+	?? ( ssl nss )
+	?? ( jemalloc tcmalloc )
+	"
+
+RESTRICT="test? ( userpriv )"
+
+# distribution tarball does not include everything needed for tests
+RESTRICT+=" test"
+
+# false positives unless all USE flags are on
+CMAKE_WARN_UNUSED_CLI="no"
+
+# ninja does not work at all
+CMAKE_MAKEFILE_GENERATOR="emake"
+
+UNBUNDLE_LIBS=(
+	src/erasure-code/jerasure/jerasure
+	src/erasure-code/jerasure/gf-complete
+)
+
+PATCHES=(
+	"${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
+	"${FILESDIR}/ceph-12.2.0-cflags.patch"
+	"${FILESDIR}/ceph-12.2.1-systemd-unitdir.patch"
+	"${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
+	"${FILESDIR}/ceph-12.2.4-cflags.patch"
+	"${FILESDIR}/ceph-12.2.4-rocksdb-cflags.patch"
+	"${FILESDIR}/ceph-12.2.5-no-werror.patch"
+	"${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
+	"${FILESDIR}/ceph-12.2.11-fix-min-call.patch"
+	"${FILESDIR}/ceph-12.2.12-dont-use-bad-namespace.patch"
+	"${FILESDIR}/ceph-12.2.12-civetweb-openssl-1.1.1.patch"
+	"${FILESDIR}/ceph-12.2.12-qa-warning.patch"
+	"${FILESDIR}/ceph-12.2.12-ncurses-tinfo.patch"
+)
+
+check-reqs_export_vars() {
+	if use amd64; then
+		CHECKREQS_DISK_BUILD="12G"
+		CHECKREQS_DISK_USR="460M"
+	else
+		CHECKREQS_DISK_BUILD="1400M"
+		CHECKREQS_DISK_USR="450M"
+	fi
+
+	export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
+}
+
+user_setup() {
+	enewgroup ceph ${CEPH_GID}
+	enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph
+}
+
+pkg_pretend() {
+	check-reqs_export_vars
+	check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	python_setup 'python2*'
+	check-reqs_export_vars
+	check-reqs_pkg_setup
+	user_setup
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	if use system-boost; then
+		eapply "${FILESDIR}/ceph-12.2.11-boost-sonames.patch"
+	fi
+
+	# remove tests that need root access
+	rm src/test/cli/ceph-authtool/cap*.t
+
+	#rm -rf "${UNBUNDLE_LIBS[@]}"
+}
+
+ceph_src_configure() {
+	local flag
+	local mycmakeargs=(
+		-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+		-DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
+		-DWITH_BABELTRACE=$(usex babeltrace)
+		-DWITH_CEPHFS=$(usex cephfs)
+		-DWITH_FUSE=$(usex fuse)
+		-DWITH_LTTNG=$(usex lttng)
+		-DWITH_MGR=$(usex mgr)
+		-DWITH_NSS=$(usex nss)
+		-DWITH_OPENLDAP=$(usex ldap)
+		-DWITH_RADOSGW=$(usex radosgw)
+		-DWITH_SSL=$(usex ssl)
+		-DWITH_SYSTEMD=$(usex systemd)
+		-DWITH_TESTS=$(usex test)
+		-DWITH_XFS=$(usex xfs)
+		-DWITH_ZFS=$(usex zfs)
+		-DENABLE_SHARED="yes"
+		-DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
+		-DWITH_SYSTEM_BOOST=$(usex system-boost)
+		-DBOOST_J=$(makeopts_jobs)
+		-DWITH_RDMA=no
+		-DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
+		-DEPYTHON_VERSION="${EPYTHON#python}"
+	)
+	if use amd64 || use x86; then
+		for flag in ${CPU_FLAGS_X86[@]}; do
+			mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
+		done
+	fi
+
+	rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt"
+	cmake-utils_src_configure
+
+	# bug #630232
+	sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
+		"${BUILD_DIR:--${S}}"/include/acconfig.h \
+		|| die "sed failed"
+}
+
+src_configure() {
+	ceph_src_configure
+}
+
+python_compile() {
+	local CMAKE_USE_DIR="${S}"
+
+	ceph_src_configure
+	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+	emake VERBOSE=1 all
+
+	# python modules are only compiled with "make install" so we need to do this to
+	# prevent doing a bunch of compilation in src_install
+	DESTDIR="${T}" emake VERBOSE=1 install
+	popd >/dev/null || die
+}
+
+src_compile() {
+	cmake-utils_src_make all
+
+	# we have to do this here to prevent from building everything multiple times
+	python_copy_sources
+	python_foreach_impl python_compile
+}
+
+src_test() {
+	make check || die "make check failed"
+}
+
+python_install() {
+	local CMAKE_USE_DIR="${S}"
+	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+	DESTDIR="${ED}" emake install
+	popd >/dev/null || die
+}
+
+src_install() {
+	cmake-utils_src_install
+	python_foreach_impl python_install
+
+	find "${D}" -name '*.la' -delete || die
+
+	exeinto /usr/$(get_libdir)/ceph
+	newexe "${BUILD_DIR}/bin/init-ceph" ceph_init.sh
+
+	insinto /etc/logrotate.d/
+	newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
+
+	keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
+
+	fowners -R ceph:ceph /var/lib/ceph /var/log/ceph
+
+	newinitd "${FILESDIR}/rbdmap.initd" rbdmap
+	newinitd "${FILESDIR}/${PN}.initd-r12" ${PN}
+	newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}"/sysctld 90-${PN}.conf
+
+	use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
+
+	# units aren't installed by the build system unless systemd is enabled
+	# so no point installing these with the USE flag disabled
+	if use systemd; then
+		systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
+			"ceph-mds@.service"
+
+		systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
+			"ceph-osd@.service"
+	fi
+
+	udev_dorules udev/*.rules
+
+	readme.gentoo_create_doc
+
+	python_setup 'python2*'
+
+	# bug #630232
+	sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph \
+		|| die "sed failed"
+
+	python_fix_shebang "${ED}"/usr/{,s}bin/
+
+	# python_fix_shebang apparently is not idempotent
+	sed -i -r  's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \
+		"${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed"
+
+	local -a rados_classes=( "${D}/usr/$(get_libdir)/rados-classes"/* )
+	dostrip -x "${rados_classes[@]#${D}}"
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/sys-cluster/ceph/ceph-14.2.7-r1.ebuild b/sys-cluster/ceph/ceph-14.2.7-r1.ebuild
new file mode 100644
index 00000000000..f05b0b4f65b
--- /dev/null
+++ b/sys-cluster/ceph/ceph-14.2.7-r1.ebuild
@@ -0,0 +1,370 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7} )
+CMAKE_MAKEFILE_GENERATOR=emake
+
+DISTUTILS_OPTIONAL=1
+
+inherit check-reqs bash-completion-r1 cmake-utils distutils-r1 flag-o-matic \
+		multiprocessing python-r1 udev readme.gentoo-r1 toolchain-funcs \
+		systemd
+
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/ceph/ceph.git"
+	SRC_URI=""
+else
+	SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
+	KEYWORDS="~amd64 ~arm64 ~ppc64"
+fi
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="https://ceph.com/"
+
+LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ BSD Boost-1.0 MIT public-domain"
+SLOT="0"
+
+CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
+
+IUSE="babeltrace cephfs dpdk fuse grafana jemalloc kerberos ldap libressl"
+IUSE+=" lttng +mgr numa rabbitmq +radosgw +ssl spdk system-boost"
+IUSE+=" systemd +tcmalloc test xfs zfs"
+IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
+
+COMMON_DEPEND="
+	acct-group/ceph
+	acct-user/ceph
+	virtual/libudev:=
+	app-arch/bzip2:=
+	app-arch/lz4:=
+	app-arch/snappy:=
+	app-arch/zstd:=
+	app-shells/bash:0
+	app-misc/jq:=
+	dev-libs/crypto++:=
+	dev-libs/leveldb:=[snappy,tcmalloc(-)?]
+	dev-libs/libaio:=
+	dev-libs/libnl:3=
+	dev-libs/libxml2:=
+	dev-libs/nss:=
+	sys-auth/oath-toolkit:=
+	sys-apps/coreutils
+	sys-apps/grep
+	sys-apps/keyutils:=
+	sys-apps/util-linux:=
+	sys-apps/sed
+	sys-apps/util-linux
+	sys-libs/libcap-ng:=
+	sys-libs/ncurses:0=
+	sys-libs/zlib:=
+	babeltrace? ( dev-util/babeltrace )
+	ldap? ( net-nds/openldap:= )
+	lttng? ( dev-util/lttng-ust:= )
+	fuse? ( sys-fs/fuse:0= )
+	kerberos? ( virtual/krb5 )
+	rabbitmq? ( net-libs/rabbitmq-c:= )
+	ssl? (
+		!libressl? ( dev-libs/openssl:= )
+		libressl? ( dev-libs/libressl:= )
+	)
+	xfs? ( sys-fs/xfsprogs:= )
+	zfs? ( sys-fs/zfs:= )
+	radosgw? (
+		dev-libs/expat:=
+		!libressl? (
+			dev-libs/openssl:=
+			net-misc/curl:=[curl_ssl_openssl]
+		)
+		libressl? (
+			dev-libs/libressl:=
+			net-misc/curl:=[curl_ssl_libressl]
+		)
+	)
+	system-boost? (
+		|| (
+			=dev-libs/boost-1.71*[threads,context,python,${PYTHON_USEDEP}]
+			=dev-libs/boost-1.70*[threads,context,python,${PYTHON_USEDEP}]
+			=dev-libs/boost-1.67*[threads,context,python,${PYTHON_USEDEP}]
+		)
+		dev-libs/boost:=[threads,context,python,${PYTHON_USEDEP}]
+	)
+	jemalloc? ( dev-libs/jemalloc:= )
+	!jemalloc? ( >=dev-util/google-perftools-2.4:= )
+	${PYTHON_DEPS}
+"
+DEPEND="${COMMON_DEPEND}
+	amd64? ( dev-lang/yasm )
+	x86? ( dev-lang/yasm )
+	dev-python/cython[${PYTHON_USEDEP}]
+	dev-python/sphinx
+	dev-util/cunit
+	test? (
+		dev-python/coverage[${PYTHON_USEDEP}]
+		dev-python/virtualenv[${PYTHON_USEDEP}]
+		sys-apps/grep[pcre]
+		sys-fs/btrfs-progs
+	)
+"
+BDEPEND="
+	app-arch/cpio
+	>=dev-util/cmake-3.5.0
+	dev-util/gperf
+	dev-util/valgrind
+	sys-apps/coreutils
+	sys-apps/findutils
+	sys-apps/grep
+	sys-apps/sed
+	sys-apps/which
+	sys-devel/bc
+	sys-devel/patch
+	virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+	net-misc/socat
+	sys-apps/gptfdisk
+	sys-block/parted
+	sys-fs/cryptsetup
+	sys-fs/lvm2[-device-mapper-only(-)]
+	sys-fs/lsscsi
+	virtual/awk
+	dev-python/bcrypt[${PYTHON_USEDEP}]
+	dev-python/cherrypy[${PYTHON_USEDEP}]
+	dev-python/flask[${PYTHON_USEDEP}]
+	dev-python/jinja[${PYTHON_USEDEP}]
+	dev-python/pecan[${PYTHON_USEDEP}]
+	dev-python/prettytable[${PYTHON_USEDEP}]
+	dev-python/pyopenssl[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	dev-python/werkzeug[${PYTHON_USEDEP}]
+"
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	|| ( $(python_gen_useflags 'python3*') )
+	?? ( jemalloc tcmalloc )
+	rabbitmq? ( radosgw )
+"
+
+# the tests need root access
+RESTRICT="test? ( userpriv )"
+
+# distribution tarball does not include everything needed for tests
+RESTRICT+=" test"
+
+# false positives unless all USE flags are on
+CMAKE_WARN_UNUSED_CLI="no"
+
+PATCHES=(
+	"${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
+	"${FILESDIR}/ceph-14.2.0-cflags.patch"
+	"${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
+	"${FILESDIR}/ceph-13.2.0-cflags.patch"
+	"${FILESDIR}/ceph-14.2.0-mgr-python-version.patch"
+	"${FILESDIR}/ceph-14.2.5-no-virtualenvs.patch"
+	"${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
+	"${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch"
+	"${FILESDIR}/ceph-14.2.0-link-crc32-statically.patch"
+	"${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
+	"${FILESDIR}/ceph-14.2.5-boost-1.70.patch"
+	"${FILESDIR}/ceph-14.2.3-dpdk-compile-fix-1.patch"
+	"${FILESDIR}/ceph-14.2.4-python-executable.patch"
+	"${FILESDIR}/ceph-14.2.4-undefined-behaviour.patch"
+)
+
+check-reqs_export_vars() {
+	if use amd64; then
+		CHECKREQS_DISK_BUILD="12G"
+		CHECKREQS_DISK_USR="460M"
+	else
+		CHECKREQS_DISK_BUILD="1400M"
+		CHECKREQS_DISK_USR="450M"
+	fi
+
+	export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
+}
+
+pkg_pretend() {
+	check-reqs_export_vars
+	check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	python_setup 'python3*'
+	check-reqs_export_vars
+	check-reqs_pkg_setup
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	if use system-boost; then
+		eapply "${FILESDIR}/ceph-14.2.5-boost-sonames.patch"
+
+		find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \
+			| xargs --null sed -e 's|Boost::|Boost_|g' -i || die
+
+		has_version '>=dev-libs/boost-1.70.0' || \
+			eapply "${FILESDIR}/ceph-14.2.5-boost-1.6-python-sonames.patch"
+	fi
+
+	sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
+		src/bash_completion/CMakeLists.txt || die
+
+	# remove tests that need root access
+	rm src/test/cli/ceph-authtool/cap*.t || die
+}
+
+ceph_src_configure() {
+	local flag
+	local mycmakeargs=(
+		-DWITH_BABELTRACE=$(usex babeltrace)
+		-DWITH_CEPHFS=$(usex cephfs)
+		-DWITH_CEPHFS_SHELL=$(if python_is_python3; then usex cephfs; else echo OFF; fi)
+		-DWITH_DPDK=$(usex dpdk)
+		-DWITH_DPDK=$(usex spdk)
+		-DWITH_FUSE=$(usex fuse)
+		-DWITH_LTTNG=$(usex lttng)
+		-DWITH_GSSAPI=$(usex kerberos)
+		-DWITH_GRAFANA=$(usex grafana)
+		-DWITH_MGR=$(usex mgr)
+		-DWITH_MGR_DASHBOARD_FRONTEND=NO
+		-DWITH_NUMA=$(usex numa)
+		-DWITH_OPENLDAP=$(usex ldap)
+		-DMGR_PYTHON_VERSION=$(if python_is_python3; then echo 3; else echo 2; fi)
+		-DWITH_PYTHON3=$(if python_is_python3; then echo "ON"; else echo "OFF"; fi)
+		-DWITH_PYTHON2=$(if python_is_python3; then echo "OFF"; else echo "ON"; fi)
+		-DWITH_RADOSGW=$(usex radosgw)
+		-DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq)
+		-DWITH_SSL=$(usex ssl)
+		-DWITH_SYSTEMD=$(usex systemd)
+		-DWITH_TESTS=$(usex test)
+		-DWITH_XFS=$(usex xfs)
+		-DWITH_ZFS=$(usex zfs)
+		-DENABLE_SHARED="ON"
+		-DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
+		-DWITH_SYSTEM_BOOST=$(usex system-boost)
+		-DBOOST_J=$(makeopts_jobs)
+		-DWITH_RDMA=no
+		-DWITH_TBB=no
+		-DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
+		-DEPYTHON_VERSION="${EPYTHON#python}"
+		-DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
+		-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+		#-Wno-dev
+	)
+	if use amd64 || use x86; then
+		for flag in ${CPU_FLAGS_X86[@]}; do
+			mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
+		done
+	fi
+
+	rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
+		|| die "failed to remove cmake cache"
+
+	cmake-utils_src_configure
+
+	# bug #630232
+	sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
+		"${BUILD_DIR:-${S}}"/include/acconfig.h \
+		|| die "sed failed"
+}
+
+src_configure() {
+	ceph_src_configure
+}
+
+python_compile() {
+	local CMAKE_USE_DIR="${S}"
+	ceph_src_configure
+
+	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+	emake VERBOSE=1 clean
+	emake VERBOSE=1 all
+
+	# python modules are only compiled with "make install" so we need to do this to
+	# prevent doing a bunch of compilation in src_install
+	DESTDIR="${T}" emake VERBOSE=1 install
+	popd >/dev/null || die
+}
+
+src_compile() {
+	cmake-utils_src_make VERBOSE=1 all
+
+	# we have to do this here to prevent from building everything multiple times
+	python_copy_sources
+	python_foreach_impl python_compile
+}
+
+src_test() {
+	make check || die "make check failed"
+}
+
+python_install() {
+	local CMAKE_USE_DIR="${S}"
+	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+	DESTDIR="${ED}" emake VERBOSE=1 install
+	popd >/dev/null || die
+
+	python_optimize
+}
+
+src_install() {
+	cmake-utils_src_install
+	python_foreach_impl python_install
+
+	find "${ED}" -name '*.la' -type f -delete || die
+
+	exeinto /usr/$(get_libdir)/ceph
+	newexe "${BUILD_DIR}/bin/init-ceph" init-ceph
+
+	insinto /etc/logrotate.d/
+	newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
+
+	keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
+
+	fowners -R ceph:ceph /var/log/ceph
+
+	newinitd "${FILESDIR}/rbdmap.initd" rbdmap
+	newinitd "${FILESDIR}/${PN}.initd-r12" ${PN}
+	newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}"/sysctld 90-${PN}.conf
+
+	use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
+
+	# units aren't installed by the build system unless systemd is enabled
+	# so no point installing these with the USE flag disabled
+	if use systemd; then
+		systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
+			"ceph-mds@.service"
+
+		systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
+			"ceph-osd@.service"
+	fi
+
+	udev_dorules udev/*.rules
+
+	readme.gentoo_create_doc
+
+	python_setup 'python3*'
+
+	# bug #630232
+	sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \
+		|| die "sed failed"
+
+	python_fix_shebang "${ED}"/usr/{,s}bin/
+
+	# python_fix_shebang apparently is not idempotent
+	local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]'
+	grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \
+		| xargs --null --no-run-if-empty -- sed -i -r  "s:${shebang_regex}:\1:" || die
+
+	local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* )
+	dostrip -x "${rados_classes[@]#${ED}}"
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/sys-cluster/ceph/ceph-14.2.8-r1.ebuild b/sys-cluster/ceph/ceph-14.2.8-r1.ebuild
new file mode 100644
index 00000000000..c2fa46f1c65
--- /dev/null
+++ b/sys-cluster/ceph/ceph-14.2.8-r1.ebuild
@@ -0,0 +1,368 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7} )
+CMAKE_MAKEFILE_GENERATOR=emake
+
+DISTUTILS_OPTIONAL=1
+
+inherit check-reqs bash-completion-r1 cmake-utils distutils-r1 flag-o-matic \
+		multiprocessing python-r1 udev readme.gentoo-r1 toolchain-funcs \
+		systemd
+
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/ceph/ceph.git"
+	SRC_URI=""
+else
+	SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
+	KEYWORDS="~amd64 ~ppc64"
+fi
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="https://ceph.com/"
+
+LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ BSD Boost-1.0 MIT public-domain"
+SLOT="0"
+
+CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
+
+IUSE="babeltrace +cephfs custom-cflags dpdk fuse grafana jemalloc kerberos ldap"
+IUSE+=" libressl lttng +mgr numa rabbitmq +radosgw +ssl spdk "
+IUSE+=" system-boost systemd +tcmalloc test xfs zfs"
+IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
+
+COMMON_DEPEND="
+	acct-group/ceph
+	acct-user/ceph
+	virtual/libudev:=
+	app-arch/bzip2:=
+	app-arch/lz4:=
+	app-arch/snappy:=
+	app-arch/zstd:=
+	app-shells/bash:0
+	app-misc/jq:=
+	dev-libs/crypto++:=
+	dev-libs/leveldb:=[snappy,tcmalloc(-)?]
+	dev-libs/libaio:=
+	dev-libs/libnl:3=
+	dev-libs/libxml2:=
+	dev-libs/nss:=
+	sys-auth/oath-toolkit:=
+	sys-apps/coreutils
+	sys-apps/grep
+	sys-apps/keyutils:=
+	sys-apps/util-linux:=
+	sys-apps/sed
+	sys-apps/util-linux
+	sys-libs/libcap-ng:=
+	sys-libs/ncurses:0=
+	sys-libs/zlib:=
+	babeltrace? ( dev-util/babeltrace )
+	ldap? ( net-nds/openldap:= )
+	lttng? ( dev-util/lttng-ust:= )
+	fuse? ( sys-fs/fuse:0= )
+	kerberos? ( virtual/krb5 )
+	rabbitmq? ( net-libs/rabbitmq-c:= )
+	ssl? (
+		!libressl? ( dev-libs/openssl:= )
+		libressl? ( dev-libs/libressl:= )
+	)
+	xfs? ( sys-fs/xfsprogs:= )
+	zfs? ( sys-fs/zfs:= )
+	radosgw? (
+		dev-libs/expat:=
+		!libressl? (
+			dev-libs/openssl:=
+			net-misc/curl:=[curl_ssl_openssl]
+		)
+		libressl? (
+			dev-libs/libressl:=
+			net-misc/curl:=[curl_ssl_libressl]
+		)
+	)
+	system-boost? ( =dev-libs/boost-1.72*[threads,context,python,${PYTHON_USEDEP}] )
+	jemalloc? ( dev-libs/jemalloc:= )
+	!jemalloc? ( >=dev-util/google-perftools-2.6.1:= )
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	amd64? ( dev-lang/yasm )
+	x86? ( dev-lang/yasm )
+	app-arch/cpio
+	>=dev-util/cmake-3.5.0
+	dev-python/cython[${PYTHON_USEDEP}]
+	dev-python/sphinx
+	dev-util/cunit
+	dev-util/gperf
+	dev-util/valgrind
+	sys-apps/coreutils
+	sys-apps/findutils
+	sys-apps/grep
+	sys-apps/sed
+	sys-apps/which
+	sys-devel/bc
+	sys-devel/patch
+	virtual/pkgconfig
+	test? (
+		dev-python/coverage[${PYTHON_USEDEP}]
+		dev-python/virtualenv[${PYTHON_USEDEP}]
+		dev-python/requests-mock[${PYTHON_USEDEP}]
+		sys-apps/grep[pcre]
+		sys-fs/btrfs-progs
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	net-misc/socat
+	sys-apps/gptfdisk
+	sys-block/parted
+	sys-fs/cryptsetup
+	sys-fs/lvm2[-device-mapper-only(-)]
+	sys-fs/lsscsi
+	virtual/awk
+	dev-python/bcrypt[${PYTHON_USEDEP}]
+	dev-python/cherrypy[${PYTHON_USEDEP}]
+	dev-python/flask[${PYTHON_USEDEP}]
+	dev-python/jinja[${PYTHON_USEDEP}]
+	dev-python/pecan[${PYTHON_USEDEP}]
+	dev-python/prettytable[${PYTHON_USEDEP}]
+	dev-python/pyopenssl[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	dev-python/werkzeug[${PYTHON_USEDEP}]
+	mgr? (
+		dev-python/more-itertools[${PYTHON_USEDEP}]
+		dev-python/pyjwt[${PYTHON_USEDEP}]
+		dev-python/pyyaml[${PYTHON_USEDEP}]
+		dev-python/routes[${PYTHON_USEDEP}]
+		dev-python/six[${PYTHON_USEDEP}]
+	)
+"
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	mgr? ( cephfs )
+	?? ( jemalloc tcmalloc )
+	rabbitmq? ( radosgw )
+"
+
+# the tests need root access
+RESTRICT="test? ( userpriv )"
+
+# distribution tarball does not include everything needed for tests
+RESTRICT+=" test"
+
+# false positives unless all USE flags are on
+CMAKE_WARN_UNUSED_CLI="no"
+
+PATCHES=(
+	"${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
+	"${FILESDIR}/ceph-14.2.0-cflags.patch"
+	"${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
+	"${FILESDIR}/ceph-13.2.0-cflags.patch"
+	"${FILESDIR}/ceph-14.2.0-mgr-python-version.patch"
+	"${FILESDIR}/ceph-14.2.5-no-virtualenvs.patch"
+	"${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
+	"${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch"
+	"${FILESDIR}/ceph-14.2.0-link-crc32-statically.patch"
+	"${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
+	"${FILESDIR}/ceph-14.2.3-dpdk-compile-fix-1.patch"
+	"${FILESDIR}/ceph-14.2.4-python-executable.patch"
+	"${FILESDIR}/ceph-14.2.4-undefined-behaviour.patch"
+)
+
+check-reqs_export_vars() {
+	if use amd64; then
+		CHECKREQS_DISK_BUILD="12G"
+		CHECKREQS_DISK_USR="460M"
+	else
+		CHECKREQS_DISK_BUILD="1400M"
+		CHECKREQS_DISK_USR="450M"
+	fi
+
+	export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
+}
+
+pkg_pretend() {
+	check-reqs_export_vars
+	check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	python_setup 'python3*'
+	check-reqs_export_vars
+	check-reqs_pkg_setup
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	if use system-boost; then
+		eapply "${FILESDIR}/ceph-14.2.8-boost-sonames.patch"
+
+		find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \
+			| xargs --null sed \
+			-e 's|Boost::|Boost_|g' \
+			-e 's|Boost_boost|boost_system|g' -i || die
+	fi
+
+	sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
+		src/bash_completion/CMakeLists.txt || die
+
+	# remove tests that need root access
+	rm src/test/cli/ceph-authtool/cap*.t || die
+}
+
+ceph_src_configure() {
+	local flag
+	local mycmakeargs=(
+		-DWITH_BABELTRACE=$(usex babeltrace)
+		-DWITH_CEPHFS=$(usex cephfs)
+		-DWITH_CEPHFS_SHELL=$(if python_is_python3; then usex cephfs; else echo OFF; fi)
+		-DWITH_DPDK=$(usex dpdk)
+		-DWITH_DPDK=$(usex spdk)
+		-DWITH_FUSE=$(usex fuse)
+		-DWITH_LTTNG=$(usex lttng)
+		-DWITH_GSSAPI=$(usex kerberos)
+		-DWITH_GRAFANA=$(usex grafana)
+		-DWITH_MGR=$(usex mgr)
+		-DWITH_MGR_DASHBOARD_FRONTEND=NO
+		-DWITH_NUMA=$(usex numa)
+		-DWITH_OPENLDAP=$(usex ldap)
+		-DMGR_PYTHON_VERSION=$(if python_is_python3; then echo 3; else echo 2; fi)
+		-DWITH_PYTHON3=$(if python_is_python3; then echo "ON"; else echo "OFF"; fi)
+		-DWITH_PYTHON2=$(if python_is_python3; then echo "OFF"; else echo "ON"; fi)
+		-DWITH_RADOSGW=$(usex radosgw)
+		-DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq)
+		-DWITH_SSL=$(usex ssl)
+		-DWITH_SYSTEMD=$(usex systemd)
+		-DWITH_TESTS=$(usex test)
+		-DWITH_XFS=$(usex xfs)
+		-DWITH_ZFS=$(usex zfs)
+		-DENABLE_SHARED='ON'
+		-DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
+		-DWITH_SYSTEM_BOOST=$(usex system-boost)
+		-DBOOST_J=$(makeopts_jobs)
+		-DWITH_RDMA=no
+		-DWITH_TBB=no
+		-DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
+		-DEPYTHON_VERSION="${EPYTHON#python}"
+		-DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
+		-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+		#-Wno-dev
+	)
+	if use amd64 || use x86; then
+		for flag in ${CPU_FLAGS_X86[@]}; do
+			mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
+		done
+	fi
+
+	rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
+		|| die "failed to remove cmake cache"
+
+	cmake-utils_src_configure
+
+	# bug #630232
+	sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
+		"${BUILD_DIR:-${S}}"/include/acconfig.h \
+		|| die "sed failed"
+}
+
+src_configure() {
+	use custom-cflags || strip-flags
+	ceph_src_configure
+}
+
+python_compile() {
+	local CMAKE_USE_DIR="${S}"
+	ceph_src_configure
+
+	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+	emake VERBOSE=1 clean
+	emake VERBOSE=1 all
+
+	# python modules are only compiled with "make install" so we need to do this to
+	# prevent doing a bunch of compilation in src_install
+	DESTDIR="${T}" emake VERBOSE=1 install
+	popd >/dev/null || die
+}
+
+src_compile() {
+	cmake-utils_src_make VERBOSE=1 all
+
+	# we have to do this here to prevent from building everything multiple times
+	python_copy_sources
+	python_foreach_impl python_compile
+}
+
+src_test() {
+	make check || die "make check failed"
+}
+
+python_install() {
+	local CMAKE_USE_DIR="${S}"
+	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+	DESTDIR="${ED}" emake VERBOSE=1 install
+	popd >/dev/null || die
+
+	python_optimize
+}
+
+src_install() {
+	cmake-utils_src_install
+	python_foreach_impl python_install
+
+	find "${ED}" -name '*.la' -type f -delete || die
+
+	exeinto /usr/$(get_libdir)/ceph
+	newexe "${BUILD_DIR}/bin/init-ceph" init-ceph
+
+	insinto /etc/logrotate.d/
+	newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
+
+	keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
+
+	fowners -R ceph:ceph /var/log/ceph
+
+	newinitd "${FILESDIR}/rbdmap.initd" rbdmap
+	newinitd "${FILESDIR}/${PN}.initd-r12" ${PN}
+	newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}"/sysctld 90-${PN}.conf
+
+	use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
+
+	# units aren't installed by the build system unless systemd is enabled
+	# so no point installing these with the USE flag disabled
+	if use systemd; then
+		systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
+			"ceph-mds@.service"
+
+		systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
+			"ceph-osd@.service"
+	fi
+
+	udev_dorules udev/*.rules
+
+	readme.gentoo_create_doc
+
+	python_setup 'python3*'
+
+	# bug #630232
+	sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \
+		|| die "sed failed"
+
+	python_fix_shebang "${ED}"/usr/{,s}bin/
+
+	# python_fix_shebang apparently is not idempotent
+	local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]'
+	grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \
+		| xargs --null --no-run-if-empty -- sed -i -r  "s:${shebang_regex}:\1:" || die
+
+	local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* )
+	dostrip -x "${rados_classes[@]#${ED}}"
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/sys-cluster/ceph/ceph-14.2.9-r1.ebuild b/sys-cluster/ceph/ceph-14.2.9-r1.ebuild
new file mode 100644
index 00000000000..fc084cb8497
--- /dev/null
+++ b/sys-cluster/ceph/ceph-14.2.9-r1.ebuild
@@ -0,0 +1,368 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7} )
+CMAKE_MAKEFILE_GENERATOR=emake
+
+DISTUTILS_OPTIONAL=1
+
+inherit check-reqs bash-completion-r1 cmake-utils distutils-r1 flag-o-matic \
+		multiprocessing python-r1 udev readme.gentoo-r1 toolchain-funcs \
+		systemd
+
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/ceph/ceph.git"
+	SRC_URI=""
+else
+	SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
+	KEYWORDS="~amd64 ~ppc64"
+fi
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="https://ceph.com/"
+
+LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ BSD Boost-1.0 MIT public-domain"
+SLOT="0"
+
+CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
+
+IUSE="babeltrace +cephfs custom-cflags dpdk fuse grafana jemalloc kerberos ldap"
+IUSE+=" libressl lttng +mgr numa rabbitmq +radosgw +ssl spdk"
+IUSE+=" system-boost systemd +tcmalloc test xfs zfs"
+IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
+
+COMMON_DEPEND="
+	acct-group/ceph
+	acct-user/ceph
+	virtual/libudev:=
+	app-arch/bzip2:=
+	app-arch/lz4:=
+	app-arch/snappy:=
+	app-arch/zstd:=
+	app-shells/bash:0
+	app-misc/jq:=
+	dev-libs/crypto++:=
+	dev-libs/leveldb:=[snappy,tcmalloc(-)?]
+	dev-libs/libaio:=
+	dev-libs/libnl:3=
+	dev-libs/libxml2:=
+	dev-libs/nss:=
+	sys-auth/oath-toolkit:=
+	sys-apps/coreutils
+	sys-apps/grep
+	sys-apps/keyutils:=
+	sys-apps/util-linux:=
+	sys-apps/sed
+	sys-apps/util-linux
+	sys-libs/libcap-ng:=
+	sys-libs/ncurses:0=
+	sys-libs/zlib:=
+	babeltrace? ( dev-util/babeltrace )
+	ldap? ( net-nds/openldap:= )
+	lttng? ( dev-util/lttng-ust:= )
+	fuse? ( sys-fs/fuse:0= )
+	kerberos? ( virtual/krb5 )
+	rabbitmq? ( net-libs/rabbitmq-c:= )
+	ssl? (
+		!libressl? ( dev-libs/openssl:= )
+		libressl? ( dev-libs/libressl:= )
+	)
+	xfs? ( sys-fs/xfsprogs:= )
+	zfs? ( sys-fs/zfs:= )
+	radosgw? (
+		dev-libs/expat:=
+		!libressl? (
+			dev-libs/openssl:=
+			net-misc/curl:=[curl_ssl_openssl]
+		)
+		libressl? (
+			dev-libs/libressl:=
+			net-misc/curl:=[curl_ssl_libressl]
+		)
+	)
+	system-boost? ( =dev-libs/boost-1.72*[threads,context,python,${PYTHON_USEDEP}] )
+	jemalloc? ( dev-libs/jemalloc:= )
+	!jemalloc? ( >=dev-util/google-perftools-2.6.1:= )
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	amd64? ( dev-lang/yasm )
+	x86? ( dev-lang/yasm )
+	app-arch/cpio
+	>=dev-util/cmake-3.5.0
+	dev-python/cython[${PYTHON_USEDEP}]
+	dev-python/sphinx
+	dev-util/cunit
+	dev-util/gperf
+	dev-util/valgrind
+	sys-apps/coreutils
+	sys-apps/findutils
+	sys-apps/grep
+	sys-apps/sed
+	sys-apps/which
+	sys-devel/bc
+	sys-devel/patch
+	virtual/pkgconfig
+	test? (
+		dev-python/coverage[${PYTHON_USEDEP}]
+		dev-python/virtualenv[${PYTHON_USEDEP}]
+		dev-python/requests-mock[${PYTHON_USEDEP}]
+		sys-apps/grep[pcre]
+		sys-fs/btrfs-progs
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	net-misc/socat
+	sys-apps/gptfdisk
+	sys-block/parted
+	sys-fs/cryptsetup
+	sys-fs/lvm2[-device-mapper-only(-)]
+	sys-fs/lsscsi
+	virtual/awk
+	dev-python/bcrypt[${PYTHON_USEDEP}]
+	dev-python/cherrypy[${PYTHON_USEDEP}]
+	dev-python/flask[${PYTHON_USEDEP}]
+	dev-python/jinja[${PYTHON_USEDEP}]
+	dev-python/pecan[${PYTHON_USEDEP}]
+	dev-python/prettytable[${PYTHON_USEDEP}]
+	dev-python/pyopenssl[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	dev-python/werkzeug[${PYTHON_USEDEP}]
+	mgr? (
+		dev-python/more-itertools[${PYTHON_USEDEP}]
+		dev-python/pyjwt[${PYTHON_USEDEP}]
+		dev-python/pyyaml[${PYTHON_USEDEP}]
+		dev-python/routes[${PYTHON_USEDEP}]
+		dev-python/six[${PYTHON_USEDEP}]
+	)
+"
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	mgr? ( cephfs )
+	?? ( jemalloc tcmalloc )
+	rabbitmq? ( radosgw )
+"
+
+# the tests need root access
+RESTRICT="test? ( userpriv )"
+
+# distribution tarball does not include everything needed for tests
+RESTRICT+=" test"
+
+# false positives unless all USE flags are on
+CMAKE_WARN_UNUSED_CLI="no"
+
+PATCHES=(
+	"${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
+	"${FILESDIR}/ceph-14.2.0-cflags.patch"
+	"${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
+	"${FILESDIR}/ceph-13.2.0-cflags.patch"
+	"${FILESDIR}/ceph-14.2.0-mgr-python-version.patch"
+	"${FILESDIR}/ceph-14.2.5-no-virtualenvs.patch"
+	"${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
+	"${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch"
+	"${FILESDIR}/ceph-14.2.0-link-crc32-Wstatically.patch"
+	"${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
+	"${FILESDIR}/ceph-14.2.3-dpdk-compile-fix-1.patch"
+	"${FILESDIR}/ceph-14.2.4-python-executable.patch"
+	"${FILESDIR}/ceph-14.2.4-undefined-behaviour.patch"
+)
+
+check-reqs_export_vars() {
+	if use amd64; then
+		CHECKREQS_DISK_BUILD="12G"
+		CHECKREQS_DISK_USR="460M"
+	else
+		CHECKREQS_DISK_BUILD="1400M"
+		CHECKREQS_DISK_USR="450M"
+	fi
+
+	export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
+}
+
+pkg_pretend() {
+	check-reqs_export_vars
+	check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	python_setup 'python3*'
+	check-reqs_export_vars
+	check-reqs_pkg_setup
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	if use system-boost; then
+		eapply "${FILESDIR}/ceph-14.2.8-boost-sonames.patch"
+
+		find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \
+			| xargs --null sed \
+			-e 's|Boost::|Boost_|g' \
+			-e 's|Boost_boost|boost_system|g' -i || die
+	fi
+
+	sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
+		src/bash_completion/CMakeLists.txt || die
+
+	# remove tests that need root access
+	rm src/test/cli/ceph-authtool/cap*.t || die
+}
+
+ceph_src_configure() {
+	local flag
+	local mycmakeargs=(
+		-DWITH_BABELTRACE=$(usex babeltrace)
+		-DWITH_CEPHFS=$(usex cephfs)
+		-DWITH_CEPHFS_SHELL=$(if python_is_python3; then usex cephfs; else echo OFF; fi)
+		-DWITH_DPDK=$(usex dpdk)
+		-DWITH_DPDK=$(usex spdk)
+		-DWITH_FUSE=$(usex fuse)
+		-DWITH_LTTNG=$(usex lttng)
+		-DWITH_GSSAPI=$(usex kerberos)
+		-DWITH_GRAFANA=$(usex grafana)
+		-DWITH_MGR=$(usex mgr)
+		-DWITH_MGR_DASHBOARD_FRONTEND=NO
+		-DWITH_NUMA=$(usex numa)
+		-DWITH_OPENLDAP=$(usex ldap)
+		-DMGR_PYTHON_VERSION=$(if python_is_python3; then echo 3; else echo 2; fi)
+		-DWITH_PYTHON3=$(if python_is_python3; then echo "ON"; else echo "OFF"; fi)
+		-DWITH_PYTHON2=$(if python_is_python3; then echo "OFF"; else echo "ON"; fi)
+		-DWITH_RADOSGW=$(usex radosgw)
+		-DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq)
+		-DWITH_SSL=$(usex ssl)
+		-DWITH_SYSTEMD=$(usex systemd)
+		-DWITH_TESTS=$(usex test)
+		-DWITH_XFS=$(usex xfs)
+		-DWITH_ZFS=$(usex zfs)
+		-DENABLE_SHARED="ON"
+		-DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
+		-DWITH_SYSTEM_BOOST=$(usex system-boost)
+		-DBOOST_J=$(makeopts_jobs)
+		-DWITH_RDMA=no
+		-DWITH_TBB=no
+		-DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
+		-DEPYTHON_VERSION="${EPYTHON#python}"
+		-DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
+		-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+		#-Wno-dev
+	)
+	if use amd64 || use x86; then
+		for flag in ${CPU_FLAGS_X86[@]}; do
+			mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
+		done
+	fi
+
+	rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
+		|| die "failed to remove cmake cache"
+
+	cmake-utils_src_configure
+
+	# bug #630232
+	sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
+		"${BUILD_DIR:-${S}}"/include/acconfig.h \
+		|| die "sed failed"
+}
+
+src_configure() {
+	use custom-cflags || strip-flags
+	ceph_src_configure
+}
+
+python_compile() {
+	local CMAKE_USE_DIR="${S}"
+	ceph_src_configure
+
+	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+	emake VERBOSE=1 clean
+	emake VERBOSE=1 all
+
+	# python modules are only compiled with "make install" so we need to do this to
+	# prevent doing a bunch of compilation in src_install
+	DESTDIR="${T}" emake VERBOSE=1 install
+	popd >/dev/null || die
+}
+
+src_compile() {
+	cmake-utils_src_make VERBOSE=1 all
+
+	# we have to do this here to prevent from building everything multiple times
+	python_copy_sources
+	python_foreach_impl python_compile
+}
+
+src_test() {
+	make check || die "make check failed"
+}
+
+python_install() {
+	local CMAKE_USE_DIR="${S}"
+	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+	DESTDIR="${ED}" emake VERBOSE=1 install
+	popd >/dev/null || die
+
+	python_optimize
+}
+
+src_install() {
+	cmake-utils_src_install
+	python_foreach_impl python_install
+
+	find "${ED}" -name '*.la' -type f -delete || die
+
+	exeinto /usr/$(get_libdir)/ceph
+	newexe "${BUILD_DIR}/bin/init-ceph" init-ceph
+
+	insinto /etc/logrotate.d/
+	newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
+
+	keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
+
+	fowners -R ceph:ceph /var/log/ceph
+
+	newinitd "${FILESDIR}/rbdmap.initd" rbdmap
+	newinitd "${FILESDIR}/${PN}.initd-r12" ${PN}
+	newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}"/sysctld 90-${PN}.conf
+
+	use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
+
+	# units aren't installed by the build system unless systemd is enabled
+	# so no point installing these with the USE flag disabled
+	if use systemd; then
+		systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
+			"ceph-mds@.service"
+
+		systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
+			"ceph-osd@.service"
+	fi
+
+	udev_dorules udev/*.rules
+
+	readme.gentoo_create_doc
+
+	python_setup 'python3*'
+
+	# bug #630232
+	sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \
+		|| die "sed failed"
+
+	python_fix_shebang "${ED}"/usr/{,s}bin/
+
+	# python_fix_shebang apparently is not idempotent
+	local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]'
+	grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \
+		| xargs --null --no-run-if-empty -- sed -i -r  "s:${shebang_regex}:\1:" || die
+
+	local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* )
+	dostrip -x "${rados_classes[@]#${ED}}"
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/sys-cluster/ceph/ceph-15.2.1-r1.ebuild b/sys-cluster/ceph/ceph-15.2.1-r1.ebuild
new file mode 100644
index 00000000000..68a4aafed5c
--- /dev/null
+++ b/sys-cluster/ceph/ceph-15.2.1-r1.ebuild
@@ -0,0 +1,389 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7,8} )
+CMAKE_MAKEFILE_GENERATOR=emake
+
+DISTUTILS_OPTIONAL=1
+
+inherit check-reqs bash-completion-r1 cmake-utils distutils-r1 flag-o-matic \
+		multiprocessing python-r1 udev readme.gentoo-r1 toolchain-funcs \
+		systemd
+
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/ceph/ceph.git"
+	SRC_URI=""
+else
+	SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
+	KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Ceph distributed filesystem"
+HOMEPAGE="https://ceph.com/"
+
+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"
+SLOT="0"
+
+CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
+
+IUSE="babeltrace +cephfs custom-cflags dpdk fuse grafana jemalloc kafka kerberos ldap
+	libressl lttng +mgr numa +openssl pmdk rabbitmq +radosgw rbd-rwl +ssl spdk
+	system-boost systemd +tcmalloc test uring xfs zfs"
+IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
+
+COMMON_DEPEND="
+	acct-group/ceph
+	acct-user/ceph
+	virtual/libudev:=
+	app-arch/bzip2:=
+	app-arch/lz4:=
+	app-arch/snappy:=
+	app-arch/zstd:=
+	app-shells/bash:0
+	app-misc/jq:=
+	dev-libs/crypto++:=
+	dev-libs/leveldb:=[snappy,tcmalloc(-)?]
+	dev-libs/libaio:=
+	dev-libs/libfmt:=
+	dev-libs/libnl:3=
+	dev-libs/libxml2:=
+	dev-libs/xmlsec:=[!openssl?,!libressl?]
+	dev-cpp/yaml-cpp:=
+	dev-libs/nss:=
+	dev-libs/protobuf:=
+	net-dns/c-ares:=
+	net-libs/gnutls:=
+	sys-auth/oath-toolkit:=
+	sys-apps/coreutils
+	sys-apps/grep
+	sys-apps/hwloc:=
+	sys-apps/keyutils:=
+	sys-apps/util-linux:=
+	sys-apps/sed
+	sys-apps/util-linux
+	sys-libs/libcap-ng:=
+	sys-libs/ncurses:0=
+	sys-libs/zlib:=
+	sys-process/numactl:=
+	x11-libs/libpciaccess:=
+	babeltrace? ( dev-util/babeltrace )
+	fuse? ( sys-fs/fuse:0= )
+	jemalloc? ( dev-libs/jemalloc:= )
+	!jemalloc? ( >=dev-util/google-perftools-2.6.1:= )
+	kafka? ( dev-libs/librdkafka:= )
+	kerberos? ( virtual/krb5 )
+	ldap? ( net-nds/openldap:= )
+	lttng? ( dev-util/lttng-ust:= )
+	rabbitmq? ( net-libs/rabbitmq-c:= )
+	radosgw? (
+		dev-libs/expat:=
+		openssl? (
+			dev-libs/openssl:=
+			net-misc/curl:=[curl_ssl_openssl]
+		)
+		libressl? (
+			dev-libs/libressl:=
+			net-misc/curl:=[curl_ssl_libressl]
+		)
+	)
+	ssl? (
+		openssl? ( dev-libs/openssl:= )
+		libressl? ( dev-libs/libressl:= )
+	)
+	system-boost? ( =dev-libs/boost-1.72*[threads,context,python,${PYTHON_USEDEP}] )
+	uring? ( sys-libs/liburing:= )
+	xfs? ( sys-fs/xfsprogs:= )
+	zfs? ( sys-fs/zfs:= )
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	amd64? ( dev-lang/yasm )
+	x86? ( dev-lang/yasm )
+	app-arch/cpio
+	>=dev-util/cmake-3.5.0
+	dev-python/cython[${PYTHON_USEDEP}]
+	dev-python/sphinx
+	dev-util/cunit
+	dev-util/gperf
+	dev-util/ragel
+	dev-util/valgrind
+	sys-apps/coreutils
+	sys-apps/findutils
+	sys-apps/grep
+	sys-apps/sed
+	sys-apps/which
+	sys-devel/bc
+	sys-devel/patch
+	virtual/pkgconfig
+	test? (
+		dev-python/coverage[${PYTHON_USEDEP}]
+		dev-python/virtualenv[${PYTHON_USEDEP}]
+		dev-python/requests-mock[${PYTHON_USEDEP}]
+		sys-apps/grep[pcre]
+		sys-fs/btrfs-progs
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	app-admin/sudo
+	net-misc/socat
+	sys-apps/gptfdisk
+	sys-apps/nvme-cli
+	>=sys-apps/smartmontools-7.0
+	sys-block/parted
+	sys-fs/cryptsetup
+	sys-fs/lsscsi
+	sys-fs/lvm2[-device-mapper-only(-)]
+	virtual/awk
+	dev-python/bcrypt[${PYTHON_USEDEP}]
+	dev-python/cherrypy[${PYTHON_USEDEP}]
+	dev-python/python-dateutil[${PYTHON_USEDEP}]
+	dev-python/flask[${PYTHON_USEDEP}]
+	dev-python/jinja[${PYTHON_USEDEP}]
+	dev-python/pecan[${PYTHON_USEDEP}]
+	dev-python/prettytable[${PYTHON_USEDEP}]
+	dev-python/pyopenssl[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	dev-python/werkzeug[${PYTHON_USEDEP}]
+	mgr? (
+		dev-python/jsonpatch[${PYTHON_USEDEP}]
+		dev-python/more-itertools[${PYTHON_USEDEP}]
+		dev-python/numpy[${PYTHON_USEDEP}]
+		dev-python/pyjwt[${PYTHON_USEDEP}]
+		dev-python/pyyaml[${PYTHON_USEDEP}]
+		dev-python/routes[${PYTHON_USEDEP}]
+		sci-libs/scipy[${PYTHON_USEDEP}]
+		sci-libs/scikits_learn[${PYTHON_USEDEP}]
+		dev-python/six[${PYTHON_USEDEP}]
+	)
+"
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	^^ ( openssl libressl )
+	kafka? ( radosgw )
+	rabbitmq? ( radosgw )
+	mgr? ( cephfs )
+	?? ( jemalloc tcmalloc )
+	rabbitmq? ( radosgw )
+"
+RESTRICT="!test? ( test )"
+
+# the tests need root access
+RESTRICT="test? ( userpriv )"
+
+# distribution tarball does not include everything needed for tests
+RESTRICT+=" test"
+
+# false positives unless all USE flags are on
+CMAKE_WARN_UNUSED_CLI="no"
+
+PATCHES=(
+	"${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
+	"${FILESDIR}/ceph-14.2.0-cflags.patch"
+	"${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
+	"${FILESDIR}/ceph-13.2.0-cflags.patch"
+	"${FILESDIR}/ceph-15.2.0-no-virtualenvs.patch"
+	"${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
+	"${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch"
+	"${FILESDIR}/ceph-14.2.0-link-crc32-statically.patch"
+	"${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
+	"${FILESDIR}/ceph-15.2.0-rocksdb-cmake.patch"
+)
+
+check-reqs_export_vars() {
+	if use amd64; then
+		CHECKREQS_DISK_BUILD="12G"
+		CHECKREQS_DISK_USR="460M"
+	else
+		CHECKREQS_DISK_BUILD="1400M"
+		CHECKREQS_DISK_USR="450M"
+	fi
+
+	export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
+}
+
+pkg_pretend() {
+	check-reqs_export_vars
+	check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	python_setup 'python3*'
+	check-reqs_export_vars
+	check-reqs_pkg_setup
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	if use system-boost; then
+		find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \
+			| xargs --null sed -r \
+			-e 's|Boost::|Boost_|g' \
+			-e 's|Boost_|boost_|g' \
+			-e 's|[Bb]oost_boost|boost_system|g' -i || die
+	fi
+
+	sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
+		src/bash_completion/CMakeLists.txt || die
+
+	# remove tests that need root access
+	rm src/test/cli/ceph-authtool/cap*.t || die
+}
+
+ceph_src_configure() {
+	local flag
+	local mycmakeargs=(
+		-DWITH_BABELTRACE=$(usex babeltrace)
+		-DWITH_BLUESTORE_PMEM=$(usex pmdk)
+		-DWITH_CEPHFS=$(usex cephfs)
+		-DWITH_CEPHFS_SHELL=$(usex cephfs)
+		-DWITH_DPDK=$(usex dpdk)
+		-DWITH_DPDK=$(usex spdk)
+		-DWITH_FUSE=$(usex fuse)
+		-DWITH_LTTNG=$(usex lttng)
+		-DWITH_GSSAPI=$(usex kerberos)
+		-DWITH_GRAFANA=$(usex grafana)
+		-DWITH_MGR=$(usex mgr)
+		-DWITH_MGR_DASHBOARD_FRONTEND=OFF
+		-DWITH_NUMA=$(usex numa)
+		-DWITH_OPENLDAP=$(usex ldap)
+		-DWITH_PYTHON3=3
+		-DWITH_RADOSGW=$(usex radosgw)
+		-DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq)
+		-DWITH_RADOSGW_KAFKA_ENDPOINT=$(usex kafka)
+		-DWITH_RBD_RWL=$(usex rbd-rwl)
+		-DWITH_SSL=$(usex ssl)
+		-DWITH_SYSTEMD=$(usex systemd)
+		-DWITH_TESTS=$(usex test)
+		-DWITH_LIBURING=$(usex uring)
+		-DWITH_XFS=$(usex xfs)
+		-DWITH_ZFS=$(usex zfs)
+		-DENABLE_SHARED="ON"
+		-DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
+		-DWITH_SYSTEM_BOOST=$(usex system-boost)
+		-DBOOST_J=$(makeopts_jobs)
+		-DWITH_RDMA=OFF
+		-DWITH_TBB=OFF
+		-DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
+		-DEPYTHON_VERSION="${EPYTHON#python}"
+		-DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
+		-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+	)
+	if use amd64 || use x86; then
+		for flag in ${CPU_FLAGS_X86[@]}; do
+			mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
+		done
+	fi
+
+	rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
+		|| die "failed to remove cmake cache"
+
+	cmake-utils_src_configure
+
+	# bug #630232
+	sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
+		"${BUILD_DIR:-${S}}"/include/acconfig.h \
+		|| die "sed failed"
+}
+
+src_configure() {
+	use custom-cflags || strip-flags
+	ceph_src_configure
+}
+
+python_compile() {
+	local CMAKE_USE_DIR="${S}"
+	ceph_src_configure
+
+	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+	emake VERBOSE=1 clean
+	emake VERBOSE=1 all
+
+	# python modules are only compiled with "make install" so we need to do this to
+	# prevent doing a bunch of compilation in src_install
+	DESTDIR="${T}" emake VERBOSE=1 install
+	popd >/dev/null || die
+}
+
+src_compile() {
+	cmake-utils_src_make VERBOSE=1 all
+
+	# we have to do this here to prevent from building everything multiple times
+	python_copy_sources
+	python_foreach_impl python_compile
+}
+
+src_test() {
+	make check || die "make check failed"
+}
+
+python_install() {
+	local CMAKE_USE_DIR="${S}"
+	pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+	DESTDIR="${ED}" emake VERBOSE=1 install
+	popd >/dev/null || die
+
+	python_optimize
+}
+
+src_install() {
+	cmake-utils_src_install
+	python_foreach_impl python_install
+
+	find "${ED}" -name '*.la' -type f -delete || die
+
+	exeinto /usr/$(get_libdir)/ceph
+	newexe "${BUILD_DIR}/bin/init-ceph" init-ceph
+
+	insinto /etc/logrotate.d/
+	newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
+
+	keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
+
+	fowners -R ceph:ceph /var/log/ceph
+
+	newinitd "${FILESDIR}/rbdmap.initd" rbdmap
+	newinitd "${FILESDIR}/${PN}.initd-r12" ${PN}
+	newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
+
+	insinto /etc/sysctl.d
+	newins "${FILESDIR}"/sysctld 90-${PN}.conf
+
+	use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
+
+	# units aren't installed by the build system unless systemd is enabled
+	# so no point installing these with the USE flag disabled
+	if use systemd; then
+		systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
+			"ceph-mds@.service"
+
+		systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
+			"ceph-osd@.service"
+	fi
+
+	udev_dorules udev/*.rules
+
+	readme.gentoo_create_doc
+
+	python_setup 'python3*'
+
+	# bug #630232
+	sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \
+		|| die "sed failed"
+
+	python_fix_shebang "${ED}"/usr/{,s}bin/
+
+	# python_fix_shebang apparently is not idempotent
+	local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]'
+	grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \
+		| xargs --null --no-run-if-empty -- sed -i -r  "s:${shebang_regex}:\1:" || die
+
+	local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* )
+	dostrip -x "${rados_classes[@]#${ED}}"
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


             reply	other threads:[~2020-04-23 20:44 UTC|newest]

Thread overview: 283+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 20:44 Patrick McLean [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-01 12:52 [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/ Sam James
2024-11-01 19:13 Andreas K. Hüttel
2024-10-04 11:54 Patrick Lauer
2024-10-04 11:49 Sam James
2024-10-04  9:50 Jakov Smolić
2024-10-04  6:59 Patrick Lauer
2024-10-04  6:57 Patrick Lauer
2024-10-04  6:57 Patrick Lauer
2024-10-01  9:32 Patrick Lauer
2024-08-02  7:03 Patrick Lauer
2024-08-01 16:47 Patrick Lauer
2024-08-01 13:47 Patrick Lauer
2024-08-01 10:09 Patrick Lauer
2024-07-30 12:29 Patrick Lauer
2024-07-30 12:29 Patrick Lauer
2024-06-03  7:16 Patrick Lauer
2024-06-03  6:44 Patrick Lauer
2024-04-01 17:55 Patrick McLean
2024-03-26 18:19 Patrick McLean
2024-03-16 17:32 Patrick McLean
2024-03-12 21:39 Patrick McLean
2024-03-06  2:14 Patrick McLean
2024-03-06  2:14 Patrick McLean
2024-03-06  0:14 Patrick McLean
2024-01-20 12:36 Sam James
2024-01-08 12:28 Sam James
2024-01-08 12:03 Sam James
2024-01-08  9:48 Sam James
2024-01-03 18:52 Arthur Zamarin
2023-12-28  2:57 Sam James
2023-12-22  7:21 Arthur Zamarin
2023-11-05 19:19 Arthur Zamarin
2023-09-13  5:47 Sam James
2023-09-12  1:24 Patrick McLean
2023-08-10 21:02 Patrick McLean
2023-06-28  7:37 Sam James
2023-06-26 19:50 Sam James
2023-06-08  0:07 Patrick McLean
2023-06-06 10:05 Sam James
2023-06-03  1:54 Sam James
2023-05-10  0:07 Patrick McLean
2023-05-01 17:45 Patrick McLean
2023-05-01 13:43 Sam James
2023-05-01 13:19 Sam James
2023-05-01 12:49 Sam James
2023-05-01  1:43 Sam James
2023-04-22  2:13 Patrick McLean
2023-04-17 17:52 Patrick McLean
2023-04-11 23:28 Patrick McLean
2023-03-17 17:49 Patrick McLean
2023-03-17 17:49 Patrick McLean
2023-03-14 18:51 Patrick McLean
2023-02-02 18:50 Patrick McLean
2023-01-26  0:20 Patrick McLean
2023-01-20  1:37 Sam James
2023-01-18 22:44 Sam James
2022-12-07 13:52 David Seifert
2022-12-07 13:52 David Seifert
2022-11-15 20:09 Michał Górny
2022-10-31 18:07 Patrick McLean
2022-09-04 13:03 David Seifert
2022-09-04 12:23 David Seifert
2022-08-24 17:10 Patrick McLean
2022-08-23 19:26 Sam James
2022-08-23 19:04 Patrick McLean
2022-08-23  9:09 罗百科
2022-08-22 20:29 Patrick McLean
2022-08-12 20:29 Patrick McLean
2022-08-10 20:21 Patrick McLean
2022-08-03  5:23 Patrick McLean
2022-07-22 20:25 Patrick McLean
2022-07-22 20:25 Patrick McLean
2022-07-22 20:25 Patrick McLean
2022-07-13  1:41 Patrick McLean
2022-07-07 18:33 Patrick McLean
2022-07-07 18:32 Patrick McLean
2022-05-19 16:23 Patrick McLean
2022-05-17 21:31 Patrick McLean
2022-05-05  7:32 Arthur Zamarin
2022-05-04 23:31 Sam James
2022-05-04 23:24 Patrick McLean
2022-05-04 23:18 Patrick McLean
2022-05-04 23:17 Patrick McLean
2022-04-29  0:31 Patrick McLean
2022-04-28  1:44 Yixun Lan
2022-03-03  2:46 Matt Turner
2022-03-03  2:00 Patrick McLean
2022-03-03  1:52 Patrick McLean
2022-03-03  1:52 Patrick McLean
2022-02-01 19:02 Michał Górny
2022-01-06 10:39 David Seifert
2021-12-08 19:21 Patrick McLean
2021-11-26 20:20 Patrick McLean
2021-11-26 19:46 Patrick McLean
2021-11-26 19:36 Patrick McLean
2021-11-03 17:06 Patrick McLean
2021-10-29 21:18 Patrick McLean
2021-10-23  0:22 Patrick McLean
2021-09-22  6:54 Agostino Sarubbo
2021-09-17  1:20 Patrick McLean
2021-09-02  1:49 Patrick McLean
2021-07-30 23:31 Sam James
2021-07-20  2:43 Sam James
2021-07-13 18:39 Patrick McLean
2021-07-10 18:54 Sam James
2021-07-01  0:51 Patrick McLean
2021-06-18 19:18 David Seifert
2021-06-08 17:22 Patrick McLean
2021-05-31 21:30 Michał Górny
2021-05-26 20:55 Thomas Deutschmann
2021-05-24 20:44 Sam James
2021-05-14  1:10 Patrick McLean
2021-05-06 20:46 Patrick McLean
2021-04-20 22:38 Patrick McLean
2021-04-03  4:20 Patrick McLean
2021-03-31  1:57 Patrick McLean
2021-03-25 19:07 Patrick McLean
2021-03-20  6:56 Patrick McLean
2021-03-16  0:44 Patrick McLean
2021-03-12 19:05 Patrick McLean
2021-03-02  3:32 Patrick McLean
2021-03-02  3:32 Patrick McLean
2021-02-27  2:48 Patrick McLean
2021-02-26  0:44 Patrick McLean
2021-01-20 22:09 Patrick McLean
2021-01-01 23:00 Sam James
2020-12-21 20:20 Patrick McLean
2020-12-21 20:20 Patrick McLean
2020-12-12 19:58 Patrick McLean
2020-12-01  3:27 Patrick McLean
2020-11-26 17:25 Sam James
2020-11-25  5:34 Patrick McLean
2020-11-25  4:47 Patrick McLean
2020-11-25  4:45 Patrick McLean
2020-11-24  2:54 Patrick McLean
2020-11-20 22:26 Sam James
2020-11-19  7:29 Patrick McLean
2020-11-19  7:29 Patrick McLean
2020-11-09 16:06 Ulrich Müller
2020-11-09 14:59 Benda XU
2020-11-03  0:15 Patrick McLean
2020-10-22 18:34 Patrick McLean
2020-09-16 23:52 Patrick McLean
2020-09-16 23:52 Patrick McLean
2020-08-14 23:22 Andreas Sturmlechner
2020-08-11 22:45 Patrick McLean
2020-07-24 18:42 Patrick McLean
2020-07-01  0:11 Patrick McLean
2020-06-01  6:41 Georgy Yakovlev
2020-05-31 19:00 Patrick McLean
2020-05-18 23:19 Patrick McLean
2020-04-23 20:48 Patrick McLean
2020-04-23 20:44 Patrick McLean
2020-04-23 20:44 Patrick McLean
2020-04-23 20:44 Patrick McLean
2020-04-15 21:59 Patrick McLean
2020-04-15 21:58 Patrick McLean
2020-04-14 17:26 Patrick McLean
2020-04-08  2:20 Patrick McLean
2020-04-03  7:05 Patrick McLean
2020-02-25  8:17 Georgy Yakovlev
2020-02-25  2:05 Patrick McLean
2020-02-05 20:01 Patrick McLean
2020-02-05 19:57 Patrick McLean
2020-02-05 19:57 Patrick McLean
2020-02-05 19:57 Patrick McLean
2020-02-03 22:53 Patrick McLean
2020-01-26 17:11 Michał Górny
2020-01-15  7:20 Michał Górny
2020-01-14  0:10 Patrick McLean
2019-12-21  9:09 Georgy Yakovlev
2019-11-21  2:12 Patrick McLean
2019-11-14  1:01 Patrick McLean
2019-11-09  0:21 Patrick McLean
2019-09-17 22:57 Patrick McLean
2019-05-15 13:25 Patrick Lauer
2019-04-29 22:57 Patrick McLean
2019-04-29 22:57 Patrick McLean
2019-04-17 18:07 Aaron Bauman
2019-04-17  1:36 Patrick McLean
2019-04-17  1:26 Patrick McLean
2019-04-15 23:35 Patrick McLean
2019-04-15 23:33 Patrick McLean
2019-04-15 23:29 Patrick McLean
2019-04-06 12:45 Agostino Sarubbo
2019-03-22 23:07 Patrick McLean
2019-03-21 17:15 Patrick McLean
2019-03-21 17:15 Patrick McLean
2019-03-15 21:18 Patrick McLean
2019-03-15 21:18 Patrick McLean
2019-03-15 21:18 Patrick McLean
2019-02-01  2:38 Patrick McLean
2019-01-08 18:26 Patrick McLean
2018-11-30  1:28 Patrick McLean
2018-11-08  1:51 Patrick McLean
2018-10-31 22:33 Patrick McLean
2018-10-31 22:33 Patrick McLean
2018-10-25 23:27 Patrick McLean
2018-10-20 12:11 Mikle Kolyada
2018-10-19 17:52 Thomas Deutschmann
2018-10-14 11:40 Pacho Ramos
2018-10-14 10:18 Pacho Ramos
2018-09-05 23:48 Patrick McLean
2018-09-05 23:48 Patrick McLean
2018-08-16 23:19 Mikle Kolyada
2018-08-09 22:19 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-31 23:54 Patrick McLean
2018-07-17 20:57 Patrick McLean
2018-07-11 13:36 Mikle Kolyada
2018-07-11  0:57 Thomas Deutschmann
2018-07-11  0:43 Patrick McLean
2018-07-11  0:43 Patrick McLean
2018-07-03  0:19 Patrick McLean
2018-06-17 20:34 David Seifert
2018-06-13 17:52 Patrick McLean
2018-04-24 22:28 Patrick McLean
2018-04-15  8:38 Michał Górny
2018-03-06 19:59 Patrick McLean
2018-03-03  9:47 Michał Górny
2017-12-23 20:01 Patrick McLean
2017-12-23 20:01 Patrick McLean
2017-10-06 21:03 Patrick McLean
2017-10-06 21:03 Patrick McLean
2017-09-21 18:36 Patrick McLean
2017-09-01  3:55 Zac Medico
2017-07-31 20:31 Patrick McLean
2017-07-30  9:23 Michał Górny
2017-07-27 21:27 Patrick McLean
2017-07-27 21:27 Patrick McLean
2017-07-11  2:18 Patrick McLean
2017-07-10  9:10 Alexis Ballier
2017-04-11 22:17 Patrick McLean
2017-02-28 18:11 Patrick McLean
2017-02-28  4:30 Patrick McLean
2017-02-28  0:13 Patrick McLean
2017-02-28  0:13 Patrick McLean
2016-12-12 12:51 Yixun Lan
2016-12-08  5:58 Yixun Lan
2016-11-20 13:08 Agostino Sarubbo
2016-11-20 13:04 Agostino Sarubbo
2016-11-04  3:02 Yixun Lan
2016-11-04  3:02 Yixun Lan
2016-11-04  3:02 Yixun Lan
2016-11-03 15:50 Patrick McLean
2016-10-14 19:04 Patrick McLean
2016-10-14 18:19 Patrick McLean
2016-10-04 10:07 Alexis Ballier
2016-07-01 17:55 Patrick McLean
2016-07-01  8:30 Agostino Sarubbo
2016-07-01  8:29 Agostino Sarubbo
2016-06-30 23:55 Patrick McLean
2016-06-17 16:27 Alexis Ballier
2016-06-17 16:27 Alexis Ballier
2016-06-17 16:27 Alexis Ballier
2016-06-17 11:39 Alexis Ballier
2016-06-16 10:57 Yixun Lan
2016-05-12 21:05 Patrick McLean
2016-05-12 19:02 Patrick McLean
2016-05-12 19:02 Patrick McLean
2016-05-12 19:02 Patrick McLean
2016-03-15  3:21 Yixun Lan
2016-02-18  4:24 Yixun Lan
2015-12-04 23:26 Robin H. Johnson
2015-11-05  8:15 Yixun Lan
2015-10-21  2:04 Yixun Lan
2015-10-20  9:56 Yixun Lan
2015-10-14 21:24 Patrick McLean
2015-10-14 21:24 Patrick McLean
2015-09-25  8:11 Justin Lecher
2015-09-24  8:34 Sergey Popov
2015-09-02  6:18 Yixun Lan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1587674661.bea94b24a68841e9c60b819c6634f5850c98e895.chutzpah@gentoo \
    --to=chutzpah@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox