meta: omit LD_LIBRARY_PATH and PATH in classic confinement
Metadata
Current evaluation
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.
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] Have you successfully run `make lint`?
- [X] Have you successfully run `pytest tests/unit`?
-----
When confinement is classic, do not use the default values for `LD_LIBRARY_PATH` and `PATH`.
Includes an optimization/refactor suggestion from my original implementation: https://github.com/snapcore/snapcraft/pull/3758#discussion_r881900290
Resolves https://github.com/snapcore/snapcraft/issues/4187
(CRAFT-1774)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to omit default LD_LIBRARY_PATH and PATH in classic confinement, resolving issue #4187. Post-merge feedback indicates the change may break existing classic snaps relying on these environment variables. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to omit default LD_LIBRARY_PATH and PATH in classic confinement, resolving issue #4187. Post-merge review notes the change breaks existing classic snaps relying on these environment variables. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1635 snap: remove leaking LD_LIBRARY_PATH | snapcraft | merged | 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. | |
| #1094 core: switch to using rpath for clasic confinement. | snapcraft | merged | 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. | |
| #3087 meta: remove snapd workaround for classic for core20 onwards | snapcraft | merged | Removed snapd classic confinement workaround for core20 and newer bases. Retained command-chain workaround for core, core16, core18, and no base. Merged after single reviewer approval and passing CI checks. | |
| #1025 project loader: better error message for classic | snapcraft | merged | Merged to improve the error message when classic confinement requires the core snap. Resolved Launchpad bug #1650946 after passing CI and review. |