Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid symlinking the contents of /usr into PyPy3 virtualenvs #2310

Merged
merged 4 commits into from
Mar 7, 2022

Conversation

stefanor
Copy link
Contributor

@stefanor stefanor commented Mar 5, 2022

PyPy >= 3.8 supports a standard prefix installation, where older versions always used a portable/developent style installation.
If this is a standard prefix installation, skip the logic that symlinks libraries in a portable PyPy distribution.

Fixes: #2309

Thanks for contributing, make sure you address all the checklists (for details on how see

development documentation)!

  • ran the linter to address style issues (tox -e fix_lint)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

PyPy >= 3.8 supports a standard prefix installation, where older
versions always used a portable/developent style installation.
If this is a standard prefix installation, skip the logic that symlinks
libraries in a portable PyPy distribution.

Fixes: pypa#2309
@stefanor stefanor force-pushed the pypy3.8 branch 10 times, most recently from b259d1b to 32206e7 Compare March 6, 2022 23:07
1. Portable PyPy3.8 build, as downloaded from upstream.
   This should include the provided shared libraries, libpypy3-c.so has
   an rpath of $ORIGIN/../lib to point to them.
2. Debian's /usr/lib/pypy3 layout for PyPy3 < 3.8.
   This should include libpypy3-c.so.
