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