It would be nice to support tarball source images (such as those generated by buildroot). Basically, instead of running debootstrap, just tar xf
to the right directory.
Having propellor generate the buildroot would be nice as well, but isn't needed right away.
I've introduced a ChrootBootstrapper type class, of which Debootstrapped is just one member. Everything that bootstraps chroots uses this type class, so you can write a separate module that uses buildroot, or whatever. And you're welcome to contribute such a module to propellor.
As far as having propellor generate a tarball of a chroot, the way to do that is something like:
Ie, compose the chroot creation property with one that tars it up.
I've done all I plan to do about this particular todo, so look forward to modules being contributed for other ways to bootstrap chroots.
MinimalTarball
may be too verbose. MaybeTarballImage
?I don't think it makes sense to add MinimalTarball as an operating System.
If you make ChrootTarball contain the FilePath to the tarball, then ChrootBootstrapper ChrootTarball instance doesn't need to look at the system parameter at all; instead it can just look inside the ChrootTarball to get the path to it, and extract that.
So, the user would write, say:
What might make sense it to change the first parameter of boostrapped to Maybe System, for cases where you don't want to specify it.
It would probably also be good to document what kind of tarball is expected. Ie, that it can be compressed, and should not consist of a single subdirectory, but one subdirectory for each top-level root directory.
Also, as a minor point, I don't think you need to pass standardPathEnv; it should be fine to use boolSystem with the regular enviroment as far as I can see. In fact, you could probably simplify extractTarball by implementing it like this: