import ceph-16.2.4-5.el9

This commit is contained in:
CentOS Sources 2021-11-03 12:28:58 -04:00 committed by Stepan Oksanichenko
commit b59d68ef37
17 changed files with 2521 additions and 0 deletions

1
.ceph.metadata Normal file
View File

@ -0,0 +1 @@
3f715e71b2a6d0cd9fbdc390b50f95a1303a1026 SOURCES/ceph-16.2.4.tar.gz

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/ceph-16.2.4.tar.gz

View File

@ -0,0 +1,55 @@
--- ceph-15.2.2/src/common/crc32c_intel_fast_zero_asm.s.orig 2020-05-26 08:34:32.226201974 -0400
+++ ceph-15.2.2/src/common/crc32c_intel_fast_zero_asm.s 2020-05-26 17:19:32.497201974 -0400
@@ -1,5 +1,5 @@
;
-; Copyright 2012-2013 Intel Corporation All Rights Reserved.
+; Copyright 2012-2015 Intel Corporation All Rights Reserved.
; All rights reserved.
;
; http://opensource.org/licenses/BSD-3-Clause
@@ -59,6 +59,19 @@
xor rbx, rbx ;; rbx = crc1 = 0;
xor r10, r10 ;; r10 = crc2 = 0;
+ cmp len, %%bSize*3*2
+ jbe %%non_prefetch
+
+ %assign i 0
+ %rep %%bSize/8 - 1
+ crc32 rax, bufptmp ;; update crc0
+ crc32 rbx, bufptmp ;; update crc1
+ crc32 r10, bufptmp ;; update crc2
+ %assign i (i+8)
+ %endrep
+ jmp %%next %+ %1
+
+%%non_prefetch:
%assign i 0
%rep %%bSize/8 - 1
crc32 rax, bufptmp ;; update crc0
@@ -66,6 +79,8 @@
crc32 r10, bufptmp ;; update crc2
%assign i (i+8)
%endrep
+
+%%next %+ %1:
crc32 rax, bufptmp ;; update crc0
crc32 rbx, bufptmp ;; update crc1
; SKIP ;crc32 r10, bufptmp ;; update crc2
@@ -180,12 +195,15 @@
%define crc_init_dw r8d
%endif
-
+ endbranch
push rdi
push rbx
mov rax, crc_init ;; rax = crc_init;
+ cmp len, 8
+ jb less_than_8
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 1) ALIGN: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View File

@ -0,0 +1,13 @@
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 65ba10b0f1..eeedc29c37 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -165,7 +165,7 @@ elseif(HAVE_ARMV8_CRC)
crc32c_aarch64.c)
endif(HAVE_INTEL)
-add_library(crc32 ${crc32_srcs})
+add_library(crc32 STATIC ${crc32_srcs})
if(HAVE_ARMV8_CRC)
set_target_properties(crc32 PROPERTIES
COMPILE_FLAGS "${CMAKE_C_FLAGS} ${ARMV8_CRC_COMPILE_FLAGS}")

View File

@ -0,0 +1,21 @@
--- ceph-15.1.0/src/common/bit_str.h.orig 2020-02-03 09:47:20.047149798 -0500
+++ ceph-15.1.0/src/common/bit_str.h 2020-02-03 09:47:50.213149798 -0500
@@ -17,6 +17,7 @@
#include <cstdint>
#include <iosfwd>
#include <functional>
+#include <ostream>
namespace ceph {
class Formatter;
--- ceph-15.2.4/src/global/signal_handler.h.orig 2020-07-17 12:57:54.763628429 -0400
+++ ceph-15.2.4/src/global/signal_handler.h 2020-07-17 12:58:10.610628429 -0400
@@ -16,6 +16,8 @@
#define CEPH_GLOBAL_SIGNAL_HANDLER_H
#include <signal.h>
+#include <string>
+
#include "acconfig.h"
typedef void (*signal_handler_t)(int);

View File

@ -0,0 +1,11 @@
--- ceph-16.1.0-43-g6b74fb5c/src/blk/CMakeLists.txt.orig 2021-02-01 08:16:26.719517641 -0500
+++ ceph-16.1.0-43-g6b74fb5c/src/blk/CMakeLists.txt 2021-02-01 08:16:47.810092341 -0500
@@ -25,7 +25,7 @@
zoned/HMSMRDevice.cc)
endif()
-add_library(blk ${libblk_srcs})
+add_library(blk STATIC ${libblk_srcs})
target_include_directories(blk PRIVATE "./")
if(HAVE_LIBAIO)

