[BACK]Return to cvsweb.conf CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / cvsweb

Annotation of cvsweb/cvsweb.conf, Revision 4.3

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

CVSweb