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