Enable updating Toolbx through topgrade (#830)

* steps: toolbox: Add module to upgrade toolboxes

This adds a module to upgrade all toolboxes found on a host system.
[Toolbox][1] (More recently: `toolbx`) is a tool that easily provides
mutable, containerized command line environments. It is a means to work
and develop in a mutable environment on immutable operating systems such
as Fedora Silverblue, CoreOS, Kinoite and much more. However, it is not
limited to these use cases.

The integration into topgrade works as follows: Toolbx makes many of the
hosts folders available form inside the toolbx container by default. In
particular, all of the hosts filesystem is mapped under `/run/host`. This
module exploits this fact by:

- Gathering a list of toolboxes available on the host that runs
  `topgrade`
- Executing `toolbox run` for each of these toolboxes to run a command
  inside the toolboxes, **using the executing `topgrade` executable with
  the `--only system` arguments**

[1]: https://containertoolbx.org/

* toolbx: Integrate toolbx into the application

* Toolbx is Linux specific

Co-authored-by: Roey Darwish Dror <roey.ghost@gmail.com>
This commit is contained in:
Funky185540
2022-01-24 11:10:21 +01:00
committed by GitHub
parent 4932be15a3
commit da8cf9da05
4 changed files with 65 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ pub mod powershell;
pub mod remote;
#[cfg(unix)]
pub mod tmux;
#[cfg(target_os = "linux")]
pub mod toolbx;
pub mod vim;
#[cfg(unix)]
pub mod zsh;