elf: do not strip rpaths that contain $ORIGIN
Metadata
Current evaluation
Merged to preserve ELF rpaths containing $ORIGIN during stripping. This allows custom runtime library paths that snapcraft would otherwise fail to resolve. Approved by reviewer and passed CI checks.
Suggested action: —
No scores available.
Issue body
This is enabled to support users setting up rpaths for their
projects for paths that snapcraft would not find otherwise.
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged to preserve ELF rpaths containing $ORIGIN during stripping. This allows custom runtime library paths that snapcraft would otherwise fail to resolve. Approved by reviewer and passed CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. The update modifies ELF processing to preserve rpaths containing $ORIGIN, preventing snapcraft from stripping them and enabling support for user-defined custom rpaths. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged changes preventing ELF rpath stripping for paths containing $ORIGIN. This enables custom rpath configurations for projects snapcraft would otherwise miss. The pull request passed static and unit tests before being merged by maintainer sergiusens. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2019 elf: avoid duplicating rpath entries | snapcraft | merged | Merged fix preventing duplicate $ORIGIN rpath entries in ELF binaries. Approved by reviewer, passed unit and integration tests, and updated two files to generate a single rpath entry. | |
| #1988 elf: only set rpaths to libs of the same arch | snapcraft | merged | Merged after reviewer approval. Fixes LP #1752964 by restricting ELF rpath resolution to libraries matching the target architecture alongside soname, preventing incorrect selection when multiple architectures exist in the core snap. | |
| #1781 many: set rpath for elf files for classic | snapcraft | merged | Merged. Configures rpath for ELF files in classic confinement using $ORIGIN and patchelf to eliminate LD_LIBRARY_PATH dependencies, resolving #1663. Approved after resolving CLA checks and transient CI failures. | |
| #1570895 Rpath with $ORIGIN fools snapcraft library bundling mechanism | snapcraft (launchpad) | closed | Snapcraft incorrectly expanded $ORIGIN in rpath to absolute paths, breaking library bundling. The issue was fixed and verified, preserving $ORIGIN correctly during snap builds. |