6 my $rc = "$h/.gitolite.rc";
11 msg
( FATAL
=> "no rc file found; do you even *have* g2 running?" ) if not -f
$rc;
13 unless ( $return = do $rc ) {
14 msg
( FATAL
=> "couldn't parse $rc: $@" ) if $@
;
15 msg
( FATAL
=> "couldn't do $rc: $!" ) unless defined $return;
16 msg
( WARNING
=> "couldn't run $rc" ) unless $return;
19 print "checking rc file...\n";
24 print "checking conf file(s)...\n";
28 print "checking repos...\n";
32 print "...all done...\n";
34 # ----------------------------------------------------------------------
37 msg
( INFO
=> "This program only checks for uses that make the new g3 completely unusable" );
38 msg
( '' => "or that might end up giving *more* access to someone if migrated as-is." );
39 msg
( '' => "It does NOT attempt to catch all the differences described in the docs." );
41 msg
( INFO
=> "'see docs' usually means the pre-migration checklist in" );
42 msg
( '', => "'g2migr.html'; to get there, start from the main migration" );
43 msg
( '', => "page at http://gitolite.com/gitolite/migr.html" );
48 msg
( FATAL
=> "GL_ADMINDIR in the wrong place -- aborting; see docs" ) if $GL_ADMINDIR ne "$h/.gitolite";
49 msg
( NOTE
=> "GL_ADMINDIR is in the right place; assuming you did not mess with" );
50 msg
( '', "GL_CONF, GL_LOGT, GL_KEYDIR, and GL_CONF_COMPILED" );
51 msg
( FATAL
=> "REPO_BASE in the wrong place -- aborting; see docs" ) if $REPO_BASE ne "$h/repositories" and $REPO_BASE ne "repositories";
52 # ( abs or rel both ok)
56 msg
( SEVERE
=> "GIT_PATH found; see docs" ) if $GIT_PATH;
57 msg
( SEVERE
=> "GL_ALL_INCLUDES_SPECIAL found; see docs" ) if $GL_ALL_INCLUDES_SPECIAL;
58 msg
( SEVERE
=> "GL_NO_CREATE_REPOS not yet implemented" ) if $GL_NO_CREATE_REPOS;
59 msg
( SEVERE
=> "rsync not yet implemented" ) if $RSYNC_BASE;
60 msg
( WARNING
=> "ADMIN_POST_UPDATE_CHAINS_TO found; see docs" ) if $ADMIN_POST_UPDATE_CHAINS_TO;
61 msg
( WARNING
=> "GL_NO_DAEMON_NO_GITWEB found; see docs" ) if $GL_NO_DAEMON_NO_GITWEB;
62 msg
( WARNING
=> "GL_NO_SETUP_AUTHKEYS found; see docs" ) if $GL_NO_SETUP_AUTHKEYS;
63 msg
( WARNING
=> "UPDATE_CHAINS_TO found; see docs" ) if $UPDATE_CHAINS_TO;
64 msg
( WARNING
=> "GL_ADC_PATH found; see docs" ) if $GL_ADC_PATH;
65 msg
( WARNING
=> "non-default GL_WILDREPOS_PERM_CATS found" ) if $GL_WILDREPOS_PERM_CATS ne 'READERS WRITERS';
72 my $conf = `find . -name "*.conf" | xargs cat`;
73 msg
( "SEVERE", "NAME rules; see docs" ) if $conf =~ m
(NAME
/);
74 msg
( "SEVERE", "subconf command in admin repo; see docs" ) if $conf =~ m
(NAME
/conf/fragments
);
75 msg
( "SEVERE", "mirroring used; see docs" ) if $conf =~ m
(config
+gitolite\
.mirror\
.);
81 my @creater = `find . -name gl-creater`;
83 msg
( WARNING
=> "found " . scalar(@creater) . " gl-creater files; see docs" );
86 my @perms = `find . -name gl-perms | xargs egrep -l -w R\\|RW`;
88 msg
( WARNING
=> "found " . scalar(@perms) . " gl-perms files with R or RW; see docs" );
93 my ( $type, $text ) = @_;
94 print "$type" if $type;
96 exit 1 if $type eq 'FATAL';
98 $count{$type}++ if $type;