On 2017-09-22 22:26, Rich Freeman wrote: > So, we're drifting in topic, but as long as we're coming up with > nice-to-have utilities it would be lovely if our install CDs had > something similar to systemd-nspawn to set up a container instead of a > chroot for performing the install. If nothing else it would make > mount cleanup easier when you're done. I imagine it would just be a > bit of shell scripting with util-linux on the CD - while nspawn is > bundled with systemd you don't need any of its fancier features for > doing an install.
If you're fine with python, you could try pychroot [1]. I wrote it with this kind of thing in mind and for doing easy namespaced chroots in python using a context manager. It's even in the tree already. ;) Tim [1]: https://github.com/pkgcore/pychroot