← Back to issue list

pluginhandler: support using patchelf on strict snaps

View original Github issue

Metadata

Project
snapcraft
Number
#3277
Type
pull request
State
merged
Author
kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #3277 as fd8e95c3d, adding per-part enable-patchelf support to patch ELF rpaths and interpreters in strictly confined snaps.

Resolution: closed resolved

Reason: PR #3277 was merged as commit fd8e95c3d, implementing the opt-in enable-patchelf build attribute for strict snaps.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [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] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? ----- Patchelf is automatically used on classic snaps to patch the rpath and interpreter of ELF files in the snap to find things in the snap itself without requiring LD_LIRARY_PATH to be set, etc. This is usually desired, but in the cases that it's not, the snapcraft CLI supports a `no-patchelf` build attribute to disable this behavior. There are situations where strictly-confined snaps could benefit from this behavior as well (e.g. content sharing, plugin models, etc.). Add a new build attribute called `enable-patchelf` to opt in to rpath and interpreter patching in a strictly-confined snap.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #3277 as fd8e95c3d, adding per-part enable-patchelf support to patch ELF rpaths and interpreters in strictly confined snaps.
stealth/space-bunny-alpha — closed resolved Merged as fd8e95c3d (#3277): adds an `enable-patchelf` build attribute letting parts opt into ELF rpath/interpreter patching in strictly-confined snaps (used for content sharing).
stealth/space-bunny-alpha — closed resolved PR #3277 merged as commit fd8e95c3d, adding a per-part 'enable-patchelf' build attribute so strict (non-classic) snaps can opt into ELF rpath/interpreter patching; a fragile LD_LIBRARY_PATH change was reverted after review.
stealth/space-bunny-alpha — closed resolved Merged as fd8e95c3d, adding per-part enable-patchelf support to patch ELF rpaths and interpreters for strict snaps.
stealth/space-bunny-alpha — closed resolved Merged as fd8e95c3d (#3277), adding a per-part enable-patchelf attribute to patch ELF rpaths and interpreters in strict snaps.
qwen/qwen3.6-35b-a3b — — Adds enable-patchelf build attribute to opt into rpath and interpreter patching for strict snaps. Feature applies per-part. Review resolved naming and command-chain handling. Merged following a commit revert.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Introduces the enable-patchelf build attribute to allow rpath and interpreter patching in strictly-confined snaps. Applied per-part, it replaces no-patchelf with disable-patchelf for naming parity and adjusts command-chain generation.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1850 pluginhandler: patch and handle elf files on glibc mismatch snapcraft merged Merged in snapcraft#1850 (bdaf0b7f1), adding host libc6 staging and its dynamic loader when ELF files need newer glibc; fixes #1668 and #1669.
77%
#1935 elf: contemplate more patching scenarios snapcraft merged Merged PR #1935 as 048adc4a3, adding ELF patching for classic snaps built on bionic targeting core16 and for hooks built with Snapcraft.
76%
#3589 snap: correct patch apply for patchelf snapcraft merged Merged PR #3589 fixed PatchELF patch application in the snap build via commit d9484faf9 (merge a636d26b5).
76%
#2005 pluginhandler: special case go patchelf failures for classic confinement snapcraft merged Merged PR #2005, making PatchELF failures for classic-confined Go snaps non-fatal warnings and cleaning up base/libc6 stage-package handling.
76%
#2012 pluginhandler: only do elf checking and patching for type app snapcraft merged Merged PR #2012 in commit eae356003, limiting ELF/libc ABI/API checks and patching to app-type snaps and avoiding unnecessary checks for other snap types.
76%
#1888 elf: make patchelf a dependency snapcraft merged Merged PR #1888 via commit 7c947f5ec, moving Patchelf out of project_loader build tools and into the deb and snap delivery mechanisms.
76%
#3841 elf: add elf file patcher snapcraft merged Merged PR #3841 in commit e03a971b3, adding a patchelf-based ELF file patcher ported from Snapcraft 6.x for CRAFT-1191.
75%
#1669 patchelf with ld-linux from the future snapcraft closed Resolved by commit bdaf0b7f1, which added Snapcraft handling for PatchELF and ELF files when the built glibc/linker does not match the base.
75%
#1987 pluginhandler: add option to disable patchelf for a part snapcraft merged Merged PR #1987 as commit 47d601fd2, adding a per-part option to disable PatchELF processing.
75%
#1794 Apply patchelf work to non classic snapcraft closed Patchelf support was extended from classic confinement to strict snaps by merged PR #3277 (commit fd8e95c3d), resolving #1794.
74%