1 |
commit: 113190b93664650497e2a1ee8e503b27ca19a199 |
2 |
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com> |
3 |
AuthorDate: Wed Aug 5 00:14:59 2020 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 5 00:16:30 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=113190b9 |
7 |
|
8 |
sys-cluster/ceph-15.2.4-r3: revbump, fix deps, fix build with USE=uring |
9 |
|
10 |
Copyright: Sony Interactive Entertainment Inc. |
11 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
12 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
13 |
|
14 |
...ceph-15.2.4-r2.ebuild => ceph-15.2.4-r3.ebuild} | 5 +- |
15 |
.../ceph/files/ceph-15.2.4-system-uring.patch | 66 ++++++++++++++++++++++ |
16 |
2 files changed, 69 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/sys-cluster/ceph/ceph-15.2.4-r2.ebuild b/sys-cluster/ceph/ceph-15.2.4-r3.ebuild |
19 |
similarity index 99% |
20 |
rename from sys-cluster/ceph/ceph-15.2.4-r2.ebuild |
21 |
rename to sys-cluster/ceph/ceph-15.2.4-r3.ebuild |
22 |
index b497a432952..a81fe959935 100644 |
23 |
--- a/sys-cluster/ceph/ceph-15.2.4-r2.ebuild |
24 |
+++ b/sys-cluster/ceph/ceph-15.2.4-r3.ebuild |
25 |
@@ -32,7 +32,7 @@ IUSE="babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana jemalloc |
26 |
rbd-rwl +ssl spdk system-boost systemd +tcmalloc test uring xfs zfs" |
27 |
IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})" |
28 |
|
29 |
-COMMON_DEPEND=" |
30 |
+DEPEND=" |
31 |
acct-group/ceph |
32 |
acct-user/ceph |
33 |
virtual/libudev:= |
34 |
@@ -124,7 +124,7 @@ BDEPEND=" |
35 |
sys-fs/btrfs-progs |
36 |
) |
37 |
" |
38 |
-RDEPEND="${COMMON_DEPEND} |
39 |
+RDEPEND="${DEPEND} |
40 |
app-admin/sudo |
41 |
net-misc/socat |
42 |
sys-apps/gptfdisk |
43 |
@@ -198,6 +198,7 @@ PATCHES=( |
44 |
"${FILESDIR}/ceph-15.2.2-systemd-unit.patch" |
45 |
"${FILESDIR}/ceph-15.2.3-spdk-compile.patch" |
46 |
"${FILESDIR}/ceph-14.2.10-python-warnings.patch" |
47 |
+ "${FILESDIR}/ceph-15.2.4-system-uring.patch" |
48 |
) |
49 |
|
50 |
check-reqs_export_vars() { |
51 |
|
52 |
diff --git a/sys-cluster/ceph/files/ceph-15.2.4-system-uring.patch b/sys-cluster/ceph/files/ceph-15.2.4-system-uring.patch |
53 |
new file mode 100644 |
54 |
index 00000000000..64df81bf97b |
55 |
--- /dev/null |
56 |
+++ b/sys-cluster/ceph/files/ceph-15.2.4-system-uring.patch |
57 |
@@ -0,0 +1,66 @@ |
58 |
+diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt |
59 |
+index 760244b9b4..7f83923671 100644 |
60 |
+--- a/src/os/CMakeLists.txt |
61 |
++++ b/src/os/CMakeLists.txt |
62 |
+@@ -134,27 +134,6 @@ if(WITH_EVENTTRACE) |
63 |
+ endif() |
64 |
+ |
65 |
+ if(WITH_LIBURING) |
66 |
+- include(ExternalProject) |
67 |
+- if("${CMAKE_GENERATOR}" MATCHES "Make") |
68 |
+- set(make_cmd "$(MAKE)") |
69 |
+- else() |
70 |
+- set(make_cmd "make") |
71 |
+- endif() |
72 |
+- ExternalProject_Add(liburing_ext |
73 |
+- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/src/ |
74 |
+- GIT_REPOSITORY http://git.kernel.dk/liburing |
75 |
+- GIT_TAG "4e360f71131918c36774f51688e5c65dea8d43f2" |
76 |
+- SOURCE_DIR ${CMAKE_BINARY_DIR}/src/liburing |
77 |
+- CONFIGURE_COMMAND <SOURCE_DIR>/configure |
78 |
+- BUILD_COMMAND env CC=${CMAKE_C_COMPILER} ${make_cmd} -C src -s |
79 |
+- BUILD_IN_SOURCE 1 |
80 |
+- INSTALL_COMMAND "") |
81 |
+- unset(make_cmd) |
82 |
+- add_library(liburing STATIC IMPORTED GLOBAL) |
83 |
+- add_dependencies(liburing liburing_ext) |
84 |
+- set_target_properties(liburing PROPERTIES |
85 |
+- IMPORTED_LINK_INTERFACE_LANGUAGES "C" |
86 |
+- IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/src/liburing/src/liburing.a") |
87 |
+- target_link_libraries(os liburing) |
88 |
+- target_include_directories(os SYSTEM PRIVATE "${CMAKE_BINARY_DIR}/src/liburing/src/include") |
89 |
++ pkg_check_modules(LIBURING REQUIRED IMPORTED_TARGET liburing) |
90 |
++ target_link_libraries(os uring) |
91 |
+ endif(WITH_LIBURING) |
92 |
+diff --git a/src/os/bluestore/io_uring.cc b/src/os/bluestore/io_uring.cc |
93 |
+index 54fa0f9535..4ba83cf172 100644 |
94 |
+--- a/src/os/bluestore/io_uring.cc |
95 |
++++ b/src/os/bluestore/io_uring.cc |
96 |
+@@ -7,6 +7,8 @@ |
97 |
+ |
98 |
+ #include "liburing.h" |
99 |
+ #include <sys/epoll.h> |
100 |
++#include <unistd.h> |
101 |
++#include <sys/syscall.h> |
102 |
+ |
103 |
+ /* Options */ |
104 |
+ |
105 |
+@@ -134,8 +136,7 @@ int ioring_queue_t::init(std::vector<int> &fds) |
106 |
+ if (ret < 0) |
107 |
+ return ret; |
108 |
+ |
109 |
+- ret = io_uring_register(d->io_uring.ring_fd, IORING_REGISTER_FILES, |
110 |
+- &fds[0], fds.size()); |
111 |
++ ret = io_uring_register_files(&d->io_uring, &fds[0], fds.size()); |
112 |
+ if (ret < 0) { |
113 |
+ ret = -errno; |
114 |
+ goto close_ring_fd; |
115 |
+@@ -214,7 +215,7 @@ bool ioring_queue_t::supported() |
116 |
+ struct io_uring_params p; |
117 |
+ |
118 |
+ memset(&p, 0, sizeof(p)); |
119 |
+- int fd = io_uring_setup(16, &p); |
120 |
++ int fd = syscall(SYS_io_uring_setup, 16, &p); |
121 |
+ if (fd < 0) |
122 |
+ return false; |
123 |
+ |