[Distutils] [4suite] Re: SandboxViolation: open('/dev/urandom', 0) {}

Jeremy Kloth jeremy.kloth at 4suite.org
Sun Oct 22 02:36:11 CEST 2006


On Saturday 21 October 2006 5:39 pm, Bob Ippolito wrote:
> On 10/21/06, Joshua Boverhof <JRBoverhof at lbl.gov> wrote:
> > 4Suite is listed as one of my project's setuptools
> > "install_requires", but when I attempt to install on Mac OSX-10.4.8
> > using python-2.5 I get an error:
> >
> >
> > """
> > Reading http://www.python.org/pypi/4Suite-XML/1.0
> > Best match: 4Suite-XML 1.0
> > Downloading http://cheeseshop.python.org/packages/source/4/4Suite-XML/
> > 4Suite-XML-1.0.zip#md5=0b61c214cd03ecb2f673b52b316c0a84
> > Processing 4Suite-XML-1.0.zip
> > Running 4Suite-XML-1.0/setup.py -q bdist_egg --dist-dir /tmp/
> > easy_install-_X4a0x/4Suite-XML-1.0/egg-dist-tmp-uBG5YU
> > error: Setup script exited with error: SandboxViolation: open('/dev/
> > urandom', 0) {}
> >
> > The package setup script has attempted to modify files on your system
> > that are not within the EasyInstall build area, and has been aborted.
> >
> > This package cannot be safely installed by EasyInstall, and may not
> > support alternate installation locations even if you run its setup
> > script by hand.  Please inform the package's author and the EasyInstall
> > maintainers to find out if a fix or workaround is available.
> > """

This is a bug in setuptools' sandboxing.  This is os.urandom() using *os.open* 
which uses integer constants not character constants.

> > So setuptools isn't allowing 4Suite to access the random number
> > generator during build/installation.  I can easily subvert this, in
> > case anyone else just wants to make this work:
> >
> > """
> > def main():
> >      from setuptools import sandbox
> >      sandbox.DirectorySandbox._ok = lambda self,path: True
> >
> > """
> >
> > Of course I'd like a better way of doing this, maybe I missed
> > something in the setuptools docs on configuration?
>
> WTF is a build script doing with a random number generator?!

Generating UUIDs.

Either way, I'll see what can be done to eliminate the need to generate the 
UUID in the first place.

-- 
Jeremy Kloth
http://4suite.org/


More information about the Distutils-SIG mailing list