Commit Graph

20 Commits (5321434ca407d2deec2084b038ddde038d5bd5fa)

Author SHA1 Message Date
cmpilato dc19cf90ba Merge the authz-dev branch work into trunk. Let's let the pluggable authz
subsystem go mainstream!

* notes/authz-dev-TODO
* lib/vcauth/*
  New, copied from the authz-dev branch.

* viewvc.conf.dist
* lib/viewvc.py
* lib/query.py
* lib/debug.py
  Merge changes from the authz-dev branch.

* lib/config.py
  Merge changes from the authz-dev branch.  Also, make 'forbidden' the
  default value for 'authorizer'.

* docs/upgrading-howto.html
  Add sections about handling forbidden modules.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1623 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-25 20:07:13 +00:00
cmpilato 6982bbc7b0 Use forward-slash (/) as the separator in config section names between
override groupings and the base configuration section that is being
overridden.  Why?  Besides revealing a clear heirachy of information
(which seems more intuitive to me, at least), I anticipate it being
helpful for disambiguation later, especially since neither vhosts nor
root names should have forward slashes in them.

* viewvc.conf.dist
  (vhosts): Tweak the inline comments in accordance with this new plan.

* lib/config.py
  (Config._process_vhost, Config._process_root_options): Expect a
    forward slash (/) character where a hyphen (-) was previously
    expected.

* docs/upgrading-howto.html
  Update upgrade documentation with these changes.

* CHANGES
  Note that per-root configuration overrides are now supported.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1609 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-16 23:59:09 +00:00
cmpilato 204c6eb21c Add support for per-root option overrides using sections named
root-ROOTNAME-CONFIGSECTION.

In order to keep the configuration section naming conventions
consistent, change the way virtual host override sections are named
from VHOSTNAME-CONFIGSECTION to vhost-VHOSTNAME-CONFIGSECTION.

* lib/config.py
  (Config.load_config): Add optional 'rootname' parameter.  Actually
    make use of self.conf_path.  If there is a rootname provided,
    overlay per-root options.
  (Config._process_vhost): Now expect vhost section names to begin
    with the prefix "vhost-".
  (Config._find_canon_vhost): Minimize some logic.
  (Config.overlay_root_options, Config._process_root_options): New.
  (ViewVCConfigurationError, IllegalOverrideSection): New.
  (MalformedRoot): Now inherit from ViewVCConfigurationError.
  
* lib/viewvc.py
  (Request.run_viewvc): Once the rootname is determined, overlay
    per-root configuration options.

* viewvc.conf.dist
  (vhosts): Update vhosts docs and examples to note the new "vhost-"
    section name prefix.

* docs/upgrading-howto.html
  Note the change in vhost override section naming expectations.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1607 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-16 14:54:01 +00:00
cmpilato 63aba8c173 Move the 'use_rcsparse' option from 'general' to 'options'.
* viewvc.conf.dist
  (use_rcsparse): Move this from the 'general' section to the
    'options' section.

* lib/config.py
  (Config.set_defaults): Track the move of the 'use_rcsparse' section.

* lib/viewvc.py
  (Request.run_viewvc): Track the move of the 'use_rcsparse' section.

* docs/upgrading-howto.html
  Note the option changes, and re-work the upgrading-from-1.0.0 option
  changes section a little bit while I'm here.



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1604 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-13 08:15:05 +00:00
cmpilato a0a1ea7a42 * viewvc.conf.dist
Clean up some more option documentation.

* templates/include/footer.ezt
  Stop treating the cfg.general.address like a free-form field.  If admins
  don't like the way we display the address by default, they need only 
  tweak the footer.ezt template.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1603 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-13 07:40:39 +00:00
cmpilato 62dff59068 * viewvc.conf.dist
Take a stab at documenting ViewVC's vhost support.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1602 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-13 07:11:35 +00:00
cmpilato 3b15cf11cc Turn on root_as_url_component by default for ViewVC 1.1.
* lib/config.py
  (Config.set_defaults): Enable options.root_as_url_component by default.

* viewvc.conf.dist
  (default_root): Describe this a little better.
  (root_as_url_component): Indicate that enabled is the default state.

* docs/upgrading-howto.html
  Add a note about the root_as_url_component option default change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1563 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-02 19:20:07 +00:00
cmpilato 2efd7cc4af Unify the allowable views configury, and all support for disabling the
checkout view.  The former is for sanity, the latter for security.

* viewvc.conf.dist
  (allow_tar, allow_annotate, allow_markup): Removed.
  (allowed_views): New.

* lib/config.py
  (Config._force_multi_value): Add 'allowed_views'.
  (Config.set_defaults): Set default for 'allowed_views'; no longer set
    defaults for 'allow_tar', 'allow_annotate', 'allow_markup'.

* lib/viewvc.py
  (default_view, view_directory, download_tarball, get_file_view_info,
   view_annotate, view_diff, build_commit, view_revision, view_markup,
   view_checkout): Track changes, adding code to prevent checkout view
    URL generation when the view is disabled, and doing the same for
    markup views (which should have already been done, since we already
    had an allow_markup option!)

* templates/query_results.ezt
* templates/markup.ezt
* templates/directory.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/annotate.ezt
  Don't assume checkout and markup views are present.

* docs/upgrading-howto.html
  Update to show the configuration changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1544 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-03-27 19:03:37 +00:00
cmpilato 169aba8c30 * viewvc.conf.dist (use_source_highlight): Default to 0.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1531 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-13 15:21:39 +00:00
cmpilato 85f7720267 Miscellaneous cleanups around the source-highlight integration.
* templates/docroot/styles.css
  Remove source-highlight styles.  We can't reliably get that program
  to generate real style names.

* viewvc.conf.dist
  (source_highlight): Fix the sample path.

* lib/viewvc.py
  (MarkupSourceHighlight): Rework this to pipe the file contents into
    source-highlight on stdin, and don't try to enable CSS output or
    anything fancy, because source-highlight has too many bugs in this
    area.  Use --failsafe mode.

* INSTALL
  Change the recommendation for the version of source-highlight.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1528 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-01 21:52:30 +00:00
cmpilato 473b853a5b Add optional integration with GNU source-highlight. Patch against
ViewVC 1.0.3 by Dirk Jagdmann <doj@tigris.org>, tweaked to adhere to
ViewVC 1.1-dev code and conventions by myself.

* viewvc.conf.dist
  (utilities.source_highlight, options.use_source_highlight,
   options.source_highlight_line_numbers): New.

* templates/docroot/styles.css
  Add new default styles for source-highlight output mode.

* lib/viewvc.py
  (MarkupSourceHighlight): New.

* lib/config.py
  (set_defaults): Set default values for utilities.source_highlight,
    options.use_source_highlight, and options.source_highlight_line_numbers.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1526 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-02-01 16:42:48 +00:00
cmpilato b597b6a485 Minor comment tweaks.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1523 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-26 20:03:03 +00:00
rey4 bc295fb361 Interpret relative paths in viewvc.conf as being relative to the
directory where that file resides, instead of being relative to the
grandparent directory of viewvc.py. 

This change lets you set up multiple installations of ViewVC that 
share a common library directory, but are otherwise independent. It
also allows ViewVC to work more nicely with Gentoo's webapp-config.

Warning: This change may break ViewVC installations that use
VIEWVC_CONF_PATHNAME settings pointing at configuration files outside
the ViewVC install directory.

* lib/config.py
  (Config.path): new method returning paths relative to config file

* lib/viewvc.py
  (_install_path): removed function
  (get_view_template, view_cvsgraph_image, view_cvsgraph, view_doc):
    call cfg.path instead of _install_path
  (load_config): replace call to _install_path with equivalent inline
    code

* viewvc.conf.dist
    update comments referring to ViewVC install directory

* CHANGES
    document this change


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1487 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-12-20 16:37:34 +00:00
cmpilato 3e882435f2 * viewvc.conf.dist
Make some tweaks recommended in IRC by user "[1]tony" to help folks
  better understand the configuration file format and usage.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1430 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-09-28 17:51:17 +00:00
rey4 aaf85a14a6 Update the PHP CGI hack and add a comment to the config file pointing
out the CLI/CGI distinction. Thanks to Mark <mark@mitsein.net> and
Brian G. Peterson <brian@braverock.com> for bringing this issue up
on the users' list.

* lib/viewvc.py
  (markup_stream_php): update the cgi hack

* viewvc.conf.dist
  (utilities.php): add comment


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1428 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-09-27 20:06:22 +00:00
cmpilato 528d4aec3d Cleanup ViewVC's configuration and use of external utilities by
creating a new section of the configuration file strictly for defining
the locations of these helper applications.

This closes issue #229 (configurable path to sed) and issue #62
(configurable path to diff), and perhaps others I failed to find.

* viewvc.conf.dist
  Add a new "utilities" section for corraling all the various
  tool-location configurations, and relocate (with some tweaks) a
  bunch of options:
     general.rcs_path => utilities.rcs_dir
     general.cvsnt_ext_path = utilities.cvsnt
     general.svn_path => utilities.svn
     options.enscript_path => utilities.enscript
     options.highlight_path => utilities.highlight
     options.py2html_path => utilities.py2html_dir
     options.php_exe => utilities.php
     options.cvsgraph_path => utilities.cvsgraph
     utilities.diff (new)
     utilities.gzip (new)
     utilities.sed (new)
     options.use_py2html (new)

* lib/config.py
  (_sections): Add 'utilities' section.
  (Config.set_defaults): Reflect options tweaks made to
    viewvc.conf.dist in the code here.

* lib/viewvc.py
  (Request.run_viewvc): Track renamed utilities.svn option.  Now pass
    cfg.utilities into BinCVSRepository(), CCVSRepository(), and
    SubversionRepository().  Collapse now-identical
    SubversionRepository() calls.
  (markup_stream_python): Return immediately if options.use_py2html
    isn't set.  Track renamed utilities.py2html_dir option.
  (view_cvsgraph_image, view_cvsgraph): Track renamed
    utilities.cvsgraph option.
  (MarkupPHP.__init__): Track renamed utilities.php option, and allow
    for 'php' as a fallback value.
  (MarkupHighlight.__init__): Track renamed utilities.highlight option.
  (MarkupEnscript.__init__): Track renamed utilities.enscript option,
    and honor new utilities.sed option.
  (download_tarball): Use new utilities.gzip option.

* lib/vclib/__init__.py
  (_diff_fp.__init__): Add 'diff_cmd' parameter.

* lib/vclib/svn/__init__.py
  (SubversionRepository.__init__): Drop 'svn_path' parameter, and now
    accept 'utilities'.
  (SubversionRepository.rawdiff): Pass self.diff_cmd to _diff_fp().

* lib/vclib/svn_ra/__init__.py
  (SubversionRepository.rawdiff): Pass self.diff_cmd to _diff_fp().

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.rawdiff): Pass self.utilities.diff or 'diff' to _diff_fp().

* lib/vclib/bincvs/__init__.py
  (CVSRepository.__init__): Add 'utilities' parameter.
  (BinCVSRepository.__init__): Lose as no-longer-necessary.
  (BinCVSRepository.rcs_popen): Track renamed options, and renamed
    member variable that hold those options.

* docs/upgrading-howto.html
  Note these options changes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1407 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-28 11:04:12 +00:00
cmpilato df68135a6f Add some helpful text and warnings to the sample conf file, closing issue 248.
* viewvc.conf.dist
  Add a skeletal glossary of sorts, and warn that "forbidden" is only for
  modules, not roots.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1374 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-07-12 04:18:39 +00:00
rey4 c195eb1e46 Restore ViewCVS 0.9.x behavior when "checkout_magic" option is disabled
so disabling it doesn't break compatibility with old log URLs.

Add new "default_file_view" option so people who won't miss the old log
URLs can view static HTML sites in ViewVC without using checkout_magic.

Also, deprecate the "checkout_magic" option and make it disabled by
default. Don't want that last part to get lost, so I'll repeat:

  =================================================================
   WARNING: This commit changes the default "checkout_magic" value
  =================================================================

Reasons for disabling "checkout_magic" by default include the security
hole it leaves for people trying to do URL authorization and its general
ugliness. People who actually use "checkout_magic" for the static HTML
browsing should prefer the "default_file_view" syntax now that it
is available. And people who really need "checkout_magic" for the
compatibility with ViewCVS 0.9.x log URLs can easily enable it.

* lib/viewvc.py
  (Request.run_viewvc, Request.get_link):
     handle "checkout_magic" and "default_file_view" options

* lib/config.py
* viewvc.conf.dist
    add "default_file_view" option and disable "checkout_magic" by default

* CHANGES
* viewvc.org/upgrading.html
* viewvc.org/url-reference.html
    update documentation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1311 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-04 03:11:02 +00:00
rey4 fe995627d3 Get rid of Highlight line number workaround. Highlight 2.4.5 came out
yesterday and fixes all the issues we had with line numbering. This change
also allows ViewVC to work with old versions of Highlight all the way back
to 2.2.10.

Also, remove "highlight_style" configuration option as suggested by
Andreas Amann (aamann) in issue 126.

* INSTALL
    document new version requirements
    
* lib/viewvc.py
  (MarkupHighlight.__init__):
    stop passing --style and --line-number-start options to highlight

* lib/config.py
* viewvc.conf.dist
* viewvc.org/upgrading.html
    remove "highlight_style" option


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1292 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-21 22:47:11 +00:00
rey4 f74711446f Finish issue 168, the project rename. Change is mostly based on the patch
from Gerard Gerritsen (sigcafe), with some other stuff thrown in.

* bin/asp/viewcvs.asp
* bin/asp/viewvc.asp
* bin/cgi/viewcvs-strace.sh
* bin/cgi/viewvc-strace.sh
* bin/cgi/viewcvs.cgi
* bin/cgi/viewvc.cgi
* bin/mod_python/viewcvs.py
* bin/mod_python/viewvc.py
* lib/viewcvs.py
* lib/viewvc.py
* viewcvs.conf.dist
* viewvc.conf.dist
    the file renames

* bin/cvsdbadmin
* bin/loginfo-handler
* bin/svndbadmin
* bin/asp/query.asp
* bin/cgi/query.cgi
* bin/mod_python/query.py
* bin/make-database
* bin/standalone.py
* lib/debug.py
* lib/compat.py
* lib/blame.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/bincvs/__init__.py
* lib/query.py
* lib/config.py
* lib/dbi.py
* lib/sapi.py
* INSTALL
* TODO
* cvsgraph.conf.dist
* tests/timelog.py
* tools/make-release
* tparse/tparsemodule.h
* tparse/Setup.py
* tparse/INSTALL
* tparse/tparsemodule.cpp
* tparse/tparse.h
* tparse/tparse.cpp
* windows/README
* viewcvs-install
* viewvc.org/index.html
* viewvc.org/contributing.html
* viewvc.org/template-authoring-guide.html
* viewvc.org/upgrading.html
* viewvc.org/license-1.html
    the other changes



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1287 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-18 00:33:54 +00:00