[packages/cgit] - updated to 0.10 - apache 2.2/2.4 compatible config

kiesiu kiesiu at pld-linux.org
Tue Feb 25 16:41:35 CET 2014


commit 08d38ec43baf2508f1e6a94d46c08792e9bea25e
Author: Łukasz Kieś <kiesiu at pld-linux.org>
Date:   Tue Feb 25 16:39:32 2014 +0100

    - updated to 0.10
    - apache 2.2/2.4 compatible config

 cgit-apache.conf      | 30 +++++++++++++++++++++++++++---
 cgit-httpd.conf       | 24 ------------------------
 cgit-system-git.patch | 12 ++++++------
 cgit.spec             | 28 +++++++++++++---------------
 4 files changed, 46 insertions(+), 48 deletions(-)
---
diff --git a/cgit.spec b/cgit.spec
index 6e02378..e5099a0 100644
--- a/cgit.spec
+++ b/cgit.spec
@@ -1,23 +1,18 @@
-#
-# Conditional build
-%bcond_with	verbose		# verbose build (V=1)
-#
 Summary:	cgit - a fast webinterface to git
 Summary(pl.UTF-8):	cgit - szybki interfejs WWW do gita
 Name:		cgit
-Version:	0.9.2
-Release:	2
+Version:	0.10
+Release:	1
 License:	GPL v2
 Group:		Development/Tools
 Source0:	http://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz
-# Source0-md5:	fe11018eff8d79caad112f4fac64b90f
+# Source0-md5:	19944c17ecea1b1d1944718ce8ce6b61
 Source1:	%{name}.conf
 Source2:	%{name}-repo.conf
 Source3:	%{name}-apache.conf
-Source4:	%{name}-httpd.conf
 Patch0:		%{name}-system-git.patch
 URL:		http://git.zx2c4.com/cgit/about/
-BuildRequires:	git-core-devel >= 1.8.3
+BuildRequires:	git-core-devel >= 1.8.5
 BuildRequires:	openssl-devel
 BuildConflicts:	zlib-devel = 1.2.5-1
 Requires:	webapps
@@ -58,8 +53,7 @@ cp  %{_includedir}/git-core/{Makefile,config.*} git
 	LDFLAGS="%{rpmldflags}" \
 	LIBDIR=%{_libdir} \
 	CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
-	CGIT_SCRIPT_PATH="%{cgibindir}" \
-	%{?with_verbose:V=1}
+	CGIT_SCRIPT_PATH="%{cgibindir}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -67,12 +61,13 @@ rm -rf $RPM_BUILD_ROOT
 # The same CFLAGS as in %build  stage has to be passed to avoid
 # "new build flags" logic in Makefile
 %{__make} install \
+	V=1 \
 	DESTDIR=$RPM_BUILD_ROOT \
+	prefix=%{_prefix} \
 	CFLAGS="%{rpmcflags} -I/usr/include/git-core" \
 	CGIT_CONFIG="%{webappdir}/%{webapp}.conf" \
 	CGIT_DATA_PATH="%{appdir}" \
-	CGIT_SCRIPT_PATH="%{cgibindir}" \
-	%{?with_verbose:V=1}
+	CGIT_SCRIPT_PATH="%{cgibindir}"
 
 # cache
 install -d $RPM_BUILD_ROOT/var/cache/cgit
@@ -82,7 +77,7 @@ install -d $RPM_BUILD_ROOT%{webappdir}
 install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}
 install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}
 install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/apache.conf
-install %{SOURCE4} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
+install %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -114,6 +109,9 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_prefix}/lib/cgit/filters
 %attr(755,root,root) %{_prefix}/lib/cgit/filters/about-formatting.sh
 %attr(755,root,root) %{_prefix}/lib/cgit/filters/commit-links.sh
-%attr(755,root,root) %{_prefix}/lib/cgit/filters//syntax-highlighting.py
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.lua
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/email-gravatar.py
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/simple-authentication.lua
+%attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.py
 %attr(755,root,root) %{_prefix}/lib/cgit/filters/syntax-highlighting.sh
 %{_prefix}/lib/cgit/filters/html-converters
