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