[ZCM] [ZC] 1065/ 3 Comment "INSTANCE_HOME is SOFTWARE_HOME in 2.7"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri Oct 24 14:07:52 EDT 2003


Issue #1065 Update (Comment) "INSTANCE_HOME is SOFTWARE_HOME in 2.7"
 Status Resolved, Zope/bug medium
To followup, visit:
  http://zope.org/Collectors/Zope/1065

==============================================================
= Comment - Entry #3 by fdrake on Oct 24, 2003 2:07 pm

Evan said:
 > This should be fixed now, by having the bin/ scripts
 > export INSTANCE_HOME and SOFTWARE_HOME.

I'm not familiar with the 3rd-party code that's
involved, but I think this is the wrong fix.

It appears that what's happening is that the 3rd
party code is looking in the built-ins namespace
for INSTANCE_HOME before Zope is loading it's
configuration.  It should allow Zope to initialize
before attempting to access INSTANCE_HOME.

Can someone provide a link to the relevant 3rd
party software, so I can check this hypothesis?

(The recommended way to get such configuration
data in Zope 2.7 and newer is to use the App.config
module:

    from App.config import getConfiguration

    # somewhere not at module scope, when we need
    # the configuration data:

    ...
        config = getConfiguration()
        instance_home = config.instancehome

Other ways of accessing INSTANCE_HOME are still
supported after Zope has loaded it's configuration.)
________________________________________
= Resolve - Entry #2 by evan on Oct 24, 2003 1:51 pm

 Status: Pending => Resolved

This should be fixed now, by having the bin/ scripts export INSTANCE_HOME and SOFTWARE_HOME.
________________________________________
= Request - Entry #1 by mcdonc on Sep 27, 2003 7:38 pm

> Hi,
> > 
> > I'm updating ZServerSSL to work with Zope 2.7.0b2.
> > 
> > I did the following to install Zope:
> > 
> > $ configure --prefix=~/pkg/zope270b2
> > $ make; make install
> > $ ~/pkg/zope270b2/bin/mkzopeinstance.py
> > 
> > The instance is in ~/pkg/inst_zope/.
> > 
> > Next, apply ZServerSSL patches, copy stuff over...
> > 
> > Then, away we go!
> > $ ~/pkg/inst_zope/bin/runzope
> > 
> > But:
> > IOError: [Errno 2] No such file or directory: 
> > '/usr/local/home/ngps/pkg/zope270b2/ssl/dh1024.pem'
> > 
> > The offending code is this:
> >         ssl_ctx.set_tmp_dh('%s/ssl/dh1024.pem' % INSTANCE_HOME)
> > 
> > So INSTANCE_HOME is pointing to ~/pkg/zope270b2.
> > 
> > Shouldn't it be pointing to ~/pkg/inst_zope?
> 
> I'm not sure, but I think 'runzope' is a fossil;  you want to be using
> '~/pkg/inst_zope/bin/zopectl start', which will do more of the
> housekeeping you need.
> 
> > 
> > BTW, 
> > $ (cd ~/pkg/zope270b2; ln -s ../inst_zope/ssl; ../inst_zope/bin/runzope)
> > 
> > 2003-09-28T00:45:15 INFO(0) ZServer (ZServerSSL/0.12) 
> > HTTPS server started at Sun Sep 28 00:45:15 2003
> >         Hostname: vista.netmemetic.com
> >         Port: 8443

==============================================================




More information about the Zope-Collector-Monitor mailing list