Merge from knu-cvsweb 1.112.1.82.

2001-08-01  Akinori MUSHA  <knu@iDaemons.org>

	* cvsweb.cgi: perltidy -i=8 -t -pt=2 -bt=2 -sbt=2 -ci=4 -noll -sfs
	-nasc -ce

	* cvsweb.conf, cvsweb.conf-freebsd, cvsweb.conf-netbsd,
	cvsweb.conf-openbsd, cvsweb.conf-ruby: perltidy -i=8 -t -pt=2 -bt=2
	-sbt=2 -ci=4 -noll -sfs -nasc -ce

	* cvsweb.cgi, cvsweb.conf: MFZ 1.111, but introduce @ForbiddenFiles
	instead of @DissallowRead to forbid user to cvs
	checkout/diff/annotate specified files.

	* cvsweb.cgi: MFZ 1.112: A couple of trivial fixes.

2001-07-26  Akinori MUSHA  <knu@iDaemons.org>

	* cvsweb.cgi: Chdir to TMPDIR so it works even when the cgi-bin
	directory is unreadable.
	[Submitted by: Dmitry Morozovsky <marck@rinet.ru>]

	* cvsweb.cgi: Let the module/path box appear and work properly
	when there is only one repository.
	[Submitted by: Dmitry Morozovsky <marck@rinet.ru>]
