[buildd-tools-devel] Bug#657709: Bug#657709: please add a possibility to create a chroot

Roger Leigh rleigh at codelibre.net
Sat Jan 28 10:46:15 UTC 2012


On Sat, Jan 28, 2012 at 09:20:07AM +0100, Marc Haber wrote:
> my normal procedure to create a new chroot for use with schroot is to
> create the file system, mount it, and invoke debootstrap. In this
> process, I notoriously forget additional packages to be installed into
> the chroot before it is actually useable.
> 
> Why not add a --create or --initialize switch to schroot which will
> just invoke the scripts from setup.d with a new stage "create" or
> "init"? That way, a local admin could write code to create chroots in
> the right place so that this functionality is where an schroot user
> would expect it.

I'm not sure I'm seeing the whole picture here.  If I understand
correctly, you want to run debootstrap by hand first, and then
have schroot do some initial setup on the chroot, presumably when you
first use it?

We could certainly add such an option.

> If schroot would feel like actually providing functionality behind
> this options, the issue is a bit more complicated. One would need to
> support multiple methods to create a new chroot, debootstrap and
> cdebootstrap being two of them, and create possibilities to pass
> parameters to these methods, probably via schroot.conf options and/or
> options pulled from a config script.

Such a facility would be useful.  I've avoided doing this so far
simply because there are so many different ways of setting one up,
writing a tool that supports everything would be quite difficult.
Are you aware of sbuild-createchroot, which does this to some
extent, but is limited to "directory" chroots at the moment--you
have to customise it after creation if you want anything fancier.

There is no reason we could not provide such a facility directly
in schroot (or a helper tool--it need not be in the main binary),
and provide hooks to permit extension by others.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.





More information about the Buildd-tools-devel mailing list