From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24554 invoked by uid 1002); 5 Aug 2003 11:22:03 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 1420 invoked from network); 5 Aug 2003 11:21:54 -0000 From: Stuart Herbert Reply-To: stuart@gentoo.org To: Paul de Vrieze , gentoo-dev@gentoo.org Date: Tue, 5 Aug 2003 12:19:45 +0100 User-Agent: KMail/1.5.3 References: <86960000.1060038977@valkyrie.lsit.ucsb.edu> <200308050114.29952.stuart@gentoo.org> <200308051134.46249.pauldv@gentoo.org> In-Reply-To: <200308051134.46249.pauldv@gentoo.org> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_VL5L/rgjbf8MF0r"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200308051219.49435.stuart@gentoo.org> Subject: Re: [gentoo-dev] [GLEP] Web Application Installation X-Archives-Salt: 26de9c58-0fef-41d7-9e2e-42abff347969 X-Archives-Hash: 15a1178a25cea0bb44de53959daa9738 --Boundary-02=_VL5L/rgjbf8MF0r Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: signed data Content-Disposition: inline Hi Paul, Thanks for joining in. I was getting worried that this was turning into th= e=20 'Max & Stuart Show' ;-) Here's my rambling thoughts about how the 'local' USE flag (can we call it= =20 '-vhosts' instead? 'local' feels a bit non-descript to me) could work, and= =20 what problems might occur. I'm sure that my thoughts here aren't the only= =20 possible solution. Under the '+vhosts' approach, webapps would be SLOT'd, and would go into /usr/share/webapps/${PF}/ and users would have to use the -config toolset to then make the app availa= ble=20 inside one or more vhosts. What would happen in the '-vhosts' world? I think it all pivots around one crucial design decision. In the '-vhosts'= =20 world, do we want 'emerge -u' to be all that the user has to do (i.e. no ne= ed=20 for the -config toolset)? If not, then I can't see what '-vhosts' would=20 actually do, and I'd suggest dropping it. Let's explore what changes the 'emerge -u' objective might have to bring in= to=20 the design. I think that SLOT'ing webapps would have to be switched off when '-vhosts' = is=20 in effect. Can we dynamically change the SLOT value inside an ebuild witho= ut=20 upsetting Portage? Let's assume we can for the moment. I think the webapp would have to be installed directly under the=20 'DocumentRoot' (/home/httpd/htdocs currently for Apache), instead of=20 /usr/share/webapps/. Would this create support hell if a user then wanted = to=20 move to vhosting on the same box? emerge -C will clean up=20 correctly, so I'm not worried about that. I think we could live with this. As for config-protecting a webapp's configuration files, I'd do it by makin= g=20 the eclass add the config files to the CONFIG_PROTECT mask somehow. The=20 webapp ebuild needs to be able to identify the package's config files as pa= rt=20 of the '+vhosts' solution, so the information would be available. But I=20 wonder if we'd need a change to Portage to allow the eclass to dynamically= =20 add these files to the CONFIG_PROTECT mask. It wouldn't need to be a=20 permanent addition - in fact, I'd argue against it. (Lots of laughter. Just listening to the radio, and apparently the heatwav= e=20 we're having right now is causing parts of one of our busiest motorways to= =20 melt). Speaking of eclasses, one way to hide the differences of the +/-vhosts worl= d=20 from the ebuild is to handle the differences entirely in the eclasses. # webapp.ebuild inhert webapp-proxy # webapp-proxy.eclass use 'vhosts' && inherit webapp-vhosts || inherit webapp-simple webapp-vhosts.eclass (or whatever it's called) would have to present the sa= me=20 interface (same functions w/ same parameters in) as webapp-simple.eclass. Just some thoughts, Stu =2D- On Tuesday 05 August 2003 10:34 am, Paul de Vrieze wrote: > Ok what about the following. > > The problem that is most existent in this case is the fact that you want > the eclass to support almost every kind of use. That is nice indeed. But > making things easy for single hostname smalltime servers, and for extensi= ve > virtual hosting supports with customized webservers etc. is complicated. > Also in that case default apache configuration snippets don't make that > much sense. I think a solution could be to introduce a "local" useflag th= at > selects behaviour. > > If you have a simple webserver for personal use, you can just leave things > as they are and you can just run the config script or take some simple > actions and everything works. For the other case the configuration tool c= an > be used to create instances of a webapp for different virtual servers. Th= at > tool would probably need some configuration file etc. and it might even > perform changes to the CONTENTS file to make the instances being included > in the ebuild (when removing). It could then also automatically change the > slot of the installed package so that it does not automatically get > removed. > > I think that should be able to keep both sides happy. > > Paul > > ps. one thing I want to add though is that for a simple installation I > think the configuration files should be config-protected (how that is > aranged I don't care), and for complex setups the instance configurations > should also be protected in some way (but that might be handled by the > tool) =2D-=20 Stuart Herbert stuart@gentoo.o= rg Gentoo Developer http://www.gentoo.or= g/ Beta packages for download http://dev.gentoo.org/~stuart/package= s/ GnuGP key id# F9AFC57C available from http://pgp.mit.edu Key fingerprint =3D 31FB 50D4 1F88 E227 F319 C549 0C2F 80BA F9AF C57C =2D- --Boundary-02=_VL5L/rgjbf8MF0r Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQA/L5LVDC+AuvmvxXwRApDaAKCEA7JoYorLT54Ck8D+ZQ8B+b8LFACgudHy wO9AkkMVxQiYmHnkR2ToWgo= =4/aP -----END PGP SIGNATURE----- --Boundary-02=_VL5L/rgjbf8MF0r--