Annotation of cvsweb/cvsweb.conf, Revision 3.26
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.22 knu 7: # 2000-2001 A. MUSHA <knu@FreeBSD.org>
3.1 knu 8: # based on work by Bill Fenner <fenner@FreeBSD.org>
3.22 knu 9: # $Id: cvsweb.conf,v 3.27 2000/07/27 10:16:39 kcoar Exp $
3.26 ! knu 10: # $Idaemons: /home/cvs/cvsweb/cvsweb.conf,v 3.25 2001/07/06 09:44:28 knu Exp $
3.1 knu 11: #
12: ###
13:
3.19 knu 14: # Set the path for the following commands:
15: # uname, cvs, rlog, rcsdiff
16: # gzip (if you enable $allow_compress)
3.25 knu 17: # tar, rm, zip (if you enable $allow_tar)
3.19 knu 18: $command_path = '/bin:/usr/bin:/usr/local/bin';
19:
20: # Search the above directories for each command
3.25 knu 21: for (qw(uname cvs rlog rcsdiff gzip tar rm zip)) {
3.26 ! knu 22: $CMD{$_} = search_path($_);
3.19 knu 23: }
24:
25: # The name of the operating system implementation
3.21 knu 26: chomp($uname = `$CMD{uname}`);
3.19 knu 27:
3.1 knu 28: ##############
29: # CVS Root
30: ##############
31: # CVSweb can handle several CVS-Repositories
32: # at once. Enter a short symbolic names and the
33: # full path of these repositories here.
34: # NOTE that the symbolic names may not contain
35: # whitespaces.
36: # Note, that cvsweb.cgi currently needs to have physical access
37: # to the CVS repository so :pserver:someone@xyz.com:/data/cvsroot
38: # won't work!
39:
3.17 knu 40: # 'symbolic_name' => ['name_to_display', 'path_to_the_actual_repository']
41: # Listed in the order specified:
42: @CVSrepositories = (
3.26 ! knu 43: 'local' => ['Local Repository', '/home/cvs'],
! 44: # 'freebsd' => ['FreeBSD', '/home/ncvs'],
! 45: # 'openbsd' => ['OpenBSD', '/home/ncvs'],
! 46: # 'netbsd' => ['NetBSD', '/home/ncvs'],
! 47: # 'ruby' => ['Ruby', '/var/anoncvs/ruby'],
! 48: );
3.1 knu 49:
50: # This tree is enabled by default when
51: # you enter the page
3.26 ! knu 52: $cvstreedefault = $CVSrepositories[2 * 0]; # The first one
3.1 knu 53:
54: ##############
3.15 knu 55: # Bug tracking system options
56: # ("PR" means Problem Report, as in GNATS)
3.1 knu 57: ##############
3.15 knu 58: #@prcategories = qw(
3.26 ! knu 59: # advocacy
! 60: # alpha
! 61: # bin
! 62: # conf
! 63: # docs
! 64: # gnu
! 65: # i386
! 66: # kern
! 67: # misc
! 68: # pending
! 69: # ports
! 70: # sparc
! 71: #);
! 72:
3.15 knu 73: #
74: #$prcgi = "http://www.FreeBSD.org/cgi/query-pr.cgi?pr=%s";
75: #
76: #$prkeyword = "PR";
3.1 knu 77:
78: ##############
3.15 knu 79: # Manual gateway
3.8 knu 80: ##############
3.26 ! knu 81: $mancgi =
! 82: "http://www.FreeBSD.org/cgi/man.cgi?apropos=0&sektion=%s&query=%s&manpath=FreeBSD+5.0-current&format=html";
3.1 knu 83:
84: ##############
85: # Defaults for UserSettings
86: ##############
87: %DEFAULTVALUE = (
3.26 ! knu 88:
! 89: # sortby: File sort order
! 90: # file Sort by filename
! 91: # rev Sort by revision number
! 92: # date Sort by commit date
! 93: # author Sort by author
! 94: # log Sort by log message
! 95:
! 96: "sortby" => "file",
! 97:
! 98: # hideattic: Hide or show files in Attic
! 99: # 1 Hide files in Attic
! 100: # 0 Show files in Attic
! 101:
! 102: "hideattic" => "1",
! 103:
! 104: # logsort: Sort order for CVS logs
! 105: # date Sort revisions by date
! 106: # rev Sort revision by revision number
! 107: # cvs Don't sort them. Same order as CVS/RCS shows them.
! 108:
! 109: "logsort" => "date",
! 110:
! 111: # f: Default diff format
! 112: # h Human readable
! 113: # u Unified diff
! 114: # c Context diff
! 115: # s Side by side
! 116: "f" => "u",
! 117:
! 118: # hidecvsroot: Don't show the CVSROOT directory
! 119: # 1 Hide CVSROOT directory
! 120: # 0 Show CVSROOT directory
! 121: "hidecvsroot" => "0",
! 122:
! 123: # hidenonreadable: Don't show entries which cannot be read
! 124: # 1 Hide non-readable entries
! 125: # 0 Show non-readable entries
! 126: "hidenonreadable" => "1",
3.1 knu 127: );
128:
129: ##############
130: # some layout stuff
131: ##############
132:
3.9 knu 133: # The body-tag for directory views and logs
3.1 knu 134: $body_tag = '<body text="#000000" bgcolor="#ffffff">';
135:
3.9 knu 136: # The body-tag for diffs and annotations
137: $body_tag_for_src = '<body text="#000000" bgcolor="#eeeeee">';
138:
3.1 knu 139: # Wanna have a logo on the page ?
140: $logo = '<img src="/icons/apache_pb.gif">';
141:
142: # The title of the Page on startup
143: $defaulttitle = "CVS Repository";
144:
145: # The address is shown on the footer
3.2 knu 146: $address = "<font size=-1>CVSweb by <knu\@FreeBSD.org></font>";
3.1 knu 147:
148: # color of navigation Header for
149: # diffs and annotations
150: $navigationHeaderColor = '#9999ee';
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.22 knu 166: This script has been written by Bill Fenner <<a
167: href="mailto:fenner\@FreeBSD.org">fenner\@FreeBSD.org</a>> and
168: improved by Henner Zeller <<a
169: href="mailto:zeller\@think.de">zeller\@think.de</a>>, Henrik
170: Nordström <<a
171: href="mailto:hno\@hem.passagen.se">hno\@hem.passagen.se</a>>, and
172: Ken Coar <<a
173: href="mailto:Ken.Coar\@Golux.Com">Ken.Coar\@Golux.Com</a>>, then
174: Akinori MUSHA <<a
175: href="mailto:knu\@FreeBSD.org">knu\@FreeBSD.org</a>> brought it
176: back to FreeBSD community and made further improvements; it is covered
177: by the <a
178: href="http://www.opensource.org/licenses/bsd-license.html">BSD-Licence</a>.
3.1 knu 179: </p>
180: <p>
181: If you would like to use this CGI script on your own web server and
3.23 knu 182: CVS tree, download the latest version <a
3.24 knu 183: href="http://www.idaemons.org/~knu/cvsweb/">here</a>, and also check
184: out Zeller's <a
3.22 knu 185: href="http://linux.fh-heilbronn.de/~zeller/cgi/cvsweb.cgi" >CVSweb
186: distribution site</a>. Bill's original script can be found <a
187: href="http://www.FreeBSD.org/~fenner/cvsweb/">here</a>.
3.1 knu 188: </p>
189: <p>
190: Please send any suggestions, comments, etc. to
3.5 knu 191: <a href="mailto:fenner\@FreeBSD.org">Bill Fenner</a> or, regarding the
3.1 knu 192: modifications, to
193: <a href="mailto:knu\@FreeBSD.org">Akinori MUSHA</a>,
194: <a href="mailto:zeller\@think.de">Henner Zeller</a>,
195: <a href="mailto:hno\@hem.passagen.se">Henrik Nordström</a>, or
196: <a href="mailto:Ken.Coar\@Golux.Com">Ken Coar</a>.
197: </p>
198: EOT
199:
200: $short_instruction = <<EOT;
201: <p>
202: Click on a directory to enter that directory. Click on a file to display
203: its revision history and to get a chance to display diffs between revisions.
204: </p>
205: EOT
206:
207: # used icons; if icon-url is empty, the text representation is used; if
208: # you do not want to have an ugly tooltip for the icon, remove the
209: # text-representation.
210: # The width and height of the icon allow the browser to correcly display
211: # the table while still loading the icons.
212: # These default icons are coming with apache.
213: # If these icons are too large, check out the miniicons in the
214: # icons/ directory; they have a width/height of 16/16
3.15 knu 215: my $iconsdir = "/icons";
3.26 ! knu 216:
3.15 knu 217: # format: TEXT ICON-URL width height
3.26 ! knu 218: %ICONS = (
! 219: back => [("[BACK]", "$iconsdir/back.gif", 20, 22)],
! 220: dir => [("[DIR]", "$iconsdir/dir.gif", 20, 22)],
! 221: file => [("[TXT]", "$iconsdir/text.gif", 20, 22)],
! 222: );
3.15 knu 223: undef $iconsdir;
3.1 knu 224:
225: # the length to which the last logentry should
226: # be truncated when shown in the directory view
227: $shortLogLen = 80;
228:
229: # Show author of last change
230: $show_author = 1;
231:
232: ##############
233: # table view for directories
234: ##############
235:
236: # Show directory as table
237: # this is much more readable but has one
238: # drawback: the whole table has to be loaded
239: # before common browsers display it which may
240: # be annoying if you have a slow link - and a
241: # large directory ..
242: $dirtable = 1;
243:
244: # show different colors for even/odd rows
245: @tabcolors = ('#ffffff', '#ffffff');
246: $tablepadding = 2;
247:
248: # Color of Header
249: $columnHeaderColorDefault = '#ffffcc';
250: $columnHeaderColorSorted = '#ffcc66';
251:
252: #
253: # If you want to have colored borders
254: # around each row, uncomment this
255: $tableBorderColor = '#cccccc';
256:
257: #
258: # Modules in the repository that should not be displayed, either by default
259: # nor by explicit path specification.
260: #
3.26 ! knu 261: @HideModules = ();
3.1 knu 262:
263: #
264: # Use CVSROOT/CVSROOT/descriptions for describing the directories/modules
265: # See INSTALL section 8
266: #
267: $use_descriptions = 0;
268:
269: ##############
270: # Human Readable Diff
271: ##############
272:
273: # (c) 1998 H. Zeller <zeller@think.de>
274: #
275: # Generates two columns of color encoded
276: # diff; much like xdiff or emacs-ediff mode.
277: #
278: # The diff-stuff is a piece of code I once made for
279: # cvs2html which is under GPL,
280: # see http://www.sslug.dk/cvs2html
281: # (c) 1997/98 Peter Toft <pto@sslug.imm.dtu.dk>
282: #
283: # some parameters to screw:
284: ##
285:
286: # make lines breakable so that the columns do not
287: # exceed the width of the browser
288: $hr_breakable = 1;
289:
3.4 knu 290: # give out function names in diffs
3.1 knu 291: # this just makes sense if we have C-files, otherwise
292: # diff's heuristic doesn't work well ..
293: # ( '-p' option to diff)
3.4 knu 294: $showfunc = 1;
3.1 knu 295:
296: # For each pair of regexps, files that match the first regexp will be diff'ed
297: # with an '-F' option with the second regexp.
3.4 knu 298: %funcline_regexp = (
3.26 ! knu 299: "\\.(4th|fr)\$" => "\\(^\\|[ \t]\\): ",
! 300: "\\.rb\$" => "^[\t ]*\\(class\\|module\\|def\\) ",
! 301: );
3.1 knu 302:
303: # ignore whitespaces for human readable diffs
304: # (indendation and stuff ..)
305: # ( '-w' option to diff)
3.7 knu 306: $hr_ignwhite = 0;
3.1 knu 307:
308: # ignore diffs which are caused by
309: # keyword-substitution like $Id - Stuff
310: # ( '-kk' option to rcsdiff)
311: $hr_ignkeysubst = 1;
312:
313: # Colors and font to show the diff type of code changes
3.26 ! knu 314: $diffcolorHeading = '#99cccc'; # color of 'Line'-head of each diffed file
! 315: $diffcolorEmpty = '#cccccc'; # color of 'empty' lines
! 316: $diffcolorRemove = '#ff9999'; # Removed line(s) (left) ( - )
! 317: $diffcolorChange = '#99ff99'; # Changed line(s) ( both )
! 318: $diffcolorAdd = '#ccccff'; # Added line(s) ( - ) (right)
! 319: $diffcolorDarkChange = '#99cc99'; # lines, which are empty in change
! 320: $difffontface = "Helvetica,Arial";
! 321: $difffontsize = "-1";
3.1 knu 322:
323: # the width of the textinput of the
324: # request-diff-form
325: $inputTextSize = 12;
326:
327: ##############
328: # Mime Types
329: ##############
330:
331: # mapping to mimetypes to help
332: # cvsweb to guess the correct mime-type on
333: # checkout; you can use the mime.types from
334: # apache here:
335: $mime_types = '/usr/local/etc/apache/mime.types';
336:
337: # quick mime-type lookup; maps file-suffices to
338: # mime-types for displaying checkouts in the browser.
339: # Further MimeTypes will be found in the
340: # file $mime_types (apache style mime.types - file)
341: # - add common mappings here for faster lookup
342: %MTYPES = (
3.26 ! knu 343: "html" => "text/html",
! 344: "shtml" => "text/html",
! 345: "gif" => "image/gif",
! 346: "jpeg" => "image/jpeg",
! 347: "jpg" => "image/jpeg",
! 348: "png" => "image/png",
! 349: "xpm" => "image/xpm",
! 350: "*" => "text/plain",
! 351: );
3.11 knu 352:
353: # Charset for HTML output
3.13 knu 354: $charset = '';
3.26 ! knu 355:
3.13 knu 356: # e.g.
357: #$charset = $where =~ m,/ru[/_-], ? 'koi8-r'
358: # : $where =~ m,/zh[/_-], ? 'big5'
359: # : $where =~ m,/ja[/_-], ? 'x-euc-jp'
360: # : $where =~ m,/ko[/_-], ? 'x-euc-kr'
361: # : 'iso-8859-1';
3.1 knu 362:
363: ##############
364: # Misc
365: ##############
366: # allow annotation of files
367: # this requires rw-access to the
3.12 knu 368: # CVSROOT/history file (if you have one)
369: # and rw-access to the subdirectory to
370: # place the lock so you maybe don't want it
3.1 knu 371: $allow_annotate = 1;
372:
373: # allow pretty-printed version of files
374: $allow_markup = 1;
375:
376: # allow compression with gzip
377: # of output if the Browser accepts
378: # it (HTTP_ACCEPT_ENCODING=gzip)
379: # [make sure to have gzip in the path]
3.16 knu 380: $allow_compress = 0;
3.1 knu 381:
382: # Make use of javascript functions.
383: # This way you can select one of your CVSroot
384: # without pressing 'Go' (.. if you do have more
385: # than one CVSROOT defined)
386: $use_java_script = 1;
387:
388: # open Download-Links in another window
389: $open_extern_window = 1;
390:
391: # The size of this extern window; this size option
392: # needs use_java_script to be defined
393: # just comment them if you don't want to have a fixed
394: # size
395: #$extern_window_width = 600;
396: #$extern_window_height = 440;
397:
398: # Edit Options
399: # Enable form to edit your options (hideattic,sortbydate)
400: # this isn't necessary if you've $dirtable defined 'cause
401: # this allows editing of all your options more intuitive
402: $edit_option_form = (not $dirtable);
403:
404: # If you have files which automatically refers to other files
405: # (such as HTML) then this allows you to browse the checked
406: # out files as if outside CVS.
407: $checkout_magic = 1;
408:
409: # Show last changelog message for sub directories
410: # The current implementation makes many assumptions and may show the
411: # incorrect file at some times. The main assumption is that the last
412: # modified file has the newest filedate. But some CVS operations
413: # touches the file without even when a new version is't checked in,
414: # and TAG based browsing essientially puts this out of order, unless
415: # the last checkin was on the same tag as you are viewing.
416: # Enable this if you like the feature, but don't rely on correct results.
417: $show_subdir_lastmod = 0;
418:
419: # Background color of logentry in markup
420: $markupLogColor = "#ffffff";
421:
422: # Show CVS log when viewing file contents
423: $show_log_in_markup = 1;
424:
3.13 knu 425: # Preformat when viewing file contents. This should be turned off
426: # when you have files in the repository that are in a multibyte
427: # encoding which uses HTML special characters ([<>&"]) as part of a
428: # multi-byte character. (such as iso-2022-jp, ShiftJIS, etc.)
429: # Otherwise those files will get screwed up in markup.
430: $preformat_in_markup = '';
431:
3.1 knu 432: # Tabstop used to expand tabs in colored diffs. If undefined then
433: # tabs are always expanded to 8 spaces.
434: $tabstop = 8;
435:
436: # if you wish to display absolute times in your local timezone,
437: # then define mytz and fill in the strings for your standard and
438: # daylight time. Note that you must also make sure the system
439: # timezone is correctly set.
440: # @mytz=("EST", "EDT");
441:
442: # cvsweb is friendly to caches by indicating a suitable
443: # last-modified timestamp. Doing this uses slightly more
444: # CPU so you might want to disable it if you have a slow
445: # server
446: $use_moddate = 1;
447:
3.12 knu 448: # Allows downloading a tarball of the current directory if set.
449: # Bear in mind that this allows downloading a tarball of your entire
450: # repository, which can take a lot of time and disk space to create!
451: # If you enable this, you may need to make sure that cvsweb can write to
452: # CVSROOT/val-tags, due to a bug in cvs.
453: $allow_tar = '';
3.13 knu 454:
455: # Options to pass to tar(1).
3.15 knu 456: @tar_options = qw();
3.26 ! knu 457:
3.13 knu 458: # e.g. @tar_options = qw(--ignore-failed-read);
459: # GNU tar has some useful options against unexpected errors.
460:
3.19 knu 461: # Options to pass to gzip(1) when compressing a tarball to download.
462: @gzip_options = qw();
3.26 ! knu 463:
3.19 knu 464: # e.g. @gzip_options = qw(-3);
3.25 knu 465: # Try lower compression level than 6 (default) if you want faster
466: # compression, or higher, for better compression.
467:
468: # Options to pass to zip(1) when compressing a zip archive to download.
469: @zip_options = qw();
3.26 ! knu 470:
3.25 knu 471: # e.g. @zip_options = qw(-3);
3.19 knu 472: # Try lower compression level than 6 (default) if you want faster
3.21 knu 473: # compression, or higher, for better compression.
3.19 knu 474:
3.13 knu 475: # Options to pass to cvs(1).
476: @cvs_options = qw(-l);
3.19 knu 477:
478: push @cvs_options, '-R' if ($uname eq 'FreeBSD' || $uname eq 'OpenBSD');
3.26 ! knu 479:
3.19 knu 480: # Only FreeBSD's and OpenBSD's cvs(1) supports -R (read only access
481: # mode) option, which considerably speeds up checkouts over NFS.
3.12 knu 482:
483: 1;
3.26 ! knu 484:
3.1 knu 485: #EOF
CVSweb