Merge pull request #128471 from mweinelt/cpython-venv-permissions
cpython: fix permissions on venv activation scripts
This commit is contained in:
commit
1c5a86776c
2 changed files with 17 additions and 0 deletions
|
@ -190,6 +190,10 @@ in with passthru; stdenv.mkDerivation {
|
|||
# (since it will do a futile invocation of gcc (!) to find
|
||||
# libuuid, slowing down program startup a lot).
|
||||
(./. + "/${sourceVersion.major}.${sourceVersion.minor}/no-ldconfig.patch")
|
||||
# Make sure that the virtualenv activation scripts are
|
||||
# owner-writable, so venvs can be recreated without permission
|
||||
# errors.
|
||||
./virtualenv-permissions.patch
|
||||
] ++ optionals mimetypesSupport [
|
||||
# Make the mimetypes module refer to the right file
|
||||
./mimetypes.patch
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
|
||||
index caa7285..ad666ac 100644
|
||||
--- a/Lib/venv/__init__.py
|
||||
+++ b/Lib/venv/__init__.py
|
||||
@@ -379,7 +379,7 @@ class EnvBuilder:
|
||||
if data is not None:
|
||||
with open(dstfile, 'wb') as f:
|
||||
f.write(data)
|
||||
- shutil.copymode(srcfile, dstfile)
|
||||
+ os.chmod(dstfile, 0o644)
|
||||
|
||||
|
||||
def create(env_dir, system_site_packages=False, clear=False,
|
Loading…
Reference in a new issue