git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] Documentation: git-daemon inetd configuration fix
@ 2007-03-16  7:54 Matthias Kestenholz
  2007-03-16  8:43 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Kestenholz @ 2007-03-16  7:54 UTC (permalink / raw)
  To: junkio; +Cc: git, Matthias Kestenholz

Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
---
 Documentation/git-daemon.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
 

 On my debian server, this change was needed to get git-daemon running.
 I am no inetd expert, so I don't know where the error was.

 Perhaps this patch might help someone else.


diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt
index 9ddab71..499c1f3 100644
--- a/Documentation/git-daemon.txt
+++ b/Documentation/git-daemon.txt
@@ -177,7 +177,7 @@ git-daemon as inetd server::
 +
 ------------------------------------------------
 	git stream tcp nowait nobody  /usr/bin/git-daemon
-		git-daemon --inetd --verbose --export-all
+		/usr/bin/git-daemon --inetd --verbose --export-all
 		/pub/foo /pub/bar
 ------------------------------------------------
 
@@ -190,7 +190,7 @@ git-daemon as inetd server for virtual hosts::
 +
 ------------------------------------------------
 	git stream tcp nowait nobody /usr/bin/git-daemon
-		git-daemon --inetd --verbose --export-all
+		/usr/bin/git-daemon --inetd --verbose --export-all
 		--interpolated-path=/pub/%H%D
 		/pub/www.example.org/software
 		/pub/www.example.com/software
-- 
1.5.0.4.1009.gd3da

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

* Re: [PATCH/RFC] Documentation: git-daemon inetd configuration fix
  2007-03-16  7:54 [PATCH/RFC] Documentation: git-daemon inetd configuration fix Matthias Kestenholz
@ 2007-03-16  8:43 ` Junio C Hamano
  2007-03-16  9:02   ` Matthias Kestenholz
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2007-03-16  8:43 UTC (permalink / raw)
  To: Matthias Kestenholz; +Cc: git

Matthias Kestenholz <matthias@spinlock.ch> writes:

>  On my debian server, this change was needed to get git-daemon running.
>  I am no inetd expert, so I don't know where the error was.
>
>  Perhaps this patch might help someone else.
>
>
> diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt
> index 9ddab71..499c1f3 100644
> --- a/Documentation/git-daemon.txt
> +++ b/Documentation/git-daemon.txt
> @@ -177,7 +177,7 @@ git-daemon as inetd server::
>  +
>  ------------------------------------------------
>  	git stream tcp nowait nobody  /usr/bin/git-daemon
> -		git-daemon --inetd --verbose --export-all
> +		/usr/bin/git-daemon --inetd --verbose --export-all
>  		/pub/foo /pub/bar
>  ------------------------------------------------

That sounds _very_ wrong.  What you changed is argv[0] (i.e. the
beginning of "service program arguments" field) and it should
not matter what you have there for inetd to launch git-daemon.
Presumably your inetd runs with /usr/bin in your path so even
the "service program" field (the one after 'nobody') should not
need the full path (but it is a good idea to be explicit in that
field as a principle), but needing the full path in argv[0]?

On _my_ debian box, I do not need a full path there, so it is
not even Debian in general but problem is on your particular
box.  Can you dig a bit more to see what you are doing any
differently?

For example, do you really mean the "service program arguments"
field that matters?

One plausible mistake scenario you _could_ have made is
something like this.  You compile git yourself and install it in
/home/matt/bin/git-daemon, and you needed to spell that path out
in "service program" field, but you found it out by trial and
error, and during that experiment you did not change "service
program" field (which actually matters) but "service program
arguments" field first.  And the working configuration you
happened to end up with was like this:

	git stream tcp nowait nobody /home/matt/bin/git-daemon \
        	/home/matt/bin/git-daemon --inetd ...

and then you tried to generalize it like this:

	git stream tcp nowait nobody /usr/bin/git-daemon \
        	/usr/bin/git-daemon --inetd ...

For one thing, I just tried to make sure argv[0] does not matter
at all by having this entry in my inetd.conf:

	git stream tcp nowait nobody /git/bin/git-daemon \
        	foobla --inetd ...

/git/bin is where I installed my git.  If I replace foobla with
anything else, it responds just fine.

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

* Re: [PATCH/RFC] Documentation: git-daemon inetd configuration fix
  2007-03-16  8:43 ` Junio C Hamano
@ 2007-03-16  9:02   ` Matthias Kestenholz
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Kestenholz @ 2007-03-16  9:02 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Fri, 2007-03-16 at 01:43 -0700, Junio C Hamano wrote:
> Matthias Kestenholz <matthias@spinlock.ch> writes:
> 
> >  On my debian server, this change was needed to get git-daemon running.
> >  I am no inetd expert, so I don't know where the error was.
> >
> >  Perhaps this patch might help someone else.
> >
> >
> > diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt
> > index 9ddab71..499c1f3 100644
> > --- a/Documentation/git-daemon.txt
> > +++ b/Documentation/git-daemon.txt
> > @@ -177,7 +177,7 @@ git-daemon as inetd server::
> >  +
> >  ------------------------------------------------
> >  	git stream tcp nowait nobody  /usr/bin/git-daemon
> > -		git-daemon --inetd --verbose --export-all
> > +		/usr/bin/git-daemon --inetd --verbose --export-all
> >  		/pub/foo /pub/bar
> >  ------------------------------------------------
> 
> That sounds _very_ wrong.  What you changed is argv[0] (i.e. the
> beginning of "service program arguments" field) and it should
> not matter what you have there for inetd to launch git-daemon.
> Presumably your inetd runs with /usr/bin in your path so even
> the "service program" field (the one after 'nobody') should not
> need the full path (but it is a good idea to be explicit in that
> field as a principle), but needing the full path in argv[0]?
> 
> On _my_ debian box, I do not need a full path there, so it is
> not even Debian in general but problem is on your particular
> box.  Can you dig a bit more to see what you are doing any
> differently?
> 
> For example, do you really mean the "service program arguments"
> field that matters?
> 


Uhm... I don't get it. I changed the second /usr/bin/git-daemon back to
git-dameon (and even to "foo") and it continues working after restarting
inetd.

I cannot reproduce the problem I had earlier, but everything works fine
with the line from the docs now.

Btw, git is installed in /usr/bin , so that cannot be the reason for the
failure I saw.


Oh well, sorry for the noise and thanks for the fast response.
	Matthias

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

end of thread, other threads:[~2007-03-16  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-16  7:54 [PATCH/RFC] Documentation: git-daemon inetd configuration fix Matthias Kestenholz
2007-03-16  8:43 ` Junio C Hamano
2007-03-16  9:02   ` Matthias Kestenholz

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 NNTP newsgroup(s).