Skip to content

Add .deb package generation for Linux releases#38

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

Add .deb package generation for Linux releases#38
richardsondev merged 4 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. Also fixes the CI trigger branch and adds fail-fast: false.

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
  • Fixed CI trigger branch from main to master (matching actual default branch)
  • Added fail-fast: false to strategy so Linux builds complete even if a Windows build fails
  • Uses env.APP_NAME consistently for binary paths and package naming
  • Binary installs to /usr/bin/http_trace

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/http_trace 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. The .NET test server build steps are unaffected.

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 http_trace_0.01_amd64.deb
http_trace https://example.com

Copilot AI review requested due to automatic review settings May 11, 2026 02:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Debian package generation to the release workflow so Linux builds can also be published as .deb assets alongside the existing binaries.

Changes:

  • Introduces a new “Build .deb package” step that assembles a minimal Debian package and runs dpkg-deb --build.
  • Uploads the generated .deb as a GitHub Release asset.
Show a summary per file
File Description
.github/workflows/release.yml Adds .deb packaging + upload steps to the release workflow.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 4

Comment on lines +141 to +143
- name: Build .deb package
if: ${{ github.event_name == 'release' && matrix.target.debArch != '' }}
run: |
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7a96866 — added debArch to all 5 Linux matrix entries (i386, amd64, armel, armhf, arm64).

Comment thread .github/workflows/release.yml Outdated
Comment on lines +144 to +146
mkdir -p dpkg/DEBIAN dpkg/usr/local/bin
cp ./target/${{ matrix.target.rustTarget }}/release/http_trace dpkg/usr/local/bin/
chmod 755 dpkg/usr/local/bin/http_trace
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7a96866 — changed to /usr/bin per Debian FHS policy.

Comment thread .github/workflows/release.yml Outdated
Comment on lines +145 to +146
cp ./target/${{ matrix.target.rustTarget }}/release/http_trace dpkg/usr/local/bin/
chmod 755 dpkg/usr/local/bin/http_trace
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7a96866 — all .deb step paths now use env.APP_NAME instead of hardcoded binary name.

Comment thread .github/workflows/release.yml Outdated
run: |
VERSION="${{ github.ref_name }}"
VERSION="${VERSION#v}"
gh release upload ${{ github.event.release.tag_name }} ./http_trace_${VERSION}_${{ matrix.target.debArch }}.deb
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7a96866 — added --clobber to gh release upload for idempotent re-runs.

@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 and others added 4 commits May 10, 2026 21:24
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>
The default branch is master, but the workflow referenced main,
preventing CI from running on PRs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prevents Linux builds from being cancelled when a Windows build fails
(e.g., due to missing nasm). Each platform builds independently.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@richardsondev richardsondev merged commit ceb5e5a into master May 11, 2026
7 of 8 checks passed
@richardsondev richardsondev deleted the add-deb-packages branch May 11, 2026 04:26
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.

2 participants