There are two problems in the way config files are generated in each repository when $GL_BIG_CONFIG is enabled (both cases also apply to newer version in rawhide): . the first one is related to the propagation of config hooks. Here is a quick way to reproduce the problem, on a fresh F16 : yum install gitolite su - gitolite gl-setup /tmp/bellet.pub Then I tweak the config file in the following way: $GL_BIG_CONFIG = 1; $GL_GITCONFIG_KEYS = "hooks\.mailinglist"; git clone gitolite.122.76:gitolite-admin I edit conf/gitolite.conf: ----------------------- @repogroup = testing repo gitolite-admin RW+ = bellet repo @repogroup config hooks.mailinglist = root@localhost repo testing RW+ = @all testing "Testing owner" = "Testing software" ------------------------ git commit -a && git push I modify the the hooks.mailinglist value in conf/gitolite.conf git commit -a && git push -> the hook modification is not propagated in /var/lib/gitolite/repositories/testing.git/config I remove the testing description line from conf/gitolite.conf git commit -a && git push -> the hook modification is propagated The suggested fix is to force can_read() to be called in setup_gitweb_access() with this patch : --- sitaramc-gitolite-4c1e4b2/src/gitolite.pm.orig 2012-02-27 21:59:09.699580170 +0100 +++ sitaramc-gitolite-4c1e4b2/src/gitolite.pm 2012-02-27 21:59:28.802476445 +0100 @@ -482,7 +482,8 @@ system("git config --remove-section gitweb 2>/dev/null"); } - return ($desc or can_read($repo, 'gitweb')); + my $cr = can_read($repo, 'gitweb'); + return ($desc or $cr); # this return value is used by the caller to write to projects.list } The second problem is that config order is not respected when $GL_BIG_CONFIG=1. consider this case : ------------------------- @repogroup = testing repo gitolite-admin RW+ = bellet repo @repogroup config hooks.mailinglist = bellet2@localhost repo testing config hooks.mailinglist = bellet3@localhost repo testing RW+ = @all ------------------------- I would expect that the hook specific to the 'testing' repo would have priority on the same hook for the @repogroup containing the testing repo just above. this is not the case. This other patch fixes that (partly adapted from upstream) : @@ -650,7 +651,10 @@ $repos{$dr}{DELETE_IS_D} = 1 if $repos{$r}{DELETE_IS_D}; $repos{$dr}{CREATE_IS_C} = 1 if $repos{$r}{CREATE_IS_C}; $repos{$dr}{NAME_LIMITS} = 1 if $repos{$r}{NAME_LIMITS}; - $git_configs{$dr} = $git_configs{$r} if $git_configs{$r}; + # this needs to copy the key-value pairs from RHS to LHS, not just + # assign RHS to LHS! However, we want to roll in '@all' configs also + # into the actual $repo; there's no need to preserve the distinction + map { $git_configs{$repo}{$_} = $git_configs{$r}{$_} if not $git_configs{$repo}{$_} } keys %{$git_configs{$r}} if $git_configs{$r}; for my $u ('@all', "$gl_user - wild", @user_plus, keys %perm_cats) { my $du = $gl_user; $du = '@all' if $u eq '@all' or ($perm_cats{$u} || '') eq '@all'; the idea is to collect the config key-values from the 'repo @repogroup' section when they don't overwrite existing config key-value for the same key in the 'repo testing' section. It doesn't resolve the ordering problem when the repo is part of several groups, but at least it gives a priority to the configuration of a single repo vs. the configuration of a group of repos.
Excellent, thank you. Can you attach the patches to the BZ to make sure I get the formatting right?
Created attachment 571876 [details] fix for the hook update propagation pb
Created attachment 571877 [details] dont overwrite single repo configs with @repogroups identical configs
I see these are present in 2.3. I think I'll just update f17, f16, and el6 to that.
gitolite-2.3-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/gitolite-2.3-1.fc17
gitolite-2.3-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/gitolite-2.3-1.fc16
gitolite-2.3-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/gitolite-2.3-1.el6
I tested gitolite-2.3-1.fc16. The first issue is still there, and the patch from comment #c2 still works. The second issue has disappeared with this new upstream version : now the config hooks overrides are solely based on their order in the config file.
Whoops, good catch. I'll apply that patch and re-update.
gitolite-2.3-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/gitolite-2.3-2.fc16
gitolite-2.3-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/gitolite-2.3-2.fc17
gitolite-2.3-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/gitolite-2.3-2.el6
Package gitolite-2.3-2.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing gitolite-2.3-2.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-4564/gitolite-2.3-2.fc17 then log in and leave karma (feedback).
I tested on Fedora 16, and it works for me. Thanks!
gitolite-2.3-2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
gitolite-2.3-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
gitolite-2.3-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.