aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorng0 <ng0@we.make.ritual.n0.is>2016-11-19 21:49:06 +0000
committer宋文武 <iyzsong@member.fsf.org>2016-11-21 20:37:43 +0800
commite01e2c6c525f1c0ef0ab62b832435a4ece0348ec (patch)
tree9aaaccc318b2a4fffb4d1c76d532e8041532d231 /doc
parent2316078a4e64da0d6eee309e54f4b61c5b6cf30c (diff)
downloadguix-e01e2c6c525f1c0ef0ab62b832435a4ece0348ec.tar
guix-e01e2c6c525f1c0ef0ab62b832435a4ece0348ec.tar.gz
gnu: services: Add git-service.
* gnu/services/version-control.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Misellaneous Services)[Version Control]: New section. Co-authored-by: 宋文武 <iyzsong@member.fsf.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi61
1 files changed, 61 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 7352ea973f..3a88dd4044 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11673,6 +11673,67 @@ A @code{<dicod-database>} object serving the GNU Collaborative International
Dictonary of English using the @code{gcide} package.
@end defvr
+@subsubsection Version Control
+
+The @code{(gnu services version-control)} module provides the following services:
+
+@subsubheading Git daemon service
+
+@deffn {Scheme Procedure} git-daemon-service [#:config (git-daemon-configuration)]
+
+Return a service that runs @command{git daemon}, a simple TCP server to
+expose repositiories over the Git protocol for annoymous access.
+
+The optional @var{config} argument should be a
+@code{<git-daemon-configuration>} object, by default it allows read-only
+access to exported@footnote{By creating the magic file
+"git-daemon-export-ok" in the repository directory.} repositories under
+@file{/srv/git}.
+
+@end deffn
+
+@deftp {Data Type} git-daemon-configuration
+Data type representing the configuration for @code{git-daemon-service}.
+
+@table @asis
+@item @code{package} (default: @var{git})
+Package object of the Git distributed version control system.
+
+@item @code{export-all?} (default: @var{#f})
+Whether to allow access for all Git repositories, even if they do not
+have the @file{git-daemon-export-ok} file.
+
+@item @code{base-path} (default: @file{/srv/git})
+Whether to remap all the path requests as relative to the given path.
+If you run git daemon with @var{(base-path "/srv/git")} on example.com,
+then if you later try to pull @code{git://example.com/hello.git}, git
+daemon will interpret the path as @code{/srv/git/hello.git}.
+
+@item @code{user-path} (default: @var{#f})
+Whether to allow @code{~user} notation to be used in requests. When
+specified with empty string, requests to @code{git://host/~alice/foo} is
+taken as a request to access @code{foo} repository in the home directory
+of user @code{alice}. If @var{(user-path "path")} is specified, the
+same request is taken as a request to access @code{path/foo} repository
+in the home directory of user @code{alice}.
+
+@item @code{listen} (default: @var{'()})
+Whether to listen on specific IP addresses or hostnames, defaults to
+all.
+
+@item @code{port} (default: @var{#f})
+Whether to listen on an alternative port, which defaults to 9418.
+
+@item @code{whitelist} (default: @var{'()})
+If not empty, only allow access to this list of directories.
+
+@item @code{extra-options} (default: @var{'()})
+Extra options will be passed to @code{git daemon}, please run
+@command{man git-daemon} for more information.
+
+@end table
+@end deftp
+
@node Setuid Programs
@subsection Setuid Programs