]>
Commit | Line | Data |
---|---|---|
11059140 RM |
1 | %{!?with_sqlite: %global with_sqlite 1} |
2 | %{!?with_docs: %global with_docs 1} | |
38105915 | 3 | %{!?with_crash: %global with_crash 1} |
11059140 RM |
4 | %{!?with_rpm: %global with_rpm 1} |
5 | %{!?with_bundled_elfutils: %global with_bundled_elfutils 0} | |
e050d62f | 6 | %{!?elfutils_version: %global elfutils_version 0.142} |
11059140 | 7 | %{!?pie_supported: %global pie_supported 1} |
11059140 RM |
8 | %{!?with_boost: %global with_boost 0} |
9 | %{!?with_publican: %global with_publican 1} | |
10 | %{!?publican_brand: %global publican_brand fedora} | |
5ecd6999 | 11 | %{!?with_dyninst: %global with_dyninst 0%{?fedora} >= 18} |
1074f79d | 12 | |
a2c9eba7 | 13 | Name: systemtap |
4c4adc41 | 14 | Version: 2.0 |
27aba29a | 15 | Release: 1%{?dist} |
59b30bda | 16 | # for version, see also configure.ac |
016a35ea FCE |
17 | |
18 | ||
19 | # Packaging abstract: | |
20 | # | |
21 | # systemtap empty req:-client req:-devel | |
22 | # systemtap-server /usr/bin/stap-server*, req:-devel | |
23 | # systemtap-devel /usr/bin/stap, runtime, tapset, req:kernel-devel | |
4b682f2a | 24 | # systemtap-runtime /usr/bin/staprun, /usr/bin/stapsh, /usr/bin/stapdyn |
016a35ea FCE |
25 | # systemtap-client /usr/bin/stap, samples, docs, tapset(bonus), req:-runtime |
26 | # systemtap-initscript /etc/init.d/systemtap, req:systemtap | |
27 | # systemtap-sdt-devel /usr/include/sys/sdt.h /usr/bin/dtrace | |
28 | # systemtap-testsuite /usr/share/systemtap/testsuite*, req:systemtap, req:sdt-devel | |
016a35ea FCE |
29 | # |
30 | # Typical scenarios: | |
31 | # | |
32 | # stap-client: systemtap-client | |
33 | # stap-server: systemtap-server | |
34 | # local user: systemtap | |
35 | # | |
36 | # Unusual scenarios: | |
37 | # | |
38 | # intermediary stap-client for --remote: systemtap-client (-runtime unused) | |
39 | # intermediary stap-server for --use-server: systemtap-server (-devel unused) | |
40 | ||
41 | Summary: Programmable system-wide instrumentation system | |
7d838f63 | 42 | Group: Development/System |
6a1cd8a7 | 43 | License: GPLv2+ |
a2c9eba7 | 44 | URL: http://sourceware.org/systemtap/ |
47b0655b | 45 | Source: ftp://sourceware.org/pub/%{name}/releases/%{name}-%{version}.tar.gz |
a2c9eba7 | 46 | |
016a35ea | 47 | # Build* |
37b99e78 | 48 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
4c895683 | 49 | BuildRequires: gcc-c++ |
48fa6b5e FCE |
50 | BuildRequires: gettext-devel |
51 | BuildRequires: nss-devel avahi-devel pkgconfig | |
5ecd6999 JS |
52 | %if %{with_dyninst} |
53 | # include the prerelease version for now, but really this is >= 8.0 | |
54 | BuildRequires: dyninst-devel >= 7.99 | |
55 | %endif | |
a87d23e3 | 56 | %if %{with_sqlite} |
c3a3c0c9 | 57 | BuildRequires: sqlite-devel |
d8c3d602 | 58 | %endif |
469c1a1b FCE |
59 | # Needed for libstd++ < 4.0, without <tr1/memory> |
60 | %if %{with_boost} | |
61 | BuildRequires: boost-devel | |
62 | %endif | |
a87d23e3 | 63 | %if %{with_crash} |
d2995e6f | 64 | BuildRequires: crash-devel zlib-devel |
1e0716d3 | 65 | %endif |
2ed04863 WC |
66 | %if %{with_rpm} |
67 | BuildRequires: rpm-devel glibc-headers | |
68 | %endif | |
a87d23e3 | 69 | %if %{with_bundled_elfutils} |
7d838f63 MH |
70 | Source1: elfutils-%{elfutils_version}.tar.gz |
71 | Patch1: elfutils-portability.patch | |
d79591b3 | 72 | BuildRequires: m4 |
11059140 | 73 | %global setup_elfutils -a1 |
a2c9eba7 RM |
74 | %else |
75 | BuildRequires: elfutils-devel >= %{elfutils_version} | |
7d838f63 | 76 | %endif |
465e8fbf FCE |
77 | %if %{with_docs} |
78 | BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf latex2html | |
6275c8d7 DS |
79 | # On F10, xmlto's pdf support was broken off into a sub-package, |
80 | # called 'xmlto-tex'. To avoid a specific F10 BuildReq, we'll do a | |
81 | # file-based buildreq on '/usr/share/xmlto/format/fo/pdf'. | |
82 | BuildRequires: xmlto /usr/share/xmlto/format/fo/pdf | |
53ade4da MW |
83 | %if %{with_publican} |
84 | BuildRequires: publican | |
59c75f19 | 85 | BuildRequires: /usr/share/publican/Common_Content/%{publican_brand}/defaults.cfg |
53ade4da | 86 | %endif |
465e8fbf | 87 | %endif |
14df5fde | 88 | |
016a35ea FCE |
89 | # Install requirements |
90 | Requires: systemtap-client = %{version}-%{release} | |
91 | Requires: systemtap-devel = %{version}-%{release} | |
92 | ||
7d838f63 | 93 | %description |
f89ff3e2 | 94 | SystemTap is an instrumentation system for systems running Linux. |
016a35ea FCE |
95 | Developers can write instrumentation scripts to collect data on |
96 | the operation of the system. The base systemtap package contains/requires | |
97 | the components needed to locally develop and execute systemtap scripts. | |
98 | ||
99 | # ------------------------------------------------------------------------ | |
100 | ||
101 | %package server | |
102 | Summary: Instrumentation System Server | |
103 | Group: Development/System | |
104 | License: GPLv2+ | |
105 | URL: http://sourceware.org/systemtap/ | |
106 | Requires: systemtap-devel = %{version}-%{release} | |
107 | # On RHEL[45], /bin/mktemp comes from the 'mktemp' package. On newer | |
108 | # distributions, /bin/mktemp comes from the 'coreutils' package. To | |
109 | # avoid a specific RHEL[45] Requires, we'll do a file-based require. | |
110 | Requires: nss /bin/mktemp | |
111 | Requires: zip unzip | |
112 | Requires(pre): shadow-utils | |
113 | Requires(post): chkconfig | |
114 | Requires(preun): chkconfig | |
115 | Requires(preun): initscripts | |
116 | Requires(postun): initscripts | |
117 | BuildRequires: nss-devel avahi-devel | |
118 | ||
119 | %description server | |
120 | This is the remote script compilation server component of systemtap. | |
121 | It announces itself to nearby clients with avahi (if available), and | |
122 | compiles systemtap scripts to kernel objects on their demand. | |
123 | ||
124 | ||
125 | %package devel | |
126 | Summary: Programmable system-wide instrumentation system - development headers, tools | |
127 | Group: Development/System | |
128 | License: GPLv2+ | |
129 | URL: http://sourceware.org/systemtap/ | |
130 | Requires: kernel >= 2.6.9-11 | |
131 | # Alternate kernel packages kernel-PAE-devel et al. have a virtual | |
132 | # provide for kernel-devel, so this requirement does the right thing, | |
133 | # at least past RHEL4. | |
134 | Requires: kernel-devel | |
4c895683 | 135 | Requires: gcc make |
016a35ea FCE |
136 | # Suggest: kernel-debuginfo |
137 | ||
138 | %description devel | |
139 | This package contains the components needed to compile a systemtap | |
140 | script from source form into executable (.ko) forms. It may be | |
141 | installed on a self-contained developer workstation (along with the | |
142 | systemtap-client and systemtap-runtime packages), or on a dedicated | |
143 | remote server (alongside the systemtap-server package). It includes | |
144 | a copy of the standard tapset library and the runtime library C files. | |
145 | ||
7d838f63 | 146 | |
a63a95dc | 147 | %package runtime |
016a35ea | 148 | Summary: Programmable system-wide instrumentation system - runtime |
a63a95dc | 149 | Group: Development/System |
6a1cd8a7 | 150 | License: GPLv2+ |
a63a95dc DS |
151 | URL: http://sourceware.org/systemtap/ |
152 | Requires: kernel >= 2.6.9-11 | |
378a5245 | 153 | Requires(pre): shadow-utils |
a63a95dc DS |
154 | |
155 | %description runtime | |
016a35ea FCE |
156 | SystemTap runtime contains the components needed to execute |
157 | a systemtap script that was already compiled into a module | |
158 | using a local or remote systemtap-devel installation. | |
a63a95dc | 159 | |
016a35ea FCE |
160 | |
161 | %package client | |
162 | Summary: Programmable system-wide instrumentation system - client | |
8f3c45cc FCE |
163 | Group: Development/System |
164 | License: GPLv2+ | |
165 | URL: http://sourceware.org/systemtap/ | |
016a35ea FCE |
166 | Requires: zip unzip |
167 | Requires: systemtap-runtime = %{version}-%{release} | |
168 | Requires: coreutils grep sed unzip zip | |
169 | Requires: openssh-clients | |
8f3c45cc | 170 | |
016a35ea FCE |
171 | %description client |
172 | This package contains/requires the components needed to develop | |
173 | systemtap scripts, and compile them using a local systemtap-devel | |
174 | or a remote systemtap-server installation, then run them using a | |
175 | local or remote systemtap-runtime. It includes script samples and | |
176 | documentation, and a copy of the tapset library for reference. | |
8f3c45cc | 177 | |
016a35ea FCE |
178 | |
179 | %package initscript | |
180 | Summary: Systemtap Initscripts | |
d9d14e20 DB |
181 | Group: Development/System |
182 | License: GPLv2+ | |
183 | URL: http://sourceware.org/systemtap/ | |
ad12652e | 184 | Requires: systemtap = %{version}-%{release} |
e2a741be DB |
185 | Requires(post): chkconfig |
186 | Requires(preun): chkconfig | |
187 | Requires(preun): initscripts | |
188 | Requires(postun): initscripts | |
d9d14e20 | 189 | |
016a35ea FCE |
190 | %description initscript |
191 | Sysvinit scripts to launch selected systemtap scripts at system startup. | |
192 | ||
d9d14e20 | 193 | |
b899aa79 SC |
194 | %package sdt-devel |
195 | Summary: Static probe support tools | |
196 | Group: Development/System | |
920b103a | 197 | License: GPLv2+ and Public Domain |
b899aa79 | 198 | URL: http://sourceware.org/systemtap/ |
b899aa79 SC |
199 | |
200 | %description sdt-devel | |
016a35ea FCE |
201 | This package includes the <sys/sdt.h> header file used for static |
202 | instrumentation compiled into userspace programs and libraries, along | |
203 | with the optional dtrace-compatibility preprocessor to process related | |
204 | .d files into tracing-macro-laden .h headers. | |
b899aa79 | 205 | |
016a35ea FCE |
206 | |
207 | %package testsuite | |
208 | Summary: Instrumentation System Testsuite | |
9a8d8be3 MH |
209 | Group: Development/System |
210 | License: GPLv2+ | |
211 | URL: http://sourceware.org/systemtap/ | |
016a35ea FCE |
212 | Requires: systemtap = %{version}-%{release} |
213 | Requires: systemtap-sdt-devel = %{version}-%{release} | |
d6d8634e | 214 | Requires: systemtap-server = %{version}-%{release} |
df7d2178 | 215 | Requires: dejagnu which prelink elfutils grep nc |
4c895683 | 216 | Requires: gcc gcc-c++ make glibc-devel |
d6d8634e DS |
217 | # testsuite/systemtap.server/client.exp needs avahi |
218 | Requires: avahi | |
219 | %if %{with_crash} | |
220 | # testsuite/systemtap.base/crash.exp needs crash | |
221 | Requires: crash | |
222 | %endif | |
07547775 | 223 | %ifarch x86_64 |
4c895683 SC |
224 | Requires: glibc-devel(%{__isa_name}-32) |
225 | %endif | |
016a35ea FCE |
226 | |
227 | %description testsuite | |
228 | This package includes the dejagnu-based systemtap stress self-testing | |
229 | suite. This may be used by system administrators to thoroughly check | |
230 | systemtap on the current system. | |
9a8d8be3 | 231 | |
9a8d8be3 | 232 | |
016a35ea FCE |
233 | # ------------------------------------------------------------------------ |
234 | ||
7d838f63 | 235 | %prep |
a2c9eba7 RM |
236 | %setup -q %{?setup_elfutils} |
237 | ||
a87d23e3 | 238 | %if %{with_bundled_elfutils} |
7d838f63 MH |
239 | cd elfutils-%{elfutils_version} |
240 | %patch1 -p1 | |
a2c9eba7 RM |
241 | sleep 1 |
242 | find . \( -name Makefile.in -o -name aclocal.m4 \) -print | xargs touch | |
243 | sleep 1 | |
244 | find . \( -name configure -o -name config.h.in \) -print | xargs touch | |
7d838f63 MH |
245 | cd .. |
246 | %endif | |
247 | ||
248 | %build | |
a2c9eba7 | 249 | |
a87d23e3 | 250 | %if %{with_bundled_elfutils} |
7d838f63 | 251 | # Build our own copy of elfutils. |
11059140 | 252 | %global elfutils_config --with-elfutils=elfutils-%{elfutils_version} |
a2c9eba7 RM |
253 | |
254 | # We have to prevent the standard dependency generation from identifying | |
255 | # our private elfutils libraries in our provides and requires. | |
11059140 RM |
256 | %global _use_internal_dependency_generator 0 |
257 | %global filter_eulibs() /bin/sh -c "%{1} | sed '/libelf/d;/libdw/d;/libebl/d'" | |
258 | %global __find_provides %{filter_eulibs /usr/lib/rpm/find-provides} | |
259 | %global __find_requires %{filter_eulibs /usr/lib/rpm/find-requires} | |
4dbd685d RM |
260 | |
261 | # This will be needed for running stap when not installed, for the test suite. | |
11059140 | 262 | %global elfutils_mflags LD_LIBRARY_PATH=`pwd`/lib-elfutils |
7d838f63 MH |
263 | %endif |
264 | ||
5ecd6999 JS |
265 | # Enable/disable the dyninst pure-userspace backend |
266 | %if %{with_dyninst} | |
267 | %global dyninst_config --with-dyninst | |
268 | %else | |
269 | %global dyninst_config --without-dyninst | |
270 | %endif | |
271 | ||
9921a199 | 272 | # Enable/disable the sqlite coverage testing support |
a87d23e3 | 273 | %if %{with_sqlite} |
11059140 | 274 | %global sqlite_config --enable-sqlite |
9921a199 | 275 | %else |
11059140 | 276 | %global sqlite_config --disable-sqlite |
d8c3d602 WC |
277 | %endif |
278 | ||
a87d23e3 DS |
279 | # Enable/disable the crash extension |
280 | %if %{with_crash} | |
11059140 | 281 | %global crash_config --enable-crash |
a87d23e3 | 282 | %else |
11059140 | 283 | %global crash_config --disable-crash |
a87d23e3 DS |
284 | %endif |
285 | ||
2ed04863 WC |
286 | # Enable/disable the code to find and suggest needed rpms |
287 | %if %{with_rpm} | |
11059140 | 288 | %global rpm_config --with-rpm |
2ed04863 | 289 | %else |
11059140 | 290 | %global rpm_config --without-rpm |
2ed04863 WC |
291 | %endif |
292 | ||
465e8fbf | 293 | %if %{with_docs} |
11059140 | 294 | %global docs_config --enable-docs |
465e8fbf | 295 | %else |
11059140 | 296 | %global docs_config --disable-docs |
465e8fbf FCE |
297 | %endif |
298 | ||
e1e3ba36 RA |
299 | # Enable pie as configure defaults to disabling it |
300 | %if %{pie_supported} | |
11059140 | 301 | %global pie_config --enable-pie |
e1e3ba36 | 302 | %else |
11059140 | 303 | %global pie_config --disable-pie |
e1e3ba36 | 304 | %endif |
465e8fbf | 305 | |
53ade4da | 306 | %if %{with_publican} |
11059140 | 307 | %global publican_config --enable-publican --with-publican-brand=%{publican_brand} |
53ade4da | 308 | %else |
11059140 | 309 | %global publican_config --disable-publican |
53ade4da MW |
310 | %endif |
311 | ||
465e8fbf | 312 | |
6ea5debd | 313 | %configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{publican_config} %{rpm_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}" |
a2c9eba7 | 314 | make %{?_smp_mflags} |
2a4b42eb | 315 | |
ec4d1558 MW |
316 | %install |
317 | rm -rf ${RPM_BUILD_ROOT} | |
318 | make DESTDIR=$RPM_BUILD_ROOT install | |
9564097a | 319 | %find_lang %{name} |
ec4d1558 | 320 | |
c256c4a6 MW |
321 | # We want the examples in the special doc dir, not the build install dir. |
322 | # We build it in place and then move it away so it doesn't get installed | |
323 | # twice. rpm can specify itself where the (versioned) docs go with the | |
324 | # %doc directive. | |
ec4d1558 MW |
325 | mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/examples examples |
326 | ||
d2995e6f FCE |
327 | # Fix paths in the example & testsuite scripts |
328 | find examples testsuite -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@' | |
7d838f63 | 329 | |
414e04de DS |
330 | # To make rpmlint happy, remove any .gitignore files in the testsuite. |
331 | find testsuite -type f -name '.gitignore' -print0 | xargs -0 rm -f | |
332 | ||
b7565b41 | 333 | # Because "make install" may install staprun with whatever mode, the |
98aab489 DS |
334 | # post-processing programs rpmbuild runs won't be able to read it. |
335 | # So, we change permissions so that they can read it. We'll set the | |
b7565b41 | 336 | # permissions back to 04110 in the %files section below. |
98aab489 DS |
337 | chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun |
338 | ||
cd4d1d39 WC |
339 | #install the useful stap-prep script |
340 | install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep | |
341 | ||
8f3c45cc FCE |
342 | # Copy over the testsuite |
343 | cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap | |
344 | ||
4040e9ea | 345 | %if %{with_docs} |
7fe437e6 | 346 | # We want the manuals in the special doc dir, not the generic doc install dir. |
c256c4a6 MW |
347 | # We build it in place and then move it away so it doesn't get installed |
348 | # twice. rpm can specify itself where the (versioned) docs go with the | |
349 | # %doc directive. | |
7fe437e6 MW |
350 | mkdir docs.installed |
351 | mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/ | |
5bfd7a37 | 352 | mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/tapsets docs.installed/ |
53ade4da MW |
353 | %if %{with_publican} |
354 | mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/SystemTap_Beginners_Guide docs.installed/ | |
355 | %endif | |
4040e9ea | 356 | %endif |
7fe437e6 | 357 | |
e2a741be DB |
358 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ |
359 | install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ | |
9a8d8be3 MH |
360 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap |
361 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/conf.d | |
362 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.d | |
e2a741be | 363 | install -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config |
9a8d8be3 MH |
364 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/systemtap |
365 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap | |
09070e8a | 366 | |
e2a741be | 367 | install -m 755 initscript/stap-server $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ |
2f78bee0 DB |
368 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server |
369 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server/conf.d | |
c982e923 | 370 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig |
e2a741be | 371 | install -m 644 initscript/config.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/stap-server |
2648a9b4 DB |
372 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server |
373 | touch $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server/log | |
962906a7 DS |
374 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d |
375 | install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server | |
9a8d8be3 | 376 | |
7d838f63 MH |
377 | %clean |
378 | rm -rf ${RPM_BUILD_ROOT} | |
379 | ||
378a5245 | 380 | %pre runtime |
9d2b21df FCE |
381 | getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr |
382 | getent group stapsys >/dev/null || groupadd -g 157 -r stapsys 2>/dev/null || groupadd -r stapsys | |
383 | getent group stapdev >/dev/null || groupadd -g 158 -r stapdev 2>/dev/null || groupadd -r stapdev | |
efc4bf9a | 384 | exit 0 |
98aab489 | 385 | |
7433d0cf | 386 | %pre server |
9d2b21df | 387 | getent group stap-server >/dev/null || groupadd -g 155 -r stap-server 2>/dev/null || groupadd -r stap-server |
2648a9b4 | 388 | getent passwd stap-server >/dev/null || \ |
9d2b21df | 389 | useradd -c "Systemtap Compile Server" -u 155 -g stap-server -d %{_localstatedir}/lib/stap-server -m -r -s /sbin/nologin stap-server 2>/dev/null || \ |
2648a9b4 | 390 | useradd -c "Systemtap Compile Server" -g stap-server -d %{_localstatedir}/lib/stap-server -m -r -s /sbin/nologin stap-server |
c33bb0d6 | 391 | test -e ~stap-server && chmod 755 ~stap-server |
878b2f3f CM |
392 | |
393 | if [ ! -f ~stap-server/.systemtap/rc ]; then | |
394 | mkdir -p ~stap-server/.systemtap | |
395 | chown stap-server:stap-server ~stap-server/.systemtap | |
396 | echo "--rlimit-as=614400000 --rlimit-cpu=60 --rlimit-nproc=20 --rlimit-stack=1024000 --rlimit-fsize=51200000" > ~stap-server/.systemtap/rc | |
397 | chown stap-server:stap-server ~stap-server/.systemtap/rc | |
398 | fi | |
7433d0cf DB |
399 | exit 0 |
400 | ||
09070e8a | 401 | %post server |
962906a7 DS |
402 | test -e %{_localstatedir}/log/stap-server/log || { |
403 | touch %{_localstatedir}/log/stap-server/log | |
404 | chmod 664 %{_localstatedir}/log/stap-server/log | |
405 | chown stap-server:stap-server %{_localstatedir}/log/stap-server/log | |
406 | } | |
878b2f3f | 407 | |
994e8c2c | 408 | # If it does not already exist, as stap-server, generate the certificate |
2648a9b4 DB |
409 | # used for signing and for ssl. |
410 | if test ! -e ~stap-server/.systemtap/ssl/server/stap.cert; then | |
411 | runuser -s /bin/sh - stap-server -c %{_libexecdir}/%{name}/stap-gen-cert >/dev/null | |
412 | # Authorize the certificate as a trusted ssl peer and as a trusted signer | |
413 | # on the local host. | |
f0d23fa8 DB |
414 | %{_libexecdir}/%{name}/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/ssl/client >/dev/null |
415 | %{_libexecdir}/%{name}/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/staprun >/dev/null | |
2648a9b4 | 416 | fi |
829fc0c4 | 417 | |
03301bc3 | 418 | # Activate the service |
e2a741be | 419 | /sbin/chkconfig --add stap-server |
09070e8a DB |
420 | exit 0 |
421 | ||
422 | %preun server | |
d210cb1c DB |
423 | # Check that this is the actual deinstallation of the package, as opposed to |
424 | # just removing the old package on upgrade. | |
e2a741be DB |
425 | if [ $1 = 0 ] ; then |
426 | /sbin/service stap-server stop >/dev/null 2>&1 | |
427 | /sbin/chkconfig --del stap-server | |
428 | fi | |
429 | exit 0 | |
430 | ||
431 | %postun server | |
d210cb1c DB |
432 | # Check whether this is an upgrade of the package. |
433 | # If so, restart the service if it's running | |
e2a741be DB |
434 | if [ "$1" -ge "1" ] ; then |
435 | /sbin/service stap-server condrestart >/dev/null 2>&1 || : | |
436 | fi | |
09070e8a DB |
437 | exit 0 |
438 | ||
9a8d8be3 | 439 | %post initscript |
e2a741be | 440 | /sbin/chkconfig --add systemtap |
9a8d8be3 MH |
441 | exit 0 |
442 | ||
443 | %preun initscript | |
d210cb1c DB |
444 | # Check that this is the actual deinstallation of the package, as opposed to |
445 | # just removing the old package on upgrade. | |
e2a741be DB |
446 | if [ $1 = 0 ] ; then |
447 | /sbin/service systemtap stop >/dev/null 2>&1 | |
448 | /sbin/chkconfig --del systemtap | |
449 | fi | |
450 | exit 0 | |
451 | ||
452 | %postun initscript | |
d210cb1c DB |
453 | # Check whether this is an upgrade of the package. |
454 | # If so, restart the service if it's running | |
e2a741be DB |
455 | if [ "$1" -ge "1" ] ; then |
456 | /sbin/service systemtap condrestart >/dev/null 2>&1 || : | |
457 | fi | |
9a8d8be3 MH |
458 | exit 0 |
459 | ||
1208cc21 FCE |
460 | %post |
461 | # Remove any previously-built uprobes.ko materials | |
2648a9b4 | 462 | (make -C %{_datadir}/%{name}/runtime/uprobes clean) >/dev/null 2>&1 || true |
70f2bd1f | 463 | (/sbin/rmmod uprobes) >/dev/null 2>&1 || true |
1208cc21 FCE |
464 | |
465 | %preun | |
466 | # Ditto | |
2648a9b4 | 467 | (make -C %{_datadir}/%{name}/runtime/uprobes clean) >/dev/null 2>&1 || true |
70f2bd1f | 468 | (/sbin/rmmod uprobes) >/dev/null 2>&1 || true |
9a8d8be3 | 469 | |
016a35ea FCE |
470 | # ------------------------------------------------------------------------ |
471 | ||
9564097a | 472 | %files -f %{name}.lang |
016a35ea FCE |
473 | # The master "systemtap" rpm doesn't include any files. |
474 | ||
475 | %files server -f %{name}.lang | |
7d838f63 | 476 | %defattr(-,root,root) |
016a35ea FCE |
477 | %{_bindir}/stap-server |
478 | %dir %{_libexecdir}/%{name} | |
479 | %{_libexecdir}/%{name}/stap-serverd | |
480 | %{_libexecdir}/%{name}/stap-start-server | |
481 | %{_libexecdir}/%{name}/stap-stop-server | |
482 | %{_libexecdir}/%{name}/stap-gen-cert | |
483 | %{_libexecdir}/%{name}/stap-sign-module | |
484 | %{_mandir}/man7/stappaths.7* | |
485 | %{_mandir}/man8/stap-server.8* | |
486 | %{_sysconfdir}/rc.d/init.d/stap-server | |
487 | %config(noreplace) %{_sysconfdir}/logrotate.d/stap-server | |
488 | %dir %{_sysconfdir}/stap-server | |
489 | %dir %{_sysconfdir}/stap-server/conf.d | |
490 | %config(noreplace) %{_sysconfdir}/sysconfig/stap-server | |
491 | %dir %attr(0755,stap-server,stap-server) %{_localstatedir}/log/stap-server | |
492 | %ghost %config(noreplace) %attr(0644,stap-server,stap-server) %{_localstatedir}/log/stap-server/log | |
493 | %ghost %attr(0755,stap-server,stap-server) %{_localstatedir}/run/stap-server | |
494 | %doc initscript/README.stap-server | |
495 | %doc README README.unprivileged AUTHORS NEWS COPYING | |
a2c9eba7 | 496 | |
a2c9eba7 | 497 | |
016a35ea | 498 | %files devel -f %{name}.lang |
a2c9eba7 | 499 | %{_bindir}/stap |
cd4d1d39 | 500 | %{_bindir}/stap-prep |
b0ff684d | 501 | %{_bindir}/stap-report |
3451624d | 502 | %dir %{_datadir}/%{name} |
bcdfb17d DS |
503 | %{_datadir}/%{name}/runtime |
504 | %{_datadir}/%{name}/tapset | |
016a35ea FCE |
505 | %{_mandir}/man1/stap.1* |
506 | %{_mandir}/man7/stappaths.7* | |
507 | %doc README README.unprivileged AUTHORS NEWS COPYING | |
a87d23e3 | 508 | %if %{with_bundled_elfutils} |
75ab1a70 | 509 | %dir %{_libdir}/%{name} |
8f3c45cc | 510 | %{_libdir}/%{name}/lib*.so* |
7d838f63 | 511 | %endif |
a2c9eba7 | 512 | |
5ecd6999 | 513 | |
9564097a | 514 | %files runtime -f %{name}.lang |
a63a95dc | 515 | %defattr(-,root,root) |
b7565b41 | 516 | %attr(4110,root,stapusr) %{_bindir}/staprun |
e96f2257 | 517 | %{_bindir}/stapsh |
6c2c4d8e | 518 | %{_bindir}/stap-merge |
b0ff684d | 519 | %{_bindir}/stap-report |
8ff439fa | 520 | %if %{with_dyninst} |
4b682f2a | 521 | %{_bindir}/stapdyn |
8ff439fa | 522 | %endif |
75ab1a70 | 523 | %dir %{_libexecdir}/%{name} |
43a03765 | 524 | %{_libexecdir}/%{name}/stapio |
961588fd | 525 | %{_libexecdir}/%{name}/stap-env |
edecda6c | 526 | %{_libexecdir}/%{name}/stap-authorize-cert |
38105915 | 527 | %if %{with_crash} |
75ab1a70 | 528 | %dir %{_libdir}/%{name} |
38105915 WC |
529 | %{_libdir}/%{name}/staplog.so* |
530 | %endif | |
4e47b3c4 | 531 | %{_mandir}/man7/stappaths.7* |
0bda9740 | 532 | %{_mandir}/man8/staprun.8* |
b569591a | 533 | %doc README README.security AUTHORS NEWS COPYING |
7d838f63 | 534 | |
8f3c45cc | 535 | |
016a35ea | 536 | %files client -f %{name}.lang |
d9d14e20 | 537 | %defattr(-,root,root) |
016a35ea FCE |
538 | %doc README README.unprivileged AUTHORS NEWS COPYING examples |
539 | %if %{with_docs} | |
540 | %doc docs.installed/*.pdf | |
541 | %doc docs.installed/tapsets/*.html | |
542 | %if %{with_publican} | |
543 | %doc docs.installed/SystemTap_Beginners_Guide | |
544 | %endif | |
545 | %endif | |
546 | %{_bindir}/stap | |
547 | %{_bindir}/stap-prep | |
548 | %{_bindir}/stap-report | |
549 | %{_mandir}/man1/stap.1* | |
550 | %{_mandir}/man1/stap-merge.1* | |
551 | %{_mandir}/man3/* | |
4e47b3c4 | 552 | %{_mandir}/man7/stappaths.7* |
016a35ea FCE |
553 | %dir %{_datadir}/%{name} |
554 | %{_datadir}/%{name}/tapset | |
555 | ||
8f3c45cc | 556 | |
b899aa79 | 557 | |
9a8d8be3 MH |
558 | %files initscript |
559 | %defattr(-,root,root) | |
e2a741be | 560 | %{_sysconfdir}/rc.d/init.d/systemtap |
9a8d8be3 MH |
561 | %dir %{_sysconfdir}/systemtap |
562 | %dir %{_sysconfdir}/systemtap/conf.d | |
563 | %dir %{_sysconfdir}/systemtap/script.d | |
564 | %config(noreplace) %{_sysconfdir}/systemtap/config | |
565 | %dir %{_localstatedir}/cache/systemtap | |
d1bf48fa | 566 | %ghost %{_localstatedir}/run/systemtap |
e2a741be | 567 | %doc initscript/README.systemtap |
9a8d8be3 | 568 | |
016a35ea FCE |
569 | |
570 | %files sdt-devel -f %{name}.lang | |
571 | %defattr(-,root,root) | |
572 | %{_bindir}/dtrace | |
573 | %{_includedir}/sys/sdt.h | |
574 | %{_includedir}/sys/sdt-config.h | |
575 | %{_mandir}/man1/dtrace.1* | |
576 | %doc README AUTHORS NEWS COPYING | |
577 | ||
578 | ||
579 | %files testsuite | |
580 | %defattr(-,root,root) | |
581 | %dir %{_datadir}/%{name} | |
582 | %{_datadir}/%{name}/testsuite | |
583 | ||
584 | ||
016a35ea | 585 | # ------------------------------------------------------------------------ |
9a8d8be3 | 586 | |
7d838f63 | 587 | %changelog |
07547775 PR |
588 | * Fri Jul 13 2012 Peter Robinson <pbrobinson@fedoraproject.org> |
589 | - Fix ifarch statement | |
590 | ||
48fa6b5e FCE |
591 | * Sun Jun 17 2012 Frank Ch. Eigler <fche@redhat.com> - 1.8-1 |
592 | - Upstream release. | |
593 | ||
83bd2699 FCE |
594 | * Wed Feb 01 2012 Frank Ch. Eigler <fche@redhat.com> - 1.7-1 |
595 | - Upstream release. | |
596 | ||
87600139 DS |
597 | * Fri Jan 13 2012 David Smith <dsmith@redhat.com> - 1.6-2 |
598 | - Fixed /bin/mktemp require. | |
599 | ||
aff1eaa0 FCE |
600 | * Mon Jul 25 2011 Stan Cox <scox@redhat.com> - 1.6-1 |
601 | - Upstream release. | |
602 | ||
603 | * Tue May 23 2011 Stan Cox <scox@redhat.com> - 1.5-1 | |
604 | - Upstream release. | |
605 | ||
6e0c15da FCE |
606 | * Mon Jan 17 2011 Frank Ch. Eigler <fche@redhat.com> - 1.4-1 |
607 | - Upstream release. | |
608 | ||
e12e958f JS |
609 | * Wed Jul 21 2010 Josh Stone <jistone@redhat.com> - 1.3-1 |
610 | - Upstream release. | |
611 | ||
e36ba31a FCE |
612 | * Mon Mar 22 2010 Frank Ch. Eigler <fche@redhat.com> - 1.2-1 |
613 | - Upstream release. | |
614 | ||
0710d850 DS |
615 | * Mon Dec 21 2009 David Smith <dsmith@redhat.com> - 1.1-1 |
616 | - Upstream release. | |
617 | ||
6a7aa1a1 JS |
618 | * Tue Sep 22 2009 Josh Stone <jistone@redhat.com> - 1.0-1 |
619 | - Upstream release. | |
620 | ||
1e9b189f JS |
621 | * Tue Aug 4 2009 Josh Stone <jistone@redhat.com> - 0.9.9-1 |
622 | - Upstream release. | |
623 | ||
e1774a7f JS |
624 | * Thu Jun 11 2009 Josh Stone <jistone@redhat.com> - 0.9.8-1 |
625 | - Upstream release. | |
626 | ||
9b055ab2 | 627 | * Thu Apr 23 2009 Josh Stone <jistone@redhat.com> - 0.9.7-1 |
225d8d4b JS |
628 | - Upstream release. |
629 | ||
27aba29a JS |
630 | * Fri Mar 27 2009 Josh Stone <jistone@redhat.com> - 0.9.5-1 |
631 | - Upstream release. | |
632 | ||
fab6ce30 WC |
633 | * Wed Mar 18 2009 Will Cohen <wcohen@redhat.com> - 0.9-2 |
634 | - Add location of man pages. | |
635 | ||
c8bf931d FCE |
636 | * Tue Feb 17 2009 Frank Ch. Eigler <fche@redhat.com> - 0.9-1 |
637 | - Upstream release. | |
638 | ||
70f5a7b3 FCE |
639 | * Thu Nov 13 2008 Frank Ch. Eigler <fche@redhat.com> - 0.8-1 |
640 | - Upstream release. | |
641 | ||
cfaa068c FCE |
642 | * Tue Jul 15 2008 Frank Ch. Eigler <fche@redhat.com> - 0.7-1 |
643 | - Upstream release. | |
644 | ||
d2995e6f FCE |
645 | * Fri Feb 1 2008 Frank Ch. Eigler <fche@redhat.com> - 0.6.1-3 |
646 | - Add zlib-devel to buildreq; missing from crash-devel | |
647 | - Process testsuite .stp files for #!stap->#!/usr/bin/stap | |
648 | ||
bfe2b4ab | 649 | * Fri Jan 18 2008 Frank Ch. Eigler <fche@redhat.com> - 0.6.1-1 |
1e0716d3 FCE |
650 | - Add crash-devel buildreq to build staplog.so crash(8) module. |
651 | - Many robustness & functionality improvements: | |
652 | ||
47b0655b WC |
653 | * Wed Dec 5 2007 Will Cohen <wcohen@redhat.com> - 0.6-2 |
654 | - Correct Source to point to location contain code. | |
655 | ||
98aab489 DS |
656 | * Thu Aug 9 2007 David Smith <dsmith@redhat.com> - 0.6-1 |
657 | - Bumped version, added libcap-devel BuildRequires. | |
658 | ||
d8c3d602 WC |
659 | * Wed Jul 11 2007 Will Cohen <wcohen@redhat.com> - 0.5.14-2 |
660 | - Fix Requires and BuildRequires for sqlite. | |
661 | ||
c1edaa30 FCE |
662 | * Tue Jul 2 2007 Frank Ch. Eigler <fche@redhat.com> - 0.5.14-1 |
663 | - Many robustness improvements: 1117, 1134, 1305, 1307, 1570, 1806, | |
664 | 2033, 2116, 2224, 2339, 2341, 2406, 2426, 2438, 2583, 3037, | |
665 | 3261, 3282, 3331, 3428 3519, 3545, 3625, 3648, 3880, 3888, 3911, | |
666 | 3952, 3965, 4066, 4071, 4075, 4078, 4081, 4096, 4119, 4122, 4127, | |
667 | 4146, 4171, 4179, 4183, 4221, 4224, 4254, 4281, 4319, 4323, 4326, | |
668 | 4329, 4332, 4337, 4415, 4432, 4444, 4445, 4458, 4467, 4470, 4471, | |
669 | 4518, 4567, 4570, 4579, 4589, 4609, 4664 | |
670 | ||
aa384dcd FCE |
671 | * Mon Mar 26 2007 Frank Ch. Eigler <fche@redhat.com> - 0.5.13-1 |
672 | - An emergency / preliminary refresh, mainly for compatibility | |
673 | with 2.6.21-pre kernels. | |
2a4b42eb | 674 | |
31982bd2 FCE |
675 | * Mon Jan 1 2007 Frank Ch. Eigler <fche@redhat.com> - 0.5.12-1 |
676 | - Many changes, see NEWS file. | |
677 | ||
a63a95dc DS |
678 | * Tue Sep 26 2006 David Smith <dsmith@redhat.com> - 0.5.10-1 |
679 | - Added 'systemtap-runtime' subpackage. | |
680 | ||
d65d6b27 RM |
681 | * Wed Jul 19 2006 Roland McGrath <roland@redhat.com> - 0.5.9-1 |
682 | - PRs 2669, 2913 | |
683 | ||
c1d6a343 RM |
684 | * Fri Jun 16 2006 Roland McGrath <roland@redhat.com> - 0.5.8-1 |
685 | - PRs 2627, 2520, 2228, 2645 | |
686 | ||
f6291560 | 687 | * Fri May 5 2006 Frank Ch. Eigler <fche@redhat.com> - 0.5.7-1 |
6f231a27 FCE |
688 | - PRs 2511 2453 2307 1813 1944 2497 2538 2476 2568 1341 2058 2220 2437 |
689 | 1326 2014 2599 2427 2438 2465 1930 2149 2610 2293 2634 2506 2433 | |
690 | ||
611010bf RM |
691 | * Tue Apr 4 2006 Roland McGrath <roland@redhat.com> - 0.5.5-1 |
692 | - Many changes, affected PRs include: 2068, 2293, 1989, 2334, | |
693 | 1304, 2390, 2425, 953. | |
694 | ||
be9923ac FCE |
695 | * Wed Feb 1 2006 Frank Ch. Eigler <fche@redhat.com> - 0.5.4-1 |
696 | - PRs 1916, 2205, 2142, 2060, 1379 | |
697 | ||
db6a8a10 RM |
698 | * Mon Jan 16 2006 Roland McGrath <roland@redhat.com> - 0.5.3-1 |
699 | - Many changes, affected PRs include: 2056, 1144, 1379, 2057, | |
700 | 2060, 1972, 2140, 2148 | |
701 | ||
dcf0c541 RM |
702 | * Mon Dec 19 2005 Roland McGrath <roland@redhat.com> - 0.5.2-1 |
703 | - Fixed build with gcc 4.1, various tapset changes. | |
704 | ||
4d9087fc RM |
705 | * Wed Dec 7 2005 Roland McGrath <roland@redhat.com> - 0.5.1-1 |
706 | - elfutils update, build changes | |
707 | ||
e94c050c | 708 | * Fri Dec 02 2005 Frank Ch. Eigler <fche@redhat.com> - 0.5-1 |
7d9e8974 FCE |
709 | - Many fixes and improvements: 1425, 1536, 1505, 1380, 1329, 1828, 1271, |
710 | 1339, 1340, 1345, 1837, 1917, 1903, 1336, 1868, 1594, 1564, 1276, 1295 | |
711 | ||
ae65ed5c RM |
712 | * Mon Oct 31 2005 Roland McGrath <roland@redhat.com> - 0.4.2-1 |
713 | - Many fixes and improvements: PRs 1344, 1260, 1330, 1295, 1311, 1368, | |
714 | 1182, 1131, 1332, 1366, 1456, 1271, 1338, 1482, 1477, 1194. | |
715 | ||
66bb48fd RM |
716 | * Wed Sep 14 2005 Roland McGrath <roland@redhat.com> - 0.4.1-1 |
717 | - Many fixes and improvements since 0.2.2; relevant PRs include: | |
718 | 1122, 1134, 1155, 1172, 1174, 1175, 1180, 1186, 1187, 1191, 1193, 1195, | |
719 | 1197, 1205, 1206, 1209, 1213, 1244, 1257, 1258, 1260, 1265, 1268, 1270, | |
720 | 1289, 1292, 1306, 1335, 1257 | |
721 | ||
323904e0 FCE |
722 | * Wed Sep 7 2005 Frank Ch. Eigler <fche@redhat.com> |
723 | - Bump version. | |
724 | ||
03f23d0f | 725 | * Wed Aug 16 2005 Frank Ch. Eigler <fche@redhat.com> |
83ff1cf9 FCE |
726 | - Bump version. |
727 | ||
2205d115 MH |
728 | * Wed Aug 3 2005 Martin Hunt <hunt@redhat.com> - 0.2.2-1 |
729 | - Add directory /var/cache/systemtap | |
730 | - Add stp_check to /usr/libexec/systemtap | |
731 | ||
351e76d3 RM |
732 | * Wed Aug 3 2005 Roland McGrath <roland@redhat.com> - 0.2.1-1 |
733 | - New version 0.2.1, various fixes. | |
734 | ||
4dbd685d RM |
735 | * Fri Jul 29 2005 Roland McGrath <roland@redhat.com> - 0.2-1 |
736 | - New version 0.2, requires elfutils 0.111 | |
737 | ||
a2c9eba7 RM |
738 | * Mon Jul 25 2005 Roland McGrath <roland@redhat.com> |
739 | - Clean up spec file, build bundled elfutils. | |
740 | ||
7d838f63 MH |
741 | * Thu Jul 21 2005 Martin Hunt <hunt@redhat.com> |
742 | - Set Version to use version from autoconf. | |
743 | - Fix up some of the path names. | |
a2c9eba7 RM |
744 | - Add Requires and BuildRequires. |
745 | ||
746 | * Wed Jul 19 2005 Will Cohen <wcohen@redhat.com> | |
7d838f63 | 747 | - Initial creation of RPM. |