Modify gl-conf in staging for dist-git acls.

This commit is contained in:
Ralph Bean 2015-12-17 21:57:13 +00:00
parent 2bca286974
commit 0a5ca36a62

View file

@ -11,8 +11,23 @@ if /usr/local/bin/genacls.pkgdb > gitolite.conf ; then
mv gitolite.conf /etc/gitolite/conf/
chown gen-acls:gen-acls -R /etc/gitolite/conf/
HOME=/srv/git /usr/bin/gitolite compile
{% if env == 'staging' %}
# After compiling, we have to stick some magic into the gl-conf files of
# every repo so that gitolite will understand our symlinks from rpms/
cd /srv/git/repositories
for repodir in *.git; do
# Strip off the '.git' on the end.
repo=${repodir::-4}
glconf=$repodir/gl-conf;
echo '$one_config{"'$repo'"} = $one_config{"rpms/'$repo'"};' >> $repodir/gl-conf;
echo '$one_repo{"'$repo'"} = $one_repo{"rpms/'$repo'"};' >> $repodir/gl-conf;
done
{% endif %}
fi
cd /
rm -rf $TEMPDIR
chown root:packager /etc/gitolite/conf/gitolite.conf-compiled.pm
chmod g+r /etc/gitolite/conf/gitolite.conf-compiled.pm