Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions packages/debmagic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Debmagic

Modern, robust & easy tooling for building and packaging [Debian](https://debian.org)/[Ubuntu](https://ubuntu.com) packages — while staying backwards compatible.

- **Build any package** in an isolated container environment with `debmagic build`
- **Test and lint** with `debmagic test` and `debmagic check`
- **Debug** build environments interactively with `debmagic shell`

## Installation

```shell
pip install debmagic
```

or run it directly:

```shell
uvx debmagic
```

## Quickstart

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

```shell
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:

```shell
debmagic build source
```

### 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` with `debsign`
- `--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. Build with `--persistent` up front, then attach an interactive shell inside the build environment:

```shell
debmagic shell
```

## Documentation

For the full documentation — the [build quick reference](https://debmagic.readthedocs.io/en/latest/usage/build.html),
packaging guides, configuration and module references — visit **[debmagic.readthedocs.io](https://debmagic.readthedocs.io)**.

## License

Released under the **GNU General Public License** version 2 or later.
4 changes: 2 additions & 2 deletions packages/debmagic/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ build-backend = 'maturin'
[project]
name = "debmagic"
version = "0.0.1-alpha.5"
description = "build debian packages"
description = "modern tooling for building and packaging Debian/Ubuntu packages in isolated environments"
license = "GPL-2.0-or-later"
# license-files = ["../../LICENSE"]
# readme = "../../README.md"
readme = "README.md"
requires-python = ">=3.12"
classifiers = ["Programming Language :: Python :: 3"]

Expand Down
Loading