Blame


1 a596b957 2022-07-14 tracey .\"
2 a596b957 2022-07-14 tracey .\" Copyright (c) 2020 Stefan Sperling
3 a596b957 2022-07-14 tracey .\"
4 a596b957 2022-07-14 tracey .\" Permission to use, copy, modify, and distribute this software for any
5 a596b957 2022-07-14 tracey .\" purpose with or without fee is hereby granted, provided that the above
6 a596b957 2022-07-14 tracey .\" copyright notice and this permission notice appear in all copies.
7 a596b957 2022-07-14 tracey .\"
8 a596b957 2022-07-14 tracey .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 a596b957 2022-07-14 tracey .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 a596b957 2022-07-14 tracey .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 a596b957 2022-07-14 tracey .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 a596b957 2022-07-14 tracey .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 a596b957 2022-07-14 tracey .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 a596b957 2022-07-14 tracey .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 a596b957 2022-07-14 tracey .\"
16 a596b957 2022-07-14 tracey .Dd $Mdocdate$
17 a596b957 2022-07-14 tracey .Dt GOTWEB 8
18 a596b957 2022-07-14 tracey .Os
19 a596b957 2022-07-14 tracey .Sh NAME
20 a596b957 2022-07-14 tracey .Nm gotweb
21 a596b957 2022-07-14 tracey .Nd Game of Trees Git repository server for web browsers -- which obviously
22 a596b957 2022-07-14 tracey needs to be updated to gotwebd
23 a596b957 2022-07-14 tracey .Sh SYNOPSIS
24 a596b957 2022-07-14 tracey .Nm
25 a596b957 2022-07-14 tracey .Sh DESCRIPTION
26 a596b957 2022-07-14 tracey .Nm
27 a596b957 2022-07-14 tracey provides a web interface allowing Git repository contents to be viewed
28 a596b957 2022-07-14 tracey with a web browser.
29 a596b957 2022-07-14 tracey .Pp
30 a596b957 2022-07-14 tracey .Nm
31 a596b957 2022-07-14 tracey is a CGI program based on
32 a596b957 2022-07-14 tracey .Xr got 1
33 a596b957 2022-07-14 tracey and
34 a596b957 2022-07-14 tracey .Xr kcgi 3
35 a596b957 2022-07-14 tracey which is intended to run in a
36 a596b957 2022-07-14 tracey .Xr chroot 2
37 a596b957 2022-07-14 tracey environment in
38 a596b957 2022-07-14 tracey .Pa /var/www .
39 a596b957 2022-07-14 tracey The program has been designed to work out of the box with
40 a596b957 2022-07-14 tracey the
41 a596b957 2022-07-14 tracey .Xr httpd 8
42 a596b957 2022-07-14 tracey web server in conjunction with
43 a596b957 2022-07-14 tracey .Xr slowcgi 8 .
44 a596b957 2022-07-14 tracey .Pp
45 a596b957 2022-07-14 tracey Enabling
46 a596b957 2022-07-14 tracey .Nm
47 a596b957 2022-07-14 tracey requires the following steps:
48 a596b957 2022-07-14 tracey .Bl -enum
49 a596b957 2022-07-14 tracey .It
50 a596b957 2022-07-14 tracey The
51 a596b957 2022-07-14 tracey .Xr httpd.conf 5
52 a596b957 2022-07-14 tracey configuration file must be adjusted to run
53 a596b957 2022-07-14 tracey .Nm
54 a596b957 2022-07-14 tracey as a CGI program with
55 a596b957 2022-07-14 tracey .Xr slowcgi 8 .
56 a596b957 2022-07-14 tracey The
57 a596b957 2022-07-14 tracey .Sx EXAMPLES
58 a596b957 2022-07-14 tracey section below contains an appropriate configuration file sample.
59 a596b957 2022-07-14 tracey .It
60 a596b957 2022-07-14 tracey httpd(8) and slowcgi(8) must be enabled and started:
61 a596b957 2022-07-14 tracey .Bd -literal -offset indent
62 a596b957 2022-07-14 tracey # rcctl enable httpd slowcgi
63 a596b957 2022-07-14 tracey # rcctl start httpd slowcgi
64 a596b957 2022-07-14 tracey .Ed
65 a596b957 2022-07-14 tracey .It
66 a596b957 2022-07-14 tracey Optionally, the run-time behaviour of
67 a596b957 2022-07-14 tracey .Nm
68 a596b957 2022-07-14 tracey can be configured via the
69 a596b957 2022-07-14 tracey .Xr gotweb.conf 5
70 a596b957 2022-07-14 tracey configuration file.
71 a596b957 2022-07-14 tracey .It
72 a596b957 2022-07-14 tracey Git repositories must be created at a suitable location inside the
73 a596b957 2022-07-14 tracey web server's
74 a596b957 2022-07-14 tracey .Xr chroot 2
75 a596b957 2022-07-14 tracey environment.
76 a596b957 2022-07-14 tracey These repositories should
77 a596b957 2022-07-14 tracey .Em not
78 a596b957 2022-07-14 tracey be writable by the user ID of the
79 a596b957 2022-07-14 tracey .Xr httpd 8
80 a596b957 2022-07-14 tracey server.
81 a596b957 2022-07-14 tracey The default location for repositories published by
82 a596b957 2022-07-14 tracey .Nm
83 a596b957 2022-07-14 tracey is
84 a596b957 2022-07-14 tracey .Pa /var/www/got/public .
85 a596b957 2022-07-14 tracey .It
86 a596b957 2022-07-14 tracey Git repositories served by
87 a596b957 2022-07-14 tracey .Nm
88 a596b957 2022-07-14 tracey should be kept up-to-date with a mechanism such as
89 a596b957 2022-07-14 tracey .Cm got fetch ,
90 a596b957 2022-07-14 tracey .Xr git-fetch 1 ,
91 a596b957 2022-07-14 tracey or
92 a596b957 2022-07-14 tracey .Xr rsync 1 ,
93 a596b957 2022-07-14 tracey scheduled by
94 a596b957 2022-07-14 tracey .Xr cron 8 .
95 a596b957 2022-07-14 tracey .El
96 a596b957 2022-07-14 tracey .Sh FILES
97 a596b957 2022-07-14 tracey .Bl -tag -width /var/www/got/public/ -compact
98 a596b957 2022-07-14 tracey .It Pa /var/www/got/public/
99 a596b957 2022-07-14 tracey Default location for Git repositories served by
100 a596b957 2022-07-14 tracey .Nm .
101 a596b957 2022-07-14 tracey This location can be adjusted in the
102 a596b957 2022-07-14 tracey .Xr gotweb.conf 5
103 a596b957 2022-07-14 tracey configuration file.
104 a596b957 2022-07-14 tracey .It Pa /var/www/cgi-bin/gotweb/gotweb
105 a596b957 2022-07-14 tracey The
106 a596b957 2022-07-14 tracey .Nm
107 a596b957 2022-07-14 tracey CGI program, statically linked for use in a
108 a596b957 2022-07-14 tracey .Xr chroot 2
109 a596b957 2022-07-14 tracey environment.
110 a596b957 2022-07-14 tracey .It Pa /var/www/cgi-bin/gotweb/gw_tmpl/
111 a596b957 2022-07-14 tracey Directory for template files used by
112 a596b957 2022-07-14 tracey .Nm .
113 a596b957 2022-07-14 tracey .It Pa /var/www/cgi-bin/gotweb/libexec/
114 a596b957 2022-07-14 tracey Directory containing statically linked
115 a596b957 2022-07-14 tracey .Xr got 1
116 a596b957 2022-07-14 tracey helper programs which are run by
117 a596b957 2022-07-14 tracey .Nm
118 a596b957 2022-07-14 tracey to read Git repositories.
119 a596b957 2022-07-14 tracey .It Pa /var/www/htdocs/gotweb/
120 a596b957 2022-07-14 tracey Directory containing HTML, CSS, and image files used by
121 a596b957 2022-07-14 tracey .Nm .
122 a596b957 2022-07-14 tracey .It Pa /var/www/got/tmp/
123 a596b957 2022-07-14 tracey Directory for temporary files created by
124 a596b957 2022-07-14 tracey .Nm .
125 a596b957 2022-07-14 tracey .El
126 a596b957 2022-07-14 tracey .Sh EXAMPLES
127 a596b957 2022-07-14 tracey Example configuration for httpd.conf:
128 a596b957 2022-07-14 tracey .Bd -literal -offset indent
129 a596b957 2022-07-14 tracey
130 a596b957 2022-07-14 tracey types { include "/usr/share/misc/mime.types" }
131 a596b957 2022-07-14 tracey server "gotweb.example.com" {
132 a596b957 2022-07-14 tracey listen on * port 80
133 a596b957 2022-07-14 tracey root "/htdocs/gotweb"
134 a596b957 2022-07-14 tracey location "/cgi-bin/*" {
135 a596b957 2022-07-14 tracey root "/"
136 a596b957 2022-07-14 tracey fastcgi
137 a596b957 2022-07-14 tracey }
138 a596b957 2022-07-14 tracey location "/*" {
139 a596b957 2022-07-14 tracey directory index "index.html"
140 a596b957 2022-07-14 tracey }
141 a596b957 2022-07-14 tracey }
142 a596b957 2022-07-14 tracey .Ed
143 a596b957 2022-07-14 tracey .Sh SEE ALSO
144 a596b957 2022-07-14 tracey .Xr got 1 ,
145 a596b957 2022-07-14 tracey .Xr kcgi 3 ,
146 a596b957 2022-07-14 tracey .Xr git-repository 5 ,
147 a596b957 2022-07-14 tracey .Xr gotweb.conf 5 ,
148 a596b957 2022-07-14 tracey .Xr httpd 8 ,
149 a596b957 2022-07-14 tracey .Xr slowcgi 8
150 a596b957 2022-07-14 tracey .Sh AUTHORS
151 a596b957 2022-07-14 tracey .An Tracey Emery Aq Mt tracey@traceyemery.net
152 a596b957 2022-07-14 tracey .An Stefan Sperling Aq Mt stsp@openbsd.org