!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_dyninst: %global with_dyninst 1}
%{!?with_mokutil: %global with_mokutil 1} %{!?with_mokutil: %global with_mokutil 1}
%{!?with_openssl: %global with_openssl 1} %{!?with_openssl: %global with_openssl 1}
%{!?with_virthost: %global with_virthost 1}
%global virt_config --enable-virt
%global crash_config --enable-crash %global crash_config --enable-crash
%global dyninst_config --with-dyninst %global dyninst_config --with-dyninst
%else %else
@ -12,13 +10,10 @@
%{!?with_dyninst: %global with_dyninst 0} %{!?with_dyninst: %global with_dyninst 0}
%{!?with_mokutil: %global with_mokutil 0} %{!?with_mokutil: %global with_mokutil 0}
%{!?with_openssl: %global with_openssl 0} %{!?with_openssl: %global with_openssl 0}
%{!?with_virthost: %global with_virthost 0}
%global virt_config --disable-virt
%global crash_config --disable-crash %global crash_config --disable-crash
%global dyninst_config --without-dyninst %global dyninst_config --without-dyninst
%endif %endif
%define initdir %{_initddir}
%define udevrulesdir /usr/lib/udev/rules.d %define udevrulesdir /usr/lib/udev/rules.d
%define dracutstap %{_prefix}/lib/dracut/modules.d/99stap %define dracutstap %{_prefix}/lib/dracut/modules.d/99stap
%define dracutbindir /sbin %define dracutbindir /sbin
@ -27,22 +22,23 @@
Name: systemtap Name: systemtap
Version: 4.1 Version: 4.1
Release: 2 Release: 3
Summary: Linux trace and probe tool Summary: Linux trace and probe tool
License: GPLv2+ and Public Domain 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 Source: https://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz
Patch9000: fix-py3example-script-run-fail.patch Patch0: fix-py3example-script-run-fail.patch
Patch9001: fix-py3example-script-run-fail-2.patch Patch1: fix-py3example-script-run-fail-2.patch
Patch9002: fix-network-tcp-test.patch Patch2: fix-network-tcp-test.patch
BuildRequires: emacs gcc-c++ gettext-devel jpackage-utils java-devel BuildRequires: gcc-c++ emacs systemd python3-setuptools
BuildRequires: readline-devel rpm-devel systemd pkgconfig(nss) BuildRequires: gettext-devel rpm-devel readline-devel
BuildRequires: pkgconfig(avahi-client) pkgconfig(json-c) pkgconfig(ncurses) BuildRequires: pkgconfig(nss) pkgconfig(avahi-client)
BuildRequires: python3-devel python3-setuptools nss-devel avahi-devel BuildRequires: pkgconfig(ncurses) pkgconfig(json-c)
BuildRequires: sqlite-devel > 3.7 BuildRequires: jpackage-utils python3-devel
BuildRequires: elfutils-devel >= 0.142 BuildRequires: elfutils-devel >= 0.142
BuildRequires: sqlite-devel > 3.7
%if %{with_dyninst} %if %{with_dyninst}
BuildRequires: dyninst-devel >= 8.0 BuildRequires: dyninst-devel >= 8.0
BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(libselinux)
@ -50,54 +46,9 @@ BuildRequires: pkgconfig(libselinux)
%if %{with_crash} %if %{with_crash}
BuildRequires: crash-devel zlib-devel BuildRequires: crash-devel zlib-devel
%endif %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: systemtap-client = %{version}-%{release}
Requires: shadow-utils openssh-clients python3-pyparsing Requires: systemtap-devel = %{version}-%{release}
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
%description %description
SystemTap is an instrumentation system for systems running Linux. 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 operation of the system. The base systemtap package contains/requires
the components needed to locally develop and execute systemtap scripts. the components needed to locally develop and execute systemtap scripts.
%package runtime-java %package devel
Summary: Systemtap java runtime Summary: Programmable system-wide instrumentation system - development headers, tools
License: GPLv2+ License: GPLv2+
Requires: %{name} = %{version}-%{release} Requires: gcc make kernel-devel systemd
Requires: byteman > 2.0
Requires: iproute
%description runtime-java %description devel
Systemtap for java runtime support 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 %package server
Summary: Systemtap python 3 runtime Summary: Instrumentation System Server
License: GPLv2+ 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 %description server
Systemtap for python3 runtime support 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 %package sdt-devel
Summary: Development package for systemtap Summary: Static probe support tools
License: GPLv2+ and Public Domain License: GPLv2+ and Public Domain
Requires: python3-pyparsing Requires: python3-pyparsing
%description sdt-devel %description sdt-devel
The sdt-development package for systemtap. This package includes the <sys/sdt.h> header file used for static
instrumentation compiled into userspace programs and libraries, along
%package help with the optional dtrace-compatibility preprocessor to process related
Summary: Help documents for systemtap .d files into tracing-macro-laden .h headers.
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.
%package testsuite %package testsuite
Summary: Instrumentation System Testsuite Summary: Instrumentation System Testsuite
License: GPLv2+ License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap = %{version}-%{release} 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: dejagnu which elfutils grep nc
Requires: gcc gcc-c++ make glibc-devel Requires: gcc gcc-c++ make glibc-devel
Requires: strace Requires: strace nc avahi perf
Requires: nmap-ncat Requires: systemtap-runtime-python3 = %{version}-%{release}
Requires: avahi
%if %{with_crash} %if %{with_crash}
Requires: crash Requires: crash
%endif %endif
Requires: systemtap-runtime-java = %{version}-%{release}
Requires: systemtap-runtime-python3 = %{version}-%{release}
Requires: perf
%description testsuite %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 %prep
%autosetup %{?setup_elfutils} -p1 %setup -q %{?setup_elfutils}
%build %build
%configure \ %configure \
%{dyninst_config} \ %{dyninst_config} \
%{crash_config} \ %{crash_config} \
%{virt_config} \ --with-bpf \
--enable-sqlite \ --disable-httpd \
--enable-pie \ --with-dracutstap=%{dracutstap} \
--with-rpm \ --with-dracutbindir=%{dracutbindir} \
--with-java=%{_jvmdir}/java \ --with-python3 \
--with-dracutstap=%{dracutstap} \ --with-python3-probes \
--with-dracutbindir=%{dracutbindir} \ --enable-pie \
--with-python3 \ --with-rpm \
--without-python2-probes \ --enable-sqlite \
--with-python3-probes \ --disable-silent-rules \
--disable-httpd \ --with-extra-version="rpm %{version}-%{release}"
--with-bpf \
--disable-silent-rules \
--with-extra-version="rpm %{version}-%{release}"
%make_build %make_build
%{_emacs_bytecompile} emacs/systemtap-mode.el %{_emacs_bytecompile} emacs/systemtap-mode.el
%install %install
rm -rf ${RPM_BUILD_ROOT} rm -rf ${RPM_BUILD_ROOT}
%make_install make DESTDIR=$RPM_BUILD_ROOT install
%find_lang %{name} %find_lang %{name}
for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do
dir=$(echo $dir | sed -e "s|^$RPM_BUILD_ROOT||") dir=$(echo $dir | sed -e "s|^$RPM_BUILD_ROOT||")
lang=$(basename $dir) lang=$(basename $dir)
echo "%%lang($lang) $dir/man*/*" >> %{name}.lang echo "%%lang($lang) $dir/man*/*" >> %{name}.lang
done 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%{_sysconfdir}/stap-server
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/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}/lib/stap-server/.systemtap
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/stap-server 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}/cache/systemtap
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/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/conf.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemtap/script.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%{dracutstap}
mkdir -p $RPM_BUILD_ROOT%{udevrulesdir} install -p -m 755 initscript/99stap/module-setup.sh $RPM_BUILD_ROOT%{dracutstap}
install -D -m 755 stap-prep $RPM_BUILD_ROOT%{_bindir}/stap-prep install -p -m 755 initscript/99stap/install $RPM_BUILD_ROOT%{dracutstap}
install -D -m 644 macros.systemtap $RPM_BUILD_ROOT%{_rpmmacrodir}/macros.systemtap install -p -m 755 initscript/99stap/check $RPM_BUILD_ROOT%{dracutstap}
install -D -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server install -p -m 755 initscript/99stap/start-staprun.sh $RPM_BUILD_ROOT%{dracutstap}
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
touch $RPM_BUILD_ROOT%{dracutstap}/params.conf touch $RPM_BUILD_ROOT%{dracutstap}/params.conf
touch $RPM_BUILD_ROOT%{_unitdir}/systemtap.service
%pre mkdir -p $RPM_BUILD_ROOT/stap-exporter
getent group stapusr >/dev/null || groupadd -r stapusr install -p -m 755 stap-exporter/stap-exporter $RPM_BUILD_ROOT%{_bindir}
getent group stapsys >/dev/null || groupadd -r stapsys install -m 644 stap-exporter/stap-exporter.service $RPM_BUILD_ROOT%{_unitdir}
getent group stapdev >/dev/null || groupadd -r stapde install -m 644 stap-exporter/stap-exporter.8* $RPM_BUILD_ROOT%{_mandir}/man8
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
%post %pre runtime
test -e ~stap-server && chmod 750 ~stap-server getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr
if [ ! -f ~stap-server/.systemtap/rc ]; then getent group stapsys >/dev/null || groupadd -g 157 -r stapsys 2>/dev/null || groupadd -r stapsys
mkdir -p ~stap-server/.systemtap getent group stapdev >/dev/null || groupadd -g 158 -r stapdev 2>/dev/null || groupadd -r stapdev
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
exit 0 exit 0
%postun %pre server
if [ "$1" -ge "1" ] ; then getent group stap-server >/dev/null || groupadd -g 155 -r stap-server 2>/dev/null || groupadd -r stap-server
/bin/systemctl condrestart stap-server.service >/dev/null 2>&1 || : getent passwd stap-server >/dev/null || \
fi useradd -c "Systemtap Compile Server" -u 155 -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server 2>/dev/null || \
if [ "$1" -ge "1" ]; then useradd -c "Systemtap Compile Server" -g stap-server -d %{_localstatedir}/lib/stap-server -r -s /sbin/nologin stap-server
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 testsuite %pre testsuite
getent passwd stapusr >/dev/null || \ 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 useradd -c "Systemtap 'stapdev' User" -g stapdev -G stapusr -r -s /sbin/nologin stapdev
exit 0 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 test -e %{_localstatedir}/log/stap-server/log || {
for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do touch %{_localstatedir}/log/stap-server/log
arch=`basename $f | cut -f2 -d_ | cut -f1 -d.` chmod 644 %{_localstatedir}/log/stap-server/log
for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do chown stap-server:stap-server %{_localstatedir}/log/stap-server/log
if [ -d ${archdir} ]; then }
ln -sf %{_libexecdir}/systemtap/libHelperSDT_${arch}.so ${archdir}/libHelperSDT_${arch}.so /bin/systemd-tmpfiles --create %{_tmpfilesdir}/stap-server.conf >/dev/null 2>&1 || :
ln -sf %{_libexecdir}/systemtap/HelperSDT.jar ${archdir}/../ext/HelperSDT.jar exit 0
fi
done
done
%triggerun -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk %triggerin client -- systemtap-server
for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do if test -e ~stap-server/.systemtap/ssl/server/stap.cert; then
arch=`basename $f | cut -f2 -d_ | cut -f1 -d.` %{_libexecdir}/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/ssl/client >/dev/null
for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do %{_libexecdir}/systemtap/stap-authorize-cert ~stap-server/.systemtap/ssl/server/stap.cert %{_sysconfdir}/systemtap/staprun >/dev/null
rm -f ${archdir}/libHelperSDT_${arch}.so fi
rm -f ${archdir}/../ext/HelperSDT.jar exit 0
done
done
%triggerpostun -- java-1.8.0-openjdk, java-1.7.0-openjdk, java-1.6.0-openjdk %preun server
for f in %{_libexecdir}/systemtap/libHelperSDT_*.so; do if [ $1 = 0 ] ; then
arch=`basename $f | cut -f2 -d_ | cut -f1 -d.` /bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || :
for archdir in %{_jvmdir}/*openjdk*/jre/lib/${arch}; do /bin/systemctl stop stap-server.service >/dev/null 2>&1 || :
if [ -d ${archdir} ]; then fi
ln -sf %{_libexecdir}/systemtap/libHelperSDT_${arch}.so ${archdir}/libHelperSDT_${arch}.so exit 0
ln -sf %{_libexecdir}/systemtap/HelperSDT.jar ${archdir}/../ext/HelperSDT.jar
fi %postun server
done if [ "$1" -ge "1" ] ; then
done /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 %files
%{_bindir}/* %license COPYING
%{_sbindir}/* %doc README README.unprivileged AUTHORS NEWS
%{_libdir}/python3.7/site-packages/* %defattr(-,root,root)
%{_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
%{_unitdir}/systemtap.service %{_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 %{_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_sitelispdir}/*.el*
%{_emacs_sitestartdir}/systemtap-init.el %{_emacs_sitestartdir}/systemtap-init.el
%config(noreplace) %{_sysconfdir}/logrotate.d/stap-server %{_datadir}/vim/vimfiles/*/*.vim
%config(noreplace) %{_sysconfdir}/systemtap/config %{_libexecdir}/systemtap/python/stap-resolve-module-function.py
%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
%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 %dir %{_libexecdir}/systemtap
%{_libexecdir}/systemtap/libHelperSDT_*.so %{_libexecdir}/systemtap/stapio
%{_libexecdir}/systemtap/HelperSDT.jar %{_libexecdir}/systemtap/stap-authorize-cert
%{_libexecdir}/systemtap/stapbm %{!?_licensedir:%global license %%doc}
%if %{with_dyninst}
%{_bindir}/stapdyn
%endif
%if %{with_crash}
%dir %{_libdir}/systemtap
%{_libdir}/systemtap/staplog.so*
%endif
%files runtime-python3 %files client -f systemtap.lang
%{python3_sitearch}/HelperSDT %defattr(-,root,root)
%{python3_sitearch}/HelperSDT-*.egg-info %{_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 %files sdt-devel
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/dtrace %{_bindir}/dtrace
%{_includedir}/sys/sdt.h %{_includedir}/sys/sdt.h
%{_includedir}/sys/sdt-config.h %{_includedir}/sys/sdt-config.h
%{_mandir}/man1/dtrace.1*
%{_rpmmacrodir}/macros.systemtap %{_rpmmacrodir}/macros.systemtap
%doc README AUTHORS NEWS %{!?_licensedir:%global license %%doc}
%license COPYING
%files testsuite %files testsuite
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/systemtap %dir %{_datadir}/systemtap
%{_datadir}/systemtap/testsuite %{_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 %files help
%{_mandir}/man1/* %{_mandir}/man[1378]/*
%{_mandir}/man3/*
%{_mandir}/man7/*
%{_mandir}/man8/*
%{_datadir}/doc/*
%exclude %{_mandir}/man1/dtrace.1*
%files lang -f systemtap.lang
%changelog %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 * Fri Feb 21 2020 yuxiangyang <yuxiangyang4@huawei.com> - 4.1.2
- Delete the requirement of python2-pyparsing - Delete the requirement of python2-pyparsing
* Mon Aug 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.1.1 * Mon Aug 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.1.1
- Package init - Package init