Gentoo Archives: gentoo-dev

From: Max Kalika <max@g.o>
To: stuart@g.o, Paul de Vrieze <pauldv@g.o>, gentoo-dev@g.o
Subject: Re: [gentoo-dev] [GLEP] Web Application Installation
Date: Tue, 05 Aug 2003 21:00:56
Message-Id: 12930000.1060117254@valkyrie.lsit.ucsb.edu
In Reply to: Re: [gentoo-dev] [GLEP] Web Application Installation by Stuart Herbert
1 Quoting Stuart Herbert <stuart@g.o>:
2
3 > Thanks for joining in. I was getting worried that this was turning into
4 > the 'Max & Stuart Show' ;-)
5
6 Can we get a time slot on FOX? I'm thinking 9:12AM. :-)
7
8 > Under the '+vhosts' approach, webapps would be SLOT'd, and would go into
9 >
10 > /usr/share/webapps/${PF}/
11
12 Just the SLOTed? Or all the webapps? Why not all?
13
14 > and users would have to use the -config toolset to then make the app
15 > available inside one or more vhosts.
16 >
17 > What would happen in the '-vhosts' world?
18 >
19 > I think it all pivots around one crucial design decision. In the
20 > '-vhosts' world, do we want 'emerge -u' to be all that the user has to
21 > do (i.e. no need for the -config toolset)? If not, then I can't see
22 > what '-vhosts' would actually do, and I'd suggest dropping it.
23
24 I don't think we want emerge -u to touch anything other than the central
25 install.
26
27 > I think the webapp would have to be installed directly under the
28 > 'DocumentRoot' (/home/httpd/htdocs currently for Apache), instead of
29 > /usr/share/webapps/. Would this create support hell if a user then
30 > wanted to move to vhosting on the same box? emerge -C <webapp> will
31 > clean up correctly, so I'm not worried about that. I think we could
32 > live with this.
33 >
34 > As for config-protecting a webapp's configuration files, I'd do it by
35 > making the eclass add the config files to the CONFIG_PROTECT mask
36 > somehow. The webapp ebuild needs to be able to identify the package's
37 > config files as part of the '+vhosts' solution, so the information would
38 > be available. But I wonder if we'd need a change to Portage to allow
39 > the eclass to dynamically add these files to the CONFIG_PROTECT mask.
40 > It wouldn't need to be a permanent addition - in fact, I'd argue against
41 > it.
42
43 Is it really necessary to separate the whole virtual/local? Can we develop
44 the -config tool to take the following syntax?
45
46 # webapp-config <application> <destination_dir>
47
48 The application can be specified by the currently supported portage syntax,
49 i.e. =web-dev/horde-2* or >=web-mail/imp-3 or simply web-db/phpmyadmin.
50 The tool then looks for a list of installed apps that match. If more than
51 one is found it either bombs out or presents a choice menu.
52
53 Otherwise it goes ahead and configures the destination_dir to contain the
54 specified app. First it checks for existence of the app already in the
55 destination. If nothing exists, we create the directory, and copy the core
56 and conf files in. If the app already exists, we switch to "upgrade" mode
57 where we overwrite all the core files and do dispatch-conf-type work to
58 protect the config files.
59
60 How do we know which files are config files and which are core files, I
61 hear you asking? How about this: Either use the Portage API or look at
62 the /var/db/pkg/$CATEGORY/$PF/CONTENTS file ourselves. 'obj' types stored
63 in '/usr/share/webapp' (or $WEBAPP_DEST or whatever) are "core" files;
64 'obj' types stored in '/etc/webapps' (or $WEBAPP_ETC) are "conf" files.
65 Everything else (docs, etc) doesn't need to go into the webserver space.
66
67 So if this is how things work, there's no need to worry about what is a
68 vhost and what is a single install. Also we don't have to be concerned
69 where the DocRoot is -- the user just specifies the destination directory.
70
71 I guess this is a very rough first-draft proposal for the webapp-config. I
72 am probably missing major chunks, but this is a braindump of what I thought
73 of so far. Flog me for anything blatantly erroneous.
74
75
76 --mk
77
78 --
79 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] [GLEP] Web Application Installation Cal Evans <cal@××××××××.com>