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

Re: [PATCH (version C) 1/2] gitweb: Prepare for splitting gitweb

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 11, 2011, 23:21 UTC
Message-ID
<201102120021.58250.jnareb@gmail.com>
In-Reply-To
<4D49AB9C.2050307@mit.edu>
On Wed, 2 Feb 2011, Alejandro R. Sedeño wrote:
Show 32 quoted lines
> On 2/1/2011 11:50 AM, Jakub Narebski wrote:
> >
> > Prepare gitweb for being split into modules that would be installed
> > in gitweblibdir, by default alongside gitweb in 'lib/' subdirectory.
> > 
> > Gitweb would search first in 'lib/' subdirectory from where it is
> > installed, via
> > 
> >   use lib __DIR__.'/lib';
> > 
> > (This allow for tests to work with source version of gitweb without
> > changes.)  Then it searches in $(gitweblibdir) directory (set during
> > build time), by default "$(gitwebdir)/lib", via
> > 
> >   use lib "++GITWEBLIBDIR++";
> > 
> > "++GITWEBLIBDIR++" is set to appropriate value during build time
> > (generating gitweb.cgi).  This allows to select where to install
> > gitweb modules via 'gitweblibdir' build time configuration variable
> 
> I would personally prefer to see this path taken, as it seems the most
> flexible and would fulfill a use case I have.
> 
> I maintain a build of git in an AFS volume at MIT. One of its uses is
> symlinking to the current gitweb.cgi to instantly deploy a gitweb in a
> shared hosting environment (example: http://git.scripts.mit.edu/).
> 
> __DIR__ would point to the directory containing a user symlink to
> gitweb, which would allow users to add their own libraries, while
> ++GITWEBLIBDIR++ would allow the standard gitweb libraries to be
> hosted at a common path without placing additional burdens on the
> user at upgrade time.

Note however that if you want __DIR__ version to take preference over gitweblibdir version, then the 'use lib' statements have to be in reverse order, i.e.:

  +use lib "++GITWEBLIBDIR++";
  +use lib __DIR__ . '/lib';
-- 
Jakub Narebski
Poland
Previous: Alejandro R. SedeñoNext: Jakub Narebski
Message 6 of 7 in “gitweb: Begin splitting gitweb”
  1. 0/2 gitweb: Begin splitting gitwebJakub Narebski, Feb 1, 2011
  2. 1/2 gitweb: Prepare for splitting gitwebJakub Narebski, Feb 1, 2011
  3. 1/2 gitweb: Prepare for splitting gitwebJakub Narebski, Feb 1, 2011
  4. 1/2 gitweb: Prepare for splitting gitwebJakub Narebski, Feb 1, 2011
  5. Alejandro R. SedeñoFeb 2, 2011
  6. Jakub NarebskiFeb 11, 2011
  7. 2/2 gitweb: Create Gitweb::Util moduleJakub Narebski, Feb 1, 2011

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.