Repository navigation
Weld
weld is the default high-level package manager for Arvor Linux. Written in C++ and built upon the libapt library, it was designed to provide a modernized CLI than napt and apt-nf-tree
Unlike other system utilities that share a unified codebase across both distributions, weld implemented distinct operational behaviors depending on the target architecture, specifically tailoring its execution for arm64 environments.
weld,unline napt optionally can download packages on a custom repository system configured via /etc/weld/sources.list and /etc/weld/sources.list.d/. It fetches custom repository metadata files (repo-metadata) to determine package availability, versions, and SHA256 checksums if you use -Dallow_weld_repositories in g++.
The package manager supports both standard APT repositories and local .deb files. When resolving dependencies, weld evaluates both the standard Debian archives and the custom Weld repositories, selecting the highest available version. Downloads are executed via curl and utilize multi-threading to fetch packages concurrently, strictly verifying SHA256 hashes before proceeding with an installation. It also supports "replaces" rules, allowing Weld packages to transparently substitute standard Debian packages.
To ensure system stability on mutable (non-immutable) systems, weld employs an advanced transactional update mechanism utilizing LVM (Logical Volume Manager) snapshots and chroot environments.
-
Sandbox Creation: When a package installation, removal, or upgrade is initiated,
weldcreates an LVM snapshot of the root volume (namedweld_sandbox_snap). The snapshot size is dynamically calculated based on the available free space in the volume group (ranging from 1GB to 5GB) and supports both thin and thick LVM volumes. It is then mounted at/nsm/weld/root. -
Chroot Verification: The transaction is executed entirely within this isolated chroot environment. System directories (
/dev,/proc,/sys, etc.) are bind-mounted into the sandbox. If the transaction fails within the sandbox, the host system remains untouched. -
Host Commitment: If the transaction is verified as successful in the sandbox,
weldprompts the user for confirmation (unless the--apply-hostor-yflags are used). It then creates a pre-transaction snapshot (apt-pre) on the host system before applying the changes. -
Automatic Rollback: Upon successful application to the host, a post-transaction snapshot (
apt-post) is created. If the host transaction fails,weldautomatically rolls back the system to theapt-presnapshot. Users can also manually trigger a rollback via therollbackcommand. -
Repository Synchronization: Operations that only involve syncing repository metadata (
weld sync) bypass the snapshot testing mechanism entirely.
weld implemented strict security protocols during its sandbox verification phase using Linux SECCOMP (Secure Computing Mode) and Berkeley Packet Filter (BPF).
Before executing a transaction inside the chroot, weld applies a SECCOMP filter that blocks dangerous system calls that could allow sandbox escape or kernel compromise. Blocked syscalls include reboot, init_module, kexec_load, swapon, ptrace, bpf, pivot_root, and settimeofday. If a process inside the sandbox attempts to execute one of these calls, the kernel denies it with an EPERM (Operation not permitted) error. This feature can't be disabled.
The CLI provides a modernized user experience compared to traditional APT frontends. It features:
- Progress Bars: Real-time, colorized terminal progress bars with percentage indicators and Estimated Time of Arrival (ETA) calculations for both sandbox verification and host application phases.
-
Pagination: The
searchcommand supports pagination via the-pflag, allowing users to navigate large lists of search results.
weld supports standard package management commands, including install, remove, purge, upgrade, dist-upgrade, search, sync, clean, and autoclean. Additionally, it introduces query and maintenance commands such as info, why, depends, list, and rollback.
Notable command-line options include:
-
--apply-host: Skips the chroot sandbox verification and applies changes directly to the host system. -
-y/--yes/--assume-yes: Automatically assumes "yes" to all prompts, bypassing the post-sandbox confirmation screen. -
-p <page>: Specifies the page number for paginated search results. -
--vb: Enables verbose transaction logging.