diff --git a/patches/0018-fix-lib-fmt-v9-compat.patch b/patches/0018-fix-lib-fmt-v9-compat.patch deleted file mode 100644 index f6ad365ba..000000000 --- a/patches/0018-fix-lib-fmt-v9-compat.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Thomas Lamprecht -Date: Wed, 3 May 2023 10:36:10 +0200 -Subject: [PATCH] try to fix lib fmt v9 compat - -Signed-off-by: Thomas Lamprecht ---- - ceph/debian/rules | 2 ++ - src/common/Journald.cc | 1 + - src/common/LogEntry.h | 18 ++++++++++++++++++ - src/osd/osd_types_fmt.h | 14 +++++++------- - 4 files changed, 28 insertions(+), 7 deletions(-) - -diff --git a/debian/rules b/debian/rules -index 9f49deabb..c4eeebaee 100755 ---- a/debian/rules -+++ b/debian/rules -@@ -52,6 +52,8 @@ ifneq (,$(filter with_system_libs,$(DEB_BUILD_OPTIONS))) - extraopts += -DWITH_SYSTEM_PMDK=ON - endif - -+export DEB_CXXFLAGS_MAINT_APPEND += -DFMT_DEPRECATED_OSTREAM -+ - %: - dh $@ --buildsystem=cmake --with javahelper,python3,systemd --parallel - -diff --git a/src/common/Journald.cc b/src/common/Journald.cc -index e3ae2d358..a1321c7ee 100644 ---- a/src/common/Journald.cc -+++ b/src/common/Journald.cc -@@ -21,6 +21,7 @@ - #include "common/LogEntry.h" - #include "log/Entry.h" - #include "log/SubsystemMap.h" -+#include "msg/msg_fmt.h" - - - namespace ceph::logging { -diff --git a/src/common/LogEntry.h b/src/common/LogEntry.h -index 124a20799..3ddebbd30 100644 ---- a/src/common/LogEntry.h -+++ b/src/common/LogEntry.h -@@ -15,7 +15,10 @@ - #ifndef CEPH_LOGENTRY_H - #define CEPH_LOGENTRY_H - -+#include -+ - #include "include/utime.h" -+#include "msg/msg_fmt.h" - #include "msg/msg_types.h" - #include "common/entity_name.h" - #include "ostream_temp.h" -@@ -191,4 +194,19 @@ inline std::ostream& operator<<(std::ostream& out, const LogEntry& e) - << e.channel << " " << e.prio << " " << e.msg; - } - -+template <> struct fmt::formatter : fmt::formatter { -+ template -+ auto format(const EntityName& e, FormatContext& ctx) { -+ return formatter::format(e.to_str(), ctx); -+ } -+}; -+ -+template <> struct fmt::formatter : fmt::formatter { -+ template -+ auto format(const LogEntry& e, FormatContext& ctx) { -+ return fmt::format_to(ctx.out(), "{} {} ({}) {} : {} {} {}", -+ e.stamp, e.name, e.rank, e.seq, e.channel, e.prio, e.msg); -+ } -+}; -+ - #endif -diff --git a/src/osd/osd_types_fmt.h b/src/osd/osd_types_fmt.h -index 23c0e8a3b..a3c9eb61c 100644 ---- a/src/osd/osd_types_fmt.h -+++ b/src/osd/osd_types_fmt.h -@@ -13,7 +13,7 @@ struct fmt::formatter { - constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } - - template -- auto format(const osd_reqid_t& req_id, FormatContext& ctx) -+ auto format(const osd_reqid_t& req_id, FormatContext& ctx) const - { - return fmt::format_to(ctx.out(), "{}.{}:{}", req_id.name, req_id.inc, - req_id.tid); -@@ -25,7 +25,7 @@ struct fmt::formatter { - constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } - - template -- auto format(const pg_shard_t& shrd, FormatContext& ctx) -+ auto format(const pg_shard_t& shrd, FormatContext& ctx) const - { - if (shrd.is_undefined()) { - return fmt::format_to(ctx.out(), "?"); -@@ -42,7 +42,7 @@ struct fmt::formatter { - constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } - - template -- auto format(const eversion_t& ev, FormatContext& ctx) -+ auto format(const eversion_t& ev, FormatContext& ctx) const - { - return fmt::format_to(ctx.out(), "{}'{}", ev.epoch, ev.version); - } -@@ -53,7 +53,7 @@ struct fmt::formatter { - constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } - - template -- auto format(const chunk_info_t& ci, FormatContext& ctx) -+ auto format(const chunk_info_t& ci, FormatContext& ctx) const - { - return fmt::format_to(ctx.out(), "(len: {} oid: {} offset: {} flags: {})", - ci.length, ci.oid, ci.offset, -@@ -66,7 +66,7 @@ struct fmt::formatter { - constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } - - template -- auto format(const object_manifest_t& om, FormatContext& ctx) -+ auto format(const object_manifest_t& om, FormatContext& ctx) const - { - fmt::format_to(ctx.out(), "manifest({}", om.get_type_name()); - if (om.is_redirect()) { -@@ -83,7 +83,7 @@ struct fmt::formatter { - constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } - - template -- auto format(const object_info_t& oi, FormatContext& ctx) -+ auto format(const object_info_t& oi, FormatContext& ctx) const - { - fmt::format_to(ctx.out(), "{}({} {} {} s {} uv {}", oi.soid, oi.version, - oi.last_reqid, (oi.flags ? oi.get_flag_string() : ""), oi.size, -@@ -110,7 +110,7 @@ struct fmt::formatter { - constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } - - template -- auto format(const pg_t& pg, FormatContext& ctx) -+ auto format(const pg_t& pg, FormatContext& ctx) const - { - return fmt::format_to(ctx.out(), "{}.{:x}", pg.pool(), pg.m_seed); - } diff --git a/patches/0019-define-iterators-without-std-iterator.patch b/patches/0019-define-iterators-without-std-iterator.patch deleted file mode 100644 index 1a8b2cc9f..000000000 --- a/patches/0019-define-iterators-without-std-iterator.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Thomas Lamprecht -Date: Wed, 3 May 2023 13:25:08 +0200 -Subject: [PATCH] define iterators without std::iterator<> - -> std::iterator<> is deprecated in C++17, so let's just -> define the required traits directly. - -cherry-picked/backported from upstream PRs: -https://github.com/ceph/ceph/pull/45419/commits -https://github.com/ceph/ceph/pull/45198/commits - -Signed-off-by: Thomas Lamprecht ---- - .../btree/string_kv_node_layout.h | 27 +++++++++++-------- - src/include/rados/librados.hpp | 7 ++++- - src/include/xlist.h | 15 +++++++++-- - 3 files changed, 35 insertions(+), 14 deletions(-) - -diff --git a/src/crimson/os/seastore/omap_manager/btree/string_kv_node_layout.h b/src/crimson/os/seastore/omap_manager/btree/string_kv_node_layout.h -index 9948a4292..1bd95415a 100644 ---- a/src/crimson/os/seastore/omap_manager/btree/string_kv_node_layout.h -+++ b/src/crimson/os/seastore/omap_manager/btree/string_kv_node_layout.h -@@ -294,7 +294,7 @@ class StringKVInnerNodeLayout { - friend class delta_inner_t; - public: - template -- class iter_t : public std::iterator { -+ class iter_t { - friend class StringKVInnerNodeLayout; - - template -@@ -312,17 +312,22 @@ public: - uint16_t index) : node(parent), index(index) {} - - public: -- iter_t(const iter_t &) = default; -- iter_t(iter_t &&) = default; -- iter_t &operator=(const iter_t &) = default; -- iter_t &operator=(iter_t &&) = default; -- -- operator iter_t() const { -- static_assert(!is_const); -- return iter_t(node, index); -- } -- -+ using iterator_category = std::input_iterator_tag; -+ using value_type = StringKVInnerNodeLayout; -+ using difference_type = std::ptrdiff_t; -+ using pointer = StringKVInnerNodeLayout*; - using reference = iter_t&; -+ -+ iter_t(const iter_t &) = default; -+ iter_t(iter_t &&) = default; -+ iter_t &operator=(const iter_t &) = default; -+ iter_t &operator=(iter_t &&) = default; -+ -+ operator iter_t() const { -+ static_assert(!is_const); -+ return iter_t(node, index); -+ } -+ - iter_t &operator*() { return *this; } - iter_t *operator->() { return this; } - -diff --git a/src/include/rados/librados.hpp b/src/include/rados/librados.hpp -index b40d7bf9a..712a5da82 100644 ---- a/src/include/rados/librados.hpp -+++ b/src/include/rados/librados.hpp -@@ -104,8 +104,13 @@ inline namespace v14_2_0 { - }; - CEPH_RADOS_API std::ostream& operator<<(std::ostream& os, const librados::ObjectCursor& oc); - -- class CEPH_RADOS_API NObjectIterator : public std::iterator { -+ class CEPH_RADOS_API NObjectIterator { - public: -+ using iterator_category = std::forward_iterator_tag; -+ using value_type = ListObject; -+ using difference_type = std::ptrdiff_t; -+ using pointer = ListObject*; -+ using reference = ListObject&; - static const NObjectIterator __EndObjectIterator; - NObjectIterator(): impl(NULL) {} - ~NObjectIterator(); -diff --git a/src/include/xlist.h b/src/include/xlist.h -index 733a318a9..73e6d8d53 100644 ---- a/src/include/xlist.h -+++ b/src/include/xlist.h -@@ -159,10 +159,15 @@ public: - remove(_back); - } - -- class iterator: std::iterator { -+ class iterator { - private: - item *cur; - public: -+ using iterator_category = std::forward_iterator_tag; -+ using value_type = T; -+ using difference_type = std::ptrdiff_t; -+ using pointer = T*; -+ using reference = T&; - iterator(item *i = 0) : cur(i) {} - T operator*() { return static_cast(cur->_item); } - iterator& operator++() { -@@ -183,10 +188,16 @@ public: - iterator begin() { return iterator(_front); } - iterator end() { return iterator(NULL); } - -- class const_iterator: std::iterator { -+ class const_iterator { - private: - item *cur; - public: -+ using iterator_category = std::forward_iterator_tag; -+ using value_type = T; -+ using difference_type = std::ptrdiff_t; -+ using pointer = const T*; -+ using reference = const T&; -+ - const_iterator(item *i = 0) : cur(i) {} - const T operator*() { return static_cast(cur->_item); } - const_iterator& operator++() { diff --git a/patches/series b/patches/series index 56208f843..ad73cbb7d 100644 --- a/patches/series +++ b/patches/series @@ -11,6 +11,4 @@ 0015-d-control-drop-outdated-build-dependencies-and-bump-.patch 0016-d-rules-fix-no-restart-on-upgrade.patch 0017-python3.10-pep-620.patch -0018-fix-lib-fmt-v9-compat.patch -0019-define-iterators-without-std-iterator.patch 0020-fix-4759-run-ceph-crash-daemon-with-www-data-group-f.patch