This commit is contained in:
Akinori MUSHA 2001-08-01 10:41:47 +00:00
parent 4f95a0576a
commit 500c71f667
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=10118
5 changed files with 2654 additions and 2313 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,9 +6,9 @@
# 1999 H. Nordstrom <hno@hem.passagen.se>
# 2000-2001 A. MUSHA <knu@FreeBSD.org>
# based on work by Bill Fenner <fenner@FreeBSD.org>
# $Id: cvsweb.conf,v 1.21 2001-07-06 09:58:17 knu Exp $
# $Idaemons: /home/cvs/cvsweb/cvsweb.conf,v 1.25 2001/07/06 09:44:28 knu Exp $
# $FreeBSD: www/en/cgi/cvsweb.conf,v 1.20 2001/06/18 22:27:55 peter Exp $
# $Id: cvsweb.conf,v 1.22 2001-08-01 10:41:47 knu Exp $
# $Idaemons: /home/cvs/cvsweb/cvsweb.conf,v 1.27 2001/08/01 09:48:39 knu Exp $
# $FreeBSD: www/en/cgi/cvsweb.conf,v 1.21 2001/07/06 09:58:17 knu Exp $
#
###
@ -20,7 +20,7 @@ $command_path = '/bin:/usr/bin:/usr/local/bin';
# Search the above directories for each command
for (qw(uname cvs rlog rcsdiff gzip tar rm zip)) {
$CMD{$_} = search_path($_);
$CMD{$_} = search_path($_);
}
# The name of the operating system implementation
@ -41,16 +41,16 @@ chomp($uname = `$CMD{uname}`);
# 'symbolic_name' => ['name_to_display', 'path_to_the_actual_repository']
# Listed in the order specified:
@CVSrepositories = (
'freebsd' => ['FreeBSD', '/c/ncvs'],
'openbsd' => ['OpenBSD', '/usr/local/www/cvsroot/OpenBSD'],
'netbsd' => ['NetBSD', '/usr/local/www/cvsroot/NetBSD'],
'44bsdlite' => ['4.4BSD-Lite', '/e/4.4BSD-Lite/4.4BSD-Lite-CVS'],
'learn' => ['Learn', '/c/learncvs'],
);
'freebsd' => ['FreeBSD', '/c/ncvs'],
'openbsd' => ['OpenBSD', '/usr/local/www/cvsroot/OpenBSD'],
'netbsd' => ['NetBSD', '/usr/local/www/cvsroot/NetBSD'],
'44bsdlite' => ['4.4BSD-Lite', '/e/4.4BSD-Lite/4.4BSD-Lite-CVS'],
'learn' => ['Learn', '/c/learncvs'],
);
# This tree is enabled by default when
# you enter the page
$cvstreedefault = $CVSrepositories[2 * 0]; # The first one
$cvstreedefault = $CVSrepositories[2 * 0]; # The first one
##############
# Mirror Sites
@ -69,19 +69,20 @@ $cvstreedefault = $CVSrepositories[2 * 0]; # The first one
# ("PR" means Problem Report, as in GNATS)
##############
#@prcategories = qw(
# advocacy
# alpha
# bin
# conf
# docs
# gnu
# i386
# kern
# misc
# pending
# ports
# sparc
# );
# advocacy
# alpha
# bin
# conf
# docs
# gnu
# i386
# kern
# misc
# pending
# ports
# sparc
#);
#
#$prcgi = "http://www.FreeBSD.org/cgi/query-pr.cgi?pr=%s";
#
@ -90,50 +91,52 @@ $cvstreedefault = $CVSrepositories[2 * 0]; # The first one
##############
# Manual gateway
##############
$mancgi = "http://www.FreeBSD.org/cgi/man.cgi?apropos=0&sektion=%s&query=%s&manpath=FreeBSD+5.0-current&format=html";
$mancgi =
"http://www.FreeBSD.org/cgi/man.cgi?apropos=0&sektion=%s&query=%s&manpath=FreeBSD+5.0-current&format=html";
##############
# Defaults for UserSettings
##############
%DEFAULTVALUE = (
# sortby: File sort order
# file Sort by filename
# rev Sort by revision number
# date Sort by commit date
# author Sort by author
# log Sort by log message
"sortby" => "file",
# sortby: File sort order
# file Sort by filename
# rev Sort by revision number
# date Sort by commit date
# author Sort by author
# log Sort by log message
# hideattic: Hide or show files in Attic
# 1 Hide files in Attic
# 0 Show files in Attic
"sortby" => "file",
"hideattic" => "1",
# hideattic: Hide or show files in Attic
# 1 Hide files in Attic
# 0 Show files in Attic
# logsort: Sort order for CVS logs
# date Sort revisions by date
# rev Sort revision by revision number
# cvs Don't sort them. Same order as CVS/RCS shows them.
"hideattic" => "1",
"logsort" => "date",
# logsort: Sort order for CVS logs
# date Sort revisions by date
# rev Sort revision by revision number
# cvs Don't sort them. Same order as CVS/RCS shows them.
# f: Default diff format
# h Human readable
# u Unified diff
# c Context diff
# s Side by side
"f" => "u",
"logsort" => "date",
# hidecvsroot: Don't show the CVSROOT directory
# 1 Hide CVSROOT directory
# 0 Show CVSROOT directory
"hidecvsroot" => "0",
# f: Default diff format
# h Human readable
# u Unified diff
# c Context diff
# s Side by side
"f" => "u",
# hidenonreadable: Don't show entries which cannot be read
# 1 Hide non-readable entries
# 0 Show non-readable entries
"hidenonreadable" => "1",
# hidecvsroot: Don't show the CVSROOT directory
# 1 Hide CVSROOT directory
# 0 Show CVSROOT directory
"hidecvsroot" => "0",
# hidenonreadable: Don't show entries which cannot be read
# 1 Hide non-readable entries
# 0 Show non-readable entries
"hidenonreadable" => "1",
);
##############
@ -223,12 +226,13 @@ EOT
# If these icons are too large, check out the miniicons in the
# icons/ directory; they have a width/height of 16/16
my $iconsdir = "/icons";
# 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) ],
);
%ICONS = (
back => [("[BACK]", "$iconsdir/back.gif", 20, 22)],
dir => [("[DIR]", "$iconsdir/dir.gif", 20, 22)],
file => [("[TXT]", "$iconsdir/text.gif", 20, 22)],
);
undef $iconsdir;
# the length to which the last logentry should
@ -268,7 +272,20 @@ $tableBorderColor = '#cccccc';
# nor by explicit path specification.
#
@HideModules = (
);
# "^my/secret/module",
);
#
# Files matching these pathnames shouldn't be checked out with cvsweb,
# since they may contain sensitive information. Simple file name based
# filter. Often, the CVSROOT/passwd is exposed and some people tend
# to check in their .cvspass, though this is a bad idea. These files
# shouldn't be readable by default. Thanks to Damian Gryski to point
# this out.
@ForbiddenFiles = (
"^CVSROOT/passwd\$", # CVSROOT/passwd should not be cvs add'ed, though
"/\\.cvspass\$", # Ditto. Just in case.
);
#
# Use CVSROOT/CVSROOT/descriptions for describing the directories/modules
@ -306,9 +323,9 @@ $showfunc = 1;
# For each pair of regexps, files that match the first regexp will be diff'ed
# with an '-F' option with the second regexp.
%funcline_regexp = (
"\\.(4th|fr)\$" => "\\(^\\|[ \t]\\): ",
"\\.rb\$" => "^[\t ]*\\(class\\|module\\|def\\) ",
);
"\\.(4th|fr)\$" => "\\(^\\|[ \t]\\): ",
"\\.rb\$" => "^[\t ]*\\(class\\|module\\|def\\) ",
);
# ignore whitespaces for human readable diffs
# (indendation and stuff ..)
@ -321,14 +338,14 @@ $hr_ignwhite = 0;
$hr_ignkeysubst = 1;
# Colors and font to show the diff type of code changes
$diffcolorHeading = '#99cccc'; # color of 'Line'-head of each diffed file
$diffcolorEmpty = '#cccccc'; # color of 'empty' lines
$diffcolorRemove = '#ff9999'; # Removed line(s) (left) ( - )
$diffcolorChange = '#99ff99'; # Changed line(s) ( both )
$diffcolorAdd = '#ccccff'; # Added line(s) ( - ) (right)
$diffcolorDarkChange = '#99cc99'; # lines, which are empty in change
$difffontface = "Helvetica,Arial";
$difffontsize = "-1";
$diffcolorHeading = '#99cccc'; # color of 'Line'-head of each diffed file
$diffcolorEmpty = '#cccccc'; # color of 'empty' lines
$diffcolorRemove = '#ff9999'; # Removed line(s) (left) ( - )
$diffcolorChange = '#99ff99'; # Changed line(s) ( both )
$diffcolorAdd = '#ccccff'; # Added line(s) ( - ) (right)
$diffcolorDarkChange = '#99cc99'; # lines, which are empty in change
$difffontface = "Helvetica,Arial";
$difffontsize = "-1";
# the width of the textinput of the
# request-diff-form
@ -350,18 +367,19 @@ $mime_types = '/usr/local/etc/apache/mime.types';
# file $mime_types (apache style mime.types - file)
# - add common mappings here for faster lookup
%MTYPES = (
"html" => "text/html",
"shtml" => "text/html",
"gif" => "image/gif",
"jpeg" => "image/jpeg",
"jpg" => "image/jpeg",
"png" => "image/png",
"xpm" => "image/xpm",
"*" => "text/plain",
);
"html" => "text/html",
"shtml" => "text/html",
"gif" => "image/gif",
"jpeg" => "image/jpeg",
"jpg" => "image/jpeg",
"png" => "image/png",
"xpm" => "image/xpm",
"*" => "text/plain",
);
# Charset for HTML output
$charset = '';
# e.g.
#$charset = $where =~ m,/ru[/_-], ? 'koi8-r'
# : $where =~ m,/zh[/_-], ? 'big5'
@ -463,17 +481,20 @@ $allow_tar = '';
# Options to pass to tar(1).
@tar_options = qw(--ignore-failed-read);
# e.g. @tar_options = qw(--ignore-failed-read);
# GNU tar has some useful options against unexpected errors.
# Options to pass to gzip(1) when compressing a tarball to download.
@gzip_options = qw();
# e.g. @gzip_options = qw(-3);
# Try lower compression level than 6 (default) if you want faster
# compression, or higher, for better compression.
# Options to pass to zip(1) when compressing a zip archive to download.
@zip_options = qw();
# e.g. @zip_options = qw(-3);
# Try lower compression level than 6 (default) if you want faster
# compression, or higher, for better compression.
@ -482,8 +503,10 @@ $allow_tar = '';
@cvs_options = qw(-l);
push @cvs_options, '-R' if ($uname eq 'FreeBSD' || $uname eq 'OpenBSD');
# Only FreeBSD's and OpenBSD's cvs(1) supports -R (read only access
# mode) option, which considerably speeds up checkouts over NFS.
1;
#EOF

