updte user/group management using sysusers files for rpm 4.19; other server scripts improvements [release 5.1-4mamba;Sat May 18 2024]
This commit is contained in:
parent
33077767a4
commit
3972a5a14c
7
systemtap-sysusers-runtime.conf
Normal file
7
systemtap-sysusers-runtime.conf
Normal file
@ -0,0 +1,7 @@
|
||||
# See systemd-sysusers(8) sysusers.d(5)
|
||||
g stapusr -
|
||||
g stapsys -
|
||||
g stapdev -
|
||||
g stapunpriv -
|
||||
u stapunpriv - "systemtap unprivileged user" /var/lib/stapunpriv /sbin/nologin
|
||||
m stapunpriv stapunpriv
|
4
systemtap-sysusers-server.conf
Normal file
4
systemtap-sysusers-server.conf
Normal file
@ -0,0 +1,4 @@
|
||||
# See systemd-sysusers(8) sysusers.d(5)
|
||||
g stap-server 155
|
||||
u stap-server 155 "systemtap compiler server" /var/lib/stap-server /sbin/nologin
|
||||
m stap-server stap-server
|
@ -1,11 +1,7 @@
|
||||
%define with_docs 0
|
||||
%if %with_docs
|
||||
%define with_publican 0
|
||||
%endif
|
||||
|
||||
Name: systemtap
|
||||
Version: 5.1
|
||||
Release: 2mamba
|
||||
Release: 4mamba
|
||||
Summary: An instrumentation system for Linux systems
|
||||
Group: System/Tools
|
||||
Vendor: openmamba
|
||||
@ -13,6 +9,8 @@ Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: https://sourceware.org/systemtap/
|
||||
Source0: http://sourceware.org/systemtap/ftp/releases/systemtap-%{version}.tar.gz
|
||||
Source1: systemtap-sysusers-runtime.conf
|
||||
Source2: systemtap-sysusers-server.conf
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
@ -37,7 +35,7 @@ BuildRequires: perl-DBI
|
||||
BuildRequires: perl-HTML-Parser
|
||||
BuildRequires: perl-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: librpm-devel >= 4.16.1.2-1mamba
|
||||
BuildRequires: librpm-devel >= 4.19.1.1-2mamba
|
||||
BuildRequires: libnss-tools
|
||||
BuildRequires: crash-devel
|
||||
BuildRequires: libz-devel
|
||||
@ -51,9 +49,6 @@ BuildRequires: latex2html
|
||||
BuildRequires: tetex-dvips
|
||||
BuildRequires: tetex-latex
|
||||
BuildRequires: xmlto
|
||||
#%if %with_publican
|
||||
#TODO BuildRequires: publican
|
||||
#%endif
|
||||
%endif
|
||||
Requires: gcc
|
||||
# suggest kernel debuginfo
|
||||
@ -113,7 +108,6 @@ Group: System/Tools
|
||||
Summary: Instrumentation System Server
|
||||
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
Requires: %{name}-runtime = %{?epoch:%epoch:}%{version}-%{release}
|
||||
#Requires: avahi
|
||||
Requires: coreutils
|
||||
Requires: libnss
|
||||
Requires: libnss-tools
|
||||
@ -153,10 +147,6 @@ Python bindings to Systemtap.
|
||||
--enable-crash \
|
||||
%if %with_docs
|
||||
--enable-docs \
|
||||
%if %with_publican
|
||||
--enable-publican \
|
||||
--with-publican-brand=openmamba \
|
||||
%endif
|
||||
%else
|
||||
--disable-docs \
|
||||
%endif
|
||||
@ -187,20 +177,19 @@ cp -rp testsuite %{buildroot}%{_datadir}/systemtap
|
||||
mkdir docs.installed
|
||||
mv %{buildroot}%{_datadir}/doc/systemtap/*.pdf docs.installed/
|
||||
mv %{buildroot}%{_datadir}/doc/systemtap/tapsets docs.installed/
|
||||
%if %with_publican
|
||||
mv %{buildroot}%{_datadir}/doc/systemtap/SystemTap_Beginners_Guide docs.installed/
|
||||
%endif
|
||||
%endif
|
||||
|
||||
#install -m 755 initscript/stap-server %{buildroot}%{_sysconfdir}/rc.d/init.d/
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/stap-server
|
||||
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/systemtap-runtime.conf
|
||||
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/systemtap-server.conf
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/stap-server/conf.d
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||
install -m 644 initscript/config.stap-server %{buildroot}%{_sysconfdir}/sysconfig/stap-server
|
||||
install -D -m 644 initscript/systemtap.service %{buildroot}%{_unitdir}/systemtap.service
|
||||
install -D -m 644 initscript/logrotate.stap-server %{buildroot}%{_sysconfdir}/logrotate.d/stap-server
|
||||
install -D -m 644 stap-server.service %{buildroot}%{_unitdir}/stap-server.service
|
||||
install -D -m 644 stap-server.conf %{buildroot}%{_tmpfilesdir}/stap-server.conf
|
||||
|
||||
mkdir -p %{buildroot}%{_localstatedir}/log/stap-server
|
||||
touch %{buildroot}%{_localstatedir}/log/stap-server/log
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
||||
install -m 644 initscript/logrotate.stap-server %{buildroot}%{_sysconfdir}/logrotate.d/stap-server
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
@ -211,16 +200,12 @@ install -m 644 initscript/logrotate.stap-server %{buildroot}%{_sysconfdir}/logro
|
||||
getent group stap-server >/dev/null || groupadd -g 155 -r stap-server || groupadd -r stap-server
|
||||
|
||||
%pre runtime
|
||||
getent group stapdev >/dev/null || groupadd -r stapdev
|
||||
getent group stapusr >/dev/null || groupadd -r stapusr
|
||||
exit 0
|
||||
%sysusers_create_compat %{SOURCE1}
|
||||
:
|
||||
|
||||
%pre server
|
||||
getent passwd stap-server >/dev/null || \
|
||||
/usr/sbin/useradd -c "Systemtap Compile Server" -u 155 -g stap-server -d %{_localstatedir}/lib/stap-server -m -r -s /sbin/nologin stap-server || \
|
||||
/usr/sbin/useradd -c "Systemtap Compile Server" -g stap-server -d %{_localstatedir}/lib/stap-server -m -r -s /sbin/nologin stap-server
|
||||
test -e ~stap-server && chmod 755 ~stap-server
|
||||
exit 0
|
||||
%sysusers_create_compat %{SOURCE2}
|
||||
:
|
||||
|
||||
%post server
|
||||
test -e %{_localstatedir}/log/stap-server/log || {
|
||||
@ -231,7 +216,6 @@ chown stap-server:stap-server %{_localstatedir}/log/stap-server/log
|
||||
|
||||
if test ! -e ~stap-server/.systemtap/ssl/server/stap.cert; then
|
||||
runuser -s /bin/sh - stap-server -c %{_libexecdir}/%{name}/stap-gen-cert >/dev/null
|
||||
|
||||
%{_bindir}/stap-authorize-server-cert ~stap-server/.systemtap/ssl/server/stap.cert
|
||||
%{_bindir}/stap-authorize-signing-cert ~stap-server/.systemtap/ssl/server/stap.cert
|
||||
fi
|
||||
@ -259,6 +243,7 @@ fi
|
||||
%{_libexecdir}/systemtap/HelperSDT.jar
|
||||
%{_libexecdir}/systemtap/stapbm
|
||||
%{_libexecdir}/systemtap/libHelperSDT.so
|
||||
%{_unitdir}/systemtap.service
|
||||
%dir %{_datadir}/systemtap
|
||||
%dir %{_datadir}/systemtap/interactive-notebook
|
||||
%{_datadir}/systemtap/interactive-notebook/*
|
||||
@ -291,6 +276,7 @@ fi
|
||||
%{_libexecdir}/systemtap/stap-env
|
||||
%{_libexecdir}/systemtap/stap-authorize-cert
|
||||
%{_libdir}/systemtap/staplog.so*
|
||||
%{_sysusersdir}/systemtap-runtime.conf
|
||||
%{_mandir}/man8/staprun.8*
|
||||
|
||||
%files sdt-devel
|
||||
@ -301,13 +287,10 @@ fi
|
||||
%dir %{_datadir}/systemtap/examples/
|
||||
%{_datadir}/systemtap/examples/*
|
||||
%{_mandir}/man1/dtrace.1*
|
||||
#%doc NEWS
|
||||
%if %with_docs
|
||||
%doc docs.installed/*.pdf
|
||||
%doc docs.installed/tapsets
|
||||
%if %with_publican
|
||||
%doc docs.installed/SystemTap_Beginners_Guide
|
||||
%endif
|
||||
#%doc NEWS
|
||||
%endif
|
||||
|
||||
%files exporter
|
||||
@ -331,7 +314,9 @@ fi
|
||||
%{_libexecdir}/systemtap/stap-stop-server
|
||||
%{_libexecdir}/systemtap/stap-gen-cert
|
||||
%{_libexecdir}/systemtap/stap-sign-module
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/stap-server
|
||||
%{_sysusersdir}/systemtap-server.conf
|
||||
%{_tmpfilesdir}/stap-server.conf
|
||||
%{_unitdir}/stap-server.service
|
||||
%dir %attr(0755,stap-server,stap-server) %{_localstatedir}/log/stap-server
|
||||
%ghost %config %attr(0644,stap-server,stap-server) %{_localstatedir}/log/stap-server/log
|
||||
%{_mandir}/man7/error::*.7stap*
|
||||
@ -352,6 +337,12 @@ fi
|
||||
%{_libexecdir}/systemtap/python/stap-resolve-module-function.py
|
||||
|
||||
%changelog
|
||||
* Sat May 18 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1-4mamba
|
||||
- updte user/group management using sysusers files for rpm 4.19; other server scripts improvements
|
||||
|
||||
* Thu May 16 2024 Automatic Build System <autodist@mambasoft.it> 5.1-3mamba
|
||||
- rebuilt by autoport with build requirements: librpm-devel>=4.19.1.1-2mamba
|
||||
|
||||
* Mon May 13 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1-2mamba
|
||||
- rebuild with only python3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user