Skip to content

Add .deb package generation for Linux releases#18

Merged
richardsondev merged 2 commits into
masterfrom
add-deb-packages
May 11, 2026
Merged

Add .deb package generation for Linux releases#18
richardsondev merged 2 commits into
masterfrom
add-deb-packages

Conversation

@richardsondev
Copy link
Copy Markdown
Owner

@richardsondev richardsondev commented May 11, 2026

Summary

Adds .deb package generation to the release workflow for all Linux architectures. As a template repo, this demonstrates how to produce Debian packages from a Rust CI pipeline.

Changes

  • Added debArch field to each Linux target in the build matrix (i386, amd64, armel, armhf, arm64)
  • Added a Build .deb package step that uses dpkg-deb to create Debian packages after the binary is compiled
  • Added Upload .deb Release Asset step with --clobber for idempotent re-runs
  • Uses env.APP_NAME consistently for binary paths and package naming
  • Binary installs to /usr/bin/hello_world

How it works

On a release event, each Linux matrix job creates a .deb package using dpkg-deb --build. The package contains the binary at /usr/bin/hello_world and a DEBIAN/control file with package name, version (from the release tag), and architecture. The .deb is uploaded to the GitHub Release alongside existing raw binaries.

Architectures

Debian Arch Rust Target
amd64 x86_64-unknown-linux-gnu
i386 i686-unknown-linux-gnu
arm64 aarch64-unknown-linux-gnu
armhf armv7-unknown-linux-gnueabihf
armel arm-unknown-linux-gnueabi

Usage

sudo dpkg -i hello_world_0.02_amd64.deb
hello_world

richardsondev and others added 2 commits May 10, 2026 19:47
Adds debArch to Linux matrix entries and a dpkg-deb build step that
creates .deb packages for each Linux architecture on release. Packages
install the binary to /usr/local/bin/.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Install to /usr/bin instead of /usr/local/bin (Debian FHS policy)
- Add --clobber to gh release upload for idempotent re-runs
- Use env.APP_NAME where defined for consistency
- Add missing debArch to matrix entries (http_trace)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@richardsondev
Copy link
Copy Markdown
Owner Author

🧪 .deb Package Test Results

Test environment: podman + debian:bookworm-slim (amd64)
Package: http_trace_0.01_amd64.deb

Test Result
Build .deb with dpkg-deb
Install with dpkg -i
Binary in PATH
Binary executes ⚠️ glibc 2.38 needed (build-env issue, not packaging)
Uninstall with dpkg -r

Package structure is valid. Binary execution requires glibc 2.38+ (built on ubuntu-latest). Consider switching Linux runners to ubuntu-22.04 for bookworm compatibility.

@richardsondev richardsondev merged commit daa0c46 into master May 11, 2026
8 checks passed
@richardsondev richardsondev deleted the add-deb-packages branch May 11, 2026 04:30
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