Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ucx/, sys-cluster/ucx/files/
Date: Sat, 03 Sep 2022 00:09:00
Message-Id: 1662162608.b1701a3522a4a51e4dcd57a531b608a739c620b6.sam@gentoo
1 commit: b1701a3522a4a51e4dcd57a531b608a739c620b6
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 2 23:46:37 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 2 23:50:08 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1701a35
7
8 sys-cluster/ucx: add 1.13.0
9
10 Bug: https://bugs.gentoo.org/861653
11 Closes: https://bugs.gentoo.org/798051
12 Closes: https://bugs.gentoo.org/822132
13 Closes: https://bugs.gentoo.org/832966
14 Closes: https://bugs.gentoo.org/868117
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 sys-cluster/ucx/Manifest | 1 +
18 .../ucx-1.13.0-binutils-2.39-ptr-typedef.patch | 25 +++++
19 sys-cluster/ucx/files/ucx-1.13.0-drop-werror.patch | 33 +++++++
20 .../ucx/files/ucx-1.13.0-fix-bashisms.patch | 44 +++++++++
21 .../files/ucx-1.13.0-fix-fcntl-include-musl.patch | 103 +++++++++++++++++++++
22 sys-cluster/ucx/ucx-1.13.0.ebuild | 56 +++++++++++
23 6 files changed, 262 insertions(+)
24
25 diff --git a/sys-cluster/ucx/Manifest b/sys-cluster/ucx/Manifest
26 index 8c266590a5e3..bc29771e377d 100644
27 --- a/sys-cluster/ucx/Manifest
28 +++ b/sys-cluster/ucx/Manifest
29 @@ -1,2 +1,3 @@
30 DIST ucx-1.10.0_rc5.tar.gz 2399950 BLAKE2B f6f78d2a3e0cd7f252354d59b9d667992c5f9f4d8ee4a41356decf4a1ed72382d8ce5213395bc6bacf1d8658f95808082cc0f825230857ddbbff19ed060efa5c SHA512 b772ad030e80bc5b0ab25d590117950d363f5f7ea1b7ed5ce0bba285d0a932205ee4d73705c094cef077c751b1cf8b6efdd4608c7df6b39d813771a0a31460ac
31 +DIST ucx-1.13.0.tar.gz 2770439 BLAKE2B 779bf7913ec1d0f5aebfd12d4eda90c83f6dae746e82bb818c4d981f6f564ecb37b6e003c3718db4ad74f25aa19fcbeb0ff98ed6349e254b7c707b4dda3c8974 SHA512 bea02adeb5c4286df360cfe788b40afde3e0404c659678497b53e753851e091de766f32aef39bd6f76e71802c88f0e0ed49c31af0c908ce2d9f3edc79ed6f933
32 DIST ucx-1.9.0.tar.gz 2467338 BLAKE2B 4d2d18c530f99a56baeb1dec88a7dba813970d3f501eb08f637dc7cefcfe5e564bc121e50c1842ea94e927a0fd657847c571241e3dd9601cdde207729d32d721 SHA512 2e8507e9cbba9ea445efdf8be5b5128dfc76cce30111805e9f7a5618bbbbb77d2bb449b6ad5e415f086b3156b63128306671d3a906583248cde720edb4241c67
33
34 diff --git a/sys-cluster/ucx/files/ucx-1.13.0-binutils-2.39-ptr-typedef.patch b/sys-cluster/ucx/files/ucx-1.13.0-binutils-2.39-ptr-typedef.patch
35 new file mode 100644
36 index 000000000000..2eb863e6bdea
37 --- /dev/null
38 +++ b/sys-cluster/ucx/files/ucx-1.13.0-binutils-2.39-ptr-typedef.patch
39 @@ -0,0 +1,25 @@
40 +https://github.com/openucx/ucx/commit/edd14921fa0a3e8cf631ef1a08fc724e44d072df
41 +https://bugs.gentoo.org/868117
42 +
43 +From 6b6128efd416831cec3a1820f7d1c8e648b79448 Mon Sep 17 00:00:00 2001
44 +From: Hui Zhou <hzhou321@×××.gov>
45 +Date: Sun, 14 Aug 2022 23:29:09 -0500
46 +Subject: [PATCH] UCS/DEBUG: replace PTR with void *
47 +
48 +The PTR macro is missing on the latest Arch linux.
49 +--- a/src/ucs/debug/debug.c
50 ++++ b/src/ucs/debug/debug.c
51 +@@ -272,10 +272,10 @@ static int load_file(struct backtrace_file *file)
52 + goto err_close;
53 + }
54 +
55 +- symcount = bfd_read_minisymbols(file->abfd, 0, (PTR)&file->syms, &size);
56 ++ symcount = bfd_read_minisymbols(file->abfd, 0, (void *)&file->syms, &size);
57 + if (symcount == 0) {
58 + free(file->syms);
59 +- symcount = bfd_read_minisymbols(file->abfd, 1, (PTR)&file->syms, &size);
60 ++ symcount = bfd_read_minisymbols(file->abfd, 1, (void *)&file->syms, &size);
61 + }
62 + if (symcount < 0) {
63 + goto err_close;
64 +
65
66 diff --git a/sys-cluster/ucx/files/ucx-1.13.0-drop-werror.patch b/sys-cluster/ucx/files/ucx-1.13.0-drop-werror.patch
67 new file mode 100644
68 index 000000000000..a0901ce23c18
69 --- /dev/null
70 +++ b/sys-cluster/ucx/files/ucx-1.13.0-drop-werror.patch
71 @@ -0,0 +1,33 @@
72 +--- a/config/m4/compiler.m4
73 ++++ b/config/m4/compiler.m4
74 +@@ -10,7 +10,7 @@
75 + #
76 + # Initialize CFLAGS
77 + #
78 +-BASE_CFLAGS="-g -Wall -Werror"
79 ++BASE_CFLAGS="-g -Wall"
80 +
81 +
82 + #
83 +--- a/examples/Makefile.am
84 ++++ b/examples/Makefile.am
85 +@@ -26,7 +26,7 @@ EXAMPLE_CUDA_CFLAGS = $(CFLAGS_PEDANTIC)
86 + EXAMPLE_CUDA_CPPFLAGS =
87 + endif
88 +
89 +-EXAMPLE_CCLD_FLAGS = -lucs -I$(includedir) -L$(libdir) -Wall -Werror -Wl,-rpath,$(libdir) \
90 ++EXAMPLE_CCLD_FLAGS = -lucs -I$(includedir) -L$(libdir) -Wall -Wl,-rpath,$(libdir) \
91 + $(EXAMPLE_CUDA_LD_FLAGS) $(EXAMPLE_CUDA_LIBS) $(EXAMPLE_CUDA_CPPFLAGS)
92 +
93 + installcheck-local:
94 +--- a/test/apps/sockaddr/Makefile.am
95 ++++ b/test/apps/sockaddr/Makefile.am
96 +@@ -12,7 +12,7 @@ noinst_HEADERS = \
97 + sa_util.h
98 +
99 + sa_CXXFLAGS = \
100 +- -std=c++11 -g -Wall -Werror
101 ++ -std=c++11 -g -Wall
102 +
103 + sa_CPPFLAGS = $(BASE_CPPFLAGS)
104 +
105
106 diff --git a/sys-cluster/ucx/files/ucx-1.13.0-fix-bashisms.patch b/sys-cluster/ucx/files/ucx-1.13.0-fix-bashisms.patch
107 new file mode 100644
108 index 000000000000..f152c152fcbb
109 --- /dev/null
110 +++ b/sys-cluster/ucx/files/ucx-1.13.0-fix-bashisms.patch
111 @@ -0,0 +1,44 @@
112 +https://github.com/openucx/ucx/pull/8494
113 +
114 +From c65087d7984f516485c11b4b732d9ac2676a494e Mon Sep 17 00:00:00 2001
115 +From: Sam James <sam@g.o>
116 +Date: Sat, 3 Sep 2022 00:28:28 +0100
117 +Subject: [PATCH] config: Fix bashisms in configure
118 +
119 +configure scripts need to be runnable with a POSIX-compliant /bin/sh.
120 +
121 +On many (but not all!) systems, /bin/sh is provided by Bash, so errors
122 +like this aren't spotted. Notably Debian defaults to /bin/sh provided
123 +by dash which doesn't tolerate such bashisms as '=='.
124 +
125 +This retains compatibility with bash.
126 +
127 +Fixes configure warnings/errors like:
128 +```
129 +checking for go... yes
130 +./configure: 26781: test: xyes: unexpected operator
131 +```
132 +
133 +Signed-off-by: Sam James <sam@g.o>
134 +--- a/config/m4/go.m4
135 ++++ b/config/m4/go.m4
136 +@@ -21,7 +21,7 @@ AS_IF([test "x$with_go" != xno],
137 + [AS_VERSION_COMPARE([1.16], [`go version | awk '{print substr($3, 3, length($3)-2)}'`],
138 + [go_happy="yes"], [go_happy="yes"], [go_happy=no])],
139 + [go_happy=no])
140 +- AS_IF([test "x$go_happy" == xno],
141 ++ AS_IF([test "x$go_happy" = xno],
142 + [AS_IF([test "x$with_go" = "xguess"],
143 + [AC_MSG_WARN([Disabling GO support - GO compiler version 1.16 or newer not found.])],
144 + [AC_MSG_ERROR([GO support was explicitly requested, but go compiler not found.])])])
145 +--- a/configure.ac
146 ++++ b/configure.ac
147 +@@ -159,7 +159,7 @@ AC_ARG_WITH([docs_only],
148 + AC_DEFUN([UCX_DX_ENABLE_CHECK],
149 + [AS_IF([DX_TEST_FEATURE($1)],
150 + [],
151 +- [AS_IF([test "x$enable_doxygen_$1" == xyes],
152 ++ [AS_IF([test "x$enable_doxygen_$1" = xyes],
153 + [AC_MSG_ERROR([--enable-doxygen-$1 was specified, but $1 tools were not found])],
154 + [])])])
155 +
156
157 diff --git a/sys-cluster/ucx/files/ucx-1.13.0-fix-fcntl-include-musl.patch b/sys-cluster/ucx/files/ucx-1.13.0-fix-fcntl-include-musl.patch
158 new file mode 100644
159 index 000000000000..2d80ffeaa3d6
160 --- /dev/null
161 +++ b/sys-cluster/ucx/files/ucx-1.13.0-fix-fcntl-include-musl.patch
162 @@ -0,0 +1,103 @@
163 +https://github.com/openucx/ucx/pull/8495
164 +
165 +From 77ea0b015bc2d18f4a6bc2ba0fb9b71ac7532199 Mon Sep 17 00:00:00 2001
166 +From: Sam James <sam@g.o>
167 +Date: Sat, 3 Sep 2022 00:44:28 +0100
168 +Subject: [PATCH 1/2] UCM: Fix deprecated <sys/fcntl.h> includes
169 +
170 +Fix deprecation warnings like:
171 +```
172 +In file included from /var/tmp/portage/sys-cluster/ucx-1.10.0_rc5/work/ucx-1.10.0-rc5/src/ucs/sys/sys.h:29,
173 + from mmap/install.c:21:
174 +/usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcpp]]
175 + 1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
176 + | ^~~~~~~
177 +```
178 +
179 +Bug: https://bugs.gentoo.org/832966
180 +Signed-off-by: Sam James <sam@g.o>
181 +--- a/src/tools/profile/read_profile.c
182 ++++ b/src/tools/profile/read_profile.c
183 +@@ -13,12 +13,12 @@
184 + #include <ucs/sys/string.h>
185 +
186 + #include <sys/signal.h>
187 +-#include <sys/fcntl.h>
188 + #include <sys/ioctl.h>
189 + #include <sys/mman.h>
190 + #include <sys/stat.h>
191 + #include <stdlib.h>
192 + #include <getopt.h>
193 ++#include <fcntl.h>
194 + #include <unistd.h>
195 + #include <string.h>
196 + #include <assert.h>
197 +--- a/src/ucm/util/reloc.c
198 ++++ b/src/ucm/util/reloc.c
199 +@@ -17,7 +17,6 @@
200 + #include <ucs/sys/string.h>
201 + #include <ucs/sys/sys.h>
202 +
203 +-#include <sys/fcntl.h>
204 + #include <sys/mman.h>
205 + #include <sys/types.h>
206 + #include <sys/stat.h>
207 +--- a/test/apps/sockaddr/sa_tcp.cc
208 ++++ b/test/apps/sockaddr/sa_tcp.cc
209 +@@ -8,8 +8,8 @@
210 +
211 + #include <sys/socket.h>
212 + #include <sys/epoll.h>
213 +-#include <sys/fcntl.h>
214 + #include <arpa/inet.h>
215 ++#include <fcntl.h>
216 + #include <unistd.h>
217 + #include <cstring>
218 + #include <cerrno>
219 +
220 +From 9f9e50e5472e390c86147b9031ddd8525207822a Mon Sep 17 00:00:00 2001
221 +From: Sam James <sam@g.o>
222 +Date: Sat, 3 Sep 2022 00:44:56 +0100
223 +Subject: [PATCH 2/2] UCS: Fix deprecated <sys/fcntl.h> includes
224 +
225 +Fix deprecation warnings like:
226 +```
227 +In file included from /var/tmp/portage/sys-cluster/ucx-1.10.0_rc5/work/ucx-1.10.0-rc5/src/ucs/sys/sys.h:29,
228 + from mmap/install.c:21:
229 +/usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcpp]]
230 + 1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
231 + | ^~~~~~~
232 +```
233 +
234 +Bug: https://bugs.gentoo.org/832966
235 +Signed-off-by: Sam James <sam@g.o>
236 +--- a/src/ucs/sys/sys.h
237 ++++ b/src/ucs/sys/sys.h
238 +@@ -26,7 +26,6 @@
239 + #include <sys/time.h>
240 + #include <sys/types.h>
241 + #include <sys/uio.h>
242 +-#include <sys/fcntl.h>
243 + #include <sys/stat.h>
244 + #include <sys/syscall.h>
245 + #include <sys/param.h>
246 +@@ -36,6 +35,7 @@
247 + #include <stdlib.h>
248 + #include <stdint.h>
249 + #include <assert.h>
250 ++#include <fcntl.h>
251 + #include <stdio.h>
252 + #include <stdarg.h>
253 + #include <string.h>
254 +--- a/test/gtest/ucs/test_vfs.cc
255 ++++ b/test/gtest/ucs/test_vfs.cc
256 +@@ -12,7 +12,7 @@ extern "C" {
257 + #include <ucs/vfs/sock/vfs_sock.h>
258 + }
259 +
260 +-#include <sys/fcntl.h>
261 ++#include <fcntl.h>
262 + #include <time.h>
263 +
264 +
265 +
266
267 diff --git a/sys-cluster/ucx/ucx-1.13.0.ebuild b/sys-cluster/ucx/ucx-1.13.0.ebuild
268 new file mode 100644
269 index 000000000000..983466a7cf98
270 --- /dev/null
271 +++ b/sys-cluster/ucx/ucx-1.13.0.ebuild
272 @@ -0,0 +1,56 @@
273 +# Copyright 1999-2022 Gentoo Authors
274 +# Distributed under the terms of the GNU General Public License v2
275 +
276 +EAPI=8
277 +
278 +inherit autotools toolchain-funcs
279 +
280 +MY_PV=${PV/_/-}
281 +DESCRIPTION="Unified Communication X"
282 +HOMEPAGE="https://www.openucx.org"
283 +SRC_URI="https://github.com/openucx/ucx/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
284 +S="${WORKDIR}/${PN}-${MY_PV}"
285 +
286 +LICENSE="BSD"
287 +SLOT="0"
288 +KEYWORDS="~amd64 -riscv ~x86 ~amd64-linux ~x86-linux"
289 +IUSE="+numa +openmp"
290 +
291 +RDEPEND="
292 + sys-libs/binutils-libs:=
293 + numa? ( sys-process/numactl )
294 +"
295 +DEPEND="${RDEPEND}"
296 +
297 +PATCHES=(
298 + "${FILESDIR}"/${PN}-1.13.0-drop-werror.patch
299 + "${FILESDIR}"/${PN}-1.13.0-fix-bashisms.patch
300 + "${FILESDIR}"/${PN}-1.13.0-fix-fcntl-include-musl.patch
301 + "${FILESDIR}"/${P}-binutils-2.39-ptr-typedef.patch
302 +)
303 +
304 +pkg_pretend() {
305 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
306 +}
307 +
308 +pkg_setup() {
309 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
310 +}
311 +
312 +src_prepare() {
313 + default
314 + eautoreconf
315 +}
316 +
317 +src_configure() {
318 + BASE_CFLAGS="" econf \
319 + --disable-compiler-opt \
320 + --without-fuse3 \
321 + --without-go \
322 + $(use_enable numa) \
323 + $(use_enable openmp)
324 +}
325 +
326 +src_compile() {
327 + BASE_CFLAGS="" emake
328 +}