Build deb packages for amd64 and arm64 - #1586
Open
jdrouet wants to merge 5 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.