Commit graph

875 commits

Author SHA1 Message Date
Sitaram Chamarty f73e3d70d0 git-config should work even if description is set!
the optimisation that I just broke here was responsible for a bug that
ignores config entries if you also had a description there

    repo @all
        config foo.bar.testAAA = "testAAA"

    repo	foo1 foo2
        RW+	= u1 u2
        R	= gitweb

    foo1 "sitaram" = "some project"

This is because the %git_configs hash has been wiped out earlier (when
can_read($repo, "gitweb") was first called) yet now you're not giving it
a chance to get filled because $desc short-circuits can_read.

(incidentally, this is one of those things that makes g3 so nice in
comparision, because I decided not to be so fixated on efficiency!)
2012-04-13 05:56:29 +05:30
Sitaram Chamarty d59bc351f8 next round of doc fixes 2012-03-25 16:53:13 +05:30
Sitaram Chamarty 3bed50735f mention g3 in README 2012-03-25 12:24:12 +05:30
Sitaram Chamarty 233a33deff mirroring: fix several minor issues related to 'reponame.git'
- git prepends a '/' when people use the full form of an ssh URL.
    Since I *never* use those, (I prefer setting an ssh host alias and
    just saying 'git95:gitolite' for example), I never caught this.

  - people will also append a '.git'.  It's supposed to work either way,
    but it wasn't.  I had missed a few places where the user might send
    in 'reponame.git' and was implicitly assuming it would be 'reponame'

  - finally, we slip-streamed in a wrapper for system()

Big thanks and kudos to Michael Brown for catching these issues, and
(hopefully, heh!) testing my fixes ;-)
2012-03-24 16:15:33 +05:30
Sitaram Chamarty a8a3792759 (oopsies!) minor bug in a hurriedly written one-liner
pretty bad "bug percentage per line of code" though!
2012-03-20 22:53:21 +05:30
Sitaram Chamarty 61c4793237 allow "config hooks.emailprefox = '[%GL_REPO]'" and such 2012-03-20 10:55:57 +05:30
Greg Bacon 06eb523164 Be compatible with older versions of File::Path 2012-03-09 05:49:21 +05:30
Sitaram Chamarty e098bc6008 specify documentation licensing as CC-BY-NC-SA 2012-03-02 10:08:18 +05:30
Arno Gramatke f554c21b09 replaced comm with grep for devices without comm 2012-03-02 09:09:15 +05:30
Arno Gramatke 3fab743fc3 replaced mktemp with a perl equivalent to make the setup usable on machines without mktemp. 2012-03-02 06:50:33 +05:30
Sitaram Chamarty d3b2dda5df fork ADC: stop carrying along non-gitolite hooks
When someone adds a repo-specific hook to their repo, then create a
'fork' via the fork ADC, this repo-specific hook also get carried
across, but should not.
2012-02-29 13:23:58 +05:30
Sitaram Chamarty a6ab6cd18d merge all the '-h' related changes
run through the main test suite, (which really only uses 2 of these
programs), smoke tested the others, but not rigorously tested otherwise
2012-02-29 06:59:48 +05:30
Sitaram Chamarty f56c422d52 gl-conf-convert learns '-h' 2012-02-29 06:45:31 +05:30
Sitaram Chamarty 23b3d54078 gl-dryrun learns '-h', plus a couple of other fixes 2012-02-29 06:45:31 +05:30
Sitaram Chamarty e6586cb6a5 gl-admin-push learns '-h' 2012-02-29 06:45:31 +05:30
Sitaram Chamarty 1019b431ef gl-mirror-shell learns '-h' 2012-02-29 06:45:31 +05:30
Sitaram Chamarty d9ae3ed697 sshkeys-lint learns '-h' 2012-02-29 06:45:31 +05:30
Sitaram Chamarty c50b0813f6 gl-tool learns '-h' 2012-02-27 19:56:25 +05:30
Sitaram Chamarty ee81c52e80 gl-system-install learns '-h' 2012-02-27 19:23:18 +05:30
Sitaram Chamarty 34633c6403 gl-setup changes:
- learns to not run sshkeys-lint when told to be extra quiet
  - gets its own little doc section (appendix d)
  - get a quick help with '-h'
2012-02-27 19:22:13 +05:30
Sitaram Chamarty 33289bdbc5 (minor fixups related to virtual ref) 2012-02-26 19:33:26 +05:30
Sitaram Chamarty 1839520134 3 new VREFs plus doc
- 'dupkeys' -- catch duplicate keys in keydir
  - 'email-check' -- "you can only push your own commits"

plus, 'merge-check' -- how we could have done the no-merges policy
2012-02-26 19:27:33 +05:30
Sitaram Chamarty ed85bf3c08 vref: docs 2012-02-26 09:04:30 +05:30
Sitaram Chamarty e1a78fdbbc 'filetype' VREF 2012-02-26 09:04:30 +05:30
Sitaram Chamarty b22aa284c3 vref: tests 2012-02-26 09:04:30 +05:30
Sitaram Chamarty 56f975d14c vref: code
- compile: VREF/ is special, like NAME/
  - update hook: use a new "check_vrefs" sub to
      - spawn helpers for each vref in @allowed_refs
      - for each vref returned by the helper, call check_ref
2012-02-26 09:04:30 +05:30
Sitaram Chamarty 29b2c2fdce next round of doc changes 2012-02-24 12:47:28 +05:30
Sitaram Chamarty dceb40a104 <sigh> why won't people read just *one* para more...?
OK I agree the starting line was *just* misleading enough to give the
opposite impression, but still, when the next para starts with "The
rules are..." wouldn't you expect people would read *that* too?
2012-02-22 06:29:13 +05:30
Sitaram Chamarty 9dd191ef7f fix http install (broken by d08aca); add a quick smoke test 2012-02-22 06:29:13 +05:30
Sitaram Chamarty 776e5c7298 add a standalone test for gl-system-install 2012-02-22 06:29:13 +05:30
Sitaram Chamarty 6e7404fe8a clean up gl-system-install
- redo it in perl
  - make it flow easier, with all the cruft in subs

