Skip to content

lxd driver and build features - #20

Merged
mikonse merged 7 commits into
SFTtech:mainfrom
TheJJ:lxd-build
Aug 4, 2026
Merged

lxd driver and build features#20
mikonse merged 7 commits into
SFTtech:mainfrom
TheJJ:lxd-build

Conversation

@TheJJ

@TheJJ TheJJ commented Aug 3, 2026

Copy link
Copy Markdown
Member

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 build into build binary and build source targets - one more word to type but both are clear then.

@TheJJ TheJJ changed the title lxd driver, apt-mirror + proposed, delegated signing, debug symbols, rules/clean support lxd driver and build features Aug 3, 2026
@TheJJ TheJJ mentioned this pull request Aug 3, 2026
Comment thread Cargo.toml Outdated
Comment thread docs/usage/build.md Outdated
Comment thread docs/usage/build.md Outdated
Comment thread docs/usage/build.md Outdated
Comment thread docs/usage/build.md Outdated
Comment thread docs/conf.py
Comment thread packages/debmagic/src/cli.rs
Comment thread packages/debmagic/src/config.rs
TheJJ added 6 commits August 4, 2026 17:55
…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
@mikonse
mikonse merged commit f851246 into SFTtech:main Aug 4, 2026
10 checks passed
@TheJJ
TheJJ deleted the lxd-build branch August 4, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants