]>
Commit | Line | Data |
---|---|---|
87230ea0 | 1 | # |
8bec3f09 JB |
2 | # Conditional build: |
3 | %bcond_without doc # documentation build | |
4 | %bcond_with publican # publican guides build (requires functional publican+wkhtmltopdf) | |
1651fd5a | 5 | %bcond_without crash # crash extension |
c15371b4 | 6 | %bcond_without dyninst # dyninst support |
8bec3f09 | 7 | %bcond_without java # Java runtime support |
7a86387a | 8 | |
1651fd5a JB |
9 | %ifnarch %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x |
10 | %undefine with_crash | |
11 | %endif | |
c15371b4 JB |
12 | %ifnarch %{ix86} %{x8664} ppc ppc64 |
13 | %undefine with_dyninst | |
14 | %endif | |
aa39e90e | 15 | Summary: Instrumentation System |
7ad1ccd0 | 16 | Summary(pl.UTF-8): System oprzyrządowania |
aa39e90e | 17 | Name: systemtap |
7a6bab20 ER |
18 | Version: 2.7 |
19 | Release: 1 | |
839ed024 | 20 | License: GPL v2+ |
aa39e90e | 21 | Group: Base |
e7f20467 | 22 | Source0: http://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz |
7a6bab20 | 23 | # Source0-md5: e0c3c36955323ae59be07a26a9563474 |
7a86387a | 24 | Source1: %{name}.tmpfiles |
8bec3f09 | 25 | Source2: stap-server.tmpfiles |
459a2a3b | 26 | Patch0: %{name}-configure.patch |
099db71a | 27 | Patch1: %{name}-build.patch |
6fbeb569 | 28 | Patch2: %{name}-rpm5-support.patch |
1a30c954 | 29 | Patch4: format-security.patch |
ff9bc29b | 30 | URL: http://sourceware.org/systemtap/ |
8bec3f09 | 31 | BuildRequires: autoconf >= 2.63 |
60a0430a | 32 | BuildRequires: automake |
099db71a | 33 | BuildRequires: avahi-devel |
8bec3f09 | 34 | BuildRequires: boost-devel |
1651fd5a | 35 | %{?with_crash:BuildRequires: crash-devel} |
8bec3f09 | 36 | BuildRequires: docbook-dtd412-xml |
c15371b4 | 37 | %{?with_dyninst:BuildRequires: dyninst-devel >= 8.0} |
8bec3f09 | 38 | BuildRequires: elfutils-devel >= 0.148 |
7af1a693 | 39 | BuildRequires: gettext-devel >= 0.18.2 |
af617400 | 40 | BuildRequires: gettext-tools >= 0.18.2 |
aa39e90e | 41 | BuildRequires: glib2-devel |
fa83958d ER |
42 | %if %{with java} |
43 | BuildRequires: jdk | |
44 | BuildRequires: rpm-javaprov | |
45 | %endif | |
c15371b4 JB |
46 | %if %{with dyninst} || %{with java} |
47 | BuildRequires: libselinux-devel | |
48 | %endif | |
8bec3f09 | 49 | BuildRequires: libstdc++-devel |
e7f20467 JB |
50 | BuildRequires: libvirt-devel >= 1.0.2 |
51 | BuildRequires: libxml2-devel >= 2.0 | |
aa39e90e | 52 | BuildRequires: mysql-devel |
8bec3f09 | 53 | BuildRequires: nss-devel >= 3 |
7af1a693 | 54 | BuildRequires: pkgconfig |
bc044f75 | 55 | BuildRequires: rpm-devel |
fa83958d | 56 | BuildRequires: rpm-pythonprov |
8bec3f09 JB |
57 | BuildRequires: sqlite3-devel >= 3 |
58 | BuildRequires: xmlto | |
59 | %if %{with doc} | |
60 | BuildRequires: latex2html | |
61 | %{?with_publican:BuildRequires: publican} | |
62 | BuildRequires: texlive-dvips | |
63 | BuildRequires: texlive-fonts-bitstream | |
64 | BuildRequires: texlive-fonts-type1-bitstream | |
099db71a | 65 | BuildRequires: texlive-latex |
7af1a693 ER |
66 | BuildRequires: texlive-latex-psnfss |
67 | BuildRequires: texlive-xetex | |
8bec3f09 JB |
68 | %endif |
69 | # let base mean client+local development package | |
70 | Requires: %{name}-client = %{version}-%{release} | |
71 | Requires: %{name}-devel = %{version}-%{release} | |
aa39e90e AM |
72 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
73 | ||
74 | %description | |
75 | SystemTap is an instrumentation system for systems running Linux 2.6. | |
76 | Developers can write instrumentation to collect data on the operation | |
8bec3f09 JB |
77 | of the system. The base systemtap package provides the components |
78 | needed to locally develop and execute systemtap script. | |
aa39e90e | 79 | |
3bf8b266 JR |
80 | %description -l pl.UTF-8 |
81 | SystemTap to system oprzyrządowania dla systemów opartych na Linuksie | |
82 | 2.6. Programiści mogą pisać narzędzia do zbierania danych dotyczących | |
8bec3f09 JB |
83 | operacji w systemie. Główny pakiet dostarcza komponenty niezbędne do |
84 | lokalnego tworzenia i wykonywania skryptów systemtap. | |
099db71a AM |
85 | |
86 | %package runtime | |
87 | Summary: Programmable system-wide instrumentation system - runtime | |
8bec3f09 JB |
88 | Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - środowisko uruchomieniowe |
89 | Group: Applications/System | |
099db71a AM |
90 | |
91 | %description runtime | |
92 | SystemTap runtime contains the components needed to execute a | |
93 | systemtap script that was already compiled into a module using a local | |
94 | or remote systemtap-devel installation. | |
95 | ||
8bec3f09 JB |
96 | %description runtime -l pl.UTF-8 |
97 | Środowisko uruchomieniowe SystemTap zawiera komponenty niezbędne do | |
98 | uruchomienia skryptu systemtap, który został już wkompilowany do | |
99 | modułu przy użyciu lokalnej lub zdalnej instalacji systemtap-devel. | |
100 | ||
101 | %package runtime-java | |
102 | Summary: SystemTap Java runtime support | |
103 | Summary(pl.UTF-8): Obsługa Javy dla środowiska uruchomieniowego SystemTap | |
104 | Group: Libraries | |
105 | Requires: %{name}-runtime = %{version}-%{release} | |
8bec3f09 JB |
106 | Requires: byteman > 2.0 |
107 | ||
108 | %description runtime-java | |
109 | This package includes support files needed to run systemtap scripts | |
110 | that probe Java processes running on the OpenJDK 1.6 and OpenJDK 1.7 | |
111 | runtimes using Byteman. | |
112 | ||
113 | %description runtime-java -l pl.UTF-8 | |
114 | Ten pakiet zawiera pliki niezbędne do uruchamiania skryptów systemtap | |
115 | sondujące procesy Javy działające w środowiskach OpenJDK 1.6 i OpenJDK | |
116 | 1.7 przy użyciu Bytemana. | |
117 | ||
099db71a AM |
118 | %package client |
119 | Summary: Programmable system-wide instrumentation system - client | |
8bec3f09 JB |
120 | Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - klient |
121 | Group: Applications/System | |
122 | Requires: %{name}-runtime = %{version}-%{release} | |
099db71a AM |
123 | Requires: coreutils |
124 | Requires: grep | |
e7f20467 | 125 | Requires: libvirt >= 1.0.2 |
099db71a AM |
126 | Requires: openssh-clients |
127 | Requires: sed | |
099db71a AM |
128 | Requires: unzip |
129 | Requires: zip | |
130 | ||
131 | %description client | |
8bec3f09 JB |
132 | This package provides the components needed to develop systemtap |
133 | scripts and compile them using a local systemtap-devel or a remote | |
134 | systemtap-server installation, then run them using a local or remote | |
135 | systemtap-runtime. It includes script samples and documentation, and a | |
136 | copy of the tapset library for reference. | |
099db71a | 137 | |
8bec3f09 JB |
138 | %description client -l pl.UTF-8 |
139 | Ten pakiet dostarcza komponenty niezbędne do tworzenia skryptów | |
140 | systemtap i kompilowania ich przy użyciu lokalnej instalacji | |
141 | systemtap-devel lub zdalnej instalacji systemtap-server, a następnie | |
142 | uruchamiania ich przy użyciu lokalnej lub zdalnej instalacji | |
143 | systemtap-runtime. Zawiera przykłady skryptów oraz dokumentację, a | |
144 | także kopię biblioteki tapset. | |
145 | ||
146 | %package devel | |
147 | Summary: Programmable system-wide instrumentation system - development headers, tools | |
148 | Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - pliki nagłówkowe, narzędzia | |
149 | Group: Development/Tools | |
150 | Requires: %{name}-client = %{version}-%{release} | |
151 | Requires: gcc | |
152 | Requires: kernel-module-build | |
153 | Requires: make | |
154 | ||
155 | %description devel | |
156 | This package provides the components needed to compile a systemtap | |
157 | script from source form into executable (.ko) forms. It may be | |
158 | installed on a self-contained developer workstation (along with the | |
159 | systemtap-client and systemtap-runtime packages), or on a dedicated | |
160 | remote server (alongside the systemtap-server package). It includes a | |
161 | copy of the standard tapset library and the runtime library C files. | |
162 | ||
163 | %description devel -l pl.UTF-8 | |
164 | Ten pakiet dostarcza komponenty niezbędne do kompilowania skryptów | |
165 | systemtap z postaci źródłowej do wykonywalnej (.ko). Może być | |
166 | zainstalowany na samodzielnej stacji roboczej programisty (wraz z | |
167 | pakietami systemtap-client i systemtap-runtime) lub dedykowanym | |
168 | zdalnym serwerze (wraz z pakietem systemtap-server). Zawiera kopię | |
169 | standardowej biblioteki tapset oraz pliki biblioteki uruchomieniowej | |
170 | C. | |
099db71a AM |
171 | |
172 | %package initscript | |
8bec3f09 JB |
173 | Summary: SystemTap Initscripts |
174 | Summary(pl.UTF-8): Skrypty startowe SystemTap | |
099db71a | 175 | Group: Base |
8bec3f09 JB |
176 | Requires(post,preun): /sbin/chkconfig |
177 | Requires: %{name} = %{version}-%{release} | |
178 | Requires: rc-scripts | |
099db71a AM |
179 | |
180 | %description initscript | |
8bec3f09 | 181 | SysVinit scripts to launch selected systemtap scripts at system |
099db71a AM |
182 | startup. |
183 | ||
8bec3f09 JB |
184 | %description initscript -l pl.UTF-8 |
185 | Skrypty SysVinit do uruchamiania wybranych skryptów systemtap w | |
186 | trakcie startu systemu. | |
187 | ||
188 | %package server | |
189 | Summary: Instrumentation System Server | |
190 | Summary(pl.UTF-8): Serwer systemu oprzyrządowania | |
191 | Group: Applications/System | |
192 | Requires(post,preun): /sbin/chkconfig | |
193 | Requires: %{name}-devel = %{version}-%{release} | |
194 | Requires: /bin/mktemp | |
195 | Requires: unzip | |
196 | Requires: zip | |
197 | ||
198 | %description server | |
199 | This is the remote script compilation server component of systemtap. | |
200 | It announces itself to nearby clients with avahi (if available), and | |
201 | compiles systemtap scripts to kernel objects on their demand. | |
202 | ||
203 | %description server -l pl.UTF-8 | |
204 | Ten pakiet zawiera komponent serwera do zdalnej kompilacji skryptów | |
205 | systemtap. Rozgłasza się pobliskim klientom przy użyciu avahi (jeśli | |
206 | jest dostępny) i na żądanie kompiluje skrypty systemtap do obiektów | |
207 | jądra. | |
208 | ||
099db71a AM |
209 | %package sdt-devel |
210 | Summary: Static probe support tools | |
8bec3f09 JB |
211 | Summary(pl.UTF-8): Narzędzia do obsługi sond statycznych |
212 | License: GPL v2+ and Public Domain | |
099db71a | 213 | Group: Development/Libraries |
099db71a AM |
214 | |
215 | %description sdt-devel | |
216 | This package includes the <sys/sdt.h> header file used for static | |
217 | instrumentation compiled into userspace programs and libraries, along | |
218 | with the optional dtrace-compatibility preprocessor to process related | |
219 | .d files into tracing-macro-laden .h headers. | |
220 | ||
8bec3f09 JB |
221 | %description sdt-devel -l pl.UTF-8 |
222 | Ten pakiet zawiera plik nagłówkowy <sys/sdt.h> służący do | |
223 | wkompilowywania statycznego oprzyrządowania do programów i bibliotek | |
224 | przestrzeni użytkownika, wraz z opcjonalnym preprocesorem zgodności z | |
225 | dtrace, który przetwarza pliki .d na pliki nagłówkowe .h z makrami | |
226 | śledzącymi. | |
227 | ||
aa39e90e | 228 | %prep |
459a2a3b | 229 | %setup -q |
230 | %patch0 -p1 | |
099db71a | 231 | %patch1 -p1 |
1a30c954 | 232 | %patch4 -p1 |
8bec3f09 | 233 | %if "%{_rpmversion}" >= "5.0" |
6fbeb569 | 234 | %patch2 -p1 |
8bec3f09 | 235 | %endif |
26f73914 | 236 | |
aa39e90e | 237 | %build |
e7f20467 | 238 | %{__gettextize} |
459a2a3b | 239 | %{__aclocal} |
240 | %{__autoconf} | |
241 | %{__autoheader} | |
242 | %{__automake} | |
243 | %configure \ | |
099db71a | 244 | --disable-silent-rules \ |
1651fd5a | 245 | %{?with_crash:--enable-crash} \ |
8bec3f09 | 246 | --enable-docs%{!?with_doc:=no} \ |
099db71a | 247 | --enable-pie \ |
8bec3f09 JB |
248 | --enable-publican%{!?with_publican:=no} \ |
249 | --enable-server \ | |
099db71a | 250 | --enable-sqlite \ |
c15371b4 | 251 | --with-dyninst%{!?with_dyninst:=no} \ |
8bec3f09 | 252 | --with-java=%{?with_java:%{_jvmdir}/java}%{!?with_java:no} |
aa39e90e AM |
253 | %{__make} |
254 | ||
255 | %install | |
256 | rm -rf $RPM_BUILD_ROOT | |
8bec3f09 JB |
257 | install -d $RPM_BUILD_ROOT{/var/{cache,run}/%{name},%{systemdtmpfilesdir},%{systemdunitdir}} \ |
258 | $RPM_BUILD_ROOT{%{_sysconfdir}/stap-server/conf.d,/etc/{sysconfig,logrotate.d,rc.d/init.d}} \ | |
bc044f75 | 259 | $RPM_BUILD_ROOT/var/log/stap-server |
aa39e90e | 260 | |
43d6c0ff | 261 | %{__make} install \ |
aa39e90e AM |
262 | DESTDIR=$RPM_BUILD_ROOT |
263 | ||
8bec3f09 JB |
264 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/systemtap.conf |
265 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/stap-server.conf | |
266 | ||
267 | # not installed by make | |
7a86387a | 268 | install -p stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep |
aa39e90e | 269 | |
7a86387a ER |
270 | install -p initscript/systemtap $RPM_BUILD_ROOT/etc/rc.d/init.d |
271 | cp -p initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config | |
bc044f75 | 272 | |
7a86387a ER |
273 | install -p initscript/stap-server $RPM_BUILD_ROOT/etc/rc.d/init.d |
274 | cp -p initscript/config.stap-server $RPM_BUILD_ROOT/etc/sysconfig/stap-server | |
275 | cp -p initscript/logrotate.stap-server $RPM_BUILD_ROOT/etc/logrotate.d/stap-server | |
276 | cp -p stap-server.service $RPM_BUILD_ROOT%{systemdunitdir} | |
8bec3f09 JB |
277 | |
278 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/{conf.d,script.d} | |
279 | install -d $RPM_BUILD_ROOT/var/lib/stap-server/.systemtap | |
280 | install -d $RPM_BUILD_ROOT/var/log/stap-server | |
281 | ||
7a86387a | 282 | %if %{with doc} |
fa83958d ER |
283 | install -d $RPM_BUILD_ROOT%{_examplesdir} |
284 | mv $RPM_BUILD_ROOT{%{_docdir}/%{name}/examples,%{_examplesdir}/%{name}-client-%{version}} | |
7a86387a ER |
285 | %endif |
286 | ||
8bec3f09 | 287 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/systemtap docs-installed |
bc044f75 | 288 | |
099db71a AM |
289 | %find_lang %{name} |
290 | ||
a3bbe4b0 | 291 | %clean |
292 | rm -rf $RPM_BUILD_ROOT | |
293 | ||
aa39e90e AM |
294 | %files |
295 | %defattr(644,root,root,755) | |
8bec3f09 JB |
296 | |
297 | %files runtime -f %{name}.lang | |
298 | %defattr(644,root,root,755) | |
299 | %doc AUTHORS NEWS README* | |
839ed024 | 300 | %attr(755,root,root) %{_bindir}/stap-merge |
301 | %attr(755,root,root) %{_bindir}/stap-report | |
c15371b4 | 302 | %{?with_dyninst:%attr(755,root,root) %{_bindir}/stapdyn} |
839f235b | 303 | %attr(755,root,root) %{_bindir}/stapsh |
8bec3f09 JB |
304 | # XXX: %attr(4754,root,stapusr) staprun ? |
305 | %attr(755,root,root) %{_bindir}/staprun | |
73e96872 | 306 | %dir %{_libdir}/%{name} |
8bec3f09 JB |
307 | %attr(755,root,root) %{_libdir}/%{name}/stap-authorize-cert |
308 | %attr(755,root,root) %{_libdir}/%{name}/stapio | |
1651fd5a | 309 | %{?with_crash:%attr(755,root,root) %{_libdir}/%{name}/staplog.so} |
839f235b | 310 | %{_mandir}/man1/stap-merge.1* |
311fc893 | 311 | %{_mandir}/man1/stap-report.1* |
8bec3f09 JB |
312 | %{_mandir}/man3/stapex.3stap* |
313 | %{_mandir}/man3/stapfuncs.3stap* | |
314 | %{_mandir}/man3/stapprobes.3stap* | |
315 | %{_mandir}/man3/stapvars.3stap* | |
52ae841a JB |
316 | %if %{with doc} |
317 | %{_mandir}/man3/function::*.3stap* | |
318 | %{_mandir}/man3/probe::*.3stap* | |
319 | %{_mandir}/man3/tapset::*.3stap* | |
320 | %endif | |
8bec3f09 | 321 | %{_mandir}/man7/error::*.7stap* |
bc044f75 | 322 | %{_mandir}/man7/stappaths.7* |
8bec3f09 | 323 | %{_mandir}/man7/warning::debuginfo.7stap* |
eae4d4c2 | 324 | %{_mandir}/man7/warning::symbols.7stap* |
311fc893 | 325 | %{?with_dyninst:%{_mandir}/man8/stapdyn.8*} |
839f235b | 326 | %{_mandir}/man8/staprun.8* |
311fc893 | 327 | %{_mandir}/man8/stapsh.8* |
e7f20467 | 328 | %{_mandir}/man8/systemtap.8* |
099db71a | 329 | |
8bec3f09 JB |
330 | %if %{with java} |
331 | %files runtime-java | |
332 | %defattr(644,root,root,755) | |
333 | %attr(755,root,root) %{_libdir}/%{name}/stapbm | |
334 | %attr(755,root,root) %{_libdir}/%{name}/libHelperSDT_*.so | |
335 | %{_libdir}/%{name}/HelperSDT.jar | |
336 | %endif | |
337 | ||
338 | %files client | |
339 | %defattr(644,root,root,755) | |
52ae841a | 340 | %if %{with doc} |
7a86387a ER |
341 | %doc docs-installed/{tapsets,langref.pdf,tutorial.pdf} |
342 | %{_examplesdir}/%{name}-client-%{version} | |
343 | %endif | |
8bec3f09 JB |
344 | %attr(755,root,root) %{_bindir}/stap |
345 | %attr(755,root,root) %{_bindir}/stap-prep | |
3d813eaf | 346 | %attr(755,root,root) %{_bindir}/stapvirt |
8bec3f09 JB |
347 | %dir %{_datadir}/%{name} |
348 | %{_datadir}/%{name}/tapset | |
349 | %{_mandir}/man1/stap.1* | |
350 | %{_mandir}/man1/stap-prep.1* | |
3d813eaf | 351 | %{_mandir}/man1/stapvirt.1* |
8bec3f09 JB |
352 | |
353 | %files devel | |
354 | %defattr(644,root,root,755) | |
355 | %{_datadir}/%{name}/runtime | |
356 | ||
357 | %files initscript | |
358 | %defattr(644,root,root,755) | |
8bec3f09 JB |
359 | %attr(754,root,root) /etc/rc.d/init.d/systemtap |
360 | %dir %{_sysconfdir}/systemtap | |
361 | %dir %{_sysconfdir}/systemtap/conf.d | |
362 | %dir %{_sysconfdir}/systemtap/script.d | |
363 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemtap/config | |
364 | %{systemdtmpfilesdir}/systemtap.conf | |
365 | %dir /var/cache/%{name} | |
366 | %dir /var/run/%{name} | |
367 | ||
368 | %files server | |
369 | %defattr(644,root,root,755) | |
370 | %attr(755,root,root) %{_bindir}/stap-server | |
371 | %attr(755,root,root) %{_libdir}/%{name}/stap-env | |
372 | %attr(755,root,root) %{_libdir}/%{name}/stap-gen-cert | |
373 | %attr(755,root,root) %{_libdir}/%{name}/stap-serverd | |
374 | %attr(755,root,root) %{_libdir}/%{name}/stap-sign-module | |
375 | %attr(755,root,root) %{_libdir}/%{name}/stap-start-server | |
376 | %attr(755,root,root) %{_libdir}/%{name}/stap-stop-server | |
377 | %dir %{_sysconfdir}/stap-server | |
378 | %dir %{_sysconfdir}/stap-server/conf.d | |
379 | %attr(754,root,root) /etc/rc.d/init.d/stap-server | |
380 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stap-server | |
381 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/stap-server | |
382 | %{systemdunitdir}/stap-server.service | |
383 | %{systemdtmpfilesdir}/stap-server.conf | |
384 | # TODO: create user/group | |
385 | #%attr(750,stap-server,stap-server) %dir /var/lib/stap-server | |
386 | #%attr(700,stap-server,stap-server) %dir /var/lib/stap-server/.systemtap | |
387 | #%attr(755,stap-server,stap-server) %dir /var/log/stap-server | |
388 | #%attr(755,stap-server,stap-server) %dir /var/run/stap-server | |
389 | %{_mandir}/man8/stap-server.8* | |
390 | ||
391 | %files sdt-devel | |
099db71a AM |
392 | %defattr(644,root,root,755) |
393 | %attr(755,root,root) %{_bindir}/dtrace | |
394 | %{_includedir}/sys/sdt.h | |
395 | %{_includedir}/sys/sdt-config.h | |
396 | %{_mandir}/man1/dtrace.1* |