packaging: Drop redundant directories 03/253103/4
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 4 Feb 2021 11:05:22 +0000 (12:05 +0100)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Fri, 5 Feb 2021 11:41:12 +0000 (12:41 +0100)
These directories are created on-demand by crash-manager/service.

There is no need to main correct permission/label set in multiple
places.

Change-Id: Ie81cd358d9e17d4249bbdc0a2ed791b5097fa583

packaging/crash-worker.spec

index a7fea2f..1741a5b 100644 (file)
@@ -161,20 +161,26 @@ make doc
 rm -rf %{buildroot}
 %make_install
 mkdir -p %{buildroot}%{crash_root_path}
-mkdir -p %{buildroot}%{crash_path}
-mkdir -p %{buildroot}%{crash_temp}
 
 %post
-/usr/bin/chsmack -a "System" -t %{crash_path}
-/usr/bin/chsmack -a "System" -t %{crash_temp}
+chsmack -a "System" -t %{crash_root_path}
+if [ $1 -eq 2 ] ; then
+       # All directories are created with appropriate permissions by
+       # crash-manager/service (0775) and with correct label (System)
+       # due to smack execute being set to System on /usr/bin/crash-manager
+       # binary.
+       #
+       # Following is only for package-based upgrade in Tizen 6.5
+       # Drop this in Tizen 7.0
+       chsmack -a "System" -t %{crash_path}
+       chsmack -a "System" -t %{crash_temp}
+fi
 
 %files
 %license LICENSE LICENSE.BSD LICENSE.MIT
 %manifest crash-worker.manifest
 %defattr(-,crash_worker,crash_worker,-)
 %dir %{crash_root_path}
-%dir %{crash_path}
-%dir %{crash_temp}
 %{_sysconfdir}/crash-manager.conf
 %{_sysconfdir}/crash-manager.conf.d/crash-manager.conf.example
 %attr(-,root,root) %{_prefix}/lib/sysctl.d/70-crash-manager.conf