Skip to content

fix(nightly): make .deb/.rpm Version dpkg-valid (digit-leading short commit)#672

Merged
reflog merged 1 commit into
mainfrom
reflog/fix-nightly-deb-version
Jun 16, 2026
Merged

fix(nightly): make .deb/.rpm Version dpkg-valid (digit-leading short commit)#672
reflog merged 1 commit into
mainfrom
reflog/fix-nightly-deb-version

Conversation

@reflog

@reflog reflog commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Problem

Nightly .deb/.rpm packages set their Version field to the bare short commit (.goreleaser.yaml: version_template: "{{ .ShortCommit }}"). Debian/RPM require the Version to start with a digit, so any nightly whose short SHA starts with af (~6/16 of commits) produces a package dpkg refuses to install:

dpkg: error processing archive .../http-proxy-lantern dd44277c [14.9 MB] (--unpack):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 2 package 'http-proxy-lantern':
 'Version' field value 'dd44277c': version number does not start with digit
E: Sub-process /usr/bin/dpkg returned an error code (1)

On the bandit VPS fleet this aborts cloud-init's package-install step (cc_scripts_user … Runparts: 1 failures), so http-proxy never installs, the route never reaches running/gets a public address, and the provisioner retries the box forever. It went unnoticed because previous nightly tags happened to start with a digit (e.g. 7f088dcf); pointing the fleet at dd44277c surfaced it and stalled all new http-proxy provisions.

Fix

  • version_template: "0.0.0+{{ .ShortCommit }}" — digit-leading, valid for both dpkg and rpm (0.0.0+dd44277c).
  • Pin nfpms.file_name_template to http-proxy-lantern_{{ .ShortCommit }}_linux_{{ .Arch }} so the published asset name is unchanged (http-proxy-lantern_<shortcommit>_linux_<arch>.deb). The VPS cloud-init builds its download URL from bandit_vps_http_proxy_default_short_tag (alnum short commit), so decoupling the file name from the Version keeps that workflow working with no change in lantern-cloud.

goreleaser check passes.

After merge / deploy

Once a nightly is built from this fix, point the fleet at the new short commit:
lc settings update --name bandit_vps_http_proxy_default_short_tag --value '"<newshortcommit>"' --overwrite. With this change any short commit (digit- or letter-leading) installs cleanly.

Related: getlantern/engineering#3630 (http-proxy hot-swap gap — separate issue). Surfaced while rolling out the keepcurrent memory fix (#671).

The nightly packages set their Debian/RPM Version field to the bare short
commit (version_template: {{ .ShortCommit }}). dpkg requires the Version to
start with a digit, so any nightly whose short SHA starts with a-f (~6/16 of
commits) produces a .deb that fails to install:

  dpkg: error processing archive ... 'Version' field value 'dd44277c':
  version number does not start with digit

On the VPS fleet this aborts cloud-init's package install, so http-proxy
never comes up, the route never reaches running, and provisioning retries
forever. It only worked until now by luck (previous tags happened to start
with a digit, e.g. 7f088dc).

Fix: prefix a digit-leading stub in the Version (0.0.0+<shortcommit>) and pin
the nfpm file_name_template to keep the short commit in the asset name, so the
published asset stays http-proxy-lantern_<shortcommit>_linux_<arch>.deb — the
exact name the VPS cloud-init builds its download URL from. No change needed
in lantern-cloud or the bandit_vps_http_proxy_default_short_tag workflow.

goreleaser check passes.
@reflog reflog merged commit c1cb0d8 into main Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant