git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Drew Northup <drew.northup@maine.edu>
Cc: Jonathan Nieder <jrnieder@gmail.com>, git@vger.kernel.org
Subject: Re: [RFD] Gitweb: Source configuration from file separate from the CGI script
Date: Thu, 17 Mar 2011 03:21:48 -0700 (PDT)	[thread overview]
Message-ID: <m3lj0e59ps.fsf@localhost.localdomain> (raw)
In-Reply-To: <1300286650.28805.29.camel@drew-northup.unet.maine.edu>

Drew Northup <drew.northup@maine.edu> writes:
> On Wed, 2011-03-16 at 09:34 -0500, Jonathan Nieder wrote:
> > Drew Northup wrote:
> > 
> > > I just upgraded my Gitweb package (I'm testing the EPEL RHEL5 latest;
> > > I'm not too happy with them tweaking the paths) and as I should have
> > > expected all of my Gitweb configuration is now gone.

We discourage configuring gitweb by editing generated gitweb.cgi file
for a long, long time, at least since v1.4.2-rc2-102-gc8d138a (gitweb:
optionally read config from GITWEB_CONFIG, 2006-08-02).  It is
described in gitweb/README since v1.4.3-rc1-7-g45a3b12 (gitweb:
Document features better, 2006-10-07).

> > 
> > In gitweb/README, I see:

Not only gitweb/README; in gitweb.cgi that you are, I suppose,
editing, you have $GITWEB_CONFIG mentioned 25 times as a place
to override default configuration.

> > 
> > | You can adjust gitweb behaviour using the file specified in `GITWEB_CONFIG`
> > | (defaults to 'gitweb_config.perl' in the same directory as the CGI), and
> > | as a fallback `GITWEB_CONFIG_SYSTEM` (defaults to /etc/gitweb.conf).
> 
> I apparently missed that. Alas, I didn't see it in the code when I was
> setting my values so I assumed that it wasn't available.

$GITWEB_CONFIG is mentioned 25 times in gitweb source; is it not enough?

> Perhaps we can make this a little more obvious?

How can we make it more obvious?  gitweb/INSTALL has "Build time
configuration" just below instruction on how to build it, and it
mentions "How to configure gitweb for your local system" section in
gitweb/README in very first line of this section.

> I'll go try that out and see if I can make it break--putting it in
> the same directory definitely wouldn't have helped this time.

First, as Jonathan cited, you can by default beside
'gitweb_config.perl' in the same directory as the CGI use '
/etc/gitweb.conf' file.

Second, you can configure where GITWEB_CONFIG and GITWEB_CONFIG_SYSTEM
are to be found dusing build time, e.g.

  $ make GITWEB_CONFIG_SYSTEM=/etc/gitweb/gitweb_config.perl \
         install-gitweb

Third, you can override where gitweb searches for its config files
using GITWEB_CONFIG and/or GITWEB_CONFIG_SYSTEM configuration
variables; quite useful for debugging gitweb, and for gitweb tests in
git.git repository.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2011-03-17 10:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 14:26 [RFD] Gitweb: Source configuration from file separate from the CGI script Drew Northup
2011-03-16 14:34 ` Jonathan Nieder
2011-03-16 14:44   ` Drew Northup
2011-03-17 10:21     ` Jakub Narebski [this message]
     [not found]       ` <1300361067.3010.1.camel@drew-northup.unet.maine.edu>
2011-03-17 15:41         ` Jakub Narebski
2011-03-18 14:07           ` Drew Northup
2011-03-18 14:51             ` Todd Zullinger
2011-03-18 15:21               ` Drew Northup
2011-03-18 15:38                 ` Todd Zullinger
2011-03-18 17:54             ` Jonathan Nieder
2011-03-22 16:01       ` Matt Ryan
2011-03-22 21:50         ` 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=m3lj0e59ps.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=drew.northup@maine.edu \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    /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).