elf: add elf file patcher
Metadata
Current evaluation
Merged PR #3841 in commit e03a971b3, adding a patchelf-based ELF file patcher ported from Snapcraft 6.x for CRAFT-1191.
Resolution: closed resolved
Reason: The PR was approved and merged into main as commit e03a971b3, adding the ELF patcher and its unit tests.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Patch ELF files using patchelf. This is a port of the corresponding
class from Snapcraft 6.x.
Co-authored-by: Kyle Fazzari <kyrofa@ubuntu.com>
Co-authored-by: Chris Patterson <chris.patterson@canonical.com>
Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@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] Have you successfully run `make lint`?
- [x] Have you successfully run `pytest tests/unit`?
-----
CRAFT-1191
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3841 in commit e03a971b3, adding a patchelf-based ELF file patcher ported from Snapcraft 6.x for CRAFT-1191. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3841 in commit e03a971b3, adding a patchelf-based ELF file patcher ported from Snapcraft 6.x for CRAFT-1191. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged the patchelf-based ELF file patcher, ported from Snapcraft 6.x, resolving CRAFT-1191. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged an ELF file patcher using patchelf, ported from Snapcraft 6.x. Approved by one reviewer, passed CI checks, and increased test coverage by 0.26%. Resolves CRAFT-1191. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main. Adds an ELF file patcher using patchelf, ported from Snapcraft 6.x. Increased overall coverage by 0.26% with 89.47% diff coverage. Co-authored by Kyle Fazzari, Chris Patterson, and Sergio Schvezov. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3839 elf: add elf file handler class | snapcraft | merged | PR #3839 was merged into main as commit 6830dc69c, porting the Snapcraft 6.x ElfFile handler into snapcraft/elf/_elf_file.py with helpers, ELF errors, and unit tests (CRAFT-1192). | |
| #2081 elf: patch everything instead of a subset of elf files | snapcraft | merged | Merged PR #2081 restored Snapcraft 2.39 behavior by patching every ELF file; commit 77770452b partially reverted 64f78f762a05. | |
| #1666 Refactor to support elf patching | snapcraft | closed | ELF patching support was refactored by merged PR #1744 in commit ec7ba948a, converting the ELF implementation into reusable libraries. | |
| #3985 elf: patch elf files for classic mode | snapcraft | merged | Merged PR #3985 as commit a723254b9, adding classic-mode ELF patching so enable-patchelf parts use base-snap libraries or staged libc components. | |
| #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. | |
| #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. | |
| #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). | |
| #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. | |
| #1805205 Ensure elf patching works correctly with golang created ELF files | snapcraft (launchpad) | closed | Fixed Go ELF patching in snapcore/snapcraft PR #2519 by updating the PatchELF handling used for Go-created binaries. | |
| #3588 snap: patch patchelf on riscv64 (CRAFT-566) | snapcraft | merged | Merged PR #3588 via commit bf99dbdb2, conditionally patching PatchELF on riscv64 while leaving other architectures unchanged. |