Skip to content

Build deb packages for amd64 and arm64 - #1586

Open
jdrouet wants to merge 5 commits into
Schniz:masterfrom
jdrouet:feat/deb-packages
Open

Build deb packages for amd64 and arm64#1586
jdrouet wants to merge 5 commits into
Schniz:masterfrom
jdrouet:feat/deb-packages

Conversation

@jdrouet

@jdrouet jdrouet commented Aug 19, 2026

Copy link
Copy Markdown

Builds .deb packages for amd64 and arm64 with cargo-deb. It reuses the musl binaries the linux and arm jobs already build, so there is no extra build step.

They're uploaded as workflow artifacts like the zips, so they still need to be attached to the release manually.

It's just a convenience download, not something meant for the debian archive.

Describes how to build a Debian package from the crate: payload is
/usr/bin/fnm only, section utils, and the full GPL text as the copyright
file. An explicit extended-description is required because cargo-deb
otherwise inlines the entire README into the control file.

fnm is a statically linked musl binary with TLS roots compiled in, so it
has no runtime dependencies.
Packages the static musl binaries the linux and arm jobs already produce,
so no new build or toolchain is needed. Both packages are uploaded as
workflow artifacts, like the existing zip assets.

--no-strip is required because this job has no aarch64 strip. cargo-deb is
pinned since renovate cannot see cargo install lines in workflow YAML.
cargo-deb rewrites a semver prerelease dash to a tilde for Debian version
ordering, so a 1.39.0-beta.1 crate produces fnm_1.39.0~beta.1-1_amd64.deb.
Reconstructing the filename from the crate version missed it and failed the
verification steps on valid packages.

Glob for the package instead, assert exactly one match exists, and check the
name and architecture from its own control fields.
errexit is suppressed on the left of &&, so `test "$#" -eq 1 && test -f "$1"`
let a multiple-match glob through: the count check failed, the file check was
skipped, and the step carried on with the first match. Splitting the two
assertions makes both of them fail the step.
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