summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/sys-kernel-debug-tracing.mount18
-rw-r--r--packaging/ttrace-marker.service2
-rw-r--r--packaging/ttrace.spec5
3 files changed, 24 insertions, 1 deletions
diff --git a/packaging/sys-kernel-debug-tracing.mount b/packaging/sys-kernel-debug-tracing.mount
new file mode 100644
index 0000000..498745a
--- /dev/null
+++ b/packaging/sys-kernel-debug-tracing.mount
@@ -0,0 +1,18 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Trace File System
+DefaultDependencies=no
+ConditionCapability=CAP_SYS_RAWIO
+Before=sysinit.target
+
+[Mount]
+What=tracefs
+Where=/sys/kernel/debug/tracing
+Type=tracefs
+Options=remount,rw
diff --git a/packaging/ttrace-marker.service b/packaging/ttrace-marker.service
index f000293..2578bd9 100644
--- a/packaging/ttrace-marker.service
+++ b/packaging/ttrace-marker.service
@@ -1,7 +1,7 @@
[Unit]
Description=T-trace marker
DefaultDependencies=no
-After=tmp.mount
+After=tmp.mount sys-kernel-debug-tracing.mount
[Service]
SmackProcessLabel=System
diff --git a/packaging/ttrace.spec b/packaging/ttrace.spec
index 7834636..f922f60 100644
--- a/packaging/ttrace.spec
+++ b/packaging/ttrace.spec
@@ -6,6 +6,7 @@ Group: System/Libraries
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
SOURCE100: packaging/ttrace.conf
+SOURCE101: packaging/sys-kernel-debug-tracing.mount
SOURCE102: packaging/ttrace-marker.service
SOURCE103: packaging/atrace-bootup.sh
@@ -63,10 +64,12 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}/usr/lib/tmpfiles.d
install -m 0644 %{SOURCE100} %{buildroot}/usr/lib/tmpfiles.d/ttrace.conf
+install -m 0644 %{SOURCE101} %{buildroot}%{_unitdir}
install -m 0644 %{SOURCE102} %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_bindir}
cp %{SOURCE103} %{buildroot}%{_bindir}
%install_service sysinit.target.wants ttrace-marker.service
+%install_service sysinit.target.wants sys-kernel-debug-tracing.mount
%post -p /sbin/ldconfig
@@ -77,9 +80,11 @@ cp %{SOURCE103} %{buildroot}%{_bindir}
%defattr(-,root,root,-)
%{_libdir}/libttrace.so.*
%{_unitdir}/ttrace-marker.service
+%{_unitdir}/sys-kernel-debug-tracing.mount
%attr(755,root,users) %{_bindir}/atrace
%attr(755,root,users) %{_bindir}/atrace-1.1
%{_unitdir}/sysinit.target.wants/ttrace-marker.service
+%{_unitdir}/sysinit.target.wants/sys-kernel-debug-tracing.mount
%attr(755,root,root) %{_bindir}/atrace-bootup.sh
/usr/lib/tmpfiles.d/ttrace.conf
%license LICENSE