Commit Graph

629 Commits

Author SHA1 Message Date
Kefu Chai
757d192b43
Merge pull request #69726 from tchaikov/wip-drop-bluestore-pmem
blk,build: drop BlueStore PMEM support

Reviewed-by: Igor Fedotov <igor.fedotov@croit.io>
2026-07-28 13:27:17 +08:00
Kefu Chai
cf2d42d48a
Merge pull request #70189 from sunyuechi/fix-sccache-dist-status-check
cmake: fix sccache job limits when dist is unavailable

Reviewed-by: Kefu Chai <k.chai@proxmox.com>
2026-07-27 20:37:59 +08:00
Daniel Gryniewicz
77f6a3b47e
Merge pull request #68291 from dang/wip-dang-standalone
RGW Standalone build
2026-07-23 13:07:04 -04:00
ShreeJejurikar
efe54523a4 rgw: support kafka 4.x brokers
librdkafka submodule

Vendors librdkafka v2.12.1 as a submodule (default) and teaches the
notification teuthology task to set up Kafka 4.x KRaft brokers. The
distro-shipped librdkafka 1.6.1 cannot SCRAM-auth against Kafka 4.x
brokers (#75900); the bundled version fixes that. Build with
WITH_SYSTEM_RDKAFKA=ON to opt back into the distro library (floor 2.6.1).
follwinf changes needed with teh submodule:
* build kafka_stub only in case of system librdkafka
* use the same header location in submodule and system
* supress compilation warning to avoid -WError issues

2.12.1 matches Fedora(44)'s current librdkafka-devel, so the vendored copy
tracks a version that distro packagers have already vetted rather than
whichever release happens to be latest upstream.

The teuthology version matrix picks one of {3.9.2, 4.1, 4.2, 4.3} per run.
3.9.2 covers the last Zookeeper-based release for the migration cohort.
4.1/4.2/4.3 track Apache's current three supported minor lines and are
resolved to the latest patch at test time via dlcdn.apache.org/kafka/, so
new patches within a supported minor need no PR update. A new minor line
(4.4) requires renaming one YAML.
* new java version (17) is needed for kafka 4.2 and up (we wil use it on
  all version)
* kerberos task need to run before the kafka install task

After pulling this branch, fetch the new submodule:

    git submodule update --init src/librdkafka

Fixes: https://tracker.ceph.com/issues/77336

Signed-off-by: ShreeJejurikar <shreemj8@gmail.com>
Co-authored-by: Yuval Lifshitz <ylifshit@ibm.com>
2026-07-22 10:29:04 +00:00
Sun Yuechi
ae789567a2 cmake: fix sccache job limits when dist is unavailable
The "disabled" search only matches sccache's Disabled("disabled")
payload, not "dist-client feature not selected" or the NotConnected
states. Those reach the success branch, so the job counts become
SchedulerStatus-NOTFOUND, JOB_POOLS is never defined, and ninja
rejects the manifest. Key off the JSON lookup's error instead to
cover every non-dist state.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
2026-07-14 06:15:35 -07:00
Daniel Gryniewicz
5f01d5c058 RGW - Standalone - Add a standalone build target and RPM
Add a build target that builds standalone RGW in addition to normal RGW,
and add an RPM for it that only installs the necessary bits.

Signed-off-by: Daniel Gryniewicz <dang@fprintf.net>
2026-07-06 11:19:42 -04:00
Kefu Chai
80b9067286 blk,build: drop BlueStore PMEM support
BlueStore's PMEMDevice backend targets byte-addressable persistent
memory exposed as a DAX device, in practice Intel Optane DC persistent
memory. Intel Optane has been discontinued since 2021 and there is no
mainstream replacement, so the backend has effectively no hardware left
to run on. It was always experimental and has seen no functional change
since the DML/DSA offload landed in 2022; every commit to it since has
been a formatting sweep.

Keeping it builds in a chain of dependencies that nothing else needs:
libpmem, libndctl and libdaxctl, plus dml for the DSA offload that only
works on a Sapphire Rapids CPU. Remove the backend and everything tied
to it.

RBD persistent write-back cache (WITH_RBD_RWL) still uses PMDK's
libpmemobj, so the pmdk submodule, WITH_SYSTEM_PMDK, Buildpmdk and
Findpmdk stay. WITH_SYSTEM_PMDK now depends on WITH_RBD_RWL alone, and
Buildpmdk no longer builds ndctl support.

- remove the WITH_BLUESTORE_PMEM option, HAVE_BLUESTORE_PMEM and
  HAVE_LIBDML
- delete src/blk/pmem/PMEMDevice.{cc,h} and the pmem block_device_t
- drop the pmem value from the bdev_type option
- remove the --bluestore-pmem vstart flag
- drop the libpmem, libndctl and libdaxctl build deps from debian and
  rpm, keeping libpmemobj for RWL
- delete the Finddml, Findndctl and Finddaxctl cmake modules
- remove the DSA/DML and ndctl documentation

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2026-07-05 08:37:21 +08:00
Jesse F. Williamson
132c77376f Add FoundationDB client library "libfdb".
Assisted-by: Codex:GPT-5

Signed-off-by: Jesse F. Williamson <jfw@ibm.com>
2026-06-30 09:06:20 -07:00
Ronen Friedman
ebc18499af cmake: add WITH_MOLD option for Mold linker support
Add a WITH_MOLD cmake option that auto-configures the build for
the Mold linker. When enabled, cmake finds mold, sets CMAKE_LINKER,
injects -fuse-ld=mold into all linker flag variables, and sets
USING_MOLD_LINKER which gates the Mold-specific workarounds added
in the previous commit.

Usage: cmake -DWITH_MOLD=ON ...

Assisted-by: Claude <claude.ai>
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
2026-06-28 14:53:54 +00:00
Kefu Chai
6a8a0a51b2
Merge pull request #69660 from tchaikov/wip-cmake-boost-with-asan
cmake/boost: build libboost_context with BOOST_USE_ASAN

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2026-06-26 22:00:46 +08:00
Kefu Chai
a1afaa6529 cmake/boost: build libboost_context with BOOST_USE_ASAN
The ceph-api job failed under ASan: radosgw-admin aborted at startup with a
heap-buffer-overflow in boost.context's fiber resume().

  ==1155842==ERROR: AddressSanitizer: heap-buffer-overflow ... READ of size 8
    #0 boost::context::detail::fiber_activation_record::resume() fiber_ucontext.hpp:153
    #10 RGWSI_Notify::do_start(optional_yield, DoutPrefixProvider const*) svc_notify.cc:261
  0x... is located 8 bytes after 1048-byte region allocated by
    boost::context::detail::fiber_activation_record_initializer()

fiber_activation_record carries three extra members (fake_stack, stack_bottom,
stack_size) only when BOOST_USE_ASAN is defined.  Under WITH_ASAN we build
boost.context with context-impl=ucontext and give consumers BOOST_USE_ASAN and
BOOST_USE_UCONTEXT through Boost::context's INTERFACE_COMPILE_DEFINITIONS, but
we never pass BOOST_USE_ASAN to b2.  So libboost_context, which compiles
fiber_activation_record_initializer() and allocates the record, uses the
smaller no-ASan layout, while consumers that include the header (here rgw's
RGWSI_Notify::do_start via boost::asio::spawn) compile resume() with the larger
layout and read stack_bottom/stack_size past the allocation.

Pass define=BOOST_USE_ASAN to b2 so the library and its consumers agree on the
struct layout.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2026-06-24 06:44:18 +08:00
Kefu Chai
2c9b73894b cmake: factor the ASan/LSan test options into cache variables
add_ceph_test() spelled out the suppression-file paths and sanitizer flags
inline.  bin/ceph needs the same options, so lift them into CEPH_ASAN_OPTIONS
and CEPH_LSAN_OPTIONS and have add_ceph_test() consume those.  The environment
the tests run with is unchanged.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2026-06-23 23:02:05 +08:00
Kefu Chai
ca44481cdf
Merge pull request #69622 from sunyuechi/boost
cmake: define BOOST_USE_UCONTEXT tree-wide under ASan

Reviewed-by: Kefu Chai <k.chai@proxmox.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2026-06-23 07:52:23 +08:00
Sun Yuechi
5166ec6f06 cmake: define BOOST_USE_UCONTEXT tree-wide under ASan
Under WITH_ASAN Boost.Context is built ucontext-only, so consumers that
include its headers without linking Boost::context (e.g. libosd) were
still built for the fcontext backend and broke the link:

    mold: error: undefined symbol: boost::context::detail::make_fcontext

Define the backend tree-wide so every consumer agrees on it.

riscv64's ASan runtime mis-handles makecontext/swapcontext, so the
ucontext fiber backend reports false-positive heap-buffer-overflows on
fiber switch that can't be suppressed. So exclude it.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
2026-06-22 13:26:12 +08:00
Sun Yuechi
82162c04bb cmake: use the libc allocator for sanitizer builds
tcmalloc/jemalloc keep exporting the global operator new/delete even though
their malloc is shadowed by the sanitizer interceptor, so memory the sanitizer
allocated gets freed through tcmalloc and SIGSEGVs (e.g. seastar coroutine
frames). Force libc when WITH_ASAN is set.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
2026-06-22 10:57:27 +08:00
Sun Yuechi
4a7ac00601 cmake: disable Catch2 tests when Catch2 is unavailable
debhelper on noble passes -DFETCHCONTENT_FULLY_DISCONNECTED=ON, so CPM
cannot fetch Catch2 and silently skips it, leaving no Catch2 targets
behind and breaking the generate step. Fall back to WITH_CATCH2=OFF
with a warning instead.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
2026-06-10 08:17:59 +08:00
Sun Yuechi
6af1a85946 cmake: add WITH_SYSTEM_SPDK to link a system-installed SPDK
By default ceph builds the bundled src/spdk fork via BuildSPDK. Add a
WITH_SYSTEM_SPDK option that instead locates a distro-provided SPDK
through a new Findspdk.cmake (pkg-config based, modelled on
Finddpdk.cmake), exposing the same spdk::spdk target.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
2026-05-31 08:33:11 +08:00
Kefu Chai
e35375b673 cmake: add WITH_SYSTEM_JERASURE option for system jerasure and gf-complete
Add a cmake option to build ceph's erasure code plugins (ec_jerasure
and ec_shec) against system-provided jerasure and gf-complete libraries
instead of the vendored copies.