View File

@ -0,0 +1,11 @@
--- ceph-16.1.0-43-g6b74fb5c/src/test/neorados/CMakeLists.txt.orig 2021-02-01 08:25:18.006965821 -0500
+++ ceph-16.1.0-43-g6b74fb5c/src/test/neorados/CMakeLists.txt 2021-02-01 08:25:34.244407147 -0500
@@ -19,7 +19,7 @@
target_link_libraries(ceph_test_neorados_op_speed
libneorados fmt::fmt ${unittest_libs})
-add_library(neoradostest-support common_tests.cc)
+add_library(neoradostest-support STATIC common_tests.cc)
target_link_libraries(neoradostest-support
libneorados fmt::fmt)

View File

@ -0,0 +1,11 @@
--- ceph-16.1.0-43-g6b74fb5c/cmake/modules/Finduring.cmake.orig 2021-02-01 08:45:39.316108287 -0500
+++ ceph-16.1.0-43-g6b74fb5c/cmake/modules/Finduring.cmake 2021-02-01 08:45:59.813665378 -0500
@@ -5,7 +5,7 @@
# uring_FOUND - True if uring found.
find_path(URING_INCLUDE_DIR liburing.h)
-find_library(URING_LIBRARIES liburing.a liburing)
+find_library(URING_LIBRARIES liburing.so liburing)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(uring DEFAULT_MSG URING_LIBRARIES URING_INCLUDE_DIR)

View File

