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