debmagic
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 binarybuilds adebian/-packaged source tree in a temporary container (using LXD, Incus, Docker)Fast iteration:
--persistent/--incrementalreuse the environment and sync only source changes; analyze failures withdebmagic env shellTest & sign integrated:
debmagic testruns the package’s autopkgtest tests in a fresh environment,debmagic signGPG-signs.changes/.dsc/.buildinfoon the hostPackage uploading:
debmagic upload(todebian,ubuntu,ppa:user/repo) pushes signed builds to archives and PPAs via scp/sftp, with configurable pre-upload checksUpstream tracking:
debmagic upstream list/switchreplace uscan/uupdate, reading the package’s existingdebian/watchanddebian/copyrightPython packaging API: replace complicated
debian/rulesMakefiles with typed Pythondebian/rules.py, with optionaldhcompatibility
Quickstart
cd your-package # any source tree with a debian/ directory
uvx debmagic build binary --driver docker
[!TIP]
debmagic --helplists everything.
Then dive into the pages below — start with Getting started.