quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Pederson ...@barryp.org>
Subject Re: [REPEAT] Please help test 3.1.1b
Date Wed, 15 Oct 2003 21:44:24 GMT
Gregory (Grisha) Trubetskoy wrote:
> I think I didn't make it clear in the last message:
> 
> In order for this release to be officially announced, at least a few
> people on this list need to try it and send in a +1 indicating that it
> worked on their system (along with some desciption of what their system
> is). *Anyone* on this list can do this, you don't have to be an official
> committer or anything of that sort.
> 
> Doing a test could probably take as little as 10 minutes, and I'd
> encourage you to do it sooner than later.
> 
> Looking at the www.modpython.org log we've only had one download of the
> tgz file so far, which isn't encouraging :-)
> 
> Grisha
> 
> On Tue, 14 Oct 2003, Gregory (Grisha) Trubetskoy wrote:
> 
> 
>>You can get the sneak preview of 3.1.1 beta here:
>>
>>http://www.modpython.org/tmp/3.1.1b/
>>
>>Please download it, then do the usual
>>
>>$ ./configure --with-apxs=/wherever/it/is
>>$ make
>>$ (su)
>># make install
>>
>>Then
>>
>>$ cd test
>>$ python test.py
>>
>>And see if any tests fail. I have tested this on FreeBSD 4.8 and OS X
>>10.2.8, but not on Linux, as my Linux box is dead ATM. Also Solaris would
>>be nice... (as well as Panther, if you have it).

I gave it a try on a FreeBSD 4.8 box with Apache 2.0.47 and Python 2.3.2 
installed from the ports.  mod_python itself seems ok, but the unittests gave 
me trouble.

First, in test/test.py this section guessed wrong about where my DSOs were:

    # where other modules might be
    modpath = os.path.split(os.path.split(HTTPD)[0])[0]
    modpath = os.path.join(modpath, "modules")

That resulted in modpath being set to '/usr/local/modules', which was 
incorrect.  I replaced that with this and got a better result:

    modpath = os.popen('apxs -q LIBEXECDIR', 'r').read().strip()

After that, it still wouldn't run the tests, the logs/error_log showed:
----------
[Wed Oct 15 16:23:41 2003] [alert] (2)No such file or directory: getpwuid: 
couldn't determine user name from uid 4294967295, you probably need to modify 
the User directive
-----------

I patched test/httpdconf.py to allow for "User" and "Group" directives to be 
added:



--- httpdconf.py.original       Wed Oct 15 16:24:55 2003
+++ httpdconf.py        Wed Oct 15 16:25:56 2003
@@ -147,6 +147,10 @@
      def __init__(self, val):
          Directive.__init__(self, self.__class__.__name__, val)

+class Group(Directive):
+    def __init__(self, val):
+        Directive.__init__(self, self.__class__.__name__, val)
+
  class IfModule(ContainerTag):
      def __init__(self, dir, *args):
          ContainerTag.__init__(self, self.__class__.__name__, dir, args)
@@ -291,6 +295,9 @@
      def __init__(self, addr, *args):
          ContainerTag.__init__(self, self.__class__.__name__, addr, args)

+class User(Directive):
+    def __init__(self, val):
+        Directive.__init__(self, self.__class__.__name__, val)




and then hardcoded in some calls to set those in test/test.py:



--- test.py.original    Wed Oct 15 16:26:24 2003
+++ test.py     Wed Oct 15 16:26:56 2003
@@ -255,6 +254,8 @@
                       LoadModule("dir_module %s" %
                                  quoteIfSpace(os.path.join(modpath, 
"mod_dir.so")))),
              ServerRoot(SERVER_ROOT),
+            User('www'),
+            Group('www'),
              ErrorLog("logs/error_log"),
              LogLevel("debug"),
              LogFormat(r'"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" 
\"%{User-Agent}i\"" combined'),



Not sure how that should be put in in a non-hardwired fashion, but I'd think 
it'd be important to be able to test using other userids/groups, since it 
caused trouble before with the mutex creation/graceful restarts/cleanup (was 
fixed back in August).

After that, the unittests ran and passed OK.  I'll see about trying it on a 
FreeBSD 5.1 box later.

	Barry



Mime
View raw message