From 9b88999e18b0c295bcce92a74fa6ed67ce2dbec5 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 30 Apr 2015 18:41:24 -0700 Subject: [PATCH] shlib.sh: fix long-standing hard-coded group name 'repo' bug Use the correct $Girocco::Config::owning_group value instead. Signed-off-by: Kyle J. McKay --- shlib.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shlib.sh b/shlib.sh index 2267126..697f1bb 100644 --- a/shlib.sh +++ b/shlib.sh @@ -62,6 +62,7 @@ get_girocco_config_pm_var_list() { get_girocco_config_var_list() ( # Same as get_girocco_config_pm_var_list except that # the following variables (all starting with var_) are added: + # var_group cfg_owning_group if defined otherwise `id -gn` # var_git_ver The version number part from `git version` # var_have_git_172 Set to 1 if git version >= 1.7.2 otherwise '' # var_window_memory Value to use for repack --window-memory= @@ -72,6 +73,7 @@ get_girocco_config_var_list() ( _cfg_vars="$(get_girocco_config_pm_var_list)" eval "$_cfg_vars" printf '%s\n' "$_cfg_vars" + printf 'var_group=%s\n' "${cfg_owning_group:-$(id -gn)}" _gver="$("$cfg_git_bin" version 2>/dev/null | \ sed -ne 's/^[^0-9]*\([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*$/\1/p')" printf 'var_git_ver=%s\n' "$_gver" @@ -308,11 +310,11 @@ config_get() { } config_set() { - git config "gitweb.$1" "$2" && chgrp repo config && chmod g+w config + git config "gitweb.$1" "$2" && chgrp $var_group config && chmod g+w config } config_set_raw() { - git config "$1" "$2" && chgrp repo config && chmod g+w config + git config "$1" "$2" && chgrp $var_group config && chmod g+w config } config_get_date_seconds() { -- 2.11.4.GIT