This allows downstream distributions to build with their own packaged
versions of these libraries. For instance, Debian has shipped
libjerasure-dev and libgf-complete-dev as build dependencies for ceph
since 2021, but the build always used the vendored copies because there
was no cmake option to use the system ones.

Using system libraries also lets distributions benefit from any
optimizations or fixes applied to their packages without having to
carry patches against ceph's vendored copies. For example, the vendored
gf-complete requires a downstream -O1 workaround to avoid emitting
SSE 4.1 instructions that crash on older CPUs. But with system libraries,
that becomes the library package's responsibility.

The option is OFF by default, preserving the current behavior of
building from vendored sources.

A new FindJerasure.cmake module locates the system jerasure and
gf-complete headers and libraries, and creates the Jerasure::jerasure
imported target with the same target name that the vendored build now
provides (see previous commit).

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2026-04-08 18:42:19 +08:00
Alex Ainscow
934b0470c8 CMakeLists.txt: update VERSION
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
2026-03-25 16:53:03 +00:00
Kefu Chai
9b617f518f cmake: create Boost::asio target with conditional uring support
BOOST_ASIO_HAS_IO_URING is a user-defined macro that enables io_uring
support in Boost.Asio for specific operations that explicitly opt in,
such as file I/O via basic_file (BOOST_ASIO_HAS_FILE) and buffer
registration. Unlike BOOST_ASIO_HAS_IO_URING_AS_DEFAULT, it does NOT
replace epoll as the default event loop. Currently, Ceph does not use
Boost.Asio to perform file I/O, so this macro only affects compilation,
not runtime behavior.

