User:SAL9000

Staging Gentoo upgrades using binpkg and chroot
I've been experimenting with a set of scripts intended to build binpkgs for a system on the system itself, without touching production applications, in preparation for the "real" upgrade. The system in question is running root-on-ZFS, which allows me to use a copy-on-write copy of the real root as the chroot target, but this isn't a prerequisite for the idea in general.


 * 1) Create a ZFS snapshot of /, make a clone from it, mount it somewhere
 * 2) Mount   and   into the chroot
 * 3) Enable   in the chroot's make.conf
 * 4) Inside the chroot, perform whatever Portage operations you want (e.g.  )
 * 5) If you've synced the Portage tree inside the chroot, you might want to copy it to the real system
 * 6) Close down the chroot -- you've got your binary packages. You can also delete the ZFS clone and snapshot.
 * 7) Repeat the Portage operations on the host, with   or

So far, I have automated the creation/destruction of the snapshot+clone and proper mounting/unmounting of proc, dev, sys into the chroot.