* devel/viewvc

- Add new port viewvc and update to 1.0.0

* Makefile

- Add viewvc

PR:		96099
Submitted by:	Jean-Baptiste Quenot <jbq___caraldi.com>
Repocopy by:	marcus
This commit is contained in:
Marcus Alves Grando 2006-05-04 18:30:10 +00:00
parent 0fe000f0df
commit 3a546faff9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=161352
9 changed files with 154 additions and 216 deletions

View File

@ -1731,6 +1731,7 @@
SUBDIR += varconf
SUBDIR += vb2c
SUBDIR += viewcvs
SUBDIR += viewvc
SUBDIR += vstr
SUBDIR += vtcl
SUBDIR += websvn

View File

@ -5,26 +5,33 @@
# $FreeBSD$
#
PORTNAME= viewcvs
PORTVERSION= 0.9.4
PORTNAME= viewvc
PORTVERSION= 1.0.0
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
MASTER_SITES= http://viewvc.tigris.org/files/documents/3330/31766/
MAINTAINER= mnag@FreeBSD.org
COMMENT= Python version of Zeller's cvsweb
MAINTAINER= jbq@caraldi.com
COMMENT= Web-based Version Control Repository Browsing
FETCH_DEPENDS= wget:${PORTSDIR}/ftp/wget
FETCH_CMD= ${LOCALBASE}/bin/wget -c
DISABLE_SIZE= yes # Need because -S are not recognized by wget
USE_PYTHON= yes
NO_BUILD= yes
SUB_FILES= pkg-message
SUB_LIST= INSTDIR="${PREFIX}/${INSTDIR}"
PKGMESSAGE= ${WRKDIR}/pkg-message
INSTDIR?= ${PORTNAME}-${PORTVERSION}
INSTDIR?= ${PORTNAME}
PLIST_SUB= INSTDIR=${INSTDIR}
do-install:
@(cd ${WRKSRC} && INSTDIR=${PREFIX}/${INSTDIR} ${PYTHON_CMD} viewcvs-install)
(cd ${WRKSRC} && ${PYTHON_CMD} viewvc-install --prefix=${PREFIX}/${INSTDIR} --destdir="")
post-install:
@ ${SED} -e "s:%%INSTDIR%%:${PREFIX}/${INSTDIR}:g" ${MASTERDIR}/pkg-message >${PKGMESSAGE}
@ ${CAT} ${PKGMESSAGE}
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
MD5 (viewcvs-0.9.4.tar.gz) = a1a09922165f2e2fec08527cdd18b76f
SHA256 (viewcvs-0.9.4.tar.gz) = 8d7e86a231b7f8a45d1cba12db302fa76b85ed0a118cc6f0afc053ed176d095d
SIZE (viewcvs-0.9.4.tar.gz) = 140290
MD5 (viewvc-1.0.0.tar.gz) = 0d5b9363b42d74e9721bdd9f847d3c7c
SHA256 (viewvc-1.0.0.tar.gz) = bfcb22e65d12abdb689575529ab1a57d25c67cf8b12a2941338e436f4bdd196b
SIZE (viewvc-1.0.0.tar.gz) = 378147

View File

