You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by mx...@apache.org on 2011/12/08 22:57:38 UTC
svn commit: r1212149 [1/5] - in /tcl/rivet/trunk: ./ doc/ doc/examples-sgml/
doc/examples/ doc/xml/ m4/ rivet/ rivet/rivet-tcl/ src/ src/apache-2/
tests/ tests/apachetest/ tests/docroot1/ tests/docroot2/
Author: mxmanghi
Date: Thu Dec 8 21:57:35 2011
New Revision: 1212149
URL: http://svn.apache.org/viewvc?rev=1212149&view=rev
Log:
2011-12-08 Massimo Manghi <mx...@apache.org>
* trunk/: Final commit merging changes to scoping commands in the ::rivet namespace
Added:
tcl/rivet/trunk/doc/examples/download.tcl
- copied unchanged from r1211714, tcl/rivet/branches/rivet-namespace/doc/examples/download.tcl
tcl/rivet/trunk/doc/examples/rivet_web_service.tcl
- copied unchanged from r1211714, tcl/rivet/branches/rivet-namespace/doc/examples/rivet_web_service.tcl
tcl/rivet/trunk/doc/examples/upload.rvt
- copied unchanged from r1211714, tcl/rivet/branches/rivet-namespace/doc/examples/upload.rvt
tcl/rivet/trunk/doc/examples/vars.rvt
- copied unchanged from r1211714, tcl/rivet/branches/rivet-namespace/doc/examples/vars.rvt
tcl/rivet/trunk/m4/ax_compare_version.m4
- copied unchanged from r1211714, tcl/rivet/branches/rivet-namespace/m4/ax_compare_version.m4
tcl/rivet/trunk/rivet/rivet-tcl/tablearray.tcl
- copied unchanged from r1211714, tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/tablearray.tcl
tcl/rivet/trunk/tests/docroot1/basic1.rvt
- copied unchanged from r1211714, tcl/rivet/branches/rivet-namespace/tests/docroot1/basic1.rvt
tcl/rivet/trunk/tests/docroot2/basic2.rvt
- copied unchanged from r1211714, tcl/rivet/branches/rivet-namespace/tests/docroot2/basic2.rvt
Removed:
tcl/rivet/trunk/rivet/rivet-tcl/incr0.tcl
Modified:
tcl/rivet/trunk/ (props changed)
tcl/rivet/trunk/ChangeLog
tcl/rivet/trunk/INSTALL
tcl/rivet/trunk/Makefile.in
tcl/rivet/trunk/README
tcl/rivet/trunk/VERSION
tcl/rivet/trunk/configure.ac
tcl/rivet/trunk/doc/ (props changed)
tcl/rivet/trunk/doc/convert_examples.tcl.in (contents, props changed)
tcl/rivet/trunk/doc/examples-sgml/download.tcl
tcl/rivet/trunk/doc/examples-sgml/rivet_web_service.tcl
tcl/rivet/trunk/doc/examples-sgml/upload.rvt
tcl/rivet/trunk/doc/examples-sgml/vars.rvt
tcl/rivet/trunk/doc/rivet.xml
tcl/rivet/trunk/doc/xml/commands.xml
tcl/rivet/trunk/doc/xml/directives.xml
tcl/rivet/trunk/doc/xml/examples.xml
tcl/rivet/trunk/doc/xml/install.xml
tcl/rivet/trunk/doc/xml/packages.xml
tcl/rivet/trunk/doc/xml/request.xml
tcl/rivet/trunk/m4/ax_prefix_config_h.m4
tcl/rivet/trunk/rivet/init.tcl
tcl/rivet/trunk/rivet/rivet-tcl/cookie.tcl
tcl/rivet/trunk/rivet/rivet-tcl/debug.tcl
tcl/rivet/trunk/rivet/rivet-tcl/html.tcl
tcl/rivet/trunk/rivet/rivet-tcl/import_keyvalue_pairs.tcl
tcl/rivet/trunk/rivet/rivet-tcl/import_switch_args.tcl
tcl/rivet/trunk/rivet/rivet-tcl/lassign.tcl
tcl/rivet/trunk/rivet/rivet-tcl/lempty.tcl
tcl/rivet/trunk/rivet/rivet-tcl/lmatch.tcl
tcl/rivet/trunk/rivet/rivet-tcl/load_cookies.tcl
tcl/rivet/trunk/rivet/rivet-tcl/load_response.tcl
tcl/rivet/trunk/rivet/rivet-tcl/parray.tcl
tcl/rivet/trunk/rivet/rivet-tcl/random.tcl
tcl/rivet/trunk/rivet/rivet-tcl/read_file.tcl
tcl/rivet/trunk/rivet/rivet-tcl/rivet_command_document.tcl
tcl/rivet/trunk/rivet/rivet-tcl/tclIndex
tcl/rivet/trunk/rivet/rivet-tcl/wrap.tcl
tcl/rivet/trunk/src/Makefile.am
tcl/rivet/trunk/src/apache-2/Makefile.am
tcl/rivet/trunk/src/apache-2/apache_request.c
tcl/rivet/trunk/src/apache-2/mod_rivet.c
tcl/rivet/trunk/src/apache-2/mod_rivet.h
tcl/rivet/trunk/src/apache-2/rivetCore.c
tcl/rivet/trunk/src/parserPkgInit.c
tcl/rivet/trunk/src/rivet.h (contents, props changed)
tcl/rivet/trunk/src/rivetCrypt.c
tcl/rivet/trunk/src/rivetList.c
tcl/rivet/trunk/src/rivetPkgInit.c
tcl/rivet/trunk/src/rivetWWW.c
tcl/rivet/trunk/tests/apachetest/apachetest.tcl
tcl/rivet/trunk/tests/binary.rvt
tcl/rivet/trunk/tests/binary.test
tcl/rivet/trunk/tests/broken.rvt
tcl/rivet/trunk/tests/broken.test
tcl/rivet/trunk/tests/channel.rvt
tcl/rivet/trunk/tests/config.rvt
tcl/rivet/trunk/tests/config.test
tcl/rivet/trunk/tests/cookies.rvt
tcl/rivet/trunk/tests/docroot1/afterscript.tcl
tcl/rivet/trunk/tests/docroot1/beforescript.tcl
tcl/rivet/trunk/tests/docroot1/childinit.tcl
tcl/rivet/trunk/tests/docroot1/vhost1.rvt
tcl/rivet/trunk/tests/docroot2/afterscript.tcl
tcl/rivet/trunk/tests/docroot2/beforescript.tcl
tcl/rivet/trunk/tests/docroot2/vhost2.rvt
tcl/rivet/trunk/tests/env.rvt
tcl/rivet/trunk/tests/get.rvt
tcl/rivet/trunk/tests/get.test
tcl/rivet/trunk/tests/headers.rvt
tcl/rivet/trunk/tests/headers.test
tcl/rivet/trunk/tests/include.html
tcl/rivet/trunk/tests/include.rvt
tcl/rivet/trunk/tests/include.test
tcl/rivet/trunk/tests/lang.test
tcl/rivet/trunk/tests/makeurl.rvt
tcl/rivet/trunk/tests/makeurl.test
tcl/rivet/trunk/tests/parse.rvt
tcl/rivet/trunk/tests/post.rvt
tcl/rivet/trunk/tests/post.test
tcl/rivet/trunk/tests/rivet.test
tcl/rivet/trunk/tests/runtests.tcl
tcl/rivet/trunk/tests/upload.rvt
tcl/rivet/trunk/tests/uploadsave.rvt
tcl/rivet/trunk/tests/virtualhost.test
Propchange: tcl/rivet/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 8 21:57:35 2011
@@ -1,3 +1,4 @@
/tcl/rivet/branches/2_0:939332-1027850
/tcl/rivet/branches/master-interp:1062190-1065801
/tcl/rivet/branches/neh:1069501-1076014
+/tcl/rivet/branches/rivet-namespace:1065843-1211714
Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Thu Dec 8 21:57:35 2011
@@ -1,3 +1,62 @@
+2011-12-08 Massimo Manghi <mx...@apache.org>
+ * trunk/: Final commit merging changes to scoping commands in the ::rivet namespace
+
+2011-12-07 Massimo Manghi <mx...@apache.org>
+ * doc/examples, doc/convert_examples.tcl.in: Add ::rivet namespace to examples and
+ examples code converter
+ * doc/examples/*.rvt: removed unneeded sgml chars escaping
+ * doc/xml/install.xml: removed duplicated entry of a 'configure' switch
+
+2011-12-06 Massimo Manghi <mx...@apache.org>
+ * rivet/rivet-tcl/tablearray.tcl: new procedure 'tablearray' prints an array content
+ in an HTML <table> construct. Test procedure, we maybe want to have something more
+ general for printing also dictionaries.
+
+2011-12-06 Massimo Manghi <mx...@apache.org>
+ * configure_ac: add new test on Tcl version using AX_VERSION_COMPARE.
+
+2011-12-06 Massimo Manghi <mx...@apache.org>
+ * doc/xml/request.xml,doc/xml/install.xml: documenting new configure switches
+
+2011-12-05 Massimo Manghi <mx...@apache.org>
+ * src/apache-2/mod_rivet.c: child init sets also the array module_conf to signal the
+ compilation flags --enable-rivet-commands-export and --enable-import-namespace-commands
+ for the benefit of init.tcl
+ * configure.ac: new macro created to handle --enable-rivet-commands-export and
+ --enable-import-namespace-commands
+ * rivet/init.tcl: module_conf signals when commands have to be exported from ::rivet
+ and when they have to be implicitly imported into the global namespace for compatibility
+ with previous versions of Rivet.
+
+2011-11-21 Massimo Manghi <mx...@apache.org>
+ * doc/xml/directives.xml,doc/xml/commands.xml: removed note about 'rivetlib' package
+ no more needed. Notes about ServerInitScript not having effect when virtual hosts
+ have their own private slave interpreters.
+
+2011-11-20 Massimo Manghi <mx...@apache.org>
+ * doc/xml/commands.xml,doc/xml/install.xml: documentation for building Rivet updated.
+ * configure.ac: corrected help message for --disable-rivet-commands-export
+
+2011-11-20 Massimo Manghi <mx...@apache.org>
+ * src/rivet.h: Macro definition for Rivet command objects has rolled back to
+ its previous form and doesn't call Tcl_Export anymore. In case commands are
+ exported by calling Tcl_Export in rivetCore.c and rivetPkgInit.c
+ * tests/*: test suite reviewed for new tests
+
+2011-11-16 Massimo Manghi <mx...@apache.org>
+ * src/apache-2/rivetCore.c: code rationalization. namespace reference will not be
+ passed to the RIVET_OBJ_COMMAND macro and commands are exported by calling Tcl_Export
+ on the whole command set in ::rivet. The whole process is controlled by the macro
+ symbol RIVET_NAMESPACE_EXPORT
+ * src/rivet.h: only one RIVET_OBJ_COMMAND object exists now. Call to Rivet_WWWInit,
+ Rivet_CryptInit and Rivet_ListInit haved changed. Rivet namespace pointer in not
+ passed around anymore and it's handled only in rivetPkgInit.c
+ * src/rivetPkgInit.c:
+
+2011-11-14 Massimo Manghi <mx...@apache.org>
+ * configure.ac: new switch --enable-rivet-commands-export to enable/disable
+ commands in ::rivet namespace
+
2011-11-12 Massimo Manghi <mx...@apache.org>
* src/apache-2/rivetCore.c: reindented to improve readability.
* doc/xml/commands.xml: typo corrected
@@ -18,6 +77,13 @@
changes done in the process of releasing the Debian package
for 2.0.4
+2011-09-26 Massimo Manghi <mx...@apache.org>
+ * m4/ax_compare_version.m4: add macro for version comparison from the GNU macro archive
+
+2011-09-23 Massimo Manghi <mx...@apache.org>
+ * src/apache-2/rivetCore.c,src/apache-2/TclWebapache.c: merging changes
+ made to fix bugs and requests to command 'makeurl', 'load_env' and 'load_headers'
+
2011-09-07 Massimo Manghi <mx...@apache.org>
* doc/xml/commands.xml: Add existing undocumented commands
- import_keyvalue_pairs
@@ -53,7 +119,7 @@
2011-05-09 Massimo Manghi <mx...@apache.org>
* src/apache-2/mod_rivet.c: fixed misleading error message displayed when rivet_abort_script fails
- *
+
2011-05-05 Massimo Manghi <mx...@apache.org>
* configure.ac: APACHE_VERSION returns an error message for--with-apache-version=1.
* src/apache-1/: removed from trunk
@@ -64,6 +130,17 @@
* configure.ac: doc/convert_examples.tcl is generated from template: added to AC_CONFIG_FILES
* debian/changelog,debian/control: changed to reflect improvement in the script for Debian
+2011-06-07 Massimo Manghi <mx...@apache.org>
+ * rivet/init.tcl: because of bug #3216070 of Tcl we cannot preload rivetlib, so it doesn't make
+ sense to import the rivet namespace, because we cannot have all the command set loaded in and
+ an import has to be done for them in the application scripts
+ * rivet/rivet-tcl/incr0.tcl: Tcl8.5 provides identical functionalities, so this command is
+ now aliased in the interpreter by the native incr command.
+ * rivet/rivet-tcl/tclIndex: recreated
+
+2011-04-06 Massimo Manghi <mx...@apache.org>
+ * configure.ac: Added doc/convert_examples.tcl to files created from its .in template
+
2011-04-03 Massimo Manghi <mx...@apache.org>
* doc/convert_examples.tcl.in,doc/convert_examples.tcl: Added script to convert code examples
from their native form to a sgml escaped form.
@@ -78,9 +155,22 @@
* doc/convert_examples.tcl: New procedure that check for changes in doc/examples and, if needed,
creates/recreates the corrisponding file in doc/examples-sgml escaping characters
+2011-03-03 Massimo Manghi <mx...@apache.org>
+ * rivet/rivet-tcl/*.tcl: all the commands in here moved into ::rivet namespace. File tclIndex
+ recreated
+ * doc/xml/directives.xml,doc/xml/commands.tcl: Documentation changed to reflect the new scoping of
+ the command set. Commands in rivet-tcl/ not yet documented have been briefly explained with some
+ examples.
+ * src/apache-2/mod_rivet.[c|h],src/apache-2/rivetCore.c: changes in trunk merged into the
+ rivet-namespace branch
+
2011-03-01 Massimo Manghi <mx...@apache.org>
* src/apache-2/rivetCode.c: 'abort_code' command is now created through the RIVET_CMD_OBJ macro
+2011-02-18 Massimo Manghi <mx...@apache.org>
+ * src/rivet.h,src/apache-2/rivetCore.c,src/rivetPkgInit.c: Core commands namespace is now '::rivet' and
+ the package provided by the core module is "::rivet". Also package RivetLib was renamed as 'rivetlib'.
+
2011-02-14 Karl Lehenbauer <ka...@apache.org>
* src/apache-2/mod_rivet.c: Only create root interpreter once, not twice.
In Rivet_CopyConfig cache_size and cache_free were getting copied twice.
@@ -88,11 +178,41 @@
* src/apache-2/rivetCore.c: Remove unused command var from Rivet_Upload.
Remove unneeded loglevel var from Rivet_LogErrorCmd.
+2011-02-14 Massimo Manghi <mx...@apache.org>
+ * src/apache-2/mod_rivet.[h|c],src/apache-2/rivetCore.c: Removed loading of RivetLib by default. Getting
+ RivetLib into the module keeps Apache to segfault in other calls. In order to gain access to commands
+ provided by RivetLib (formerly called Rivet) a 'package require RivetLib' must be in a Rivet script or
+ in one of the initialization script (e.g. ServerInitScript ChildInitScript or GlobalInitScript). Notice:
+ RivetLib exports the commands to the '::Rivet' namespace.
+ * src/rivetCrypt.c, src/rivetWWW.c, src/rivetList.c: they now export their commands to the '::Rivet'
+
2011-02-11 Massimo Manghi <mx...@apache.org>
* src/apache-2/mod_rivet.[c|h]: new conf scripts rivet_abort_script and rivet_force_script. rivet_abort_script
is run when an abort_page command is called in the page content generation
* src/apache-2/rivetCode.c: add new command abort_code that returns the code passed to abort_page
+2011-02-08 Massimo Manghi <mx...@apache.org>
+ * src/apache-2/rivetCore.c: call to Rivet_InitWWW to include into Rivet's core the commands provided in
+ src/rivetWWW.c
+ * src/apache-2/mod_rivet.c: the inclusion into the module of RivetLib through Tcl_PkgRequire proved
+ to cause segfaults in Rivet_ServerConf. The commands in rivetWWW.c are temporarily loaded by rivetCore.c
+ * src/apache-2/Makefile.am: build of mod_rivet.so includes also code from src/libWWW.o
+
+2011-02-07 Massimo Manghi <mx...@apache.org>
+ * branches/rivet-namespace: new branch to experiment with the Rivet namespace and Rivet package
+ * src/rivetPkgInit.c: Provides RivetLib package now when loaded by mod_rivet. Commands are now
+ in the ::Rivet namespace
+ * src/rivet.h: new macro RIVET_OBJ_CMD creates a command in the ::Rivet namespace
+ and puts the command object on the namespace export list
+ * src/apache-2/mod_rivet.h: the globals structure now holds a pointer to the Tcl_Namespace object
+ representing ::Rivet namespace
+ * src/apache-2/rivetCore.c: commands are now created with the RIVET_OBJ_CMD macro
+ * rivet/init.tcl: provides package RivetTcl 2.1. This makes possible to consistently peek the
+ init.tcl associated to the module. Command 'incr0' is now aliased by Tcl standard 'incr'
+ * rivet/apache-2/mod_rivet.c: Rivet_PerInterpInit loads package RivetTcl 2.1 and package RivetLib 1.2.
+ the latter ships the commands in rivetWWW.c rivetCrypt.c and rivetList.c
+ * rivet/rivet-tcl/tclIndex: Command 'incr0' removed (see init.tcl)
+
2011-01-31 Massimo Manghi <mx...@apache.org>
* configure.ac: default value for directive SeparateVirtualInterps changed to 'yes'.
* VERSION: version number set as 2.1.0r1 ('r' is for 'revision')
Modified: tcl/rivet/trunk/INSTALL
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/INSTALL?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/INSTALL (original)
+++ tcl/rivet/trunk/INSTALL Thu Dec 8 21:57:35 2011
@@ -1,4 +1,4 @@
- Rivet 2.0 Installation
+ Rivet 2.1 Installation
======================
For more detailed instructions, see the docs/html/ directory.
@@ -16,7 +16,7 @@ Example:
--with-apxs=/usr/bin/apxs \
--with-tclsh=/usr/bin/tclsh8.5 \
--with-apache-version=2 \
- --with-rivet-target-dir=/usr/lib/rivet2.0 \
+ --with-rivet-target-dir=/usr/lib/rivet2.1 \
--enable-version-display
2) if 'configure' was successful Rivet is ready for compilation
@@ -36,24 +36,24 @@ if your configuration doesn't require yo
Along with the usual 'configure' variables Rivet's configure script
handles other specific options.
---with-tcl=DIR Directory where tclConfig.sh is
- stored. This is a shell script that
- defines all the relevant symbols needed
- to build Tcl related applications.
---with-apache-version=VER Values are 1 or 2 depending
- on the apache server you're
- builing the module for.
---with-apache=DIR Apache server's root directory.
---with-apxs=FILE Path to the apxs program to
- be used in the compilation
- process.
---with-apache-include=DIR Apache's include files path.
---with-apr-config=FILE Apache Portable Runtime
- metainformation program
+--with-tcl=DIR Directory where tclConfig.sh is
+ stored. This is a shell script that
+ defines all the relevant symbols needed
+ to build Tcl related applications.
+--with-apache-version=VER Values are 1 or 2 depending
+ on the apache server you're
+ builing the module for.
+--with-apache=DIR Apache server's root directory.
+--with-apxs=FILE Path to the apxs program to
+ be used in the compilation
+ process.
+--with-apache-include=DIR Apache's include files path.
+--with-apr-config=FILE Apache Portable Runtime
+ metainformation program
--with-rivet-target-dir=DIR Rivet library installation directory.
---enable-version-display Apache signature shows Rivet
- version number in the form Rivet/2.0.x.
- Default=no
+--enable-version-display Apache signature shows Rivet
+ version number in the form Rivet/2.0.x.
+ Default=no
These are the basic Apache configuration directives that are needed:
@@ -74,7 +74,7 @@ located. E.g.: on a Debian system apxs f
./configure --with-apache-include=/usr/include/apr-1.0 \
--with-apache-version=2 --with-apxs=/usr/bin/apxs2 \
- --with-tcl=/usr/lib/tcl8.4 --with-apache=/usr
+ --with-tcl=/usr/lib/tcl8.6 --with-apache=/usr
Here is another example reported by a user who successfully built
Rivet on Slackware 12.1
Modified: tcl/rivet/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/Makefile.in?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/Makefile.in (original)
+++ tcl/rivet/trunk/Makefile.in Thu Dec 8 21:57:35 2011
@@ -51,10 +51,10 @@ DIST_COMMON = README $(am__configure_dep
tclconfig/config.sub tclconfig/depcomp tclconfig/install-sh \
tclconfig/ltmain.sh tclconfig/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/tclconfig/tcl.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/tclconfig/tcl.m4 \
$(top_srcdir)/tclconfig/libtool.m4 \
$(top_srcdir)/m4/ax_prefix_config_h.m4 \
$(top_srcdir)/configure.ac
@@ -188,6 +188,7 @@ MANIFEST_TOOL = @MANIFEST_TOOL@
MATH_LIBS = @MATH_LIBS@
MAX_POST = @MAX_POST@
MKDIR_P = @MKDIR_P@
+MOD_RIVET_INCLUDES = @MOD_RIVET_INCLUDES@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
Modified: tcl/rivet/trunk/README
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/README?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/README (original)
+++ tcl/rivet/trunk/README Thu Dec 8 21:57:35 2011
@@ -20,4 +20,16 @@ Symptom of the problem is when cgi scrip
to the client
+ RIVET NAMESPACE
+ ===============
+
+ - With the intruduction of the Rivet namespace the command set has been
+moved into '::rivet' and should now be fully qualified. Commands are exported
+though and can be imported in the global namespace, but whenever possible this
+is deprecated. Putting the following code in the Server Conf should guarantee
+compatibility with existing scripts
+
+RivetServerConf ServerInitScript "package require rivet"
+RivetServerConf ServerInitScript "package require rivetlib"
+RivetServerConf ServerInitScript "namespace import --force ::rivet::*"
Modified: tcl/rivet/trunk/VERSION
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/VERSION?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/VERSION (original)
+++ tcl/rivet/trunk/VERSION Thu Dec 8 21:57:35 2011
@@ -1 +1 @@
-2.1.0r1
+2.1.0a1
Modified: tcl/rivet/trunk/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/configure.ac?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/configure.ac (original)
+++ tcl/rivet/trunk/configure.ac Thu Dec 8 21:57:35 2011
@@ -22,7 +22,7 @@ dnl
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------
-AC_INIT([Rivet],[2.1.0r1])
+AC_INIT([Rivet],[2.1.0a1])
TEA_INIT([3.9])
AC_CONFIG_AUX_DIR(tclconfig)
@@ -365,7 +365,25 @@ AC_DEFUN([APR_HANDLING],[
fi
])
-# apache version
+
+#--------------------------------------------------------------------
+# 6-Dec-2011: Introducing new ::rivet namespace. Some components
+# (namely RivetTcl, providing Tcl level initialization) are required
+# within mod_rivet.c. Unfortunalely Tcl < 8.5.10 loaded shared
+# libs exporting names that clashed with Apache's own namespace and,
+# hence we have to make sure we are running a Tcl compatible version.
+# (See bug #3216070). If you're running Tcl < 8.5.10 we won't go any
+# further ahead...
+
+AX_COMPARE_VERSION([$TCL_VERSION$TCL_PATCH_LEVEL],[lt],[8.5.10],[
+ AC_MSG_ERROR([Rivet 2.1 requires Tcl > 8.5.10 (current is $TCL_VERSION$TCL_PATCH_LEVEL)])
+] , [
+ AC_MSG_NOTICE([ok, we are running Tcl $TCL_VERSION$TCL_PATCH_LEVEL])
+])
+
+
+
+# APACHE_VERSION
#
# let's determine whether we are building for apache1.x or apache2.x.
# This variable has consequences on the default values for the remaining
@@ -381,13 +399,14 @@ AC_DEFUN([APACHE_VERSION],[
AC_MSG_CHECKING(for apache version)
if test "$with_apache_version" = "1"; then
- AC_MSG_ERROR([Apache 1.x no more supported])
+ AC_MSG_ERROR([Apache 1.x no more supported starting with Rivet 2.1])
else
AC_MSG_RESULT( building for apache 2.x )
AC_CONFIG_FILES([src/apache-2/Makefile])
apache_version_dir="apache-2"
AC_DEFINE(APACHE2,1,[APACHE2 definition in config.h])
fi
+ MOD_RIVET_INCLUDES="-I ${apache_version_dir}"
])
AC_DEFUN([HANDLE_TCL_PACKAGE_PATH],[
@@ -500,6 +519,53 @@ AC_DEFUN([HONOR_HEAD_REQUESTS],[
fi
])
+# RIVET_COMMANDS_EXPORT (--enable-rivet-commands-export).
+# Enable export of commands in Rivet's namespace. Definining this symbols
+# sets the boolean configuration variable rivet_commands_export
+# Default: yes
+
+AC_DEFUN([RIVET_COMMANDS_EXPORT],[
+ AC_ARG_ENABLE(
+ rivet-commands-export,
+ [ --disable-rivet-commands-export to prevent export from ::rivet namespace],
+ [ rivet_commands_export=$enable_rivet_commands_export ],
+ [ rivet_commands_export="yes"]
+ )
+
+ AC_MSG_CHECKING(whether the commands in ::rivet namespace will be exported)
+ if test "$rivet_commands_export" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(NAMESPACE_EXPORT,1,[commands will be exported])
+ else
+ AC_MSG_RESULT([no])
+ AC_DEFINE(NAMESPACE_EXPORT,0,[commands will not be exported])
+ fi
+])
+
+# IMPORT_RIVET_COMMANDS (--enable-import-rivet-commands).
+# For compatibility the module can be compiled and installed forcing rivet
+# to import commands from ::rivet into the global namespace.
+# Default: yes
+
+AC_DEFUN([IMPORT_RIVET_COMMANDS],[
+ AC_ARG_ENABLE(
+ import-rivet-commands,
+ [ --disable-import-rivet-commands requires explicit namespace import if required],
+ [ import_rivet_commands=$enable_import_rivet_commands],
+ [ import_rivet_commands="yes"]
+ )
+
+ AC_MSG_CHECKING(if ::rivet namespace will be automatically imported for compatibility)
+ if test "$import_rivet_commands" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(NAMESPACE_IMPORT,1,[commands will be imported into the global namespace])
+ else
+ AC_MSG_RESULT([no])
+ AC_DEFINE(NAMESPACE_IMPORT,0,[good, no automatic import will be done])
+ fi
+])
+
+
# SEPARATE_VIRTUAL_INTERPS (--enable-virtual-interps-separation)
# Virtual hosts get their own interpreter and configuration. Different
# applications running on different virtual hosts don't mix up variables
@@ -514,7 +580,7 @@ AC_DEFUN([VIRTUAL_INTERPS_SEPARATION],[
[ separate_virtual_interps="yes"]
)
- AC_MSG_CHECKING(whether Rivet will crate an interpreter for each virtual host)
+ AC_MSG_CHECKING(whether Rivet will create an interpreter for each virtual host)
if test "$separate_virtual_interps" = "yes"; then
AC_MSG_RESULT([yes])
AC_DEFINE(SEPARATE_VIRTUAL_INTERPS,1,[virtual hosts will have their own interp])
@@ -580,7 +646,16 @@ HONOR_HEAD_REQUESTS
VIRTUAL_INTERPS_SEPARATION
POST_MAX_SIZE
UPLOAD_TO_VAR
+IMPORT_RIVET_COMMANDS
+if test $import_rivet_commands = "yes"; then
+ AC_MSG_NOTICE([forcing Rivet to export commands from ::rivet namespace])
+ AC_DEFINE(NAMESPACE_EXPORT,1,[commands will be exported])
+else
+ RIVET_COMMANDS_EXPORT
+fi
+
AC_SUBST(apache_version_dir)
+AC_SUBST(MOD_RIVET_INCLUDES)
AC_DEFINE_UNQUOTED(RIVETLIB_DESTDIR,"${RIVET_TCL_TARGET}",[The path to the rivet tcl library])
AC_DEFINE_UNQUOTED(NAMEOFEXECUTABLE,"${TCLSH_PROG}",[The path to a working tclsh executable])
Propchange: tcl/rivet/trunk/doc/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Dec 8 21:57:35 2011
@@ -0,0 +1,3 @@
+/tcl/rivet/branches/2_0/doc:939332-1027850
+/tcl/rivet/branches/master-interp/doc:1062190-1065801
+/tcl/rivet/branches/rivet-namespace/doc:1065843-1211714
Modified: tcl/rivet/trunk/doc/convert_examples.tcl.in
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/convert_examples.tcl.in?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/convert_examples.tcl.in (original)
+++ tcl/rivet/trunk/doc/convert_examples.tcl.in Thu Dec 8 21:57:35 2011
@@ -1,7 +1,7 @@
-# convert_examples --
+# convert_examples.tcl --
#
#
-# reads the examples dir, checks if a file had been already converted
+# reads the examples dir, checks if a file has been already converted
# in <target-dir> and compares their mtimes. If the file in
# <source-dir> is more recent the target dir is recreated.
@@ -9,20 +9,20 @@
# into text suitable to be inclued and displayed in XML/XHTML
# documentation
-# NOTICE: This script requires Rivet the rivet scripts and
-# libraries in the auto_path.
+# NOTICE: This script requires Rivet, its scripts and
+# libraries to be in the auto_path.
# usage:
#
# tclsh ./convert_examples
#
-# $Id: $
+# $Id$
#
lappend auto_path @RIVET_TCL_TARGET@
lappend auto_path [file join @RIVET_TCL_TARGET@ rivet-tcl]
-package require Rivet
+package require rivetlib
set source_dir examples
set target_dir examples-sgml
@@ -44,12 +44,11 @@ foreach example $source_examples {
puts "$example needs rebuild"
- set example_text [read_file $example]
+ set example_text [::rivet::read_file $example]
set example_sgml_fid [open $example_sgml w+]
- puts $example_sgml_fid [escape_sgml_chars $example_text]
+ puts $example_sgml_fid [::rivet::escape_sgml_chars $example_text]
close $example_sgml_fid
-
}
}
Propchange: tcl/rivet/trunk/doc/convert_examples.tcl.in
------------------------------------------------------------------------------
svn:keywords = Id
Modified: tcl/rivet/trunk/doc/examples-sgml/download.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/examples-sgml/download.tcl?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/examples-sgml/download.tcl (original)
+++ tcl/rivet/trunk/doc/examples-sgml/download.tcl Thu Dec 8 21:57:35 2011
@@ -1,7 +1,7 @@
# Code example for the transmission of a pdf file.
-if {[var exists pdfname]} {
- set pdfname [var get pdfname]
+if {[::rivet::var exists pdfname]} {
+ set pdfname [::rivet::var get pdfname]
# let's build the full path to the pdf file. The 'pdf_repository'
# directory must be readable by the apache children
@@ -14,9 +14,9 @@ if {[var exists pdfname]} {
# original one. In this case, this is the point where a new file name
# must be generated.
- headers type "application/pdf"
- headers add Content-Disposition "attachment; filename=${pdfname}.pdf"
- headers add Content-Description "PDF Document"
+ ::rivet::headers type "application/pdf"
+ ::rivet::headers add Content-Disposition "attachment; filename=${pdfname}.pdf"
+ ::rivet::headers add Content-Description "PDF Document"
# The pdf is read and stored in a Tcl variable. The file handle is
# configured for a binary read: we are just shipping raw data to a
@@ -24,21 +24,21 @@ if {[var exists pdfname]} {
# that is able to retrieve the data to be sent from any data source
# (e.g. database, external program, other Tcl code)
- set paper [open $pdf_full_path r]
- fconfigure $paper -translation binary
- set pdf [read $paper]
- close $paper
+ set paper [open $pdf_full_path r]
+ fconfigure $paper -translation binary
+ set pdf [read $paper]
+ close $paper
# Now we got the data: let's tell the client how many bytes we are
# about to send (useful for the download progress bar of a dialog box)
- headers add Content-Length [string length $pdf]
+ ::rivet::headers add Content-Length [string length $pdf]
# Let's send the actual file content
- puts $pdf
+ puts $pdf
} else {
- source pdf_not_found_error.rvt
+ source pdf_not_found_error.rvt
}
} else {
source parameter_not_defined_error.rvt
Modified: tcl/rivet/trunk/doc/examples-sgml/rivet_web_service.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/examples-sgml/rivet_web_service.tcl?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/examples-sgml/rivet_web_service.tcl (original)
+++ tcl/rivet/trunk/doc/examples-sgml/rivet_web_service.tcl Thu Dec 8 21:57:35 2011
@@ -12,16 +12,17 @@
# A pseudo database. rec_id matches a record in the db
-set composers [dict create 1 { first_name Claudio middle_name "" last_name Monteverdi \
- lifespan 1567-1643 era Renaissance/Baroque} \
- 2 { first_name Johann middle_name Sebastian last_name Bach \
- lifespan 1685-1750 era Baroque } \
- 3 { first_name Ludwig middle_name "" last_name "van Beethoven" \
- lifespan 1770-1827 era Classical/Romantic} \
- 4 { first_name Wolfgang middle_name Amadeus last_name Mozart \
- lifespan 1756-1791 era Classical } \
- 5 { first_name Robert middle_name "" last_name Schumann \
- lifespan 1810-1856 era Romantic} ]
+set composers [dict create \
+ 1 {first_name Claudio middle_name "" last_name Monteverdi \
+ lifespan 1567-1643 era Renaissance/Baroque} \
+ 2 {first_name Johann middle_name Sebastian last_name Bach \
+ lifespan 1685-1750 era Baroque } \
+ 3 {first_name Ludwig middle_name "" last_name "van Beethoven" \
+ lifespan 1770-1827 era Classical/Romantic} \
+ 4 {first_name Wolfgang middle_name Amadeus last_name Mozart \
+ lifespan 1756-1791 era Classical } \
+ 5 {first_name Robert middle_name "" last_name Schumann \
+ lifespan 1810-1856 era Romantic} ]
# we use the 'load' argument in order to determine the type of query
#
@@ -29,35 +30,34 @@ set composers [dict create 1 { first_na
# load=composer&amp;res_id=<id>: the script is supposed to return the record
# having <id> as record id
-if {[var exists load]} {
+if {[::rivet::var exists load]} {
# the xml declaration is common to every message (error messages included)
set xml "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
- switch [var get load] {
+ switch [::rivet::var get load] {
catalog {
append xml "<catalog>\n"
foreach nm [dict keys $composers] {
- set first_name [dict get $composers $nm first_name]
- set middle_name [dict get $composers $nm middle_name]
- set last_name [dict get $composers $nm last_name]
+ set first_name [dict get $composers $nm first_name]
+ set middle_name [dict get $composers $nm middle_name]
+ set last_name [dict get $composers $nm last_name]
append xml " <composer key=\"$nm\">$first_name "
- if {[string length [string trim $middle_name]] > 0} {
- append xml "$middle_name "
- }
- append xml "$last_name</composer>\n"
+ if {[string length [string trim $middle_name]] > 0} {
+ append xml "$middle_name "
+ }
+ append xml "$last_name</composer>\n"
}
append xml "</catalog>\n"
}
composer {
append xml "<composer>\n"
- if {[var exists rec_id]} {
- set rec_id [var get rec_id]
+ if {[::rivet::var exists rec_id]} {
+ set rec_id [::rivet::var get rec_id]
if {[dict exists $composers $rec_id]} {
foreach {k v} [dict get $composers $rec_id] {
append xml "<$k>$v</$k>\n"
}
-
}
}
append xml "</composer>\n"
@@ -67,8 +67,8 @@ if {[var exists load]} {
# we have to tell the client this is an XML message. Failing to do so
# would result in an XMLResponse property set to null
- headers type "text/xml"
- headers add Content-Length [string length $xml]
+ ::rivet::headers type "text/xml"
+ ::rivet::headers add Content-Length [string length $xml]
puts $xml
}
Modified: tcl/rivet/trunk/doc/examples-sgml/upload.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/examples-sgml/upload.rvt?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/examples-sgml/upload.rvt (original)
+++ tcl/rivet/trunk/doc/examples-sgml/upload.rvt Thu Dec 8 21:57:35 2011
@@ -1,6 +1,6 @@
<?
-upload save MyUpload /tmp/uploadfiles/file1
-puts "Saved file [upload filename MyUpload] \
- ([upload size MyUpload] bytes) to server"
+::rivet::upload save MyUpload /tmp/uploadfiles/file1
+puts "Saved file [::rivet::upload filename MyUpload] \
+ ([::rivet::upload size MyUpload] bytes) to server"
?>
Modified: tcl/rivet/trunk/doc/examples-sgml/vars.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/examples-sgml/vars.rvt?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/examples-sgml/vars.rvt (original)
+++ tcl/rivet/trunk/doc/examples-sgml/vars.rvt Thu Dec 8 21:57:35 2011
@@ -1,57 +1,57 @@
<?
set errlist {}
-if { [var exists title] } {
- set title [var get title]
+if { [::rivet::var exists title] } {
+ set title [::rivet::var get title]
} else {
set errlist "You need to enter a title"
}
-if { [var exists salary] } {
- set salary [var get salary]
+if { [::rivet::var exists salary] } {
+ set salary [::rivet::var get salary]
if { ! [string is digit $salary] } {
- lappend errlist "Salary must be a number"
+ lappend errlist "Salary must be a number"
}
} else {
lappend errlist "You need to enter a salary"
}
-if { [var exists boss] } {
- set boss [var get boss]
+if { [::rivet::var exists boss] } {
+ set boss [::rivet::var get boss]
} else {
set boss "Mr. Burns"
}
-if { [var exists skills] } {
- set skills [var list skills]
+if { [::rivet::var exists skills] } {
+ set skills [::rivet::var list skills]
} else {
lappend errlist "You need to enter some skills"
}
if { [llength $errlist] != 0 } {
foreach err $errlist {
- puts "<b> $err </b>"
+ puts "<b> $err </b>"
}
} else {
puts "Thanks for the information!"
?>
<table>
<tbody>
- <tr>
- <td><b>Title:</b></td>
- <td><? puts $title ?></td>
- </tr>
- <tr>
- <td><b>Boss:</b></td>
- <td><? puts $boss ?></td>
- </tr>
- <tr>
- <td><b>Salary:</b></td>
- <td><? puts $salary ?></td>
- </tr>
- <tr>
- <td><b>Skills:</b></td>
- <td><? puts $skills ?></td>
- </tr>
+ <tr>
+ <td><b>Title:</b></td>
+ <td><? puts $title ?></td>
+ </tr>
+ <tr>
+ <td><b>Boss:</b></td>
+ <td><? puts $boss ?></td>
+ </tr>
+ <tr>
+ <td><b>Salary:</b></td>
+ <td><? puts $salary ?></td>
+ </tr>
+ <tr>
+ <td><b>Skills:</b></td>
+ <td><? puts $skills ?></td>
+ </tr>
</tbody>
</table>
<?
Modified: tcl/rivet/trunk/doc/rivet.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/doc/rivet.xml?rev=1212149&r1=1212148&r2=1212149&view=diff
==============================================================================
--- tcl/rivet/trunk/doc/rivet.xml (original)
+++ tcl/rivet/trunk/doc/rivet.xml Thu Dec 8 21:57:35 2011
@@ -2,29 +2,29 @@
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/committees/docbook/xml/4.1.2/docbookx.dtd" [
- <!ENTITY hello.rvt SYSTEM "examples-sgml/hello.rvt" >
- <!ENTITY table.rvt SYSTEM "examples-sgml/table.rvt" >
- <!ENTITY vars.html SYSTEM "examples-sgml/vars.html" >
- <!ENTITY vars.rvt SYSTEM "examples-sgml/vars.rvt" >
- <!ENTITY upload.html SYSTEM "examples-sgml/upload.html" >
- <!ENTITY upload.rvt SYSTEM "examples-sgml/upload.rvt" >
- <!ENTITY download.tcl SYSTEM "examples-sgml/download.tcl" >
+ <!ENTITY hello.rvt SYSTEM "examples-sgml/hello.rvt" >
+ <!ENTITY table.rvt SYSTEM "examples-sgml/table.rvt" >
+ <!ENTITY vars.html SYSTEM "examples-sgml/vars.html" >
+ <!ENTITY vars.rvt SYSTEM "examples-sgml/vars.rvt" >
+ <!ENTITY upload.html SYSTEM "examples-sgml/upload.html" >
+ <!ENTITY upload.rvt SYSTEM "examples-sgml/upload.rvt" >
+ <!ENTITY download.tcl SYSTEM "examples-sgml/download.tcl" >
<!ENTITY rivet_web_service.tcl SYSTEM "examples-sgml/rivet_web_service.tcl" >
- <!ENTITY intro.xml SYSTEM "xml/intro.xml" >
- <!ENTITY install.xml SYSTEM "xml/install.xml" >
- <!ENTITY directives.xml SYSTEM "xml/directives.xml" >
- <!ENTITY commands.xml SYSTEM "xml/commands.xml" >
- <!ENTITY examples.xml SYSTEM "xml/examples.xml" >
- <!ENTITY packages.xml SYSTEM "xml/packages.xml" >
- <!ENTITY dio.xml SYSTEM "xml/dio.xml" >
- <!ENTITY diodisplay.xml SYSTEM "xml/diodisplay.xml" >
- <!ENTITY session.xml SYSTEM "xml/session.xml" >
- <!ENTITY form.xml SYSTEM "xml/form.xml" >
- <!ENTITY calendar.xml SYSTEM "xml/calendar.xml" >
- <!ENTITY help.xml SYSTEM "xml/help.xml" >
- <!ENTITY internals.xml SYSTEM "xml/internals.xml" >
- <!ENTITY upgrade.xml SYSTEM "xml/upgrade.xml" >
- <!ENTITY request.xml SYSTEM "xml/request.xml" >
+ <!ENTITY intro.xml SYSTEM "xml/intro.xml" >
+ <!ENTITY install.xml SYSTEM "xml/install.xml" >
+ <!ENTITY directives.xml SYSTEM "xml/directives.xml" >
+ <!ENTITY commands.xml SYSTEM "xml/commands.xml" >
+ <!ENTITY examples.xml SYSTEM "xml/examples.xml" >
+ <!ENTITY packages.xml SYSTEM "xml/packages.xml" >
+ <!ENTITY dio.xml SYSTEM "xml/dio.xml" >
+ <!ENTITY diodisplay.xml SYSTEM "xml/diodisplay.xml" >
+ <!ENTITY session.xml SYSTEM "xml/session.xml" >
+ <!ENTITY form.xml SYSTEM "xml/form.xml" >
+ <!ENTITY calendar.xml SYSTEM "xml/calendar.xml" >
+ <!ENTITY help.xml SYSTEM "xml/help.xml" >
+ <!ENTITY internals.xml SYSTEM "xml/internals.xml" >
+ <!ENTITY upgrade.xml SYSTEM "xml/upgrade.xml" >
+ <!ENTITY request.xml SYSTEM "xml/request.xml" >
]>
<!--
@@ -95,7 +95,7 @@
&directives.xml;
<!-- Commands -->
- &commands.xml;
+ &commands.xml;
<!-- examples-sgml -->
&examples.xml;
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org