[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: service: Add git-service.
From: |
Andy Wingo |
Subject: |
Re: [PATCH] gnu: service: Add git-service. |
Date: |
Tue, 30 Aug 2016 09:40:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
On Mon 29 Aug 2016 22:05, ng0 <address@hidden> writes:
> address@hidden Version Control
> address@hidden Version Control
> +
> +The @code{(gnu services version-control)} module provides the following
> services:
> +
> address@hidden {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
> address@hidden /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