git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Working on gitweb (was: [PATCHv5] Add Gitweb support for XZ compressed snapshots)

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 3, 2009, 17:26 UTC
Message-ID
<200908031926.15255.jnareb@gmail.com>
In-Reply-To
<9b18b3110908010413w51e901dfk5a6f1666e5c3197f@mail.gmail.com>
Dnia sobota 1. sierpnia 2009 13:13, demerphq napisał:
Show 11 quoted lines
> One thing i notice is that most/all of the existing repos are forks of git.
> 
> And the changes are to gitweb.perl, persumably on the assumption that
> people upgrade using the install process.
> 
> That doesn't make it easy to track changes that are made to the
> production version ("installed" version), unless im missing something.
> 
> How does one set up gitweb so that one can hack its sources and track
> them in a sane way when you are not using make install-gitweb
> (whatever) all the time?

There are at least two possible options. First (that is the one I use) is to create script to update gitweb, which would run "make gitweb/gitweb.cgi", with appropriate option, then copy files, like gitweb-update.sh script below.

Second option is to do like t/t9500* gitweb test, which means providing config file by using GITWEB_CONFIG environment variable, and set all required options/variables like $GIT via config file instead of via build time configuration. See also gitweb-run.sh script below.

-- [gitweb-update.sh] -- #!/bin/bash

#BINDIR="/usr/bin" 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" \
	     GITWEB_BLAMEJS="/gitweb/blame.js" \
	     GITWEB_HOMETEXT="/home/local/scm/indextext.html" \
	     bindir=$BINDIR \
	     gitweb/gitweb.cgi
	popd
}
function copy_gitweb()
{
	cp -fv ~/git/gitweb/gitweb.{cgi,css} /home/local/gitweb/
}

make_gitweb copy_gitweb

# end of gitweb-update.sh

-- [gitweb-run.sh] -- #!/bin/bash

export GATEWAY_INTERFACE="CGI/1.1" export HTTP_ACCEPT="*/*" export REQUEST_METHOD="GET" export QUERY_STRING=""$1"" export PATH_INFO=""$2""

export GITWEB_CONFIG="~/git/gitweb/gitweb_config.perl"
perl -- ~/git/gitweb/gitweb.perl

-- [gitweb_config.perl] -- #!/usr/bin/perl

# gitweb configuration

our $version = "current"; #our $GIT = "/usr/bin/git"; our $GIT = "/home/local/git/git"; our $projectroot = "/home/local/scm"; our $home_link_str = "projects"; our $site_name = "[localhost]"; our $site_header = ""; our $site_footer = ""; our $home_text = "indextext.html"; our @stylesheets = ("file:///home/user/git/gitweb/gitweb.css"); our $logo = "file:///home/user/git/gitweb/git-logo.png"; our $favicon = "file:///home/user/git/gitweb/git-favicon.png"; our $blamejs = "file:///home/user/git/gitweb/blame.js"; our $projects_list = ""; our $export_ok = ""; our $strict_export = ""; our $project_maxdepth = 2007; our @git_base_url_list = ("/home/user/git");

$feature{'blame'}{'default'} = [1]; $feature{'grep'}{'default'} = [1]; $feature{'pickaxe'}{'default'} = [1];

# end of gitweb_config.perl
-- 
Jakub Narebski
Poland
Previous: Jakub Narebski
Message 10 of 10 in “[PATCHv5] Add Gitweb support for XZ compressed snapshots”
  1. Mark A RadaAug 1, 2009
  2. J.H.Aug 1, 2009
  3. demerphqAug 1, 2009
  4. Jakub NarebskiAug 1, 2009
  5. demerphqAug 1, 2009
  6. Jakub NarebskiAug 2, 2009
  7. demerphqAug 2, 2009
  8. Jakub NarebskiAug 3, 2009
  9. Jakub NarebskiAug 1, 2009
  10. Jakub NarebskiAug 3, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.