Commit graph

334 commits

Author SHA1 Message Date
Sitaram Chamarty
b6d6260dbb prevent empty %groups being created in compiled conf
this would happen if @all was used but no actual groups were defined,
and would in turn cause a parse error on the compiled conf because it
now ends with a 'false'.

thanks to Jelle Raaijmakers
2012-11-28 06:22:55 +05:30
Sitaram Chamarty
72e36f32aa oops; hashes were getting printed twice in certain cases...
harmless but wasteful
2012-11-28 05:49:48 +05:30
Stephen Palmer
d2214b06b5 Fixed bug in lock script
the unlock command was not checking the correct hash key to match
the user name
2012-11-27 08:09:46 +05:30
Sitaram Chamarty
96cc2eaf41 new features relating to creating wild repos:
- new 'create' command for explicit creation
  - new 'AutoCreate' trigger to prevent auto-creation on read operations
    or both read and write operations
  - a few related fixups to the perms command
2012-11-22 20:50:20 +05:30
Sebastian Koslowski
96be9503ef sudo command: CLI fix: 2 non-empty args required 2012-11-22 20:50:20 +05:30
Sitaram Chamarty
7cec71b0ef minor fixups to some non-core programs
(following a bit of a doc shakeup)
2012-11-22 15:59:48 +05:30
Sitaram Chamarty
cd838411fa 'gitolite mirror' needs to set exit code on push failure 2012-11-21 21:16:01 +05:30
Sitaram Chamarty
2018267a45 (minor) fixes to lint program, mainly usage message 2012-11-21 19:55:12 +05:30
Sitaram Chamarty
a26532d635 allow simple macros in conf file 2012-11-19 07:48:41 +05:30
Sitaram Chamarty
5f9789ed8e v3.2 2012-11-14 15:45:45 +05:30
Sitaram Chamarty
d3d93961a0 Uggh; horrible inner loop screwing up all performance :-(
This might actually make the redis version unnecessary for most people!
And if it does, well shame on me for not instrumenting things at a more
granular level before going all "oh we need a cache!"

[In my defense, I blame redis for being such a sweet little tool that I
felt compelled to use it somehow!]

----

t/sequence failed because the test itself was in error; fixed.
2012-11-14 15:43:57 +05:30
Sitaram Chamarty
1f96180df0 allow multi-line pubkeys; see code for doc 2012-11-13 08:45:45 +05:30
gitolite tester
57760d7e1b refex-expr: die when admin forgets to add the required line to the rc 2012-11-13 08:09:14 +05:30
gitolite tester
16f2d9b879 gl-conf must be created even if the repo para has only config lines
(i.e., no access rules but only config lines)
2012-11-13 07:00:22 +05:30
Sitaram Chamarty
c03d107bac help run some trigger programs in the background 2012-11-10 14:21:52 +05:30
Sitaram Chamarty
d491b5384f (minor) add quick and dirty timer code to Common.pm 2012-11-09 18:02:16 +05:30
Sitaram Chamarty
8a9564f171 some minor rearrangements of code...
why?  now that would be telling!
2012-11-08 19:12:20 +05:30
Sitaram Chamarty
a509b208e3 move %GL_REPO and %GL_CREATOR substitution into core
see usage example at the end of src/triggers/upstream
2012-11-07 05:36:28 +05:30
Sitaram Chamarty
be61cd2d66 make sure gl-perms exists, even if it is empty...
I expect this to help if we optimise the rule generation by caching.
2012-11-06 09:15:55 +05:30
Sitaram Chamarty
70ad045e08 (minor fixups to some non-code parts) 2012-10-31 06:24:44 +05:30
Andrew Page
2aa129bc70 fix for keysubdirs-as-groups sugar script to support "old style multi-keys" for users 2012-10-29 17:15:52 -06:00
Sitaram Chamarty
a802071a5e (test suite) stop using 'ls' to test for presence/absence of files/directories
another of those "duh!  what was I thinking" moments, this specific one
being "why test that files/directories are created with the right user
and group IDs?  Shouldn't that be out of your control, as well as
totally unnecessary on a sane system?"
2012-10-27 13:20:55 +05:30
Sitaram Chamarty
4eb8cd4ad1 (minor) bash -> sh changes in some non-core code
/bin/bash is muscle memory for me, although it appears that not too much
of the actual code is bash-specific, so it's reasonably easy to fix.
2012-10-27 07:07:30 +05:30
Sitaram Chamarty
3eefc06551 (minor) clarify that D only works on wild repos 2012-10-10 13:43:17 +05:30
Eugene E. Kashpureff Jr
896ada58c0 Fix spurious error in triggers/upstream
The initial fetch of a new repo which has 'upstream' read-only mirroring
configured will cause a spurious error concerning FETCH_HEAD not yet
existing. This silences the error.
2012-10-10 07:59:52 +00:00
Sitaram Chamarty
51ab768e2a v3.1 2012-10-05 14:42:25 +05:30
Sitaram Chamarty
f636ce3ba3 (security) fix bug in pattern to detect path traversal
while we're about it, add the same check to some of the internal
routines, so that commands can also be protected.

finally, just to make sure we don't lose it again in some other fashion,
add a few tests for path traversal...
2012-10-05 12:28:20 +05:30
Sitaram Chamarty
0d371ac957 call GROUPLIST_PGM before determining user_roles()...
thanks to Stephane Chazelas [1]

[1]: https://groups.google.com/d/topic/gitolite/gy_ZkrxGSjg
2012-10-04 22:03:19 +05:30
Sitaram Chamarty
2dbaa4d12e (minor) move a small chunk of code out of a loop 2012-09-26 14:58:56 +05:30
Sitaram Chamarty
6328ec2cbe dont auto-vivify empty entries in %repos...
before this, trying to access a wild repo would create an empty hash in
%repos.  This is pretty harmless, but at some later point, memberships()
would try to use that in a pattern, attempting to match the real repo
being access-checked.

Which is still fine if your repo doesn't look like "libstdc++" AND
you're using some recent perl.

However, for perl 5.8.8, and if the repo has a ++ in it, perl barfs.

Here's a test program to check your perl:

    #!/usr/bin/perl

    $base="foo/u1/libstdc++";
    $i="foo/u1/libstdc++";

    if ( $base =~ /^$i$/ ) {
        print 1;
    } else {
        print 2;
    }

On 5.14.2 I get "2".  On 5.8.8 I get:

    Nested quantifiers in regex; marked by <-- HERE in m/^foo/u1/libstdc++ <-- HERE $/ at ./aa.pl line 6.
2012-09-25 19:10:47 +05:30
Sitaram Chamarty
3fe8ecf974 (minor) avoid spurious 'repo missing' messages for repo patterns 2012-09-25 19:05:57 +05:30
Sitaram Chamarty
9606e35528 help cgit folks out a bit :) 2012-09-24 04:53:20 +05:30
Sitaram Chamarty
724c741335 prevent barfage when presetting the rc file 2012-09-20 06:21:44 +05:30
Sitaram Chamarty
e59c3ba9f9 (minor docfix) add info on using Easy.pm from elsewhere 2012-09-19 17:47:12 +05:30
Sitaram Chamarty
aec8c71890 'help' command barfage fix
should not barf if LOCAL_CODE is defined but it doesn't contain a
"commands" subdirectory.
2012-08-30 18:40:24 +05:30
Sitaram Chamarty
ed4862ff96 minor changes to README 2012-08-30 18:39:42 +05:30
Sitaram Chamarty
cc9727c42b minor bug in include file handing...
gitolite does indeed try to not load itself twice, but I forgot that by
that time the pwd is ~/.gitolite/conf not ~/.gitolite so it always ended
up reading itself twice in case of a wildcard include.
2012-08-17 22:26:03 +05:30
Sitaram Chamarty
7409635823 (minor) add a 'dd' function to quickly dump stuff to STDERR 2012-08-17 10:04:32 +05:30
Olof Johansson
ba67f6f9ca Bailout tests unless envvar $GITOLITE_TEST is 'y'
[committer made some changes to t/README]
2012-08-10 11:31:48 +05:30
Nate Jones
31166e1e1c find symlinked commands when generating help list 2012-08-03 13:48:19 -07:00
Sitaram Chamarty
b2a3509e63 point people to mailing list for general questions 2012-07-27 21:19:07 +05:30
Patrick Westerhoff
57bea39a1e Add special %GL_CREATOR variable for git-config
Add a special variable `%GL_CREATOR` to the the git-config trigger that
is replaced by the name of the repository creator (if any).

