Blob


1 .\"
2 .\" Copyright (c) 2023 Stefan Sperling
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .Dd $Mdocdate$
17 .Dt GITWRAPPER 1
18 .Os
19 .Sh NAME
20 .Nm gitwrapper
21 .Nd invoke an appropriate Git repository server
22 .Sh SYNOPSIS
23 .Nm Fl c Sq Cm git-receive-pack Ar repository-path
24 .Nm Fl c Sq Cm git-upload-pack Ar repository-path
25 .Sh DESCRIPTION
26 At one time, the only Git repository server software easily available
27 was built into
28 .Xr git-upload-pack 1
29 and
30 .Xr git-receive-pack 1
31 which are part of the
32 .Xr git 1
33 suite.
34 As a result of this, most Git client implementations had the path and
35 calling conventions expected by
36 .Xr git 1
37 compiled in.
38 .Pp
39 Times have changed, however.
40 On a modern system, the administrator may wish to use one of several
41 available Git repository servers, such as
42 .Xr gotd 8 .
43 .Pp
44 It would be difficult to modify all Git client software typically available
45 on a system, so most of the authors of alternative Git servers have written
46 their programs so that they use the same calling conventions as
47 .Xr git-upload-pack 1
48 and
49 .Xr git-receive-pack 1
50 and may be put into place in their stead.
51 .Pp
52 Although having drop-in replacements for
53 .Xr git-upload-pack 1
54 and
55 .Xr git-receive-pack 1
56 helps in installing alternative Git servers, it essentially makes the
57 configuration of the system depend on hard installing new programs in
58 .Pa /usr .
59 This leads to configuration problems for many administrators, since they may
60 wish to install a new Git server without altering the system provided
61 .Pa /usr .
62 (This may be, for example, to avoid having upgrade problems when a new
63 version of the system is installed over the old.)
64 They may also have a shared
65 .Pa /usr
66 among several machines, and may wish to avoid placing implicit
67 configuration information in a read-only
68 .Pa /usr .
69 .Pp
70 The
71 .Nm
72 program is designed to replace
73 .Xr git-upload-pack 1
74 and
75 .Xr git-receive-pack 1
76 and to invoke an appropriate Git server based on configuration information
77 placed in
78 .Xr gotd.conf 5 .
79 This permits the administrator to configure which Git server is to be
80 invoked on the system at run-time.
81 Git repositories which are listed in
82 .Xr gotd.conf 5
83 and exist on the filesystem will be served by
84 .Xr gotsh 1 .
85 Any other Git repositories will be served by
86 .Xr git-upload-pack 1
87 and
88 .Xr git-receive-pack 1 .
89 .Sh ENVIRONMENT
90 .Bl -tag -width GOTD_CONF_PATH
91 .It Ev GOTD_CONF_PATH
92 Set the path to the configuration file for
93 .Xr gotd 8 .
94 If not specified, the default path
95 .Pa /etc/gotd.conf
96 will be used.
97 .El
98 .Sh FILES
99 Configuration for
100 .Xr gotd 8
101 is kept in
102 .Pa /etc/gotd.conf .
103 .Pp
104 .Pa git-upload-pack
105 and
106 .Pa git-receive-pack
107 are typically set up as a symlink to
108 .Nm
109 which is not usually invoked on its own.
110 .Sh SEE ALSO
111 .Xr got 1 ,
112 .Xr gotd.conf 5 ,
113 .Xr gotd 8 ,
114 .Xr mailwrapper 8
115 .Sh AUTHORS
116 .An Stefan Sperling Aq Mt stsp@openbsd.org
117 .Sh BUGS
118 The entire reason this program exists is a crock.
119 Instead, a command for invoking a Git server should be standardized or
120 the Git protocol should be changed to make the path to the program
121 discoverable by Git clients.