Search code examples
gitgitolitegitweb

Is it necessary to install gitweb?


Is it necessary to install gitweb to the server or are there other ways to add gitweb with installed gitolite on the server?


Solution

  • gitolite is just an authorization layer, meaning it comes between your server (ssh or httpd) and git.

    You don't need gitweb if you don't need to browse the content of the git repos with a web GUI.

    But if you do, and you already have gitolite installed, then you would need to make gitweb call gitolite, and declare a gitweb category (otherwise, your user could see the content of repos they are not supposed to access).


    If you don't (need gitweb), Git 2.38 (Q3 2022), teaches "make all" to build gitweb or to avoid gitweb.

    See commit a35258c, commit affc3b7, commit 27438ef, commit b82d66e, commit 564ebde, commit 1e08fa5, commit 7decdb9 (28 Jun 2022) by Ævar Arnfjörð Bjarmason (avar).
    See commit d3b8274 (28 Jun 2022) by SZEDER Gábor (szeder).
    (Merged by Junio C Hamano -- gitster -- in commit 48e88a4, 18 Jul 2022)

    gitweb/Makefile: add a "NO_GITWEB" parameter

    Signed-off-by: Ævar Arnfjörð Bjarmason

    From looking at the {Free,Net,Dragonfly}BSD packages for Git, they've been monkeypatching "gitweb" out of the Makefile, let's be nicer and provide a NO_GITWEB=Y for their use.

    For the "all" target this allows for optionally restoring what's been the status quo before the preceding commit, but now we'll also behave correctly on the subsequent "make install".

    As before our installation of gitweb can be suppressed with NO_PERL.
    For backwards compatibility the NO_PERL=Y flag by itself still doesn't change whether or not we build gitweb, unlike the new NO_GITWEB=Y flag.

    And

    gitweb/Makefile: include in top-level Makefile

    Signed-off-by: Ævar Arnfjörð Bjarmason

    Include the gitweb/Makefile in the top-level Makefile rather than calling it as a sub-Makefile.
    As noted in the thread starting at here (in particular here) we'll pay a high cost on NOOP runs of "make" just to figure out that we have nothing to do for "make gitweb".

    The "gitweb" script also isn't maintained out-of-tree, unlike "gitk-git" or "git-gui", which both have their own "Makefile".
    Other parts of it are already integrated into our main Makefiles, e.g. the documentation is built by Documentation/Makefile since 07ea4df ("gitweb: Add gitweb(1) manpage for gitweb itself", 2011-10-16, Git v1.7.8-rc0 -- merge).