From 7ea6df2d64d730bd7792911d1391ad3119802bc5 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Tue, 21 Apr 2020 08:41:55 +0200 Subject: development/cgit: Updated for version 1.2.3. Rewrote the example configurations for apache Signed-off-by: Matteo Bernardini Signed-off-by: Willy Sudiarto Raharjo --- development/cgit/cgit.SlackBuild | 4 +- development/cgit/cgit.info | 10 ++--- development/cgit/config/cgit-httpd.conf | 73 +++++++++++++++++++++------------ development/cgit/config/cgitrc.sample | 8 ++-- 4 files changed, 58 insertions(+), 37 deletions(-) diff --git a/development/cgit/cgit.SlackBuild b/development/cgit/cgit.SlackBuild index 040717424f..8d01a98c50 100644 --- a/development/cgit/cgit.SlackBuild +++ b/development/cgit/cgit.SlackBuild @@ -22,7 +22,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=cgit -VERSION=${VERSION:-1.2.2} +VERSION=${VERSION:-1.2.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -56,7 +56,7 @@ else fi CGIT_VERSION=${CGIT_VERSION:-v$VERSION} -GIT_VERSION=${GIT_VERSION:-2.25.0} +GIT_VERSION=${GIT_VERSION:-2.26.2} DOCS="cgitrc.5.txt COPYING README $CWD/config/cgitrc.sample \ $CWD/config/cgit-lighttpd.conf $CWD/config/cgit-httpd.conf \ diff --git a/development/cgit/cgit.info b/development/cgit/cgit.info index 2df4246bf0..bb46e21c79 100644 --- a/development/cgit/cgit.info +++ b/development/cgit/cgit.info @@ -1,10 +1,10 @@ PRGNAM="cgit" -VERSION="1.2.2" +VERSION="1.2.3" HOMEPAGE="https://git.zx2c4.com/cgit/about/" -DOWNLOAD="https://git.zx2c4.com/cgit/snapshot/cgit-1.2.2.tar.xz \ - https://www.kernel.org/pub/software/scm/git/git-2.25.0.tar.xz" -MD5SUM="0b7b5e1a84faee046014706e18740be5 \ - eab5cdee7c478c0804346d8835e314c9" +DOWNLOAD="https://git.zx2c4.com/cgit/snapshot/cgit-1.2.3.tar.xz \ + https://www.kernel.org/pub/software/scm/git/git-2.26.1.tar.xz" +MD5SUM="2d44ca575a8770fae48139c18dac6986 \ + f9a832256032e711973dd7be4981ab4c" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/cgit/config/cgit-httpd.conf b/development/cgit/config/cgit-httpd.conf index 4d713503be..4b757ea049 100644 --- a/development/cgit/config/cgit-httpd.conf +++ b/development/cgit/config/cgit-httpd.conf @@ -1,43 +1,62 @@ -# sample folder and virtual host configurations for httpd. +# Sample folder and virtual host configurations for httpd. # edit, move it to /etc/httpd/extra and include it in # /etc/httpd/httpd.conf with a line # -# Include /etc/httpd/extra/cgit-httpd.conf +# Include /etc/httpd/extra/cgit.conf # # uncomment also the line # # AddHandler cgi-script .cgi +# +# and enable mod_cgi (or mod_cgid, depending on your apache +# configuration) + +## Version 1: cgit in a /cgit subdirectory of the main host +## This will need the following 3 lines in your /etc/cgitrc +## +## virtual-root=/cgit/ +## css=/static/cgit.css +## logo=/static/cgit.png +## +#Alias /static/cgit.css "@DOCROOT@/cgi-bin/cgit.css" +#Alias /static/cgit.png "@DOCROOT@/cgi-bin/cgit.png" +#ScriptAlias /cgit/ "@DOCROOT@/cgi-bin/cgit.cgi/" +#RedirectMatch ^/cgit$ /cgit/ +# +# AllowOverride None +# Options ExecCGI FollowSymlinks +# Require all granted +# - - AllowOverride None - Require all granted - - -## Version 1 (default): under /cgi-bin/cgit.cgi address -#ScriptAlias /cgi-bin/cgit.cgi @DOCROOT@/cgi-bin/cgit.cgi -#Alias /cgit/ @DOCROOT@/cgi-bin/ -# -# Options FollowSymlinks ExecCGI -# Require all granted -# -#RewriteEngine on -#RewriteCond %{REQUEST_FILENAME} !-f -#RewriteCond %{REQUEST_FILENAME} !-d -#RewriteRule ^/cgit/(.*)$ /cgit/cgit.cgi?url=$1 [L,QSA] - -# Version 2: cgit as a handler to whole vhost: +# Version 2: cgit as a handler to whole vhost +# Thanks to Robby Workman for this elegant example - ServerName cgit.my.domain + ServerName cgit.yourdomain.ltd + + Options FollowSymlinks + SetEnv CGIT_CONFIG /etc/cgitrc - Options FollowSymlinks ExecCGI - DirectoryIndex cgit.cgi + DocumentRoot @DOCROOT@/cgi-bin + + + AllowOverride None + Require all granted + DirectoryIndex cgit.cgi + + + Alias /cgit.css @DOCROOT@/cgi-bin/cgit.css + Alias /cgit.png @DOCROOT@/cgi-bin/cgit.png + Alias /favicon.ico @DOCROOT@/cgi-bin/favicon.ico + Alias /robots.txt @DOCROOT@/cgi-bin/robots.txt + Alias / @DOCROOT@/cgi-bin/cgit.cgi/ + Options ExecCGI Require all granted - RewriteEngine on - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^(.*)$ /cgit.cgi?url=$1 [L,QSA] + + + SetHandler cgi-script + diff --git a/development/cgit/config/cgitrc.sample b/development/cgit/config/cgitrc.sample index cd23168d04..31d7708333 100644 --- a/development/cgit/config/cgitrc.sample +++ b/development/cgit/config/cgitrc.sample @@ -8,11 +8,13 @@ virtual-root=/ snapshots=tar.gz branch-sort=age # for this to work you have to build cgit against lua -# and install luacrypto too +# and install luacrypto too. +# you wull have also to add email-gravatar-sbo-additions.css +# at the bottom of your installed cgit.css email-filter=lua:/usr/share/cgit/filters/email-gravatar-sbo.lua -#css=/static/cgit.css -#logo=/static/cgit.png +#css=/cgit.css +#logo=/cgit.png # repository specific data repo.url=slackbuilds -- cgit v1.2.3