You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skip online repository interaction for packaged builds
Enable TiUP to operate correctly and robustly when installed via an
external package manager (e.g., Debian, RPM, Homebrew). Allow TiUP to
run without requiring network access to its online repository for
initial setup or updates, which is crucial for production systems and
environments with restricted connectivity.
Achieve this by introducing the boolean flag `IsPackagedBuild`, which is
intended to be hard-coded to `true` in binaries produced by package
maintainers.
When `IsPackagedBuild` is true:
- The initial environment setup skips connecting to the online
repository, relying instead on local files.
- The automatic update check before running a component is skipped.
- A message is printed to stderr indicating that online interaction is
skipped, informing the user of the different behavior.
- Functions related to *forced* self-updating TiUP return an error,
explicitly disabling these operations in packaged builds. Users should
still be able to install/update when explicitly running those
commands.
- Use the system-wide location `/usr/share/tiup/root.json` for initial
trust setup and assume this file came with the package. This aligns
with typical system package practices.
0 commit comments