Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499020 - sci-visualization/paraview-4.1.0 causes sandbox violations in mkdir /usr/lib64/paraview-4.1/site-packages/zope/__pycache__
Summary: sci-visualization/paraview-4.1.0 causes sandbox violations in mkdir /usr/lib6...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Julian Ospald
URL:
Whiteboard:
Keywords:
: 499022 499206 499222 (view as bug list)
Depends on:
Blocks: 498532
  Show dependency tree
 
Reported: 2014-01-23 09:39 UTC by Helmut Jarausch
Modified: 2014-01-25 21:57 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log for dev-python/prettytable (prettytable-0.7.1-r1.build,7.97 KB, text/plain)
2014-01-23 09:39 UTC, Helmut Jarausch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2014-01-23 09:39:09 UTC
Created attachment 368532 [details]
build log for dev-python/prettytable

The following failure of portage is absolutely reproducible.
I have unmerged and re-emerged sci-visualization/paraview-4.1.0 several times on several machines with 4 versions of portage (2.2.8-r1 and 9999, each with python3 use flag on and off).

If and only if sci-visualization/paraview-4.1.0 is installed:

(Probably) Many packages from dev-python/ fail to install (verified for dev-python/prettytable and dev-python/sphinx) with a sandbox violation like
F: mkdir
S: deny
P: /usr/lib64/paraview-4.1/site-packages/zope/__pycache__
A: /usr/lib64/paraview-4.1/site-packages/zope/__pycache__
R: /usr/lib64/paraview-4.1/site-packages/zope/__pycache__
C: /usr/bin/python3.3 setup.py install --compile -O2 --root=/var/tmp/portage/dev-python/prettytable-0.7.1-r1/image//_python3.3 --install-scripts=/usr/lib/python-exec/python3.3 

I see /usr/lib64/paraview-4.1/site-packages/zope/__pycache__ for prettytable as well as for sphinx (both having no connection to paraview)

Even if this is triggered by some bug in paraview, a single package should not
be able to damage portage as a whole.
Comment 1 Helmut Jarausch 2014-01-23 11:49:13 UTC
I'd like to stress that if one package is able to cause sandbox violations in several totally unrelated other packages, this has to be considered as a bug of
portage itself.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-23 11:52:34 UTC
*** Bug 499022 has been marked as a duplicate of this bug. ***
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-23 12:14:50 UTC
(In reply to Helmut Jarausch from comment #1)
> I'd like to stress that if one package is able to cause sandbox violations
> in several totally unrelated other packages, this has to be considered as a
> bug of
> portage itself.

Sandbox violations are a safety/security feature and not a bug.
Comment 4 Julian Ospald 2014-01-23 15:22:45 UTC
yeah, that's pretty weird
Comment 5 Julian Ospald 2014-01-23 15:27:34 UTC
it seems paraview has bundled zope-interface since 4.1.0

the question is why other apps pick up that path. I will look into unbundling, but it still seems fishy
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-25 16:10:10 UTC
*** Bug 499222 has been marked as a duplicate of this bug. ***
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-25 16:10:48 UTC
*** Bug 499206 has been marked as a duplicate of this bug. ***
Comment 8 Julian Ospald 2014-01-25 16:16:52 UTC
+  25 Jan 2014; Julian Ospald <hasufell@gentoo.org> package.mask:
+  hardmask >=sci-visualization/paraview-4.1.0 wrt #499020


until I know more or have time to unbundle zope-interface
Comment 9 Mike Gilbert gentoo-dev 2014-01-25 21:02:50 UTC
(In reply to Julian Ospald (hasufell) from comment #5)
> the question is why other apps pick up that path. I will look into
> unbundling, but it still seems fishy

Yeah, that seems odd. Maybe paraview installs something that messes with sys.path or PYTHONPATH?
Comment 10 Mike Gilbert gentoo-dev 2014-01-25 21:07:54 UTC
Yeah, there it is, plain as day in the ebuild:

echo "PYTHONPATH="${EPREFIX}"/usr/${PVLIBDIR}:/usr/${PVLIBDIR}/site-packages" >> "${T}"/40${PN}

Adding things to PYTHONPATH like this is probably a bad idea.
Comment 11 Julian Ospald 2014-01-25 21:10:06 UTC
(In reply to Mike Gilbert from comment #10)
> Yeah, there it is, plain as day in the ebuild:
> 
> echo
> "PYTHONPATH="${EPREFIX}"/usr/${PVLIBDIR}:/usr/${PVLIBDIR}/site-packages" >>
> "${T}"/40${PN}
> 
> Adding things to PYTHONPATH like this is probably a bad idea.

The reason of this bug is that I mistyped a config option that should unbundle all python libraries. I am in progress of fixing that.

Paraview installs a lot of it's own modules that are not anywhere else. I can look into moving those python files to the regular site-packages, but it won't be easy to do properly. The build system is really over-complex.
Comment 12 Mike Gilbert gentoo-dev 2014-01-25 21:14:30 UTC
(In reply to Julian Ospald (hasufell) from comment #11)
> Paraview installs a lot of it's own modules that are not anywhere else. I
> can look into moving those python files to the regular site-packages, but it
> won't be easy to do properly. The build system is really over-complex.

Right, but is paraview meant to be used a library in other packages?

If not, then it would probably be better to create/change any necessary wrapper scripts and do the PYTHONPATH or sys.path manipulation there, rather than setting PYTHONPATH globally.
Comment 13 Julian Ospald 2014-01-25 21:40:17 UTC
(In reply to Mike Gilbert from comment #12)
> (In reply to Julian Ospald (hasufell) from comment #11)
> > Paraview installs a lot of it's own modules that are not anywhere else. I
> > can look into moving those python files to the regular site-packages, but it
> > won't be easy to do properly. The build system is really over-complex.
> 
> Right, but is paraview meant to be used a library in other packages?
> 
> If not, then it would probably be better to create/change any necessary
> wrapper scripts and do the PYTHONPATH or sys.path manipulation there, rather
> than setting PYTHONPATH globally.

hm, that won't be easy either, but doable

another problem is that if we fix up the install paths we might hit file collisions with sci-libs/vtk (which is bundled in paraview... although it's the same upstream... and unbundling will be non-trivial as well)

I think I will just fix the current issue for now and then have a look on how to improve this long-term. Would you open a new bug for that?
Comment 14 Julian Ospald 2014-01-25 21:57:53 UTC
+*paraview-4.1.0-r1 (25 Jan 2014)
+
+  25 Jan 2014; Julian Ospald <hasufell@gentoo.org> -paraview-4.1.0.ebuild,
+  +paraview-4.1.0-r1.ebuild:
+  fix random sandbox violations wrt #499020