summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-11-18 08:29:15 +0100
committerRemi Collet <remi@remirepo.net>2017-11-18 08:29:15 +0100
commit7cc0bcc4ab02e2d8c362dfd850d6c70822122f44 (patch)
tree5d847bd5924db67fb316a82cf1e20c293c6f8281
parentbfc8bed54c2c63407972c0a0773cf209ca558d33 (diff)
EL7: remove SELinux rules as default policy includes them
-rw-r--r--glpi.spec16
1 files changed, 6 insertions, 10 deletions
diff --git a/glpi.spec b/glpi.spec
index b4d87a9..ca375c5 100644
--- a/glpi.spec
+++ b/glpi.spec
@@ -14,7 +14,7 @@
%global gh_project glpi
#global prever RC2
-%if 0%{?fedora} < 20
+%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# See https://bugzilla.redhat.com/1033025
# selinux-policy : Please include policy for GLPI
%global useselinux 1
@@ -43,7 +43,7 @@
Name: %{gh_project}
Version: 9.2.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Free IT asset management software
Summary(fr): Gestion Libre de Parc Informatique
@@ -321,7 +321,7 @@ mv %{buildroot}/%{_localstatedir}/lib/%{name}/files/_log %{buildroot}%{_localsta
install -Dpm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
# remirepo:4
-%if 0%{?rhel} == 5 || 0%{?rhel} == 6
+%if 0%{?rhel} == 6
: Remove "su" option from logrotate configuration file - requires logrotate 3.8+
sed -e '/su /d' -i %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%endif
@@ -428,15 +428,8 @@ exit $RET
%if %{useselinux}
(
# New File context
-# remirepo:4
-%if 0%{?rhel} == 5
-semanage fcontext -a -s system_u -t httpd_sys_script_rw_t -r s0 "%{_sysconfdir}/%{name}(/.*)?"
-semanage fcontext -a -s system_u -t httpd_sys_script_rw_t -r s0 "%{_localstatedir}/lib/%{name}(/.*)?"
-%else
semanage fcontext -a -s system_u -t httpd_sys_rw_content_t -r s0 "%{_sysconfdir}/%{name}(/.*)?"
semanage fcontext -a -s system_u -t httpd_var_lib_t -r s0 "%{_localstatedir}/lib/%{name}(/.*)?"
-# remirepo:1
-%endif
semanage fcontext -a -s system_u -t httpd_sys_content_t -r s0 "%{_datadir}/%{name}(/.*)?"
semanage fcontext -a -s system_u -t httpd_log_t -r s0 "%{_localstatedir}/log/%{name}(/.*)?"
# files created by app
@@ -505,6 +498,9 @@ fi
%changelog
+* Sat Nov 18 2017 Remi Collet <remi@remirepo.net> - 9.2.1-4
+- EL7: remove SELinux rules as default policy includes them
+
* Fri Nov 17 2017 Remi Collet <remi@remirepo.net> - 9.2.1-3
- properly override PHP configuration for install page