Skip to content

Instantly share code, notes, and snippets.

@wpalmer
Created March 4, 2011 12:03
Show Gist options
  • Save wpalmer/854519 to your computer and use it in GitHub Desktop.
Save wpalmer/854519 to your computer and use it in GitHub Desktop.
My setup:
/home/vcs/.gitolite.rc # rc file
/home/vcs/gitolite-source # repository containing gitolite itself, I make tweaks and pull changes here
/home/vcs/bin # contains gl-* scripts, including gl-install
/var/vcs/admin # admin dir, I assume used by gitolite internally
/var/vcs/admin/hooks # other repositories symlink to hooks in here, under common/ and gitolite-admin/
/var/vcs/repos/gitolite-admin.git # I push to this when making changes
/var/vcs/repos/phpmyadmin.git # one of several repositories I update via cron (to make future pushes faster)
From Gitolite RC:
$GL_ADMINDIR="/var/vcs/admin";
$GL_CONF="$GL_ADMINDIR/conf/gitolite.conf";
$GL_KEYDIR="$GL_ADMINDIR/keydir";
$GL_CONF_COMPILED="$GL_ADMINDIR/conf/gitolite.conf-compiled.pm";
# DO NOT CHANGE THE NEXT FOUR LINES UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.
# These variables are set automatically by the install method you choose.
# (PACKAGE MAINTAINERS: PLEASE READ doc/packaging.mkd)
$GL_PACKAGE_CONF = '';
$GL_PACKAGE_HOOKS = '';
What my post-update.secondary does (minus various sanity checks):
cp -a "$GL_ADMINDIR/local/hooks/common/"* "$GL_ADMINDIR/hooks/common/"
cp -a "$GL_ADMINDIR/local/hooks/gitolite-admin/"* "$GL_ADMINDIR/hooks/gitolite-admin/"
GL_NOCLOBBER_ADMIN=1 "$HOME/bin/gl-install" -q
There were several problems with this, and I've hacked around in trying to uncover a solution so much, I don't remember
what state everything was in when each problem occured, nor do I remember which occurred when, or concurrently, or in
what order:
- the "copy admin hooks" part of gl-install failed because my $GL_BINDIR wasn't anywhere near the hooks I want
- if GL_PACKAGE_HOOKS was set (originally I think it was, because the install method I used wound up putting
them in /var/vcs/share/hooks, irrc), I think everything just got plain clobbered by those.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment