From 1f93e41efb8b3cf2b5ecd13a87ddc83b4b5e4191 Mon Sep 17 00:00:00 2001 From: Boris Ranto Date: Tue, 27 Jul 2021 11:33:29 +0200 Subject: [PATCH] Drop fmt-devel Resolves: rhbz#1961080 --- 0016-cmake-link-bundled-fmt-statically.patch | 32 ++++++++++++++++++++ ceph.spec | 8 +++-- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 0016-cmake-link-bundled-fmt-statically.patch diff --git a/0016-cmake-link-bundled-fmt-statically.patch b/0016-cmake-link-bundled-fmt-statically.patch new file mode 100644 index 0000000..70d2bcd --- /dev/null +++ b/0016-cmake-link-bundled-fmt-statically.patch @@ -0,0 +1,32 @@ +From 1207906fcf005812f1d861e7bf577a1dc2d1e053 Mon Sep 17 00:00:00 2001 +From: Boris Ranto +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 +--- + 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 + diff --git a/ceph.spec b/ceph.spec index 9b4f072..0d1f5d6 100644 --- a/ceph.spec +++ b/ceph.spec @@ -64,7 +64,7 @@ ################################################################################# Name: ceph Version: 16.2.4 -Release: 3%{?dist} +Release: 4%{?dist} %if 0%{?fedora} || 0%{?rhel} Epoch: 2 %endif @@ -94,6 +94,7 @@ Patch0012: 0012-src-compressor-snappy-SnappyCompressor.h.patch Patch0013: 0013-osdc-Objecter-move-LingerOp-s-ctor-to-.cc.patch Patch0014: 0014-cmake-add-an-option-WITH_FMT_HEADER_ONLY.patch Patch0015: 0015-ceph.spec.in-build-with-header-only-fmt-on-RHEL.patch +Patch0016: 0016-cmake-link-bundled-fmt-statically.patch # ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787 ExcludeArch: i686 armv7hl %if 0%{?suse_version} @@ -112,7 +113,6 @@ BuildRequires: gperf BuildRequires: cmake > 3.5 BuildRequires: cryptsetup BuildRequires: fuse3-devel -BuildRequires: fmt-devel BuildRequires: doxygen %if 0%{?rhel} == 7 # devtoolset offers newer make and valgrind-devel, but the old ones are good @@ -135,7 +135,6 @@ BuildRequires: libblkid-devel >= 2.17 BuildRequires: cryptsetup-devel BuildRequires: libcurl-devel BuildRequires: libcap-ng-devel -BuildRequires: fmt-devel >= 5.2.1 BuildRequires: pkgconfig(libudev) BuildRequires: libnl3-devel BuildRequires: libtool @@ -1143,6 +1142,9 @@ fi %{_includedir}/rados/objclass.h %changelog +* Thu Aug 05 2021 Boris Ranto - 2:16.2.4-4 +- Drop fmt-devel from build requires + * Tue Jul 27 2021 Boris Ranto - 2:16.2.4-3 - Apply fmt-header-only patches - Update licence field