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