Bug#354344: [Buildd-tools-devel] Bug#354344: Fix in 354344 breaks plain chroots

Steve M. Robbins steven.robbins at videotron.ca
Sat Jul 8 19:02:48 UTC 2006


On Wed, Jul 05, 2006 at 11:51:37PM +0100, Roger Leigh wrote:
> "Steve M. Robbins" <steven.robbins at videotron.ca> writes:
> 
> > On Mon, Jul 03, 2006 at 11:10:46PM +0100, Roger Leigh wrote:
> >> "Steve M. Robbins" <steven.robbins at videotron.ca> writes:
> >
> >> Because the automatic mounting is being used by a few people, and it
> >> is a convenient way to do things, I'm going to introduce a new chroot
> >> type which will be "plain+mounts".
> >
> > Doesn't that leave you open to someone requesting both "file" and
> > "file+mounts" chroot types?
> 
> No.  "plain" is special, since it's just a plain directory in the
> filesystem.  All the other types involve some element of
> mounting/copying/unpacking and the mounting is part of the chroot
> setup (if enabled with run-setup-scripts).

Again, my ignorance will show through, but in my mind the "type" just
specifies the source of the filesystem.  I don't see an unpacked
filesystem ("plain") as radically different than one packed up in a
tarball or zip file ("file").  The only difference I see is in speed
(no unzipping required) and that any modification to a "plain" chroot
is persistent.


> "plain" defaults to /not/
> running the setup scripts, where the other types all run them by
> default.

Sure, but that's just saying "plain is special because I deem it to be
special".


> > At the risk of displaying my ignorance of schroot: I'm having a hard
> > time understanding why automatic mounting is deemed always useful for
> > "non-plain" chroots and (currently) deemed not useful for "plain"
> > chroots.  As I understand it, the chroot type describes the source of
> > the chroot filesystem.  To me, that seems orthogonal to the question
> > of whether you want "/home" mounted.
> 
> That's a good point.  In addition to my comment above, there are some
> additional points:
> 
> - Currently, having run-setup-scripts=true runs all the scripts.
>   There's no way to skip the /home mounting script, or indeed any
>   other script.  It would be nice to be able to customise which
>   scripts are run (or have an effect, at least) on a per-chroot basis.

Exactly.  That's what I had in mind by the new "auto-mount" option: it
would specify to run or not run 10mount.


> - "plain" is supposed to be plain.  It's the default because it's used
>   to be compatible with dchroot(1), dchroot-dsa(1) and chroot(8).  It
>   doesn't do anything fancy for that reason.
> 
> I think I'll create a "directory" chroot type; this will be similar to
> plain, but will enable all the features plain lacks in comparision
> with the other chroot types.
> 
> > So: rather than a new chroot type, why not introduce a new option, say
> > "auto-mount", for this?  Personally, I'd default it to true; but
> > you're the boss.
> 
> The main reason not to do this is for compatiblity with other tools,
> and to do the least surprising thing.

What are you not going to do?  Not introduce the option, or not
default it to true?


> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=329403
> is an example of why it defaults to being conservative.

Fair enough.


So is your intention to create "directory" type that works just like,
say, "file"?  And leave "plain" to be like the old "dchroot"?  That
works for me.


Regards,
-Steve




More information about the Buildd-tools-devel mailing list