Annotation of cvsweb/cvsweb.conf, Revision 4.4
4.2 schwarze 1: # -*- perl -*-
4.4 ! schwarze 2: # $Id: cvsweb.conf,v 4.3 2019/11/10 14:05:18 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: #
18:
3.19 knu 19: # Set the path for the following commands:
3.47 scop 20: # cvs, rlog, rcsdiff
3.19 knu 21: # gzip (if you enable $allow_compress)
3.47 scop 22: # (g)tar, zip (if you enable $allow_tar)
3.42 scop 23: # cvsgraph (if you enable $allow_graph)
3.71 scop 24: # enscript (if you enable $allow_enscript)
3.58 scop 25: #
3.73 scop 26: @command_path = qw(/bin /usr/bin /usr/local/bin);
3.19 knu 27:
3.47 scop 28: # Search the above directories for each command (prefer gtar over tar).
3.58 scop 29: #
3.71 scop 30: for (qw(cvs rlog rcsdiff gzip gtar zip cvsgraph enscript)) {
3.26 knu 31: $CMD{$_} = search_path($_);
3.19 knu 32: }
3.47 scop 33: $CMD{tar} = delete($CMD{gtar}) if $CMD{gtar};
34: $CMD{tar} ||= search_path('tar');
3.19 knu 35:
3.53 scop 36: # CVS roots
37: #
38: # CVSweb can handle several CVS repositories at once. Enter short (internal)
39: # symbolic repository names, their names in the UI and the actual locations
40: # here. The repositories will be listed in the order they're specified here.
41: #
3.93 scop 42: # Obviously, CVSweb will need read access to these repository dirs. If you
43: # receive an error that no valid CVS roots were found, double-check the file
44: # permissions and any other attributes your system may have for the repository
45: # directories, such as SELinux file contexts.
46: #
3.76 scop 47: # CVSweb will also load per-cvsroot configuration files if they exist.
48: # The symbolic_name (see below) of the CVS root will be concatenated into the
49: # name of the main (this) configuration file along with a hyphen, and that
50: # file will be loaded for that particular CVS root. For examples, see
51: # cvsweb.conf-* in the CVSweb distribution.
52: #
3.53 scop 53: # Note that only local repositories are currently supported. Things like
54: # :pserver:someone@xyz.com:/data/cvsroot won't work.
55: #
56: # 'symbolic_name' => ['Name to display', '/path/to/cvsroot']
57: #
3.17 knu 58: @CVSrepositories = (
4.4 ! schwarze 59: 'local' => ['Local Repository', '/cvs'],
3.26 knu 60: );
3.1 knu 61:
3.53 scop 62: # The default CVS root. Note that @CVSrepositories is list, not a hash,
63: # so you'll want to use 2 * 0-based-index-number here; or set this directly
64: # to the default's symbolic name. Unless specified, the first valid one in
65: # @CVSrepositories is used as the default.
66: #
67: # For example:
68: #
69: #$cvstreedefault = $CVSrepositories[2 * 0];
70: #$cvstreedefault = 'local';
3.1 knu 71:
3.88 scop 72: # Mirror sites. The keys will be used as link texts, and the values are
73: # URLs pointing to the corresponding mirrors.
74: #
75: #%MIRRORS = (
76: # 'Other location' => 'http://192.168.0.1/cgi-bin/cvsweb.cgi/',
77: # 'Yet another one' => 'http://192.168.0.2/cgi-bin/cvsweb.cgi/',
78: #);
79:
3.76 scop 80: # Bug tracking system linking options ("PR" means Problem Report, as in GNATS)
3.92 scop 81: # This will be done only for views for which $allow_*_extra below is true.
3.76 scop 82: #
3.15 knu 83: #@prcategories = qw(
3.26 knu 84: # advocacy
85: # alpha
86: # bin
87: # conf
88: # docs
89: # gnu
90: # i386
91: # kern
92: # misc
93: # pending
94: # ports
95: # sparc
96: #);
3.15 knu 97: #$prcgi = "http://www.FreeBSD.org/cgi/query-pr.cgi?pr=%s";
98: #$prkeyword = "PR";
3.1 knu 99:
3.92 scop 100: # Manual gateway linking. This will be done only for views for which
101: # $allow_*_extra below is true.
3.76 scop 102: #
3.26 knu 103: $mancgi =
3.98 ceri 104: "http://www.FreeBSD.org/cgi/man.cgi?apropos=0&sektion=%s&query=%s&manpath=FreeBSD+7.0-current&format=html";
3.1 knu 105:
3.90 scop 106: # Defaults for user definable options.
3.76 scop 107: #
3.1 knu 108: %DEFAULTVALUE = (
3.26 knu 109:
3.76 scop 110: # sortby: File sort order
111: # file Sort by filename
112: # rev Sort by revision number
113: # date Sort by commit date
114: # author Sort by author
115: # log Sort by log message
116: "sortby" => "file",
117:
118: # ignorecase: Ignore case in sorts (filenames, authors, log messages)
119: # 0 Honor case
120: # 1 Ignore case
121: "ignorecase" => "0",
122:
123: # hideattic: Hide or show files in Attic
124: # 1 Hide files in Attic
125: # 0 Show files in Attic
126: "hideattic" => "1",
127:
128: # logsort: Sort order for CVS logs
129: # date Sort revisions by date
130: # rev Sort revision by revision number
131: # cvs Don't sort them. Same order as CVS/RCS shows them.
132: "logsort" => "date",
133:
134: # f: Default diff format
135: # h Human readable
136: # u Unified diff
137: # c Context diff
138: # uc Unified diff, enscript colored (falls back to "u" w/o enscript)
139: # cc Context diff, enscript colored (falls back to "c" w/o enscript)
140: "f" => "u",
141:
3.90 scop 142: # hidecvsroot: Don't show the CVSROOT directory. Note that this is
143: # just the default for a user settable option (like others in this
144: # %DEFAULTVALUE hash); it won't really prevent access to CVSROOT.
145: # See @ForbiddenFiles for that.
146: # 1 Do not include the top-level CVSROOT directory in dir listings
147: # 0 Treat the top-level CVSROOT directory just like all other dirs
3.76 scop 148: "hidecvsroot" => "0",
149:
3.90 scop 150: # hidenonreadable: Don't show files and directories that cannot be read
151: # in directory listings.
3.76 scop 152: # 1 Hide non-readable entries
153: # 0 Show non-readable entries
154: "hidenonreadable" => "1",
155:
156: # ln: Show line numbers in HTMLized views
157: # 1 Show line numbers
158: # 0 Don't show line numbers
159: "ln" => "0",
3.1 knu 160: );
161:
3.76 scop 162: #
163: # Layout options (see also the included CSS file)
164: #
3.1 knu 165:
166: # Wanna have a logo on the page ?
3.58 scop 167: #
3.79 scop 168: #$logo = '<p><img src="/icons/apache_pb.gif" alt="Powered by Apache" /></p>';
3.1 knu 169:
3.79 scop 170: # The title of the Page on startup. This will be put inside <h1> and <title>
171: # tags, and HTML escaped.
3.58 scop 172: #
3.1 knu 173: $defaulttitle = "CVS Repository";
174:
3.34 scop 175: # The address is shown on the footer. This will be put inside a <address> tag.
3.58 scop 176: #
4.1 schwarze 177: $address = '<span style="font-size: smaller">FreeBSD-CVSweb</span>';
3.1 knu 178:
179: $long_intro = <<EOT;
180: <p>
3.81 scop 181: This is a WWW interface for CVS repositories.
3.67 scop 182: You can browse the file hierarchy by following directory links (which
183: have slashes after them, e.g. <code>src/</code>).
184: If you follow a link to a file, you will see its revision history.
185: Following a link labeled with a revision number will display that
186: revision of the file. In the revision history view, there is a link
187: near each revision to display diffs between that revision and the
188: previous one, and a form at the bottom of the page that allows you to
3.1 knu 189: display diffs between arbitrary revisions.
3.67 scop 190: </p><p>
3.33 scop 191: This script has been written by Bill Fenner and improved by Henner Zeller,
192: Henrik Nordström, and Ken Coar, then Akinori MUSHA brought it
3.22 knu 193: back to FreeBSD community and made further improvements; it is covered
3.33 scop 194: by <a
3.97 scop 195: href="http://www.opensource.org/licenses/bsd-license.html">The BSD License</a>.
3.67 scop 196: </p><p>
3.1 knu 197: If you would like to use this CGI script on your own web server and
3.67 scop 198: CVS tree, download the latest version from <<a
3.33 scop 199: href="http://www.FreeBSD.org/projects/cvsweb.html">http://www.FreeBSD.org/projects/cvsweb.html</a>>.
3.1 knu 200: </p>
201: EOT
202:
203: $short_instruction = <<EOT;
204: <p>
205: Click on a directory to enter that directory. Click on a file to display
3.32 scop 206: its revision history and to get a chance to display diffs between revisions.
3.1 knu 207: </p>
208: EOT
209:
3.42 scop 210: # Icons for the web UI. If ICON-URL is empty, the TEXT representation is
211: # used. If you do not want to have a tool tip for an icon, set TEXT empty.
212: # The width and height of the icon allow the browser to correctly display
213: # the table while still loading the icons. If these icons are too large,
214: # check out the "mini" versions in the icons/ directory; they have a
215: # width/height of 16/16.
3.58 scop 216: #
3.42 scop 217: my $iconsdir = '/icons';
218:
3.51 scop 219: # format: TEXT ICON-URL width height
3.26 knu 220: %ICONS = (
3.51 scop 221: back => [('[BACK]', "$iconsdir/back.gif", 20, 22)],
222: dir => [('[DIR]', "$iconsdir/dir.gif", 20, 22)],
223: file => [('[TXT]', "$iconsdir/text.gif", 20, 22)],
3.87 scop 224: binfile => [('[BIN]', "$iconsdir/binary.gif", 20, 22)],
3.51 scop 225: graph => [('[GRAPH]', "$iconsdir/minigraph.png", 16, 16)],
3.26 knu 226: );
3.15 knu 227: undef $iconsdir;
3.1 knu 228:
3.43 scop 229: # An URL where to find the CSS.
3.58 scop 230: #
3.43 scop 231: $cssurl = '/css/cvsweb.css';
232:
3.76 scop 233: # The length to which the last log entry should be truncated when shown
234: # in the directory view.
3.58 scop 235: #
3.1 knu 236: $shortLogLen = 80;
237:
3.76 scop 238: # Show author of last change?
3.58 scop 239: #
3.1 knu 240: $show_author = 1;
241:
3.76 scop 242: # Cell padding for directory table.
3.58 scop 243: #
3.1 knu 244: $tablepadding = 2;
245:
3.91 scop 246: # Regular expressions for files and directories which should be hidden.
3.75 scop 247: # Each regexp is compared against a path relative to a CVS root, after
248: # stripping the trailing ",v" if present. Matching files and directories
249: # are not displayed.
3.58 scop 250: #
3.27 knu 251: @ForbiddenFiles = (
3.74 scop 252: qr|^CVSROOT/+passwd$|o, # CVSROOT/passwd should not be 'cvs add'ed though.
253: qr|/\.cvspass$|o, # Ditto. Just in case.
3.75 scop 254: #qr|^my/+secret/+dir|o,
3.27 knu 255: );
3.1 knu 256:
3.77 scop 257: # Use CVSROOT/descriptions for describing the directories/modules?
3.69 scop 258: # See INSTALL, section 9.
3.1 knu 259: #
260: $use_descriptions = 0;
261:
3.76 scop 262: #
263: # Human readable diff.
264: #
3.1 knu 265: # (c) 1998 H. Zeller <zeller@think.de>
266: #
3.76 scop 267: # Generates two columns of color encoded diff; much like xdiff or GNU Emacs'
268: # ediff-mode.
3.1 knu 269: #
3.76 scop 270: # The diff-stuff is a piece of code I once made for cvs2html which is under
271: # GPL, see http://www.sslug.dk/cvs2html
3.1 knu 272: # (c) 1997/98 Peter Toft <pto@sslug.imm.dtu.dk>
273:
3.76 scop 274: # Make lines breakable so that the columns do not exceed the width of the
275: # browser?
3.58 scop 276: #
3.1 knu 277: $hr_breakable = 1;
278:
3.80 scop 279: # Print function names in diffs (unified and context only).
280: # See the -p option in the diff(1) man page.
3.58 scop 281: #
3.4 knu 282: $showfunc = 1;
3.1 knu 283:
3.76 scop 284: # Ignore whitespace in human readable diffs? ('-w' option to diff)
3.58 scop 285: #
3.7 knu 286: $hr_ignwhite = 0;
3.1 knu 287:
3.76 scop 288: # Ignore diffs which are caused by keyword substitution, $Id and friends?
289: # ('-kk' option to rcsdiff)
3.58 scop 290: #
3.1 knu 291: $hr_ignkeysubst = 1;
292:
3.76 scop 293: # The width of the textinput of the "request diff" form.
3.58 scop 294: #
3.1 knu 295: $inputTextSize = 12;
3.70 scop 296:
297: # Custom per MIME type diff tools, used for comparing binary files such as
298: # spreadsheets, images etc. Each key is a MIME type in lowercase.
299: # Each value is an array ref of available diff tools for that type, each of
300: # which is a hash ref with values (mandatory where default not listed):
301: # name: the name to show in the UI for this diff type
302: # cmd: full path to executable
303: # args: arguments as an array ref (not string!, defaults to no arguments)
304: # type: output MIME type (defaults to text/plain)
305: #
306: %DIFF_COMMANDS = (
307: #'text/xml' => [
308: # { name => 'XMLdiff',
309: # cmd => $CMD{xmldiff},
310: # },
311: # { name => 'XMLdiff (XUpdate)',
312: # cmd => $CMD{xmldiff},
313: # args => [ qw(-x) ],
314: # type => 'text/xml',
315: # },
316: #],
317: );
3.1 knu 318:
3.76 scop 319: #
320: # Mime types
321: #
3.1 knu 322:
3.52 scop 323: # The MIME type lookup works like this:
324: # 1) Look up from %MTYPES below with the file name extension (suffix).
325: # 2) If not found, use the MIME::Types(3) module if it's available.
326: # 3) If not found, lookup from the $mime_types file (see below).
327: # 4) If not found, try %MTYPES{'*'}.
328: # 5) If not found, use 'application/octet-stream' if the file's keyword
329: # substitution mode is b (ie. the file was checked in as binary to CVS),
330: # 'text/plain' otherwise.
3.1 knu 331:
3.52 scop 332: # Quick MIME type lookup; maps filename extensions to MIME types.
333: # Add common mappings here for fast lookup. You can also use this
334: # to override MIME::Types(3) or the $mime_types file (see below).
3.58 scop 335: #
3.1 knu 336: %MTYPES = (
3.26 knu 337: "html" => "text/html",
338: "shtml" => "text/html",
339: "gif" => "image/gif",
340: "jpeg" => "image/jpeg",
341: "jpg" => "image/jpeg",
342: "png" => "image/png",
343: "xpm" => "image/xpm",
3.52 scop 344: # "*" => "text/plain",
3.26 knu 345: );
3.52 scop 346:
347: # The traditional mime.types file, eg. the one from Apache is fine.
348: # See above where this gets used.
3.58 scop 349: #
4.3 schwarze 350: $mime_types = '/conf/mime.types';
3.11 knu 351:
3.56 scop 352: # Charset appended to the Content-Type HTTP header for text/* MIME types.
353: # Note that the web server may default to some charset which may take effect
354: # if you leave this parameter empty or unset.
3.69 scop 355: # For Apache, see also the AddDefaultCharset directive.
3.56 scop 356: #
3.13 knu 357: $charset = '';
3.26 knu 358:
3.13 knu 359: # e.g.
360: #$charset = $where =~ m,/ru[/_-], ? 'koi8-r'
361: # : $where =~ m,/zh[/_-], ? 'big5'
362: # : $where =~ m,/ja[/_-], ? 'x-euc-jp'
363: # : $where =~ m,/ko[/_-], ? 'x-euc-kr'
364: # : 'iso-8859-1';
3.29 knu 365:
366: # Output filter
3.58 scop 367: #
3.29 knu 368: $output_filter = '';
369:
370: # e.g.
371: ## unify/convert Japanese code into EUC-JP
372: #$output_filter= '/usr/local/bin/nkf -e';
3.1 knu 373:
374: ##############
375: # Misc
376: ##############
3.58 scop 377:
3.76 scop 378: # Allow annotation of files? See also @annotate_options below.
3.58 scop 379: #
3.1 knu 380: $allow_annotate = 1;
381:
3.96 scop 382: # Allow HTMLized versions of files?
3.58 scop 383: #
3.1 knu 384: $allow_markup = 1;
385:
3.96 scop 386: # Allow CVSweb to create mailto: links from email addresses in various
387: # HTMLized views? Default: yes.
388: #
389: #$allow_mailtos = 0;
390:
3.92 scop 391: ## Extra hyperlinking means hyperlinks to bug tracking systems and manual page
392: ## gateways, see $prcgi and $mancgi and related options above.
393:
3.76 scop 394: # Allow extra hyperlinking (such as PR cross-references) in logs?
3.92 scop 395: # Default: yes.
3.58 scop 396: #
3.92 scop 397: #$allow_log_extra = 0;
3.31 knu 398:
3.92 scop 399: # Allow extra hyperlinking in directory views?
3.58 scop 400: #
3.31 knu 401: $allow_dir_extra = 1;
402:
3.76 scop 403: # Allow extra hyperlinking in source code/formatted diff views?
3.58 scop 404: #
3.31 knu 405: $allow_source_extra = 1;
406:
3.76 scop 407: # Allow compression with gzip in general? Note that this also requires
408: # that the browser supports it, and will be disabled on the fly when necessary.
3.58 scop 409: #
3.92 scop 410: #$allow_compress = 1;
3.1 knu 411:
3.76 scop 412: # Use JavaScript in the UI?
3.58 scop 413: #
3.1 knu 414: $use_java_script = 1;
415:
3.76 scop 416: # Show a form for setting options in the directory view?
3.58 scop 417: #
418: $edit_option_form = 1;
3.1 knu 419:
3.77 scop 420: # Show last changelog message for subdirectories?
3.1 knu 421: # The current implementation makes many assumptions and may show the
422: # incorrect file at some times. The main assumption is that the last
423: # modified file has the newest filedate. But some CVS operations
3.97 scop 424: # touch the file even when a new version isn't checked in, and TAG
425: # based browsing essentially puts this out of order unless the last
426: # checkin was on the same tag as you are viewing.
3.1 knu 427: # Enable this if you like the feature, but don't rely on correct results.
3.58 scop 428: #
3.92 scop 429: #$show_subdir_lastmod = 1;
3.1 knu 430:
3.76 scop 431: # Show CVS log when viewing file contents?
3.58 scop 432: #
3.1 knu 433: $show_log_in_markup = 1;
434:
3.77 scop 435: # Preformat when viewing file contents? This should be turned off
3.13 knu 436: # when you have files in the repository that are in a multibyte
437: # encoding which uses HTML special characters ([<>&"]) as part of a
3.97 scop 438: # multibyte character. (such as iso-2022-jp, ShiftJIS, etc.)
3.13 knu 439: # Otherwise those files will get screwed up in markup.
3.58 scop 440: #
3.59 scop 441: # Note: enscript(1) highlighting is preferred over the built-in preformatting,
442: # ie. this has no effect if $allow_enscript is true and enscript can highlight
443: # the file.
444: #
3.92 scop 445: #$preformat_in_markup = 1;
3.13 knu 446:
3.92 scop 447: # Default tab width used to expand tabs to spaces in various HTMLized views.
448: # Note that CVSweb scans the first few lines of sources for some common editor
449: # directives controlling the tab width. It uses the value from them if found,
450: # falling back to the value of $tabstop if not. Default: 8.
3.58 scop 451: #
3.92 scop 452: #$tabstop = 4;
3.1 knu 453:
3.58 scop 454: # If you wish to display absolute times in your local timezone,
3.82 scop 455: # then define @mytz and fill in the strings for your standard and
3.1 knu 456: # daylight time. Note that you must also make sure the system
457: # timezone is correctly set.
3.58 scop 458: #
459: #@mytz=("EST", "EDT");
3.1 knu 460:
3.82 scop 461: # CVSweb is friendly to caches by sending the HTTP Last-Modified
462: # header corresponding to the sent content. In the case of a
463: # checkout, this may require running rcslog on the file solely for the
464: # purpose of retrieving the timestamp to be sent. If you have a slow
3.92 scop 465: # server, you may want to turn this off for a small performance gain.
3.58 scop 466: #
3.1 knu 467: $use_moddate = 1;
468:
3.45 scop 469: # Maximum number of filenames to pass to rlog(1) in one command.
470: # If you see "Failed to spawn GNU rlog" errors with directories containing
471: # lots of files, experiment by setting this to different values and see if
472: # the error still occurs. A good value to start from would be eg. 200.
473: # Just comment this out if you're not bitten by the problem.
3.57 scop 474: #
3.45 scop 475: #$file_list_len = 200;
476:
3.79 scop 477: # Allow graphical representations of file revisions and branches with CvsGraph?
3.57 scop 478: #
479: $allow_cvsgraph = $CMD{cvsgraph} ? 1 : 0;
480:
3.42 scop 481: # Path to the CvsGraph configuration file. Only used if $allow_cvsgraph
482: # is true. Leave this empty or comment it out to make cvsgraph(1) use its
3.84 scop 483: # default configuration file. Note that CVSweb will override some of the
484: # settings in the configuration file with command line options, see
485: # doGraph() and doGraphView() in cvsweb.cgi for details.
3.57 scop 486: #
3.42 scop 487: #$cvsgraph_config = "/etc/cvsgraph.conf";
3.13 knu 488:
3.86 scop 489: # URL to the CVSHistory script. This should be absolute (but does not need
490: # to include the host and port if the script is on the same server as
491: # CVSweb).
492: #$cvshistory_url = "/cgi-bin/cvshistory.cgi";
493:
3.57 scop 494: # Whether to allow downloading a tarball or a zip of the current directory.
495: # While downloading of the entire repository is disallowed, depending on
496: # the directory this may take a lot of time and disk space. For some CVS
3.69 scop 497: # versions, the user account running CVSweb needs write access to
3.57 scop 498: # CVSROOT/val-tags. See also the tar, gzip and zip options below.
499: #
500: #$allow_tar = (($CMD{tar} && $CMD{gzip}) || $CMD{zip}) ? 1 : 0;
501:
3.13 knu 502: # Options to pass to tar(1).
3.57 scop 503: # For example: @tar_options = qw(--ignore-failed-read);
504: # GNU tar has some useful options against unexpected errors.
505: # Other useful options include "--owner=0" and "--group=0", see
506: # the tar(1) (or gtar(1)) manpage for details.
507: #
3.15 knu 508: @tar_options = qw();
3.26 knu 509:
3.19 knu 510: # Options to pass to gzip(1) when compressing a tarball to download.
3.57 scop 511: # For example: @gzip_options = qw(-3);
512: # Try lower compression level than 6 (default) if you want faster
513: # compression, or higher for better compression.
514: #
3.19 knu 515: @gzip_options = qw();
3.26 knu 516:
3.25 knu 517: # Options to pass to zip(1) when compressing a zip archive to download.
3.57 scop 518: # For example: @zip_options = qw(-3);
519: # Try lower compression level than 6 (default) if you want faster
520: # compression, or higher for better compression.
521: #
3.47 scop 522: @zip_options = qw(-q);
3.26 knu 523:
3.13 knu 524: # Options to pass to cvs(1).
3.63 scop 525: # For cvs versions 1.11 to 1.11.6 (broken in < 1.11, removed in 1.11.7), you
526: # can use the '-l' option to prevent cvs from writing to the history file.
527: # For other cvs versions, either suppress history logging by using the
3.69 scop 528: # LogHistory parameter in CVSROOT/config or make sure that the CVSweb user
3.63 scop 529: # can read and write to CVSROOT/history.
3.61 scop 530: # FreeBSD's and OpenBSD's cvs(1) has long since supported -R (read only access
531: # mode) option, which considerably speeds up checkouts over NFS. For other
3.62 scop 532: # platforms, the -R option and the CVSREADONLYFS environment variable are
533: # available in cvs >= 1.12.1. A similar effect is provided by -u on NetBSD.
3.57 scop 534: #
3.85 scop 535: @cvs_options = qw(-f);
3.47 scop 536: push @cvs_options, '-R' if ($^O eq 'freebsd' || $^O eq 'openbsd');
537: push @cvs_options, '-u' if ($^O eq 'netbsd');
3.62 scop 538: # Only affects cvs >= 1.12.1, but doesn't hurt older ones.
539: $ENV{CVSREADONLYFS} = 1 unless exists($ENV{CVSREADONLYFS});
3.26 knu 540:
3.39 scop 541: # Options to pass to the 'cvs annotate' command, usually the normal
542: # @cvs_options are good enough here.
3.57 scop 543: # To make annotate work against a read only repository, add -n, ie.:
544: # @annotate_options = (@cvs_options, '-n');
545: #
3.39 scop 546: @annotate_options = @cvs_options;
547:
3.54 scop 548: # Options to pass to rcsdiff(1).
549: # Probably the only useful one here is -q (suppress diagnostic output).
3.57 scop 550: #
3.54 scop 551: @rcsdiff_options = qw(-q);
3.48 scop 552:
553: # Enables syntax highlighting using GNU Enscript if set.
3.64 scop 554: # You will need GNU Enscript version 1.6.3 or newer for this to work.
3.57 scop 555: #
3.48 scop 556: #$allow_enscript = $CMD{enscript} ? 1 : 0;
557:
558: # Options to pass to enscript(1).
3.54 scop 559: # Do not set the -q, --language, -o or --highlight options here.
3.48 scop 560: # Most useful styles are probably emacs, emacs_verbose and msvc.
3.57 scop 561: #
3.48 scop 562: @enscript_options = qw(--style=emacs --color=1);
563:
564: # Enscript highlight rule to filename regex mappings. The set of useful
565: # mappings depends on what highlight rules the system has installed.
3.57 scop 566: #
3.48 scop 567: %enscript_types =
568: (
569: 'ada' => qr/\.ad(s|b|a)$/o,
570: 'asm' => qr/\.[Ss]$/o,
571: 'awk' => qr/\.awk$/o,
572: 'bash' => qr/\.(bash(_profile|rc)|inputrc)$/o,
573: 'c' => qr/\.(c|h)$/o,
574: 'changelog' => qr/^changelog$/io,
575: 'cpp' => qr/\.(c\+\+|C|H|cpp|cc|cxx)$/o,
576: 'csh' => qr/\.(csh(rc)?|log(in|out)|history)$/o,
577: 'elisp' => qr/\.e(l|macs)$/o,
578: 'fortran' => qr/\.[fF]$/o,
579: 'haskell' => qr/\.(l?h|l?g)s$/o,
580: 'html' => qr/\.x?html?$/o,
581: 'idl' => qr/\.idl$/o,
582: 'inf' => qr/\.inf$/io,
583: 'java' => qr/\.java$/o,
3.83 scop 584: 'javascript' => qr/\.(js|pac)$/o,
3.48 scop 585: 'ksh' => qr/\.ksh$/o,
586: 'm4' => qr/\.m4$/o,
3.83 scop 587: 'makefile' => qr/(GNU)?[Mm]akefile(?!\.PL\b)|\.(ma?ke?|am)$/o,
3.48 scop 588: 'matlab' => qr/\.m$/o,
589: 'nroff' => qr/\.man$/o,
590: 'pascal' => qr/\.p(as|p)?$/io,
3.83 scop 591: 'perl' => qr/\.p(m|(er)?l)$/io,
3.48 scop 592: 'postscript' => qr/\.e?ps$/io,
593: 'python' => qr/\.py$/o,
594: 'rfc' => qr/\b((rfc|draft)\..*\.txt)$/o,
595: 'scheme' => qr/\.(scm|scheme)$/o,
596: 'sh' => qr/\.sh$/o,
597: 'skill' => qr/\.il$/o,
598: 'sql' => qr/\.sql$/o,
599: 'states' => qr/\.st$/o,
600: 'synopsys' => qr/\.s(cr|yn(th)?)$/o,
601: 'tcl' => qr/\.tcl$/o,
602: 'tcsh' => qr/\.tcshrc$/o,
603: 'tex' => qr/\.tex$/o,
604: 'vba' => qr/\.vba$/o,
605: 'verilog' => qr/\.(v|vh)$/o,
606: 'vhdl' => qr/\.vhdl?$/o,
607: 'vrml' => qr/\.wrl$/o,
608: 'wmlscript' => qr/\.wmls(cript)?$/o,
609: 'zsh' => qr/\.(zsh(env|rc)|z(profile|log(in|out)))$/o,
610: );
3.39 scop 611:
3.89 scop 612: # Troubleshooting: in case of problems, setting this to 1 will cause more
613: # error output into your web server error log. Under normal operation,
614: # this should be set to 0 or commented out.
615: #
616: #$DEBUG = 1;
617:
3.94 scop 618: # Enable this to let CVSweb load extra configuration files from the "conf.d"
619: # subdirectory of the directory this file is located in. This enables site
620: # specific configuration without having to modify this "master" configuration
621: # file (except for enabling this functionality below :)
622: #
623: if (0) {
624: my $confdir = catdir(dirname(__FILE__), 'conf.d');
625: if (opendir(CONFD, $confdir)) {
626: my @files = sort(map(catfile($confdir, $_), readdir(CONFD)));
627: close(CONFD);
628: for my $conffile (grep(-f && -r _, @files)) {
629: ($conffile) = ($conffile =~ /(.+\.conf)$/) or next;
630: do "$conffile" or config_error($conffile, $@);
631: }
632: }
633: }
634:
3.12 knu 635: 1;
3.26 knu 636:
3.57 scop 637: # EOF
CVSweb