]> sourceware.org Git - systemtap.git/blame - systemtap.spec
sysroot: fix short release -r option handling follow up
[systemtap.git] / systemtap.spec
CommitLineData
0f887b7f 1%{!?with_sqlite: %global with_sqlite 0%{?fedora} >= 17 || 0%{?rhel} >= 7}
11059140 2%{!?with_docs: %global with_docs 1}
6706593f 3%{!?with_htmldocs: %global with_htmldocs 0}
f7420048 4%{!?with_monitor: %global with_monitor 1}
8d238932 5# crash is not available
29f15b2e 6%ifarch ppc ppc64 %{sparc} aarch64 ppc64le %{mips}
8d238932
LB
7%{!?with_crash: %global with_crash 0}
8%else
38105915 9%{!?with_crash: %global with_crash 1}
8d238932 10%endif
11059140
RM
11%{!?with_rpm: %global with_rpm 1}
12%{!?with_bundled_elfutils: %global with_bundled_elfutils 0}
e050d62f 13%{!?elfutils_version: %global elfutils_version 0.142}
11059140 14%{!?pie_supported: %global pie_supported 1}
11059140 15%{!?with_boost: %global with_boost 0}
ebf1032e 16%ifarch %{ix86} x86_64 ppc ppc64
a40f6057 17%{!?with_dyninst: %global with_dyninst 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
605083f9
WC
18%else
19%{!?with_dyninst: %global with_dyninst 0}
20%endif
748e425b 21%{!?with_bpf: %global with_bpf 0%{?fedora} >= 22 || 0%{?rhel} >= 8}
515f4553 22%{!?with_systemd: %global with_systemd 0%{?fedora} >= 19 || 0%{?rhel} >= 7}
7f6c7a0b
FCE
23%{!?with_emacsvim: %global with_emacsvim 0%{?fedora} >= 19 || 0%{?rhel} >= 7}
24%{!?with_java: %global with_java 0%{?fedora} >= 19 || 0%{?rhel} >= 7}
765a5d60
JL
25%{!?with_virthost: %global with_virthost 0%{?fedora} >= 19 || 0%{?rhel} >= 7}
26%{!?with_virtguest: %global with_virtguest 1}
b8d6168f 27%{!?with_dracut: %global with_dracut 0%{?fedora} >= 19 || 0%{?rhel} >= 6}
25c72c50
DS
28%ifarch x86_64
29%{!?with_mokutil: %global with_mokutil 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
9a9a6ff8 30%{!?with_openssl: %global with_openssl 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
25c72c50
DS
31%else
32%{!?with_mokutil: %global with_mokutil 0}
9a9a6ff8 33%{!?with_openssl: %global with_openssl 0}
25c72c50 34%endif
d0eeef5f 35%{!?with_pyparsing: %global with_pyparsing 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
d6145cec 36%{!?with_python3: %global with_python3 0%{?fedora} >= 23 || 0%{?rhel} > 7}
30354895
DS
37%{!?with_python2_probes: %global with_python2_probes 1}
38%{!?with_python3_probes: %global with_python3_probes 0%{?fedora} >= 23}
696a4ac1 39%{!?with_httpd: %global with_httpd 0}
1074f79d 40
b61a4d61 41%ifarch ppc64le aarch64
662747f9
BB
42%global with_virthost 0
43%endif
44
4a618408
JL
45%if 0%{?fedora} >= 18 || 0%{?rhel} >= 6
46 %define initdir %{_initddir}
47%else # RHEL5 doesn't know _initddir
48 %define initdir %{_initrddir}
49%endif
50
765a5d60 51%if %{with_virtguest}
ce532fda
JL
52 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
53 %define udevrulesdir /usr/lib/udev/rules.d
765a5d60 54 %else
ce532fda
JL
55 %if 0%{?rhel} >= 6
56 %define udevrulesdir /lib/udev/rules.d
57 %else # RHEL5
58 %define udevrulesdir /etc/udev/rules.d
59 %endif
765a5d60
JL
60 %endif
61%endif
62
b8d6168f
MC
63%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
64 %define dracutstap %{_prefix}/lib/dracut/modules.d/99stap
65%else
66 %define dracutstap %{_prefix}/share/dracut/modules.d/99stap
67%endif
68
69%if 0%{?rhel} >= 6
70 %define dracutbindir /sbin
71%else
72 %define dracutbindir %{_bindir}
73%endif
6a06bc73 74
e4f9f015
SC
75# To avoid testsuite/*/*.stp has shebang which doesn't start with '/'
76%undefine __brp_mangle_shebangs
77
a2c9eba7 78Name: systemtap
a3e0237a 79Version: 3.3
8f0fcd99 80Release: 1%{?dist}
59b30bda 81# for version, see also configure.ac
016a35ea
FCE
82
83
84# Packaging abstract:
85#
86# systemtap empty req:-client req:-devel
87# systemtap-server /usr/bin/stap-server*, req:-devel
88# systemtap-devel /usr/bin/stap, runtime, tapset, req:kernel-devel
4b682f2a 89# systemtap-runtime /usr/bin/staprun, /usr/bin/stapsh, /usr/bin/stapdyn
016a35ea 90# systemtap-client /usr/bin/stap, samples, docs, tapset(bonus), req:-runtime
6a06bc73 91# systemtap-initscript /etc/init.d/systemtap, dracut module, req:systemtap
016a35ea
FCE
92# systemtap-sdt-devel /usr/include/sys/sdt.h /usr/bin/dtrace
93# systemtap-testsuite /usr/share/systemtap/testsuite*, req:systemtap, req:sdt-devel
36cfba7c 94# systemtap-runtime-java libHelperSDT.so, HelperSDT.jar, stapbm, req:-runtime
765a5d60
JL
95# systemtap-runtime-virthost /usr/bin/stapvirt, req:libvirt req:libxml2
96# systemtap-runtime-virtguest udev rules, init scripts/systemd service, req:-runtime
30354895
DS
97# systemtap-runtime-python2 HelperSDT python2 module, req:-runtime
98# systemtap-runtime-python3 HelperSDT python3 module, req:-runtime
016a35ea
FCE
99#
100# Typical scenarios:
101#
102# stap-client: systemtap-client
103# stap-server: systemtap-server
104# local user: systemtap
105#
106# Unusual scenarios:
1553f7e3 107#
016a35ea
FCE
108# intermediary stap-client for --remote: systemtap-client (-runtime unused)
109# intermediary stap-server for --use-server: systemtap-server (-devel unused)
110
111Summary: Programmable system-wide instrumentation system
7d838f63 112Group: Development/System
6a1cd8a7 113License: GPLv2+
a2c9eba7 114URL: http://sourceware.org/systemtap/
60e99141 115Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz
a2c9eba7 116
016a35ea 117# Build*
4c895683 118BuildRequires: gcc-c++
48fa6b5e 119BuildRequires: gettext-devel
756c7cf2
FCE
120BuildRequires: pkgconfig(nss)
121BuildRequires: pkgconfig(avahi-client)
5ecd6999 122%if %{with_dyninst}
0f3edcb9 123BuildRequires: dyninst-devel >= 8.0
756c7cf2 124BuildRequires: pkgconfig(libselinux)
5ecd6999 125%endif
a87d23e3 126%if %{with_sqlite}
572f73b5 127BuildRequires: sqlite-devel > 3.7
d8c3d602 128%endif
f7420048 129%if %{with_monitor}
756c7cf2
FCE
130BuildRequires: pkgconfig(json-c)
131BuildRequires: pkgconfig(ncurses)
f7420048 132%endif
10a7ba12
IZ
133%if %{with_systemd}
134BuildRequires: systemd
135%endif
469c1a1b
FCE
136# Needed for libstd++ < 4.0, without <tr1/memory>
137%if %{with_boost}
138BuildRequires: boost-devel
139%endif
a87d23e3 140%if %{with_crash}
d2995e6f 141BuildRequires: crash-devel zlib-devel
1e0716d3 142%endif
2ed04863 143%if %{with_rpm}
71302939 144BuildRequires: rpm-devel
2ed04863 145%endif
a87d23e3 146%if %{with_bundled_elfutils}
7d838f63
MH
147Source1: elfutils-%{elfutils_version}.tar.gz
148Patch1: elfutils-portability.patch
d79591b3 149BuildRequires: m4
11059140 150%global setup_elfutils -a1
a2c9eba7
RM
151%else
152BuildRequires: elfutils-devel >= %{elfutils_version}
7d838f63 153%endif
465e8fbf 154%if %{with_docs}
7012fdd5 155BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf
eb8eb9bc 156%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
2ed848e0 157BuildRequires: tex(fullpage.sty) tex(fancybox.sty) tex(bchr7t.tfm) tex(graphicx.sty)
eb8eb9bc 158%endif
7b19719f
FCE
159# For the html.sty mentioned in the .tex files, even though latex2html is
160# not run during the build, only during manual scripts/update-docs runs:
161BuildRequires: latex2html
6706593f 162%if %{with_htmldocs}
6275c8d7
DS
163# On F10, xmlto's pdf support was broken off into a sub-package,
164# called 'xmlto-tex'. To avoid a specific F10 BuildReq, we'll do a
165# file-based buildreq on '/usr/share/xmlto/format/fo/pdf'.
166BuildRequires: xmlto /usr/share/xmlto/format/fo/pdf
465e8fbf 167%endif
6706593f 168%endif
65635f34
FCE
169%if %{with_emacsvim}
170BuildRequires: emacs
171%endif
fd05c448 172%if %{with_java}
36cfba7c 173BuildRequires: jpackage-utils java-devel
fd05c448 174%endif
765a5d60 175%if %{with_virthost}
756c7cf2
FCE
176# BuildRequires: libvirt-devel >= 1.0.2
177BuildRequires: pkgconfig(libvirt)
178BuildRequires: pkgconfig(libxml-2.0)
765a5d60 179%endif
16314eed
DS
180BuildRequires: readline-devel
181%if 0%{?rhel} <= 5
756c7cf2 182BuildRequires: pkgconfig(ncurses)
16314eed 183%endif
30354895 184%if %{with_python2_probes}
f312f87e
IS
185BuildRequires: python2-devel
186BuildRequires: python2-setuptools
30354895
DS
187%endif
188%if %{with_python3_probes}
189BuildRequires: python3-devel
c11fe12e 190BuildRequires: python3-setuptools
30354895 191%endif
14df5fde 192
696a4ac1
DS
193%if %{with_httpd}
194BuildRequires: libmicrohttpd-devel
195BuildRequires: libuuid-devel
196%endif
197
016a35ea
FCE
198# Install requirements
199Requires: systemtap-client = %{version}-%{release}
200Requires: systemtap-devel = %{version}-%{release}
201
7d838f63 202%description
f89ff3e2 203SystemTap is an instrumentation system for systems running Linux.
016a35ea
FCE
204Developers can write instrumentation scripts to collect data on
205the operation of the system. The base systemtap package contains/requires
206the components needed to locally develop and execute systemtap scripts.
207
208# ------------------------------------------------------------------------
209
210%package server
211Summary: Instrumentation System Server
212Group: Development/System
213License: GPLv2+
214URL: http://sourceware.org/systemtap/
215Requires: systemtap-devel = %{version}-%{release}
4d589cc1 216Requires: nss coreutils
016a35ea
FCE
217Requires: zip unzip
218Requires(pre): shadow-utils
219Requires(post): chkconfig
220Requires(preun): chkconfig
221Requires(preun): initscripts
222Requires(postun): initscripts
223BuildRequires: nss-devel avahi-devel
9a9a6ff8
DS
224%if %{with_openssl}
225Requires: openssl
226%endif
10a7ba12
IZ
227%if %{with_systemd}
228Requires: systemd
229%endif
016a35ea
FCE
230
231%description server
232This is the remote script compilation server component of systemtap.
233It announces itself to nearby clients with avahi (if available), and
234compiles systemtap scripts to kernel objects on their demand.
235
236
237%package devel
238Summary: Programmable system-wide instrumentation system - development headers, tools
239Group: Development/System
240License: GPLv2+
241URL: http://sourceware.org/systemtap/
19eace0c
DS
242# The virtual provide 'kernel-devel-uname-r' tries to get the right
243# kernel variant (kernel-PAE, kernel-debug, etc.) devel package
244# installed.
245Requires: kernel-devel-uname-r
246%{?fedora:Suggests: kernel-devel}
4c895683 247Requires: gcc make
016a35ea
FCE
248# Suggest: kernel-debuginfo
249
250%description devel
251This package contains the components needed to compile a systemtap
252script from source form into executable (.ko) forms. It may be
253installed on a self-contained developer workstation (along with the
254systemtap-client and systemtap-runtime packages), or on a dedicated
255remote server (alongside the systemtap-server package). It includes
256a copy of the standard tapset library and the runtime library C files.
257
7d838f63 258
a63a95dc 259%package runtime
016a35ea 260Summary: Programmable system-wide instrumentation system - runtime
a63a95dc 261Group: Development/System
6a1cd8a7 262License: GPLv2+
a63a95dc 263URL: http://sourceware.org/systemtap/
378a5245 264Requires(pre): shadow-utils
a63a95dc
DS
265
266%description runtime
016a35ea
FCE
267SystemTap runtime contains the components needed to execute
268a systemtap script that was already compiled into a module
269using a local or remote systemtap-devel installation.
a63a95dc 270
016a35ea
FCE
271
272%package client
273Summary: Programmable system-wide instrumentation system - client
8f3c45cc
FCE
274Group: Development/System
275License: GPLv2+
276URL: http://sourceware.org/systemtap/
016a35ea
FCE
277Requires: zip unzip
278Requires: systemtap-runtime = %{version}-%{release}
279Requires: coreutils grep sed unzip zip
280Requires: openssh-clients
25c72c50
DS
281%if %{with_mokutil}
282Requires: mokutil
283%endif
8f3c45cc 284
016a35ea 285%description client
1553f7e3
LB
286This package contains/requires the components needed to develop
287systemtap scripts, and compile them using a local systemtap-devel
016a35ea
FCE
288or a remote systemtap-server installation, then run them using a
289local or remote systemtap-runtime. It includes script samples and
290documentation, and a copy of the tapset library for reference.
8f3c45cc 291
016a35ea
FCE
292
293%package initscript
294Summary: Systemtap Initscripts
d9d14e20
DB
295Group: Development/System
296License: GPLv2+
297URL: http://sourceware.org/systemtap/
ad12652e 298Requires: systemtap = %{version}-%{release}
e2a741be
DB
299Requires(post): chkconfig
300Requires(preun): chkconfig
301Requires(preun): initscripts
302Requires(postun): initscripts
d9d14e20 303
016a35ea 304%description initscript
6a06bc73
JL
305This package includes a SysVinit script to launch selected systemtap
306scripts at system startup, along with a dracut module for early
307boot-time probing if supported.
016a35ea 308
d9d14e20 309
b899aa79
SC
310%package sdt-devel
311Summary: Static probe support tools
312Group: Development/System
920b103a 313License: GPLv2+ and Public Domain
b899aa79 314URL: http://sourceware.org/systemtap/
d0eeef5f 315%if %{with_pyparsing}
0a742545
FCE
316%if %{with_python3}
317Requires: python3-pyparsing
318%else
089afb20
MC
319%if 0%{?rhel} >= 7
320Requires: pyparsing
321%else
f312f87e 322Requires: python2-pyparsing
d0eeef5f 323%endif
0a742545 324%endif
089afb20 325%endif
b899aa79
SC
326
327%description sdt-devel
016a35ea
FCE
328This package includes the <sys/sdt.h> header file used for static
329instrumentation compiled into userspace programs and libraries, along
330with the optional dtrace-compatibility preprocessor to process related
331.d files into tracing-macro-laden .h headers.
b899aa79 332
016a35ea
FCE
333
334%package testsuite
335Summary: Instrumentation System Testsuite
9a8d8be3
MH
336Group: Development/System
337License: GPLv2+
338URL: http://sourceware.org/systemtap/
016a35ea
FCE
339Requires: systemtap = %{version}-%{release}
340Requires: systemtap-sdt-devel = %{version}-%{release}
d6d8634e 341Requires: systemtap-server = %{version}-%{release}
cf638735 342Requires: dejagnu which elfutils grep nc
4c895683 343Requires: gcc gcc-c++ make glibc-devel
c157d058
DS
344# testsuite/systemtap.base/ptrace.exp needs strace
345Requires: strace
9564c81a
DS
346# testsuite/systemtap.base/ipaddr.exp needs nc. Unfortunately, the rpm
347# that provides nc has changed over time (from 'nc' to
348# 'nmap-ncat'). So, we'll do a file-based require.
349Requires: /usr/bin/nc
70afe224 350%ifnarch ia64 ppc64le aarch64
9d0b65fe
FCE
351%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
352# no prelink
353%else
cf638735
SC
354Requires: prelink
355%endif
9d0b65fe 356%endif
d6d8634e
DS
357# testsuite/systemtap.server/client.exp needs avahi
358Requires: avahi
359%if %{with_crash}
360# testsuite/systemtap.base/crash.exp needs crash
361Requires: crash
362%endif
eaa3bf2e
FCE
363%if %{with_java}
364Requires: systemtap-runtime-java = %{version}-%{release}
365%endif
30354895
DS
366%if %{with_python2_probes}
367Requires: systemtap-runtime-python2 = %{version}-%{release}
368%endif
369%if %{with_python3_probes}
370Requires: systemtap-runtime-python3 = %{version}-%{release}
371%endif
07547775 372%ifarch x86_64
e2d574cc 373Requires: /usr/lib/libc.so
b9770214
FCE
374# ... and /usr/lib/libgcc_s.so.*
375# ... and /usr/lib/libstdc++.so.*
4c895683 376%endif
574cf27a
SC
377%if 0%{?fedora} >= 18
378Requires: stress
379%endif
6965b69a
DS
380# The following "meta" files for the systemtap examples run "perf":
381# testsuite/systemtap.examples/hw_watch_addr.meta
382# testsuite/systemtap.examples/memory/hw_watch_sym.meta
383Requires: perf
016a35ea
FCE
384
385%description testsuite
386This package includes the dejagnu-based systemtap stress self-testing
387suite. This may be used by system administrators to thoroughly check
388systemtap on the current system.
9a8d8be3 389
9a8d8be3 390
36cfba7c
SM
391%if %{with_java}
392%package runtime-java
393Summary: Systemtap Java Runtime Support
394Group: Development/System
395License: GPLv2+
396URL: http://sourceware.org/systemtap/
397Requires: systemtap-runtime = %{version}-%{release}
d885563b 398Requires: byteman > 2.0
9c8b7589 399Requires: net-tools
36cfba7c
SM
400
401%description runtime-java
402This package includes support files needed to run systemtap scripts
403that probe Java processes running on the OpenJDK 1.6 and OpenJDK 1.7
404runtimes using Byteman.
405%endif
406
30354895
DS
407%if %{with_python2_probes}
408%package runtime-python2
409Summary: Systemtap Python 2 Runtime Support
410Group: Development/System
411License: GPLv2+
412URL: http://sourceware.org/systemtap/
413Requires: systemtap-runtime = %{version}-%{release}
414
415%description runtime-python2
416This package includes support files needed to run systemtap scripts
417that probe python 2 processes.
418%endif
419
420%if %{with_python3_probes}
421%package runtime-python3
422Summary: Systemtap Python 3 Runtime Support
423Group: Development/System
424License: GPLv2+
425URL: http://sourceware.org/systemtap/
426Requires: systemtap-runtime = %{version}-%{release}
427
428%description runtime-python3
429This package includes support files needed to run systemtap scripts
430that probe python 3 processes.
431%endif
432
765a5d60
JL
433%if %{with_virthost}
434%package runtime-virthost
435Summary: Systemtap Cross-VM Instrumentation - host
436Group: Development/System
437License: GPLv2+
438URL: http://sourceware.org/systemtap/
439Requires: libvirt >= 1.0.2
440Requires: libxml2
441
442%description runtime-virthost
443This package includes the components required to run systemtap scripts
444inside a libvirt-managed domain from the host without using a network
445connection.
446%endif
447
448%if %{with_virtguest}
449%package runtime-virtguest
450Summary: Systemtap Cross-VM Instrumentation - guest
451Group: Development/System
452License: GPLv2+
453URL: http://sourceware.org/systemtap/
454Requires: systemtap-runtime = %{version}-%{release}
455%if %{with_systemd}
456Requires(post): findutils coreutils
457Requires(preun): grep coreutils
458Requires(postun): grep coreutils
459%else
460Requires(post): chkconfig initscripts
461Requires(preun): chkconfig initscripts
462Requires(postun): initscripts
463%endif
464
465%description runtime-virtguest
466This package installs the services necessary on a virtual machine for a
467systemtap-runtime-virthost machine to execute systemtap scripts.
468%endif
36cfba7c 469
016a35ea
FCE
470# ------------------------------------------------------------------------
471
7d838f63 472%prep
a2c9eba7
RM
473%setup -q %{?setup_elfutils}
474
a87d23e3 475%if %{with_bundled_elfutils}
7d838f63
MH
476cd elfutils-%{elfutils_version}
477%patch1 -p1
a2c9eba7
RM
478sleep 1
479find . \( -name Makefile.in -o -name aclocal.m4 \) -print | xargs touch
480sleep 1
481find . \( -name configure -o -name config.h.in \) -print | xargs touch
7d838f63
MH
482cd ..
483%endif
484
485%build
a2c9eba7 486
a87d23e3 487%if %{with_bundled_elfutils}
7d838f63 488# Build our own copy of elfutils.
11059140 489%global elfutils_config --with-elfutils=elfutils-%{elfutils_version}
a2c9eba7
RM
490
491# We have to prevent the standard dependency generation from identifying
492# our private elfutils libraries in our provides and requires.
11059140
RM
493%global _use_internal_dependency_generator 0
494%global filter_eulibs() /bin/sh -c "%{1} | sed '/libelf/d;/libdw/d;/libebl/d'"
495%global __find_provides %{filter_eulibs /usr/lib/rpm/find-provides}
496%global __find_requires %{filter_eulibs /usr/lib/rpm/find-requires}
4dbd685d
RM
497
498# This will be needed for running stap when not installed, for the test suite.
11059140 499%global elfutils_mflags LD_LIBRARY_PATH=`pwd`/lib-elfutils
7d838f63
MH
500%endif
501
5ecd6999
JS
502# Enable/disable the dyninst pure-userspace backend
503%if %{with_dyninst}
504%global dyninst_config --with-dyninst
505%else
506%global dyninst_config --without-dyninst
507%endif
508
9921a199 509# Enable/disable the sqlite coverage testing support
a87d23e3 510%if %{with_sqlite}
11059140 511%global sqlite_config --enable-sqlite
9921a199 512%else
11059140 513%global sqlite_config --disable-sqlite
d8c3d602
WC
514%endif
515
a87d23e3
DS
516# Enable/disable the crash extension
517%if %{with_crash}
11059140 518%global crash_config --enable-crash
a87d23e3 519%else
11059140 520%global crash_config --disable-crash
a87d23e3
DS
521%endif
522
2ed04863
WC
523# Enable/disable the code to find and suggest needed rpms
524%if %{with_rpm}
11059140 525%global rpm_config --with-rpm
2ed04863 526%else
11059140 527%global rpm_config --without-rpm
2ed04863
WC
528%endif
529
465e8fbf 530%if %{with_docs}
6706593f
FL
531%if %{with_htmldocs}
532%global docs_config --enable-docs --enable-htmldocs
533%else
534%global docs_config --enable-docs --disable-htmldocs
535%endif
465e8fbf 536%else
11059140 537%global docs_config --disable-docs
465e8fbf
FCE
538%endif
539
e1e3ba36
RA
540# Enable pie as configure defaults to disabling it
541%if %{pie_supported}
11059140 542%global pie_config --enable-pie
e1e3ba36 543%else
11059140 544%global pie_config --disable-pie
e1e3ba36 545%endif
465e8fbf 546
53ade4da 547
fd05c448 548%if %{with_java}
26703c63 549%global java_config --with-java=%{_jvmdir}/java
fd05c448 550%else
26703c63 551%global java_config --without-java
fd05c448 552%endif
465e8fbf 553
30354895
DS
554%if %{with_python3}
555%global python3_config --with-python3
556%else
557%global python3_config --without-python3
558%endif
559%if %{with_python2_probes}
560%global python2_probes_config --with-python2-probes
561%else
562%global python2_probes_config --without-python2-probes
563%endif
564%if %{with_python3_probes}
565%global python3_probes_config --with-python3-probes
566%else
567%global python3_probes_config --without-python3-probes
568%endif
569
b0c670f4
FCE
570%if %{with_virthost}
571%global virt_config --enable-virt
572%else
573%global virt_config --disable-virt
574%endif
575
2323b028 576%if %{with_dracut}
b8d6168f 577%global dracut_config --with-dracutstap=%{dracutstap} --with-dracutbindir=%{dracutbindir}
2323b028 578%else
b68f9f67 579%global dracut_config %{nil}
2323b028
FCE
580%endif
581
696a4ac1
DS
582%if %{with_httpd}
583%global httpd_config --enable-httpd
584%else
585%global httpd_config --disable-httpd
586%endif
587
74bf7577
FCE
588# We don't ship compileworthy python code, just oddball samples
589%global py_auto_byte_compile 0
0a742545 590
90f2c8d1 591%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{rpm_config} %{java_config} %{virt_config} %{dracut_config} %{python3_config} %{python2_probes_config} %{python3_probes_config} %{httpd_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}"
a2c9eba7 592make %{?_smp_mflags}
2a4b42eb 593
65635f34
FCE
594%if %{with_emacsvim}
595%{_emacs_bytecompile} emacs/systemtap-mode.el
596%endif
597
ec4d1558
MW
598%install
599rm -rf ${RPM_BUILD_ROOT}
600make DESTDIR=$RPM_BUILD_ROOT install
9564097a 601%find_lang %{name}
d679d193
MC
602for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do
603 dir=$(echo $dir | sed -e "s|^$RPM_BUILD_ROOT||")
604 lang=$(basename $dir)
605 echo "%%lang($lang) $dir/man*/*" >> %{name}.lang
606done
ec4d1558 607
2cd5c938 608ln -s %{_datadir}/systemtap/examples
ec4d1558 609
5c5f2389 610# Fix paths in the example scripts.
2cd5c938 611find $RPM_BUILD_ROOT%{_datadir}/systemtap/examples -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@'
7d838f63 612
414e04de
DS
613# To make rpmlint happy, remove any .gitignore files in the testsuite.
614find testsuite -type f -name '.gitignore' -print0 | xargs -0 rm -f
615
b7565b41 616# Because "make install" may install staprun with whatever mode, the
98aab489
DS
617# post-processing programs rpmbuild runs won't be able to read it.
618# So, we change permissions so that they can read it. We'll set the
b7565b41 619# permissions back to 04110 in the %files section below.
98aab489
DS
620chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun
621
cd4d1d39
WC
622#install the useful stap-prep script
623install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
624
8f3c45cc
FCE
625# Copy over the testsuite
626cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap
627
4040e9ea 628%if %{with_docs}
7fe437e6 629# We want the manuals in the special doc dir, not the generic doc install dir.
c256c4a6
MW
630# We build it in place and then move it away so it doesn't get installed
631# twice. rpm can specify itself where the (versioned) docs go with the
632# %doc directive.
7fe437e6
MW
633mkdir docs.installed
634mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/
6706593f 635%if %{with_htmldocs}
5bfd7a37 636mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/tapsets docs.installed/
53ade4da
MW
637mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/SystemTap_Beginners_Guide docs.installed/
638%endif
6706593f 639%endif
7fe437e6 640
e58423f4
LB
641mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server
642mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server
8689b446 643mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server/.systemtap
e58423f4
LB
644mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server
645touch $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server/log
646mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/systemtap
89abe8f9 647mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap
c1fc8157
LB
648mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
649install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server
4a618408
JL
650mkdir -p $RPM_BUILD_ROOT%{initdir}
651install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{initdir}
4c3b0da5
LB
652mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap
653mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/conf.d
654mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.d
655install -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
7fe42498 656%if %{with_systemd}
c1fc8157
LB
657mkdir -p $RPM_BUILD_ROOT%{_unitdir}
658touch $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
659install -m 644 stap-server.service $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
752358d4
FCE
660mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
661install -m 644 stap-server.conf $RPM_BUILD_ROOT%{_tmpfilesdir}/stap-server.conf
e58423f4 662%else
4a618408 663install -m 755 initscript/stap-server $RPM_BUILD_ROOT%{initdir}
2f78bee0 664mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server/conf.d
c982e923 665mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
e2a741be 666install -m 644 initscript/config.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/stap-server
e58423f4 667%endif
9a8d8be3 668
65635f34
FCE
669%if %{with_emacsvim}
670mkdir -p $RPM_BUILD_ROOT%{_emacs_sitelispdir}
671install -p -m 644 emacs/systemtap-mode.el* $RPM_BUILD_ROOT%{_emacs_sitelispdir}
672mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir}
673install -p -m 644 emacs/systemtap-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}/systemtap-init.el
e42fca4e
FCE
674for subdir in ftdetect ftplugin indent syntax
675do
676 mkdir -p $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/$subdir
677 install -p -m 644 vim/$subdir/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/$subdir
678done
65635f34
FCE
679%endif
680
765a5d60
JL
681%if %{with_virtguest}
682 mkdir -p $RPM_BUILD_ROOT%{udevrulesdir}
683 %if %{with_systemd}
684 install -p -m 644 staprun/guest/99-stapsh.rules $RPM_BUILD_ROOT%{udevrulesdir}
685 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
686 install -p -m 644 staprun/guest/stapsh@.service $RPM_BUILD_ROOT%{_unitdir}
687 %else
688 install -p -m 644 staprun/guest/99-stapsh-init.rules $RPM_BUILD_ROOT%{udevrulesdir}
689 install -p -m 755 staprun/guest/stapshd $RPM_BUILD_ROOT%{initdir}
690 mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/systemtap
691 install -p -m 755 staprun/guest/stapsh-daemon $RPM_BUILD_ROOT%{_libexecdir}/systemtap
692 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules
693 # Technically, this is only needed for RHEL5, in which the MODULE_ALIAS is missing, but
694 # it does no harm in RHEL6 as well
695 install -p -m 755 staprun/guest/virtio_console.modules $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/modules
696 %endif
697%endif
65635f34 698
6a06bc73
JL
699%if %{with_dracut}
700 mkdir -p $RPM_BUILD_ROOT%{dracutstap}
701 install -p -m 755 initscript/99stap/module-setup.sh $RPM_BUILD_ROOT%{dracutstap}
b8d6168f
MC
702 install -p -m 755 initscript/99stap/install $RPM_BUILD_ROOT%{dracutstap}
703 install -p -m 755 initscript/99stap/check $RPM_BUILD_ROOT%{dracutstap}
6a06bc73
JL
704 install -p -m 755 initscript/99stap/start-staprun.sh $RPM_BUILD_ROOT%{dracutstap}
705 touch $RPM_BUILD_ROOT%{dracutstap}/params.conf
706%endif
707
378a5245 708%pre runtime
9d2b21df
FCE
709getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr
710getent group stapsys >/dev/null || groupadd -g 157 -r stapsys 2>/dev/null || groupadd -r stapsys
711getent group stapdev >/dev/null || groupadd -g 158 -r stapdev 2>/dev/null || groupadd -r stapdev
efc4bf9a 712exit 0
98aab489 713
7433d0cf 714%pre server
9d2b21df 715getent group stap-server >/dev/null || groupadd -g 155 -r stap-server 2>/dev/null || groupadd -r stap-server
2648a9b4 716getent passwd stap-server >/dev/null || \
7734bd4f
FCE
717 useradd -c "Systemtap Compile Server" -u 155 -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server 2>/dev/null || \
718 useradd -c "Systemtap Compile Server" -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server
8689b446 719
5c84a24f
DS
720%pre testsuite
721getent passwd stapusr >/dev/null || \
722 useradd -c "Systemtap 'stapusr' User" -g stapusr -r -s /sbin/nologin stapusr
723getent passwd stapsys >/dev/null || \
724 useradd -c "Systemtap 'stapsys' User" -g stapsys -G stapusr -r -s /sbin/nologin stapsys
725getent passwd stapdev >/dev/null || \
726 useradd -c "Systemtap 'stapdev' User" -g stapdev -G stapusr -r -s /sbin/nologin stapdev
727exit 0
728
8689b446
FCE
729%post server
730
4cf2b709
FCE
731# We have some duplication between the %files listings for the
732# ~stap-server directories and the explicit mkdir/chown/chmod bits
733# here. Part of the reason may be that a preexisting stap-server
734# account may well be placed somewhere other than
735# %{_localstatedir}/lib/stap-server, but we'd like their permissions
736# set similarly.
737
738test -e ~stap-server && chmod 750 ~stap-server
878b2f3f
CM
739
740if [ ! -f ~stap-server/.systemtap/rc ]; then
741 mkdir -p ~stap-server/.systemtap
742 chown stap-server:stap-server ~stap-server/.systemtap
86298f09 743 # PR16276: guess at a reasonable number for a default --rlimit-nproc
3c4476ac
FCE
744 numcpu=`/usr/bin/getconf _NPROCESSORS_ONLN`
745 if [ -z "$numcpu" -o "$numcpu" -lt 1 ]; then numcpu=1; fi
746 nproc=`expr $numcpu \* 30`
747 echo "--rlimit-as=614400000 --rlimit-cpu=60 --rlimit-nproc=$nproc --rlimit-stack=1024000 --rlimit-fsize=51200000" > ~stap-server/.systemtap/rc
878b2f3f
CM
748 chown stap-server:stap-server ~stap-server/.systemtap/rc
749fi
7433d0cf 750
962906a7
DS
751test -e %{_localstatedir}/log/stap-server/log || {
752 touch %{_localstatedir}/log/stap-server/log
4cf2b709 753 chmod 644 %{_localstatedir}/log/stap-server/log
962906a7
DS
754 chown stap-server:stap-server %{_localstatedir}/log/stap-server/log
755}
e59944d5 756# Prepare the service
7fe42498 757%if %{with_systemd}
e59944d5
JS
758 # Note, Fedora policy doesn't allow network services enabled by default
759 # /bin/systemctl enable stap-server.service >/dev/null 2>&1 || :
5646d029 760 /bin/systemd-tmpfiles --create %{_tmpfilesdir}/stap-server.conf >/dev/null 2>&1 || :
e58423f4
LB
761%else
762 /sbin/chkconfig --add stap-server
763%endif
09070e8a
DB
764exit 0
765
045e193d
FCE
766%triggerin client -- systemtap-server
767if test -e ~stap-server/.systemtap/ssl/server/stap.cert; then
768 # echo Authorizing ssl-peer/trusted-signer certificate for local systemtap-server
60e99141
FCE
769 %{_libexecdir}/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/ssl/client >/dev/null
770 %{_libexecdir}/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/staprun >/dev/null
045e193d
FCE
771fi
772exit 0
773# XXX: corresponding %triggerun?
774
09070e8a 775%preun server
d210cb1c
DB
776# Check that this is the actual deinstallation of the package, as opposed to
777# just removing the old package on upgrade.
e2a741be 778if [ $1 = 0 ] ; then
7fe42498 779 %if %{with_systemd}
e58423f4
LB
780 /bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || :
781 /bin/systemctl stop stap-server.service >/dev/null 2>&1 || :
782 %else
783 /sbin/service stap-server stop >/dev/null 2>&1
64647133 784 /sbin/chkconfig --del stap-server
e58423f4 785 %endif
e2a741be
DB
786fi
787exit 0
788
789%postun server
d210cb1c
DB
790# Check whether this is an upgrade of the package.
791# If so, restart the service if it's running
e2a741be 792if [ "$1" -ge "1" ] ; then
7fe42498 793 %if %{with_systemd}
e59944d5 794 /bin/systemctl condrestart stap-server.service >/dev/null 2>&1 || :
e58423f4
LB
795 %else
796 /sbin/service stap-server condrestart >/dev/null 2>&1 || :
797 %endif
e2a741be 798fi
09070e8a
DB
799exit 0
800
9a8d8be3 801%post initscript
7fe42498 802%if %{with_systemd}
64647133 803 /bin/systemctl enable systemtap.service >/dev/null 2>&1 || :
e58423f4
LB
804%else
805 /sbin/chkconfig --add systemtap
806%endif
9a8d8be3
MH
807exit 0
808
809%preun initscript
d210cb1c
DB
810# Check that this is the actual deinstallation of the package, as opposed to
811# just removing the old package on upgrade.
e2a741be 812if [ $1 = 0 ] ; then
7fe42498 813 %if %{with_systemd}
64647133
JL
814 /bin/systemctl --no-reload disable systemtap.service >/dev/null 2>&1 || :
815 /bin/systemctl stop systemtap.service >/dev/null 2>&1 || :
e58423f4
LB
816 %else
817 /sbin/service systemtap stop >/dev/null 2>&1
64647133 818 /sbin/chkconfig --del systemtap
e58423f4 819 %endif
e2a741be
DB
820fi
821exit 0
822
823%postun initscript
d210cb1c
DB
824# Check whether this is an upgrade of the package.
825# If so, restart the service if it's running
e2a741be 826if [ "$1" -ge "1" ] ; then
7fe42498 827 %if %{with_systemd}
64647133 828 /bin/systemctl condrestart systemtap.service >/dev/null 2>&1 || :
e58423f4
LB
829 %else
830 /sbin/service systemtap condrestart >/dev/null 2>&1 || :
831 %endif
e2a741be 832fi
9a8d8be3
MH
833exit 0
834
765a5d60
JL
835%post runtime-virtguest
836%if %{with_systemd}
837 # Start services if there are ports present
838 if [ -d /dev/virtio-ports ]; then
839 (find /dev/virtio-ports -iname 'org.systemtap.stapsh.[0-9]*' -type l \
840 | xargs -n 1 basename \
841 | xargs -n 1 -I {} /bin/systemctl start stapsh@{}.service) >/dev/null 2>&1 || :
842 fi
843%else
844 /sbin/chkconfig --add stapshd
845 /sbin/chkconfig stapshd on
846 /sbin/service stapshd start >/dev/null 2>&1 || :
847%endif
848exit 0
849
850%preun runtime-virtguest
851# Stop service if this is an uninstall rather than an upgrade
852if [ $1 = 0 ]; then
853 %if %{with_systemd}
854 # We need to stop all stapsh services. Because they are instantiated from
855 # a template service file, we can't simply call disable. We need to find
856 # all the running ones and stop them all individually
857 for service in `/bin/systemctl --full | grep stapsh@ | cut -d ' ' -f 1`; do
858 /bin/systemctl stop $service >/dev/null 2>&1 || :
859 done
860 %else
861 /sbin/service stapshd stop >/dev/null 2>&1
862 /sbin/chkconfig --del stapshd
863 %endif
864fi
865exit 0
866
867%postun runtime-virtguest
868# Restart service if this is an upgrade rather than an uninstall
869if [ "$1" -ge "1" ]; then
870 %if %{with_systemd}
871 # We need to restart all stapsh services. Because they are instantiated from
872 # a template service file, we can't simply call restart. We need to find
873 # all the running ones and restart them all individually
874 for service in `/bin/systemctl --full | grep stapsh@ | cut -d ' ' -f 1`; do
875 /bin/systemctl condrestart $service >/dev/null 2>&1 || :
876 done
877 %else
878 /sbin/service stapshd condrestart >/dev/null 2>&1
879 %endif
880fi
881exit 0
882
1208cc21
FCE
883%post
884# Remove any previously-built uprobes.ko materials
60e99141 885(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true
70f2bd1f 886(/sbin/rmmod uprobes) >/dev/null 2>&1 || true
1208cc21
FCE
887
888%preun
889# Ditto
60e99141 890(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true
70f2bd1f 891(/sbin/rmmod uprobes) >/dev/null 2>&1 || true
9a8d8be3 892
016a35ea
FCE
893# ------------------------------------------------------------------------
894
fd05c448
SM
895%if %{with_java}
896
39526324 897%triggerin runtime-java -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk
a6018be1 898for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do
5e5ec35c
LB
899 %ifarch %{ix86}
900 arch=i386
1553f7e3
LB
901 %else
902 arch=`basename $f | cut -f2 -d_ | cut -f1 -d.`
903 %endif
a6018be1 904 for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do
46b3edce 905 if [ -d ${archdir} ]; then
86298f09
LB
906 ln -sf %{_libexecdir}/systemtap/libHelperSDT_${arch}.so ${archdir}/libHelperSDT_${arch}.so
907 ln -sf %{_libexecdir}/systemtap/HelperSDT.jar ${archdir}/../ext/HelperSDT.jar
46b3edce 908 fi
a6018be1
SM
909 done
910done
fd05c448 911
39526324 912%triggerun runtime-java -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk
a6018be1 913for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do
5e5ec35c
LB
914 %ifarch %{ix86}
915 arch=i386
1553f7e3
LB
916 %else
917 arch=`basename $f | cut -f2 -d_ | cut -f1 -d.`
918 %endif
a6018be1
SM
919 for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do
920 rm -f ${archdir}/libHelperSDT_${arch}.so
921 rm -f ${archdir}/../ext/HelperSDT.jar
922 done
923done
fd05c448 924
39526324 925%triggerpostun runtime-java -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk
a6018be1
SM
926# Restore links for any JDKs remaining after a package removal:
927for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do
5e5ec35c
LB
928 %ifarch %{ix86}
929 arch=i386
1553f7e3
LB
930 %else
931 arch=`basename $f | cut -f2 -d_ | cut -f1 -d.`
932 %endif
a6018be1 933 for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do
46b3edce 934 if [ -d ${archdir} ]; then
86298f09
LB
935 ln -sf %{_libexecdir}/systemtap/libHelperSDT_${arch}.so ${archdir}/libHelperSDT_${arch}.so
936 ln -sf %{_libexecdir}/systemtap/HelperSDT.jar ${archdir}/../ext/HelperSDT.jar
46b3edce 937 fi
a6018be1
SM
938 done
939done
fd05c448 940
a6018be1 941# XXX: analogous support for other types of JRE/JDK??
fd05c448
SM
942
943%endif
944
945# ------------------------------------------------------------------------
946
60e99141 947%files -f systemtap.lang
016a35ea
FCE
948# The master "systemtap" rpm doesn't include any files.
949
60e99141 950%files server -f systemtap.lang
7d838f63 951%defattr(-,root,root)
016a35ea 952%{_bindir}/stap-server
60e99141
FCE
953%dir %{_libexecdir}/systemtap
954%{_libexecdir}/systemtap/stap-serverd
955%{_libexecdir}/systemtap/stap-start-server
956%{_libexecdir}/systemtap/stap-stop-server
957%{_libexecdir}/systemtap/stap-gen-cert
958%{_libexecdir}/systemtap/stap-sign-module
959%{_libexecdir}/systemtap/stap-authorize-cert
960%{_libexecdir}/systemtap/stap-env
541343c6 961%{_mandir}/man7/error*
016a35ea 962%{_mandir}/man7/stappaths.7*
09b37817 963%{_mandir}/man7/warning*
016a35ea 964%{_mandir}/man8/stap-server.8*
7fe42498 965%if %{with_systemd}
c1fc8157 966%{_unitdir}/stap-server.service
752358d4 967%{_tmpfilesdir}/stap-server.conf
e58423f4 968%else
4a618408 969%{initdir}/stap-server
016a35ea
FCE
970%dir %{_sysconfdir}/stap-server/conf.d
971%config(noreplace) %{_sysconfdir}/sysconfig/stap-server
e58423f4 972%endif
c1fc8157
LB
973%config(noreplace) %{_sysconfdir}/logrotate.d/stap-server
974%dir %{_sysconfdir}/stap-server
ef079a5c 975%dir %attr(0750,stap-server,stap-server) %{_localstatedir}/lib/stap-server
8689b446 976%dir %attr(0700,stap-server,stap-server) %{_localstatedir}/lib/stap-server/.systemtap
016a35ea
FCE
977%dir %attr(0755,stap-server,stap-server) %{_localstatedir}/log/stap-server
978%ghost %config(noreplace) %attr(0644,stap-server,stap-server) %{_localstatedir}/log/stap-server/log
979%ghost %attr(0755,stap-server,stap-server) %{_localstatedir}/run/stap-server
91c82d36 980%doc README README.unprivileged AUTHORS NEWS
bb067054 981%{!?_licensedir:%global license %%doc}
91c82d36 982%license COPYING
a2c9eba7 983
a2c9eba7 984
60e99141 985%files devel -f systemtap.lang
a2c9eba7 986%{_bindir}/stap
cd4d1d39 987%{_bindir}/stap-prep
b0ff684d 988%{_bindir}/stap-report
60e99141
FCE
989%dir %{_datadir}/systemtap
990%{_datadir}/systemtap/runtime
991%{_datadir}/systemtap/tapset
016a35ea 992%{_mandir}/man1/stap.1*
d142b86c 993%{_mandir}/man1/stap-prep.1*
0d8d5d71 994%{_mandir}/man1/stap-report.1*
541343c6 995%{_mandir}/man7/error*
016a35ea 996%{_mandir}/man7/stappaths.7*
09b37817 997%{_mandir}/man7/warning*
91c82d36 998%doc README README.unprivileged AUTHORS NEWS
bb067054 999%{!?_licensedir:%global license %%doc}
91c82d36 1000%license COPYING
36cfba7c
SM
1001%if %{with_java}
1002%dir %{_libexecdir}/systemtap
1003%{_libexecdir}/systemtap/libHelperSDT_*.so
1004%endif
a87d23e3 1005%if %{with_bundled_elfutils}
60e99141
FCE
1006%dir %{_libdir}/systemtap
1007%{_libdir}/systemtap/lib*.so*
7d838f63 1008%endif
65635f34
FCE
1009%if %{with_emacsvim}
1010%{_emacs_sitelispdir}/*.el*
1011%{_emacs_sitestartdir}/systemtap-init.el
e42fca4e 1012%{_datadir}/vim/vimfiles/*/*.vim
65635f34 1013%endif
ca677173
DS
1014# Notice that the stap-resolve-module-function.py file is used by
1015# *both* the python2 and python3 subrpms. Both subrpms use that same
1016# python script to help list python probes.
8065f5d8
FCE
1017%if %{with_python3_probes} || %{with_python2_probes}
1018%{_libexecdir}/systemtap/python/stap-resolve-module-function.py
1019%exclude %{_libexecdir}/systemtap/python/stap-resolve-module-function.py?
1020%endif
a2c9eba7 1021
5ecd6999 1022
60e99141 1023%files runtime -f systemtap.lang
a63a95dc 1024%defattr(-,root,root)
b7565b41 1025%attr(4110,root,stapusr) %{_bindir}/staprun
e96f2257 1026%{_bindir}/stapsh
6c2c4d8e 1027%{_bindir}/stap-merge
b0ff684d 1028%{_bindir}/stap-report
8ff439fa 1029%if %{with_dyninst}
4b682f2a 1030%{_bindir}/stapdyn
8ff439fa 1031%endif
5eb23ed5 1032%if %{with_bpf}
78efcde0 1033%{_bindir}/stapbpf
5eb23ed5 1034%endif
60e99141
FCE
1035%dir %{_libexecdir}/systemtap
1036%{_libexecdir}/systemtap/stapio
1037%{_libexecdir}/systemtap/stap-authorize-cert
38105915 1038%if %{with_crash}
60e99141
FCE
1039%dir %{_libdir}/systemtap
1040%{_libdir}/systemtap/staplog.so*
38105915 1041%endif
0d8d5d71 1042%{_mandir}/man1/stap-report.1*
541343c6 1043%{_mandir}/man7/error*
4e47b3c4 1044%{_mandir}/man7/stappaths.7*
09b37817 1045%{_mandir}/man7/warning*
e7e3c2fd 1046%{_mandir}/man8/stapsh.8*
0bda9740 1047%{_mandir}/man8/staprun.8*
75c8709f
FCE
1048%if %{with_dyninst}
1049%{_mandir}/man8/stapdyn.8*
1050%endif
5eb23ed5
AM
1051%if %{with_bpf}
1052%{_mandir}/man8/stapbpf.8*
1053%endif
91c82d36 1054%doc README README.security AUTHORS NEWS
bb067054 1055%{!?_licensedir:%global license %%doc}
91c82d36 1056%license COPYING
7d838f63 1057
8f3c45cc 1058
60e99141 1059%files client -f systemtap.lang
d9d14e20 1060%defattr(-,root,root)
2cd5c938
CS
1061%doc README README.unprivileged AUTHORS NEWS
1062%{_datadir}/systemtap/examples
bb067054 1063%{!?_licensedir:%global license %%doc}
91c82d36 1064%license COPYING
016a35ea
FCE
1065%if %{with_docs}
1066%doc docs.installed/*.pdf
6706593f 1067%if %{with_htmldocs}
016a35ea 1068%doc docs.installed/tapsets/*.html
016a35ea
FCE
1069%doc docs.installed/SystemTap_Beginners_Guide
1070%endif
6706593f 1071%endif
016a35ea
FCE
1072%{_bindir}/stap
1073%{_bindir}/stap-prep
1074%{_bindir}/stap-report
1075%{_mandir}/man1/stap.1*
d142b86c 1076%{_mandir}/man1/stap-prep.1*
016a35ea 1077%{_mandir}/man1/stap-merge.1*
0d8d5d71 1078%{_mandir}/man1/stap-report.1*
a80691df 1079%{_mandir}/man1/stapref.1*
016a35ea 1080%{_mandir}/man3/*
541343c6 1081%{_mandir}/man7/error*
4e47b3c4 1082%{_mandir}/man7/stappaths.7*
09b37817 1083%{_mandir}/man7/warning*
60e99141
FCE
1084%dir %{_datadir}/systemtap
1085%{_datadir}/systemtap/tapset
016a35ea 1086
8f3c45cc 1087
b899aa79 1088
9a8d8be3
MH
1089%files initscript
1090%defattr(-,root,root)
4a618408 1091%{initdir}/systemtap
c1fc8157
LB
1092%dir %{_sysconfdir}/systemtap
1093%dir %{_sysconfdir}/systemtap/conf.d
1094%dir %{_sysconfdir}/systemtap/script.d
1095%config(noreplace) %{_sysconfdir}/systemtap/config
9a8d8be3 1096%dir %{_localstatedir}/cache/systemtap
d1bf48fa 1097%ghost %{_localstatedir}/run/systemtap
f19a1ef4 1098%{_mandir}/man8/systemtap.8*
6a06bc73
JL
1099%if %{with_dracut}
1100 %dir %{dracutstap}
1101 %{dracutstap}/*
1102%endif
9a8d8be3 1103
016a35ea 1104
a54d79ce 1105%files sdt-devel
016a35ea
FCE
1106%defattr(-,root,root)
1107%{_bindir}/dtrace
1108%{_includedir}/sys/sdt.h
1109%{_includedir}/sys/sdt-config.h
1110%{_mandir}/man1/dtrace.1*
91c82d36 1111%doc README AUTHORS NEWS
bb067054 1112%{!?_licensedir:%global license %%doc}
91c82d36 1113%license COPYING
016a35ea
FCE
1114
1115
1116%files testsuite
1117%defattr(-,root,root)
60e99141
FCE
1118%dir %{_datadir}/systemtap
1119%{_datadir}/systemtap/testsuite
016a35ea
FCE
1120
1121
36cfba7c
SM
1122%if %{with_java}
1123%files runtime-java
1124%dir %{_libexecdir}/systemtap
1125%{_libexecdir}/systemtap/libHelperSDT_*.so
1126%{_libexecdir}/systemtap/HelperSDT.jar
1127%{_libexecdir}/systemtap/stapbm
1128%endif
1129
30354895
DS
1130%if %{with_python2_probes}
1131%files runtime-python2
8065f5d8
FCE
1132%{python_sitearch}/HelperSDT
1133%{python_sitearch}/HelperSDT-*.egg-info
30354895
DS
1134%endif
1135%if %{with_python3_probes}
1136%files runtime-python3
8065f5d8
FCE
1137%{python3_sitearch}/HelperSDT
1138%{python3_sitearch}/HelperSDT-*.egg-info
30354895
DS
1139%endif
1140
765a5d60
JL
1141%if %{with_virthost}
1142%files runtime-virthost
1143%{_mandir}/man1/stapvirt.1*
1144%{_bindir}/stapvirt
1145%endif
1146
1147%if %{with_virtguest}
1148%files runtime-virtguest
1149%if %{with_systemd}
1150 %{udevrulesdir}/99-stapsh.rules
1151 %{_unitdir}/stapsh@.service
1152%else
1153 %{udevrulesdir}/99-stapsh-init.rules
1154 %dir %{_libexecdir}/systemtap
1155 %{_libexecdir}/systemtap/stapsh-daemon
1156 %{initdir}/stapshd
1157 %{_sysconfdir}/sysconfig/modules/virtio_console.modules
1158%endif
1159%endif
36cfba7c 1160
016a35ea 1161# ------------------------------------------------------------------------
9a8d8be3 1162
26fa6c15
FCE
1163# Future new-release entries should be of the form
1164# * DDD MMM DD YYYY YOURNAME <YOUREMAIL> - V-R
1165# - Upstream release, see wiki page below for detailed notes.
1166# http://sourceware.org/systemtap/wiki/SystemTapReleases
1167
b8ea350d 1168# PRERELEASE
7d838f63 1169%changelog
a3e0237a 1170* Wed Oct 18 2017 Frank Ch. Eigler <fche@redhat.com> - 3.2-1
c074154d
FCE
1171- Upstream release.
1172
b8ea350d
FCE
1173* Fri Feb 17 2017 Frank Ch. Eigler <fche@redhat.com> - 3.1-1
1174- Upstream release.
1175
6b2b2bef
FCE
1176* Sun Mar 27 2016 Frank Ch. Eigler <fche@redhat.com> - 3.0-1
1177- Upstream release.
1178
7009f2f7 1179* Thu Oct 08 2015 Frank Ch. Eigler <fche@redhat.com> - 2.9-1
f59f4f63
FL
1180- Upstream release.
1181
08dc7182
AJ
1182* Wed Jun 17 2015 Abegail Jakop <ajakop@redhat.com> - 2.8-1
1183- Upstream release.
1184
c86582b2
FCE
1185* Wed Feb 18 2015 Frank Ch. Eigler <fche@redhat.com> - 2.7-1
1186- Upstream release.
1187
7682e51d
JS
1188* Fri Sep 05 2014 Josh Stone <jistone@redhat.com> - 2.6-1
1189- Upstream release.
1190
ebf1032e 1191* Mon Jul 07 2014 Josh Stone <jistone@redhat.com>
bec6172d 1192- Flip with_dyninst to an %%ifarch whitelist.
ebf1032e 1193
e8fa5eb0 1194* Wed Apr 30 2014 Jonathan Lebon <jlebon@redhat.com> - 2.5-1
8f0fcd99
JL
1195- Upstream release.
1196
86298f09
LB
1197* Thu Feb 13 2014 Lukas Berk <lberk@redhat.com>
1198- Add directory checks for runtime-java sym links
1199
6a06bc73
JL
1200* Mon Jan 06 2014 Jonathan Lebon <jlebon@redhat.com>
1201- Added dracut module to initscript package
1202
aa7b1e00
FCE
1203* Wed Nov 06 2013 Frank Ch. Eigler <fche@redhat.com> - 2.4-1
1204- Upstream release.
1205
765a5d60
JL
1206* Wed Oct 09 2013 Jonathan Lebon <jlebon@redhat.com>
1207- Added runtime-virthost and runtime-virtguest packages.
1208
26fa6c15
FCE
1209* Thu Jul 25 2013 Frank Ch. Eigler <fche@redhat.com> - 2.3-1
1210- Upstream release.
1211
e4bf97f8
FCE
1212* Thu May 16 2013 Frank Ch. Eigler <fche@redhat.com> - 2.2.1-1
1213- Upstream release.
1214
bec88838
FCE
1215* Tue May 14 2013 Frank Ch. Eigler <fche@redhat.com> - 2.2-1
1216- Upstream release.
1217
0dc908f7 1218* Wed Feb 13 2013 Serguei Makarov <smakarov@redhat.com> - 2.1-1
460cea43
SM
1219- Upstream release.
1220
a63381cc
JS
1221* Tue Oct 09 2012 Josh Stone <jistone@redhat.com> - 2.0-1
1222- Upstream release.
1223
07547775
PR
1224* Fri Jul 13 2012 Peter Robinson <pbrobinson@fedoraproject.org>
1225- Fix ifarch statement
e2d574cc 1226- use file based requires for glibc-devel on x86_64 so that we work in koji
07547775 1227
48fa6b5e
FCE
1228* Sun Jun 17 2012 Frank Ch. Eigler <fche@redhat.com> - 1.8-1
1229- Upstream release.
1230
83bd2699
FCE
1231* Wed Feb 01 2012 Frank Ch. Eigler <fche@redhat.com> - 1.7-1
1232- Upstream release.
1233
87600139
DS
1234* Fri Jan 13 2012 David Smith <dsmith@redhat.com> - 1.6-2
1235- Fixed /bin/mktemp require.
1236
aff1eaa0
FCE
1237* Mon Jul 25 2011 Stan Cox <scox@redhat.com> - 1.6-1
1238- Upstream release.
1239
63509773 1240* Mon May 23 2011 Stan Cox <scox@redhat.com> - 1.5-1
aff1eaa0
FCE
1241- Upstream release.
1242
6e0c15da
FCE
1243* Mon Jan 17 2011 Frank Ch. Eigler <fche@redhat.com> - 1.4-1
1244- Upstream release.
1245
e12e958f
JS
1246* Wed Jul 21 2010 Josh Stone <jistone@redhat.com> - 1.3-1
1247- Upstream release.
1248
e36ba31a
FCE
1249* Mon Mar 22 2010 Frank Ch. Eigler <fche@redhat.com> - 1.2-1
1250- Upstream release.
1251
0710d850
DS
1252* Mon Dec 21 2009 David Smith <dsmith@redhat.com> - 1.1-1
1253- Upstream release.
1254
6a7aa1a1
JS
1255* Tue Sep 22 2009 Josh Stone <jistone@redhat.com> - 1.0-1
1256- Upstream release.
1257
1e9b189f
JS
1258* Tue Aug 4 2009 Josh Stone <jistone@redhat.com> - 0.9.9-1
1259- Upstream release.
1260
e1774a7f
JS
1261* Thu Jun 11 2009 Josh Stone <jistone@redhat.com> - 0.9.8-1
1262- Upstream release.
1263
9b055ab2 1264* Thu Apr 23 2009 Josh Stone <jistone@redhat.com> - 0.9.7-1
225d8d4b
JS
1265- Upstream release.
1266
27aba29a
JS
1267* Fri Mar 27 2009 Josh Stone <jistone@redhat.com> - 0.9.5-1
1268- Upstream release.
1269
fab6ce30
WC
1270* Wed Mar 18 2009 Will Cohen <wcohen@redhat.com> - 0.9-2
1271- Add location of man pages.
1272
c8bf931d
FCE
1273* Tue Feb 17 2009 Frank Ch. Eigler <fche@redhat.com> - 0.9-1
1274- Upstream release.
1275
70f5a7b3
FCE
1276* Thu Nov 13 2008 Frank Ch. Eigler <fche@redhat.com> - 0.8-1
1277- Upstream release.
1278
cfaa068c
FCE
1279* Tue Jul 15 2008 Frank Ch. Eigler <fche@redhat.com> - 0.7-1
1280- Upstream release.
1281
d2995e6f
FCE
1282* Fri Feb 1 2008 Frank Ch. Eigler <fche@redhat.com> - 0.6.1-3
1283- Add zlib-devel to buildreq; missing from crash-devel
1284- Process testsuite .stp files for #!stap->#!/usr/bin/stap
1285
bfe2b4ab 1286* Fri Jan 18 2008 Frank Ch. Eigler <fche@redhat.com> - 0.6.1-1
1e0716d3
FCE
1287- Add crash-devel buildreq to build staplog.so crash(8) module.
1288- Many robustness & functionality improvements:
1289
47b0655b
WC
1290* Wed Dec 5 2007 Will Cohen <wcohen@redhat.com> - 0.6-2
1291- Correct Source to point to location contain code.
1292
98aab489
DS
1293* Thu Aug 9 2007 David Smith <dsmith@redhat.com> - 0.6-1
1294- Bumped version, added libcap-devel BuildRequires.
1295
d8c3d602
WC
1296* Wed Jul 11 2007 Will Cohen <wcohen@redhat.com> - 0.5.14-2
1297- Fix Requires and BuildRequires for sqlite.
1298
63509773 1299* Mon Jul 2 2007 Frank Ch. Eigler <fche@redhat.com> - 0.5.14-1
c1edaa30
FCE
1300- Many robustness improvements: 1117, 1134, 1305, 1307, 1570, 1806,
1301 2033, 2116, 2224, 2339, 2341, 2406, 2426, 2438, 2583, 3037,
1302 3261, 3282, 3331, 3428 3519, 3545, 3625, 3648, 3880, 3888, 3911,
1303 3952, 3965, 4066, 4071, 4075, 4078, 4081, 4096, 4119, 4122, 4127,
1304 4146, 4171, 4179, 4183, 4221, 4224, 4254, 4281, 4319, 4323, 4326,
1305 4329, 4332, 4337, 4415, 4432, 4444, 4445, 4458, 4467, 4470, 4471,
1306 4518, 4567, 4570, 4579, 4589, 4609, 4664
1307
aa384dcd
FCE
1308* Mon Mar 26 2007 Frank Ch. Eigler <fche@redhat.com> - 0.5.13-1
1309- An emergency / preliminary refresh, mainly for compatibility
1310 with 2.6.21-pre kernels.
2a4b42eb 1311
31982bd2
FCE
1312* Mon Jan 1 2007 Frank Ch. Eigler <fche@redhat.com> - 0.5.12-1
1313- Many changes, see NEWS file.
1314
a63a95dc
DS
1315* Tue Sep 26 2006 David Smith <dsmith@redhat.com> - 0.5.10-1
1316- Added 'systemtap-runtime' subpackage.
1317
d65d6b27
RM
1318* Wed Jul 19 2006 Roland McGrath <roland@redhat.com> - 0.5.9-1
1319- PRs 2669, 2913
1320
c1d6a343
RM
1321* Fri Jun 16 2006 Roland McGrath <roland@redhat.com> - 0.5.8-1
1322- PRs 2627, 2520, 2228, 2645
1323
f6291560 1324* Fri May 5 2006 Frank Ch. Eigler <fche@redhat.com> - 0.5.7-1
6f231a27
FCE
1325- PRs 2511 2453 2307 1813 1944 2497 2538 2476 2568 1341 2058 2220 2437
1326 1326 2014 2599 2427 2438 2465 1930 2149 2610 2293 2634 2506 2433
1327
611010bf
RM
1328* Tue Apr 4 2006 Roland McGrath <roland@redhat.com> - 0.5.5-1
1329- Many changes, affected PRs include: 2068, 2293, 1989, 2334,
1330 1304, 2390, 2425, 953.
1331
be9923ac
FCE
1332* Wed Feb 1 2006 Frank Ch. Eigler <fche@redhat.com> - 0.5.4-1
1333- PRs 1916, 2205, 2142, 2060, 1379
1334
db6a8a10
RM
1335* Mon Jan 16 2006 Roland McGrath <roland@redhat.com> - 0.5.3-1
1336- Many changes, affected PRs include: 2056, 1144, 1379, 2057,
1337 2060, 1972, 2140, 2148
1338
dcf0c541
RM
1339* Mon Dec 19 2005 Roland McGrath <roland@redhat.com> - 0.5.2-1
1340- Fixed build with gcc 4.1, various tapset changes.
1341
4d9087fc
RM
1342* Wed Dec 7 2005 Roland McGrath <roland@redhat.com> - 0.5.1-1
1343- elfutils update, build changes
1344
e94c050c 1345* Fri Dec 02 2005 Frank Ch. Eigler <fche@redhat.com> - 0.5-1
7d9e8974
FCE
1346- Many fixes and improvements: 1425, 1536, 1505, 1380, 1329, 1828, 1271,
1347 1339, 1340, 1345, 1837, 1917, 1903, 1336, 1868, 1594, 1564, 1276, 1295
1348
ae65ed5c
RM
1349* Mon Oct 31 2005 Roland McGrath <roland@redhat.com> - 0.4.2-1
1350- Many fixes and improvements: PRs 1344, 1260, 1330, 1295, 1311, 1368,
1351 1182, 1131, 1332, 1366, 1456, 1271, 1338, 1482, 1477, 1194.
1352
66bb48fd
RM
1353* Wed Sep 14 2005 Roland McGrath <roland@redhat.com> - 0.4.1-1
1354- Many fixes and improvements since 0.2.2; relevant PRs include:
1355 1122, 1134, 1155, 1172, 1174, 1175, 1180, 1186, 1187, 1191, 1193, 1195,
1356 1197, 1205, 1206, 1209, 1213, 1244, 1257, 1258, 1260, 1265, 1268, 1270,
1357 1289, 1292, 1306, 1335, 1257
1358
323904e0
FCE
1359* Wed Sep 7 2005 Frank Ch. Eigler <fche@redhat.com>
1360- Bump version.
1361
63509773 1362* Tue Aug 16 2005 Frank Ch. Eigler <fche@redhat.com>
83ff1cf9
FCE
1363- Bump version.
1364
2205d115
MH
1365* Wed Aug 3 2005 Martin Hunt <hunt@redhat.com> - 0.2.2-1
1366- Add directory /var/cache/systemtap
1367- Add stp_check to /usr/libexec/systemtap
1368
351e76d3
RM
1369* Wed Aug 3 2005 Roland McGrath <roland@redhat.com> - 0.2.1-1
1370- New version 0.2.1, various fixes.
1371
4dbd685d
RM
1372* Fri Jul 29 2005 Roland McGrath <roland@redhat.com> - 0.2-1
1373- New version 0.2, requires elfutils 0.111
1374
a2c9eba7
RM
1375* Mon Jul 25 2005 Roland McGrath <roland@redhat.com>
1376- Clean up spec file, build bundled elfutils.
1377
7d838f63
MH
1378* Thu Jul 21 2005 Martin Hunt <hunt@redhat.com>
1379- Set Version to use version from autoconf.
1380- Fix up some of the path names.
a2c9eba7
RM
1381- Add Requires and BuildRequires.
1382
63509773 1383* Tue Jul 19 2005 Will Cohen <wcohen@redhat.com>
7d838f63 1384- Initial creation of RPM.
This page took 0.421508 seconds and 5 git commands to generate.