Revert "Remove sys-kernel-debug-tracing.mount" 94/185494/1
authorjoon.c.baek <joon.c.baek@samsung.com>
Mon, 9 Jul 2018 12:23:11 +0000 (21:23 +0900)
committerjoon.c.baek <joon.c.baek@samsung.com>
Tue, 31 Jul 2018 06:20:27 +0000 (15:20 +0900)
'sys-kernel-debug-tracing.mount' was removed for
resolving 'systemctl --state failed' issue.
However, Add 'Options=remount,rw' to this file,
it can be solution also.

This reverts commit 0a2883bf7940b3ee138551434117d3ea63cbfb2a.

Change-Id: I5d7f4f5236f7212f06f41bd7ddf815c3f548c85a

packaging/sys-kernel-debug-tracing.mount [new file with mode: 0644]
packaging/ttrace-marker.service
packaging/ttrace.spec

diff --git a/packaging/sys-kernel-debug-tracing.mount b/packaging/sys-kernel-debug-tracing.mount
new file mode 100644 (file)
index 0000000..498745a
--- /dev/null
@@ -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
index f000293da60a9ab00c88da9fae658e439919bd36..2578bd9e5f22f3883f98837fff438a6942e60bea 100644 (file)
@@ -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
index 7834636d9398dd45ac3beabdbece2e8b99c4cd2c..f922f600746d57d08c7a1540f36eab0b9ae8a209 100644 (file)
@@ -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