Thread (74 messages) flat view 74 messages, 13 authors, 2016-08-11

Re: kernel.org mirroring (Re: [GIT PULL] MMC update)

From: Jakub Narebski <hidden>
Date: 2016-08-11 20:46:51

Jeff Garzik wrote:
Jakub Narebski wrote:
quoted
As I said, I'm not talking (at least now) about saving generated HTML
output. This I think is better solved in caching engine like Squid can
be. Although even here some git specific can be of help: we can invalidate
cache on push, and we know that some results doesn't ever change (well,
with exception of changing output of gitweb).
It depends on how creatively you think ;-)

Consider generating static HTML files on each push, via a hook, for many 
of the toplevel files.  The static HTML would then link to the CGI for 
further dynamic querying of the git database.
You mean that the links in this pre-generated HTML would be to CGI
pages?
 
quoted
What can be _easily_ done:
 * Use post 1.4.4 gitweb, which uses git-for-each-ref to generate summary
   page; this leads to around 3 times faster summary page.
This re-opens the question mentioned earlier, is Kay (or anyone?) still 
actively maintaining gitweb on k.org?
By the way, thanks to Martin Waitz it is much easier to install gitweb.
I for example use the following script to test changes I have made to gitweb:

-- >8 --
#!/bin/bash

BINDIR="/home/local/git"

function make_gitweb()
{
	pushd "/home/jnareb/git/"

	make GITWEB_PROJECTROOT="/home/local/scm" \
	     GITWEB_CSS="/gitweb/gitweb.css" \
	     GITWEB_LOGO="/gitweb/git-logo.png" \
	     GITWEB_FAVICON="/gitweb/git-favicon.png" \
	     bindir=$BINDIR \
	     gitweb/gitweb.cgi

	popd
}

function copy_gitweb()
{
	cp -fv /home/jnareb/git/gitweb/gitweb.{cgi,css} /home/local/gitweb/
}

make_gitweb
copy_gitweb

# end of gitweb-update.sh
-- >8 --
quoted
 * Perhaps using projects list file (which can be now generated by gitweb)
   instead of scanning directories and stat()-ing for owner would help
   with time to generate projects lis page
This could be statically generated by a robot.  I think everybody would 
shrink in horror if a human needed to maintain such a file.
Gitweb can generate this file. The problem is that one would have to
temporary turn off using index file. This can be done by having the
following gitweb_list_projects.perl file:

-- >8 --
#!/usr/bin/perl

$projects_list = "";
-- >8 --

then use the following invocation to generate project index file:

$ GATEWAY_INTERFACE="CGI/1.1" HTTP_ACCEPT="*/*" REQUEST_METHOD="GET" \
  GITWEB_CONFIG=gitweb_list_projects.perl QUERY_STRING="a=project_index" \
  gitweb.cgi 

-- 
Jakub Narebski
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help