Commit graph

736 commits

Author SHA1 Message Date
Sitaram Chamarty c41fcc2653 added doc and helper for complex mirroring setups, to contrib 2011-09-02 22:41:27 +05:30
Sitaram Chamarty 10985cb534 repo_rights is no longer a kosher *public* interface
so remove the last vestiges of it from the contrib area
2011-09-02 22:41:27 +05:30
Behan Webster 330bed0dcf Rewrite of gl-conf-convert to support more complex gitosis.conf files
comments from contributor via email:

  * Translates all repos from gitosis to gitolite, even if their are not
    associated with any groups
  * Transfers gitweb settings (gitweb, description and owner)
  * Transfers git-dameon settings
  * Maintains comments for groups and repos

  As far as I can tell, the results from this filter are working fine
  for our transfer from gitosis to gitolite.
2011-09-02 22:41:27 +05:30
Sitaram Chamarty ddf4330d1e quick install in main README
requested by someone who told me it's high time I catered to the experts
too, and saved them some time on the install!

I took the opportunity to streamline the README (especially the "what"
section), and to prioritise the non-root method over the root method in
the install doc.
2011-09-02 17:40:07 +05:30
Sitaram Chamarty 6a3cd5d6b1 Merge pull request #32 from ebfe/bump_requirements
git >= 1.6.6 is required since 49f5361
2011-09-02 05:09:06 -07:00
Sitaram Chamarty 6863dca73a retain old file's permissions in wrap_print()
wrap_print() was written to create a new file and rename the old one to
avoid a partially written file being read by other processes.  This has
only been reported for the 'projects.list' file, but I just did it for
all files as a matter of course.

list of files currently written via this function:
gl-creater, gl-perms, description, git-daemon-export-ok, projects.list

However, some people want to do the following:

  - set REPO_UMASK tight (0077, default)
  - manually change the perms to something looser (typically g+rX) for
    specific repos
  - set core.sharedRepository to 0750 (git is documented to honor that
    config if available and to override umask)

Except that core.sharedRepository does not apply to files written by
gitolite and not git itself.  So they would open up their description
files and the next compile would close them again!

This patch prevents this from happening.  If the file already exists, it
maintains the same permissions after the rename.
2011-09-02 16:45:27 +05:30
Sitaram Chamarty 7c8c5a899b add example setups to mirroring doc; also other fixups 2011-08-30 20:50:34 +05:30
Sitaram Chamarty e139be927a new 'subconf' feature to explicitly do delegation
(includes HOSTNAME substitution feature also...)
2011-08-30 20:50:34 +05:30
Sitaram Chamarty 0ec3d77761 delegation: allow includes in fragments, fixup doc
I could not think why we disallowed includes in subconfs, since an
include is the same as inserting all those lines inline anyway.
2011-08-30 11:42:03 +05:30
Sitaram Chamarty d01f6b1dbb config variables should not be restricted to double quoted strings
previously, these two would produce different results

    config aa.bb = 'true'   # config file line includes single quotes
    config aa.bb = "true"   # config file line does not include any quotes

Now the former will also behave like the latter.
2011-08-29 14:20:34 +05:30
Sitaram Chamarty 2eee4d627a Merge 'mirroring-revamp' into pu 2011-08-29 13:57:38 +05:30
Sitaram Chamarty 388cf76c73 document the "sequencing repo config" fix made earlier
plus some reorg of the section so it reads easier (I hope!)
2011-08-27 22:07:01 +05:30
Sitaram Chamarty a70120a3df (minor) test driver revert; debugging code had snuck in... 2011-08-27 22:07:01 +05:30
Sitaram Chamarty 52cb3e1b8d gl-setup-authkeys had an obsolete usage message 2011-08-26 07:10:56 +05:30
Michael Gehring d4570cc340 git >= 1.6.6 is required since 49f5361 2011-08-25 15:35:29 +02:00
Sitaram Chamarty d76c83f948 Merge pull request #30 from christilden/pu
Fixes documentation typos
2011-08-25 04:07:49 -07:00
Chris Tilden 0172868da7 Fixes documentation typos 2011-08-24 13:12:42 -07:00
Sitaram Chamarty e5e95794ef (doc) hook chaining explained a bit better
nagp-compatible ;-)
2011-08-23 00:01:43 +05:30
Sitaram Chamarty e970327cc1 rc: get rid of GL_GITCONFIG_WILD
was only for efficiency even when it was relevant, and now it's just in
the way, making useless noises.
2011-08-17 21:53:06 +05:30
Sitaram Chamarty 056459aeda fix sequencing for repo config statements
Without this, complex mirroring scenarios will be unpredictable.  For
example (abbreviating "gitolite.mirror." to "gimo.") something as simple
as this will not give "foo" his different mirror setup

    repo @all
        config gimo.master = "frodo"
        config gimo.slaves = "sam"

    repo foo
        config gimo.master = "sam"
        config gimo.slaves = "frodo gollum"

    repo foo bar
        RW  =   u1

