1 |
On 07/26/2012 11:26 AM, Rich Freeman wrote: |
2 |
> Implementing it wouldn't necessarily be hard - just create a tmpfs |
3 |
> under /var/tmp/portage, unshare off a new mount namespace, and |
4 |
> read-only bind-mount everything needed from the root filesystem |
5 |
> (including /var/tmp/portage/...), and chroot into it. When the build |
6 |
> is done the process governing it terminates and the kernel wipes out |
7 |
> all the mounts and then portage unmounts the tmpfs. You wouldn't need |
8 |
> to use a tmpfs for the build - it would actually be zero-size as |
9 |
> reported by df since it just contains a bazillion bind mounts, though |
10 |
> all those mounts would consume slab memory. |
11 |
|
12 |
It seems like you might need some kind of copy-on-write support, at |
13 |
least to run pkg_setup. Apparently cowbuilder uses cow hardlinks for |
14 |
that. Another way would be to use fiemap (cp --reflink). |
15 |
-- |
16 |
Thanks, |
17 |
Zac |