Expand description
Installing and removing the tools a computer runs projects with: the container engine, Vagrant,
Terraform, the hypervisors, the cloud CLIs and the services they need. Each tool’s row
(Dependency::row) says where it exists and what proves it installed; its install and its
removal are one exhaustive match per OS over the tool and the package manager, so a tool, an OS
or a package manager added is a compile error until each says what it does there. Every plan is
built on any OS, so the tests read every row.
A plan is a list of Steps, each one program, run in order through the Context’s runner
(run_steps): the OS’s own trusted flows, never a password prompt of the caller’s (pkexec’s
on Linux, or sudo -n when nobody is there to answer one: Elevation). Why a plan can’t be
made (Refusal) and why a step failed (StepFailed) are codes a UI says in its own words.
What an install added, read before and after its plan runs, is added’s; what it leaves on
record, so a clean-up removes only what it added, record’s; the removal of only that,
removal.
Re-exports§
pub use added::Before;pub use added::Installed;pub use added::Item;pub use added::before;pub use added::items;pub use added::there;pub use interaction::BROADCOM_DOWNLOADS;pub use interaction::Interaction;pub use interaction::OVFTOOL_PAGE;pub use interaction::Prompt;pub use interaction::VMWARE_FUSION_PAGE;pub use interaction::VMWARE_WORKSTATION_PAGE;pub use interaction::VendorPage;pub use interaction::interactions;
Modules§
- added
- What an install added, and nothing more: before a plan runs, which of its items are there
already (
before); after it, which it added (Before::installed). An item is what a removal takes away again (Item): a Linux distribution’s package, or the tool itself where it comes in one piece. An item that was there before the install is never among what it added, so a clean-up that removes only what an install added (super::record) never removes what someone else installed: a QEMU installed by hand stays when an install only added the programs its VMs need beside it (crate::providers::helpers). - brew
- What Homebrew prints when it, not the formula, is what is broken, read from one line of its error output: the user’s environment to repair, which an install can’t mend itself.
- exit_
codes - What a Windows install’s exit codes mean: winget’s own result codes and the codes an installer it ran exits with (a declined UAC prompt, an MSI its user backed out of), as codes a UI words. The raw codes stay in the log.
- interaction
- What an install asks of the person at the computer: a password prompt the OS raises, a vendor’s agreement they accept in the vendor’s own window, a setting they allow, a restart, a long wait. A UI says these before the install starts, and again while the step that raises them runs; nothing here is worded, each is a code a UI says in its own words.
- linux
- Installs and removals on Linux: one root script each (
RootScript), run as root as theElevationsays, through apt and the vendors’ apt repositories or dnf and the vendors’ rpm repositories (scripts). - macos
- Installs and removals on macOS: the vendors’ own disk images and packages for the apps and the
AWS CLI (Homebrew downloads the apps’, the AWS CLI’s comes from Amazon; then they are checked
and installed as an administrator, with nothing left for the user to finish:
super::mac_image), HashiCorp’s signed package for VMware’s utility, or Homebrew’s formulae. A removal of what came from a vendor’s package runs as its uninstaller does, through macOS’s administrator prompt. - record
- What setups added, on record, so a clean-up removes what they added and only that: each
install’s
Installed(super::added), never the items that were there before it. A tool whose install only opened its vendor’s installer (a macOS cask), or which isn’t found yet, counts once a later check finds it (settle). The rules are here; the caller keeps the records where it keeps its data, and reads and writes them in one transaction aroundrememberandsettle. - root
- The shell scripts run as root (Linux), and the pieces of those that download something and
trust it only once it is checked: a fresh private work directory, gpg with a keyring of its own
there, and the check of a downloaded signing key against the fingerprints pinned for it. The
vendors’ apt repositories an install sets up (
super::linux) go through the same check, and so can an embedder’s own root scripts. - windows
- Installs and removals on Windows: winget’s packages, WSL’s own installer and Hyper-V’s Windows
feature (DISM), each elevated through Windows’ own UAC prompt, and HashiCorp’s signed MSI for
VMware’s utility. A declined prompt exits
ERROR_CANCELLED(1223), which reads as cancelled (super::exit_codes::Known::Cancelled).
Structs§
- Agreement
- A vendor’s agreement its app shows its user, who accepts it there themselves
(
Note::InstallingFromVendor): nothing here ever accepts it for them. - NoBuild
- An OS and CPU a tool’s vendor ships no build for that a setup installs, and why.
- Step
- One command of an install or removal.
- ToolRow
- A tool’s row of the setup’s table (
Dependency::row).
Enums§
- Dependency
- A tool a setup installs.
- Elevation
- How a step that needs an administrator is elevated. With someone there to answer, the OS’s
password prompt (pkexec’s on Linux, macOS’s own); with nobody (a script, a machine set up
unattended), no prompt may be raised: as is when the process is root already, else through
sudo -n, refused at once rather than waiting on a password. - NoElevation
- Why no administrator’s step can run here: nobody can be asked, and nothing runs one without
asking (
Elevation::here). - NotServed
- What a step found this system isn’t, before it changed anything. A UI says each in its own words.
- Note
- What a step is, said before it instead of its command line (a UI words it): an install that opens its vendor’s own installer, a step that raises an administrator’s prompt.
- Refusal
- Why a plan can’t be made here. A UI says each in its own words.
- Runs
- Where a tool exists.
- Step
Failed - Why a step failed. A UI says each in its own words.
Functions§
- command_
line - How a step shows in a log:
$ program args, as typed. A root step’s proxy is never on it (it is read from a private file); a caller that shows the line to someone may still redact it. - plan
- The install of
deponhost, whatever its OS: macOS’s Homebrew formulae and vendors’ disk images and packages (installed as an administratorelevation‘s way), Windows’ winget packages and elevated installers, or Linux’s root script for the useruser(joined to the groups a tool’s devices need), its root steps runelevation’s way with this process’s proxy (linux::proxy_assignments). The one call a caller plans an install with: which OS’s plan applies is the host’s, never the OS the crate is built for. - present
- Whether
depis installed on the context’s host;Nonewhen that can’t be told (WSL, Hyper-V). The tool itself (tool_found); a hypervisor with the programs its VMs need beside it (crate::providers::helpers()), as its provider’s detection reads it: one without them is installed again, which brings them. - removal
- The removal of what
addedlists ofdeponhost(Installed::added, as on record), and of nothing else: on Linux those of its packages (added::packages), through the package manager that installed them, its root steps runelevation’s way with this process’s proxy; elsewhere, and for the AWS CLI’s folder, the tool itself when the record says the install added it (Item::Tool). On macOS, VirtualBox’s uninstaller runs from its installer image (virtualbox). - run_
step - Runs one step, each line it prints (standard output and error) handed to
on_line. It runs in a process group of its own, like every tool of the runner: a step dropped mid-way is ended with what it started, not left installing unattended. - run_
steps - Runs
stepsin order, each without aNoteannounced ascommand_linefirst (a caller that shows notes says them itself); the first that fails stops them. - set_
app_ name - Names the app that runs installs and removals (
Example App): macOS’s administrator prompt then says it wants to (Example App wants to install Docker Desktop: macOS needs your password to copy it into Applications.), instead ofosascript wants to make changes. Set once, at the app’s start; a later call changes nothing. - step
- A step that runs
programwithargs. - vagrant_
plugin - The step that installs the Vagrant plugin
plugin(for this account, no administrator), whenpluginnames one: only ever avagrant-*/vagrant_*identifier, never an option or a path.
Type Aliases§
- Probe
- A program and the arguments it answers with its version.