[abrt] Check if restorecon cmd exists and run it only if it does

Jakub Filak jfilak at fedoraproject.org
Mon Mar 25 12:04:51 UTC 2013


commit 802131f4acd69ec842e51063955b4761ffa8c62e
Author: Jakub Filak <jfilak at redhat.com>
Date:   Mon Mar 25 12:30:35 2013 +0100

    Check if restorecon cmd exists and run it only if it does
    
    Resolves: #926934

 abrt.spec |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/abrt.spec b/abrt.spec
index 44fad6c..b8599be 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -25,7 +25,7 @@
 Summary: Automatic bug detection and reporting tool
 Name: abrt
 Version: 2.1.2
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2+
 Group: Applications/System
 URL: https://fedorahosted.org/abrt/
@@ -375,8 +375,11 @@ then
         fi
     done
 fi
+
 # doesn't mather if it fails or not for any reason
-restorecon -R "$NEW_LOCATION" || true
+if which restorecon 1>/dev/null 2>&1; then
+    restorecon -R "$NEW_LOCATION" 1>/dev/null 2>&1 || true
+fi
 exit 0
 
 %post
@@ -751,6 +754,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_defaultdocdir}/%{name}-python-%{version}/examples/
 
 %changelog
+* Mon Mar 25 2013 Jakub Filak <jfilak at redhat.com> 2.1.2-4
+- Check if restorecon cmd exists and run it only if it does
+- Resolves: #926934
+
 * Fri Mar 22 2013 Jakub Filak <jfilak at redhat.com> 2.1.2-3
 - Fix problems with spaces in retrace-client
 


More information about the scm-commits mailing list