Change the crash-service to the bugreport-service 00/254100/4
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Tue, 23 Feb 2021 09:40:57 +0000 (10:40 +0100)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Tue, 9 Mar 2021 11:48:26 +0000 (12:48 +0100)
Change-Id: Ieea6c499a279f8bbe6c61232bbc49c4f0f768691

20 files changed:
CMakeLists.txt
packaging/crash-worker.spec
src/bugreport-service/CMakeLists.txt [moved from src/crash-service/CMakeLists.txt with 63% similarity]
src/bugreport-service/bugreport-service.c [moved from src/crash-service/crash-service.c with 99% similarity]
src/bugreport-service/bugreport-service.conf [moved from src/crash-service/crash-service.conf with 100% similarity]
src/bugreport-service/bugreport.pc.in [moved from src/crash-service/crash-service.pc.in with 58% similarity]
src/bugreport-service/bugreport.service.m4 [moved from src/crash-service/crash-service.service.m4 with 90% similarity]
src/bugreport-service/diagnostics/diagnostics-run.conf [moved from src/crash-service/diagnostics/diagnostics-run.conf with 100% similarity]
src/bugreport-service/diagnostics/diagnostics.c [moved from src/crash-service/diagnostics/diagnostics.c with 100% similarity]
src/bugreport-service/diagnostics/diagnostics.h [moved from src/crash-service/diagnostics/diagnostics.h with 100% similarity]
src/bugreport-service/diagnostics/org.tizen.system.diagnostics.service [moved from src/crash-service/diagnostics/org.tizen.system.diagnostics.service with 64% similarity]
src/bugreport-service/libbugreport-service.c [moved from src/crash-service/libcrash-service.c with 98% similarity]
src/bugreport-service/libbugreport.h [moved from src/crash-service/libcrash-service.h with 92% similarity]
src/bugreport-service/org.tizen.system.crash.livedump.service [moved from src/crash-service/org.tizen.system.crash.livedump.service with 65% similarity]
src/crash-manager/main.c
tests/system/CMakeLists.txt
tests/system/libbugreport-service/libbugreport-service.sh.template [moved from tests/system/libcrash-service/libcrash-service.sh.template with 90% similarity]
tests/system/libbugreport-service_systemstate/libbugreport-service_systemstate.sh.template [moved from tests/system/libcrash-service_systemstate/libcrash-service_systemstate.sh.template with 88% similarity]
tests/system/utils/CMakeLists.txt
tests/system/utils/libbugreport-servicetest.c [moved from tests/system/utils/libcrash-servicetest.c with 97% similarity]

index c8b6ede..8b9605f 100644 (file)
@@ -7,7 +7,7 @@ ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1)
 
 # Sub modules
 ADD_SUBDIRECTORY(include)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src/crash-service)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src/bugreport-service)
 
 ADD_SUBDIRECTORY(src/crash-manager)
 ADD_SUBDIRECTORY(src/crash-stack)
@@ -20,9 +20,9 @@ ENDIF()
 
 IF("${CRASH_SERVICE}" STREQUAL "ON")
        if (NOT "${LIVEDUMPER}" STREQUAL "ON")
-               message(FATAL_ERROR "Livedumper is required to build crash-service")
+               message(FATAL_ERROR "Livedumper is required to build bugreport-service")
        ENDIF()
-       ADD_SUBDIRECTORY(src/crash-service)
+       ADD_SUBDIRECTORY(src/bugreport-service)
 ENDIF()
 
 ADD_SUBDIRECTORY(tests)
index 8d0570c..0a4b00b 100644 (file)
@@ -3,11 +3,11 @@
 
 %define _with_tests on
 %define _with_livedumper on
-%define _with_crashservice on
+%define _with_bugreportservice on
 %bcond_with doc
 %bcond_with tests
 %bcond_with livedumper
-%bcond_with crashservice
+%bcond_with bugreportservice
 
 # NOTE: To disable coredump set DumpCore=0 in configuration file
 
@@ -48,17 +48,17 @@ Requires:       zip
 Requires:       libdw
 Requires:       minicoredumper >= 2.1.0
 Requires:       %{_bindir}/buxton2ctl
-%if %{with crashservice}
+%if %{with bugreportservice}
 Requires:       %{name}-livedumper = %{version}-%{release}
 %endif
 %description
 
-%package -n     libcrash-service
-Summary:        libcrash-service provides API to communicate with crash-service
-%description -n libcrash-service
+%package -n     libbugreport
+Summary:        libbugreport provides API to communicate with bugreport-service
+%description -n libbugreport
 
 %package        devel
-Requires:       libcrash-service
+Requires:       libbugreport
 Summary:        Crash-manager headers and library for linking
 %description    devel
 
