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 environments interactively with debmagic env 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 — keep the build environment after every build (always); the default on-failure keeps it only when the build command fails
  • --incremental — sync only changed sources for faster rebuilds; forces --persistent=always
  • --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

A failed build or test keeps the Environment when Persistence is on-failure (the default) or always, and prints how to attach:

debmagic env shell <id>

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.1a9

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.1a9
File Interpreter ABI Platform Actions
debmagic-0.0.1a9-py3-none-manylinux_2_39_x86_64.whl Python 3 none Linux glibc 2.39+ x86-64 Details for debmagic-0.0.1a9-py3-none-manylinux_2_39_x86_64.whl

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

Download URL debmagic-0.0.1a9-py3-none-manylinux_2_39_x86_64.whl
Size 7.0 MB
Tags Linux glibc 2.39+ x86-64 Python 3
SHA-256 checksum
How to use checksums
19e32bcd74ac837cac80686d61afb5a00b0359a588273b8d6ef103fe929f8839
BLAKE2b-256 checksum
How to use checksums
a5ebc52ba0d7841a1c88bc67fe01f2cb64c0c54520d80c4b75e6628227c59942
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for debmagic 0.0.1a9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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