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