debmagic

debmagic image

Modern, robust & easy Debian/Ubuntu packaging - while staying backwards compatible.

Debmagic unifies the the packaging experience as a single, streamlined tool. Additionally, debmagic-pkg allows you to define package build recipes in Python. Working with Debian packages without debmagic means juggling with several independent tools like sbuild/pbuilder chroots, dch, dpkg-buildpackage, debsign, autopkgtest virt-backends, dput, lintian, and various custom glue scripts. Debmagic unifies this into one CLI with useful defaults:

  • Isolated builds without the setup: debmagic build binary builds a debian/-packaged source tree in a temporary container (using LXD, Incus, Docker)

  • Fast iteration: --persistent/--incremental reuse the environment and sync only source changes; analyze failures with debmagic env shell

  • Test & sign integrated: debmagic test runs the package’s autopkgtest tests in a fresh environment, debmagic sign GPG-signs .changes/.dsc/.buildinfo on the host

  • Package uploading: debmagic upload (to debian, ubuntu, ppa:user/repo) pushes signed builds to archives and PPAs via scp/sftp, with configurable pre-upload checks

  • Upstream tracking: debmagic upstream list/switch replace uscan/uupdate, reading the package’s existing debian/watch and debian/copyright

  • Python packaging API: replace complicated debian/rules Makefiles with typed Python debian/rules.py, with optional dh compatibility

CI

Quickstart

cd your-package   # any source tree with a debian/ directory
uvx debmagic build binary --driver docker

[!TIP] debmagic --help lists everything.

Then dive into the pages below — start with Getting started.