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