* [gentoo-dev] Implementing GLEP #11: webapp.eclass rev1 available for review
@ 2003-10-07 22:15 Stuart Herbert
0 siblings, 0 replies; only message in thread
From: Stuart Herbert @ 2003-10-07 22:15 UTC (permalink / raw
To: gentoo-dev, web-apps
[-- Attachment #1.1: body text --]
[-- Type: text/plain, Size: 3527 bytes --]
Hi everyone,
Sorry that this is a bit lengthy, but there's a fair bit to cover for those
who are interested in this ...
I've just committed the first (and untested!) webapp.eclass into Portage, so
that all interested parties can see my initial thoughts on how we could
handle ebuilds.
Please note: if you actually want to *run* webapp.eclass, you need to place
the attached 'webapp-config.sh' file into /usr/share/webapp-config/ first.
This file will be supplied by the webapp-config package when I'm ready to
commit that to CVS.
Please note: I'm making this available for REVIEW. It's certainly not here
for us to start porting web-based applications to ;-) We need something to
kick off implementing GLEP #11, so here you go. I'm sure that the final
version will look quite different, and the best way to do that is to get as
many people as possible looking at it.
How it's supposed to work: The key idea here is that ebuilds will no longer
install web-based applications directly into anywhere. As discussed in GLEP
#11, we're moving to a two-stage install process. The job of the ebuild is
now to install web-based applications into /usr/share/webapps/, so that a
tool called webapp-config can then install the web-based application into the
htdocs directory of your choice later.
As part of this, the ebuild needs to provide extra information about the files
to be installed. The extra information includes:
1) which files need to be owned by the webserver's user:group combo (for
write-access purposes). All other files will be owned by another user (to be
determined; perhaps root, but perhaps not)
2) script files executed by the webserver. Normally, the relevant
mod_php/mod_perl/mod_ruby would handle these, but we need to know what they
are in case we provide PHP/CGI and so on in the future.
3) config files - files that need to be unique when second part of the
two-stage install process kicks off. Files not on this list will be made
available to the webserver via smoke and mirrors instead ;-)
I'm sure that we'll need to add to this list when we start converting ebuilds
en-masse across to the final solution.
I've attached a (in-progress!) ebuild for tikiwiki-1.7.1.1, to show how I see
it working.
NOTE: I said this is a two-stage process. If 'vhosts' is NOT in the USE
flags, the eclass automagically kicks off the second stage of the process, so
that (when the time comes) existing install behaviour remains.
At the moment, I'm working on a first-cut of the webapp-config tool. It'll be
a bash script at first. Once the behaviour, and the interface in is stable,
I'm thinking of recoding it in something else, so that it can be installed
setuid root.
Max - I'd really appreciate your comments in particular. You've put a lot of
work into the Horde stuff, and I'm sure I haven't covered it all yet ;-)
I've opened bug #30607 for tracking all the feedback about this work. Please
post there, rather than reply to this.
Thanks,
Stu
--
Stuart Herbert stuart@gentoo.org
Gentoo Developer http://www.gentoo.org/
Beta packages for download http://dev.gentoo.org/~stuart/packages/
Come and meet me in March 2004 http://www.phparch.com/cruise/
GnuGP key id# F9AFC57C available from http://pgp.mit.edu
Key fingerprint = 31FB 50D4 1F88 E227 F319 C549 0C2F 80BA F9AF C57C
--
[-- Attachment #1.2: tikiwiki-1.7.1.1.ebuild --]
[-- Type: text/plain, Size: 1429 bytes --]
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: $
MY_P="${PN}_${PVR}"
DESCRIPTION="This is a sample skeleton ebuild file"
HOMEPAGE="http://tikiwiki.org/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
LICENSE=""
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND=""
#RDEPEND=""
S=${WORKDIR}/${MY_P}
inherit webapp
src_install() {
# step 1 - copy in the files and directories
dodir ${MY_HTDOCS}
cp -r ${S}/* ${D}/${MY_HTDOCS}
dodoc doc/readme.txt
# step 2 - identify any files that need to be owned by the
# webserver's user
#
# all files and dirs are owned by root otherwise!
for x in backups db dump img/wiki img/wiki_up modules/cache temp templates_c var var/log var/log/irc ; do
dodir ${MY_HTDOCS}/$x
webapp_serverowned ${MY_HTDOCS}/$x
done
# step 3 - identify any files that are scripts that might need
# running from a CGI-BIN script engine (e.g. CGI-BIN version of PHP)
#webapp_runbycginbin <engine-name> <filename>
# step 4 - identify any files that are user-editable config files
# step 5 - add any post-installation instructions, that we want the
# webapp-config tool to output
cat > $WA_POSTINSTALLINFO <<EOF
If this is your first time installation, create a database for tikiwiki.
The SQL schema is here ??
Now use your browser to view the tiki-install page:
http://((VHOST))/((SUBDIR))/tiki-install.php
EOF
}
[-- Attachment #1.3: settings.sh --]
[-- Type: application/x-shellscript, Size: 1300 bytes --]
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-10-07 22:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-07 22:15 [gentoo-dev] Implementing GLEP #11: webapp.eclass rev1 available for review Stuart Herbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox