summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-07-08 10:33:26 +0200
committerPavel Raiskup <praiskup@redhat.com>2014-07-08 10:35:22 +0200
commit18e201b5c5a623025c358d7ce8d6bcc192edbda7 (patch)
treefca6af257a25b37abf9adfd417b500ccadc78aab
parenta9267ec22bb0b1d6917696f3c2451e98fa72bb37 (diff)
downloadcgit_EL6-18e201b5c5a623025c358d7ce8d6bcc192edbda7.tar.gz
httpd-conf: generate cgit.conf for newer apache
Resolves: #1036123 Version: 0.10.2-2
-rw-r--r--cgit.httpd2
-rw-r--r--cgit.spec21
2 files changed, 16 insertions, 7 deletions
diff --git a/cgit.httpd b/cgit.httpd
deleted file mode 100644
index 791d01b..0000000
--- a/cgit.httpd
+++ /dev/null
@@ -1,2 +0,0 @@
-Alias /cgit-data /usr/share/cgit
-ScriptAlias /cgit /var/www/cgi-bin/cgit
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@redhat.com> - 0.10.2-2
+* Tue Jul 08 2014 Pavel Raiskup <praiskup@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@scrye.com> 0.10.2-1
- Update to 0.10.2. Fixes bug #1114970