threads / patch / 4395

patchRe: [PATCH, take 2] Add example xinetd(8) configuration to Documentation/everyday.txt

Subject: Re: [PATCH, take 2] Add example xinetd(8) configuration to Documentation/everyday.txt

## tl;dr

3 messages between Jun 5, 2006 and Jun 5, 2006. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Horst von Brand· Jun 5, 2006, 00:54 UTC · lore
Dmitry V. Levin <ldv@altlinux.org> wrote:
> It is a bad advice to run git-daemon as root.
Right, my bad. Fixed patch below.
[Really dumb question: How do you separate comments, like this, from the
 commit itself? Here done with dashes.]
--------
Add example xinetd(8) configuration to Documentation/everyday.txt

Many Linux distributions use xinetd(8), not inetd(8). Give a sample configuration file.

Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
---
 Documentation/everyday.txt |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
Show changes to Documentation/everyday.txt +23 −0
diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index 2ad2d61..ffba543 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -377,6 +377,29 @@ git	stream	tcp	nowait	nobody \
 +
 The actual configuration line should be on one line.
 
+Run git-daemon to serve /pub/scm from xinetd.::
++
+------------
+$ cat /etc/xinetd.d/git-daemon
+# default: off
+# description: The git server offers access to git repositories
+service git
+{
+        disable = no
+        type            = UNLISTED
+        port            = 9418
+        socket_type     = stream
+        wait            = no
+        user            = root
+        server          = /usr/bin/git-daemon
+        server_args     = --inetd --syslog --export-all --base-path=/pub/scm
+        log_on_failure  += USERID
+}
+------------
++
+Check your xinetd(8) documentation and setup, this is from a Fedora system.
+Others might be different.
+
 Give push/pull only access to developers.::
 +
 ------------
-- 
1.3.3.g16a4
Junio C Hamano· Jun 5, 2006, 01:24 UTC · re: Horst von Brand · lore

I do not know if the above address again bounces for me, but you will see that on the list I presume...

> [Really dumb question: How do you separate comments, like this, from the
>  commit itself? Here done with dashes.]
There are two ways often used on this list.
(1) Traditional, "really automatable and nicer to the
    maintainer" style.
	From xxx
        Subject: [PATCH] Add example xinetd(8) config...
        Commit log comes here, without the cover letter
        material.
        Signed-off-by: A U Thor <author@example.com>
	---
	 * Cover letter material comes here, before the usual
           diffstat and patch
         Documentation/everyday.txt |   23 +++++++++++++++++++++++
         1 files changed, 23 insertions(+), 0 deletions(-)
        diff --git a/Documentation/everyday.txt b/Documenta...
	index 2ad2d61..ffba543 100644
    Two points to observe:
     - Subject: should be changed to match the first line of the
       commit log message you would want to see, as needed.
     - cover letter material comes after the "---\n" line.
    When the cover letter material is short, this is often
    preferred, since I can just run "git am" on the whole thing
    and everything after the first "^---", including your cover
    letter material, is omitted from the log message.  It is,
    however, like top-posting and becomes harder to follow if
    the cover letter material gets long, in which case I
    personally prefer style (2) (but do not send style (2) to
    Linus).
(2) e-mail style, but NEVER use "---" (or longer) marker between
    cover letter and the commit log.
	From xxx
        Subject: Re: some earlier discussion topic
	Longer discussion, rambling, quotes, and cover letter
	material.
	-- >8 -- cut here -- >8 --
        [PATCH] Add example xinetd(8) config...
        Commit log comes here.
        Signed-off-by: A U Thor <author@example.com>
	---
         Documentation/everyday.txt |   23 +++++++++++++++++++++++
         1 files changed, 23 insertions(+), 0 deletions(-)
        diff --git a/Documentation/everyday.txt b/Documenta...
	index 2ad2d61..ffba543 100644
    When the cover letter material is long, this is easier to
    read, because it avoids the problems associated with
    top-posting.  However, when I apply this with "git am", I
    would need to go interactive and remove everything before
    the scissors line by hand.

Usual patch application toolchain (either git-applymbox or git-am) first splits your message at the first "^---" or "^diff -", and uses the part before that line to form the commit log message (together with what you have on the "Subject:" line). The rest is fed to git-apply. What this means is that you do not have to use the scissors logo (the tool does not know about it), but it is _absolutely_ necessary not to use anything that would usually signal the tool of the commit log message in place of the scissors. If you have the cover letter first and then "---" or "-----" followed by the commit message after that, the commit log message will be taken from the "discussion, rambling, quotes, and cover letter material" part and the real commit log you wanted to have will not be seen at all, which needs to be hand fixed.

Dmitry V. Levin· Jun 5, 2006, 13:12 UTC · re: Horst von Brand · lore
On Sun, Jun 04, 2006 at 08:54:15PM -0400, Horst von Brand wrote:
> Dmitry V. Levin <ldv@altlinux.org> wrote:
> > It is a bad advice to run git-daemon as root.
> 
> Right, my bad. Fixed patch below.
[...]
> +        user            = root
Really?
-- 
ldv

← back to recent threads