diff --git a/cgit-apache.conf b/cgit-apache.conf
index cc0b45a..75285ce 100644
--- a/cgit-apache.conf
+++ b/cgit-apache.conf
@@ -1,13 +1,29 @@
 <Directory /usr/share/cgit>
 	AllowOverride None
-	Allow from All
+	# Apache 2.x
+	<IfModule !mod_authz_core.c>
+		Order allow,deny
+		Allow from all
+	</IfModule>
+	# Apache 2.4
+	<IfModule mod_authz_core.c>
+		Require all granted
+	</IfModule>
 </Directory>
 
 # Version 1 (default): under /cgi-bin/cgit.cgi address
 ScriptAlias /cgi-bin/cgit.cgi /usr/lib/cgi-bin/cgit.cgi
 Alias /cgit/ /usr/share/cgit/
 <Location /cgi-bin/cgit.cgi>
-	Allow from All
+	# Apache 2.x
+	<IfModule !mod_authz_core.c>
+		Order allow,deny
+		Allow from all
+	</IfModule>
+	# Apache 2.4
+	<IfModule mod_authz_core.c>
+		Require all granted
+	</IfModule>
 </Location>
 
 # Version 2: cgit as a handler to whole vhost:
@@ -18,6 +34,14 @@ Alias /cgit/ /usr/share/cgit/
 #	DocumentRoot /usr/lib/cgi-bin/cgit.cgi
 #	<Location />
 #		Options ExecCGI
-#		Allow from All
+#		# Apache 2.x
+#		<IfModule !mod_authz_core.c>
+#			Order allow,deny
+#			Allow from all
+#		</IfModule>
+#		# Apache 2.4
+#		<IfModule mod_authz_core.c>
+#			Require all granted
+#		</IfModule>
 #	</Location>
 #</VirtualHost>
diff --git a/cgit-httpd.conf b/cgit-httpd.conf
deleted file mode 100644
index 84366da..0000000
--- a/cgit-httpd.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-<Directory /usr/share/cgit>
-	AllowOverride None
-	Require all granted
-</Directory>
-
-# Version 1 (default): under /cgi-bin/cgit.cgi address
-ScriptAlias /cgi-bin/cgit.cgi /usr/lib/cgi-bin/cgit.cgi
-Alias /cgit/ /usr/share/cgit/
-
-<Location /cgi-bin/cgit.cgi>
-	Require all granted
-</Location>
-
-# Version 2: cgit as a handler to whole vhost:
-#<VirtualHost *:80>
-#	ServerName cgit
-#
-#	Alias /cgit/ /usr/share/cgit/
-#	DocumentRoot /usr/lib/cgi-bin/cgit.cgi
-#	<Location />
-#		Options ExecCGI
-#		Require all granted
-#	</Location>
-#</VirtualHost>
diff --git a/cgit-system-git.patch b/cgit-system-git.patch
index 31e2513..f0275e0 100644
--- a/cgit-system-git.patch
+++ b/cgit-system-git.patch
@@ -1,12 +1,12 @@
-diff --git a/cgit.mk b/cgit.mk
-index 8af0041..35beb03 100644
---- a/cgit.mk
-+++ b/cgit.mk
-@@ -87,5 +87,6 @@ $(CGIT_PREFIX)CGIT-CFLAGS: FORCE
+diff -uNr cgit-0.10.old/cgit.mk cgit-0.10/cgit.mk
+--- cgit-0.10.old/cgit.mk	2014-01-17 16:09:16.000000000 +0100
++++ cgit-0.10/cgit.mk	2014-02-25 15:22:09.208586612 +0100
+@@ -130,6 +130,7 @@
  $(CGIT_OBJS): %.o: %.c GIT-CFLAGS $(CGIT_PREFIX)CGIT-CFLAGS $(missing_dep_dirs)
  	$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $(CGIT_CFLAGS) $<
  
 -$(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS $(GITLIBS)
 +LIBS = -lgit -lgit_xdiff $(EXTLIBS)
 +$(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS
- 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
+ 	@echo 1>&1 "    * $(LUA_MESSAGE)"
+ 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) $(CGIT_LIBS)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cgit.git/commitdiff/08d38ec43baf2508f1e6a94d46c08792e9bea25e



More information about the pld-cvs-commit mailing list