Overview/xpkg — package builder
xpkg - Future Integration Notes
Context and notes for when the xpkg Rust tooling is re-activated inside the
xlnux reboot. This document is intentionally forward-looking and based on
DECISIONS.md and the workspace ROADMAP.md (both at the workspace root,
outside this repo), plus the open items in this repository's own ROADMAP.md.
Related documents in this folder:
Where packaging stands today
During the reboot, the distribution payload is packaged with the classical Arch toolchain:
- Recipes are PKGBUILD files built with makepkg (the
x-scriptspackage, built in thescriptsrepo packaging area). - Resulting packages are published to the binary repository
x-repo(the same layout xpkg would maintain throughrepo-add). - The workspace roadmap keeps the Rust tooling phase (Fase 4 - Tooling Rust xpm/xpkg) postponed: xpm/xpkg are not part of the current delivery flow.
xpkg is therefore not consumed by the reboot flow today. It is the intended future packager, in a REBOOT PENDING state.
The guiding decision: ADR-0004
ADR-0004 (in DECISIONS.md) keeps xpkg/xpm as the distribution's own,
up-to-date tooling base (Rust + ALPM + sequoia signing) and states the
consequence that own packages will be built with xpkg and served from
x-repo. That only happens after the precondition is met:
Wire the xpm SAT resolver to
install(transitive deps) and support installing local.xpfiles; finish the remaining query stubs. Until then the system bootstrap must not depend on xpm.
Implication for xpkg: a full swap to xpkg-built packages is blocked upstream
in xpm's install path, not by xpkg itself. xpkg already produces artifacts
that current xpm sync understands (see below).
What already works end to end
docs/realexample.md in this repo documents a real run proving the path:
xpkg buildproduced a real.xpforxfetch;xpkg infoandxpkg lintvalidated it.xpkg repo-addcreated and updated ALPM databases (.db.tar.gzand a.dbcopy) in local static layouts, including thex-repoPages layout.xpm syncagainstfile://mirrors downloaded and parsed those databases.- Caveats recorded there: current
xpmonly syncs.db/.filesmirrors; package download/install is part of xpm's later phase; metadata-only repos with artifacts hosted elsewhere (e.g. GitHub Releases) require the fetch-URL composition inxpm.
Open items in this repository
From this repository's ROADMAP.md (Phase 9 still has two unchecked items,
Phase 10 is open):
- Integration tests with xpm - build packages with xpkg and install with xpm end to end (#56). Blocked on the xpm install path described above.
- Comparative benchmarks vs makepkg - build time, package size, compression performance (#57).
- Phase 10 future goals (post-v1.0): split packages from one XBUILD, cross-compilation, clean chroot builds via namespaces, batch builds in dependency order, AUR-like helper integration, VCS package support, translations.
Notes for re-activation
- Trigger: revisit when the Rust tooling is required again - the
documented triggers are the xpm SAT resolver being wired to install and a
.xprepository being the serving format. - Order: land the xpm-side prerequisite first (ADR-0004), then switch the
packaging of own packages from makepkg/PKGBUILD to xpkg/XBUILD and serve the
result from
x-repo. Reuse the existingx-repoinfrastructure and the static layout validated inrealexample.md. - Method: the reboot works in
x/rebootbranches with commits kept local (no push by assistants); each phase closes with local tests per section before moving on; decisions are documented in the workspaceDECISIONS.md. - Avoid duplication: xpkg and xpm are independent binaries sharing one package format; keep them as the two complementary tools (builder vs manager) rather than merging responsibilities.
- Compat: keep the PKGBUILD parsing path while migration is ongoing so an
existing Arch-style recipe can be built unchanged with
xpkg build --pkgbuild.