From d8c74013517cc1afd52b4be89f72c2be72178f2d Mon Sep 17 00:00:00 2001 From: Ilya Yakelzon Date: Tue, 16 Jun 2026 12:13:37 +0200 Subject: [PATCH] fix(nightly): make .deb/.rpm Version dpkg-valid (digit-leading) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. 7f088dcf). Fix: prefix a digit-leading stub in the Version (0.0.0+) and pin the nfpm file_name_template to keep the short commit in the asset name, so the published asset stays http-proxy-lantern__linux_.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. --- .goreleaser.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f8a6531c..848275c5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -40,7 +40,12 @@ builds: binary: http-proxy nightly: - version_template: "{{ .ShortCommit }}" + # Debian/RPM Version fields must start with a digit, so the bare short commit + # (e.g. "dd44277c") is rejected by dpkg with "version number does not start + # with digit" whenever the SHA happens to start with a-f. Prefix a digit- + # leading stub; the short commit stays in the package file name (see + # nfpms.file_name_template) so the cloud-init download URL is unchanged. + version_template: "0.0.0+{{ .ShortCommit }}" tag_name: nightly publish_release: true keep_single_release: true @@ -62,6 +67,11 @@ release: nfpms: - id: http-proxy package_name: "http-proxy-lantern" + # Keep the short commit in the package file name (decoupled from the + # digit-prefixed Version above) so the asset stays + # http-proxy-lantern__linux_.deb — the name the VPS + # cloud-init builds its download URL from (bandit_vps_http_proxy_default_short_tag). + file_name_template: "http-proxy-lantern_{{ .ShortCommit }}_linux_{{ .Arch }}" formats: - deb - rpm