summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-11-14 17:50:02 +0100
committerAurélien Bompard <aurelien@bompard.org>2013-11-20 19:15:40 +0100
commit9e5a71481101c611e5ebfe08cb7dd3b3dbc6601b (patch)
tree09494ed8591f89a2f85a49db6627107702e41d5e
parent4c13d0ea5f429d2361e04ef013d65f28c29af2ac (diff)
downloadhyperkitty-9e5a71481101c611e5ebfe08cb7dd3b3dbc6601b.tar.gz
hyperkitty-9e5a71481101c611e5ebfe08cb7dd3b3dbc6601b.tar.xz
hyperkitty-9e5a71481101c611e5ebfe08cb7dd3b3dbc6601b.zip
packaging: add SELinux rules
-rw-r--r--hyperkitty.spec12
1 files changed, 12 insertions, 0 deletions
diff --git a/hyperkitty.spec b/hyperkitty.spec
index 8a9b3ee..ed5fe3a 100644
--- a/hyperkitty.spec
+++ b/hyperkitty.spec
@@ -64,6 +64,10 @@ Requires: python-django >= 1.4
Requires: python-django-south
%endif
+# Scriptlets
+Requires(post): policycoreutils-python
+Requires(postun): policycoreutils-python
+
%description
HyperKitty is an open source Django application under development. It aims at
@@ -139,6 +143,14 @@ rm -f hyperkitty_standalone/__init__.py
collectstatic --noinput >/dev/null || :
%{__python} %{_sysconfdir}/%{name}/sites/default/manage.py \
assets build --parse-templates &>/dev/null || :
+semanage fcontext -a -t httpd_sys_content_t "%{_localstatedir}/lib/%{name}/sites(/.*)?" 2>/dev/null || :
+restorecon -R %{_localstatedir}/lib/%{name}/sites || :
+
+%postun
+if [ $1 -eq 0 ] ; then # final removal
+semanage fcontext -d -t httpd_sys_content_t "%{_localstatedir}/lib/%{name}/sites(/.*)?" 2>/dev/null || :
+fi
+
%files