Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/rdma-core/, sys-cluster/rdma-core/files/
Date: Sun, 08 Sep 2019 10:55:43
Message-Id: 1567940117.9b83bcf936bc5b844cf785979dc631940d147a7d.zlogene@gentoo
1 commit: 9b83bcf936bc5b844cf785979dc631940d147a7d
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 8 10:50:05 2019 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 8 10:55:17 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b83bcf9
7
8 sys-cluster/rdma-core: initial commit
9
10 Package-Manager: Portage-2.3.69, Repoman-2.3.16
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12
13 sys-cluster/rdma-core/Manifest | 1 +
14 sys-cluster/rdma-core/files/ibacm.init | 7 +++
15 sys-cluster/rdma-core/files/iwpmd.init | 7 +++
16 sys-cluster/rdma-core/files/srpd.init | 20 +++++++
17 sys-cluster/rdma-core/metadata.xml | 16 +++++
18 sys-cluster/rdma-core/rdma-core-24.0.ebuild | 92 +++++++++++++++++++++++++++++
19 sys-cluster/rdma-core/rdma-core-9999.ebuild | 91 ++++++++++++++++++++++++++++
20 7 files changed, 234 insertions(+)
21
22 diff --git a/sys-cluster/rdma-core/Manifest b/sys-cluster/rdma-core/Manifest
23 new file mode 100644
24 index 00000000000..195599ddb95
25 --- /dev/null
26 +++ b/sys-cluster/rdma-core/Manifest
27 @@ -0,0 +1 @@
28 +DIST rdma-core-24.0.tar.gz 1219485 BLAKE2B 400076305ca634a14d8f46df3477f9e3e753b95840237a217cfffe1a78e93ee90994e628f2a0693bde588ce15965df0014acb55bc92c36e3c45011cc69e9898a SHA512 0ef2b2b4250a1738adec964911a286f60e2310472c943dac1be45c70974a8bd1f32ee96013bff9e492132403af810aee1350d404a87ae7671731f7a5bd80c655
29
30 diff --git a/sys-cluster/rdma-core/files/ibacm.init b/sys-cluster/rdma-core/files/ibacm.init
31 new file mode 100644
32 index 00000000000..719accfa95c
33 --- /dev/null
34 +++ b/sys-cluster/rdma-core/files/ibacm.init
35 @@ -0,0 +1,7 @@
36 +#!/sbin/openrc-run
37 +# Copyright 1999-2019 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +command="/usr/sbin/ibacm"
41 +pidfile="/run/${SVCNAME}.pid"
42 +start_stop_daemon_args="-b -m"
43
44 diff --git a/sys-cluster/rdma-core/files/iwpmd.init b/sys-cluster/rdma-core/files/iwpmd.init
45 new file mode 100644
46 index 00000000000..b1ffa33fcc8
47 --- /dev/null
48 +++ b/sys-cluster/rdma-core/files/iwpmd.init
49 @@ -0,0 +1,7 @@
50 +#!/sbin/openrc-run
51 +# Copyright 1999-2019 Gentoo Authors
52 +# Distributed under the terms of the GNU General Public License v2
53 +
54 +command="/usr/sbin/iwpmd"
55 +pidfile="/run/${SVCNAME}.pid"
56 +start_stop_daemon_args="-b -m"
57
58 diff --git a/sys-cluster/rdma-core/files/srpd.init b/sys-cluster/rdma-core/files/srpd.init
59 new file mode 100644
60 index 00000000000..c54e5d81ed5
61 --- /dev/null
62 +++ b/sys-cluster/rdma-core/files/srpd.init
63 @@ -0,0 +1,20 @@
64 +#!/sbin/openrc-run
65 +# Copyright 1999-2019 Gentoo Authors
66 +# Distributed under the terms of the GNU General Public License v2
67 +
68 +command="/usr/sbin/srp_daemon.sh"
69 +pidfile="/run/${SVCNAME}.pid"
70 +start_stop_daemon_args="-b -m"
71 +
72 +rdma_config="/etc/infiniband/openib.conf"
73 +[ -f ${rdma_config} ] && source ${rdma_config}"
74 +
75 +[ ${SRP_DEFAULT_TL_RETRY_COUNT} ] && command_args="-l ${SRP_DEFAULT_TL_RETRY_COUNT}"
76 +
77 +start_pre() {
78 + if ! [ -e /sys/module/ib_srp ]; then
79 + eerror "SRP kernel module is not loaded, unable to start SRP daemon"
80 + return 1
81 + fi
82 + return 0
83 +}
84
85 diff --git a/sys-cluster/rdma-core/metadata.xml b/sys-cluster/rdma-core/metadata.xml
86 new file mode 100644
87 index 00000000000..25b5861a759
88 --- /dev/null
89 +++ b/sys-cluster/rdma-core/metadata.xml
90 @@ -0,0 +1,16 @@
91 +<?xml version="1.0" encoding="UTF-8"?>
92 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
93 +<pkgmetadata>
94 + <maintainer type="person">
95 + <email>zlogene@g.o</email>
96 + <name>Mikle Kolyada</name>
97 + </maintainer>
98 + <use>
99 + <flag name="neigh">Enable iwpmd support</flag>
100 + <flag name="python">Enable pyverbs support</flag>
101 + <flag name="valgrind">Enable valgrind notations</flag>
102 + </use>
103 + <upstream>
104 + <remote-id type="github">linux-rdma/rdma-core</remote-id>
105 + </upstream>
106 +</pkgmetadata>
107
108 diff --git a/sys-cluster/rdma-core/rdma-core-24.0.ebuild b/sys-cluster/rdma-core/rdma-core-24.0.ebuild
109 new file mode 100644
110 index 00000000000..fb16737ff02
111 --- /dev/null
112 +++ b/sys-cluster/rdma-core/rdma-core-24.0.ebuild
113 @@ -0,0 +1,92 @@
114 +# Copyright 1999-2019 Gentoo Authors
115 +# Distributed under the terms of the GNU General Public License v2
116 +
117 +EAPI=7
118 +
119 +PYTHON_COMPAT=( python3_{5,6,7} )
120 +
121 +inherit cmake-utils python-single-r1 udev systemd
122 +
123 +DESCRIPTION="Userspace components for the Linux Kernel's drivers/infiniband subsystem"
124 +HOMEPAGE="https://github.com/linux-rdma/rdma-core"
125 +
126 +if [[ ${PV} == "9999" ]]; then
127 + inherit git-r3
128 + EGIT_REPO_URI="https://github.com/linux-rdma/rdma-core"
129 +else
130 + SRC_URI="https://github.com/linux-rdma/rdma-core/releases/download/v${PV}/${P}.tar.gz"
131 + KEYWORDS="~amd64 ~x86"
132 +fi
133 +
134 +LICENSE="|| ( GPL-2 ( CC0-1.0 MIT BSD BSD-with-attribution ) )"
135 +SLOT="0"
136 +IUSE="neigh python static-libs systemd valgrind"
137 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
138 +
139 +COMMON_DEPEND="
140 + virtual/libudev:=
141 + neigh? ( dev-libs/libnl:3 )
142 + systemd? ( sys-apps/systemd:= )
143 + valgrind? ( dev-util/valgrind )
144 + python? ( ${PYTHON_DEPS} )"
145 +
146 +DEPEND="${COMMON_DEPEND}
147 + python? ( dev-python/cython[${PYTHON_USEDEP}] )"
148 +
149 +RDEPEND="${COMMON_DEPEND}
150 + !sys-fabric/infiniband-diags
151 + !sys-fabric/libibverbs
152 + !sys-fabric/librdmacm
153 + !sys-fabric/libibumad
154 + !sys-fabric/ibacm
155 + !sys-fabric/libibmad
156 + !sys-fabric/srptools
157 + !sys-fabric/infinipath-psm
158 + !sys-fabric/libcxgb3
159 + !sys-fabric/libcxgb4
160 + !sys-fabric/libmthca
161 + !sys-fabric/libmlx4
162 + !sys-fabric/libmlx5
163 + !sys-fabric/libocrdma
164 + !sys-fabric/libnes"
165 +
166 +BDEPEND="virtual/pkgconfig"
167 +
168 +pkg_setup() {
169 + python-single-r1_pkg_setup
170 +
171 +}
172 +
173 +src_configure() {
174 + local mycmakeargs=(
175 + -DCMAKE_INSTALL_SYSCONFDIR=/etc
176 + -DCMAKE_INSTALL_FULL_RUNDIR=/run
177 + -DCMAKE_INSTALL_UDEV_RULESDIR="$(get_udevdir)"/rules.d
178 + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR="$(systemd_get_systemunitdir)"
179 + -DCMAKE_DISABLE_FIND_PACKAGE_pandoc=yes
180 + $(ver_test -ge 25 && echo -DCMAKE_DISABLE_FIND_PACKAGE_rst2man=yes)
181 + -DCMAKE_DISABLE_FIND_PACKAGE_Systemd="$(usex systemd no yes)"
182 + -DENABLE_VALGRIND="$(usex valgrind)"
183 + -DENABLE_RESOLVE_NEIGH="$(usex neigh)"
184 + -DENABLE_STATIC="$(usex static-libs)"
185 + )
186 +
187 + if use python; then
188 + mycmakeargs+=( -DNO_PYVERBS=OFF )
189 + else
190 + mycmakeargs+=( -DNO_PYVERBS=ON )
191 + fi
192 +
193 + cmake-utils_src_configure
194 +}
195 +
196 +src_install() {
197 + cmake-utils_src_install
198 +
199 + udev_dorules "${D}"/etc/udev/rules.d/70-persistent-ipoib.rules
200 + rm -r "${D}"/etc/{udev,init.d} || die
201 +
202 + newinitd "${FILESDIR}"/ibacm.init ibacm
203 + newinitd "${FILESDIR}"/iwpmd.init iwpmd
204 + newinitd "${FILESDIR}"/srpd.init srpd
205 +}
206
207 diff --git a/sys-cluster/rdma-core/rdma-core-9999.ebuild b/sys-cluster/rdma-core/rdma-core-9999.ebuild
208 new file mode 100644
209 index 00000000000..bce36dc9cb6
210 --- /dev/null
211 +++ b/sys-cluster/rdma-core/rdma-core-9999.ebuild
212 @@ -0,0 +1,91 @@
213 +# Copyright 2019 Gentoo Authors
214 +# Distributed under the terms of the GNU General Public License v2
215 +
216 +EAPI=7
217 +
218 +PYTHON_COMPAT=( python3_{5,6,7} )
219 +
220 +inherit cmake-utils python-single-r1 udev systemd
221 +
222 +DESCRIPTION="Userspace components for the Linux Kernel's drivers/infiniband subsystem"
223 +HOMEPAGE="https://github.com/linux-rdma/rdma-core"
224 +
225 +if [[ ${PV} == "9999" ]]; then
226 + inherit git-r3
227 + EGIT_REPO_URI="https://github.com/linux-rdma/rdma-core"
228 +else
229 + SRC_URI="https://github.com/linux-rdma/rdma-core/releases/download/v${PV}/${P}.tar.gz"
230 + KEYWORDS="~amd64 ~x86"
231 +fi
232 +
233 +LICENSE="|| ( GPL-2 ( CC0-1.0 MIT BSD BSD-with-attribution ) )"
234 +SLOT="0"
235 +IUSE="neigh python static-libs systemd valgrind"
236 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
237 +
238 +COMMON_DEPEND="
239 + virtual/libudev:=
240 + neigh? ( dev-libs/libnl:3 )
241 + systemd? ( sys-apps/systemd:= )
242 + valgrind? ( dev-util/valgrind )
243 + python? ( ${PYTHON_DEPS} )"
244 +
245 +DEPEND="${COMMON_DEPEND}
246 + python? ( dev-python/cython[${PYTHON_USEDEP}] )"
247 +
248 +RDEPEND="${COMMON_DEPEND}
249 + !sys-fabric/libibverbs
250 + !sys-fabric/librdmacm
251 + !sys-fabric/libibumad
252 + !sys-fabric/ibacm
253 + !sys-fabric/libibmad
254 + !sys-fabric/srptools
255 + !sys-fabric/infinipath-psm
256 + !sys-fabric/libcxgb3
257 + !sys-fabric/libcxgb4
258 + !sys-fabric/libmthca
259 + !sys-fabric/libmlx4
260 + !sys-fabric/libmlx5
261 + !sys-fabric/libocrdma
262 + !sys-fabric/libnes"
263 +
264 +BDEPEND="virtual/pkgconfig"
265 +
266 +pkg_setup() {
267 + python-single-r1_pkg_setup
268 +
269 +}
270 +
271 +src_configure() {
272 + local mycmakeargs=(
273 + -DCMAKE_INSTALL_SYSCONFDIR=/etc
274 + -DCMAKE_INSTALL_FULL_RUNDIR=/run
275 + -DCMAKE_INSTALL_UDEV_RULESDIR="$(get_udevdir)"/rules.d
276 + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR="$(systemd_get_systemunitdir)"
277 + -DCMAKE_DISABLE_FIND_PACKAGE_pandoc=yes
278 + $(ver_test -ge 25 && echo -DCMAKE_DISABLE_FIND_PACKAGE_rst2man=yes)
279 + -DCMAKE_DISABLE_FIND_PACKAGE_Systemd="$(usex systemd no yes)"
280 + -DENABLE_VALGRIND="$(usex valgrind)"
281 + -DENABLE_RESOLVE_NEIGH="$(usex neigh)"
282 + -DENABLE_STATIC="$(usex static-libs)"
283 + )
284 +
285 + if use python; then
286 + mycmakeargs+=( -DNO_PYVERBS=OFF )
287 + else
288 + mycmakeargs+=( -DNO_PYVERBS=ON )
289 + fi
290 +
291 + cmake-utils_src_configure
292 +}
293 +
294 +src_install() {
295 + cmake-utils_src_install
296 +
297 + udev_dorules "${D}"/etc/udev/rules.d/70-persistent-ipoib.rules
298 + rm -r "${D}"/etc/{udev,init.d} || die
299 +
300 + newinitd "${FILESDIR}"/ibacm.init ibacm
301 + newinitd "${FILESDIR}"/iwpmd.init iwpmd
302 + newinitd "${FILESDIR}"/srpd.init srpd
303 +}