#
# Patch for CVSweb to use correct CVS repository, to enable the magic 
# identifiers, and to enable cvsgraph and cvshistory.
#

--- cvsweb-3.0.6-orig/cvsweb.conf
+++ cvsweb-3.0.6/cvsweb.conf
@@ -57,7 +57,7 @@
 # 'symbolic_name' => ['Name to display',  '/path/to/cvsroot']
 #
 @CVSrepositories = (
-        'local'   => ['Local Repository', '/var/cvs'],
+        'local'   => ['Local Repository', '/var/lib/cvsroot'],
 #       'freebsd' => ['FreeBSD',          '/var/ncvs'],
 #       'openbsd' => ['OpenBSD',          '/var/ncvs'],
 #       'netbsd'  => ['NetBSD',           '/var/ncvs'],
@@ -101,6 +101,8 @@
 #);
 #$prcgi = "http://www.FreeBSD.org/cgi/query-pr.cgi?pr=%s";
 #$prkeyword = "PR";
+$prcgi = "/bugzilla/show_bug.cgi?id=%s";
+$prkeyword = "BugID:";
 
 # Manual gateway linking.  This will be done only for views for which
 # $allow_*_extra below is true.
@@ -108,6 +110,14 @@
 $mancgi =
     "http://www.FreeBSD.org/cgi/man.cgi?apropos=0&sektion=%s&query=%s&manpath=FreeBSD+5.0-current&format=html";
 
+# VCS magic identifier linking.
+#
+$vcsurl = "/cgi-bin/cvsweb.cgi/";
+
+# Wiki magic identifier linking.
+#
+$wikiurl = "/wiki/index.php/";
+
 # Defaults for user definable options.
 #
 %DEFAULTVALUE = (
@@ -226,14 +236,16 @@
 # check out the "mini" versions in the icons/ directory; they have a
 # width/height of 16/16.
 #
-my $iconsdir = '/icons';
+# XXX FIXME: Change this if icons are not displayed properly.
+# XXX FIXME: This setting is for Fedora Extras RPMs.
+my $iconsdir = '/icons/small';
 
 # format:          TEXT       ICON-URL                  width height
 %ICONS = (
-     back    => [('[BACK]',   "$iconsdir/back.gif",      20,   22)],
-     dir     => [('[DIR]',    "$iconsdir/dir.gif",       20,   22)],
-     file    => [('[TXT]',    "$iconsdir/text.gif",      20,   22)],
-     binfile => [('[BIN]',    "$iconsdir/binary.gif",    20,   22)],
+     back    => [('[BACK]',   "$iconsdir/back.gif",      16,   16)],
+     dir     => [('[DIR]',    "$iconsdir/dir.gif",       16,   16)],
+     file    => [('[TXT]',    "$iconsdir/text.gif",      16,   16)],
+     binfile => [('[BIN]',    "$iconsdir/binary.gif",    16,   16)],
      graph   => [('[GRAPH]',  "$iconsdir/minigraph.png", 16,   16)],
 );
 undef $iconsdir;
@@ -368,7 +380,7 @@
 # The traditional mime.types file, eg. the one from Apache is fine.
 # See above where this gets used.
 #
-$mime_types = '/usr/local/etc/apache/mime.types';
+$mime_types = '/etc/mime.types';
 
 # Charset appended to the Content-Type HTTP header for text/* MIME types.
 # Note that the web server may default to some charset which may take effect
@@ -505,12 +517,12 @@
 # settings in the configuration file with command line options, see
 # doGraph() and doGraphView() in cvsweb.cgi for details.
 #
-#$cvsgraph_config = "/etc/cvsgraph.conf";
+$cvsgraph_config = "/etc/cvsgraph.conf";
 
 # URL to the CVSHistory script.  This should be absolute (but does not need
 # to include the host and port if the script is on the same server as
 # CVSweb).
-#$cvshistory_url = "/cgi-bin/cvshistory.cgi";
+$cvshistory_url = "/cgi-bin/cvshistory.cgi";
 
 # Whether to allow downloading a tarball or a zip of the current directory.
 # While downloading of the entire repository is disallowed, depending on
@@ -556,6 +568,7 @@
 @cvs_options = qw(-f);
 push @cvs_options, '-R' if ($^O eq 'freebsd' || $^O eq 'openbsd');
 push @cvs_options, '-u' if ($^O eq 'netbsd');
+push @cvs_options, '-r' if ($^O eq 'linux');
 # Only affects cvs >= 1.12.1, but doesn't hurt older ones.
 $ENV{CVSREADONLYFS} = 1 unless exists($ENV{CVSREADONLYFS});
 
@@ -564,7 +577,7 @@
 # To make annotate work against a read only repository, add -n, ie.:
 # @annotate_options = (@cvs_options, '-n');
 #
-@annotate_options = @cvs_options;
+@annotate_options = (@cvs_options, '-n');
 
 # Options to pass to rcsdiff(1).
 # Probably the only useful one here is -q (suppress diagnostic output).

