[cgit] httpd-conf: generate cgit.conf for newer apache
Pavel Raiskup
praiskup at fedoraproject.org
Tue Jul 8 08:35:17 UTC 2014
commit 18e201b5c5a623025c358d7ce8d6bcc192edbda7
Author: Pavel Raiskup <praiskup at redhat.com>
Date: Tue Jul 8 10:33:26 2014 +0200
httpd-conf: generate cgit.conf for newer apache
Resolves: #1036123
Version: 0.10.2-2
cgit.httpd | 2 --
cgit.spec | 21 ++++++++++++++++-----
2 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/cgit.spec b/cgit.spec
index c9d3917..a1c5482 100644
--- a/cgit.spec
+++ b/cgit.spec
@@ -31,8 +31,7 @@ URL: http://git.zx2c4.com/cgit/
Source0: http://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz
Source1: http://www.kernel.org/pub/software/scm/git//git-%{gitver}.tar.xz
Source2: cgitrc
-Source3: cgit.httpd
-Source4: README.SELinux
+Source3: README.SELinux
# On all but RHEL5 highlight is version 3.
%if 0%{?fedora} || 0%{?rhel} >= 6
Patch1: cgit-0.9.1-highlightv3.patch
@@ -85,7 +84,18 @@ case "$build_dist-$build_ver" in
esac
sed -e "s|@CGIT_CONTEXT@|$cgit_context|g" \
- %{SOURCE4} > README.SELinux
+ %{SOURCE3} > README.SELinux
+
+cat > httpd.conf <<EOF
+Alias /cgit-data /usr/share/cgit
+ScriptAlias /cgit /var/www/cgi-bin/cgit
+%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
+<Directory "/usr/share/cgit">
+ Require all granted
+</Directory>
+%endif
+EOF
+
%build
%{make_cgit}
@@ -104,7 +114,7 @@ rm -rf %{buildroot}
%{make_cgit} install install-man
install -d -m0755 %{buildroot}%{_sysconfdir}/httpd/conf.d
install -p -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/cgitrc
-install -p -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/cgit.conf
+install -p -m0644 httpd.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/cgit.conf
install -d -m0755 %{buildroot}%{cachedir}
@@ -125,8 +135,9 @@ rm -rf %{buildroot}
%changelog
-* Mon Jul 07 2014 Pavel Raiskup <praiskup at redhat.com> - 0.10.2-2
+* Tue Jul 08 2014 Pavel Raiskup <praiskup at redhat.com> - 0.10.2-2
- install README.SELinux documentation again (#1036123)
+- generate cgit.conf for httpd >= 2.4 when needed
* Tue Jul 01 2014 Kevin Fenzi <kevin at scrye.com> 0.10.2-1
- Update to 0.10.2. Fixes bug #1114970
More information about the scm-commits
mailing list