[Merge] ~lmlogiudice/ubuntu/+source/ceph:kinetic-fixes into ~ubuntu-server-dev/ubuntu/+source/ceph:ubuntu/kinetic

James Page mp+430156 at code.launchpad.net
Wed Sep 21 16:17:41 UTC 2022


Review: Needs Fixing



Diff comments:

> diff --git a/debian/changelog b/debian/changelog
> index e3e345c..3ea54c6 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -1,3 +1,9 @@
> +ceph (17.2.0-0ubuntu3) UNRELEASED; urgency=medium
> +
> +  * d/p/fix-kinetic-libfmt.patch: Apply fixes to build Ceph on Kinetic
> +
> + -- Luciano <lmlg at lmlg-laptop>  Mon, 19 Sep 2022 15:36:31 -0300

Please can this be updated to your actual email address :)

> +
>  ceph (17.2.0-0ubuntu2) kinetic; urgency=medium
>  
>    * d/p/lp1986747-fix-osd-class-dir.patch: Fix rados-classes
> diff --git a/debian/patches/fix-kinetic-libfmt.patch b/debian/patches/fix-kinetic-libfmt.patch
> new file mode 100644
> index 0000000..abe80c9
> --- /dev/null
> +++ b/debian/patches/fix-kinetic-libfmt.patch
> @@ -0,0 +1,120 @@
> +Description: Build fixes on Ubuntu Kinetic (libfmt and others)

I think all of the changes in this patch are OK - however I would prefer that it was split up as you might propose it upstream, with commits for each set of issues resolved.

The name of the patch implies that this resolves libfmt issues, however it does a few extra bits and pieces as well.

Detailing why each is needed allows future travellers to manage the patches better as they are accepted upstream.

> +Author: Luciano Lo Giudice <luciano.logiudice at canonical.com>
> +Forwarded: No
> +
> +---
> +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> +index 30cf360546..eb37a459ab 100644
> +--- a/src/CMakeLists.txt
> ++++ b/src/CMakeLists.txt
> +@@ -78,6 +78,7 @@ add_definitions(
> +   -D_THREAD_SAFE
> +   -D__STDC_FORMAT_MACROS
> +   -D_FILE_OFFSET_BITS=64
> ++  -DFMT_DEPRECATED_OSTREAM
> +   -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
> + if(Boost_VERSION VERSION_GREATER_EQUAL 1.74)
> +   add_definitions(-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
> +diff --git a/src/common/dout.h b/src/common/dout.h
> +index 421222d535..aa4bd8a699 100644
> +--- a/src/common/dout.h
> ++++ b/src/common/dout.h
> +@@ -103,7 +103,7 @@ struct dynamic_marker_t {
> + };
> + 
> + template<typename T>
> +-dynamic_marker_t<T> need_dynamic(T&& t) {
> ++constexpr dynamic_marker_t<T> need_dynamic(T&& t) {
> +   return dynamic_marker_t<T>{ std::forward<T>(t) };
> + }
> + 
> +diff --git a/src/crimson/admin/osd_admin.cc b/src/crimson/admin/osd_admin.cc
> +index e832045883..59c8696bd0 100644
> +--- a/src/crimson/admin/osd_admin.cc
> ++++ b/src/crimson/admin/osd_admin.cc
> +@@ -299,7 +299,7 @@ static ghobject_t test_ops_get_object_name(
> +       // the return type of `fmt::format` is `std::string`
> +       using namespace fmt::literals;
> +       throw std::invalid_argument{
> +-        "Invalid pool '{}'"_format(*pool_arg)
> ++	fmt::format("Invalid pool '{}'", *pool_arg)
> +       };
> +     }
> +     return pool;
> +diff --git a/src/crimson/os/seastore/onode_manager/staged-fltree/node_extent_accessor.h b/src/crimson/os/seastore/onode_manager/staged-fltree/node_extent_accessor.h
> +index 379583523d..10cdeab1ad 100644
> +--- a/src/crimson/os/seastore/onode_manager/staged-fltree/node_extent_accessor.h
> ++++ b/src/crimson/os/seastore/onode_manager/staged-fltree/node_extent_accessor.h
> +@@ -206,7 +206,7 @@ class DeltaRecorderT final: public DeltaRecorder {
> +       default:
> +         SUBERROR(seastore_onode,
> +             "got unknown op {} when replay {}",
> +-            op, node);
> ++            static_cast<int>(op), node);
> +         ceph_abort("fatal error");
> +       }
> +     } catch (buffer::error& e) {
> +diff --git a/src/crimson/os/seastore/seastore.cc b/src/crimson/os/seastore/seastore.cc
> +index eb166b1ad3..408211a744 100644
> +--- a/src/crimson/os/seastore/seastore.cc
> ++++ b/src/crimson/os/seastore/seastore.cc
> +@@ -124,7 +124,7 @@ void SeaStore::register_metrics()
> + 
> +   for (auto& [op_type, label] : labels_by_op_type) {
> +     auto desc = fmt::format("latency of seastore operation (optype={})",
> +-                            op_type);
> ++                            static_cast<int>(op_type));
> +     metrics.add_group(
> +       "seastore",
> +       {
> +diff --git a/src/include/buffer.h b/src/include/buffer.h
> +index 0c89367dd3..f8fd9573f0 100644
> +--- a/src/include/buffer.h
> ++++ b/src/include/buffer.h
> +@@ -49,6 +49,7 @@
> + 
> + #include <exception>
> + #include <type_traits>
> ++#include <memory>
> + 
> + #include "page.h"
> + #include "crc32c.h"
> +diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc
> +index 9103ddf7c5..c196e8429f 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) {
> +diff --git a/src/spdk/lib/iscsi/iscsi.c b/src/spdk/lib/iscsi/iscsi.c
> +index febf4cac48..88cb41a52e 100644
> +--- a/src/spdk/lib/iscsi/iscsi.c
> ++++ b/src/spdk/lib/iscsi/iscsi.c
> +@@ -62,7 +62,7 @@
> + #define SPDK_CRC32C_INITIAL    0xffffffffUL
> + #define SPDK_CRC32C_XOR        0xffffffffUL
> + 
> +-#ifdef __FreeBSD__
> ++#if defined(__FreeBSD__) || __has_include(<bsd/stdlib.h>)
> + #define HAVE_SRANDOMDEV 1
> + #define HAVE_ARC4RANDOM 1
> + #endif
> +diff --git a/src/test/crimson/seastore/onode_tree/test_value.h b/src/test/crimson/seastore/onode_tree/test_value.h
> +index 4a2a21b98f..cb826a46f3 100644
> +--- a/src/test/crimson/seastore/onode_tree/test_value.h
> ++++ b/src/test/crimson/seastore/onode_tree/test_value.h
> +@@ -138,7 +138,7 @@ class TestValue final : public Value {
> +         }
> +         default:
> +           logger().error("OTree::TestValue::Replay: got unknown op {} when replay {:#x}+{:#x}",
> +-                         op, value_addr, payload_mut.get_length());
> ++                         static_cast<int>(op), value_addr, payload_mut.get_length());
> +           ceph_abort();
> +         }
> +       } catch (buffer::error& e) {


-- 
https://code.launchpad.net/~lmlogiudice/ubuntu/+source/ceph/+git/ceph/+merge/430156
Your team Ubuntu Server Developers is subscribed to branch ~ubuntu-server-dev/ubuntu/+source/ceph:ubuntu/kinetic.




More information about the Ubuntu-reviews mailing list