From 12de738b83927a4b71c3ad067edbb6279d15b368 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 9 May 2023 23:42:15 +0100 Subject: gentoo auto-resync : 09:05:2023 - 23:42:14 --- sys-cluster/ceph/Manifest | 5 +- sys-cluster/ceph/ceph-17.2.5-r4.ebuild | 480 --------------------------------- sys-cluster/ceph/ceph-17.2.5-r6.ebuild | 480 +++++++++++++++++++++++++++++++++ sys-cluster/ceph/ceph-17.2.6-r1.ebuild | 480 --------------------------------- sys-cluster/ceph/ceph-17.2.6-r2.ebuild | 480 +++++++++++++++++++++++++++++++++ sys-cluster/ceph/files/ceph.initd-r14 | 119 ++++++++ 6 files changed, 1082 insertions(+), 962 deletions(-) delete mode 100644 sys-cluster/ceph/ceph-17.2.5-r4.ebuild create mode 100644 sys-cluster/ceph/ceph-17.2.5-r6.ebuild delete mode 100644 sys-cluster/ceph/ceph-17.2.6-r1.ebuild create mode 100644 sys-cluster/ceph/ceph-17.2.6-r2.ebuild create mode 100644 sys-cluster/ceph/files/ceph.initd-r14 (limited to 'sys-cluster/ceph') diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest index dd323f6b0eac..fae756a085a5 100644 --- a/sys-cluster/ceph/Manifest +++ b/sys-cluster/ceph/Manifest @@ -39,6 +39,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-r13 3106 BLAKE2B 5ff61b3aae02888f67a86a92f11572957a25ce868587b0f720d19dea30e4ff9c04d1e0ae5ef36e83865f098eeea0d3291d404b4ff91a569c8f30e1258bd3c614 SHA512 9b27141b49a96fd18145a18f97748158bb49b73987cbe33758f183dad2d7aadfa6e5249e714188f593d382d7dfe1807f3b14ebdf6273400260f09378c5958e78 +AUX ceph.initd-r14 3150 BLAKE2B 755b7f686f0d11057f03c7de204bfca1d1fb00ef4fad44966973412a6801bc0d121bcd42492883a5b9a4f3e947b9fbf569c5a20c977e7e8e29a7b56f320ed64e SHA512 11ec19c1b114525aad0b6220d6f750c1e0c4500754bfdf7e71ffeee02007d0a353f733ec3a7c307a52fae983c1b087445d54f75d53a702becf3f58bc1279b023 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 @@ -49,6 +50,6 @@ DIST ceph-17.2.6.tar.gz 168093221 BLAKE2B f79efce9bd7f485b43ae1b4da94a1d9fb37530 DIST ceph-xsimd-17.2.5.tar.gz 173025 BLAKE2B 54679c24804c195ae55b9f49589e331dde92c6d89aaa20e827539e9a4e0010c7549cdd5cf02a7ebed83f953ab2a6f1d9cc9a98cf45c3dc7758ae4938c9c43713 SHA512 ecc58e7909648aaa22aefbf76ee2c5a2bece4b1b88da9c7eda1b69a46247e619ff99c4366afd6015f95debd68c1a6b89292c677b9049462d0fc0255fbc0c2a33 DIST ceph-xsimd-17.2.6.tar.gz 173025 BLAKE2B 54679c24804c195ae55b9f49589e331dde92c6d89aaa20e827539e9a4e0010c7549cdd5cf02a7ebed83f953ab2a6f1d9cc9a98cf45c3dc7758ae4938c9c43713 SHA512 ecc58e7909648aaa22aefbf76ee2c5a2bece4b1b88da9c7eda1b69a46247e619ff99c4366afd6015f95debd68c1a6b89292c677b9049462d0fc0255fbc0c2a33 EBUILD ceph-16.2.12.ebuild 12480 BLAKE2B a14d5c48386b24478b63b7447235d0505a6209f9ee086095ce78cc8a88d0df40731b046571af7146dbcd5081f3457b1a1efe33e1832a435085bbfde8f8725bd7 SHA512 5195708ca6c495a389c14991e129422f473f3467999c07fc2611a0424478ed006fa0bf5d8996ec17802146ad366c72763f9c62b02ed0e75b98818eb33f62dda5 -EBUILD ceph-17.2.5-r4.ebuild 13085 BLAKE2B 3d7e3a91c5f5db1122f21520744bded89aac8dce5158b007d4796e8224f0a2189b6eb052ccdb7e94587561a829f3b907ee099671f9b16f91d980b9043b9e0c40 SHA512 6fad933cbd232060ecec443a66eaaf54c220caac4e780aab7c2b56b8e944f88f5e88f61911d7a2c40bb0768caa4f12fc06685db18c4d1d4dc5f04aa447ef8114 -EBUILD ceph-17.2.6-r1.ebuild 13094 BLAKE2B 2bfc6f4a446dff96904aa6e428620d9c56ad3fc01c888d13c071a5885dde1017b616592c37871f234e16f35e18bfd44880cd605f6793a1b72cc265b9e8614882 SHA512 361c93262a12ab38b1f81b781473f65d683c62b458be379f10899575fd20342a7efd7e2f80831ff2925fc1593676f5897d06f5409a612e591bbb28c5a94a8720 +EBUILD ceph-17.2.5-r6.ebuild 13085 BLAKE2B 7c537acc8ad2a8b8b870b75c097c55a5b42f0fd0273d212092d0ac96e9ba783db89b62372edd1cafb65ab449803753abb68c82da00bc49337d5a2cc9500718f8 SHA512 bfb52a492f873c986834b02d9804981389377d7df51d25103fed1adeb92956d2a81508fcc25f72e4c0eeda81a2af37265120d546e6f8dcca54814fd0367e469b +EBUILD ceph-17.2.6-r2.ebuild 13094 BLAKE2B 9a85e922be0a649fe63723b7621abeacb9148da733c1f0d7b076d96fca1672f2a0742cccf01101d5331d730e23d2b29c41a704fc877329ec7076cea398b2cc15 SHA512 2f5385a1373ad6e4383e69e6c2598ec28e45811b839d3ba1a248b9f8ac9f62b4c17e61ef0c6eec6b4c272be46c8be17d23dd85e9198ec9f12f630ce98876a800 MISC metadata.xml 2504 BLAKE2B df35722094ef7fbc1ecd16d3784e8589958a8d4e2f915e84f41e6ce5191256697a73eb9d3d658089afaaa82a5b23bdf7097870a15e43029d2598bb1792a4b571 SHA512 b0c03c35876eccf78360914237fdef8925963b21f78fd8516e8506150cce36a901562e33e6fab102dd5a4e727f9a4422eb136e5b64d46b9538fb4450b3467b2b diff --git a/sys-cluster/ceph/ceph-17.2.5-r4.ebuild b/sys-cluster/ceph/ceph-17.2.5-r4.ebuild deleted file mode 100644 index e4046b3b5701..000000000000 --- a/sys-cluster/ceph/ceph-17.2.5-r4.ebuild +++ /dev/null @@ -1,480 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{9..11} ) -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 - -XSIMD_HASH="aeec9c872c8b475dedd7781336710f2dd2666cb2" -SRC_URI=" - https://download.ceph.com/tarballs/${P}.tar.gz - parquet? ( https://github.com/xtensor-stack/xsimd/archive/${XSIMD_HASH}.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/libaio:= - >=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-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-gcc13-deux.patch" - "${FILESDIR}/ceph-17.2.5-boost-1.81.patch" - # https://bugs.gentoo.org/901403 - "${FILESDIR}/ceph-17.2.5-link-boost-context.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/ceph-17.2.5-r6.ebuild b/sys-cluster/ceph/ceph-17.2.5-r6.ebuild new file mode 100644 index 000000000000..95be155b4526 --- /dev/null +++ b/sys-cluster/ceph/ceph-17.2.5-r6.ebuild @@ -0,0 +1,480 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +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 + +XSIMD_HASH="aeec9c872c8b475dedd7781336710f2dd2666cb2" +SRC_URI=" + https://download.ceph.com/tarballs/${P}.tar.gz + parquet? ( https://github.com/xtensor-stack/xsimd/archive/${XSIMD_HASH}.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/libaio:= + >=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-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-gcc13-deux.patch" + "${FILESDIR}/ceph-17.2.5-boost-1.81.patch" + # https://bugs.gentoo.org/901403 + "${FILESDIR}/ceph-17.2.5-link-boost-context.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-r14" ${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/ceph-17.2.6-r1.ebuild b/sys-cluster/ceph/ceph-17.2.6-r1.ebuild deleted file mode 100644 index 90bd3470f2ff..000000000000 --- a/sys-cluster/ceph/ceph-17.2.6-r1.ebuild +++ /dev/null @@ -1,480 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{9..11} ) -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 - -XSIMD_HASH="aeec9c872c8b475dedd7781336710f2dd2666cb2" -SRC_URI=" - https://download.ceph.com/tarballs/${P}.tar.gz - parquet? ( https://github.com/xtensor-stack/xsimd/archive/${XSIMD_HASH}.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/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-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-deux.patch" - "${FILESDIR}/ceph-17.2.5-boost-1.81.patch" - # https://bugs.gentoo.org/901403 - "${FILESDIR}/ceph-17.2.6-link-boost-context.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/ceph-17.2.6-r2.ebuild b/sys-cluster/ceph/ceph-17.2.6-r2.ebuild new file mode 100644 index 000000000000..a28df53b6173 --- /dev/null +++ b/sys-cluster/ceph/ceph-17.2.6-r2.ebuild @@ -0,0 +1,480 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +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 + +XSIMD_HASH="aeec9c872c8b475dedd7781336710f2dd2666cb2" +SRC_URI=" + https://download.ceph.com/tarballs/${P}.tar.gz + parquet? ( https://github.com/xtensor-stack/xsimd/archive/${XSIMD_HASH}.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/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-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-deux.patch" + "${FILESDIR}/ceph-17.2.5-boost-1.81.patch" + # https://bugs.gentoo.org/901403 + "${FILESDIR}/ceph-17.2.6-link-boost-context.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-r14" ${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-r14 b/sys-cluster/ceph/files/ceph.initd-r14 new file mode 100644 index 000000000000..04002703d9e7 --- /dev/null +++ b/sys-cluster/ceph/files/ceph.initd-r14 @@ -0,0 +1,119 @@ +#!/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 ]; then + command="/usr/bin/radosgw" + + if [ "${RADOSGW_WANT_NAME_PARAM}" = y ]; then + command_args="${command_args} --name client.${daemon_id}" + fi + 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: -- cgit v1.2.3