From 0c9097bb47d79a95de13e4e54c048cf4c43f159b Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Thu, 9 Aug 2018 08:58:38 +0200 Subject: [PATCH] log_dump: Rework service file This commit adjusts log_dump systemd service to provide normal dbus-type unit. Additionally, unused and erroneous "ENGINEER_MODE" is removed. Change-Id: I049952ab19d1e6a0b8ee8319cedb83226037814f --- packaging/crash-worker.spec | 3 +-- src/log_dump/CMakeLists.txt | 4 ---- src/log_dump/log_dump.service.m4 | 16 ++++------------ 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/packaging/crash-worker.spec b/packaging/crash-worker.spec index cf126d7..24c4723 100644 --- a/packaging/crash-worker.spec +++ b/packaging/crash-worker.spec @@ -90,7 +90,6 @@ This package contains installable tests in Bash. cp %{SOURCE1001} . export CFLAGS+=" -Werror" -export CFLAGS+=" -DTIZEN_ENGINEER_MODE" %ifarch %{arm} aarch64 %define ARCH arm @@ -189,7 +188,7 @@ sed -i "/${pattern}/D" %{_sysconfdir}/ld.so.preload %dir %{crash_all_log} %{crash_dump_gen}/* %attr(0750,system_fw,system_fw) %{_bindir}/* -%attr(0644,system_fw,system_share) %{_unitdir}/log_dump.service +%{_unitdir}/log_dump.service %{TZ_SYS_ETC}/crash-manager.conf %attr(-,root,root) %{_sysconfdir}/dbus-1/system.d/log_dump.conf %attr(-,root,root) %{_prefix}/lib/sysctl.d/99-crash-manager.conf diff --git a/src/log_dump/CMakeLists.txt b/src/log_dump/CMakeLists.txt index 0cac32e..fcceff5 100644 --- a/src/log_dump/CMakeLists.txt +++ b/src/log_dump/CMakeLists.txt @@ -24,10 +24,6 @@ ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE") -IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_ENGINEER_MODE") - SET(M4_DEFINES ${M4_DEFINES} -DUSE_ENGINEER_MODE) -ENDIF() - CONFIGURE_FILE(log_dump.h.in log_dump.h @ONLY) ADD_EXECUTABLE(${PROJECT_NAME} ${LOG_DUMP_SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${log_dump_pkgs_LDFLAGS} -pie) diff --git a/src/log_dump/log_dump.service.m4 b/src/log_dump/log_dump.service.m4 index 07b024c..be46f63 100644 --- a/src/log_dump/log_dump.service.m4 +++ b/src/log_dump/log_dump.service.m4 @@ -2,18 +2,10 @@ Description=log_dump service [Service] +Type=dbus +BusName=org.tizen.system.crash +ExecStart=/usr/bin/log_dump --dbus SmackProcessLabel=System -Type=oneshot +SupplementaryGroups=log systemd-journal Nice=-5 KillMode=process -ExecStart=/usr/bin/log_dump --dbus -m4_ifdef(`USE_ENGINEER_MODE', -User=root -Group=root, -User=system_fw -Group=system_fw -SecureBits=keep-caps -Capabilities=cap_sys_ptrace=eip -CapabilityBoundingSet=CAP_SYS_PTRACE -) -SupplementaryGroups=log systemd-journal -- 2.7.4