Skip to content

A rust implementation inspired by `cleanroom`

License

Notifications You must be signed in to change notification settings

hunger/cleanroom-rs

 
 

Repository files navigation

Cleanroom

Cleanroom is a way to build immutable Linux distribution images backed by strong cryptography. Any change to the image will be detected.

This is the second iteration written in Rust: The first was written in Python and can be found in the cleanroom repository

Cleanroom is linux only and will not work on any other OS at this time

Requirements

You will need to have the following binaries on the system you run cleanroom on:

  • The cleanroom command defined in this repository

  • /usr/bin/systemd-nspawn to set up containers with

  • busybox as a statically compiled binary as a OS agnostic run environment inside and outside of containers.

    Binaries can be downloaded from here: https://busybox.net/downloads/binaries/ Most distributions have busybox packages, that work just as well.

  • direnv helps but is not strictly necessary. Without it you will need to source a .envrc file to configure your shell for cleanroom.

Everything else is done in containers managed or built by cleanroom.

Installation

Cleanroom consists of one binary called cleanroom and configuration for the systems you want to create. Binary builds are available on Github.

Alternatively you can clone this repository and run

cargo run --release -p cli -- <arguments>

Getting started

Run cleanroom initialize in an empty directory to get an arch linux based playground project to experiment with.

cleanroom initialize takes the following arguments for a more tailored start:

  • --distribution to use as a base. This defaults to arch
  • --busybox-binary pointing to the busybox binary
  • the directory to set up camp in (defaults to .) as its only positional argument

This will set up a playground for you to experiment in:-)

Once cleanroom initialize is done check the generated .envrc file and source it into your running shell (source .envrc in bash).

About

A rust implementation inspired by `cleanroom`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 94.8%
  • Shell 5.2%