----------------------------
- The main module was renamed from chroot to pychroot mostly for consistency to
match the project name and cli tool installed alongside it.
- Add a man page for the pychroot cli tool.
- Add user namespace support so you can chroot as a regular user. Note that
this also requires using a network namespace for which we only setup a
loopback interface (if iproute2 is installed in the chroot) so external
network access won't work by default in this situation.
- Add an option to skip changing to the newroot directory after chrooting. This
is similar to the option for chroot(1) but also allows skipping the directory
change when the new root isn't '/'. In other words, you can use a chroot
environment against the host's rootfs.
- Use $SHELL from the environment for the pychroot script to mirror chroot's
behavior.
- Move WithParentSkip, the main parent/child execution splitting context
manager allowing this all to work, to snakeoil.contextlib and rename it
SplitExec. It was moved in order to develop other context managers around it
in snakeoil and elsewhere more easily.
- Fix additional argument parsing for the pychroot script. Now commands like::
pychroot ~/chroot /bin/bash -c "ls -R /"
will work as expected (i.e. how they normally work with chroot).
- Allow mount propagation from the host mount namespace to the chroot's but not
vice versa. Previously systems that set the rootfs mount as shared, e.g.
running something like::
mount --make-rshared /
would leak mounts from the chroot mount namespace back into the host's
namespace. Now the chroot mount namespace is recursively slaved from the
host's so mount events will propagate down from host to chroot, but not back
up from chroot to host.
- Add support for setting the chroot's host and domain names for all versions
of python. Previously we only supported setting the hostname for py33 and up.
To set the domain name, pass an FQDN instead of a singular hostname. This
also adds a "--hostname" option to the pychroot script that enables the same
support for it.