@ -1,109 +0,0 @@
--- lib/viewcvs.py.orig Tue Jan 15 09:35:55 2002
+++ lib/viewcvs.py Sun Jan 9 13:35:45 2005
@@ -174,6 +174,10 @@
# parse the query params into a dictionary (and use defaults)
query_dict = default_settings.copy()
for name, values in cgi.parse().items():
+ # validate the parameter
+ _validate_param(name, values[0])
+
+ # if we're here, then the parameter is okay
query_dict[name] = values[0]
# set up query strings, prefixed by question marks and ampersands
@@ -229,6 +233,77 @@
self.taginfo = taginfo
+def _validate_param(name, value):
+ """Validate whether the given value is acceptable for the param name.
+
+ If the value is not allowed, then an error response is generated, and
+ this function throws an exception. Otherwise, it simply returns None.
+ """
+
+ try:
+ validator = _legal_params[name]
+ except KeyError:
+ error('An illegal parameter name ("%s") was passed.' % cgi.escape(name))
+
+ # is the validator a regex?
+ if hasattr(validator, 'match'):
+ if not validator.match(value):
+ error('An illegal value ("%s") was passed as a parameter.' %
+ cgi.escape(value))
+ return
+
+ # the validator must be a function
+ validator(value)
+
+def _validate_cvsroot(value):
+ if not cfg.general.cvs_roots.has_key(value):
+ error('The CVS root "%s" is unknown.' % cgi.escape(value))
+
+def _validate_regex(value):
+ # hmm. there isn't anything that we can do here.
+
+ ### we need to watch the flow of these parameters through the system
+ ### to ensure they don't hit the page unescaped. otherwise, these
+ ### parameters could constitute a CSS attack.
+ pass
+
+# obvious things here. note that we don't need uppercase for alpha.
+_re_validate_alpha = re.compile('^[a-z]+$')
+_re_validate_number = re.compile('^[0-9]+$')
+
+# when comparing two revs, we sometimes construct REV:SYMBOL, so ':' is needed
+_re_validate_revnum = re.compile('^[-_.a-zA-Z0-9:]+$')
+
+# it appears that RFC 2045 also says these chars are legal: !#$%&'*+^{|}~`
+# but woah... I'll just leave them out for now
+_re_validate_mimetype = re.compile('^[-_.a-zA-Z0-9/]+$')
+
+# the legal query parameters and their validation functions
+_legal_params = {
+ 'cvsroot' : _validate_cvsroot,
+ 'search' : _validate_regex,
+
+ 'hideattic' : _re_validate_number,
+ 'sortby' : _re_validate_alpha,
+ 'sortdir' : _re_validate_alpha,
+ 'logsort' : _re_validate_alpha,
+ 'diff_format' : _re_validate_alpha,
+ 'only_with_tag' : _re_validate_revnum,
+ 'dir_pagestart' : _re_validate_number,
+ 'log_pagestart' : _re_validate_number,
+ 'hidecvsroot' : _re_validate_number,
+ 'annotate' : _re_validate_revnum,
+ 'graph' : _re_validate_revnum,
+ 'makeimage' : _re_validate_number,
+ 'tarball' : _re_validate_number,
+ 'r1' : _re_validate_revnum,
+ 'tr1' : _re_validate_revnum,
+ 'r2' : _re_validate_revnum,
+ 'tr2' : _re_validate_revnum,
+ 'rev' : _re_validate_revnum,
+ 'content-type' : _re_validate_mimetype,
+ }
+
class LogEntry:
"Hold state for each revision entry in an 'rlog' output."
def __init__(self, rev, date, author, state, changed, log):
@@ -478,7 +553,7 @@
def markup_stream_enscript(lang, fp):
sys.stdout.flush()
enscript = popen.pipe_cmds([(os.path.normpath(os.path.join(cfg.options.enscript_path,'enscript')),
- '--color', '-W', 'html', '-E' + lang, '-o',
+ '--color', '--language=html', '-E' + lang, '-o',
'-', '-'),
('sed', '-n', '/^<PRE>$/,/<\\/PRE>$/p')])
@@ -494,7 +569,7 @@
except IOError, v:
print "<h3>Failure during use of an external program:</h3>"
print "<pre>"
- print os.path.normpath(os.path.join(cfg.options.enscript_path,'enscript')) + " --color -W html -E"+lang+" -o - -"
+ print os.path.normpath(os.path.join(cfg.options.enscript_path,'enscript')) + " --color --language=html -E"+lang+" -o - -"
print "</pre>"
raise

View File

