From f725224636cbf33986dee14fdf55d0a8869f5f25 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 1 Sep 2013 20:30:31 -0300 Subject: Adding git-annex integration --- files/gitolite.rc.wheezy | 1 + manifests/gitolite.pp | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/files/gitolite.rc.wheezy b/files/gitolite.rc.wheezy index a6b5da3..a1dd058 100644 --- a/files/gitolite.rc.wheezy +++ b/files/gitolite.rc.wheezy @@ -56,6 +56,7 @@ $SVNSERVE = ""; # $UPDATE_CHAINS_TO = "hooks/update.secondary"; # $ADMIN_POST_UPDATE_CHAINS_TO = "hooks/post-update.secondary"; # $GL_ADC_PATH = ""; +$GL_ADC_PATH = "/var/git/adc/"; # $GL_GET_MEMBERSHIPS_PGM = "/usr/local/bin/expand-ldap-user-to-groups" # $GL_HTTP_ANON_USER = "mob"; # $GL_REF_OR_FILENAME_PATT=qr(^[0-9a-zA-Z][0-9a-zA-Z._\@/+ :,-]*$); diff --git a/manifests/gitolite.pp b/manifests/gitolite.pp index 68d655e..a56735e 100644 --- a/manifests/gitolite.pp +++ b/manifests/gitolite.pp @@ -104,5 +104,31 @@ class gitolite inherits git { ensure => present, require => File['/usr/local/sbin/git-mass-update-server-info'], } + + # git-annex integration + package { 'git-annex': + ensure => present, + } + + # wheezy onwards + # http://git-annex.branchable.com/tips/using_gitolite_with_git-annex/ + file { [ '/var/git/adc', '/var/git/adc/ua' ]: + ensure => $::lsbdistcodename ? { + 'squeeze' => absent, + default => present, + }, + owner => gitolite, + group => gitolite, + mode => 0755, + require => File['/var/git'], + } + + exec { 'git-annex-shell-copier': + command => 'cp /usr/share/doc/gitolite/examples/adc/git-annex-shell /var/git/adc/ua/git-annex-shell', + user => root, + creates => '/var/git/adc/ua/git-annex-shell', + onlyif => "test -f /usr/share/doc/gitolite/examples/adc/git-annex-shell", + require => [ Package['git-annex'], File['/var/git/adc/ua'] ], + } } -- cgit v1.2.3