move triggers into their own subdir...

...otherwise 'gitolite help' was getting too confusing, mixing up stuff
that users should not be running directly (even on the server)

----

implementation notes:

those who are worried about the '../triggers/' in various parts of the
code here, remember you can only do that from a command line on the
server.  Remote users can only use commands that have been explicitly
listed in the COMMANDS hash in the rc file.  This means they can't even
access other commands in the same directory as, say, the 'info' command,
so a '../' is definitely not going to work.
This commit is contained in:
Sitaram Chamarty 2012-03-26 11:02:57 +05:30
parent 96ccbf0c1c
commit 07cf7fedfe
11 changed files with 6 additions and 6 deletions

View file

@ -171,7 +171,7 @@ sub trigger {
for my $s ( @{ $rc{$rc_section} } ) {
my ($pgm, @args) = split ' ', $s;
$pgm = "$ENV{GL_BINDIR}/commands/$pgm";
$pgm = "$ENV{GL_BINDIR}/triggers/$pgm";
_warn("skipped command '$s'"), next if not -x $pgm;
trace( 2, "command: $s" );

View file

@ -31,7 +31,7 @@ For each case where access is not denied, one line is printed like this:
This is orders of magnitude faster than running the command multiple times;
you'll notice if you have more than a hundred or so repos.
Advanced uses: see src/commands/post-compile/update-git-daemon-access-list for
Advanced uses: see src/triggers/post-compile/update-git-daemon-access-list for
a good example.
=cut

View file

@ -60,8 +60,8 @@ try "
";
try "
gitolite post-compile/update-git-daemon-access-list; ok
gitolite post-compile/update-gitweb-access-list; ok
gitolite ../triggers/post-compile/update-git-daemon-access-list; ok
gitolite ../triggers/post-compile/update-gitweb-access-list; ok
cat $ENV{HOME}/projects.list; ok
";
cmp 'bar.git

View file

@ -17,7 +17,7 @@ my $kd = `gitolite query-rc -n GL_ADMIN_BASE` . "/keydir";
try "plan 49";
my $pgm = "gitolite post-compile/ssh-authkeys";
my $pgm = "gitolite ../triggers/post-compile/ssh-authkeys";
try "
# prep

View file

@ -32,7 +32,7 @@ try "
cp $bd/../t/keys/*.pub $ab/keydir; ok or die 6
";
system("gitolite post-compile/ssh-authkeys");
system("gitolite ../triggers/post-compile/ssh-authkeys");
# basic tests
# ----------------------------------------------------------------------