threads / patch / 49700

patchupdate git-http-backend doc for lighttpd

Subject: [PATCH] update git-http-backend doc for lighttpd

## tl;dr

2 messages between Oct 28, 2018 and Oct 29, 2018. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Glenn Strauss· Oct 28, 2018, 00:16 UTC · lore

use "GIT_HTTP_EXPORT_ALL" => "1" with a value for best compatiblity. lighttpd 1.4.51 setenv.add-environment does add vars with empty value. lighttpd setenv.set-environment does, but was only introduced in 1.4.46

git-http-backend may be found at /usr/libexec/git-core/git-http-backend
scope lighttpd config directives for git-http-backend under "^/git"
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
---
 Documentation/git-http-backend.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to Documentation/git-http-backend.txt +4 −5
diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend.txt
index bb0db195cebd6..905aa1056d26f 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -192,16 +192,16 @@ ScriptAlias /git/ /var/www/cgi-bin/gitweb.cgi/
 
 Lighttpd::
 	Ensure that `mod_cgi`, `mod_alias`, `mod_auth`, `mod_setenv` are
-	loaded, then set `GIT_PROJECT_ROOT` appropriately and redirect
-	all requests to the CGI:
+	loaded, then set path to git-http-backend, set `GIT_PROJECT_ROOT`
+	appropriately, and redirect all requests to the CGI:
 +
 ----------------------------------------------------------------
-alias.url += ( "/git" => "/usr/lib/git-core/git-http-backend" )
 $HTTP["url"] =~ "^/git" {
+	alias.url += ("/git" => "/usr/libexec/git-core/git-http-backend")
 	cgi.assign = ("" => "")
 	setenv.add-environment = (
 		"GIT_PROJECT_ROOT" => "/var/www/git",
-		"GIT_HTTP_EXPORT_ALL" => ""
+		"GIT_HTTP_EXPORT_ALL" => "1"
 	)
 }
 ----------------------------------------------------------------

--
https://github.com/git/git/pull/546
Junio C Hamano· Oct 29, 2018, 03:19 UTC · re: Glenn Strauss · lore

Re: [PATCH] update git-http-backend doc for lighttpd

Glenn Strauss <gstrauss@gluelogic.com> writes:
Show 25 quoted lines
> use "GIT_HTTP_EXPORT_ALL" => "1" with a value for best compatiblity.
> lighttpd 1.4.51 setenv.add-environment does add vars with empty value.
> lighttpd setenv.set-environment does, but was only introduced in 1.4.46
>
> git-http-backend may be found at /usr/libexec/git-core/git-http-backend
>
> scope lighttpd config directives for git-http-backend under "^/git"
>
> Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
> ---
>  Documentation/git-http-backend.txt | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend.txt
> index bb0db195cebd6..905aa1056d26f 100644
> --- a/Documentation/git-http-backend.txt
> +++ b/Documentation/git-http-backend.txt
> @@ -192,16 +192,16 @@ ScriptAlias /git/ /var/www/cgi-bin/gitweb.cgi/
>  
>  Lighttpd::
>  	Ensure that `mod_cgi`, `mod_alias`, `mod_auth`, `mod_setenv` are
> -	loaded, then set `GIT_PROJECT_ROOT` appropriately and redirect
> -	all requests to the CGI:
> +	loaded, then set path to git-http-backend, set `GIT_PROJECT_ROOT`
> +	appropriately, and redirect all requests to the CGI:
The addition here is
	set path to git-http-backend
That reads as if you are telling the reader to do this
	GIT_PROJECT_ROOT => "/var/www/git",
	path => "/usr/libexec/git-core/git-http-backend"

because the descriptions for these two are next to each other and so similar, but I somehow do not think you meant there is a variable whose name is `path` (note that I do not use lighttpd and am not an expert on its configuration---which makes me the ideal guinea pig to judge if your update makes sense to the target audience).

Do you mean something like
	use `alias.url` to mark that `/git` hierarchy is handled by
	the `git-http-backend` binary (use the full path to the
	program).

I do not see any quoting in your updated text, but many of what the end-user needs to type literally must be `quoted for monospace`, I would think.

Show 16 quoted lines
>  +
>  ----------------------------------------------------------------
> -alias.url += ( "/git" => "/usr/lib/git-core/git-http-backend" )
>  $HTTP["url"] =~ "^/git" {
> +	alias.url += ("/git" => "/usr/libexec/git-core/git-http-backend")
>  	cgi.assign = ("" => "")
>  	setenv.add-environment = (
>  		"GIT_PROJECT_ROOT" => "/var/www/git",
> -		"GIT_HTTP_EXPORT_ALL" => ""
> +		"GIT_HTTP_EXPORT_ALL" => "1"
>  	)
>  }
>  ----------------------------------------------------------------
>
> --
> https://github.com/git/git/pull/546
Thanks.

← back to recent threads