Skip to contentSkip to conversation

Ubuntu: gitweb always looks for projects in /var/cache/git (“404 - no projects found”)

DISCUSSION Alfonso Muñoz-Pomer Fuentes 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#1 lore raw
Quoted 8 lines · Alfonso Muñoz-Pomer Fuentes

I’ve discovered this weird behaviour in gitweb and documented a workaround in StackOverflow:
http://stackoverflow.com/questions/13609475/ubuntu-gitweb-always-looks-for-projects-in-var-cache-git-404-no-projects-f

Basically, the variable $projectroot in gitweb.cgi in the beginning is reset to the system default value in git_get_projects_list, when it is declared again.

Is this a known bug? Or am I missing something?

I think the analysis in that stack overflow post is wrong. The use of "our" in git_get_projects_list is not the culprit.

The problem is that one should not edit gitweb.cgi directly; its built-in defaults (which you are tweaking) are overridden by /etc/gitweb.conf, which is shipped by the Ubuntu package. You should be making your changes in the config file, not the CGI script.

-Peff

#2 lore raw

Thank you very much for the clarification. Noticing how this wasn’t documented anywhere I had the feeling that I was missing something.

Quoted 14 lines · Jeff King
Quoted 8 lines · Alfonso Muñoz-Pomer Fuentes

I’ve discovered this weird behaviour in gitweb and documented a workaround in StackOverflow:
http://stackoverflow.com/questions/13609475/ubuntu-gitweb-always-looks-for-projects-in-var-cache-git-404-no-projects-f

Basically, the variable $projectroot in gitweb.cgi in the beginning is reset to the system default value in git_get_projects_list, when it is declared again.

Is this a known bug? Or am I missing something?

I think the analysis in that stack overflow post is wrong. The use of "our" in git_get_projects_list is not the culprit.

Quoted 6 lines

The problem is that one should not edit gitweb.cgi directly; its built-in defaults (which you are tweaking) are overridden by /etc/gitweb.conf, which is shipped by the Ubuntu package. You should be making your changes in the config file, not the CGI script.

-Peff

--
Alfonso Muñoz-Pomer Fuentes
Johann Heinrich von Thünen-Institut Bundesforschungsinstitut für Ländliche Räume, Wald und Fischerei Institut für Forstgenetik
Sieker Landstrasse 2
22927 Grosshansdorf

Telefon: +49 (0)4102/696-145
Fax:     +49 (0)4102/696-200
Email:   [email protected]
Web:     http://www.vti.bund.de