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 as found in Git's
90 .Pa libexec
91 directory, which is
92 .Pa /usr/local/libexec/git/
93 by default on
94 .Ox .
95 .Sh ENVIRONMENT
96 .Bl -tag -width GOTD_CONF_PATH
97 .It Ev GOTD_CONF_PATH
98 Set the path to the configuration file for
99 .Xr gotd 8 .
100 If not specified, the default path
101 .Pa /etc/gotd.conf
102 will be used.
103 .El
104 .Sh FILES
105 Configuration for
106 .Xr gotd 8
107 is kept in
108 .Pa /etc/gotd.conf .
109 .Pp
110 .Pa git-upload-pack
111 and
112 .Pa git-receive-pack
113 are typically set up as a symlink to
114 .Nm
115 which is not usually invoked on its own.
116 .Sh SEE ALSO
117 .Xr got 1 ,
118 .Xr gotd.conf 5 ,
119 .Xr gotd 8 ,
120 .Xr mailwrapper 8
121 .Sh AUTHORS
122 .An Stefan Sperling Aq Mt stsp@openbsd.org
123 .Sh BUGS
124 The entire reason this program exists is a crock.
125 Instead, a command for invoking a Git server should be standardized or
126 the Git protocol should be changed to make the path to the program
127 discoverable by Git clients.