[websvn] compatibility with selinux
Xavier Bachelot
xavierb at fedoraproject.org
Mon Sep 27 21:45:19 UTC 2010
commit 9899a39e65eb90d23fda9bbea6c5e324a4651d80
Author: Xavier Bachelot <xavier at bachelot.org>
Date: Mon Sep 27 23:44:13 2010 +0200
compatibility with selinux
websvn.spec | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/websvn.spec b/websvn.spec
index 1bccf01..63b5a00 100644
--- a/websvn.spec
+++ b/websvn.spec
@@ -1,6 +1,6 @@
Name: websvn
Version: 2.3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Online subversion repository browser
Group: Applications/System
@@ -31,6 +31,18 @@ given revision. You can also view the differences between two versions of a
file so as to see exactly what was changed in a particular revision.
+%package selinux
+Summary: SELinux context for %{name}
+Group: Applications/System
+Requires: %name = %version-%release
+Requires(post): policycoreutils
+Requires(postun): policycoreutils
+
+
+%description selinux
+SElinux context for %{name}.
+
+
%prep
%setup -q
### Let websvn use the system provided php classes and remove bundled ones.
@@ -85,6 +97,17 @@ ln -s ../../..%{_localstatedir}/tmp $RPM_BUILD_ROOT/%{_datadir}/%{name}/temp
rm -rf $RPM_BUILD_ROOT
+%post selinux
+semanage fcontext -a -t httpd_cache_t '%{_localstatedir}/%{name}(/.*)?' 2>/dev/null || :
+restorecon -R %{_localstatedir}/cache/%{name} || :
+
+
+%postun selinux
+if [ $1 -eq 0 ] ; then
+semanage fcontext -d -t httpd_cache_t '%{_localstatedir}/%{name}(/.*)?' 2>/dev/null || :
+fi
+
+
%files
%defattr(-,root,root,-)
%doc changes.txt license.txt doc/
@@ -94,7 +117,14 @@ rm -rf $RPM_BUILD_ROOT
%attr(-,apache,root) %{_localstatedir}/cache/%{name}
+%files selinux
+%defattr(-,root,root,-)
+
+
%changelog
+* Mon Sep 27 2010 Xavier Bachelot <xavier at bachelot.org> 2.3.1-2
+- Add an selinux subpackage for compatibility with selinux (RHBZ#585969).
+
* Tue Jun 15 2010 Xavier Bachelot <xavier at bachelot.org> 2.3.1-1
- Update to 2.3.1.
More information about the scm-commits
mailing list