gitweb $projectroot incorrect after upgrading to 3.6.3

168 views
Skip to first unread message

john.v...@effnet.com

unread,
Nov 19, 2022, 11:26:22 AM11/19/22
to Repo and Gerrit Discussion
After upgrading from 3.6.2 to 3.6.3 $projectroot seems to be <gerrit-git-path>/<repo> which causes gitweb to break.

Manually setting it to <gerrit-git-path> in tmp/gitweb_config<id>.perl makes it work again (until that file is replaced).

David Ostrovsky

unread,
Nov 19, 2022, 10:55:01 PM11/19/22
to Repo and Gerrit Discussion
Thanks for letting us know and for the investigation. Should be fixed in: [1].

This regression was introduced in stable-3.2 branch and included in these
minor releases: v3.4.7, v3.4.8, v3.5.4, v3.6.3, and v3.7.0.


lucamilanesio

unread,
Nov 20, 2022, 5:12:35 AM11/20/22
to Repo and Gerrit Discussion
On Sunday, November 20, 2022 at 3:55:01 AM UTC David Ostrovsky wrote:
john.v...@effnet.com schrieb am Samstag, 19. November 2022 um 17:26:22 UTC+1:
After upgrading from 3.6.2 to 3.6.3 $projectroot seems to be <gerrit-git-path>/<repo> which causes gitweb to break.

Manually setting it to <gerrit-git-path> in tmp/gitweb_config<id>.perl makes it work again (until that file is replaced).


Thanks for letting us know and for the investigation. Should be fixed in: [1].

Thanks @DavidO for the quick fix, and apologies for having broken the functionality.
I believe we need a lot more IT testing for the GitwebServlet !

Luca.

David Ostrovsky

unread,
Nov 20, 2022, 12:28:27 PM11/20/22
to Repo and Gerrit Discussion
lucamilanesio schrieb am Sonntag, 20. November 2022 um 11:12:35 UTC+1:
On Sunday, November 20, 2022 at 3:55:01 AM UTC David Ostrovsky wrote:
john.v...@effnet.com schrieb am Samstag, 19. November 2022 um 17:26:22 UTC+1:
After upgrading from 3.6.2 to 3.6.3 $projectroot seems to be <gerrit-git-path>/<repo> which causes gitweb to break.

Manually setting it to <gerrit-git-path> in tmp/gitweb_config<id>.perl makes it work again (until that file is replaced).


Thanks for letting us know and for the investigation. Should be fixed in: [1].

Thanks @DavidO for the quick fix, and apologies for having broken the functionality.
I believe we need a lot more IT testing for the GitwebServlet !

Indeed, I have just created coverage report for gerrit core: [1] and unfortunately
the whole httpd/gitweb package still has 0.0 % test coverage: [2] ;-(

Fabio Porcedda

unread,
Dec 16, 2022, 5:28:05 AM12/16/22
to Repo and Gerrit Discussion
Il giorno sabato 19 novembre 2022 alle 17:26:22 UTC+1 john.v...@effnet.com ha scritto:
After upgrading from 3.6.2 to 3.6.3 $projectroot seems to be <gerrit-git-path>/<repo> which causes gitweb to break.

Manually setting it to <gerrit-git-path> in tmp/gitweb_config<id>.perl makes it work again (until that file is replaced).

So as a workaround I should change the line:
$projectroot = $ENV{'GITWEB_PROJECTROOT'};
can you please share the exact change?

Thanks


Athila Mattos

unread,
Dec 16, 2022, 8:15:12 AM12/16/22
to Repo and Gerrit Discussion
Hey there, Fabio,

I have just upgraded Gerrit in my environment and I hit this bug. Following the suggestion from OP, I can confirm this as working.
The change you are looking for is:

$projectroot = '/path/to/your/repositories';

It seems like Gerrit allows overrides to the internal gitweb [1] by using this file '$site_path'/etc/gitweb_config.perl, but according to my tests, I didn't manage to override this particular variable, and changing the .perl file within the tmp directory seemed to be the only way for now.

Also, I am currently trying to configure Gerrit to use my an external unmanaged gitweb server as described in this [2] documentation. I am trying to determine if this could be another way to go around it until the bug is fixed.

Hope that helps.

Thank you,
Athila

Fabio Porcedda

unread,
Dec 16, 2022, 8:56:28 AM12/16/22
to Repo and Gerrit Discussion
Il giorno venerdì 16 dicembre 2022 alle 14:15:12 UTC+1 athila....@gmail.com ha scritto:
Hey there, Fabio,

I have just upgraded Gerrit in my environment and I hit this bug. Following the suggestion from OP, I can confirm this as working.
The change you are looking for is:

$projectroot = '/path/to/your/repositories';

Thanks a lot,  it worked!
Reply all
Reply to author
Forward
0 new messages