"version: git" can produce version strings too long for snapd
Metadata
Current evaluation
Closed as superseded: version: git was deprecated in favor of craftctl set version after version-script was offered as the workaround for oversized git-derived versions.
Resolution: closed superseded
Reason: Closing maintainer comment ~mr-cal (2026-08-24) states that version: git was deprecated in favor of craftctl set version, replacing the obsolete feature rather than adding length limiting. Earlier, ~guilhem-fr recommended version-script to customize the output, and the reporter accepted that workaround.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The following snapcraft.yaml (to go into the github.com/weaveworks/flux tree):
name: fluxctl
version: git
summary: fluxctl talks to Weave Flux and helps you deploy your code
description: |
fluxctl talks to your Weave Flux instance and exposes all its
functionality to an easy to use command line interface.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict
plugs:
system-files:
read: [/etc/kube/config]
personal-files:
read:
- $HOME/.kube/config
- $HOME/.minikube/client.key
- $HOME/.minikube/client.crt
- $HOME/.minikube/ca.crt
parts:
fluxctl:
plugin: go
go-importpath: github.com/weaveworks/flux
prime:
- bin/fluxctl
apps:
fluxctl:
command: fluxctl
plugs: [system-files, personal-files, network, network-bind]
snapd gives:
[daniel@reef flux ]$ snap install --dangerous fluxctl_chart-0.2.1+git664.3a0e5b88-dirty_amd64.snap
Fehler: cannot read snap file: invalid snap version "chart-0.2.1+git664.3a0e5b88-dirty": cannot be
longer than 32 characters (got: 33)
[daniel@reef flux ]$
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | Closed as superseded: version: git was deprecated in favor of craftctl set version after version-script was offered as the workaround for oversized git-derived versions. | |
| stealth/space-bunny-alpha | — | closed stale | Closed after version: git was deprecated in favor of craftctl set version=...; a maintainer recommended version-script for shorter versions and the reporter acknowledged it. | |
| stealth/space-bunny-alpha | — | closed stale | Deprecated `version: git` in favor of `craftctl set version=...`; use `version-script:` to control the Git-derived version length. | |
| qwen/qwen3.6-35b-a3b | — | — | The version: git feature was deprecated in favor of craftctl set version=... to prevent excessively long version strings exceeding snapd's 32-character limit. Users should use version-script: or the new control command instead. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
15
Confidence:
85
Support Request:
5
|
close stale | Using version: git in snapcraft.yaml generates strings exceeding snapd's 32-character limit, causing install failures. No maintainer response or updates in over 7 years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
15
Confidence:
90
Support Request:
10
|
close stale | Reports that snapcraft version git generates version strings exceeding snapd 32-character limit, causing installation failures. Unaddressed for over seven years with no maintainer interaction. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
15
Confidence:
85
Support Request:
10
|
close stale | Snapcraft version git generates version strings exceeding snapd's 32-character limit. Unlabeled, unassigned, and inactive for over 7 years. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Superseded By:
snapcraft#3791
(confidence 85%)
Merge commit 293ac060b added craftctl support, matching the replacement named in the closing comment.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1849935 Generated 'git describe' based version strings can exceed 32 character version limit | snapcraft (launchpad) | open | Historical version: git builds could generate a 38-character string rejected by snapd; snapcraft#3779 addressed the handling, and legacy support was later removed. | |
| #1882892 Strip "v" from git version | snapcraft (launchpad) | closed | No default "v" stripping was added. A maintainer said version: git is deprecated and recommends custom version logic via snapcraftctl set-version. | |
| #1769519 Setting the snapcraft.yaml version field to 'git' produces undocumented and broken magic | snapcraft (launchpad) | open | Documentation now includes version: git examples, but GitSource.generate_version() still lets tags containing characters such as underscores produce invalid snap versions that build successfully and fail installation. |