diff options
Diffstat (limited to 'sys-cluster/ceph')
38 files changed, 1832 insertions, 1006 deletions
diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest index 85706e051c7c..7359f5913f9f 100644 --- a/sys-cluster/ceph/Manifest +++ b/sys-cluster/ceph/Manifest @@ -1,5 +1,8 @@ -DIST ceph-15.2.17.tar.gz 148640102 BLAKE2B a10dd702ffca005a8741bff645eaf2f671300be969edf9e9e321e29abdc34a403de7c56684fd1509d30c2bd32b996fff3aaa88d1d08c3d258d6f5ef43ecefddf SHA512 952cd4db057fcab5efa3c6331fbc19cf1e904f5855266c2ed13e41ffb2e5a7d18ed133bd113fea493149005a182f429eef39931c4ceac7776aefe84a208a745a -DIST ceph-16.2.10.tar.gz 157176743 BLAKE2B 065b6f1941f87fde150ab22ba45aa9f58069acf7f33a483456faf0a26e41936846944e800ccd7f99bd8863db8438ae70804621522f75065c0b2506522c4fdd7d SHA512 ae164c24462c3e08763d202acc3e2fe86ffc09f312b5059bae07863e804fc47bd158fc130aa2923246ffcfe26ae6d6d9317326aec96373226e6f9030d7123c8b -DIST ceph-16.2.9.tar.gz 157168096 BLAKE2B 0a667a9699925cfc920ca0cc535e5331cbcd95997fb0b9816a4d84c8add454b6b17813018bc1d1de07c802167ef50aa528704b10b01f42759189392ccdb5088f SHA512 bf369038ad6383f88abbed267f0239e9d8a1d33b46b34ed260aeeb1fda1b374cb6e658238e1ace013fbbb68e73b8cd2922b7def318d7a110e5f4560eeae8fca3 -DIST ceph-17.2.3.tar.gz 168821857 BLAKE2B 21ec5ac33591ae8b22eae3d88680ae87340e639cc21cb9c79bc4fb2f7b6cc7e93aa6b5af0242a6c094a4af9808a2b6f86b6bd7e3c8f247a513c91defa6d4e4a9 SHA512 fd6e057ba8440f69423e870dddb2705d68015089ff8d97356bdc359c2ab41e19351fb1c914330de6ba05180f48e328e3ea4c877e9dd80be049e2ec5895068595 -DIST ceph-xsimd-17.2.3.tar.gz 173025 BLAKE2B 54679c24804c195ae55b9f49589e331dde92c6d89aaa20e827539e9a4e0010c7549cdd5cf02a7ebed83f953ab2a6f1d9cc9a98cf45c3dc7758ae4938c9c43713 SHA512 ecc58e7909648aaa22aefbf76ee2c5a2bece4b1b88da9c7eda1b69a46247e619ff99c4366afd6015f95debd68c1a6b89292c677b9049462d0fc0255fbc0c2a33 +DIST ceph-16.2.14.tar.gz 157243362 BLAKE2B 799132ebc815380b2040250915c82c5752983a23e2489e7c12e624b70a93b29c151cb1ab9670e43f2c89d75523655e57860dcdc797d455abc6c6ddc3c880c70c SHA512 397845f44d94e01ae49c5f4dabd75b8bf20c9ece9aeba85f4a5c12154335420cce390bfd94146be3bef763d44e47d15522a84b4f6cdc6bdde77982ac8bd79a54 +DIST ceph-16.2.15.tar.gz 157260936 BLAKE2B 4de2e35c870ca005bf86f8158709d021785ec592ac316eb1073c259dba8ee9e89f63f70bc90c4a26fe5ba08e523df5722e613be346b599392ca3d8215addd730 SHA512 f12f745f55f4e5e4b41de53df638d7fee68054767ed2ec8e7c53d1c74988d18d4673465496c0fbdcf61cf29f62723d4d166dbf8550e2587ea14b30fae444c97a +DIST ceph-17.2.6.tar.gz 168093221 BLAKE2B f79efce9bd7f485b43ae1b4da94a1d9fb3753003f34535e93c80e480ffeaaf054d371f75bca72402da5f9dd460aafa820bb2af550d213bdbcca74aa939180431 SHA512 dca9aea2ce210c15fcc34cb06a5dc5b4488ffa36d684166d47ebd87e48b54b6fee0882e1c67007a780e1c25754e9bc6e760cc10f60ea1183263f8504ef2dbd9b +DIST ceph-17.2.7.tar.gz 168577111 BLAKE2B e3470819305e580b4afc658564b9ac261d1db53242acc5d5ec6bf6166024394de927b745b7a752e010fdc020a3829ca5e7d3ac27a99cf60f45876f12fef1c927 SHA512 9005de7661c6a9d1054f1388cff2f48eb1af93565ebf852669de546eed594ed6a2668944b25a64c406d00f88bd2f7a6eac2ae96b04789c03ea4d248d1a683e7b +DIST ceph-18.2.1.tar.gz 197490056 BLAKE2B bcb66957a4e9502fda268aea09550ecc3775c83c2b4780a338364fd13b553164cae4c66dc69e64fb5df345d89161fe9d72ec42d9aa38eada0f77970b4125dc3c SHA512 88e1c18bc6c824b6203cf026cca4c9409000e7cf5b2b986e22ab74d2790d8b93d91556bd3af15a320dbdd0cf2302308f0b2c75fd1243bc5a65f76fc6b3d70736 +DIST ceph-xsimd-17.2.6.tar.gz 173025 BLAKE2B 54679c24804c195ae55b9f49589e331dde92c6d89aaa20e827539e9a4e0010c7549cdd5cf02a7ebed83f953ab2a6f1d9cc9a98cf45c3dc7758ae4938c9c43713 SHA512 ecc58e7909648aaa22aefbf76ee2c5a2bece4b1b88da9c7eda1b69a46247e619ff99c4366afd6015f95debd68c1a6b89292c677b9049462d0fc0255fbc0c2a33 +DIST ceph-xsimd-17.2.7.tar.gz 173025 BLAKE2B 54679c24804c195ae55b9f49589e331dde92c6d89aaa20e827539e9a4e0010c7549cdd5cf02a7ebed83f953ab2a6f1d9cc9a98cf45c3dc7758ae4938c9c43713 SHA512 ecc58e7909648aaa22aefbf76ee2c5a2bece4b1b88da9c7eda1b69a46247e619ff99c4366afd6015f95debd68c1a6b89292c677b9049462d0fc0255fbc0c2a33 +DIST ceph-xsimd-18.2.1.tar.gz 173025 BLAKE2B 54679c24804c195ae55b9f49589e331dde92c6d89aaa20e827539e9a4e0010c7549cdd5cf02a7ebed83f953ab2a6f1d9cc9a98cf45c3dc7758ae4938c9c43713 SHA512 ecc58e7909648aaa22aefbf76ee2c5a2bece4b1b88da9c7eda1b69a46247e619ff99c4366afd6015f95debd68c1a6b89292c677b9049462d0fc0255fbc0c2a33 diff --git a/sys-cluster/ceph/ceph-15.2.17.ebuild b/sys-cluster/ceph/ceph-15.2.17.ebuild deleted file mode 100644 index d3e65042d29a..000000000000 --- a/sys-cluster/ceph/ceph-15.2.17.ebuild +++ /dev/null @@ -1,408 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -PYTHON_COMPAT=( python3_{8..9} ) -CMAKE_MAKEFILE_GENERATOR=emake - -DISTUTILS_OPTIONAL=1 - -inherit check-reqs bash-completion-r1 cmake distutils-r1 flag-o-matic \ - python-r1 udev readme.gentoo-r1 toolchain-funcs systemd tmpfiles \ - multiprocessing - -if [[ ${PV} == *9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/ceph/ceph.git" - SRC_URI="" -else - SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz" - KEYWORDS="" -fi - -DESCRIPTION="Ceph distributed filesystem" -HOMEPAGE="https://ceph.com/" - -LICENSE="Apache-2.0 LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ LGPL-2.1 LGPL-3 GPL-3 BSD Boost-1.0 MIT public-domain" -SLOT="0" - -CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3) - -IUSE="babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana jemalloc - kafka kerberos ldap lttng +mgr numa pmdk rabbitmq +radosgw rbd-rwl +ssl spdk - +system-boost systemd +tcmalloc test uring xfs zfs" -IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})" - -DEPEND=" - acct-group/ceph - acct-user/ceph - virtual/libudev:= - app-arch/bzip2:= - app-arch/lz4:= - app-arch/snappy:= - || ( >=app-arch/snappy-1.1.9-r1 <app-arch/snappy-1.1.9 ) - app-arch/zstd:= - app-shells/bash:0 - app-misc/jq:= - dev-libs/crypto++:= - dev-cpp/gflags:= - dev-libs/leveldb:=[snappy,tcmalloc(-)?] - dev-libs/libaio:= - dev-libs/libfmt:= - <dev-libs/libfmt-9:= - dev-libs/libnl:3= - dev-libs/libxml2:= - <dev-libs/rocksdb-6.15:= - dev-libs/xmlsec:=[openssl] - dev-cpp/yaml-cpp:= - dev-libs/nss:= - dev-libs/protobuf:= - net-dns/c-ares:= - net-libs/gnutls:= - sys-auth/oath-toolkit:= - sys-apps/coreutils - sys-apps/grep - sys-apps/hwloc:= - sys-apps/keyutils:= - sys-apps/util-linux:= - sys-apps/sed - sys-apps/util-linux - sys-libs/libcap-ng:= - sys-libs/ncurses:0= - sys-libs/zlib:= - sys-process/numactl:= - virtual/libcrypt:= - x11-libs/libpciaccess:= - babeltrace? ( dev-util/babeltrace ) - fuse? ( sys-fs/fuse:0= ) - jemalloc? ( dev-libs/jemalloc:= ) - !jemalloc? ( >=dev-util/google-perftools-2.6.1:= ) - kafka? ( dev-libs/librdkafka:= ) - kerberos? ( virtual/krb5 ) - ldap? ( net-nds/openldap:= ) - lttng? ( dev-util/lttng-ust:= ) - pmdk? ( dev-libs/pmdk:= ) - rabbitmq? ( net-libs/rabbitmq-c:= ) - radosgw? ( - dev-libs/expat:= - dev-libs/openssl:= - net-misc/curl:=[curl_ssl_openssl] - ) - rbd-rwl? ( dev-libs/pmdk:= ) - ssl? ( dev-libs/openssl:= ) - system-boost? ( >=dev-libs/boost-1.72:=[threads(+),context,python,${PYTHON_USEDEP}] ) - !system-boost? ( <sys-libs/glibc-2.34 ) - uring? ( sys-libs/liburing:= ) - xfs? ( sys-fs/xfsprogs:= ) - zfs? ( sys-fs/zfs:= ) -" -BDEPEND=" - ${PYTHON_DEPS} - amd64? ( dev-lang/yasm ) - x86? ( dev-lang/yasm ) - app-arch/cpio - >=dev-util/cmake-3.5.0 - dev-python/cython[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/sphinx - dev-util/cunit - dev-util/gperf - dev-util/ragel - dev-util/valgrind - sys-apps/coreutils - sys-apps/grep - sys-apps/sed - sys-apps/which - sys-devel/bc - sys-devel/patch - virtual/pkgconfig - test? ( - dev-python/coverage[${PYTHON_USEDEP}] - dev-python/virtualenv[${PYTHON_USEDEP}] - dev-python/requests-mock[${PYTHON_USEDEP}] - sys-apps/grep[pcre] - sys-fs/btrfs-progs - ) -" -RDEPEND="${DEPEND} - ${PYTHON_DEPS} - app-admin/sudo - net-misc/socat - sys-apps/gptfdisk - sys-apps/nvme-cli - >=sys-apps/smartmontools-7.0 - sys-block/parted - sys-fs/cryptsetup - sys-fs/lsscsi - sys-fs/lvm2[-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/setuptools[${PYTHON_USEDEP}] - dev-python/werkzeug[${PYTHON_USEDEP}] - mgr? ( - dev-python/jsonpatch[${PYTHON_USEDEP}] - dev-python/more-itertools[${PYTHON_USEDEP}] - dev-python/numpy[${PYTHON_USEDEP}] - dev-python/pyjwt[${PYTHON_USEDEP}] - dev-python/pyyaml[${PYTHON_USEDEP}] - dev-python/routes[${PYTHON_USEDEP}] - sci-libs/scikit-learn[${PYTHON_USEDEP}] - dev-python/six[${PYTHON_USEDEP}] - ) -" -# diskprediction needs older scipy not compatible with py38 -# bug #724438 -REQUIRED_USE=" - ${PYTHON_REQUIRED_USE} - ?? ( jemalloc tcmalloc ) - diskprediction? ( mgr !python_targets_python3_8 ) - kafka? ( radosgw ) - mgr? ( cephfs ) - rabbitmq? ( radosgw ) -" -RESTRICT="!test? ( test )" - -# the tests need root access -RESTRICT="test? ( userpriv )" - -# distribution tarball does not include everything needed for tests -RESTRICT+=" test" - -# create a non-debug release -CMAKE_BUILD_TYPE=RelWithDebInfo - -# false positives unless all USE flags are on -CMAKE_WARN_UNUSED_CLI=no - -PATCHES=( - "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch" - "${FILESDIR}/ceph-14.2.0-cflags.patch" - "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch" - "${FILESDIR}/ceph-13.2.0-cflags.patch" - "${FILESDIR}/ceph-15.2.15-no-virtualenvs.patch" - "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch" - "${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch" - "${FILESDIR}/ceph-14.2.0-cython-0.29.patch" - "${FILESDIR}/ceph-15.2.0-rocksdb-cmake.patch" - "${FILESDIR}/ceph-15.2.2-systemd-unit.patch" - "${FILESDIR}/ceph-15.2.3-spdk-compile.patch" - "${FILESDIR}/ceph-15.2.4-system-uring.patch" - "${FILESDIR}/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch" - "${FILESDIR}/ceph-15.2.15-snappy-1.1.9.patch" -) - -check-reqs_export_vars() { - CHECKREQS_DISK_BUILD="5400M" - CHECKREQS_DISK_USR="510M" - - export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR -} - -pkg_pretend() { - check-reqs_export_vars - check-reqs_pkg_pretend -} - -pkg_setup() { - python_setup - check-reqs_export_vars - check-reqs_pkg_setup -} - -src_prepare() { - cmake_src_prepare - - if use system-boost; then - find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \ - | xargs --null sed -r \ - -e 's|Boost::|boost_|g' \ - -e 's|Boost_|boost_|g' \ - -e 's|[Bb]oost_boost|boost_system|g' -i || die - fi - - sed -r -e "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \ - -i src/bash_completion/CMakeLists.txt || die - - sed -e "s:objdump -p:$(tc-getOBJDUMP) -p:" -i CMakeLists.txt || die - - if ! use diskprediction; then - rm -rf src/pybind/mgr/diskprediction_local || die - fi - - # remove tests that need root access - rm src/test/cli/ceph-authtool/cap*.t || die -} - -ceph_src_configure() { - local flag - local mycmakeargs=( - -DWITH_BABELTRACE=$(usex babeltrace) - -DWITH_BLUESTORE_PMEM=$(usex pmdk) - -DWITH_CEPHFS=$(usex cephfs) - -DWITH_CEPHFS_SHELL=$(usex cephfs) - -DWITH_DPDK=$(usex dpdk) - -DWITH_SPDK=$(usex spdk) - -DWITH_FUSE=$(usex fuse) - -DWITH_LTTNG=$(usex lttng) - -DWITH_GSSAPI=$(usex kerberos) - -DWITH_GRAFANA=$(usex grafana) - -DWITH_MGR=$(usex mgr) - -DWITH_MGR_DASHBOARD_FRONTEND=OFF - -DWITH_NUMA=$(usex numa) - -DWITH_OPENLDAP=$(usex ldap) - -DWITH_PYTHON3=3 - -DWITH_RADOSGW=$(usex radosgw) - -DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq) - -DWITH_RADOSGW_KAFKA_ENDPOINT=$(usex kafka) - -DWITH_RBD_RWL=$(usex rbd-rwl) - -DWITH_SSL=$(usex ssl) - -DWITH_SYSTEMD=$(usex systemd) - -DWITH_TESTS=$(usex test) - -DWITH_LIBURING=$(usex uring) - -DWITH_XFS=$(usex xfs) - -DWITH_ZFS=$(usex zfs) - -DENABLE_SHARED="ON" - -DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')") - -DWITH_SYSTEM_PMDK=$(usex pmdk 'YES' "$(usex rbd-rwl)") - -DWITH_SYSTEM_BOOST=$(usex system-boost) - -DBOOST_J=$(makeopts_jobs) - -DWITH_SYSTEM_ROCKSDB=ON - -DWITH_RDMA=OFF - -DWITH_TBB=OFF - -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir) - -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=$(systemd_get_systemunitdir) - -DEPYTHON_VERSION="${EPYTHON#python}" - -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}" - -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" - -Wno-dev - ) - if use amd64 || use x86; then - for flag in ${CPU_FLAGS_X86[@]}; do - mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")") - done - fi - - # needed for >=glibc-2.32 - has_version '>=sys-libs/glibc-2.32' && mycmakeargs+=(-DWITH_REENTRANT_STRSIGNAL:BOOL=ON) - - rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \ - || die "failed to remove cmake cache" - - cmake_src_configure - - # bug #630232 - sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \ - "${BUILD_DIR:-${S}}"/include/acconfig.h \ - || die "sed failed" -} - -src_configure() { - use custom-cflags || strip-flags - ceph_src_configure -} - -python_compile() { - local CMAKE_USE_DIR="${S}" - ceph_src_configure - - pushd "${BUILD_DIR}/src/pybind" >/dev/null || die - emake VERBOSE=1 clean - emake VERBOSE=1 all - - # python modules are only compiled with "make install" so we need to do this to - # prevent doing a bunch of compilation in src_install - DESTDIR="${T}" emake VERBOSE=1 install - popd >/dev/null || die -} - -src_compile() { - cmake_build VERBOSE=1 all - - # we have to do this here to prevent from building everything multiple times - python_copy_sources - python_foreach_impl python_compile -} - -src_test() { - make check || die "make check failed" -} - -python_install() { - local CMAKE_USE_DIR="${S}" - pushd "${BUILD_DIR}/src/pybind" >/dev/null || die - DESTDIR="${ED}" emake VERBOSE=1 install - popd >/dev/null || die - - python_optimize -} - -src_install() { - cmake_src_install - python_foreach_impl python_install - - find "${ED}" -name '*.la' -type f -delete || die - - exeinto /usr/$(get_libdir)/ceph - newexe "${BUILD_DIR}/bin/init-ceph" init-ceph - - insinto /etc/logrotate.d/ - newins "${FILESDIR}"/ceph.logrotate-r2 ${PN} - - keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat - - fowners -R ceph:ceph /var/log/ceph - - newinitd "${FILESDIR}/rbdmap.initd-r1" rbdmap - newinitd "${FILESDIR}/${PN}.initd-r12" ${PN} - newconfd "${FILESDIR}/${PN}.confd-r5" ${PN} - - insinto /etc/sysctl.d - newins "${FILESDIR}"/sysctld 90-${PN}.conf - - use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc - - # units aren't installed by the build system unless systemd is enabled - # so no point installing these with the USE flag disabled - if use systemd; then - systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \ - "ceph-mds@.service" - - systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \ - "ceph-osd@.service" - - fi - - udev_dorules udev/*.rules - newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf - - readme.gentoo_create_doc - - python_setup - - # bug #630232 - sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \ - || die "sed failed" - - python_fix_shebang "${ED}"/usr/{,s}bin/ - - # python_fix_shebang apparently is not idempotent - local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]' - grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \ - | xargs --null --no-run-if-empty -- sed -i -r "s:${shebang_regex}:\1:" || die - - local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* ) - dostrip -x "${rados_classes[@]#${ED}}" -} - -pkg_postinst() { - readme.gentoo_print_elog - tmpfiles_process ${PN}.conf -} diff --git a/sys-cluster/ceph/ceph-16.2.10.ebuild b/sys-cluster/ceph/ceph-16.2.14-r1.ebuild index 7100183dd1ba..cb1b5b7f9144 100644 --- a/sys-cluster/ceph/ceph-16.2.10.ebuild +++ b/sys-cluster/ceph/ceph-16.2.14-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{10..11} ) LUA_COMPAT=( lua5-3 ) CMAKE_MAKEFILE_GENERATOR=emake @@ -11,21 +11,20 @@ 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/" +SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz" 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" +KEYWORDS="~amd64 ~arm64 ~ppc64" 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 + +radosgw rbd-rwl rbd-ssd rdma rgw-lua selinux +ssl spdk +sqlite +system-boost systemd +tcmalloc test uring xfs zbd zfs " @@ -40,15 +39,13 @@ DEPEND=" app-arch/bzip2:= app-arch/lz4:= app-arch/snappy:= - || ( >=app-arch/snappy-1.1.9-r1 <app-arch/snappy-1.1.9 ) + >=app-arch/snappy-1.1.9-r1 app-arch/zstd:= app-shells/bash:0 app-misc/jq:= - dev-libs/crypto++:= dev-cpp/gflags:= <dev-libs/leveldb-1.23:=[snappy,tcmalloc(-)?] dev-libs/libaio:= - <dev-libs/libfmt-9:= dev-libs/libnl:3= dev-libs/libxml2:= dev-libs/libevent:= @@ -72,7 +69,7 @@ DEPEND=" sys-process/numactl:= virtual/libcrypt:= x11-libs/libpciaccess:= - babeltrace? ( dev-util/babeltrace ) + babeltrace? ( dev-util/babeltrace:0/1 ) fuse? ( sys-fs/fuse:3= ) jemalloc? ( dev-libs/jemalloc:= ) !jemalloc? ( >=dev-util/google-perftools-2.6.1:= ) @@ -92,35 +89,35 @@ DEPEND=" 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) ) + system-boost? ( dev-libs/boost:=[context,python,${PYTHON_USEDEP},zlib] ) + !system-boost? ( $(python_gen_impl_dep '' 3.{10..11}) ) uring? ( sys-libs/liburing:= ) xfs? ( sys-fs/xfsprogs:= ) zbd? ( sys-block/libzbd:= ) zfs? ( sys-fs/zfs:= ) " +# <cython-3: bug #907739 BDEPEND=" amd64? ( dev-lang/nasm ) x86? ( dev-lang/yasm ) - app-arch/cpio - >=dev-util/cmake-3.5.0 + app-alternatives/cpio + dev-debug/valgrind + >=dev-build/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 + app-alternatives/bc sys-devel/patch virtual/pkgconfig jaeger? ( - sys-devel/bison - sys-devel/flex + app-alternatives/yacc + app-alternatives/lex ) test? ( dev-util/cunit @@ -141,8 +138,8 @@ RDEPEND=" sys-block/parted sys-fs/cryptsetup sys-fs/lsscsi - sys-fs/lvm2[-device-mapper-only(-)] - virtual/awk + sys-fs/lvm2[lvm] + app-alternatives/awk dev-python/bcrypt[${PYTHON_USEDEP}] dev-python/cherrypy[${PYTHON_USEDEP}] dev-python/python-dateutil[${PYTHON_USEDEP}] @@ -163,12 +160,11 @@ RDEPEND=" diskprediction? ( >=dev-python/scipy-1.4.0[${PYTHON_USEDEP}] ) - sci-libs/scikit-learn[${PYTHON_USEDEP}] + dev-python/scikit-learn[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}] ) + selinux? ( sec-policy/selinux-ceph ) " -# diskprediction needs older scipy not compatible with py38 -# bug #724438 REQUIRED_USE=" ${PYTHON_REQUIRED_USE} ${LUA_REQUIRED_USE} @@ -180,10 +176,6 @@ REQUIRED_USE=" rabbitmq? ( radosgw ) !system-boost? ( python_targets_python3_10 - || ( - python_targets_python3_8 - python_targets_python3_9 - ) ) " @@ -215,9 +207,13 @@ PATCHES=( "${FILESDIR}/ceph-16.2.0-jaeger-system-boost.patch" "${FILESDIR}/ceph-16.2.0-liburing.patch" "${FILESDIR}/ceph-16.2.2-system-zstd.patch" - "${FILESDIR}/ceph-16.2.7-string-includes.patch" "${FILESDIR}/ceph-17.2.0-fuse3.patch" - "${FILESDIR}/ceph-16.2.9-python310.patch" + "${FILESDIR}/ceph-17.2.0-gcc12-header.patch" + "${FILESDIR}/ceph-16.2.10-flags.patch" + "${FILESDIR}/ceph-17.2.5-boost-1.81.patch" + "${FILESDIR}/ceph-16.2.14-gcc13.patch" + # https://bugs.gentoo.org/907739 + "${FILESDIR}/ceph-18.2.0-cython3.patch" ) check-reqs_export_vars() { @@ -239,7 +235,7 @@ pkg_pretend() { pkg_setup() { if ! use system-boost; then - python_setup 3.8 3.9 + python_setup 3.10 else python_setup fi @@ -324,6 +320,8 @@ ceph_src_configure() { -DWITH_RDMA:BOOL=$(usex rdma) -DCMAKE_INSTALL_DOCDIR:PATH="${EPREFIX}/usr/share/doc/${PN}-${PVR}" -DCMAKE_INSTALL_SYSCONFDIR:PATH="${EPREFIX}/etc" + # use the bundled libfmt for now since they seem to constantly break their API + -DCMAKE_DISABLE_FIND_PACKAGE_fmt=ON -Wno-dev ) @@ -414,12 +412,12 @@ src_install() { insinto /etc/logrotate.d/ newins "${FILESDIR}"/ceph.logrotate-r2 ${PN} - keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat + 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-r12" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r13" ${PN} newconfd "${FILESDIR}/${PN}.confd-r5" ${PN} insinto /etc/sudoers.d @@ -463,6 +461,9 @@ python_install() { DESTDIR="${ED}" cmake_build VERBOSE=1 install popd >/dev/null || die + python_scriptinto /usr/sbin + python_doscript src/cephadm/cephadm + python_optimize } @@ -471,3 +472,7 @@ pkg_postinst() { tmpfiles_process ${PN}.conf udev_reload } + +pkg_postrm() { + udev_reload +} diff --git a/sys-cluster/ceph/ceph-16.2.9-r1.ebuild b/sys-cluster/ceph/ceph-16.2.15-r1.ebuild index 880937c7a706..02d333640c2e 100644 --- a/sys-cluster/ceph/ceph-16.2.9-r1.ebuild +++ b/sys-cluster/ceph/ceph-16.2.15-r1.ebuild @@ -1,31 +1,29 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{10..11} ) 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/" +SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz" 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" +KEYWORDS="~amd64 ~arm64 ~ppc64" 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 + +radosgw rbd-rwl rbd-ssd rdma rgw-lua selinux +ssl spdk +sqlite +system-boost systemd +tcmalloc test uring xfs zbd zfs " @@ -40,15 +38,13 @@ DEPEND=" app-arch/bzip2:= app-arch/lz4:= app-arch/snappy:= - || ( >=app-arch/snappy-1.1.9-r1 <app-arch/snappy-1.1.9 ) + >=app-arch/snappy-1.1.9-r1 app-arch/zstd:= app-shells/bash:0 app-misc/jq:= - dev-libs/crypto++:= dev-cpp/gflags:= <dev-libs/leveldb-1.23:=[snappy,tcmalloc(-)?] dev-libs/libaio:= - <dev-libs/libfmt-9:= dev-libs/libnl:3= dev-libs/libxml2:= dev-libs/libevent:= @@ -72,7 +68,7 @@ DEPEND=" sys-process/numactl:= virtual/libcrypt:= x11-libs/libpciaccess:= - babeltrace? ( dev-util/babeltrace ) + babeltrace? ( dev-util/babeltrace:0/1 ) fuse? ( sys-fs/fuse:3= ) jemalloc? ( dev-libs/jemalloc:= ) !jemalloc? ( >=dev-util/google-perftools-2.6.1:= ) @@ -92,35 +88,35 @@ DEPEND=" 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) ) + system-boost? ( dev-libs/boost:=[context,python,${PYTHON_USEDEP},zlib] ) + !system-boost? ( $(python_gen_impl_dep '' 3.{10..11}) ) uring? ( sys-libs/liburing:= ) xfs? ( sys-fs/xfsprogs:= ) zbd? ( sys-block/libzbd:= ) zfs? ( sys-fs/zfs:= ) " +# <cython-3: bug #907739 BDEPEND=" amd64? ( dev-lang/nasm ) x86? ( dev-lang/yasm ) - app-arch/cpio - >=dev-util/cmake-3.5.0 + app-alternatives/cpio + dev-debug/valgrind + >=dev-build/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 + app-alternatives/bc sys-devel/patch virtual/pkgconfig jaeger? ( - sys-devel/bison - sys-devel/flex + app-alternatives/yacc + app-alternatives/lex ) test? ( dev-util/cunit @@ -141,8 +137,8 @@ RDEPEND=" sys-block/parted sys-fs/cryptsetup sys-fs/lsscsi - sys-fs/lvm2[-device-mapper-only(-)] - virtual/awk + sys-fs/lvm2[lvm] + app-alternatives/awk dev-python/bcrypt[${PYTHON_USEDEP}] dev-python/cherrypy[${PYTHON_USEDEP}] dev-python/python-dateutil[${PYTHON_USEDEP}] @@ -163,12 +159,11 @@ RDEPEND=" diskprediction? ( >=dev-python/scipy-1.4.0[${PYTHON_USEDEP}] ) - sci-libs/scikit-learn[${PYTHON_USEDEP}] + dev-python/scikit-learn[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}] ) + selinux? ( sec-policy/selinux-ceph ) " -# diskprediction needs older scipy not compatible with py38 -# bug #724438 REQUIRED_USE=" ${PYTHON_REQUIRED_USE} ${LUA_REQUIRED_USE} @@ -180,10 +175,6 @@ REQUIRED_USE=" rabbitmq? ( radosgw ) !system-boost? ( python_targets_python3_10 - || ( - python_targets_python3_8 - python_targets_python3_9 - ) ) " @@ -215,9 +206,13 @@ PATCHES=( "${FILESDIR}/ceph-16.2.0-jaeger-system-boost.patch" "${FILESDIR}/ceph-16.2.0-liburing.patch" "${FILESDIR}/ceph-16.2.2-system-zstd.patch" - "${FILESDIR}/ceph-16.2.7-string-includes.patch" "${FILESDIR}/ceph-17.2.0-fuse3.patch" - "${FILESDIR}/ceph-16.2.9-python310.patch" + "${FILESDIR}/ceph-17.2.0-gcc12-header.patch" + "${FILESDIR}/ceph-16.2.10-flags.patch" + "${FILESDIR}/ceph-17.2.5-boost-1.81.patch" + "${FILESDIR}/ceph-16.2.14-gcc13.patch" + # https://bugs.gentoo.org/907739 + "${FILESDIR}/ceph-18.2.0-cython3.patch" ) check-reqs_export_vars() { @@ -239,7 +234,7 @@ pkg_pretend() { pkg_setup() { if ! use system-boost; then - python_setup 3.8 3.9 + python_setup 3.10 else python_setup fi @@ -324,6 +319,8 @@ ceph_src_configure() { -DWITH_RDMA:BOOL=$(usex rdma) -DCMAKE_INSTALL_DOCDIR:PATH="${EPREFIX}/usr/share/doc/${PN}-${PVR}" -DCMAKE_INSTALL_SYSCONFDIR:PATH="${EPREFIX}/etc" + # use the bundled libfmt for now since they seem to constantly break their API + -DCMAKE_DISABLE_FIND_PACKAGE_fmt=ON -Wno-dev ) @@ -365,6 +362,9 @@ ceph_src_configure() { rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \ || die "failed to remove cmake cache" + # https://bugs.gentoo.org/927066 + filter-lto + cmake_src_configure # bug #630232 @@ -414,12 +414,12 @@ src_install() { insinto /etc/logrotate.d/ newins "${FILESDIR}"/ceph.logrotate-r2 ${PN} - keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat + 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-r12" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r13" ${PN} newconfd "${FILESDIR}/${PN}.confd-r5" ${PN} insinto /etc/sudoers.d @@ -463,6 +463,9 @@ python_install() { DESTDIR="${ED}" cmake_build VERBOSE=1 install popd >/dev/null || die + python_scriptinto /usr/sbin + python_doscript src/cephadm/cephadm + python_optimize } @@ -471,3 +474,7 @@ pkg_postinst() { tmpfiles_process ${PN}.conf udev_reload } + +pkg_postrm() { + udev_reload +} diff --git a/sys-cluster/ceph/ceph-17.2.3.ebuild b/sys-cluster/ceph/ceph-17.2.6-r8.ebuild index 8a67048c3455..ec78adf22305 100644 --- a/sys-cluster/ceph/ceph-17.2.3.ebuild +++ b/sys-cluster/ceph/ceph-17.2.6-r8.ebuild @@ -1,32 +1,33 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{10..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" +DESCRIPTION="Ceph distributed filesystem" +HOMEPAGE="https://ceph.com/" + 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 ) + 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" +KEYWORDS="amd64 ~arm64" 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 + +radosgw rbd-rwl rbd-ssd rdma rgw-lua selinux +ssl spdk +sqlite +system-boost systemd +tcmalloc test +uring xfs zbd zfs " @@ -41,26 +42,24 @@ DEPEND=" app-arch/bzip2:= app-arch/lz4:= app-arch/snappy:= - || ( >=app-arch/snappy-1.1.9-r1 <app-arch/snappy-1.1.9 ) + >=app-arch/snappy-1.1.9-r1 app-arch/zstd:= app-shells/bash:0 app-misc/jq:= - dev-libs/crypto++:= dev-cpp/gflags:= - <dev-libs/leveldb-1.23:=[snappy,tcmalloc(-)?] + dev-lang/jsonnet:= dev-libs/libaio:= - >=dev-libs/libfmt-6.2.1:= - <dev-libs/libfmt-9:= dev-libs/libnl:3= dev-libs/libxml2:= dev-libs/libevent:= dev-libs/libutf8proc:= + dev-libs/nss:= dev-libs/openssl:= <dev-libs/rocksdb-6.15:= dev-libs/thrift:= dev-libs/xmlsec:=[openssl] dev-cpp/yaml-cpp:= - dev-libs/nss:= + dev-python/natsort[${PYTHON_USEDEP}] dev-python/pyyaml[${PYTHON_USEDEP}] net-dns/c-ares:= net-libs/gnutls:= @@ -75,7 +74,7 @@ DEPEND=" sys-process/numactl:= virtual/libcrypt:= x11-libs/libpciaccess:= - babeltrace? ( dev-util/babeltrace ) + babeltrace? ( dev-util/babeltrace:0/1 ) fuse? ( sys-fs/fuse:3= ) jemalloc? ( dev-libs/jemalloc:= ) !jemalloc? ( >=dev-util/google-perftools-2.6.1:= ) @@ -88,7 +87,7 @@ DEPEND=" ldap? ( net-nds/openldap:= ) lttng? ( dev-util/lttng-ust:= ) parquet? ( dev-libs/re2:= ) - pmdk? ( dev-libs/pmdk:= ) + pmdk? ( >=dev-libs/pmdk-1.10.0:= ) rabbitmq? ( net-libs/rabbitmq-c:= ) radosgw? ( dev-libs/icu:= @@ -99,34 +98,34 @@ DEPEND=" 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? ( dev-libs/boost:=[context,python,${PYTHON_USEDEP},zlib] ) uring? ( sys-libs/liburing:= ) xfs? ( sys-fs/xfsprogs:= ) zbd? ( sys-block/libzbd:= ) zfs? ( sys-fs/zfs:= ) " +# <cython-3: bug #907739 BDEPEND=" amd64? ( dev-lang/nasm ) x86? ( dev-lang/yasm ) - app-arch/cpio - >=dev-util/cmake-3.5.0 + app-alternatives/cpio + dev-debug/valgrind + >=dev-build/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 + app-alternatives/bc sys-devel/patch virtual/pkgconfig jaeger? ( - sys-devel/bison - sys-devel/flex + app-alternatives/yacc + app-alternatives/lex ) test? ( dev-util/cunit @@ -147,8 +146,8 @@ RDEPEND=" sys-block/parted sys-fs/cryptsetup sys-fs/lsscsi - sys-fs/lvm2[-device-mapper-only(-)] - virtual/awk + sys-fs/lvm2[lvm] + app-alternatives/awk dev-python/bcrypt[${PYTHON_USEDEP}] dev-python/cherrypy[${PYTHON_USEDEP}] dev-python/python-dateutil[${PYTHON_USEDEP}] @@ -168,12 +167,11 @@ RDEPEND=" diskprediction? ( >=dev-python/scipy-1.4.0[${PYTHON_USEDEP}] ) - sci-libs/scikit-learn[${PYTHON_USEDEP}] + dev-python/scikit-learn[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}] ) + selinux? ( sec-policy/selinux-ceph ) " -# diskprediction needs older scipy not compatible with py38 -# bug #724438 REQUIRED_USE=" ${PYTHON_REQUIRED_USE} ${LUA_REQUIRED_USE} @@ -215,7 +213,21 @@ PATCHES=( "${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" + "${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" + # https://bugs.gentoo.org/905626 + "${FILESDIR}/ceph-17.2.6-arrow-flatbuffers-c++14.patch" + # https://bugs.gentoo.org/868891 + "${FILESDIR}/ceph-17.2.6-cmake.patch" + # https://bugs.gentoo.org/907739 + "${FILESDIR}/ceph-18.2.0-cython3.patch" ) check-reqs_export_vars() { @@ -272,6 +284,11 @@ src_prepare() { 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 } @@ -315,6 +332,8 @@ ceph_src_configure() { -DWITH_RDMA:BOOL=$(usex rdma) -DCMAKE_INSTALL_DOCDIR:PATH="${EPREFIX}/usr/share/doc/${PN}-${PVR}" -DCMAKE_INSTALL_SYSCONFDIR:PATH="${EPREFIX}/etc" + # use the bundled libfmt for now since they seem to constantly break their API + -DCMAKE_DISABLE_FIND_PACKAGE_fmt=ON -Wno-dev ) @@ -327,6 +346,9 @@ ceph_src_configure() { 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 @@ -360,6 +382,9 @@ ceph_src_configure() { # hopefully this will not be necessary in the next release use parquet && export ARROW_XSIMD_URL="file:///${DISTDIR}/ceph-xsimd-${PV}.tar.gz" + # https://bugs.gentoo.org/927066 + filter-lto + cmake_src_configure # bug #630232 @@ -393,6 +418,7 @@ src_install() { python_setup cmake_src_install + python_optimize find "${ED}" -name '*.la' -type f -delete || die @@ -402,12 +428,12 @@ src_install() { insinto /etc/logrotate.d/ newins "${FILESDIR}"/ceph.logrotate-r2 ${PN} - keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat + 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-r12" ${PN} + newinitd "${FILESDIR}/${PN}.initd-r14" ${PN} newconfd "${FILESDIR}/${PN}.confd-r5" ${PN} insinto /etc/sudoers.d @@ -448,6 +474,10 @@ src_install() { python_install() { local CMAKE_USE_DIR="${S}" DESTDIR="${ED}" cmake_build src/pybind/install + DESTDIR="${ED}" cmake_build src/cephadm/install + + python_scriptinto /usr/sbin + python_doscript src/cephadm/cephadm python_optimize } @@ -457,3 +487,7 @@ pkg_postinst() { tmpfiles_process ${PN}.conf udev_reload } + +pkg_postrm() { + udev_reload +} diff --git a/sys-cluster/ceph/ceph-17.2.7.ebuild b/sys-cluster/ceph/ceph-17.2.7.ebuild new file mode 100644 index 000000000000..8face2c0d114 --- /dev/null +++ b/sys-cluster/ceph/ceph-17.2.7.ebuild @@ -0,0 +1,495 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..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" + +DESCRIPTION="Ceph distributed filesystem" +HOMEPAGE="https://ceph.com/" + +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 ) +" + +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" +KEYWORDS="amd64 ~arm64 ppc64" + +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 selinux +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-cpp/gflags:= + dev-lang/jsonnet:= + dev-libs/libaio:= + dev-libs/libnl:3= + dev-libs/libxml2:= + dev-libs/libevent:= + dev-libs/libutf8proc:= + dev-libs/nss:= + dev-libs/openssl:= + <dev-libs/rocksdb-6.15:= + dev-libs/thrift:= + dev-libs/xmlsec:=[openssl] + dev-cpp/yaml-cpp:= + dev-python/natsort[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + net-dns/c-ares:= + net-libs/gnutls:= + sys-auth/oath-toolkit:= + sys-apps/coreutils + sys-apps/hwloc:= + sys-apps/keyutils:= + sys-apps/util-linux:= + sys-libs/libcap-ng:= + sys-libs/ncurses:0= + sys-libs/zlib:= + sys-process/numactl:= + virtual/libcrypt:= + x11-libs/libpciaccess:= + babeltrace? ( dev-util/babeltrace:0/1 ) + fuse? ( sys-fs/fuse:3= ) + jemalloc? ( dev-libs/jemalloc:= ) + !jemalloc? ( >=dev-util/google-perftools-2.6.1:= ) + jaeger? ( + dev-cpp/nlohmann_json:= + dev-cpp/opentelemetry-cpp:=[jaeger] + ) + kafka? ( dev-libs/librdkafka:= ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:= ) + lttng? ( dev-util/lttng-ust:= ) + parquet? ( dev-libs/re2:= ) + pmdk? ( >=dev-libs/pmdk-1.10.0:= ) + rabbitmq? ( net-libs/rabbitmq-c:= ) + radosgw? ( + dev-libs/icu:= + dev-libs/expat:= + net-misc/curl:=[curl_ssl_openssl] + ) + rbd-rwl? ( dev-libs/pmdk:= ) + rdma? ( sys-cluster/rdma-core:= ) + spdk? ( dev-util/cunit ) + sqlite? ( dev-db/sqlite:= ) + system-boost? ( dev-libs/boost:=[context,python,${PYTHON_USEDEP},zlib] ) + uring? ( sys-libs/liburing:= ) + xfs? ( sys-fs/xfsprogs:= ) + zbd? ( sys-block/libzbd:= ) + zfs? ( sys-fs/zfs:= ) +" +# <cython-3: bug #907739 +BDEPEND=" + amd64? ( dev-lang/nasm ) + x86? ( dev-lang/yasm ) + app-alternatives/cpio + dev-debug/valgrind + >=dev-build/cmake-3.5.0 + dev-python/cython[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/sphinx + dev-util/gperf + dev-util/ragel + sys-apps/coreutils + sys-apps/grep + sys-apps/util-linux + sys-apps/which + app-alternatives/bc + sys-devel/patch + virtual/pkgconfig + jaeger? ( + app-alternatives/yacc + app-alternatives/lex + ) + 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}] + ) + dev-python/scikit-learn[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + ) + selinux? ( sec-policy/selinux-ceph ) +" +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" + # https://bugs.gentoo.org/905626 + "${FILESDIR}/ceph-17.2.6-arrow-flatbuffers-c++14.patch" + # https://bugs.gentoo.org/868891 + "${FILESDIR}/ceph-17.2.6-cmake.patch" + # https://bugs.gentoo.org/907739 + "${FILESDIR}/ceph-18.2.0-cython3.patch" + "${FILESDIR}/ceph-17.2.7-fmt-fixes.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" + # use the bundled libfmt for now since they seem to constantly break their API + -DCMAKE_DISABLE_FIND_PACKAGE_fmt=ON + -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" + + # https://bugs.gentoo.org/927066 + filter-lto + + 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 + DESTDIR="${ED}" cmake_build src/cephadm/install + + python_scriptinto /usr/sbin + python_doscript src/cephadm/cephadm + + 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-18.2.1-r2.ebuild b/sys-cluster/ceph/ceph-18.2.1-r2.ebuild new file mode 100644 index 000000000000..4e84916cc23c --- /dev/null +++ b/sys-cluster/ceph/ceph-18.2.1-r2.ebuild @@ -0,0 +1,490 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..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" + +DESCRIPTION="Ceph distributed filesystem" +HOMEPAGE="https://ceph.com/" + +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 ) +" + +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" +KEYWORDS="~amd64 ~arm64 ~ppc64" + +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 selinux +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-cpp/gflags:= + dev-lang/jsonnet:= + dev-libs/libaio:= + dev-libs/libnl:3= + dev-libs/libxml2:= + dev-libs/libevent:= + dev-libs/libutf8proc:= + dev-libs/nss:= + dev-libs/openssl:= + <dev-libs/rocksdb-7.9.3:= + dev-libs/thrift:= + dev-libs/xmlsec:=[openssl] + dev-cpp/yaml-cpp:= + dev-python/natsort[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + net-dns/c-ares:= + net-libs/gnutls:= + sys-auth/oath-toolkit:= + sys-apps/coreutils + sys-apps/hwloc:= + sys-apps/keyutils:= + sys-apps/util-linux:= + sys-libs/libcap-ng:= + sys-libs/ncurses:0= + sys-libs/zlib:= + sys-process/numactl:= + virtual/libcrypt:= + x11-libs/libpciaccess:= + babeltrace? ( dev-util/babeltrace:0/1 ) + fuse? ( sys-fs/fuse:3= ) + jemalloc? ( dev-libs/jemalloc:= ) + !jemalloc? ( >=dev-util/google-perftools-2.6.1:= ) + jaeger? ( + dev-cpp/nlohmann_json:= + dev-cpp/opentelemetry-cpp:=[jaeger] + ) + kafka? ( dev-libs/librdkafka:= ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:= ) + lttng? ( dev-util/lttng-ust:= ) + parquet? ( dev-libs/re2:= ) + pmdk? ( + >=dev-libs/pmdk-1.10.0:= + sys-block/ndctl:= + ) + 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-alternatives/cpio + dev-debug/valgrind + >=dev-build/cmake-3.5.0 + dev-python/cython[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/sphinx + dev-util/gperf + dev-util/ragel + sys-apps/coreutils + sys-apps/grep + sys-apps/util-linux + sys-apps/which + app-alternatives/bc + sys-devel/patch + virtual/pkgconfig + jaeger? ( + app-alternatives/yacc + app-alternatives/lex + ) + 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}] + ) + dev-python/scikit-learn[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + ) + selinux? ( sec-policy/selinux-ceph ) +" +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-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-pybind-boost-1.74.patch" + "${FILESDIR}/ceph-17.2.0-findre2.patch" + "${FILESDIR}/ceph-18.2.0-system-opentelemetry.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" + # 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" + # https://bugs.gentoo.org/905626 + "${FILESDIR}/ceph-17.2.6-arrow-flatbuffers-c++14.patch" + # https://bugs.gentoo.org/868891 + "${FILESDIR}/ceph-17.2.6-cmake.patch" + "${FILESDIR}/ceph-18.2.0-cyclic-deps.patch" + # https://bugs.gentoo.org/907739 + "${FILESDIR}/ceph-18.2.0-cython3.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" + # use the bundled libfmt for now since they seem to constantly break their API + -DCMAKE_DISABLE_FIND_PACKAGE_fmt=ON + -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" + + # https://bugs.gentoo.org/927066 + filter-lto + + 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 + cmake_build cephadm +} + +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 + DESTDIR="${ED}" cmake_build src/cephadm/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-13.2.0-cflags.patch b/sys-cluster/ceph/files/ceph-13.2.0-cflags.patch deleted file mode 100644 index b275a177da35..000000000000 --- a/sys-cluster/ceph/files/ceph-13.2.0-cflags.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake -index d6572115a4..cc0bdddc9f 100644 ---- a/cmake/modules/BuildBoost.cmake -+++ b/cmake/modules/BuildBoost.cmake -@@ -62,7 +62,7 @@ function(do_build_boost version) - else() - list(APPEND boost_features "address-model=32") - endif() -- set(BOOST_CXXFLAGS "-fPIC -w") # check on arm, etc <---XXX -+ set(BOOST_CXXFLAGS "${CMAKE_CXX_FLAGS} -fPIC -w") # check on arm, etc <---XXX - list(APPEND boost_features "cxxflags=${BOOST_CXXFLAGS}") - - list(FIND Boost_BUILD_COMPONENTS "python" with_python) -diff --git a/src/compressor/zstd/CMakeLists.txt b/src/compressor/zstd/CMakeLists.txt -index 5a80aa539c..8d6ff5c8f0 100644 ---- a/src/compressor/zstd/CMakeLists.txt -+++ b/src/compressor/zstd/CMakeLists.txt -@@ -1,7 +1,7 @@ - # zstd - - # libzstd - build it statically --set(ZSTD_C_FLAGS "-fPIC -Wno-unused-variable -O3") -+set(ZSTD_C_FLAGS "-fPIC -Wno-unused-variable $ENV{CFLAGS} -O3") - - include(ExternalProject) - ExternalProject_Add(zstd_ext diff --git a/sys-cluster/ceph/files/ceph-15.2.0-rocksdb-cmake.patch b/sys-cluster/ceph/files/ceph-15.2.0-rocksdb-cmake.patch deleted file mode 100644 index 9b3d34858e76..000000000000 --- a/sys-cluster/ceph/files/ceph-15.2.0-rocksdb-cmake.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/cmake/modules/BuildRocksDB.cmake b/cmake/modules/BuildRocksDB.cmake -index de9748878b..4b86b36d35 100644 ---- a/cmake/modules/BuildRocksDB.cmake -+++ b/cmake/modules/BuildRocksDB.cmake -@@ -6,10 +6,6 @@ function(build_rocksdb) - # CMAKE_PREFIX_PATH, for which reason we'll have to use some other separator. - string(REPLACE ";" "!" CMAKE_PREFIX_PATH_ALT_SEP "${CMAKE_PREFIX_PATH}") - list(APPEND rocksdb_CMAKE_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH_ALT_SEP}) -- if(CMAKE_TOOLCHAIN_FILE) -- list(APPEND rocksdb_CMAKE_ARGS -- -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE) -- endif() - - if(ALLOCATOR STREQUAL "jemalloc") - list(APPEND rocksdb_CMAKE_ARGS -DWITH_JEMALLOC=ON) diff --git a/sys-cluster/ceph/files/ceph-15.2.15-no-virtualenvs.patch b/sys-cluster/ceph/files/ceph-15.2.15-no-virtualenvs.patch deleted file mode 100644 index 5ef7fb3a73e1..000000000000 --- a/sys-cluster/ceph/files/ceph-15.2.15-no-virtualenvs.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff --git a/cmake/modules/AddCephTest.cmake b/cmake/modules/AddCephTest.cmake -index c9ee8c1b8f6..09f75543da2 100644 ---- a/cmake/modules/AddCephTest.cmake -+++ b/cmake/modules/AddCephTest.cmake -@@ -68,14 +68,6 @@ function(add_tox_test name) - endif() - string(REPLACE ";" "," tox_envs "${tox_envs}") - find_package(Python3 QUIET REQUIRED) -- add_custom_command( -- OUTPUT ${venv_path}/bin/activate -- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python="${Python3_EXECUTABLE}" ${venv_path} -- WORKING_DIRECTORY ${tox_path} -- COMMENT "preparing venv for ${name}") -- add_custom_target(${name}-venv -- DEPENDS ${venv_path}/bin/activate) -- add_dependencies(tests ${name}-venv) - add_test( - NAME ${test_name} - COMMAND ${CMAKE_SOURCE_DIR}/src/script/run_tox.sh -diff --git a/src/ceph-volume/CMakeLists.txt b/src/ceph-volume/CMakeLists.txt -index 9166553dc73..9a6c87595b9 100644 ---- a/src/ceph-volume/CMakeLists.txt -+++ b/src/ceph-volume/CMakeLists.txt -@@ -8,22 +8,6 @@ if(FREEBSD) - add_subdirectory(plugin/zfs) - endif() - --# Required for running ceph-volume inventory in a vstart environment --set(CEPH_VOLUME_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-volume-virtualenv) -- --add_custom_command( -- OUTPUT ${CEPH_VOLUME_VIRTUALENV}/bin/python -- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${Python3_EXECUTABLE} ${CEPH_VOLUME_VIRTUALENV} -- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-volume -- COMMENT "ceph-volume venv is being created") -- --add_custom_command( -- OUTPUT ${CEPH_VOLUME_VIRTUALENV}/bin/ceph-volume -- DEPENDS ${CEPH_VOLUME_VIRTUALENV}/bin/python -- COMMAND . ${CEPH_VOLUME_VIRTUALENV}/bin/activate && ${CEPH_VOLUME_VIRTUALENV}/bin/python setup.py develop && deactivate -- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-volume -- COMMENT "${CMAKE_SOURCE_DIR}/src/ceph-volume") -- - add_custom_target(ceph-volume-venv-setup - DEPENDS ${CEPH_VOLUME_VIRTUALENV}/bin/ceph-volume) - -diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt -index 92e4cdc538b..3153c93c459 100644 ---- a/src/pybind/mgr/dashboard/CMakeLists.txt -+++ b/src/pybind/mgr/dashboard/CMakeLists.txt -@@ -5,9 +5,6 @@ function(add_npm_command) - set(multi_kw COMMAND DEPENDS) - cmake_parse_arguments(NC "${options}" "${single_kw}" "${multi_kw}" ${ARGN}) - string(REPLACE ";" " " command "${NC_COMMAND}") -- if(NC_NODEENV) -- string(REGEX REPLACE "^(.*(npm|npx) .*)$" ". ${mgr-dashboard-nodeenv-dir}/bin/activate && \\1 && deactivate" command ${command}) -- endif() - string(REPLACE " " ";" command "${command}") - add_custom_command( - OUTPUT "${NC_OUTPUT}" -@@ -29,10 +26,8 @@ else() - set(nodeenv NODEENV) - - add_custom_command( -- OUTPUT "${mgr-dashboard-nodeenv-dir}/bin/npm" -- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv-dir} -- COMMAND ${mgr-dashboard-nodeenv-dir}/bin/pip install nodeenv -- COMMAND ${mgr-dashboard-nodeenv-dir}/bin/nodeenv --verbose -p --node=10.18.1 -+ OUTPUT "npm" -+ COMMAND nodeenv --verbose -p --node=10.18.1 - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "dashboard nodeenv is being installed" - ) diff --git a/sys-cluster/ceph/files/ceph-15.2.15-snappy-1.1.9.patch b/sys-cluster/ceph/files/ceph-15.2.15-snappy-1.1.9.patch deleted file mode 100644 index 3b38c1708733..000000000000 --- a/sys-cluster/ceph/files/ceph-15.2.15-snappy-1.1.9.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4c13a798dcf2e783afd7558bf3541dc025de854a Mon Sep 17 00:00:00 2001 -From: Nathan Cutler <ncutler@suse.com> -Date: Tue, 27 Jul 2021 15:27:58 +0200 -Subject: [PATCH] compression/snappy: use uint32_t to be compatible with 1.1.9 - -The snappy project made the following change in snappy.h between version 1.1.8 -and 1.1.9: - -< bool GetUncompressedLength(Source* source, uint32_t* result); ---- -> bool GetUncompressedLength(Source* source, uint32* result); - -This causes Ceph to FTBFS with snappy 1.1.9. - -Thanks to Chris Denice for bringing this to our attention via Redmine. - -Fixes: https://tracker.ceph.com/issues/50934 -Signed-off-by: Nathan Cutler <ncutler@suse.com> ---- - src/compressor/snappy/SnappyCompressor.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/compressor/snappy/SnappyCompressor.h b/src/compressor/snappy/SnappyCompressor.h -index 25393f8dc1ff4..93206c4007bed 100644 ---- a/src/compressor/snappy/SnappyCompressor.h -+++ b/src/compressor/snappy/SnappyCompressor.h -@@ -97,8 +97,8 @@ class SnappyCompressor : public Compressor { - if (qat_enabled) - return qat_accel.decompress(p, compressed_len, dst, compressor_message); - #endif -- snappy::uint32 res_len = 0; - BufferlistSource source_1(p, compressed_len); -+ uint32_t res_len = 0; - if (!snappy::GetUncompressedLength(&source_1, &res_len)) { - return -1; - } diff --git a/sys-cluster/ceph/files/ceph-15.2.2-systemd-unit.patch b/sys-cluster/ceph/files/ceph-15.2.2-systemd-unit.patch deleted file mode 100644 index fdd3a6ac2ac7..000000000000 --- a/sys-cluster/ceph/files/ceph-15.2.2-systemd-unit.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur ceph-15.2.2/systemd/ceph-osd@.service.in ceph-15.2.2.af/systemd/ceph-osd@.service.in ---- ceph-15.2.2/systemd/ceph-osd@.service.in 2020-05-18 16:25:12.000000000 +0000 -+++ ceph-15.2.2.af/systemd/ceph-osd@.service.in 2020-05-21 21:20:58.318655944 +0000 -@@ -10,7 +10,7 @@ - EnvironmentFile=-@SYSTEMD_ENV_FILE@ - Environment=CLUSTER=ceph - ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph --ExecStartPre=/usr/lib/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i -+ExecStartPre=/usr/libexec/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i - ExecReload=/bin/kill -HUP $MAINPID - LockPersonality=true - MemoryDenyWriteExecute=true diff --git a/sys-cluster/ceph/files/ceph-15.2.4-system-uring.patch b/sys-cluster/ceph/files/ceph-15.2.4-system-uring.patch deleted file mode 100644 index 64df81bf97b5..000000000000 --- a/sys-cluster/ceph/files/ceph-15.2.4-system-uring.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt -index 760244b9b4..7f83923671 100644 ---- a/src/os/CMakeLists.txt -+++ b/src/os/CMakeLists.txt -@@ -134,27 +134,6 @@ if(WITH_EVENTTRACE) - endif() - - if(WITH_LIBURING) -- include(ExternalProject) -- if("${CMAKE_GENERATOR}" MATCHES "Make") -- set(make_cmd "$(MAKE)") -- else() -- set(make_cmd "make") -- endif() -- ExternalProject_Add(liburing_ext -- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/src/ -- GIT_REPOSITORY http://git.kernel.dk/liburing -- GIT_TAG "4e360f71131918c36774f51688e5c65dea8d43f2" -- SOURCE_DIR ${CMAKE_BINARY_DIR}/src/liburing -- CONFIGURE_COMMAND <SOURCE_DIR>/configure -- BUILD_COMMAND env CC=${CMAKE_C_COMPILER} ${make_cmd} -C src -s -- BUILD_IN_SOURCE 1 -- INSTALL_COMMAND "") -- unset(make_cmd) -- add_library(liburing STATIC IMPORTED GLOBAL) -- add_dependencies(liburing liburing_ext) -- set_target_properties(liburing PROPERTIES -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/src/liburing/src/liburing.a") -- target_link_libraries(os liburing) -- target_include_directories(os SYSTEM PRIVATE "${CMAKE_BINARY_DIR}/src/liburing/src/include") -+ pkg_check_modules(LIBURING REQUIRED IMPORTED_TARGET liburing) -+ target_link_libraries(os uring) - endif(WITH_LIBURING) -diff --git a/src/os/bluestore/io_uring.cc b/src/os/bluestore/io_uring.cc -index 54fa0f9535..4ba83cf172 100644 ---- a/src/os/bluestore/io_uring.cc -+++ b/src/os/bluestore/io_uring.cc -@@ -7,6 +7,8 @@ - - #include "liburing.h" - #include <sys/epoll.h> -+#include <unistd.h> -+#include <sys/syscall.h> - - /* Options */ - -@@ -134,8 +136,7 @@ int ioring_queue_t::init(std::vector<int> &fds) - if (ret < 0) - return ret; - -- ret = io_uring_register(d->io_uring.ring_fd, IORING_REGISTER_FILES, -- &fds[0], fds.size()); -+ ret = io_uring_register_files(&d->io_uring, &fds[0], fds.size()); - if (ret < 0) { - ret = -errno; - goto close_ring_fd; -@@ -214,7 +215,7 @@ bool ioring_queue_t::supported() - struct io_uring_params p; - - memset(&p, 0, sizeof(p)); -- int fd = io_uring_setup(16, &p); -+ int fd = syscall(SYS_io_uring_setup, 16, &p); - if (fd < 0) - return false; - diff --git a/sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch b/sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch deleted file mode 100644 index e9439a630185..000000000000 --- a/sys-cluster/ceph/files/ceph-15.2.9-dont-compile-isal_compress-if-don-t-have-SSE4_1.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/compressor/zlib/ZlibCompressor.cc b/src/compressor/zlib/ZlibCompressor.cc -index e3064d2a21..c86b19da6c 100644 ---- a/src/compressor/zlib/ZlibCompressor.cc -+++ b/src/compressor/zlib/ZlibCompressor.cc -@@ -107,7 +107,7 @@ int ZlibCompressor::zlib_compress(const bufferlist &in, bufferlist &out) - return 0; - } - --#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) -+#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) && defined(HAVE_INTEL_SSE4_1) - int ZlibCompressor::isal_compress(const bufferlist &in, bufferlist &out) - { - int ret; -@@ -167,7 +167,7 @@ int ZlibCompressor::compress(const bufferlist &in, bufferlist &out) - if (qat_enabled) - return qat_accel.compress(in, out); - #endif --#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) -+#if __x86_64__ && defined(HAVE_BETTER_YASM_ELF64) && defined(HAVE_INTEL_SSE4_1) - if (isal_enabled) - return isal_compress(in, out); - else diff --git a/sys-cluster/ceph/files/ceph-16.2.10-flags.patch b/sys-cluster/ceph/files/ceph-16.2.10-flags.patch new file mode 100644 index 000000000000..79002b3a5fce --- /dev/null +++ b/sys-cluster/ceph/files/ceph-16.2.10-flags.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake +index 01a6fc500c8..9eb4658482f 100644 +--- a/cmake/modules/Distutils.cmake ++++ b/cmake/modules/Distutils.cmake +@@ -90,7 +90,8 @@ function(distutils_add_cython_module target name src) + CXX="${PY_CXX}" + LDSHARED="${PY_LDSHARED}" + OPT=\"-DNDEBUG -g -fwrapv -w\" +- LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ++ CFLAGS=${CMAKE_C_FLAGS} ++ LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\ ${CMAKE_LINKER_FLAGS}\ ${CMAKE_SHARED_LINKER_FLAGS} + CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR} + CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} + ${Python3_EXECUTABLE} ${setup_py} diff --git a/sys-cluster/ceph/files/ceph-16.2.14-gcc13.patch b/sys-cluster/ceph/files/ceph-16.2.14-gcc13.patch new file mode 100644 index 000000000000..7f84a19706dc --- /dev/null +++ b/sys-cluster/ceph/files/ceph-16.2.14-gcc13.patch @@ -0,0 +1,84 @@ +diff --git a/src/common/Cycles.h b/src/common/Cycles.h +index 16e0aa67fc1..791be43469c 100644 +--- a/src/common/Cycles.h ++++ b/src/common/Cycles.h +@@ -29,8 +29,9 @@ + */ + + +-#ifndef CEPH_CYCLES_H +-#define CEPH_CYCLES_H ++#pragma once ++ ++#include <cstdint> + + /** + * This class provides static methods that read the fine-grain CPU +@@ -112,4 +113,3 @@ private: + } + }; + +-#endif // CEPH_CYCLES_H +diff --git a/src/common/subsys_types.h b/src/common/subsys_types.h +index 52171809b23..1a2ab796b6d 100644 +--- a/src/common/subsys_types.h ++++ b/src/common/subsys_types.h +@@ -53,7 +53,7 @@ ceph_subsys_get_as_array() { + #undef DEFAULT_SUBSYS + } + +-constexpr static std::uint8_t ++constexpr static uint8_t + ceph_subsys_get_max_default_level(const std::size_t subidx) { + const auto item = ceph_subsys_get_as_array()[subidx]; + return std::max(item.log_level, item.gather_level); +diff --git a/src/librbd/api/PoolMetadata.h b/src/librbd/api/PoolMetadata.h +index c0a8173596e..8d982879aa9 100644 +--- a/src/librbd/api/PoolMetadata.h ++++ b/src/librbd/api/PoolMetadata.h +@@ -9,6 +9,7 @@ + + #include <map> + #include <string> ++#include <cstdint> + + namespace librbd { + +diff --git a/src/msg/async/crypto_onwire.h b/src/msg/async/crypto_onwire.h +index 55f7550868f..2213c21d08d 100644 +--- a/src/msg/async/crypto_onwire.h ++++ b/src/msg/async/crypto_onwire.h +@@ -95,7 +95,7 @@ public: + // Transmitter can append extra bytes of ciphertext at the -final step. + // This method return how much was added, and thus let client translate + // plaintext size into ciphertext size to grab from wire. +- virtual std::uint32_t get_extra_size_at_final() = 0; ++ virtual uint32_t get_extra_size_at_final() = 0; + + // Instance of RxHandler must be reset before doing any decrypt-update + // step. This applies also to situation when decrypt-final was already +diff --git a/src/test/librados/op_speed.cc b/src/test/librados/op_speed.cc +index 90c7bdac571..9452da6dcc9 100644 +--- a/src/test/librados/op_speed.cc ++++ b/src/test/librados/op_speed.cc +@@ -9,7 +9,7 @@ int main() { + for (int i = 0; i < to_create; ++i) { + librados::ObjectReadOperation op; + bufferlist bl; +- std::uint64_t sz; ++ uint64_t sz; + struct timespec tm; + std::map<std::string, ceph::buffer::list> xattrs; + std::map<std::string, ceph::buffer::list> omap; +diff --git a/src/test/mon/test_log_rss_usage.cc b/src/test/mon/test_log_rss_usage.cc +index f6e85f414c8..9769cabd884 100644 +--- a/src/test/mon/test_log_rss_usage.cc ++++ b/src/test/mon/test_log_rss_usage.cc +@@ -5,6 +5,7 @@ + #include <string> + #include <iostream> + #include <fstream> ++#include <cstdint> + #include <stdlib.h> + #include <stdio.h> + #include <unistd.h> diff --git a/sys-cluster/ceph/files/ceph-16.2.7-string-includes.patch b/sys-cluster/ceph/files/ceph-16.2.7-string-includes.patch deleted file mode 100644 index f703a8fcf46a..000000000000 --- a/sys-cluster/ceph/files/ceph-16.2.7-string-includes.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit ebf3a0398f18eab67d2ba25e6a10b41ff140f6a4 -Author: Duncan Bellamy <dunk@denkimushi.com> -Date: Fri May 21 06:30:10 2021 +0100 - - rgw/rgw_string.h: add missing includes for alpine and boost 1.75 - alpine needs: string, stdexcept - - Fixes: https://tracker.ceph.com/issues/50924 - Signed-off-by: Duncan Bellamy <dunk@denkimushi.com> - -diff --git a/src/rgw/rgw_string.h b/src/rgw/rgw_string.h -index 257daa9c1fe..90e64f98a25 100644 ---- a/src/rgw/rgw_string.h -+++ b/src/rgw/rgw_string.h -@@ -8,6 +8,8 @@ - #include <stdlib.h> - #include <limits.h> - #include <string_view> -+#include <string> -+#include <stdexcept> - - #include <boost/container/small_vector.hpp> - diff --git a/sys-cluster/ceph/files/ceph-16.2.9-python310.patch b/sys-cluster/ceph/files/ceph-16.2.9-python310.patch deleted file mode 100644 index 403cfe2f3d1d..000000000000 --- a/sys-cluster/ceph/files/ceph-16.2.9-python310.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 - $<TARGET_OBJECTS:mgr_cap_obj>) - 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.0-cyclic-deps.patch b/sys-cluster/ceph/files/ceph-17.2.0-cyclic-deps.patch index f80edddd8de7..e9177cc02764 100644 --- a/sys-cluster/ceph/files/ceph-17.2.0-cyclic-deps.patch +++ b/sys-cluster/ceph/files/ceph-17.2.0-cyclic-deps.patch @@ -1,32 +1,3 @@ -From 78edb6a91788133334ceeeda0c95529df5f40da8 Mon Sep 17 00:00:00 2001 -From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com> -Date: Mon, 14 Feb 2022 07:42:08 -0500 -Subject: [PATCH] rgw: cmake configure error on fedora-37/rawhide - -see -https://kojipkgs.fedoraproject.org//work/tasks/6624/82706624/build.log, -excerpted below - -... -CMake Error: The inter-target dependency graph contains the following -strongly connected component (cycle): "rgw_common" of type -STATIC_LIBRARY depends on "dbstore" (weak) depends on "sqlite_db" (weak) -"dbstore" of type SHARED_LIBRARY depends on "rgw_common" (weak) depends -on "sqlite_db" (weak) "sqlite_db" of type SHARED_LIBRARY depends on -"rgw_common" (weak) depends on "dbstore" (weak) At least one of these -targets is not a STATIC_LIBRARY. Cyclic dependencies are allowed only -among static libraries. CMake Generate step failed. Build files cannot -be regenerated correctly. -... - -https://tracker.ceph.com/issues/54266 - -Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> ---- - src/rgw/store/dbstore/CMakeLists.txt | 2 +- - src/rgw/store/dbstore/sqlite/CMakeLists.txt | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - diff --git a/src/rgw/store/dbstore/CMakeLists.txt b/src/rgw/store/dbstore/CMakeLists.txt index 143ede3c094c9..18e032b73f54f 100644 --- a/src/rgw/store/dbstore/CMakeLists.txt diff --git a/sys-cluster/ceph/files/ceph-17.2.0-gcc12-header.patch b/sys-cluster/ceph/files/ceph-17.2.0-gcc12-header.patch new file mode 100644 index 000000000000..70d3eb94c97a --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.0-gcc12-header.patch @@ -0,0 +1,30 @@ +From 496465d9238109a93612e28682273e5bf576823b Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Sun, 22 May 2022 19:40:59 -0700 +Subject: [PATCH 1/2] buffer.h: add missing header file due to gcc upgrade + +The header file <memory> have been changed to be no longer included by other +heades, thus requiring explicit include. See https://gcc.gnu.org/gcc-12/porting_to.html + +Upstream-Status: Pending + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + src/include/buffer.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/include/buffer.h b/src/include/buffer.h +index 5c8b427d..88845ee6 100644 +--- a/src/include/buffer.h ++++ b/src/include/buffer.h +@@ -43,6 +43,7 @@ + #include <list> + #include <vector> + #include <string> ++#include <memory> + #if __cplusplus >= 201703L + #include <string_view> + #endif // __cplusplus >= 201703L +-- +2.36.0 + diff --git a/sys-cluster/ceph/files/ceph-17.2.0-system-opentelemetry.patch b/sys-cluster/ceph/files/ceph-17.2.0-system-opentelemetry.patch index 6e0788a093e5..1b4e614bb517 100644 --- a/sys-cluster/ceph/files/ceph-17.2.0-system-opentelemetry.patch +++ b/sys-cluster/ceph/files/ceph-17.2.0-system-opentelemetry.patch @@ -9,7 +9,7 @@ index 30cf3605468..902e2123d04 100644 - include(BuildOpentelemetry) - build_opentelemetry() - set(jaeger_base opentelemetry::libopentelemetry thrift::libthrift) -+ find_package(opentelemetry-cpp 1.3.0 REQUIRED) ++ find_package(opentelemetry-cpp REQUIRED) + set(jaeger_base + opentelemetry-cpp::common + opentelemetry-cpp::trace diff --git a/sys-cluster/ceph/files/ceph-17.2.1-python310.patch b/sys-cluster/ceph/files/ceph-17.2.1-python310.patch deleted file mode 100644 index 767cd2922a26..000000000000 --- a/sys-cluster/ceph/files/ceph-17.2.1-python310.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 389054888f2aa782f73564125ec7a1ef0212d536 Mon Sep 17 00:00:00 2001 -From: Pete Zaitcev <zaitcev@redhat.com> -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 <zaitcev@redhat.com> ---- - 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 - $<TARGET_OBJECTS:mgr_cap_obj>) - 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() diff --git a/sys-cluster/ceph/files/ceph-17.2.3-flags.patch b/sys-cluster/ceph/files/ceph-17.2.3-flags.patch new file mode 100644 index 000000000000..236ff5441831 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.3-flags.patch @@ -0,0 +1,19 @@ +diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake +index 1916363382f..ae460d84542 100644 +--- a/cmake/modules/Distutils.cmake ++++ b/cmake/modules/Distutils.cmake +@@ -94,12 +94,12 @@ function(distutils_add_cython_module target name src) + COMMAND + env + CC="${PY_CC}" +- CFLAGS="${PY_CFLAGS}" ++ CFLAGS="${PY_CFLAGS}"\ ${CMAKE_C_FLAGS} + CPPFLAGS="${PY_CPPFLAGS}" + CXX="${PY_CXX}" + LDSHARED="${PY_LDSHARED}" + OPT=\"-DNDEBUG -g -fwrapv -w\" +- LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ++ LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\ ${CMAKE_LINKER_FLAGS}\ ${CMAKE_SHARED_LINKER_FLAGS} + CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR} + CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} + ${Python3_EXECUTABLE} ${setup_py} diff --git a/sys-cluster/ceph/files/ceph-17.2.4-cyclic-deps.patch b/sys-cluster/ceph/files/ceph-17.2.4-cyclic-deps.patch new file mode 100644 index 000000000000..6040906a3f19 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.4-cyclic-deps.patch @@ -0,0 +1,13 @@ +diff --git a/src/rgw/store/dbstore/CMakeLists.txt b/src/rgw/store/dbstore/CMakeLists.txt +index 1feac6dcee0..586d0dbb961 100644 +--- a/src/rgw/store/dbstore/CMakeLists.txt ++++ b/src/rgw/store/dbstore/CMakeLists.txt +@@ -16,7 +16,7 @@ set(dbstore_mgr_srcs + dbstore_mgr.cc + ) + +-add_library(dbstore_lib ${dbstore_srcs}) ++ add_library(dbstore_lib STATIC ${dbstore_srcs}) + target_include_directories(dbstore_lib PUBLIC "${CMAKE_SOURCE_DIR}/src/fmt/include") + target_include_directories(dbstore_lib PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw") + set(link_targets spawn) diff --git a/sys-cluster/ceph/files/ceph-17.2.5-boost-1.81.patch b/sys-cluster/ceph/files/ceph-17.2.5-boost-1.81.patch new file mode 100644 index 000000000000..2dd06edb312f --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.5-boost-1.81.patch @@ -0,0 +1,49 @@ +https://bugs.gentoo.org/887481 +--- a/src/rgw/rgw_asio_client.cc ++++ b/src/rgw/rgw_asio_client.cc +@@ -39,11 +39,11 @@ + const auto& value = header->value(); + + if (field == beast::http::field::content_length) { +- env.set("CONTENT_LENGTH", value.to_string()); ++ env.set("CONTENT_LENGTH", value); + continue; + } + if (field == beast::http::field::content_type) { +- env.set("CONTENT_TYPE", value.to_string()); ++ env.set("CONTENT_TYPE", value); + continue; + } + +@@ -62,26 +62,26 @@ + } + *dest = '\0'; + +- env.set(buf, value.to_string()); ++ env.set(buf, value); + } + + int major = request.version() / 10; + int minor = request.version() % 10; + env.set("HTTP_VERSION", std::to_string(major) + '.' + std::to_string(minor)); + +- env.set("REQUEST_METHOD", request.method_string().to_string()); ++ env.set("REQUEST_METHOD", request.method_string()); + + // split uri from query + auto uri = request.target(); + auto pos = uri.find('?'); + if (pos != uri.npos) { + auto query = uri.substr(pos + 1); +- env.set("QUERY_STRING", query.to_string()); ++ env.set("QUERY_STRING", query); + uri = uri.substr(0, pos); + } +- env.set("SCRIPT_URI", uri.to_string()); ++ env.set("SCRIPT_URI", uri); + +- env.set("REQUEST_URI", request.target().to_string()); ++ env.set("REQUEST_URI", request.target()); + + char port_buf[16]; + snprintf(port_buf, sizeof(port_buf), "%d", local_endpoint.port()); diff --git a/sys-cluster/ceph/files/ceph-17.2.5-gcc13-deux.patch b/sys-cluster/ceph/files/ceph-17.2.5-gcc13-deux.patch new file mode 100644 index 000000000000..1bfe7fdbf52f --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.5-gcc13-deux.patch @@ -0,0 +1,94 @@ +https://bugs.gentoo.org/892501 +https://src.fedoraproject.org/rpms/ceph/c/945dc70d291321704f3218faa7c3efe70687ce27?branch=rawhide +--- a/src/common/subsys_types.h ++++ b/src/common/subsys_types.h +@@ -53,7 +53,7 @@ + #undef DEFAULT_SUBSYS + } + +-constexpr static std::uint8_t ++constexpr static uint8_t + ceph_subsys_get_max_default_level(const std::size_t subidx) { + const auto item = ceph_subsys_get_as_array()[subidx]; + return std::max(item.log_level, item.gather_level); +--- a/src/msg/async/compression_onwire.h ++++ b/src/msg/async/compression_onwire.h +@@ -44,7 +44,7 @@ + + class TxHandler final : private Handler { + public: +- TxHandler(CephContext* const cct, CompressorRef compressor, int mode, std::uint64_t min_size) ++ TxHandler(CephContext* const cct, CompressorRef compressor, int mode, uint64_t min_size) + : Handler(cct, compressor), + m_min_size(min_size), + m_mode(static_cast<Compressor::CompressionMode>(mode)) +@@ -97,7 +97,7 @@ + static rxtx_t create_handler_pair( + CephContext* ctx, + const CompConnectionMeta& comp_meta, +- std::uint64_t compress_min_size); ++ uint64_t compress_min_size); + }; + } + +--- a/src/msg/async/crypto_onwire.h ++++ b/src/msg/async/crypto_onwire.h +@@ -95,7 +95,7 @@ + // Transmitter can append extra bytes of ciphertext at the -final step. + // This method return how much was added, and thus let client translate + // plaintext size into ciphertext size to grab from wire. +- virtual std::uint32_t get_extra_size_at_final() = 0; ++ virtual uint32_t get_extra_size_at_final() = 0; + + // Instance of RxHandler must be reset before doing any decrypt-update + // step. This applies also to situation when decrypt-final was already +--- a/src/common/Cycles.h ++++ b/src/common/Cycles.h +@@ -29,8 +29,9 @@ + */ + + +-#ifndef CEPH_CYCLES_H +-#define CEPH_CYCLES_H ++#pragma once ++ ++#include <cstdint> + + /** + * This class provides static methods that read the fine-grain CPU +@@ -112,4 +113,3 @@ + } + }; + +-#endif // CEPH_CYCLES_H +--- a/src/test/librados/op_speed.cc ++++ b/src/test/librados/op_speed.cc +@@ -9,7 +9,7 @@ + for (int i = 0; i < to_create; ++i) { + librados::ObjectReadOperation op; + bufferlist bl; +- std::uint64_t sz; ++ uint64_t sz; + struct timespec tm; + std::map<std::string, ceph::buffer::list> xattrs; + std::map<std::string, ceph::buffer::list> omap; +--- a/src/test/mon/test_log_rss_usage.cc ++++ b/src/test/mon/test_log_rss_usage.cc +@@ -5,6 +5,7 @@ + #include <string> + #include <iostream> + #include <fstream> ++#include <cstdint> + #include <stdlib.h> + #include <stdio.h> + #include <unistd.h> +--- a/src/librbd/api/PoolMetadata.h ++++ b/src/librbd/api/PoolMetadata.h +@@ -9,6 +9,7 @@ + + #include <map> + #include <string> ++#include <cstdint> + + namespace librbd { + diff --git a/sys-cluster/ceph/files/ceph-17.2.5-suppress-cmake-warning.patch b/sys-cluster/ceph/files/ceph-17.2.5-suppress-cmake-warning.patch new file mode 100644 index 000000000000..99022cd082f3 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.5-suppress-cmake-warning.patch @@ -0,0 +1,11 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7ffe1065d5c..2ea9a5125e1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -708,3 +708,6 @@ add_tags(ctags + EXCLUDE_OPTS ${CTAG_EXCLUDES} + EXCLUDES "*.js" "*.css" ".tox" "python-common/build") + add_custom_target(tags DEPENDS ctags) ++ ++# suppress warning in cmake.eclass ++set(UNUSED_VAR "${CMAKE_INSTALL_LIBDIR}") diff --git a/sys-cluster/ceph/files/ceph-17.2.6-arrow-flatbuffers-c++14.patch b/sys-cluster/ceph/files/ceph-17.2.6-arrow-flatbuffers-c++14.patch new file mode 100644 index 000000000000..e5ab9943a4f6 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.6-arrow-flatbuffers-c++14.patch @@ -0,0 +1,92 @@ +https://bugs.gentoo.org/905626 +https://github.com/google/flatbuffers/pull/7897 +https://github.com/apache/arrow/commit/22dc537e581b385b53ce579a03786a2db0bd4487 + +From 22dc537e581b385b53ce579a03786a2db0bd4487 Mon Sep 17 00:00:00 2001 +From: Antoine Pitrou <antoine@python.org> +Date: Thu, 20 Jan 2022 20:44:40 +0100 +Subject: [PATCH] ARROW-15388: [C++] Avoid including absl from flatbuffers + +There may be an incomplete/broken copy of the Abseil library lying around +(for example because of a race condition while installing it as a bundled library). + +Since absl is only used by Flatbuffers to provide a string_view facility, +use our own vendored string_view instead. + +Closes #12204 from pitrou/ARROW-15388-flatbuffers-string-view + +Authored-by: Antoine Pitrou <antoine@python.org> +Signed-off-by: Antoine Pitrou <antoine@python.org> +--- + cpp/thirdparty/flatbuffers/README.md | 42 +++++++++++++++++++ + .../flatbuffers/include/flatbuffers/base.h | 7 ---- + 2 files changed, 42 insertions(+), 7 deletions(-) + create mode 100644 cpp/thirdparty/flatbuffers/README.md + +diff --git a/src/arrow/cpp/thirdparty/flatbuffers/README.md b/src/arrow/cpp/thirdparty/flatbuffers/README.md +new file mode 100644 +index 0000000000000..e955adba4cebb +--- /dev/null ++++ b/src/arrow/cpp/thirdparty/flatbuffers/README.md +@@ -0,0 +1,42 @@ ++<!--- ++ Licensed to the Apache Software Foundation (ASF) under one ++ or more contributor license agreements. See the NOTICE file ++ distributed with this work for additional information ++ regarding copyright ownership. The ASF licenses this file ++ to you under the Apache License, Version 2.0 (the ++ "License"); you may not use this file except in compliance ++ with the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, ++ software distributed under the License is distributed on an ++ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ++ KIND, either express or implied. See the License for the ++ specific language governing permissions and limitations ++ under the License. ++--> ++ ++This directory contains a vendored version of Flatbuffers ++(unknown changeset), with the following patch for ARROW-15388: ++ ++```diff ++diff --git a/cpp/thirdparty/flatbuffers/include/flatbuffers/base.h b/cpp/thirdparty/flatbuffers/include/flatbuffers/base.h ++index 955738067..fccce42f6 100644 ++--- a/cpp/thirdparty/flatbuffers/include/flatbuffers/base.h +++++ b/cpp/thirdparty/flatbuffers/include/flatbuffers/base.h ++@@ -212,13 +212,6 @@ namespace flatbuffers { ++ typedef std::experimental::string_view string_view; ++ } ++ #define FLATBUFFERS_HAS_STRING_VIEW 1 ++- // Check for absl::string_view ++- #elif __has_include("absl/strings/string_view.h") ++- #include "absl/strings/string_view.h" ++- namespace flatbuffers { ++- typedef absl::string_view string_view; ++- } ++- #define FLATBUFFERS_HAS_STRING_VIEW 1 ++ #endif ++ #endif // __has_include ++ #endif // !FLATBUFFERS_HAS_STRING_VIEW ++``` +diff --git a/src/arrow/cpp/thirdparty/flatbuffers/include/flatbuffers/base.h b/src/arrow/cpp/thirdparty/flatbuffers/include/flatbuffers/base.h +index 9557380672342..fccce42f68aa6 100644 +--- a/src/arrow/cpp/thirdparty/flatbuffers/include/flatbuffers/base.h ++++ b/src/arrow/cpp/thirdparty/flatbuffers/include/flatbuffers/base.h +@@ -212,13 +212,6 @@ namespace flatbuffers { + typedef std::experimental::string_view string_view; + } + #define FLATBUFFERS_HAS_STRING_VIEW 1 +- // Check for absl::string_view +- #elif __has_include("absl/strings/string_view.h") +- #include "absl/strings/string_view.h" +- namespace flatbuffers { +- typedef absl::string_view string_view; +- } +- #define FLATBUFFERS_HAS_STRING_VIEW 1 + #endif + #endif // __has_include + #endif // !FLATBUFFERS_HAS_STRING_VIEW + diff --git a/sys-cluster/ceph/files/ceph-17.2.6-cmake.patch b/sys-cluster/ceph/files/ceph-17.2.6-cmake.patch new file mode 100644 index 000000000000..82bf399fb6f1 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.6-cmake.patch @@ -0,0 +1,80 @@ +https://bugs.gentoo.org/868891 +https://github.com/ceph/ceph/pull/49517 + +From aa4b3652399b317652407959ee880982d4f648de Mon Sep 17 00:00:00 2001 +From: jinqiang zhang <peeweep@0x0.ee> +Date: Tue, 20 Dec 2022 04:28:52 +0000 +Subject: [PATCH 1/2] cmake: fix common-msg-objs can't find common-options-objs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +compile ceph-17.2.5 failed with follow error message: + +``` +ceph-17.2.5/src/msg/Messenger.h:723:30: error: ‘class ConfigValues’ has no member named ‘ms_die_on_unhandled_msg’ +``` + +Add common-options-objs to common-msg-objs's depend to fix it. + +Full build log: https://fars.ee/YMqu +Releated downstream issue: https://bugs.gentoo.org/866449 +Signed-off-by: jinqiang zhang <peeweep@0x0.ee> +--- a/src/msg/CMakeLists.txt ++++ b/src/msg/CMakeLists.txt +@@ -48,6 +48,7 @@ add_library(common-msg-objs OBJECT ${msg_srcs}) + target_compile_definitions(common-msg-objs PRIVATE + $<TARGET_PROPERTY:fmt::fmt,INTERFACE_COMPILE_DEFINITIONS>) + target_include_directories(common-msg-objs PRIVATE ${OPENSSL_INCLUDE_DIR}) ++add_dependencies(common-msg-objs common-options-objs) + + if(WITH_DPDK) + set(async_dpdk_srcs + +From 80e422234acb1f8ffcbe8ee3898cb00f889466a3 Mon Sep 17 00:00:00 2001 +From: jinqiang zhang <peeweep@0x0.ee> +Date: Tue, 20 Dec 2022 04:36:56 +0000 +Subject: [PATCH 2/2] cmake: fix krbd and rados_snap_set_diff_obj can't find + global_legacy_options.h + +compile ceph-17.2.5 failed with follow error messages: + +1. src/librados/snap_set_diff.cc can't find global_legacy_options.h +``` + from /var/tmp/portage/sys-cluster/ceph-17.2.5-r1/work/ceph-17.2.5/src/librados/snap_set_diff.cc:7: +/var/tmp/portage/sys-cluster/ceph-17.2.5-r1/work/ceph-17.2.5/src/common/options/legacy_config_opts.h:1:10: fatal error: global_legacy_options.h: No such file or directory + +``` + +2. src/krbd.cc can't find global_legacy_options.h + +``` + from /var/tmp/portage/sys-cluster/ceph-17.2.5-r1/work/ceph-17.2.5/src/krbd.cc:44: +/var/tmp/portage/sys-cluster/ceph-17.2.5-r1/work/ceph-17.2.5/src/common/options/legacy_config_opts.h:1:10: fatal error: global_legacy_options.h: No such file or directory + +``` + +Add common-options-objs to depend to let it build ealier, similar with 3b3da64d. + +Full build log: https://fars.ee/SZFs +Releated downstream issue: https://bugs.gentoo.org/868891 +Signed-off-by: jinqiang zhang <peeweep@0x0.ee> +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -614,6 +614,7 @@ add_subdirectory(osdc) + add_subdirectory(perfglue) + + add_library(rados_snap_set_diff_obj OBJECT librados/snap_set_diff.cc) ++add_dependencies(rados_snap_set_diff_obj common-options-objs) + + option(WITH_LIBRADOSSTRIPER "build with libradosstriper support" ON) + +@@ -867,6 +868,7 @@ add_subdirectory(journal) + if(WITH_RBD) + if(WITH_KRBD) + add_library(krbd STATIC krbd.cc ++ $<TARGET_OBJECTS:common-options-objs> + $<TARGET_OBJECTS:parse_secret_objs>) + target_link_libraries(krbd keyutils::keyutils) + endif() + diff --git a/sys-cluster/ceph/files/ceph-17.2.6-link-boost-context.patch b/sys-cluster/ceph/files/ceph-17.2.6-link-boost-context.patch new file mode 100644 index 000000000000..24f3fe796aac --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.6-link-boost-context.patch @@ -0,0 +1,13 @@ +diff --git a/src/neorados/CMakeLists.txt b/src/neorados/CMakeLists.txt +index c66043ac9f9..4b1013d26b7 100644 +--- a/src/neorados/CMakeLists.txt ++++ b/src/neorados/CMakeLists.txt +@@ -11,7 +11,7 @@ add_library(libneorados STATIC + $<TARGET_OBJECTS:neorados_api_obj> + $<TARGET_OBJECTS:neorados_objs>) + target_link_libraries(libneorados PRIVATE +- osdc ceph-common cls_lock_client fmt::fmt ++ osdc ceph-common cls_lock_client fmt::fmt Boost::context + ${BLKID_LIBRARIES} ${CRYPTO_LIBS} ${EXTRALIBS}) + + # if(ENABLE_SHARED) diff --git a/sys-cluster/ceph/files/ceph-17.2.7-fmt-fixes.patch b/sys-cluster/ceph/files/ceph-17.2.7-fmt-fixes.patch new file mode 100644 index 000000000000..5d8ee2af9ba3 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-17.2.7-fmt-fixes.patch @@ -0,0 +1,12 @@ +diff --git a/src/osd/SnapMapper.cc b/src/osd/SnapMapper.cc +index 4feabcda459..6b9a9bf86ce 100644 +--- a/src/osd/SnapMapper.cc ++++ b/src/osd/SnapMapper.cc +@@ -17,6 +17,7 @@ + #include <fmt/printf.h> + #include <fmt/ranges.h> + ++#include "include/object_fmt.h" + #include "osd/osd_types_fmt.h" + #include "SnapMapReaderI.h" + diff --git a/sys-cluster/ceph/files/ceph-18.2.0-cyclic-deps.patch b/sys-cluster/ceph/files/ceph-18.2.0-cyclic-deps.patch new file mode 100644 index 000000000000..af9caa63aed2 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-18.2.0-cyclic-deps.patch @@ -0,0 +1,13 @@ +diff --git a/src/rgw/driver/dbstore/CMakeLists.txt b/src/rgw/driver/dbstore/CMakeLists.txt +index a3aca7a64e4..072d20193e3 100644 +--- a/src/rgw/driver/dbstore/CMakeLists.txt ++++ b/src/rgw/driver/dbstore/CMakeLists.txt +@@ -24,7 +24,7 @@ set(dbstore_mgr_srcs + dbstore_mgr.cc + ) + +-add_library(dbstore_lib ${dbstore_srcs}) ++ add_library(dbstore_lib STATIC ${dbstore_srcs}) + target_include_directories(dbstore_lib + PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw" + PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw/store/rados" diff --git a/sys-cluster/ceph/files/ceph-18.2.0-cython3.patch b/sys-cluster/ceph/files/ceph-18.2.0-cython3.patch new file mode 100644 index 000000000000..bfaeacea4f26 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-18.2.0-cython3.patch @@ -0,0 +1,26 @@ +diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx +index 5e14e38c919..d10dce62262 100644 +--- a/src/pybind/rbd/rbd.pyx ++++ b/src/pybind/rbd/rbd.pyx +@@ -371,10 +371,10 @@ ELSE: + cdef rados_ioctx_t convert_ioctx(rados.Ioctx ioctx) except? NULL: + return <rados_ioctx_t>ioctx.io + +-cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) with gil: ++cdef int progress_callback(uint64_t offset, uint64_t total, void* ptr) noexcept with gil: + return (<object>ptr)(offset, total) + +-cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr): ++cdef int no_op_progress_callback(uint64_t offset, uint64_t total, void* ptr) noexcept with gil: + return 0 + + def cstr(val, name, encoding="utf-8", opt=False): +@@ -426,7 +426,7 @@ RBD_MIRROR_PEER_ATTRIBUTE_NAME_KEY = decode_cstr(_RBD_MIRROR_PEER_ATTRIBUTE_NAME + + cdef class Completion + +-cdef void __aio_complete_cb(rbd_completion_t completion, void *args) with gil: ++cdef void __aio_complete_cb(rbd_completion_t completion, void *args) noexcept with gil: + """ + Callback to oncomplete() for asynchronous operations + """ diff --git a/sys-cluster/ceph/files/ceph-18.2.0-system-opentelemetry.patch b/sys-cluster/ceph/files/ceph-18.2.0-system-opentelemetry.patch new file mode 100644 index 000000000000..5e92d491dba9 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-18.2.0-system-opentelemetry.patch @@ -0,0 +1,19 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 0a841c5db37..29be0232b48 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -433,8 +433,12 @@ add_dependencies(common-objs legacy-option-headers) + + if(WITH_JAEGER) + find_package(thrift 0.13.0 REQUIRED) +- include(BuildOpentelemetry) +- build_opentelemetry() ++ find_package(opentelemetry-cpp REQUIRED) ++ set(jaeger_base ++ opentelemetry-cpp::common ++ opentelemetry-cpp::trace ++ opentelemetry-cpp::jaeger_trace_exporter ++ thrift::libthrift) + add_library(jaeger_base INTERFACE) + target_link_libraries(jaeger_base INTERFACE opentelemetry::libopentelemetry + thrift::libthrift) diff --git a/sys-cluster/ceph/files/ceph.initd-r12 b/sys-cluster/ceph/files/ceph.initd-r13 index 4a90e3c3f984..2d158ad80be3 100644 --- a/sys-cluster/ceph/files/ceph.initd-r12 +++ b/sys-cluster/ceph/files/ceph.initd-r13 @@ -29,16 +29,16 @@ start_stop_daemon_args="--user ${user} --group ${group}" supervise_daemon_args="--user ${user} --group ${group}" : "${supervisor:=supervise-daemon}" -: "${stdout:=/var/log/ceph/ceph}" -: "${stderr:=/var/log/ceph/ceph}" +: "${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}" +: "${osd_respawn_max:=10}" -: "{radosgw_respawn_max:=5}" +: "${radosgw_respawn_max:=5}" : "${radosgw_respawn_period:=30}" depend() { 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: diff --git a/sys-cluster/ceph/files/make-node-frontend-tarball.bash b/sys-cluster/ceph/files/make-node-frontend-tarball.bash deleted file mode 100644 index 0a8015ffa985..000000000000 --- a/sys-cluster/ceph/files/make-node-frontend-tarball.bash +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/bash - -frontend_path="src/pybind/mgr/dashboard/frontend" -node_dir="node_modules" -output_name_format="ceph-%s-frontend-node-modules.tar.xz" -cache_dir_format="ceph-%s-npm-cache" - -# regexes for modules to remove -remove_modules=( - "^karma.*" - "^jasmine.*" - ".+/jasmine.*" - "^tslint.*" - "^codelyzer" - "^protractor" - "^ts-node" -) - -# location to find dependencies to prune -node_dep_location="devDependencies" - -# node package files -node_package_file="package.json" -node_package_lock="package-lock.json" - -# system commands needed -dependencies=( - wget - git - gzip - jq - tar - xz -) - -check_deps() { - local dep - - for dep in "${dependencies[@]}"; do - if ! command -v "${dep}" >/dev/null; then - printf '%s: ERROR could not find required command "%s"\n' "${appname}" "${dep}" >&2 - exit 1 - fi - done - - # make sure that jq was compiled with support for regexes - if ! jq -c 'map( select(. | test("TEST"; "i")))' <<< '{"TEST": "TEST"}' >/dev/null; then - printf '%s: ERROR: jq does not support regular expressions, make sure the "oniguruma" USE flag is enabled\n' \ - "${appname}" - exit 1 - fi - : -} - -get_npm_packages() { - local tempfile jq_regex full_cache_dir - - full_cache_dir="${PWD}/${cache_dir}" - - pushd "${source_path}/${frontend_path}" > /dev/null - if [[ ! -r "${node_package_file}" ]]; then - printf '%s: ERROR: could not find "%s" in "%s"\n' "${appname}" \ - "${node_package_file}" "${frontend_path}" - exit 1 - fi - - tempfile="$(TMPDIR="." mktemp packages-XXXXX.json)" - - jq_regex="$(printf "%s|" "${remove_modules[@]}")" - - # filter out test only deps that pull in precompiled binaries - # shellcheck disable=SC2031 - jq --monochrome-output --raw-output --exit-status \ - '."'"${node_dep_location}"'"|=with_entries(select(.key|test("('"${jq_regex%|}"')")|not))' \ - "${node_package_file}" > "${tempfile}" - - # make sure output is still valid JSON - jq . --exit-status "${tempfile}" > /dev/null - - mv "${tempfile}" "${node_package_file}" - - rm -rf "${full_cache_dir:?}" "${node_dir:?}" "${node_package_lock:?}" - - npm install --ignore-scripts --cache="${full_cache_dir}" - - popd >/dev/null -} - -main() { - local appname source_path version cache_dir - - set -e - set -o pipefail - shopt -s nullglob - - appname=$(basename "${0}") - source_path="${1}" - version="${2}" - - if [[ -z ${source_path} || -z ${version} ]]; then - printf 'Syntax: %s <source directory> <version>\n' "${appname}" >&2 - return 1 - - elif [[ ! -d ${source_path} ]]; then - printf '%s: ERROR: Not a directory: %s\n' "${appname}" "${source_path}" - return 1 - fi - - check_deps - - # shellcheck disable=SC2059 - cache_dir="$(printf -- "${cache_dir_format}\\n" "${version}")" - - get_npm_packages - pack_tarball -} - -pack_tarball() { - local output - - # shellcheck disable=SC2059 - output="$(printf -- "${output_name_format}\\n" "${version}")" - - tar caf "${output}" \ - --numeric-owner \ - --anchored \ - --owner="root:0" \ - --group="root:0" \ - --exclude-vcs \ - --transform="s:^${source_path}/:ceph-${version}/:" \ - "${cache_dir}" \ - "${source_path}/${frontend_path}/${node_package_file}" \ - "${source_path}/${frontend_path}/${node_package_lock}" - - printf '%s: Output written to "%s"\n' "${appname}" "${output}" -} - -main "${@}" - -# vim:ft=sh:noet:ts=4:sts=4:sw=4: diff --git a/sys-cluster/ceph/metadata.xml b/sys-cluster/ceph/metadata.xml index 0f7b1135bd12..ee5e501736a8 100644 --- a/sys-cluster/ceph/metadata.xml +++ b/sys-cluster/ceph/metadata.xml @@ -41,5 +41,6 @@ </use> <upstream> <bugs-to>https://tracker.ceph.com/issues</bugs-to> + <remote-id type="github">ceph/ceph</remote-id> </upstream> </pkgmetadata> |