]>
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 |
ee45c857 | 19 | Release: 3 |
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 |
1a30c954 | 30 | Patch4: format-security.patch |
ff9bc29b | 31 | URL: http://sourceware.org/systemtap/ |
8bec3f09 | 32 | BuildRequires: autoconf >= 2.63 |
60a0430a | 33 | BuildRequires: automake |
099db71a | 34 | BuildRequires: avahi-devel |
8bec3f09 | 35 | BuildRequires: boost-devel |
1651fd5a | 36 | %{?with_crash:BuildRequires: crash-devel} |
8bec3f09 | 37 | BuildRequires: docbook-dtd412-xml |
c15371b4 | 38 | %{?with_dyninst:BuildRequires: dyninst-devel >= 8.0} |
8bec3f09 | 39 | BuildRequires: elfutils-devel >= 0.148 |
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 |
bc044f75 | 51 | BuildRequires: rpm-devel |
8bec3f09 JB |
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 | |
099db71a | 60 | BuildRequires: texlive-latex |
8bec3f09 JB |
61 | %endif |
62 | # let base mean client+local development package | |
63 | Requires: %{name}-client = %{version}-%{release} | |
64 | Requires: %{name}-devel = %{version}-%{release} | |
aa39e90e AM |
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 | |
8bec3f09 JB |
70 | of the system. The base systemtap package provides the components |
71 | needed to locally develop and execute systemtap script. | |
aa39e90e | 72 | |
3bf8b266 JR |
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 | |
8bec3f09 JB |
76 | operacji w systemie. Główny pakiet dostarcza komponenty niezbędne do |
77 | lokalnego tworzenia i wykonywania skryptów systemtap. | |
099db71a AM |
78 | |
79 | %package runtime | |
80 | Summary: Programmable system-wide instrumentation system - runtime | |
8bec3f09 JB |
81 | Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - środowisko uruchomieniowe |
82 | Group: Applications/System | |
099db71a AM |
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 | ||
8bec3f09 JB |
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} | |
8bec3f09 JB |
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 | ||
099db71a AM |
111 | %package client |
112 | Summary: Programmable system-wide instrumentation system - client | |
8bec3f09 JB |
113 | Summary(pl.UTF-8): Programowalny systemowy system oprzyrządowania - klient |
114 | Group: Applications/System | |
115 | Requires: %{name}-runtime = %{version}-%{release} | |
099db71a AM |
116 | Requires: coreutils |
117 | Requires: grep | |
e7f20467 | 118 | Requires: libvirt >= 1.0.2 |
099db71a AM |
119 | Requires: openssh-clients |
120 | Requires: sed | |
099db71a AM |
121 | Requires: unzip |
122 | Requires: zip | |
123 | ||
124 | %description client | |
8bec3f09 JB |
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. | |
099db71a | 130 | |
8bec3f09 JB |
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. | |
099db71a AM |
164 | |
165 | %package initscript | |
8bec3f09 JB |
166 | Summary: SystemTap Initscripts |
167 | Summary(pl.UTF-8): Skrypty startowe SystemTap | |
099db71a | 168 | Group: Base |
8bec3f09 JB |
169 | Requires(post,preun): /sbin/chkconfig |
170 | Requires: %{name} = %{version}-%{release} | |
171 | Requires: rc-scripts | |
099db71a AM |
172 | |
173 | %description initscript | |
8bec3f09 | 174 | SysVinit scripts to launch selected systemtap scripts at system |
099db71a AM |
175 | startup. |
176 | ||
8bec3f09 JB |
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 | ||
099db71a AM |
202 | %package sdt-devel |
203 | Summary: Static probe support tools | |
8bec3f09 JB |
204 | Summary(pl.UTF-8): Narzędzia do obsługi sond statycznych |
205 | License: GPL v2+ and Public Domain | |
099db71a | 206 | Group: Development/Libraries |
099db71a AM |
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 | ||
8bec3f09 JB |
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 | ||
aa39e90e | 221 | %prep |
459a2a3b | 222 | %setup -q |
223 | %patch0 -p1 | |
099db71a | 224 | %patch1 -p1 |
479427cf | 225 | %patch3 -p1 |
1a30c954 | 226 | %patch4 -p1 |
8bec3f09 | 227 | %if "%{_rpmversion}" >= "5.0" |
6fbeb569 | 228 | %patch2 -p1 |
8bec3f09 | 229 | %endif |
26f73914 | 230 | |
aa39e90e | 231 | %build |
e7f20467 | 232 | %{__gettextize} |
459a2a3b | 233 | %{__aclocal} |
234 | %{__autoconf} | |
235 | %{__autoheader} | |
236 | %{__automake} | |
237 | %configure \ | |
099db71a | 238 | --disable-silent-rules \ |
1651fd5a | 239 | %{?with_crash:--enable-crash} \ |
8bec3f09 | 240 | --enable-docs%{!?with_doc:=no} \ |
099db71a | 241 | --enable-pie \ |
8bec3f09 JB |
242 | --enable-publican%{!?with_publican:=no} \ |
243 | --enable-server \ | |
099db71a | 244 | --enable-sqlite \ |
c15371b4 | 245 | --with-dyninst%{!?with_dyninst:=no} \ |
8bec3f09 | 246 | --with-java=%{?with_java:%{_jvmdir}/java}%{!?with_java:no} |
aa39e90e AM |
247 | %{__make} |
248 | ||
249 | %install | |
250 | rm -rf $RPM_BUILD_ROOT | |
8bec3f09 JB |
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}} \ | |
bc044f75 | 253 | $RPM_BUILD_ROOT/var/log/stap-server |
aa39e90e | 254 | |
43d6c0ff | 255 | %{__make} install \ |
aa39e90e AM |
256 | DESTDIR=$RPM_BUILD_ROOT |
257 | ||
8bec3f09 JB |
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 | |
aa39e90e | 263 | |
8bec3f09 | 264 | install initscript/systemtap $RPM_BUILD_ROOT/etc/rc.d/init.d |
bc044f75 JR |
265 | install initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config |
266 | ||
8bec3f09 JB |
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 | |
bc044f75 | 277 | |
099db71a AM |
278 | %find_lang %{name} |
279 | ||
a3bbe4b0 | 280 | %clean |
281 | rm -rf $RPM_BUILD_ROOT | |
282 | ||
aa39e90e AM |
283 | %files |
284 | %defattr(644,root,root,755) | |
8bec3f09 JB |
285 | |
286 | %files runtime -f %{name}.lang | |
287 | %defattr(644,root,root,755) | |
288 | %doc AUTHORS NEWS README* | |
839ed024 | 289 | %attr(755,root,root) %{_bindir}/stap-merge |
290 | %attr(755,root,root) %{_bindir}/stap-report | |
c15371b4 | 291 | %{?with_dyninst:%attr(755,root,root) %{_bindir}/stapdyn} |
839f235b | 292 | %attr(755,root,root) %{_bindir}/stapsh |
8bec3f09 JB |
293 | # XXX: %attr(4754,root,stapusr) staprun ? |
294 | %attr(755,root,root) %{_bindir}/staprun | |
73e96872 | 295 | %dir %{_libdir}/%{name} |
8bec3f09 JB |
296 | %attr(755,root,root) %{_libdir}/%{name}/stap-authorize-cert |
297 | %attr(755,root,root) %{_libdir}/%{name}/stapio | |
1651fd5a | 298 | %{?with_crash:%attr(755,root,root) %{_libdir}/%{name}/staplog.so} |
839f235b | 299 | %{_mandir}/man1/stap-merge.1* |
311fc893 | 300 | %{_mandir}/man1/stap-report.1* |
8bec3f09 JB |
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* | |
bc044f75 | 309 | %{_mandir}/man7/stappaths.7* |
8bec3f09 | 310 | %{_mandir}/man7/warning::debuginfo.7stap* |
eae4d4c2 | 311 | %{_mandir}/man7/warning::symbols.7stap* |
311fc893 | 312 | %{?with_dyninst:%{_mandir}/man8/stapdyn.8*} |
839f235b | 313 | %{_mandir}/man8/staprun.8* |
311fc893 | 314 | %{_mandir}/man8/stapsh.8* |
e7f20467 | 315 | %{_mandir}/man8/systemtap.8* |
099db71a | 316 | |
8bec3f09 JB |
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 | |
3d813eaf | 330 | %attr(755,root,root) %{_bindir}/stapvirt |
8bec3f09 JB |
331 | %dir %{_datadir}/%{name} |
332 | %{_datadir}/%{name}/tapset | |
333 | %{_mandir}/man1/stap.1* | |
334 | %{_mandir}/man1/stap-prep.1* | |
3d813eaf | 335 | %{_mandir}/man1/stapvirt.1* |
8bec3f09 JB |
336 | |
337 | %files devel | |
338 | %defattr(644,root,root,755) | |
339 | %{_datadir}/%{name}/runtime | |
340 | ||
341 | %files initscript | |
342 | %defattr(644,root,root,755) | |
8bec3f09 JB |
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 | |
099db71a AM |
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* |