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