-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspdk.spec
386 lines (298 loc) · 11.6 KB
/
spdk.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# doesn't seem to work on sles 12.3: #{!?make_build:#define make_build #{__make} #{?_smp_mflags}}
# so...
%if (0%{?suse_version} <= 1320)
%define make_build %{__make} %{?_smp_mflags}
%endif
%global _hardened_build 1
# Build documentation package
%bcond_with doc
Name: spdk
Version: 22.01.2
Release: 6%{?dist}
Epoch: 0
Summary: Set of libraries and utilities for high performance user-mode storage
License: BSD
URL: http://spdk.io
Source: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz
Patch0: 0001-setup.sh-Speed-up-the-VMD-device-unbind-by-running-i.patch
Patch1: 0002-configure-add-CONFIG_HAVE_ARC4RANDOM.patch
%define package_version %{epoch}:%{version}-%{release}
%define install_datadir %{buildroot}/%{_datadir}/%{name}
%define install_docdir %{buildroot}/%{_docdir}/%{name}
%global dpdk_version 21.11.2
%global next_dpdk_major_version 22
# Distros that don't support python3 will use python2
%if "%{dist}" == ".el7" || (0%{?suse_version} > 0 && 9999999%{?sle_version} < 150400)
%define use_python2 1
%else
%define use_python3 1
%endif
# Only x86_64 is supported
ExclusiveArch: x86_64
BuildRequires: gcc gcc-c++ make
BuildRequires: dpdk-daos-devel >= %{dpdk_version}, dpdk-daos-devel < %{next_dpdk_major_version}
%if (0%{?rhel} >= 7)
BuildRequires: numactl-devel
BuildRequires: CUnit-devel
%else
%if (0%{?suse_version} >= 1315)
BuildRequires: libnuma-devel
BuildRequires: cunit-devel
%endif
%endif
BuildRequires: libiscsi-devel, libaio-devel, openssl-devel, libuuid-devel
BuildRequires: libibverbs-devel, librdmacm-devel
%if %{with doc}
BuildRequires: doxygen mscgen graphviz
%endif
%if (0%{?rhel} >= 8) && (0%{?rhel} < 9)
BuildRequires: python36
%else
BuildRequires: python
%endif
# Install dependencies
Requires: dpdk >= %{dpdk_version}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description
The Storage Performance Development Kit provides a set of tools
and libraries for writing high performance, scalable, user-mode storage
applications.
%package devel
Summary: Storage Performance Development Kit development files
Requires: %{name}%{?_isa} = %{package_version}
Requires: dpdk-daos-devel >= %{dpdk_version}, dpdk-daos-devel < %{next_dpdk_major_version}
Provides: %{name}-static%{?_isa} = %{package_version}
%description devel
This package contains the headers and other files needed for
developing applications with the Storage Performance Development Kit.
%package tools
Summary: Storage Performance Development Kit tools files
Requires: %{name}%{?_isa} = %{package_version}
%if (0%{?rhel} >= 7)
%if 0%{?use_python3}
Requires: python3 python3-configshell python3-pexpect
%else
Requires: python python-configshell pexpect
%endif
%else
%if (0%{?suse_version} >= 1500)
%if 0%{?use_python2}
Requires: python2-configshell-fb
%endif
%if 0%{?use_python3}
Requires: python3-configshell-fb
%endif
%else
%if (0%{?suse_version} >= 1315)
Requires: python python-configshell
%endif
%endif
%endif
BuildArch: noarch
%description tools
%{summary}
%if %{with doc}
%package doc
Summary: Storage Performance Development Kit documentation
BuildArch: noarch
%description doc
%{summary}
%endif
%if (0%{?suse_version} > 0)
%global __debug_package 1
%global _debuginfo_subpackages 0
%debug_package
%endif
%prep
%autosetup -n %{name}-%{version} -p1
# Workaround for https://github.com/spdk/spdk/issue/2531
sed -i -e 's/\(-L\$1\/\)lib/\1%{_lib}/' scripts/pc.sh
# Resolve rpath errors in leap15 rpmlint.
sed -i -e '/-Wl,-rpath=\$(DESTDIR)\/\$(libdir)/d' mk/spdk.common.mk
%build
%if (0%{?suse_version} > 0)
export CFLAGS="%{optflags} -fPIC -pie"
export CXXFLAGS="%{optflags} -fPIC -pie"
# this results in compiler errors, so we are unable to produce PIEs on Leap15
#export LDFLAGS="$LDFLAGS -pie"
%else
export CFLAGS="${CFLAGS:-%optflags}"
export CXXFLAGS="${CXXFLAGS:-%optflags}"
export FFLAGS="${FFLAGS:-%optflags}"
%if "%{?build_ldflags}" != ""
export LDFLAGS="${LDFLAGS:-%{build_ldflags}}"
%endif
%endif
./configure --with-dpdk \
--prefix=%{_prefix} \
%if (0%{?rhel} && 0%{?rhel} < 8)
--target-arch=core-avx2 \
%else
--target-arch=haswell \
%endif
--disable-tests \
--disable-unit-tests \
--disable-apps \
--without-vhost \
--without-crypto \
--without-pmdk \
--without-rbd \
--without-iscsi-initiator \
--without-isal \
--without-vtune \
--with-shared
%make_build all
%if %{with doc}
make -C doc
%endif
%install
%make_install %{?_smp_mflags} prefix=%{_prefix} libdir=%{_libdir} datadir=%{_datadir}
# Install tools
mkdir -p %{install_datadir}/scripts
# Install the setup tool
cp scripts/{setup,common}.sh %{install_datadir}/scripts/
mkdir -p %{install_datadir}/include/%{name}/
cp include/%{name}/pci_ids.h %{install_datadir}/include/%{name}/
# spdk_nvme_identify and spdk_nvme_perf are already installed by default
cp build/examples/lsvmd %{buildroot}/%{_bindir}/spdk_nvme_lsvmd
cp build/examples/nvme_manage %{buildroot}/%{_bindir}/spdk_nvme_manage
# Install rpc.py tool
cp scripts/rpc.py %{install_datadir}/scripts/
mkdir -p %{install_datadir}/scripts/rpc
cp scripts/rpc/*.py %{install_datadir}/scripts/rpc/
# Change /usr/bin/{env ,}bash/python to resolve env-script-interpreter rpmlint error.
sed -i -e '1s/env //' %{install_datadir}/scripts/{setup.sh,rpc.py}
%if %{with doc}
# Install doc
mkdir -p %{install_docdir}
mv doc/output/html/ %{install_docdir}
%endif
# Remove unused static libs
rm -f %{buildroot}/%{_libdir}/*.a
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%dir %{_datadir}/%{name}
%{_libdir}/*.so.*
%{_bindir}/*
%files devel
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/pkgconfig
%files tools
%{_datadir}/%{name}/include
%{_datadir}/%{name}/scripts
%if %{with doc}
%files doc
%{_docdir}/%{name}
%endif
%changelog
* Tue Apr 23 2024 Tomasz Gromadzki <[email protected]> - 0:22.01.2-6
- Add rpc.py to spdk-tools package.
* Mon Oct 16 2023 Brian J. Murrell <[email protected]> - 0:22.01.2-5
- Change spdk-devel's R: dpdk-devel to dpdk-daos-devel to ensure we get the
daos-targetted dpdk build
* Thu Jun 22 2023 Brian J. Murrell <[email protected]> - 0:22.01.2-4
- Build on EL9
- Change BR: dpdk-devel to dpdk-daos-devel to ensure we get the
daos-targetted dpdk build
- Target core-avx2 instruction set on EL7 and haswell on everything else
* Tue Jan 10 2023 Tom Nabarro <[email protected]> - 0:22.01.2-3
- Add patch to fix build with glib 2.3.
* Sun Nov 27 2022 Brian J. Murrell <[email protected]> - 0:22.01.2-2
- Build on Leap 15.4 build
- Leap 15.4 drops much python2 support
* Thu Nov 24 2022 Tom Nabarro <[email protected]> - 0:22.01.2-1
- Upgrade SPDK to 22.01.2 maintenance release (VMD-hotplug fixes).
- Update DPDK dependency version to 21.11.2 (CVE fix).
* Wed Nov 09 2022 Tom Nabarro <[email protected]> - 0:22.01.1-3
- Remove unnecessary --with-rdma configure option.
* Thu Jul 28 2022 Tom Nabarro <[email protected]> - 0:22.01.1-2
- Add back a patch referenced by previous DAOS release.
* Tue May 17 2022 Tom Nabarro <[email protected]> - 0:22.01.1-1
- Upgrade SPDK to 22.01.1 LTS release.
- Update DPDK dependency version to 21.11.1.
* Fri Apr 08 2022 Tom Nabarro <[email protected]> - 0:21.07-16
- Add patch to fix bug in previous fix for VMD init after reboot.
- Squash patches to workaround DAOS-10291 bug.
* Sun Apr 03 2022 Tom Nabarro <[email protected]> - 0:21.07-15
- Add patch to improve driver rebinding times when VMD is enabled.
* Wed Mar 23 2022 Tom Nabarro <[email protected]> - 0:21.07-14
- Add (again) patches to fix error on VMD init after reboot.
* Tue Mar 15 2022 Michael MacDonald <[email protected]> - 0:21.07-13
- Revert landing of SPDK fixes for VMD.
* Wed Mar 09 2022 Tom Nabarro <[email protected]> - 0:21.07-12
- Add patches to fix error on VMD init after reboot.
* Fri Jan 28 2022 Jeff Olivier <[email protected]> - 0:21.07-11
- Rename spdk example app binaries to be consistent with those existing.
* Sat Jan 01 2022 Tom Nabarro <[email protected]> - 0:21.07-10
- Add nvme_manage example app to binary directory.
* Tue Dec 14 2021 Tom Nabarro <[email protected]> - 0:21.07-9
- Add patch to add uint8 JSON decode function.
* Fri Nov 26 2021 Tom Nabarro <[email protected]> - 0:21.07-8
- Add patch to fix printing of correct socket-ID for VMD backing
devices.
* Tue Nov 09 2021 Tom Nabarro <[email protected]> - 0:21.07-7
- Add patch to enable use of PCI event module with non-root process.
* Wed Oct 20 2021 Saurabh Tandan <[email protected]> - 0:21.07-6
- Adding lsvmd to the binary dir
* Mon Oct 11 2021 Sydney Vanda <[email protected]> - 0:21.07-5
- Add patch for performance degradation after repeated format.
* Tue Sep 07 2021 Tom Nabarro <[email protected]> - 0:21.07-4
- Add patch for ICX VMD driver update.
* Fri Aug 13 2021 John Malmberg <[email protected]> - 0:21.07-3
- Require dpdk >= 21.05
* Tue Aug 10 2021 Tom Nabarro <[email protected]> - 0:21.07-2
- Add patch to enable multiple dpdk cli opts on init.
* Tue Aug 03 2021 Tom Nabarro <[email protected]> - 0:21.07-1
- Upgrade SPDK to 21.07 release.
* Tue Jul 20 2021 Tom Nabarro <[email protected]> - 0:21.04-2
- Add example binaries to main package.
* Tue Jun 29 2021 Tom Nabarro <[email protected]> - 0:21.04-1
- Upgrade SPDK to 21.04 + patch to custom githash on 21.07-pre
- BR: dpdk-devel and R: dpdk = 21.05
- Set bare --with-dpdk in configure to use libdpdk.pc
* Thu Jun 03 2021 Johann Lombardi <[email protected]> - 0:20.01.2-2
- Remove Get Num Queues initialization step
* Thu Feb 11 2021 Brian J. Murrell <[email protected]> - 0:20.01.2-1
- Update to 20.01.2
- BR: dpdk-devel and R: dpdk = 19.11.6
* Fri Apr 03 2020 Tom Nabarro <[email protected]> - 0:20.01.1-1
- Upgrade to enable SPDK via VFIO as non-root w/ CentOS 7.7.
- Remove fio_plugin from build.
- Remove unused cli/rpc tool scripts from build.
* Fri Oct 25 2019 Brian J. Murrell <[email protected]> - 0:19.04.1-1
- New upstream release
* Wed Oct 23 2019 Brian J. Murrell <[email protected]> - 0:18.04-8
- fio-src -> fio-devel
* Wed May 29 2019 Brian J. Murrell <[email protected]> - 0:18.04-7
- tools package needs to have scripts/common.sh and include/spdk/pci_ids.h
* Tue May 07 2019 Brian J. Murrell <[email protected]> - 0:18.04-6
- Support SLES 12.3
- BuildRequires cunit-devel
- Use fio-src instead of fio-debuginfo
- Requires for python-configshell
- Remove Requires for pexpect because trying to get a pexpect
package for SLES 12.3 is just ridiculous
- libiscsi -> libiscsi7
- libuuid -> libuuid1
- libaio -> libaio1
- numactl-libs -> libnuma1
- openssl-libs -> libopenssl1_0_0
- librdmacm -> librdmacm1
* Tue Apr 16 2019 Brian J. Murrell <[email protected]> - 0:18.04-4
- Add hack to pseudo-version shared lib
- Add hack to Provides: libspdk.so()(64bit) until I can figure
out why the autoprovides is not working
* Fri Apr 05 2019 Brian J. Murrell <[email protected]> - 0:18.04-3
- examples/nvme/fio_plugin needs to go into /usr/share/spdk/
- scripts/setup.sh needs to go into /usr/share/spdk/scripts/
- Requires dpdk = 18.02 to ensure we get the required version
until we can get our dependencies caught up and in order
* Fri Apr 05 2019 Brian J. Murrell <[email protected]> - 0:18.04-2
- Include examples/nvme/fio_plugin
* Thu Apr 04 2019 Brian J. Murrell <[email protected]> - 0:18.04-1
- Initial RPM release
- Add a patch to catch up from 18.04 to 051297114 until we can advance
to a newer/actual release of spdk