1 |
Hi, |
2 |
|
3 |
I recently installed Gentoo Linux, and I must say I was impressed with what |
4 |
I saw. I'm finally able to have a completely optimised system out of the |
5 |
box. Apart from a few stupid mistakes on my part, (Forgetting to uncomment |
6 |
the USE line in make.conf, leading to 3dnow and sse being compiled into X, |
7 |
which I don't have and consequently needing to recompile X. This is on a |
8 |
PII-266. S-l-o-w!) and the abrupt rsync transition, I had a fairly |
9 |
comfortable install. |
10 |
|
11 |
It'd be nice though if those bootstrap phases could be automated. It'd be |
12 |
cool to be able to generate a `reinstall' CD from a working gentoo system, |
13 |
and then when disaster strikes, stick it in, go do something else, and have |
14 |
the system almost back to normal, apart from restoring from backups. |
15 |
|
16 |
I previously used Debian as my primary desktop distro, but I got fed up by |
17 |
its slow pace, both in development and in operation. I have a Pentium, not |
18 |
a 386, dammit! But there are a few ideas in Debian that almost make up for |
19 |
it's drawbacks. I think Gentoo should steal, er, borrow these ideas. |
20 |
Homework permitting, I'll try and have a proof of concept, possibly in a |
21 |
month or two. |
22 |
|
23 |
The idea Gentoo should steal is a generalisation of Debian's `menu' system. |
24 |
The problem this package tries to solve can be generalised to other |
25 |
situations, such as inetd daemons, byte-compiling emacs .el files, fonts |
26 |
and netscape style plugins. The general case of the problem is that of |
27 |
transforming many data fragments from a common, package provided format |
28 |
into many formats specific to particular packages. Like transforming menu |
29 |
entries into window manager configuartion files, or elisp programs into |
30 |
byte-compiled versions for emacsen, or inet daemon descriptions into |
31 |
inetd.conf or xinetd.conf. |
32 |
|
33 |
The goal is to make a set of programs that can deal with this sort of |
34 |
situation in a general way, so that it can be extended to new situations |
35 |
without too much difficulty. |
36 |
|
37 |
Packages that provide fragments of data, such as menu entries, might be |
38 |
called producers, and those that use the fragments to create a complete |
39 |
configuration are consumers. There may be other programs that modify the |
40 |
fragment before it reaches the consumer, call them tinkerers. The fragments |
41 |
of data would be called products. So a producer creates a product which is |
42 |
modified by tinkerers and then used by a consumer. |
43 |
|
44 |
The producer is very simple. Given the product and its type by the |
45 |
package's .ebuild, it would run the following psuedocode (or something |
46 |
similar): |
47 |
|
48 |
for each tinkerer of type, |
49 |
pass product through tinkerer into transformed |
50 |
for each consumer of type, |
51 |
pass transformed to consumer |
52 |
end |
53 |
end |
54 |
|
55 |
Or, if a new consumer is installed, |
56 |
|
57 |
for each product of type, |
58 |
for each tinkerer of type, |
59 |
pass product through tinkerer into transformed |
60 |
pass transformed to consumer |
61 |
end |
62 |
end |
63 |
|
64 |
Products themselves are sort of object-oriented. That is, a product defines |
65 |
a number of fields, such as "name of elisp file", or "menu hierarchy |
66 |
locataion" or "in.server program". Product types can inherit from each |
67 |
other. There would also be a base type, which provides some basic fields. |
68 |
These might be type, version of type, providing package. |
69 |
|
70 |
Tinkerers would be somewhat like `awk' programs, but running on product |
71 |
records, and not lines in a file. An example of a tinkerer would be |
72 |
transform of menu records for users, so that users can customise their own |
73 |
menus to suit their taste. |
74 |
|
75 |
Not all tinkerers may use configuration files, or do per-user tinkering |
76 |
(Inetd, frinstance), and the syntax would be different for each, although |
77 |
using shell scripts with bash functions defined to do operations on the |
78 |
product would be the most flexible. |
79 |
|
80 |
Once tinkerers have transformed the products, they are fed to consumers. |
81 |
Consumers transform the products into configuration or data files specific |
82 |
to the package that installed them. However for each type, they will share |
83 |
a common parser for the products. This should probably be provided by the |
84 |
same package that provided the type description. |
85 |
|
86 |
Finally, there would be a few support programs for tasks such as installing |
87 |
new types, or testing consumers or tinkerers. This system would solve a |
88 |
number of problems that most distributions appear to experience. In |
89 |
Debian's case, the same problem was solved by a number of different |
90 |
programs, such as menu, emacsen-common and defoma. |
91 |
|
92 |
If it weren't for University, this would be less vapourous. I'd try and get |
93 |
this programmed. As it is, I'll just have to do what I can in the time I do |
94 |
have. |
95 |
|
96 |
Also, looking at the portage2 docs, it seems to me like the USE flags |
97 |
system is heading towards something resembling Debconf. Debconf has some |
98 |
very cool aspects, but it also has some weak spots as well. Personally, I'd |
99 |
like to see some combination of USE and Debconf, like Portage is a cross |
100 |
between Ports and apt-get. |
101 |
|
102 |
Anyway, thanks for Gentoo. It's really rather nifty. I'd like to contribute |
103 |
a lot to it, since it looks like it'll be fun. It'll also be my way of |
104 |
repaying the Open Source community for letting me use Linux and friends. |
105 |
|
106 |
Ja-emerge-a-new-os-today!-mes |
107 |
-- |
108 |
James Vandenberg Email: james at vandenberg.dropbear.id.au |
109 |
GPG FP= 65AB 179A D884 EDC6 216D FE6A 6833 02BC 4425 4F70 |
110 |
Quidquid latine dictum sit, altum viditur. ICQ: 151135390 |