Gentoo Archives: gentoo-dev

From: Daniel Robbins <drobbins@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Package configuration
Date: Sat, 22 Dec 2001 10:21:38
Message-Id: 20011222102138.A26319@chiba.3jane.net
In Reply to: [gentoo-dev] Package configuration by Geert Bevin
1 On Mon, Nov 19, 2001 at 11:42:34AM +0100, Geert Bevin wrote:
2 > Hello,
3 >
4 > I've been playing a bit with portage and try to create a stable and easy
5 > to use postgres package. Doing this I noticed something missing in
6 > portage (maybe I'm just overlooking it, and then all what follows is
7 > obsolete ;-) ).
8 >
9 > Typically a package has a configuration phase which occurs after merging
10 > it into the system. This configuration is optional, but could be done
11 > both for binary as source packages. For postgres this is for example the
12 > initialization and installation of an empty database instance. Rocklinux
13 > solves this in a very simple and easy to use manner. It contains an
14 > /etc/setup.d/ directory with simple shell scripts prepended by numbers
15 > in their names (eg. 00-general, 10-gpm, 20-network, 50-sshd, 70-pgsql,
16 > ...) It uses these numbers to execute all configs sequentially when a
17 > binary clean install is done from cd. This makes the initial
18 > configuration process modular and very manageable.
19 >
20 > When installing a package, emerge could monitor /etc/setup.d/ in a
21 > similar way as it monitors /etc and report whether a new config file is
22 > present and that it can be executed to configure the package that just
23 > was merged.
24 >
25 > I hope I explained clearly enough. Tell me what you think of it.
26
27 First, I realize that I'm over 40 days late in responding to this email. :)
28 Sorry about that; I'm finally cleaning out my inbox and catching up on email
29 that I haven't read yet.
30
31 Yes, I think that this could be a really nice arrangement. But rather than
32 manually assign a number, I think it would be great if emerge were to auto-
33 assign the number. This is how I see it working. When emerge installs a
34 package, that package may have installation notes or additional configuration
35 steps. So, a package could provide a "setup" file which emerge records in
36 /etc/setup.d. Then, when the emerge is complete, emerge would print something
37 like this:
38
39 Additional setup required! Type emerge --setup to continue.
40
41 At which point, the setup scripts could be executed sequentially. This would
42 allow for interactive setup of various tools 'n stuff as well. Since the
43 setup scripts aren't executed directly in the emerge, they can be interactive.
44
45 Best Regards,
46
47 --
48 Daniel Robbins <drobbins@g.o>
49 Chief Architect/President http://www.gentoo.org
50 Gentoo Technologies, Inc.