1 |
On Thu, Jul 24, 2008 at 11:01 PM, Alan Mackenzie <acm@×××.de> wrote: |
2 |
|
3 |
> |
4 |
> |
5 |
> I'm still very confused by profiles, though I obviously need to get to |
6 |
> grips with them. What is a profile, _EXACTLY_? Where in the |
7 |
> documentation can I find a description which says something like ".... a |
8 |
> profile is a directory which contains the following files" and then lists |
9 |
> them? There are lots of instructions to "set foobar in your profile", |
10 |
> but the only description I've found so far just says "A profile is a |
11 |
> building block for any Gentoo system" in the Gentoo Linux x86 Handbook, |
12 |
> and then goes on to describe what a profile _does_ in abstract terms but |
13 |
> not what it _is_ in terms of directories and files. That section says |
14 |
> that I "have" the option of choosing another profile too, but not how to |
15 |
> recognise a profile from a random directory or file. I don't understand |
16 |
> how to select it. |
17 |
|
18 |
|
19 |
A profile is a starting point for a gentoo install, and a set of defaults. |
20 |
They are stored in $PORTDIR/profiles in a sensible hierarchical structure |
21 |
and contain information like default USE flags, the full collection of |
22 |
packages |
23 |
that make up the system set etc etc. Profiles are obviously tweaked to suit |
24 |
the average needs of categories of users, so there are desktop and server |
25 |
profiles. They also cascade which is to say a profile inherits common stuff |
26 |
from it's parent profile (which minimizes the admin hassle of adding the |
27 |
same new stuff to every profile in existence) |
28 |
|
29 |
Setting a profile is a simply matter of creating the symlink as you have |
30 |
done here: |
31 |
|
32 |
> |
33 |
> |
34 |
> I have a link |
35 |
> |
36 |
> /etc/make.profile -> /usr/portage/profiles/default/linux/x86/2008.0 |
37 |
> |
38 |
> , set up as suggested in the handbook. Is .../2008.0 my profile? |
39 |
|
40 |
|
41 |
Yes, this means the profile you are using is the 2008.0 profile for x86 |
42 |
|
43 |
|
44 |
> Is |
45 |
> this valid? There doesn't appear to be anything of substance there. |
46 |
|
47 |
|
48 |
If you navigate to the directory the symlink points to, you will find a |
49 |
bunch of files. |
50 |
These define the profile, and the names and contents are by and large quite |
51 |
self-explanatory |
52 |
|
53 |
> |
54 |
> On the other hand the handbook says a few lines lowere, I should select a |
55 |
> profile with: |
56 |
> |
57 |
> # ln -snf /usr/portage/profiles/<profile name> /etc/make.profile. |
58 |
> |
59 |
> In that directory, /usr/portage/profiles, there are both subdirectories |
60 |
> (e.g. default-linux) and some files (e.g., make.defaults, |
61 |
> packages.builds). Is "<profile name>" one of the directories rather than |
62 |
> a file? It looks almost as though there's some sort of hierarchical |
63 |
> inheritance going on. |
64 |
|
65 |
|
66 |
Correct. The profile is a directory name |
67 |
|
68 |
|
69 |
> Please tell me that this is clearly explained somewhere. |
70 |
|
71 |
|
72 |
The handbook tells you all you need to know actually. Perhaps you are |
73 |
reading |
74 |
more into the matter than is actually there. |
75 |
|
76 |
As I said above, a profile is nothing more than the definition of a starting |
77 |
point |
78 |
and a bunch of defaults that are applied if you don't explicitly state what |
79 |
you want. |
80 |
When you installed gentoo, you might have run 'emerge -e system' which would |
81 |
|
82 |
have built a whole bunch of stuff (toolchain, coreutils, etc, etc) with a |
83 |
bunch of |
84 |
USE flags already enabled. That info came out of the profile. When you edit |
85 |
make.conf |
86 |
to better suit YOUR needs, that edit overrides the profile. You hardly ever |
87 |
need to |
88 |
change your profile unless it is many years old and has been removed from |
89 |
portage. |
90 |
The longer you use gentoo, the more specific your system becomes to what you |
91 |
want, |
92 |
and the further away it moves from the default. |
93 |
|
94 |
What you do do, is edit make.conf and the various files in /etc/portage/* to |
95 |
get what you want. |
96 |
Don't go editing the profile directories, your changes simply get nuked with |
97 |
the next |
98 |
'emerge --sync'. Only edit the user files, which are documented in 'man 5 |
99 |
portage' |
100 |
|
101 |
In four years of using gentoo I have had to mess around with profiles |
102 |
exactly once. |
103 |
I was building a highly customized install that is quite radically different |
104 |
from the norm, |
105 |
so I created a custom profile inherited from the one that was closest to |
106 |
what I wanted, |
107 |
stored it somewhere out of the way and pointed portage to it. In all other |
108 |
cases I just used |
109 |
what was there. I couldn;t even tell you right now what profile my home |
110 |
machine is using :-) |
111 |
|
112 |
Hope this help clear up the situation for you. |
113 |
|
114 |
-- |
115 |
Alan McKinnon |
116 |
alan.mckinnon@×××××.com |