[buildd-tools-devel] Bug#488225: [Buildd-tools-devel] Bug#488225: Please support CLONE_NEWNS
Max Kellermann
max at duempel.org
Wed Jan 29 15:30:04 UTC 2014
On 2008/06/29 15:37, Roger Leigh <rleigh at whinlatter.ukfsn.org> wrote:
> Max Kellermann <max at duempel.org> writes:
>
> > With CLONE_NEWNS (a clone()/unshare() option), schroot could make all
> > mounts local, so the main host does not see them. The kernel would
> > automatically take care of all the cleanup involved in unmounting. It
> > could also use pivot_root() instead of chroot().
>
> This does sound interesting. If we can integrate this into the
> existing setup script usage, that would be great. However, the setup
> scripts do need to have access to the host filesystem, which might
> prevent CLONE_NEWNS from working nicely. However, pivot_root might
> well be an answer to that; we would just need to umount the old rootfs
> after the setup scripts run.
>
> If you had any suggestions about the best way to implement this, I
> would be happy to hear them.
Hi Roger,
it's been a while since my feature request. I've finally written a
small piece of code that implements the option "unshare.mount".
Please pull git://gitorious.org/schroot/schroot.git ns
Tested only with "type=directory". It does not yet use pivot_root()
instead of chroot().
Max
More information about the Buildd-tools-devel
mailing list