From 4a7615cc286fd67e8845ae18dfaf12884dca9b5a Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Mon, 18 Jul 2022 21:11:00 -0400 Subject: [PATCH] Rebuild for fmt-9, src/mon/LogMonitor.cc fix Signed-off-by: Kaleb S. KEITHLEY --- ...-Replace-deprecated-use-of-format_to.patch | 28 +++++++++++++++++++ ceph.spec | 13 ++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 0022-mon-Replace-deprecated-use-of-format_to.patch diff --git a/0022-mon-Replace-deprecated-use-of-format_to.patch b/0022-mon-Replace-deprecated-use-of-format_to.patch new file mode 100644 index 0000000..76edaff --- /dev/null +++ b/0022-mon-Replace-deprecated-use-of-format_to.patch @@ -0,0 +1,28 @@ +From fff72cd14c58d06774cbd0274e6144b42448af03 Mon Sep 17 00:00:00 2001 +From: "Adam C. Emerson" +Date: Mon, 7 Mar 2022 18:54:30 -0500 +Subject: [PATCH] mon: Replace deprecated use of format_to + +The non-deprecated version takes an explicit OutputIterator. + +Signed-off-by: Adam C. Emerson +--- + src/mon/LogMonitor.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc +index 9103ddf7c5b..c196e8429fb 100644 +--- a/src/mon/LogMonitor.cc ++++ b/src/mon/LogMonitor.cc +@@ -411,7 +411,7 @@ void LogMonitor::log_external(const LogEntry& le) + } + + if (fd >= 0) { +- fmt::format_to(file_log_buffer, "{}\n", le); ++ fmt::format_to(std::back_inserter(file_log_buffer), "{}\n", le); + int err = safe_write(fd, file_log_buffer.data(), file_log_buffer.size()); + file_log_buffer.clear(); + if (err < 0) { +-- +2.36.1 + diff --git a/ceph.spec b/ceph.spec index 0cb226a..40e609e 100644 --- a/ceph.spec +++ b/ceph.spec @@ -159,7 +159,7 @@ ################################################################################# Name: ceph Version: 17.2.1 -Release: 5%{?dist} +Release: 6%{?dist} %if 0%{?fedora} || 0%{?rhel} Epoch: 2 %endif @@ -189,6 +189,7 @@ Patch0018: 0018-src-rgw-store-dbstore-CMakeLists.txt.patch Patch0019: 0019-cmake-modules-CheckCxxAtomic.cmake.patch Patch0020: 0020-src-arrow-cpp-cmake_modules-ThirdpartyToolchain.cmake.patch Patch0021: 0021-cephfs-shell.patch +Patch0022: 0022-mon-Replace-deprecated-use-of-format_to.patch # ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787 ExcludeArch: i686 armv7hl %if 0%{?suse_version} @@ -1311,6 +1312,13 @@ export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" export LDFLAGS="$RPM_LD_FLAGS" + +# Workaround to https://tracker.ceph.com/issues/56610 +%if 0%{?fedora} && 0%{?fedora} >= 37 +export CFLAGS="$RPM_OPT_FLAGS -DFMT_DEPRECATED_OSTREAM" +export CXXFLAGS="$RPM_OPT_FLAGS -DFMT_DEPRECATED_OSTREAM" +%endif + %if 0%{with seastar} # seastar uses longjmp() to implement coroutine. and this annoys longjmp_chk() export CXXFLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g') @@ -2581,6 +2589,9 @@ exit 0 %config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml %changelog +* Mon Jul 18 2022 Kaleb S. KEITHLEY - 2:17.2.1-6 +- Rebuild for fmt-9, src/mon/LogMonitor.cc fix + * Sun Jul 17 2022 Robert-André Mauchin - 2:17.2.1-5 - Rebuild for new fmt