23210170 Upgrade python-ldap to 2.4.25
authorzihao.zhu@oracle.com <zihao.zhu@oracle.com>
Wed, 20 Jul 2016 07:21:51 -0700
changeset 6437 09fb2c712a39
parent 6434 9b8c9a1d0ee8
child 6439 b66f3093f546
23210170 Upgrade python-ldap to 2.4.25
components/python/python-ldap/Makefile
components/python/python-ldap/patches/fixtests.patch
components/python/python-ldap/patches/setup.cfg.patch
components/python/python-ldap/patches/setup.py.patch
components/python/python-ldap/python-ldap-PYVER.p5m
--- a/components/python/python-ldap/Makefile	Tue Jul 19 16:08:22 2016 -0700
+++ b/components/python/python-ldap/Makefile	Wed Jul 20 07:21:51 2016 -0700
@@ -25,16 +25,16 @@
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		python-ldap
-COMPONENT_VERSION=	2.4.10
+COMPONENT_VERSION=	2.4.25
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:67cc7801bf24c29386ab99966ceb68d6a60fa9e0566cc95a4fbb2c4695a8ce54
+    sha256:62d00dbc86f3f9b21beacd9b826e8f9895f900637a60a6d4e7ab59a1cdc64e56
 COMPONENT_ARCHIVE_URL=	$(call pypi_url)
 COMPONENT_PROJECT_URL=	http://www.python-ldap.org/
 COMPONENT_BUGDB=	python-mod/python-ldap
 
-TPNO=			14503
+TPNO=			29571
 
 # This module has syntax issues and thus is not Python 3 ready.
 PYTHON_VERSIONS=	$(PYTHON2_VERSIONS)
--- a/components/python/python-ldap/patches/fixtests.patch	Tue Jul 19 16:08:22 2016 -0700
+++ b/components/python/python-ldap/patches/fixtests.patch	Wed Jul 20 07:21:51 2016 -0700
@@ -15,19 +15,41 @@
   The answer being yes.  And the constants are not defined in the latest
   version of python-ldap. 
 
---- python-ldap-2.4.10/Tests/runtests.sh.orig	2013-08-27 06:55:02.811070599 -0700
-+++ python-ldap-2.4.10/Tests/runtests.sh	2013-08-29 14:08:44.244509377 -0700
-@@ -13,7 +13,7 @@
- failed=
- for test in t_*.py;  do
-     echo "$test:"
--    PYTHONPATH="../build/lib.$plat_specifier" $PYTHON "$test" "$@" || 
+Patch was developed in-house; it is Solaris specific and
+will not be contributed upstream.
+
+--- /dev/null	Mon May 23 12:50:16 2016
++++ new/Tests/runtests.sh	Mon May 23 12:50:16 2016
+@@ -0,0 +1,26 @@
++#!/bin/sh
++#
++# This script runs all the t_*.py tests in the current directory,
++# preparing PYTHONPATH to use the most recent local build
++#
++# Run with -v option for verbose
++#
++
++set -e
++: ${PYTHON:="python"}
++plat_specifier=`$PYTHON -c 'import sys,distutils.util; \
++        print(distutils.util.get_platform()+"-"+sys.version[0:3])'`
++failed=
++for test in t_*.py;  do
++    echo "$test:"
 +    PYTHONPATH="$PYTHONPATH" $PYTHON "$test" "$@" || 
-         failed="$failed $test"
- done
++        failed="$failed $test"
++done
++
++if test -n "$failed"; then
++   echo "Tests that failed:$failed" >&2
++   exit 1
++else
++   echo "All tests passed. Yay."
++   exit 0
++fi
  