When BOOST_ASIO_HAS_IO_URING is defined, the umbrella header
boost/asio.hpp pulls in <liburing.h> via:

  boost/asio.hpp
    -> boost/asio/basic_file.hpp  (guarded by BOOST_ASIO_HAS_FILE)
      -> boost/asio/detail/io_uring_file_service.hpp
        -> boost/asio/detail/io_uring_descriptor_service.hpp
          -> boost/asio/detail/io_uring_service.hpp
            -> <liburing.h>

PR #50821 introduced BOOST_ASIO_HAS_IO_URING (commit 05c341b30d) as
preparation for uring-based file I/O in rgw/posix. To avoid pulling
liburing headers (which define macros like BLOCK_SIZE and DATA_OFFSET
that conflict with Ceph code) into unrelated translation units, that PR
also converted many files to use granular Boost.Asio includes instead of
the umbrella boost/asio.hpp.

However, BOOST_ASIO_HAS_IO_URING was added as a global compile
definition, and individual targets linked uring::uring directly. This
has two problems:

1. The uring::uring CMake target only exists when WITH_LIBURING=ON, so
   targets that link it unconditionally break when WITH_LIBURING=OFF.
2. The global definition causes all translation units to see
   BOOST_ASIO_HAS_IO_URING, even those that don't need io_uring.