This can be useful to set up the default owner configuration for wild
repositories.

Example:

    repo assignments/CREATOR/a[0-9][0-9]
        C   = @students
        RW+ = CREATOR
        config gitweb.owner = %GL_CREATOR

----

committer added an if condition to the s/// line.
2012-07-19 16:16:22 +05:30
Sitaram Chamarty
f4eb6dcb53 'rsync' command to create and send bundles (manual smoke test only)
run 'ssh git@host rsync -h' for usage, as usual
2012-07-19 14:40:41 +05:30
Sitaram Chamarty
8ad1eee220 migrated 'who-pushed' command (manual smoke test only) 2012-07-17 16:52:56 +05:30
Dave Abrahams
d3279e4ad0 Fix a typo 2012-07-12 18:06:21 +05:30
Sitaram Chamarty
fd0778e6d6 (minor) don't keep adding the same thing to $PATH 2012-07-10 21:10:06 +05:30
Sitaram Chamarty
f35db87efc (minor) new mailing list 2012-07-10 20:59:36 +05:30
Sitaram Chamarty
f545bc08f6 minor fixups 2012-07-03 08:06:59 +05:30
Sitaram Chamarty
db2cf23379 logical expressions on refexes :-) 2012-06-29 22:19:06 +05:30
Sitaram Chamarty
af437c3a7b v3.04 2012-06-27 07:10:09 +05:30