Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StageAll ¶
func StageAll(exec executor.Executor, srcDir string, distro *detect.DistroInfo, log *logging.Logger) error
StageAll stages every source-install payload from srcDir to its FHS destination. Idempotent: copyIfChanged skips unchanged files, and %config(noreplace) entries preserve existing operator-edited content.
srcDir must be the root of a repo clone or extracted release tarball (i.e. the directory that contains bin/, cli/, install/, etc.).
Returns an error only on unrecoverable failures. Individual file-copy failures are logged and counted; the orchestrator continues so one bad entry does not abort the whole staging pass.
func VerifyInventory ¶ added in v1.98.2
VerifyInventory asserts that every canonical required destination is materially present after install. Called by the post-install assertion suite (validate.assertPayloadInventory). It does not checksum every staged file — it proves material install completeness per v1.98.2 R-3.
Scope: destinations that every install (source OR package) must produce. Optional/distro-conditional artifacts (man, polkit, completions) are intentionally excluded.
Types ¶
type ConfigIntegrityIssue ¶ added in v1.100.4
ConfigIntegrityIssue describes one minimum-sanity failure on a critical config file. PR-P2-6 scope: minimum-size + required-header/ token check only — not a full integrity/checksum framework.
func VerifyConfigIntegrity ¶ added in v1.100.4
func VerifyConfigIntegrity(exec executor.Executor) (ok bool, issues []ConfigIntegrityIssue)
VerifyConfigIntegrity runs the PR-P2-6 sanity checks on the set of critical config files. Each file must exist, meet a minimum byte count, and contain every required token/header. Returns a list of every failing check so the caller can surface all issues at once rather than first-fails-wins.
Scope lock (PR-P2-6, 2026-04-20):
- Presence + minimum size + required-substring only
- No checksums, no signatures, no semantic config parsing
- Fixed list of two critical files (nftban.conf + nftables.conf)
Adding a new file or a new signal beyond min-size/required-token requires an explicit contract update; this function deliberately does NOT grow into a validation framework.
type Destination ¶ added in v1.100.4
type Destination struct {
// Path is the destination filesystem path. For directory-glob
// entries (IsDir=true) it is the directory; for single-file entries
// it is the exact destination file.
Path string
// IsDir reports whether Path is a directory containing files
// matching Glob (true) or a single-file destination (false).
IsDir bool
// Glob is the glob pattern within Path when IsDir is true (e.g.
// "*.service", "*.conf"). Empty for single-file entries.
Glob string
// Category groups entries (binaries, shell, configs, systemd,
// polkit, logrotate, docs, ...).
Category string
// Optional reports whether absence of the source is non-fatal at
// install time. Uninstall treats every destination uniformly —
// presence is checked before delete in either case.
Optional bool
// Mode is the file mode applied at install. Carried for symmetry;
// uninstall does not use it.
Mode os.FileMode
}
Destination is a public, read-only catalog entry describing one staged-payload destination. Returned by Destinations.
Establishes a single source of truth between install (StageAll) and uninstall (uninstall.RemoveArtifacts) so the two paths stay coherent under future evolution of the destination set.
func Destinations ¶ added in v1.100.4
func Destinations(distro *detect.DistroInfo) []Destination
Destinations returns the public, read-only destination catalog derived from buildEntries. Same set, same distro-conditional polkit branch — uninstall walks this list to identify every path the installer staged.
This is a snapshot, not a live view: the slice is freshly allocated per call and safe for the caller to sort/filter without affecting other callers or future Destinations() calls.