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