From: Andy Wingo <wingo@igalia.com>
To: ng0 <ng0@we.make.ritual.n0.is>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: service: Add git-service.
Date: Tue, 30 Aug 2016 09:40:03 +0200 [thread overview]
Message-ID: <87eg5666y4.fsf@igalia.com> (raw)
In-Reply-To: <87eg57tk6t.fsf@we.make.ritual.n0.is> (ng0@we.make.ritual.n0.is's message of "Mon, 29 Aug 2016 20:05:30 +0000")
On Mon 29 Aug 2016 22:05, ng0 <ng0@we.make.ritual.n0.is> writes:
> +@node Version Control
> +@subsubsection Version Control
> +
> +The @code{(gnu services version-control)} module provides the following services:
> +
> +@deffn {Scheme Procedure} git-service [git @var{git}] @
> + [base-path ``/var/git/repositories''] @
> + [port ``9418'']
Though there are no strict conventions for this, the right way to do
this is to use #:foo for keyword arguments, and then regular scheme for
the default value initializers. So
@deffn {Scheme Procedure} git-service [#:git git] @
[#:base-path "/var/git/repositories"] @
[#:port 9418]
Note lack of smart quotes on base-path. I also think that "path" might
not be the right word, which in GNU manuals is only used for search
paths. See the "GNU Manuals" section of standards.texi for more.
Anyway I suggest #:base-directory. Make sure the port is an integer and
not a string.
> +Return a service to run the @uref{https://git-scm.com, git} daemon version control
> +daemon.
Extra "daemon" here. Probably needs a sentence on what running the
daemon will do (namely, expose local repositories for remote access).
What about authentication? Is this purely anonymous?
> +The git daemon runs as the @code{git} unprivileged user. It is started with
> +the fixed parameters @code{--informative-errors} and @code{--syslog}. You can
> +pass the parameter @var{base-path}, which remaps all the pathrequests as
> +relative to the given path. If you run git daemon with
> +@var{base-path /var/git/repositories} on example.com, then if you later try
> +to pull @code{git://example.com/hello.git}, git daemon will interpret the path
> +as /var/git/repositories/hello.git.
Need @code{} on this last file name. Use "file name" instead of path in general.
> +Furthermore it takes the parameter @var{port} which defaults to 9418.
> +Run @command{man git daemon} for information about the options.
This man command does not work.
> +(define %git-accounts
> + ;; User account and groups for git-daemon.
> + ;; We can give it git-shell for now, otherwise we can switch to /bin/sh.
What does this comment mean? Why would we switch?
> +(define* (git-service #:key
> + (git git)
> + (base-path "/var/git/repositories")
> + (port 9418))
> + "Return a service that runs @url{https://git-scm.org,git} as a daemon.
> +The daemon will listen on the port specified in @var{port}.
> +In addition, @var{base-path} specifies the path which will repositories
> +which can be exported by adding 'git-daemon-export-ok' files to them."
This docstring needs updating as regards the word "path" I think and
also this info about git-daemon-export-ok probably needs to go in the
manual.
Other than that, looking good :)
Andy
next prev parent reply other threads:[~2016-08-30 7:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 13:04 [PATCH] gnu: service: Add git-service ng0
2016-08-29 14:12 ` Andy Wingo
2016-08-29 14:34 ` ng0
2016-08-29 20:05 ` ng0
2016-08-30 7:40 ` Andy Wingo [this message]
2016-08-30 11:45 ` ng0
2016-08-30 12:12 ` Andy Wingo
2016-08-30 17:50 ` ng0
2016-09-27 8:18 ` ng0
2016-09-30 23:49 ` 宋文武
2016-10-16 14:30 ` ng0
2016-09-27 8:20 ` ng0
2016-09-30 7:41 ` Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eg5666y4.fsf@igalia.com \
--to=wingo@igalia.com \
--cc=guix-devel@gnu.org \
--cc=ng0@we.make.ritual.n0.is \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.