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