tisdagen den 14 februari 2006 18.35 skrev Jim Gallacher: > Oden Eriksson wrote: > > tisdagen den 14 februari 2006 14.19 skrev Jim Gallacher: > >>Oden Eriksson wrote: > >>>Hello. > >>> > >>>In our package in Mandriva I patch mod_python.c so that the mutex stuff > >>>is put in "/var/cache/httpd/mod_python/". But now with mod_python-3.2.7 > >>>plus fixes from the trunk and running the test suite it complains it > >>>cannot access "/var/cache/httpd/mod_python/" (of course). So my > >>>question/request is, could you please make this directory set in the > >>>config? > >> > >>I assume you mean as an option to configure, rather than as an Apache > >>configuration directive? > > > > I meant as an apache configuration directive. > > After giving this some thought I think it should be both, so the options > become: > > 1. Default /tmp > > 2. --configure --with-mutex-dir=/some/directory > Allows distributions to package mod_python according to their > platform specification, without the need for applying any patches. > > 3. PythonMutexDir /some/place > This would mainly be used in the unit tests to override the setting > applied by option #2. This avoids Oden's unit test problem which is > similar to the problem described in MODPYTHON-119, where the unit test > defaults may conflict with a mod_python instance running on the server.
Looks good to me. Please make sure the test case will survive too. Currently the test case fails all over the place for me... Why don't you write the test cases so that you can use Apache-Test? > I wonder if we should generalize this, so rather than PythonMutexDir, we > have PythonModuleConfig. Usage might look like: > > PythonModuleConfig mutex_dir /path/to/mutexs > PythonModuleConfig max_mutex_locks 8 > > Currently the number of mutex locks is set with ./configure > --with-max-locks Looks very good. I was planning to make an optional rpm build switch so that you could rebuild the src.rpm so that you could use any number there. Speaking of locks, I think this could be improved a bit so that you don't have to use ipc for example. History has shown ipc semaphore locks are not very stable on linux. > By the way Oden, are you the offical mod_python maintainer on Mandriva? Amongst many other packages (too many), yes. -- Regards // Oden Eriksson Mandriva: http://www.mandriva.com NUX: http://li.nux.se