Name: crash-worker
Summary: Coredump handler and report generator for Tizen
-Version: 6.5.15
+Version: 6.5.16
Release: 1
Group: Framework/system
License: Apache-2.0 and BSD-2-Clause and MIT
BuildRequires: libcap-devel
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(openssl1.1)
-%if %{with tests}
+BuildRequires: pkgconfig(diagnostics)
BuildRequires: pkgconfig(bugreport)
-%endif
%if %{with dumpsystemstateservice}
BuildRequires: pkgconfig(dumpsys-system)
%endif
Requires: minicoredumper >= 2.1.0
# Ensure crash_worker user is available (created by security-config, package provides crash_worker-owned files)
Requires: security-config
-BuildRequires: pkgconfig(diagnostics)
%description support-regdump
%endif
%make_install
mkdir -p %{buildroot}%{crash_root_path}
+# While this directory is not needed for crash-worker (it will be created with
+# correct permissions), the Tizen Smoke Tests expect this directory to be available.
+# Tests check number of files in this directory to be able to catch situation where
+# software on newly created image crashes very early.
+#
+# We need to either fix the Test scripts checking method of keep this directory.
+mkdir -p %{buildroot}%{crash_path}
+
%if ! %{with regdumper}
rm -f %{buildroot}%{_prefix}/lib/sysctl.d/70-crash-manager.conf
rm -f %{buildroot}%{_bindir}/crash-manager
rm -f %{buildroot}%{_prefix}/lib/debug/usr/lib/libcrash-manager.so*
rm -f %{buildroot}%{_includedir}/crash-manager.h
rm -f %{buildroot}%{_prefix}/lib/pkgconfig/crash-manager.pc
+rm -f %{buildroot}%{upgrade_script_path}/500.crash-manager-upgrade.sh
%endif
%post support-common
chsmack -a "System" -t %{crash_root_path}
+chsmack -a "System" -t %{crash_path}
if [ $1 -eq 2 ] ; then
# All directories are created with appropriate permissions by
chsmack -a "System" -t %{crash_temp}
fi
+%post -n bugreport-service
+# Intentional duplicate: bugreport-service might be installed separately from crash-worker-support-common
+# Creating yet another "common" package is not an option due to TV integration constraints.
+chsmack -a "System" -t %{crash_root_path}
+chsmack -a "System" -t %{crash_path}
+
%files
%license LICENSE
%manifest crash-worker.manifest
%manifest crash-worker.manifest
# attr() needed because: crash-worker running as crash_worker:crash_worker (user:group) creates files/dir under this path
%attr(0775,crash_worker,crash_worker) %{crash_root_path}
+%attr(0775,crash_worker,crash_worker) %{crash_path}
%{_libdir}/libcrash-manager.so.*
%{_bindir}/crash-json2info
%{_libexecdir}/crash-stack