Annotation of cvsweb/cvsweb.conf, Revision 4.18
4.2 schwarze 1: # -*- perl -*-
4.18 ! schwarze 2: # $Id: cvsweb.conf,v 4.17 2019/11/29 13:39:50 schwarze Exp $
4.2 schwarze 3: # $doc: cvsweb.conf,v 1.38 2006/01/19 19:53:38 ceri
4: # $knu: cvsweb.conf,v 1.97 2005/06/19 09:13:50 scop
5: #
3.76 scop 6: # Configuration of cvsweb.cgi, a web interface to CVS repositories.
3.1 knu 7: #
8: # (c) 1998-1999 H. Zeller <zeller@think.de>
9: # 1999 H. Nordstrom <hno@hem.passagen.se>
3.30 knu 10: # 2000-2002 A. MUSHA <knu@FreeBSD.org>
3.95 scop 11: # 2002-2005 V. Skyttä <scop@FreeBSD.org>
3.1 knu 12: # based on work by Bill Fenner <fenner@FreeBSD.org>
13:
3.92 scop 14: #
15: # Unless otherwise noted, all boolean parameters here default to off
16: # when no value for them has been explicitly set.
17: #
3.19 knu 18:
3.53 scop 19: # CVS roots
20: #
21: # CVSweb can handle several CVS repositories at once. Enter short (internal)
22: # symbolic repository names, their names in the UI and the actual locations
23: # here. The repositories will be listed in the order they're specified here.
24: #
3.93 scop 25: # Obviously, CVSweb will need read access to these repository dirs. If you
26: # receive an error that no valid CVS roots were found, double-check the file
27: # permissions and any other attributes your system may have for the repository
28: # directories, such as SELinux file contexts.
29: #
3.76 scop 30: # CVSweb will also load per-cvsroot configuration files if they exist.
31: # The symbolic_name (see below) of the CVS root will be concatenated into the
32: # name of the main (this) configuration file along with a hyphen, and that
33: # file will be loaded for that particular CVS root. For examples, see
34: # cvsweb.conf-* in the CVSweb distribution.
35: #
3.53 scop 36: # Note that only local repositories are currently supported. Things like
37: # :pserver:someone@xyz.com:/data/cvsroot won't work.
38: #
39: # 'symbolic_name' => ['Name to display', '/path/to/cvsroot']
40: #
3.17 knu 41: @CVSrepositories = (
4.4 schwarze 42: 'local' => ['Local Repository', '/cvs'],
3.26 knu 43: );
3.88 scop 44:
3.92 scop 45: # Manual gateway linking. This will be done only for views for which
46: # $allow_*_extra below is true.
3.76 scop 47: #
3.26 knu 48: $mancgi =
3.98 ceri 49: "http://www.FreeBSD.org/cgi/man.cgi?apropos=0&sektion=%s&query=%s&manpath=FreeBSD+7.0-current&format=html";
3.1 knu 50:
3.90 scop 51: # Defaults for user definable options.
3.76 scop 52: #
3.1 knu 53: %DEFAULTVALUE = (
3.26 knu 54:
3.76 scop 55: # sortby: File sort order
56: # file Sort by filename
57: # rev Sort by revision number
58: # date Sort by commit date
59: # author Sort by author
60: # log Sort by log message
61: "sortby" => "file",
62:
63: # ignorecase: Ignore case in sorts (filenames, authors, log messages)
64: # 0 Honor case
65: # 1 Ignore case
66: "ignorecase" => "0",
67:
68: # hideattic: Hide or show files in Attic
69: # 1 Hide files in Attic
70: # 0 Show files in Attic
71: "hideattic" => "1",
72:
73: # logsort: Sort order for CVS logs
74: # date Sort revisions by date
75: # rev Sort revision by revision number
76: # cvs Don't sort them. Same order as CVS/RCS shows them.
77: "logsort" => "date",
78:
79: # f: Default diff format
80: # h Human readable
81: # u Unified diff
82: # c Context diff
83: "f" => "u",
84:
3.90 scop 85: # hidecvsroot: Don't show the CVSROOT directory. Note that this is
86: # just the default for a user settable option (like others in this
87: # %DEFAULTVALUE hash); it won't really prevent access to CVSROOT.
88: # See @ForbiddenFiles for that.
89: # 1 Do not include the top-level CVSROOT directory in dir listings
90: # 0 Treat the top-level CVSROOT directory just like all other dirs
3.76 scop 91: "hidecvsroot" => "0",
92:
3.90 scop 93: # hidenonreadable: Don't show files and directories that cannot be read
94: # in directory listings.
3.76 scop 95: # 1 Hide non-readable entries
96: # 0 Show non-readable entries
97: "hidenonreadable" => "1",
98:
99: # ln: Show line numbers in HTMLized views
100: # 1 Show line numbers
101: # 0 Don't show line numbers
102: "ln" => "0",
3.1 knu 103: );
104:
3.76 scop 105: #
106: # Layout options (see also the included CSS file)
107: #
3.1 knu 108:
109: # Wanna have a logo on the page ?
3.58 scop 110: #
3.79 scop 111: #$logo = '<p><img src="/icons/apache_pb.gif" alt="Powered by Apache" /></p>';
3.1 knu 112:
3.79 scop 113: # The title of the Page on startup. This will be put inside <h1> and <title>
114: # tags, and HTML escaped.
3.58 scop 115: #
3.1 knu 116: $defaulttitle = "CVS Repository";
117:
3.34 scop 118: # The address is shown on the footer. This will be put inside a <address> tag.
3.58 scop 119: #
4.5 schwarze 120: $address = '<span style="font-size: smaller">CVSweb</span>';
3.1 knu 121:
122: $long_intro = <<EOT;
123: <p>
3.81 scop 124: This is a WWW interface for CVS repositories.
3.67 scop 125: You can browse the file hierarchy by following directory links (which
126: have slashes after them, e.g. <code>src/</code>).
127: If you follow a link to a file, you will see its revision history.
128: Following a link labeled with a revision number will display that
129: revision of the file. In the revision history view, there is a link
130: near each revision to display diffs between that revision and the
131: previous one, and a form at the bottom of the page that allows you to
3.1 knu 132: display diffs between arbitrary revisions.
3.67 scop 133: </p><p>
3.33 scop 134: This script has been written by Bill Fenner and improved by Henner Zeller,
135: Henrik Nordström, and Ken Coar, then Akinori MUSHA brought it
3.22 knu 136: back to FreeBSD community and made further improvements; it is covered
3.33 scop 137: by <a
3.97 scop 138: href="http://www.opensource.org/licenses/bsd-license.html">The BSD License</a>.
3.67 scop 139: </p><p>
3.1 knu 140: If you would like to use this CGI script on your own web server and
4.5 schwarze 141: CVS tree, download the latest version from
142: <<a href="http://cvsweb.bsd.lv/">http://cvsweb.bsd.lv/</a>>.
3.1 knu 143: </p>
144: EOT
145:
146: $short_instruction = <<EOT;
147: <p>
148: Click on a directory to enter that directory. Click on a file to display
3.32 scop 149: its revision history and to get a chance to display diffs between revisions.
3.1 knu 150: </p>
151: EOT
152:
3.42 scop 153: # Icons for the web UI. If ICON-URL is empty, the TEXT representation is
154: # used. If you do not want to have a tool tip for an icon, set TEXT empty.
155: # The width and height of the icon allow the browser to correctly display
156: # the table while still loading the icons. If these icons are too large,
157: # check out the "mini" versions in the icons/ directory; they have a
158: # width/height of 16/16.
3.58 scop 159: #
3.42 scop 160: my $iconsdir = '/icons';
161:
3.51 scop 162: # format: TEXT ICON-URL width height
3.26 knu 163: %ICONS = (
3.51 scop 164: back => [('[BACK]', "$iconsdir/back.gif", 20, 22)],
165: dir => [('[DIR]', "$iconsdir/dir.gif", 20, 22)],
166: file => [('[TXT]', "$iconsdir/text.gif", 20, 22)],
3.87 scop 167: binfile => [('[BIN]', "$iconsdir/binary.gif", 20, 22)],
3.26 knu 168: );
3.15 knu 169: undef $iconsdir;
3.1 knu 170:
3.43 scop 171: # An URL where to find the CSS.
3.58 scop 172: #
3.43 scop 173: $cssurl = '/css/cvsweb.css';
174:
3.76 scop 175: # The length to which the last log entry should be truncated when shown
176: # in the directory view.
3.58 scop 177: #
3.1 knu 178: $shortLogLen = 80;
179:
3.76 scop 180: # Show author of last change?
3.58 scop 181: #
3.1 knu 182: $show_author = 1;
183:
3.76 scop 184: # Cell padding for directory table.
3.58 scop 185: #
3.1 knu 186: $tablepadding = 2;
187:
3.91 scop 188: # Regular expressions for files and directories which should be hidden.
3.75 scop 189: # Each regexp is compared against a path relative to a CVS root, after
190: # stripping the trailing ",v" if present. Matching files and directories
191: # are not displayed.
3.58 scop 192: #
3.27 knu 193: @ForbiddenFiles = (
3.74 scop 194: qr|^CVSROOT/+passwd$|o, # CVSROOT/passwd should not be 'cvs add'ed though.
195: qr|/\.cvspass$|o, # Ditto. Just in case.
3.75 scop 196: #qr|^my/+secret/+dir|o,
3.27 knu 197: );
3.1 knu 198:
3.77 scop 199: # Use CVSROOT/descriptions for describing the directories/modules?
3.69 scop 200: # See INSTALL, section 9.
3.1 knu 201: #
202: $use_descriptions = 0;
203:
3.76 scop 204: #
205: # Human readable diff.
206: #
3.1 knu 207: # (c) 1998 H. Zeller <zeller@think.de>
208: #
3.76 scop 209: # Generates two columns of color encoded diff; much like xdiff or GNU Emacs'
210: # ediff-mode.
3.1 knu 211: #
3.76 scop 212: # The diff-stuff is a piece of code I once made for cvs2html which is under
213: # GPL, see http://www.sslug.dk/cvs2html
3.1 knu 214: # (c) 1997/98 Peter Toft <pto@sslug.imm.dtu.dk>
215:
3.76 scop 216: # Make lines breakable so that the columns do not exceed the width of the
217: # browser?
3.58 scop 218: #
3.1 knu 219: $hr_breakable = 1;
220:
3.80 scop 221: # Print function names in diffs (unified and context only).
222: # See the -p option in the diff(1) man page.
3.58 scop 223: #
3.4 knu 224: $showfunc = 1;
3.1 knu 225:
3.76 scop 226: # Ignore whitespace in human readable diffs? ('-w' option to diff)
3.58 scop 227: #
3.7 knu 228: $hr_ignwhite = 0;
3.1 knu 229:
3.76 scop 230: # Ignore diffs which are caused by keyword substitution, $Id and friends?
231: # ('-kk' option to rcsdiff)
3.58 scop 232: #
3.1 knu 233: $hr_ignkeysubst = 1;
234:
3.76 scop 235: # The width of the textinput of the "request diff" form.
3.58 scop 236: #
3.1 knu 237: $inputTextSize = 12;
3.70 scop 238:
239: # Custom per MIME type diff tools, used for comparing binary files such as
240: # spreadsheets, images etc. Each key is a MIME type in lowercase.
241: # Each value is an array ref of available diff tools for that type, each of
242: # which is a hash ref with values (mandatory where default not listed):
243: # name: the name to show in the UI for this diff type
244: # cmd: full path to executable
245: # args: arguments as an array ref (not string!, defaults to no arguments)
246: # type: output MIME type (defaults to text/plain)
247: #
248: %DIFF_COMMANDS = (
249: #'text/xml' => [
250: # { name => 'XMLdiff',
251: # cmd => $CMD{xmldiff},
252: # },
253: # { name => 'XMLdiff (XUpdate)',
254: # cmd => $CMD{xmldiff},
255: # args => [ qw(-x) ],
256: # type => 'text/xml',
257: # },
258: #],
259: );
3.1 knu 260:
3.76 scop 261: #
262: # Mime types
263: #
3.1 knu 264:
3.52 scop 265: # The MIME type lookup works like this:
266: # 1) Look up from %MTYPES below with the file name extension (suffix).
267: # 2) If not found, use the MIME::Types(3) module if it's available.
268: # 3) If not found, lookup from the $mime_types file (see below).
269: # 4) If not found, try %MTYPES{'*'}.
270: # 5) If not found, use 'application/octet-stream' if the file's keyword
271: # substitution mode is b (ie. the file was checked in as binary to CVS),
272: # 'text/plain' otherwise.
3.1 knu 273:
3.52 scop 274: # Quick MIME type lookup; maps filename extensions to MIME types.
275: # Add common mappings here for fast lookup. You can also use this
276: # to override MIME::Types(3) or the $mime_types file (see below).
3.58 scop 277: #
3.1 knu 278: %MTYPES = (
3.26 knu 279: "html" => "text/html",
280: "shtml" => "text/html",
281: "gif" => "image/gif",
282: "jpeg" => "image/jpeg",
283: "jpg" => "image/jpeg",
284: "png" => "image/png",
285: "xpm" => "image/xpm",
3.52 scop 286: # "*" => "text/plain",
3.26 knu 287: );
3.52 scop 288:
289: # The traditional mime.types file, eg. the one from Apache is fine.
290: # See above where this gets used.
3.58 scop 291: #
4.3 schwarze 292: $mime_types = '/conf/mime.types';
3.11 knu 293:
3.56 scop 294: # Charset appended to the Content-Type HTTP header for text/* MIME types.
295: # Note that the web server may default to some charset which may take effect
296: # if you leave this parameter empty or unset.
3.69 scop 297: # For Apache, see also the AddDefaultCharset directive.
3.56 scop 298: #
3.13 knu 299: $charset = '';
3.26 knu 300:
3.13 knu 301: # e.g.
302: #$charset = $where =~ m,/ru[/_-], ? 'koi8-r'
303: # : $where =~ m,/zh[/_-], ? 'big5'
304: # : $where =~ m,/ja[/_-], ? 'x-euc-jp'
305: # : $where =~ m,/ko[/_-], ? 'x-euc-kr'
306: # : 'iso-8859-1';
3.29 knu 307:
308: # Output filter
3.58 scop 309: #
3.29 knu 310: $output_filter = '';
311:
312: # e.g.
313: ## unify/convert Japanese code into EUC-JP
314: #$output_filter= '/usr/local/bin/nkf -e';
3.1 knu 315:
316: ##############
317: # Misc
318: ##############
3.58 scop 319:
3.76 scop 320: # Allow annotation of files? See also @annotate_options below.
3.58 scop 321: #
3.1 knu 322: $allow_annotate = 1;
323:
3.96 scop 324: # Allow HTMLized versions of files?
3.58 scop 325: #
3.1 knu 326: $allow_markup = 1;
327:
3.96 scop 328: # Allow CVSweb to create mailto: links from email addresses in various
329: # HTMLized views? Default: yes.
330: #
331: #$allow_mailtos = 0;
332:
4.8 schwarze 333: ## Extra hyperlinking means hyperlinks to manual page
334: ## gateways, see $mancgi above.
3.92 scop 335:
3.76 scop 336: # Allow extra hyperlinking (such as PR cross-references) in logs?
3.92 scop 337: # Default: yes.
3.58 scop 338: #
3.92 scop 339: #$allow_log_extra = 0;
3.31 knu 340:
3.92 scop 341: # Allow extra hyperlinking in directory views?
3.58 scop 342: #
3.31 knu 343: $allow_dir_extra = 1;
344:
3.76 scop 345: # Allow extra hyperlinking in source code/formatted diff views?
3.58 scop 346: #
3.31 knu 347: $allow_source_extra = 1;
348:
3.76 scop 349: # Allow compression with gzip in general? Note that this also requires
350: # that the browser supports it, and will be disabled on the fly when necessary.
3.58 scop 351: #
3.92 scop 352: #$allow_compress = 1;
3.1 knu 353:
3.76 scop 354: # Show a form for setting options in the directory view?
3.58 scop 355: #
356: $edit_option_form = 1;
3.1 knu 357:
3.77 scop 358: # Show last changelog message for subdirectories?
3.1 knu 359: # The current implementation makes many assumptions and may show the
360: # incorrect file at some times. The main assumption is that the last
361: # modified file has the newest filedate. But some CVS operations
3.97 scop 362: # touch the file even when a new version isn't checked in, and TAG
363: # based browsing essentially puts this out of order unless the last
364: # checkin was on the same tag as you are viewing.
3.1 knu 365: # Enable this if you like the feature, but don't rely on correct results.
3.58 scop 366: #
3.92 scop 367: #$show_subdir_lastmod = 1;
3.1 knu 368:
3.76 scop 369: # Show CVS log when viewing file contents?
3.58 scop 370: #
3.1 knu 371: $show_log_in_markup = 1;
372:
3.77 scop 373: # Preformat when viewing file contents? This should be turned off
3.13 knu 374: # when you have files in the repository that are in a multibyte
375: # encoding which uses HTML special characters ([<>&"]) as part of a
3.97 scop 376: # multibyte character. (such as iso-2022-jp, ShiftJIS, etc.)
3.13 knu 377: # Otherwise those files will get screwed up in markup.
3.58 scop 378: #
3.92 scop 379: #$preformat_in_markup = 1;
3.13 knu 380:
3.92 scop 381: # Default tab width used to expand tabs to spaces in various HTMLized views.
382: # Note that CVSweb scans the first few lines of sources for some common editor
383: # directives controlling the tab width. It uses the value from them if found,
384: # falling back to the value of $tabstop if not. Default: 8.
3.58 scop 385: #
3.92 scop 386: #$tabstop = 4;
3.1 knu 387:
3.82 scop 388: # CVSweb is friendly to caches by sending the HTTP Last-Modified
389: # header corresponding to the sent content. In the case of a
390: # checkout, this may require running rcslog on the file solely for the
391: # purpose of retrieving the timestamp to be sent. If you have a slow
3.92 scop 392: # server, you may want to turn this off for a small performance gain.
3.58 scop 393: #
3.1 knu 394: $use_moddate = 1;
395:
3.45 scop 396: # Maximum number of filenames to pass to rlog(1) in one command.
4.16 schwarze 397: # If you see "Failed to spawn rlog" errors with directories containing
3.45 scop 398: # lots of files, experiment by setting this to different values and see if
399: # the error still occurs. A good value to start from would be eg. 200.
400: # Just comment this out if you're not bitten by the problem.
3.57 scop 401: #
3.45 scop 402: #$file_list_len = 200;
3.86 scop 403:
4.13 schwarze 404: # Whether to allow downloading a tarball of the current directory.
3.57 scop 405: # While downloading of the entire repository is disallowed, depending on
406: # the directory this may take a lot of time and disk space. For some CVS
3.69 scop 407: # versions, the user account running CVSweb needs write access to
4.18 ! schwarze 408: # CVSROOT/val-tags. See also the tar options below.
3.57 scop 409: #
4.18 ! schwarze 410: $allow_tar = 0;
3.57 scop 411:
3.13 knu 412: # Options to pass to tar(1).
3.57 scop 413: # For example: @tar_options = qw(--ignore-failed-read);
414: # GNU tar has some useful options against unexpected errors.
415: # Other useful options include "--owner=0" and "--group=0", see
416: # the tar(1) (or gtar(1)) manpage for details.
417: #
3.15 knu 418: @tar_options = qw();
3.26 knu 419:
3.13 knu 420: # Options to pass to cvs(1).
3.63 scop 421: # For cvs versions 1.11 to 1.11.6 (broken in < 1.11, removed in 1.11.7), you
422: # can use the '-l' option to prevent cvs from writing to the history file.
423: # For other cvs versions, either suppress history logging by using the
3.69 scop 424: # LogHistory parameter in CVSROOT/config or make sure that the CVSweb user
3.63 scop 425: # can read and write to CVSROOT/history.
3.61 scop 426: # FreeBSD's and OpenBSD's cvs(1) has long since supported -R (read only access
427: # mode) option, which considerably speeds up checkouts over NFS. For other
3.62 scop 428: # platforms, the -R option and the CVSREADONLYFS environment variable are
429: # available in cvs >= 1.12.1. A similar effect is provided by -u on NetBSD.
3.57 scop 430: #
3.85 scop 431: @cvs_options = qw(-f);
3.47 scop 432: push @cvs_options, '-R' if ($^O eq 'freebsd' || $^O eq 'openbsd');
433: push @cvs_options, '-u' if ($^O eq 'netbsd');
3.62 scop 434: # Only affects cvs >= 1.12.1, but doesn't hurt older ones.
435: $ENV{CVSREADONLYFS} = 1 unless exists($ENV{CVSREADONLYFS});
3.26 knu 436:
3.39 scop 437: # Options to pass to the 'cvs annotate' command, usually the normal
438: # @cvs_options are good enough here.
3.57 scop 439: # To make annotate work against a read only repository, add -n, ie.:
440: # @annotate_options = (@cvs_options, '-n');
441: #
3.39 scop 442: @annotate_options = @cvs_options;
443:
3.54 scop 444: # Options to pass to rcsdiff(1).
445: # Probably the only useful one here is -q (suppress diagnostic output).
3.57 scop 446: #
3.54 scop 447: @rcsdiff_options = qw(-q);
3.39 scop 448:
3.89 scop 449: # Troubleshooting: in case of problems, setting this to 1 will cause more
450: # error output into your web server error log. Under normal operation,
451: # this should be set to 0 or commented out.
452: #
453: #$DEBUG = 1;
3.94 scop 454:
3.12 knu 455: 1;
3.26 knu 456:
3.57 scop 457: # EOF
CVSweb