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