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

Fix auditwheel with read-only libraries #1292

Merged
merged 1 commit into from
Nov 23, 2022
Merged

Conversation

vlaci
Copy link
Contributor

@vlaci vlaci commented Nov 23, 2022

std::fs::copy also copies the original file permissions. If the original library at lib_path was not writable, e.g. because it had its permission set to 0o555, the copy inherited the same permission causing later file manipulations, like patchelf --set-soname to fail.

Fixes #1287

@netlify
Copy link

netlify bot commented Nov 23, 2022

Deploy Preview for maturin-guide ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 084a4e7
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/637e2a0dcd92ba000891c110
😎 Deploy Preview https://deploy-preview-1292--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

bors r+

bors bot added a commit that referenced this pull request Nov 23, 2022
1292: add_external_libs: ensure write permission on libraries r=messense a=vlaci

`std::fs::copy` also copies the original file permissions. If the original library at `lib_path` was not writable, e.g. because it had its permission set to 0o555, the copy inherited the same permission causing later file manipulations, like `patchelf --set-soname` to fail.

Fixes #1287 

Co-authored-by: László Vaskó <[email protected]>
@messense messense added the wheel Wheel label Nov 23, 2022
@vlaci vlaci changed the title add_external_libs: ensure write permission on libraries Fix auditwheel with read-only libraries Nov 23, 2022
`std::fs::copy` also copies the original file permissions.
If the original library at `lib_path` was not writable, e.g. because
it had its permission set to 0o555, the copy inherited the same
permission causing later file manipulations, like `patchelf
--set-soname` to fail.
@bors
Copy link
Contributor

bors bot commented Nov 23, 2022

Canceled.

@messense
Copy link
Member

Thanks for adding the changelog entry.

bors retry

@vlaci
Copy link
Contributor Author

vlaci commented Nov 23, 2022

Thanks for the fast response.

@bors
Copy link
Contributor

bors bot commented Nov 23, 2022

Build succeeded:

@bors bors bot merged commit a5e7236 into PyO3:main Nov 23, 2022
@vlaci vlaci deleted the fix-permissions branch November 23, 2022 15:58
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Nov 25, 2022
https://build.opensuse.org/request/show/1038001
by user mia + dimstar_suse
- Update to v0.14.2:
  * Tighten src-layout detection logic
    gh#PyO3/maturin#1282
  * Update cargo_metadata to 0.15.2
    gh#PyO3/maturin#1284
  * Tell people about setting RUST_LOG=maturin=debug when making
    bug reports
    gh#PyO3/maturin#1286
  * Fix generating pep517 sdist for src-layout
    gh#PyO3/maturin#1288
  * Deprecate python-source option in Cargo.toml
    gh#PyO3/maturin#1291
  * Fix auditwheel with read-only libraries
    gh#PyO3/maturin#1292
  * CI: Try nextest double spawn feature
    gh#PyO3/maturin#1294
  * Update wasmtime dependency version to 3.0.0
    gh#PyO3/maturin#1295
- Changes in v0.14.1:
  * Downgrade cargo_metadata to 0.15.0
    gh#PyO3/maturin#1279
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wheel Wheel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permission denied error in add_external_libs when libary is not writable by owner
2 participants