Since neither CMake's FindBoost module nor Boost's CMake config file
defines a Boost::asio target, introduce one as an INTERFACE IMPORTED
library. When WITH_LIBURING=ON, the Boost::asio target carries the
BOOST_ASIO_HAS_IO_URING definition and uring::uring dependency; when
WITH_LIBURING=OFF, it is an empty interface. Targets that don't need
io_uring should use Boost::headers or Boost::boost instead.

This also improves code organization:

- Scope the BOOST_ASIO_HAS_IO_URING compile definition to Boost::asio
  instead of adding it globally, so only targets that actually use
  Boost.Asio with io_uring see the definition.
- Place the uring-in-Boost::asio configuration next to where we
  build/detect Boost libraries for better readability.
- Set the Boost::asio properties in a single place for better
  maintainability.

See also
- 05c341b30d
- f479bbc4bc

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2026-03-05 14:33:54 +08:00
Matan Breizman
486da05fcb CMakeLists.txt: Generalize WITH_*_LIBURING
set WITH_LIBURING if HAVE_LIBAIO without depending on BLUESTORE.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2026-02-12 10:26:16 +00:00
Matan Breizman
f95b264aab CMakeLists.txt: find aio for CRIMSON or BLUESTORE
aio is used to set WITH_LIBURING, instead of finding it twice try to
find aio if either flags are set.
Does not change existing behavior for Bluestore.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2026-02-12 10:26:16 +00:00
Matan Breizman
7240a99fe1 CMakeLists.txt: Move WITH_CRIMON before setting WITH_LIBURING
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2026-02-12 10:26:16 +00:00
Adam C. Emerson
1dfe804c84
build: Disable FindBoost for Boost's included cmake config
Boost has included this since 1.70 and CMake has deprecated the
non-config version since 3.30.

See also
https://cmake.org/cmake/help/latest/policy/CMP0167.html#policy:CMP0167

We enable CMP0167 (The `FindBoost` module is removed.) to force cmake
to use the installed Boost configuration files rather than its own
detection.

We also enable CMP0144 (`find_package()` uses upper-case
`<PACKAGENAME>_ROOT` variables.) to ensue that the `BOOST_ROOT`
parameter continues to function in the config-style `find_package`.

`BuildBoost.cmake` is updated to add the `Boost::headers` interface
target to match configured system boost (retaining the Boost::boost
alias).

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2026-01-14 23:54:08 -05:00
Kefu Chai
2940938b8c cmake: remove Boost::system linkage for boost 1.89+
In boost 1.89, the stub compiled library for Boost.System was removed.
According to the boost 1.89 release notes: "The stub compiled library
has been removed; System has been header-only since release 1.69.",
See https://www.boost.org/releases/1.89.0/ .

This change removes or replaces Boost::system linkage throughout the
codebase:

1. Removed "system" from BOOST_COMPONENTS in the root CMakeLists.txt,
   as the library no longer exists in boost 1.89+.

2. Where Boost::system was the only linked boost library, replaced it
   with Boost::boost (the header-only meta-target) to maintain access
   to Boost.System's header-only functionality.

3. Where other boost libraries were already linked (e.g., Boost::thread,
   Boost::regex, Boost::filesystem), removed Boost::system entirely, as
   the header-only System library dependency is automatically satisfied
   by other boost components.

