]>
Commit | Line | Data |
---|---|---|
e71ed1dd JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without kernel # backfire kernel module | |
4 | %bcond_without userspace # userspace programs | |
5 | %bcond_with verbose # verbose kernel module build (V=1) | |
6 | ||
7 | %if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace} | |
8 | %{error:kernel and userspace cannot be built at the same time on PLD builders} | |
9 | exit 1 | |
10 | %endif | |
11 | ||
12 | %if %{without userspace} | |
13 | %define _enable_debug_packages 0 | |
14 | %endif | |
185baaca JK |
15 | |
16 | Summary: Programs that test various rt-linux features | |
7edbae6e | 17 | Summary(pl.UTF-8): Programy testujące różne właściwości rt-linuksa |
e71ed1dd JB |
18 | %define pname rt-tests |
19 | Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel} | |
bc767656 | 20 | Version: 1.9 |
e71ed1dd JB |
21 | %define rel 1 |
22 | Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}} | |
185baaca | 23 | License: GPL v2 |
7edbae6e | 24 | Group: Applications/System |
e71ed1dd | 25 | Source0: https://www.kernel.org/pub/linux/utils/rt-tests/%{pname}-%{version}.tar.xz |
bc767656 | 26 | # Source0-md5: d728a21dcbc34ee789ba71c1e4c621b7 |
e71ed1dd JB |
27 | # https://bugs.launchpad.net/ubuntu/+source/rt-tests/+bug/881771/+attachment/2572753/+files/0001-Fix-deprecated-removed-spinlock-declaration.patch |
28 | # + http://www.spinics.net/lists/linux-rt-users/msg08966.html | |
29 | Patch0: %{pname}-backfire.patch | |
185baaca | 30 | URL: https://rt.wiki.kernel.org/index.php/Cyclictest |
e71ed1dd | 31 | %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}} |
37a5aca1 | 32 | %ifarch %{ix86} %{x8664} x32 ia64 mips ppc |
7edbae6e JB |
33 | BuildRequires: numactl-devel |
34 | %endif | |
bc767656 | 35 | BuildRequires: python3-modules >= 1:3 |
e71ed1dd | 36 | BuildRequires: rpmbuild(macros) >= 1.701 |
71591afe | 37 | BuildRequires: sed >= 4.0 |
7edbae6e JB |
38 | BuildRequires: tar >= 1:1.22 |
39 | BuildRequires: xz | |
185baaca JK |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
42 | %description | |
43 | Programs that test various rt-linux features. | |
44 | ||
7edbae6e JB |
45 | %description -l pl.UTF-8 |
46 | Programy testujące różne właściwości rt-linuksa. | |
47 | ||
e71ed1dd JB |
48 | %define kernel_pkg()\ |
49 | %package -n kernel%{_alt_kernel}-char-backfire\ | |
50 | Summary: Linux kernel module to benchmark signal delivery\ | |
51 | Summary(pl.UTF-8): Moduł jądra Linuksa do testowania dostarczania sygnałów\ | |
52 | Release: %{rel}@%{_kernel_ver_str}\ | |
53 | Group: Base/Kernel\ | |
54 | Requires(post,postun): /sbin/depmod\ | |
55 | %requires_releq_kernel\ | |
56 | Requires(postun): %releq_kernel\ | |
57 | \ | |
58 | %description -n kernel%{_alt_kernel}-char-backfire\ | |
59 | Linux kernel "backfire" module sends a signal from driver to user.\ | |
60 | It's primary use is benchmarking signal delivery.\ | |
61 | \ | |
62 | %description -n kernel%{_alt_kernel}-char-backfire -l pl.UTF-8\ | |
63 | Moduł jądra Linuksa "backfire" wysyła sygnał ze sterownika do\ | |
64 | użytkownika. Głównym zastosowaniem jest testowanie wydajności\ | |
65 | dostarczania sygnałów.\ | |
66 | \ | |
67 | %if %{with kernel}\ | |
68 | %files -n kernel%{_alt_kernel}-char-backfire\ | |
69 | %defattr(644,root,root,755)\ | |
70 | /lib/modules/%{_kernel_ver}/kernel/drivers/char/backfire.ko*\ | |
71 | %endif\ | |
72 | \ | |
73 | %post -n kernel%{_alt_kernel}-char-backfire\ | |
74 | %depmod %{_kernel_ver}\ | |
75 | \ | |
76 | %postun -n kernel%{_alt_kernel}-char-backfire\ | |
77 | %depmod %{_kernel_ver}\ | |
78 | %{nil} | |
79 | ||
80 | %define build_kernel_pkg()\ | |
81 | %build_kernel_modules -C src/backfire -m backfire\ | |
82 | \ | |
83 | %install_kernel_modules -D installed -m src/backfire/backfire -d kernel/drivers/char\ | |
84 | %{nil} | |
85 | ||
86 | %{?with_kernel:%{expand:%create_kernel_packages}} | |
87 | ||
185baaca | 88 | %prep |
e71ed1dd JB |
89 | %setup -q -n %{pname}-%{version} |
90 | %patch0 -p1 | |
185baaca | 91 | |
71591afe JB |
92 | %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' src/cyclictest/get_cyclictest_snapshot.py |
93 | ||
185baaca | 94 | %build |
e71ed1dd | 95 | %if %{with userspace} |
7edbae6e | 96 | CFLAGS="%{rpmcflags}" \ |
185baaca JK |
97 | %{__make} \ |
98 | prefix="%{_prefix}" \ | |
99 | CC="%{__cc}" \ | |
185baaca | 100 | LDFLAGS="%{rpmldflags}" |
e71ed1dd JB |
101 | %endif |
102 | ||
103 | %{?with_kernel:%{expand:%build_kernel_packages}} | |
185baaca JK |
104 | |
105 | %install | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
e71ed1dd | 108 | %if %{with userspace} |
185baaca JK |
109 | %{__make} install \ |
110 | DESTDIR=$RPM_BUILD_ROOT \ | |
111 | prefix="%{_prefix}" \ | |
bc767656 | 112 | PYLIB="%{py3_sitescriptdir}" |
185baaca | 113 | |
bc767656 JB |
114 | %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir} |
115 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir} | |
e71ed1dd JB |
116 | %endif |
117 | ||
118 | %if %{with kernel} | |
119 | cp -a installed/* $RPM_BUILD_ROOT | |
120 | %endif | |
121 | ||
185baaca JK |
122 | %clean |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %files | |
126 | %defattr(644,root,root,755) | |
127 | %doc README.markdown MAINTAINERS | |
cfaa2fee | 128 | %attr(755,root,root) %{_bindir}/cyclicdeadline |
185baaca | 129 | %attr(755,root,root) %{_bindir}/cyclictest |
cfaa2fee | 130 | %attr(755,root,root) %{_bindir}/deadline_test |
fe7ba9a1 JB |
131 | %attr(755,root,root) %{_bindir}/determine_maximum_mpps.sh |
132 | %attr(755,root,root) %{_bindir}/get_cpuinfo_mhz.sh | |
71591afe | 133 | %attr(755,root,root) %{_bindir}/get_cyclictest_snapshot |
185baaca JK |
134 | %attr(755,root,root) %{_bindir}/hackbench |
135 | %attr(755,root,root) %{_bindir}/hwlatdetect | |
bc767656 | 136 | %attr(755,root,root) %{_bindir}/oslat |
185baaca JK |
137 | %attr(755,root,root) %{_bindir}/pi_stress |
138 | %attr(755,root,root) %{_bindir}/pip_stress | |
139 | %attr(755,root,root) %{_bindir}/pmqtest | |
140 | %attr(755,root,root) %{_bindir}/ptsematest | |
cfaa2fee | 141 | %attr(755,root,root) %{_bindir}/queuelat |
185baaca | 142 | %attr(755,root,root) %{_bindir}/rt-migrate-test |
185baaca JK |
143 | %attr(755,root,root) %{_bindir}/signaltest |
144 | %attr(755,root,root) %{_bindir}/sigwaittest | |
fe7ba9a1 | 145 | %attr(755,root,root) %{_bindir}/ssdd |
185baaca | 146 | %attr(755,root,root) %{_bindir}/svsematest |
bc767656 JB |
147 | %{py3_sitescriptdir}/hwlatdetect.py |
148 | %{py3_sitescriptdir}/get_cyclictest_snapshot.py | |
149 | %{py3_sitescriptdir}/__pycache__/hwlatdetect.cpython-*.py[co] | |
150 | %{py3_sitescriptdir}/__pycache__/get_cyclictest_snapshot.cpython-*.py[co] | |
71591afe | 151 | %{_mandir}/man8/cyclicdeadline.8* |
185baaca | 152 | %{_mandir}/man8/cyclictest.8* |
fe7ba9a1 | 153 | %{_mandir}/man8/deadline_test.8* |
bc767656 | 154 | %{_mandir}/man8/get_cyclictest_snapshot.8* |
185baaca JK |
155 | %{_mandir}/man8/hackbench.8* |
156 | %{_mandir}/man8/hwlatdetect.8* | |
bc767656 | 157 | %{_mandir}/man8/oslat.8* |
185baaca | 158 | %{_mandir}/man8/pi_stress.8* |
fe7ba9a1 | 159 | %{_mandir}/man8/pip_stress.8* |
185baaca JK |
160 | %{_mandir}/man8/pmqtest.8* |
161 | %{_mandir}/man8/ptsematest.8* | |
fe7ba9a1 | 162 | %{_mandir}/man8/queuelat.8* |
cfaa2fee | 163 | %{_mandir}/man8/rt-migrate-test.8* |
185baaca JK |
164 | %{_mandir}/man8/signaltest.8* |
165 | %{_mandir}/man8/sigwaittest.8* | |
fe7ba9a1 | 166 | %{_mandir}/man8/ssdd.8* |
185baaca | 167 | %{_mandir}/man8/svsematest.8* |