aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2016-02-20 14:08:08 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2016-02-20 14:08:08 -0800
commit1c88b9b446d645c12d6e9e2349ccb00d7a37091c (patch)
tree575d123faf5162d420876a141cb014976ec15d26
parentMerge branch 'wip-sshfp' (diff)
parentv3.6.5 (diff)
downloadgitolite-gentoo-1c88b9b446d645c12d6e9e2349ccb00d7a37091c.tar.gz
gitolite-gentoo-1c88b9b446d645c12d6e9e2349ccb00d7a37091c.tar.bz2
gitolite-gentoo-1c88b9b446d645c12d6e9e2349ccb00d7a37091c.zip
Merge tag 'v3.6.5'gitolite-gentoo-3.6.5
v3.6.5
-rw-r--r--CHANGELOG19
l---------ISSUE_TEMPLATE1
l---------PULL_REQUEST_TEMPLATE1
-rwxr-xr-xsrc/commands/access2
-rwxr-xr-xsrc/commands/perms6
-rwxr-xr-xsrc/commands/sshkeys-lint14
-rwxr-xr-xsrc/commands/who-pushed5
-rw-r--r--src/lib/Gitolite/Conf/Load.pm1
-rw-r--r--src/lib/Gitolite/Triggers/Mirroring.pm2
-rwxr-xr-xsrc/triggers/repo-specific-hooks4
10 files changed, 36 insertions, 19 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 98e0174..494ba21 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,22 @@
+2016-02-20 v3.6.5 allow creator check to be bypassed during mirroring
+
+ handle new style ssh fingerprinting correctly (thanks to
+ Robin Johnson)
+
+ allow pre-auto-gc as a repo-specific hook
+
+ optimise mirror pushes for heavily used repos
+
+ create-with-reference trigger: on repo creation, setup
+ objects/info/alternates for a server side alternate object
+ store.
+
+ 'mirror status all all' prints a list of repos that have
+ *some* error, which is arguably more useful for further
+ action/processing
+
+ allow incrementally adding more repo-specific hooks
+
2015-11-01 v3.6.4 a ref-create bug in wild repos was fixed
some contrib code related to AD integration, and to
diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE
new file mode 120000
index 0000000..73dfc33
--- /dev/null
+++ b/ISSUE_TEMPLATE
@@ -0,0 +1 @@
+CONTRIBUTING \ No newline at end of file
diff --git a/PULL_REQUEST_TEMPLATE b/PULL_REQUEST_TEMPLATE
new file mode 120000
index 0000000..73dfc33
--- /dev/null
+++ b/PULL_REQUEST_TEMPLATE
@@ -0,0 +1 @@
+CONTRIBUTING \ No newline at end of file
diff --git a/src/commands/access b/src/commands/access
index c342949..4209b7e 100755
--- a/src/commands/access
+++ b/src/commands/access
@@ -41,7 +41,7 @@ Notes:
the username and use ^C as the permission to check for.
=cut
-usage() if not @ARGV or $h;
+usage() if not @ARGV >= 2 or $h;
my ( $repo, $user, $aa, $ref ) = @ARGV;
# default access is '+'
diff --git a/src/commands/perms b/src/commands/perms
index 30984bf..66ae885 100755
--- a/src/commands/perms
+++ b/src/commands/perms
@@ -53,8 +53,10 @@ if ( $ARGV[0] eq '-c' ) {
_die "invalid repo '$repo'" unless $repo =~ $REPONAME_PATT;
if ( not -d "$rc{GL_REPO_BASE}/$repo.git" ) {
- my $ret = Gitolite::Conf::Load::access( $repo, $ENV{GL_USER}, '^C', 'any' );
- _die $generic_error if $ret =~ /DENIED/;
+ unless ($ENV{GL_BYPASS_CREATOR_CHECK}) {
+ my $ret = Gitolite::Conf::Load::access( $repo, $ENV{GL_USER}, '^C', 'any' );
+ _die $generic_error if $ret =~ /DENIED/;
+ }
require Gitolite::Conf::Store;
Gitolite::Conf::Store->import;
diff --git a/src/commands/sshkeys-lint b/src/commands/sshkeys-lint
index 760b3d7..b67e77d 100755
--- a/src/commands/sshkeys-lint
+++ b/src/commands/sshkeys-lint
@@ -21,13 +21,6 @@ my $in_gl_section = 0;
my $warnings = 0;
my $KEYTYPE_REGEX = qr/\b(?:ssh-(?:rsa|dss|ed25519)|ecdsa-sha2-nistp(?:256|384|521))\b/;
-sub dbg {
- use Data::Dumper;
- for my $i (@_) {
- print STDERR "DBG: " . Dumper($i);
- }
-}
-
sub msg {
my $warning = shift;
return if $quiet and not $warning;
@@ -163,8 +156,7 @@ sub fprint {
}
# ------------------------------------------------------------------------
-sub usage {
- print <<EOF;
+=for usage
Usage: gitolite sshkeys-lint [-q] [optional list of pubkey filenames]
(optionally, STDIN can be a pipe or redirected from a file; see below)
@@ -183,6 +175,4 @@ Note that this runs ssh-keygen -l for each line in the authkeys file and each
pubkey in the argument list, so be wary of running it on something huge. This
is meant for troubleshooting.
-EOF
- exit 1;
-}
+=cut
diff --git a/src/commands/who-pushed b/src/commands/who-pushed
index fb37607..e59a750 100755
--- a/src/commands/who-pushed
+++ b/src/commands/who-pushed
@@ -5,6 +5,7 @@ use warnings;
use lib $ENV{GL_LIBDIR};
use Gitolite::Easy;
+usage() if not @ARGV;
usage($ARGV[1]) if $ARGV[1] and $ARGV[1] =~ /^[\w-]+$/ and $ARGV[0] eq '-h';
( my $logdir = $ENV{GL_LOGFILE} ) =~ s(/[^/]+$)();
@@ -23,7 +24,7 @@ if ($ARGV[0] eq '--tip') {
}
# the normal who-pushed
-usage() if not @ARGV or @ARGV < 2 or $ARGV[0] eq '-h';
+usage() if @ARGV < 2 or $ARGV[0] eq '-h';
usage() if $ARGV[1] !~ /^[0-9a-f]+$/i;
my $repo = shift;
@@ -121,7 +122,7 @@ sub flush_gl_log {
__END__
=for usage
-uSAge: ssh git@host who-pushed [--tip] <repo> <SHA>
+usage: ssh git@host who-pushed [--tip] <repo> <SHA>
Determine who pushed the given commit. The first few hex digits of the SHA
should suffice. If the '--tip' option is supplied, it'll only look for the
diff --git a/src/lib/Gitolite/Conf/Load.pm b/src/lib/Gitolite/Conf/Load.pm
index d698c32..c25a93e 100644
--- a/src/lib/Gitolite/Conf/Load.pm
+++ b/src/lib/Gitolite/Conf/Load.pm
@@ -292,6 +292,7 @@ sub sanity {
_die "'$repo' ends with a '/'" if $repo =~ m(/$);
_die "'$repo' contains '..'" if $repo =~ $REPONAME_PATT and $repo =~ m(\.\.);
_die "'$repo' contains '.git/'" if $repo =~ $REPONAME_PATT and $repo =~ m(\.git/);
+ _die "'$repo' ends with '.git'" if $repo =~ m(\.git$);
}
sub repo_missing {
diff --git a/src/lib/Gitolite/Triggers/Mirroring.pm b/src/lib/Gitolite/Triggers/Mirroring.pm
index 04140fd..860e6d0 100644
--- a/src/lib/Gitolite/Triggers/Mirroring.pm
+++ b/src/lib/Gitolite/Triggers/Mirroring.pm
@@ -36,8 +36,10 @@ sub input {
_die "$hn: '$repo' is native" if $mode eq 'master';
_die "$hn: '$sender' is not the master for '$repo'" if $master ne $sender;
+ $ENV{GL_BYPASS_CREATOR_CHECK} = option($repo, "bypass-creator-check");
# this expects valid perms content on STDIN
_system("gitolite perms -c $repo");
+ delete $ENV{GL_BYPASS_CREATOR_CHECK};
# we're done. Yes, really...
exit 0;
diff --git a/src/triggers/repo-specific-hooks b/src/triggers/repo-specific-hooks
index f8d2690..1158ff5 100755
--- a/src/triggers/repo-specific-hooks
+++ b/src/triggers/repo-specific-hooks
@@ -40,9 +40,9 @@ while (<>) {
next;
}
- unless ( $hook =~ /^(pre-receive|post-receive|post-update)$/ ) {
+ unless ( $hook =~ /^(pre-receive|post-receive|post-update|pre-auto-gc)$/ ) {
_warn "repo-specific-hooks: '$hook' is not allowed, ignoring";
- _warn " (only pre-receive, post-receive, and post-update are allowed)";
+ _warn " (only pre-receive, post-receive, post-update, and pre-auto-gc are allowed)";
next;
}