Debian Developers - Wwwconfig-common, was: Re: Web applications

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > August 2004 > Wwwconfig-common, was: Re: Web applications





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Wwwconfig-common, was: Re: Web applications
Ola Lundqvist

2004-08-19, 5:58 pm

Hi

I saw this discussion and would like to comment on wwwconfig-common so
people understand why it was designed as it is.

Quote from mail from sean finney <seanius@seanius.net>:
>
> i think their preferred method is to use the "modules-config" (or
> whatever they've renamed it to) which is designed to work with the many
> incarnations of the apache server config setup. wwwconfig-common
> is a parallel method which behaves differently, but Ola is fairly
> responsive in my experience and could probably be convinced to rework the
> guts so that people currently using that system would be transparently
> brought along, assuming we could come to some working conclusion.


Yes I'm very open to new solutions. My plan (when woody was about to be
released) was to rewrite wwwconfig-common to be a more general configuration
system helper but ... well it never got much further than a new project
in CVS and some design scetches. Oh we have a name for the project too.

Help on this is very appriciated. We can probably have it in full function
to sarge+1.

On Thu, Aug 19, 2004 at 03:14:30PM +0200, Pierre Habouzit wrote:
*SNIP*
>
> I guess there are plenty other questions, sean listed quite a lot of them
> (but not all of them I believe). maybe we should just make a good list of
> them, sort them between db engines questions, web apps questions, http
> server questions, etc ... and then write a policy for each sort of
> problem, should we ?


Sounds like a good plan.

> moreover, wwwconfig-common is a great idea, and the actual maintianer is
> really responsive. But I think that it's not very well done (all args are

Thanks. I must admit that I have not been very responsive the last
year or so. Right now I have quite a lot of time for Debian though.

> given through env vars, and that clearly sucks : not very secure (any API
> change, and we XXXX up the entire thing), not very readable (using a
> script is in 3 steps : settings envs, sourcing the script, and reading
> envs, it's IMHO quite hard to read, and difficult to use -> not really
> possible to simply use those scripts in loops)


Yes I know that this is not a perfect solution but you understand why,
below.

> IMHO, we should think at a brand new tool, more secure (comprehensive
> error semantics, and stuff like that), easier to use (these env vars are
> nonsense), providing some registered ressource database (then we only
> have to choose an already registered ressource, instead of telling all
> its parameters each time) ...


Fully agree.

Now to wwwconfig-common and some history.

I wrote wwwconfig-common for one thing only (in the beginning). I maintained
horde and imp back then and wanted them to be easier to install than they
were before. I did so but when doing that I realized that we had vcery much
code duplication in the two packages. So I wrote a middle layer that I
named wwwconfig-common to reduce the amount of code in each package.

The design has been kept since then and they have this strange syntax for
some simple reasons.
1) Shell script because I wanted to keep the dependencies on a minimum.
2) Environment passing because then you can set variables and then just
call the functions and forget about the variables. Sort of anyway.
3) Sourced scripts, simply because there are no good way to pass
information back to the calling script to tell how the operation went
and what the problem was (if any). If anyone comes up with a good
solution on this, much can be solved.

Yesterday I did a reverse depends on wwwconfig-common and was a bit
surprised. So many packages depending on my hack! I thought that maybe
7-10 packages depended on it, but not 48!!! Well some are my own but
really not all of them.

Now here is what I would like to do in the future:
1) Write a new tool that solves the issues in wwwconfig-common.
2) Split the package in separate parts depending on that they are able
to configure.
3) Abstract the database configuration so it is (at least simpler)
just to set a variable (or similar) to tell what kind of database
you want to fill and with what kind of data. What user to create etc.
4) Get rid of the apache-*include* things. Applications should not
automatically be added to apache, for more (maybe) than a default-include
thing. It is not very nice to include over and over again even if
the maintainer do not want it. Right now it can be prevented by just
commenting out the line or move it to another file in the apache dir.
If you just remove it, it will be added again on upgrade. Yes that
is a bug but I know of no good solution within the current structure.

