[arch-commits] Commit in mod_python/trunk (4 files)

Eric Bélanger eric at archlinux.org
Sat Sep 11 19:32:09 UTC 2010


    Date: Saturday, September 11, 2010 @ 15:32:09
  Author: eric
Revision: 90456

upgpkg: mod_python 3.3.1-6
Rebuilt for python2, Removed old patches

Modified:
  mod_python/trunk/PKGBUILD
  mod_python/trunk/mod_python.install
Deleted:
  mod_python/trunk/apache22.patch
  mod_python/trunk/mod_python.patch

--------------------+
 PKGBUILD           |   29 +++--
 apache22.patch     |  250 ---------------------------------------------------
 mod_python.install |    5 -
 mod_python.patch   |   12 --
 4 files changed, 17 insertions(+), 279 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-09-11 19:26:04 UTC (rev 90455)
+++ PKGBUILD	2010-09-11 19:32:09 UTC (rev 90456)
@@ -3,23 +3,28 @@
 
 pkgname=mod_python
 pkgver=3.3.1
-pkgrel=5
-pkgdesc="an Apache module that embeds the Python interpreter within the server"
+pkgrel=6
+pkgdesc="An Apache module that embeds the Python interpreter within the server"
 arch=('i686' 'x86_64')
+url="http://www.modpython.org/"
 license=('APACHE')
-url="http://www.modpython.org/"
-depends=('apache>=2.2.9-4' 'python>=2.5.2-5')
+depends=('apache' 'python2')
 install=mod_python.install
-source=(http://www.apache.org/dist/httpd/modpython/mod_python-$pkgver.tgz
+source=(http://www.apache.org/dist/httpd/modpython/mod_python-${pkgver}.tgz
 	compile.patch)
+md5sums=('a3b0150176b726bd2833dac3a7837dc5' '4786c158223c2d3a94f3b6e69826b522')
+sha1sums=('e538170fd78e09408b6d8593da980b126a0fef93' 'ac69bb68a1c4bf804e9ad716e458774d404f8d78')
 
 build() {
-  cd $startdir/src/$pkgname-$pkgver
-  patch -Np0 -i ../compile.patch || return 1
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -Np0 -i ../compile.patch
   autoreconf
-  ./configure --prefix=/usr
-  make || return 1
-  make DESTDIR=$startdir/pkg install
+  ./configure --prefix=/usr --with-python=/usr/bin/python2
+  sed -i -e 's/ -Wl,--hash-style  $//' src/Makefile
+  make
 }
-md5sums=('a3b0150176b726bd2833dac3a7837dc5'
-         '4786c158223c2d3a94f3b6e69826b522')
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+}

