copy, dump plugin: ignore symlinks to libc.
Metadata
Current evaluation
Merged as 2b8bac953: copy and dump plugins now ignore, rather than follow or remove, staged-package symlinks to libc.
Resolution: closed resolved
Reason: PR #1174 was merged as commit 2b8bac953, preventing the plugins from following libc symlinks. It superseded the removal approach in #1100, which #1146 had reverted because it caused linker failures.
Evaluated by: mr-cal-bot
No scores available.
Issue body
libc is not typically staged, as it's always contained in the core snap. However, Snapcraft leaves symlinks to its libraries from stage-packages alone and intact. This causes issues when it comes to content sharing and building against tarred staging areas, as various plugins work really hard to ensure the snap doesn't include dangling symlinks, and they end up following the libc symlinks in the tarred staging area and
pulling in libc. The naive solution to this is to simply remove such symlinks from the stage-packages, and this was indeed the solution introduced in commit 3052b0f459ded440dad2e2362946ee37e09c8606. However, didn't work quite as well as desired and led to odd bugs such as ld linking to static libraries in the part instead of shared libraries on the host, etc.
This PR is a second take on fixing LP: [#1658774](https://bugs.launchpad.net/snapcraft/+bug/1658774): instead of removing symlinks to libc, modify the copy and dump plugins to ignore (i.e. not follow) symlinks to libc.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as 2b8bac953: copy and dump plugins now ignore, rather than follow or remove, staged-package symlinks to libc. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1174 (commit 2b8bac95) by kyrofa: copy and dump plugins now ignore (not remove) symlinks to libc, superseding the earlier removal fix and fixing LP: #1658774. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1174: copy and dump plugins now ignore libc symlinks instead of removing them, addressing LP #1658774 and avoiding staged-library and linker problems. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1174 in commit 2b8bac953: copy and dump plugins now leave libc symlinks intact instead of following them, addressing LP #1658774. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Updated copy and dump plugins to ignore symlinks to libc instead of removing them, resolving dangling symlink and build bugs from a prior fix. Approved by reviewers and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Modifies copy and dump plugins to ignore symlinks to libc instead of removing them, resolving LP #1658774. External testing confirmed stability prior to merge. |
Update history
No update history recorded yet.
Related work
-
Superseded By:
snapcraft#1100
(confidence 100%)
Its libc-symlink removal approach was replaced by #1174.
-
Related To:
snapcraft#1146
(confidence 100%)
Merged commit 0f4872241 reverted #1100 after it caused linker failures.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1658774 Symlinks to libc are followed by the dump and copy plugins | snapcraft (launchpad) | closed | Merged snapcraft#1174 as commit 2b8bac953, changing copy and dump plugins to ignore staged-package symlinks to libc instead of following or removing them. | |
| #209 Added symlinks option to the copy plugin | snapcraft | closed | Closed unmerged in favor of redesigning copy-plugin symlink handling; commit b332715a8 later added following for symlinks pointing outside the snap. |