summaryrefslogtreecommitdiff
path: root/sys-cluster/ceph
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-13 05:48:01 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-13 05:48:01 +0000
commit4bc834b03b9438dcfd45780f31a02994c24608ba (patch)
tree1ee84a24bd250533fbdadfa949f438db20ba98aa /sys-cluster/ceph
parent175512fa7c74d0e48a7a1b40a6e456435af0481b (diff)
gentoo auto-resync : 13:01:2023 - 05:48:01
Diffstat (limited to 'sys-cluster/ceph')
-rw-r--r--sys-cluster/ceph/Manifest4
-rw-r--r--sys-cluster/ceph/ceph-15.2.17-r2.ebuild409
-rw-r--r--sys-cluster/ceph/ceph-16.2.10-r4.ebuild473
-rw-r--r--sys-cluster/ceph/ceph-17.2.5-r3.ebuild477
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r13115
5 files changed, 1478 insertions, 0 deletions
diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
index 4d6c102b5456..23066f98e414 100644
--- a/sys-cluster/ceph/Manifest
+++ b/sys-cluster/ceph/Manifest
@@ -48,6 +48,7 @@ AUX ceph-osd_at.service.conf 115 BLAKE2B d234b9bd718585baf43f229f583e211607aab02
AUX ceph-tmpfilesd 29 BLAKE2B 02c5d6c59f6e93d03df3bb304529760824f64895f5bc0eff4a0a311013479e29cd3aa0fe554bbc65941838116d465b7df1ab351e2d80d7a4d1d109e26a7f0f2c SHA512 2d84199c6e57db1c0dd1074d94b899bf04c71ab0b10e91a34a0aa7c6a8136d34310ebe0967dcdde801f5b022502db00a891ce71af10c3ccef4ed396e8d316e15
AUX ceph.confd-r5 619 BLAKE2B 6d495b970c7ff14972845e46aafc55d227c45817f5f8a9a1cad2e242398cc49f2c53896affe1373433db4175c426f1148242588207c7dee60f28a8c3ee543e5f SHA512 288560fee187c496402d46e3fa17fe99c4d3f2c0bbb389a5a91384a1015939f2389a81398045f0d1c978c4da5a1400e97126b98374185424bc5501d0b821ad5c
AUX ceph.initd-r12 3088 BLAKE2B 371ee28604bef04766b3b13687feb56e076cf4ef23797bdf469db8b85454624ab005304c798c0945bcd4c5c0478ad7d724ccd33074afef39ab939464969e32b1 SHA512 4eeb1d589cd010b39405d1664f077a79d6a8bb8d9693b32390546e14a240f98ba6e4d6281940f482f57e8364339c68b1b02219c0f837f65a738686b00ac9498c
+AUX ceph.initd-r13 3106 BLAKE2B 5ff61b3aae02888f67a86a92f11572957a25ce868587b0f720d19dea30e4ff9c04d1e0ae5ef36e83865f098eeea0d3291d404b4ff91a569c8f30e1258bd3c614 SHA512 9b27141b49a96fd18145a18f97748158bb49b73987cbe33758f183dad2d7aadfa6e5249e714188f593d382d7dfe1807f3b14ebdf6273400260f09378c5958e78
AUX ceph.logrotate-r2 545 BLAKE2B ef7dab92aa5fbbe7f5d5418feaae1a1f4400dce08ca4484fe5889888f4dcb6d180bfb5888d5c7d6d9bc32bb5c58443fb83c1cb4613a2810cab45e8a74c421279 SHA512 c30edd67b7cc064f09d4e02bac68a0aa26827d8d4e3c027393932587e8ce782893b93b53d7165d361602b29c90ef3d6b755e79d11a1edb054e0172decd4e627b
AUX envd-tcmalloc 48 BLAKE2B 4a0799ac6bbedfe5e701eead67600312d86f06143dbfd11d2c594c03d09bf13dfa645e5a0bde1189211ad20036dc4fcfce6758d3a5829d943eb337cc65783af9 SHA512 d180b1a888ec6d870ff523a3b10fd00eca479ee2586a236458af5ffaba21c84e7b8098da6d4bc08fb86c82c61a861dd3c3596a01063d734c329a92808682fc8c
AUX rbdmap.initd-r1 2372 BLAKE2B dee62cc3e92425bccfce86009be0fbecc84d55923a7dde302727d42f5f7703642121c690bdf079878c31b71d4c6c200ae6a7f595ede2dfe0bc46d8f6f9f5dd01 SHA512 d249d2299ef8dc4bbd12237cfe6ef626704872130b1092ab96d05894f04df09418364552433b264b80e49ee7e1587ebee71c1131fbbcd7d858cfadf1fe6357d5
@@ -62,10 +63,13 @@ DIST ceph-xsimd-17.2.3.tar.gz 173025 BLAKE2B 54679c24804c195ae55b9f49589e331dde9
DIST ceph-xsimd-17.2.4.tar.gz 173025 BLAKE2B 54679c24804c195ae55b9f49589e331dde92c6d89aaa20e827539e9a4e0010c7549cdd5cf02a7ebed83f953ab2a6f1d9cc9a98cf45c3dc7758ae4938c9c43713 SHA512 ecc58e7909648aaa22aefbf76ee2c5a2bece4b1b88da9c7eda1b69a46247e619ff99c4366afd6015f95debd68c1a6b89292c677b9049462d0fc0255fbc0c2a33
DIST ceph-xsimd-17.2.5.tar.gz 173025 BLAKE2B 54679c24804c195ae55b9f49589e331dde92c6d89aaa20e827539e9a4e0010c7549cdd5cf02a7ebed83f953ab2a6f1d9cc9a98cf45c3dc7758ae4938c9c43713 SHA512 ecc58e7909648aaa22aefbf76ee2c5a2bece4b1b88da9c7eda1b69a46247e619ff99c4366afd6015f95debd68c1a6b89292c677b9049462d0fc0255fbc0c2a33
EBUILD ceph-15.2.17-r1.ebuild 10743 BLAKE2B 8435b6bc28e514eaaf0b8180ea704e792e0fbe55336a92d1d074abdfe42cfff6aac7c1afa4d60260c0a5e5e498f2014a51014fa00a373e3e5bf705980b3223b5 SHA512 413f701beaf9b77bb8030f77d712ae63ce83c08eba6b277b692dcf0004f153e0b7db175985f288c60e5566615a4471d7eac04323f8cffc42b261fec8fde03c35
+EBUILD ceph-15.2.17-r2.ebuild 10808 BLAKE2B 374dd84cbd642295fa218c2c027ea0ba90bbe7db6df29c29681726e3bc98639b0b2eaeeec0b1dd38703292437e5aa52e2aab5113fa66d38ce1aa3ba9c6efbb21 SHA512 2f9cb87ca7321e30e1ee34a93a530f31cfe2e0f4f27cb16770924c32026685aaa36a8aae66b98be4fc819db4e51a5a70569ca1cad7541e8d412f29184ba7bac7
EBUILD ceph-16.2.10-r3.ebuild 12509 BLAKE2B 6af62571a67aa108680e4833dc2ac6d98693c68ea05002201f3b80b1e84b5c92083fb9a4201a62dc7324dfd56a37c3a2f297aea54e6f6e865704d42cad67bd33 SHA512 c5670c9cb1120394a3cdbab87704532cb5c512b56dfe9f45469b7011a5a69ff29a0816c50ddef48fc08e4d2d5b76a27eaffa276fa82e580c9b833856a1248645
+EBUILD ceph-16.2.10-r4.ebuild 12561 BLAKE2B ffe28eb7a041ab299bea49b3bc27cf3e3aff5a5d2ff1d3cf37072ecb6c7c47f546a41c7caecc93f0eec983a891735bf7c23acd8479ae04ba9496eab3df5a272a SHA512 dec2b8e542d64c1f0095b6e4452e4ea5fabf1a2f0b79944662cc7f807c354402349b6d1e30163a3883c0697d8fef33cc3fd1e292e387a123af07ddc14c2574f7
EBUILD ceph-16.2.9-r3.ebuild 12577 BLAKE2B 32c1e451a0002cefdfcc5244fe89554bb47163500ba10c7126a7f67e99d6ddca11e95c294ea6a66856f8337233761375d5b5f08717b4225bf437503dfebce328 SHA512 925d866c70d05671f7fd0a4e3b79da12810546a516cd1a31c9889ee210134b3343c9d1238fad75393f60f45ee607a7f1a485216be6dfea6d85a0d27a37beb347
EBUILD ceph-17.2.3-r4.ebuild 12657 BLAKE2B 6af8a2b00f7c0559007c9d68673852621717d1b5608f12c4a2c6342cac21197992788066489b575e8411f0f971d68a505dde54b0d40c49d6d3853269fdfddcd3 SHA512 ca8c3e3db6bd0f5a312d0c855717b68b58f080c24ffc82d4597c6b0753bcb27180927fda330fba24f5d88e6d3030886c260a7f4301990e818ead0a4eae07cf27
EBUILD ceph-17.2.4-r1.ebuild 12634 BLAKE2B fa7be818a54b12658f08c8019eaf2302d4ddc5bb2c998c2913599e27945e063ee91a75479cc0ff844f41cf7562b62c07b94a2510b6a5f37d4eb4c292a247e82c SHA512 0766547f3d83ae64e0a6a364de0efb817f3a572661348b4a06d2844aa6f8e098223f6d6107023e6b22b5ad9f84c36b2fef9c77fe78f2b641bf88d6f60c17c852
EBUILD ceph-17.2.5-r1.ebuild 12911 BLAKE2B 71a804495076674fbf896ae183ae5f9f78b7bda78d1ff89d840cf7f1e0283e7c8a121a8f76dcd5a52d5506526a0f6c2d4097a62b593a71a6a1e1703aad73bb80 SHA512 5254fa57beb812408c49dc340f2074cbd7a3bdf876bc24d17c3d7bbc61cf69055cd7335f3880d66d0270686be1c95d41c53a023f4209e5bcc5f2f1d30a7e2793
EBUILD ceph-17.2.5-r2.ebuild 12955 BLAKE2B b27f597ed8fe7b36039a0ca1b60fa010d09eaceb9b8922c30518f595c02dc5cb62a5f62fad15de6466b6fe6ff47ee1b700935da143fee9ba8e302b09569a87af SHA512 9c1b9e9b07e2024b7ec1ac060603d84695e8d0e2e2c9911f7cef2b2594595e17e8ed5f229c72c3c4568d45c5d022b63fa3b3bcd27b2840a774d51f68db889b62
+EBUILD ceph-17.2.5-r3.ebuild 12976 BLAKE2B cefdf1d48adc5e303fa3d3fafb78af64690347b448f22badb39c77293069d52686ed4e44c92726eb2c13cbaab22c1e32c01b1e729c5c3264da8d364c42163bd3 SHA512 12bdcc07cffe7ef61ad8acd65d9204dd83329fb2e93f13a4f0578225ea18ea4ac9672c2262354ed58e8d57aa3128a64cecdf9950f1d73d98224d3eea54c576e7
MISC metadata.xml 2504 BLAKE2B df35722094ef7fbc1ecd16d3784e8589958a8d4e2f915e84f41e6ce5191256697a73eb9d3d658089afaaa82a5b23bdf7097870a15e43029d2598bb1792a4b571 SHA512 b0c03c35876eccf78360914237fdef8925963b21f78fd8516e8506150cce36a901562e33e6fab102dd5a4e727f9a4422eb136e5b64d46b9538fb4450b3467b2b
diff --git a/sys-cluster/ceph/ceph-15.2.17-r2.ebuild b/sys-cluster/ceph/ceph-15.2.17-r2.ebuild
new file mode 100644
index 000000000000..d250506f978d
--- /dev/null
+++ b/sys-cluster/ceph/ceph-15.2.17-r2.ebuild
@@ -0,0 +1,409 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8..9} )
+CMAKE_MAKEFILE_GENERATOR=emake
+
+DISTUTILS_OPTIONAL=1
+
+inherit check-reqs bash-completion-r1 cmake distutils-r1 flag-o-matic \
+ python-r1 udev readme.gentoo-r1 toolchain-funcs systemd tmpfiles \
+ multiprocessing
+
+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=""
+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 diskprediction dpdk fuse grafana jemalloc
+ kafka kerberos ldap lttng +mgr numa 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[@]})"
+
+DEPEND="
+ acct-group/ceph
+ acct-user/ceph
+ virtual/libudev:=
+ app-arch/bzip2:=
+ app-arch/lz4:=
+ app-arch/snappy:=
+ || ( >=app-arch/snappy-1.1.9-r1 <app-arch/snappy-1.1.9 )
+ app-arch/zstd:=
+ app-shells/bash:0
+ app-misc/jq:=
+ dev-libs/crypto++:=
+ dev-cpp/gflags:=
+ dev-libs/leveldb:=[snappy,tcmalloc(-)?]
+ dev-libs/libaio:=
+ dev-libs/libfmt:=
+ <dev-libs/libfmt-9:=
+ dev-libs/libnl:3=
+ dev-libs/libxml2:=
+ <dev-libs/rocksdb-6.15:=
+ dev-libs/xmlsec:=[openssl]
+ 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/util-linux
+ sys-libs/libcap-ng:=
+ sys-libs/ncurses:0=
+ sys-libs/zlib:=
+ sys-process/numactl:=
+ virtual/libcrypt:=
+ 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:= )
+ pmdk? ( dev-libs/pmdk:= )
+ rabbitmq? ( net-libs/rabbitmq-c:= )
+ radosgw? (
+ dev-libs/expat:=
+ dev-libs/openssl:=
+ net-misc/curl:=[curl_ssl_openssl]
+ )
+ rbd-rwl? ( dev-libs/pmdk:= )
+ ssl? ( dev-libs/openssl:= )
+ system-boost? ( dev-libs/boost:=[context,python,${PYTHON_USEDEP}] )
+ !system-boost? ( <sys-libs/glibc-2.34 )
+ uring? ( sys-libs/liburing:= )
+ xfs? ( sys-fs/xfsprogs:= )
+ zfs? ( sys-fs/zfs:= )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ amd64? ( dev-lang/yasm )
+ x86? ( dev-lang/yasm )
+ app-arch/cpio
+ >=dev-util/cmake-3.5.0
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/sphinx
+ dev-util/cunit
+ dev-util/gperf
+ dev-util/ragel
+ dev-util/valgrind
+ sys-apps/coreutils
+ sys-apps/grep
+ 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="${DEPEND}
+ ${PYTHON_DEPS}
+ 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[lvm]
+ app-alternatives/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/setuptools[${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/scikit-learn[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ )
+"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ ?? ( jemalloc tcmalloc )
+ diskprediction? ( mgr )
+ kafka? ( radosgw )
+ mgr? ( cephfs )
+ rabbitmq? ( radosgw )
+"
+RESTRICT="!test? ( test )"
+
+# the tests need root access
+RESTRICT="test? ( userpriv )"
+
+# distribution tarball does not include everything needed for tests
+RESTRICT+=" test"
+
+# create a non-debug release
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+# 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.15-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-cython-0.29.patch"
+ "${FILESDIR}/ceph-15.2.0-rocksdb-cmake.patch"
+ "${FILESDIR}/ceph-15.2.2-systemd-unit.patch"
+ "${FILESDIR}/ceph-15.2.3-spdk-compile.patch"
+ "${FILESDIR}/ceph-15.2.4-system-uring.patch"
+ "${FILESDIR}/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch"
+ "${FILESDIR}/ceph-15.2.15-snappy-1.1.9.patch"
+)
+
+check-reqs_export_vars() {
+ CHECKREQS_DISK_BUILD="5400M"
+ CHECKREQS_DISK_USR="510M"
+
+ export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ python_setup
+ check-reqs_export_vars
+ check-reqs_pkg_setup
+}
+
+src_prepare() {
+ cmake_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 -r -e "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
+ -i src/bash_completion/CMakeLists.txt || die
+
+ sed -e "s:objdump -p:$(tc-getOBJDUMP) -p:" -i CMakeLists.txt || die
+
+ if ! use diskprediction; then
+ rm -rf src/pybind/mgr/diskprediction_local || die
+ fi
+
+ # 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_SPDK=$(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_PMDK=$(usex pmdk 'YES' "$(usex rbd-rwl)")
+ -DWITH_SYSTEM_BOOST=$(usex system-boost)
+ -DBOOST_J=$(makeopts_jobs)
+ -DWITH_SYSTEM_ROCKSDB=ON
+ -DWITH_RDMA=OFF
+ -DWITH_TBB=OFF
+ -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
+ -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=$(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
+
+ # needed for >=glibc-2.32
+ has_version '>=sys-libs/glibc-2.32' && mycmakeargs+=(-DWITH_REENTRANT_STRSIGNAL:BOOL=ON)
+
+ rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
+ || die "failed to remove cmake cache"
+
+ cmake_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_build VERBOSE=1 all
+
+ # we have to do this here to prevent from building everything multiple times
+ python_copy_sources
+ distutils-r1_src_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_src_install
+ distutils-r1_src_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/ceph/stat /var/log/ceph/console
+
+ fowners -R ceph:ceph /var/log/ceph
+
+ newinitd "${FILESDIR}/rbdmap.initd-r1" rbdmap
+ newinitd "${FILESDIR}/${PN}.initd-r13" ${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
+ newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf
+
+ readme.gentoo_create_doc
+
+ python_setup
+
+ # 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
+ tmpfiles_process ${PN}.conf
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/sys-cluster/ceph/ceph-16.2.10-r4.ebuild b/sys-cluster/ceph/ceph-16.2.10-r4.ebuild
new file mode 100644
index 000000000000..d13869019397
--- /dev/null
+++ b/sys-cluster/ceph/ceph-16.2.10-r4.ebuild
@@ -0,0 +1,473 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+LUA_COMPAT=( lua5-3 )
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs bash-completion-r1 cmake python-r1 flag-o-matic \
+ lua-single udev readme.gentoo-r1 toolchain-funcs systemd tmpfiles
+
+SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
+KEYWORDS="~amd64 ~arm64 ~ppc64"
+
+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=(avx2 avx512f pclmul sse{,2,3,4_1,4_2} ssse3)
+
+IUSE="
+ babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana
+ jemalloc jaeger kafka kerberos ldap lttng +mgr numa pmdk rabbitmq
+ +radosgw rbd-rwl rbd-ssd rdma rgw-lua +ssl spdk +sqlite +system-boost
+ systemd +tcmalloc test uring xfs zbd zfs
+"
+
+IUSE+="$(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
+
+DEPEND="
+ ${LUA_DEPS}
+ ${PYTHON_DEPS}
+ acct-group/ceph
+ acct-user/ceph
+ virtual/libudev:=
+ app-arch/bzip2:=
+ app-arch/lz4:=
+ app-arch/snappy:=
+ >=app-arch/snappy-1.1.9-r1
+ app-arch/zstd:=
+ app-shells/bash:0
+ app-misc/jq:=
+ dev-libs/crypto++:=
+ dev-cpp/gflags:=
+ <dev-libs/leveldb-1.23:=[snappy,tcmalloc(-)?]
+ dev-libs/libaio:=
+ <dev-libs/libfmt-9:=
+ dev-libs/libnl:3=
+ dev-libs/libxml2:=
+ dev-libs/libevent:=
+ dev-libs/openssl:=
+ <dev-libs/rocksdb-6.15:=
+ dev-libs/xmlsec:=[openssl]
+ 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/hwloc:=
+ sys-apps/keyutils:=
+ sys-apps/util-linux:=
+ sys-apps/util-linux
+ sys-libs/libcap-ng:=
+ sys-libs/ncurses:0=
+ sys-libs/zlib:=
+ sys-process/numactl:=
+ virtual/libcrypt:=
+ x11-libs/libpciaccess:=
+ babeltrace? ( dev-util/babeltrace )
+ fuse? ( sys-fs/fuse:3= )
+ jemalloc? ( dev-libs/jemalloc:= )
+ !jemalloc? ( >=dev-util/google-perftools-2.6.1:= )
+ jaeger? ( dev-cpp/nlohmann_json:= )
+ kafka? ( dev-libs/librdkafka:= )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap:= )
+ lttng? ( dev-util/lttng-ust:= )
+ pmdk? ( dev-libs/pmdk:= )
+ rabbitmq? ( net-libs/rabbitmq-c:= )
+ radosgw? (
+ dev-libs/icu:=
+ dev-libs/expat:=
+ net-misc/curl:=[curl_ssl_openssl]
+ )
+ rbd-rwl? ( dev-libs/pmdk:= )
+ rdma? ( sys-cluster/rdma-core:= )
+ spdk? ( dev-util/cunit )
+ sqlite? ( dev-db/sqlite:= )
+ system-boost? ( dev-libs/boost:=[context,python,${PYTHON_USEDEP},zlib] )
+ !system-boost? ( $(python_gen_impl_dep '' 3.8 3.9) )
+ uring? ( sys-libs/liburing:= )
+ xfs? ( sys-fs/xfsprogs:= )
+ zbd? ( sys-block/libzbd:= )
+ zfs? ( sys-fs/zfs:= )
+"
+BDEPEND="
+ amd64? ( dev-lang/nasm )
+ x86? ( dev-lang/yasm )
+ app-arch/cpio
+ >=dev-util/cmake-3.5.0
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/sphinx
+ dev-util/gperf
+ dev-util/ragel
+ dev-util/valgrind
+ sys-apps/coreutils
+ sys-apps/grep
+ sys-apps/util-linux
+ sys-apps/which
+ sys-devel/bc
+ sys-devel/patch
+ virtual/pkgconfig
+ jaeger? (
+ sys-devel/bison
+ sys-devel/flex
+ )
+ test? (
+ dev-util/cunit
+ 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="
+ ${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[lvm]
+ app-alternatives/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/pyyaml[${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/routes[${PYTHON_USEDEP}]
+ diskprediction? (
+ >=dev-python/scipy-1.4.0[${PYTHON_USEDEP}]
+ )
+ sci-libs/scikit-learn[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ )
+"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ ${LUA_REQUIRED_USE}
+ ?? ( jemalloc tcmalloc )
+ jaeger? ( !system-boost )
+ diskprediction? ( mgr )
+ kafka? ( radosgw )
+ mgr? ( cephfs )
+ rabbitmq? ( radosgw )
+ !system-boost? (
+ python_targets_python3_9
+ python_targets_python3_10
+ )
+"
+
+RESTRICT="
+ !test? ( test )
+"
+
+# tests need root access, and network access
+RESTRICT+="test"
+
+# create a non-debug release
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+# 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-16.2.2-cflags.patch"
+ "${FILESDIR}/ceph-16.2.8-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-cython-0.29.patch"
+ "${FILESDIR}/ceph-16.2.0-rocksdb-cmake.patch"
+ "${FILESDIR}/ceph-15.2.3-spdk-compile.patch"
+ "${FILESDIR}/ceph-16.2.0-spdk-tinfo.patch"
+ "${FILESDIR}/ceph-16.2.0-jaeger-system-boost.patch"
+ "${FILESDIR}/ceph-16.2.0-liburing.patch"
+ "${FILESDIR}/ceph-16.2.2-system-zstd.patch"
+ "${FILESDIR}/ceph-16.2.7-string-includes.patch"
+ "${FILESDIR}/ceph-17.2.0-fuse3.patch"
+ "${FILESDIR}/ceph-16.2.9-python310.patch"
+ "${FILESDIR}/ceph-17.2.0-gcc12-header.patch"
+ "${FILESDIR}/ceph-16.2.10-flags.patch"
+)
+
+check-reqs_export_vars() {
+ CHECKREQS_DISK_BUILD="6G"
+
+ if use system-boost; then
+ CHECKREQS_DISK_USR="350M"
+ else
+ CHECKREQS_DISK_USR="510M"
+ fi
+
+ export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if ! use system-boost; then
+ python_setup 3.8 3.9
+ else
+ python_setup
+ fi
+ lua_setup
+ check-reqs_export_vars
+ check-reqs_pkg_setup
+}
+
+src_prepare() {
+ cmake_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
+
+ if ! use systemd; then
+ find "${S}"/src/ceph-volume/ceph_volume -name '*.py' -print0 \
+ | xargs --null sed \
+ -e '/^from ceph_volume.systemd import systemctl/ d' \
+ -i || die
+ fi
+
+ sed -r -e "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
+ -i src/bash_completion/CMakeLists.txt || die
+
+ sed -e "s:objdump -p:$(tc-getOBJDUMP) -p:" -i CMakeLists.txt || die
+
+ if ! use diskprediction; then
+ rm -rf src/pybind/mgr/diskprediction_local || die
+ fi
+
+ # force lua version to use selected version
+ local lua_version
+ lua_version=$(ver_cut 1-2 $(lua_get_version))
+ sed "s:find_package(Lua [0-9][.][0-9] REQUIRED):find_package(Lua ${lua_version} EXACT REQUIRED):" \
+ -i src/CMakeLists.txt
+
+ # remove tests that need root access
+ rm src/test/cli/ceph-authtool/cap*.t || die
+}
+
+ceph_src_configure() {
+ local mycmakeargs=(
+ -DWITH_BABELTRACE:BOOL=$(usex babeltrace)
+ -DWITH_BLUESTORE_PMEM:BOOL=$(usex pmdk)
+ -DWITH_CEPHFS:BOOL=$(usex cephfs)
+ -DWITH_CEPHFS_SHELL:BOOL=$(usex cephfs)
+ -DWITH_DPDK:BOOL=$(usex dpdk)
+ -DWITH_SPDK:BOOL=$(usex spdk)
+ -DWITH_FUSE:BOOL=$(usex fuse)
+ -DWITH_LTTNG:BOOL=$(usex lttng)
+ -DWITH_GSSAPI:BOOL=$(usex kerberos)
+ -DWITH_GRAFANA:BOOL=$(usex grafana)
+ -DWITH_MGR:BOOL=$(usex mgr)
+ -DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF
+ -DWITH_OPENLDAP:BOOL=$(usex ldap)
+ -DWITH_PYTHON3:STRING=3
+ -DWITH_RADOSGW:BOOL=$(usex radosgw)
+ -DWITH_RADOSGW_AMQP_ENDPOINT:BOOL=$(usex rabbitmq)
+ -DWITH_RADOSGW_KAFKA_ENDPOINT:BOOL=$(usex kafka)
+ -DWITH_RADOSGW_LUA_PACKAGES:BOOL=$(usex rgw-lua "$(usex radosgw)" "NO")
+ -DWITH_RBD_RWL:BOOL=$(usex rbd-rwl)
+ -DWITH_RBD_SSD_CACHE:BOOL=$(usex rbd-ssd)
+ -DWITH_SYSTEMD:BOOL=$(usex systemd)
+ -DWITH_TESTS:BOOL=$(usex test)
+ -DWITH_LIBURING:BOOL=$(usex uring)
+ -DWITH_SYSTEM_LIBURING:BOOL=$(usex uring)
+ -DWITH_LIBCEPHSQLITE:BOOL=$(usex sqlite)
+ -DWITH_XFS:BOOL=$(usex xfs)
+ -DWITH_ZBD:BOOL=$(usex zbd)
+ -DWITH_ZFS:BOOL=$(usex zfs)
+ -DENABLE_SHARED:BOOL=ON
+ -DALLOCATOR:STRING=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
+ -DWITH_SYSTEM_PMDK:BOOL=$(usex pmdk 'YES' "$(usex rbd-rwl)")
+ -DWITH_SYSTEM_BOOST:BOOL=$(usex system-boost)
+ -DWITH_SYSTEM_ROCKSDB:BOOL=ON
+ -DWITH_RDMA:BOOL=$(usex rdma)
+ -DCMAKE_INSTALL_DOCDIR:PATH="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
+ -DCMAKE_INSTALL_SYSCONFDIR:PATH="${EPREFIX}/etc"
+ -Wno-dev
+ )
+
+ # this breaks when re-configuring for python impl
+ if [[ ${EBUILD_PHASE} == configure ]]; then
+ mycmakeargs+=(
+ -DWITH_JAEGER:BOOL=$(usex jaeger)
+ )
+ else
+ mycmakeargs+=(
+ -DWITH_RADOSGW_SELECT_PARQUET:BOOL=OFF
+ )
+ fi
+
+ # conditionally used cmake args
+ use test && mycmakearts+=( -DWITH_SYSTEM_GTEST:BOOL=$(usex test) )
+ use systemd && mycmakeargs+=( -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=$(systemd_get_systemunitdir) )
+
+ if use amd64 || use x86; then
+ local flag
+ for flag in "${CPU_FLAGS_X86[@]}"; do
+ case "${flag}" in
+ avx*)
+ local var=${flag%f}
+ mycmakeargs+=(
+ "-DHAVE_NASM_X64_${var^^}:BOOL=$(usex cpu_flags_x86_${flag})"
+ )
+ ;;
+ *) mycmakeargs+=(
+ "-DHAVE_INTEL_${flag^^}:BOOL=$(usex cpu_flags_x86_${flag})"
+ );;
+ esac
+ done
+ fi
+
+ # needed for >=glibc-2.32
+ has_version '>=sys-libs/glibc-2.32' && mycmakeargs+=( -DWITH_REENTRANT_STRSIGNAL:BOOL=ON )
+
+ rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
+ || die "failed to remove cmake cache"
+
+ cmake_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
+}
+
+src_compile() {
+ cmake_build VERBOSE=1 all
+
+ # we have to do this here to prevent from building everything multiple times
+ python_copy_sources
+ python_foreach_impl python_compile
+}
+
+python_compile() {
+ local CMAKE_USE_DIR="${S}"
+ ceph_src_configure
+
+ pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+ cmake_build VERBOSE=1 clean
+ cmake_build 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}" cmake_build VERBOSE=1 install
+ popd >/dev/null || die
+}
+
+src_install() {
+ python_foreach_impl python_install
+
+ python_setup
+ cmake_src_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/ceph/stat /var/log/ceph/console
+
+ fowners -R ceph:ceph /var/log/ceph
+
+ newinitd "${FILESDIR}/rbdmap.initd-r1" rbdmap
+ newinitd "${FILESDIR}/${PN}.initd-r13" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
+
+ insinto /etc/sudoers.d
+ doins sudoers.d/*
+
+ 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
+ newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf
+
+ readme.gentoo_create_doc
+
+ # 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}}"
+}
+
+python_install() {
+ local CMAKE_USE_DIR="${S}"
+ pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
+ DESTDIR="${ED}" cmake_build VERBOSE=1 install
+ popd >/dev/null || die
+
+ python_optimize
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+ tmpfiles_process ${PN}.conf
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/sys-cluster/ceph/ceph-17.2.5-r3.ebuild b/sys-cluster/ceph/ceph-17.2.5-r3.ebuild
new file mode 100644
index 000000000000..93999ca1aac5
--- /dev/null
+++ b/sys-cluster/ceph/ceph-17.2.5-r3.ebuild
@@ -0,0 +1,477 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+LUA_COMPAT=( lua5-{3..4} )
+
+inherit check-reqs bash-completion-r1 cmake flag-o-matic lua-single \
+ python-r1 udev readme.gentoo-r1 toolchain-funcs systemd tmpfiles
+
+SRC_URI="
+ https://download.ceph.com/tarballs/${P}.tar.gz
+ parquet? ( https://github.com/xtensor-stack/xsimd/archive/aeec9c872c8b475dedd7781336710f2dd2666cb2.tar.gz -> ceph-xsimd-${PV}.tar.gz )
+"
+KEYWORDS="~amd64 ~arm64"
+
+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=(avx2 avx512f pclmul sse{,2,3,4_1,4_2} ssse3)
+
+IUSE="
+ babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana
+ jemalloc jaeger kafka kerberos ldap lttng +mgr +parquet pmdk rabbitmq
+ +radosgw rbd-rwl rbd-ssd rdma rgw-lua +ssl spdk +sqlite +system-boost
+ systemd +tcmalloc test +uring xfs zbd zfs
+"
+
+IUSE+="$(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
+
+DEPEND="
+ ${LUA_DEPS}
+ ${PYTHON_DEPS}
+ acct-group/ceph
+ acct-user/ceph
+ virtual/libudev:=
+ app-arch/bzip2:=
+ app-arch/lz4:=
+ app-arch/snappy:=
+ >=app-arch/snappy-1.1.9-r1
+ app-arch/zstd:=
+ app-shells/bash:0
+ app-misc/jq:=
+ dev-libs/crypto++:=
+ dev-cpp/gflags:=
+ dev-lang/jsonnet:=
+ <dev-libs/leveldb-1.23:=[snappy,tcmalloc(-)?]
+ dev-libs/libaio:=
+ >=dev-libs/libfmt-6.2.1:=
+ <dev-libs/libfmt-9:=
+ dev-libs/libnl:3=
+ dev-libs/libxml2:=
+ dev-libs/libevent:=
+ dev-libs/libutf8proc:=
+ dev-libs/nss:=
+ dev-libs/openssl:=
+ <dev-libs/rocksdb-6.15:=
+ dev-libs/thrift:=
+ dev-libs/xmlsec:=[openssl]
+ dev-cpp/yaml-cpp:=
+ dev-python/natsort[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ net-dns/c-ares:=
+ net-libs/gnutls:=
+ sys-auth/oath-toolkit:=
+ sys-apps/coreutils
+ sys-apps/hwloc:=
+ sys-apps/keyutils:=
+ sys-apps/util-linux:=
+ sys-libs/libcap-ng:=
+ sys-libs/ncurses:0=
+ sys-libs/zlib:=
+ sys-process/numactl:=
+ virtual/libcrypt:=
+ x11-libs/libpciaccess:=
+ babeltrace? ( dev-util/babeltrace )
+ fuse? ( sys-fs/fuse:3= )
+ jemalloc? ( dev-libs/jemalloc:= )
+ !jemalloc? ( >=dev-util/google-perftools-2.6.1:= )
+ jaeger? (
+ dev-cpp/nlohmann_json:=
+ dev-cpp/opentelemetry-cpp:=[jaeger]
+ )
+ kafka? ( dev-libs/librdkafka:= )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap:= )
+ lttng? ( dev-util/lttng-ust:= )
+ parquet? ( dev-libs/re2:= )
+ pmdk? ( >=dev-libs/pmdk-1.10.0:= )
+ rabbitmq? ( net-libs/rabbitmq-c:= )
+ radosgw? (
+ dev-libs/icu:=
+ dev-libs/expat:=
+ net-misc/curl:=[curl_ssl_openssl]
+ )
+ rbd-rwl? ( dev-libs/pmdk:= )
+ rdma? ( sys-cluster/rdma-core:= )
+ spdk? ( dev-util/cunit )
+ sqlite? ( dev-db/sqlite:= )
+ system-boost? ( dev-libs/boost:=[context,python,${PYTHON_USEDEP},zlib] )
+ uring? ( sys-libs/liburing:= )
+ xfs? ( sys-fs/xfsprogs:= )
+ zbd? ( sys-block/libzbd:= )
+ zfs? ( sys-fs/zfs:= )
+"
+BDEPEND="
+ amd64? ( dev-lang/nasm )
+ x86? ( dev-lang/yasm )
+ app-arch/cpio
+ >=dev-util/cmake-3.5.0
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/sphinx
+ dev-util/gperf
+ dev-util/ragel
+ dev-util/valgrind
+ sys-apps/coreutils
+ sys-apps/grep
+ sys-apps/util-linux
+ sys-apps/which
+ sys-devel/bc
+ sys-devel/patch
+ virtual/pkgconfig
+ jaeger? (
+ sys-devel/bison
+ sys-devel/flex
+ )
+ test? (
+ dev-util/cunit
+ 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="
+ ${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[lvm]
+ app-alternatives/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/routes[${PYTHON_USEDEP}]
+ diskprediction? (
+ >=dev-python/scipy-1.4.0[${PYTHON_USEDEP}]
+ )
+ sci-libs/scikit-learn[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ )
+"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ ${LUA_REQUIRED_USE}
+ ?? ( jemalloc tcmalloc )
+ diskprediction? ( mgr )
+ kafka? ( radosgw )
+ mgr? ( cephfs )
+ rabbitmq? ( radosgw )
+ rgw-lua? ( radosgw )
+"
+
+RESTRICT="
+ !test? ( test )
+"
+
+# tests need root access, and network access
+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-16.2.2-cflags.patch"
+ "${FILESDIR}/ceph-17.2.1-no-virtualenvs.patch"
+ "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
+ "${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch"
+ "${FILESDIR}/ceph-16.2.0-rocksdb-cmake.patch"
+ "${FILESDIR}/ceph-16.2.0-spdk-tinfo.patch"
+ "${FILESDIR}/ceph-16.2.0-jaeger-system-boost.patch"
+ "${FILESDIR}/ceph-16.2.0-liburing.patch"
+ "${FILESDIR}/ceph-17.2.0-cyclic-deps.patch"
+ "${FILESDIR}/ceph-17.2.0-pybind-boost-1.74.patch"
+ "${FILESDIR}/ceph-17.2.0-findre2.patch"
+ "${FILESDIR}/ceph-17.2.0-install-dbstore.patch"
+ "${FILESDIR}/ceph-17.2.0-deprecated-boost.patch"
+ "${FILESDIR}/ceph-17.2.0-system-opentelemetry.patch"
+ "${FILESDIR}/ceph-17.2.0-fuse3.patch"
+ "${FILESDIR}/ceph-17.2.0-osd_class_dir.patch"
+ "${FILESDIR}/ceph-17.2.0-gcc12-header.patch"
+ "${FILESDIR}/ceph-17.2.3-flags.patch"
+ "${FILESDIR}/ceph-17.2.4-cyclic-deps.patch"
+ # https://bugs.gentoo.org/866165
+ "${FILESDIR}/ceph-17.2.5-suppress-cmake-warning.patch"
+ "${FILESDIR}/ceph-17.2.5-gcc13.patch"
+ "${FILESDIR}/ceph-17.2.5-boost-1.81.patch"
+)
+
+check-reqs_export_vars() {
+ CHECKREQS_DISK_BUILD="6G"
+
+ if use system-boost; then
+ CHECKREQS_DISK_USR="350M"
+ else
+ CHECKREQS_DISK_USR="510M"
+ fi
+
+ export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
+}
+
+pkg_pretend() {
+ check-reqs_export_vars
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ python_setup
+ lua_setup
+ check-reqs_export_vars
+ check-reqs_pkg_setup
+}
+
+src_prepare() {
+ cmake_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
+
+ if ! use systemd; then
+ find "${S}"/src/ceph-volume/ceph_volume -name '*.py' -print0 \
+ | xargs --null sed \
+ -e '/^from ceph_volume.systemd import systemctl/ d' \
+ -i || die
+ fi
+
+ sed -r -e "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
+ -i src/bash_completion/CMakeLists.txt || die
+
+ sed -e "s:objdump -p:$(tc-getOBJDUMP) -p:" -i CMakeLists.txt || die
+
+ # force lua version to use selected version
+ local lua_version
+ lua_version=$(ver_cut 1-2 $(lua_get_version))
+ sed "s:find_package(Lua [0-9][.][0-9] REQUIRED):find_package(Lua ${lua_version} EXACT REQUIRED):" \
+ -i src/CMakeLists.txt
+
+ if use spdk; then
+ # https://bugs.gentoo.org/871942
+ sed -i 's/[#]ifndef HAVE_ARC4RANDOM/#if 0/' src/spdk/lib/iscsi/iscsi.c || die
+ fi
+
+ # remove tests that need root access
+ rm src/test/cli/ceph-authtool/cap*.t || die
+}
+
+ceph_src_configure() {
+ local mycmakeargs=(
+ -DWITH_BABELTRACE:BOOL=$(usex babeltrace)
+ -DWITH_BLUESTORE_PMEM:BOOL=$(usex pmdk)
+ -DWITH_CEPHFS:BOOL=$(usex cephfs)
+ -DWITH_CEPHFS_SHELL:BOOL=$(usex cephfs)
+ -DWITH_DPDK:BOOL=$(usex dpdk)
+ -DWITH_SPDK:BOOL=$(usex spdk)
+ -DWITH_FUSE:BOOL=$(usex fuse)
+ -DWITH_LTTNG:BOOL=$(usex lttng)
+ -DWITH_GSSAPI:BOOL=$(usex kerberos)
+ -DWITH_GRAFANA:BOOL=$(usex grafana)
+ -DWITH_MGR:BOOL=$(usex mgr)
+ -DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF
+ -DWITH_OPENLDAP:BOOL=$(usex ldap)
+ -DWITH_PYTHON3:STRING=3
+ -DWITH_RADOSGW:BOOL=$(usex radosgw)
+ -DWITH_RADOSGW_AMQP_ENDPOINT:BOOL=$(usex rabbitmq)
+ -DWITH_RADOSGW_KAFKA_ENDPOINT:BOOL=$(usex kafka)
+ -DWITH_RADOSGW_LUA_PACKAGES:BOOL=$(usex rgw-lua "$(usex radosgw)" "NO")
+ -DWITH_RBD_RWL:BOOL=$(usex rbd-rwl)
+ -DWITH_RBD_SSD_CACHE:BOOL=$(usex rbd-ssd)
+ -DWITH_SYSTEMD:BOOL=$(usex systemd)
+ -DWITH_TESTS:BOOL=$(usex test)
+ -DWITH_LIBURING:BOOL=$(usex uring)
+ -DWITH_SYSTEM_LIBURING:BOOL=$(usex uring)
+ -DWITH_LIBCEPHSQLITE:BOOL=$(usex sqlite)
+ -DWITH_XFS:BOOL=$(usex xfs)
+ -DWITH_ZBD:BOOL=$(usex zbd)
+ -DWITH_ZFS:BOOL=$(usex zfs)
+ -DENABLE_SHARED:BOOL=ON
+ -DALLOCATOR:STRING=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
+ -DWITH_SYSTEM_PMDK:BOOL=$(usex pmdk 'YES' "$(usex rbd-rwl '')")
+ -DWITH_SYSTEM_BOOST:BOOL=$(usex system-boost)
+ -DWITH_SYSTEM_ROCKSDB:BOOL=ON
+ -DWITH_SYSTEM_ZSTD:BOOL=ON
+ -DWITH_RDMA:BOOL=$(usex rdma)
+ -DCMAKE_INSTALL_DOCDIR:PATH="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
+ -DCMAKE_INSTALL_SYSCONFDIR:PATH="${EPREFIX}/etc"
+ -Wno-dev
+ )
+
+ # this breaks when re-configuring for python impl
+ if [[ ${EBUILD_PHASE} == configure ]]; then
+ mycmakeargs+=(
+ -DWITH_JAEGER:BOOL=$(usex jaeger)
+ -DWITH_RADOSGW_SELECT_PARQUET:BOOL=$(usex parquet)
+ )
+ else
+ mycmakeargs+=(
+ -DWITH_RADOSGW_SELECT_PARQUET:BOOL=OFF
+ -DWITH_JAEGER:BOOL=OFF
+ # don't want to warn about unused CLI when reconfiguring for python
+ -DCMAKE_WARN_UNUSED_CLI:BOOL=OFF
+ )
+ fi
+
+ # conditionally used cmake args
+ use test && mycmakearts+=( -DWITH_SYSTEM_GTEST:BOOL=$(usex test) )
+ use systemd && mycmakeargs+=( -DSYSTEMD_SYSTEM_UNIT_DIR:PATH=$(systemd_get_systemunitdir) )
+
+ if use amd64 || use x86; then
+ local flag
+ for flag in "${CPU_FLAGS_X86[@]}"; do
+ case "${flag}" in
+ avx*)
+ local var=${flag%f}
+ mycmakeargs+=(
+ "-DHAVE_NASM_X64_${var^^}:BOOL=$(usex cpu_flags_x86_${flag})"
+ )
+ ;;
+ *) mycmakeargs+=(
+ "-DHAVE_INTEL_${flag^^}:BOOL=$(usex cpu_flags_x86_${flag})"
+ );;
+ esac
+ done
+ fi
+
+ # needed for >=glibc-2.32
+ has_version '>=sys-libs/glibc-2.32' && mycmakeargs+=( -DWITH_REENTRANT_STRSIGNAL:BOOL=ON )
+
+ rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
+ || die "failed to remove cmake cache"
+
+ # hopefully this will not be necessary in the next release
+ use parquet && export ARROW_XSIMD_URL="file:///${DISTDIR}/ceph-xsimd-${PV}.tar.gz"
+
+ cmake_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
+}
+
+src_compile() {
+ cmake_build all
+
+ # we have to do this here to prevent from building everything multiple times
+ python_copy_sources
+ python_foreach_impl python_compile
+}
+
+python_compile() {
+ local CMAKE_USE_DIR="${S}"
+ ceph_src_configure
+
+ cmake_build src/pybind/CMakeFiles/cython_modules
+}
+
+src_install() {
+ python_foreach_impl python_install
+
+ python_setup
+ cmake_src_install
+ python_optimize
+
+ 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/ceph/stat /var/log/ceph/console
+
+ fowners -R ceph:ceph /var/log/ceph
+
+ newinitd "${FILESDIR}/rbdmap.initd-r1" rbdmap
+ newinitd "${FILESDIR}/${PN}.initd-r13" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
+
+ insinto /etc/sudoers.d
+ doins sudoers.d/*
+
+ 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
+ newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf
+
+ readme.gentoo_create_doc
+
+ # 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}}"
+}
+
+python_install() {
+ local CMAKE_USE_DIR="${S}"
+ DESTDIR="${ED}" cmake_build src/pybind/install
+
+ python_optimize
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+ tmpfiles_process ${PN}.conf
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/sys-cluster/ceph/files/ceph.initd-r13 b/sys-cluster/ceph/files/ceph.initd-r13
new file mode 100644
index 000000000000..2d158ad80be3
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r13
@@ -0,0 +1,115 @@
+#!/sbin/openrc-run
+
+# make sure /etc/conf.d/ceph gets loaded for ceph-mon etc
+_CONFD_FILE="${RC_SERVICE%/*}/../conf.d/${RC_SVCNAME%-*}"
+if [ -r "${_CONFD_FILE}" ]; then
+ . "${_CONFD_FILE}" || exit 1
+fi
+
+: "${ceph_conf:=/etc/ceph/ceph.conf}"
+daemon_type="${RC_SVCNAME#ceph-}"
+daemon_type="${daemon_type%%.*}"
+daemon_id="${RC_SVCNAME#ceph-*.}"
+daemon_id="${daemon_id:-0}"
+: "${rundir:=/run/ceph}"
+: "${user:=ceph}"
+: "${group:=ceph}"
+: "${rc_ulimit:=-n 1048576 -u 1048576}"
+
+pidfile="${rundir}/supervisor-${daemon_type}.${daemon_id}.pid"
+daemon_pidfile="${rundir}/${daemon_type}.${daemon_id}.pid"
+
+command="/usr/bin/${RC_SVCNAME%%.*}"
+command_args="-i ${daemon_id} --pid-file ${daemon_pidfile} -c ${ceph_conf}"
+extra_commands="${extra_commands} reload"
+command_args_foreground="--foreground"
+
+retry="${CEPH_TERMTIMEOUT:-TERM/120/KILL/5}"
+start_stop_daemon_args="--user ${user} --group ${group}"
+supervise_daemon_args="--user ${user} --group ${group}"
+
+: "${supervisor:=supervise-daemon}"
+: "${stdout:=/var/log/ceph/console/ceph}"
+: "${stderr:=/var/log/ceph/console/ceph}"
+: "${respawn_delay:=10}"
+: "${respawn_max:=5}"
+: "${respawn_period:=1800}"
+
+: "${osd_respawn_delay:=15}"
+: "${osd_respawn_max:=10}"
+
+: "${radosgw_respawn_max:=5}"
+: "${radosgw_respawn_period:=30}"
+
+depend() {
+ use dns logger
+ after net ntpd ntp-client chronyd
+ before netmount
+}
+
+is_type_valid() {
+ case ${daemon_type} in
+ mon|mds|osd|mgr|radosgw) return 0;;
+ *) return 1;;
+ esac
+}
+
+start_pre() {
+ local log_dir
+ export CEPH_CONF="${ceph_conf}"
+
+ checkpath -d -q -o "${user}:${group}" "${rundir}"
+
+ if ! is_type_valid ;then
+ eerror "Please give valid Ceph Server Type: mds, mon, osd"
+ return 1
+
+ elif pgrep -f "[c]eph-${daemon_type} -i ${daemon_id} "; then
+ eerror "${daemon_type}.${daemon_id} is still running, refusing to start"
+ return 1
+ fi
+
+ if [ -n "${bluestore_osd_fsid}" ]; then
+ einfo "Mounting Bluestore"
+ ceph-volume lvm activate "${daemon_id}" "${bluestore_osd_fsid}" --no-systemd
+ fi
+
+ if [ "${daemon_type}" = radosgw ] && [ "${RADOSGW_WANT_NAME_PARAM}" = y ]; then
+ command_args="${command_args} --name client.${daemon_id}"
+ fi
+
+ local arg_name arg_val repl_arg_name
+ for arg_name in stdout stderr respawn_delay respawn_max respawn_period; do
+ eval arg_val="\${${daemon_type}_${arg_name}}"
+
+ if [ -z "${arg_val}" ]; then
+ eval arg_val="\${${arg_name}}"
+ else
+ eval "${arg_name}=\"${arg_val}\""
+ fi
+
+ if [ "${arg_name}" = "stderr" ] || [ "${arg_name}" = "stdout" ]; then
+ local log_file log_postfix
+ log_postfix=".${daemon_id}-${arg_name}.log"
+ log_file="${arg_val}"
+
+ if [ "${log_file}" != /dev/null ]; then
+ log_file="${log_file}${log_postfix}"
+
+ log_dir="$(dirname "${log_file}")"
+ checkpath -m 0755 -o "${user}:${group}" -d "${log_dir}"
+ fi
+
+ repl_arg_name="$(printf -- "%s\n" "${arg_name}" | tr _ -)"
+ supervise_daemon_args="${supervise_daemon_args} --${repl_arg_name}=${log_file}"
+ fi
+ done
+}
+
+reload() {
+ ebegin "Reloading Ceph ${daemon_type}.${daemon_id}"
+ start-stop-daemon --signal 1 "${start_stop_daemon_args}"
+ eend ${?}
+}
+
+# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet: