-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Lars Wirzenius <[EMAIL PROTECTED]> writes:
> ke, 2005-12-21 kello 10:28 +0000, Roger Leigh kirjoitti: >> For this task, you might find schroot(1) useful. It's a means of >> accessing chroot environments, but it supports LVM snapshots as one >> method. > > Does this require the user to set up LVM somehow before using schroot? Yes. You would create a separate logical volume (LV) for each distribution you want to support, set them up with debootstrap. Once done, you add a configuration stanza like this: [sid] type=lvm-snapshot description=Debian sid snapshot priority=3 groups=root,sbuild root-groups=root,sbuild device=/dev/hda_vg/sid_chroot mount-options=-o atime,sync,user_xattr lvm-snapshot-options=--size 2G run-setup-scripts=true run-session-scripts=true I plan to add support for tar(.gz|.bz2) and zip files as well once I've finished the C++ conversion (the other alternatives are currently directories and any mountable block device), then when combined with sbuild, you'll have a system almost but not quite entirely unlike pbuilder. It's all nicely modular, so adding a new chroot type is trivial. The other advantage is that it uses PAM in a similar manner to sudo, so you can grant certain users access to root privs (root-groups) in the chroots, which allows them to install/upgrade/remove packages in the chroots. Obviously this is quite simple to abuse if you know what you're doing, so you would only grant it to folks you could trust. When it supports Xen, you could also grant root privs to folks you /don't/ trust, since they would be entirely self-contained. >> This is a very quick method to create and destroy a test >> environment (on my system, 2 seconds to create and 5 to destroy). > > For me, unpacking a tar file takes about 4 seconds (from a cold cache, > machine had just been rebooted) and afterwards less than a second to > remove (but then it was all in the cache). The difference for a minimal chroot is not too great. The main advantage of schroot LVM snapshotting is that the time is constant irrespective of the size of the LV (it's copy-on-write), whereas for tar it is linear. For slow machines and older architectures, this is an advantage. > This is a small part of the whole process, which for piuparts can take > several minutes, if it tests upgrades from stable via testing to > unstable. OK. - -- Roger Leigh Printing on GNU/Linux? http://gimp-print.sourceforge.net/ Debian GNU/Linux http://www.debian.org/ GPG Public Key: 0x25BFB848. Please sign and encrypt your mail. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/> iD8DBQFDqWRvVcFcaSW/uEgRAqbKAJ9Oy4S1TT8FaHq7aZVzX7CJhpsoNQCfRZo0 3kX9PCMU7X/FZf9a8tSbLkA= =RcKK -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]