On Tue, 25 Jun 2024 at 18:47:49 +0200, Guillem Jover wrote:
> I manage my chroots with schroot (but not via sbuild, for dog fooding
> purposes :), and use type=directory and union-type=overlay so that I
> get a fast and persistent base, independent of the underlying filesystem,
> with fresh instances per session.

type=directory *with a union-type* is OK, and avoids the persistence
issues I mentioned: it has many of the same properties as type=file
(but different performance characteristics).

type=directory *without* a union-type can trigger bugs like the ones
I mentioned.

> You can access the base via the source:<id> names

This is the same as with type=file. If you do this, be careful to avoid
installing software that creates/relies on new uids existing inside
the chroot, such as dbus or exim4, if a corresponding username does not
already exist outside the chroot. That's what causes bugs like the ones
I mentioned.

I would recommend usually re-bootstrapping the base instead of modifying
it in-place, to avoid having differences between a freshly-bootstrapped
base and the current state of your base chroot building up over time
(for example packages that are removed from the transitively Essential set
remaining installed in your base chroot indefinitely, or non-dpkg-managed
configuration files being different for new installations and upgraded
older installations), which can result in a harder-to-reproduce build
environment.

    smcv

Reply via email to