I want to keep the principle of not depending on some "big" interpreter.
I just want to use simple posix compatible shell-scipt unless someone comes
up with a really good argument of why.

The best thing is to have it language-independent (like the check functions
in nagios).

Well this was a quite long mail for a simple subject. I simply want to
have more people that want to help me.

Regards,

// Ola

> --
> Pierre Habouzit http://www.madism.org/
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> gpg : 1024D/A1EE761C 6045 409E 5CB5 2CEA 3E70 F17E C41E 995C C98C 90BE
> spam: mad.junk@madism.org




--
--------------------- Ola Lundqvist ---------------------------
/ opal@debian.org Annebergsslingan 37 \
| opal@lysator.liu.se 654 65 KARLSTAD |
| +46 (0)54-10 14 30 +46 (0)70-332 1551 |
| http://www.opal.dhs.org UIN/icq: 4912500 |
\ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 /
---------------------------------------------------------------


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Pierre Habouzit

2004-08-22, 6:11 pm

Hilko Bengen

2004-08-22, 8:48 pm

Pierre Habouzit <pierre.habouzit@m4x.org> writes:

> Le Jeu 19 Ao=FBt 2004 19:50, Ola Lundqvist a =E9crit :
>
> it's because it's a marvelous idea, it's normative, and you can assume=20
> that the tool will evolve with the package it allows to configure. it's=20
> cool for a packager.
>
> that's why we cannot really rewrite wwwconfig-common, but replace it
> with a new package, with new things in it.


Perhaps more than one package: At the moment, wwwconfig-common does
two things well:=20

1. Querying/Editing Apache config files
2. Setting up databases (good support for MySQL, decent support for
PostgreSQL)

Usage of the /etc/apache/conf.d/ directory probably makes most cases
of (1) unnecessary, but (2) needs some work, especially for
adding/deleting users and databases.

> wrt to the interpreter, I agree, we have not to depend on too much
> things. Shell scripts are fine, be we can use PERL too (it's
> =ABstandard=BB) for example. But I like the sh thing, that with a bit of
> dialog, I think all will be just fine.


The only real problem I have with the shell scripts is that they are
so poorly documented.=20

A nice thing to have available to posinst scripts would be a script
that checks whether a database setup that has been specified using
Debconf is available at all.
Ola Lundqvist

2004-08-23, 2:51 am

Hello

On Mon, Aug 23, 2004 at 02:38:16AM +0200, Hilko Bengen wrote:
> Pierre Habouzit <pierre.habouzit@m4x.org> writes:
>
>

Thanks!

>
> Perhaps more than one package: At the moment, wwwconfig-common does
> two things well:


Agreed!

> 1. Querying/Editing Apache config files
> 2. Setting up databases (good support for MySQL, decent support for
> PostgreSQL)
>
> Usage of the /etc/apache/conf.d/ directory probably makes most cases
> of (1) unnecessary, but (2) needs some work, especially for
> adding/deleting users and databases.


Agreed. Postgres support is not very good either. Someone that is good
on postgres are very welcome to give me patches. It has been better
lately but I'm not sure that it is in good shape.

>
> The only real problem I have with the shell scripts is that they are
> so poorly documented.


Documentation is _very_ welcome!

> A nice thing to have available to posinst scripts would be a script
> that checks whether a database setup that has been specified using
> Debconf is available at all.


Hmm that may be a good thing. Such a script is very welcome.

Regards,

// Ola

--
--------------------- Ola Lundqvist ---------------------------
/ opal@debian.org Annebergsslingan 37 \
| opal@lysator.liu.se 654 65 KARLSTAD |
| +46 (0)54-10 14 30 +46 (0)70-332 1551 |
| http://www.opal.dhs.org UIN/icq: 4912500 |
\ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 /
---------------------------------------------------------------


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com