From 76eeaa01babdd1f1e575cd52db42341cfdcb6d2b Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Mon, 27 Apr 2026 09:05:35 +0200 Subject: [PATCH] build: add cargo-deb support Add [package.metadata.deb] section so `cargo deb` produces a Debian/Ubuntu package. Document the workflow in README. Co-Authored-By: Claude Opus 4.7 (1M context) --- Cargo.toml | 17 +++++++++++++++++ README.md | 11 +++++++++++ 2 files changed, 28 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 37338fc..9a2d385 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,6 +56,23 @@ license = "MIT" [lints] workspace = true +[package.metadata.deb] +maintainer = "Aljoscha Krettek " +copyright = "2026, ember authors" +license-file = ["LICENSE", "0"] +extended-description = """\ +Ember is a lightweight CLI for managing microVMs with copy-on-write storage. +On Linux it uses Firecracker (KVM) for VMs and ZFS zvols for storage. \ +No daemon, no REST API — just a single binary.""" +section = "admin" +priority = "optional" +depends = "$auto, zfsutils-linux, iptables, iproute2, curl, skopeo" +assets = [ + ["target/release/ember", "usr/bin/", "755"], + ["README.md", "usr/share/doc/ember/README", "644"], + ["LICENSE", "usr/share/doc/ember/LICENSE", "644"], +] + [dependencies] ember-core = { workspace = true } clap = { workspace = true } diff --git a/README.md b/README.md index 85677bf..500035f 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,17 @@ cargo build --release The binary is at `./target/release/ember`. +### Linux (Debian/Ubuntu .deb) + +Build a `.deb` package with [`cargo-deb`](https://github.com/kornelski/cargo-deb): + +```bash +cargo install cargo-deb +cargo deb +``` + +The package lands at `./target/debian/ember__.deb`. Install with `sudo apt install ./target/debian/ember__.deb`. Firecracker is not packaged in Debian/Ubuntu and must be installed separately. + #### Linux dependencies | Dependency | Purpose |