From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q3DEO-0004nE-Qq for garchives@archives.gentoo.org; Fri, 25 Mar 2011 20:03:37 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA27B1C168; Fri, 25 Mar 2011 20:00:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 892E21C168 for ; Fri, 25 Mar 2011 20:00:07 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0997D2AC00D for ; Fri, 25 Mar 2011 20:00:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 608C58006E for ; Fri, 25 Mar 2011 20:00:06 +0000 (UTC) From: "Christian Ruppert" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Christian Ruppert" Message-ID: <1687bc8af04a0e0e602aa902bd2c234d680e4143.idl0r@gentoo> Subject: [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata commit in: / X-VCS-Repository: proj/gitolite-gentoo X-VCS-Committer: idl0r X-VCS-Committer-Name: Christian Ruppert X-VCS-Revision: 1687bc8af04a0e0e602aa902bd2c234d680e4143 Date: Fri, 25 Mar 2011 20:00:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 1a8f6b372b628e8b7b89e157c9e5c694 commit: 1687bc8af04a0e0e602aa902bd2c234d680e4143 Author: Christian Ruppert gentoo org> AuthorDate: Fri Mar 25 19:52:33 2011 +0000 Commit: Christian Ruppert gentoo org> CommitDate: Fri Mar 25 19:52:33 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gitolite-gent= oo.git;a=3Dcommit;h=3D1687bc8a Merge commit 'refs/top-bases/t/export-key-metadata' into t/export-key-met= adata README.mkd | 30 +- conf/example.conf | 243 +--------- conf/example.gitolite.rc | 26 +- contrib/adc/able | 20 +- contrib/adc/adc.common-functions | 5 + contrib/adc/fork | 9 +- contrib/adc/get-rights-and-owner.in-perl | 15 +- contrib/adc/git | 123 +++++ contrib/adc/gl-reflog | 8 +- contrib/adc/hub | 443 +++++++++++++++++ contrib/adc/hub.mkd | 202 ++++++++ contrib/adc/perms | 115 +++++ contrib/adc/pygitolite.py | 77 +++ contrib/adc/rm | 4 +- contrib/adc/set-head | 17 + contrib/adc/who-pushed | 2 +- contrib/autotoc | 35 -- contrib/gerrit.mkd | 2 +- contrib/gitolite-tools.mkd | 2 +- contrib/gitweb/gitweb.conf | 44 ++- contrib/ldap/README.mkd | 6 +- contrib/vim/README.mkd | 2 +- doc/1-INSTALL.mkd | 53 ++- doc/2-admin.mkd | 56 ++- doc/3-faq-tips-etc.mkd | 285 ++---------- doc/CHANGELOG | 22 + doc/admin-defined-commands.mkd | 14 +- doc/big-config.mkd | 14 +- doc/delegation.mkd | 10 +- doc/developer-notes.mkd | 213 ++++++++ doc/gitolite.conf.mkd | 469 ++++++++++++++++++ doc/gitolite.rc.mkd | 62 ++- doc/hook-propagation.mkd | 4 +- doc/http-backend.mkd | 142 +++++-- doc/migrate.mkd | 10 +- doc/mirroring.mkd | 21 +- doc/mob-branches.mkd | 2 +- doc/monkeysphere.mkd | 2 + doc/overkill.mkd | 2 +- doc/packaging.mkd | 2 +- doc/progit-article.mkd | 14 +- doc/report-output.mkd | 19 + doc/shell-games.mkd | 25 +- doc/ssh-troubleshooting.mkd | 42 ++- doc/uninstall.mkd | 2 +- doc/who-uses-it.mkd | 4 +- doc/wildcard-repositories.mkd | 17 +- hooks/common/gl-pre-git.hub-sample | 10 + hooks/common/update | 62 +-- hooks/gitolite-admin/post-update | 8 +- src/gitolite.pm | 776 +++++++++++++++---------= ------ src/gitolite_env.pm | 157 ++++++ src/gitolite_rc.pm | 72 +++ src/gl-auth-command | 235 +++------ src/gl-compile-conf | 141 ++---- src/gl-dont-panic | 17 +- src/gl-easy-install | 16 +- src/gl-install | 33 +- src/gl-mirror-shell | 13 +- src/gl-mirror-sync | 4 +- src/gl-query-rc | 23 + src/gl-setup | 47 ++- src/gl-setup-authkeys | 64 ++-- src/gl-time | 30 +- src/gl-tool | 9 +- src/sshkeys-lint | 6 +- t/README.mkd | 11 +- t/t53-check-info-expand-output | 16 + t/t64-write-able | 11 +- t/t65-rsync | 83 ++++ t/t67-hub | 174 +++++++ t/test-driver.sh | 73 ++-- 72 files changed, 3485 insertions(+), 1542 deletions(-) diff --cc conf/example.gitolite.rc index 6f57994,d800357..6b73f34 --- a/conf/example.gitolite.rc +++ b/conf/example.gitolite.rc @@@ -31,18 -34,12 +34,20 @@@ $REPO_UMASK =3D 0077 # ---------------------------------------------------------------------= --------- $GL_BIG_CONFIG =3D 0; $GL_NO_DAEMON_NO_GITWEB =3D 0; + # $GL_NICE_VALUE =3D 0; =20 +# Define which metadata variables shall be exported to the gitolite env= ironment. +# Those variables can be used in hooks, e.g. for cia.vc +# A pubkey file might contain one or more of those variable. +# They can be defined by e.g:"# git-username: idl0r" +# Each '-' (dash) will be replaced by an '_' (underscore). +#@GL_METADATA =3D ( "git-username", "git-email", "git-realname", "git-r= ealname-ascii", "cia-vc-username" ); +#@GL_METADATA_REQUIRED =3D ( "git-username", "git-email", "git-realname= " ); + # ---------------------------------------------------------------------= --------- - # VARIABLES WITH A SECURITY IMPACT. READ DOC WELL BEFORE CHANGING THES= E. + # VARIABLES WITH A SECURITY IMPACT. READ DOCS BEFORE CHANGING THESE! # http://github.com/sitaramc/gitolite/blob/pu/doc/gitolite.rc.mkd#_vari= ables_with_a_security_impact + # (or http://sitaramc.github.com/gitolite/doc/gitolite.rc.html#_variabl= es_with_a_security_impact) # ---------------------------------------------------------------------= --------- # $GL_ALL_READ_ALL =3D 0; $GIT_PATH=3D""; diff --cc src/gitolite_rc.pm index 0000000,132fc90..3ae0224 mode 000000,100644..100644 --- a/src/gitolite_rc.pm +++ b/src/gitolite_rc.pm @@@ -1,0 -1,72 +1,72 @@@ + # stuff to help pull in the rc file, plus various constants +=20 + package gitolite_rc; + use Exporter 'import'; +=20 + # the first set (before the blank line) are constants defined right her= e in + # this program. The second set are from the 'rc'; We're clubbing all i= n + # because they're all "constants" in a programmatic sense + @EXPORT =3D qw( + $ABRT $WARN + $R_COMMANDS $W_COMMANDS + $REPONAME_PATT $USERNAME_PATT $REPOPATT_PATT + $ADC_CMD_ARGS_PATT + $current_data_version +=20 + $ADMIN_POST_UPDATE_CHAINS_TO $ENV $GITOLITE_BASE $GITOLITE_PATH $GI= T_PATH + $GL_ADC_PATH $GL_ADMINDIR $GL_ALL_INCLUDES_SPECIAL $GL_ALL_READ_ALL + $GL_BIG_CONFIG $GL_CONF $GL_CONF_COMPILED $GL_GET_MEMBERSHIPS_PGM + $GL_GITCONFIG_KEYS $GL_GITCONFIG_WILD $GL_KEYDIR $GL_LOGT $GL_NICE_= VALUE + $GL_NO_CREATE_REPOS $GL_NO_DAEMON_NO_GITWEB $GL_NO_SETUP_AUTHKEYS + $GL_PACKAGE_CONF $GL_PACKAGE_HOOKS $GL_PERFLOGT $GL_SITE_INFO + $GL_SLAVE_MODE $GL_WILDREPOS $GL_WILDREPOS_DEFPERMS + $GL_WILDREPOS_PERM_CATS $HTPASSWD_FILE $PROJECTS_LIST $REPO_BASE + $REPO_UMASK $RSYNC_BASE $SVNSERVE $UPDATE_CHAINS_TO +=20 + $GL_HTTP_ANON_USER +=20 - @GL_METADATA ++ @GL_METADATA @GL_METADATA_REQUIRED + ); +=20 + # ---------------------------------------------------------------------= --------- + # real constants + # ---------------------------------------------------------------------= --------- +=20 + $current_data_version =3D '1.7'; +=20 + $ABRT =3D "\n\t\t***** ABORTING *****\n "; + $WARN =3D "\n\t\t***** WARNING *****\n "; +=20 + # commands we're expecting + $R_COMMANDS=3Dqr/^(git[ -]upload-pack|git[ -]upload-archive)$/; + $W_COMMANDS=3Dqr/^git[ -]receive-pack$/; +=20 + # note that REPONAME_PATT allows "/", while USERNAME_PATT does not + # also, the reason REPONAME_PATT is a superset of USERNAME_PATT is (duh= !) + # because a repo can have "CREATOR" in the name + $REPONAME_PATT=3Dqr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@/+-]*$); + $USERNAME_PATT=3Dqr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@+-]*$); + # same as REPONAME, but used for wildcard repos, allows some common reg= ex metas + $REPOPATT_PATT=3Dqr(^\@?[0-9a-zA-Z[][\\^.$|()[\]*+?{}0-9a-zA-Z._\@/-]*$= ); +=20 + # ADC commands and arguments must match this pattern + $ADC_CMD_ARGS_PATT=3Dqr(^[0-9a-zA-Z._\@/+:-]*$); +=20 + # ---------------------------------------------------------------------= --------- + # bring in the rc vars and allow querying them + # ---------------------------------------------------------------------= --------- +=20 + # in case we're running under Apache using smart http + $ENV{HOME} =3D $ENV{GITOLITE_HTTP_HOME} if $ENV{GITOLITE_HTTP_HOME}; +=20 + # we also need to "bring in" the rc variables. The rc can only be in o= ne of + # these two places; the first one we find, wins + for ("$ENV{HOME}/.gitolite.rc", "/etc/gitolite/gitolite.rc") { + $ENV{GL_RC} ||=3D $_ if -f; + } + die "no rc file found\n" unless $ENV{GL_RC}; + do $ENV{GL_RC} or die "error parsing $ENV{GL_RC}\n"; +=20 + # ---------------------------------------------------------------------= --------- + # per perl rules, this should be the last line in such a file: + 1; diff --cc src/gl-auth-command index bafa925,754bfad..3ad0302 --- a/src/gl-auth-command +++ b/src/gl-auth-command @@@ -260,18 -173,8 +173,18 @@@ if (-x "$ENV{GL_REPO_BASE_ABS}/$repo.gi # over to git now # ---------------------------------------------------------------------= ------- =20 +my $metaenv =3D "Metadata ENV:"; +export_key_metadata($user); +foreach my $metadata (@GL_METADATA) { + $metadata =3D~ s/-/_/g; + if(defined($ENV{$metadata})) { + $metaenv =3D join(" ", $metaenv, "${metadata}=3D\"$ENV{$metadat= a}\""); + } +} +log_it("${metaenv}\n"); + if ($ENV{REQUEST_URI}) { - &log_it($ENV{REQUEST_URI}); + log_it($ENV{REQUEST_URI}); exec $ENV{GIT_HTTP_BACKEND}; # the GIT_HTTP_BACKEND env var should be set either by the rc file,= or as # a SetEnv in the apache config somewhere From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q3DD7-0004WT-KZ for garchives@archives.gentoo.org; Fri, 25 Mar 2011 20:02:17 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D56CC1C153; Fri, 25 Mar 2011 20:00:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 974DF1C153 for ; Fri, 25 Mar 2011 20:00:00 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 49F241BC118 for ; Fri, 25 Mar 2011 20:00:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id AB30A8006A for ; Fri, 25 Mar 2011 19:59:59 +0000 (UTC) From: "Christian Ruppert" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Christian Ruppert" Message-ID: <1687bc8af04a0e0e602aa902bd2c234d680e4143.idl0r@gentoo> Subject: [gentoo-commits] proj/gitolite-gentoo:master commit in: / X-VCS-Repository: proj/gitolite-gentoo X-VCS-Committer: idl0r X-VCS-Committer-Name: Christian Ruppert X-VCS-Revision: 1687bc8af04a0e0e602aa902bd2c234d680e4143 Date: Fri, 25 Mar 2011 19:59:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: c7cc4f525bd93bafef18b47f693b3e4c Message-ID: <20110325195959.a9h0Y9zAkqEGtFtnWJCBwA9nC3OP84NmXBgItotTHsk@z> commit: 1687bc8af04a0e0e602aa902bd2c234d680e4143 Author: Christian Ruppert gentoo org> AuthorDate: Fri Mar 25 19:52:33 2011 +0000 Commit: Christian Ruppert gentoo org> CommitDate: Fri Mar 25 19:52:33 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gitolite-gent= oo.git;a=3Dcommit;h=3D1687bc8a Merge commit 'refs/top-bases/t/export-key-metadata' into t/export-key-met= adata README.mkd | 30 +- conf/example.conf | 243 +--------- conf/example.gitolite.rc | 26 +- contrib/adc/able | 20 +- contrib/adc/adc.common-functions | 5 + contrib/adc/fork | 9 +- contrib/adc/get-rights-and-owner.in-perl | 15 +- contrib/adc/git | 123 +++++ contrib/adc/gl-reflog | 8 +- contrib/adc/hub | 443 +++++++++++++++++ contrib/adc/hub.mkd | 202 ++++++++ contrib/adc/perms | 115 +++++ contrib/adc/pygitolite.py | 77 +++ contrib/adc/rm | 4 +- contrib/adc/set-head | 17 + contrib/adc/who-pushed | 2 +- contrib/autotoc | 35 -- contrib/gerrit.mkd | 2 +- contrib/gitolite-tools.mkd | 2 +- contrib/gitweb/gitweb.conf | 44 ++- contrib/ldap/README.mkd | 6 +- contrib/vim/README.mkd | 2 +- doc/1-INSTALL.mkd | 53 ++- doc/2-admin.mkd | 56 ++- doc/3-faq-tips-etc.mkd | 285 ++---------- doc/CHANGELOG | 22 + doc/admin-defined-commands.mkd | 14 +- doc/big-config.mkd | 14 +- doc/delegation.mkd | 10 +- doc/developer-notes.mkd | 213 ++++++++ doc/gitolite.conf.mkd | 469 ++++++++++++++++++ doc/gitolite.rc.mkd | 62 ++- doc/hook-propagation.mkd | 4 +- doc/http-backend.mkd | 142 +++++-- doc/migrate.mkd | 10 +- doc/mirroring.mkd | 21 +- doc/mob-branches.mkd | 2 +- doc/monkeysphere.mkd | 2 + doc/overkill.mkd | 2 +- doc/packaging.mkd | 2 +- doc/progit-article.mkd | 14 +- doc/report-output.mkd | 19 + doc/shell-games.mkd | 25 +- doc/ssh-troubleshooting.mkd | 42 ++- doc/uninstall.mkd | 2 +- doc/who-uses-it.mkd | 4 +- doc/wildcard-repositories.mkd | 17 +- hooks/common/gl-pre-git.hub-sample | 10 + hooks/common/update | 62 +-- hooks/gitolite-admin/post-update | 8 +- src/gitolite.pm | 776 +++++++++++++++---------= ------ src/gitolite_env.pm | 157 ++++++ src/gitolite_rc.pm | 72 +++ src/gl-auth-command | 235 +++------ src/gl-compile-conf | 141 ++---- src/gl-dont-panic | 17 +- src/gl-easy-install | 16 +- src/gl-install | 33 +- src/gl-mirror-shell | 13 +- src/gl-mirror-sync | 4 +- src/gl-query-rc | 23 + src/gl-setup | 47 ++- src/gl-setup-authkeys | 64 ++-- src/gl-time | 30 +- src/gl-tool | 9 +- src/sshkeys-lint | 6 +- t/README.mkd | 11 +- t/t53-check-info-expand-output | 16 + t/t64-write-able | 11 +- t/t65-rsync | 83 ++++ t/t67-hub | 174 +++++++ t/test-driver.sh | 73 ++-- 72 files changed, 3485 insertions(+), 1542 deletions(-) diff --cc conf/example.gitolite.rc index 6f57994,d800357..6b73f34 --- a/conf/example.gitolite.rc +++ b/conf/example.gitolite.rc @@@ -31,18 -34,12 +34,20 @@@ $REPO_UMASK =3D 0077 # ---------------------------------------------------------------------= --------- $GL_BIG_CONFIG =3D 0; $GL_NO_DAEMON_NO_GITWEB =3D 0; + # $GL_NICE_VALUE =3D 0; =20 +# Define which metadata variables shall be exported to the gitolite env= ironment. +# Those variables can be used in hooks, e.g. for cia.vc +# A pubkey file might contain one or more of those variable. +# They can be defined by e.g:"# git-username: idl0r" +# Each '-' (dash) will be replaced by an '_' (underscore). +#@GL_METADATA =3D ( "git-username", "git-email", "git-realname", "git-r= ealname-ascii", "cia-vc-username" ); +#@GL_METADATA_REQUIRED =3D ( "git-username", "git-email", "git-realname= " ); + # ---------------------------------------------------------------------= --------- - # VARIABLES WITH A SECURITY IMPACT. READ DOC WELL BEFORE CHANGING THES= E. + # VARIABLES WITH A SECURITY IMPACT. READ DOCS BEFORE CHANGING THESE! # http://github.com/sitaramc/gitolite/blob/pu/doc/gitolite.rc.mkd#_vari= ables_with_a_security_impact + # (or http://sitaramc.github.com/gitolite/doc/gitolite.rc.html#_variabl= es_with_a_security_impact) # ---------------------------------------------------------------------= --------- # $GL_ALL_READ_ALL =3D 0; $GIT_PATH=3D""; diff --cc src/gitolite_rc.pm index 0000000,132fc90..3ae0224 mode 000000,100644..100644 --- a/src/gitolite_rc.pm +++ b/src/gitolite_rc.pm @@@ -1,0 -1,72 +1,72 @@@ + # stuff to help pull in the rc file, plus various constants +=20 + package gitolite_rc; + use Exporter 'import'; +=20 + # the first set (before the blank line) are constants defined right her= e in + # this program. The second set are from the 'rc'; We're clubbing all i= n + # because they're all "constants" in a programmatic sense + @EXPORT =3D qw( + $ABRT $WARN + $R_COMMANDS $W_COMMANDS + $REPONAME_PATT $USERNAME_PATT $REPOPATT_PATT + $ADC_CMD_ARGS_PATT + $current_data_version +=20 + $ADMIN_POST_UPDATE_CHAINS_TO $ENV $GITOLITE_BASE $GITOLITE_PATH $GI= T_PATH + $GL_ADC_PATH $GL_ADMINDIR $GL_ALL_INCLUDES_SPECIAL $GL_ALL_READ_ALL + $GL_BIG_CONFIG $GL_CONF $GL_CONF_COMPILED $GL_GET_MEMBERSHIPS_PGM + $GL_GITCONFIG_KEYS $GL_GITCONFIG_WILD $GL_KEYDIR $GL_LOGT $GL_NICE_= VALUE + $GL_NO_CREATE_REPOS $GL_NO_DAEMON_NO_GITWEB $GL_NO_SETUP_AUTHKEYS + $GL_PACKAGE_CONF $GL_PACKAGE_HOOKS $GL_PERFLOGT $GL_SITE_INFO + $GL_SLAVE_MODE $GL_WILDREPOS $GL_WILDREPOS_DEFPERMS + $GL_WILDREPOS_PERM_CATS $HTPASSWD_FILE $PROJECTS_LIST $REPO_BASE + $REPO_UMASK $RSYNC_BASE $SVNSERVE $UPDATE_CHAINS_TO +=20 + $GL_HTTP_ANON_USER +=20 - @GL_METADATA ++ @GL_METADATA @GL_METADATA_REQUIRED + ); +=20 + # ---------------------------------------------------------------------= --------- + # real constants + # ---------------------------------------------------------------------= --------- +=20 + $current_data_version =3D '1.7'; +=20 + $ABRT =3D "\n\t\t***** ABORTING *****\n "; + $WARN =3D "\n\t\t***** WARNING *****\n "; +=20 + # commands we're expecting + $R_COMMANDS=3Dqr/^(git[ -]upload-pack|git[ -]upload-archive)$/; + $W_COMMANDS=3Dqr/^git[ -]receive-pack$/; +=20 + # note that REPONAME_PATT allows "/", while USERNAME_PATT does not + # also, the reason REPONAME_PATT is a superset of USERNAME_PATT is (duh= !) + # because a repo can have "CREATOR" in the name + $REPONAME_PATT=3Dqr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@/+-]*$); + $USERNAME_PATT=3Dqr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@+-]*$); + # same as REPONAME, but used for wildcard repos, allows some common reg= ex metas + $REPOPATT_PATT=3Dqr(^\@?[0-9a-zA-Z[][\\^.$|()[\]*+?{}0-9a-zA-Z._\@/-]*$= ); +=20 + # ADC commands and arguments must match this pattern + $ADC_CMD_ARGS_PATT=3Dqr(^[0-9a-zA-Z._\@/+:-]*$); +=20 + # ---------------------------------------------------------------------= --------- + # bring in the rc vars and allow querying them + # ---------------------------------------------------------------------= --------- +=20 + # in case we're running under Apache using smart http + $ENV{HOME} =3D $ENV{GITOLITE_HTTP_HOME} if $ENV{GITOLITE_HTTP_HOME}; +=20 + # we also need to "bring in" the rc variables. The rc can only be in o= ne of + # these two places; the first one we find, wins + for ("$ENV{HOME}/.gitolite.rc", "/etc/gitolite/gitolite.rc") { + $ENV{GL_RC} ||=3D $_ if -f; + } + die "no rc file found\n" unless $ENV{GL_RC}; + do $ENV{GL_RC} or die "error parsing $ENV{GL_RC}\n"; +=20 + # ---------------------------------------------------------------------= --------- + # per perl rules, this should be the last line in such a file: + 1; diff --cc src/gl-auth-command index bafa925,754bfad..3ad0302 --- a/src/gl-auth-command +++ b/src/gl-auth-command @@@ -260,18 -173,8 +173,18 @@@ if (-x "$ENV{GL_REPO_BASE_ABS}/$repo.gi # over to git now # ---------------------------------------------------------------------= ------- =20 +my $metaenv =3D "Metadata ENV:"; +export_key_metadata($user); +foreach my $metadata (@GL_METADATA) { + $metadata =3D~ s/-/_/g; + if(defined($ENV{$metadata})) { + $metaenv =3D join(" ", $metaenv, "${metadata}=3D\"$ENV{$metadat= a}\""); + } +} +log_it("${metaenv}\n"); + if ($ENV{REQUEST_URI}) { - &log_it($ENV{REQUEST_URI}); + log_it($ENV{REQUEST_URI}); exec $ENV{GIT_HTTP_BACKEND}; # the GIT_HTTP_BACKEND env var should be set either by the rc file,= or as # a SetEnv in the apache config somewhere