View file

@ -2,36 +2,37 @@
#
# Set up for FreeBSD repo options.
#
# $Idaemons: /home/cvs/cvsweb/cvsweb.conf-freebsd,v 1.4 2001/01/13 07:48:09 knu Exp $
# $FreeBSD: www/en/cgi/cvsweb.conf-freebsd,v 1.6 2001/01/12 04:26:10 knu Exp $
# $Idaemons: /home/cvs/cvsweb/cvsweb.conf-freebsd,v 1.5 2001/08/01 09:32:22 knu Exp $
# $FreeBSD: www/en/cgi/cvsweb.conf-freebsd,v 1.7 2001/01/14 08:59:59 knu Exp $
if ($uname eq 'FreeBSD') {
$ENV{'RCSLOCALID'} = 'FreeBSD=CVSHeader';
$ENV{'RCSINCEXC'} = 'iFreeBSD';
$ENV{'RCSLOCALID'} = 'FreeBSD=CVSHeader';
$ENV{'RCSINCEXC'} = 'iFreeBSD';
} else {
$ENV{'RCSLOCALID'} = 'FreeBSD';
$ENV{'RCSLOCALID'} = 'FreeBSD';
}
@prcategories = qw(
advocacy
alpha
bin
conf
docs
gnu
i386
kern
misc
pending
ports
sparc
);
advocacy
alpha
bin
conf
docs
gnu
i386
kern
misc
pending
ports
sparc
);
$prcgi = "http://www.FreeBSD.org/cgi/query-pr.cgi?pr=%s";
$prkeyword = "PR";
$mancgi = "http://www.FreeBSD.org/cgi/man.cgi?apropos=0&sektion=%s&query=%s&manpath=FreeBSD+5.0-current&format=html";
$mancgi =
"http://www.FreeBSD.org/cgi/man.cgi?apropos=0&sektion=%s&query=%s&manpath=FreeBSD+5.0-current&format=html";
# Allow downloading a tarball of a port
$allow_tar = ($where =~ m,^ports/[^/]+/[^/]+/,);

