]> git.pld-linux.org Git - packages/systemtap.git/blob - systemtap.spec
- compile C++ in C++11 mode (required by dyninst)
[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
9 %ifnarch %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x
10 %undefine       with_crash
11 %endif
12 %ifnarch %{ix86} %{x8664} x32 ppc ppc64 aarch64
13 %undefine       with_dyninst
14 %endif
15 Summary:        Instrumentation System
16 Summary(pl.UTF-8):      System oprzyrządowania
17 Name:           systemtap
18 Version:        3.0
19 Release:        2
20 License:        GPL v2+
21 Group:          Base
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
47 %endif
48 BuildRequires:  libstdc++-devel >= 6:4.7
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
60 BuildRequires:  xmlto
61 %if %{with doc}
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
70 %endif
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)
75
76 %description
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.
81
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.
87
88 %package runtime
89 Summary:        Programmable system-wide instrumentation system - runtime
90 Summary(pl.UTF-8):      Programowalny systemowy system oprzyrządowania - środowisko uruchomieniowe
91 Group:          Applications/System
92
93 %description runtime
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.
97
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.
102
103 %package runtime-java
104 Summary:        SystemTap Java runtime support
105 Summary(pl.UTF-8):      Obsługa Javy dla środowiska uruchomieniowego SystemTap
106 Group:          Libraries
107 Requires:       %{name}-runtime = %{version}-%{release}
108 Requires:       byteman > 2.0
109
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.
114
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.
119
120 %package client
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}
125 Requires:       coreutils
126 Requires:       grep
127 Requires:       libvirt >= 1.0.2
128 Requires:       openssh-clients
129 Requires:       sed
130 Requires:       unzip
131 Requires:       zip
132
133 %description client
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.
139
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.
147
148 %package devel
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}
153 Requires:       gcc
154 Requires:       kernel-module-build
155 Requires:       make
156
157 %description devel
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.
164
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
172 C.
173
174 %package initscript
175 Summary:        SystemTap Initscripts
176 Summary(pl.UTF-8):      Skrypty startowe SystemTap
177 Group:          Base
178 Requires(post,preun):   /sbin/chkconfig
179 Requires:       %{name} = %{version}-%{release}
180 Requires:       rc-scripts
181
182 %description initscript
183 SysVinit scripts to launch selected systemtap scripts at system
184 startup.
185
186 %description initscript -l pl.UTF-8
187 Skrypty SysVinit do uruchamiania wybranych skryptów systemtap w
188 trakcie startu systemu.
189
190 %package server
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
197 Requires:       unzip
198 Requires:       zip
199
200 %description server
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.
204
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
209 jądra.
210
211 %package sdt-devel
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
216
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.
222
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
228 śledzącymi.
229
230 %package doc
231 Summary:        SystemTap guides and tutorials
232 Summary(pl.UTF-8):      Przewodniki i dokumentacja wprowadzająca do SystemTap
233 Group:          Documentation
234
235 %description doc
236 SystemTap guides and tutorials.
237
238 %description doc -l pl.UTF-8
239 Przewodniki i dokumentacja wprowadzająca do SystemTap.
240
241 %prep
242 %setup -q
243 %patch0 -p1
244 %patch1 -p1
245 %patch3 -p1
246 %patch4 -p1
247 %if "%{_rpmversion}" >= "5.0"
248 %patch2 -p1
249 %endif
250
251 %build
252 %{__gettextize}
253 %{__aclocal}
254 %{__autoconf}
255 %{__autoheader}
256 %{__automake}
257 # dyninst requires C++11 mode
258 CXXFLAGS="%{rpmcxxflags} -std=c++11"
259 %configure \
260         --disable-silent-rules \
261         %{?with_crash:--enable-crash} \
262         --enable-docs%{!?with_doc:=no} \
263         --enable-pie \
264         --enable-server \
265         --enable-sqlite \
266         --with-dyninst%{!?with_dyninst:=no} \
267         --with-java=%{?with_java:%{_jvmdir}/java}%{!?with_java:no}
268 %{__make}
269
270 %install
271 rm -rf $RPM_BUILD_ROOT
272 install -d $RPM_BUILD_ROOT{/var/{cache,run}/%{name},%{systemdtmpfilesdir},%{systemdunitdir}} \
273         $RPM_BUILD_ROOT{%{_sysconfdir}/stap-server/conf.d,/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
274         $RPM_BUILD_ROOT/var/log/stap-server
275
276 %{__make} install \
277         DESTDIR=$RPM_BUILD_ROOT
278
279 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/systemtap.conf
280 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/stap-server.conf
281
282 # not installed by make
283 install -p stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
284
285 install -p initscript/systemtap $RPM_BUILD_ROOT/etc/rc.d/init.d
286 cp -p initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
287
288 install -p initscript/stap-server $RPM_BUILD_ROOT/etc/rc.d/init.d
289 cp -p initscript/config.stap-server $RPM_BUILD_ROOT/etc/sysconfig/stap-server
290 cp -p initscript/logrotate.stap-server $RPM_BUILD_ROOT/etc/logrotate.d/stap-server
291 cp -p stap-server.service $RPM_BUILD_ROOT%{systemdunitdir}
292
293 install -d $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/{conf.d,script.d}
294 install -d $RPM_BUILD_ROOT/var/lib/stap-server/.systemtap
295 install -d $RPM_BUILD_ROOT/var/log/stap-server
296
297 %if %{with doc}
298 install -d $RPM_BUILD_ROOT%{_examplesdir}
299 %{__mv} $RPM_BUILD_ROOT{%{_docdir}/%{name}/examples,%{_examplesdir}/%{name}-client-%{version}}
300 %endif
301
302 %{__mv} $RPM_BUILD_ROOT%{_docdir}/systemtap docs-installed
303
304 %find_lang %{name}
305
306 %clean
307 rm -rf $RPM_BUILD_ROOT
308
309 %files
310 %defattr(644,root,root,755)
311
312 %files runtime -f %{name}.lang
313 %defattr(644,root,root,755)
314 %doc AUTHORS NEWS README*
315 %attr(755,root,root) %{_bindir}/stap-merge
316 %attr(755,root,root) %{_bindir}/stap-report
317 %{?with_dyninst:%attr(755,root,root) %{_bindir}/stapdyn}
318 %attr(755,root,root) %{_bindir}/stapsh
319 # XXX: %attr(4754,root,stapusr) staprun ?
320 %attr(755,root,root) %{_bindir}/staprun
321 %dir %{_libdir}/%{name}
322 %attr(755,root,root) %{_libdir}/%{name}/stap-authorize-cert
323 %attr(755,root,root) %{_libdir}/%{name}/stapio
324 %{?with_crash:%attr(755,root,root) %{_libdir}/%{name}/staplog.so}
325 %{_mandir}/man1/stap-merge.1*
326 %{_mandir}/man1/stap-report.1*
327 %{_mandir}/man1/stapref.1*
328 %{_mandir}/man3/stapex.3stap*
329 %{_mandir}/man3/stapfuncs.3stap*
330 %{_mandir}/man3/stapprobes.3stap*
331 %{_mandir}/man3/stapvars.3stap*
332 %if %{with doc}
333 %{_mandir}/man3/function::*.3stap*
334 %{_mandir}/man3/macro::*.3stap*
335 %{_mandir}/man3/probe::*.3stap*
336 %{_mandir}/man3/tapset::*.3stap*
337 %endif
338 %{_mandir}/man7/error::*.7stap*
339 %{_mandir}/man7/stappaths.7*
340 %{_mandir}/man7/warning::debuginfo.7stap*
341 %{_mandir}/man7/warning::symbols.7stap*
342 %{?with_dyninst:%{_mandir}/man8/stapdyn.8*}
343 %{_mandir}/man8/staprun.8*
344 %{_mandir}/man8/stapsh.8*
345 %{_mandir}/man8/systemtap.8*
346 %lang(cs) %{_mandir}/cs/man1/stap-merge.1*
347 %lang(cs) %{_mandir}/cs/man1/stap-report.1*
348 %lang(cs) %{_mandir}/cs/man1/stapref.1*
349 %lang(cs) %{_mandir}/cs/man3/stapex.3stap*
350 %lang(cs) %{_mandir}/cs/man3/stapfuncs.3stap*
351 %lang(cs) %{_mandir}/cs/man3/stapprobes.3stap*
352 %lang(cs) %{_mandir}/cs/man3/stapvars.3stap*
353 %lang(cs) %{_mandir}/cs/man7/error::*.7stap*
354 %lang(cs) %{_mandir}/cs/man7/stappaths.7*
355 %lang(cs) %{_mandir}/cs/man7/warning::debuginfo.7stap*
356 %lang(cs) %{_mandir}/cs/man7/warning::symbols.7stap*
357 %lang(cs) %{_mandir}/cs/man8/stapsh.8*
358 %lang(cs) %{_mandir}/cs/man8/systemtap.8*
359
360 %if %{with java}
361 %files runtime-java
362 %defattr(644,root,root,755)
363 %attr(755,root,root) %{_libdir}/%{name}/stapbm
364 %attr(755,root,root) %{_libdir}/%{name}/libHelperSDT_*.so
365 %{_libdir}/%{name}/HelperSDT.jar
366 %endif
367
368 %files client
369 %defattr(644,root,root,755)
370 %attr(755,root,root) %{_bindir}/stap
371 %attr(755,root,root) %{_bindir}/stap-prep
372 %attr(755,root,root) %{_bindir}/stapvirt
373 %dir %{_datadir}/%{name}
374 %{_datadir}/%{name}/tapset
375 %{_mandir}/man1/stap.1*
376 %{_mandir}/man1/stap-prep.1*
377 %{_mandir}/man1/stapvirt.1*
378 %lang(cs) %{_mandir}/cs/man1/stap.1*
379 %lang(cs) %{_mandir}/cs/man1/stap-prep.1*
380 %lang(cs) %{_mandir}/cs/man1/stapvirt.1*
381 %if %{with doc}
382 %{_examplesdir}/%{name}-client-%{version}
383 %endif
384
385 %files devel
386 %defattr(644,root,root,755)
387 %{_datadir}/%{name}/runtime
388
389 %files initscript
390 %defattr(644,root,root,755)
391 %attr(754,root,root) /etc/rc.d/init.d/systemtap
392 %dir %{_sysconfdir}/systemtap
393 %dir %{_sysconfdir}/systemtap/conf.d
394 %dir %{_sysconfdir}/systemtap/script.d
395 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemtap/config
396 %{systemdtmpfilesdir}/systemtap.conf
397 %dir /var/cache/%{name}
398 %dir /var/run/%{name}
399
400 %files server
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_bindir}/stap-server
403 %attr(755,root,root) %{_libdir}/%{name}/stap-env
404 %attr(755,root,root) %{_libdir}/%{name}/stap-gen-cert
405 %attr(755,root,root) %{_libdir}/%{name}/stap-serverd
406 %attr(755,root,root) %{_libdir}/%{name}/stap-sign-module
407 %attr(755,root,root) %{_libdir}/%{name}/stap-start-server
408 %attr(755,root,root) %{_libdir}/%{name}/stap-stop-server
409 %dir %{_sysconfdir}/stap-server
410 %dir %{_sysconfdir}/stap-server/conf.d
411 %attr(754,root,root) /etc/rc.d/init.d/stap-server
412 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stap-server
413 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/stap-server
414 %{systemdunitdir}/stap-server.service
415 %{systemdtmpfilesdir}/stap-server.conf
416 # TODO: create user/group
417 #%attr(750,stap-server,stap-server) %dir /var/lib/stap-server
418 #%attr(700,stap-server,stap-server) %dir /var/lib/stap-server/.systemtap
419 #%attr(755,stap-server,stap-server) %dir /var/log/stap-server
420 #%attr(755,stap-server,stap-server) %dir /var/run/stap-server
421 %{_mandir}/man8/stap-server.8*
422 %lang(cs) %{_mandir}/cs/man8/stap-server.8*
423
424 %files sdt-devel
425 %defattr(644,root,root,755)
426 %attr(755,root,root) %{_bindir}/dtrace
427 %{_includedir}/sys/sdt.h
428 %{_includedir}/sys/sdt-config.h
429 %{_mandir}/man1/dtrace.1*
430 %lang(cs) %{_mandir}/cs/man1/dtrace.1*
431
432 %if %{with doc}
433 %files doc
434 %defattr(644,root,root,755)
435 %doc doc/{langref,tutorial}.pdf doc/beginners/SystemTap_Beginners_Guide.pdf docs-installed/tapsets.pdf
436 %endif
This page took 0.104647 seconds and 3 git commands to generate.