]> sourceware.org Git - systemtap.git/commitdiff
systemtap.spec: add stap-exporter package
authorAaron Merey <amerey@redhat.com>
Fri, 10 Aug 2018 17:15:45 +0000 (13:15 -0400)
committerAaron Merey <amerey@redhat.com>
Fri, 10 Aug 2018 17:16:29 +0000 (13:16 -0400)
systemtap.spec

index 55d787a50a0a2e1bbb7c9f91171d749936d3a708..c5071523835dbee3755ad8bc4ff6ed5093118c3c 100644 (file)
@@ -462,6 +462,20 @@ This package includes support files needed to run systemtap scripts
 that probe python 3 processes.
 %endif
 
+%if %{with_python3}
+%package stap-exporter
+Summary: Systemtap-prometheus interoperation mechanism
+Group: Development/System
+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.
+%endif
+
 %if %{with_virthost}
 %package runtime-virthost
 Summary: Systemtap Cross-VM Instrumentation - host
@@ -760,6 +774,13 @@ done
    touch $RPM_BUILD_ROOT%{dracutstap}/params.conf
 %endif
 
+%if %{with_python3}
+   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
+%endif
+
 %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
@@ -935,6 +956,13 @@ if [ "$1" -ge "1" ]; then
 fi
 exit 0
 
+%if %{with_python3}
+%preun stap-exporter
+/bin/systemctl stop stap-exporter.service >/dev/null 2>&1 || :
+/bin/systemctl disable stap-exporter.service >/dev/null 2>&1 || :
+%endif
+
+
 %post
 # Remove any previously-built uprobes.ko materials
 (make -C %{_datadir}/systemtap/runtime/uprobes clean) >/dev/null 2>&1 || true
@@ -1220,6 +1248,13 @@ done
 %endif
 %endif
 
+%if %{with_python3}
+%files stap-exporter
+%{_unitdir}/stap-exporter.service
+%{_mandir}/man8/stap-exporter.8*
+%{_bindir}/stap-exporter
+%endif
+
 # ------------------------------------------------------------------------
 
 # Future new-release entries should be of the form
This page took 0.029609 seconds and 5 git commands to generate.