[pipelight-selinux/f19] optimized invocation of %%{_sbindir}/restorecon dropped unneded use of %%{_bindir}/find

Björn Esser besser82 at fedoraproject.org
Wed Jul 16 15:55:01 UTC 2014


commit 5bcbd7bfa4662dcaa211aa175ae05f81bd3b2786
Author: Björn Esser <bjoern.esser at gmail.com>
Date:   Wed Jul 16 17:54:36 2014 +0200

    optimized invocation of %%{_sbindir}/restorecon
    dropped unneded use of %%{_bindir}/find

 pipelight-selinux.spec |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/pipelight-selinux.spec b/pipelight-selinux.spec
index cdee49d..24ac6fc 100644
--- a/pipelight-selinux.spec
+++ b/pipelight-selinux.spec
@@ -5,7 +5,7 @@
 
 Name:			%{pname}-selinux
 Version:		0.2.0
-Release:		2%{?dist}
+Release:		3%{?dist}
 Summary:		SELinux-policy-module for %{pname}
 
 License:		MIT
@@ -26,11 +26,15 @@ Requires:		selinux-policy		>= %{_selinux_policy_version}
 Requires:		selinux-policy
 %endif # "%%{_selinux_policy_version}" != ""
 
-Requires(post):		%{_bindir}/find %{_sbindir}/fixfiles
-Requires(post):		%{_sbindir}/restorecon %{_sbindir}/semodule %{pname}
+Requires(post):		%{_sbindir}/fixfiles
+Requires(post):		%{_sbindir}/restorecon
+Requires(post):		%{_sbindir}/semodule
+Requires(post):		%{pname}
 
-Requires(postun):	%{_bindir}/find %{_sbindir}/fixfiles
-Requires(postun):	%{_sbindir}/restorecon %{_sbindir}/semodule %{pname}
+Requires(postun):	%{_sbindir}/fixfiles
+Requires(postun):	%{_sbindir}/restorecon
+Requires(postun):	%{_sbindir}/semodule
+Requires(postun):	%{pname}
 
 %description
 This package contains the
@@ -68,10 +72,7 @@ do
     -i %{_datadir}/selinux/${_selinuxvariant}/%{pname}.pp &> /dev/null || :
 done
 %{_sbindir}/fixfiles -R %{pname} restore || :
-for _dir in $(%{_bindir}/find /home -type d -name '.wine-pipelight*')
-do
-  %{_sbindir}/restorecon -R "${_dir}" &> /dev/null || :
-done
+%{_sbindir}/restorecon -R /home/*/.wine-pipelight* &> /dev/null || :
 
 %postun
 if [ $1 -eq 0 ] ; then
@@ -81,10 +82,7 @@ if [ $1 -eq 0 ] ; then
   done
 fi
 %{_sbindir}/fixfiles -R %{pname} restore || :
-for _dir in $(%{_bindir}/find /home -type d -name '.wine-pipelight*')
-do
-  %{_sbindir}/restorecon -R "${_dir}" &> /dev/null || :
-done
+%{_sbindir}/restorecon -R /home/*/.wine-pipelight* &> /dev/null || :
 
 
 %files
@@ -93,6 +91,10 @@ done
 
 
 %changelog
+* Wed Jul 16 2014 Björn Esser <bjoern.esser at gmail.com> - 0.2.0-3
+- optimized invocation of %%{_sbindir}/restorecon
+- dropped unneded use of %%{_bindir}/find
+
 * Wed Jul 16 2014 Björn Esser <bjoern.esser at gmail.com> - 0.2.0-2
 - fixed %%post and %%postun scripts
 


More information about the scm-commits mailing list