← Back to issue list

core: switch to using rpath for clasic confinement.

View original Github issue

Metadata

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

Current evaluation

Merged after reviewer approval and CI checks. The change switches the core module to use RPATH for classic confinement, resolving LP #1657504. The minimal two-file diff adjusts ELF dynamic linker path resolution behavior.

Suggested action:

No scores available.

Issue body

From _dl_map_object in elf/dl-load.c: ``` Unless loading object has RUNPATH: RPATH of the loading object, then the RPATH of its loader (unless it has a RUNPATH), ..., until the end of the chain, which is either the executable or an object loaded by dlopen Unless executable has RUNPATH: RPATH of the executable LD_LIBRARY_PATH RUNPATH of the loading object ld.so.cache default dirs ``` LP: #1657504 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged after reviewer approval and CI checks. The change switches the core module to use RPATH for classic confinement, resolving LP #1657504. The minimal two-file diff adjusts ELF dynamic linker path resolution behavior.
qwen3.6-35b-a3b-mtp-q6 Merged. Switched core to use rpath for classic confinement, aligning dynamic library search paths with standard ELF loader behavior and resolving LP: #1657504.
qwen3.6-35b-a3b-mtp-q6 Merged update switching core to use rpath for classic confinement, resolving LP #1657504. Modifies ELF dynamic linker search order to prioritize rpath, ensuring correct library resolution for classic confined applications.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
79%
#1189 core: resolve ld link first. snapcraft merged Merged a fix for classic confinement builds that checks for symbolic links on the ld executable before verifying its existence. Integrated despite unrelated CI failures and pending reviews.
78%
#4216 meta: omit LD_LIBRARY_PATH and PATH in classic confinement snapcraft merged Merged to omit default LD_LIBRARY_PATH and PATH in classic confinement, resolving #4187. Post-merge comments warn the change may break existing classic snaps relying on the previous PATH behavior.
72%
#3849 linters: add classic confinement linter snapcraft merged Merged addition of a classic confinement linter warning about incorrect elf binary interpreter or rpath values and staged libc. Adjusts existing elf infrastructure, passed review and CI, was rebased on main, and increased code coverage.
72%