Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

Request for help: Fixing 05to06.py?

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


gwolf at debian

Mar 27, 2008, 4:29 PM

Post #1 of 9 (401 views)
Permalink
Request for help: Fixing 05to06.py?

Ok, the Debian packages for Cherokee 0.6.x are almost-almost-almost
ready, yay! You can verify so at:

http://people.debian.org/~gwolf/cherokee/

I'm still missing some problems regarding the migration from 0.5 to
0.6 - Some of them are left for myself, but with some others, I hope I
can get your help.

To upload the packages, I need help only with an issue that me, as a
person blinded by Python code, cannot solve: I need to ensure people
can migrate _at_least_ the standard configuration - And, of course, as
complex configurations as possible.

Now, the standard configuration shipped by Cherokee includes
/etc/cherokee/sites-available/default - Which contrib/05to06.py fails
to parse. I am a Python illiterate, so I know I'm not the best person
to look into this, and Álvaro is too busy writing new kewl features
for us. And I just cannot upload something to Debian that will break
what our users expect!

So, please, can anybody help find/fix why is 05to06 failing to run? If
it is at all useful to you, the first place it failed is at the
following declaration:

UserDir public_html {
Directory / {
Handler common
}

Directory /cgi-bin/ {
Handler cgi
DocumentRoot /usr/lib/cgi-bin/
}
}

But even deleting this, it it goes a couple of lines further, and then
it dies at:

Directory / {
Handler common
}

And from there on... It seems to me it's not parsing the next line
that dies, but something related to the context. Even if I delete
every comment, I end up with a seemingly simple and valid file - Which
fails abruptly and unexplainably. Here it is, at least for your
collective amusement:

DirectoryIndex index.php, index.html, index.htm, index.shtml, cherokee.index.html
DocumentRoot /var/www
UserDir public_html {
Directory / {
Handler common
}

Directory /cgi-bin/ {
Handler cgi
DocumentRoot /usr/lib/cgi-bin/
}
}
Log combined {
AccessLog /var/log/cherokee/default.access
ErrorLog /var/log/cherokee/default.error
}
Directory / {
Handler common
}

Directory /about {
Handler server_info {
JustAbout
}
}

Directory /icons {
Handler file
DocumentRoot /usr/share/cherokee/icons/
}

Directory /cgi-bin {
Handler cgi
DocumentRoot /usr/lib/cgi-bin/
}

Extension php, php3, php4 {
Handler phpcgi
}

So... Please help with the parser. It is basically all that's still
missing to be able to upload 0.6 into Debian.

Oh! As a side note: 0.6 allows for the inclusion of configuration file
snippets. What would be more advisable in your point of view, keeping
the configuration as it currently is, spilled over several different
and manageable files, or merging it together into one Big file? I
bring the question mainly because I think it will make more sense that
way to cherokee-admin, but I might be mistaken.

Thanks a lot,

--
Gunnar Wolf - gwolf[at]gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF


alvaro at sun

Mar 28, 2008, 1:05 AM

Post #2 of 9 (387 views)
Permalink
Re: Request for help: Fixing 05to06.py? [In reply to]

On 28 Mar 2008, at 00:29, Gunnar Wolf wrote:

> Oh! As a side note: 0.6 allows for the inclusion of configuration file
> snippets. What would be more advisable in your point of view, keeping
> the configuration as it currently is, spilled over several different
> and manageable files, or merging it together into one Big file? I
> bring the question mainly because I think it will make more sense that
> way to cherokee-admin, but I might be mistaken.


Good quetion. That has been a hidden issue for quite some time now.

Cherokee 0.5 supported splitted configuration files. It was a nice-to-
have that allowed people to keep the configuration directory tidy, so
it did make sense to support it.

Now, with Cherokee 0.6, people are not even supposed to know where the
configuration file is. That is the whole point on cherokee-admin,
actually. Having that into account, it does not matter how the
configuration directory is: is it clean? "Dunno, but I do not care! I
have be shiny administration interface to deal with it :-)".

The only remaining problem is that distribution may not be able to
integrate other packages with Cherokee 0.6; at least not as easily as
with Cherokee 0.5 (Previously, the only thing they had to do was to
drop a little configuration file in the mods-enabled directory).

My idea is to implement some sort of mechanism to allow web software
packages to add "wizards" to Cherokee admin; but quite frankly, it is
not one of the top priority items in the TODO list.

--
Greetings, alo.
http://www.alobbs.com/

--
Greetings, alo.

_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


alberto.caso at adaptia

Mar 28, 2008, 4:14 AM

Post #3 of 9 (387 views)
Permalink
Re: Request for help: Fixing 05to06.py? [In reply to]

