diff --git a/0020-compiled-with-gcc12.patch b/0020-compiled-with-gcc12.patch new file mode 100644 index 0000000..454f01a --- /dev/null +++ b/0020-compiled-with-gcc12.patch @@ -0,0 +1,46 @@ +From 824b1101570d5a2417ef22e6a7fa358f4a0ffb9d Mon Sep 17 00:00:00 2001 +From: wangzengliang +Date: Fri, 21 Jul 2023 17:52:36 +0800 +Subject: [PATCH] gcc12 need constexpr + +--- + src/common/dout.h | 4 ++-- + src/libcephsqlite.cc | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/common/dout.h b/src/common/dout.h +index 421222d53..ae52c358b 100644 +--- a/src/common/dout.h ++++ b/src/common/dout.h +@@ -99,11 +99,11 @@ namespace ceph::dout { + template + struct dynamic_marker_t { + T value; +- operator T() const { return value; } ++ constexpr operator T() const { return value; } + }; + + template +-dynamic_marker_t need_dynamic(T&& t) { ++constexpr dynamic_marker_t need_dynamic(T&& t) { + return dynamic_marker_t{ std::forward(t) }; + } + +diff --git a/src/libcephsqlite.cc b/src/libcephsqlite.cc +index 3db64a19f..a6e8a4883 100644 +--- a/src/libcephsqlite.cc ++++ b/src/libcephsqlite.cc +@@ -380,8 +380,8 @@ static int FileSize(sqlite3_file *file, sqlite_int64 *osize) + + static bool parsepath(std::string_view path, struct cephsqlite_fileloc* fileloc) + { +- static const std::regex re1{"^/*(\\*[[:digit:]]+):([[:alnum:]-_.]*)/([[:alnum:]-._]+)$"}; +- static const std::regex re2{"^/*([[:alnum:]-_.]+):([[:alnum:]-_.]*)/([[:alnum:]-._]+)$"}; ++ static const std::regex re1{"^/*(\\*[[:digit:]]+):([[:alnum:]\\-_.]*)/([[:alnum:]\\-._]+)$"}; ++ static const std::regex re2{"^/*([[:alnum:]\\-_.]+):([[:alnum:]\\-_.]*)/([[:alnum:]\\-._]+)$"}; + + std::cmatch cm; + if (!std::regex_match(path.data(), cm, re1)) { +-- +2.27.0 + diff --git a/ceph.spec b/ceph.spec index b6d49ff..bffcce4 100644 --- a/ceph.spec +++ b/ceph.spec @@ -166,6 +166,7 @@ Patch16: 0016-fix-mgr-dashboard-frontend-build-depend.patch Patch17: 0017-mgr-dashboard-support-multi-language.patch Patch18: 0018-Fix-Python-3.10-PEP-620-incompatibility.patch Patch19: 0019-include-memory.patch +Patch20: 0020-compiled-with-gcc12.patch %if 0%{?suse_version} # _insert_obs_source_lines_here ExclusiveArch: x86_64 aarch64 ppc64le s390x