@@ -145,7 +145,7 @@ export CFLAGS+=" -Werror"
           -DCRASH_TESTS_PATH=%{_libexecdir}/crash-worker/tests \
           -DCRASH_SYSTEM_TESTS_PATH=%{_libexecdir}/crash-worker/system-tests \
           -DLIVEDUMPER=%{on_off livedumper} \
-          -DCRASH_SERVICE=%{on_off crashservice} \
+          -DCRASH_SERVICE=%{on_off bugreportservice} \
           -DUPGRADE_SCRIPT_PATH=%{upgrade_script_path} \
           -DLOGGER=dlog \
           -DDLOG_LOG_LEVEL=DLOG_INFO \
@@ -197,10 +197,10 @@ fi
 %{_libexecdir}/crash-notify-send
 %{_libdir}/libcrash-manager.so.*
 
-%if %{with crashservice}
-%attr(0750,crash_worker,crash_worker) %{_bindir}/crash-service
-%attr(-,root,root) %{_unitdir}/crash-service.service
-%attr(-,root,root) %{_sysconfdir}/dbus-1/system.d/crash-service.conf
+%if %{with bugreportservice}
+%attr(0750,crash_worker,crash_worker) %{_bindir}/bugreport-service
+%attr(-,root,root) %{_unitdir}/bugreport.service
+%attr(-,root,root) %{_sysconfdir}/dbus-1/system.d/bugreport-service.conf
 %attr(-,root,root) %{_datadir}/dbus-1/system-services/org.tizen.system.crash.livedump.service
 %attr(-,root,root) %{_datadir}/dbus-1/system-services/org.tizen.system.diagnostics.service
 %attr(0644,root,root) %{_prefix}/lib/tmpfiles.d/diagnostics-run.conf
@@ -209,17 +209,17 @@ fi
 #upgrade script
 %attr(-,root,root) %{upgrade_script_path}/500.crash-manager-upgrade.sh
 
-%files -n libcrash-service
-%{_libdir}/libcrash-service.so.*
+%files -n libbugreport
+%{_libdir}/libbugreport.so.*
 
 %files devel
 %{_includedir}/crash-manager.h
 %{_libdir}/libcrash-manager.so
 %{_libdir}/pkgconfig/crash-manager.pc
-%if %{with crashservice}
-%{_includedir}/libcrash-service.h
-%{_libdir}/libcrash-service.so
-%{_libdir}/pkgconfig/crash-service.pc
+%if %{with bugreportservice}
+%{_includedir}/libbugreport.h
+%{_libdir}/libbugreport.so
+%{_libdir}/pkgconfig/bugreport.pc
 %endif
 
 %if %{with doc}
@@ -268,8 +268,8 @@ fi
 %{_libexecdir}/crash-worker/system-tests/extra_script/extra_script.sh
 %{_libexecdir}/crash-worker/system-tests/full_core/full_core.sh
 %{_libexecdir}/crash-worker/system-tests/info_file/info_file.sh
-%{_libexecdir}/crash-worker/system-tests/libcrash-service/libcrash-service.sh
-%{_libexecdir}/crash-worker/system-tests/libcrash-service_systemstate/libcrash-service_systemstate.sh
+%{_libexecdir}/crash-worker/system-tests/libbugreport-service/libbugreport-service.sh
+%{_libexecdir}/crash-worker/system-tests/libbugreport-service_systemstate/libbugreport-service_systemstate.sh
 %{_libexecdir}/crash-worker/system-tests/log_file/log_file.sh
 %{_libexecdir}/crash-worker/system-tests/output_param/output_param.sh
 %{_libexecdir}/crash-worker/system-tests/report_basic/report_basic.sh
@@ -280,7 +280,7 @@ fi
 %{_libexecdir}/crash-worker/system-tests/time_test/time_test.sh
 %{_libexecdir}/crash-worker/system-tests/utils/btee
 %{_libexecdir}/crash-worker/system-tests/utils/kenny
-%{_libexecdir}/crash-worker/system-tests/utils/libcrash-servicetest
+%{_libexecdir}/crash-worker/system-tests/utils/libbugreport-servicetest
 %{_libexecdir}/crash-worker/system-tests/utils/minicore-utils.sh
 %{_libexecdir}/crash-worker/system-tests/wait_for_opt_usr/wait_for_opt_usr.sh
 %{_libexecdir}/crash-worker/system-tests/without_so_info_file/without_so_info_file.sh
similarity index 63%
rename from src/crash-service/CMakeLists.txt
rename to src/bugreport-service/CMakeLists.txt
index c98b8c5..5f6c045 100644 (file)
@@ -1,10 +1,10 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(crash-service C)
+PROJECT(bugreport-service C)
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/)
 
 SET(CRASH_SERVICE_SRCS
-       crash-service.c
+       bugreport-service.c
        diagnostics/diagnostics.c
        )
 