El vie, 28-03-2008 a las 09:05 +0100, Alvaro Lopez Ortega escribió:
> The only remaining problem is that distribution may not be able to
> integrate other packages with Cherokee 0.6; at least not as easily as
> with Cherokee 0.5 (Previously, the only thing they had to do was to
> drop a little configuration file in the mods-enabled directory).

That alone is enough reason for trying to support splitted files :)

Regards,

--
Alberto Caso Palomino
Adaptia - http://www.adaptia.es
alberto.caso[at]adaptia.es

_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


alvaro at sun

Mar 28, 2008, 4:38 AM

Post #4 of 9 (386 views)
Permalink
Re: Request for help: Fixing 05to06.py? [In reply to]

On 28 Mar 2008, at 12:14, Alberto Caso wrote:
> El vie, 28-03-2008 a las 09:05 +0100, Alvaro Lopez Ortega escribió:
>> The only remaining problem is that distribution may not be able to
>> integrate other packages with Cherokee 0.6; at least not as easily as
>> with Cherokee 0.5 (Previously, the only thing they had to do was to
>> drop a little configuration file in the mods-enabled directory).
>
> That alone is enough reason for trying to support splitted files :)


Let's try to be pragmatic here. Cherokee-admin does not support
splitted files, and moreover it will not support it in the near future.

In fact, I am not even sure whether it is desirable thing to implement
in Cherokee. It looks much more like the "less stinky" solution for
dealing with text plain configuration files.

Cherokee 0.5 used splitted configuration files because it was the best
solution at that point, but things have changed a lot since then. In
fact, I have put a whole lot of work to get rid of it.

In my opinion, it would make much more sense to allow the web based
applications to 'enhance' cherokee-admin by adding some sort of
definitions file. In fact, *the server configuration* is a single
thing that ought to be treated as such.

Let's try not to copy the workarounds that other projects were forced
to implement. We should try to thing ahead that!

--
Greetings, alo.

_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


gwolf at gwolf

Apr 1, 2008, 9:03 AM

Post #5 of 9 (369 views)
Permalink
Re: Request for help: Fixing 05to06.py? [In reply to]

Alvaro Lopez Ortega dijo [Fri, Mar 28, 2008 at 12:38:16PM +0100]:
> Let's try to be pragmatic here. Cherokee-admin does not support
> splitted files, and moreover it will not support it in the near future.
>
> In fact, I am not even sure whether it is desirable thing to implement
> in Cherokee. It looks much more like the "less stinky" solution for
> dealing with text plain configuration files.
>
> Cherokee 0.5 used splitted configuration files because it was the best
> solution at that point, but things have changed a lot since then. In
> fact, I have put a whole lot of work to get rid of it.
>
> In my opinion, it would make much more sense to allow the web based
> applications to 'enhance' cherokee-admin by adding some sort of
> definitions file. In fact, *the server configuration* is a single
> thing that ought to be treated as such.
>
> Let's try not to copy the workarounds that other projects were forced
> to implement. We should try to thing ahead that!

