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 %bcond_with rpm5 # build with rpm5
12 %ifnarch %{ix86} %{x8664} x32 alpha arm ia64 ppc64 s390 s390x
15 %ifnarch %{ix86} %{x8664} x32 ppc ppc64 aarch64
16 %undefine with_dyninst
18 Summary: Instrumentation System
19 Summary(pl.UTF-8): System oprzyrządowania
25 Source0: ftp://sourceware.org/pub/systemtap/releases/%{name}-%{version}.tar.gz
26 # Source0-md5: c0d629b1188a649a482b95661b53c910
27 Source1: %{name}.tmpfiles
28 Source2: stap-server.tmpfiles
29 Patch0: %{name}-dyninst.patch
30 Patch1: %{name}-systemd.patch
31 Patch2: %{name}-rpm5-support.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 >= 2.0
44 BuildRequires: json-c-devel >= 0.12
45 %{?with_java:BuildRequires: jdk}
46 %if %{with dyninst} || %{with java}
47 BuildRequires: libselinux-devel
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
57 BuildRequires: python-devel >= 1:2.6
58 BuildRequires: python-setuptools
61 BuildRequires: python3-devel >= 1:3.2
62 BuildRequires: python3-setuptools
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
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
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)
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.
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.
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
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.
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.
114 %package runtime-java
115 Summary: SystemTap Java runtime support
116 Summary(pl.UTF-8): Obsługa Javy dla środowiska uruchomieniowego SystemTap
118 Requires: %{name}-runtime = %{version}-%{release}
119 Requires: byteman > 2.0
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.
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.
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
138 %description runtime-python2
139 This package includes support files needed to run systemtap scripts
140 that probe Python 2 processes.
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.
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
153 %description runtime-python3
154 This package includes support files needed to run systemtap scripts
155 that probe Python 3 processes.
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.
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}
168 Requires: libvirt >= 1.0.2
169 Requires: openssh-clients
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.
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.
190 Summary: Systemtap-Prometheus interoperation mechanism
191 Summary(pl.UTF-8): Mechanizm współpracy Systemtap-Prometheus
192 Group: Applications/System
193 Requires: %{name}-runtime = %{version}-%{release}
195 %description exporter
196 This package includes files for a systemd service that manages
197 systemtap sessions and relays Prometheus metrics from the sessions to
198 remote requesters on demand.
200 %description exporter -l pl.UTF-8
201 Ten pakiet zawiera pliki usługi systemd zarządzającej sesjami
202 systemtap i przekazującej na żądanie metryki Prometheusa z sesji do
206 Summary: Programmable system-wide instrumentation system - development headers, tools
207 Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - pliki nagłówkowe, narzędzia
208 Group: Development/Tools
209 Requires: %{name}-client = %{version}-%{release}
211 Requires: kernel-module-build
215 This package provides the components needed to compile a systemtap
216 script from source form into executable (.ko) forms. It may be
217 installed on a self-contained developer workstation (along with the
218 systemtap-client and systemtap-runtime packages), or on a dedicated
219 remote server (alongside the systemtap-server package). It includes a
220 copy of the standard tapset library and the runtime library C files.
222 %description devel -l pl.UTF-8
223 Ten pakiet dostarcza komponenty niezbędne do kompilowania skryptów
224 systemtap z postaci źródłowej do wykonywalnej (.ko). Może być
225 zainstalowany na samodzielnej stacji roboczej programisty (wraz z
226 pakietami systemtap-client i systemtap-runtime) lub dedykowanym
227 zdalnym serwerze (wraz z pakietem systemtap-server). Zawiera kopię
228 standardowej biblioteki tapset oraz pliki biblioteki uruchomieniowej
232 Summary: SystemTap Initscripts
233 Summary(pl.UTF-8): Skrypty startowe SystemTap
235 Requires(post,preun): /sbin/chkconfig
236 Requires: %{name} = %{version}-%{release}
239 %description initscript
240 SysVinit scripts to launch selected systemtap scripts at system
243 %description initscript -l pl.UTF-8
244 Skrypty SysVinit do uruchamiania wybranych skryptów systemtap w
245 trakcie startu systemu.
248 Summary: Instrumentation System Server
249 Summary(pl.UTF-8): Serwer systemu oprzyrządowania
250 Group: Applications/System
251 Requires(post,preun): /sbin/chkconfig
252 Requires: %{name}-devel = %{version}-%{release}
253 Requires: /bin/mktemp
258 This is the remote script compilation server component of systemtap.
259 It announces itself to nearby clients with avahi (if available), and
260 compiles systemtap scripts to kernel objects on their demand.
262 %description server -l pl.UTF-8
263 Ten pakiet zawiera komponent serwera do zdalnej kompilacji skryptów
264 systemtap. Rozgłasza się pobliskim klientom przy użyciu avahi (jeśli
265 jest dostępny) i na żądanie kompiluje skrypty systemtap do obiektów
269 Summary: Static probe support tools
270 Summary(pl.UTF-8): Narzędzia do obsługi sond statycznych
271 License: GPL v2+ and Public Domain
272 Group: Development/Libraries
274 %description sdt-devel
275 This package includes the <sys/sdt.h> header file used for static
276 instrumentation compiled into userspace programs and libraries, along
277 with the optional dtrace-compatibility preprocessor to process related
278 .d files into tracing-macro-laden .h headers.
280 %description sdt-devel -l pl.UTF-8
281 Ten pakiet zawiera plik nagłówkowy <sys/sdt.h> służący do
282 wkompilowywania statycznego oprzyrządowania do programów i bibliotek
283 przestrzeni użytkownika, wraz z opcjonalnym preprocesorem zgodności z
284 dtrace, który przetwarza pliki .d na pliki nagłówkowe .h z makrami
288 Summary: SystemTap guides and tutorials
289 Summary(pl.UTF-8): Przewodniki i dokumentacja wprowadzająca do SystemTap
293 SystemTap guides and tutorials.
295 %description doc -l pl.UTF-8
296 Przewodniki i dokumentacja wprowadzająca do SystemTap.
302 %{?with_rpm5:%patch2 -p1}
304 %{__sed} -E -i -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
305 testsuite/systemtap.examples/general/pyexample.py
307 find testsuite/systemtap.examples/ -name '*.stp' -print0 | xargs -0 \
308 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+stap(\s|$),#!%{_bindir}/stap\1,'
317 --disable-silent-rules \
318 %{?with_crash:--enable-crash} \
319 --enable-docs%{!?with_doc:=no} \
323 --with-dyninst%{!?with_dyninst:=no} \
324 --with-java=%{?with_java:%{_jvmdir}/java}%{!?with_java:no}
328 rm -rf $RPM_BUILD_ROOT
329 install -d $RPM_BUILD_ROOT{/var/{cache,run}/%{name},%{systemdtmpfilesdir},%{systemdunitdir}} \
330 $RPM_BUILD_ROOT{%{_sysconfdir}/stap-server/conf.d,/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
331 $RPM_BUILD_ROOT/var/log/stap-server
334 DESTDIR=$RPM_BUILD_ROOT
336 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/systemtap.conf
337 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/stap-server.conf
339 # not installed by make
340 install -p stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
342 install -p initscript/systemtap $RPM_BUILD_ROOT/etc/rc.d/init.d
343 cp -p initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
345 install -p initscript/stap-server $RPM_BUILD_ROOT/etc/rc.d/init.d
346 cp -p initscript/config.stap-server $RPM_BUILD_ROOT/etc/sysconfig/stap-server
347 cp -p initscript/logrotate.stap-server $RPM_BUILD_ROOT/etc/logrotate.d/stap-server
348 cp -p stap-server.service $RPM_BUILD_ROOT%{systemdunitdir}
350 install -d $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/{conf.d,script.d}
351 install -d $RPM_BUILD_ROOT/var/lib/stap-server/.systemtap
352 install -d $RPM_BUILD_ROOT/var/log/stap-server
354 %{__mv} $RPM_BUILD_ROOT%{_docdir}/systemtap docs-installed
363 rm -rf $RPM_BUILD_ROOT
366 %defattr(644,root,root,755)
368 %files runtime -f %{name}.lang
369 %defattr(644,root,root,755)
370 %doc AUTHORS NEWS README*
371 %attr(755,root,root) %{_bindir}/stap-merge
372 %attr(755,root,root) %{_bindir}/stap-report
373 %attr(755,root,root) %{_bindir}/stapbpf
374 %{?with_dyninst:%attr(755,root,root) %{_bindir}/stapdyn}
375 %attr(755,root,root) %{_bindir}/stapsh
376 # XXX: %attr(4754,root,stapusr) staprun ?
377 %attr(755,root,root) %{_bindir}/staprun
378 %dir %{_libexecdir}/%{name}
379 %attr(755,root,root) %{_libexecdir}/%{name}/stap-authorize-cert
380 %attr(755,root,root) %{_libexecdir}/%{name}/stapio
382 %if "%{_libdir}" != "%{_libexecdir}"
383 %dir %{_libdir}/%{name}
385 %attr(755,root,root) %{_libdir}/%{name}/staplog.so
387 %{_mandir}/man1/stap-merge.1*
388 %{_mandir}/man1/stap-report.1*
389 %{_mandir}/man1/stapref.1*
390 %{_mandir}/man3/stapex.3stap*
391 %{_mandir}/man3/stapfuncs.3stap*
392 %{_mandir}/man3/stapprobes.3stap*
393 %{_mandir}/man3/stapvars.3stap*
395 %{_mandir}/man3/function::*.3stap*
396 %{_mandir}/man3/macro::*.3stap*
397 %{_mandir}/man3/probe::*.3stap*
398 %{_mandir}/man3/tapset::*.3stap*
400 %{_mandir}/man7/error::*.7stap*
401 %{_mandir}/man7/stappaths.7*
402 %{_mandir}/man7/warning::buildid.7stap*
403 %{_mandir}/man7/warning::debuginfo.7stap*
404 %{_mandir}/man7/warning::pass5.7stap*
405 %{_mandir}/man7/warning::symbols.7stap*
406 %{_mandir}/man8/stapbpf.8*
407 %{?with_dyninst:%{_mandir}/man8/stapdyn.8*}
408 %{_mandir}/man8/staprun.8*
409 %{_mandir}/man8/stapsh.8*
410 %lang(cs) %{_mandir}/cs/man1/stap-merge.1*
411 %lang(cs) %{_mandir}/cs/man1/stap-report.1*
412 %lang(cs) %{_mandir}/cs/man1/stapref.1*
413 %lang(cs) %{_mandir}/cs/man3/stapex.3stap*
414 %lang(cs) %{_mandir}/cs/man3/stapfuncs.3stap*
415 %lang(cs) %{_mandir}/cs/man3/stapprobes.3stap*
416 %lang(cs) %{_mandir}/cs/man3/stapvars.3stap*
417 %lang(cs) %{_mandir}/cs/man7/error::*.7stap*
418 %lang(cs) %{_mandir}/cs/man7/stappaths.7*
419 %lang(cs) %{_mandir}/cs/man7/warning::buildid.7stap*
420 %lang(cs) %{_mandir}/cs/man7/warning::debuginfo.7stap*
421 %lang(cs) %{_mandir}/cs/man7/warning::symbols.7stap*
422 %lang(cs) %{_mandir}/cs/man8/stapsh.8*
423 %lang(cs) %{_mandir}/cs/man8/systemtap.8*
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_libexecdir}/%{name}/stapbm
429 %attr(755,root,root) %{_libexecdir}/%{name}/libHelperSDT.so
430 %{_libexecdir}/%{name}/HelperSDT.jar
434 %files runtime-python2
435 %defattr(644,root,root,755)
436 %dir %{py_sitedir}/HelperSDT
437 %attr(755,root,root) %{py_sitedir}/HelperSDT/_HelperSDT.so
438 %{py_sitedir}/HelperSDT/*.py[co]
439 %{py_sitedir}/HelperSDT-0.1.0-py*.egg-info
443 %files runtime-python3
444 %defattr(644,root,root,755)
445 %dir %{py3_sitedir}/HelperSDT
446 %attr(755,root,root) %{py3_sitedir}/HelperSDT/_HelperSDT.cpython-*.so
447 %{py3_sitedir}/HelperSDT/*.py
448 %{py3_sitedir}/HelperSDT/__pycache__
449 %{py3_sitedir}/HelperSDT-0.1.0-py*.egg-info
453 %defattr(644,root,root,755)
454 %attr(755,root,root) %{_bindir}/stap
455 %attr(755,root,root) %{_bindir}/stap-prep
456 %attr(755,root,root) %{_bindir}/stapvirt
457 %dir %{_datadir}/%{name}
458 %{_datadir}/%{name}/examples
459 %{_datadir}/%{name}/tapset
460 %{_mandir}/man1/stap.1*
461 %{_mandir}/man1/stap-prep.1*
462 %{_mandir}/man1/stapvirt.1*
463 %lang(cs) %{_mandir}/cs/man1/stap.1*
464 %lang(cs) %{_mandir}/cs/man1/stap-prep.1*
465 %lang(cs) %{_mandir}/cs/man1/stapvirt.1*
468 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_sbindir}/stap-exporter
470 %{_sysconfdir}/stap-exporter
471 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stap-exporter
472 %{systemdunitdir}/stap-exporter.service
473 %{_mandir}/man8/stap-exporter.8*
476 %defattr(644,root,root,755)
477 %attr(755,root,root) %{_bindir}/stap-profile-annotate
478 %{_datadir}/%{name}/runtime
479 %if %{with python2} || %{with python3}
480 %dir %{_libexecdir}/%{name}
481 %dir %{_libexecdir}/%{name}/python
482 %attr(755,root,root) %{_libexecdir}/systemtap/python/stap-resolve-module-function.py
486 %defattr(644,root,root,755)
487 %attr(754,root,root) /etc/rc.d/init.d/systemtap
488 %dir %{_sysconfdir}/systemtap
489 %dir %{_sysconfdir}/systemtap/conf.d
490 %dir %{_sysconfdir}/systemtap/script.d
491 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemtap/config
492 %{systemdtmpfilesdir}/systemtap.conf
493 %dir /var/cache/%{name}
494 %dir /var/run/%{name}
497 %defattr(644,root,root,755)
498 %attr(755,root,root) %{_bindir}/stap-server
499 %attr(755,root,root) %{_libexecdir}/%{name}/stap-env
500 %attr(755,root,root) %{_libexecdir}/%{name}/stap-gen-cert
501 %attr(755,root,root) %{_libexecdir}/%{name}/stap-serverd
502 %attr(755,root,root) %{_libexecdir}/%{name}/stap-sign-module
503 %attr(755,root,root) %{_libexecdir}/%{name}/stap-start-server
504 %attr(755,root,root) %{_libexecdir}/%{name}/stap-stop-server
505 %dir %{_sysconfdir}/stap-server
506 %dir %{_sysconfdir}/stap-server/conf.d
507 %attr(754,root,root) /etc/rc.d/init.d/stap-server
508 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stap-server
509 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/stap-server
510 %{systemdunitdir}/stap-server.service
511 %{systemdtmpfilesdir}/stap-server.conf
512 # TODO: create user/group
513 #%attr(750,stap-server,stap-server) %dir /var/lib/stap-server
514 #%attr(700,stap-server,stap-server) %dir /var/lib/stap-server/.systemtap
515 #%attr(755,stap-server,stap-server) %dir /var/log/stap-server
516 #%attr(755,stap-server,stap-server) %dir /var/run/stap-server
517 %{_mandir}/man8/stap-server.8*
518 %{_mandir}/man8/systemtap-service.8*
519 %lang(cs) %{_mandir}/cs/man8/stap-server.8*
522 %defattr(644,root,root,755)
523 %attr(755,root,root) %{_bindir}/dtrace
524 %{_includedir}/sys/sdt.h
525 %{_includedir}/sys/sdt-config.h
526 %{_mandir}/man1/dtrace.1*
527 %lang(cs) %{_mandir}/cs/man1/dtrace.1*
531 %defattr(644,root,root,755)
532 %doc doc/{langref,tutorial}.pdf doc/beginners/SystemTap_Beginners_Guide.pdf docs-installed/tapsets.pdf