{"thread":{"id":"7268","subject":"[PATCH/RFC] Documentation: git-daemon inetd configuration fix","startedAt":"2007-03-16T07:54:29Z","lastAt":"2007-03-16T09:02:09Z","messageCount":3,"participants":["Matthias Kestenholz","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37211","messageId":"11740316693552-git-send-email-matthias@spinlock.ch","threadId":"7268","inReplyTo":null,"subject":"[PATCH/RFC] Documentation: git-daemon inetd configuration fix","fromName":"Matthias Kestenholz","fromEmail":"matthias@spinlock.ch","sentAt":"2007-03-16T07:54:29Z","receivedAt":"2007-03-16T07:54:29Z","isPatch":true,"sender":{"key":"matthias@spinlock.ch","avatar":"https://gravatar.com/avatar/bc18f396e70163d09ab458a341b1decb7e8b6ee3aa2c0c954ec20162e67c4d46?d=mp&s=160"},"body":"Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>\n---\n Documentation/git-daemon.txt |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n \n\n On my debian server, this change was needed to get git-daemon running.\n I am no inetd expert, so I don't know where the error was.\n\n Perhaps this patch might help someone else.\n\n\ndiff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\nindex 9ddab71..499c1f3 100644\n--- a/Documentation/git-daemon.txt\n+++ b/Documentation/git-daemon.txt\n@@ -177,7 +177,7 @@ git-daemon as inetd server::\n +\n ------------------------------------------------\n \tgit stream tcp nowait nobody  /usr/bin/git-daemon\n-\t\tgit-daemon --inetd --verbose --export-all\n+\t\t/usr/bin/git-daemon --inetd --verbose --export-all\n \t\t/pub/foo /pub/bar\n ------------------------------------------------\n \n@@ -190,7 +190,7 @@ git-daemon as inetd server for virtual hosts::\n +\n ------------------------------------------------\n \tgit stream tcp nowait nobody /usr/bin/git-daemon\n-\t\tgit-daemon --inetd --verbose --export-all\n+\t\t/usr/bin/git-daemon --inetd --verbose --export-all\n \t\t--interpolated-path=/pub/%H%D\n \t\t/pub/www.example.org/software\n \t\t/pub/www.example.com/software\n-- \n1.5.0.4.1009.gd3da\n"},{"id":"37214","messageId":"7vabydwpd5.fsf@assigned-by-dhcp.cox.net","threadId":"7268","inReplyTo":"11740316693552-git-send-email-matthias@spinlock.ch","subject":"Re: [PATCH/RFC] Documentation: git-daemon inetd configuration fix","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-16T08:43:02Z","receivedAt":"2007-03-16T08:43:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthias Kestenholz <matthias@spinlock.ch> writes:\n\n>  On my debian server, this change was needed to get git-daemon running.\n>  I am no inetd expert, so I don't know where the error was.\n>\n>  Perhaps this patch might help someone else.\n>\n>\n> diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\n> index 9ddab71..499c1f3 100644\n> --- a/Documentation/git-daemon.txt\n> +++ b/Documentation/git-daemon.txt\n> @@ -177,7 +177,7 @@ git-daemon as inetd server::\n>  +\n>  ------------------------------------------------\n>  \tgit stream tcp nowait nobody  /usr/bin/git-daemon\n> -\t\tgit-daemon --inetd --verbose --export-all\n> +\t\t/usr/bin/git-daemon --inetd --verbose --export-all\n>  \t\t/pub/foo /pub/bar\n>  ------------------------------------------------\n\nThat sounds _very_ wrong.  What you changed is argv[0] (i.e. the\nbeginning of \"service program arguments\" field) and it should\nnot matter what you have there for inetd to launch git-daemon.\nPresumably your inetd runs with /usr/bin in your path so even\nthe \"service program\" field (the one after 'nobody') should not\nneed the full path (but it is a good idea to be explicit in that\nfield as a principle), but needing the full path in argv[0]?\n\nOn _my_ debian box, I do not need a full path there, so it is\nnot even Debian in general but problem is on your particular\nbox.  Can you dig a bit more to see what you are doing any\ndifferently?\n\nFor example, do you really mean the \"service program arguments\"\nfield that matters?\n\nOne plausible mistake scenario you _could_ have made is\nsomething like this.  You compile git yourself and install it in\n/home/matt/bin/git-daemon, and you needed to spell that path out\nin \"service program\" field, but you found it out by trial and\nerror, and during that experiment you did not change \"service\nprogram\" field (which actually matters) but \"service program\narguments\" field first.  And the working configuration you\nhappened to end up with was like this:\n\n\tgit stream tcp nowait nobody /home/matt/bin/git-daemon \\\n        \t/home/matt/bin/git-daemon --inetd ...\n\nand then you tried to generalize it like this:\n\n\tgit stream tcp nowait nobody /usr/bin/git-daemon \\\n        \t/usr/bin/git-daemon --inetd ...\n\nFor one thing, I just tried to make sure argv[0] does not matter\nat all by having this entry in my inetd.conf:\n\n\tgit stream tcp nowait nobody /git/bin/git-daemon \\\n        \tfoobla --inetd ...\n\n/git/bin is where I installed my git.  If I replace foobla with\nanything else, it responds just fine.\n"},{"id":"37218","messageId":"1174035730.4067.54.camel@localhost.localdomain","threadId":"7268","inReplyTo":"7vabydwpd5.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH/RFC] Documentation: git-daemon inetd configuration fix","fromName":"Matthias Kestenholz","fromEmail":"matthias@spinlock.ch","sentAt":"2007-03-16T09:02:09Z","receivedAt":"2007-03-16T09:02:09Z","isPatch":true,"sender":{"key":"matthias@spinlock.ch","avatar":"https://gravatar.com/avatar/bc18f396e70163d09ab458a341b1decb7e8b6ee3aa2c0c954ec20162e67c4d46?d=mp&s=160"},"body":"On Fri, 2007-03-16 at 01:43 -0700, Junio C Hamano wrote:\n> Matthias Kestenholz <matthias@spinlock.ch> writes:\n> \n> >  On my debian server, this change was needed to get git-daemon running.\n> >  I am no inetd expert, so I don't know where the error was.\n> >\n> >  Perhaps this patch might help someone else.\n> >\n> >\n> > diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\n> > index 9ddab71..499c1f3 100644\n> > --- a/Documentation/git-daemon.txt\n> > +++ b/Documentation/git-daemon.txt\n> > @@ -177,7 +177,7 @@ git-daemon as inetd server::\n> >  +\n> >  ------------------------------------------------\n> >  \tgit stream tcp nowait nobody  /usr/bin/git-daemon\n> > -\t\tgit-daemon --inetd --verbose --export-all\n> > +\t\t/usr/bin/git-daemon --inetd --verbose --export-all\n> >  \t\t/pub/foo /pub/bar\n> >  ------------------------------------------------\n> \n> That sounds _very_ wrong.  What you changed is argv[0] (i.e. the\n> beginning of \"service program arguments\" field) and it should\n> not matter what you have there for inetd to launch git-daemon.\n> Presumably your inetd runs with /usr/bin in your path so even\n> the \"service program\" field (the one after 'nobody') should not\n> need the full path (but it is a good idea to be explicit in that\n> field as a principle), but needing the full path in argv[0]?\n> \n> On _my_ debian box, I do not need a full path there, so it is\n> not even Debian in general but problem is on your particular\n> box.  Can you dig a bit more to see what you are doing any\n> differently?\n> \n> For example, do you really mean the \"service program arguments\"\n> field that matters?\n> \n\n\nUhm... I don't get it. I changed the second /usr/bin/git-daemon back to\ngit-dameon (and even to \"foo\") and it continues working after restarting\ninetd.\n\nI cannot reproduce the problem I had earlier, but everything works fine\nwith the line from the docs now.\n\nBtw, git is installed in /usr/bin , so that cannot be the reason for the\nfailure I saw.\n\n\nOh well, sorry for the noise and thanks for the fast response.\n\tMatthias\n"}]}