Deleted: apache22.patch
===================================================================
--- apache22.patch	2010-09-11 19:26:04 UTC (rev 90455)
+++ apache22.patch	2010-09-11 19:32:09 UTC (rev 90456)
@@ -1,250 +0,0 @@
-diff -Naur mod_python-3.2.8-orig/src/connobject.c mod_python-3.2.8/src/connobject.c
---- mod_python-3.2.8-orig/src/connobject.c	2006-02-02 13:30:55.000000000 -0800
-+++ mod_python-3.2.8/src/connobject.c	2006-06-26 11:03:16.000000000 -0700
-@@ -79,7 +79,7 @@
-         rc = ap_get_brigade(c->input_filters, bb, mode, APR_BLOCK_READ, bufsize);
-         Py_END_ALLOW_THREADS;
- 
--        if (! APR_STATUS_IS_SUCCESS(rc)) {
-+        if (rc != APR_SUCCESS) {
-             PyErr_SetObject(PyExc_IOError, 
-                             PyString_FromString("Connection read error"));
-             return NULL;
-@@ -319,14 +319,14 @@
- {
-     PyObject *addrobj = makeipaddr(addr);
-     PyObject *ret = NULL;
-+
-+    /* apr_sockaddr_port_get was deprecated and removed in apr 1.x
-+     * Access the port directly instead
-+     */
-     if (addrobj) {
-         apr_port_t port;
--        if(apr_sockaddr_port_get(&port, addr)==APR_SUCCESS) {
--            ret = Py_BuildValue("Oi", addrobj, port );
--        }
--        else {
--            PyErr_SetString(PyExc_SystemError,"apr_sockaddr_port_get failure");
--        }
-+        port = addr->port; 
-+        ret = Py_BuildValue("Oi", addrobj, port );
-         Py_DECREF(addrobj);
-     }
-     return ret;
-diff -Naur mod_python-3.2.8-orig/src/filterobject.c mod_python-3.2.8/src/filterobject.c
---- mod_python-3.2.8-orig/src/filterobject.c	2004-11-25 14:10:52.000000000 -0800
-+++ mod_python-3.2.8/src/filterobject.c	2006-06-26 11:03:23.000000000 -0700
-@@ -178,7 +178,7 @@
-                                   APR_BLOCK_READ, self->readbytes);
-         Py_END_ALLOW_THREADS;
- 
--        if (!APR_STATUS_IS_EAGAIN(self->rc) && !APR_STATUS_IS_SUCCESS(self->rc)) {
-+        if (!APR_STATUS_IS_EAGAIN(self->rc) && !(self->rc == APR_SUCCESS)) {
-             PyErr_SetObject(PyExc_IOError, 
-                             PyString_FromString("Input filter read error"));
-             return NULL;
-diff -Naur mod_python-3.2.8-orig/test/httpdconf.py mod_python-3.2.8/test/httpdconf.py
---- mod_python-3.2.8-orig/test/httpdconf.py	2005-09-13 13:35:57.000000000 -0700
-+++ mod_python-3.2.8/test/httpdconf.py	2006-06-26 11:03:32.000000000 -0700
-@@ -37,8 +37,11 @@
- class Container:
-     
-     def __init__(self, *args):
--        self.args = args
-+        self.args = list(args)
-         self.indent = 0
-+    
-+    def append(self, value):
-+        self.args.append(value)
- 
-     def __str__(self):
- 
-@@ -80,6 +83,16 @@
-     def __init__(self, val):
-         Directive.__init__(self, self.__class__.__name__, val)
- 
-+class AuthBasicAuthoritative(Directive):
-+    # New in Apache 2.2
-+    def __init__(self, val):
-+        Directive.__init__(self, self.__class__.__name__, val)
-+
-+class AuthBasicProvider(Directive):
-+    # New in Apache 2.2
-+    def __init__(self, val):
-+        Directive.__init__(self, self.__class__.__name__, val)
-+
- class AuthType(Directive):
-     def __init__(self, val):
-         Directive.__init__(self, self.__class__.__name__, val)
-@@ -112,6 +125,10 @@
-     def __init__(self, dir, *args):
-         ContainerTag.__init__(self, self.__class__.__name__, dir, args)
- 
-+class KeepAliveTimeout(Directive):
-+    def __init__(self, val):
-+        Directive.__init__(self, self.__class__.__name__, val)
-+
- class Listen(Directive):
-     def __init__(self, val):
-         Directive.__init__(self, self.__class__.__name__, val)
-diff -Naur mod_python-3.2.8-orig/test/test.py mod_python-3.2.8/test/test.py
---- mod_python-3.2.8-orig/test/test.py	2006-02-19 11:51:17.000000000 -0800
-+++ mod_python-3.2.8/test/test.py	2006-06-26 11:03:35.000000000 -0700
-@@ -220,6 +220,32 @@
-         s = '"%s"' % s
-     return s
- 
-+def get_apache_version():
-+
-+    print "Checking Apache version...."
-+    httpd = quoteIfSpace(HTTPD)
-+    cmd = '%s -v' % (httpd)
-+    (stdin,stdout) = os.popen2(cmd)
-+
-+    version_str = None
-+    for line in stdout:
-+        if line.startswith('Server version'):
-+             version_str = line.strip()
-+             break
-+
-+    if version_str:
-+        version_str = version_str.split('/')[1]
-+        major,minor,patch = version_str.split('.',3)
-+        version = '%s.%s' % (major,minor)
-+    else:
-+        
-+        print "Can't determine Apache version. Assuming 2.0"
-+        version = '2.0'
-+    print version
-+    return version
-+
-+APACHE_VERSION = get_apache_version()
-+
- class HttpdCtrl:
-     # a mixin providing ways to control httpd
- 
-@@ -289,14 +315,26 @@
-             Listen(PORT),
-             PythonOption('PythonOptionTest sample_value'),
-             DocumentRoot(DOCUMENT_ROOT),
--            LoadModule("python_module %s" % quoteIfSpace(MOD_PYTHON_SO)),
--            IfModule("!mod_auth.c",
-+            LoadModule("python_module %s" % quoteIfSpace(MOD_PYTHON_SO)))
-+
-+        if APACHE_VERSION == '2.2':
-+            # mod_auth has been split into mod_auth_basic and some other modules
-+            s.append(IfModule("!mod_auth_basic.c",
-+                     LoadModule("auth_basic_module %s" %
-+                                quoteIfSpace(os.path.join(modpath, "mod_auth_basic.so")))))
-+
-+            # Default KeepAliveTimeout is 5 for apache 2.2, but 15 in apache 2.0
-+            # Explicitly set the value so it's the same as 2.0
-+            s.append(KeepAliveTimeout("15"))
-+        else:
-+            s.append(IfModule("!mod_auth.c",
-                      LoadModule("auth_module %s" %
-                                 quoteIfSpace(os.path.join(modpath, "mod_auth.so")))))
- 
-+        s.append("\n# --APPENDED-- \n\n"+append)
-+
-         f = open(CONFIG, "w")
-         f.write(str(s))
--        f.write("\n# --APPENDED-- \n\n"+append)
-         f.close()
- 
-     def startHttpd(self,extra=''):
-@@ -595,7 +633,12 @@
- 
-     def test_req_requires_conf(self):
- 
--        c = VirtualHost("*",
-+        if APACHE_VERSION == '2.2':
-+            # Apache 2.2 needs AuthBasicAuthoritative Off 
-+            # This is necessary when combining mod_auth_basic with third-party
-+            # modules that are not configured with the AuthBasicProvider  
-+            # directive. 
-+            c = VirtualHost("*",
-                         ServerName("test_req_requires"),
-                         DocumentRoot(DOCUMENT_ROOT),
-                         Directory(DOCUMENT_ROOT,
-@@ -603,8 +646,23 @@
-                                   AuthName("blah"),
-                                   AuthType("basic"),
-                                   Require("valid-user"),
-+                                  AuthBasicAuthoritative("Off"),
-                                   PythonAuthenHandler("tests::req_requires"),
-                                   PythonDebug("On")))
-+
-+        else:
-+            # This configuration is suitable for Apache 2.0
-+            c = VirtualHost("*",
-+                        ServerName("test_req_requires"),
-+                        DocumentRoot(DOCUMENT_ROOT),
-+                        Directory(DOCUMENT_ROOT,
-+                                  SetHandler("mod_python"),
-+                                  AuthName("blah"),
-+                                  AuthType("basic"),
-+                                  Require("valid-user"),
-+                                  PythonAuthenHandler("tests::req_requires"),
-+                                  PythonDebug("On")))
-+
-         return str(c)
- 
-     def test_req_requires(self):
-@@ -1595,47 +1653,10 @@
-         response = conn.getresponse()
-         rsp = response.read()
-         conn.close()
-+
-         if rsp != "test ok":
-             self.fail("session did not accept our cookie")
- 
--    def test_Session_illegal_sid_conf(self):
--
--        c = VirtualHost("*",
--                        ServerName("test_Session_Session"),
--                        DocumentRoot(DOCUMENT_ROOT),
--                        Directory(DOCUMENT_ROOT,
--                                  SetHandler("mod_python"),
--                                  PythonHandler("tests::Session_Session"),
--                                  PythonDebug("On")))
--        return str(c)
--
--    def test_Session_illegal_sid(self):
--
--        print "\n  * Testing Session with illegal session id value"
--        bad_cookie = 'pysid=/path/traversal/attack/bad; path=/'
--        conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT)
--        conn.putrequest("GET", "/tests.py", skip_host=1)
--        conn.putheader("Host", "test_Session_Session:%s" % PORT)
--        conn.putheader("Cookie", bad_cookie)
--        conn.endheaders()
--        response = conn.getresponse()
--        status = response.status
--        conn.close()
--        if status != 500:
--            self.fail("session accepted a sid with illegal characters")
--
--        bad_cookie = 'pysid=%s; path=/' % ('abcdef'*64)
--        conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT)
--        conn.putrequest("GET", "/tests.py", skip_host=1)
--        conn.putheader("Host", "test_Session_Session:%s" % PORT)
--        conn.putheader("Cookie", bad_cookie)
--        conn.endheaders()
--        response = conn.getresponse()
--        status = response.status
--        conn.close()
--        if status != 500:
--            self.fail("session accepted a sid which is too long")
--
-     def test_publisher_conf(self):
-         c = VirtualHost("*",
-                         ServerName("test_publisher"),
-@@ -2007,7 +2028,6 @@
-         perRequestSuite.addTest(PerRequestTestCase("test_Cookie_Cookie"))
-         perRequestSuite.addTest(PerRequestTestCase("test_Cookie_MarshalCookie"))
-         perRequestSuite.addTest(PerRequestTestCase("test_Session_Session"))
--        perRequestSuite.addTest(PerRequestTestCase("test_Session_illegal_sid"))
-         perRequestSuite.addTest(PerRequestTestCase("test_interpreter_per_directive"))
-         perRequestSuite.addTest(PerRequestTestCase("test_interpreter_per_directory"))
-         perRequestSuite.addTest(PerRequestTestCase("test_publisher"))

Modified: mod_python.install
===================================================================
--- mod_python.install	2010-09-11 19:26:04 UTC (rev 90455)
+++ mod_python.install	2010-09-11 19:32:09 UTC (rev 90456)
@@ -1,4 +1,3 @@
-# arg 1:  the new package version
 post_install() {
   echo
   echo "Now don't forget to edit your main config and add"
@@ -7,7 +6,3 @@
   echo "    AddModule mod_python.c"
   echo
 }
-
-op=$1
-shift
-$op $*

Deleted: mod_python.patch
===================================================================
--- mod_python.patch	2010-09-11 19:26:04 UTC (rev 90455)
+++ mod_python.patch	2010-09-11 19:32:09 UTC (rev 90456)
@@ -1,12 +0,0 @@
-diff -ur mod_python-3.2.8/configure.in mod_python-3.2.8-new/configure.in
---- mod_python-3.2.8/configure.in	2005-10-28 09:06:22.000000000 -0700
-+++ mod_python-3.2.8-new/configure.in	2006-03-06 10:43:28.000000000 -0800
-@@ -287,7 +287,7 @@
- # get the mod_python version
- AC_SUBST(MP_VERSION)
- MP_VERSION=`awk '/MPV_STRING/ {print $3}' src/include/mpversion.h`
--MP_VERSION=`echo $MP_VERSION | sed s/\\"//g`                                      
-+MP_VERSION=`echo $MP_VERSION | sed s/\"//g`                                      
- 
- # get --with-python-src. The python src is required to generate the documentation
- # It is not required to compile or install mod_python itself




More information about the arch-commits mailing list