git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] update git-http-backend doc for lighttpd
@ 2018-10-28  0:16 Glenn Strauss
  2018-10-29  3:19 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Strauss @ 2018-10-28  0:16 UTC (permalink / raw)
  To: git

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:
 +
 ----------------------------------------------------------------
-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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] update git-http-backend doc for lighttpd
  2018-10-28  0:16 [PATCH] update git-http-backend doc for lighttpd Glenn Strauss
@ 2018-10-29  3:19 ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2018-10-29  3:19 UTC (permalink / raw)
  To: Glenn Strauss; +Cc: git

Glenn Strauss <gstrauss@gluelogic.com> writes:

> 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.

>  +
>  ----------------------------------------------------------------
> -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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] update git-http-backend doc for lighttpd
@ 2020-02-12  3:52 Glenn Strauss via GitGitGadget
  2020-02-12 11:56 ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Strauss via GitGitGadget @ 2020-02-12  3:52 UTC (permalink / raw)
  To: git; +Cc: Glenn Strauss, Glenn Strauss

From: Glenn Strauss <gstrauss@gluelogic.com>

git-http-backend may be found at /usr/libexec/git-core/git-http-backend

scope lighttpd config directives for git-http-backend under "^/git"

Note:
lighttpd 1.4.51 setenv.add-environment does not add vars with empty value.
so use "GIT_HTTP_EXPORT_ALL" => "1" (with a value) in lighttpd 1.4.51.
lighttpd setenv.set-environment does, but was only introduced in 1.4.46
lighttpd 1.4.52 setenv.add-environment restores prior lighttpd 1.4.50
behavior.

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
---
    update git-http-backend doc for lighttpd
    
     update git-http-backend doc for lighttpd:
    
    git-http-backend may be found at /usr/libexec/git-core/git-http-backend
    
    scope lighttpd config directives for git-http-backend under "^/git"
    
    Note: lighttpd 1.4.51 setenv.add-environment does not add vars with
    empty value. so use "GIT_HTTP_EXPORT_ALL" => "1" (with a value) in
    lighttpd 1.4.51. lighttpd setenv.set-environment does, but was only
    introduced in 1.4.46 lighttpd 1.4.52 setenv.add-environment restores
    prior lighttpd 1.4.50 behavior.
    
    Signed-off-by: Glenn Strauss gstrauss@gluelogic.com
    [gstrauss@gluelogic.com]
    
    [Edited to reflect refined commit. v1 and v2 were originally submitted
    via submitGit]

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-546%2Fgstrauss%2Flighttpd-git-http-backend-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-546/gstrauss/lighttpd-git-http-backend-v1
Pull-Request: https://github.com/git/git/pull/546

 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 558966aa83..9e8d7083be 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -191,13 +191,13 @@ 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:
+	Ensure `mod_auth`, `mod_alias`, `mod_cgi`, `mod_setenv` are loaded,
+	then set path to git-http-backend in `alias.url`, redirect all `/git`
+	requests to CGI, and set `GIT_PROJECT_ROOT` path to git project root.
 +
 ----------------------------------------------------------------
-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",

base-commit: 0ad714499976290d9a0229230cbe4efae930b8dc
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] update git-http-backend doc for lighttpd
  2020-02-12  3:52 Glenn Strauss via GitGitGadget
@ 2020-02-12 11:56 ` Johannes Schindelin
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2020-02-12 11:56 UTC (permalink / raw)
  To: Glenn Strauss via GitGitGadget; +Cc: git, Glenn Strauss, Glenn Strauss

Hi,

On Wed, 12 Feb 2020, Glenn Strauss via GitGitGadget wrote:

>     [Edited to reflect refined commit. v1 and v2 were originally submitted
>     via submitGit]

For the record: I think only v1 was submitted via submitGit so far:
https://public-inbox.org/git/01020166b80743cd-0b220d55-a283-456b-a3c3-bdea8aafed8a-000000@eu-west-1.amazonses.com/

Ciao,
Johannes

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-12 11:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-28  0:16 [PATCH] update git-http-backend doc for lighttpd Glenn Strauss
2018-10-29  3:19 ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2020-02-12  3:52 Glenn Strauss via GitGitGadget
2020-02-12 11:56 ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).