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: http://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz
26 # Source0-md5: 7f80117649a9eb663781b5372e8a4f96
27 Source1: %{name}.tmpfiles
28 Source2: stap-server.tmpfiles
29 Patch1: %{name}-build.patch
30 Patch2: %{name}-rpm5-support.patch
31 Patch3: %{name}-no-werror.patch
32 Patch4: format-security.patch
33 Patch5: %{name}-dyninst.patch
34 URL: http://sourceware.org/systemtap/
35 BuildRequires: autoconf >= 2.63
36 BuildRequires: automake
37 BuildRequires: avahi-devel
38 BuildRequires: boost-devel
39 %{?with_crash:BuildRequires: crash-devel}
40 BuildRequires: docbook-dtd412-xml
41 %{?with_dyninst:BuildRequires: dyninst-devel >= 8.0}
42 BuildRequires: elfutils-devel >= 0.148
43 BuildRequires: gettext-devel >= 0.19.4
44 BuildRequires: gettext-tools >= 0.19.4
45 BuildRequires: glib2-devel >= 2.0
46 BuildRequires: json-c-devel >= 0.12
47 %{?with_java:BuildRequires: jdk}
48 %if %{with dyninst} || %{with java}
49 BuildRequires: libselinux-devel
51 BuildRequires: libstdc++-devel >= 6:4.5
52 BuildRequires: libvirt-devel >= 1.0.2
53 BuildRequires: libxml2-devel >= 2.0
54 BuildRequires: mysql-devel
55 BuildRequires: ncurses-devel
56 BuildRequires: nss-devel >= 3
57 BuildRequires: pkgconfig
59 BuildRequires: python-devel >= 1:2.6
60 BuildRequires: python-setuptools
63 BuildRequires: python3-devel >= 1:3.2
64 BuildRequires: python3-setuptools
66 BuildRequires: readline-devel
67 BuildRequires: rpm-devel
68 %{?with_java:BuildRequires: rpm-javaprov}
69 BuildRequires: rpm-pythonprov
70 BuildRequires: rpmbuild(macros) >= 1.219
71 BuildRequires: sqlite3-devel >= 3.7
74 BuildRequires: latex2html
75 %{?with_publican:BuildRequires: publican}
76 BuildRequires: texlive-dvips
77 BuildRequires: texlive-fonts-bitstream
78 BuildRequires: texlive-fonts-type1-bitstream
79 BuildRequires: texlive-latex
80 BuildRequires: texlive-latex-psnfss
81 BuildRequires: texlive-xetex
83 # let base mean client+local development package
84 Requires: %{name}-client = %{version}-%{release}
85 Requires: %{name}-devel = %{version}-%{release}
86 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89 SystemTap is an instrumentation system for systems running Linux 2.6.
90 Developers can write instrumentation to collect data on the operation
91 of the system. The base systemtap package provides the components
92 needed to locally develop and execute systemtap script.
94 %description -l pl.UTF-8
95 SystemTap to system oprzyrządowania dla systemów opartych na Linuksie
96 2.6. Programiści mogą pisać narzędzia do zbierania danych dotyczących
97 operacji w systemie. Główny pakiet dostarcza komponenty niezbędne do
98 lokalnego tworzenia i wykonywania skryptów systemtap.
101 Summary: Programmable system-wide instrumentation system - runtime
102 Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - środowisko uruchomieniowe
103 Group: Applications/System
104 Requires: json-c >= 0.12
107 SystemTap runtime contains the components needed to execute a
108 systemtap script that was already compiled into a module using a local
109 or remote systemtap-devel installation.
111 %description runtime -l pl.UTF-8
112 Środowisko uruchomieniowe SystemTap zawiera komponenty niezbędne do
113 uruchomienia skryptu systemtap, który został już wkompilowany do
114 modułu przy użyciu lokalnej lub zdalnej instalacji systemtap-devel.
116 %package runtime-java
117 Summary: SystemTap Java runtime support
118 Summary(pl.UTF-8): Obsługa Javy dla środowiska uruchomieniowego SystemTap
120 Requires: %{name}-runtime = %{version}-%{release}
121 Requires: byteman > 2.0
123 %description runtime-java
124 This package includes support files needed to run systemtap scripts
125 that probe Java processes running on the OpenJDK 1.6 and OpenJDK 1.7
126 runtimes using Byteman.
128 %description runtime-java -l pl.UTF-8
129 Ten pakiet zawiera pliki niezbędne do uruchamiania skryptów systemtap
130 sondujących procesy Javy działające w środowiskach OpenJDK 1.6 i
131 OpenJDK 1.7 przy użyciu Bytemana.
133 %package runtime-python2
134 Summary: SystemTap Python 2 Runtime Support
135 Summary(pl.UTF-8): Obsługa Pythona 2 dla środowiska uruchomieniowego SystemTap
136 Group: Development/Tools
137 Requires: %{name}-runtime = %{version}-%{release}
138 Requires: python-modules >= 1:2.6
140 %description runtime-python2
141 This package includes support files needed to run systemtap scripts
142 that probe Python 2 processes.
144 %description runtime-python2 -l pl.UTF-8
145 Ten pakiet zawiera pliki niezbędne do uruchamiania skryptów systemtap
146 sondujących procesy Pythona 2.
148 %package runtime-python3
149 Summary: SystemTap Python 3 Runtime Support
150 Summary(pl.UTF-8): Obsługa Pythona 3 dla środowiska uruchomieniowego SystemTap
151 Group: Development/Tools
152 Requires: %{name}-runtime = %{version}-%{release}
153 Requires: python3-modules >= 1:3.2
155 %description runtime-python3
156 This package includes support files needed to run systemtap scripts
157 that probe Python 3 processes.
159 %description runtime-python3 -l pl.UTF-8
160 Ten pakiet zawiera pliki niezbędne do uruchamiania skryptów systemtap
161 sondujących procesy Pythona 3.
164 Summary: Programmable system-wide instrumentation system - client
165 Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - klient
166 Group: Applications/System
167 Requires: %{name}-runtime = %{version}-%{release}
170 Requires: libvirt >= 1.0.2
171 Requires: openssh-clients
177 This package provides the components needed to develop systemtap
178 scripts and compile them using a local systemtap-devel or a remote
179 systemtap-server installation, then run them using a local or remote
180 systemtap-runtime. It includes script samples and documentation, and a
181 copy of the tapset library for reference.
183 %description client -l pl.UTF-8
184 Ten pakiet dostarcza komponenty niezbędne do tworzenia skryptów
185 systemtap i kompilowania ich przy użyciu lokalnej instalacji
186 systemtap-devel lub zdalnej instalacji systemtap-server, a następnie
187 uruchamiania ich przy użyciu lokalnej lub zdalnej instalacji
188 systemtap-runtime. Zawiera przykłady skryptów oraz dokumentację, a
189 także kopię biblioteki tapset.
192 Summary: Programmable system-wide instrumentation system - development headers, tools
193 Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - pliki nagłówkowe, narzędzia
194 Group: Development/Tools
195 Requires: %{name}-client = %{version}-%{release}
197 Requires: kernel-module-build
201 This package provides the components needed to compile a systemtap
202 script from source form into executable (.ko) forms. It may be
203 installed on a self-contained developer workstation (along with the
204 systemtap-client and systemtap-runtime packages), or on a dedicated
205 remote server (alongside the systemtap-server package). It includes a
206 copy of the standard tapset library and the runtime library C files.
208 %description devel -l pl.UTF-8
209 Ten pakiet dostarcza komponenty niezbędne do kompilowania skryptów
210 systemtap z postaci źródłowej do wykonywalnej (.ko). Może być
211 zainstalowany na samodzielnej stacji roboczej programisty (wraz z
212 pakietami systemtap-client i systemtap-runtime) lub dedykowanym
213 zdalnym serwerze (wraz z pakietem systemtap-server). Zawiera kopię
214 standardowej biblioteki tapset oraz pliki biblioteki uruchomieniowej
218 Summary: SystemTap Initscripts
219 Summary(pl.UTF-8): Skrypty startowe SystemTap
221 Requires(post,preun): /sbin/chkconfig
222 Requires: %{name} = %{version}-%{release}
225 %description initscript
226 SysVinit scripts to launch selected systemtap scripts at system
229 %description initscript -l pl.UTF-8
230 Skrypty SysVinit do uruchamiania wybranych skryptów systemtap w
231 trakcie startu systemu.
234 Summary: Instrumentation System Server
235 Summary(pl.UTF-8): Serwer systemu oprzyrządowania
236 Group: Applications/System
237 Requires(post,preun): /sbin/chkconfig
238 Requires: %{name}-devel = %{version}-%{release}
239 Requires: /bin/mktemp
244 This is the remote script compilation server component of systemtap.
245 It announces itself to nearby clients with avahi (if available), and
246 compiles systemtap scripts to kernel objects on their demand.
248 %description server -l pl.UTF-8
249 Ten pakiet zawiera komponent serwera do zdalnej kompilacji skryptów
250 systemtap. Rozgłasza się pobliskim klientom przy użyciu avahi (jeśli
251 jest dostępny) i na żądanie kompiluje skrypty systemtap do obiektów
255 Summary: Static probe support tools
256 Summary(pl.UTF-8): Narzędzia do obsługi sond statycznych
257 License: GPL v2+ and Public Domain
258 Group: Development/Libraries
260 %description sdt-devel
261 This package includes the <sys/sdt.h> header file used for static
262 instrumentation compiled into userspace programs and libraries, along
263 with the optional dtrace-compatibility preprocessor to process related
264 .d files into tracing-macro-laden .h headers.
266 %description sdt-devel -l pl.UTF-8
267 Ten pakiet zawiera plik nagłówkowy <sys/sdt.h> służący do
268 wkompilowywania statycznego oprzyrządowania do programów i bibliotek
269 przestrzeni użytkownika, wraz z opcjonalnym preprocesorem zgodności z
270 dtrace, który przetwarza pliki .d na pliki nagłówkowe .h z makrami
274 Summary: SystemTap guides and tutorials
275 Summary(pl.UTF-8): Przewodniki i dokumentacja wprowadzająca do SystemTap
279 SystemTap guides and tutorials.
281 %description doc -l pl.UTF-8
282 Przewodniki i dokumentacja wprowadzająca do SystemTap.
287 %{?with_rpm5:%patch2 -p1}
292 %{__sed} -E -i -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
293 testsuite/systemtap.examples/general/pyexample.py
295 find testsuite/systemtap.examples/ -name '*.stp' -print0 | xargs -0 \
296 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+stap(\s|$),#!%{_bindir}/stap\1,'
305 --disable-silent-rules \
306 %{?with_crash:--enable-crash} \
307 --enable-docs%{!?with_doc:=no} \
311 --with-dyninst%{!?with_dyninst:=no} \
312 --with-java=%{?with_java:%{_jvmdir}/java}%{!?with_java:no}
316 rm -rf $RPM_BUILD_ROOT
317 install -d $RPM_BUILD_ROOT{/var/{cache,run}/%{name},%{systemdtmpfilesdir},%{systemdunitdir}} \
318 $RPM_BUILD_ROOT{%{_sysconfdir}/stap-server/conf.d,/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
319 $RPM_BUILD_ROOT/var/log/stap-server
322 DESTDIR=$RPM_BUILD_ROOT
324 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/systemtap.conf
325 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/stap-server.conf
327 # not installed by make
328 install -p stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
330 install -p initscript/systemtap $RPM_BUILD_ROOT/etc/rc.d/init.d
331 cp -p initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
333 install -p initscript/stap-server $RPM_BUILD_ROOT/etc/rc.d/init.d
334 cp -p initscript/config.stap-server $RPM_BUILD_ROOT/etc/sysconfig/stap-server
335 cp -p initscript/logrotate.stap-server $RPM_BUILD_ROOT/etc/logrotate.d/stap-server
336 cp -p stap-server.service $RPM_BUILD_ROOT%{systemdunitdir}
338 install -d $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/{conf.d,script.d}
339 install -d $RPM_BUILD_ROOT/var/lib/stap-server/.systemtap
340 install -d $RPM_BUILD_ROOT/var/log/stap-server
342 %{__mv} $RPM_BUILD_ROOT%{_docdir}/systemtap docs-installed
351 rm -rf $RPM_BUILD_ROOT
354 %defattr(644,root,root,755)
356 %files runtime -f %{name}.lang
357 %defattr(644,root,root,755)
358 %doc AUTHORS NEWS README*
359 %attr(755,root,root) %{_bindir}/stap-merge
360 %attr(755,root,root) %{_bindir}/stap-report
361 %attr(755,root,root) %{_bindir}/stapbpf
362 %{?with_dyninst:%attr(755,root,root) %{_bindir}/stapdyn}
363 %attr(755,root,root) %{_bindir}/stapsh
364 # XXX: %attr(4754,root,stapusr) staprun ?
365 %attr(755,root,root) %{_bindir}/staprun
366 %dir %{_libexecdir}/%{name}
367 %attr(755,root,root) %{_libexecdir}/%{name}/stap-authorize-cert
368 %attr(755,root,root) %{_libexecdir}/%{name}/stapio
370 %if "%{_libdir}" != "%{_libexecdir}"
371 %dir %{_libdir}/%{name}
373 %attr(755,root,root) %{_libdir}/%{name}/staplog.so
375 %{_mandir}/man1/stap-merge.1*
376 %{_mandir}/man1/stap-report.1*
377 %{_mandir}/man1/stapref.1*
378 %{_mandir}/man3/stapex.3stap*
379 %{_mandir}/man3/stapfuncs.3stap*
380 %{_mandir}/man3/stapprobes.3stap*
381 %{_mandir}/man3/stapvars.3stap*
383 %{_mandir}/man3/function::*.3stap*
384 %{_mandir}/man3/macro::*.3stap*
385 %{_mandir}/man3/probe::*.3stap*
386 %{_mandir}/man3/tapset::*.3stap*
388 %{_mandir}/man7/error::*.7stap*
389 %{_mandir}/man7/stappaths.7*
390 %{_mandir}/man7/warning::debuginfo.7stap*
391 %{_mandir}/man7/warning::symbols.7stap*
392 %{_mandir}/man8/stapbpf.8*
393 %{?with_dyninst:%{_mandir}/man8/stapdyn.8*}
394 %{_mandir}/man8/staprun.8*
395 %{_mandir}/man8/stapsh.8*
396 %{_mandir}/man8/systemtap.8*
397 %lang(cs) %{_mandir}/cs/man1/stap-merge.1*
398 %lang(cs) %{_mandir}/cs/man1/stap-report.1*
399 %lang(cs) %{_mandir}/cs/man1/stapref.1*
400 %lang(cs) %{_mandir}/cs/man3/stapex.3stap*
401 %lang(cs) %{_mandir}/cs/man3/stapfuncs.3stap*
402 %lang(cs) %{_mandir}/cs/man3/stapprobes.3stap*
403 %lang(cs) %{_mandir}/cs/man3/stapvars.3stap*
404 %lang(cs) %{_mandir}/cs/man7/error::*.7stap*
405 %lang(cs) %{_mandir}/cs/man7/stappaths.7*
406 %lang(cs) %{_mandir}/cs/man7/warning::debuginfo.7stap*
407 %lang(cs) %{_mandir}/cs/man7/warning::symbols.7stap*
408 %lang(cs) %{_mandir}/cs/man8/stapsh.8*
409 %lang(cs) %{_mandir}/cs/man8/systemtap.8*
413 %defattr(644,root,root,755)
414 %attr(755,root,root) %{_libexecdir}/%{name}/stapbm
415 %attr(755,root,root) %{_libexecdir}/%{name}/libHelperSDT_*.so
416 %{_libexecdir}/%{name}/HelperSDT.jar
420 %files runtime-python2
421 %defattr(644,root,root,755)
422 %dir %{py_sitedir}/HelperSDT
423 %attr(755,root,root) %{py_sitedir}/HelperSDT/_HelperSDT.so
424 %{py_sitedir}/HelperSDT/*.py[co]
425 %{py_sitedir}/HelperSDT-0.1.0-py*.egg-info
429 %files runtime-python3
430 %defattr(644,root,root,755)
431 %dir %{py3_sitedir}/HelperSDT
432 %attr(755,root,root) %{py3_sitedir}/HelperSDT/_HelperSDT.cpython-*.so
433 %{py3_sitedir}/HelperSDT/*.py
434 %{py3_sitedir}/HelperSDT/__pycache__
435 %{py3_sitedir}/HelperSDT-0.1.0-py*.egg-info
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_bindir}/stap
441 %attr(755,root,root) %{_bindir}/stap-prep
442 %attr(755,root,root) %{_bindir}/stapvirt
443 %dir %{_datadir}/%{name}
444 %{_datadir}/%{name}/examples
445 %{_datadir}/%{name}/tapset
446 %{_mandir}/man1/stap.1*
447 %{_mandir}/man1/stap-prep.1*
448 %{_mandir}/man1/stapvirt.1*
449 %lang(cs) %{_mandir}/cs/man1/stap.1*
450 %lang(cs) %{_mandir}/cs/man1/stap-prep.1*
451 %lang(cs) %{_mandir}/cs/man1/stapvirt.1*
454 %defattr(644,root,root,755)
455 %{_datadir}/%{name}/runtime
456 %if %{with python2} || %{with python3}
457 %dir %{_libexecdir}/%{name}
458 %dir %{_libexecdir}/%{name}/python
459 %attr(755,root,root) %{_libexecdir}/systemtap/python/stap-resolve-module-function.py
463 %defattr(644,root,root,755)
464 %attr(754,root,root) /etc/rc.d/init.d/systemtap
465 %dir %{_sysconfdir}/systemtap
466 %dir %{_sysconfdir}/systemtap/conf.d
467 %dir %{_sysconfdir}/systemtap/script.d
468 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemtap/config
469 %{systemdtmpfilesdir}/systemtap.conf
470 %dir /var/cache/%{name}
471 %dir /var/run/%{name}
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_bindir}/stap-server
476 %attr(755,root,root) %{_libexecdir}/%{name}/stap-env
477 %attr(755,root,root) %{_libexecdir}/%{name}/stap-gen-cert
478 %attr(755,root,root) %{_libexecdir}/%{name}/stap-serverd
479 %attr(755,root,root) %{_libexecdir}/%{name}/stap-sign-module
480 %attr(755,root,root) %{_libexecdir}/%{name}/stap-start-server
481 %attr(755,root,root) %{_libexecdir}/%{name}/stap-stop-server
482 %dir %{_sysconfdir}/stap-server
483 %dir %{_sysconfdir}/stap-server/conf.d
484 %attr(754,root,root) /etc/rc.d/init.d/stap-server
485 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stap-server
486 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/stap-server
487 %{systemdunitdir}/stap-server.service
488 %{systemdtmpfilesdir}/stap-server.conf
489 # TODO: create user/group
490 #%attr(750,stap-server,stap-server) %dir /var/lib/stap-server
491 #%attr(700,stap-server,stap-server) %dir /var/lib/stap-server/.systemtap
492 #%attr(755,stap-server,stap-server) %dir /var/log/stap-server
493 #%attr(755,stap-server,stap-server) %dir /var/run/stap-server
494 %{_mandir}/man8/stap-server.8*
495 %lang(cs) %{_mandir}/cs/man8/stap-server.8*
498 %defattr(644,root,root,755)
499 %attr(755,root,root) %{_bindir}/dtrace
500 %{_includedir}/sys/sdt.h
501 %{_includedir}/sys/sdt-config.h
502 %{_mandir}/man1/dtrace.1*
503 %lang(cs) %{_mandir}/cs/man1/dtrace.1*
507 %defattr(644,root,root,755)
508 %doc doc/{langref,tutorial}.pdf doc/beginners/SystemTap_Beginners_Guide.pdf docs-installed/tapsets.pdf