1 |
On Tuesday 23 September 2008 17:32:51 Anthony Metcalf wrote: |
2 |
> Hi, |
3 |
> |
4 |
> This is a theoretical question, and a very simplified example of |
5 |
> what I'm thinking, but it serves to get the idea across.... |
6 |
> |
7 |
> Suppose I am planning multiple Gentoo servers, I will want them all |
8 |
> based on the "Hardened" profile (they are servers after all!) but I will |
9 |
> also want them all to have the ipv6 use flag set, since my internal |
10 |
> network is completely ipv6. |
11 |
> |
12 |
> Which is better, have a standard make.conf, with USE="ipv6" and copy |
13 |
> that around, or create my own profile? |
14 |
|
15 |
it's 6 and half a dozen really, both methods have the same effect. You have to |
16 |
weigh up the hassle of creating the profile and the ease of using it with the |
17 |
ease of modifying make.conf and the hassle of copying it everywhere. Plus, |
18 |
with just a make.conf, you can't extend your system set. It's your call |
19 |
really there is not a OneTrueRightWay(tm) |
20 |
|
21 |
> I assume that I could copy the hardened profile, change a couple of |
22 |
> files, and then re-link make.profile. |
23 |
|
24 |
You don't copy the profile as such, you inherit from it. Create a new |
25 |
directory somewhere, and put a file in it called "parent" which points to the |
26 |
hardened profile that's your base. Put your mods in correctly named files in |
27 |
that directory and point make.profile to it. |
28 |
|
29 |
This is all documented *somewhere* but I once spent 10 minutes looking through |
30 |
the existing profile directories and it was stunningly obvious how it all |
31 |
worked. |
32 |
|
33 |
> 1) Would changes be lost on rysnc, since my new folder isn't in the |
34 |
> tree I'm syncing with? Is there a way around that? |
35 |
|
36 |
If you put it in the portage directory and don't take special steps, then your |
37 |
profile will be nuked. But --sync is just an rsync operation, and rsync's man |
38 |
page is every longer than ls's :-) with options for every imaginable thing. |
39 |
You should be able to figure out the options to exclude your custome profile |
40 |
with ease |
41 |
|
42 |
> The advantage I see over the copy-the-make.conf situation, is that I |
43 |
> can change the use flags once, and they are copied for all servers at |
44 |
> the next sync (all servers would obviously sync to a central box), |
45 |
> whilst still being able to keep other things (CFLAGS? IF servers have |
46 |
> different processors etc) different for different servers.... |
47 |
|
48 |
You could even set up a mini- trimmed-down sync server. Put your master copies |
49 |
of stuff there, take steps so that portage doesn't nuke things, and set up a |
50 |
cron to sync once a day. Tell your machines to get their portage tree from |
51 |
this server, not gentoo.org somewhere and let rip. Also put a proxy on that |
52 |
sync server of yours so distfile downloads only happen once. There's many |
53 |
ways to do this - squid is obvious but I believe portage can do something |
54 |
similar (which I have not used myself) |
55 |
|
56 |
|
57 |
|
58 |
-- |
59 |
alan dot mckinnon at gmail dot com |