I've been investigating gitolite and here are some thoughts: I think the package should be installed mostly into /usr/share and /var, e.g.
src/ → /usr/share/gitolite doc/ → /usr/share/doc/gitolite conf/ → /usr/share/gitolite/conf All files installed should be patched to refer to those files in /use/share, rather than in $GL_ADMINDIR. and then there should be a simple script that takes four arguments: gitolite-create-repo madduck /tmp/ssh_id.rsa.pub optional arguments: --repodir relative directory to hold repositories [repositories] --admindir relative directory for the admin stuff [.gitolite] and is designed to be run as the user setting up a repository, e.g. myself or a special user like git. The script would then: 0. install ~/.gitolite.rc, using the example file in /usr/share/gitolite/conf. 1. replace the value of $REPO_BASE with --repodir's value, if that was passed. 2. replace the value of $GL_ADMINDIR with --admindir's value, if that was passed. 3. spawn an editor on the file. 4. populate $GL_ADMINDIR/conf with a simple configuration that just gives the user specified as $ARGV[1] RW+ access to gitolite-admin. 5. populate $GL_ADMINDIR/keydir with the public key passed as $ARGV[2], named $ARGV[1].pub. 6. call GL_RC=~/.gitolite.rc /usr/share/gitolite/gl-compile-conf 7. set the umask from $REPO_UMASK. 8. create a bare repository in $REPO_BASE/gitolite-admin.git 9. install -m755 /usr/share/gitolite/hooks/* \ $REPO_BASE/gitolite-admin.git/hooks/ 10. [optional] install -m755 $GL_ADMINDIR/hooks/* $REPO_BASE/gitolite-admin.git/hooks/ 10. install -m755 /usr/share/gitolite/ga-post-update-hook \ $REPO_BASE/gitolite-admin.git/hooks/post-update 9. call GIT_WORK_TREE=$GL_ADMINDIR git add conf keydir GIT_WORK_TREE=$GL_ADMINDIR git commit -m'initial checkin' 10. mkdir $GL_ADMINDIR/logs 11. Since all files installed to /usr/share/gitolite have been patched to use paths in /usr/share/gitolite instead of $GL_ADMINDIR, the commands in ~/.ssh/authorized_keys should refer to /usr/share/gitolite/gl-auth-command and I speculate that everything will just work, once the debugging is done. The remaining issue then are upgrades. I suggest to provide a gitolite-upgrade-repo script that brings repos up-to-date, and possibly a gitolite-upgrade-all-repos, which uses e.g. /etc/gitolite/repos.list (like ikiwiki) to iterate the existing ones. Thanks for your efforts! -- .''`. martin f. krafft <madd...@d.o> Related projects: : :' : proud Debian developer http://debiansystem.info `. `'` http://people.debian.org/~madduck http://vcs-pkg.org `- Debian - when you have better things to do than fixing systems
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)