git-instaweb: Fix Apache environment variable passing
authorDan McGee <dpmcgee@gmail.com>
Wed, 30 Jun 2010 02:44:59 +0000 (21:44 -0500)
committerEric Wong <normalperson@yhbt.net>
Fri, 23 Jul 2010 18:13:47 +0000 (11:13 -0700)
We were passing the non-existent GIT_EXEC_DIR through instead of the real
GIT_EXEC_PATH. In addition, these weren't being passed at all for CGI (non
mod_perl) execution so get them included there as well.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-instaweb.sh
index a01476a80f946c6e70b4932c5abd5e38fcd643a4..1d349b88de9f3c9fa10ea3f949e3e3108035b07a 100755 (executable)
@@ -314,7 +314,7 @@ PidFile "$fqgitdir/pid"
 Listen $bind$port
 EOF
 
-       for mod in mime dir log_config; do
+       for mod in mime dir env log_config; do
                if test -e $module_path/mod_${mod}.so; then
                        echo "LoadModule ${mod}_module " \
                             "$module_path/mod_${mod}.so" >> "$conf"
@@ -334,7 +334,7 @@ EOF
                cat >> "$conf" <<EOF
 LoadModule perl_module $module_path/mod_perl.so
 PerlPassEnv GIT_DIR
-PerlPassEnv GIT_EXEC_DIR
+PerlPassEnv GIT_EXEC_PATH
 PerlPassEnv GITWEB_CONFIG
 <Location /gitweb.cgi>
        SetHandler perl-script
@@ -364,6 +364,9 @@ EOF
                        echo "ScriptSock logs/gitweb.sock" >> "$conf"
                fi
                cat >> "$conf" <<EOF
+PassEnv GIT_DIR
+PassEnv GIT_EXEC_PATH
+PassEnv GITWEB_CONFIG
 AddHandler cgi-script .cgi
 <Location /gitweb.cgi>
        Options +ExecCGI