]> git.pld-linux.org Git - packages/systemtap.git/blob - systemtap.spec
2defb35c3b2dfca60f42c592362fe37b7f266ed7
[packages/systemtap.git] / systemtap.spec
1 #
2 # Conditional build:
3 %bcond_without  doc             # documentation build
4 %bcond_with     publican        # publican guides build (requires functional publican+wkhtmltopdf)
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} ppc ppc64
13 %undefine       with_dyninst
14 %endif
15 Summary:        Instrumentation System
16 Summary(pl.UTF-8):      System oprzyrządowania
17 Name:           systemtap
18 Version:        2.7
19 Release:        1
20 License:        GPL v2+
21 Group:          Base
22 Source0:        http://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz
23 # Source0-md5:  e0c3c36955323ae59be07a26a9563474
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 Patch4:         format-security.patch
30 URL:            http://sourceware.org/systemtap/
31 BuildRequires:  autoconf >= 2.63
32 BuildRequires:  automake
33 BuildRequires:  avahi-devel
34 BuildRequires:  boost-devel
35 %{?with_crash:BuildRequires:    crash-devel}
36 BuildRequires:  docbook-dtd412-xml
37 %{?with_dyninst:BuildRequires:  dyninst-devel >= 8.0}
38 BuildRequires:  elfutils-devel >= 0.148
39 BuildRequires:  gettext-tools >= 0.18.2
40 BuildRequires:  glib2-devel
41 %{?with_java:BuildRequires:     jdk}
42 %if %{with dyninst} || %{with java}
43 BuildRequires:  libselinux-devel
44 %endif
45 BuildRequires:  libstdc++-devel
46 BuildRequires:  libvirt-devel >= 1.0.2
47 BuildRequires:  libxml2-devel >= 2.0
48 BuildRequires:  mysql-devel
49 BuildRequires:  nss-devel >= 3
50 BuildRequires:  rpm-devel
51 BuildRequires:  sqlite3-devel >= 3
52 BuildRequires:  xmlto
53 %if %{with doc}
54 BuildRequires:  latex2html
55 %{?with_publican:BuildRequires: publican}
56 BuildRequires:  texlive-dvips
57 BuildRequires:  texlive-fonts-bitstream
58 BuildRequires:  texlive-fonts-type1-bitstream
59 BuildRequires:  texlive-latex
60 %endif
61 # let base mean client+local development package
62 Requires:       %{name}-client = %{version}-%{release}
63 Requires:       %{name}-devel = %{version}-%{release}
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %description
67 SystemTap is an instrumentation system for systems running Linux 2.6.
68 Developers can write instrumentation to collect data on the operation
69 of the system. The base systemtap package provides the components
70 needed to locally develop and execute systemtap script.
71
72 %description -l pl.UTF-8
73 SystemTap to system oprzyrządowania dla systemów opartych na Linuksie
74 2.6. Programiści mogą pisać narzędzia do zbierania danych dotyczących
75 operacji w systemie. Główny pakiet dostarcza komponenty niezbędne do
76 lokalnego tworzenia i wykonywania skryptów systemtap.
77
78 %package runtime
79 Summary:        Programmable system-wide instrumentation system - runtime
80 Summary(pl.UTF-8):      Programowalny systemowy system oprzyrządowania - środowisko uruchomieniowe
81 Group:          Applications/System
82
83 %description runtime
84 SystemTap runtime contains the components needed to execute a
85 systemtap script that was already compiled into a module using a local
86 or remote systemtap-devel installation.
87
88 %description runtime -l pl.UTF-8
89 Środowisko uruchomieniowe SystemTap zawiera komponenty niezbędne do
90 uruchomienia skryptu systemtap, który został już wkompilowany do
91 modułu przy użyciu lokalnej lub zdalnej instalacji systemtap-devel.
92
93 %package runtime-java
94 Summary:        SystemTap Java runtime support
95 Summary(pl.UTF-8):      Obsługa Javy dla środowiska uruchomieniowego SystemTap
96 Group:          Libraries
97 Requires:       %{name}-runtime = %{version}-%{release}
98 Requires:       byteman > 2.0
99
100 %description runtime-java
101 This package includes support files needed to run systemtap scripts
102 that probe Java processes running on the OpenJDK 1.6 and OpenJDK 1.7
103 runtimes using Byteman.
104
105 %description runtime-java -l pl.UTF-8
106 Ten pakiet zawiera pliki niezbędne do uruchamiania skryptów systemtap
107 sondujące procesy Javy działające w środowiskach OpenJDK 1.6 i OpenJDK
108 1.7 przy użyciu Bytemana.
109
110 %package client
111 Summary:        Programmable system-wide instrumentation system - client
112 Summary(pl.UTF-8):      Programowalny systemowy system oprzyrządowania - klient
113 Group:          Applications/System
114 Requires:       %{name}-runtime = %{version}-%{release}
115 Requires:       coreutils
116 Requires:       grep
117 Requires:       libvirt >= 1.0.2
118 Requires:       openssh-clients
119 Requires:       sed
120 Requires:       unzip
121 Requires:       zip
122
123 %description client
124 This package provides the components needed to develop systemtap
125 scripts and compile them using a local systemtap-devel or a remote
126 systemtap-server installation, then run them using a local or remote
127 systemtap-runtime. It includes script samples and documentation, and a
128 copy of the tapset library for reference.
129
130 %description client -l pl.UTF-8
131 Ten pakiet dostarcza komponenty niezbędne do tworzenia skryptów
132 systemtap i kompilowania ich przy użyciu lokalnej instalacji
133 systemtap-devel lub zdalnej instalacji systemtap-server, a następnie
134 uruchamiania ich przy użyciu lokalnej lub zdalnej instalacji
135 systemtap-runtime. Zawiera przykłady skryptów oraz dokumentację, a
136 także kopię biblioteki tapset.
137
138 %package devel
139 Summary:        Programmable system-wide instrumentation system - development headers, tools
140 Summary(pl.UTF-8):      Programowalny systemowy system oprzyrządowania - pliki nagłówkowe, narzędzia
141 Group:          Development/Tools
142 Requires:       %{name}-client = %{version}-%{release}
143 Requires:       gcc
144 Requires:       kernel-module-build
145 Requires:       make
146
147 %description devel
148 This package provides the components needed to compile a systemtap
149 script from source form into executable (.ko) forms. It may be
150 installed on a self-contained developer workstation (along with the
151 systemtap-client and systemtap-runtime packages), or on a dedicated
152 remote server (alongside the systemtap-server package). It includes a
153 copy of the standard tapset library and the runtime library C files.
154
155 %description devel -l pl.UTF-8
156 Ten pakiet dostarcza komponenty niezbędne do kompilowania skryptów
157 systemtap z postaci źródłowej do wykonywalnej (.ko). Może być
158 zainstalowany na samodzielnej stacji roboczej programisty (wraz z
159 pakietami systemtap-client i systemtap-runtime) lub dedykowanym
160 zdalnym serwerze (wraz z pakietem systemtap-server). Zawiera kopię
161 standardowej biblioteki tapset oraz pliki biblioteki uruchomieniowej
162 C.
163
164 %package initscript
165 Summary:        SystemTap Initscripts
166 Summary(pl.UTF-8):      Skrypty startowe SystemTap
167 Group:          Base
168 Requires(post,preun):   /sbin/chkconfig
169 Requires:       %{name} = %{version}-%{release}
170 Requires:       rc-scripts
171
172 %description initscript
173 SysVinit scripts to launch selected systemtap scripts at system
174 startup.
175
176 %description initscript -l pl.UTF-8
177 Skrypty SysVinit do uruchamiania wybranych skryptów systemtap w
178 trakcie startu systemu.
179
180 %package server
181 Summary:        Instrumentation System Server
182 Summary(pl.UTF-8):      Serwer systemu oprzyrządowania
183 Group:          Applications/System
184 Requires(post,preun):   /sbin/chkconfig
185 Requires:       %{name}-devel = %{version}-%{release}
186 Requires:       /bin/mktemp
187 Requires:       unzip
188 Requires:       zip
189
190 %description server
191 This is the remote script compilation server component of systemtap.
192 It announces itself to nearby clients with avahi (if available), and
193 compiles systemtap scripts to kernel objects on their demand.
194
195 %description server -l pl.UTF-8
196 Ten pakiet zawiera komponent serwera do zdalnej kompilacji skryptów
197 systemtap. Rozgłasza się pobliskim klientom przy użyciu avahi (jeśli
198 jest dostępny) i na żądanie kompiluje skrypty systemtap do obiektów
199 jądra.
200
201 %package sdt-devel
202 Summary:        Static probe support tools
203 Summary(pl.UTF-8):      Narzędzia do obsługi sond statycznych
204 License:        GPL v2+ and Public Domain
205 Group:          Development/Libraries
206
207 %description sdt-devel
208 This package includes the <sys/sdt.h> header file used for static
209 instrumentation compiled into userspace programs and libraries, along
210 with the optional dtrace-compatibility preprocessor to process related
211 .d files into tracing-macro-laden .h headers.
212
213 %description sdt-devel -l pl.UTF-8
214 Ten pakiet zawiera plik nagłówkowy <sys/sdt.h> służący do
215 wkompilowywania statycznego oprzyrządowania do programów i bibliotek
216 przestrzeni użytkownika, wraz z opcjonalnym preprocesorem zgodności z
217 dtrace, który przetwarza pliki .d na pliki nagłówkowe .h z makrami
218 śledzącymi.
219
220 %prep
221 %setup -q
222 %patch0 -p1
223 %patch1 -p1
224 %patch4 -p1
225 %if "%{_rpmversion}" >= "5.0"
226 %patch2 -p1
227 %endif
228
229 %build
230 %{__gettextize}
231 %{__aclocal}
232 %{__autoconf}
233 %{__autoheader}
234 %{__automake}
235 %configure \
236         --disable-silent-rules \
237         %{?with_crash:--enable-crash} \
238         --enable-docs%{!?with_doc:=no} \
239         --enable-pie \
240         --enable-publican%{!?with_publican:=no} \
241         --enable-server \
242         --enable-sqlite \
243         --with-dyninst%{!?with_dyninst:=no} \
244         --with-java=%{?with_java:%{_jvmdir}/java}%{!?with_java:no}
245 %{__make}
246
247 %install
248 rm -rf $RPM_BUILD_ROOT
249 install -d $RPM_BUILD_ROOT{/var/{cache,run}/%{name},%{systemdtmpfilesdir},%{systemdunitdir}} \
250         $RPM_BUILD_ROOT{%{_sysconfdir}/stap-server/conf.d,/etc/{sysconfig,logrotate.d,rc.d/init.d}} \
251         $RPM_BUILD_ROOT/var/log/stap-server
252
253 %{__make} install \
254         DESTDIR=$RPM_BUILD_ROOT
255
256 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/systemtap.conf
257 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/stap-server.conf
258
259 # not installed by make
260 install -p stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
261
262 install -p initscript/systemtap $RPM_BUILD_ROOT/etc/rc.d/init.d
263 cp -p initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
264
265 install -p initscript/stap-server $RPM_BUILD_ROOT/etc/rc.d/init.d
266 cp -p initscript/config.stap-server $RPM_BUILD_ROOT/etc/sysconfig/stap-server
267 cp -p initscript/logrotate.stap-server $RPM_BUILD_ROOT/etc/logrotate.d/stap-server
268 cp -p stap-server.service $RPM_BUILD_ROOT%{systemdunitdir}
269
270 install -d $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/{conf.d,script.d}
271 install -d $RPM_BUILD_ROOT/var/lib/stap-server/.systemtap
272 install -d $RPM_BUILD_ROOT/var/log/stap-server
273
274 %if %{with doc}
275 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-client-%{version}
276 cp -a docs-installed/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-client-%{version}
277 %endif
278
279 %{__mv} $RPM_BUILD_ROOT%{_docdir}/systemtap docs-installed
280
281 %find_lang %{name}
282
283 %clean
284 rm -rf $RPM_BUILD_ROOT
285
286 %files
287 %defattr(644,root,root,755)
288
289 %files runtime -f %{name}.lang
290 %defattr(644,root,root,755)
291 %doc AUTHORS NEWS README*
292 %attr(755,root,root) %{_bindir}/stap-merge
293 %attr(755,root,root) %{_bindir}/stap-report
294 %{?with_dyninst:%attr(755,root,root) %{_bindir}/stapdyn}
295 %attr(755,root,root) %{_bindir}/stapsh
296 # XXX: %attr(4754,root,stapusr) staprun ?
297 %attr(755,root,root) %{_bindir}/staprun
298 %dir %{_libdir}/%{name}
299 %attr(755,root,root) %{_libdir}/%{name}/stap-authorize-cert
300 %attr(755,root,root) %{_libdir}/%{name}/stapio
301 %{?with_crash:%attr(755,root,root) %{_libdir}/%{name}/staplog.so}
302 %{_mandir}/man1/stap-merge.1*
303 %{_mandir}/man1/stap-report.1*
304 #%{_mandir}/man3/function::*.3stap*
305 #%{_mandir}/man3/probe::*.3stap*
306 %{_mandir}/man3/stapex.3stap*
307 %{_mandir}/man3/stapfuncs.3stap*
308 %{_mandir}/man3/stapprobes.3stap*
309 %{_mandir}/man3/stapvars.3stap*
310 #%{_mandir}/man3/tapset::*.3stap*
311 %{_mandir}/man7/error::*.7stap*
312 %{_mandir}/man7/stappaths.7*
313 %{_mandir}/man7/warning::debuginfo.7stap*
314 %{_mandir}/man7/warning::symbols.7stap*
315 %{?with_dyninst:%{_mandir}/man8/stapdyn.8*}
316 %{_mandir}/man8/staprun.8*
317 %{_mandir}/man8/stapsh.8*
318 %{_mandir}/man8/systemtap.8*
319
320 %if %{with java}
321 %files runtime-java
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{_libdir}/%{name}/stapbm
324 %attr(755,root,root) %{_libdir}/%{name}/libHelperSDT_*.so
325 %{_libdir}/%{name}/HelperSDT.jar
326 %endif
327
328 %files client
329 %defattr(644,root,root,755)
330 %if %{with docs}
331 %doc docs-installed/{tapsets,langref.pdf,tutorial.pdf}
332 %{_examplesdir}/%{name}-client-%{version}
333 %endif
334 %attr(755,root,root) %{_bindir}/stap
335 %attr(755,root,root) %{_bindir}/stap-prep
336 %attr(755,root,root) %{_bindir}/stapvirt
337 %dir %{_datadir}/%{name}
338 %{_datadir}/%{name}/tapset
339 %{_mandir}/man1/stap.1*
340 %{_mandir}/man1/stap-prep.1*
341 %{_mandir}/man1/stapvirt.1*
342
343 %files devel
344 %defattr(644,root,root,755)
345 %{_datadir}/%{name}/runtime
346
347 %files initscript
348 %defattr(644,root,root,755)
349 %attr(754,root,root) /etc/rc.d/init.d/systemtap
350 %dir %{_sysconfdir}/systemtap
351 %dir %{_sysconfdir}/systemtap/conf.d
352 %dir %{_sysconfdir}/systemtap/script.d
353 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemtap/config
354 %{systemdtmpfilesdir}/systemtap.conf
355 %dir /var/cache/%{name}
356 %dir /var/run/%{name}
357
358 %files server
359 %defattr(644,root,root,755)
360 %attr(755,root,root) %{_bindir}/stap-server
361 %attr(755,root,root) %{_libdir}/%{name}/stap-env
362 %attr(755,root,root) %{_libdir}/%{name}/stap-gen-cert
363 %attr(755,root,root) %{_libdir}/%{name}/stap-serverd
364 %attr(755,root,root) %{_libdir}/%{name}/stap-sign-module
365 %attr(755,root,root) %{_libdir}/%{name}/stap-start-server
366 %attr(755,root,root) %{_libdir}/%{name}/stap-stop-server
367 %dir %{_sysconfdir}/stap-server
368 %dir %{_sysconfdir}/stap-server/conf.d
369 %attr(754,root,root) /etc/rc.d/init.d/stap-server
370 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stap-server
371 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/stap-server
372 %{systemdunitdir}/stap-server.service
373 %{systemdtmpfilesdir}/stap-server.conf
374 # TODO: create user/group
375 #%attr(750,stap-server,stap-server) %dir /var/lib/stap-server
376 #%attr(700,stap-server,stap-server) %dir /var/lib/stap-server/.systemtap
377 #%attr(755,stap-server,stap-server) %dir /var/log/stap-server
378 #%attr(755,stap-server,stap-server) %dir /var/run/stap-server
379 %{_mandir}/man8/stap-server.8*
380
381 %files sdt-devel
382 %defattr(644,root,root,755)
383 %attr(755,root,root) %{_bindir}/dtrace
384 %{_includedir}/sys/sdt.h
385 %{_includedir}/sys/sdt-config.h
386 %{_mandir}/man1/dtrace.1*
This page took 0.076511 seconds and 2 git commands to generate.