cvsserver: Add asciidoc documentation for new database backend configuration
Documents the new configuration variables and the variable substitution mechanism. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Frank Lichtenheld committed
Apr 7, 2007 at 16:58 UTC
febe7dcc088020366bbc601a219a1d6c30ced0c2
1 file changed
+83
-4
Documentation/git-cvsserver.txt
+83
-4
@@ -65,11 +65,12 @@ env variable, you can rename git-cvsserver to cvs.
65
66
------
67
Note: you need to ensure each user that is going to invoke git-cvsserver has
68
-write access to the log file and to the git repository. When offering anon
69
-access via pserver, this means that the nobody user should have write access
70
-to at least the sqlite database at the root of the repository.
68
+write access to the log file and to the database (see
69
+<<dbbackend,Database Backend>>. If you want to offer write access over
70
+SSH, the users of course also need write access to the git repository itself.
71
72
-Both configuration variables can also be overriden for a specific method of
72
+[[configaccessmethod]]
73
+All configuration variables can also be overriden for a specific method of
74
access. Valid method names are "ext" (for SSH access) and "pserver". The
75
following example configuration would disable pserver access while still
76
allowing access over SSH.
@@ -105,6 +106,84 @@ Example:
106
cvs co -d project-master master
107
------
108
109
+[[dbbackend]]
110
+Database Backend
111
+----------------
112
+
113
+git-cvsserver uses one database per git head (i.e. CVS module) to
114
+store information about the repository for faster access. The
115
+database doesn't contain any persitent data and can be completly
116
+regenerated from the git repository at any time. The database
117
+needs to be updated (i.e. written to) after every commit. That
118
+means that even if you offer only read access (e.g. by using
119
+the pserver method), git-cvsserver should have write access to
120
+the database to work reliably (otherwise you need to make sure
121
+that the database if up-to-date all the time git-cvsserver is run).
122
+
123
+By default it uses SQLite databases in the git directory, named
124
+`gitcvs.<module_name>.sqlite`. Note that the SQLite backend creates
125
+temporary files in the same directory as the database file on
126
+write so it might not be enough to grant the users using
127
+git-cvsserver write access to the database file without granting
128
+them also write access to the directory.
129
+
130
+You can configure the database backend with the following
131
+configuration variables:
132
+
133
+Configuring database backend
134
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135
+
136
+git-cvsserver uses the Perl DBI module. Please also read
137
+its documentation if changing these variables, especially
138
+about `DBI->connect()`.
139
+
140
+gitcvs.dbname::
141
+ Database name. The exact meaning depends on the
142
+ used database driver, for SQLite this is a filename.
143
+ Supports variable substitution (see below). May
144
+ not contain semicolons (`;`).
145
+ Default: '%Ggitcvs.%m.sqlite'
146
+
147
+gitcvs.dbdriver::
148
+ Used DBI driver. You can specify any available driver
149
+ for this here, but it might not work. cvsserver is tested
150
+ with 'DBD::SQLite', reported to work with
151
+ 'DBD::Pg', and reported *not* to work with 'DBD::mysql'.
152
+ Please regard this as an experimental feature. May not
153
+ contain double colons (`:`).
154
+ Default: 'SQLite'
155
+
156
+gitcvs.dbuser::
157
+ Database user. Only useful if setting `dbdriver`, since
158
+ SQLite has no concept of database users. Supports variable
159
+ substitution (see below).
160
+
161
+gitcvs.dbpass::
162
+ Database password. Only useful if setting `dbdriver`, since
163
+ SQLite has no concept of database passwords.
164
+
165
+All variables can also be set per access method, see <<configaccessmethod,above>>.
166
+
167
+Variable substitution
168
+^^^^^^^^^^^^^^^^^^^^^
169
+In `dbdriver` and `dbuser` you can use the following variables:
170
+
171
+%G::
172
+ git directory name
173
+%g::
174
+ git directory name, where all characters except for
175
+ alpha-numeric ones, `.`, and `-` are replaced with
176
+ `_` (this should make it easier to use the directory
177
+ name in a filename if wanted)
178
+%m::
179
+ CVS module/git head name
180
+%a::
181
+ access method (one of "ext" or "pserver")
182
+%u::
183
+ Name of the user running git-cvsserver.
184
+ If no name can be determined, the
185
+ numeric uid is used.
186
+
187
Eclipse CVS Client Notes
188
------------------------
189