rc: get rid of GL_GITCONFIG_WILD

was only for efficiency even when it was relevant, and now it's just in
the way, making useless noises.
This commit is contained in:
Sitaram Chamarty 2011-08-17 21:27:48 +05:30
parent 056459aeda
commit e970327cc1
8 changed files with 10 additions and 29 deletions

View file

@ -45,7 +45,6 @@ $GL_NO_DAEMON_NO_GITWEB = 0;
# $GL_ALL_READ_ALL = 0;
$GIT_PATH="";
$GL_GITCONFIG_KEYS = "";
# $GL_GITCONFIG_WILD = 0;
$GL_NO_CREATE_REPOS = 0;
$GL_NO_SETUP_AUTHKEYS = 0;
# $GL_WILDREPOS_DEFPERMS = 'R @all';

View file

@ -154,12 +154,6 @@ on feedback from my users to find or fix issues.
`\\.` (two backslashes and a dot). So this is how you'd allow any keys in
the "foo" category: `$GL_GITCONFIG_KEYS = "foo\\..*";`
* `$GL_GITCONFIG_WILD`, boolean, default 0
This setting allows gitconfig keys even for wild repos. This is an
efficiency issue more than a security issue, since this requires trawling
through all of `$REPO_BASE` looking for stuff :)
* `$GL_NO_CREATE_REPOS`, boolean, default 0
DO NOT CHANGE THIS unless you have other means to create repos and

View file

@ -643,8 +643,8 @@ Then write a cron job that looks like this (untested).
If you're paranoid enough to use mirrors, you should be paranoid enough to
use the `receive.fsckObjects` setting. However, informal tests indicate a
40-50% CPU overhead from this. If you're ok with that, make the appropriate
adjustments to `GL_GITCONFIG_KEYS` and possibly `GL_GITCONFIG_WILD` in the rc
file, then add this to your gitolite.conf file:
adjustments to `GL_GITCONFIG_KEYS` in the rc file, then add this to your
gitolite.conf file:
repo @all
config receive.fsckObjects = "true"

View file

@ -17,7 +17,7 @@ use Exporter 'import';
$ADMIN_POST_UPDATE_CHAINS_TO $ENV $GITOLITE_BASE $GITOLITE_PATH $GIT_PATH
$GL_ADC_PATH $GL_ADMINDIR $GL_ALL_INCLUDES_SPECIAL $GL_ALL_READ_ALL
$GL_BIG_CONFIG $GL_CONF $GL_CONF_COMPILED $GL_GET_MEMBERSHIPS_PGM
$GL_GITCONFIG_KEYS $GL_GITCONFIG_WILD $GL_KEYDIR $GL_LOGT $GL_NICE_VALUE
$GL_GITCONFIG_KEYS $GL_KEYDIR $GL_LOGT $GL_NICE_VALUE
$GL_NO_CREATE_REPOS $GL_NO_DAEMON_NO_GITWEB $GL_NO_SETUP_AUTHKEYS
$GL_PACKAGE_CONF $GL_PACKAGE_HOOKS $GL_PERFLOGT $GL_SITE_INFO
$GL_SLAVE_MODE $GL_WILDREPOS $GL_WILDREPOS_DEFPERMS

View file

@ -250,16 +250,6 @@ sub parse_conf_line
# force entry in %repos. Without this, a repo para with just a
# config line and no ACLs gets ignored in the output
$repos{$repo}{HAS_CONFIG} = 1;
# no problem if it's a plain repo (non-pattern, non-groupname)
# OR wild configs are allowed
unless ( ($repo =~ $REPONAME_PATT and $repo !~ /^@/) or $GL_GITCONFIG_WILD) {
my @r = ($repo); # single wildpatt
@r = sort keys %{ $groups{$repo} } if $groups{$repo}; # or a group; get its members
do {
warn "$WARN git config set for $_ but \$GL_GITCONFIG_WILD not set\n" unless $_ =~ $REPONAME_PATT
} for @r;
}
}
}
# include

View file

@ -1,7 +1,7 @@
# vim: syn=sh:
for bc in 0 1
do
for gcw in 0 1
for gcw in 0
do
cd $TESTDIR
$TESTDIR/rollback || die "rollback failed"
@ -9,7 +9,6 @@ do
name INTERNAL
editrc GL_WILDREPOS 1
editrc GL_BIG_CONFIG $bc
echo "\$GL_GITCONFIG_WILD = $gcw;" | addrc
# ----------
@ -47,8 +46,6 @@ do
RW = @leads
config foo.bar = baz
" | ugc -r
[ "$gcw" = "0" ] && expect "remote: git config set for bar/..\* but \$GL_GITCONFIG_WILD not set"
[ "$gcw" = "1" ] && notexpect "remote: git config set for bar/..\* but \$GL_GITCONFIG_WILD not set"
notexpect "git config.*not allowed"
expect_push_ok "master -> master"

View file

@ -1,12 +1,11 @@
# vim: syn=sh:
for gcw in 0 1
for gcw in 0
do
cd $TESTDIR
$TESTDIR/rollback || die "rollback failed"
name INTERNAL
editrc GL_WILDREPOS 1
echo "\$GL_GITCONFIG_WILD = $gcw;" | addrc
# ----------
@ -42,8 +41,6 @@ do
RW = @leads
config foo.bar = baz
" | ugc -r
[ "$gcw" = "0" ] && expect "remote: git config set for bar/\$creator/..\* but \$GL_GITCONFIG_WILD not set"
[ "$gcw" = "1" ] && notexpect "remote: git config set for bar/\$creator/..\* but \$GL_GITCONFIG_WILD not set"
notexpect "git config.*not allowed"
expect_push_ok "master -> master"

View file

@ -117,7 +117,9 @@ expect_filesame() {
die() {
echo '***** AAAAARRRGGH! *****' >&2
echo ${BASH_LINENO[1]} ${BASH_SOURCE[2]} >&2
echo "vim +${BASH_LINENO[1]} \'+r !head ~/1 ~/2 /dev/null\' ${BASH_SOURCE[2]}" >&2
cd $TESTDIR
vim +${BASH_LINENO[1]} '+r !head ~/1 ~/2 /dev/null' ${BASH_SOURCE[2]}
exit 1
}
@ -126,6 +128,7 @@ expect() {
then
ok
else
die foo
notok "expecting: $1, got:"
cat ~/1 ~/2|sed -e 's/^/# /'
fi
@ -134,6 +137,7 @@ expect() {
notexpect() {
if cat ~/1 ~/2 | grep "$1" >/dev/null
then
die foo
notok "NOT expecting: $1, got:"
cat ~/1 ~/2|sed -e 's/^/# /'
else