← Back to issue list

elf: clear the current runpath before setting the rpath

View original Github issue

Metadata

Project
snapcraft
Number
#2085
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2085 in commit 4ed555c5e clears an ELF file's existing RUNPATH before setting RPATH, resolving #2071.

Resolution: closed resolved

Reason: PR #2085 was merged as commit 4ed555c5e. Its stated change explicitly resolves issue #2071 by clearing RUNPATH before setting the RPATH.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Given https://github.com/NixOS/patchelf/issues/94 we may find ourselves in a situation where given an elf file with an existing RUNPATH, a proper RPATH may not be set. Resolve #2071 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
stealth/space-bunny-alpha — closed resolved Merged PR #2085 in commit 4ed555c5e clears an ELF file's existing RUNPATH before setting RPATH, resolving #2071.
stealth/space-bunny-alpha — closed resolved Merged PR #2085 (commit 4ed555c5e) fixed ELF patching by clearing an existing RUNPATH before setting RPATH, resolving #2071.
stealth/space-bunny-alpha — closed resolved Merged PR #2085 in commit 4ed555c5e, clearing an ELF's existing RUNPATH before setting RPATH and resolving #2071.
stealth/space-bunny-alpha — closed resolved Merged PR #2085 in commit 4ed555c5e: ELF processing now clears an existing RUNPATH before setting RPATH, resolving #2071.
qwen/qwen3.6-35b-a3b — — Merged changes that clear existing RUNPATH before setting RPATH in ELF files, resolving issue #2071. Approved and passed CI.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Clears existing RUNPATH before setting RPATH in ELF files, resolving issue #2071 where pre-existing RUNPATH prevented proper RPATH configuration.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#2071 (confidence 100%)

    PR #2085 explicitly resolves the RUNPATH handling issue in #2071.

  • Related To: patchelf#94 (confidence 95%)

    The PR cites patchelf issue #94 as the underlying behavior that motivated clearing RUNPATH.

Related issues

Issue Project State Summary Similarity
#1896 elf: do not strip rpaths that contain $ORIGIN snapcraft merged Merged PR #1896 preserved ELF rpaths containing $ORIGIN during stripping; commit c543156ff implemented the fix.
71%