git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: demerphq <demerphq@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Working on gitweb (was: [PATCHv5] Add Gitweb support for XZ compressed snapshots)
Date: Mon, 3 Aug 2009 19:26:11 +0200	[thread overview]
Message-ID: <200908031926.15255.jnareb@gmail.com> (raw)
In-Reply-To: <9b18b3110908010413w51e901dfk5a6f1666e5c3197f@mail.gmail.com>

Dnia sobota 1. sierpnia 2009 13:13, demerphq napisał:

> 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

  parent reply	other threads:[~2009-08-03 17:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-01  0:40 [PATCHv5] Add Gitweb support for XZ compressed snapshots Mark A Rada
2009-08-01  0:47 ` J.H.
2009-08-01  8:12   ` demerphq
2009-08-01  9:08     ` Jakub Narebski
2009-08-01 10:13       ` demerphq
2009-08-02 23:25         ` Jakub Narebski
2009-08-02 23:55           ` demerphq
2009-08-03  0:27             ` Jakub Narebski
     [not found]         ` <9b18b3110908010413w51e901dfk5a6f1666e5c3197f@mail.gmail.com>
2009-08-03 17:26           ` Jakub Narebski [this message]
2009-08-01  8:14   ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908031926.15255.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=demerphq@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).