Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Debmagic

Modern, robust & easy tooling for building and packaging Debian/Ubuntu packages — while staying backwards compatible.

  • Build any package in an isolated container environment with debmagic build
  • Run Debian autopkgtest tests against built packages with debmagic test
  • Lint with debmagic check
  • Debug build environments interactively with debmagic shell

Installation

cargo install debmagic
pip install debmagic

or run it directly with uv:

uvx debmagic

Quickstart

Build any Debian-packaged source tree in an isolated environment:

cd your-package
debmagic build binary --driver lxd \
  --output-dir /tmp/build-artifacts

Pick a driver explicitly — there's no auto-detection:

Driver Check it's available Isolation
lxd / incus lxc list / incus list Full container isolation
docker docker info Full container isolation
bare none (no daemon) None — only use in a disposable/CI environment

Create a source package (.dsc) without compilation:

debmagic build source

Run the package's declared Debian autopkgtest tests against a prior build:

debmagic build binary --driver docker
debmagic test --driver docker

Use --strict to fail on skipped or undeclared tests (exit code 2). The bare driver requires --allow-host-test.

Useful options

  • --distro <codename> — select the target distro/release (e.g. trixie, noble) if the changelog is ambiguous
  • --persistent — retain the build environment for repeated attempts
  • --incremental — sync only changed sources for faster rebuilds; implies --persistent
  • --sign — GPG-sign the resulting .changes/.dsc/.buildinfo
  • --apt-mirror <url> — use a faster mirror for build-dependency resolution

Any of these can be persisted in a debmagic.toml config file instead of repeating CLI flags.

Inspecting a failed build

Failed builds tear down their environment by default. Pass --shell-on-failure to drop into a shell when stdout is a TTY, or build with --persistent and attach afterwards:

debmagic shell

Documentation

For the full documentation — the build quick reference, packaging guides, configuration and module references — visit debmagic.readthedocs.io.

License

Released under the GNU General Public License version 2 or later.

Metadata

Release files for debmagic 0.0.1a8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for debmagic 0.0.1a8
File Interpreter ABI Platform
debmagic-0.0.1a8-py3-none-manylinux_2_39_x86_64.whl Python 3 none Linux glibc 2.39+ x86-64 Details

Release files / debmagic-0.0.1a8-py3-none-manylinux_2_39_x86_64.whl

Download URL debmagic-0.0.1a8-py3-none-manylinux_2_39_x86_64.whl
Size 2.2 MB
Tags Linux glibc 2.39+ x86-64 Python 3
SHA-256 checksum
How to use checksums
460f5f874915443024b8452b1bfba970362938ff8948d1417a2e6d4f80bbe444
BLAKE2b-256 checksum
How to use checksums
8c14cc9107087750ea0a6ee6ee30116e13a73ea33222b165e611836eebd0d403
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page