]>
Commit | Line | Data |
---|---|---|
87230ea0 | 1 | # |
8bec3f09 JB |
2 | # Conditional build: |
3 | %bcond_without doc # documentation build | |
4 | %bcond_with publican # publican guides build (requires functional publican+wkhtmltopdf) | |
1651fd5a | 5 | %bcond_without crash # crash extension |
c15371b4 | 6 | %bcond_without dyninst # dyninst support |
8bec3f09 | 7 | %bcond_without java # Java runtime support |
87230ea0 | 8 | # |
1651fd5a JB |
9 | %ifnarch %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x |
10 | %undefine with_crash | |
11 | %endif | |
c15371b4 JB |
12 | %ifnarch %{ix86} %{x8664} ppc ppc64 |
13 | %undefine with_dyninst | |
14 | %endif | |
aa39e90e | 15 | Summary: Instrumentation System |
7ad1ccd0 | 16 | Summary(pl.UTF-8): System oprzyrządowania |
aa39e90e | 17 | Name: systemtap |
eae4d4c2 | 18 | Version: 2.6 |
479427cf | 19 | Release: 2 |
839ed024 | 20 | License: GPL v2+ |
aa39e90e | 21 | Group: Base |
e7f20467 | 22 | Source0: http://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz |
eae4d4c2 | 23 | # Source0-md5: 65e6745f0ec103758c711dd1d12fb6bf |
31ca9d34 | 24 | Source1: systemtap.tmpfiles |
8bec3f09 | 25 | Source2: stap-server.tmpfiles |
459a2a3b | 26 | Patch0: %{name}-configure.patch |
099db71a | 27 | Patch1: %{name}-build.patch |
6fbeb569 | 28 | Patch2: %{name}-rpm5-support.patch |
479427cf | 29 | Patch3: %{name}-dtrace-flexibility.patch |
ff9bc29b | 30 | URL: http://sourceware.org/systemtap/ |
8bec3f09 | 31 | BuildRequires: autoconf >= 2.63 |
60a0430a | 32 | BuildRequires: automake |
099db71a | 33 | BuildRequires: avahi-devel |
8bec3f09 | 34 | BuildRequires: boost-devel |
1651fd5a | 35 | %{?with_crash:BuildRequires: crash-devel} |
8bec3f09 | 36 | BuildRequires: docbook-dtd412-xml |
c15371b4 | 37 | %{?with_dyninst:BuildRequires: dyninst-devel >= 8.0} |
8bec3f09 | 38 | BuildRequires: elfutils-devel >= 0.148 |
af617400 | 39 | BuildRequires: gettext-tools >= 0.18.2 |
aa39e90e | 40 | BuildRequires: glib2-devel |
8bec3f09 | 41 | %{?with_java:BuildRequires: jdk} |
c15371b4 JB |
42 | %if %{with dyninst} || %{with java} |
43 | BuildRequires: libselinux-devel | |
44 | %endif | |
8bec3f09 | 45 | BuildRequires: libstdc++-devel |
e7f20467 JB |
46 | BuildRequires: libvirt-devel >= 1.0.2 |
47 | BuildRequires: libxml2-devel >= 2.0 | |
aa39e90e | 48 | BuildRequires: mysql-devel |
8bec3f09 | 49 | BuildRequires: nss-devel >= 3 |
bc044f75 | 50 | BuildRequires: rpm-devel |
8bec3f09 JB |
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 | |
099db71a | 59 | BuildRequires: texlive-latex |
8bec3f09 JB |
60 | %endif |
61 | # let base mean client+local development package | |
62 | Requires: %{name}-client = %{version}-%{release} | |
63 | Requires: %{name}-devel = %{version}-%{release} | |
aa39e90e AM |
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 | |
8bec3f09 JB |
69 | of the system. The base systemtap package provides the components |
70 | needed to locally develop and execute systemtap script. | |
aa39e90e | 71 | |
3bf8b266 JR |
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 | |
8bec3f09 JB |
75 | operacji w systemie. Główny pakiet dostarcza komponenty niezbędne do |
76 | lokalnego tworzenia i wykonywania skryptów systemtap. | |
099db71a AM |
77 | |
78 | %package runtime | |
79 | Summary: Programmable system-wide instrumentation system - runtime | |
8bec3f09 JB |
80 | Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - środowisko uruchomieniowe |
81 | Group: Applications/System | |
099db71a AM |
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 | ||
8bec3f09 JB |
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} | |
8bec3f09 JB |
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 | ||
099db71a AM |
110 | %package client |
111 | Summary: Programmable system-wide instrumentation system - client | |
8bec3f09 JB |
112 | Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - klient |
113 | Group: Applications/System | |
114 | Requires: %{name}-runtime = %{version}-%{release} | |
099db71a AM |
115 | Requires: coreutils |
116 | Requires: grep | |
e7f20467 | 117 | Requires: libvirt >= 1.0.2 |
099db71a AM |
118 | Requires: openssh-clients |
119 | Requires: sed | |
099db71a AM |
120 | Requires: unzip |
121 | Requires: zip | |
122 | ||
123 | %description client | |
8bec3f09 JB |
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. | |
099db71a | 129 | |
8bec3f09 JB |
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. | |
099db71a AM |
163 | |
164 | %package initscript | |
8bec3f09 JB |
165 | Summary: SystemTap Initscripts |
166 | Summary(pl.UTF-8): Skrypty startowe SystemTap | |
099db71a | 167 | Group: Base |
8bec3f09 JB |
168 | Requires(post,preun): /sbin/chkconfig |
169 | Requires: %{name} = %{version}-%{release} | |
170 | Requires: rc-scripts | |
099db71a AM |
171 | |
172 | %description initscript | |
8bec3f09 | 173 | SysVinit scripts to launch selected systemtap scripts at system |
099db71a AM |
174 | startup. |
175 | ||
8bec3f09 JB |
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 | ||
099db71a AM |
201 | %package sdt-devel |
202 | Summary: Static probe support tools | |
8bec3f09 JB |
203 | Summary(pl.UTF-8): Narzędzia do obsługi sond statycznych |
204 | License: GPL v2+ and Public Domain | |
099db71a | 205 | Group: Development/Libraries |
099db71a AM |
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 | ||
8bec3f09 JB |
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 | ||
aa39e90e | 220 | %prep |
459a2a3b | 221 | %setup -q |
222 | %patch0 -p1 | |
099db71a | 223 | %patch1 -p1 |
479427cf | 224 | %patch3 -p1 |
8bec3f09 | 225 | %if "%{_rpmversion}" >= "5.0" |
6fbeb569 | 226 | %patch2 -p1 |
8bec3f09 | 227 | %endif |
26f73914 | 228 | |
aa39e90e | 229 | %build |
e7f20467 | 230 | %{__gettextize} |
459a2a3b | 231 | %{__aclocal} |
232 | %{__autoconf} | |
233 | %{__autoheader} | |
234 | %{__automake} | |
235 | %configure \ | |
099db71a | 236 | --disable-silent-rules \ |
1651fd5a | 237 | %{?with_crash:--enable-crash} \ |
8bec3f09 | 238 | --enable-docs%{!?with_doc:=no} \ |
099db71a | 239 | --enable-pie \ |
8bec3f09 JB |
240 | --enable-publican%{!?with_publican:=no} \ |
241 | --enable-server \ | |
099db71a | 242 | --enable-sqlite \ |
c15371b4 | 243 | --with-dyninst%{!?with_dyninst:=no} \ |
8bec3f09 | 244 | --with-java=%{?with_java:%{_jvmdir}/java}%{!?with_java:no} |
aa39e90e AM |
245 | %{__make} |
246 | ||
247 | %install | |
248 | rm -rf $RPM_BUILD_ROOT | |
8bec3f09 JB |
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}} \ | |
bc044f75 | 251 | $RPM_BUILD_ROOT/var/log/stap-server |
aa39e90e | 252 | |
43d6c0ff | 253 | %{__make} install \ |
aa39e90e AM |
254 | DESTDIR=$RPM_BUILD_ROOT |
255 | ||
8bec3f09 JB |
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 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep | |
aa39e90e | 261 | |
8bec3f09 | 262 | install initscript/systemtap $RPM_BUILD_ROOT/etc/rc.d/init.d |
bc044f75 JR |
263 | install initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config |
264 | ||
8bec3f09 JB |
265 | install initscript/stap-server $RPM_BUILD_ROOT/etc/rc.d/init.d |
266 | install initscript/config.stap-server $RPM_BUILD_ROOT/etc/sysconfig/stap-server | |
267 | install initscript/logrotate.stap-server $RPM_BUILD_ROOT/etc/logrotate.d/stap-server | |
268 | install 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 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/systemtap docs-installed | |
bc044f75 | 275 | |
099db71a AM |
276 | %find_lang %{name} |
277 | ||
a3bbe4b0 | 278 | %clean |
279 | rm -rf $RPM_BUILD_ROOT | |
280 | ||
aa39e90e AM |
281 | %files |
282 | %defattr(644,root,root,755) | |
8bec3f09 JB |
283 | |
284 | %files runtime -f %{name}.lang | |
285 | %defattr(644,root,root,755) | |
286 | %doc AUTHORS NEWS README* | |
839ed024 | 287 | %attr(755,root,root) %{_bindir}/stap-merge |
288 | %attr(755,root,root) %{_bindir}/stap-report | |
c15371b4 | 289 | %{?with_dyninst:%attr(755,root,root) %{_bindir}/stapdyn} |
839f235b | 290 | %attr(755,root,root) %{_bindir}/stapsh |
8bec3f09 JB |
291 | # XXX: %attr(4754,root,stapusr) staprun ? |
292 | %attr(755,root,root) %{_bindir}/staprun | |
73e96872 | 293 | %dir %{_libdir}/%{name} |
8bec3f09 JB |
294 | %attr(755,root,root) %{_libdir}/%{name}/stap-authorize-cert |
295 | %attr(755,root,root) %{_libdir}/%{name}/stapio | |
1651fd5a | 296 | %{?with_crash:%attr(755,root,root) %{_libdir}/%{name}/staplog.so} |
839f235b | 297 | %{_mandir}/man1/stap-merge.1* |
311fc893 | 298 | %{_mandir}/man1/stap-report.1* |
8bec3f09 JB |
299 | %{_mandir}/man3/function::*.3stap* |
300 | %{_mandir}/man3/probe::*.3stap* | |
301 | %{_mandir}/man3/stapex.3stap* | |
302 | %{_mandir}/man3/stapfuncs.3stap* | |
303 | %{_mandir}/man3/stapprobes.3stap* | |
304 | %{_mandir}/man3/stapvars.3stap* | |
305 | %{_mandir}/man3/tapset::*.3stap* | |
306 | %{_mandir}/man7/error::*.7stap* | |
bc044f75 | 307 | %{_mandir}/man7/stappaths.7* |
8bec3f09 | 308 | %{_mandir}/man7/warning::debuginfo.7stap* |
eae4d4c2 | 309 | %{_mandir}/man7/warning::symbols.7stap* |
311fc893 | 310 | %{?with_dyninst:%{_mandir}/man8/stapdyn.8*} |
839f235b | 311 | %{_mandir}/man8/staprun.8* |
311fc893 | 312 | %{_mandir}/man8/stapsh.8* |
e7f20467 | 313 | %{_mandir}/man8/systemtap.8* |
099db71a | 314 | |
8bec3f09 JB |
315 | %if %{with java} |
316 | %files runtime-java | |
317 | %defattr(644,root,root,755) | |
318 | %attr(755,root,root) %{_libdir}/%{name}/stapbm | |
319 | %attr(755,root,root) %{_libdir}/%{name}/libHelperSDT_*.so | |
320 | %{_libdir}/%{name}/HelperSDT.jar | |
321 | %endif | |
322 | ||
323 | %files client | |
324 | %defattr(644,root,root,755) | |
325 | %doc docs-installed/examples %{?with_docs:docs-installed/{tapsets,langref.pdf,tutorial.pdf}} | |
326 | %attr(755,root,root) %{_bindir}/stap | |
327 | %attr(755,root,root) %{_bindir}/stap-prep | |
3d813eaf | 328 | %attr(755,root,root) %{_bindir}/stapvirt |
8bec3f09 JB |
329 | %dir %{_datadir}/%{name} |
330 | %{_datadir}/%{name}/tapset | |
331 | %{_mandir}/man1/stap.1* | |
332 | %{_mandir}/man1/stap-prep.1* | |
3d813eaf | 333 | %{_mandir}/man1/stapvirt.1* |
8bec3f09 JB |
334 | |
335 | %files devel | |
336 | %defattr(644,root,root,755) | |
337 | %{_datadir}/%{name}/runtime | |
338 | ||
339 | %files initscript | |
340 | %defattr(644,root,root,755) | |
8bec3f09 JB |
341 | %attr(754,root,root) /etc/rc.d/init.d/systemtap |
342 | %dir %{_sysconfdir}/systemtap | |
343 | %dir %{_sysconfdir}/systemtap/conf.d | |
344 | %dir %{_sysconfdir}/systemtap/script.d | |
345 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/systemtap/config | |
346 | %{systemdtmpfilesdir}/systemtap.conf | |
347 | %dir /var/cache/%{name} | |
348 | %dir /var/run/%{name} | |
349 | ||
350 | %files server | |
351 | %defattr(644,root,root,755) | |
352 | %attr(755,root,root) %{_bindir}/stap-server | |
353 | %attr(755,root,root) %{_libdir}/%{name}/stap-env | |
354 | %attr(755,root,root) %{_libdir}/%{name}/stap-gen-cert | |
355 | %attr(755,root,root) %{_libdir}/%{name}/stap-serverd | |
356 | %attr(755,root,root) %{_libdir}/%{name}/stap-sign-module | |
357 | %attr(755,root,root) %{_libdir}/%{name}/stap-start-server | |
358 | %attr(755,root,root) %{_libdir}/%{name}/stap-stop-server | |
359 | %dir %{_sysconfdir}/stap-server | |
360 | %dir %{_sysconfdir}/stap-server/conf.d | |
361 | %attr(754,root,root) /etc/rc.d/init.d/stap-server | |
362 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stap-server | |
363 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/stap-server | |
364 | %{systemdunitdir}/stap-server.service | |
365 | %{systemdtmpfilesdir}/stap-server.conf | |
366 | # TODO: create user/group | |
367 | #%attr(750,stap-server,stap-server) %dir /var/lib/stap-server | |
368 | #%attr(700,stap-server,stap-server) %dir /var/lib/stap-server/.systemtap | |
369 | #%attr(755,stap-server,stap-server) %dir /var/log/stap-server | |
370 | #%attr(755,stap-server,stap-server) %dir /var/run/stap-server | |
371 | %{_mandir}/man8/stap-server.8* | |
372 | ||
373 | %files sdt-devel | |
099db71a AM |
374 | %defattr(644,root,root,755) |
375 | %attr(755,root,root) %{_bindir}/dtrace | |
376 | %{_includedir}/sys/sdt.h | |
377 | %{_includedir}/sys/sdt-config.h | |
378 | %{_mandir}/man1/dtrace.1* |