@ -0,0 +1,63 @@
From 178f6bdac97b57300bbe0956633cf686a7e3ccee Mon Sep 17 00:00:00 2001
From: Yuval Lifshitz <ylifshit@redhat.com>
Date: Fri, 12 Mar 2021 08:56:45 +0200
Subject: [PATCH] librgw/notifications: initialize kafka and amqp
Fixes: https://tracker.ceph.com/issues/49738
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
---
src/rgw/librgw.cc | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/src/rgw/librgw.cc b/src/rgw/librgw.cc
index 012cc54c3b..a5351dbe7c 100644
--- a/src/rgw/librgw.cc
+++ b/src/rgw/librgw.cc
@@ -53,6 +53,12 @@
#include "rgw_http_client.h"
#include "rgw_http_client_curl.h"
#include "rgw_perf_counters.h"
+#ifdef WITH_RADOSGW_AMQP_ENDPOINT
+#include "rgw_amqp.h"
+#endif
+#ifdef WITH_RADOSGW_KAFKA_ENDPOINT
+#include "rgw_kafka.h"
+#endif
#include "services/svc_zone.h"
@@ -617,6 +623,17 @@ namespace rgw {
/* ignore error */
}
+#ifdef WITH_RADOSGW_AMQP_ENDPOINT
+ if (!rgw::amqp::init(cct.get())) {
+ derr << "ERROR: failed to initialize AMQP manager" << dendl;
+ }
+#endif
+#ifdef WITH_RADOSGW_KAFKA_ENDPOINT
+ if (!rgw::kafka::init(cct.get())) {
+ derr << "ERROR: failed to initialize Kafka manager" << dendl;
+ }
+#endif
+
return 0;
} /* RGWLib::init() */
@@ -645,6 +662,12 @@ namespace rgw {
rgw_shutdown_resolver();
rgw_http_client_cleanup();
rgw::curl::cleanup_curl();
+#ifdef WITH_RADOSGW_AMQP_ENDPOINT
+ rgw::amqp::shutdown();
+#endif
+#ifdef WITH_RADOSGW_KAFKA_ENDPOINT
+ rgw::kafka::shutdown();
+#endif
rgw_perf_stop(g_ceph_context);
--
2.26.2

View File

@ -0,0 +1,57 @@
From 3aa31813980d22719277a04797df48310acdff66 Mon Sep 17 00:00:00 2001
From: Jonas Jelten <jj@sft.lol>
Date: Mon, 15 Mar 2021 23:21:07 +0100
Subject: [PATCH] os/bluestore: strip trailing slash for directory listings
Calls to BlueRocksEnv::GetChildren may contain a trailing / in the
queried directory, which is stripped away with this patch.
If it's not stripped, the directory entry is not found in BlueFS:
```
10 bluefs readdir db/
20 bluefs readdir dir db/ not found
3 rocksdb: [db/db_impl/db_impl_open.cc:1785] Persisting Option File error: OK
```
Fixes: https://tracker.ceph.com/issues/49815
Signed-off-by: Jonas Jelten <jj@sft.lol>
---
src/os/bluestore/BlueFS.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc
index ea39626aef..62b9d27f58 100644
--- a/src/os/bluestore/BlueFS.cc
+++ b/src/os/bluestore/BlueFS.cc
@@ -3493,9 +3493,14 @@
int BlueFS::readdir(const string& dirname, vector<string> *ls)
{
+ std::string dname = dirname;
+ // dirname may contain a trailing /
+ if (!dname.empty() && dname.back() == '/') {
+ dname.pop_back();
+ }
std::lock_guard l(lock);
- dout(10) << __func__ << " " << dirname << dendl;
- if (dirname.empty()) {
+ dout(10) << __func__ << " " << dname << dendl;
+ if (dname.empty()) {
// list dirs
ls->reserve(dir_map.size() + 2);
for (auto& q : dir_map) {
@@ -3503,9 +3508,9 @@
}
} else {
// list files in dir
- map<string,DirRef>::iterator p = dir_map.find(dirname);
+ map<string,DirRef>::iterator p = dir_map.find(dname);
if (p == dir_map.end()) {
- dout(20) << __func__ << " dir " << dirname << " not found" << dendl;
+ dout(20) << __func__ << " dir " << dname << " not found" << dendl;
return -ENOENT;
}
DirRef dir = p->second;
--
2.26.2

View File

@ -0,0 +1,23 @@
--- a/src/test/rgw/amqp_mock.cc
+++ b/src/test/rgw/amqp_mock.cc
@@ -291,7 +291,11 @@ amqp_confirm_select_ok_t* amqp_confirm_select(amqp_connection_state_t state, amq
return state->confirm;
}
-int amqp_simple_wait_frame_noblock(amqp_connection_state_t state, amqp_frame_t *decoded_frame, struct timeval* tv) {
+extern "C" {
+
+int amqp_simple_wait_frame_noblock(amqp_connection_state_t state,
+ amqp_frame_t *decoded_frame,
+ const struct timeval* tv) {
if (state->socket && state->socket->open_called &&
state->login_called && state->channel1 && state->channel2 && state->exchange &&
state->queue && state->consume && state->confirm && !FAIL_NEXT_READ) {
@@ -345,6 +349,7 @@ int amqp_simple_wait_frame_noblock(amqp_connection_state_t state, amqp_frame_t *
}
return AMQP_STATUS_CONNECTION_CLOSED;
}
+} // extern "C"
amqp_basic_consume_ok_t* amqp_basic_consume(
amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue,

View File

@ -0,0 +1,11 @@
--- ceph-16.2.4/src/compressor/snappy/SnappyCompressor.h.orig 2021-05-26 08:30:26.205447315 -0400
+++ ceph-16.2.4/src/compressor/snappy/SnappyCompressor.h 2021-05-26 08:31:22.570443033 -0400
@@ -97,7 +97,7 @@
if (qat_enabled)
return qat_accel.decompress(p, compressed_len, dst, compressor_message);
#endif
- snappy::uint32 res_len = 0;
+ std::uint32_t res_len = 0;
BufferlistSource source_1(p, compressed_len);
if (!snappy::GetUncompressedLength(&source_1, &res_len)) {
return -1;

View File

@ -0,0 +1,52 @@
From 00e90946e6ffc0bb5bf11f02d6fd8993974e8159 Mon Sep 17 00:00:00 2001
From: Kefu Chai <kchai@redhat.com>
Date: Sat, 24 Jul 2021 00:09:58 +0800
Subject: [PATCH 1/3] osdc/Objecter: move LingerOp's ctor to .cc
so the linkage of fmt::fmt does not spill out to other compilation
units.
Signed-off-by: Kefu Chai <kchai@redhat.com>
---
src/osdc/Objecter.cc | 7 +++++++
src/osdc/Objecter.h | 6 +-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc
index d935b73adb9..da25c584f79 100644
--- a/src/osdc/Objecter.cc
+++ b/src/osdc/Objecter.cc
@@ -4722,6 +4722,13 @@ void Objecter::handle_command_reply(MCommandReply *m)
m->put();
}
+Objecter::LingerOp::LingerOp(Objecter *o, uint64_t linger_id)
+ : objecter(o),
+ linger_id(linger_id),
+ watch_lock(ceph::make_shared_mutex(
+ fmt::format("LingerOp::watch_lock #{}", linger_id)))
+{}
+
void Objecter::submit_command(CommandOp *c, ceph_tid_t *ptid)
{
shunique_lock sul(rwlock, ceph::acquire_unique);
diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h
index 5af605913c0..163a3359de7 100644
--- a/src/osdc/Objecter.h
+++ b/src/osdc/Objecter.h
@@ -2304,11 +2304,7 @@ public:
watch_pending_async.pop_front();
}
- explicit LingerOp(Objecter *o, uint64_t linger_id)
- : objecter(o), linger_id(linger_id),
- watch_lock(ceph::make_shared_mutex(
- fmt::format("LingerOp::watch_lock #{}", linger_id))) {}
-
+ LingerOp(Objecter *o, uint64_t linger_id);
const LingerOp& operator=(const LingerOp& r) = delete;
LingerOp(const LingerOp& o) = delete;
--
2.31.1

View File

@ -0,0 +1,185 @@
From d8aa71fe943d379590e5d029357a12f667ad2a73 Mon Sep 17 00:00:00 2001
From: Kefu Chai <kchai@redhat.com>
Date: Fri, 23 Jul 2021 17:52:12 +0800
Subject: [PATCH 2/3] cmake: add an option "WITH_FMT_HEADER_ONLY"
in this change:
* an interface library named "fmt-header-only" is introduced. it brings
the support to the header only fmt library.
* fmt::fmt is renamed to fmt
* an option named "WITH_FMT_HEADER_ONLY" is introduced
* fmt::fmt is an alias of "fmt-header-only" if "WITH_FMT_HEADER_ONLY"
is "ON", and an alias of "fmt" otherwise.
because fmt is packaged in EPEL, while librados is packaged
in RHEL, so we cannot have fmt as a runtime dependency of librados.
to address this issue an option "WITH_FMT_HEADER_ONLY" is introduced, so
that we can enable it when building Ceph with the header version of fmt.
and the built packages won't have runtime dependency of fmt.
Signed-off-by: Kefu Chai <kchai@redhat.com>
---
cmake/modules/Findfmt.cmake | 22 ++++++++++++++++++++--
src/CMakeLists.txt | 11 +++++++++++
src/common/CMakeLists.txt | 1 +
src/mon/CMakeLists.txt | 5 ++++-
src/msg/CMakeLists.txt | 1 +
src/neorados/CMakeLists.txt | 2 ++
src/osd/CMakeLists.txt | 2 +-
src/tools/CMakeLists.txt | 2 +-
8 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/cmake/modules/Findfmt.cmake b/cmake/modules/Findfmt.cmake
index 747d924e901..734c2b0571c 100644
--- a/cmake/modules/Findfmt.cmake
+++ b/cmake/modules/Findfmt.cmake
@@ -35,9 +35,27 @@ mark_as_advanced(
fmt_VERSION_STRING)
if(fmt_FOUND AND NOT (TARGET fmt::fmt))
- add_library(fmt::fmt UNKNOWN IMPORTED)
- set_target_properties(fmt::fmt PROPERTIES
+ add_library(fmt-header-only INTERFACE)
+ set_target_properties(fmt-header-only PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${fmt_INCLUDE_DIR}"
+ INTERFACE_COMPILE_DEFINITIONS FMT_HEADER_ONLY=1
+ INTERFACE_COMPILE_FEATURES cxx_std_11)
+
+ add_library(fmt UNKNOWN IMPORTED GLOBAL)
+ set_target_properties(fmt PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${fmt_INCLUDE_DIR}"
+ INTERFACE_COMPILE_FEATURES cxx_std_11
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${fmt_LIBRARY}")
+
+ if(WITH_FMT_HEADER_ONLY)
+ # please note, this is different from how upstream defines fmt::fmt.
+ # in order to force 3rd party libraries to link against fmt-header-only if
+ # WITH_FMT_HEADER_ONLY is ON, we have to point fmt::fmt to fmt-header-only
+ # in this case.
+ add_library(fmt::fmt ALIAS fmt-header-only)
+ else()
+ add_library(fmt::fmt ALIAS fmt)
+ endif()
+
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2a80566150c..c4d73633ed8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -304,6 +304,7 @@ add_subdirectory(json_spirit)
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/xxHash")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/rapidjson/include")
+option(WITH_FMT_HEADER_ONLY "use header-only version of fmt library" OFF)
find_package(fmt 6.0.0 QUIET)
if(fmt_FOUND)
include_directories(SYSTEM "${fmt_INCLUDE_DIR}")
@@ -360,6 +361,15 @@ if(WITH_SEASTAR)
add_subdirectory(crimson)
endif()
+function(compile_with_fmt target)
+ get_target_property(fmt_compile_definitions
+ fmt::fmt INTERFACE_COMPILE_DEFINITIONS)
+ if(fmt_compile_definitions)
+ target_compile_definitions(${target} PUBLIC
+ ${fmt_compile_definitions})
+ endif()
+endfunction()
+
set(libcommon_files
${CMAKE_BINARY_DIR}/src/include/ceph_ver.h
ceph_ver.c
@@ -396,6 +406,7 @@ endif()
set_source_files_properties(ceph_ver.c
APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/src/include/ceph_ver.h)
add_library(common-objs OBJECT ${libcommon_files})
+compile_with_fmt(common-objs)
if(WITH_JAEGER)
find_package(yaml-cpp 0.6.0)
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 6f29dfef350..7482b3d072a 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -177,6 +177,7 @@ target_compile_definitions(common-common-objs PRIVATE
"CEPH_LIBDIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\""
"CEPH_PKGLIBDIR=\"${CEPH_INSTALL_FULL_PKGLIBDIR}\""
"CEPH_DATADIR=\"${CEPH_INSTALL_DATADIR}\"")
+compile_with_fmt(common-common-objs)
set(common_mountcephfs_srcs
armor.c
diff --git a/src/mon/CMakeLists.txt b/src/mon/CMakeLists.txt
index 088fa6a0cdd..b4056fdb1ec 100644
--- a/src/mon/CMakeLists.txt
+++ b/src/mon/CMakeLists.txt
@@ -33,7 +33,10 @@ endif()
add_library(mon STATIC
${lib_mon_srcs})
-target_link_libraries(mon kv heap_profiler)
+target_link_libraries(mon
+ kv
+ heap_profiler
+ fmt::fmt)
if(WITH_JAEGER)
target_link_libraries(mon jaeger-base)
endif()
diff --git a/src/msg/CMakeLists.txt b/src/msg/CMakeLists.txt
index e6d0b589b42..9cca15c8155 100644
--- a/src/msg/CMakeLists.txt
+++ b/src/msg/CMakeLists.txt
@@ -38,6 +38,7 @@ if(HAVE_RDMA)
endif()
add_library(common-msg-objs OBJECT ${msg_srcs})
+compile_with_fmt(common-msg-objs)
target_include_directories(common-msg-objs PRIVATE ${OPENSSL_INCLUDE_DIR})
if(WITH_DPDK)
diff --git a/src/neorados/CMakeLists.txt b/src/neorados/CMakeLists.txt
index 50272374d2b..8695b48f0f9 100644
--- a/src/neorados/CMakeLists.txt
+++ b/src/neorados/CMakeLists.txt
@@ -1,7 +1,9 @@
add_library(neorados_objs OBJECT
RADOSImpl.cc)
+compile_with_fmt(neorados_objs)
add_library(neorados_api_obj OBJECT
RADOS.cc)
+compile_with_fmt(neorados_api_obj)
add_library(libneorados STATIC
$<TARGET_OBJECTS:neorados_api_obj>
diff --git a/src/osd/CMakeLists.txt b/src/osd/CMakeLists.txt
index 0d0ca63b347..373456fc65d 100644
--- a/src/osd/CMakeLists.txt
+++ b/src/osd/CMakeLists.txt
@@ -50,7 +50,7 @@ endif()
add_library(osd STATIC ${osd_srcs})
target_link_libraries(osd
PUBLIC dmclock::dmclock Boost::MPL
- PRIVATE os heap_profiler cpu_profiler ${CMAKE_DL_LIBS})
+ PRIVATE os heap_profiler cpu_profiler fmt::fmt ${CMAKE_DL_LIBS})
if(WITH_LTTNG)
add_dependencies(osd osd-tp pg-tp)
endif()
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 1a92898c571..fdfde4f34ef 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -20,7 +20,7 @@ if(NOT WIN32)
set(neorados_srcs
neorados.cc)
add_executable(neorados ${neorados_srcs})
- target_link_libraries(neorados libneorados spawn ${CMAKE_DL_LIBS})
+ target_link_libraries(neorados libneorados spawn fmt::fmt ${CMAKE_DL_LIBS})
#install(TARGETS neorados DESTINATION bin)
endif()
--
2.31.1

View File

@ -0,0 +1,40 @@
From 84b4c8fbff60f534ce14db050b321b8c7c62f7dd Mon Sep 17 00:00:00 2001
From: Kefu Chai <kchai@redhat.com>
Date: Fri, 23 Jul 2021 18:02:36 +0800
Subject: [PATCH 3/3] ceph.spec.in: build with header only fmt on RHEL
because fmt is packaged in EPEL, while librados is packaged
in RHEL, so we cannot have fmt as a runtime dependency of librados.
to address this issue, we should compile librados either with static library
or with header-only library of fmt. but because the fedora packaging
guideline does no encourage us to package static libraries, and it would
be complicated to package both static and dynamic library for fmt.
the simpler solution would be to compile Ceph with the header-only
version of fmt.
in this change, we compile ceph with the header-only version of fmt
on RHEL to address the runtime dependency issue.
Signed-off-by: Kefu Chai <kchai@redhat.com>
---
ceph.spec.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ceph.spec.in b/ceph.spec.in
index 718421ca901..fd7ebe92d8b 100644
--- a/ceph.spec.in
+++ b/ceph.spec.in
@@ -1335,6 +1335,9 @@ ${CMAKE} .. \
-DWITH_SYSTEM_PMDK:BOOL=ON \
%endif
-DBOOST_J=$CEPH_SMP_NCPUS \
+%if 0%{?rhel}
+ -DWITH_FMT_HEADER_ONLY:BOOL=ON \
+%endif
-DWITH_GRAFANA=ON
%if %{with cmake_verbose_logging}
--
2.31.1

View File

@ -0,0 +1,32 @@
From 1207906fcf005812f1d861e7bf577a1dc2d1e053 Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Thu, 5 Aug 2021 15:59:39 +0200
Subject: [PATCH] cmake: link bundled fmt statically
instead of building the bundled fmt library as shared library, built
static library. otherwise we'd have to link against libfmt.so.
Signed-off-by: Kefu Chai <kchai@redhat.com>
---
src/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c4d73633ed8..b1a9001e744 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -310,7 +310,11 @@ if(fmt_FOUND)
include_directories(SYSTEM "${fmt_INCLUDE_DIR}")
else()
message(STATUS "Could not find fmt, will build it")
+ set(old_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
+ set(BUILD_SHARED_LIBS FALSE)
add_subdirectory(fmt)
+ set(BUILD_SHARED_LIBS ${old_BUILD_SHARED_LIBS})
+ unset(old_BUILD_SHARED_LIBS)
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/fmt/include")
endif()
--
2.31.1

1934
SPECS/ceph.spec Normal file

File diff suppressed because it is too large Load Diff