summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2020-01-22 15:49:01 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2020-01-22 15:53:49 +0000
commit7e9c4e6a469ca3ede7265ce91aac52514040758e (patch)
tree397a6f737d8f56ec385b7ba4f093581f4fc1d7f9 /recipes-extended
parent2ffc7a5a6ffc99348f203e4b089fdc891ea57f61 (diff)
downloadmeta-virtualization-7e9c4e6a469ca3ede7265ce91aac52514040758e.tar.gz
ceph: update and make python3 safe
Updating the ceph version and making python2 -> python3 subsitutions. This has been build-only tested. We can drop one patch, since it is already part of this newer version. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch61
-rw-r--r--recipes-extended/ceph/ceph_14.2.6.bb (renamed from recipes-extended/ceph/ceph_14.2.3.bb)28
2 files changed, 15 insertions, 74 deletions
diff --git a/recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch b/recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch
deleted file mode 100644
index 7a44338b..00000000
--- a/recipes-extended/ceph/ceph/0001-rgw-beast-handle_connection-takes-io_context.patch
+++ /dev/null
@@ -1,61 +0,0 @@
1From 064f142746ae97f54865069cdacf5aae2b1b14f6 Mon Sep 17 00:00:00 2001
2From: Casey Bodley <cbodley@redhat.com>
3Date: Tue, 23 Apr 2019 15:40:01 -0400
4Subject: [PATCH] rgw: beast handle_connection() takes io_context
5
6as of boost 1.70, the socket no longer has a get_io_context(), so we
7have to pass it in as an argument
8
9Signed-off-by: Casey Bodley <cbodley@redhat.com>
10
11Upstream-Status: Backport [064f142746ae97f54865069cdacf5aae2b1b14f6]
12
13Signed-off-by: He Zhe <zhe.he@windriver.com>
14---
15 src/rgw/rgw_asio_frontend.cc | 9 +++++----
16 1 file changed, 5 insertions(+), 4 deletions(-)
17
18diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc
19index e4be074ec7..4af3695dc1 100644
20--- a/src/rgw/rgw_asio_frontend.cc
21+++ b/src/rgw/rgw_asio_frontend.cc
22@@ -81,7 +81,8 @@ class StreamIO : public rgw::asio::ClientIO {
23 using SharedMutex = ceph::async::SharedMutex<boost::asio::io_context::executor_type>;
24
25 template <typename Stream>
26-void handle_connection(RGWProcessEnv& env, Stream& stream,
27+void handle_connection(boost::asio::io_context& context,
28+ RGWProcessEnv& env, Stream& stream,
29 boost::beast::flat_buffer& buffer, bool is_ssl,
30 SharedMutex& pause_mutex,
31 rgw::dmclock::Scheduler *scheduler,
32@@ -152,7 +153,7 @@ void handle_connection(RGWProcessEnv& env, Stream& stream,
33 rgw::io::add_conlen_controlling(
34 &real_client))));
35 RGWRestfulIO client(cct, &real_client_io);
36- auto y = optional_yield{socket.get_io_context(), yield};
37+ auto y = optional_yield{context, yield};
38 process_request(env.store, env.rest, &req, env.uri_prefix,
39 *env.auth_registry, &client, env.olog, y, scheduler);
40 }
41@@ -560,7 +561,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
42 return;
43 }
44 buffer.consume(bytes);
45- handle_connection(env, stream, buffer, true, pause_mutex,
46+ handle_connection(context, env, stream, buffer, true, pause_mutex,
47 scheduler.get(), ec, yield);
48 if (!ec) {
49 // ssl shutdown (ignoring errors)
50@@ -578,7 +579,7 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
51 auto c = connections.add(conn);
52 boost::beast::flat_buffer buffer;
53 boost::system::error_code ec;
54- handle_connection(env, s, buffer, false, pause_mutex,
55+ handle_connection(context, env, s, buffer, false, pause_mutex,
56 scheduler.get(), ec, yield);
57 s.shutdown(tcp::socket::shutdown_both, ec);
58 });
59--
602.21.0
61
diff --git a/recipes-extended/ceph/ceph_14.2.3.bb b/recipes-extended/ceph/ceph_14.2.6.bb
index b2bf2206..c213e1a5 100644
--- a/recipes-extended/ceph/ceph_14.2.3.bb
+++ b/recipes-extended/ceph/ceph_14.2.6.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24
4 file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 4 file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
5 file://COPYING;md5=601c21a554d728c3038ca292b83b8af0 \ 5 file://COPYING;md5=601c21a554d728c3038ca292b83b8af0 \
6" 6"
7inherit cmake pythonnative python-dir systemd 7inherit cmake python3native python3-dir systemd
8# Disable python pybind support for ceph temporary, when corss compiling pybind, 8# Disable python pybind support for ceph temporary, when corss compiling pybind,
9# pybind mix cmake and python setup environment, would case a lot of errors. 9# pybind mix cmake and python setup environment, would case a lot of errors.
10 10
@@ -12,17 +12,17 @@ SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \
12 file://0001-ceph-fix-build-errors-for-cross-compile.patch \ 12 file://0001-ceph-fix-build-errors-for-cross-compile.patch \
13 file://ceph.conf \ 13 file://ceph.conf \
14 file://0001-rgw-add-executor-type-for-basic_waitable_timers.patch \ 14 file://0001-rgw-add-executor-type-for-basic_waitable_timers.patch \
15 file://0001-rgw-beast-handle_connection-takes-io_context.patch \
16 file://0001-common-rgw-workaround-for-boost-1.72.patch \ 15 file://0001-common-rgw-workaround-for-boost-1.72.patch \
17" 16"
18SRC_URI[md5sum] = "e4a53270fba14bf34d0b4c2a2340042e" 17
19SRC_URI[sha256sum] = "63d0eddab80f7bcdd4e9ac86d2b36c6cc8c9e2d34f20e8e426ff1620d66748dd" 18SRC_URI[md5sum] = "10c22151123ce73b3fe49a6700fe24e0"
19SRC_URI[sha256sum] = "a1d20f2ba4e2d38a52f40e2e75e2ad136e78fa208b59348d3d45895cc4ca7e62"
20 20
21DEPENDS = "boost bzip2 curl expat gperf-native \ 21DEPENDS = "boost bzip2 curl expat gperf-native \
22 keyutils libaio libibverbs lz4 \ 22 keyutils libaio libibverbs lz4 \
23 nspr nss \ 23 nspr nss \
24 oath openldap openssl \ 24 oath openldap openssl \
25 python python-cython-native rabbitmq-c rocksdb snappy udev \ 25 python3 python3-cython-native rabbitmq-c rocksdb snappy udev \
26 valgrind xfsprogs zlib \ 26 valgrind xfsprogs zlib \
27" 27"
28SYSTEMD_SERVICE_${PN} = " \ 28SYSTEMD_SERVICE_${PN} = " \
@@ -58,6 +58,8 @@ EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \
58 -DWITH_SYSTEM_ROCKSDB=ON \ 58 -DWITH_SYSTEM_ROCKSDB=ON \
59 -DWITH_RDMA=OFF \ 59 -DWITH_RDMA=OFF \
60 -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ 60 -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \
61 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3 \
62 -DPYTHON_EXECUTABLE=${PYTHON} \
61" 63"
62 64
63do_configure_prepend () { 65do_configure_prepend () {
@@ -67,10 +69,10 @@ do_configure_prepend () {
67} 69}
68 70
69do_install_append () { 71do_install_append () {
70 sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph 72 sed -i -e 's:${WORKDIR}.*python3:${bindir}/python:' ${D}${bindir}/ceph
71 sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph-crash 73 sed -i -e 's:${WORKDIR}.*python3:${bindir}/python:' ${D}${bindir}/ceph-crash
72 sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph-volume 74 sed -i -e 's:${WORKDIR}.*python3:${bindir}/python:' ${D}${bindir}/ceph-volume
73 sed -i -e 's:${WORKDIR}.*python2:${bindir}/python:' ${D}${bindir}/ceph-volume-systemd 75 sed -i -e 's:${WORKDIR}.*python3:${bindir}/python:' ${D}${bindir}/ceph-volume-systemd
74 find ${D} -name SOURCES.txt | xargs sed -i -e 's:${WORKDIR}::' 76 find ${D} -name SOURCES.txt | xargs sed -i -e 's:${WORKDIR}::'
75 install -d ${D}${sysconfdir}/ceph 77 install -d ${D}${sysconfdir}/ceph
76 install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/ 78 install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/
@@ -116,10 +118,10 @@ FILES_${PN}-python = "\
116 ${PYTHON_SITEPACKAGES_DIR}/* \ 118 ${PYTHON_SITEPACKAGES_DIR}/* \
117" 119"
118RDEPENDS_${PN} += "\ 120RDEPENDS_${PN} += "\
119 python \ 121 python3 \
120 python-misc \ 122 python3-misc \
121 python-modules \ 123 python3-modules \
122 python-prettytable \ 124 python3-prettytable \
123 ${PN}-python \ 125 ${PN}-python \
124" 126"
125COMPATIBLE_HOST = "(x86_64).*" 127COMPATIBLE_HOST = "(x86_64).*"