Gentoo Archives: gentoo-user

From: Simon <turner25@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Binary package cruncher?
Date: Sun, 16 Nov 2008 19:59:58
Message-Id: 4920356D.3040300@gmail.com
In Reply to: Re: [gentoo-user] Binary package cruncher? by Alan McKinnon
1 > I would build all that stuff in a chroot. The logic is that the your buildhost
2 > system is not quite the same thing as the machine hosting the buildhost.
3
4 That's the big trick I was thinking about...
5
6 1) Make a proper development environment under a chroot, place the "binworld" on
7 top of world.
8 2) emerge -k -uDN world
9 (this will install, in the chroot env all dependencies using previously
10 built binpkgs, if those dependencies don't exist, they will be built and binpkg
11 will be made for everything that is built)
12 3) un-chroot properly (unbind directories, etc)
13 4) delete the chroot directory containing installed dependencies, not relevant
14 to the production environment
15
16 This would build the packages and install nothing on the host. But I'm not sure
17 if chroot is really proper for this... maybe I would have to use a unionfs to
18 make sure that nothing gets overwritten in /lib or gets installed in the real
19 /lib for example...
20
21 After everything is built, i would just redo the `emerge -k -uDN world` on the
22 host in the real production environment to update it.
23
24 > One thing you cannot get away from is that to build say X for your slow
25 > hardware, it has to be done on a machine that has all X's build dependencies
26 > fully installed and working. You might not want that on your production
27 > server. Some fancy tricks with bind-mounts into the chroot would let you
28 > share common stuff. Or, you could simply buy a bit more storage if you are
29 > running out. It's cheap enough and if you've gone to this much trouble
30 > already, some more storage would be minor
31
32 You're right and this is why I had installed X on my host, with all its deps,
33 even though none of it was used. But using the chroot (and/or unionfs trick)
34 I'd be able to build it with its deps without really installing it on the prod
35 environment.
36
37 However, diskspace on a VPS is very costly. For example, one extra GB is
38 2$/m... and with the cheapest VPS i have only 12GB now. I'm sure my full
39 production environment would not move much higher than 4GB (without counting
40 /usr/portage) while it probably is filling my disk now...
41
42 So, basically, if gentoo is a meta-distribution, my host is "my" distribution
43 and serves to build the packages that are then available to my PCs...
44
45 Thanks,
46 Simon