snap: remove leaking LD_LIBRARY_PATH
Metadata
Current evaluation
Removed leaking LD_LIBRARY_PATH from the snapcraft-classic wrapper, resolving Launchpad bug #1723208. The variable leaked into the environment, breaking snaps on distros like Trusty, and was redundant given existing rpaths. Approved and merged.
Suggested action: —
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] 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`?
-----
This PR fixes LP: #1723208 by removing the LD_LIBRARY_PATH set in the snapcraft-classic wrapper. This leaks into the running environment and causes the snap on other distros to break (e.g. Trusty). It also seems completely unnecessary given the rpaths.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Removed leaking LD_LIBRARY_PATH from the snapcraft-classic wrapper, resolving Launchpad bug #1723208. The variable leaked into the environment, breaking snaps on distros like Trusty, and was redundant given existing rpaths. Approved and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged removal of LD_LIBRARY_PATH from the snapcraft-classic wrapper, resolving LP: #1723208. The variable leaked into the runtime environment and broke snaps on other distributions. Removal is safe due to existing rpaths. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged by kyrofa to fix LP: #1723208. Removed LD_LIBRARY_PATH from the snapcraft-classic wrapper to prevent environment variable leakage breaking snaps on other distros. Rpaths handle library resolution, making it unnecessary. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2049617 ubuntu-desktop-installer LD_LIBRARY_PATH not defined anymore | snapcraft (launchpad) | open | Classic snap shell environment no longer sets LD_LIBRARY_PATH, possibly a snapcraft 8.0.1 regression. Untriaged, no maintainer engagement in 961 days. | |
| #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. | |
| #462 Add SNAP_LIBRARY_PATH to LD_LIBRARY_PATH. | snapcraft | merged | Merged changes adding SNAP_LIBRARY_PATH to LD_LIBRARY_PATH, resolving Launchpad bug #1570945. The three-file update received maintainer approval and was merged. | |
| #3208 snap: set PATH for snapcraft command | snapcraft | merged | Merged to configure the PATH for the snapcraft command in the build environment, ensuring parity with launchpad buildd and destructive-mode instances. Approved, passed CI, and modified three files. | |
| #1992557 snapcraft remote-build snapcraft.yaml validation too strict | snapcraft (launchpad) | open | snapcraft remote-build validation rejects empty LD_LIBRARY_PATH in environment, blocking some classic snaps. Issue is 4 years old with no maintainer engagement. | |
| #1100 repo: remove symlinks to libc. | snapcraft | merged | Merged. Removes dangling libc symlinks in snapcraft to fix content sharing and staging build issues. Libraries are already in the core snap and standard paths, making the links redundant. Approved and merged. Resolves LP #1658774. | |
| #2485 project loader: remove special LD_LIBRARY_FLAGS handling for classic | snapcraft | merged | Merged removal of special LD_LIBRARY_FLAGS handling for classic snaps to prevent libc6 mismatches and undefined behavior. Improved library crawling made the logic obsolete. Travis CI updated to edge. Approved, CI passed, 7 files changed. | |
| #2011842 Incorrect default LD_LIBRARY_PATH | snapcraft (launchpad) | open | Bug report about snapcraft not properly handling shell expansion in environment variables like ${LD_LIBRARY_PATH:-Foo} |