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

Re: [RFC/PATCHv3] git-instaweb: Add support for running gitweb via 'plackup'

From
EWEric Wong <normalperson@yhbt.net>
Date
May 23, 2010, 09:19 UTC
Message-ID
<20100523091812.GA3426@dcvr.yhbt.net>
In-Reply-To
<201005222330.43532.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> wrote:
Show 8 quoted lines
> On Thu, 20 May 2010, Jakub Narebski wrote:
> 
> > The configuration for 'plackup' is currently embedded in generated
> > gitweb.psgi wrapper, instead of using httpd.conf ($conf).
> 
> A question: is this solution acceptable?  Or should the configuration
> (port, address if git-instaweb was run with '--local', root) be in
> a separate file.
Hi Jakub,
Yes, the psgi wrapper is acceptable and probably ideal.

My understanding is that the .psgi file is analogous to a .ru file in the (Ruby) Rack world[1], and having only a .ru file is probably how I would add Rack support to git-instaweb if WEBrick weren't in Ruby core[2].

Show 5 quoted lines
> Webrick, which is in similar situation, uses httpd.conf config file in 
> YAML.  Unfortunately there is no config / serialization reader in Perl
> core, so if we have to go this route either the config file would have
> to be in Perl, or gitweb.psgi wrapper would have to include some simple
> config file parsing.

I don't think we need parsing in the gitweb.psgi wrapper, we'll just consider gitweb.psgi the config file. This is also the case for Rack .ru files, which can be made executable and have a shebang pointing to "rackup".

[1] - I'm not familiar with Plack/PSGI at all, but I've been dabbling
      quite a bit in Rack over the past year or two.
[2] - of course since WEBrick is in Ruby core and WEBrick supports CGI
      scripts out-of-the-box (unlike Rack), adding Rack support to
      instaweb would be a waste of time.
-- 
Eric Wong
Previous: Jakub NarebskiNext: Jakub Narebski
Message 6 of 12 in “git-instaweb: Add support for running gitweb via 'plackup'”
  1. git-instaweb: Add support for running gitweb via 'plackup'Jakub Narebski, May 19, 2010
  2. Jakub NarebskiMay 19, 2010
  3. [PATCHv2 (RFC)] git-instaweb: Add support for running gitweb via 'plackup'Jakub Narebski, May 20, 2010
  4. [RFC/PATCHv3] git-instaweb: Add support for running gitweb via 'plackup'Jakub Narebski, May 20, 2010
  5. Jakub NarebskiMay 22, 2010
  6. Eric WongMay 23, 2010
  7. Jakub NarebskiMay 23, 2010
  8. Ævar Arnfjörð BjarmasonMay 23, 2010
  9. Jakub NarebskiMay 25, 2010
  10. Jakub NarebskiMay 25, 2010
  11. Eric WongMay 23, 2010
  12. Jakub NarebskiMay 23, 2010

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.