and overall, make it obvious that this program does for a manual install
what doc/packaging.mkd advices packagers to do.
2012-02-22 06:25:22 +05:30
Sitaram Chamarty 92e0577154 clean up gl-install
- move wrap_mkdir() to gitolite.pm
  - remove junk left over from days when dinosaurs ruled the world
  - reuse setup_environment() from gitolite.pm instead of rolling our
    own code for PATH and umask
    part of it's function (the rest is harmless)

  - and most important, remove the last vestiges of the old 'from
    client' install method, in the form of 'if ($GL_PACKAGE_HOOKS)'
    lines

  - clean up the symlinking to be more precisely in line with
    doc/hook-propagation.mkd (especially, remove the 'quirk' that
    package hooks would also get copied to the user hooks area)
2012-02-22 06:12:22 +05:30
Sitaram Chamarty ceb11543b1 make log_it() put out a little more info if called prematurely 2012-02-21 12:19:05 +05:30
Sitaram Chamarty 98720c1bba simplified steps for moving servers
The instructions were written before gl-admin-push was created, I guess,
making things sound a lot more complicated than they should be.

Thanks to Nick (see gitolite mailing list messages, subject line
"replicating a gitolite installation") for helping me realise this
needed fixing.
2012-02-21 12:19:05 +05:30
wu-lee d75a165f1e gitolite.rc.mkd - documentation updates
- use single quotes in examples for GL_GITCONFIG_KEYS regex, and
    briefly explain why

  - emphasise that $GL_GITCONFIG_KEYS patterns match the whole key
2012-02-16 00:05:37 +05:30
Sitaram Chamarty 6baa57b5a0 replace <<EOF type constructs with multi-line echo
This compensates for an selinux bug reported on #gitolite by John Hawley
(warthog9).  sh/bash uses a tempfile to do this, which in turn causes
some problems in selinux; I really don't [need to] know more than that.

*Technically* this is a bug in selinux/policy, and would qualify for an
entry in "nagp"... but:

(1) the changes are small and localised
(2) the problem makes gitolite -- currently -- unusable with selinux,
    and what use is a security program which can't run under selinux
    (regardless of whose fault it is)?

and finally

(3) if I can't break my own rules for one of my most high-profile users
    then what's the point of owning the code?

:-)

----

Implementation notes: I've only done this for code that is likely/meant
to be used in production

I also slip-streamed in a URL fix (from when I changed all the online
document rendering)
2012-02-14 11:41:13 +05:30
Sitaram Chamarty 01e789a1e1 v2.3 2012-02-13 08:45:33 +05:30
Sitaram Chamarty f1930941da (testing) make t/install not wait to accept host key on first run
Please don't use this setting in a production system but in some
environments it is needed for completely automated *testing* to be able
to use ssh correctly.
2012-02-13 08:39:09 +05:30
Sitaram Chamarty b325efe601 added an "nagp" issue found by EspadaV8 on the #gitolite channel 2012-02-08 07:10:00 +05:30
Sitaram Chamarty 520eff6189 added ADC overrides for setdesc and getdesc
John from kernel.org wanted this; for details see [1]

[1]: http://groups.google.com/group/gitolite/browse_thread/thread/daf92ef85d121234
2012-02-07 06:26:57 +05:30
Sitaram Chamarty 1363534d8d honor GL_NO_DAEMON_NO_GITWEB for wild repos also
Thanks to Kacper Kornet for catching this...

(by the way, there's a simple workaround if you are affected by this but
can't upgrade to this commit or later: just create an empty
$PROJECTS_LIST file, which is by default ~/projects.list)
2012-02-03 14:03:57 +05:30
Sitaram Chamarty ef751c4d07 allow comments in setperms inputs 2012-01-26 10:49:51 +05:30
Sitaram Chamarty c59bf16942 (minor) validate all role names, not just the first line!
If you use a role name that was not in GL_WILDREPOS_PERM_CATS, it will
get caught later when someone whom youhave given that role tries to
access the repo (look for another occurrence of the same error message
as this one).

So there's no access violation but it would be nice to be told upfront
that it won't work.
2012-01-26 07:29:03 +05:30
Sitaram Chamarty 7e81458f04 (doc) move NAME/ details from example.conf to doc/gitolite.conf.mkd 2012-01-23 05:53:29 +05:30
Sitaram Chamarty bb7b185c3c fix annoying but harmless bug that affected t01/2/3
...if you called check_config_key() from new_repo()
2012-01-19 17:43:09 +05:30
Sitaram Chamarty 70a9ea5e16 reformatted my spanking new showcase tsh-based test script 2012-01-17 20:31:52 +05:30
Sitaram Chamarty 7744143f6c minor fixup to previous commit documenting merge-check
thanks to Heiko Carstens for convincing me there are valid workflows
that need this feature (forgot to put this in the earlier commit)
2012-01-17 04:20:38 +05:30
Sitaram Chamarty fdfad75210 merge-check: documentation 2012-01-16 10:33:04 +05:30
Sitaram Chamarty 2762f7abfd merge-check: test script (first test using 'tsh', yaaay!) 2012-01-16 10:33:04 +05:30
Sitaram Chamarty d500d30854 merge-check feature; first cut 2012-01-16 09:40:14 +05:30