This is not a breaking change since the minimum required boost version
for this project is 1.87, where Boost.System was already header-only
(only the stub compiled library remained for compatibility).

Signed-off-by: Kefu Chai <kchai@redhat.com>
2026-01-13 14:04:38 +08:00
Venky Shankar
25311b412d Merge PR #65495 into main
* refs/pull/65495/head:

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
2026-01-07 16:03:36 +05:30
Kefu Chai
93822d3c6b cmake: clarify WITH_CRIMSON help text
The help text for WITH_CRIMSON previously read "Build seastar
components", which referenced the underlying C++ framework rather
than the user-facing functionality. This was confusing because users
care about Ceph features, not implementation details.

Change the help text to reference "Crimson" directly and explicitly
state the default value, making the option's purpose clearer to users.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2026-01-06 16:37:48 +08:00
Mahesh Mohan
119fe91494 cephfs offline tools: add ETA logic in relevant commands
Adding a new progress tracking class in the cephfs offline tools dir that is consumed by multiple
utilities namely cephfs-data-scan, cephfs-journal-tool, cephfs-table-tool.

Multiple commands under each utility now have progress tracking included by default.
The progress tracking is not option based- i.e. no "--progress" option required.
This is because if we keep it option based and the user forgets to include the option while
firing the command, then the only recourse is to kill the execution and restart. This is not
suitable for state changing operations, hence better to include progress tracking by default.

Exact command list where progress tracking is included is specified in the tracker.
Testing updates also posted in tracker, initial testing with single and multi-threaded
loads on FS with 4M objects succeeded for cephfs-data-scan.

- Updated DataScan to use worker_n and worker_m for better clarity and functionality.
- Added set_progress_operation_name method to manage operation names during progress tracking.
- Enhanced ProgressTracker with new methods for detailed progress reporting and ETA calculations.
- Improved thread safety and performance in progress updates.
- Added terminal width detection and line padding for better display.
- Introduced write_console_line function to manage console output.
- Updated progress display logic to throttle updates based on time.
- Removed display_interval variable to streamline progress updates.

Fixes: https://tracker.ceph.com/issues/63191
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>

Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
2025-12-09 13:05:35 -05:00
Casey Bodley
3d04c97d79 cmake: fix for -DWITH_BREAKPAD=OFF
in 1ba55a20be, i tried to avoid the NOT
condition by swapping the option's defaults. but when the condition is
false, the option is forced to ON even if the user manually set it OFF

fix this by inverting the condition and swapping the default values

Reported-by: Joseph Mundackal <joseph.j.mundackal@gmail.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2025-12-01 11:26:02 -05:00
Casey Bodley
ca892e3a4c cmake: disable WITH_BREAKPAD on power arch
Reported-by: T K Chandra Hasan <t.k.chandra.hasan@ibm.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2025-11-25 09:55:35 -05:00
Casey Bodley
1ba55a20be cmake: use cmake_dependent_option for WITH_BREAKPAD
a bit simpler without the WITH_BREAKPAD_DEFAULT part, and causes the
WITH_BREAKPAD option to be hidden from cmake-gui on WIN32

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2025-11-25 09:55:35 -05:00
Casey Bodley
370f94e9b0
Merge pull request #65795 from cbodley/wip-cmake-rgw-posix-dbstore
cmake/rgw: WITH_RADOSGW_POSIX depends on WITH_RADOSGW_DBSTORE

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2025-11-07 09:14:47 -05:00
Casey Bodley
d74678e0a8 cmake: fix checks for WITH_SYSTEM_QATLIB
commit 3068123667 introduced the cmake
option WITH_SYSTEM_QATLIB, but the checks were based on nonexistent
variable WITH_SYSTEM_QAT

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2025-10-31 11:27:04 -04:00
Jaya Prakash
905d2a0714 common: add admin socket control and CMake flag for cputrace
- Introduced a separate CMake flag to enable cputrace:
    cmake -DWITH_CPUTRACE=1 ...

- Added admin socket interface for runtime control:
    - `ceph tell osd.X cputrace start`   โ†’ Start profiling
    - `ceph tell osd.X cputrace stop`    โ†’ Stop profiling
    - `ceph tell osd.X cputrace dump`    โ†’ Dump collected metrics
    - `ceph tell osd.X cputrace reset`   โ†’ Reset profiling state