@ -1,49 +0,0 @@
--- viewcvs-install.orig Fri Dec 21 03:59:45 2001
+++ viewcvs-install Sun Aug 24 05:38:29 2003
@@ -51,7 +51,7 @@
""" % version
## installer defaults
-ROOT_DIR = "/usr/local/viewcvs-" + version
+ROOT_DIR = os.environ['INSTDIR']
## list of files for installation
@@ -65,11 +65,11 @@
("cgi/query.cgi", "cgi/query.cgi", 0755, 1, 0, 0),
("standalone.py", "standalone.py", 0755, 1, 0, 0),
- ("cgi/viewcvs.conf.dist", "viewcvs.conf", 0644, 1,
+ ("cgi/viewcvs.conf.dist", "viewcvs.conf.dist", 0644, 1,
"""Note: If you are upgrading from viewcvs-0.7 or earlier:
The section [text] has been removed from viewcvs.conf. The functionality
went into the new files in subdirectory templates.""", 0),
- ("cgi/cvsgraph.conf.dist", "cvsgraph.conf", 0644, 0, 1, 0),
+ ("cgi/cvsgraph.conf.dist", "cvsgraph.conf.dist", 0644, 0, 1, 0),
("lib/PyFontify.py", "lib/PyFontify.py", 0644, 0, 0, 1),
("lib/blame.py", "lib/blame.py", 0644, 0, 0, 1),
@@ -192,7 +192,7 @@
if type(prompt_replace) == type(""):
print prompt_replace
while 1:
- temp = raw_input("\n File %s\n exists and is different from source file.\n DO YOU WANT TO,\n overwrite [o]\n do not overwrite [d]\n view differences [v]: " % (dest_path))
+ temp = 'o'
print
temp = string.lower(temp[0])
@@ -245,10 +245,10 @@
print INFO_TEXT
## get the install path
- temp = raw_input("Installation Path [%s]: " % ROOT_DIR)
- temp = string.strip(temp)
- if len(temp):
- ROOT_DIR = temp
+ #temp = raw_input("Installation Path [%s]: " % ROOT_DIR)
+ #temp = string.strip(temp)
+ #if len(temp):
+ # ROOT_DIR = temp
## install the files
print

View File

@ -0,0 +1,16 @@
--- viewvc-install.orig Thu Apr 20 15:14:37 2006
+++ viewvc-install Thu Apr 20 15:15:46 2006
@@ -67,11 +67,11 @@
("bin/mod_python/handler.py", "bin/mod_python/handler.py", 0755, 1, 0, 0),
("bin/mod_python/.htaccess", "bin/mod_python/.htaccess", 0755, 0, 0, 0),
("bin/standalone.py", "bin/standalone.py", 0755, 1, 0, 0),
- ("viewvc.conf.dist", "viewvc.conf", 0644, 0,
+ ("viewvc.conf.dist", "viewvc.conf.dist", 0644, 0,
"""Note: If you are upgrading from viewcvs-0.7 or earlier:
The section [text] has been removed from viewcvs.conf. The functionality
went into the new files in subdirectory templates.""", 0),
- ("cvsgraph.conf.dist", "cvsgraph.conf", 0644, 0, 1, 0),
+ ("cvsgraph.conf.dist", "cvsgraph.conf.dist", 0644, 0, 1, 0),
("bin/loginfo-handler", "bin/loginfo-handler", 0755, 1, 0, 0),
("bin/cvsdbadmin", "bin/cvsdbadmin", 0755, 1, 0, 0),

View File

@ -1,12 +1,16 @@
If you would like to set up ViewCVS in a usable manner, all
*****************************************************************
If you would like to set up ViewVC in a usable manner, all
you need to do is modify the configuration file, located at
%%INSTDIR%%/viewcvs.conf, to note where your
%%INSTDIR%%/viewvc.conf, to note where your
CVSROOT is, and then copy the actual CGI (located at
%%INSTDIR%%/cgi/viewcvs.cgi) to your cgi-bin.
%%INSTDIR%%/bin/cgi/viewvc.cgi) to your cgi-bin.
Please notice that configuration files are installed as
".dist" and must be copied to their actual names prior to
be edited, e.g.:
$ cd %%INSTDIR%%
$ cp viewcvs.conf.dist viewcvs.conf
$ cp viewvc.conf.dist viewvc.conf
$ cp cvsgraph.conf.dist cvsgraph.conf
It's up to yo to check the ".dist" files after upgrades.
*****************************************************************

View File

@ -1,11 +1,8 @@
ViewCVS was inspired by cvsweb (Zeller's version). ViewCVS
can browse directories, change logs, and specific revisions
of files. It can display diffs between versions and show
selections of files based on tags or branches. In addition,
ViewCVS has "annotation" or "blame" support, and the
beginnings of Bonsai-like query facilities.
ViewVC is a browser interface for CVS and Subversion version control
repositories. It generates templatized HTML to present navigable directory,
revision, and change log listings. It can display specific versions of files as
well as diffs between those versions. Basically, ViewVC provides the bulk of the
report-like functionality you expect out of your version control tool, but much
more prettily than the average textual command-line program output.
WWW: http://viewcvs.sourceforge.net/
Author: Greg Stein <gstein@lyra.org>
- Will <andrews@technologist.com>
WWW: http://viewvc.tigris.org/

View File

@ -1,26 +1,27 @@
%%INSTDIR%%/cgi/query.cgi
%%INSTDIR%%/cgi/viewcvs.cgi
%%INSTDIR%%/cvsdbadmin
%%INSTDIR%%/bin/cgi/query.cgi
%%INSTDIR%%/bin/cgi/viewvc.cgi
%%INSTDIR%%/bin/cvsdbadmin
%%INSTDIR%%/bin/loginfo-handler
%%INSTDIR%%/bin/make-database
%%INSTDIR%%/bin/mod_python/.htaccess
%%INSTDIR%%/bin/mod_python/handler.py
%%INSTDIR%%/bin/mod_python/query.py
%%INSTDIR%%/bin/mod_python/viewvc.py
%%INSTDIR%%/bin/standalone.py
%%INSTDIR%%/bin/svndbadmin
%%INSTDIR%%/cvsgraph.conf.dist
%%INSTDIR%%/doc/help_dirview.html
%%INSTDIR%%/doc/help_log.html
%%INSTDIR%%/doc/help_logtable.html
%%INSTDIR%%/doc/help_query.html
%%INSTDIR%%/doc/help_rootview.html
%%INSTDIR%%/doc/images/chalk.jpg
%%INSTDIR%%/doc/images/cvsgraph_16x16.png
%%INSTDIR%%/doc/images/cvsgraph_32x32.png
%%INSTDIR%%/doc/images/logo.png
%%INSTDIR%%/lib/PyFontify.py
%%INSTDIR%%/lib/PyFontify.pyc
%%INSTDIR%%/lib/accept.py
%%INSTDIR%%/lib/accept.pyc
%%INSTDIR%%/lib/apache_icons.py
%%INSTDIR%%/lib/apache_icons.pyc
%%INSTDIR%%/lib/blame.py
%%INSTDIR%%/lib/blame.pyc
%%INSTDIR%%/lib/compat.py
%%INSTDIR%%/lib/compat.pyc
%%INSTDIR%%/lib/compat_difflib.py
%%INSTDIR%%/lib/compat_difflib.pyc
%%INSTDIR%%/lib/compat_ndiff.py
%%INSTDIR%%/lib/compat_ndiff.pyc
%%INSTDIR%%/lib/config.py
%%INSTDIR%%/lib/config.pyc
%%INSTDIR%%/lib/cvsdb.py
@ -31,36 +32,106 @@
%%INSTDIR%%/lib/debug.pyc
%%INSTDIR%%/lib/ezt.py
%%INSTDIR%%/lib/ezt.pyc
%%INSTDIR%%/lib/idiff.py
%%INSTDIR%%/lib/idiff.pyc
%%INSTDIR%%/lib/popen.py
%%INSTDIR%%/lib/popen.pyc
%%INSTDIR%%/lib/py2html.py
%%INSTDIR%%/lib/py2html.pyc
%%INSTDIR%%/lib/query.py
%%INSTDIR%%/lib/query.pyc
%%INSTDIR%%/lib/rcsparse.py
%%INSTDIR%%/lib/rcsparse.pyc
%%INSTDIR%%/lib/rlog.py
%%INSTDIR%%/lib/rlog.pyc
%%INSTDIR%%/lib/viewcvs.py
%%INSTDIR%%/lib/viewcvs.pyc
%%INSTDIR%%/loginfo-handler
%%INSTDIR%%/make-database
%%INSTDIR%%/standalone.py
%%INSTDIR%%/lib/sapi.py
%%INSTDIR%%/lib/sapi.pyc
%%INSTDIR%%/lib/vclib/__init__.py
%%INSTDIR%%/lib/vclib/__init__.pyc
%%INSTDIR%%/lib/vclib/bincvs/__init__.py
%%INSTDIR%%/lib/vclib/bincvs/__init__.pyc
%%INSTDIR%%/lib/vclib/ccvs/__init__.py
%%INSTDIR%%/lib/vclib/ccvs/__init__.pyc
%%INSTDIR%%/lib/vclib/ccvs/blame.py
%%INSTDIR%%/lib/vclib/ccvs/blame.pyc
%%INSTDIR%%/lib/vclib/ccvs/rcsparse/__init__.py
%%INSTDIR%%/lib/vclib/ccvs/rcsparse/__init__.pyc
%%INSTDIR%%/lib/vclib/ccvs/rcsparse/common.py
%%INSTDIR%%/lib/vclib/ccvs/rcsparse/common.pyc
%%INSTDIR%%/lib/vclib/ccvs/rcsparse/debug.py
%%INSTDIR%%/lib/vclib/ccvs/rcsparse/debug.pyc
%%INSTDIR%%/lib/vclib/ccvs/rcsparse/default.py
%%INSTDIR%%/lib/vclib/ccvs/rcsparse/default.pyc
%%INSTDIR%%/lib/vclib/ccvs/rcsparse/texttools.py
%%INSTDIR%%/lib/vclib/ccvs/rcsparse/texttools.pyc
%%INSTDIR%%/lib/vclib/svn/__init__.py
%%INSTDIR%%/lib/vclib/svn/__init__.pyc
%%INSTDIR%%/lib/vclib/svn_ra/__init__.py
%%INSTDIR%%/lib/vclib/svn_ra/__init__.pyc
%%INSTDIR%%/lib/viewvc.py
%%INSTDIR%%/lib/viewvc.pyc
%%INSTDIR%%/lib/win32popen.py
%%INSTDIR%%/lib/win32popen.pyc
%%INSTDIR%%/templates/annotate.ezt
%%INSTDIR%%/templates/diff.ezt
%%INSTDIR%%/templates/dir_alternate.ezt
%%INSTDIR%%/templates/dir_new.ezt
%%INSTDIR%%/templates/directory.ezt
%%INSTDIR%%/templates/footer.ezt
%%INSTDIR%%/templates/docroot/help.css
%%INSTDIR%%/templates/docroot/help_dirview.html
%%INSTDIR%%/templates/docroot/help_log.html
%%INSTDIR%%/templates/docroot/help_query.html
%%INSTDIR%%/templates/docroot/help_rootview.html
%%INSTDIR%%/templates/docroot/images/annotate.png
%%INSTDIR%%/templates/docroot/images/back.png
%%INSTDIR%%/templates/docroot/images/back_small.png
%%INSTDIR%%/templates/docroot/images/broken.png
%%INSTDIR%%/templates/docroot/images/chalk.jpg
%%INSTDIR%%/templates/docroot/images/cvsgraph_16x16.png
%%INSTDIR%%/templates/docroot/images/cvsgraph_32x32.png
%%INSTDIR%%/templates/docroot/images/diff.png
%%INSTDIR%%/templates/docroot/images/dir.png
%%INSTDIR%%/templates/docroot/images/down.png
%%INSTDIR%%/templates/docroot/images/download.png
%%INSTDIR%%/templates/docroot/images/feed-icon-16x16.jpg
%%INSTDIR%%/templates/docroot/images/forward.png
%%INSTDIR%%/templates/docroot/images/list.png
%%INSTDIR%%/templates/docroot/images/log.png
%%INSTDIR%%/templates/docroot/images/logo.png
%%INSTDIR%%/templates/docroot/images/text.png
%%INSTDIR%%/templates/docroot/images/up.png
%%INSTDIR%%/templates/docroot/images/view.png
%%INSTDIR%%/templates/docroot/styles.css
%%INSTDIR%%/templates/error.ezt
%%INSTDIR%%/templates/graph.ezt
%%INSTDIR%%/templates/header.ezt
%%INSTDIR%%/templates/include/diff_form.ezt
%%INSTDIR%%/templates/include/dir_footer.ezt
%%INSTDIR%%/templates/include/dir_header.ezt
%%INSTDIR%%/templates/include/file_header.ezt
%%INSTDIR%%/templates/include/footer.ezt
%%INSTDIR%%/templates/include/header.ezt
%%INSTDIR%%/templates/include/log_footer.ezt
%%INSTDIR%%/templates/include/log_header.ezt
%%INSTDIR%%/templates/include/paging.ezt
%%INSTDIR%%/templates/include/pathrev_form.ezt
%%INSTDIR%%/templates/include/sort.ezt
%%INSTDIR%%/templates/log.ezt
%%INSTDIR%%/templates/log_table.ezt
%%INSTDIR%%/templates/markup.ezt
%%INSTDIR%%/templates/query.ezt
%%INSTDIR%%/viewcvs.conf.dist
%%INSTDIR%%/templates/query_form.ezt
%%INSTDIR%%/templates/query_results.ezt
%%INSTDIR%%/templates/revision.ezt
%%INSTDIR%%/templates/roots.ezt
%%INSTDIR%%/templates/rss.ezt
%%INSTDIR%%/viewvc.conf.dist
@dirrm %%INSTDIR%%/templates/include
@dirrm %%INSTDIR%%/templates/docroot/images
@dirrm %%INSTDIR%%/templates/docroot
@dirrm %%INSTDIR%%/templates
@dirrm %%INSTDIR%%/lib/vclib/svn_ra
@dirrm %%INSTDIR%%/lib/vclib/svn
@dirrm %%INSTDIR%%/lib/vclib/ccvs/rcsparse
@dirrm %%INSTDIR%%/lib/vclib/ccvs
@dirrm %%INSTDIR%%/lib/vclib/bincvs
@dirrm %%INSTDIR%%/lib/vclib
@dirrm %%INSTDIR%%/lib
@dirrm %%INSTDIR%%/doc/images
@dirrm %%INSTDIR%%/doc
@dirrm %%INSTDIR%%/cgi
@dirrm %%INSTDIR%%
@dirrm %%INSTDIR%%/bin/mod_python
@dirrm %%INSTDIR%%/bin/cgi
@dirrm %%INSTDIR%%/bin
@dirrmtry %%INSTDIR%%