Even worse things happen when you have wild cards.

Now, however, they all come in the right sequence and the most recent
one takes effect (unlike ACL rules, where the first match wins, because
there you're trying to just find a match and get out, while here you're
just mindlessly applying config lines in the right order).
2011-08-17 21:03:14 +05:30
Sitaram Chamarty 442d7ca29c mirroring doc updates:
- caution about wild repos needing to be manually created on the
    receiving side (because nothing gets auto-created now)

  - caution about the right and wrong way to "delete" a config variable

  - a few other minor fixes
2011-08-17 11:59:00 +05:30
Sitaram Chamarty 4b9bf222e5 (mirroring) make bg push errors more visible/easier to grep 2011-08-16 14:28:01 +05:30
Sitaram Chamarty fabfcb5c19 default remote command should be 'info' if none given 2011-08-15 07:02:43 +05:30
Sitaram Chamarty ae20d5c6a7 log_it(): GL_USER may be undefined...
with gl-mirror-shell being a command you can just type on the server,
GL_USER may be undefined, so we now avoid those unsightly warnings
2011-08-15 07:02:43 +05:30
Sitaram Chamarty b11d44e036 (mirroring) make cron jobs easier to write
gl-mirror-shell will now take a list of slaves and/or keys, expanding
the keys in place.  See doc for even more improvements and conveniences.
2011-08-15 07:02:42 +05:30
Sitaram Chamarty aa7ff8ac27 (mirroring) some more error checking 2011-08-14 22:22:31 +05:30
Sitaram Chamarty e3b1fdfd69 (mirroring doc) explain how this is more than just 'backup' 2011-08-14 08:20:03 +05:30
Sitaram Chamarty a3ffc9d8fd (mirroring) reject non-local pushes if GL_HOSTNAME not set
We previously said all mirroring features are disabled if GL_HOSTNAME is
not set.

But what if, after mirroring has been setup, and master/slaves defined
for a repo, a slave admin fat-fingers the RC file and accidentally
comments out GL_HOSTNAME?  We might end up violating RULE NUMBER ONE!
2011-08-13 14:32:38 +05:30
Sitaram Chamarty 37ce28a43b (new mirroring) documentation 2011-08-13 09:03:13 +05:30
Sitaram Chamarty 5143cc890f (new mirroring) enhance gl-tool
...it now does the mirroring peer key setup, unlike the kludgy manual way in the old setup
2011-08-12 22:51:44 +05:30
Sitaram Chamarty 68b45e1616 (new mirroring) bulk of the changes are here:
- post-receive now just calls mirror-push
  - mirror-push is a medium complex shell script (all that backgrounding
    etc., can't be done so easily in God's first language!)
  - mirror-shell is now a perl program that does a few different things
    (receive mirror-pushes, command line re-sync, re-sync requests from a
    slave, etc)
  - auth-command changes to reject/redirect non-native pushes
2011-08-12 22:51:44 +05:30
Sitaram Chamarty 15db108e45 (new mirroring) helpers, hostname, detect use of older RC variables, delete mirror-sync 2011-08-12 22:51:44 +05:30
Sitaram Chamarty bfbd887e71 minor docfixes 2011-08-12 21:45:23 +05:30
Sitaram Chamarty b70cf05b43 (minor) allow a comma in regex pattern for wild repos
This was an oversight.  We already allow { and } anyway...
2011-08-12 21:45:23 +05:30
Sitaram Chamarty 0b68365860 fix accumulation of 'config' (git config) lines
If a repo matches multiple patterns, 'config' lines were being picked up
only from one of the 'repo' paras, instead of from all applicable ones.
2011-08-08 09:47:56 +05:30
Sitaram Chamarty 4c1e4b2b1a v2.0.3 2011-08-08 09:47:56 +05:30
Sitaram Chamarty 66f2065098 deal with a perl 5.14 deprecation on qw()
Apparently 5.14 deprecates using qw() as parentheses

