From: martin f. krafft Date: Wed, 3 Feb 2010 06:28:48 +0000 (+0100) Subject: initial commit X-Git-Url: https://git.madduck.net/gitweb-conf.git/commitdiff_plain/b82654e59aa8877c55f1e63f1cf16a98b11be0a6 initial commit --- b82654e59aa8877c55f1e63f1cf16a98b11be0a6 diff --git a/footer.html b/footer.html new file mode 100644 index 0000000..383113a --- /dev/null +++ b/footer.html @@ -0,0 +1,15 @@ + diff --git a/gitweb.conf b/gitweb.conf new file mode 100644 index 0000000..0d69835 --- /dev/null +++ b/gitweb.conf @@ -0,0 +1,39 @@ +$subdir = "madduck/pub"; +$confroot = "/srv/git/gitweb/git.madduck.net"; +$projectroot = "/srv/git/repos/$subdir"; +$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"); +$logo = '/git-logo.png'; +$favicon = '/git-favicon.png'; +push @stylesheets, '/gitweb.css'; +push @stylesheets, '/local.css'; +$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'}; +}; diff --git a/header.html b/header.html new file mode 100644 index 0000000..92576a9 --- /dev/null +++ b/header.html @@ -0,0 +1,18 @@ +

madduck's git repository

+ +

Every one of the projects in this repository is available at the canonical +URL git://git.madduck.net/madduck/pub/<projectpath> — see +each project's metadata for the exact URL.

+ +

All patches and comments are welcome. Please squash your changes to logical +commits before using git-format-patch and git-send-email to +patches@git.madduck.net. +If you'd read over the Git project's submission guidelines and adhered to them, +I'd be especially grateful.

+ +

SSH access, as well as push access can be individually + arranged.

diff --git a/local.css b/local.css new file mode 100644 index 0000000..d848d7b --- /dev/null +++ b/local.css @@ -0,0 +1,18 @@ +h1 { + padding: 8px 9px; + background-color: #d9d8d1; + letter-spacing: 0.10em; +} + +p { + margin: 1em 9px; + width: 75%; +} + +p.projsearch { + width: 100%; +} + +div.footer { + font-size: smaller; +}