From 91aacc2e81640e6bacd0fccd4579555b45e2117c Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 21 Mar 2018 12:31:23 +0100 Subject: [PATCH] Upstream release 3.0.0 --- .gitignore | 1 + 0001-Ignore-SASL-methods-in-DSE-test.patch | 37 ------------- ...-Use-correct-types-for-BER-en-decode.patch | 53 ------------------- python-ldap.spec | 16 +++--- sources | 2 +- 5 files changed, 8 insertions(+), 101 deletions(-) delete mode 100644 0001-Ignore-SASL-methods-in-DSE-test.patch delete mode 100644 0001-Use-correct-types-for-BER-en-decode.patch diff --git a/.gitignore b/.gitignore index 1a8f214..5b54165 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ python-ldap-2.3.10.tar.gz /python-ldap-3.0.0b2.tar.gz /python-ldap-3.0.0b3.tar.gz /python-ldap-3.0.0b4.tar.gz +/python-ldap-3.0.0.tar.gz diff --git a/0001-Ignore-SASL-methods-in-DSE-test.patch b/0001-Ignore-SASL-methods-in-DSE-test.patch deleted file mode 100644 index 3cab360..0000000 --- a/0001-Ignore-SASL-methods-in-DSE-test.patch +++ /dev/null @@ -1,37 +0,0 @@ -From e587e8a3020a2967e95278e80a98f4a86b2fd861 Mon Sep 17 00:00:00 2001 -From: Christian Heimes -Date: Wed, 10 Jan 2018 14:53:44 +0100 -Subject: [PATCH] Ignore SASL methods in DSE test - -Closes: https://github.com/python-ldap/python-ldap/issues/160 -Signed-off-by: Christian Heimes ---- - Tests/t_ldapobject.py | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/Tests/t_ldapobject.py b/Tests/t_ldapobject.py -index 27deadc..2c8ce75 100644 ---- a/Tests/t_ldapobject.py -+++ b/Tests/t_ldapobject.py -@@ -520,12 +520,15 @@ class Test00_SimpleLDAPObject(SlapdTestCase): - dse = self._ldap_conn.read_rootdse_s() - self.assertIsInstance(dse, dict) - self.assertEqual(dse[u'supportedLDAPVersion'], [b'3']) -+ keys = set(dse) -+ # SASL info may be missing in restricted build environments -+ keys.discard(u'supportedSASLMechanisms') - self.assertEqual( -- sorted(dse), -- [u'configContext', u'entryDN', u'namingContexts', u'objectClass', -+ keys, -+ {u'configContext', u'entryDN', u'namingContexts', u'objectClass', - u'structuralObjectClass', u'subschemaSubentry', - u'supportedControl', u'supportedExtension', u'supportedFeatures', -- u'supportedLDAPVersion', u'supportedSASLMechanisms'] -+ u'supportedLDAPVersion'} - ) - self.assertEqual( - self._ldap_conn.get_naming_contexts(), --- -2.14.3 - diff --git a/0001-Use-correct-types-for-BER-en-decode.patch b/0001-Use-correct-types-for-BER-en-decode.patch deleted file mode 100644 index 26d547d..0000000 --- a/0001-Use-correct-types-for-BER-en-decode.patch +++ /dev/null @@ -1,53 +0,0 @@ -From b18b8ad1a5d826a54cff8e3656eb4b8bc9678692 Mon Sep 17 00:00:00 2001 -From: Christian Heimes -Date: Wed, 10 Jan 2018 14:35:24 +0100 -Subject: [PATCH] Use correct types for BER en/decode - -ber_scanf() and ber_printf() "i" format uses ber_int_t. lber_types.h -defines the type as int but Python code assumes the type to be unsigned -long: - -typedef LBER_INT_T ber_int_t; - -The code was working fine on little endian machines but broke on big -endian machines. ber_int_t is now correctly parsed as signed int. - -Signed-off-by: Christian Heimes ---- - Modules/ldapcontrol.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Modules/ldapcontrol.c b/Modules/ldapcontrol.c -index 9522d57..ec50625 100644 ---- a/Modules/ldapcontrol.c -+++ b/Modules/ldapcontrol.c -@@ -242,7 +242,7 @@ encode_rfc2696(PyObject *self, PyObject *args) - BerElement *ber = 0; - struct berval cookie, *ctrl_val; - Py_ssize_t cookie_len; -- unsigned long size; -+ int size = 0; /* ber_int_t is int */ - ber_tag_t tag; - - if (!PyArg_ParseTuple(args, "is#:encode_page_control", &size, -@@ -300,7 +300,7 @@ decode_rfc2696(PyObject *self, PyObject *args) - struct berval ldctl_value; - ber_tag_t tag; - struct berval *cookiep; -- unsigned long count = 0; -+ int count = 0; /* ber_int_t is int */ - Py_ssize_t ldctl_value_len; - - if (!PyArg_ParseTuple(args, "s#:decode_page_control", -@@ -320,7 +320,7 @@ decode_rfc2696(PyObject *self, PyObject *args) - goto endlbl; - } - -- res = Py_BuildValue("(kO&)", count, LDAPberval_to_object, cookiep); -+ res = Py_BuildValue("(iO&)", count, LDAPberval_to_object, cookiep); - ber_bvfree(cookiep); - - endlbl: --- -2.14.3 - diff --git a/python-ldap.spec b/python-ldap.spec index 808f733..108ba4d 100644 --- a/python-ldap.spec +++ b/python-ldap.spec @@ -1,5 +1,5 @@ ### Abstract ### -%global prerelease b4 +# global prerelease b4 # Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1520990 # openldap does not re-register nss shutdown callbacks after nss_Shutdown is @@ -12,18 +12,13 @@ Name: python-ldap Version: 3.0.0 -Release: 0.5.%{?prerelease}%{?dist} +Release: 1%{?dist} License: Python Group: System Environment/Libraries Summary: An object-oriented API to access LDAP directory servers URL: http://python-ldap.org/ Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}%{?prerelease}.tar.gz -# Workaround for https://github.com/python-ldap/python-ldap/issues/160 -Patch0: 0001-Ignore-SASL-methods-in-DSE-test.patch -# https://github.com/python-ldap/python-ldap/issues/161 -Patch1: 0001-Use-correct-types-for-BER-en-decode.patch - ### Build Dependencies ### BuildRequires: openldap-devel >= %{openldap_version} BuildRequires: openssl-devel @@ -84,8 +79,6 @@ Provides: python3-pyldap%{?_isa} = %{version}-%{release} %prep %setup -qc pushd %{name}-%{version}%{?prerelease} -%patch0 -p1 -%patch1 -p1 popd mv %{name}-%{version}%{?prerelease} python3 @@ -157,6 +150,9 @@ popd %{python3_sitearch}/python_ldap-%{version}%{?prerelease}-py%{python3_version}.egg-info %changelog +* Wed Mar 21 2018 Christian Heimes - 3.0.0-1 +- New upstream release 3.0.0 + * Fri Feb 09 2018 Fedora Release Engineering - 3.0.0-0.5.b4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild @@ -300,7 +296,7 @@ popd * Wed May 17 2006 Matthew Barnes - 2.2.0-2 - Put back the epoch line... happy beehive? -* Tue May 15 2006 Matthew Barnes - 2.2.0-1 +* Mon May 15 2006 Matthew Barnes - 2.2.0-1 - Update to 2.2.0 - Update python-ldap-2.0.6-rpath.patch and rename it to python-ldap-2.2.0-dirs.patch. diff --git a/sources b/sources index 90376ab..7150895 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-ldap-3.0.0b4.tar.gz) = 11432638a16b6e7180ed2f8f4d9a5ec65e892e2f0b9fcd0a61ace066372a15ac113c943e3f21f371ea53592f20cec0c91d42370754cba48f16cc5f970e1768f6 +SHA512 (python-ldap-3.0.0.tar.gz) = 707780b9bf2c75451ab13a7e435b89a425a539a206b6faa54d3ab2332d0c46a9df6aeda3ba4b6344b9212c3031d83b2e08249995088f0fcef7a4859964f757d6