Commit graph

19 commits

Author SHA1 Message Date
Sitaram Chamarty cf0e568c89 (big-config) the new "big-config" for large setups
If you have many thousands of repos and users, neatly organised into
groups, etc., the normal gitolite fails.  (It actually runs out of
memory very fast while doing the "compile" when you push the config, due
to the number of combinations of repo/user being stored in the hash!)

This commit series will stop doing that if you set $GL_BIG_CONFIG = 1 in
the rc file.

Some notes:

  - deny rules will still work but somewhat differently -- now they must
    be placed all together in one place to work like before.  Ask me for
    details if you need to know before I get done with the docs

  - I've tested most of the important features, but not every single
    nuance

  - the update hook may be a tad less efficient now; we can try and
    tweak it later if needed but it shouldn't really hurt anything
    significantly even now

  - docs have not been written yet
2010-05-14 20:43:13 +05:30
Sitaram Chamarty c4cbfabd4c spelling cluestick...
Ouch!  How mortifying :)  I'd always thought this was one of the Brit/US
differences, but to find out that it really *isn't* a word... hmph!

Anyway, in the interest of not breaking existing wild repos, the
ownership file is still called "gl-creater".  Everything else has been
changed.

(...thanks to Sverre)
2010-04-29 19:25:39 +05:30
Sitaram Chamarty 1e06fea3b6 (security) a different fix in place of 5fd9328
SECURITY NOTE: if you deleted or renamed a pubkey file after 5fd9328
went in (April 12th), please:

  - upgrade asap, then
  - go to your latest gitolite-admin clone and "git push -f"

Otherwise this is not urgent.

5fd9328 (and its minor successor 813a2a9) were about preventing the
gitolite admin from sneaking in files to src/ and hooks/ into
$GL_ADMINDIR.  It seemed easy enough to do this by converting the
path-less checkout to a with-paths checkout, but this has caused a worse
problem -- deleting a keydir/foo.pub now no longer has an effect; the
file still hangs around in the work tree.

Ouch!  (and thanks to teukka for noticing)

We now do this check as a separate step, so the checkout can revert to
being path-less.
2010-04-20 19:46:27 +05:30
Sitaram Chamarty 344fb0a2b7 allow user to define filenames that our hooks chain to
(although the defaults are still update.secondary and
post-update.secondary if you don't do anything)
2010-04-13 18:26:34 +05:30
Sitaram Chamarty 813a2a9908 (ls-tree has --name-only now!)
thanks to Teukka for pointing it out
2010-04-12 23:46:29 +05:30
Sitaram Chamarty 5fd9328c1c "accidental [mis]feature" -- yet another admin->shell hole blocked!
This is a pretty big hole, really.  Only the fact that Eli called it an
"accidental feature" helped catch it :)

Notes on the code:

An explicit list of paths -- maybe just "conf", "keydir", and "local" --
would have been easier, but this isn't too bad, I think.
2010-04-12 21:10:56 +05:30
Sitaram Chamarty 67607760e5 bypass update hook if GL_BYPASS_UPDATE_HOOK is available in ENV
people with shell access should be allowed to bypass the update hook, to
allow them to clone locally and push.  You can now do this by setting an
env var that the ssh "front door" will never set, like so:

    GL_BYPASS_UPDATE_HOOK=1 git push

Note that this will NOT work for the gitolite-admin repo, because the
post-update hook on that one requires a bit more.  If you really want to
do that, try:

    GL_ADMINDIR=~/.gitolite GL_BINDIR=~/.gitolite/src GL_BYPASS_UPDATE_HOOK=1 git push

(assuming default values in ~/.gitolite.rc)
2010-04-10 02:00:51 +05:30
Sitaram Chamarty 5aba13cd80 allow 'D' for @all repos
...so that the new semantics can be made system-default if someone wants
to do that
2010-03-31 06:45:29 +05:30
Sitaram Chamarty 967af2c993 compile/update: new "D" permission
normally, RW+ means permission to rewind or delete.

Now, if you use "D" permission anywhere in a repo config, that means
"delete" and RW+ then means only "rewind", no delete.
2010-03-30 23:28:26 +05:30
Sitaram Chamarty 33b886c512 we're getting a nice solaris workout after a long time :) 2010-03-30 19:37:22 +05:30
Sitaram Chamarty 7bfb3676b7 @all for repos is now much cleaner; a true @all...
- no need to put it at the end of the config file now, yeaaay!
  - @all for @all is meaningless and not supported.  People asking will
    be told to get a life or use git-daemon.
  - NAME/ limits for @all repos is ignored for efficiency reasons.
2010-03-26 21:36:05 +05:30
Sitaram Chamarty b537a4acd4 dash it all!
Ubuntu now defaults to /bin/sh -> /bin/dash, while my brain seems to
default to bash.

I guess it's easier to fix my brain, and my code <sigh>
2010-03-18 09:13:41 +05:30
Sitaram Chamarty e91e8c80d9 minor oopsie in post-update hook chaining 2010-03-17 20:37:41 +05:30
Sitaram Chamarty 05431233a2 post-update hook now chains to post-update.secondary
undocumented but analogous to the documented update hook chaining
2010-03-16 19:27:29 +05:30
Sitaram Chamarty 33d6856f4b update: disallow old-style personal branches
The downside is that the repo config does need to be edited and new
style line(s) added.
2010-03-16 18:27:26 +05:30
Sitaram Chamarty 83884aa758 compile/update hook: enable new style personal branches
The new style personal branches work by interpreting the special
sequence /USER/ (including the slashes) in a refname.  Docs should be in
the next commit...
2010-03-16 18:27:22 +05:30
Sitaram Chamarty ed5c78349e update hook now allows chaining to "update.secondary"
the changes to cp/scp are because without "-p" they dont carry perms
across to existing files.  So if you forgot to chmod +x your custom
hook and ran easy install, then after that you have to go to the server
side to fix the perms...
2010-03-14 22:48:25 +05:30
Sitaram Chamarty de0ecd0431 compile: make it easier to move repos into gitolite
when repos are copied over from elsewhere, one had to run easy install
once again to make the new (OS-copied) repo contain the proper update
hook.

We eliminate this step now, using a new, empty, "hook" as a sentinel and
having "compile" check/fix all repos' hooks.

Since you have to add the repos to conf anyway, this makes it as
seamless as possible.  The correct sequence now is

  - (server) copy the repo at the OS level
  - (admin clone) add it to conf/gitolite.conf, commit, push
2010-03-07 19:05:56 +05:30
Sitaram Chamarty 74d70e3b9f move hooks out of src
src/hooks is now hooks/common
src/ga... is now hooks/gitolite-admin/post-update
2010-02-13 13:02:24 +05:30