[PR #42] [MERGED] fix(packaging): produce a dpkg-valid .deb version without a git tag #43

Closed
opened 2026-10-15 12:51:34 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/LXC2Docker/pull/42
Author: @JBailes
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @JBailes

Base: main ← Head: fix/deb-version


📝 Commits (1)

  • 00d438b fix(packaging): produce a dpkg-valid .deb version without a git tag

📊 Changes

1 file changed (+5 additions, -1 deletions)

View changed files

📝 Makefile (+5 -1)

📄 Description

Problem

The Package (.deb) CI job fails intermittently:

dpkg-deb: error: parsing file 'bin/deb/DEBIAN/control' near line 2 package 'docker-lxc-daemon':
 'Version' field value 'a898091': version number does not start with digit

make deb derives VERSION from git describe --tags --always, which — with no git tags in the repo — falls back to a bare commit SHA. dpkg requires a version to start with a digit, so the job fails whenever the short SHA begins with a–f (≈⅜ of commits). It's flaky and unrelated to the build.

Fix

  • Use the tag when one exists (strip a leading v, and flatten git describe's -N-gsha suffix to dots so dpkg accepts it).
  • Otherwise synthesise a digit-led 0.0.0+git<sha>.

Verified

$ make deb
>> built bin/docker-lxc-daemon_0.0.0+git3d03d07_amd64.deb
 Version: 0.0.0+git3d03d07          # starts with a digit; dpkg-deb accepts it

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/LXC2Docker/pull/42 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 5/31/2026 **Status:** ✅ Merged **Merged:** 5/31/2026 **Merged by:** [@JBailes](https://github.com/JBailes) **Base:** `main` ← **Head:** `fix/deb-version` --- ### 📝 Commits (1) - [`00d438b`](https://github.com/games-on-whales/LXC2Docker/commit/00d438b633850048fb2e380a6b62a27d4de027e7) fix(packaging): produce a dpkg-valid .deb version without a git tag ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+5 -1) </details> ### 📄 Description ## Problem The `Package (.deb)` CI job fails intermittently: ``` dpkg-deb: error: parsing file 'bin/deb/DEBIAN/control' near line 2 package 'docker-lxc-daemon': 'Version' field value 'a898091': version number does not start with digit ``` `make deb` derives `VERSION` from `git describe --tags --always`, which — with no git tags in the repo — falls back to a **bare commit SHA**. dpkg requires a version to start with a digit, so the job fails whenever the short SHA begins with `a`–`f` (≈⅜ of commits). It's flaky and unrelated to the build. ## Fix - Use the **tag** when one exists (strip a leading `v`, and flatten `git describe`'s `-N-gsha` suffix to dots so dpkg accepts it). - Otherwise synthesise a **digit-led** `0.0.0+git<sha>`. ## Verified ``` $ make deb >> built bin/docker-lxc-daemon_0.0.0+git3d03d07_amd64.deb Version: 0.0.0+git3d03d07 # starts with a digit; dpkg-deb accepts it ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:51:34 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/LXC2Docker#43
No description provided.