Annotation of cvsweb/cvsweb.conf, Revision 3.48
3.1 knu 1: # -*-perl-*-
2: # Configuration of cvsweb.cgi, the
3: # CGI interface to CVS Repositories.
4: #
5: # (c) 1998-1999 H. Zeller <zeller@think.de>
6: # 1999 H. Nordstrom <hno@hem.passagen.se>
3.30 knu 7: # 2000-2002 A. MUSHA <knu@FreeBSD.org>
3.48 ! scop 8: # 2002-2003 V. Skyttä <scop@FreeBSD.org>
3.1 knu 9: # based on work by Bill Fenner <fenner@FreeBSD.org>
3.28 knu 10: #
3.30 knu 11: # $FreeBSD$
3.27 knu 12: # $Id: cvsweb.conf,v 3.29 2001/07/23 09:14:52 hzeller Exp $
3.28 knu 13: # $Idaemons: /home/cvs/cvsweb/cvsweb.conf,v 3.27 2001/08/01 09:48:39 knu Exp $
3.1 knu 14: #
15: ###
16:
3.19 knu 17: # Set the path for the following commands:
3.47 scop 18: # cvs, rlog, rcsdiff
3.19 knu 19: # gzip (if you enable $allow_compress)
3.47 scop 20: # (g)tar, zip (if you enable $allow_tar)
3.42 scop 21: # cvsgraph (if you enable $allow_graph)
3.19 knu 22: $command_path = '/bin:/usr/bin:/usr/local/bin';
23:
3.47 scop 24: # Search the above directories for each command (prefer gtar over tar).
3.48 ! scop 25: for (qw(cvs rlog rcsdiff gzip gtar zip cvsgraph enscript)) {
3.26 knu 26: $CMD{$_} = search_path($_);
3.19 knu 27: }
3.47 scop 28: $CMD{tar} = delete($CMD{gtar}) if $CMD{gtar};
29: $CMD{tar} ||= search_path('tar');
3.19 knu 30:
3.1 knu 31: ##############
32: # CVS Root
33: ##############
34: # CVSweb can handle several CVS-Repositories
35: # at once. Enter a short symbolic names and the
36: # full path of these repositories here.
37: # NOTE that the symbolic names may not contain
38: # whitespaces.
39: # Note, that cvsweb.cgi currently needs to have physical access
40: # to the CVS repository so :pserver:someone@xyz.com:/data/cvsroot
41: # won't work!
42:
3.17 knu 43: # 'symbolic_name' => ['name_to_display', 'path_to_the_actual_repository']
44: # Listed in the order specified:
45: @CVSrepositories = (
3.26 knu 46: 'local' => ['Local Repository', '/home/cvs'],
47: # 'freebsd' => ['FreeBSD', '/home/ncvs'],
48: # 'openbsd' => ['OpenBSD', '/home/ncvs'],
49: # 'netbsd' => ['NetBSD', '/home/ncvs'],
50: # 'ruby' => ['Ruby', '/var/anoncvs/ruby'],
51: );
3.1 knu 52:
53: # This tree is enabled by default when
54: # you enter the page
3.26 knu 55: $cvstreedefault = $CVSrepositories[2 * 0]; # The first one
3.1 knu 56:
57: ##############
3.15 knu 58: # Bug tracking system options
59: # ("PR" means Problem Report, as in GNATS)
3.1 knu 60: ##############
3.15 knu 61: #@prcategories = qw(
3.26 knu 62: # advocacy
63: # alpha
64: # bin
65: # conf
66: # docs
67: # gnu
68: # i386
69: # kern
70: # misc
71: # pending
72: # ports
73: # sparc
74: #);
75:
3.15 knu 76: #
77: #$prcgi = "http://www.FreeBSD.org/cgi/query-pr.cgi?pr=%s";
78: #
79: #$prkeyword = "PR";
3.1 knu 80:
81: ##############
3.15 knu 82: # Manual gateway
3.8 knu 83: ##############
3.26 knu 84: $mancgi =
85: "http://www.FreeBSD.org/cgi/man.cgi?apropos=0&sektion=%s&query=%s&manpath=FreeBSD+5.0-current&format=html";
3.1 knu 86:
87: ##############
88: # Defaults for UserSettings
89: ##############
90: %DEFAULTVALUE = (
3.26 knu 91:
92: # sortby: File sort order
93: # file Sort by filename
94: # rev Sort by revision number
95: # date Sort by commit date
96: # author Sort by author
97: # log Sort by log message
98:
99: "sortby" => "file",
100:
3.46 scop 101: # ignorecase: ignore case in sorts (filenames, authors, log messages)
102: # 0 Honour case
103: # 1 Ignore case
104:
105: "ignorecase" => "0",
106:
3.26 knu 107: # hideattic: Hide or show files in Attic
108: # 1 Hide files in Attic
109: # 0 Show files in Attic
110:
111: "hideattic" => "1",
112:
113: # logsort: Sort order for CVS logs
114: # date Sort revisions by date
115: # rev Sort revision by revision number
116: # cvs Don't sort them. Same order as CVS/RCS shows them.
117:
118: "logsort" => "date",
119:
120: # f: Default diff format
121: # h Human readable
122: # u Unified diff
123: # c Context diff
124: # s Side by side
125: "f" => "u",
126:
127: # hidecvsroot: Don't show the CVSROOT directory
128: # 1 Hide CVSROOT directory
129: # 0 Show CVSROOT directory
130: "hidecvsroot" => "0",
131:
132: # hidenonreadable: Don't show entries which cannot be read
133: # 1 Hide non-readable entries
134: # 0 Show non-readable entries
135: "hidenonreadable" => "1",
3.1 knu 136: );
137:
138: ##############
139: # some layout stuff
140: ##############
141:
142: # Wanna have a logo on the page ?
3.30 knu 143: $logo = '<p><img src="/icons/apache_pb.gif" alt="Powered by Apache"></p>';
3.1 knu 144:
3.34 scop 145: # The title of the Page on startup. This will be put inside a <h1> tag.
3.1 knu 146: $defaulttitle = "CVS Repository";
147:
3.34 scop 148: # The address is shown on the footer. This will be put inside a <address> tag.
149: $address = '<span style="font-size: smaller">FreeBSD-CVSweb <<a href="mailto:freebsd-cvsweb@FreeBSD.org">freebsd-cvsweb@FreeBSD.org</a>></span>';
3.1 knu 150:
151: $long_intro = <<EOT;
152: <p>
153: This is a WWW interface for CVS Repositories.
154: You can browse the file hierarchy by picking directories
155: (which have slashes after them, <i>e.g.</i>, <b>src/</b>).
156: If you pick a file, you will see the revision history
157: for that file.
158: Selecting a revision number will download that revision of
159: the file. There is a link at each revision to display
160: diffs between that revision and the previous one, and
161: a form at the bottom of the page that allows you to
162: display diffs between arbitrary revisions.
163: </p>
164: <p>
3.33 scop 165: This script has been written by Bill Fenner and improved by Henner Zeller,
166: Henrik Nordström, and Ken Coar, then Akinori MUSHA brought it
3.22 knu 167: back to FreeBSD community and made further improvements; it is covered
3.33 scop 168: by <a
169: href="http://www.opensource.org/licenses/bsd-license.html">The BSD Licence</a>.
3.1 knu 170: </p>
171: <p>
172: If you would like to use this CGI script on your own web server and
3.33 scop 173: CVS tree, download the latest version from <URL:<a
174: href="http://www.FreeBSD.org/projects/cvsweb.html">http://www.FreeBSD.org/projects/cvsweb.html</a>>.
3.1 knu 175: </p>
176: <p>
3.33 scop 177: Feel free to send any patches, suggestions and comments to the FreeBSD-CVSweb
178: mailing list at
179: <<a
180: href="mailto:freebsd-cvsweb\@FreeBSD.org">freebsd-cvsweb\@FreeBSD.org</a>>.
3.1 knu 181: </p>
182: EOT
183:
184: $short_instruction = <<EOT;
185: <p>
186: Click on a directory to enter that directory. Click on a file to display
3.32 scop 187: its revision history and to get a chance to display diffs between revisions.
3.1 knu 188: </p>
189: EOT
190:
3.42 scop 191: # Icons for the web UI. If ICON-URL is empty, the TEXT representation is
192: # used. If you do not want to have a tool tip for an icon, set TEXT empty.
193: # The width and height of the icon allow the browser to correctly display
194: # the table while still loading the icons. If these icons are too large,
195: # check out the "mini" versions in the icons/ directory; they have a
196: # width/height of 16/16.
3.26 knu 197:
3.42 scop 198: my $iconsdir = '/icons';
199:
200: # format: TEXT ICON-URL width height
3.26 knu 201: %ICONS = (
3.42 scop 202: back => [('[BACK]', "$iconsdir/back.gif", 20, 22)],
203: dir => [('[DIR]', "$iconsdir/dir.gif", 20, 22)],
204: file => [('[TXT]', "$iconsdir/text.gif", 20, 22)],
205: graph => [('[GRAPH]', "$iconsdir/minigraph.png", 16, 16)],
3.26 knu 206: );
3.15 knu 207: undef $iconsdir;
3.1 knu 208:
3.43 scop 209: # An URL where to find the CSS.
210: $cssurl = '/css/cvsweb.css';
211:
3.1 knu 212: # the length to which the last logentry should
213: # be truncated when shown in the directory view
214: $shortLogLen = 80;
215:
216: # Show author of last change
217: $show_author = 1;
218:
219: ##############
220: # table view for directories
221: ##############
222:
3.40 scop 223: # Cell padding for directory table
3.1 knu 224: $tablepadding = 2;
225:
226: #
227: # Modules in the repository that should not be displayed, either by default
228: # nor by explicit path specification.
229: #
3.27 knu 230: @HideModules = (
231: # "^my/secret/module",
232: );
233:
234: #
235: # Files matching these pathnames shouldn't be checked out with cvsweb,
236: # since they may contain sensitive information. Simple file name based
237: # filter. Often, the CVSROOT/passwd is exposed and some people tend
238: # to check in their .cvspass, though this is a bad idea. These files
239: # shouldn't be readable by default. Thanks to Damian Gryski to point
240: # this out.
3.36 scop 241: # Note that this affects only files, not directories.
3.27 knu 242: @ForbiddenFiles = (
243: "^CVSROOT/passwd\$", # CVSROOT/passwd should not be cvs add'ed, though
244: "/\\.cvspass\$", # Ditto. Just in case.
245: );
3.1 knu 246:
247: #
248: # Use CVSROOT/CVSROOT/descriptions for describing the directories/modules
249: # See INSTALL section 8
250: #
251: $use_descriptions = 0;
252:
253: ##############
254: # Human Readable Diff
255: ##############
256:
257: # (c) 1998 H. Zeller <zeller@think.de>
258: #
259: # Generates two columns of color encoded
260: # diff; much like xdiff or emacs-ediff mode.
261: #
262: # The diff-stuff is a piece of code I once made for
263: # cvs2html which is under GPL,
264: # see http://www.sslug.dk/cvs2html
265: # (c) 1997/98 Peter Toft <pto@sslug.imm.dtu.dk>
266: #
267: # some parameters to screw:
268: ##
269:
270: # make lines breakable so that the columns do not
271: # exceed the width of the browser
272: $hr_breakable = 1;
273:
3.4 knu 274: # give out function names in diffs
3.1 knu 275: # this just makes sense if we have C-files, otherwise
276: # diff's heuristic doesn't work well ..
277: # ( '-p' option to diff)
3.4 knu 278: $showfunc = 1;
3.1 knu 279:
280: # For each pair of regexps, files that match the first regexp will be diff'ed
281: # with an '-F' option with the second regexp.
3.4 knu 282: %funcline_regexp = (
3.26 knu 283: "\\.(4th|fr)\$" => "\\(^\\|[ \t]\\): ",
284: "\\.rb\$" => "^[\t ]*\\(class\\|module\\|def\\) ",
285: );
3.1 knu 286:
287: # ignore whitespaces for human readable diffs
288: # (indendation and stuff ..)
289: # ( '-w' option to diff)
3.7 knu 290: $hr_ignwhite = 0;
3.1 knu 291:
292: # ignore diffs which are caused by
293: # keyword-substitution like $Id - Stuff
294: # ( '-kk' option to rcsdiff)
295: $hr_ignkeysubst = 1;
296:
297: # the width of the textinput of the
298: # request-diff-form
299: $inputTextSize = 12;
300:
301: ##############
302: # Mime Types
303: ##############
304:
305: # mapping to mimetypes to help
306: # cvsweb to guess the correct mime-type on
307: # checkout; you can use the mime.types from
308: # apache here:
309: $mime_types = '/usr/local/etc/apache/mime.types';
310:
311: # quick mime-type lookup; maps file-suffices to
312: # mime-types for displaying checkouts in the browser.
3.40 scop 313: # Further MimeTypes will be found in the
3.1 knu 314: # file $mime_types (apache style mime.types - file)
315: # - add common mappings here for faster lookup
316: %MTYPES = (
3.26 knu 317: "html" => "text/html",
318: "shtml" => "text/html",
319: "gif" => "image/gif",
320: "jpeg" => "image/jpeg",
321: "jpg" => "image/jpeg",
322: "png" => "image/png",
323: "xpm" => "image/xpm",
324: "*" => "text/plain",
325: );
3.11 knu 326:
327: # Charset for HTML output
3.13 knu 328: $charset = '';
3.26 knu 329:
3.13 knu 330: # e.g.
331: #$charset = $where =~ m,/ru[/_-], ? 'koi8-r'
332: # : $where =~ m,/zh[/_-], ? 'big5'
333: # : $where =~ m,/ja[/_-], ? 'x-euc-jp'
334: # : $where =~ m,/ko[/_-], ? 'x-euc-kr'
335: # : 'iso-8859-1';
3.29 knu 336:
337: # Output filter
338: $output_filter = '';
339:
340: # e.g.
341: ## unify/convert Japanese code into EUC-JP
342: #$output_filter= '/usr/local/bin/nkf -e';
3.1 knu 343:
344: ##############
345: # Misc
346: ##############
347: # allow annotation of files
348: # this requires rw-access to the
3.12 knu 349: # CVSROOT/history file (if you have one)
350: # and rw-access to the subdirectory to
351: # place the lock so you maybe don't want it
3.1 knu 352: $allow_annotate = 1;
353:
354: # allow pretty-printed version of files
355: $allow_markup = 1;
356:
3.31 knu 357: # allow extra hlink formatting (such as PR xrefs) in logs
358: $allow_log_extra = 1; # default: enabled
359:
360: # allow extra hlink formatting (such as PR xrefs) in directories
361: $allow_dir_extra = 1;
362:
363: # allow extra hlink formatting in source code/formatted diff views
364: $allow_source_extra = 1;
365:
3.1 knu 366: # allow compression with gzip
367: # of output if the Browser accepts
368: # it (HTTP_ACCEPT_ENCODING=gzip)
369: # [make sure to have gzip in the path]
3.16 knu 370: $allow_compress = 0;
3.1 knu 371:
372: # Make use of javascript functions.
373: # This way you can select one of your CVSroot
374: # without pressing 'Go' (.. if you do have more
375: # than one CVSROOT defined)
376: $use_java_script = 1;
377:
378: # open Download-Links in another window
379: $open_extern_window = 1;
380:
381: # The size of this extern window; this size option
382: # needs use_java_script to be defined
383: # just comment them if you don't want to have a fixed
384: # size
385: #$extern_window_width = 600;
386: #$extern_window_height = 440;
387:
388: # Edit Options
389: # Enable form to edit your options (hideattic,sortbydate)
390: # this isn't necessary if you've $dirtable defined 'cause
391: # this allows editing of all your options more intuitive
392: $edit_option_form = (not $dirtable);
393:
394: # If you have files which automatically refers to other files
395: # (such as HTML) then this allows you to browse the checked
396: # out files as if outside CVS.
397: $checkout_magic = 1;
398:
399: # Show last changelog message for sub directories
400: # The current implementation makes many assumptions and may show the
401: # incorrect file at some times. The main assumption is that the last
402: # modified file has the newest filedate. But some CVS operations
403: # touches the file without even when a new version is't checked in,
404: # and TAG based browsing essientially puts this out of order, unless
405: # the last checkin was on the same tag as you are viewing.
406: # Enable this if you like the feature, but don't rely on correct results.
407: $show_subdir_lastmod = 0;
408:
409: # Show CVS log when viewing file contents
410: $show_log_in_markup = 1;
411:
3.13 knu 412: # Preformat when viewing file contents. This should be turned off
413: # when you have files in the repository that are in a multibyte
414: # encoding which uses HTML special characters ([<>&"]) as part of a
415: # multi-byte character. (such as iso-2022-jp, ShiftJIS, etc.)
416: # Otherwise those files will get screwed up in markup.
417: $preformat_in_markup = '';
418:
3.1 knu 419: # Tabstop used to expand tabs in colored diffs. If undefined then
420: # tabs are always expanded to 8 spaces.
421: $tabstop = 8;
422:
423: # if you wish to display absolute times in your local timezone,
424: # then define mytz and fill in the strings for your standard and
425: # daylight time. Note that you must also make sure the system
426: # timezone is correctly set.
427: # @mytz=("EST", "EDT");
428:
429: # cvsweb is friendly to caches by indicating a suitable
430: # last-modified timestamp. Doing this uses slightly more
431: # CPU so you might want to disable it if you have a slow
432: # server
433: $use_moddate = 1;
434:
3.12 knu 435: # Allows downloading a tarball of the current directory if set.
436: # Bear in mind that this allows downloading a tarball of your entire
437: # repository, which can take a lot of time and disk space to create!
438: # If you enable this, you may need to make sure that cvsweb can write to
439: # CVSROOT/val-tags, due to a bug in cvs.
440: $allow_tar = '';
3.42 scop 441:
442: # Allows graphical representations of file logs with CvsGraph if set.
443: $allow_cvsgraph = $CMD{cvsgraph} ? 1 : 0;
444:
3.45 scop 445: # Maximum number of filenames to pass to rlog(1) in one command.
446: # If you see "Failed to spawn GNU rlog" errors with directories containing
447: # lots of files, experiment by setting this to different values and see if
448: # the error still occurs. A good value to start from would be eg. 200.
449: # Just comment this out if you're not bitten by the problem.
450: #$file_list_len = 200;
451:
3.42 scop 452: # Path to the CvsGraph configuration file. Only used if $allow_cvsgraph
453: # is true. Leave this empty or comment it out to make cvsgraph(1) use its
454: # default configuration file.
455: #$cvsgraph_config = "/etc/cvsgraph.conf";
3.13 knu 456:
457: # Options to pass to tar(1).
3.15 knu 458: @tar_options = qw();
3.26 knu 459:
3.13 knu 460: # e.g. @tar_options = qw(--ignore-failed-read);
461: # GNU tar has some useful options against unexpected errors.
3.47 scop 462: # Other useful options include "--owner=0" and "--group=0", see
463: # the tar(1) (or gtar(1)) manpage for details.
3.13 knu 464:
3.19 knu 465: # Options to pass to gzip(1) when compressing a tarball to download.
466: @gzip_options = qw();
3.26 knu 467:
3.19 knu 468: # e.g. @gzip_options = qw(-3);
3.25 knu 469: # Try lower compression level than 6 (default) if you want faster
470: # compression, or higher, for better compression.
471:
472: # Options to pass to zip(1) when compressing a zip archive to download.
3.47 scop 473: @zip_options = qw(-q);
3.26 knu 474:
3.25 knu 475: # e.g. @zip_options = qw(-3);
3.19 knu 476: # Try lower compression level than 6 (default) if you want faster
3.21 knu 477: # compression, or higher, for better compression.
3.19 knu 478:
3.13 knu 479: # Options to pass to cvs(1).
3.37 scop 480: # For cvs versions prior to 1.11, the '-l' option doesn't work; If you want
481: # working checkouts with an older cvs version, you'll have to make sure that
482: # the cvsweb user can read and write to CVSROOT/history.
3.35 scop 483: @cvs_options = qw(-lf);
3.19 knu 484:
3.47 scop 485: push @cvs_options, '-R' if ($^O eq 'freebsd' || $^O eq 'openbsd');
486: push @cvs_options, '-u' if ($^O eq 'netbsd');
3.26 knu 487:
3.19 knu 488: # Only FreeBSD's and OpenBSD's cvs(1) supports -R (read only access
489: # mode) option, which considerably speeds up checkouts over NFS.
3.38 scop 490: # A similar effect is provided by -u on NetBSD.
3.12 knu 491:
3.39 scop 492: # Options to pass to the 'cvs annotate' command, usually the normal
493: # @cvs_options are good enough here.
494: @annotate_options = @cvs_options;
495:
496: # To make annotate work against a read only repository, add -n, e.g.:
497: # @annotate_options = (@cvs_options, '-n');
3.48 ! scop 498:
! 499:
! 500: # Enables syntax highlighting using GNU Enscript if set.
! 501: # You will need GNU Enscript version 1.6.2 or newer for this to work.
! 502: #$allow_enscript = $CMD{enscript} ? 1 : 0;
! 503:
! 504: # Options to pass to enscript(1).
! 505: # Do not set the -q, --language, -o and --highlight options here.
! 506: # Most useful styles are probably emacs, emacs_verbose and msvc.
! 507: @enscript_options = qw(--style=emacs --color=1);
! 508:
! 509: # Enscript highlight rule to filename regex mappings. The set of useful
! 510: # mappings depends on what highlight rules the system has installed.
! 511: %enscript_types =
! 512: (
! 513: 'ada' => qr/\.ad(s|b|a)$/o,
! 514: 'asm' => qr/\.[Ss]$/o,
! 515: 'awk' => qr/\.awk$/o,
! 516: 'bash' => qr/\.(bash(_profile|rc)|inputrc)$/o,
! 517: 'c' => qr/\.(c|h)$/o,
! 518: 'changelog' => qr/^changelog$/io,
! 519: 'cpp' => qr/\.(c\+\+|C|H|cpp|cc|cxx)$/o,
! 520: 'csh' => qr/\.(csh(rc)?|log(in|out)|history)$/o,
! 521: 'elisp' => qr/\.e(l|macs)$/o,
! 522: 'fortran' => qr/\.[fF]$/o,
! 523: 'haskell' => qr/\.(l?h|l?g)s$/o,
! 524: 'html' => qr/\.x?html?$/o,
! 525: 'idl' => qr/\.idl$/o,
! 526: 'inf' => qr/\.inf$/io,
! 527: 'java' => qr/\.java$/o,
! 528: 'javascript' => qr/\.js$/o,
! 529: 'ksh' => qr/\.ksh$/o,
! 530: 'm4' => qr/\.m4$/o,
! 531: 'makefile' => qr/((GNU)?[Mm]akefile.*|\.(ma?ke?|am)$)/o,
! 532: 'matlab' => qr/\.m$/o,
! 533: 'nroff' => qr/\.man$/o,
! 534: 'pascal' => qr/\.p(as|p)?$/io,
! 535: 'perl' => qr/\.p(m|(er?)l)$/io,
! 536: 'postscript' => qr/\.e?ps$/io,
! 537: 'python' => qr/\.py$/o,
! 538: 'rfc' => qr/\b((rfc|draft)\..*\.txt)$/o,
! 539: 'scheme' => qr/\.(scm|scheme)$/o,
! 540: 'sh' => qr/\.sh$/o,
! 541: 'skill' => qr/\.il$/o,
! 542: 'sql' => qr/\.sql$/o,
! 543: 'states' => qr/\.st$/o,
! 544: 'synopsys' => qr/\.s(cr|yn(th)?)$/o,
! 545: 'tcl' => qr/\.tcl$/o,
! 546: 'tcsh' => qr/\.tcshrc$/o,
! 547: 'tex' => qr/\.tex$/o,
! 548: 'vba' => qr/\.vba$/o,
! 549: 'verilog' => qr/\.(v|vh)$/o,
! 550: 'vhdl' => qr/\.vhdl?$/o,
! 551: 'vrml' => qr/\.wrl$/o,
! 552: 'wmlscript' => qr/\.wmls(cript)?$/o,
! 553: 'zsh' => qr/\.(zsh(env|rc)|z(profile|log(in|out)))$/o,
! 554: );
3.39 scop 555:
3.12 knu 556: 1;
3.26 knu 557:
3.1 knu 558: #EOF
CVSweb