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
9 %ifnarch %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x
12 %ifnarch %{ix86} %{x8664} x32 ppc ppc64 aarch64
13 %undefine with_dyninst
15 Summary: Instrumentation System
16 Summary(pl.UTF-8): System oprzyrządowania
22 Source0: http://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz
23 # Source0-md5: 0edc087e748769496ee244acf3b80168
24 Source1: %{name}.tmpfiles
25 Source2: stap-server.tmpfiles
26 Patch0: %{name}-configure.patch
27 Patch1: %{name}-build.patch
28 Patch2: %{name}-rpm5-support.patch
29 Patch3: %{name}-no-werror.patch
30 Patch4: format-security.patch
31 URL: http://sourceware.org/systemtap/
32 BuildRequires: autoconf >= 2.63
33 BuildRequires: automake
34 BuildRequires: avahi-devel
35 BuildRequires: boost-devel
36 %{?with_crash:BuildRequires: crash-devel}
37 BuildRequires: docbook-dtd412-xml
38 %{?with_dyninst:BuildRequires: dyninst-devel >= 8.0}
39 BuildRequires: elfutils-devel >= 0.148
40 BuildRequires: gettext-devel >= 0.19.4
41 BuildRequires: gettext-tools >= 0.19.4
42 BuildRequires: glib2-devel
43 BuildRequires: json-c-devel
44 %{?with_java:BuildRequires: jdk}
45 %if %{with dyninst} || %{with java}
46 BuildRequires: libselinux-devel
48 BuildRequires: libstdc++-devel
49 BuildRequires: libvirt-devel >= 1.0.2
50 BuildRequires: libxml2-devel >= 2.0
51 BuildRequires: mysql-devel
52 BuildRequires: ncurses-devel
53 BuildRequires: nss-devel >= 3
54 BuildRequires: pkgconfig
55 BuildRequires: readline-devel
56 BuildRequires: rpm-devel
57 %{?with_java:BuildRequires: rpm-javaprov}
58 BuildRequires: rpm-pythonprov
59 BuildRequires: sqlite3-devel >= 3
62 BuildRequires: latex2html
63 %{?with_publican:BuildRequires: publican}
64 BuildRequires: texlive-dvips
65 BuildRequires: texlive-fonts-bitstream
66 BuildRequires: texlive-fonts-type1-bitstream
67 BuildRequires: texlive-latex
68 BuildRequires: texlive-latex-psnfss
69 BuildRequires: texlive-xetex
71 # let base mean client+local development package
72 Requires: %{name}-client = %{version}-%{release}
73 Requires: %{name}-devel = %{version}-%{release}
74 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
77 SystemTap is an instrumentation system for systems running Linux 2.6.
78 Developers can write instrumentation to collect data on the operation
79 of the system. The base systemtap package provides the components
80 needed to locally develop and execute systemtap script.
82 %description -l pl.UTF-8
83 SystemTap to system oprzyrządowania dla systemów opartych na Linuksie
84 2.6. Programiści mogą pisać narzędzia do zbierania danych dotyczących
85 operacji w systemie. Główny pakiet dostarcza komponenty niezbędne do
86 lokalnego tworzenia i wykonywania skryptów systemtap.
89 Summary: Programmable system-wide instrumentation system - runtime
90 Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - środowisko uruchomieniowe
91 Group: Applications/System
94 SystemTap runtime contains the components needed to execute a
95 systemtap script that was already compiled into a module using a local
96 or remote systemtap-devel installation.
98 %description runtime -l pl.UTF-8
99 Środowisko uruchomieniowe SystemTap zawiera komponenty niezbędne do
100 uruchomienia skryptu systemtap, który został już wkompilowany do
101 modułu przy użyciu lokalnej lub zdalnej instalacji systemtap-devel.
103 %package runtime-java
104 Summary: SystemTap Java runtime support
105 Summary(pl.UTF-8): Obsługa Javy dla środowiska uruchomieniowego SystemTap
107 Requires: %{name}-runtime = %{version}-%{release}
108 Requires: byteman > 2.0
110 %description runtime-java
111 This package includes support files needed to run systemtap scripts
112 that probe Java processes running on the OpenJDK 1.6 and OpenJDK 1.7
113 runtimes using Byteman.
115 %description runtime-java -l pl.UTF-8
116 Ten pakiet zawiera pliki niezbędne do uruchamiania skryptów systemtap
117 sondujące procesy Javy działające w środowiskach OpenJDK 1.6 i OpenJDK
118 1.7 przy użyciu Bytemana.
121 Summary: Programmable system-wide instrumentation system - client
122 Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - klient
123 Group: Applications/System
124 Requires: %{name}-runtime = %{version}-%{release}
127 Requires: libvirt >= 1.0.2
128 Requires: openssh-clients
134 This package provides the components needed to develop systemtap
135 scripts and compile them using a local systemtap-devel or a remote
136 systemtap-server installation, then run them using a local or remote
137 systemtap-runtime. It includes script samples and documentation, and a
138 copy of the tapset library for reference.
140 %description client -l pl.UTF-8
141 Ten pakiet dostarcza komponenty niezbędne do tworzenia skryptów
142 systemtap i kompilowania ich przy użyciu lokalnej instalacji
143 systemtap-devel lub zdalnej instalacji systemtap-server, a następnie
144 uruchamiania ich przy użyciu lokalnej lub zdalnej instalacji
145 systemtap-runtime. Zawiera przykłady skryptów oraz dokumentację, a
146 także kopię biblioteki tapset.
149 Summary: Programmable system-wide instrumentation system - development headers, tools
150 Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - pliki nagłówkowe, narzędzia
151 Group: Development/Tools
152 Requires: %{name}-client = %{version}-%{release}
154 Requires: kernel-module-build
158 This package provides the components needed to compile a systemtap
159 script from source form into executable (.ko) forms. It may be
160 installed on a self-contained developer workstation (along with the
161 systemtap-client and systemtap-runtime packages), or on a dedicated
162 remote server (alongside the systemtap-server package). It includes a
163 copy of the standard tapset library and the runtime library C files.
165 %description devel -l pl.UTF-8
166 Ten pakiet dostarcza komponenty niezbędne do kompilowania skryptów
167 systemtap z postaci źródłowej do wykonywalnej (.ko). Może być
168 zainstalowany na samodzielnej stacji roboczej programisty (wraz z
169 pakietami systemtap-client i systemtap-runtime) lub dedykowanym
170 zdalnym serwerze (wraz z pakietem systemtap-server). Zawiera kopię
171 standardowej biblioteki tapset oraz pliki biblioteki uruchomieniowej
175 Summary: SystemTap Initscripts
176 Summary(pl.UTF-8): Skrypty startowe SystemTap
178 Requires(post,preun): /sbin/chkconfig
179 Requires: %{name} = %{version}-%{release}
182 %description initscript
183 SysVinit scripts to launch selected systemtap scripts at system
186 %description initscript -l pl.UTF-8
187 Skrypty SysVinit do uruchamiania wybranych skryptów systemtap w
188 trakcie startu systemu.
191 Summary: Instrumentation System Server
192 Summary(pl.UTF-8): Serwer systemu oprzyrządowania
193 Group: Applications/System
194 Requires(post,preun): /sbin/chkconfig
195 Requires: %{name}-devel = %{version}-%{release}
196 Requires: /bin/mktemp
201 This is the remote script compilation server component of systemtap.
202 It announces itself to nearby clients with avahi (if available), and
203 compiles systemtap scripts to kernel objects on their demand.
205 %description server -l pl.UTF-8
206 Ten pakiet zawiera komponent serwera do zdalnej kompilacji skryptów
207 systemtap. Rozgłasza się pobliskim klientom przy użyciu avahi (jeśli
208 jest dostępny) i na żądanie kompiluje skrypty systemtap do obiektów
212 Summary: Static probe support tools
213 Summary(pl.UTF-8): Narzędzia do obsługi sond statycznych
214 License: GPL v2+ and Public Domain
215 Group: Development/Libraries
217 %description sdt-devel
218 This package includes the <sys/sdt.h> header file used for static
219 instrumentation compiled into userspace programs and libraries, along
220 with the optional dtrace-compatibility preprocessor to process related
221 .d files into tracing-macro-laden .h headers.
223 %description sdt-devel -l pl.UTF-8
224 Ten pakiet zawiera plik nagłówkowy <sys/sdt.h> służący do
225 wkompilowywania statycznego oprzyrządowania do programów i bibliotek
226 przestrzeni użytkownika, wraz z opcjonalnym preprocesorem zgodności z
227 dtrace, który przetwarza pliki .d na pliki nagłówkowe .h z makrami
231 Summary: SystemTap guides and tutorials
232 Summary(pl.UTF-8): Przewodniki i dokumentacja wprowadzająca do SystemTap
236 SystemTap guides and tutorials.
238 %description doc -l pl.UTF-8
239 Przewodniki i dokumentacja wprowadzająca do SystemTap.
247 %if "%{_rpmversion}" >= "5.0"
258 --disable-silent-rules \
259 %{?with_crash:--enable-crash} \
260 --enable-docs%{!?with_doc:=no} \
264 --with-dyninst%{!?with_dyninst:=no} \
265 --with-java=%{?with_java:%{_jvmdir}/java}%{!?with_java:no}
269 rm -rf $RPM_BUILD_ROOT
270 install -d $RPM_BUILD_ROOT{/var/{cache,run}/%{name},%{systemdtmpfilesdir},%{systemdunitdir}} \
271 $RPM_BUILD_ROOT{%{_sysconfdir}/stap-server/conf.d,/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
272 $RPM_BUILD_ROOT/var/log/stap-server
275 DESTDIR=$RPM_BUILD_ROOT
277 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/systemtap.conf
278 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/stap-server.conf
280 # not installed by make
281 install -p stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
283 install -p initscript/systemtap $RPM_BUILD_ROOT/etc/rc.d/init.d
284 cp -p initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
286 install -p initscript/stap-server $RPM_BUILD_ROOT/etc/rc.d/init.d
287 cp -p initscript/config.stap-server $RPM_BUILD_ROOT/etc/sysconfig/stap-server
288 cp -p initscript/logrotate.stap-server $RPM_BUILD_ROOT/etc/logrotate.d/stap-server
289 cp -p stap-server.service $RPM_BUILD_ROOT%{systemdunitdir}
291 install -d $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/{conf.d,script.d}
292 install -d $RPM_BUILD_ROOT/var/lib/stap-server/.systemtap
293 install -d $RPM_BUILD_ROOT/var/log/stap-server
296 install -d $RPM_BUILD_ROOT%{_examplesdir}
297 %{__mv} $RPM_BUILD_ROOT{%{_docdir}/%{name}/examples,%{_examplesdir}/%{name}-client-%{version}}
300 %{__mv} $RPM_BUILD_ROOT%{_docdir}/systemtap docs-installed
305 rm -rf $RPM_BUILD_ROOT
308 %defattr(644,root,root,755)
310 %files runtime -f %{name}.lang
311 %defattr(644,root,root,755)
312 %doc AUTHORS NEWS README*
313 %attr(755,root,root) %{_bindir}/stap-merge
314 %attr(755,root,root) %{_bindir}/stap-report
315 %{?with_dyninst:%attr(755,root,root) %{_bindir}/stapdyn}
316 %attr(755,root,root) %{_bindir}/stapsh
317 # XXX: %attr(4754,root,stapusr) staprun ?
318 %attr(755,root,root) %{_bindir}/staprun
319 %dir %{_libdir}/%{name}
320 %attr(755,root,root) %{_libdir}/%{name}/stap-authorize-cert
321 %attr(755,root,root) %{_libdir}/%{name}/stapio
322 %{?with_crash:%attr(755,root,root) %{_libdir}/%{name}/staplog.so}
323 %{_mandir}/man1/stap-merge.1*
324 %{_mandir}/man1/stap-report.1*
325 %{_mandir}/man1/stapref.1*
326 %{_mandir}/man3/stapex.3stap*
327 %{_mandir}/man3/stapfuncs.3stap*
328 %{_mandir}/man3/stapprobes.3stap*
329 %{_mandir}/man3/stapvars.3stap*
331 %{_mandir}/man3/function::*.3stap*
332 %{_mandir}/man3/macro::*.3stap*
333 %{_mandir}/man3/probe::*.3stap*
334 %{_mandir}/man3/tapset::*.3stap*
336 %{_mandir}/man7/error::*.7stap*
337 %{_mandir}/man7/stappaths.7*
338 %{_mandir}/man7/warning::debuginfo.7stap*
339 %{_mandir}/man7/warning::symbols.7stap*
340 %{?with_dyninst:%{_mandir}/man8/stapdyn.8*}
341 %{_mandir}/man8/staprun.8*
342 %{_mandir}/man8/stapsh.8*
343 %{_mandir}/man8/systemtap.8*
344 %lang(cs) %{_mandir}/cs/man1/stap-merge.1*
345 %lang(cs) %{_mandir}/cs/man1/stap-report.1*
346 %lang(cs) %{_mandir}/cs/man1/stapref.1*
347 %lang(cs) %{_mandir}/cs/man3/stapex.3stap*
348 %lang(cs) %{_mandir}/cs/man3/stapfuncs.3stap*
349 %lang(cs) %{_mandir}/cs/man3/stapprobes.3stap*
350 %lang(cs) %{_mandir}/cs/man3/stapvars.3stap*
351 %lang(cs) %{_mandir}/cs/man7/error::*.7stap*
352 %lang(cs) %{_mandir}/cs/man7/stappaths.7*
353 %lang(cs) %{_mandir}/cs/man7/warning::debuginfo.7stap*
354 %lang(cs) %{_mandir}/cs/man7/warning::symbols.7stap*
355 %lang(cs) %{_mandir}/cs/man8/stapsh.8*
356 %lang(cs) %{_mandir}/cs/man8/systemtap.8*
360 %defattr(644,root,root,755)
361 %attr(755,root,root) %{_libdir}/%{name}/stapbm
362 %attr(755,root,root) %{_libdir}/%{name}/libHelperSDT_*.so
363 %{_libdir}/%{name}/HelperSDT.jar
367 %defattr(644,root,root,755)
368 %attr(755,root,root) %{_bindir}/stap
369 %attr(755,root,root) %{_bindir}/stap-prep
370 %attr(755,root,root) %{_bindir}/stapvirt
371 %dir %{_datadir}/%{name}
372 %{_datadir}/%{name}/tapset
373 %{_mandir}/man1/stap.1*
374 %{_mandir}/man1/stap-prep.1*
375 %{_mandir}/man1/stapvirt.1*
376 %lang(cs) %{_mandir}/cs/man1/stap.1*
377 %lang(cs) %{_mandir}/cs/man1/stap-prep.1*
378 %lang(cs) %{_mandir}/cs/man1/stapvirt.1*
380 %{_examplesdir}/%{name}-client-%{version}
384 %defattr(644,root,root,755)
385 %{_datadir}/%{name}/runtime
388 %defattr(644,root,root,755)
389 %attr(754,root,root) /etc/rc.d/init.d/systemtap
390 %dir %{_sysconfdir}/systemtap
391 %dir %{_sysconfdir}/systemtap/conf.d
392 %dir %{_sysconfdir}/systemtap/script.d
393 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemtap/config
394 %{systemdtmpfilesdir}/systemtap.conf
395 %dir /var/cache/%{name}
396 %dir /var/run/%{name}
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_bindir}/stap-server
401 %attr(755,root,root) %{_libdir}/%{name}/stap-env
402 %attr(755,root,root) %{_libdir}/%{name}/stap-gen-cert
403 %attr(755,root,root) %{_libdir}/%{name}/stap-serverd
404 %attr(755,root,root) %{_libdir}/%{name}/stap-sign-module
405 %attr(755,root,root) %{_libdir}/%{name}/stap-start-server
406 %attr(755,root,root) %{_libdir}/%{name}/stap-stop-server
407 %dir %{_sysconfdir}/stap-server
408 %dir %{_sysconfdir}/stap-server/conf.d
409 %attr(754,root,root) /etc/rc.d/init.d/stap-server
410 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stap-server
411 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/stap-server
412 %{systemdunitdir}/stap-server.service
413 %{systemdtmpfilesdir}/stap-server.conf
414 # TODO: create user/group
415 #%attr(750,stap-server,stap-server) %dir /var/lib/stap-server
416 #%attr(700,stap-server,stap-server) %dir /var/lib/stap-server/.systemtap
417 #%attr(755,stap-server,stap-server) %dir /var/log/stap-server
418 #%attr(755,stap-server,stap-server) %dir /var/run/stap-server
419 %{_mandir}/man8/stap-server.8*
420 %lang(cs) %{_mandir}/cs/man8/stap-server.8*
423 %defattr(644,root,root,755)
424 %attr(755,root,root) %{_bindir}/dtrace
425 %{_includedir}/sys/sdt.h
426 %{_includedir}/sys/sdt-config.h
427 %{_mandir}/man1/dtrace.1*
428 %lang(cs) %{_mandir}/cs/man1/dtrace.1*
432 %defattr(644,root,root,755)
433 %doc doc/{langref,tutorial}.pdf doc/beginners/SystemTap_Beginners_Guide.pdf docs-installed/tapsets.pdf