Release 6.5.16: Various fixes 43/255943/6 submit/tizen/20210325.112955
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 25 Mar 2021 07:38:23 +0000 (08:38 +0100)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Thu, 25 Mar 2021 10:29:26 +0000 (11:29 +0100)
 - Restore /opt/usr/share/crash/dump directory for tizen smoke scripts
 - Fix TV build

Change-Id: Id64d47dae3e592089ba1c02c79365af7a19791dc

packaging/crash-worker.spec

index 567192d..e088559 100644 (file)
@@ -23,7 +23,7 @@
 
 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
@@ -42,9 +42,8 @@ BuildRequires:  pkgconfig(libunwind-generic)
 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
@@ -97,7 +96,6 @@ Requires:       %{name}-support-common = %{version}-%{release}
 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
 
@@ -227,6 +225,14 @@ rm -rf %{buildroot}
 %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
@@ -253,10 +259,12 @@ rm -f %{buildroot}%{_prefix}/lib/debug/usr/libexec/crash-stack.debug
 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
@@ -269,6 +277,12 @@ if [ $1 -eq 2 ] ; then
        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
@@ -319,6 +333,7 @@ fi
 %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