X-Git-Url: https://git.madduck.net/gitweb-conf.git/blobdiff_plain/b82654e59aa8877c55f1e63f1cf16a98b11be0a6..993934a558804b723817da759b0d2590e8c90277:/gitweb.conf diff --git a/gitweb.conf b/gitweb.conf index 0d69835..3dcc651 100644 --- a/gitweb.conf +++ b/gitweb.conf @@ -1,12 +1,13 @@ -$subdir = "madduck/pub"; +$vhostdir = "madduck"; +$pubdir = "pub"; $confroot = "/srv/git/gitweb/git.madduck.net"; -$projectroot = "/srv/git/repos/$subdir"; +$projectroot = "/srv/git/repos/$vhostdir/$pubdir"; $git_temp = "/tmp"; $site_header = "$confroot/header.html"; $site_footer = "$confroot/footer.html"; $projects_list = $projectroot; -$default_projects_order = "age"; -@git_base_url_list=("git://git.madduck.net/$subdir", "ssh://git@git.madduck.net/$subdir"); +$default_projects_order = "project"; +@git_base_url_list=("git://git.madduck.net/$vhostdir/$pubdir", "ssh://git@git.madduck.net/$vhostdir/$pubdir", "madduck:$pubdir"); $logo = '/git-logo.png'; $favicon = '/git-favicon.png'; push @stylesheets, '/gitweb.css'; @@ -15,25 +16,4 @@ $feature{'pathinfo'}{'default'} = [1]; $feature{'forks'}{'default'} = [1]; $prevent_xss = 1; -my $gl_conf_compiled = "/srv/git/.gitolite/conf/gitolite.conf-compiled.pm"; -my $username = $cgi->remote_user; - -our %repos; -die "parse $gl_conf_compiled failed: " . ($! or $@) unless do $gl_conf_compiled; - -$export_auth_hook = sub { -# open FILE, ">>/tmp/gitweb.auth" or die $!; - - my $reponame = "$subdir/" . shift; - # gitweb passes us the full repo path; so we strip the beginning... - $reponame =~ s/\Q$projectroot\E\/?//; - # ...and the end, to get the repo name as it is specified in gitolite conf - $reponame =~ s/\.git$//; - -# use Data::Dumper; -# print FILE Dumper($username, $reponame, $repos); -# close FILE; - - return exists $repos{$reponame}{R}{$username} - || exists $repos{$reponame}{R}{'@all'}; -}; +$export_auth_hook = sub { return -e "$_[0]/git-daemon-export-ok"; };