aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/ceph/APKBUILD4
-rw-r--r--community/ceph/boost-1.70.patch105
2 files changed, 108 insertions, 1 deletions
diff --git a/community/ceph/APKBUILD b/community/ceph/APKBUILD
index 11ad274217..a624b0135a 100644
--- a/community/ceph/APKBUILD
+++ b/community/ceph/APKBUILD
@@ -88,6 +88,7 @@ makedepends="
source="https://download.ceph.com/tarballs/ceph_$pkgver.orig.tar.gz
allperms.patch
musl-fixes.patch
+ boost-1.70.patch
"
subpackages="
$pkgname-doc
@@ -519,4 +520,5 @@ _pkg() {
sha512sums="1ce61fb75e331cca39aaa8c0498bbb3cb874edb22ea45a4c2d82171b5e0c7c4ab2b081674b77177d5e612a0efdfa01de10a4becc4a7ee0eed1b2b3d358a72dc1 ceph_14.2.2.orig.tar.gz
e1becd813ed3f28e2e4a6bef78b3b5117c1c0bb9cabe0ba9c912e0a20b551b6b2667495cddb94acd64192e287144911ff1c11e0d636fe04cc458146cfb0daca8 allperms.patch
-35722b11ad52a3145153635b6a96abda2a23ae9c7e63e2eac006c1e5b8014452c4a1a11bbe0292fd731e4c43aa38e27dd75d2ff9d25bcf52290278f71e868570 musl-fixes.patch"
+35722b11ad52a3145153635b6a96abda2a23ae9c7e63e2eac006c1e5b8014452c4a1a11bbe0292fd731e4c43aa38e27dd75d2ff9d25bcf52290278f71e868570 musl-fixes.patch
+0211c84da189f71af7914350ebbfa6fc588c854bad501453344a8d13a18a56ea895118d576bed65b592ea2925efe92b86c769ebc85156a559b2acd0ee884157b boost-1.70.patch"
diff --git a/community/ceph/boost-1.70.patch b/community/ceph/boost-1.70.patch
new file mode 100644
index 0000000000..149c65bc10
--- /dev/null
+++ b/community/ceph/boost-1.70.patch
@@ -0,0 +1,105 @@
+From 064f142746ae97f54865069cdacf5aae2b1b14f6 Mon Sep 17 00:00:00 2001
+From: Casey Bodley <cbodley@redhat.com>
+Date: Tue, 23 Apr 2019 15:40:01 -0400
+Subject: [PATCH] rgw: beast handle_connection() takes io_context
+
+as of boost 1.70, the socket no longer has a get_io_context(), so we
+have to pass it in as an argument
+
+Signed-off-by: Casey Bodley <cbodley@redhat.com>
+---
+ src/rgw/rgw_asio_frontend.cc | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc
+index e4be074ec74f..4af3695dc1ce 100644
+--- a/src/rgw/rgw_asio_frontend.cc
++++ b/src/rgw/rgw_asio_frontend.cc
+@@ -81,7 +81,8 @@ class StreamIO : public rgw::asio::ClientIO {
+ using SharedMutex = ceph::async::SharedMutex<boost::asio::io_context::executor_type>;
+
+ template <typename Stream>
+-void handle_connection(RGWProcessEnv& env, Stream& stream,
++void handle_connection(boost::asio::io_context& context,
++ RGWProcessEnv& env, Stream& stream,
+ boost::beast::flat_buffer& buffer, bool is_ssl,
+ SharedMutex& pause_mutex,
+ rgw::dmclock::Scheduler *scheduler,
+@@ -152,7 +153,7 @@ void handle_connection(RGWProcessEnv& env, Stream& stream,
+ rgw::io::add_conlen_controlling(
+ &real_client))));
+ RGWRestfulIO client(cct, &real_client_io);
+- auto y = optional_yield{socket.get_io_context(), yield};
++ auto y = optional_yield{context, yield};
+ process_request(env.store, env.rest, &req, env.uri_prefix,
+ *env.auth_registry, &client, env.olog, y, scheduler);
+ }
+@@ -560,7 +561,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
+ return;
+ }
+ buffer.consume(bytes);
+- handle_connection(env, stream, buffer, true, pause_mutex,
++ handle_connection(context, env, stream, buffer, true, pause_mutex,
+ scheduler.get(), ec, yield);
+ if (!ec) {
+ // ssl shutdown (ignoring errors)
+@@ -578,7 +579,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
+ auto c = connections.add(conn);
+ boost::beast::flat_buffer buffer;
+ boost::system::error_code ec;
+- handle_connection(env, s, buffer, false, pause_mutex,
++ handle_connection(context, env, s, buffer, false, pause_mutex,
+ scheduler.get(), ec, yield);
+ s.shutdown(tcp::socket::shutdown_both, ec);
+ });
+From f1651b8c509d60787d10c4115e29fecfd2da237c Mon Sep 17 00:00:00 2001
+From: Casey Bodley <cbodley@redhat.com>
+Date: Tue, 23 Apr 2019 15:41:45 -0400
+Subject: [PATCH] rgw: add executor type for basic_waitable_timers
+
+as of boost 1.70, the timer no longer depends on io_context directly,
+so we have to specify its executor as a template parameter
+
+Signed-off-by: Casey Bodley <cbodley@redhat.com>
+---
+ src/rgw/rgw_dmclock_async_scheduler.h | 5 +++++
+ src/rgw/rgw_reshard.h | 9 ++++++++-
+ 2 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/src/rgw/rgw_dmclock_async_scheduler.h b/src/rgw/rgw_dmclock_async_scheduler.h
+index 70487a525373..1d454acd2ea6 100644
+--- a/src/rgw/rgw_dmclock_async_scheduler.h
++++ b/src/rgw/rgw_dmclock_async_scheduler.h
+@@ -82,7 +82,12 @@ class AsyncScheduler : public md_config_obs_t, public Scheduler {
+ using Completion = async::Completion<Signature, async::AsBase<Request>>;
+
+ using Clock = ceph::coarse_real_clock;
++#if BOOST_VERSION < 107000
+ using Timer = boost::asio::basic_waitable_timer<Clock>;
++#else
++ using Timer = boost::asio::basic_waitable_timer<Clock,
++ boost::asio::wait_traits<Clock>, executor_type>;
++#endif
+ Timer timer; //< timer for the next scheduled request
+
+ CephContext *const cct;
+diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h
+index d99a6ff68d5f..213fc238d2ee 100644
+--- a/src/rgw/rgw_reshard.h
++++ b/src/rgw/rgw_reshard.h
+@@ -183,7 +183,14 @@ class RGWReshardWait {
+ ceph::condition_variable cond;
+
+ struct Waiter : boost::intrusive::list_base_hook<> {
+- boost::asio::basic_waitable_timer<Clock> timer;
++#if BOOST_VERSION < 107000
++ using Timer = boost::asio::basic_waitable_timer<Clock>;
++#else
++ using Executor = boost::asio::io_context::executor_type;
++ using Timer = boost::asio::basic_waitable_timer<Clock,
++ boost::asio::wait_traits<Clock>, Executor>;
++#endif
++ Timer timer;
+ explicit Waiter(boost::asio::io_context& ioc) : timer(ioc) {}
+ };
+ boost::intrusive::list<Waiter> waiters;