3. Debian's /usr layout for PyPy3 > 3.8.
   This should exclude libpypy3-c.so, as it's on the standard linker
   search path.
   It should also not include anything else from /usr/lib. (See pypa#2309)
Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
@gaborbernat gaborbernat merged commit 3a90a6b into pypa:main Mar 7, 2022
@stefanor stefanor deleted the pypy3.8 branch March 7, 2022 13:48
@gaborbernat
Copy link
Contributor

This now has been released as https://pypi.org/project/virtualenv/20.13.3/

mergify bot pushed a commit to andrewbolster/bolster that referenced this pull request Mar 8, 2022
Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.13.0 to 20.13.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst">virtualenv's changelog</a>.</em></p>
<blockquote>
<h2>v20.13.3 (2022-03-07)</h2>
<p>Bugfixes - 20.13.3</p>
<pre><code>- Avoid symlinking the contents of ``/usr`` into PyPy3.8+ virtualenvs - by :user:`stefanor`. (`[#2310](pypa/virtualenv#2310) &lt;https://github.com/pypa/virtualenv/issues/2310&gt;`_)
- Bump embed pip from ``22.0.3`` to ``22.0.4`` - by :user:`gaborbernat`. (`[#2311](pypa/virtualenv#2311) &lt;https://github.com/pypa/virtualenv/issues/2311&gt;`_)
<h2>v20.13.2 (2022-02-24)</h2>
<p>Bugfixes - 20.13.2
</code></pre></p>
<ul>
<li>Upgrade embedded setuptools to <code>60.9.3</code> from <code>60.6.0</code> - by :user:<code>gaborbernat</code>. (<code>[#2306](pypa/virtualenv#2306) &lt;https://github.com/pypa/virtualenv/issues/2306&gt;</code>_)</li>
</ul>
<h2>v20.13.1 (2022-02-05)</h2>
<p>Bugfixes - 20.13.1</p>
<pre><code>- fix &quot;execv() arg 2 must contain only strings&quot; error on M1 MacOS (`[#2282](pypa/virtualenv#2282) &lt;https://github.com/pypa/virtualenv/issues/2282&gt;`_)
- Ugrade embedded setuptools to ``60.5.0`` from ``60.2.0`` - by :user:`asottile`. (`[#2289](pypa/virtualenv#2289) &lt;https://github.com/pypa/virtualenv/issues/2289&gt;`_)
- Upgrade embedded pip to ``22.0.3`` and setuptools to ``60.6.0`` - by :user:`gaborbernat` and :user:`asottile`. (`[#2294](pypa/virtualenv#2294) &lt;https://github.com/pypa/virtualenv/issues/2294&gt;`_)
</code></pre>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/virtualenv/commit/e3c30b7e6a9d6743e2374cba8885c599801be767"><code>e3c30b7</code></a> release 20.13.3</li>
<li><a href="https://github.com/pypa/virtualenv/commit/471e7cc5e180909481caf9c901dd8451eb8a49fe"><code>471e7cc</code></a> Upgrade pip to 22.0.4 (<a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2311">#2311</a>)</li>
<li><a href="https://github.com/pypa/virtualenv/commit/3a90a6bb48313ad45bfc448637b91c630b5014ac"><code>3a90a6b</code></a> Avoid symlinking the contents of /usr into PyPy3 virtualenvs (<a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2310">#2310</a>)</li>
<li><a href="https://github.com/pypa/virtualenv/commit/bb3131a36917a8100afa624b1da7e4971e23030e"><code>bb3131a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2307">#2307</a> from pypa/release-20.13.2</li>
<li><a href="https://github.com/pypa/virtualenv/commit/bcf9bb892d020ba8993bd06ce8a6c43796ae97e0"><code>bcf9bb8</code></a> release 20.13.2</li>
<li><a href="https://github.com/pypa/virtualenv/commit/6378f7240130810e498e26f893a780096a743fa0"><code>6378f72</code></a> Bump setuptools (<a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2306">#2306</a>)</li>
<li><a href="https://github.com/pypa/virtualenv/commit/7424a015d1c28e26fd9324b8c47dab6d6c15b184"><code>7424a01</code></a> use the workflow as part of the concurrency group (<a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2300">#2300</a>)</li>
<li><a href="https://github.com/pypa/virtualenv/commit/253bee65b26e8adde4934f8c9ffe484efe965db7"><code>253bee6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2299">#2299</a> from pypa/release-20.13.1</li>
<li><a href="https://github.com/pypa/virtualenv/commit/16ad07fdcc7fe1d5f9a40ff5cf9cec005ff2cb1c"><code>16ad07f</code></a> release 20.13.1</li>
<li><a href="https://github.com/pypa/virtualenv/commit/5ee5ad9a1941aaf0a64062208eabccf85e9f9004"><code>5ee5ad9</code></a> fix setuptools zipimport breakage by downgrading setuptools (<a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2296">#2296</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/pypa/virtualenv/compare/20.13.0...20.13.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=virtualenv&package-manager=pip&previous-version=20.13.0&new-version=20.13.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
bors bot added a commit to ChrisRBe/PP-P2P-Parser that referenced this pull request Mar 8, 2022
513: build(deps): bump virtualenv from 20.13.2 to 20.13.3 r=ChrisRBe a=dependabot[bot]

Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.13.2 to 20.13.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst">virtualenv's changelog</a>.</em></p>
<blockquote>
<h2>v20.13.3 (2022-03-07)</h2>
<p>Bugfixes - 20.13.3</p>
<pre><code>- Avoid symlinking the contents of ``/usr`` into PyPy3.8+ virtualenvs - by :user:`stefanor`. (`[#2310](pypa/virtualenv#2310) &lt;https://github.com/pypa/virtualenv/issues/2310&gt;`_)
- Bump embed pip from ``22.0.3`` to ``22.0.4`` - by :user:`gaborbernat`. (`[#2311](pypa/virtualenv#2311) &lt;https://github.com/pypa/virtualenv/issues/2311&gt;`_)
</code></pre>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/virtualenv/commit/e3c30b7e6a9d6743e2374cba8885c599801be767"><code>e3c30b7</code></a> release 20.13.3</li>
<li><a href="https://github.com/pypa/virtualenv/commit/471e7cc5e180909481caf9c901dd8451eb8a49fe"><code>471e7cc</code></a> Upgrade pip to 22.0.4 (<a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2311">#2311</a>)</li>
<li><a href="https://github.com/pypa/virtualenv/commit/3a90a6bb48313ad45bfc448637b91c630b5014ac"><code>3a90a6b</code></a> Avoid symlinking the contents of /usr into PyPy3 virtualenvs (<a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2310">#2310</a>)</li>
<li><a href="https://github.com/pypa/virtualenv/commit/bb3131a36917a8100afa624b1da7e4971e23030e"><code>bb3131a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2307">#2307</a> from pypa/release-20.13.2</li>
<li>See full diff in <a href="https://github.com/pypa/virtualenv/compare/20.13.2...20.13.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=virtualenv&package-manager=pip&previous-version=20.13.2&new-version=20.13.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
mergify bot pushed a commit to andrewbolster/bolster that referenced this pull request Mar 25, 2022
Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.13.4 to 20.14.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/virtualenv/blob/20.14.0/docs/changelog.rst">virtualenv's changelog</a>.</em></p>
<blockquote>
<h2>v20.14.0 (2022-03-25)</h2>
<p>Features - 20.14.0</p>
<pre><code>- Support Nushell activation scripts with nu version ``0.60`` - by :user:`kubouch`. (`[#2321](pypa/virtualenv#2321) &lt;https://github.com/pypa/virtualenv/issues/2321&gt;`_)
<p>Bugfixes - 20.14.0
</code></pre></p>
<ul>
<li>Improve performance of python startup inside created virtualenvs - by :user:<code>asottile</code>. (<code>[#2317](pypa/virtualenv#2317) &lt;https://github.com/pypa/virtualenv/issues/2317&gt;</code>_)</li>
<li>Upgrade embedded setuptools to <code>60.10.0</code> from <code>60.9.3</code> - by :user:<code>gaborbernat</code>. (<code>[#2320](pypa/virtualenv#2320) &lt;https://github.com/pypa/virtualenv/issues/2320&gt;</code>_)</li>
<li>Upgrade embedded setuptools to <code>61.0.0</code> from <code>60.10.0</code> - by :user:<code>gaborbernat</code>. (<code>[#2322](pypa/virtualenv#2322) &lt;https://github.com/pypa/virtualenv/issues/2322&gt;</code>_)</li>
</ul>
<h2>v20.13.3 (2022-03-07)</h2>
<p>Bugfixes - 20.13.3</p>
<pre><code>- Avoid symlinking the contents of ``/usr`` into PyPy3.8+ virtualenvs - by :user:`stefanor`. (`[#2310](pypa/virtualenv#2310) &lt;https://github.com/pypa/virtualenv/issues/2310&gt;`_)
- Bump embed pip from ``22.0.3`` to ``22.0.4`` - by :user:`gaborbernat`. (`[#2311](pypa/virtualenv#2311) &lt;https://github.com/pypa/virtualenv/issues/2311&gt;`_)
<h2>v20.13.2 (2022-02-24)</h2>
<p>Bugfixes - 20.13.2
</code></pre></p>
<ul>
<li>Upgrade embedded setuptools to <code>60.9.3</code> from <code>60.6.0</code> - by :user:<code>gaborbernat</code>. (<code>[#2306](pypa/virtualenv#2306) &lt;https://github.com/pypa/virtualenv/issues/2306&gt;</code>_)</li>
</ul>
<h2>v20.13.1 (2022-02-05)</h2>
<p>Bugfixes - 20.13.1</p>
<pre><code>- fix &quot;execv() arg 2 must contain only strings&quot; error on M1 MacOS (`[#2282](pypa/virtualenv#2282) &lt;https://github.com/pypa/virtualenv/issues/2282&gt;`_)
- Ugrade embedded setuptools to ``60.5.0`` from ``60.2.0`` - by :user:`asottile`. (`[#2289](pypa/virtualenv#2289) &lt;https://github.com/pypa/virtualenv/issues/2289&gt;`_)
- Upgrade embedded pip to ``22.0.3`` and setuptools to ``60.6.0`` - by :user:`gaborbernat` and :user:`asottile`. (`[#2294](pypa/virtualenv#2294) &lt;https://github.com/pypa/virtualenv/issues/2294&gt;`_)
<h2>v20.13.0 (2022-01-02)</h2>
<p>Features - 20.13.0
</code></pre></p>
<ul>
<li>Add downloaded wheel information in the relevant JSON embed file to
prevent additional downloads of the same wheel. - by :user:<code>mayeut</code>. (<code>[#2268](pypa/virtualenv#2268) &lt;https://github.com/pypa/virtualenv/issues/2268&gt;</code>_)</li>
</ul>
<p>Bugfixes - 20.13.0</p>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/virtualenv/commit/a731637cbaf2da326a8ce5c857e2e873ef1120ce"><code>a731637</code></a> release 20.14.0</li>
<li><a href="https://github.com/pypa/virtualenv/commit/04296970d44c5399ed84cd6008901bd1be96b20d"><code>0429697</code></a> Bump embeded setuptools to v61 (<a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2322">#2322</a>)</li>
<li><a href="https://github.com/pypa/virtualenv/commit/ee018a3b2d6684f6965e5ddbf14ed7477627160e"><code>ee018a3</code></a> Update Nushell activation scripts to 0.60 (<a href="https://github-redirect.dependabot.com/pypa/virtualenv/issues/2321">#2321</a>)</li>
<li>See full diff in <a href="https://github.com/pypa/virtualenv/compare/20.13.4...20.14.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=virtualenv&package-manager=pip&previous-version=20.13.4&new-version=20.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
@hroncok
Copy link
Contributor

hroncok commented Jun 9, 2022

We just discovered this issue on Fedora 35 and spent some time trying to figure out what's going on. Thanks for fixing it @stefanor!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PyPy 3.8 virtualenvs lost system isolation on Debian
3 participants