Skip to content

Add .deb packaging for Debian/Ubuntu #18

@kramerc

Description

@kramerc

Follow-up to #16 (RPM + MSI packaging). Debian/Ubuntu users currently have no first-class install path — they'd need to use the dev artifact pipeline or build from source. This issue tracks adding .deb support.

Tooling

cargo-deb is the Rust ecosystem standard, analogous to the cargo-generate-rpm we already use on the RPM side. Reads metadata from Cargo.toml, ships a single self-contained .deb from the built binary.

[package.metadata.deb]
maintainer = "Kramer Campbell"
extended-description = """
Discord Rich Presence IPC proxy that multiplexes RPC messages across
multiple Discord instances."""
section = "net"
priority = "optional"
assets = [
    ["target/release/presence-switch", "usr/bin/", "755"],
    ["packaging/linux/systemd/presence-switch.service", "usr/lib/systemd/user/", "644"],
    ["LICENSE", "usr/share/doc/presence-switch/copyright", "644"],
]

(Some duplication with the RPM asset list; a small refactor could share asset definitions if it grows.)

Per-user installation question

Unlike RPM/MSI, .deb installation via apt / dpkg is system-wide and requires sudo. The file payload would still install a user-level systemd unit at /usr/lib/systemd/user/presence-switch.service (each user enables via systemctl --user enable --now), so the runtime model stays per-user. Only the install step is privileged. Worth calling out in the README.

Sketch of work

  • Add [package.metadata.deb] block to Cargo.toml
  • Add a deb job to .github/workflows/package.yml, parallel to the existing rpm job:
    • cargo install cargo-deb --locked
    • cargo build --release --locked
    • cargo deb --no-build (with release tag override for dev builds)
  • Update scripts/package.sh to add a deb subcommand
  • Update the release job to attach the .deb to the GitHub Release
  • README: add apt install ./presence-switch_*.deb example

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpackagingDistribution package format (RPM, deb, MSI, pkg, etc.)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions