[Zope] [ANN] ZShellScripts v0.3 with Perl and PHP support is out

Jerome Alet alet@librelogiciel.com
Thu, 28 Nov 2002 09:07:42 +0100


Hi there,

I'm pleased to announce the immediate availability of ZShellScripts 0.3

Why would Zope only support Python Scripts ?
  
Install ZShellScripts instead.
  
ZShellScripts unifies Zope scripting facilities by providing a common
script object type and different interpreter object types to which
the script execution is delegated.

ZShellScripts is distributed under the terms of the GNU General Public
License of the Free Software Foundation.

ZShellScripts currently feature interpreters for the following
languages :

        - Python : scripts *should* work EXACTLY like native
                   Python Scripts.
                   
        - Lisp : allows Lisp scripting in Zope through William Annis'
                 PyLisp.
                 
        - Perl : allows Perl scripts to interact transparently with
                 Zope through a mix of direct access and xml-rpc
                 access.
                 
        - PHP : allows PHP scripts to access to Zope's variables, and
                will ultimately function like the Perl interpreter
                described above. PHP scripts automatically give access
                to the same variables than those defined by the PHParser 
                product, plus many more.
                
        - Unix : allows Unix (Bash only) shell scripts to access to 
                 Zope variables through the use of environment variables
                 
        - Zope : currently still under developpment. Will allow people
                 to create scripts in the Zope ZShell language, similar
                 to the language defined by the popular ZShell 
                 external method.
                 
Adding support for a new language (e.g. Tcl) should now be a matter 
of minutes !

This early release features only preliminary support for PHP. Thanks 
to the incredibly great help from Wei He, you should reasonably 
expect a more complete version soon. 

Help needed :

        - comments, bug reports, etc...
        
        - Perl, PHP and Lisp gurus are very much welcome.
        
        
============================================================

For people who want to ask why I wrote this product : 

  I don't need such a product. This was (and still is) 
  fun to write, that's all. I hope this will encourage
  people to invent new ways to use Zope, and maybe help
  people to port existing scripts in non-python language
  to Zope.
  
============================================================

SECURITY :
==========

  For security conscious people (or especially for Florent ;-) :
  --------------------------------------------------------------
  
    - ZShellScripts written in Python should be at least as 
      secure as native Zope Python Scripts. Maybe more 
      because the "Shell (Python)" objects used as Python
      interpreters can have restrictions too.
      
    - ZShellScripts written in Lisp : same as above.
    
    - ZShellScripts written in Shell, Perl or PHP languages :
    
          CARE SHOULD BE TAKEN WHEN USING THEM.
          
      They are executed at the operating system level as the
      user Zope is run as, so don't allow people to use
      "Shell (xxx)" objects if they don't have too. The
      interesting thing is that you can have people write
      ZShellScripts and different people with more rights to 
      test them (untested but should work this way).
      
      Actually they can go back to Zope only through xml-rpc, 
      and the current user and passwords are available as the
      username and password variables (i.e. $username and 
      $password in Perl or PHP) but many xml-rpc libraries
      can't authenticate easily.
      
    - ZShellScripts written in the Zope ZShell language should
      be at least as safe as the standalone original ZShell 
      external method, which implements security checkings 
      everywhere.
    
============================================================

Installation :
--------------

    If you plan to use "Shell (Perl)" objects, then 
    download and install Perl and the Perl Frontier module, get them 
    from CPAN, or if you use a Debian GNU/Linux distribution :
    
        $ apt-get install perl libfrontier-rpc-perl
        
    If you plan to use "Shell (PHP)" objects, then 
    download and install a standalone PHP4 interpreter,
    or if you use a Debian GNU/Linux distribution :
    
        $ apt-get install php4-cgi
        $ cd /usr/bin
        $ ln -s /usr/bin/php4 php
        
    The two lines above ensures that your php4 interpreter is    
    available under the simpler 'php' name.
        
    NB : there's currently a compatibility problem with PHP3.    
        
    If you plan to use "Shell (Lisp)" objects, then download
    and install William S. Annis' PyLisp from :
    
        http://www.biostat.wisc.edu/~annis/creations/
        
    PyLisp used to be distributed from within ZShellScripts    
    but this is not the case anymore because it now integrates
    the modification I did to it.
    Be sure you put the lisp.py file in a directory accessible from
    Zope (e.g. your python's site-packages directory)
    
    Finally, download and install the ZShellScript product from :
    
    http://www.librelogiciel.com/software
    
    Then, under Debian :
    
    $ cd /var/lib/zope/Products
    $ tar -zxf ~/ZShellScripts-x.xx.tar.gz
    
    restart Zope :
    
    $ /etc/init.d/zope stop
    $ /etc/init.d/zope start
    
    Installation instructions may be somewhat different on
    other systems. YMMV.
    
Alternatively you can download the CVS version hosted on :

    http://savannah.nongnu.org/projects/zshscripts 

To do so :

 $ cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/zshscripts login
    
a password is asked, just press Enter
    
 $ cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/zshscripts co ZShellScripts
 
Enjoy !

Please email bugs or comments at: alet@librelogiciel.com