Linux Package Manager in Rust (composefs, EROFS, BLS)
Hi everyone!
I'm working on UPAC, a universal, atomic, and content-addressed package manager and deployment engine for Linux, written in Rust!
Traditional package managers edit files in place on live systems, leading to non-reproducible states and broken systems on interrupted updates. Existing immutable solutions (like OSTree) often introduce high barriers for simple tasks or lock users into specific ecosystems.
UPAC aims to solve state management while keeping disk layouts, bootloaders, and package formats flexible!
Key Architectural Highlights
- Content-Addressed & Immutable: Uses
composefs+ `EROFS` + `fs-verity` to build verifiable system images. Operations are atomic: a new image is prepared without touching the running system. - Smart 3-Way:
/etcmerge: automatically preserves user edits, applies package defaults, and leaves non-blocking.upac-newconflict markers without halting deployments. - Direct User Injections into
/usr: Allows users to add standalone assets into/usrwith full tracking in the package DB โ no full packaging boilerplate required. - Multi-Format Decoders via C-ABI: Decoders (deb, rpm, alpm, xbps) are decoupled into plugins (`dlopen` or statically compiled) behind a clean C-ABI.
- Deterministic Boot & Auto-Rollback: Leverages
BootNext(direct UKI) orLoaderEntryOneShot(BLS/systemd-boot) for single-attempt safe boots. If the new deployment fails before late confirmation, the firmware automatically falls back to the previous known-good deployment.
Project Structure
upac/
โโโ lib/ Rust core & C-ABI
โโโ cli/ Thin CLI frontend
โโโ decoders/ Plugin crates for formats (alpm, deb, rpm, xbps)
โโโ derive-static/ Proc-macro crate
โโโ tests/ Integration tests
Looking for Co-Developers & Contributors!
The specification and architecture are most fleshed out for base oackage manipulations, and ima moving forward with implementation. Since balancing full-time work and open-source can be tough, I'd love to connect with fellow Rust systems engineers interested in building this together!
Great areas to jump in on:
- Package Decoders (
decoders/*): Implementing standalone decoders for.deb,.rpm, or.pkg.taraccording to the plugin contract. - The
/etc3-Way Merge Engine: Pure logic crate to merge live configs, base defaults, and new package defaults (handling overlayfs whiteouts). - FFI & Plugin Loader: Dynamic loading (
dlopen) and C-ABI wrappers. - CLI & Event Hooks: Rendering progress and handling user callbacks.
If you're interested in low-level Linux systems, storage, or package management in Rust, check out the project or reach out!
- GitHub: GitHub - justpav05/upac: Package manager for installing any type of package in Linux, as well as registering binary file rollbacks based on OSTree, written in Rust and Zig ยท GitHub
- Discussion/Contact:
- Telegram: @JustPav0
- Matrix: @justpav05Lmatrix.org
- Discord: justpav05
- Email: aksenovpaveldmitrievich@gmail.com