(thanks to Benjamin Severs)
2011-08-04 22:01:13 +05:30
Sitaram Chamarty 817c1835ae (docfix) you need RW+ to overwrite a tag
to my eternal shame (considering how proud I am of my documentation)
this was not mentioned anywhere!  I'm getting old...

thanks to Pierre Habouzit for catching this

(also slipped in a few other minor doc changes.  I wouldn't mix
unrelated stuff in a commit when doing code changes but it seems ok to
do this for docfixes, for some reason).
2011-08-01 08:12:23 +05:30
Sitaram Chamarty 49f5361799 (minor) don't ignore dirty-ness when generating version number 2011-07-29 14:12:56 +05:30
Sitaram Chamarty 973157d777 (doc) "authentication-vs-authorisation"
"gitolite-without-ssh" doc name was misleading; rename to
"authentication-vs-authorisation"

also restructure the whole thing to answer the main question better, and
fix up links from other places
2011-07-25 20:28:03 +05:30
Sitaram Chamarty 6b65ffbab4 (minor) setperms and DOS users
Supporting git on DOS may be a fact of life, but it felt good to make
them use the "right" editor (hint: starts with v, ends with m, has three
letters), or at least something equivalent, to produce their setperms
input files.

I'd say "yes Fred I know.  However, Unix doesn't work like that, and
when talking to a big, important, OS like Unix from your little
single-user workstation, you do have to go the extra mile.  It's not
that different from going into a meeting with the CEO you know -- you
dress up a little for that meeting don't you?".  And Fred would nod, a
little awed by the analogy.  Maybe the awe was tinged with a wee bit of
anger but not much; he knows there's a hierarchy among OSs, just like
among people, and he knows where his OS stands in that hierarchy...

----

For the humour impaired, that was a joke.  To start with, I don't know
anyone called Fred.

It *is* true that I tend to ignore DOS if at all possible, especially in
my *code*.  But since I don't really use wildrepos at work, this issue
would never have come up for me, even in the DOS projects I manage.

In this case someone who's contributed a heck of a lot to the evolution
of gitolite asked, so here it is.

----

oh and in case you were wondering, DOS stands for "dominant operating
system" ;-)
2011-07-23 08:31:33 +05:30
Sitaram Chamarty 8710521f30 gitosis migration document overhaul (I need feedback on this) 2011-07-18 21:07:38 +05:30
Sitaram Chamarty b649536847 (minor) fixed some broken links due to 867b34f
thanks to j416 for catching this...
2011-07-18 21:06:14 +05:30
Sitaram Chamarty 9882e24084 (a few minor doc fixes) 2011-07-14 19:20:24 +05:30
Sitaram Chamarty 42df4c01a9 gl-dont-panic replaced by more generic gl-admin-push
(sorry Douglas Adams; the "towel day" program is no more!)
2011-07-13 22:29:44 +05:30
Christopher M. Fuhrman df885e5989 Documentation tweaks
- Add note about daemon user
 - In example, set gitweb.url to proper URL

Signed-off-by: Christopher M. Fuhrman <cfuhrman@panix.com>
2011-07-04 09:08:38 +05:30
Sitaram Chamarty 6ad6bf95e6 (adc) change quoting when calling cli_repo_rights from shell
otherwise repo names containing "@" in them were causing the @foo part
to be interpolated (as empty of course) instead of being taken literally

reported by silvio dot fricke at googlemail
2011-06-26 11:33:56 +05:30
Sitaram Chamarty fda9f37b3a die() needs to be defined in post-update hook
(and in one other place it needs to be defined earlier)

I never caught this because in my testing those error conditions --
caused by lack of afc3a06 -- never came up.
2011-06-19 06:54:52 +05:30
Sitaram Chamarty 1f768a1763 (minor) some minor doc fixes 2011-06-14 20:22:04 +05:30
Sitaram Chamarty 5381dbb2da (doc) upgrading a 'from-client' installation to 'non-root' 2011-06-14 20:21:11 +05:30