Umh... I perfectly understand Cherokee is not by far among the most
popular webservers - But looking at the standard practices both inside
distributions (i.e. in Debian, that's what I can speak about) and for
Web application authors, it's customary to ship your code with a very
simple configuration snippet, following a easy to understand (or at
least, widely understood) configuration syntax.

Such developers should not be expected to write a configuration module
for an obscure Webserver. They won't do it. That's more likely to
isolate Cherokee even more.

I do agree that, given the very-very-strong-preference for a
registry-like configuration managed by a tool, the _core_
configuration should be shipped as a single file (and yes, I'll merge
the different configuration parts into one for Debian). But denying
third parties the ease that means just shipping a configuration
snippet will only ensure less public exposure for Cherokee.

(BTW, the configurations generated by 05to06.py _do_ have an 'include'
keyword)

Greetings,

--
Gunnar Wolf - gwolf[at]gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


miguelangel at ajo

Apr 1, 2008, 11:05 AM

Post #6 of 9 (371 views)
Permalink
Re: Request for help: Fixing 05to06.py? [In reply to]

Ok, if you see the documentation at
http://www.cherokee-project.com/doc/internal_configuration.html
the external include files are supported with the include= tag.

What Alvaro means is that cherooke-admin is the one not supporting it:
when we modify the configuration from cherokee-admin interface and It's
saved
the config file it does it as a "whole" file, not splitted.

Anyway, the splitted files are "readen" and understood by cherooke server,
and configuration
is a tree-like text file. And I think it's something interesting, for
example for systems
running multiple configurations (big shared hostings) based on cPanel,
Plesk, etc...
which are based on splitted configuration files.

I think many System administrators feel itch when having to deal with web
interfaces.
They'd migrate to cherokee if they need it, but they work with text-file
configurations
most of time, and probably that's what they'll expect to find. That's
probably a good
reason to keep an up-to-date 05to06.py file converter (config compiler?).


2008/4/1, Gunnar Wolf <gwolf[at]gwolf.org>:
>
> Alvaro Lopez Ortega dijo [Fri, Mar 28, 2008 at 12:38:16PM +0100]:
>
> > Let's try to be pragmatic here. Cherokee-admin does not support
> > splitted files, and moreover it will not support it in the near future.
> >
> > In fact, I am not even sure whether it is desirable thing to implement
> > in Cherokee. It looks much more like the "less stinky" solution for
> > dealing with text plain configuration files.
> >
> > Cherokee 0.5 used splitted configuration files because it was the best
> > solution at that point, but things have changed a lot since then. In
> > fact, I have put a whole lot of work to get rid of it.
> >
> > In my opinion, it would make much more sense to allow the web based
> > applications to 'enhance' cherokee-admin by adding some sort of
> > definitions file. In fact, *the server configuration* is a single
> > thing that ought to be treated as such.
> >
> > Let's try not to copy the workarounds that other projects were forced
> > to implement. We should try to thing ahead that!
>
>
> Umh... I perfectly understand Cherokee is not by far among the most
> popular webservers - But looking at the standard practices both inside
> distributions (i.e. in Debian, that's what I can speak about) and for
> Web application authors, it's customary to ship your code with a very
> simple configuration snippet, following a easy to understand (or at
> least, widely understood) configuration syntax.
>
> Such developers should not be expected to write a configuration module
> for an obscure Webserver. They won't do it. That's more likely to
> isolate Cherokee even more.
>
> I do agree that, given the very-very-strong-preference for a
> registry-like configuration managed by a tool, the _core_
> configuration should be shipped as a single file (and yes, I'll merge
> the different configuration parts into one for Debian). But denying
> third parties the ease that means just shipping a configuration
> snippet will only ensure less public exposure for Cherokee.
>
> (BTW, the configurations generated by 05to06.py _do_ have an 'include'
> keyword)
>
> Greetings,
>
>
> --
> Gunnar Wolf - gwolf[at]gwolf.org - (+52-55)5623-0154 / 1451-2244
> PGP key 1024D/8BB527AF 2001-10-23
> Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF
>
> _______________________________________________
> Cherokee mailing list
> Cherokee[at]cherokee-project.com
> http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee
>


alvaro at sun

Apr 2, 2008, 4:30 AM

Post #7 of 9 (368 views)
Permalink
Re: Request for help: Fixing 05to06.py? [In reply to]

On 1 Apr 2008, at 18:03, Gunnar Wolf wrote:
> Alvaro Lopez Ortega dijo [Fri, Mar 28, 2008 at 12:38:16PM +0100]:
>> Let's try to be pragmatic here. Cherokee-admin does not support
>> splitted files, and moreover it will not support it in the near
>> future.
>>
>> In fact, I am not even sure whether it is desirable thing to
>> implement
>> in Cherokee. It looks much more like the "less stinky" solution for
>> dealing with text plain configuration files.
>>
>> Cherokee 0.5 used splitted configuration files because it was the
>> best
>> solution at that point, but things have changed a lot since then. In
>> fact, I have put a whole lot of work to get rid of it.
>>
>> In my opinion, it would make much more sense to allow the web based
>> applications to 'enhance' cherokee-admin by adding some sort of
>> definitions file. In fact, *the server configuration* is a single
>> thing that ought to be treated as such.
>>
>> Let's try not to copy the workarounds that other projects were forced
>> to implement. We should try to thing ahead that!
>
> Umh... I perfectly understand Cherokee is not by far among the most
> popular webservers - But looking at the standard practices both inside
> distributions (i.e. in Debian, that's what I can speak about) and for
> Web application authors, it's customary to ship your code with a very
> simple configuration snippet, following a easy to understand (or at
> least, widely understood) configuration syntax.
>
> Such developers should not be expected to write a configuration module
> for an obscure Webserver. They won't do it. That's more likely to
> isolate Cherokee even more.

Ummmm.. encouraging comments.. nice! :-)

> I do agree that, given the very-very-strong-preference for a
> registry-like configuration managed by a tool, the _core_
> configuration should be shipped as a single file (and yes, I'll merge
> the different configuration parts into one for Debian). But denying
> third parties the ease that means just shipping a configuration
> snippet will only ensure less public exposure for Cherokee.
>
> (BTW, the configurations generated by 05to06.py _do_ have an 'include'
> keyword)

Cherokee >=0.6 does support the "include" property and even a
"try_include" key for that legacy kind of environment that you were
referring to. However, that is what it is: legacy. We should no longer
use it if it is not strictly necessary. Besides, cherokee-admin does
not support it so if you use any of those keys you will have to manage
the configuration files by hand, and that is something that an average
user should not even think of doing.

In fact, supporting file inclusion in cherokee-admin would be trivial.
I do not think that it could require more than 10 additional lines of
code, but it would bring a tough problem though: included files would
be mixed with the original file, and therefore the updated
configuration file would contain the whole thing, leaving the original
included file lingering in the inclusion directory for ever.

So, being aware of the problem that you are exposing (that is a
problem, indeed), and knowing that the file inclusion mechanism is no
longer an option, we will have to figure out a new way to allow third
party web applications to include configuration snippets. The cherokee-
admin definition files (or modules) is something that we -the cherokee
project- will do for the most spread software, but that I do not
expect anyone else to do in the near term.

Would a command line utility for merging, removing and modifying
configuration files help here?

--
Greetings, alo.

_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


gwolf at gwolf

Apr 2, 2008, 7:11 AM

Post #8 of 9 (367 views)
Permalink
Re: Request for help: Fixing 05to06.py? [In reply to]

Alvaro Lopez Ortega dijo [Wed, Apr 02, 2008 at 01:30:04PM +0200]:
> >Umh... I perfectly understand Cherokee is not by far among the most
> >popular webservers - But looking at the standard practices both inside
> >distributions (i.e. in Debian, that's what I can speak about) and for
> >Web application authors, it's customary to ship your code with a very
> >simple configuration snippet, following a easy to understand (or at
> >least, widely understood) configuration syntax.
> >
> >Such developers should not be expected to write a configuration module
> >for an obscure Webserver. They won't do it. That's more likely to
> >isolate Cherokee even more.
>
> Ummmm.. encouraging comments.. nice! :-)

I'm sorry - It shows we all have a bad day every now and then and
forget to defuse before writing to the lists, right? But still, it
_is_ important to keep this in mind. Cherokee is not a major player in
the webserver - at least, not yet. Explanations for that are easy to
come up with... Of course, that does not mean it should stay that way.

> Cherokee >=0.6 does support the "include" property and even a
> "try_include" key for that legacy kind of environment that you were
> referring to. However, that is what it is: legacy. We should no
> longer use it if it is not strictly necessary. Besides,
> cherokee-admin does not support it so if you use any of those keys
> you will have to manage the configuration files by hand, and that is
> something that an average user should not even think of doing.
> (...)

Umm... I understand it is meant for legacy. But remember we are making
a major switch - It _is_ the right time, in any case, to kill that
legacy support. Configuration files have to be rewritten anyway. If
you don't want end-users from hand-editting the configuration file
(and the reason for it still eludes me - Having a configuration tool
should not mean being forced to use it! And yes, the file _is_ quite
hand-edittable as it is), what reason is there to allow for including
files?

> In fact, supporting file inclusion in cherokee-admin would be
> trivial. I do not think that it could require more than 10
> additional lines of code, but it would bring a tough problem though:
> included files would be mixed with the original file, and therefore
> the updated configuration file would contain the whole thing,
> leaving the original included file lingering in the inclusion
> directory for ever.

Of course. And while there might be different heuristics to know what
should be saved where, heuristics are precisely known for failing
every now and then.

Still, if the server understands a configuration files with includes,
and cherokee-admin agrees to modify said configuration, the
configuration should be taken into account (or ignored from the server
- that is, both programs should exhibit a consistent behavior) -
otherwise, the user will be faced with a situation he possibly won't
be able to understand.

> Would a command line utility for merging, removing and modifying
> configuration files help here?

I think that's the easiest way out. I was thinking whether to modify
05to06.py to do this (although my Python is sucky) or to integrate it
from the Debian Cherokee preinst script - I think it is in Cherokee's
best interest to do it from 05to06.

Greetings,

--
Gunnar Wolf - gwolf[at]gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF
_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee


alvaro at sun

Apr 2, 2008, 7:48 AM

Post #9 of 9 (375 views)
Permalink
Re: Request for help: Fixing 05to06.py? [In reply to]

On 2 Apr 2008, at 16:11, Gunnar Wolf wrote:
>>
>> Would a command line utility for merging, removing and modifying
>> configuration files help here?
>
> I think that's the easiest way out. I was thinking whether to modify
> 05to06.py to do this (although my Python is sucky) or to integrate it
> from the Debian Cherokee preinst script - I think it is in Cherokee's
> best interest to do it from 05to06.


Ok, I see what you mean. That's something that we can do if you are so
use that Linux distros do need it.

Besides, the idea of using wizards for installing third party web
software from cherokee-admin is something we will implement for
improving the medium term user experience.

--
Greetings, alo.

_______________________________________________
Cherokee mailing list
Cherokee[at]cherokee-project.com
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.