This enables developers to dynamically control profiling during runtime
without rebuilding or restarting the OSD, and ensures `cputrace` remains
disabled in production unless explicitly enabled at build time.

Signed-off-by: Jaya Prakash <jayaprakash@ibm.com>
2025-10-07 14:13:47 +00:00
Casey Bodley
470f5e856c cmake/rgw: WITH_RADOSGW_POSIX depends on WITH_RADOSGW_DBSTORE
with WITH_RADOSGW_DBSTORE=OFF, the posix backend fails to link with:

> /usr/bin/ld: cannot find -ldbstore: No such file or directory

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2025-10-06 12:07:09 -04:00
Kefu Chai
a302ae7fe3 cmake: replace WITH_SEASTAR with WITH_CRIMSON
Remove the deprecated WITH_SEASTAR CMake option and replace all
references with WITH_CRIMSON for consistency. Although WITH_SEASTAR
was functionally replaced in commit 23c33f69, it remained in the
source tree. This change completes the migration by removing the
old option entirely and standardizing on WITH_CRIMSON throughout
the codebase.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2025-06-30 10:08:09 +08:00
Daniel Gryniewicz
df5c005dd4
Merge pull request #61850 from AliMasarweh/wip-alimasa-rgw-standalone
RGW/standalone: Build without RadosStore
2025-06-18 13:03:12 -04:00
Kefu Chai
448633e325 cmake: use find_program(REQUIRED) to fail early on missing programs
Since upgrading minimum CMake version to 3.22.1 (commit 469d82a1), we can
now use find_program(REQUIRED) which was introduced in CMake 3.18.

This change replaces manual FATAL_ERROR checks with the REQUIRED option
and adds it to programs that are actually needed during the build. This
ensures the build fails early during configuration rather than later
during compilation when missing programs are invoked.

Changes:
- Replace find_program() + message(FATAL_ERROR) patterns with REQUIRED
- Add REQUIRED to programs that are used during build but previously
  had no error checking

Reference: https://cmake.org/cmake/help/latest/command/find_program.html

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2025-06-17 17:30:10 +08:00
Kefu Chai
469d82a1f3 cmake: bump minimum required CMake version to 3.22.1
Bump the minimum required CMake version from 3.5 to 3.22.1 in both
Ceph and embedded dmclock to address deprecation warnings.

CMake 4.0.2 generates deprecation warnings for projects requiring
versions below 3.10:

```
CMake Deprecation Warning at src/dmclock/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.
```

The upstream CI workflow uses Ubuntu 22.04 (CMake 3.22.1) and CentOS 9
(CMake 3.26.5), so bumping to 3.22.1 maintains compatibility with our
supported build environments while enabling access to newer CMake
features.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2025-06-13 16:23:49 +08:00
Jesse Williamson
5611721793
Merge pull request #61264 from irq0/wip/breakpad
Breakpad Crash Handler
2025-06-02 09:17:43 -07:00
Ali Masarwa
71799fb6f3 RGW/standalone: Build without RadosStore
Signed-off-by: Ali Masarwa <amasarwa@redhat.com>
2025-05-29 15:07:07 +03:00
Marcel Lauhoff
a451047c17 cmake: Make breakpad build conditional (WITH_BREAKPAD)
Add option WITH_BREAKPAD defaulting to TRUE on non-windows platforms.

Signed-off-by: Marcel Lauhoff <marcel.lauhoff@clyso.com>
2025-05-13 12:39:46 +02:00
Matan Breizman
2e6ef87402 common/version: --version to output BUILD_TYPE
```
$ ceph-osd --version
ceph version 20.0.0-514-g7a036c6b017 (7a036c6b01) tentacle (dev - Debug)
```

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2025-05-08 12:54:19 +00:00
Matan Breizman
c5766bb2c4 CMakeLists: Fallback to RelWithDebInfo
Currently, if .git exists, we set CMAKE_BUILD_TYPE=Debug.
Otherwise, we leave it empty and no optimization flags will
be used.
With this change, the fallback CMAKE_BUILD_TYPE is set
to RelWithDebInfo instead.

