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

Re: [spf:guess,iffy] Re: "Integrated Web Client for git" GSoC proposal

From
Jakub Narebski <jnareb@gmail.com>
Date
Apr 16, 2010, 09:18 UTC
Message-ID
<201004161118.32163.jnareb@gmail.com>
In-Reply-To
<1271293123.6248.147.camel@denix>
On Thu, 15 April 2010, Sam Vilain wrote:
> On Thu, 2010-04-15 at 02:04 +0200, Jakub Narebski wrote:
> > gitweb was and is meant to be simple, easy to install git web interface
> > (single script + some static files), with minimal dependencies outside
> > Perl core, and running with as old Perl as feasible (good Unicode support
> > is requirement that forces minimal Perl version).

By the way, is the above statement correct? What should be the *goal* for gitweb? Is it running on oldest Perl possible (which IIRC is Perl 5.8.6, because gitweb needs good Unicode support)? Is it minimal required non-core dependencies (core as of Perl 5.8.6)? Is it being easy to install (single monolithic script + some minimal number of static files like CSS, JavaScript, images + perhaps extra files with optional features like output caching) by hand? Is it being easy to configure by hand?

With local::lib it is easy to install Perl modules from CPAN locally (in home directory), so perhaps we could ease on minimal dependencies rule. On the other hand gitweb is web app, and one would have to be able to configure web server to use locally installed Perl modules, which might be not possible; this swicthes the problem from "not being able to install Perl modules as non-root" to "not being able to install Perl modules that web server can use without help from sysadmin".

One of requirements is backwards compatibility of gitweb links (URLs), both query string based, and path_info URLs. Yet another is ability to *scan* for projects (this is IIRC requirement for git.kernel.org), rather than using project index file (perhaps (re)generated (semi)automatically).

Show 9 quoted lines
> > 
> > Gitalist requires Catalyst web framework, which while it is (one of)
> > modern Perl web frameworks is not exactly lightweight.
> 
> Ok, I just re-checked the dependencies and my assertion that a pure-perl
> Gitalist would be possible is indeed wrong.  It certainly is though with
> very lightweight frameworks like CGI::Application.  If you are splitting
> the script up, all the best to you, but please do consider something
> like that rather than re-inventing the wheel!

There exists very many web frameworks in Perl[1][2][3][4]: Catalyst (one of more popular, used by Gitalist), Jifty, CGI::Application (and its offshot Titanium), Mojolicus, Dancer, Squatting, Web::Simple,...

Nowadays many (all mentioned) of those web frameworks are either built on top of PSGI / Plack (Perl Superglue for Web Frameworks and Web Servers), or have PSGI / Plack adapter (see http://plackperl.org). So another solution would be to use bare-bones Plack instead of CGI with help of CGI.pm, perhaps also using one of URI dispatchers[5][6]. Plack/PSGI looks like the future of Perl web scripting... but is currently quite new, at version 0.9930.

[1]: http://www.perlfoundation.org/perl5/index.cgi?web_frameworks [2]: http://plackperl.org/ ("Frameworks" section) [3]: http://perl.worldken.org/search?q=web+framework [4]: http://search.cpan.org/search?query=web+framework&mode=all

[5]: http://www.perlfoundation.org/perl5/index.cgi?web_application_dispatchers [6]: http://github.com/miyagawa/plack-dispatching-samples

As to splitting gitweb into smaller modules (like e.g. SVN::Web)... Gitweb isn't the largest script in git sources: gitk is. But splitting gitk should be much easier - git-gui is already split. Close after gitweb is git-svn, which probably also need splitting; and again it would be easier to split parts of git-svn e.g into Git::SVN module, as git-svn already depends on Git.pm.

The trouble with splitting is installing split web script. I have no idea how to do this in cross-webserver way, cross-distribution and cross-system way (the filesystem hierarchy used by web server may differ from distribution to distribution, and from operating system to operating system).

-- 
Jakub Narebski
Poland
Next: Sam Vilain
Message 1 of 8 in “Re: [spf:guess,iffy] Re: "Integrated Web Client for git" GSoC proposal”
  1. Jakub NarebskiApr 16, 2010
  2. Sam VilainApr 17, 2010
  3. Tatsuhiko MiyagawaApr 17, 2010
  4. Jakub NarebskiApr 17, 2010
  5. Jakub NarebskiApr 17, 2010
  6. Jakub NarebskiApr 16, 2010
  7. Fwd: Re: "Integrated Web Client for git" GSoC proposalPavan Kumar Sunkara, Apr 17, 2010
  8. Jakub NarebskiApr 17, 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.