Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 May 2006 19:46:26 +0200
From:      Clement Laforet <sheepkiller@cultdeadsheep.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        ports@FreeBSD.org, pav@FreeBSD.org
Subject:   Re: HEADS UP for maintainers of web applications
Message-ID:  <20060513174626.GB85967@goofy.cultdeadsheep.org>
In-Reply-To: <4464EF32.3050504@FreeBSD.org>
References:  <1147338576.799.9.camel@pav.hide.vol.cz> <44630121.6030303@FreeBSD.org> <1147339366.799.17.camel@pav.hide.vol.cz> <4464EF32.3050504@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--eAbsdosE1cNLO4uF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, May 12, 2006 at 01:25:22PM -0700, Doug Barton wrote:
> > I believe this decision was made by Apache port maintainer (clement)
> > some months ago.
>=20
> With due respect to Clement, I don't see his maintaining the apache ports=
 as
> giving him authority to dictate how those directories are used, or how ot=
her
> applications get installed.

I totally agree. I don't have the power nor the wish (even with my=20
portmgr hat) to unilaterally impose those changes, but I think we=20
should face the real problem: we don't have a decent framework for web=20
stuff. I'm conviced we need a "webbase" port which include hier and=20
some promotion stuff (a standard default page) and few=20
FreeBSD images/icons/banner.

Why bother?
+ Unlike linux distros, ports provide a large variety of
  configurations.
+=20
- People usually manually alterate server config files.

                  +--- apache 1.3---+
                  |                 }--- mod_php -------+
                  |                 |                   |
+-------+         +--- apache 2.x---+              +----------+
|webbase|=3D=3D=3D=3D=3D=3D=3D=3D=3D|                 |=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D| web apps |   =20
+-------+         +--- lighttpd ----+     CGI's    +----------+     =20
                  |                 | (perl/php/...)
                  |                 |
                  +--- cheerokee ---+
                  |
                  +   (........)    +

Layout               HTTP servers                      Apps


> >>> All web applications should be now installed into ${PREFIX}/www/appna=
me.
> >> Why? What benefit does this give us, and what was the cost of doing it=
 the
> >> way it's been done for a long time already?
> >=20
> > It gives us consistency.
>=20
> "A foolish consistency is the hobgoblin of little minds."  -Emerson

None is a nest of bikeshed.

You also mentioned that some people tried to "clean" www/ but it=20
desperatly fails. I perfectly understand the logic behind our=20
good-old-www-layout, but it's cgi-based. Now many apps are self=20
contained. If I were a newbie, I'd surely be desappointed to discover
I can't use horde, and phpSysInfo without changing apache conf or read=20
cryptic Makefile.

But I know that it doesn't solve all problems. It's just a start and=20
rises many issues:
Which default DocumentRoot to use? Why should we keep cgi-bin, icons,=20
etc. directories outside of DocumentRoot when some webserver don't=20
support aliases? and more...


> > Up until now, every maintainer installed the
> > files where they seemed fit.
>=20
> How DARE those wily maintainers actually exercise some free thinking!

:-)

> > With this policy, user can reasonably
> > expect to find newly installed app in predictable place.
>=20
> In some cases, this is a virtue, but in many others it adds complexity wh=
ere
> it's not needed. I maintain a moderately complex web based application th=
at
> installs things in:
> $PREFIX:
> bin/
> etc/
> include/$appname
> lib/$appname
> share/doc/$appname
> share/$appname
> www/cgi-bin
> www/data
> www/icons/$appname
>=20
> I have gone to great pains to make sure that my application works for the
> user right out of the box. No modifications to the standard apache conf f=
ile
> are needed, no symlinks are needed, nada. The change you suggest would
> violate POLA for just about every aspect of my port, not to mention creat=
ing
> an upgrade nightmare for its users. Please explain how this is useful or
> beneficial to them.

Technically it just impacts DocumentRoot. If I take textproc/htdig,=20
since you maintain it, only --with-search-dir would be changed.
As I previously said, only server accessible part should be put in=20
${PREFIX}/www/${appname}, many php apps already use this layout.
Due to variety of web accessible applications, it's hard to find the=20
"universal" layout, but doesn't mean we don't have a minimum of=20
consistency, and I don't think it's this one is foolish :)

To avoid POLA, we can rely on a WWW_DOCUMENT_ROOT variable, instead of=20
hardcoded {'www/','www/data'}/${PORTNANE}. I don't mind which document=20
root we should use, www or www/data. I prefer www/${PORTNAME} because=20
most of I webapps I ported where put here.

> > It gives us independency from Apache.  People may want to use their web
> > apps on top of lighttpd or any other web server.
>=20
> Once again, change the newer applications that have a smaller user base to
> use the FreeBSD standard directories. That's what the ports tree is for.
> This "independence from apache" is a completely specious argument. Those
> directories mean what we say they mean, regardless of how and when they a=
re
> installed.

I object. PHP is now apache-free, so let's deal with it.

We also have to avoid conflicts betwwen apps too. Forcing to put=20
serviceable pages (except cgi-bin) in ${appname} subdir reduces=20
chances of conflict and so, are webmaster-friendly. Who is the=20
maintainer dare to pollute DocumentRoot because it installs generic=20
named pages, like footer.html or header.html?

> Since I started maintaining ports, this is either the 4th or 5th attempt =
to
> remake the www tree into someone's uniquely skewed view. It gets really
> boring after a while.

I agree. Let's fix it now. What do you like to see=20
kept/removed/reconsidered. I'm sure we can find an elegant way to fix=20
thoses issues:
- We're apache centric and rely on its www hier
- PHP apps relies on php not the webserver running them
- We don't have consistency in serviceable pages path. Let's choose=20
  one. It's sutpid to annoy end-users longer.=20
- and many more...

clem

--eAbsdosE1cNLO4uF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFEZhtysRhfjwcjuh0RAp4+AJsF+b8PvYXJNnjj2I1Y7RgzyEoOOwCfQiLo
SfHSxMqCH6BZZQpF0W6s11Q=
=GZ7Y
-----END PGP SIGNATURE-----

--eAbsdosE1cNLO4uF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060513174626.GB85967>