From CMAKE_BUILD_TYPE manual:
The default value is often an empty string, but this is usually not
desirable and one of the other standard build types is usually more appropriate.

Note: One notable change is that -DNDEBUG will now be defined.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2025-05-08 12:38:11 +00:00
Jesse F. Williamson
12664b615e Add support for Catch2
Makes Catch2 available for C++ unit tests;
Adds GPM script availability to CMake.
Adds rudimentary test for rgw_hex.

Signed-off-by: Jesse F. Williamson <jfw@ibm.com>
2025-05-02 10:54:58 -07:00
Matan Breizman
23c33f69ff src: sed -i 's/WITH_SEASTAR/WITH_CRIMSON/'
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2025-04-03 07:53:15 +00:00
Kefu Chai
588a74c95d cmake: do not pass PRE_BUILD to add_custom_command(OUTPUT)
Removes the invalid PRE_BUILD argument from add_custom_command(OUTPUT)
calls that was triggering CMake warnings. The PRE_BUILD option is only
valid for target-based custom commands and specifically with Visual
Studio generators.

Additionally sets the CMP0175 policy to NEW to ensure CMake fails on
invalid arguments to add_custom_command(), helping catch similar issues
earlier in the development process.

This change:

- Removes unnecessary PRE_BUILD argument from OUTPUT-based custom commands
- Sets CMP0175 policy to enforce validation of add_custom_command() arguments
- Resolves CMake warning in src/common/options/CMakeLists.txt

Reference:
https://cmake.org/cmake/help/latest/command/add_custom_command.html#build-events

The CMake warning looks like:

```
CMake Warning (dev) at src/common/options/CMakeLists.txt:34 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(OUTPUT): PRE_BUILD.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  src/common/options/CMakeLists.txt:85 (add_options)
This warning is for project developers.  Use -Wno-dev to suppress it.
```

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2025-03-30 10:19:54 +08:00
Adam C. Emerson
b446290f44
build: Upgrade to Boost 1.87
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2025-03-12 10:28:22 -04:00
Casey Bodley
70eb1d64ac cmake/cephfs: fix options to enable client and dependencies
invoking cmake with -DWITH_LIBCEPHFS=OFF fails to configure the client target:

CMake Error at src/client/CMakeLists.txt:13 (target_link_libraries):
  Target "client" links to:

    Boost::locale

  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.

because the client target is not conditional on WITH_LIBCEPHFS in src/CMakeLists.txt:

add_subdirectory(client)

if(WITH_LIBCEPHFS)

because client is also needed for ceph-fuse, make the client and its
dependencies depend on WITH_LIBCEPHFS OR WITH_FUSE

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2025-03-05 13:23:18 -05:00
Patrick Donnelly
58ab881ad5
Merge PR #61321 into main
* refs/pull/61321/head:
	qa: update require-osd-release to tentacle
	tools/monmaptool: bump new cluster version to X
	doc/dev/release-checklists: remove ceph-container task
	script/ceph-release-notes: add squid/tentacle
	doc/dev/release-checklists:: mark task complete
	doc/dev/release-checklist: add nightlies task
	doc/dev/release-checklists: update ceph-build for tentacle
	doc/dev/release-checklists: note redmine is done
	qa: update to tentacle
	doc/dev/release-checklist: question telemetry tentacle test
	osd/OSDMap: update to tentacle
	qa/workunits/cephtool/test: update to tentacle
	mon/OSDMonitor: update to tentacle
	common/options/global.yaml.in: update for tentacle
	mon/MgrMonitor: update for tentacle
	qa/standalone/mon/misc: update for tentacle
	doc: update compatset for tentacle
	doc: no deprecated features
	include/ceph_features: add SERVER_TENTACLE feature bit
	cephadm,ceph-volume: update to tentacle
	doc/dev/release-checklist: add backport-create-issue
	script: update backport-resolve-issue to tentacle
	*: add constants and release names
	ceph_release: update to tentacle
	librbd: bump version
	CMakeLists.txt: update VERSION
	doc: remove obsolete checklist item
	doc: reset for tentacle

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Bill Scales <bill_scales@uk.ibm.com>
Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
2025-03-03 08:34:59 -05:00