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