@@ -12,14 +12,14 @@ INCLUDE(GNUInstallDirs)
 
 INCLUDE(FindPkgConfig)
 
-pkg_check_modules(crash-service_pkgs REQUIRED
+pkg_check_modules(bugreport-service_pkgs REQUIRED
        dlog
        gio-2.0
        gio-unix-2.0
        libzip
        )
 
-FOREACH(flag ${crash-service_pkgs_CFLAGS})
+FOREACH(flag ${bugreport-service_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
@@ -30,19 +30,19 @@ INCLUDE(${CMAKE_SOURCE_DIR}/cmake/ProcessM4.cmake)
 LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/crash-manager)
 ADD_EXECUTABLE(${PROJECT_NAME} ${CRASH_SERVICE_SRCS})
 ADD_DEPENDENCIES(${PROJECT_NAME} crash-manager)
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${crash-service_pkgs_LDFLAGS} -pie -lrt -lcrash-manager)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${bugreport-service_pkgs_LDFLAGS} -pie -lrt -lcrash-manager)
 
-ADD_LIBRARY(libcrash-service SHARED libcrash-service.c)
-SET_TARGET_PROPERTIES(libcrash-service PROPERTIES
+ADD_LIBRARY(libbugreport SHARED libbugreport-service.c)
+SET_TARGET_PROPERTIES(libbugreport PROPERTIES
        SOVERSION 1
-       PUBLIC_HEADER libcrash-service.h
-       OUTPUT_NAME crash-service)
+       PUBLIC_HEADER libbugreport.h
+       OUTPUT_NAME bugreport)
 
 PROCESS_M4("${M4_DEFINES}"
-       "${CMAKE_CURRENT_SOURCE_DIR}/crash-service.service.m4"
-       "${CMAKE_CURRENT_SOURCE_DIR}/crash-service.service")
+       "${CMAKE_CURRENT_SOURCE_DIR}/bugreport.service.m4"
+       "${CMAKE_CURRENT_SOURCE_DIR}/bugreport.service")
 
-CONFIGURE_FILE(crash-service.pc.in crash-service.pc @ONLY)
+CONFIGURE_FILE(bugreport.pc.in bugreport.pc @ONLY)
 
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.system.crash.livedump.service
        DESTINATION /usr/share/dbus-1/system-services)
@@ -50,10 +50,10 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.system.crash.livedump.servic
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/diagnostics/org.tizen.system.diagnostics.service
        DESTINATION /usr/share/dbus-1/system-services)
 
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/crash-service.conf
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bugreport-service.conf
        DESTINATION /etc/dbus-1/system.d)
 
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/crash-service.service
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bugreport.service
        DESTINATION /usr/lib/systemd/system
        PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
 
@@ -61,10 +61,10 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin
        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
        GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
 
