Skip to main content

Crate onelf_sysroot

Crate onelf_sysroot 

Source
Expand description

Pinned sysroots as a source of truth for what a bundle contains.

A sysroot is a root filesystem with a package database. Every file in it belongs to a package, and every package declares what it depends on, so the set of files an application can reach is known before any ELF is inspected. That is what a host scan cannot offer: a dlopen by computed name, a plugin directory, a schema file are all invisible to DT_NEEDED, and all recorded in the database.

The crate reads the database, computes closures, materializes a sysroot from an archive, and prunes a closure by the three tiers a recipe may declare: the platform line the host supplies, a policy of paths that never ship, and optionally the files a traced run never opened.

Re-exports§

pub use closure::Closure;
pub use db::Database;
pub use db::Package;
pub use platform::Pin;
pub use prune::PlatformLine;
pub use prune::Policy;
pub use prune::Pruned;
pub use prune::Trace;

Modules§

archive
Materializing a sysroot from a rootfs archive.
closure
The set of packages an application reaches.
db
The pacman local database.
ldconf
The loader search directories a sysroot declares in etc/ld.so.conf.
path
Paths read inside a sysroot as if it were the root filesystem.
platform
The GL build a sysroot names for hosts that have none.
prune
The three tiers that take files out of a closure.

Constants§

LIB_DIRS
Directories a distribution keeps shared libraries in, relative to a sysroot root: the flat legacy dirs and Debian’s multiarch triplets. Package databases and traces name files under these without a leading slash.
LIB_PATHS
LIB_DIRS as absolute host paths.

Functions§

is_top_level_lib_object
Whether rel (sysroot-relative) is a shared object sitting directly in a distribution library directory.