Can't include symlinked file into built charm
Metadata
Current evaluation
Charmcraft blocked external symlinks for security. The restriction was lifted after adopting snapcraft's build system, which now handles external file inclusion via parts. Issue closed as resolved.
Suggested action: —
No scores available.
Issue body
I have a project with a directory structure like this:
```
/
├─ docs/
│ ├─ images/
│ │ ├─ icon.svg
├─ operators/
│ ├─ katib-controller/
│ │ ├─ icon.svg
```
I have symlinked `/operators/katib-controller-icon.svg` to `/docs/images/icon.svg`. It symlinks fine, but when building the charm, I get this message:
Ignoring symlink because targets outside the project: 'icon.svg'
I would like charmcraft to copy over the linked file (and not the symlink itself). This is not limited to simple things like icon.svg (that is relatively easy to copy once and it won't fail to stay in-sync), but being able to symlink directly to upstream files such as this:
https://github.com/kubeflow/katib/blob/master/manifests/v1beta1/webhooks/webhooks.yaml
We have upstreamed charms into that repository, and if I just copy/paste that file once, it could very easily get out of sync.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Charmcraft blocked external symlinks for security. The restriction was lifted after adopting snapcraft's build system, which now handles external file inclusion via parts. Issue closed as resolved. | |
| qwen/qwen3.6-35b-a3b | — | — | The request to include symlinked files in the built charm was resolved and implemented. The maintainer confirmed the feature is already in place, addressing the initial security concerns. | |
| qwen/qwen3.6-35b-a3b | — | — | Charmcraft blocked external symlinks for security. Maintainers closed the issue stating the feature is already implemented, likely via the adopted snapcraft parts-based build system. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. Maintainers resolved the issue by adopting snapcraft's parts-based build system. The new architecture handles source linking differently, addressing the symlink restriction without a dedicated flag. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Resolved by implementing snapcraft's parts-based build system. The new architecture replaces the previous restriction, enabling proper symlink resolution and file inclusion during charm packaging. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1079 Do not ignore symlinks to external files | charmcraft | open | Request to include symlinks pointing outside the charm project directory in packed charms (monorepo shared files). Behavior is intentional and tested; a recent experimental monorepo build-root feature (PR #2836) may address the underlying use case. |