2 13b2bc37 2022-10-23 stsp .\" Copyright (c) 2022 Stefan Sperling <stsp@openbsd.org>
4 13b2bc37 2022-10-23 stsp .\" Permission to use, copy, modify, and distribute this software for any
5 13b2bc37 2022-10-23 stsp .\" purpose with or without fee is hereby granted, provided that the above
6 13b2bc37 2022-10-23 stsp .\" copyright notice and this permission notice appear in all copies.
8 13b2bc37 2022-10-23 stsp .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 13b2bc37 2022-10-23 stsp .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 13b2bc37 2022-10-23 stsp .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 13b2bc37 2022-10-23 stsp .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 13b2bc37 2022-10-23 stsp .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 13b2bc37 2022-10-23 stsp .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 13b2bc37 2022-10-23 stsp .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 13b2bc37 2022-10-23 stsp .Dd $Mdocdate$
17 13b2bc37 2022-10-23 stsp .Dt GOTD.CONF 5
20 13b2bc37 2022-10-23 stsp .Nm gotd.conf
21 13b2bc37 2022-10-23 stsp .Nd gotd configuration file
22 13b2bc37 2022-10-23 stsp .Sh DESCRIPTION
24 13b2bc37 2022-10-23 stsp is the run-time configuration file for
25 13b2bc37 2022-10-23 stsp .Xr gotd 8 .
27 13b2bc37 2022-10-23 stsp The file format is line-based, with one configuration directive per line.
28 13b2bc37 2022-10-23 stsp Any lines beginning with a
30 13b2bc37 2022-10-23 stsp are treated as comments and ignored.
31 13b2bc37 2022-10-23 stsp .Sh GLOBAL CONFIGURATION
32 13b2bc37 2022-10-23 stsp The available global configuration directives are as follows:
33 13b2bc37 2022-10-23 stsp .Bl -tag -width Ds
34 13b2bc37 2022-10-23 stsp .It Ic unix_socket Ar path
35 13b2bc37 2022-10-23 stsp Set the path to the unix socket which
37 13b2bc37 2022-10-23 stsp should listen on.
38 13b2bc37 2022-10-23 stsp If not specified, the path
39 13b2bc37 2022-10-23 stsp .Pa /var/run/gotd.sock
40 13b2bc37 2022-10-23 stsp will be used.
41 13b2bc37 2022-10-23 stsp .It Ic unix_group Ar group
44 13b2bc37 2022-10-23 stsp defined in the
46 13b2bc37 2022-10-23 stsp file, which is allowed to access
49 13b2bc37 2022-10-23 stsp .Xr gotsh 1 .
52 13b2bc37 2022-10-23 stsp user must be a secondary member of this group.
53 13b2bc37 2022-10-23 stsp If not specified, the group _gotsh will be used.
54 13b2bc37 2022-10-23 stsp .It Ic user Ar user
57 13b2bc37 2022-10-23 stsp which will run
58 13b2bc37 2022-10-23 stsp .Xr gotd 8 .
61 13b2bc37 2022-10-23 stsp requires root privileges in order to create its unix socket and start
62 13b2bc37 2022-10-23 stsp child processes in a
63 13b2bc37 2022-10-23 stsp .Xr chroot 2
64 13b2bc37 2022-10-23 stsp environment.
67 13b2bc37 2022-10-23 stsp drops privileges to the specified
69 13b2bc37 2022-10-23 stsp If not specified, the user _gotd will be used.
71 13b2bc37 2022-10-23 stsp .Sh REPOSITORY CONFIGURATION
72 13b2bc37 2022-10-23 stsp At least one repository context must exist for
74 13b2bc37 2022-10-23 stsp to function.
76 13b2bc37 2022-10-23 stsp A repository context is declared with a unique
78 13b2bc37 2022-10-23 stsp followed by repository-specific configuration directives inside curly braces:
80 13b2bc37 2022-10-23 stsp .Ic repository Ar name Brq ...
85 13b2bc37 2022-10-23 stsp clients can connect to a repository by including the repository's unique
87 13b2bc37 2022-10-23 stsp in the request URL.
88 13b2bc37 2022-10-23 stsp Clients appending the string
92 13b2bc37 2022-10-23 stsp will also be accepted.
94 13b2bc37 2022-10-23 stsp If desired, the
96 13b2bc37 2022-10-23 stsp may contain path-separators,
98 13b2bc37 2022-10-23 stsp to expose repositories as part of a virtual client-visible directory hierarchy.
100 13b2bc37 2022-10-23 stsp The available repository configuration directives are as follows:
101 13b2bc37 2022-10-23 stsp .Bl -tag -width Ds
102 13b2bc37 2022-10-23 stsp .It Ic path Ar path
103 13b2bc37 2022-10-23 stsp Set the path to the Git repository.
106 13b2bc37 2022-10-23 stsp .Bl -tag -width Ds -compact
107 13b2bc37 2022-10-23 stsp .It Pa /etc/gotd.conf
108 13b2bc37 2022-10-23 stsp Location of the
110 13b2bc37 2022-10-23 stsp configuration file.
112 13b2bc37 2022-10-23 stsp .Sh EXAMPLES
113 13b2bc37 2022-10-23 stsp .Bd -literal -offset indent
114 13b2bc37 2022-10-23 stsp # Default unix_group and user values:
115 13b2bc37 2022-10-23 stsp unix_group _gotsh
118 13b2bc37 2022-10-23 stsp # This repository can be accessed via ssh://user@example.com/src
119 13b2bc37 2022-10-23 stsp repository "src" {
120 13b2bc37 2022-10-23 stsp path "/var/git/src.git"
123 13b2bc37 2022-10-23 stsp # This repository can be accessed via
124 13b2bc37 2022-10-23 stsp # ssh://user@example.com/openbsd/ports
125 13b2bc37 2022-10-23 stsp repository "openbsd/ports" {
126 13b2bc37 2022-10-23 stsp path "/var/git/ports.git"
129 13b2bc37 2022-10-23 stsp .Sh SEE ALSO
130 13b2bc37 2022-10-23 stsp .Xr got 1 ,
131 13b2bc37 2022-10-23 stsp .Xr gotsh 1 ,
132 13b2bc37 2022-10-23 stsp .Xr group 5 ,