!5 remove java-runtime

Merge pull request !5 from HukunaMatata/master
This commit is contained in:
openeuler-ci-bot 2020-03-15 13:14:29 +08:00 committed by Gitee
commit 18fb3c8dbf

View File

@ -3,8 +3,6 @@
%{!?with_dyninst: %global with_dyninst 1}
%{!?with_mokutil: %global with_mokutil 1}
%{!?with_openssl: %global with_openssl 1}
%{!?with_virthost: %global with_virthost 1}
%global virt_config --enable-virt
%global crash_config --enable-crash
%global dyninst_config --with-dyninst
%else
@ -12,13 +10,10 @@
%{!?with_dyninst: %global with_dyninst 0}
%{!?with_mokutil: %global with_mokutil 0}
%{!?with_openssl: %global with_openssl 0}
%{!?with_virthost: %global with_virthost 0}
%global virt_config --disable-virt
%global crash_config --disable-crash
%global dyninst_config --without-dyninst
%endif
%define initdir %{_initddir}
%define udevrulesdir /usr/lib/udev/rules.d
%define dracutstap %{_prefix}/lib/dracut/modules.d/99stap
%define dracutbindir /sbin
@ -27,22 +22,23 @@
Name: systemtap
Version: 4.1
Release: 2
Release: 3
Summary: Linux trace and probe tool
License: GPLv2+ and Public Domain
URL: http://sourceware.org/systemtap/
URL: http://sourceware.org/systemtap
Source: https://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz
Patch9000: fix-py3example-script-run-fail.patch
Patch9001: fix-py3example-script-run-fail-2.patch
Patch9002: fix-network-tcp-test.patch
Patch0: fix-py3example-script-run-fail.patch
Patch1: fix-py3example-script-run-fail-2.patch
Patch2: fix-network-tcp-test.patch
BuildRequires: emacs gcc-c++ gettext-devel jpackage-utils java-devel
BuildRequires: readline-devel rpm-devel systemd pkgconfig(nss)
BuildRequires: pkgconfig(avahi-client) pkgconfig(json-c) pkgconfig(ncurses)
BuildRequires: python3-devel python3-setuptools nss-devel avahi-devel
BuildRequires: sqlite-devel > 3.7
BuildRequires: gcc-c++ emacs systemd python3-setuptools
BuildRequires: gettext-devel rpm-devel readline-devel
BuildRequires: pkgconfig(nss) pkgconfig(avahi-client)
BuildRequires: pkgconfig(ncurses) pkgconfig(json-c)
BuildRequires: jpackage-utils python3-devel
BuildRequires: elfutils-devel >= 0.142
BuildRequires: sqlite-devel > 3.7
%if %{with_dyninst}
BuildRequires: dyninst-devel >= 8.0
BuildRequires: pkgconfig(libselinux)
@ -50,54 +46,9 @@ BuildRequires: pkgconfig(libselinux)
%if %{with_crash}
BuildRequires: crash-devel zlib-devel
%endif
%if %{with_virthost}
BuildRequires: pkgconfig(libvirt) pkgconfig(libxml-2.0)
Requires: libvirt > 2.0
%endif
Requires: nss coreutils zip unzip shadow-utils chkconfig systemd
Requires: shadow-utils openssh-clients python3-pyparsing
Requires: which elfutils grep nc gcc gcc-c++ make glibc-devel
Requires: strace nmap-ncat avahi perl iproute libxml2 findutils
Requires: kernel-devel
%if %{with_openssl}
Requires: openssl
%endif
%if %{with_mokutil}
Requires: mokutil
%endif
%if %{with_crash}
Requires: crash
%endif
Requires(pre): shadow-utils
Requires(post): chkconfig findutils coreutils
Requires(preun): chkconfig grep coreutils
Requires(postun): grep coreutils
Provides: systemtap-devel = %{version}-%{release}
Provides: systemtap-runtime = %{version}-%{release}
Provides: systemtap-server = %{version}-%{release}
Provides: systemtap-client = %{version}-%{release}
Provides: systemtap-initscript = %{version}-%{release}
Provides: systemtap-runtime_java = %{version}-%{release}
Provides: systemtap-runtime-python3 = %{version}-%{release}
Provides: systemtap-stap-exporter = %{version}-%{release}
%if %{with_virthost}
Provides: systemtap-runtime-virthost = %{version}-%{release}
%endif
Provides: systemtap-runtime-virtguest = %{version}-%{release}
Obsoletes: systemtap-devel
Obsoletes: systemtap-runtime
Obsoletes: systemtap-server
Obsoletes: systemtap-client
Obsoletes: systemtap-initscript
Obsoletes: systemtap-runtime_java
Obsoletes: systemtap-runtime-python3
Obsoletes: systemtap-stap-exporter
%if %{with_virthost}
Obsoletes: systemtap-runtime-virthost
%endif
Obsoletes: systemtap-runtime-virtguest
Requires: systemtap-client = %{version}-%{release}
Requires: systemtap-devel = %{version}-%{release}
%description
SystemTap is an instrumentation system for systems running Linux.
@ -105,199 +56,222 @@ Developers can write instrumentation scripts to collect data on
the operation of the system. The base systemtap package contains/requires
the components needed to locally develop and execute systemtap scripts.
%package runtime-java
Summary: Systemtap java runtime
%package devel
Summary: Programmable system-wide instrumentation system - development headers, tools
License: GPLv2+
Requires: %{name} = %{version}-%{release}
Requires: byteman > 2.0
Requires: iproute
Requires: gcc make kernel-devel systemd
%description runtime-java
Systemtap for java runtime support
%description devel
This package contains the components needed to compile a systemtap
script from source form into executable (.ko) forms. It may be
installed on a self-contained developer workstation (along with the
systemtap-client and systemtap-runtime packages), or on a dedicated
remote server (alongside the systemtap-server package). It includes
a copy of the standard tapset library and the runtime library C files.
%package runtime-python3
Summary: Systemtap python 3 runtime
%package server
Summary: Instrumentation System Server
License: GPLv2+
Requires: %{name} = %{version}-%{release}
Requires: systemtap-devel = %{version}-%{release}
Requires: coreutils nss zip unzip
Requires(pre): shadow-utils
BuildRequires: nss-devel avahi-devel
%if %{with_openssl}
Requires: openssl
%endif
%description runtime-python3
Systemtap for python3 runtime support
%description server
This is the remote script compilation server component of systemtap.
It announces itself to nearby clients with avahi (if available), and
compiles systemtap scripts to kernel objects on their demand.
%package runtime
Summary: Programmable system-wide instrumentation system - runtime
License: GPLv2+
Requires(pre): shadow-utils
%description runtime
SystemTap runtime contains the components needed to execute
a systemtap script that was already compiled into a module
using a local or remote systemtap-devel installation.
%package client
Summary: Programmable system-wide instrumentation system - client
License: GPLv2+
Requires: zip unzip
Requires: systemtap-runtime = %{version}-%{release}
Requires: coreutils grep sed unzip zip
Requires: openssh-clients
%if %{with_mokutil}
Requires: mokutil
%endif
%description client
This package contains/requires the components needed to develop
systemtap scripts, and compile them using a local systemtap-devel
or a remote systemtap-server installation, then run them using a
local or remote systemtap-runtime. It includes script samples and
documentation, and a copy of the tapset library for reference.
%package sdt-devel
Summary: Development package for systemtap
Summary: Static probe support tools
License: GPLv2+ and Public Domain
Requires: python3-pyparsing
%description sdt-devel
The sdt-development package for systemtap.
%package help
Summary: Help documents for systemtap
Requires: %{name} = %{version}-%{release}
%description help
The help documents for systemtap.
%package lang
Summary: Language package for systemtap
Requires: %{name} = %{version}-%{release}
%description lang
The language package for systemtap.
This package includes the <sys/sdt.h> header file used for static
instrumentation compiled into userspace programs and libraries, along
with the optional dtrace-compatibility preprocessor to process related
.d files into tracing-macro-laden .h headers.
%package testsuite
Summary: Instrumentation System Testsuite
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap = %{version}-%{release}
Requires: systemtap-devel = %{version}-%{release}
Requires: systemtap-sdt-devel = %{version}-%{release}
Requires: systemtap-server = %{version}-%{release}
Requires: dejagnu which elfutils grep nc
Requires: gcc gcc-c++ make glibc-devel
Requires: strace
Requires: nmap-ncat
Requires: avahi
Requires: strace nc avahi perf
Requires: systemtap-runtime-python3 = %{version}-%{release}
%if %{with_crash}
Requires: crash
%endif
Requires: systemtap-runtime-java = %{version}-%{release}
Requires: systemtap-runtime-python3 = %{version}-%{release}
Requires: perf
%description testsuite
Testsuite for systemtap.
This package includes the dejagnu-based systemtap stress self-testing
suite. This may be used by system administrators to thoroughly check
systemtap on the current system.
%package runtime-python3
Summary: Systemtap Python 3 Runtime Support
License: GPLv2+
URL: http://sourceware.org/systemtap
Requires: systemtap-runtime = %{version}-%{release}
%description runtime-python3
This package includes support files needed to run systemtap scripts
that probe python3 processes.
%package stap-exporter
Summary: Systemtap-prometheus interoperation mechanism
License: GPLv2+
URL: http://sourceware.org/systemtap
Requires: systemtap-runtime = %{version}-%{release}
%description stap-exporter
This package includes files for a systemd service that manages
systemtap sessions and relays prometheus metrics from the sessions
to remote requesters on demand.
%package help
Summary: systemtap manual
License: GPLv2+
URL: http://sourceware.org/systemtap
%description help
This package include systemtap manual
%prep
%autosetup %{?setup_elfutils} -p1
%setup -q %{?setup_elfutils}
%build
%configure \
%{dyninst_config} \
%{crash_config} \
%{virt_config} \
--enable-sqlite \
--enable-pie \
--with-rpm \
--with-java=%{_jvmdir}/java \
--with-dracutstap=%{dracutstap} \
--with-dracutbindir=%{dracutbindir} \
--with-python3 \
--without-python2-probes \
--with-python3-probes \
--disable-httpd \
--with-bpf \
--disable-silent-rules \
--with-extra-version="rpm %{version}-%{release}"
%{dyninst_config} \
%{crash_config} \
--with-bpf \
--disable-httpd \
--with-dracutstap=%{dracutstap} \
--with-dracutbindir=%{dracutbindir} \
--with-python3 \
--with-python3-probes \
--enable-pie \
--with-rpm \
--enable-sqlite \
--disable-silent-rules \
--with-extra-version="rpm %{version}-%{release}"
%make_build
%{_emacs_bytecompile} emacs/systemtap-mode.el
%install
rm -rf ${RPM_BUILD_ROOT}
%make_install
make DESTDIR=$RPM_BUILD_ROOT install
%find_lang %{name}
for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do
dir=$(echo $dir | sed -e "s|^$RPM_BUILD_ROOT||")
lang=$(basename $dir)
echo "%%lang($lang) $dir/man*/*" >> %{name}.lang
done
cp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap -r
ln -s %{_datadir}/systemtap/examples
find $RPM_BUILD_ROOT%{_datadir}/systemtap/examples -type f -name '*.stp' -print0 | xargs -0 sed -i -r -e '1s@^#!.+stap@#!%{_bindir}/stap@'
chmod 755 $RPM_BUILD_ROOT%{_bindir}/staprun
install -c -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
cp -rp testsuite $RPM_BUILD_ROOT%{_datadir}/systemtap
mkdir docs.installed
mv $RPM_BUILD_ROOT%{_datadir}/doc/systemtap/*.pdf docs.installed/
install -D -m 644 macros.systemtap $RPM_BUILD_ROOT%{_rpmmacrodir}/macros.systemtap
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stap-server
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/stap-server/.systemtap
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server
touch $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server/log
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/systemtap
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
touch $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
install -m 644 initscript/systemtap.service $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{_sbindir}/systemtap-service
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/conf.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.d
install -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
touch $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
install -m 644 stap-server.service $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
install -m 644 stap-server.conf $RPM_BUILD_ROOT%{_tmpfilesdir}/stap-server.conf
mkdir -p $RPM_BUILD_ROOT%{_emacs_sitelispdir}
install -p -m 644 emacs/systemtap-mode.el* $RPM_BUILD_ROOT%{_emacs_sitelispdir}
mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir}
install -p -m 644 emacs/systemtap-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}/systemtap-init.el
for subdir in ftdetect ftplugin indent syntax
do
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/$subdir
install -p -m 644 vim/$subdir/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/$subdir
done
mkdir -p $RPM_BUILD_ROOT%{dracutstap}
mkdir -p $RPM_BUILD_ROOT%{udevrulesdir}
install -D -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep
install -D -m 644 macros.systemtap $RPM_BUILD_ROOT%{_rpmmacrodir}/macros.systemtap
install -D -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server
install -D -m 644 initscript/systemtap.service $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
install -D -m 755 initscript/systemtap $RPM_BUILD_ROOT%{_sbindir}/systemtap-service
install -D -m 644 initscript/config.systemtap $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/config
install -D -m 644 stap-server.service $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
install -D -m 644 stap-server.conf $RPM_BUILD_ROOT%{_tmpfilesdir}/stap-server.conf
install -D -m 644 emacs/systemtap-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}/systemtap-init.el
install -D -m 644 emacs/systemtap-mode.el* $RPM_BUILD_ROOT%{_emacs_sitelispdir}/
install -D -m 644 vim/ftdetect/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/ftdetect/*.vim
install -D -m 644 vim/ftplugin/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/ftplugin/*.vim
install -D -m 644 vim/indent/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/indent/*.vim
install -D -m 644 vim/syntax/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax/*.vim
install -D -m 644 staprun/guest/99-stapsh.rules $RPM_BUILD_ROOT%{udevrulesdir}/
install -D -m 644 staprun/guest/stapsh@.service $RPM_BUILD_ROOT%{_unitdir}/
install -D -m 755 initscript/99stap/module-setup.sh $RPM_BUILD_ROOT%{dracutstap}/
install -D -m 755 initscript/99stap/install $RPM_BUILD_ROOT%{dracutstap}/
install -D -m 755 initscript/99stap/check $RPM_BUILD_ROOT%{dracutstap}/
install -D -m 755 initscript/99stap/start-staprun.sh $RPM_BUILD_ROOT%{dracutstap}/
install -D -m 755 stap-exporter/stap-exporter $RPM_BUILD_ROOT%{_bindir}/
install -D -m 644 stap-exporter/stap-exporter.service $RPM_BUILD_ROOT%{_unitdir}/
install -D -m 644 stap-exporter/stap-exporter.8* $RPM_BUILD_ROOT%{_mandir}/man8/
touch $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server/log
install -p -m 755 initscript/99stap/module-setup.sh $RPM_BUILD_ROOT%{dracutstap}
install -p -m 755 initscript/99stap/install $RPM_BUILD_ROOT%{dracutstap}
install -p -m 755 initscript/99stap/check $RPM_BUILD_ROOT%{dracutstap}
install -p -m 755 initscript/99stap/start-staprun.sh $RPM_BUILD_ROOT%{dracutstap}
touch $RPM_BUILD_ROOT%{dracutstap}/params.conf
touch $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
%pre
getent group stapusr >/dev/null || groupadd -r stapusr
getent group stapsys >/dev/null || groupadd -r stapsys
getent group stapdev >/dev/null || groupadd -r stapde
getent group stap-server >/dev/null || groupadd -r stap-server
getent passwd stap-server >/dev/null || useradd -c "Systemtap Compile Server" -g stap-server -d /var/lib/stap-server -r -s /sbin/nologin stap-server
mkdir -p $RPM_BUILD_ROOT/stap-exporter
install -p -m 755 stap-exporter/stap-exporter $RPM_BUILD_ROOT%{_bindir}
install -m 644 stap-exporter/stap-exporter.service $RPM_BUILD_ROOT%{_unitdir}
install -m 644 stap-exporter/stap-exporter.8* $RPM_BUILD_ROOT%{_mandir}/man8
%post
test -e ~stap-server && chmod 750 ~stap-server
if [ ! -f ~stap-server/.systemtap/rc ]; then
mkdir -p ~stap-server/.systemtap
chown stap-server:stap-server ~stap-server/.systemtap
numcpu=`/usr/bin/getconf _NPROCESSORS_ONLN`
if [ -z "$numcpu" -o "$numcpu" -lt 1 ]; then numcpu=1; fi
nproc=`expr $numcpu \* 30`
echo "--rlimit-as=614400000 --rlimit-cpu=60 --rlimit-nproc=$nproc --rlimit-stack=1024000 --rlimit-fsize=51200000" > ~stap-server/.systemtap/rc
chown stap-server:stap-server ~stap-server/.systemtap/rc
fi
test -e /var/log/stap-server/log || {
touch /var/log/stap-server/log
chmod 644 /var/log/stap-server/log
chown stap-server:stap-server /var/log/stap-server/log
}
/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/stap-server.conf >/dev/null 2>&1 || :
/bin/systemctl enable systemtap.service >/dev/null 2>&1 || :
if [ -d /dev/virtio-ports ]; then
(find /dev/virtio-ports -iname 'org.systemtap.stapsh.[0-9]*' -type l \
| xargs -n 1 basename \
| xargs -n 1 -I {} /bin/systemctl start stapsh@{}.service) >/dev/null 2>&1 || :
fi
exit 0
make -C %{_datadir}/systemtap/runtime/uprobes clean || true
/sbin/rmmod uprobes || true
%preun
if [ $1 = 0 ]; then
for service in `/bin/systemctl --full | grep stapsh@ | cut -d ' ' -f 1`; do
/bin/systemctl stop $service >/dev/null 2>&1 || :
done
fi
/bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || :
/bin/systemctl stop stap-server.service >/dev/null 2>&1 || :
make -C %{_datadir}/systemtap/runtime/uprobes clean || true
/sbin/rmmod uprobes || true
%pre runtime
getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr
getent group stapsys >/dev/null || groupadd -g 157 -r stapsys 2>/dev/null || groupadd -r stapsys
getent group stapdev >/dev/null || groupadd -g 158 -r stapdev 2>/dev/null || groupadd -r stapdev
exit 0
%postun
if [ "$1" -ge "1" ] ; then
/bin/systemctl condrestart stap-server.service >/dev/null 2>&1 || :
fi
if [ "$1" -ge "1" ]; then
for service in `/bin/systemctl --full | grep stapsh@ | cut -d ' ' -f 1`; do
/bin/systemctl condrestart $service >/dev/null 2>&1 || :
done
fi
%triggerin -- systemtap-server
if test -e ~stap-server/.systemtap/ssl/server/stap.cert; then
/usr/libexec/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert /etc/systemtap/ssl/client >/dev/null
/usr/libexec/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert /etc/systemtap/staprun >/dev/null
fi
exit 0
%pre server
getent group stap-server >/dev/null || groupadd -g 155 -r stap-server 2>/dev/null || groupadd -r stap-server
getent passwd stap-server >/dev/null || \
useradd -c "Systemtap Compile Server" -u 155 -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server 2>/dev/null || \
useradd -c "Systemtap Compile Server" -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server
%pre testsuite
getent passwd stapusr >/dev/null || \
@ -308,116 +282,185 @@ getent passwd stapdev >/dev/null || \
useradd -c "Systemtap 'stapdev' User" -g stapdev -G stapusr -r -s /sbin/nologin stapdev
exit 0
%post server
test -e ~stap-server && chmod 750 ~stap-server
if [ ! -f ~stap-server/.systemtap/rc ]; then
mkdir -p ~stap-server/.systemtap
chown stap-server:stap-server ~stap-server/.systemtap
numcpu=`/usr/bin/getconf _NPROCESSORS_ONLN`
if [ -z "$numcpu" -o "$numcpu" -lt 1 ]; then numcpu=1; fi
nproc=`expr $numcpu \* 30`
echo "--rlimit-as=614400000 --rlimit-cpu=60 --rlimit-nproc=$nproc --rlimit-stack=1024000 --rlimit-fsize=51200000" > ~stap-server/.systemtap/rc
chown stap-server:stap-server ~stap-server/.systemtap/rc
fi
%triggerin -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk
for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do
arch=`basename $f | cut -f2 -d_ | cut -f1 -d.`
for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do
if [ -d ${archdir} ]; then
ln -sf %{_libexecdir}/systemtap/libHelperSDT_${arch}.so ${archdir}/libHelperSDT_${arch}.so
ln -sf %{_libexecdir}/systemtap/HelperSDT.jar ${archdir}/../ext/HelperSDT.jar
fi
done
done
test -e %{_localstatedir}/log/stap-server/log || {
touch %{_localstatedir}/log/stap-server/log
chmod 644 %{_localstatedir}/log/stap-server/log
chown stap-server:stap-server %{_localstatedir}/log/stap-server/log
}
/bin/systemd-tmpfiles --create %{_tmpfilesdir}/stap-server.conf >/dev/null 2>&1 || :
exit 0
%triggerun -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk
for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do
arch=`basename $f | cut -f2 -d_ | cut -f1 -d.`
for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do
rm -f ${archdir}/libHelperSDT_${arch}.so
rm -f ${archdir}/../ext/HelperSDT.jar
done
done
%triggerin client -- systemtap-server
if test -e ~stap-server/.systemtap/ssl/server/stap.cert; then
%{_libexecdir}/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/ssl/client >/dev/null
%{_libexecdir}/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/staprun >/dev/null
fi
exit 0
%triggerpostun -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk
for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do
arch=`basename $f | cut -f2 -d_ | cut -f1 -d.`
for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do
if [ -d ${archdir} ]; then
ln -sf %{_libexecdir}/systemtap/libHelperSDT_${arch}.so ${archdir}/libHelperSDT_${arch}.so
ln -sf %{_libexecdir}/systemtap/HelperSDT.jar ${archdir}/../ext/HelperSDT.jar
fi
done
done
%preun server
if [ $1 = 0 ] ; then
/bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || :
/bin/systemctl stop stap-server.service >/dev/null 2>&1 || :
fi
exit 0
%postun server
if [ "$1" -ge "1" ] ; then
/bin/systemctl condrestart stap-server.service >/dev/null 2>&1 || :
fi
exit 0
%postun
if [ "$1" -ge "1" ] ; then
/bin/systemctl condrestart systemtap.service >/dev/null 2>&1 || :
fi
exit 0
%preun stap-exporter
/bin/systemctl stop stap-exporter.service >/dev/null 2>&1 || :
/bin/systemctl disable stap-exporter.service >/dev/null 2>&1 || :
%post
/bin/systemctl enable systemtap.service >/dev/null 2>&1 || :
(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true
(/sbin/rmmod uprobes) >/dev/null 2>&1 || true
%preun
if [ $1 = 0 ] ; then
/bin/systemctl --no-reload disable systemtap.service >/dev/null 2>&1 || :
/bin/systemctl stop systemtap.service >/dev/null 2>&1 || :
fi
exit 0
(make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true
(/sbin/rmmod uprobes) >/dev/null 2>&1 || true
%files
%{_bindir}/*
%{_sbindir}/*
%{_libdir}/python3.7/site-packages/*
%{_datadir}/systemtap/examples/*
%{_datadir}/systemtap/tapset
%{_datadir}/systemtap/runtime/*
%{_datadir}/vim/vimfiles/*/*
%{dracutstap}
%{udevrulesdir}/*
%dir %{_libexecdir}/systemtap
%{_libexecdir}/systemtap/*
%{_unitdir}/stap-exporter.service
%{_unitdir}/stap-server.service
%{_unitdir}/stapsh@.service
%license COPYING
%doc README README.unprivileged AUTHORS NEWS
%defattr(-,root,root)
%{_unitdir}/systemtap.service
%{_sbindir}/systemtap-service
%dir %{_sysconfdir}/systemtap
%dir %{_sysconfdir}/systemtap/conf.d
%dir %{_sysconfdir}/systemtap/script.d
%config(noreplace) %{_sysconfdir}/systemtap/config
%dir %{_localstatedir}/cache/systemtap
%ghost %{_localstatedir}/run/systemtap
%dir %{dracutstap}
%{dracutstap}/*
%files server -f systemtap.lang
%defattr(-,root,root)
%{_bindir}/stap-server
%dir %{_libexecdir}/systemtap
%{_libexecdir}/systemtap/stap-serverd
%{_libexecdir}/systemtap/stap-start-server
%{_libexecdir}/systemtap/stap-stop-server
%{_libexecdir}/systemtap/stap-gen-cert
%{_libexecdir}/systemtap/stap-sign-module
%{_libexecdir}/systemtap/stap-authorize-cert
%{_libexecdir}/systemtap/stap-env
%{_unitdir}/stap-server.service
%{_tmpfilesdir}/stap-server.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/stap-server
%dir %{_sysconfdir}/stap-server
%dir %attr(0750,stap-server,stap-server) %{_localstatedir}/lib/stap-server
%dir %attr(0700,stap-server,stap-server) %{_localstatedir}/lib/stap-server/.systemtap
%dir %attr(0755,stap-server,stap-server) %{_localstatedir}/log/stap-server
%ghost %config(noreplace) %attr(0644,stap-server,stap-server) %{_localstatedir}/log/stap-server/log
%ghost %attr(0755,stap-server,stap-server) %{_localstatedir}/run/stap-server
%{!?_licensedir:%global license %%doc}
%files devel -f systemtap.lang
%{_bindir}/stap
%{_bindir}/stap-prep
%{_bindir}/stap-report
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/runtime
%{_datadir}/systemtap/tapset
%{!?_licensedir:%global license %%doc}
%dir %{_libexecdir}/systemtap
%{_emacs_sitelispdir}/*.el*
%{_emacs_sitestartdir}/systemtap-init.el
%config(noreplace) %{_sysconfdir}/logrotate.d/stap-server
%config(noreplace) %{_sysconfdir}/systemtap/config
%ghost %config(noreplace) %attr(0644,stap-server,stap-server) %{_localstatedir}/log/stap-server/log
/etc/sysconfig/stap-exporter
/etc/stap-exporter
%doc README README.unprivileged AUTHORS NEWS
%license COPYING
%if %{with_crash}
%dir %{_libdir}/systemtap
%{_libdir}/%{name}/staplog.so*
%{_exec_prefix}/lib/debug/usr/lib64/%{name}/staplog.so-%{version}-%{release}.x86_64.debug
%endif
%exclude %{_bindir}/dtrace
%exclude %{python3_sitearch}/HelperSDT
%exclude %{python3_sitearch}/HelperSDT-*.egg-info
%exclude %{_libexecdir}/systemtap/libHelperSDT_*.so
%exclude %{_libexecdir}/systemtap/HelperSDT.jar
%exclude %{_libexecdir}/systemtap/stapbm
%{_datadir}/vim/vimfiles/*/*.vim
%{_libexecdir}/systemtap/python/stap-resolve-module-function.py
%files runtime-java
%files runtime -f systemtap.lang
%defattr(-,root,root)
%attr(4110,root,stapusr) %{_bindir}/staprun
%{_bindir}/stapsh
%{_bindir}/stap-merge
%{_bindir}/stap-report
%{_bindir}/stapbpf
%dir %{_libexecdir}/systemtap
%{_libexecdir}/systemtap/libHelperSDT_*.so
%{_libexecdir}/systemtap/HelperSDT.jar
%{_libexecdir}/systemtap/stapbm
%{_libexecdir}/systemtap/stapio
%{_libexecdir}/systemtap/stap-authorize-cert
%{!?_licensedir:%global license %%doc}
%if %{with_dyninst}
%{_bindir}/stapdyn
%endif
%if %{with_crash}
%dir %{_libdir}/systemtap
%{_libdir}/systemtap/staplog.so*
%endif
%files runtime-python3
%{python3_sitearch}/HelperSDT
%{python3_sitearch}/HelperSDT-*.egg-info
%files client -f systemtap.lang
%defattr(-,root,root)
%{_datadir}/systemtap/examples
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc docs.installed/*.pdf
%{_bindir}/stap
%{_bindir}/stap-prep
%{_bindir}/stap-report
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/tapset
%files sdt-devel
%defattr(-,root,root)
%{_bindir}/dtrace
%{_includedir}/sys/sdt.h
%{_includedir}/sys/sdt-config.h
%{_mandir}/man1/dtrace.1*
%{_rpmmacrodir}/macros.systemtap
%doc README AUTHORS NEWS
%license COPYING
%{!?_licensedir:%global license %%doc}
%files testsuite
%defattr(-,root,root)
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/testsuite
%files runtime-python3
%{python3_sitearch}/HelperSDT
%{python3_sitearch}/HelperSDT-*.egg-info
%files stap-exporter
%{_unitdir}/stap-exporter.service
%{_bindir}/stap-exporter
/etc/stap-exporter/*
/usr/sbin/stap-exporter
/etc/sysconfig/stap-exporter
%files help
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_mandir}/man7/*
%{_mandir}/man8/*
%{_datadir}/doc/*
%exclude %{_mandir}/man1/dtrace.1*
%files lang -f systemtap.lang
%{_mandir}/man[1378]/*
%changelog
* Fri Mar 13 2020 yuxiangyang <yuxiangyang4@huawei.com> - 4.1.3
- remove java-runtime
* Fri Feb 21 2020 yuxiangyang <yuxiangyang4@huawei.com> - 4.1.2
- Delete the requirement of python2-pyparsing
* Mon Aug 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.1.1
- Package init
- Package init