From: "Christian Ruppert" <idl0r@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gitolite-gentoo:master commit in: /
Date: Fri, 25 Mar 2011 19:59:59 +0000 (UTC) [thread overview]
Message-ID: <1687bc8af04a0e0e602aa902bd2c234d680e4143.idl0r@gentoo> (raw)
Message-ID: <20110325195959.a9h0Y9zAkqEGtFtnWJCBwA9nC3OP84NmXBgItotTHsk@z> (raw)
commit: 1687bc8af04a0e0e602aa902bd2c234d680e4143
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 25 19:52:33 2011 +0000
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
CommitDate: Fri Mar 25 19:52:33 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gitolite-gentoo.git;a=commit;h=1687bc8a
Merge commit 'refs/top-bases/t/export-key-metadata' into t/export-key-metadata
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 = 0077
# ------------------------------------------------------------------------------
$GL_BIG_CONFIG = 0;
$GL_NO_DAEMON_NO_GITWEB = 0;
+ # $GL_NICE_VALUE = 0;
+# Define which metadata variables shall be exported to the gitolite environment.
+# 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 = ( "git-username", "git-email", "git-realname", "git-realname-ascii", "cia-vc-username" );
+#@GL_METADATA_REQUIRED = ( "git-username", "git-email", "git-realname" );
+
# ------------------------------------------------------------------------------
- # VARIABLES WITH A SECURITY IMPACT. READ DOC WELL BEFORE CHANGING THESE.
+ # VARIABLES WITH A SECURITY IMPACT. READ DOCS BEFORE CHANGING THESE!
# http://github.com/sitaramc/gitolite/blob/pu/doc/gitolite.rc.mkd#_variables_with_a_security_impact
+ # (or http://sitaramc.github.com/gitolite/doc/gitolite.rc.html#_variables_with_a_security_impact)
# ------------------------------------------------------------------------------
# $GL_ALL_READ_ALL = 0;
$GIT_PATH="";
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
+
+ package gitolite_rc;
+ use Exporter 'import';
+
+ # the first set (before the blank line) are constants defined right here in
+ # this program. The second set are from the 'rc'; We're clubbing all in
+ # because they're all "constants" in a programmatic sense
+ @EXPORT = qw(
+ $ABRT $WARN
+ $R_COMMANDS $W_COMMANDS
+ $REPONAME_PATT $USERNAME_PATT $REPOPATT_PATT
+ $ADC_CMD_ARGS_PATT
+ $current_data_version
+
+ $ADMIN_POST_UPDATE_CHAINS_TO $ENV $GITOLITE_BASE $GITOLITE_PATH $GIT_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
+
+ $GL_HTTP_ANON_USER
+
- @GL_METADATA
++ @GL_METADATA @GL_METADATA_REQUIRED
+ );
+
+ # ------------------------------------------------------------------------------
+ # real constants
+ # ------------------------------------------------------------------------------
+
+ $current_data_version = '1.7';
+
+ $ABRT = "\n\t\t***** ABORTING *****\n ";
+ $WARN = "\n\t\t***** WARNING *****\n ";
+
+ # commands we're expecting
+ $R_COMMANDS=qr/^(git[ -]upload-pack|git[ -]upload-archive)$/;
+ $W_COMMANDS=qr/^git[ -]receive-pack$/;
+
+ # 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=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@/+-]*$);
+ $USERNAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@+-]*$);
+ # same as REPONAME, but used for wildcard repos, allows some common regex metas
+ $REPOPATT_PATT=qr(^\@?[0-9a-zA-Z[][\\^.$|()[\]*+?{}0-9a-zA-Z._\@/-]*$);
+
+ # ADC commands and arguments must match this pattern
+ $ADC_CMD_ARGS_PATT=qr(^[0-9a-zA-Z._\@/+:-]*$);
+
+ # ------------------------------------------------------------------------------
+ # bring in the rc vars and allow querying them
+ # ------------------------------------------------------------------------------
+
+ # in case we're running under Apache using smart http
+ $ENV{HOME} = $ENV{GITOLITE_HTTP_HOME} if $ENV{GITOLITE_HTTP_HOME};
+
+ # we also need to "bring in" the rc variables. The rc can only be in one of
+ # these two places; the first one we find, wins
+ for ("$ENV{HOME}/.gitolite.rc", "/etc/gitolite/gitolite.rc") {
+ $ENV{GL_RC} ||= $_ if -f;
+ }
+ die "no rc file found\n" unless $ENV{GL_RC};
+ do $ENV{GL_RC} or die "error parsing $ENV{GL_RC}\n";
+
+ # ------------------------------------------------------------------------------
+ # 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
# ----------------------------------------------------------------------------
+my $metaenv = "Metadata ENV:";
+export_key_metadata($user);
+foreach my $metadata (@GL_METADATA) {
+ $metadata =~ s/-/_/g;
+ if(defined($ENV{$metadata})) {
+ $metaenv = join(" ", $metaenv, "${metadata}=\"$ENV{$metadata}\"");
+ }
+}
+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
next reply other threads:[~2011-03-25 20:02 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 20:00 Christian Ruppert [this message]
2011-03-25 19:59 ` [gentoo-commits] proj/gitolite-gentoo:master commit in: / Christian Ruppert
-- strict thread matches above, loose matches on Subject: below --
2011-03-28 15:19 [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-03-28 15:19 Christian Ruppert
2011-03-25 20:00 [gentoo-commits] proj/gitolite-gentoo:t/ssh-key-options " Christian Ruppert
2011-03-25 20:00 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-03-25 20:00 [gentoo-commits] proj/gitolite-gentoo:t/ssh-key-options " Christian Ruppert
2011-03-25 20:00 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-03-25 20:00 Christian Ruppert
2011-03-25 19:59 [gentoo-commits] proj/gitolite-gentoo:master " Christian Ruppert
2011-03-25 20:00 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-03-25 19:59 [gentoo-commits] proj/gitolite-gentoo:master " Christian Ruppert
2011-03-25 20:00 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-03-25 19:59 [gentoo-commits] proj/gitolite-gentoo:master " Christian Ruppert
2011-03-25 20:00 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-03-25 19:59 [gentoo-commits] proj/gitolite-gentoo:master " Christian Ruppert
2011-03-25 20:00 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-03-25 19:59 [gentoo-commits] proj/gitolite-gentoo:master " Christian Ruppert
2011-03-25 20:00 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-03-25 19:59 [gentoo-commits] proj/gitolite-gentoo:master " Christian Ruppert
2011-02-16 16:07 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-03-25 19:59 [gentoo-commits] proj/gitolite-gentoo:master " Christian Ruppert
2011-02-16 16:07 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-03-25 19:59 [gentoo-commits] proj/gitolite-gentoo:master " Christian Ruppert
2011-03-25 20:00 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-02-16 16:07 [gentoo-commits] proj/gitolite-gentoo:t/find_pubkeys-function " Christian Ruppert
2011-02-16 16:07 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-02-16 16:07 [gentoo-commits] proj/gitolite-gentoo:t/export_key_metadata-function " Christian Ruppert
2011-02-16 16:07 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-02-16 16:07 Christian Ruppert
2011-02-16 16:07 Christian Ruppert
2011-02-16 16:07 Christian Ruppert
2011-02-16 16:07 Christian Ruppert
2011-02-16 16:07 [gentoo-commits] proj/gitolite-gentoo:master " Christian Ruppert
2011-02-15 16:42 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-02-15 16:42 [gentoo-commits] proj/gitolite-gentoo:t/find_pubkeys-function " Christian Ruppert
2011-02-15 16:42 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-02-15 16:42 [gentoo-commits] proj/gitolite-gentoo:t/export_key_metadata-function " Christian Ruppert
2011-02-15 16:42 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-02-15 16:42 [gentoo-commits] proj/gitolite-gentoo:t/export_key_metadata-function " Christian Ruppert
2011-02-15 16:42 ` [gentoo-commits] proj/gitolite-gentoo:t/export-key-metadata " Christian Ruppert
2011-02-15 16:42 Christian Ruppert
2011-02-15 16:42 Christian Ruppert
2011-02-15 16:42 Christian Ruppert
2011-02-15 16:42 Christian Ruppert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1687bc8af04a0e0e602aa902bd2c234d680e4143.idl0r@gentoo \
--to=idl0r@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox