lxd driver and build features - #20
Merged
Merged
Conversation
TheJJ
commented
Aug 3, 2026
mikonse
reviewed
Aug 3, 2026
…e builds Containers are identified by a fingerprint of their environment (image, apt mirror, proposed pocket, host uid/gid, build root) and named deterministically within LXD's 63-char limit, so persistent environments self-invalidate when any input changes. New build capabilities, configurable via CLI flags or debmagic.toml: --apt-mirror replaces the base image's apt sources with a managed deb822 file pointing at a given mirror (via scripts/mirror.py) --proposed enables the release's -proposed pocket --persistent keeps the build environment for reuse across invocations --incremental (binary builds) synchronizes changed source inputs while preserving build outputs, tracked by a source manifest --sign/--sign-key GPG-sign the resulting .changes/.dsc with debsign, always on the host since it needs the user's keyring --debug-symbols controls the automatic -dbgsym package via DEB_BUILD_OPTIONS --clean runs debian/rules clean before building Split 'debmagic build' into 'build binary' and 'build source' targets; source builds default to the bare driver since they need neither build-deps nor compilation.
add --source-sync (config key source_sync_mode) with three modes: - 'tracked' (default) stages git-tracked files including uncommitted changes and warns about untracked files left out - 'committed' fails on a dirty worktree - 'worktree' keeps staging everything not git-ignored. this makes it explicit which files end up in the build tree and in generated source packages. git submodules are skipped with a note, and both git modes fall back to 'worktree' with a warning outside a git worktree.
move source-tree staging and incremental sync into build/source.rs and the attach/detach socket server into build/attach.rs, leaving build/mod.rs with the build orchestration itself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
many new features :)
lxd driver, apt-mirror + proposed, delegated signing, debug symbols, rules/clean support, source build sync modes (worktree/tracked/committed)
i've split
debmagic buildintobuild binaryandbuild sourcetargets - one more word to type but both are clear then.