View file

@ -2,64 +2,64 @@
#
# Set up for NetBSD repo options.
#
# $Idaemons: /home/cvs/cvsweb/cvsweb.conf-netbsd,v 1.4 2001/01/13 07:48:09 knu Exp $
# $FreeBSD: www/en/cgi/cvsweb.conf-netbsd,v 1.7 2001/01/12 04:26:10 knu Exp $
# $Idaemons: /home/cvs/cvsweb/cvsweb.conf-netbsd,v 1.5 2001/08/01 09:32:22 knu Exp $
# $FreeBSD: www/en/cgi/cvsweb.conf-netbsd,v 1.8 2001/01/14 08:59:59 knu Exp $
if ($uname eq 'FreeBSD') {
$ENV{'RCSLOCALID'} = 'NetBSD=CVSHeader';
$ENV{'RCSINCEXC'} = 'iNetBSD';
$ENV{'RCSLOCALID'} = 'NetBSD=CVSHeader';
$ENV{'RCSINCEXC'} = 'iNetBSD';
} else {
$ENV{'RCSLOCALID'} = 'NetBSD';
$ENV{'RCSLOCALID'} = 'NetBSD';
}
@prcategories = qw(
admin
bin
install
kern
lib
misc
pending
pkg
port-alpha
port-amiga
port-arc
port-arm26
port-arm32
port-atari
port-bebox
port-cobalt
port-dreamcast
port-hp300
port-hpcmips
port-i386
port-luna68k
port-m68k
port-mac68k
port-macppc
port-mips
port-mvme68k
port-newsmips
port-news68k
port-next68k
port-ofppc
port-pc532
port-pmax
port-powerpc
port-prep
port-sgimips
port-sh3
port-sparc
port-sparc64
port-sun3
port-vax
port-x68k
security
standards
test
xsrc
y2k
);
admin
bin
install
kern
lib
misc
pending
pkg
port-alpha
port-amiga
port-arc
port-arm26
port-arm32
port-atari
port-bebox
port-cobalt
port-dreamcast
port-hp300
port-hpcmips
port-i386
port-luna68k
port-m68k
port-mac68k
port-macppc
port-mips
port-mvme68k
port-newsmips
port-news68k
port-next68k
port-ofppc
port-pc532
port-pmax
port-powerpc
port-prep
port-sgimips
port-sh3
port-sparc
port-sparc64
port-sun3
port-vax
port-x68k
security
standards
test
xsrc
y2k
);
$prcgi = "http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=%s";

View file

@ -2,40 +2,41 @@
#
# Set up for OpenBSD repo options.
#
# $Idaemons: /home/cvs/cvsweb/cvsweb.conf-openbsd,v 1.4 2001/01/13 07:48:09 knu Exp $
# $FreeBSD: www/en/cgi/cvsweb.conf-openbsd,v 1.5 2001/01/12 04:26:10 knu Exp $
# $Idaemons: /home/cvs/cvsweb/cvsweb.conf-openbsd,v 1.5 2001/08/01 09:32:22 knu Exp $
# $FreeBSD: www/en/cgi/cvsweb.conf-openbsd,v 1.6 2001/01/14 08:59:59 knu Exp $
if ($uname eq 'FreeBSD') {
$ENV{'RCSLOCALID'} = 'OpenBSD=CVSHeader';
$ENV{'RCSINCEXC'} = 'iOpenBSD';
$ENV{'RCSLOCALID'} = 'OpenBSD=CVSHeader';
$ENV{'RCSINCEXC'} = 'iOpenBSD';
} else {
$ENV{'RCSLOCALID'} = 'OpenBSD';
$ENV{'RCSLOCALID'} = 'OpenBSD';
}
@prcategories = qw(
alpha
arm
documentation
i386
kernel
library
m68k
mips
ns32k
pending
ports
ppc
sparc
system
user
vax
);
alpha
arm
documentation
i386
kernel
library
m68k
mips
ns32k
pending
ports
ppc
sparc
system
user
vax
);
$prcgi = "http://cvs.openbsd.org/cgi-bin/wwwgnats.pl/full?pr=%s";
$prkeyword = "PR";
$mancgi = "http://www.openbsd.org/cgi-bin/man.cgi?apropos=0&sektion=%s&query=%s&manpath=OpenBSD+Current&arch=i386&format=html";
$mancgi =
"http://www.openbsd.org/cgi-bin/man.cgi?apropos=0&sektion=%s&query=%s&manpath=OpenBSD+Current&arch=i386&format=html";
# Allow downloading a tarball of a port
$allow_tar = ($where =~ m,^ports/[^/]+/[^/]+/,);