ADD_SUBDIRECTORY(src/crash-stack)
ADD_SUBDIRECTORY(src/dump_systemstate)
-IF("${LOG_DUMP}" STREQUAL "ON")
- ADD_SUBDIRECTORY(src/log_dump)
-ENDIF()
-
IF("${LIVEDUMPER}" STREQUAL "ON")
ADD_SUBDIRECTORY(src/livedumper)
ENDIF()
<assign>
<filesystem path="/usr/bin/dump_systemstate" label="System" exec_label="System"/>
<filesystem path="/usr/bin/crash-manager" label="System" exec_label="System"/>
- <filesystem path="/usr/bin/log_dump" label="System" exec_label="System"/>
</assign>
</manifest>
%define on_off() %{expand:%%{?with_%{1}:ON}%%{!?with_%{1}:OFF}}
%define _with_tests on
-%define _with_logdump on
%define _with_livedumper on
%define _with_crashservice on
%bcond_with doc
%bcond_with sys_assert
%bcond_with tests
-%bcond_with logdump
%bcond_with livedumper
%bcond_with crashservice
#Debug mode path - existence of file at path below mean that core file should be generated
%define debugmode_path %{TZ_SYS_ETC}/.debugmode
-#Path for log_dump module
-%define crash_all_log %{TZ_SYS_ALLLOGS}
-%define crash_dump_gen %{TZ_SYS_DUMPGEN}
-
%define upgrade_script_path %{TZ_SYS_RO_SHARE}/upgrade/scripts
%build
-DMINICOREDUMPER_BIN_PATH=%{_sbindir}/minicoredumper \
-DMINICOREDUMPER_CONFIG_PATH=%{_sysconfdir}/minicoredumper/minicoredumper.cfg.json \
-DLIVEDUMPER_BIN_PATH=%{_bindir}/livedumper \
- -DLOG_DUMP_BIN_PATH=%{_bindir}/log_dump \
-DDUMP_SYSTEMSTATE_BIN_PATH=%{_bindir}/dump_systemstate \
-DCRASH_STACK_BIN_PATH=%{_libexecdir}/crash-stack \
-DCRASH_POPUP_BIN_PATH=%{_libexecdir}/crash-popup-launch \
-DCRASH_NOTIFY_BIN_PATH=%{_libexecdir}/crash-notify-send \
-DCRASH_TESTS_PATH=%{_libdir}/crash-worker-tests \
-DSYS_ASSERT=%{on_off sys_assert} \
- -DLOG_DUMP=%{on_off logdump} \
-DLIVEDUMPER=%{on_off livedumper} \
-DCRASH_SERVICE=%{on_off crashservice} \
-DUPGRADE_SCRIPT_PATH=%{upgrade_script_path} \
mkdir -p %{buildroot}%{crash_path}
mkdir -p %{buildroot}%{crash_temp}
-# log_dump dir
-%if %{with logdump}
-mkdir -p %{buildroot}%{crash_all_log}
-mkdir -p %{buildroot}%{crash_dump_gen}
-cp dump_scripts/* %{buildroot}%{crash_dump_gen}
-chmod 755 %{buildroot}%{crash_dump_gen}/*
-%endif
-
%post
%if %{with sys_assert}
if [ ! -d /.build ]; then
/usr/bin/chsmack -a "System" -t %{crash_path}
/usr/bin/chsmack -a "System" -t %{crash_temp}
-%if %{with logdump}
-/usr/bin/chsmack -a "System" -t %{crash_dump_gen}
-/usr/bin/chsmack -a "System" -t %{crash_dump_gen}/module.d
-/usr/bin/chsmack -a "System::Shared" -t %{crash_all_log}
-/usr/bin/chsmack -a "_" %{crash_dump_gen}/module.d/*
-%endif
-
%postun
%if %{with sys_assert}
orig="%{_libdir}/libsys-assert.so"
%{_libdir}/libcrash-service.so.*
%endif
-%if %{with logdump}
-%dir %{crash_all_log}
-%{crash_dump_gen}/*
-%attr(-,root,root) %{_unitdir}/log_dump.service
-%attr(-,root,root) %{_sysconfdir}/dbus-1/system.d/log_dump.conf
-%attr(-,root,root) %{_datadir}/dbus-1/system-services/org.tizen.system.crash.service
-%attr(0750,system_fw,system_fw) %{_bindir}/log_dump
-%endif
-
%if %{with sys_assert}
%{_libdir}/libsys-assert.so
%{_sysconfdir}/tmpfiles.d/sys-assert.conf
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+ <assign>
+ <filesystem path="/usr/bin/log_dump" label="System" exec_label="System"/>
+ </assign>
+</manifest>
--- /dev/null
+Name: log_dump
+Summary: log_dump
+Version: 5.5.19
+Release: 1
+Group: Framework/system
+License: Apache-2.0 and BSD
+Source0: %{name}-%{version}.tar.gz
+Source1001: log_dump.manifest
+Requires: crash-worker
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(iniparser)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: cmake
+BuildRequires: pkgconfig(pkgmgr-info)
+
+%description
+log_dump
+
+%prep
+%setup -q
+
+%define crash_root_path %{TZ_SYS_CRASH_ROOT}
+%define crash_all_log %{TZ_SYS_ALLLOGS}
+%define crash_dump_gen %{TZ_SYS_DUMPGEN}
+
+%build
+cp %{SOURCE1001} .
+
+%cmake src/log_dump/ \
+ -DCRASH_ROOT_PATH=%{crash_root_path} \
+ -DDUMP_SYSTEMSTATE_BIN_PATH=%{_bindir}/dump_systemstate \
+ -DCRASH_MANAGER_CONFIG_PATH=%{_sysconfdir}/crash-manager.conf
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}%{crash_all_log}
+mkdir -p %{buildroot}%{crash_dump_gen}
+cp dump_scripts/* %{buildroot}%{crash_dump_gen}
+chmod 755 %{buildroot}%{crash_dump_gen}/*
+
+%post
+/usr/bin/chsmack -a "System" -t %{crash_dump_gen}
+/usr/bin/chsmack -a "System" -t %{crash_dump_gen}/module.d
+/usr/bin/chsmack -a "System::Shared" -t %{crash_all_log}
+/usr/bin/chsmack -a "_" %{crash_dump_gen}/module.d/*
+
+%files
+%license LICENSE
+%manifest log_dump.manifest
+%dir %{crash_all_log}
+%{crash_dump_gen}/*
+%attr(-,root,root) %{_unitdir}/log_dump.service
+%attr(-,root,root) %{_sysconfdir}/dbus-1/system.d/log_dump.conf
+%attr(-,root,root) %{_datadir}/dbus-1/system-services/org.tizen.system.crash.service
+%attr(0750,system_fw,system_fw) %{_bindir}/log_dump
+
+
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(log_dump C)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
+ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/../../include ${CMAKE_SOURCE_DIR}/../../include)
+ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1)
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../../include/)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../)
+
SET(LOG_DUMP_SRCS
log_dump.c
dbus-handler.c
- ${CMAKE_SOURCE_DIR}/src/shared/util.c
- ${CMAKE_SOURCE_DIR}/src/shared/spawn.c
- ${CMAKE_SOURCE_DIR}/src/shared/config.c
+ ${CMAKE_SOURCE_DIR}/../shared/util.c
+ ${CMAKE_SOURCE_DIR}/../shared/spawn.c
+ ${CMAKE_SOURCE_DIR}/../shared/config.c
)
INCLUDE(FindPkgConfig)
gio-2.0
)
-INCLUDE(${CMAKE_SOURCE_DIR}/cmake/ProcessM4.cmake)
+INCLUDE(${CMAKE_SOURCE_DIR}/../../cmake/ProcessM4.cmake)
FOREACH(flag ${log_dump_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")