Re: [Distutils] Sandbox violation help

2007-12-07 Thread Phillip J. Eby
At 10:53 AM 12/7/2007 -0600, Dave Peterson wrote:
Does anyone have any tips on how to go about debugging what might be 
wrong? In particular, is there any way to get an idea of what the 
particular file being opened actually represents?

set DISTUTILS_DEBUG=yes and run it; the error should give you a 
traceback then, which will tell you more about who's creating the file and why.

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Sandbox violation help

2007-12-07 Thread Robert Kern
Dave Peterson wrote:
 Robert Kern wrote:
 Dave Peterson wrote:
   
 Most of us here are not seeing this
 error so I'm thinking it isn't something obviously wrong with the 
 setup.py. You can look at the setup.py at :

 https://svn.enthought.com/enthought/browser/tags/enthought.interpolate_2.0.0b3/setup.py

 Note that this project does use numpy.distutils' setup function. Perhaps 
 the error has something to do with that?
 
 enthought.interpolate uses weave to built its extension module. weave uses
 ~/.python24_compiled as its location for the temporaries. We need to fix 
 weave
 to not do this, or rewrite the extension not to use weave. The latter is
 probably best.
 
 I'm probably just being slow here, but how come the build of 
 enthought.interpolate works for some (I'll assert most here) people but 
 not others?

I don't believe it has ever worked for anyone from easy_install. The sandbox is
only active during the easy_install command, not when just running bdist_egg.

-- 
Robert Kern

I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth.
  -- Umberto Eco

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Sandbox violation help

2007-12-07 Thread Robert Kern
Dave Peterson wrote:
 Most of us here are not seeing this
 error so I'm thinking it isn't something obviously wrong with the 
 setup.py. You can look at the setup.py at :
 
 https://svn.enthought.com/enthought/browser/tags/enthought.interpolate_2.0.0b3/setup.py
 
 Note that this project does use numpy.distutils' setup function. Perhaps 
 the error has something to do with that?

enthought.interpolate uses weave to built its extension module. weave uses
~/.python24_compiled as its location for the temporaries. We need to fix weave
to not do this, or rewrite the extension not to use weave. The latter is
probably best.

-- 
Robert Kern

I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth.
  -- Umberto Eco

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Sandbox violation help

2007-12-07 Thread Dave Peterson
Robert Kern wrote:
 Dave Peterson wrote:
   
 Most of us here are not seeing this
 error so I'm thinking it isn't something obviously wrong with the 
 setup.py. You can look at the setup.py at :

 https://svn.enthought.com/enthought/browser/tags/enthought.interpolate_2.0.0b3/setup.py

 Note that this project does use numpy.distutils' setup function. Perhaps 
 the error has something to do with that?
 

 enthought.interpolate uses weave to built its extension module. weave uses
 ~/.python24_compiled as its location for the temporaries. We need to fix weave
 to not do this, or rewrite the extension not to use weave. The latter is
 probably best.

   

I'm probably just being slow here, but how come the build of 
enthought.interpolate works for some (I'll assert most here) people but 
not others?

-- Dave

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Sandbox violation help

2007-12-07 Thread Dave Peterson
Dave Peterson wrote:
 Phillip J. Eby wrote:
   
 At 02:15 PM 12/6/2007 -0600, Dave Peterson wrote:
 
 PPS: I do believe other users have reported the same issues on other
 systems but we've never quite figured out what the cause is.  IIRC,
 telling them to manually download the source tarball and do a 'python
 setup.py install' seems to work just fine.

   
 Processing enthought.traits-2.0.1b1.tar.gz
 Running enthought.traits-2.0.1b1/setup.py -q bdist_egg --dist-dir
 /tmp/easy_install-Edu8TK/enthought.traits-2.0.1b1/egg-dist-tmp-IIITHW
 error: Setup script exited with error: SandboxViolation:

 
 open('/tmp/easy_install-WZrKOz/enthought.tvtk-2.0.0b2/temp/tmpTTJH2x/zZe82A 
   
 ', 131266, 384) {}
 
 This looks like a bug that was fixed about a year ago: the sandboxing 
 for os.open() (which is what the above appears to be calling) wouldn't 
 allow you to write files *anywhere*, even if it was under a safe 
 directory location.

 That would explain why you don't get the problem, but the user does.  
 Check their setuptools version, using:

 python -c from pkg_resources import require; print 
 require('setuptools')

 The bug was fixed in 0.6c5, so anything older will have this problem 
 with anything that uses os.open() to write files.

 

 Thanks!
   

Well, turns out I was premature on assuming this fixed the problem. The 
user was originally using 0.6c3 but has since upgraded. Here's the 
current output from your request as sent back by the user:

In [3]: pkg_resources.require(setuptools)
Out[3]: [setuptools 0.6c7 (/usr/lib/python2.4/site-packages)]


The original user is still reproducibly getting the following error -- 
it appears to have moved to a different project, but otherwise seems the 
same to me. In addition, one of our internal developers said he was 
getting this on one of his machines earlier as well but he was able to 
work around it by manually building the project in question and then 
going back to using easy_install to install the rest of the dependencies 
of the originally requested project. Most of us here are not seeing this 
error so I'm thinking it isn't something obviously wrong with the 
setup.py. You can look at the setup.py at :

https://svn.enthought.com/enthought/browser/tags/enthought.interpolate_2.0.0b3/setup.py

Note that this project does use numpy.distutils' setup function. Perhaps 
the error has something to do with that?

Does anyone have any tips on how to go about debugging what might be 
wrong? In particular, is there any way to get an idea of what the 
particular file being opened actually represents?

-- Dave

 Searching for enthought.interpolate
 Reading http://code.enthought.com/enstaller/eggs/source
 Best match: enthought.interpolate 2.0.0b3
 Downloading
 http://code.enthought.com/enstaller/eggs/source/enthought.interpolate-2.0.0
b3.tar.gz Processing enthought.interpolate-2.0.0b3.tar.gz
 Running enthought.interpolate-2.0.0b3/setup.py -q bdist_egg --dist-dir
 /tmp/easy_install-jA35_C/enthought.interpolate-2.0.0b3/egg-dist-tmp-m08e-2
 error: Setup script exited with error: SandboxViolation:
 open('/home/hans/.python24_compiled/dummy_TuxOnStage_5383_gODMbl', 131266,
 384) {}

 The package setup script has attempted [...]



___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Sandbox violation help

2007-12-06 Thread Phillip J. Eby
At 02:15 PM 12/6/2007 -0600, Dave Peterson wrote:
PPS: I do believe other users have reported the same issues on other
systems but we've never quite figured out what the cause is.  IIRC,
telling them to manually download the source tarball and do a 'python
setup.py install' seems to work just fine.

  Processing enthought.traits-2.0.1b1.tar.gz
  Running enthought.traits-2.0.1b1/setup.py -q bdist_egg --dist-dir
  /tmp/easy_install-Edu8TK/enthought.traits-2.0.1b1/egg-dist-tmp-IIITHW
  error: Setup script exited with error: SandboxViolation:
  open('/tmp/easy_install-WZrKOz/enthought.tvtk-2.0.0b2/temp/tmpTTJH2x/zZe82A
  ', 131266, 384) {}

This looks like a bug that was fixed about a year ago: the sandboxing 
for os.open() (which is what the above appears to be calling) 
wouldn't allow you to write files *anywhere*, even if it was under a 
safe directory location.

That would explain why you don't get the problem, but the user 
does.  Check their setuptools version, using:

 python -c from pkg_resources import require; print require('setuptools')

The bug was fixed in 0.6c5, so anything older will have this problem 
with anything that uses os.open() to write files.

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Sandbox violation help

2007-12-06 Thread Dave Peterson
Phillip J. Eby wrote:
 At 02:15 PM 12/6/2007 -0600, Dave Peterson wrote:
 PPS: I do believe other users have reported the same issues on other
 systems but we've never quite figured out what the cause is.  IIRC,
 telling them to manually download the source tarball and do a 'python
 setup.py install' seems to work just fine.

  Processing enthought.traits-2.0.1b1.tar.gz
  Running enthought.traits-2.0.1b1/setup.py -q bdist_egg --dist-dir
  /tmp/easy_install-Edu8TK/enthought.traits-2.0.1b1/egg-dist-tmp-IIITHW
  error: Setup script exited with error: SandboxViolation:
  
 open('/tmp/easy_install-WZrKOz/enthought.tvtk-2.0.0b2/temp/tmpTTJH2x/zZe82A 

  ', 131266, 384) {}

 This looks like a bug that was fixed about a year ago: the sandboxing 
 for os.open() (which is what the above appears to be calling) wouldn't 
 allow you to write files *anywhere*, even if it was under a safe 
 directory location.

 That would explain why you don't get the problem, but the user does.  
 Check their setuptools version, using:

 python -c from pkg_resources import require; print 
 require('setuptools')

 The bug was fixed in 0.6c5, so anything older will have this problem 
 with anything that uses os.open() to write files.


Thanks!

-- Dave
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig