|
Bootstrap
Bash-based bootstrap engine reference documentation
|
Accepted
Bootstrap delegates package installation to the native APT, APK, and DNF package managers. That delegation preserves native package-manager authority, but it also means Bootstrap inherits package-manager behavior that may wait for interactive input or otherwise fail to return.
Issue 42 records an APT installation of chkrootkit whose recommended dependencies caused dpkg to attempt interaction during a non-interactive Bootstrap run. The process appeared to hang indefinitely. Bootstrap also suppressed the native package-manager output and printed no package-level progress, so the user could not distinguish a slow successful installation from an installation waiting forever.
Three separate concerns are present:
Bootstrap should reduce the known APT trigger, bound package installation when the host provides the necessary capability, and report visible progress without corrupting the structured Execution Result stream.
timeout is not installed.APT package installation shall use --no-install-recommends.
Each mutating APT, APK, and DNF package installation shall be run through GNU timeout when that command is available. The timeout applies separately to each package installation. Its duration is configured by BOOTSTRAP_INSTALL_TIMEOUT, measured in seconds, with a default value of 30. The effective value must be a positive whole number. Invalid values are usage errors discovered before execution begins.
timeout is an optional runtime capability rather than a mandatory dependency. Bootstrap shall check for it before attempting a package installation. When it is unavailable, Bootstrap shall emit one warning per invocation and continue with unbounded native package-manager installations. Quiet mode shall not suppress this warning because it describes a degraded safety mechanism.
A timeout shall produce a failed Execution Result and the existing execution failure exit category. Bootstrap shall not introduce a new public exit code for this condition. Package-state inspection commands are outside this timeout boundary.
Immediately before a package installation, Bootstrap shall print the following progress prefix to standard error when quiet mode is not active:
The text shall remain on one logical line and shall be completed with done. on success or failed. on failure. Already-satisfied packages shall not print an installation progress message. Progress belongs on standard error because executor standard output carries machine-readable Execution Result records.
Native package-manager output may remain suppressed. Recovery guidance shall show the native command a user can run directly for complete diagnostics. The APT recovery command shall include --no-install-recommends; recovery examples need not include Bootstrap's timeout wrapper so users may diagnose failures interactively and deliberately.
This addresses the known APT trigger but does not protect APK, DNF, or unrelated APT failures that never return. It also leaves the user without progress information.
That variable can reduce some Debian-family prompts, but it neither prevents all blocking behavior nor applies to APK and DNF. It is not a general execution boundary.
This provides the strongest uniform guarantee, but it prevents Bootstrap from running on otherwise supported minimal systems. Bootstrap instead continues with an explicit warning so compatibility is preserved without hiding the risk.
This preserves compatibility but falsely implies that the documented safety boundary is active. Silent degradation is inconsistent with Bootstrap's human-centered diagnostics and conservative behavior.
A run-level timeout would make the permitted duration depend on manifest size and could interrupt planning, reporting, or several legitimate installations. A per-package timeout gives each native installation the same explicit bound.
The original failure is confusing during normal operation. Installation progress is useful default feedback and should disappear only when the user explicitly requests quiet output.
This would provide activity feedback, but it would also make output noisy and backend-dependent. Small stable progress messages preserve a consistent user experience while recovery guidance provides a route to native diagnostics.
The distinction is useful inside the Execution Result message, but callers already have an execution-failure category. A new public code would expand the stable interface without a demonstrated need.
timeout.timeout remain supported.timeout remain vulnerable to indefinitely blocked native package-manager commands after the warning is displayed..env override.timeout's conventional status.