Rev 47: Fix cherokee-0.7.2.2 support. in http://bazaar.launchpad.net/%7Evila/bzr/local-test-server
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed Oct 1 13:45:47 BST 2008
At http://bazaar.launchpad.net/%7Evila/bzr/local-test-server
------------------------------------------------------------
revno: 47
revision-id: v.ladeuil+lp at free.fr-20081001124544-kiwhmklwb4q15b9b
parent: v.ladeuil+lp at free.fr-20080901130447-dn4cgeb29krpf3is
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: local_test_server
timestamp: Wed 2008-10-01 14:45:44 +0200
message:
Fix cherokee-0.7.2.2 support.
* server.py:
(Cherokee._start): '--detach' is the new name for '-b' in 0.7.2.2.
* configs/cherokee.conf:
Updated for cherokee-0.7.2.2.
-------------- next part --------------
=== modified file 'configs/cherokee.conf'
--- a/configs/cherokee.conf 2008-06-24 16:52:55 +0000
+++ b/configs/cherokee.conf 2008-10-01 12:45:44 +0000
@@ -1,28 +1,35 @@
#
-# Based on /etc/cherokee/cherokee.conf in Ubuntu Gusty
+# Based on /etc/cherokee/cherokee.conf in Ubuntu Hardy
#
+
+# Note that the syntax tottaly changed between gutsy and hardy,
+# hardy using version 0.7.2.2 (prior versions will not be
+# supported by the local-test-server plugin (but, as always,
+# patches welcome ;-)
+
##
## cherokee.conf -- Cherokee HTTP server configuration file
##
-Port %(port)s
-IPv6 Off
-Listen %(host)s
-
-KeepAlive On
-
-PidFile %(pid_file)s
+server!port = %(port)s
+server!ipv6 = 0
+server!listen = %(host)s
+
+server!keepalive = On
+
+server!pid_file = %(pid_file)s
+
+#vserver!1!nick = default
# Tests will create symlinks in that directory to point to the
# appropriate location
-DocumentRoot %(data_dir)s
-
-Log combined {
- AccessLog %(var_log_dir)s/access.log
- ErrorLog %(log_file)s
-}
-
-Directory / {
- Handler common
-}
+vserver!default!document_root = %(data_dir)s
+
+vserver!default!logger = combined
+vserver!default!logger!access!type = file
+vserver!default!logger!access!filename = %(var_log_dir)s/access.log
+vserver!default!logger!error!type = file
+vserver!default!logger!error!filename = %(log_file)s
+
+#vserver!1!rule!10!directory!/!handler = common
=== modified file 'server.py'
--- a/server.py 2008-09-01 13:04:47 +0000
+++ b/server.py 2008-10-01 12:45:44 +0000
@@ -312,7 +312,7 @@
:returns: True if one line matches the regexp, False otherwise.
- Soem servers returns early when started (or stopped thru specialized
+ Some servers returns early when started (or stopped thru specialized
commands, apache2 for one). This doesn't guarantee that the server is
started/stopped. We need to rely on some predefined patterns to appear
in the log file. Hackish :-( This also impose deleting the log file
@@ -450,7 +450,7 @@
def _start(self):
self._start_via_command([self._server_command_name,
- '-b', '-C', self.output_config_path])
+ '--detach', '-C', self.output_config_path])
if not self._wait_for_pidfile_to_be_created():
raise LTSCantStartError(
self, extra='Did not create pid file %s'
@@ -479,9 +479,6 @@
def _start(self):
self._start_via_command([self._server_command_name,
'-f', self.output_config_path])
- # Since lighttpd deamonize itself early, the return code is useless,
- # most starting errors happening after the fork. Resort to log polling
- # for lack of better means :-/
if not self._wait_for_server_start_in_log():
raise LTSCantStartError(self, extra='logfile contains no start')
# We continue to require that the pid file be created though.
More information about the bazaar-commits
mailing list