-INSTALL(TARGETS libcrash-service LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+INSTALL(TARGETS libbugreport LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
        PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
 
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/crash-service.pc
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bugreport.pc
        DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
 
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/diagnostics/diagnostics-run.conf
similarity index 99%
rename from src/crash-service/crash-service.c
rename to src/bugreport-service/bugreport-service.c
index b254940..f73947d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * crash-service
+ * bugreport-service
  *
  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
@@ -28,7 +28,7 @@
 #include <unistd.h>
 
 #include "crash-manager/crash-manager.h"
-#include "libcrash-service.h"
+#include "libbugreport.h"
 #include "shared/log.h"
 #include "diagnostics/diagnostics.h"
 
@@ -464,7 +464,7 @@ static bool dbus_init(void)
 
 int main(void)
 {
-       /* Have consinsent umask across invocations - from shell, crash-service, kernel */
+       /* Have consinsent umask across invocations - from shell, bugreport-service, kernel */
        umask(DEFAULT_UMASK);
 
        if (!have_livecoredumper()) {
similarity index 58%
rename from src/crash-service/crash-service.pc.in
rename to src/bugreport-service/bugreport.pc.in
index 9d2d7c8..1869cb2 100644 (file)
@@ -3,8 +3,8 @@ exec_prefix=${prefix}
 includedir=${prefix}/include
 libdir=${exec_prefix}/lib
 
-Name: crash-service
-Description: The crash-service library
+Name: bugreport-service
+Description: The bugreport library
 Version: @VERSION@
 Cflags: -I${includedir}
-Libs: -L${libdir} -lcrash-service
+Libs: -L${libdir} -lbugreport
similarity index 90%
rename from src/crash-service/crash-service.service.m4
rename to src/bugreport-service/bugreport.service.m4
index afacb16..051abcf 100644 (file)
@@ -8,7 +8,7 @@ Group=crash_worker
 Capabilities=cap_dac_override,cap_dac_read_search,cap_sys_ptrace,cap_kill,cap_syslog=i
 SecureBits=keep-caps
 BusName=org.tizen.system.crash.livedump
-ExecStart=/usr/bin/crash-service
+ExecStart=/usr/bin/bugreport-service
 SupplementaryGroups=log systemd-journal system_share
 SmackProcessLabel=System::Privileged
 Nice=-5
similarity index 98%
rename from src/crash-service/libcrash-service.c
rename to src/bugreport-service/libbugreport-service.c
index 25a36bc..98d8fc0 100644 (file)
@@ -20,7 +20,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#define LOG_TAG "LIBCRASH-SERVICE"
+#define LOG_TAG "LIBBUGREPORT-SERVICE"
 
 #include "shared/log.h"
 
similarity index 92%
rename from src/crash-service/libcrash-service.h
rename to src/bugreport-service/libbugreport.h
index a2fa39c..23d05a4 100644 (file)
@@ -19,7 +19,7 @@
 #include <sys/types.h>
 
 /**
- * @brief Sends a request to the crash-service to create livedump report of specific process.
+ * @brief Sends a request to the bugreport-service to create livedump report of specific process.
  * @param pid PID of process for which the report should be created.
  * @param dump_reason the reason that should be included in the raport.
  * @param report_path pointer to the buffer in which will be saved the report path.
index 07324d9..6080bfe 100644 (file)
@@ -282,7 +282,7 @@ int main(int argc, char *argv[])
 {
        int res;
 
-       /* Have consinsent umask across invocations - from shell, crash-service, kernel */
+       /* Have consinsent umask across invocations - from shell, bugreport, kernel */
        umask(DEFAULT_UMASK);
 
        if (!drop_privileges(USER_NAME)) {
index 54c2ede..47e1c23 100644 (file)
@@ -30,8 +30,8 @@ configure_test("exclude_paths")
 configure_test("extra_script")
 configure_test("full_core")
 configure_test("info_file")
-configure_test("libcrash-service")
-configure_test("libcrash-service_systemstate")
+configure_test("libbugreport-service")
+configure_test("libbugreport-service_systemstate")
 configure_test("livedumper")
 configure_test("log_file")
 configure_test("output_param")
@@ -23,7 +23,7 @@ sleep 2
 
 rm -rf ${LIVE_DUMP_PATH}/*
 REASON="some reason"
-${CRASH_WORKER_SYSTEM_TESTS}/utils/libcrash-servicetest -r "${REASON}" ${KENNY_PID}
+${CRASH_WORKER_SYSTEM_TESTS}/utils/libbugreport-servicetest -r "${REASON}" ${KENNY_PID}
 
 wait_for_file ${LIVE_DUMP_PATH}/kenny*zip
 
@@ -10,7 +10,7 @@ fi
 
 rm -rf ${LIVE_DUMP_PATH}/*
 REASON="some reason"
-${CRASH_WORKER_SYSTEM_TESTS}/utils/libcrash-servicetest -r "${REASON}" 0
+${CRASH_WORKER_SYSTEM_TESTS}/utils/libbugreport-servicetest -r "${REASON}" 0
 
 wait_for_file ${LIVE_DUMP_PATH}/system_0_*zip
 
index 0d2bbe4..45e08ab 100644 (file)
@@ -8,17 +8,17 @@ find_package(Threads)
 target_link_libraries(kenny ${CMAKE_THREAD_LIBS_INIT})
 set_target_properties(kenny PROPERTIES COMPILE_FLAGS "-std=c++11 -ggdb -O0")
 
-add_executable(libcrash-servicetest libcrash-servicetest.c)
+add_executable(libbugreport-servicetest libbugreport-servicetest.c)
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(helper_pkgs REQUIRED
                   gio-2.0
                   dlog)
 
-TARGET_LINK_LIBRARIES(libcrash-servicetest libcrash-service ${helper_pkgs_LDFLAGS})
+TARGET_LINK_LIBRARIES(libbugreport-servicetest libbugreport ${helper_pkgs_LDFLAGS})
 
 install(TARGETS kenny DESTINATION ${CRASH_SYSTEM_TESTS_PATH}/utils)
 install(TARGETS btee DESTINATION ${CRASH_SYSTEM_TESTS_PATH}/utils)
 install(FILES minicore-utils.sh DESTINATION ${CRASH_SYSTEM_TESTS_PATH}/utils)
-install(TARGETS libcrash-servicetest DESTINATION ${CRASH_SYSTEM_TESTS_PATH}/utils)
+install(TARGETS libbugreport-servicetest DESTINATION ${CRASH_SYSTEM_TESTS_PATH}/utils)
 
similarity index 97%
rename from tests/system/utils/libcrash-servicetest.c
rename to tests/system/utils/libbugreport-servicetest.c
index f06c534..0422b9f 100644 (file)
@@ -1,4 +1,4 @@
-#include <libcrash-service.h>
+#include <libbugreport.h>
 
 #include <linux/limits.h>
 #include <stdio.h>