---- python-ldap-2.4.10/Tests/slapd.py.orig	2013-08-27 06:55:17.348745615 -0700
-+++ python-ldap-2.4.10/Tests/slapd.py	2013-08-30 15:45:41.532814947 -0700
+--- python-ldap-2.4.25/Tests/slapd.py.orig	Fri May  6 13:26:21 2016
++++ python-ldap-2.4.25/Tests/slapd.py	Fri May  6 13:31:14 2016
 @@ -4,7 +4,7 @@
  and talking to it with ldapsearch/ldapadd.
  """
@@ -72,8 +94,8 @@
                  "-x",
                  "-D", self.get_root_dn(),
                  "-w", self.get_root_password(),
---- python-ldap-2.4.10/Tests/t_cext.py.orig	2013-08-27 06:55:30.369505885 -0700
-+++ python-ldap-2.4.10/Tests/t_cext.py	2013-09-04 10:39:22.688268552 -0700
+--- python-ldap-2.4.25/Tests/t_cext.py.orig	Fri May  6 13:26:21 2016
++++ python-ldap-2.4.25/Tests/t_cext.py	Fri May  6 13:31:14 2016
 @@ -1,6 +1,6 @@
  
  import unittest, slapd
--- a/components/python/python-ldap/patches/setup.cfg.patch	Tue Jul 19 16:08:22 2016 -0700
+++ b/components/python/python-ldap/patches/setup.cfg.patch	Wed Jul 20 07:21:51 2016 -0700
@@ -1,14 +1,16 @@
 Used to provide correct OpenLDAP include directory and to remove bogus 
 OpenLDAP lib directory, so that pkglint doesn't complain.
+Patch was developed in-house; it is Solaris specific and
+will not be contributed upstream.
 
---- python-ldap-2.4.10/setup.cfg.orig	2013-05-01 14:47:08.110553898 -0700
-+++ python-ldap-2.4.10/setup.cfg	2013-05-01 14:47:49.755987482 -0700
+--- python-ldap-2.4.25/setup.cfg.orig	Fri May  6 13:26:21 2016
++++ python-ldap-2.4.25/setup.cfg	Fri May  6 13:31:14 2016
 @@ -1,6 +1,6 @@
  [_ldap]
--library_dirs = /opt/openldap-RE24/lib /usr/lib
--include_dirs = /opt/openldap-RE24/include /usr/include/sasl /usr/include
+-library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
+-include_dirs = /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
 +library_dirs =
-+include_dirs = /usr/include/openldap /usr/include/sasl /usr/include
++include_dirs = /usr/include/openldap /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
  defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
  extra_compile_args = 
  extra_objects = 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/python-ldap/patches/setup.py.patch	Wed Jul 20 07:21:51 2016 -0700
@@ -0,0 +1,23 @@
+Three missing modules need to be added to setup.py to be installed.
+Patch was developed in-house; it is Solaris specific and
+will not be contributed upstream.
+
+--- python-ldap-2.4.25/setup.py.old	2016-07-19 10:13:07.016090954 -0700
++++ python-ldap-2.4.25/setup.py	2016-07-19 10:13:49.738738316 -0700
+@@ -153,6 +153,7 @@
+     'ldap.controls.deref',
+     'ldap.controls.libldap',
+     'ldap.controls.openldap',
++    'ldap.controls.pagedresults',
+     'ldap.controls.ppolicy',
+     'ldap.controls.psearch',
+     'ldap.controls.pwdpolicy',
+@@ -159,6 +160,8 @@
+     'ldap.controls.readentry',
+     'ldap.controls.sessiontrack',
+     'ldap.controls.simple',
++    'ldap.controls.sss',
++    'ldap.controls.vlv',
+     'ldap.cidict',
+     'ldap.dn',
+     'ldap.extop',
--- a/components/python/python-ldap/python-ldap-PYVER.p5m	Tue Jul 19 16:08:22 2016 -0700
+++ b/components/python/python-ldap/python-ldap-PYVER.p5m	Wed Jul 20 07:21:51 2016 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri \
@@ -44,12 +44,18 @@
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/async.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/cidict.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/__init__.py
+file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/deref.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/libldap.py
+file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/openldap.py
+file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/pagedresults.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/ppolicy.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/psearch.py
+file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/pwdpolicy.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/readentry.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/sessiontrack.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/simple.py
+file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/sss.py
+file path=usr/lib/python$(PYVER)/vendor-packages/ldap/controls/vlv.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/dn.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/extop/__init__.py
 file path=usr/lib/python$(PYVER)/vendor-packages/ldap/extop/dds.py