Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 777144 - python eclasses do not unset PYTHONPYCACHEPREFIX
Summary: python eclasses do not unset PYTHONPYCACHEPREFIX
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-19 05:37 UTC by Tom Gillespie
Modified: 2023-02-28 21:10 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Gillespie 2021-03-19 05:37:27 UTC
If PYTHONPYCACHEPREFIX is set (e.g. by a user) then sandbox violations are caused during emerge of python ebuilds for >=dev-lang/python-3.8.

Reproducible: Always

Steps to Reproduce:
1. Set PYTHONPYCACHEPREFIX=/path/that/will/cause/a/sandbox/violation
2. emerge setuptools
3. Enjoy knowing that the portage sandbox keeps you safe from rogue builds.


Expected Results:  
PYTHONPYCACHEPREFIX should be unset or should be set ${EPREFIX}${PYTHONPYCACHEPREFIX} from a system wide PYTHONPYCACHEPREFIX set in /etc/env.d/.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-19 05:46:03 UTC
This is a bit niche because there's a huge number of environment variables that, if set, interfere with various build systems.

But I suppose we could unset it or add it to ENV_UNSET.
Comment 2 Tom Gillespie 2023-02-28 21:10:03 UTC
Following up here. While trying to test scipy ebuilds as a non-root user I have encountered an issue where manually calling unset PYTHONCACHEPREFIX and unset PYTHONPATH somehow do not prevent those values from making it through into the environment and preventing meson/pypy3 from finding /usr/lib/pypy3.9/site-packages. Those two in particular seem like recipes for madness and should probably be unset by default to avoid weird cases like this.