From 5c0c70d5917e66743293789a6d6fd7d72250eb32 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 13 Jul 2022 07:36:05 +0100 Subject: gentoo auto-resync : 13:07:2022 - 07:36:05 --- sys-cluster/ceph/Manifest | 6 +- sys-cluster/ceph/ceph-16.2.9-r1.ebuild | 473 +++++++++++++++++++++ sys-cluster/ceph/ceph-16.2.9.ebuild | 472 -------------------- sys-cluster/ceph/ceph-17.2.1-r1.ebuild | 459 ++++++++++++++++++++ sys-cluster/ceph/ceph-17.2.1.ebuild | 457 -------------------- sys-cluster/ceph/files/ceph-16.2.9-python310.patch | 12 + sys-cluster/ceph/files/ceph-17.2.1-python310.patch | 35 ++ 7 files changed, 983 insertions(+), 931 deletions(-) create mode 100644 sys-cluster/ceph/ceph-16.2.9-r1.ebuild delete mode 100644 sys-cluster/ceph/ceph-16.2.9.ebuild create mode 100644 sys-cluster/ceph/ceph-17.2.1-r1.ebuild delete mode 100644 sys-cluster/ceph/ceph-17.2.1.ebuild create mode 100644 sys-cluster/ceph/files/ceph-16.2.9-python310.patch create mode 100644 sys-cluster/ceph/files/ceph-17.2.1-python310.patch (limited to 'sys-cluster/ceph') diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest index da01f77c8079..9fcba20711dc 100644 --- a/sys-cluster/ceph/Manifest +++ b/sys-cluster/ceph/Manifest @@ -21,6 +21,7 @@ AUX ceph-16.2.2-cflags.patch 540 BLAKE2B d7f7ce9e65d59b7a9594f4cd34091df8b496d03 AUX ceph-16.2.2-system-zstd.patch 1501 BLAKE2B 6540822407802dacb43c4fd9c432b45ec747a77d6892f2193fe55cb09da90b035d7630bdf5f9ec6f49df5e351c1d38c96cd14e9ed180bee897f11413ba53ed64 SHA512 5e21e29b30ee67411e3631fa65d0dc8a7b232e582c995049b4e89ea709e87a42edbf5cd4bbe535e62aebb7c9509a85b92c62e0f9914b2d4ee197994e2665139a AUX ceph-16.2.7-string-includes.patch 670 BLAKE2B 308a1434afc6c81def5b7ef43cfb6f1bd37b5b46c5a2591c0615b941cf80cb4814c090edb6805545c333355b4dcf55991bd2459572cd16e6b2d393f1fffe2c00 SHA512 c6e0d35aa2f6a8cb4c63b7cd7baa4909e0becd0ff09f7bb712fa53c62e3f5a26c0352066c1f4fe5186a69faccc8d902bf83fea7f2df0f5324d98cc90e546d627 AUX ceph-16.2.8-no-virtualenvs.patch 3650 BLAKE2B 3c350e1ff171ec40443bcb2e8b844192bf07d8cc84181b9c20b11bfd8785e7bbf029ee9a6abc1d52655618417769b7f32d3e758cc9456f38e7ea918499bd9ab5 SHA512 f82210448617f448205b8a51fc286fc88c149ec65eb23b4ea439e5e69ad07d30d9fb254e2ffac13b2d18c7be8a0d69110c089ff22a301ee0fe92357fcfde9c25 +AUX ceph-16.2.9-python310.patch 446 BLAKE2B 8aa2d8081083b3cc118363bc4fe16dd232d019ff6673370d400f15ed90177089eea54f16c102b6bbd83cde4773622f01b76e00f3b287f5e9f9fc06ffd1054542 SHA512 397732bbe52b5e55d08045ccdacdb2c455f8cc935dac9da269a3559e7a479453f6346e229571a7b7186f5d1f197d525bb5492c922d72b11eca8850839c09946a AUX ceph-17.2.0-cyclic-deps.patch 2202 BLAKE2B 14bfdada20b4d1a27308c42c4cadfe11060ccb6f8e2d84a744bd94b08f03fc810f53f2d7fdfdbd646c5d3c649ac7b64a32517d05169bd157ed0725c0fa722b43 SHA512 e1ef790fc62f03b2edb8a069b50848923f0b01b64777f0641cc76dfd7129a42b2d5eb5d778cd6e730e917ad90a325a6f51e4b1e3534a9231bfffefe488167e1d AUX ceph-17.2.0-deprecated-boost.patch 2451 BLAKE2B 8fcf2f55a80840ef2452c45ea964aa375f1972dc441dcd5cdf4bcda9c4b69e179d98bfe0959be40994263823e715d0c8b1631e30cdb2d75144400543b07a3281 SHA512 505bb4e50ccc9d8fc7f1540950eaf59984204966b3faa60301034b80ee8f85ca1f45998ae99a8b960a288feac32bfd780e87db94839379c6b6343fc081a515ef AUX ceph-17.2.0-findre2.patch 709 BLAKE2B b7b044e71206ada569fd64242256c85932ca3dc34d5be4520ce0d420838045ca26c5a7c8212762af217adf245b18197c1aa4f0bf69e8d80c3c330b0d40bccbb4 SHA512 990d70f656bb8a3a9904c7235a48622e0a2bbdf3b751b4bd8603b2078d549a7b6dcbdf204a88512c525c2a95dbaa0ac792aafa5cf565faf91a4417923e7ae57b @@ -31,6 +32,7 @@ AUX ceph-17.2.0-osd_class_dir.patch 486 BLAKE2B 7d9e144ab40e5e2f73a1412a65b27ffd AUX ceph-17.2.0-pybind-boost-1.74.patch 845 BLAKE2B b862b1abf61c0f5cc17964c86073a083b217f01ca5ae725bfe07ba13702e2d835bf8ccc4b5fae4b3138230b36722f4de0c8176811d6eefc1523e1fcb4848b744 SHA512 525b5df44f0de71ab0b2024c8bc0ccf98740a0befac4b032ae9a0fb6e2a05926d7171ae4b0af4ba32e71c9e04fe90aa192a2e3ae433242a62fa4e4efdc855321 AUX ceph-17.2.0-system-opentelemetry.patch 705 BLAKE2B 0036ad8e7d2d8a707db5ea137cb47e9cb18d8e4d8923d3c8dc1306adca24fb30c029e03d76a281219ce34928b5ed6448aba4a98b2286a942eda2cf86fb0e5365 SHA512 d845ae2b9d31604d622dfb2993186ca1b3e37d3a5e88df8b4747c45b0f1913f4e092a5b0a2405ab228a57e6717bdf51c5458c66eab601eabdece4524085840e3 AUX ceph-17.2.1-no-virtualenvs.patch 2780 BLAKE2B c1a752893800344a89321c76763268453de3fb275a7e952bdd81c6356d3e5aec48fb8623025c5d4fb7b0281b7d31272c145ef7d921c42c41d858f46105301eec SHA512 53bb81846633e6ff480d46c777b46bf6af2dd07817c84413c772836d7815e5a38c7b61c903af32434896041617175afaaeea6f5618ef5fbec0ad9afd7d7aa8f6 +AUX ceph-17.2.1-python310.patch 1230 BLAKE2B c4a0b66aad00ac1ada6abe3c135c503f97dfbb203633ee0f753d0370bcb8f048c42ff91ccaf6bcde41fb3db6ff0346ff8e99735426c0a65c2dc6effee4019f4d SHA512 f49427d3420574043e18cad517a6f81ee38a48b827195f564fd728fd2f2b32dbf17f9e21842b01bbf3ab40875c70b0db316a478b8cc48dd92c839d2ce5e7fd63 AUX ceph-mds_at.service 282 BLAKE2B 3a51e5d5e0490c021282a37961824d650891c2d84c077c6479a9ee733f8a16fbe65cf204aa74e30ddd24dc01f32740037a6bd137a40464d57e1afeba5a49f893 SHA512 3a37e187f925e1a5fb672ac90937f544f3b98ed5a30b6a6b931a600f9d6a245373085ed61b40e0c64b30dbfac51dd99cbeaeb7538b5f23953bc0dde1df94742d AUX ceph-mds_at.service.conf 115 BLAKE2B aaaa28074bf47ee98272337b536e6ca89dbbbb0443d7774c38f62da4b210a5b2ffbb53fa2b7f20dffbee08206a0868e33d381a89b613a25b88f897dd32753fd5 SHA512 e0b51882ec864271a6468141fdd185e24cafcd677f312a7658880a30c00fd58d9043b2651548ab23bd01e54be248a1e8c03545a8fda0b699ca051de7ceb925d8 AUX ceph-osd_at.service 362 BLAKE2B 7ccbf3428d687d1dfc3a8e10d56083802bba621d7cc9b965b55677e7ae8ce19bd178d31be687e47ed4ae21eef017c8913339cb465822ceadecd2e90cf84d692d SHA512 99c932fa99679a26b288ad57ca725a50847199915368a07ae1bb589ca777cd6e6a68e84f4d506a1097a06ace06eede176ea573e694bcbe43b434381116d63300 @@ -50,6 +52,6 @@ DIST ceph-16.2.9.tar.gz 157168096 BLAKE2B 0a667a9699925cfc920ca0cc535e5331cbcd95 DIST ceph-17.2.1.tar.gz 168819036 BLAKE2B 2d6506f3a43ccbe4a149163c13ab2de72aeba568308ca7c0c59d0ff32316519d27b334451fd8d78af799cabe3b5a8c5b7b19d5da028e52c420ec7fc38efe5aad SHA512 cb88a3feff67ce41c575cb6c0067a32de51fcbf36d8f9f7273cccd54a3413ee890f473e83fcc1429a86b858b05c412fca8b2cfc24871c5adf612e3d224227cf0 DIST ceph-xsimd-17.2.1.tar.gz 173025 BLAKE2B 54679c24804c195ae55b9f49589e331dde92c6d89aaa20e827539e9a4e0010c7549cdd5cf02a7ebed83f953ab2a6f1d9cc9a98cf45c3dc7758ae4938c9c43713 SHA512 ecc58e7909648aaa22aefbf76ee2c5a2bece4b1b88da9c7eda1b69a46247e619ff99c4366afd6015f95debd68c1a6b89292c677b9049462d0fc0255fbc0c2a33 EBUILD ceph-15.2.16.ebuild 10917 BLAKE2B c1b135b0cbdb9f390248ec861e9c196095cec4011f934fa859c39475483d815c6f369bf88e7d8ca21690f500e372d9707ae00084d3dcbdffc72e7e928c55a07e SHA512 281d6915a55ebe16619549f9bdee35ff4af0ffc68ef1360ec2c132a03a57d4361e7216f9b663486ebd77512aa563bdeb70d30e3feb8cd8e1c3a21c7a21277a43 -EBUILD ceph-16.2.9.ebuild 12557 BLAKE2B dbdbfd4664e51b2e86f8034aac15fa46601c0d557bc20e5218b93aef23df80eff2a0b493252f9a3610cec41c7867c0ac91fcc9e7dcb0d38e3a7dbafeb9e18c80 SHA512 7b9f961015974b443b1f85603acb4088928068636d213d3e5cf25ff0341446be0f3806154a4697c2eef6920802cded2bbad5ab93d02d31e1c6bea4f6d38bf343 -EBUILD ceph-17.2.1.ebuild 12384 BLAKE2B fa5768b7dcfb46797065335cf87bfe9e4f553a404bbdf58bf0695b968c54d7f11435c9db1005eaa75ba614512c453f82349010c0bb87185254eefcfb6c962a08 SHA512 2c6ab3c69d8d08a77ff5a71e577d4c9f4cd642bed041fca1528f360ba21104e2e4426caa02ecaccc9ce64b5e997245e731bd64ec52372ee5d9b130f73d92caf5 +EBUILD ceph-16.2.9-r1.ebuild 12603 BLAKE2B bed9f1ffc126209a8ffdb7186eeabfed222e19c6db4ffc2189e4c65338accfb3c86d3134b0adc9350ef186ee0897092b5ffffa4140b785f6dee6de17ab07a91e SHA512 b5efc7e701b0784c4f4299ffabc01ff7a3ddc73ca16f36d1fd16e7e2562d78f89e11b960f9eacec697d9e788841d73e73d17554a7a916ab09cbe1a7cfc20557f +EBUILD ceph-17.2.1-r1.ebuild 12449 BLAKE2B 73eac41797937b4a255ea299a17b5adcc6d1afdcdfa9a283ad9cc7bf87b65fe503f4dd17595774979d0ff1652bb739493fbc6ebdad8caa07714e4f6665f53632 SHA512 792d0c808cff8b4c1b329a190a44a830b48504387772df0c994380304d1d39fafe479d5181a5168972672ce930725f48b52a5f51803a0b6b495d5b7800184d2f MISC metadata.xml 2453 BLAKE2B 988cbe4fa5176fde46a503932a58555554e577a311180df706021ea67a8c861b82fbc476cc757c090ea4e753b519212a2cca8c0605921c4e121b770fd1cc61ea SHA512 14c25df4749cd86f82782f8e7cda587a0310e4cf28b6d4f8ac1fa4abee532d6d553f35fcfb8ab0393ce876d36a8fe2851408ad5eaaf5cf28834f03cf744ac6c1 diff --git a/sys-cluster/ceph/ceph-16.2.9-r1.ebuild b/sys-cluster/ceph/ceph-16.2.9-r1.ebuild new file mode 100644 index 000000000000..880937c7a706 --- /dev/null +++ b/sys-cluster/ceph/ceph-16.2.9-r1.ebuild @@ -0,0 +1,473 @@ +# Copyright 1999-2022 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 =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-1.72:=[threads(+),context,python,${PYTHON_USEDEP}] ) + !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/sed + 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[-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/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}] + ) +" +# diskprediction needs older scipy not compatible with py38 +# bug #724438 +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_10 + || ( + python_targets_python3_8 + python_targets_python3_9 + ) + ) +" + +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" +) + +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/${PN}/stat + + fowners -R ceph:ceph /var/log/ceph + + newinitd "${FILESDIR}/rbdmap.initd-r1" rbdmap + newinitd "${FILESDIR}/${PN}.initd-r12" ${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 +} diff --git a/sys-cluster/ceph/ceph-16.2.9.ebuild b/sys-cluster/ceph/ceph-16.2.9.ebuild deleted file mode 100644 index 688c98bb2b8f..000000000000 --- a/sys-cluster/ceph/ceph-16.2.9.ebuild +++ /dev/null @@ -1,472 +0,0 @@ -# Copyright 1999-2022 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 =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-1.72:=[threads(+),context,python,${PYTHON_USEDEP}] ) - !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/sed - 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[-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/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}] - ) -" -# diskprediction needs older scipy not compatible with py38 -# bug #724438 -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_10 - || ( - python_targets_python3_8 - python_targets_python3_9 - ) - ) -" - -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" -) - -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/${PN}/stat - - fowners -R ceph:ceph /var/log/ceph - - newinitd "${FILESDIR}/rbdmap.initd-r1" rbdmap - newinitd "${FILESDIR}/${PN}.initd-r12" ${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 -} diff --git a/sys-cluster/ceph/ceph-17.2.1-r1.ebuild b/sys-cluster/ceph/ceph-17.2.1-r1.ebuild new file mode 100644 index 000000000000..8a67048c3455 --- /dev/null +++ b/sys-cluster/ceph/ceph-17.2.1-r1.ebuild @@ -0,0 +1,459 @@ +# Copyright 1999-2022 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 =dev-libs/libfmt-6.2.1:= + =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:= ) + 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-1.72:=[threads(+),context,python,${PYTHON_USEDEP}] ) + 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/sed + 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[-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/routes[${PYTHON_USEDEP}] + diskprediction? ( + >=dev-python/scipy-1.4.0[${PYTHON_USEDEP}] + ) + sci-libs/scikit-learn[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + ) +" +# diskprediction needs older scipy not compatible with py38 +# bug #724438 +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.1-python310.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 + + # 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 + ) + 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 + + 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-r1" rbdmap + newinitd "${FILESDIR}/${PN}.initd-r12" ${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 +} diff --git a/sys-cluster/ceph/ceph-17.2.1.ebuild b/sys-cluster/ceph/ceph-17.2.1.ebuild deleted file mode 100644 index 4b5281e5f669..000000000000 --- a/sys-cluster/ceph/ceph-17.2.1.ebuild +++ /dev/null @@ -1,457 +0,0 @@ -# Copyright 1999-2022 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 =dev-libs/libfmt-6.2.1:= - dev-libs/libnl:3= - dev-libs/libxml2:= - dev-libs/libevent:= - dev-libs/libutf8proc:= - dev-libs/openssl:= - =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:= ) - 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-1.72:=[threads(+),context,python,${PYTHON_USEDEP}] ) - 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/sed - 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[-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/routes[${PYTHON_USEDEP}] - diskprediction? ( - >=dev-python/scipy-1.4.0[${PYTHON_USEDEP}] - ) - sci-libs/scikit-learn[${PYTHON_USEDEP}] - dev-python/six[${PYTHON_USEDEP}] - ) -" -# diskprediction needs older scipy not compatible with py38 -# bug #724438 -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" -) - -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 - - # 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 - ) - 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 - - 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-r1" rbdmap - newinitd "${FILESDIR}/${PN}.initd-r12" ${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 -} diff --git a/sys-cluster/ceph/files/ceph-16.2.9-python310.patch b/sys-cluster/ceph/files/ceph-16.2.9-python310.patch new file mode 100644 index 000000000000..403cfe2f3d1d --- /dev/null +++ b/sys-cluster/ceph/files/ceph-16.2.9-python310.patch @@ -0,0 +1,12 @@ +diff --git a/src/mgr/CMakeLists.txt b/src/mgr/CMakeLists.txt +index 38aad299ccb..8e152e060ea 100644 +--- a/src/mgr/CMakeLists.txt ++++ b/src/mgr/CMakeLists.txt +@@ -34,6 +34,7 @@ if(WITH_MGR) + mgr_commands.cc + $) + add_executable(ceph-mgr ${mgr_srcs}) ++ target_compile_definitions(ceph-mgr PRIVATE PY_SSIZE_T_CLEAN) + target_link_libraries(ceph-mgr + osdc client heap_profiler + global-static ceph-common diff --git a/sys-cluster/ceph/files/ceph-17.2.1-python310.patch b/sys-cluster/ceph/files/ceph-17.2.1-python310.patch new file mode 100644 index 000000000000..767cd2922a26 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.1-python310.patch @@ -0,0 +1,35 @@ +From 389054888f2aa782f73564125ec7a1ef0212d536 Mon Sep 17 00:00:00 2001 +From: Pete Zaitcev +Date: Tue, 14 Dec 2021 23:04:34 -0600 +Subject: [PATCH] mgr: Define PY_SSIZE_T_CLEAN ahead of every Python.h + +Building on Fedora 35 with Python 3.10 makes vstart to loop +forever, throwing the following message: + + Error EINVAL: SystemError: PY_SSIZE_T_CLEAN macro must be + defined for '#' formats + +I followed the hint in the following document: + https://docs.python.org/3/c-api/intro.html + +It says "recommended" to always define PY_SSIZE_T_CLEAN, +but as you can see it is actually required in our case. + +Fixes: https://tracker.ceph.com/issues/53441 +Signed-off-by: Pete Zaitcev +--- + src/mgr/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/mgr/CMakeLists.txt b/src/mgr/CMakeLists.txt +index 55147af4fc6ba..8f39e41ac0694 100644 +--- a/src/mgr/CMakeLists.txt ++++ b/src/mgr/CMakeLists.txt +@@ -33,6 +33,7 @@ if(WITH_MGR) + mgr_commands.cc + $) + add_executable(ceph-mgr ${mgr_srcs}) ++ target_compile_definitions(ceph-mgr PRIVATE PY_SSIZE_T_CLEAN) + if(WITH_LIBCEPHSQLITE) + target_link_libraries(ceph-mgr cephsqlite SQLite3::SQLite3) + endif() -- cgit v1.2.3