]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake,debian: enable ceph-mon-client-nvmeof on Debian derivatives 68817/head
authorKefu Chai <k.chai@proxmox.com>
Thu, 7 May 2026 02:59:11 +0000 (10:59 +0800)
committerKefu Chai <k.chai@proxmox.com>
Fri, 8 May 2026 13:28:41 +0000 (21:28 +0800)
commit62cf01d0decf7455b8cb37abfe317008dcf131a3
tree94f97f3baa8f3cb2f34bca601901685ca716795b
parent5eb650394b1a692e75370dfa6d2f9776a9823d82
cmake,debian: enable ceph-mon-client-nvmeof on Debian derivatives

5843c6b04ba gated the build on /etc/redhat-release because gRPC devel
libs weren't packaged on Debian yet. They are now (libgrpc++-dev,
protobuf-compiler-grpc), so we can finally bring Debian derivatives on
par with Fedora/RHEL and ship the NVMe-oF gateway monitor client there
too.

This change:

- drops the /etc/redhat-release sniff and unconditionally enables
  WITH_NVMEOF_GATEWAY_MONITOR_CLIENT.
- adds libgrpc++-dev and protobuf-compiler-grpc to debian/control's
  Build-Depends, plus a ceph-mon-client-nvmeof / -dbg pair so the
  binary actually gets packaged.
- adds a pkg-config fallback for gRPC discovery. Jammy's libgrpc++-dev
  (1.30.2) ships no cmake config files [1], so find_package(gRPC CONFIG
  REQUIRED) fails at configure time. Noble's libgrpc++-dev (1.51.1)
  does ship them [2], as do RHEL/Rocky packages. We now try cmake config
  first (QUIET) and fall back to pkg_check_modules(IMPORTED_TARGET
  grpc++) when it isn't found.
- patches PkgConfig::GRPCPP to carry protobuf::libprotobuf as an
  interface dependency. grpc++.pc omits protobuf from its Requires, so
  gateway.pb.cc (which calls GOOGLE_PROTOBUF_VERIFY_VERSION) would fail
  to link on the pkg-config path. The cmake-config gRPC::grpc++ declares
  this dependency properly; we match that behaviour with
  target_link_libraries(PkgConfig::GRPCPP INTERFACE protobuf::libprotobuf).
- applies HAVE_ABSEIL only on the cmake-config path (Noble, RHEL/Rocky),
  where gRPC links system absl. Without it, opentelemetry-cpp's private
  absl (inline namespace otel_v1) collides with system absl (inline
  namespace debian7) in any TU that includes both tracer.h and
  grpcpp/grpcpp.h, giving "reference to base_internal is ambiguous".
  On the pkg-config path (Jammy's gRPC 1.30.2) libabsl-dev is not
  installed, so HAVE_ABSEIL must be skipped there.

[1] https://packages.ubuntu.com/jammy/amd64/libgrpc-dev/filelist
[2] https://packages.ubuntu.com/noble/amd64/libgrpc-dev/filelist

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
debian/ceph-mon-client-nvmeof.install [new file with mode: 0644]
debian/control
src/CMakeLists.txt
win32_build.sh