commit: 26a5c5614ba477f18dfff065fd2b67bb47b34f07 Author: Z. Liu <zhixu.liu <AT> gmail <DOT> com> AuthorDate: Tue Jan 20 15:27:20 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Jan 25 06:45:35 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26a5c561
sys-cluster/ceph: update patch on opentelemetry drop ceph-18.2.0-system-opentelemetry.patch and ceph-20.1.0-opentelemetry.patch. add ceph-19.2.2-add-option-to-build-against-system-opentelemetry.patch. refactor opentelemetry handling by introducing an option to select the system-provided implementation instead of the bundled one. Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/45459 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-cluster/ceph/ceph-19.2.2-r6.ebuild | 5 +- sys-cluster/ceph/ceph-19.2.3.ebuild | 5 +- sys-cluster/ceph/ceph-20.1.0-r2.ebuild | 6 ++- sys-cluster/ceph/ceph-20.1.1.ebuild | 6 ++- .../files/ceph-18.2.0-system-opentelemetry.patch | 19 -------- ...tion-to-build-agains-system-opentelemetry.patch | 56 ++++++++++++++++++++++ .../ceph/files/ceph-20.1.0-opentelemetry.patch | 48 ------------------- 7 files changed, 72 insertions(+), 73 deletions(-) diff --git a/sys-cluster/ceph/ceph-19.2.2-r6.ebuild b/sys-cluster/ceph/ceph-19.2.2-r6.ebuild index ce05fe8c3c40..3187ab96a64a 100644 --- a/sys-cluster/ceph/ceph-19.2.2-r6.ebuild +++ b/sys-cluster/ceph/ceph-19.2.2-r6.ebuild @@ -211,7 +211,6 @@ PATCHES=( "${FILESDIR}/ceph-16.2.0-jaeger-system-boost.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.3-flags.patch" # https://bugs.gentoo.org/866165 @@ -242,6 +241,7 @@ PATCHES=( "${FILESDIR}/ceph-19.2.2-py313-3.patch" "${FILESDIR}/ceph-19.2.2-gcc15.patch" "${FILESDIR}/ceph-19.2.2-ipv6.patch" + "${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch" ) check-reqs_export_vars() { @@ -380,6 +380,9 @@ ceph_src_configure() { -DWITH_JAEGER:BOOL=$(usex jaeger) -DWITH_RADOSGW_SELECT_PARQUET:BOOL=$(usex parquet) ) + if use jaeger; then + mycmakeargs+=( -DWITH_SYSTEM_OPENTELEMETRY:BOOL=ON ) + fi else mycmakeargs+=( -DWITH_RADOSGW_SELECT_PARQUET:BOOL=OFF diff --git a/sys-cluster/ceph/ceph-19.2.3.ebuild b/sys-cluster/ceph/ceph-19.2.3.ebuild index c9339b0c6d9e..5d158d026d52 100644 --- a/sys-cluster/ceph/ceph-19.2.3.ebuild +++ b/sys-cluster/ceph/ceph-19.2.3.ebuild @@ -212,7 +212,6 @@ PATCHES=( "${FILESDIR}/ceph-16.2.0-jaeger-system-boost.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.3-flags.patch" # https://bugs.gentoo.org/866165 @@ -241,6 +240,7 @@ PATCHES=( "${FILESDIR}/ceph-19.2.2-py313-2.patch" "${FILESDIR}/ceph-19.2.2-py313-3.patch" "${FILESDIR}/ceph-19.2.2-gcc15.patch" + "${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch" ) check-reqs_export_vars() { @@ -379,6 +379,9 @@ ceph_src_configure() { -DWITH_JAEGER:BOOL=$(usex jaeger) -DWITH_RADOSGW_SELECT_PARQUET:BOOL=$(usex parquet) ) + if use jaeger; then + mycmakeargs+=( -DWITH_SYSTEM_OPENTELEMETRY:BOOL=ON ) + fi else mycmakeargs+=( -DWITH_RADOSGW_SELECT_PARQUET:BOOL=OFF diff --git a/sys-cluster/ceph/ceph-20.1.0-r2.ebuild b/sys-cluster/ceph/ceph-20.1.0-r2.ebuild index 7cccf2477889..5f1d754fa9d7 100644 --- a/sys-cluster/ceph/ceph-20.1.0-r2.ebuild +++ b/sys-cluster/ceph/ceph-20.1.0-r2.ebuild @@ -207,7 +207,6 @@ PATCHES=( "${FILESDIR}/ceph-16.2.0-jaeger-system-boost.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" # https://bugs.gentoo.org/866165 "${FILESDIR}/ceph-17.2.5-suppress-cmake-warning.patch" @@ -219,8 +218,8 @@ PATCHES=( "${FILESDIR}/ceph-18.2.4-liburing.patch" "${FILESDIR}/ceph-18.2.4-spdk.patch" "${FILESDIR}/ceph-19.2.1-isa-l.patch" + "${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch" "${FILESDIR}/ceph-20.1.0-nvmeof.patch" - "${FILESDIR}/ceph-20.1.0-opentelemetry.patch" ) check-reqs_export_vars() { @@ -357,6 +356,9 @@ ceph_src_configure() { -DWITH_JAEGER:BOOL=$(usex jaeger) -DWITH_RADOSGW_SELECT_PARQUET:BOOL=$(usex parquet) ) + if use jaeger; then + mycmakeargs+=( -DWITH_SYSTEM_OPENTELEMETRY:BOOL=ON ) + fi else mycmakeargs+=( -DWITH_RADOSGW_SELECT_PARQUET:BOOL=OFF diff --git a/sys-cluster/ceph/ceph-20.1.1.ebuild b/sys-cluster/ceph/ceph-20.1.1.ebuild index 7cccf2477889..5f1d754fa9d7 100644 --- a/sys-cluster/ceph/ceph-20.1.1.ebuild +++ b/sys-cluster/ceph/ceph-20.1.1.ebuild @@ -207,7 +207,6 @@ PATCHES=( "${FILESDIR}/ceph-16.2.0-jaeger-system-boost.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" # https://bugs.gentoo.org/866165 "${FILESDIR}/ceph-17.2.5-suppress-cmake-warning.patch" @@ -219,8 +218,8 @@ PATCHES=( "${FILESDIR}/ceph-18.2.4-liburing.patch" "${FILESDIR}/ceph-18.2.4-spdk.patch" "${FILESDIR}/ceph-19.2.1-isa-l.patch" + "${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch" "${FILESDIR}/ceph-20.1.0-nvmeof.patch" - "${FILESDIR}/ceph-20.1.0-opentelemetry.patch" ) check-reqs_export_vars() { @@ -357,6 +356,9 @@ ceph_src_configure() { -DWITH_JAEGER:BOOL=$(usex jaeger) -DWITH_RADOSGW_SELECT_PARQUET:BOOL=$(usex parquet) ) + if use jaeger; then + mycmakeargs+=( -DWITH_SYSTEM_OPENTELEMETRY:BOOL=ON ) + fi else mycmakeargs+=( -DWITH_RADOSGW_SELECT_PARQUET:BOOL=OFF 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 deleted file mode 100644 index 5e92d491dba9..000000000000 --- a/sys-cluster/ceph/files/ceph-18.2.0-system-opentelemetry.patch +++ /dev/null @@ -1,19 +0,0 @@ -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-19.2.2-add-option-to-build-agains-system-opentelemetry.patch b/sys-cluster/ceph/files/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch new file mode 100644 index 000000000000..36c92dd92d04 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch @@ -0,0 +1,56 @@ +https://github.com/ceph/ceph/pull/66924 + +From 8cf106cc799e641d51ab56cbf23903d9c994f924 Mon Sep 17 00:00:00 2001 +From: "Z. Liu" <[email protected]> +Date: Wed, 14 Jan 2026 12:08:53 +0800 +Subject: [PATCH] CMakeLists.txt: add option to build agains system + opentelemetry + +In Gentoo, if build against system opentelemetry, cmake failed with: + +> CMake Error at src/CMakeLists.txt:443 (target_link_libraries): +> The link interface of target "jaeger_base" contains: +> +> opentelemetry::libopentelemetry +> +> but the target was not found. Possible reasons include: +> +> * There is a typo in the target name. +> * A find_package call is missing for an IMPORTED target. +> * An ALIAS target is missing. + +See also: https://bugs.gentoo.org/930064 + +Signed-off-by: Z. Liu <[email protected]> + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 51842026837..19dbba5e16d 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -384,13 +384,19 @@ if(WITH_BREAKPAD) + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") + endif(WITH_BREAKPAD) + ++option(WITH_SYSTEM_OPENTELEMETRY "build against system opentelemetry" OFF) + if(WITH_JAEGER) + find_package(thrift 0.13.0 REQUIRED) +- include(BuildOpentelemetry) +- build_opentelemetry() + add_library(jaeger_base INTERFACE) +- target_link_libraries(jaeger_base INTERFACE opentelemetry::libopentelemetry +- thrift::libthrift) ++ if(WITH_SYSTEM_OPENTELEMETRY) ++ find_package(opentelemetry-cpp REQUIRED) ++ target_link_libraries(jaeger_base INTERFACE ${OPENTELEMETRY_CPP_LIBRARIES}) ++ else() ++ include(BuildOpentelemetry) ++ build_opentelemetry() ++ target_link_libraries(jaeger_base INTERFACE opentelemetry::libopentelemetry) ++ endif() ++ target_link_libraries(jaeger_base INTERFACE thrift::libthrift) + endif() + + set(mds_files) +-- +2.49.1 + diff --git a/sys-cluster/ceph/files/ceph-20.1.0-opentelemetry.patch b/sys-cluster/ceph/files/ceph-20.1.0-opentelemetry.patch deleted file mode 100644 index 5b9dcd7d1b3e..000000000000 --- a/sys-cluster/ceph/files/ceph-20.1.0-opentelemetry.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 8e0d3dc90ab7bafc59b86e9a66d08d1e2b6f3e0e Mon Sep 17 00:00:00 2001 -From: "Z. Liu" <[email protected]> -Date: Tue, 15 Apr 2025 21:48:10 +0800 -Subject: [PATCH] CMakeLists.txt: fix opentelemetry library - -otherwise, cmake failed with: - -> CMake Error at src/CMakeLists.txt:443 (target_link_libraries): -> The link interface of target "jaeger_base" contains: -> -> opentelemetry::libopentelemetry -> -> but the target was not found. Possible reasons include: -> -> * There is a typo in the target name. -> * A find_package call is missing for an IMPORTED target. -> * An ALIAS target is missing. - -See also: https://bugs.gentoo.org/930064 - -Signed-off-by: Z. Liu <[email protected]> ---- - src/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 801086e1268a1..5d30cde9790d4 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -330,7 +330,7 @@ if(WITH_JAEGER) - include(BuildOpentelemetry) - build_opentelemetry() - add_library(jaeger_base INTERFACE) -- target_link_libraries(jaeger_base INTERFACE opentelemetry::libopentelemetry -+ target_link_libraries(jaeger_base INTERFACE ${OPENTELEMETRY_CPP_LIBRARIES} - thrift::libthrift) - endif() - ---- a/src/CMakeLists.txt 2025-09-17 07:24:59.548258925 -0000 -+++ b/src/CMakeLists.txt 2025-09-17 07:28:31.449345268 -0000 -@@ -319,6 +319,7 @@ - - if(WITH_JAEGER) - find_package(thrift 0.13.0 REQUIRED) -+ find_package(prometheus-cpp REQUIRED) - find_package(opentelemetry-cpp REQUIRED) - set(jaeger_base - opentelemetry-cpp::common
